RTEMS 4.11Annotated Report
Fri Oct 8 13:53:34 2010
300089a0 <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 ) {
300089a0: e5902000 ldr r2, [r0]
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
300089a4: e5903010 ldr r3, [r0, #16]
switch( node->type ) {
300089a8: 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;
300089ac: e5933034 ldr r3, [r3, #52] ; 0x34
switch( node->type ) {
300089b0: e2422001 sub r2, r2, #1
300089b4: e3520006 cmp r2, #6
300089b8: 979ff102 ldrls pc, [pc, r2, lsl #2]
300089bc: ea000010 b 30008a04 <IMFS_Set_handlers+0x64> <== NOT EXECUTED
300089c0: 300089dc .word 0x300089dc <== NOT EXECUTED
300089c4: 300089e4 .word 0x300089e4 <== NOT EXECUTED
300089c8: 300089ec .word 0x300089ec <== NOT EXECUTED
300089cc: 300089ec .word 0x300089ec <== NOT EXECUTED
300089d0: 300089f4 .word 0x300089f4 <== NOT EXECUTED
300089d4: 300089f4 .word 0x300089f4 <== NOT EXECUTED
300089d8: 300089fc .word 0x300089fc <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
300089dc: e593300c ldr r3, [r3, #12]
300089e0: ea000006 b 30008a00 <IMFS_Set_handlers+0x60>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
300089e4: e59f3020 ldr r3, [pc, #32] ; 30008a0c <IMFS_Set_handlers+0x6c>
300089e8: ea000004 b 30008a00 <IMFS_Set_handlers+0x60>
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
300089ec: e59f301c ldr r3, [pc, #28] ; 30008a10 <IMFS_Set_handlers+0x70>
300089f0: ea000002 b 30008a00 <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;
300089f4: e5933008 ldr r3, [r3, #8]
300089f8: ea000000 b 30008a00 <IMFS_Set_handlers+0x60>
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
300089fc: e5933010 ldr r3, [r3, #16]
30008a00: e5803008 str r3, [r0, #8]
break;
}
return 0;
}
30008a04: e3a00000 mov r0, #0
30008a08: e12fff1e bx lr
30008ac8 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
30008ac8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
30008acc: e3d27007 bics r7, r2, #7
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
30008ad0: e24dd040 sub sp, sp, #64 ; 0x40
30008ad4: e58d0000 str r0, [sp]
30008ad8: e1a06001 mov r6, r1
30008adc: e1a08002 mov r8, r2
30008ae0: e1a04003 mov r4, r3
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
30008ae4: 05935000 ldreq r5, [r3]
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
int len;
IMFS_token_types type = IMFS_CURRENT_DIR;
30008ae8: 03a09001 moveq r9, #1
* 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 );
30008aec: 028da004 addeq sl, sp, #4
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
30008af0: 0a000057 beq 30008c54 <IMFS_eval_path+0x18c>
rtems_set_errno_and_return_minus_one( EIO );
30008af4: eb001000 bl 3000cafc <__errno> <== NOT EXECUTED
30008af8: e3a03005 mov r3, #5 <== NOT EXECUTED
30008afc: ea00007e b 30008cfc <IMFS_eval_path+0x234> <== NOT EXECUTED
* 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 );
30008b00: e59d2000 ldr r2, [sp]
30008b04: e28d303c add r3, sp, #60 ; 0x3c
30008b08: e0820007 add r0, r2, r7
30008b0c: e1a01006 mov r1, r6
30008b10: e1a0200a mov r2, sl
30008b14: eb0001ae bl 300091d4 <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
30008b18: e5943000 ldr r3, [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 );
30008b1c: e1a09000 mov r9, r0
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
30008b20: e3530000 cmp r3, #0
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
30008b24: e59db03c ldr fp, [sp, #60] ; 0x3c
i += len;
if ( !pathloc->node_access )
30008b28: 0a000041 beq 30008c34 <IMFS_eval_path+0x16c>
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
30008b2c: e3500000 cmp r0, #0
30008b30: 0a000006 beq 30008b50 <IMFS_eval_path+0x88>
if ( node->type == IMFS_DIRECTORY )
30008b34: e595104c ldr r1, [r5, #76] ; 0x4c
30008b38: e3510001 cmp r1, #1
30008b3c: 1a000003 bne 30008b50 <IMFS_eval_path+0x88>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
30008b40: e1a00004 mov r0, r4
30008b44: ebffffb2 bl 30008a14 <IMFS_evaluate_permission>
30008b48: e3500000 cmp r0, #0
30008b4c: 0a000068 beq 30008cf4 <IMFS_eval_path+0x22c>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
30008b50: 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;
30008b54: e06b6006 rsb r6, fp, r6
i += len;
30008b58: e087700b add r7, r7, fp
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;
30008b5c: e5945000 ldr r5, [r4]
switch( type ) {
30008b60: 0a000014 beq 30008bb8 <IMFS_eval_path+0xf0>
30008b64: e3590004 cmp r9, #4
30008b68: 0a000036 beq 30008c48 <IMFS_eval_path+0x180>
30008b6c: e3590002 cmp r9, #2
30008b70: 1a000037 bne 30008c54 <IMFS_eval_path+0x18c>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
30008b74: e59fc194 ldr ip, [pc, #404] ; 30008d10 <IMFS_eval_path+0x248>
30008b78: e59c3000 ldr r3, [ip]
30008b7c: e5933018 ldr r3, [r3, #24]
30008b80: e1550003 cmp r5, r3
30008b84: 0a000032 beq 30008c54 <IMFS_eval_path+0x18c>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
30008b88: e594e010 ldr lr, [r4, #16]
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
30008b8c: e59e301c ldr r3, [lr, #28]
30008b90: e1550003 cmp r5, r3
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
30008b94: 028dc028 addeq ip, sp, #40 ; 0x28
30008b98: 028ee008 addeq lr, lr, #8
30008b9c: 0a000037 beq 30008c80 <IMFS_eval_path+0x1b8>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
30008ba0: e5955008 ldr r5, [r5, #8]
30008ba4: e3550000 cmp r5, #0
30008ba8: 1a000024 bne 30008c40 <IMFS_eval_path+0x178>
rtems_set_errno_and_return_minus_one( ENOENT );
30008bac: eb000fd2 bl 3000cafc <__errno>
30008bb0: e5809000 str r9, [r0]
30008bb4: ea000051 b 30008d00 <IMFS_eval_path+0x238>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
30008bb8: e595304c ldr r3, [r5, #76] ; 0x4c
30008bbc: e3530003 cmp r3, #3
30008bc0: 1a000004 bne 30008bd8 <IMFS_eval_path+0x110>
IMFS_evaluate_hard_link( pathloc, 0 );
30008bc4: e1a00004 mov r0, r4
30008bc8: e3a01000 mov r1, #0
30008bcc: ebffffaa bl 30008a7c <IMFS_evaluate_hard_link>
node = pathloc->node_access;
30008bd0: e5945000 ldr r5, [r4]
30008bd4: ea000008 b 30008bfc <IMFS_eval_path+0x134>
* It would be a design error if we evaluated the link and
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
30008bd8: e3530004 cmp r3, #4
30008bdc: 1a000006 bne 30008bfc <IMFS_eval_path+0x134>
result = IMFS_evaluate_sym_link( pathloc, 0 );
30008be0: e1a00004 mov r0, r4
30008be4: e3a01000 mov r1, #0
30008be8: eb000049 bl 30008d14 <IMFS_evaluate_sym_link>
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
if ( result == -1 )
30008bec: e3700001 cmn r0, #1
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
30008bf0: e1a0b000 mov fp, r0
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
30008bf4: e5945000 ldr r5, [r4]
if ( result == -1 )
30008bf8: 0a000041 beq 30008d04 <IMFS_eval_path+0x23c>
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
30008bfc: e595304c ldr r3, [r5, #76] ; 0x4c
30008c00: e3530001 cmp r3, #1
30008c04: 0a000002 beq 30008c14 <IMFS_eval_path+0x14c>
rtems_set_errno_and_return_minus_one( ENOTDIR );
30008c08: eb000fbb bl 3000cafc <__errno>
30008c0c: e3a03014 mov r3, #20
30008c10: ea000039 b 30008cfc <IMFS_eval_path+0x234>
/*
* 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 ) {
30008c14: e595e05c ldr lr, [r5, #92] ; 0x5c
30008c18: e35e0000 cmp lr, #0
30008c1c: 1a000015 bne 30008c78 <IMFS_eval_path+0x1b0>
}
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
30008c20: e1a00005 mov r0, r5
30008c24: e1a0100a mov r1, sl
30008c28: eb000149 bl 30009154 <IMFS_find_match_in_dir>
if ( !node )
30008c2c: e2505000 subs r5, r0, #0
30008c30: 1a000002 bne 30008c40 <IMFS_eval_path+0x178>
rtems_set_errno_and_return_minus_one( ENOENT );
30008c34: eb000fb0 bl 3000cafc <__errno>
30008c38: e3a03002 mov r3, #2
30008c3c: ea00002e b 30008cfc <IMFS_eval_path+0x234>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
30008c40: e5845000 str r5, [r4]
30008c44: ea000002 b 30008c54 <IMFS_eval_path+0x18c>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
30008c48: eb000fab bl 3000cafc <__errno>
30008c4c: e3a0305b mov r3, #91 ; 0x5b
30008c50: ea000029 b 30008cfc <IMFS_eval_path+0x234>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
30008c54: e3590004 cmp r9, #4
30008c58: 13590000 cmpne r9, #0
30008c5c: 1affffa7 bne 30008b00 <IMFS_eval_path+0x38>
* 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 ) {
30008c60: e595304c ldr r3, [r5, #76] ; 0x4c
30008c64: e3530001 cmp r3, #1
30008c68: 1a000019 bne 30008cd4 <IMFS_eval_path+0x20c>
if ( node->info.directory.mt_fs != NULL ) {
30008c6c: e595e05c ldr lr, [r5, #92] ; 0x5c
30008c70: e35e0000 cmp lr, #0
30008c74: 0a000016 beq 30008cd4 <IMFS_eval_path+0x20c>
newloc = node->info.directory.mt_fs->mt_fs_root;
30008c78: e28dc028 add ip, sp, #40 ; 0x28
30008c7c: e28ee01c add lr, lr, #28
30008c80: e8be000f ldm lr!, {r0, r1, r2, r3}
30008c84: e8ac000f stmia ip!, {r0, r1, r2, r3}
30008c88: e59ee000 ldr lr, [lr]
30008c8c: e58ce000 str lr, [ip]
*pathloc = newloc;
30008c90: e28dc028 add ip, sp, #40 ; 0x28
30008c94: e8bc000f ldm ip!, {r0, r1, r2, r3}
30008c98: e1a0c004 mov ip, r4
30008c9c: e8ac000f stmia ip!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
30008ca0: e59d103c ldr r1, [sp, #60] ; 0x3c
30008ca4: e59d2000 ldr r2, [sp]
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
30008ca8: e58ce000 str lr, [ip]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
30008cac: e0610007 rsb r0, r1, r7
30008cb0: e0820000 add r0, r2, r0
30008cb4: e594c00c ldr ip, [r4, #12]
30008cb8: e0861001 add r1, r6, r1
30008cbc: e1a02008 mov r2, r8
30008cc0: e1a03004 mov r3, r4
30008cc4: e1a0e00f mov lr, pc
30008cc8: e59cf000 ldr pc, [ip]
30008ccc: e1a0b000 mov fp, r0
30008cd0: ea00000b b 30008d04 <IMFS_eval_path+0x23c>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
30008cd4: e1a00004 mov r0, r4
30008cd8: ebffff30 bl 300089a0 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
30008cdc: e1a01008 mov r1, r8
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
30008ce0: e1a0b000 mov fp, r0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
30008ce4: e1a00004 mov r0, r4
30008ce8: ebffff49 bl 30008a14 <IMFS_evaluate_permission>
30008cec: e3500000 cmp r0, #0
30008cf0: 1a000003 bne 30008d04 <IMFS_eval_path+0x23c>
rtems_set_errno_and_return_minus_one( EACCES );
30008cf4: eb000f80 bl 3000cafc <__errno>
30008cf8: e3a0300d mov r3, #13
30008cfc: e5803000 str r3, [r0]
30008d00: e3e0b000 mvn fp, #0
return result;
}
30008d04: e1a0000b mov r0, fp
30008d08: e28dd040 add sp, sp, #64 ; 0x40
30008d0c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
30008e50 <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 */
)
{
30008e50: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30008e54: e24dd03c sub sp, sp, #60 ; 0x3c
30008e58: e1a07000 mov r7, r0
30008e5c: e1a04001 mov r4, r1
30008e60: e1a0a002 mov sl, r2
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
30008e64: e5916000 ldr r6, [r1]
/*
* Get the path length.
*/
pathlen = strlen( path );
30008e68: eb00130d bl 3000daa4 <strlen>
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
30008e6c: e3a05000 mov r5, #0
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
30008e70: 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 );
30008e74: e1a01008 mov r1, r8
30008e78: e28d3038 add r3, sp, #56 ; 0x38
30008e7c: e0870005 add r0, r7, r5
30008e80: e1a0200d mov r2, sp
30008e84: eb0000d2 bl 300091d4 <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
30008e88: e5943000 ldr r3, [r4]
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
30008e8c: e59db038 ldr fp, [sp, #56] ; 0x38
i += len;
if ( !pathloc->node_access )
30008e90: e3530000 cmp r3, #0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
30008e94: e1a09000 mov r9, r0
pathlen -= len;
30008e98: e06b8008 rsb r8, fp, r8
i += len;
if ( !pathloc->node_access )
30008e9c: 0a000060 beq 30009024 <IMFS_evaluate_for_make+0x1d4>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
30008ea0: e3500000 cmp r0, #0
30008ea4: 0a000006 beq 30008ec4 <IMFS_evaluate_for_make+0x74>
if ( node->type == IMFS_DIRECTORY )
30008ea8: e596104c ldr r1, [r6, #76] ; 0x4c
30008eac: e3510001 cmp r1, #1
30008eb0: 1a000003 bne 30008ec4 <IMFS_evaluate_for_make+0x74>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
30008eb4: e1a00004 mov r0, r4
30008eb8: ebfffed5 bl 30008a14 <IMFS_evaluate_permission>
30008ebc: e3500000 cmp r0, #0
30008ec0: 0a00006c beq 30009078 <IMFS_evaluate_for_make+0x228>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
30008ec4: e5943000 ldr r3, [r4]
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
30008ec8: e085500b add r5, r5, fp
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;
30008ecc: e1a06003 mov r6, r3
switch( type ) {
30008ed0: e3590004 cmp r9, #4
30008ed4: 979ff109 ldrls pc, [pc, r9, lsl #2]
30008ed8: eaffffe5 b 30008e74 <IMFS_evaluate_for_make+0x24> <== NOT EXECUTED
30008edc: 30008fe8 .word 0x30008fe8 <== NOT EXECUTED
30008ee0: 30008e74 .word 0x30008e74 <== NOT EXECUTED
30008ee4: 30008ef0 .word 0x30008ef0 <== NOT EXECUTED
30008ee8: 30008f2c .word 0x30008f2c <== NOT EXECUTED
30008eec: 30008ff4 .word 0x30008ff4 <== 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 )
30008ef0: e59f119c ldr r1, [pc, #412] ; 30009094 <IMFS_evaluate_for_make+0x244>
30008ef4: e5912000 ldr r2, [r1]
30008ef8: e5922018 ldr r2, [r2, #24]
30008efc: e1530002 cmp r3, r2
30008f00: 0affffdb beq 30008e74 <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){
30008f04: e594e010 ldr lr, [r4, #16]
30008f08: e59e201c ldr r2, [lr, #28]
30008f0c: e1530002 cmp r3, r2
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
30008f10: 028dc024 addeq ip, sp, #36 ; 0x24
30008f14: 028ee008 addeq lr, lr, #8
30008f18: 0a000019 beq 30008f84 <IMFS_evaluate_for_make+0x134>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
30008f1c: e5936008 ldr r6, [r3, #8]
30008f20: e3560000 cmp r6, #0
30008f24: 1a00002d bne 30008fe0 <IMFS_evaluate_for_make+0x190>
30008f28: ea00003d b 30009024 <IMFS_evaluate_for_make+0x1d4>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
30008f2c: e593304c ldr r3, [r3, #76] ; 0x4c
30008f30: e3530003 cmp r3, #3
30008f34: 0a000001 beq 30008f40 <IMFS_evaluate_for_make+0xf0>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
30008f38: e3530004 cmp r3, #4
30008f3c: 1a000005 bne 30008f58 <IMFS_evaluate_for_make+0x108>
result = IMFS_evaluate_link( pathloc, 0 );
30008f40: e1a00004 mov r0, r4
30008f44: e3a01000 mov r1, #0
30008f48: ebffff93 bl 30008d9c <IMFS_evaluate_link>
if ( result == -1 )
30008f4c: e3700001 cmn r0, #1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
30008f50: e1a06000 mov r6, r0
if ( result == -1 )
30008f54: 0a00004b beq 30009088 <IMFS_evaluate_for_make+0x238>
return -1;
}
node = pathloc->node_access;
30008f58: e5940000 ldr r0, [r4]
if ( !node )
30008f5c: e3500000 cmp r0, #0
30008f60: 0a00003c beq 30009058 <IMFS_evaluate_for_make+0x208>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
30008f64: e590304c ldr r3, [r0, #76] ; 0x4c
30008f68: e3530001 cmp r3, #1
30008f6c: 1a000039 bne 30009058 <IMFS_evaluate_for_make+0x208>
/*
* 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 ) {
30008f70: e590e05c ldr lr, [r0, #92] ; 0x5c
30008f74: e35e0000 cmp lr, #0
30008f78: 0a000014 beq 30008fd0 <IMFS_evaluate_for_make+0x180>
newloc = node->info.directory.mt_fs->mt_fs_root;
30008f7c: e28dc024 add ip, sp, #36 ; 0x24
30008f80: e28ee01c add lr, lr, #28
30008f84: e8be000f ldm lr!, {r0, r1, r2, r3}
30008f88: e8ac000f stmia ip!, {r0, r1, r2, r3}
30008f8c: e59ee000 ldr lr, [lr]
30008f90: e58ce000 str lr, [ip]
*pathloc = newloc;
30008f94: e28dc024 add ip, sp, #36 ; 0x24
30008f98: e8bc000f ldm ip!, {r0, r1, r2, r3}
30008f9c: e1a0c004 mov ip, r4
30008fa0: e8ac000f stmia ip!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
30008fa4: e59d2038 ldr r2, [sp, #56] ; 0x38
* 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;
30008fa8: e58ce000 str lr, [ip]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
30008fac: e0625005 rsb r5, r2, r5
30008fb0: e594300c ldr r3, [r4, #12]
30008fb4: e0870005 add r0, r7, r5
30008fb8: e1a01004 mov r1, r4
30008fbc: e1a0200a mov r2, sl
30008fc0: e1a0e00f mov lr, pc
30008fc4: e593f004 ldr pc, [r3, #4]
30008fc8: e1a06000 mov r6, r0
30008fcc: ea00002d b 30009088 <IMFS_evaluate_for_make+0x238>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
30008fd0: e1a0100d mov r1, sp
30008fd4: eb00005e bl 30009154 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
30008fd8: e2506000 subs r6, r0, #0
30008fdc: 0a000007 beq 30009000 <IMFS_evaluate_for_make+0x1b0>
done = true;
else
pathloc->node_access = node;
30008fe0: e5846000 str r6, [r4]
30008fe4: eaffffa2 b 30008e74 <IMFS_evaluate_for_make+0x24>
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
30008fe8: eb000ec3 bl 3000cafc <__errno>
30008fec: e3a03011 mov r3, #17
30008ff0: ea000022 b 30009080 <IMFS_evaluate_for_make+0x230>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
30008ff4: eb000ec0 bl 3000cafc <__errno>
30008ff8: e3a0305b mov r3, #91 ; 0x5b
30008ffc: ea00001f b 30009080 <IMFS_evaluate_for_make+0x230>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
30009000: e59d3038 ldr r3, [sp, #56] ; 0x38
30009004: e0633005 rsb r3, r3, r5
30009008: e0873003 add r3, r7, r3
3000900c: e58a3000 str r3, [sl]
* 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(
30009010: 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++) {
30009014: ea000005 b 30009030 <IMFS_evaluate_for_make+0x1e0>
if ( !IMFS_is_separator( path[ i ] ) )
30009018: ebffe6f6 bl 30002bf8 <rtems_filesystem_is_separator>
3000901c: e3500000 cmp r0, #0
30009020: 1a000002 bne 30009030 <IMFS_evaluate_for_make+0x1e0>
rtems_set_errno_and_return_minus_one( ENOENT );
30009024: eb000eb4 bl 3000cafc <__errno>
30009028: e3a03002 mov r3, #2
3000902c: ea000013 b 30009080 <IMFS_evaluate_for_make+0x230>
/*
* 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++) {
30009030: e4d50001 ldrb r0, [r5], #1
30009034: e3500000 cmp r0, #0
30009038: 1afffff6 bne 30009018 <IMFS_evaluate_for_make+0x1c8>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
3000903c: e1a00004 mov r0, r4
30009040: ebfffe56 bl 300089a0 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
30009044: e5943000 ldr r3, [r4]
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
30009048: e1a06000 mov r6, r0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
3000904c: e593304c ldr r3, [r3, #76] ; 0x4c
30009050: e3530001 cmp r3, #1
30009054: 0a000002 beq 30009064 <IMFS_evaluate_for_make+0x214>
rtems_set_errno_and_return_minus_one( ENOTDIR );
30009058: eb000ea7 bl 3000cafc <__errno>
3000905c: e3a03014 mov r3, #20
30009060: ea000006 b 30009080 <IMFS_evaluate_for_make+0x230>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
30009064: e1a00004 mov r0, r4
30009068: e3a01003 mov r1, #3
3000906c: ebfffe68 bl 30008a14 <IMFS_evaluate_permission>
30009070: e3500000 cmp r0, #0
30009074: 1a000003 bne 30009088 <IMFS_evaluate_for_make+0x238>
rtems_set_errno_and_return_minus_one( EACCES );
30009078: eb000e9f bl 3000cafc <__errno>
3000907c: e3a0300d mov r3, #13
30009080: e5803000 str r3, [r0]
30009084: e3e06000 mvn r6, #0
return result;
}
30009088: e1a00006 mov r0, r6
3000908c: e28dd03c add sp, sp, #60 ; 0x3c
30009090: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
30008a14 <IMFS_evaluate_permission>:
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
30008a14: e3d13007 bics r3, r1, #7
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
30008a18: e92d4070 push {r4, r5, r6, lr}
30008a1c: e1a04001 mov r4, r1
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
30008a20: 0a000004 beq 30008a38 <IMFS_evaluate_permission+0x24>
rtems_set_errno_and_return_minus_one( EPERM );
30008a24: eb001034 bl 3000cafc <__errno> <== NOT EXECUTED
30008a28: e3a03001 mov r3, #1 <== NOT EXECUTED
30008a2c: e5803000 str r3, [r0] <== NOT EXECUTED
30008a30: e3e00000 mvn r0, #0 <== NOT EXECUTED
30008a34: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
jnode = node->node_access;
30008a38: e5905000 ldr r5, [r0]
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
30008a3c: eb0002dd bl 300095b8 <geteuid>
30008a40: e1a06000 mov r6, r0
st_gid = getegid();
30008a44: eb0002d6 bl 300095a4 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
30008a48: e1d533bc ldrh r3, [r5, #60] ; 0x3c
30008a4c: e1530006 cmp r3, r6
flags_to_test <<= 6;
30008a50: 01a04304 lsleq r4, r4, #6
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
30008a54: 0a000002 beq 30008a64 <IMFS_evaluate_permission+0x50>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
30008a58: e1d533be ldrh r3, [r5, #62] ; 0x3e
30008a5c: e1530000 cmp r3, r0
flags_to_test <<= 3;
30008a60: 01a04184 lsleq r4, r4, #3
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
30008a64: e5950030 ldr r0, [r5, #48] ; 0x30
30008a68: e0040000 and r0, r4, r0
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
30008a6c: e1500004 cmp r0, r4
30008a70: 13a00000 movne r0, #0
30008a74: 03a00001 moveq r0, #1
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
30008a78: e8bd8070 pop {r4, r5, r6, pc}
30009098 <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
)
{
30009098: 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;
3000909c: 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
)
{
300090a0: 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;
300090a4: e5bc401c ldr r4, [ip, #28]!
loc = temp_mt_entry->mt_fs_root;
300090a8: 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
)
{
300090ac: 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;
300090b0: e8bc000f ldm ip!, {r0, r1, r2, r3}
300090b4: e8ae000f stmia lr!, {r0, r1, r2, r3}
300090b8: e59c3000 ldr r3, [ip]
300090bc: e58e3000 str r3, [lr]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
300090c0: e3a03000 mov r3, #0
300090c4: e585301c str r3, [r5, #28]
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
300090c8: e1a0500d mov r5, sp
300090cc: e1a0000d mov r0, sp
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
300090d0: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode;
300090d4: e58d4000 str r4, [sp]
IMFS_Set_handlers( &loc );
300090d8: ebfffe30 bl 300089a0 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
300090dc: e594304c ldr r3, [r4, #76] ; 0x4c
300090e0: e3530001 cmp r3, #1
300090e4: 1a000003 bne 300090f8 <IMFS_fsunmount+0x60>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
300090e8: e5942050 ldr r2, [r4, #80] ; 0x50
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
300090ec: e2843054 add r3, r4, #84 ; 0x54
300090f0: e1520003 cmp r2, r3
300090f4: 1a000005 bne 30009110 <IMFS_fsunmount+0x78>
result = IMFS_unlink( NULL, &loc );
300090f8: e3a00000 mov r0, #0
300090fc: e1a0100d mov r1, sp
30009100: ebffe211 bl 3000194c <IMFS_unlink>
if (result != 0)
30009104: e3500000 cmp r0, #0
30009108: 1a00000c bne 30009140 <IMFS_fsunmount+0xa8>
return -1;
jnode = next;
3000910c: e1a04006 mov r4, r6
}
if ( jnode != NULL ) {
30009110: e3540000 cmp r4, #0
30009114: 0a00000b beq 30009148 <IMFS_fsunmount+0xb0>
if ( jnode->type == IMFS_DIRECTORY ) {
30009118: e594304c ldr r3, [r4, #76] ; 0x4c
3000911c: e3530001 cmp r3, #1
30009120: 1affffe9 bne 300090cc <IMFS_fsunmount+0x34>
if ( jnode_has_children( jnode ) )
30009124: e5943050 ldr r3, [r4, #80] ; 0x50
30009128: e2842054 add r2, r4, #84 ; 0x54
3000912c: e1530002 cmp r3, r2
30009130: 0affffe5 beq 300090cc <IMFS_fsunmount+0x34>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
30009134: e2534000 subs r4, r3, #0
30009138: 1affffe3 bne 300090cc <IMFS_fsunmount+0x34>
3000913c: ea000001 b 30009148 <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;
30009140: e3e00000 mvn r0, #0 <== NOT EXECUTED
30009144: ea000000 b 3000914c <IMFS_fsunmount+0xb4> <== NOT EXECUTED
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
return 0;
30009148: e1a00004 mov r0, r4
}
3000914c: e28dd014 add sp, sp, #20
30009150: e8bd8070 pop {r4, r5, r6, pc}
3000b25c <IMFS_memfile_get_block_pointer>:
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000b25c: e59f31e4 ldr r3, [pc, #484] ; 3000b448 <IMFS_memfile_get_block_pointer+0x1ec>
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000b260: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000b264: e5935000 ldr r5, [r3]
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000b268: e1a04000 mov r4, r0
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000b26c: e1a05125 lsr r5, r5, #2
3000b270: e2453001 sub r3, r5, #1
3000b274: e1510003 cmp r1, r3
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000b278: e1a06001 mov r6, r1
3000b27c: e1a08002 mov r8, r2
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000b280: 8a00000e bhi 3000b2c0 <IMFS_memfile_get_block_pointer+0x64>
p = info->indirect;
if ( malloc_it ) {
3000b284: e3520000 cmp r2, #0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
3000b288: e5900058 ldr r0, [r0, #88] ; 0x58
if ( malloc_it ) {
3000b28c: 0a000007 beq 3000b2b0 <IMFS_memfile_get_block_pointer+0x54>
if ( !p ) {
3000b290: e3500000 cmp r0, #0
3000b294: 1a000003 bne 3000b2a8 <IMFS_memfile_get_block_pointer+0x4c>
p = memfile_alloc_block();
3000b298: ebffffe2 bl 3000b228 <memfile_alloc_block>
if ( !p )
3000b29c: e3500000 cmp r0, #0
3000b2a0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
info->indirect = p;
3000b2a4: e5840058 str r0, [r4, #88] ; 0x58
}
return &info->indirect[ my_block ];
3000b2a8: e5940058 ldr r0, [r4, #88] ; 0x58
3000b2ac: ea000001 b 3000b2b8 <IMFS_memfile_get_block_pointer+0x5c>
}
if ( !p )
3000b2b0: e3500000 cmp r0, #0
3000b2b4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
return &info->indirect[ my_block ];
3000b2b8: e0800106 add r0, r0, r6, lsl #2
3000b2bc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
3000b2c0: e2853001 add r3, r5, #1
3000b2c4: e0030395 mul r3, r5, r3
3000b2c8: e2432001 sub r2, r3, #1
3000b2cc: e1510002 cmp r1, r2
3000b2d0: 8a000021 bhi 3000b35c <IMFS_memfile_get_block_pointer+0x100>
my_block -= FIRST_DOUBLY_INDIRECT;
3000b2d4: e0656001 rsb r6, r5, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000b2d8: e1a00006 mov r0, r6
3000b2dc: e1a01005 mov r1, r5
3000b2e0: eb00143c bl 300103d8 <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b2e4: e1a01005 mov r1, r5
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000b2e8: e1a07000 mov r7, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b2ec: e1a00006 mov r0, r6
3000b2f0: eb0013a0 bl 30010178 <__aeabi_uidiv>
p = info->doubly_indirect;
if ( malloc_it ) {
3000b2f4: e3580000 cmp r8, #0
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b2f8: e1a05000 mov r5, r0
p = info->doubly_indirect;
3000b2fc: e594005c ldr r0, [r4, #92] ; 0x5c
if ( malloc_it ) {
3000b300: 0a00000e beq 3000b340 <IMFS_memfile_get_block_pointer+0xe4>
if ( !p ) {
3000b304: e3500000 cmp r0, #0
3000b308: 1a000003 bne 3000b31c <IMFS_memfile_get_block_pointer+0xc0>
p = memfile_alloc_block();
3000b30c: ebffffc5 bl 3000b228 <memfile_alloc_block>
if ( !p )
3000b310: e3500000 cmp r0, #0
3000b314: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
info->doubly_indirect = p;
3000b318: e584005c str r0, [r4, #92] ; 0x5c
}
p1 = (block_p *)p[ doubly ];
3000b31c: e0804105 add r4, r0, r5, lsl #2
3000b320: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p1 ) {
3000b324: e3500000 cmp r0, #0
3000b328: 1a000009 bne 3000b354 <IMFS_memfile_get_block_pointer+0xf8>
p1 = memfile_alloc_block();
3000b32c: ebffffbd bl 3000b228 <memfile_alloc_block>
if ( !p1 )
3000b330: e3500000 cmp r0, #0
return 0;
p[ doubly ] = (block_p) p1;
3000b334: 15840000 strne r0, [r4]
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
3000b338: 1a000005 bne 3000b354 <IMFS_memfile_get_block_pointer+0xf8>
3000b33c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
3000b340: e3500000 cmp r0, #0
3000b344: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p = (block_p *)p[ doubly ];
3000b348: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p )
3000b34c: e3500000 cmp r0, #0
3000b350: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
return (block_p *)&p[ singly ];
3000b354: e0800107 add r0, r0, r7, lsl #2
3000b358: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
3000b35c: e2832001 add r2, r3, #1
3000b360: e0020295 mul r2, r5, r2
3000b364: e2422001 sub r2, r2, #1
3000b368: e1510002 cmp r1, r2
3000b36c: 8a000033 bhi 3000b440 <IMFS_memfile_get_block_pointer+0x1e4>
my_block -= FIRST_TRIPLY_INDIRECT;
3000b370: e0636001 rsb r6, r3, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000b374: e1a00006 mov r0, r6
3000b378: e1a01005 mov r1, r5
3000b37c: eb001415 bl 300103d8 <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b380: e1a01005 mov r1, r5
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000b384: e1a0a000 mov sl, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b388: e1a00006 mov r0, r6
3000b38c: eb001379 bl 30010178 <__aeabi_uidiv>
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
3000b390: 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;
3000b394: e1a06000 mov r6, r0
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
3000b398: eb001376 bl 30010178 <__aeabi_uidiv>
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000b39c: 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;
3000b3a0: e1a07000 mov r7, r0
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000b3a4: e1a00006 mov r0, r6
3000b3a8: eb00140a bl 300103d8 <__umodsi3>
p = info->triply_indirect;
if ( malloc_it ) {
3000b3ac: 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;
3000b3b0: e1a05000 mov r5, r0
p = info->triply_indirect;
3000b3b4: e5940060 ldr r0, [r4, #96] ; 0x60
if ( malloc_it ) {
3000b3b8: 0a000016 beq 3000b418 <IMFS_memfile_get_block_pointer+0x1bc>
if ( !p ) {
3000b3bc: e3500000 cmp r0, #0
3000b3c0: 1a000003 bne 3000b3d4 <IMFS_memfile_get_block_pointer+0x178>
p = memfile_alloc_block();
3000b3c4: ebffff97 bl 3000b228 <memfile_alloc_block>
if ( !p )
3000b3c8: e3500000 cmp r0, #0
3000b3cc: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
info->triply_indirect = p;
3000b3d0: e5840060 str r0, [r4, #96] ; 0x60
}
p1 = (block_p *) p[ triply ];
3000b3d4: e0804107 add r4, r0, r7, lsl #2
3000b3d8: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 ) {
3000b3dc: e3500000 cmp r0, #0
3000b3e0: 1a000003 bne 3000b3f4 <IMFS_memfile_get_block_pointer+0x198>
p1 = memfile_alloc_block();
3000b3e4: ebffff8f bl 3000b228 <memfile_alloc_block>
if ( !p1 )
3000b3e8: e3500000 cmp r0, #0
3000b3ec: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p[ triply ] = (block_p) p1;
3000b3f0: e5840000 str r0, [r4]
}
p2 = (block_p *)p1[ doubly ];
3000b3f4: e0804105 add r4, r0, r5, lsl #2
3000b3f8: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p2 ) {
3000b3fc: e3500000 cmp r0, #0
3000b400: 1a00000c bne 3000b438 <IMFS_memfile_get_block_pointer+0x1dc>
p2 = memfile_alloc_block();
3000b404: ebffff87 bl 3000b228 <memfile_alloc_block>
if ( !p2 )
3000b408: e3500000 cmp r0, #0
return 0;
p1[ doubly ] = (block_p) p2;
3000b40c: 15840000 strne r0, [r4]
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
3000b410: 1a000008 bne 3000b438 <IMFS_memfile_get_block_pointer+0x1dc>
3000b414: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
3000b418: e3500000 cmp r0, #0
3000b41c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p1 = (block_p *) p[ triply ];
3000b420: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 )
3000b424: e3500000 cmp r0, #0
3000b428: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p2 = (block_p *)p1[ doubly ];
3000b42c: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p2 )
3000b430: e3500000 cmp r0, #0
3000b434: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
return (block_p *)&p2[ singly ];
3000b438: e080010a add r0, r0, sl, lsl #2
3000b43c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
/*
* This means the requested block number is out of range.
*/
return 0;
3000b440: e3a00000 mov r0, #0 <== NOT EXECUTED
}
3000b444: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
300017ec <IMFS_mount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
300017ec: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
300017f0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
300017f4: e593204c ldr r2, [r3, #76] ; 0x4c
300017f8: e3520001 cmp r2, #1
300017fc: 0a000004 beq 30001814 <IMFS_mount+0x28>
rtems_set_errno_and_return_minus_one( ENOTDIR );
30001800: eb002cbd bl 3000cafc <__errno> <== NOT EXECUTED
30001804: e3a03014 mov r3, #20 <== NOT EXECUTED
30001808: e5803000 str r3, [r0] <== NOT EXECUTED
3000180c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001810: 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;
30001814: e583005c str r0, [r3, #92] ; 0x5c
return 0;
30001818: e3a00000 mov r0, #0
}
3000181c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
30004170 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
30004170: e92d4030 push {r4, r5, lr}
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
30004174: e59f50e0 ldr r5, [pc, #224] ; 3000425c <IMFS_print_jnode+0xec>
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
30004178: e1a04000 mov r4, r0
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
3000417c: e5953000 ldr r3, [r5]
30004180: e280000c add r0, r0, #12
30004184: e5931008 ldr r1, [r3, #8]
30004188: eb003434 bl 30011260 <fputs>
switch( the_jnode->type ) {
3000418c: e594204c ldr r2, [r4, #76] ; 0x4c
30004190: e2423001 sub r3, r2, #1
30004194: e3530006 cmp r3, #6
30004198: 979ff103 ldrls pc, [pc, r3, lsl #2]
3000419c: ea000026 b 3000423c <IMFS_print_jnode+0xcc> <== NOT EXECUTED
300041a0: 300041bc .word 0x300041bc <== NOT EXECUTED
300041a4: 300041d0 .word 0x300041d0 <== NOT EXECUTED
300041a8: 3000421c .word 0x3000421c <== NOT EXECUTED
300041ac: 3000421c .word 0x3000421c <== NOT EXECUTED
300041b0: 30004204 .word 0x30004204 <== NOT EXECUTED
300041b4: 300041e8 .word 0x300041e8 <== NOT EXECUTED
300041b8: 30004228 .word 0x30004228 <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
300041bc: e5953000 ldr r3, [r5]
300041c0: e3a0002f mov r0, #47 ; 0x2f
300041c4: e5931008 ldr r1, [r3, #8]
300041c8: eb0033ef bl 3001118c <fputc>
break;
300041cc: ea00001f b 30004250 <IMFS_print_jnode+0xe0>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
300041d0: e5953000 ldr r3, [r5]
300041d4: e59f1084 ldr r1, [pc, #132] ; 30004260 <IMFS_print_jnode+0xf0>
300041d8: e5930008 ldr r0, [r3, #8]
300041dc: e5942050 ldr r2, [r4, #80] ; 0x50
300041e0: e5943054 ldr r3, [r4, #84] ; 0x54
300041e4: ea000004 b 300041fc <IMFS_print_jnode+0x8c>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
300041e8: e5953000 ldr r3, [r5]
300041ec: e59f1070 ldr r1, [pc, #112] ; 30004264 <IMFS_print_jnode+0xf4>
300041f0: e5930008 ldr r0, [r3, #8]
300041f4: e5942050 ldr r2, [r4, #80] ; 0x50
300041f8: e5943058 ldr r3, [r4, #88] ; 0x58
300041fc: eb0033c2 bl 3001110c <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
30004200: ea000012 b 30004250 <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 ")",
30004204: e5953000 ldr r3, [r5]
30004208: e59f1058 ldr r1, [pc, #88] ; 30004268 <IMFS_print_jnode+0xf8>
3000420c: e5930008 ldr r0, [r3, #8]
30004210: e5942050 ldr r2, [r4, #80] ; 0x50
30004214: eb0033bc bl 3001110c <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
30004218: ea00000c b 30004250 <IMFS_print_jnode+0xe0>
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
3000421c: e5953000 ldr r3, [r5]
30004220: e59f0044 ldr r0, [pc, #68] ; 3000426c <IMFS_print_jnode+0xfc>
30004224: ea000001 b 30004230 <IMFS_print_jnode+0xc0>
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
30004228: e5953000 ldr r3, [r5]
3000422c: e59f003c ldr r0, [pc, #60] ; 30004270 <IMFS_print_jnode+0x100>
30004230: e5931008 ldr r1, [r3, #8]
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
30004234: e8bd4030 pop {r4, r5, lr}
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
30004238: ea003408 b 30011260 <fputs>
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
3000423c: e5953000 ldr r3, [r5] <== NOT EXECUTED
30004240: e59f102c ldr r1, [pc, #44] ; 30004274 <IMFS_print_jnode+0x104><== NOT EXECUTED
30004244: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
return;
}
puts("");
}
30004248: 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 );
3000424c: ea0033ae b 3001110c <fprintf> <== NOT EXECUTED
return;
}
puts("");
30004250: e59f0020 ldr r0, [pc, #32] ; 30004278 <IMFS_print_jnode+0x108>
}
30004254: e8bd4030 pop {r4, r5, lr}
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
30004258: ea003ada b 30012dc8 <puts>
3000937c <IMFS_stat>:
{
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
3000937c: e5903000 ldr r3, [r0]
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
30009380: e92d4800 push {fp, lr}
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
30009384: e593204c ldr r2, [r3, #76] ; 0x4c
30009388: e2422002 sub r2, r2, #2
3000938c: e3520005 cmp r2, #5
30009390: 979ff102 ldrls pc, [pc, r2, lsl #2]
30009394: ea000012 b 300093e4 <IMFS_stat+0x68> <== NOT EXECUTED
30009398: 300093b0 .word 0x300093b0 <== NOT EXECUTED
3000939c: 300093e4 .word 0x300093e4 <== NOT EXECUTED
300093a0: 300093d0 .word 0x300093d0 <== NOT EXECUTED
300093a4: 300093c4 .word 0x300093c4 <== NOT EXECUTED
300093a8: 300093c4 .word 0x300093c4 <== NOT EXECUTED
300093ac: 300093d0 .word 0x300093d0 <== NOT EXECUTED
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
300093b0: e5932054 ldr r2, [r3, #84] ; 0x54
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
300093b4: e593c050 ldr ip, [r3, #80] ; 0x50
300093b8: e581201c str r2, [r1, #28]
300093bc: e581c018 str ip, [r1, #24]
break;
300093c0: ea00000c b 300093f8 <IMFS_stat+0x7c>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
300093c4: e283c050 add ip, r3, #80 ; 0x50
300093c8: e89c1800 ldm ip, {fp, ip}
300093cc: ea000001 b 300093d8 <IMFS_stat+0x5c>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
300093d0: e3a0b000 mov fp, #0
300093d4: e3a0c000 mov ip, #0
300093d8: e581b020 str fp, [r1, #32]
300093dc: e581c024 str ip, [r1, #36] ; 0x24
break;
300093e0: ea000004 b 300093f8 <IMFS_stat+0x7c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
300093e4: eb000dc4 bl 3000cafc <__errno>
300093e8: e3a03086 mov r3, #134 ; 0x86
300093ec: e5803000 str r3, [r0]
300093f0: e3e00000 mvn r0, #0
300093f4: e8bd8800 pop {fp, pc}
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
300093f8: e5902010 ldr r2, [r0, #16]
300093fc: e59f0050 ldr r0, [pc, #80] ; 30009454 <IMFS_stat+0xd8>
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
30009400: e5922034 ldr r2, [r2, #52] ; 0x34
30009404: 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 =
30009408: e8810005 stm r1, {r0, r2}
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
3000940c: 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;
30009410: 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;
30009414: e581200c str r2, [r1, #12]
buf->st_nlink = the_jnode->st_nlink;
30009418: e1d323b4 ldrh r2, [r3, #52] ; 0x34
3000941c: e1c121b0 strh r2, [r1, #16]
buf->st_ino = the_jnode->st_ino;
30009420: e5932038 ldr r2, [r3, #56] ; 0x38
30009424: e5812008 str r2, [r1, #8]
buf->st_uid = the_jnode->st_uid;
30009428: e1d323bc ldrh r2, [r3, #60] ; 0x3c
3000942c: e1c121b2 strh r2, [r1, #18]
buf->st_gid = the_jnode->st_gid;
30009430: e1d323be ldrh r2, [r3, #62] ; 0x3e
30009434: e1c121b4 strh r2, [r1, #20]
buf->st_atime = the_jnode->stat_atime;
30009438: e5932040 ldr r2, [r3, #64] ; 0x40
3000943c: e5812028 str r2, [r1, #40] ; 0x28
buf->st_mtime = the_jnode->stat_mtime;
30009440: e5932044 ldr r2, [r3, #68] ; 0x44
buf->st_ctime = the_jnode->stat_ctime;
30009444: 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;
30009448: e5812030 str r2, [r1, #48] ; 0x30
buf->st_ctime = the_jnode->stat_ctime;
3000944c: e5813038 str r3, [r1, #56] ; 0x38
return 0;
}
30009450: e8bd8800 pop {fp, pc}
3000194c <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
3000194c: 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;
30001950: e5915000 ldr r5, [r1]
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001954: e24dd01c sub sp, sp, #28
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001958: e595304c ldr r3, [r5, #76] ; 0x4c
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
3000195c: e1a06000 mov r6, r0
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001960: e3530003 cmp r3, #3
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001964: e1a04001 mov r4, r1
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001968: 1a000024 bne 30001a00 <IMFS_unlink+0xb4>
if ( !node->info.hard_link.link_node )
3000196c: e595e050 ldr lr, [r5, #80] ; 0x50
30001970: e35e0000 cmp lr, #0
30001974: 1a000003 bne 30001988 <IMFS_unlink+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
30001978: eb002c5f bl 3000cafc <__errno> <== NOT EXECUTED
3000197c: e3a03016 mov r3, #22 <== NOT EXECUTED
30001980: e5803000 str r3, [r0] <== NOT EXECUTED
30001984: ea000023 b 30001a18 <IMFS_unlink+0xcc> <== NOT EXECUTED
the_link = *loc;
30001988: e1a0c00d mov ip, sp
3000198c: e1a07001 mov r7, r1
30001990: e8b7000f ldm r7!, {r0, r1, r2, r3}
30001994: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001998: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node;
3000199c: e28d701c add r7, sp, #28
300019a0: e527e01c str lr, [r7, #-28]!
IMFS_Set_handlers( &the_link );
300019a4: 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;
300019a8: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
300019ac: eb001bfb bl 300089a0 <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)
300019b0: e5953050 ldr r3, [r5, #80] ; 0x50
300019b4: e1d323b4 ldrh r2, [r3, #52] ; 0x34
300019b8: e3520001 cmp r2, #1
300019bc: 1a000007 bne 300019e0 <IMFS_unlink+0x94>
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
300019c0: e1a00006 mov r0, r6
300019c4: e1a0100d mov r1, sp
300019c8: e59d3008 ldr r3, [sp, #8]
300019cc: e1a0e00f mov lr, pc
300019d0: e593f034 ldr pc, [r3, #52] ; 0x34
if ( result != 0 )
300019d4: e3500000 cmp r0, #0
300019d8: 0a000008 beq 30001a00 <IMFS_unlink+0xb4>
300019dc: ea00000d b 30001a18 <IMFS_unlink+0xcc>
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
300019e0: e2422001 sub r2, r2, #1
300019e4: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
300019e8: e28d0014 add r0, sp, #20
300019ec: e3a01000 mov r1, #0
300019f0: eb00012c bl 30001ea8 <gettimeofday>
300019f4: e5953050 ldr r3, [r5, #80] ; 0x50
300019f8: e59d2014 ldr r2, [sp, #20]
300019fc: e5832048 str r2, [r3, #72] ; 0x48
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
30001a00: e5943008 ldr r3, [r4, #8]
30001a04: e1a00006 mov r0, r6
30001a08: e1a01004 mov r1, r4
30001a0c: e1a0e00f mov lr, pc
30001a10: e593f034 ldr pc, [r3, #52] ; 0x34
return result;
30001a14: ea000000 b 30001a1c <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;
30001a18: e3e00000 mvn r0, #0
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
30001a1c: e28dd01c add sp, sp, #28
30001a20: e8bd80f0 pop {r4, r5, r6, r7, pc}
30001a24 <IMFS_unmount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
30001a24: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
30001a28: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
30001a2c: e593204c ldr r2, [r3, #76] ; 0x4c
30001a30: e3520001 cmp r2, #1
30001a34: 0a000002 beq 30001a44 <IMFS_unmount+0x20>
rtems_set_errno_and_return_minus_one( ENOTDIR );
30001a38: eb002c2f bl 3000cafc <__errno> <== NOT EXECUTED
30001a3c: e3a03014 mov r3, #20 <== NOT EXECUTED
30001a40: ea000004 b 30001a58 <IMFS_unmount+0x34> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
30001a44: e593205c ldr r2, [r3, #92] ; 0x5c
30001a48: e3520000 cmp r2, #0
30001a4c: 1a000004 bne 30001a64 <IMFS_unmount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
30001a50: eb002c29 bl 3000cafc <__errno> <== NOT EXECUTED
30001a54: e3a03016 mov r3, #22 <== NOT EXECUTED
30001a58: e5803000 str r3, [r0] <== NOT EXECUTED
30001a5c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001a60: 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;
30001a64: e3a00000 mov r0, #0
30001a68: e583005c str r0, [r3, #92] ; 0x5c
return 0;
}
30001a6c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
300019b8 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
300019b8: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}<== NOT EXECUTED
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
300019bc: e59030c8 ldr r3, [r0, #200] ; 0xc8 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
300019c0: e59070c4 ldr r7, [r0, #196] ; 0xc4 <== NOT EXECUTED
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
300019c4: e2832010 add r2, r3, #16 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
300019c8: e2477010 sub r7, r7, #16 <== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
300019cc: e3c71003 bic r1, r7, #3 <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
300019d0: e1a05000 mov r5, r0 <== NOT EXECUTED
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
300019d4: e590b0f4 ldr fp, [r0, #244] ; 0xf4 <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
300019d8: e2820010 add r0, r2, #16 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
300019dc: e0800001 add r0, r0, r1 <== NOT EXECUTED
* Try to print out how much stack was actually used by the task.
*/
static void *print_context;
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
300019e0: e2833020 add r3, r3, #32 <== NOT EXECUTED
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
300019e4: e59f10c0 ldr r1, [pc, #192] ; 30001aac <Stack_check_Dump_threads_usage+0xf4><== NOT EXECUTED
300019e8: ea000002 b 300019f8 <Stack_check_Dump_threads_usage+0x40> <== NOT EXECUTED
300019ec: e493c004 ldr ip, [r3], #4 <== NOT EXECUTED
300019f0: e15c0001 cmp ip, r1 <== NOT EXECUTED
300019f4: 1a000004 bne 30001a0c <Stack_check_Dump_threads_usage+0x54><== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
300019f8: e1530000 cmp r3, r0 <== NOT EXECUTED
if (*base != U32_PATTERN)
300019fc: e1a06003 mov r6, r3 <== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
30001a00: 3afffff9 bcc 300019ec <Stack_check_Dump_threads_usage+0x34><== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
30001a04: e3a06000 mov r6, #0 <== NOT EXECUTED
30001a08: ea000002 b 30001a18 <Stack_check_Dump_threads_usage+0x60> <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
30001a0c: e3560000 cmp r6, #0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
30001a10: 10822007 addne r2, r2, r7 <== NOT EXECUTED
30001a14: 10666002 rsbne r6, r6, r2 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
#endif
{
(*print_handler)(
30001a18: e5958008 ldr r8, [r5, #8] <== NOT EXECUTED
30001a1c: e59f408c ldr r4, [pc, #140] ; 30001ab0 <Stack_check_Dump_threads_usage+0xf8><== NOT EXECUTED
30001a20: e3a01005 mov r1, #5 <== NOT EXECUTED
30001a24: e28d2008 add r2, sp, #8 <== NOT EXECUTED
30001a28: e1a00008 mov r0, r8 <== NOT EXECUTED
30001a2c: e8940600 ldm r4, {r9, sl} <== NOT EXECUTED
30001a30: eb001570 bl 30006ff8 <rtems_object_get_name> <== NOT EXECUTED
30001a34: e59f1078 ldr r1, [pc, #120] ; 30001ab4 <Stack_check_Dump_threads_usage+0xfc><== NOT EXECUTED
30001a38: e1a03000 mov r3, r0 <== NOT EXECUTED
30001a3c: e1a02008 mov r2, r8 <== NOT EXECUTED
30001a40: e1a0000a mov r0, sl <== NOT EXECUTED
30001a44: e1a0e00f mov lr, pc <== NOT EXECUTED
30001a48: e12fff19 bx r9 <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
30001a4c: e59530c4 ldr r3, [r5, #196] ; 0xc4 <== NOT EXECUTED
30001a50: e59520c8 ldr r2, [r5, #200] ; 0xc8 <== NOT EXECUTED
30001a54: e2433001 sub r3, r3, #1 <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
30001a58: e0823003 add r3, r2, r3 <== NOT EXECUTED
30001a5c: e58db000 str fp, [sp] <== NOT EXECUTED
30001a60: e58d7004 str r7, [sp, #4] <== NOT EXECUTED
30001a64: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
30001a68: e59f1048 ldr r1, [pc, #72] ; 30001ab8 <Stack_check_Dump_threads_usage+0x100><== NOT EXECUTED
30001a6c: e1a0e00f mov lr, pc <== NOT EXECUTED
30001a70: e594f000 ldr pc, [r4] <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
30001a74: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
30001a78: e3530000 cmp r3, #0 <== NOT EXECUTED
30001a7c: 1a000004 bne 30001a94 <Stack_check_Dump_threads_usage+0xdc><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
30001a80: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
30001a84: e59f1030 ldr r1, [pc, #48] ; 30001abc <Stack_check_Dump_threads_usage+0x104><== NOT EXECUTED
30001a88: e1a0e00f mov lr, pc <== NOT EXECUTED
30001a8c: e594f000 ldr pc, [r4] <== NOT EXECUTED
30001a90: ea000004 b 30001aa8 <Stack_check_Dump_threads_usage+0xf0> <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
30001a94: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
30001a98: e59f1020 ldr r1, [pc, #32] ; 30001ac0 <Stack_check_Dump_threads_usage+0x108><== NOT EXECUTED
30001a9c: e1a02006 mov r2, r6 <== NOT EXECUTED
30001aa0: e1a0e00f mov lr, pc <== NOT EXECUTED
30001aa4: e594f000 ldr pc, [r4] <== NOT EXECUTED
}
}
30001aa8: e8bd8fff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}<== NOT EXECUTED
30001b68 <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)
{
30001b68: e92d40ff push {r0, r1, r2, r3, r4, r5, r6, r7, lr} <== NOT EXECUTED
30001b6c: e1a06000 mov r6, r0 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
30001b70: e59040c8 ldr r4, [r0, #200] ; 0xc8 <== NOT EXECUTED
char name [32];
printk("BLOWN STACK!!!\n");
30001b74: e59f0078 ldr r0, [pc, #120] ; 30001bf4 <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)
{
30001b78: 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");
30001b7c: eb00066d bl 30003538 <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
30001b80: e59f0070 ldr r0, [pc, #112] ; 30001bf8 <Stack_check_report_blown_task+0x90><== NOT EXECUTED
30001b84: e1a01006 mov r1, r6 <== NOT EXECUTED
30001b88: eb00066a bl 30003538 <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
30001b8c: e59f0068 ldr r0, [pc, #104] ; 30001bfc <Stack_check_report_blown_task+0x94><== NOT EXECUTED
30001b90: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED
30001b94: eb000667 bl 30003538 <printk> <== NOT EXECUTED
printk(
30001b98: e59f0060 ldr r0, [pc, #96] ; 30001c00 <Stack_check_report_blown_task+0x98><== NOT EXECUTED
30001b9c: e596100c ldr r1, [r6, #12] <== NOT EXECUTED
30001ba0: eb000664 bl 30003538 <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
30001ba4: e1a0200d mov r2, sp <== NOT EXECUTED
30001ba8: e3a01020 mov r1, #32 <== NOT EXECUTED
30001bac: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED
30001bb0: eb001510 bl 30006ff8 <rtems_object_get_name> <== NOT EXECUTED
30001bb4: e1a01000 mov r1, r0 <== NOT EXECUTED
30001bb8: e59f0044 ldr r0, [pc, #68] ; 30001c04 <Stack_check_report_blown_task+0x9c><== NOT EXECUTED
30001bbc: eb00065d bl 30003538 <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)
30001bc0: e59620c8 ldr r2, [r6, #200] ; 0xc8 <== NOT EXECUTED
30001bc4: e59610c4 ldr r1, [r6, #196] ; 0xc4 <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
30001bc8: e59f0038 ldr r0, [pc, #56] ; 30001c08 <Stack_check_report_blown_task+0xa0><== NOT EXECUTED
30001bcc: e0823001 add r3, r2, r1 <== NOT EXECUTED
30001bd0: eb000658 bl 30003538 <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) {
30001bd4: e3550000 cmp r5, #0 <== NOT EXECUTED
printk(
30001bd8: 059f002c ldreq r0, [pc, #44] ; 30001c0c <Stack_check_report_blown_task+0xa4><== NOT EXECUTED
30001bdc: 03a01010 moveq r1, #16 <== NOT EXECUTED
30001be0: 02842008 addeq r2, r4, #8 <== NOT EXECUTED
30001be4: 02843018 addeq r3, r4, #24 <== NOT EXECUTED
30001be8: 0b000652 bleq 30003538 <printk> <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
30001bec: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED
30001bf0: eb0016f2 bl 300077c0 <rtems_fatal_error_occurred> <== NOT EXECUTED
30014c94 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
30014c94: 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
)
{
30014c98: 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 ) {
30014c9c: 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
)
{
30014ca0: e1a06000 mov r6, r0
30014ca4: e1a0a001 mov sl, r1
30014ca8: e1a07002 mov r7, r2
30014cac: 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 ) {
30014cb0: 8a000013 bhi 30014d04 <_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 ) {
30014cb4: e5905048 ldr r5, [r0, #72] ; 0x48
30014cb8: e3550000 cmp r5, #0
*count = 0;
30014cbc: 13a00000 movne r0, #0
30014cc0: 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 ) {
30014cc4: 0a000007 beq 30014ce8 <_CORE_message_queue_Broadcast+0x54>
30014cc8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
30014ccc: e594002c ldr r0, [r4, #44] ; 0x2c
30014cd0: e1a0100a mov r1, sl
30014cd4: e1a02007 mov r2, r7
30014cd8: eb00222c bl 3001d590 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
30014cdc: 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;
30014ce0: e2855001 add r5, r5, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
30014ce4: 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 =
30014ce8: e1a00006 mov r0, r6
30014cec: eb0009df bl 30017470 <_Thread_queue_Dequeue>
30014cf0: e2504000 subs r4, r0, #0
30014cf4: 1afffff4 bne 30014ccc <_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;
30014cf8: e5885000 str r5, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
30014cfc: e1a00004 mov r0, r4
30014d00: 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;
30014d04: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
30014d08: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
30006df4 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006df4: 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;
30006df8: e5903014 ldr r3, [r0, #20]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006dfc: e24dd030 sub sp, sp, #48 ; 0x30
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
30006e00: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
30006e04: e5903024 ldr r3, [r0, #36] ; 0x24
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30006e08: e59f4500 ldr r4, [pc, #1280] ; 30007310 <_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;
30006e0c: e58d3028 str r3, [sp, #40] ; 0x28
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30006e10: e59f34fc ldr r3, [pc, #1276] ; 30007314 <_Heap_Walk+0x520>
30006e14: e31200ff tst r2, #255 ; 0xff
30006e18: 11a04003 movne r4, r3
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30006e1c: e59f34f4 ldr r3, [pc, #1268] ; 30007318 <_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;
30006e20: 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() ) ) {
30006e24: e5933000 ldr r3, [r3]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e28: 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() ) ) {
30006e2c: e3530003 cmp r3, #3
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30006e30: e1a05001 mov r5, r1
uintptr_t const page_size = heap->page_size;
30006e34: e5909010 ldr r9, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
30006e38: 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() ) ) {
30006e3c: 1a000127 bne 300072e0 <_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)(
30006e40: e59dc024 ldr ip, [sp, #36] ; 0x24
30006e44: e59d2020 ldr r2, [sp, #32]
30006e48: e58dc000 str ip, [sp]
30006e4c: e5903018 ldr r3, [r0, #24]
30006e50: e58d3004 str r3, [sp, #4]
30006e54: e590301c ldr r3, [r0, #28]
30006e58: e58d200c str r2, [sp, #12]
30006e5c: e58d3008 str r3, [sp, #8]
30006e60: e59d3028 ldr r3, [sp, #40] ; 0x28
30006e64: e59f24b0 ldr r2, [pc, #1200] ; 3000731c <_Heap_Walk+0x528>
30006e68: e58d3010 str r3, [sp, #16]
30006e6c: e5903008 ldr r3, [r0, #8]
30006e70: e58d3014 str r3, [sp, #20]
30006e74: e590300c ldr r3, [r0, #12]
30006e78: e1a00001 mov r0, r1
30006e7c: e58d3018 str r3, [sp, #24]
30006e80: e3a01000 mov r1, #0
30006e84: e1a03009 mov r3, r9
30006e88: e1a0e00f mov lr, pc
30006e8c: e12fff14 bx r4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
30006e90: e3590000 cmp r9, #0
30006e94: 1a000006 bne 30006eb4 <_Heap_Walk+0xc0>
(*printer)( source, true, "page size is zero\n" );
30006e98: e1a00005 mov r0, r5
30006e9c: e3a01001 mov r1, #1
30006ea0: e59f2478 ldr r2, [pc, #1144] ; 30007320 <_Heap_Walk+0x52c>
30006ea4: e1a0e00f mov lr, pc
30006ea8: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30006eac: e1a08009 mov r8, r9
30006eb0: ea00010b b 300072e4 <_Heap_Walk+0x4f0>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
30006eb4: e2198003 ands r8, r9, #3
(*printer)(
30006eb8: 11a00005 movne r0, r5
30006ebc: 13a01001 movne r1, #1
30006ec0: 159f245c ldrne r2, [pc, #1116] ; 30007324 <_Heap_Walk+0x530>
30006ec4: 11a03009 movne r3, r9
30006ec8: 1a00010c bne 30007300 <_Heap_Walk+0x50c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30006ecc: e59d0024 ldr r0, [sp, #36] ; 0x24
30006ed0: e1a01009 mov r1, r9
30006ed4: ebffe730 bl 30000b9c <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
30006ed8: e250b000 subs fp, r0, #0
30006edc: 0a000006 beq 30006efc <_Heap_Walk+0x108>
(*printer)(
30006ee0: e1a00005 mov r0, r5
30006ee4: e3a01001 mov r1, #1
30006ee8: e59f2438 ldr r2, [pc, #1080] ; 30007328 <_Heap_Walk+0x534>
30006eec: e59d3024 ldr r3, [sp, #36] ; 0x24
30006ef0: e1a0e00f mov lr, pc
30006ef4: e12fff14 bx r4
30006ef8: ea0000f9 b 300072e4 <_Heap_Walk+0x4f0>
30006efc: e59dc020 ldr ip, [sp, #32]
30006f00: e1a01009 mov r1, r9
30006f04: e28c0008 add r0, ip, #8
30006f08: ebffe723 bl 30000b9c <__umodsi3>
);
return false;
}
if (
30006f0c: e250a000 subs sl, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
30006f10: 11a00005 movne r0, r5
30006f14: 13a01001 movne r1, #1
30006f18: 159f240c ldrne r2, [pc, #1036] ; 3000732c <_Heap_Walk+0x538>
30006f1c: 159d3020 ldrne r3, [sp, #32]
30006f20: 1a0000cc bne 30007258 <_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;
30006f24: e59d2020 ldr r2, [sp, #32]
30006f28: e5928004 ldr r8, [r2, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
30006f2c: e2188001 ands r8, r8, #1
(*printer)(
30006f30: 01a00005 moveq r0, r5
30006f34: 03a01001 moveq r1, #1
30006f38: 059f23f0 ldreq r2, [pc, #1008] ; 30007330 <_Heap_Walk+0x53c>
30006f3c: 0a000009 beq 30006f68 <_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;
30006f40: e59d3028 ldr r3, [sp, #40] ; 0x28
30006f44: e5937004 ldr r7, [r3, #4]
30006f48: 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);
30006f4c: 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;
30006f50: e5978004 ldr r8, [r7, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
30006f54: e2188001 ands r8, r8, #1
30006f58: 1a000005 bne 30006f74 <_Heap_Walk+0x180>
(*printer)(
30006f5c: e59f23d0 ldr r2, [pc, #976] ; 30007334 <_Heap_Walk+0x540>
30006f60: e1a00005 mov r0, r5
30006f64: e3a01001 mov r1, #1
30006f68: e1a0e00f mov lr, pc
30006f6c: e12fff14 bx r4
30006f70: ea0000db b 300072e4 <_Heap_Walk+0x4f0>
);
return false;
}
if (
30006f74: e59dc020 ldr ip, [sp, #32]
30006f78: e157000c cmp r7, ip
30006f7c: 0a000006 beq 30006f9c <_Heap_Walk+0x1a8>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
30006f80: e1a00005 mov r0, r5 <== NOT EXECUTED
30006f84: e3a01001 mov r1, #1 <== NOT EXECUTED
30006f88: e59f23a8 ldr r2, [pc, #936] ; 30007338 <_Heap_Walk+0x544> <== NOT EXECUTED
30006f8c: e1a0e00f mov lr, pc <== NOT EXECUTED
30006f90: 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;
30006f94: e1a0800a mov r8, sl <== NOT EXECUTED
30006f98: ea0000d1 b 300072e4 <_Heap_Walk+0x4f0> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
30006f9c: e596b010 ldr fp, [r6, #16]
block = next_block;
} while ( block != first_block );
return true;
}
30006fa0: 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 );
30006fa4: e1a0a006 mov sl, r6
30006fa8: ea000034 b 30007080 <_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;
30006fac: e5963020 ldr r3, [r6, #32]
30006fb0: e1530008 cmp r3, r8
30006fb4: 83a0c000 movhi ip, #0
30006fb8: 8a000003 bhi 30006fcc <_Heap_Walk+0x1d8>
30006fbc: e596c024 ldr ip, [r6, #36] ; 0x24
30006fc0: e15c0008 cmp ip, r8
30006fc4: 33a0c000 movcc ip, #0
30006fc8: 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 ) ) {
30006fcc: e21cc0ff ands ip, ip, #255 ; 0xff
(*printer)(
30006fd0: 01a00005 moveq r0, r5
30006fd4: 03a01001 moveq r1, #1
30006fd8: 059f235c ldreq r2, [pc, #860] ; 3000733c <_Heap_Walk+0x548>
30006fdc: 0a000012 beq 3000702c <_Heap_Walk+0x238>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30006fe0: e2880008 add r0, r8, #8
30006fe4: e1a0100b mov r1, fp
30006fe8: ebffe6eb bl 30000b9c <__umodsi3>
);
return false;
}
if (
30006fec: e250c000 subs ip, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
30006ff0: 11a00005 movne r0, r5
30006ff4: 13a01001 movne r1, #1
30006ff8: 159f2340 ldrne r2, [pc, #832] ; 30007340 <_Heap_Walk+0x54c>
30006ffc: 11a03008 movne r3, r8
30007000: 1a0000be bne 30007300 <_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;
30007004: e5983004 ldr r3, [r8, #4]
30007008: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
3000700c: 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;
30007010: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
30007014: e2133001 ands r3, r3, #1
30007018: e58d302c str r3, [sp, #44] ; 0x2c
3000701c: 0a000009 beq 30007048 <_Heap_Walk+0x254>
(*printer)(
30007020: e59f231c ldr r2, [pc, #796] ; 30007344 <_Heap_Walk+0x550>
30007024: e1a00005 mov r0, r5
30007028: e3a01001 mov r1, #1
3000702c: e1a03008 mov r3, r8
30007030: e58dc01c str ip, [sp, #28]
30007034: e1a0e00f mov lr, pc
30007038: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
3000703c: e59dc01c ldr ip, [sp, #28]
30007040: e1a0800c mov r8, ip
30007044: ea0000a6 b 300072e4 <_Heap_Walk+0x4f0>
);
return false;
}
if ( free_block->prev != prev_block ) {
30007048: e598300c ldr r3, [r8, #12]
3000704c: e153000a cmp r3, sl
30007050: 0a000008 beq 30007078 <_Heap_Walk+0x284>
(*printer)(
30007054: e58d3000 str r3, [sp]
30007058: e1a00005 mov r0, r5
3000705c: e1a03008 mov r3, r8
30007060: e3a01001 mov r1, #1
30007064: e59f22dc ldr r2, [pc, #732] ; 30007348 <_Heap_Walk+0x554>
30007068: e1a0e00f mov lr, pc
3000706c: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007070: e59d802c ldr r8, [sp, #44] ; 0x2c
30007074: ea00009a b 300072e4 <_Heap_Walk+0x4f0>
return false;
}
prev_block = free_block;
free_block = free_block->next;
30007078: e1a0a008 mov sl, r8
3000707c: 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 ) {
30007080: e1580006 cmp r8, r6
30007084: 1affffc8 bne 30006fac <_Heap_Walk+0x1b8>
30007088: ea000000 b 30007090 <_Heap_Walk+0x29c>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
3000708c: e1a07008 mov r7, r8
return true;
}
30007090: 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;
30007094: 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;
30007098: 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);
3000709c: 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;
300070a0: e1520008 cmp r2, r8
300070a4: 83a0b000 movhi fp, #0
300070a8: 8a000003 bhi 300070bc <_Heap_Walk+0x2c8>
300070ac: e596b024 ldr fp, [r6, #36] ; 0x24
300070b0: e15b0008 cmp fp, r8
300070b4: 33a0b000 movcc fp, #0
300070b8: 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 ) ) {
300070bc: e21bb0ff ands fp, fp, #255 ; 0xff
300070c0: 1a000007 bne 300070e4 <_Heap_Walk+0x2f0>
(*printer)(
300070c4: e58d8000 str r8, [sp]
300070c8: e1a00005 mov r0, r5
300070cc: e3a01001 mov r1, #1
300070d0: e59f2274 ldr r2, [pc, #628] ; 3000734c <_Heap_Walk+0x558>
300070d4: e1a03007 mov r3, r7
300070d8: e1a0e00f mov lr, pc
300070dc: e12fff14 bx r4
300070e0: ea00005e b 30007260 <_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;
300070e4: e59d2028 ldr r2, [sp, #40] ; 0x28
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
300070e8: e1a0000a mov r0, sl
300070ec: e1a01009 mov r1, r9
300070f0: e057b002 subs fp, r7, r2
300070f4: 13a0b001 movne fp, #1
300070f8: e58d301c str r3, [sp, #28]
300070fc: ebffe6a6 bl 30000b9c <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
30007100: e3500000 cmp r0, #0
30007104: e59d301c ldr r3, [sp, #28]
30007108: 0a000005 beq 30007124 <_Heap_Walk+0x330>
3000710c: e35b0000 cmp fp, #0
(*printer)(
30007110: 158da000 strne sl, [sp]
30007114: 11a00005 movne r0, r5
30007118: 13a01001 movne r1, #1
3000711c: 159f222c ldrne r2, [pc, #556] ; 30007350 <_Heap_Walk+0x55c>
30007120: 1a000014 bne 30007178 <_Heap_Walk+0x384>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
30007124: e59dc024 ldr ip, [sp, #36] ; 0x24
30007128: e15a000c cmp sl, ip
3000712c: 2a000009 bcs 30007158 <_Heap_Walk+0x364>
30007130: e35b0000 cmp fp, #0
30007134: 0a000007 beq 30007158 <_Heap_Walk+0x364>
(*printer)(
30007138: e88d1400 stm sp, {sl, ip}
3000713c: e1a00005 mov r0, r5
30007140: e3a01001 mov r1, #1
30007144: e59f2208 ldr r2, [pc, #520] ; 30007354 <_Heap_Walk+0x560>
30007148: e1a03007 mov r3, r7
3000714c: e1a0e00f mov lr, pc
30007150: e12fff14 bx r4
30007154: ea00006b b 30007308 <_Heap_Walk+0x514>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
30007158: e1580007 cmp r8, r7
3000715c: 8a000009 bhi 30007188 <_Heap_Walk+0x394>
30007160: e35b0000 cmp fp, #0
30007164: 0a000007 beq 30007188 <_Heap_Walk+0x394>
(*printer)(
30007168: e59f21e8 ldr r2, [pc, #488] ; 30007358 <_Heap_Walk+0x564>
3000716c: e58d8000 str r8, [sp]
30007170: e1a00005 mov r0, r5
30007174: e3a01001 mov r1, #1
30007178: e1a03007 mov r3, r7
3000717c: e1a0e00f mov lr, pc
30007180: e12fff14 bx r4
30007184: ea00005f b 30007308 <_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;
30007188: e203b001 and fp, r3, #1
3000718c: e5983004 ldr r3, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
30007190: e3130001 tst r3, #1
30007194: 1a00003b bne 30007288 <_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 ?
30007198: 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)(
3000719c: e5963008 ldr r3, [r6, #8]
block = next_block;
} while ( block != first_block );
return true;
}
300071a0: 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)(
300071a4: e1520003 cmp r2, r3
300071a8: 059f01ac ldreq r0, [pc, #428] ; 3000735c <_Heap_Walk+0x568>
300071ac: 0a000003 beq 300071c0 <_Heap_Walk+0x3cc>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
300071b0: e59f31a8 ldr r3, [pc, #424] ; 30007360 <_Heap_Walk+0x56c>
300071b4: e1520006 cmp r2, r6
300071b8: e59f01a4 ldr r0, [pc, #420] ; 30007364 <_Heap_Walk+0x570>
300071bc: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
300071c0: 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)(
300071c4: e1530001 cmp r3, r1
300071c8: 059f1198 ldreq r1, [pc, #408] ; 30007368 <_Heap_Walk+0x574>
300071cc: 0a000003 beq 300071e0 <_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)" : "")
300071d0: e59fc194 ldr ip, [pc, #404] ; 3000736c <_Heap_Walk+0x578>
300071d4: e1530006 cmp r3, r6
300071d8: e59f1184 ldr r1, [pc, #388] ; 30007364 <_Heap_Walk+0x570>
300071dc: 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)(
300071e0: e58d2004 str r2, [sp, #4]
300071e4: e58d0008 str r0, [sp, #8]
300071e8: e58d300c str r3, [sp, #12]
300071ec: e58d1010 str r1, [sp, #16]
300071f0: e1a03007 mov r3, r7
300071f4: e58da000 str sl, [sp]
300071f8: e1a00005 mov r0, r5
300071fc: e3a01000 mov r1, #0
30007200: e59f2168 ldr r2, [pc, #360] ; 30007370 <_Heap_Walk+0x57c>
30007204: e1a0e00f mov lr, pc
30007208: e12fff14 bx r4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
3000720c: e5983000 ldr r3, [r8]
30007210: e15a0003 cmp sl, r3
30007214: 0a000009 beq 30007240 <_Heap_Walk+0x44c>
(*printer)(
30007218: e58d3004 str r3, [sp, #4]
3000721c: e58da000 str sl, [sp]
30007220: e58d8008 str r8, [sp, #8]
30007224: e1a00005 mov r0, r5
30007228: e3a01001 mov r1, #1
3000722c: e59f2140 ldr r2, [pc, #320] ; 30007374 <_Heap_Walk+0x580>
30007230: e1a03007 mov r3, r7
30007234: e1a0e00f mov lr, pc
30007238: e12fff14 bx r4
3000723c: ea000031 b 30007308 <_Heap_Walk+0x514>
);
return false;
}
if ( !prev_used ) {
30007240: e35b0000 cmp fp, #0
30007244: 1a000007 bne 30007268 <_Heap_Walk+0x474>
(*printer)(
30007248: e59f2128 ldr r2, [pc, #296] ; 30007378 <_Heap_Walk+0x584>
3000724c: e1a00005 mov r0, r5
30007250: e3a01001 mov r1, #1
30007254: e1a03007 mov r3, r7
30007258: e1a0e00f mov lr, pc
3000725c: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
30007260: e1a0800b mov r8, fp
30007264: ea00001e b 300072e4 <_Heap_Walk+0x4f0>
block = next_block;
} while ( block != first_block );
return true;
}
30007268: e5963008 ldr r3, [r6, #8]
3000726c: ea000002 b 3000727c <_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 ) {
30007270: e1530007 cmp r3, r7
30007274: 0a000016 beq 300072d4 <_Heap_Walk+0x4e0>
return true;
}
free_block = free_block->next;
30007278: 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 ) {
3000727c: e1530006 cmp r3, r6
30007280: 1afffffa bne 30007270 <_Heap_Walk+0x47c>
30007284: ea000019 b 300072f0 <_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) {
30007288: e35b0000 cmp fp, #0
3000728c: 0a000007 beq 300072b0 <_Heap_Walk+0x4bc>
(*printer)(
30007290: e58da000 str sl, [sp]
30007294: e1a00005 mov r0, r5
30007298: e3a01000 mov r1, #0
3000729c: e59f20d8 ldr r2, [pc, #216] ; 3000737c <_Heap_Walk+0x588>
300072a0: e1a03007 mov r3, r7
300072a4: e1a0e00f mov lr, pc
300072a8: e12fff14 bx r4
300072ac: ea000008 b 300072d4 <_Heap_Walk+0x4e0>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
300072b0: e58da000 str sl, [sp]
300072b4: e5973000 ldr r3, [r7]
300072b8: e1a00005 mov r0, r5
300072bc: e58d3004 str r3, [sp, #4]
300072c0: e1a0100b mov r1, fp
300072c4: e59f20b4 ldr r2, [pc, #180] ; 30007380 <_Heap_Walk+0x58c>
300072c8: e1a03007 mov r3, r7
300072cc: e1a0e00f mov lr, pc
300072d0: e12fff14 bx r4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
300072d4: e59d2020 ldr r2, [sp, #32]
300072d8: e1580002 cmp r8, r2
300072dc: 1affff6a bne 3000708c <_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;
300072e0: e3a08001 mov r8, #1
block = next_block;
} while ( block != first_block );
return true;
}
300072e4: e1a00008 mov r0, r8
300072e8: e28dd030 add sp, sp, #48 ; 0x30
300072ec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
300072f0: e59f208c ldr r2, [pc, #140] ; 30007384 <_Heap_Walk+0x590>
300072f4: e1a00005 mov r0, r5
300072f8: e3a01001 mov r1, #1
300072fc: e1a03007 mov r3, r7
30007300: e1a0e00f mov lr, pc
30007304: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
30007308: e3a08000 mov r8, #0
3000730c: eafffff4 b 300072e4 <_Heap_Walk+0x4f0>
30006214 <_Internal_error_Occurred>:
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
30006214: e59f3038 ldr r3, [pc, #56] ; 30006254 <_Internal_error_Occurred+0x40>
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30006218: e20110ff and r1, r1, #255 ; 0xff
3000621c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Internal_errors_What_happened.the_source = the_source;
30006220: e5830000 str r0, [r3]
_Internal_errors_What_happened.is_internal = is_internal;
30006224: e5c31004 strb r1, [r3, #4]
_Internal_errors_What_happened.the_error = the_error;
30006228: e5832008 str r2, [r3, #8]
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
3000622c: 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 );
30006230: eb0006fa bl 30007e20 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
30006234: e59f301c ldr r3, [pc, #28] ; 30006258 <_Internal_error_Occurred+0x44><== NOT EXECUTED
30006238: e3a02005 mov r2, #5 <== NOT EXECUTED
3000623c: e5832000 str r2, [r3] <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30006240: e10f2000 mrs r2, CPSR <== NOT EXECUTED
30006244: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
30006248: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
3000624c: e1a00004 mov r0, r4 <== NOT EXECUTED
30006250: eafffffe b 30006250 <_Internal_error_Occurred+0x3c> <== NOT EXECUTED
30020828 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
30020828: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
3002082c: e5903010 ldr r3, [r0, #16]
30020830: e59f50f8 ldr r5, [pc, #248] ; 30020930 <_POSIX_signals_Unblock_thread+0x108>
30020834: e59f80f4 ldr r8, [pc, #244] ; 30020930 <_POSIX_signals_Unblock_thread+0x108>
30020838: e0035005 and r5, r3, r5
3002083c: e241c001 sub ip, r1, #1
30020840: e3a06001 mov r6, #1
30020844: e1550008 cmp r5, r8
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
30020848: e1a04000 mov r4, r0
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
3002084c: e5907108 ldr r7, [r0, #264] ; 0x108
30020850: e1a0cc16 lsl ip, r6, ip
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
30020854: 1a000013 bne 300208a8 <_POSIX_signals_Unblock_thread+0x80>
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
30020858: e5903030 ldr r3, [r0, #48] ; 0x30
3002085c: e11c0003 tst ip, r3
30020860: 1a000002 bne 30020870 <_POSIX_signals_Unblock_thread+0x48>
30020864: e59750d0 ldr r5, [r7, #208] ; 0xd0
30020868: e1dc5005 bics r5, ip, r5
3002086c: 0a00002d beq 30020928 <_POSIX_signals_Unblock_thread+0x100>
the_thread->Wait.return_code = EINTR;
30020870: e3a03004 mov r3, #4
30020874: e5843034 str r3, [r4, #52] ; 0x34
the_info = (siginfo_t *) the_thread->Wait.return_argument;
30020878: e5943028 ldr r3, [r4, #40] ; 0x28
if ( !info ) {
3002087c: e3520000 cmp r2, #0
the_info->si_signo = signo;
30020880: 05831000 streq r1, [r3]
the_info->si_code = SI_USER;
30020884: 03a01001 moveq r1, #1
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
30020888: 18920007 ldmne r2, {r0, r1, r2}
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
3002088c: 05831004 streq r1, [r3, #4]
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
30020890: 18830007 stmne r3, {r0, r1, r2}
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
30020894: 05832008 streq r2, [r3, #8]
} else {
*the_info = *info;
}
_Thread_queue_Extract_with_proxy( the_thread );
30020898: e1a00004 mov r0, r4
3002089c: ebffaf72 bl 3000c66c <_Thread_queue_Extract_with_proxy>
return true;
300208a0: e3a05001 mov r5, #1
300208a4: ea00001f b 30020928 <_POSIX_signals_Unblock_thread+0x100>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
300208a8: e59750d0 ldr r5, [r7, #208] ; 0xd0
300208ac: e1dc5005 bics r5, ip, r5
300208b0: 0a00001c beq 30020928 <_POSIX_signals_Unblock_thread+0x100>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
300208b4: e2135201 ands r5, r3, #268435456 ; 0x10000000
300208b8: 0a000010 beq 30020900 <_POSIX_signals_Unblock_thread+0xd8>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
300208bc: e59f5070 ldr r5, [pc, #112] ; 30020934 <_POSIX_signals_Unblock_thread+0x10c>
the_thread->Wait.return_code = EINTR;
300208c0: e3a02004 mov r2, #4
300208c4: e0035005 and r5, r3, r5
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
300208c8: e3550000 cmp r5, #0
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
the_thread->Wait.return_code = EINTR;
300208cc: e5802034 str r2, [r0, #52] ; 0x34
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
300208d0: 0a000002 beq 300208e0 <_POSIX_signals_Unblock_thread+0xb8>
_Thread_queue_Extract_with_proxy( the_thread );
300208d4: ebffaf64 bl 3000c66c <_Thread_queue_Extract_with_proxy> <== NOT EXECUTED
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
300208d8: e3a05000 mov r5, #0 <== NOT EXECUTED
300208dc: ea000011 b 30020928 <_POSIX_signals_Unblock_thread+0x100> <== NOT EXECUTED
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
300208e0: e2133008 ands r3, r3, #8
300208e4: 0a00000e beq 30020924 <_POSIX_signals_Unblock_thread+0xfc>
(void) _Watchdog_Remove( &the_thread->Timer );
300208e8: e2800048 add r0, r0, #72 ; 0x48
300208ec: ebffb1f9 bl 3000d0d8 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
300208f0: e1a00004 mov r0, r4
300208f4: e59f103c ldr r1, [pc, #60] ; 30020938 <_POSIX_signals_Unblock_thread+0x110>
300208f8: ebffacba bl 3000bbe8 <_Thread_Clear_state>
300208fc: ea000009 b 30020928 <_POSIX_signals_Unblock_thread+0x100>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
30020900: e3530000 cmp r3, #0
30020904: 1a000007 bne 30020928 <_POSIX_signals_Unblock_thread+0x100>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
30020908: e59f202c ldr r2, [pc, #44] ; 3002093c <_POSIX_signals_Unblock_thread+0x114>
3002090c: e5925000 ldr r5, [r2]
30020910: e3550000 cmp r5, #0
30020914: 0a000003 beq 30020928 <_POSIX_signals_Unblock_thread+0x100>
30020918: e5921004 ldr r1, [r2, #4]
3002091c: e1500001 cmp r0, r1
_Thread_Dispatch_necessary = true;
30020920: 05c26010 strbeq r6, [r2, #16]
}
}
return false;
30020924: e1a05003 mov r5, r3
}
30020928: e1a00005 mov r0, r5
3002092c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30014118 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
30014118: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3001411c: e24dd018 sub sp, sp, #24
30014120: 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;
30014124: e3a03000 mov r3, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30014128: e28ba004 add sl, fp, #4
3001412c: e28d7004 add r7, sp, #4
30014130: e1a04000 mov r4, r0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30014134: e58da00c str sl, [sp, #12]
the_chain->permanent_null = NULL;
30014138: e58d3010 str r3, [sp, #16]
the_chain->last = _Chain_Head(the_chain);
3001413c: e58db014 str fp, [sp, #20]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30014140: e1a0500d mov r5, sp
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30014144: e58d7000 str r7, [sp]
the_chain->permanent_null = NULL;
30014148: 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 );
3001414c: 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;
30014150: 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 );
30014154: 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;
30014158: e59f2150 ldr r2, [pc, #336] ; 300142b0 <_Timer_server_Body+0x198>
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
3001415c: 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;
30014160: e5923000 ldr r3, [r2]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
30014164: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
30014168: e1a02005 mov r2, r5
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
3001416c: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
30014170: e0611003 rsb r1, r1, r3
30014174: eb0010dd bl 300184f0 <_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();
30014178: e59f3134 ldr r3, [pc, #308] ; 300142b4 <_Timer_server_Body+0x19c>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
3001417c: 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();
30014180: 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 ) {
30014184: e1560002 cmp r6, r2
30014188: 9a000004 bls 300141a0 <_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 );
3001418c: e0621006 rsb r1, r2, r6
30014190: e1a00008 mov r0, r8
30014194: e1a02005 mov r2, r5
30014198: eb0010d4 bl 300184f0 <_Watchdog_Adjust_to_chain>
3001419c: ea000003 b 300141b0 <_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 );
300141a0: 31a00008 movcc r0, r8
300141a4: 33a01001 movcc r1, #1
300141a8: 30662002 rsbcc r2, r6, r2
300141ac: 3b0010a7 blcc 30018450 <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
300141b0: 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 );
300141b4: e5940078 ldr r0, [r4, #120] ; 0x78
300141b8: eb000298 bl 30014c20 <_Chain_Get>
if ( timer == NULL ) {
300141bc: e2506000 subs r6, r0, #0
300141c0: 0a000009 beq 300141ec <_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 ) {
300141c4: e5963038 ldr r3, [r6, #56] ; 0x38
300141c8: e3530001 cmp r3, #1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
300141cc: 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 ) {
300141d0: 0a000002 beq 300141e0 <_Timer_server_Body+0xc8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
300141d4: e3530003 cmp r3, #3
300141d8: 1afffff5 bne 300141b4 <_Timer_server_Body+0x9c>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
300141dc: e1a00008 mov r0, r8
300141e0: e2861010 add r1, r6, #16
300141e4: eb0010ec bl 3001859c <_Watchdog_Insert>
300141e8: eafffff1 b 300141b4 <_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 );
300141ec: ebffff97 bl 30014050 <arm_interrupt_disable>
if ( _Chain_Is_empty( insert_chain ) ) {
300141f0: e59d300c ldr r3, [sp, #12]
300141f4: e153000a cmp r3, sl
300141f8: 1a000006 bne 30014218 <_Timer_server_Body+0x100>
ts->insert_chain = NULL;
300141fc: e5846078 str r6, [r4, #120] ; 0x78
30014200: 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 ) ) {
30014204: e59d3000 ldr r3, [sp]
30014208: e1530007 cmp r3, r7
)
{
if ( !_Chain_Is_empty(the_chain))
return _Chain_Get_first_unprotected(the_chain);
else
return NULL;
3001420c: 13a06000 movne r6, #0
30014210: 1a000002 bne 30014220 <_Timer_server_Body+0x108>
30014214: ea000013 b 30014268 <_Timer_server_Body+0x150>
30014218: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
3001421c: eaffffcd b 30014158 <_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 );
30014220: ebffff8a bl 30014050 <arm_interrupt_disable>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
30014224: e59d3000 ldr r3, [sp]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
30014228: e1530007 cmp r3, r7
3001422c: 0a00000b beq 30014260 <_Timer_server_Body+0x148>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
30014230: e5932000 ldr r2, [r3]
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
30014234: e3530000 cmp r3, #0
the_chain->first = new_first;
30014238: e58d2000 str r2, [sp]
new_first->previous = _Chain_Head(the_chain);
3001423c: e5825004 str r5, [r2, #4]
30014240: 0a000006 beq 30014260 <_Timer_server_Body+0x148>
watchdog->state = WATCHDOG_INACTIVE;
30014244: e5836008 str r6, [r3, #8]
30014248: 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 );
3001424c: e5930020 ldr r0, [r3, #32]
30014250: e5931024 ldr r1, [r3, #36] ; 0x24
30014254: e1a0e00f mov lr, pc
30014258: e593f01c ldr pc, [r3, #28]
}
3001425c: eaffffef b 30014220 <_Timer_server_Body+0x108>
30014260: e129f000 msr CPSR_fc, r0
30014264: eaffffb9 b 30014150 <_Timer_server_Body+0x38>
} else {
ts->active = false;
30014268: e3a03000 mov r3, #0
3001426c: e5c4307c strb r3, [r4, #124] ; 0x7c
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
30014270: ebffff7a bl 30014060 <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
30014274: e3a01008 mov r1, #8
30014278: e5940000 ldr r0, [r4]
3001427c: eb000e22 bl 30017b0c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
30014280: e1a00004 mov r0, r4
30014284: ebffff7b bl 30014078 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
30014288: e1a00004 mov r0, r4
3001428c: ebffff8d bl 300140c8 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
30014290: eb000ba1 bl 3001711c <_Thread_Enable_dispatch>
ts->active = true;
30014294: e3a03001 mov r3, #1
30014298: 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 );
3001429c: e2840008 add r0, r4, #8
300142a0: eb001113 bl 300186f4 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
300142a4: e2840040 add r0, r4, #64 ; 0x40
300142a8: eb001111 bl 300186f4 <_Watchdog_Remove>
300142ac: eaffffa7 b 30014150 <_Timer_server_Body+0x38>
30007e20 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30007e20: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
30007e24: e59f503c ldr r5, [pc, #60] ; 30007e68 <_User_extensions_Fatal+0x48>
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30007e28: e1a08000 mov r8, r0
30007e2c: e1a07002 mov r7, r2
30007e30: e20160ff and r6, r1, #255 ; 0xff
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
30007e34: e5954008 ldr r4, [r5, #8]
30007e38: ea000007 b 30007e5c <_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 )
30007e3c: e5943030 ldr r3, [r4, #48] ; 0x30
30007e40: e3530000 cmp r3, #0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
30007e44: 11a00008 movne r0, r8
30007e48: 11a01006 movne r1, r6
30007e4c: 11a02007 movne r2, r7
30007e50: 11a0e00f movne lr, pc
30007e54: 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 ) {
30007e58: e5944004 ldr r4, [r4, #4]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
30007e5c: e1540005 cmp r4, r5
30007e60: 1afffff5 bne 30007e3c <_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 );
}
}
30007e64: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
30008678 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
30008678: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
3000867c: e3d27007 bics r7, r2, #7
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
30008680: e1a09000 mov r9, r0
30008684: e1a04001 mov r4, r1
30008688: e1a05003 mov r5, r3
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
3000868c: 0a000002 beq 3000869c <devFS_evaluate_path+0x24>
rtems_set_errno_and_return_minus_one( EPERM );
30008690: eb000986 bl 3000acb0 <__errno> <== NOT EXECUTED
30008694: e3a03001 mov r3, #1 <== NOT EXECUTED
30008698: ea000005 b 300086b4 <devFS_evaluate_path+0x3c> <== NOT EXECUTED
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
3000869c: e5936000 ldr r6, [r3]
if (!device_name_table)
300086a0: e3560000 cmp r6, #0
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
300086a4: 159fa094 ldrne sl, [pc, #148] ; 30008740 <devFS_evaluate_path+0xc8>
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
300086a8: 1a00001c bne 30008720 <devFS_evaluate_path+0xa8>
rtems_set_errno_and_return_minus_one( EFAULT );
300086ac: eb00097f bl 3000acb0 <__errno>
300086b0: e3a0300e mov r3, #14
300086b4: e5803000 str r3, [r0]
300086b8: e3e00000 mvn r0, #0
300086bc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
300086c0: e5968000 ldr r8, [r6]
300086c4: e3580000 cmp r8, #0
300086c8: 0a000012 beq 30008718 <devFS_evaluate_path+0xa0>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
300086cc: e1a00009 mov r0, r9
300086d0: e1a01008 mov r1, r8
300086d4: e1a02004 mov r2, r4
300086d8: eb000cfb bl 3000bacc <strncmp>
300086dc: e3500000 cmp r0, #0
300086e0: 1a00000c bne 30008718 <devFS_evaluate_path+0xa0>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
300086e4: e7d80004 ldrb r0, [r8, r4]
300086e8: e3500000 cmp r0, #0
300086ec: 1a000009 bne 30008718 <devFS_evaluate_path+0xa0>
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
300086f0: e59f304c ldr r3, [pc, #76] ; 30008744 <devFS_evaluate_path+0xcc>
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
300086f4: e5856000 str r6, [r5]
pathloc->handlers = &devFS_file_handlers;
300086f8: e5853008 str r3, [r5, #8]
pathloc->ops = &devFS_ops;
300086fc: e59f3044 ldr r3, [pc, #68] ; 30008748 <devFS_evaluate_path+0xd0>
30008700: e585300c str r3, [r5, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
30008704: e59f3040 ldr r3, [pc, #64] ; 3000874c <devFS_evaluate_path+0xd4>
30008708: e5933000 ldr r3, [r3]
3000870c: e5933028 ldr r3, [r3, #40] ; 0x28
30008710: e5853010 str r3, [r5, #16]
return 0;
30008714: 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++) {
30008718: e2877001 add r7, r7, #1
3000871c: e2866014 add r6, r6, #20
30008720: e59a3000 ldr r3, [sl]
30008724: e1570003 cmp r7, r3
30008728: 3affffe4 bcc 300086c0 <devFS_evaluate_path+0x48>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
3000872c: eb00095f bl 3000acb0 <__errno>
30008730: e3a03002 mov r3, #2
30008734: e5803000 str r3, [r0]
30008738: e3e00000 mvn r0, #0
}
3000873c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
30002c68 <drainOutput>:
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002c68: e59030b4 ldr r3, [r0, #180] ; 0xb4
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
30002c6c: e92d4030 push {r4, r5, lr}
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002c70: e3530000 cmp r3, #0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
30002c74: e1a04000 mov r4, r0
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002c78: 08bd8030 popeq {r4, r5, pc}
rtems_interrupt_disable (level);
30002c7c: ebfffff5 bl 30002c58 <arm_interrupt_disable>
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
30002c80: 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) {
30002c84: ea000008 b 30002cac <drainOutput+0x44>
tty->rawOutBufState = rob_wait;
30002c88: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30002c8c: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
30002c90: e3a01000 mov r1, #0 <== NOT EXECUTED
30002c94: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
30002c98: e1a02001 mov r2, r1 <== NOT EXECUTED
30002c9c: eb0008cc bl 30004fd4 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
30002ca0: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
30002ca4: 1b000a61 blne 30005630 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
30002ca8: ebffffea bl 30002c58 <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) {
30002cac: e5942084 ldr r2, [r4, #132] ; 0x84
30002cb0: e5943080 ldr r3, [r4, #128] ; 0x80
30002cb4: e1520003 cmp r2, r3
30002cb8: 1afffff2 bne 30002c88 <drainOutput+0x20>
30002cbc: e129f000 msr CPSR_fc, r0
30002cc0: e8bd8030 pop {r4, r5, pc}
30003948 <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)
30003948: 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)
{
3000394c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
if (tty->ccount == 0)
30003950: 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)
{
30003954: e1a04000 mov r4, r0
30003958: e1a07001 mov r7, r1
if (tty->ccount == 0)
3000395c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
return;
if (lineFlag) {
30003960: e3510000 cmp r1, #0
30003964: 0a000060 beq 30003aec <erase+0x1a4>
if (!(tty->termios.c_lflag & ECHO)) {
30003968: e590303c ldr r3, [r0, #60] ; 0x3c
3000396c: e2132008 ands r2, r3, #8
tty->ccount = 0;
30003970: 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)) {
30003974: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
30003978: e2133010 ands r3, r3, #16
3000397c: 1a00005a bne 30003aec <erase+0x1a4>
tty->ccount = 0;
30003980: e5803020 str r3, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
30003984: e1a01004 mov r1, r4 <== NOT EXECUTED
30003988: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED
3000398c: ebffffca bl 300038bc <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
30003990: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
30003994: e3130020 tst r3, #32 <== NOT EXECUTED
echo ('\n', tty);
30003998: 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)
3000399c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
300039a0: ea00000b b 300039d4 <erase+0x8c> <== NOT EXECUTED
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
300039a4: e594303c ldr r3, [r4, #60] ; 0x3c
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
300039a8: e2411001 sub r1, r1, #1
300039ac: e594001c ldr r0, [r4, #28]
300039b0: e5841020 str r1, [r4, #32]
if (tty->termios.c_lflag & ECHO) {
300039b4: e3130008 tst r3, #8
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
300039b8: e7d05001 ldrb r5, [r0, r1]
if (tty->termios.c_lflag & ECHO) {
300039bc: 0a000047 beq 30003ae0 <erase+0x198>
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
300039c0: e3570000 cmp r7, #0
300039c4: 1a000005 bne 300039e0 <erase+0x98>
300039c8: e3130010 tst r3, #16
300039cc: 1a000003 bne 300039e0 <erase+0x98>
echo (tty->termios.c_cc[VERASE], tty);
300039d0: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED
300039d4: e1a01004 mov r1, r4 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
300039d8: 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);
300039dc: eaffffb6 b 300038bc <echo> <== NOT EXECUTED
} else if (c == '\t') {
300039e0: e3550009 cmp r5, #9
300039e4: 1a00001f bne 30003a68 <erase+0x120>
int col = tty->read_start_column;
300039e8: 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)) {
300039ec: 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;
300039f0: 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)
300039f4: e2033c02 and r3, r3, #512 ; 0x200
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
300039f8: ea00000c b 30003a30 <erase+0xe8>
c = tty->cbuf[i++];
300039fc: e7d0c002 ldrb ip, [r0, r2]
30003a00: e2822001 add r2, r2, #1
if (c == '\t') {
30003a04: e35c0009 cmp ip, #9
col = (col | 7) + 1;
30003a08: 03855007 orreq r5, r5, #7
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
30003a0c: 0a000006 beq 30003a2c <erase+0xe4>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
30003a10: e088c00c add ip, r8, ip
30003a14: e5dcc001 ldrb ip, [ip, #1]
30003a18: e31c0020 tst ip, #32
30003a1c: 0a000002 beq 30003a2c <erase+0xe4>
if (tty->termios.c_lflag & ECHOCTL)
30003a20: e3530000 cmp r3, #0 <== NOT EXECUTED
col += 2;
30003a24: 12855002 addne r5, r5, #2 <== NOT EXECUTED
30003a28: ea000000 b 30003a30 <erase+0xe8> <== NOT EXECUTED
} else {
col++;
30003a2c: e2855001 add r5, r5, #1
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
30003a30: e1520001 cmp r2, r1
30003a34: 1afffff0 bne 300039fc <erase+0xb4>
30003a38: ea000006 b 30003a58 <erase+0x110>
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
30003a3c: e59f00bc ldr r0, [pc, #188] ; 30003b00 <erase+0x1b8>
30003a40: e3a01001 mov r1, #1
30003a44: e1a02004 mov r2, r4
30003a48: ebffff07 bl 3000366c <rtems_termios_puts>
tty->column--;
30003a4c: e5943028 ldr r3, [r4, #40] ; 0x28
30003a50: e2433001 sub r3, r3, #1
30003a54: e5843028 str r3, [r4, #40] ; 0x28
}
/*
* Back up over the tab
*/
while (tty->column > col) {
30003a58: e5943028 ldr r3, [r4, #40] ; 0x28
30003a5c: e1530005 cmp r3, r5
30003a60: cafffff5 bgt 30003a3c <erase+0xf4>
30003a64: ea00001d b 30003ae0 <erase+0x198>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
30003a68: e5962000 ldr r2, [r6]
30003a6c: e2855001 add r5, r5, #1
30003a70: e7d22005 ldrb r2, [r2, r5]
30003a74: e3120020 tst r2, #32
30003a78: 0a000009 beq 30003aa4 <erase+0x15c>
30003a7c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
30003a80: 0a000007 beq 30003aa4 <erase+0x15c> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
30003a84: e59f0078 ldr r0, [pc, #120] ; 30003b04 <erase+0x1bc> <== NOT EXECUTED
30003a88: e3a01003 mov r1, #3 <== NOT EXECUTED
30003a8c: e1a02004 mov r2, r4 <== NOT EXECUTED
30003a90: ebfffef5 bl 3000366c <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
30003a94: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003a98: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003a9c: 12433001 subne r3, r3, #1 <== NOT EXECUTED
30003aa0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
30003aa4: e5963000 ldr r3, [r6]
30003aa8: e7d33005 ldrb r3, [r3, r5]
30003aac: e3130020 tst r3, #32
30003ab0: 0a000002 beq 30003ac0 <erase+0x178>
30003ab4: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
30003ab8: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
30003abc: 0a000007 beq 30003ae0 <erase+0x198> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
30003ac0: e59f003c ldr r0, [pc, #60] ; 30003b04 <erase+0x1bc>
30003ac4: e3a01003 mov r1, #3
30003ac8: e1a02004 mov r2, r4
30003acc: ebfffee6 bl 3000366c <rtems_termios_puts>
if (tty->column)
30003ad0: e5943028 ldr r3, [r4, #40] ; 0x28
30003ad4: e3530000 cmp r3, #0
tty->column--;
30003ad8: 12433001 subne r3, r3, #1
30003adc: 15843028 strne r3, [r4, #40] ; 0x28
}
}
}
if (!lineFlag)
30003ae0: e3570000 cmp r7, #0
30003ae4: 1a000001 bne 30003af0 <erase+0x1a8>
30003ae8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30003aec: e59f6014 ldr r6, [pc, #20] ; 30003b08 <erase+0x1c0>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
30003af0: e5941020 ldr r1, [r4, #32]
30003af4: e3510000 cmp r1, #0
30003af8: 1affffa9 bne 300039a4 <erase+0x5c>
30003afc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30002704 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
30002704: e92d000e push {r1, r2, r3}
30002708: e92d40f1 push {r0, r4, r5, r6, r7, lr}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
3000270c: e59f21a4 ldr r2, [pc, #420] ; 300028b8 <fcntl+0x1b4>
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
30002710: e28d301c add r3, sp, #28
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
30002714: e5921000 ldr r1, [r2]
int fcntl(
int fd,
int cmd,
...
)
{
30002718: e59d7018 ldr r7, [sp, #24]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
3000271c: e1500001 cmp r0, r1
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
30002720: e58d3000 str r3, [sp]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
30002724: 2a000006 bcs 30002744 <fcntl+0x40>
iop = rtems_libio_iop( fd );
30002728: e59f218c ldr r2, [pc, #396] ; 300028bc <fcntl+0x1b8>
3000272c: e3a04038 mov r4, #56 ; 0x38
30002730: e5922000 ldr r2, [r2]
30002734: e0242490 mla r4, r0, r4, r2
rtems_libio_check_is_open(iop);
30002738: e5940014 ldr r0, [r4, #20]
3000273c: e3100c01 tst r0, #256 ; 0x100
30002740: 1a000002 bne 30002750 <fcntl+0x4c>
30002744: eb002ccd bl 3000da80 <__errno>
30002748: e3a03009 mov r3, #9
3000274c: ea000047 b 30002870 <fcntl+0x16c>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
30002750: e3570009 cmp r7, #9
30002754: 979ff107 ldrls pc, [pc, r7, lsl #2]
30002758: ea000042 b 30002868 <fcntl+0x164>
3000275c: 30002784 .word 0x30002784 <== NOT EXECUTED
30002760: 300027f4 .word 0x300027f4 <== NOT EXECUTED
30002764: 30002804 .word 0x30002804 <== NOT EXECUTED
30002768: 30002824 .word 0x30002824 <== NOT EXECUTED
3000276c: 30002830 .word 0x30002830 <== NOT EXECUTED
30002770: 3000285c .word 0x3000285c <== NOT EXECUTED
30002774: 3000285c .word 0x3000285c <== NOT EXECUTED
30002778: 3000285c .word 0x3000285c <== NOT EXECUTED
3000277c: 3000285c .word 0x3000285c <== NOT EXECUTED
30002780: 3000285c .word 0x3000285c <== NOT EXECUTED
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
30002784: e5933000 ldr r3, [r3]
if ( fd2 )
30002788: e3530000 cmp r3, #0
3000278c: 0a000004 beq 300027a4 <fcntl+0xa0>
diop = rtems_libio_iop( fd2 );
30002790: e1530001 cmp r3, r1
30002794: 33a06038 movcc r6, #56 ; 0x38
30002798: 30262693 mlacc r6, r3, r6, r2
3000279c: 3a000005 bcc 300027b8 <fcntl+0xb4>
300027a0: ea000003 b 300027b4 <fcntl+0xb0> <== NOT EXECUTED
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
300027a4: eb000190 bl 30002dec <rtems_libio_allocate>
if ( diop == 0 ) {
300027a8: e2506000 subs r6, r0, #0
300027ac: 1a000001 bne 300027b8 <fcntl+0xb4>
300027b0: ea00003b b 300028a4 <fcntl+0x1a0> <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
300027b4: e3a06000 mov r6, #0 <== NOT EXECUTED
ret = -1;
break;
}
}
diop->flags = iop->flags;
300027b8: e5943014 ldr r3, [r4, #20]
diop->pathinfo = iop->pathinfo;
300027bc: e286c018 add ip, r6, #24
300027c0: e2845018 add r5, r4, #24
ret = -1;
break;
}
}
diop->flags = iop->flags;
300027c4: e5863014 str r3, [r6, #20]
diop->pathinfo = iop->pathinfo;
300027c8: e8b5000f ldm r5!, {r0, r1, r2, r3}
300027cc: e8ac000f stmia ip!, {r0, r1, r2, r3}
300027d0: e5953000 ldr r3, [r5]
300027d4: e58c3000 str r3, [ip]
ret = (int) (diop - rtems_libio_iops);
300027d8: e59f30dc ldr r3, [pc, #220] ; 300028bc <fcntl+0x1b8>
300027dc: e5933000 ldr r3, [r3]
300027e0: e0636006 rsb r6, r3, r6
300027e4: e59f30d4 ldr r3, [pc, #212] ; 300028c0 <fcntl+0x1bc>
300027e8: e1a061c6 asr r6, r6, #3
300027ec: e0060693 mul r6, r3, r6
300027f0: ea000020 b 30002878 <fcntl+0x174>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
300027f4: e3100b02 tst r0, #2048 ; 0x800
300027f8: 03a06000 moveq r6, #0
300027fc: 13a06001 movne r6, #1
30002800: ea00001e b 30002880 <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 ) )
30002804: e5936000 ldr r6, [r3]
30002808: e3560000 cmp r6, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
3000280c: 13800b02 orrne r0, r0, #2048 ; 0x800
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
30002810: 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;
30002814: 15840014 strne r0, [r4, #20]
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
30002818: 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 ) )
3000281c: 0a000017 beq 30002880 <fcntl+0x17c>
30002820: ea00000b b 30002854 <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 );
30002824: eb00015e bl 30002da4 <rtems_libio_to_fcntl_flags>
30002828: e1a06000 mov r6, r0
3000282c: ea000011 b 30002878 <fcntl+0x174>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
30002830: e5930000 ldr r0, [r3]
30002834: eb00014d bl 30002d70 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
30002838: e5942014 ldr r2, [r4, #20]
3000283c: e59f3080 ldr r3, [pc, #128] ; 300028c4 <fcntl+0x1c0>
30002840: e3c22c02 bic r2, r2, #512 ; 0x200
30002844: e0003003 and r3, r0, r3
30002848: e3c22001 bic r2, r2, #1
3000284c: e1833002 orr r3, r3, r2
30002850: e5843014 str r3, [r4, #20]
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
30002854: e3a06000 mov r6, #0
30002858: ea000008 b 30002880 <fcntl+0x17c>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
3000285c: eb002c87 bl 3000da80 <__errno>
30002860: e3a03086 mov r3, #134 ; 0x86
30002864: ea000001 b 30002870 <fcntl+0x16c>
ret = -1;
break;
default:
errno = EINVAL;
30002868: eb002c84 bl 3000da80 <__errno>
3000286c: e3a03016 mov r3, #22
30002870: e5803000 str r3, [r0]
30002874: ea00000a b 300028a4 <fcntl+0x1a0>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
30002878: e3560000 cmp r6, #0
3000287c: ba000009 blt 300028a8 <fcntl+0x1a4>
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
30002880: e5943020 ldr r3, [r4, #32]
30002884: e1a01004 mov r1, r4
30002888: e1a00007 mov r0, r7
3000288c: e1a0e00f mov lr, pc
30002890: e593f030 ldr pc, [r3, #48] ; 0x30
if (err) {
30002894: e2504000 subs r4, r0, #0
30002898: 0a000002 beq 300028a8 <fcntl+0x1a4>
errno = err;
3000289c: eb002c77 bl 3000da80 <__errno> <== NOT EXECUTED
300028a0: e5804000 str r4, [r0] <== NOT EXECUTED
ret = -1;
300028a4: e3e06000 mvn r6, #0
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
300028a8: e1a00006 mov r0, r6
300028ac: e8bd40f8 pop {r3, r4, r5, r6, r7, lr}
300028b0: e28dd00c add sp, sp, #12
300028b4: e12fff1e bx lr
3000b428 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
3000b428: e92d45f7 push {r0, r1, r2, r4, r5, r6, r7, r8, sl, lr}
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b42c: e59f53bc ldr r5, [pc, #956] ; 3000b7f0 <fifo_open+0x3c8>
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
3000b430: e1a08000 mov r8, r0
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b434: e5954000 ldr r4, [r5]
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
3000b438: e1a07001 mov r7, r1
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b43c: e3540000 cmp r4, #0
3000b440: 1a000012 bne 3000b490 <fifo_open+0x68>
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 );
3000b444: e59f33a8 ldr r3, [pc, #936] ; 3000b7f4 <fifo_open+0x3cc>
3000b448: e1a01004 mov r1, r4
3000b44c: e5930000 ldr r0, [r3]
3000b450: e1a02004 mov r2, r4
3000b454: ebffeee6 bl 30006ff4 <rtems_semaphore_obtain>
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b458: e5953000 ldr r3, [r5]
3000b45c: e3530000 cmp r3, #0
3000b460: 1a000005 bne 3000b47c <fifo_open+0x54>
sc = rtems_semaphore_create(
3000b464: e59f038c ldr r0, [pc, #908] ; 3000b7f8 <fifo_open+0x3d0>
3000b468: e3a01001 mov r1, #1
3000b46c: e3a02054 mov r2, #84 ; 0x54
3000b470: e58d5000 str r5, [sp]
3000b474: ebffee4c bl 30006dac <rtems_semaphore_create>
3000b478: e1a04000 mov r4, r0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
3000b47c: e59f3370 ldr r3, [pc, #880] ; 3000b7f4 <fifo_open+0x3cc>
3000b480: e5930000 ldr r0, [r3]
3000b484: ebffef20 bl 3000710c <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
3000b488: e3540000 cmp r4, #0
3000b48c: 1a000006 bne 3000b4ac <fifo_open+0x84>
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3000b490: e59f3358 ldr r3, [pc, #856] ; 3000b7f0 <fifo_open+0x3c8>
3000b494: e3a01000 mov r1, #0
3000b498: e5930000 ldr r0, [r3]
3000b49c: e1a02001 mov r2, r1
3000b4a0: ebffeed3 bl 30006ff4 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
3000b4a4: e2505000 subs r5, r0, #0
3000b4a8: 0a000000 beq 3000b4b0 <fifo_open+0x88>
return 0;
} else {
return -ENOMEM;
3000b4ac: e3e0500b mvn r5, #11
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
if (err)
3000b4b0: e2556000 subs r6, r5, #0
3000b4b4: 1a0000cb bne 3000b7e8 <fifo_open+0x3c0>
return err;
pipe = *pipep;
3000b4b8: e5984000 ldr r4, [r8]
if (pipe == NULL) {
3000b4bc: e3540000 cmp r4, #0
3000b4c0: 1a00004d bne 3000b5fc <fifo_open+0x1d4>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
3000b4c4: e3a00034 mov r0, #52 ; 0x34
3000b4c8: ebffe2e8 bl 30004070 <malloc>
if (pipe == NULL)
3000b4cc: e250a000 subs sl, r0, #0
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
3000b4d0: e1a04000 mov r4, r0
if (pipe == NULL)
3000b4d4: 0a000046 beq 3000b5f4 <fifo_open+0x1cc>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
3000b4d8: e1a01005 mov r1, r5
3000b4dc: e3a02034 mov r2, #52 ; 0x34
3000b4e0: eb001271 bl 3000feac <memset>
pipe->Size = PIPE_BUF;
3000b4e4: e3a00c02 mov r0, #512 ; 0x200
3000b4e8: e5840004 str r0, [r4, #4]
pipe->Buffer = malloc(pipe->Size);
3000b4ec: ebffe2df bl 30004070 <malloc>
if (! pipe->Buffer)
3000b4f0: 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);
3000b4f4: e5840000 str r0, [r4]
if (! pipe->Buffer)
3000b4f8: 0a00003b beq 3000b5ec <fifo_open+0x1c4>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
3000b4fc: e59f62f8 ldr r6, [pc, #760] ; 3000b7fc <fifo_open+0x3d4>
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
3000b500: e59f02f8 ldr r0, [pc, #760] ; 3000b800 <fifo_open+0x3d8>
rtems_build_name ('P', 'I', 'r', c),
3000b504: e5d63000 ldrb r3, [r6]
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
3000b508: e1a01005 mov r1, r5
3000b50c: e1830000 orr r0, r3, r0
3000b510: e1a02005 mov r2, r5
3000b514: e284302c add r3, r4, #44 ; 0x2c
3000b518: eb00061e bl 3000cd98 <rtems_barrier_create>
3000b51c: e3500000 cmp r0, #0
3000b520: 1a00002f bne 3000b5e4 <fifo_open+0x1bc>
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),
3000b524: e5d63000 ldrb r3, [r6]
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(
3000b528: e59f02d4 ldr r0, [pc, #724] ; 3000b804 <fifo_open+0x3dc>
3000b52c: e1a01005 mov r1, r5
3000b530: e1830000 orr r0, r3, r0
3000b534: e1a02005 mov r2, r5
3000b538: e2843030 add r3, r4, #48 ; 0x30
3000b53c: eb000615 bl 3000cd98 <rtems_barrier_create>
3000b540: e3500000 cmp r0, #0
3000b544: 1a000024 bne 3000b5dc <fifo_open+0x1b4>
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,
3000b548: e5d63000 ldrb r3, [r6]
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(
3000b54c: e59f02b4 ldr r0, [pc, #692] ; 3000b808 <fifo_open+0x3e0>
3000b550: e2842028 add r2, r4, #40 ; 0x28
3000b554: e58d2000 str r2, [sp]
3000b558: e1830000 orr r0, r3, r0
3000b55c: e3a01001 mov r1, #1
3000b560: e3a02010 mov r2, #16
3000b564: e1a03005 mov r3, r5
3000b568: ebffee0f bl 30006dac <rtems_semaphore_create>
3000b56c: e3500000 cmp r0, #0
3000b570: 1a000017 bne 3000b5d4 <fifo_open+0x1ac>
/* Set barriers to be interruptible by signals. */
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
3000b574: e28d5004 add r5, sp, #4
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
_Objects_Get( &_Barrier_Information, id, location );
3000b578: e594102c ldr r1, [r4, #44] ; 0x2c
3000b57c: e1a02005 mov r2, r5
3000b580: e59f0284 ldr r0, [pc, #644] ; 3000b80c <fifo_open+0x3e4>
3000b584: ebfff446 bl 300086a4 <_Objects_Get>
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
3000b588: e590304c ldr r3, [r0, #76] ; 0x4c
3000b58c: e3833201 orr r3, r3, #268435456 ; 0x10000000
3000b590: e580304c str r3, [r0, #76] ; 0x4c
_Thread_Enable_dispatch();
3000b594: ebfff656 bl 30008ef4 <_Thread_Enable_dispatch>
3000b598: e1a02005 mov r2, r5
3000b59c: e5941030 ldr r1, [r4, #48] ; 0x30
3000b5a0: e59f0264 ldr r0, [pc, #612] ; 3000b80c <fifo_open+0x3e4>
3000b5a4: ebfff43e bl 300086a4 <_Objects_Get>
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
3000b5a8: e590304c ldr r3, [r0, #76] ; 0x4c
3000b5ac: e3833201 orr r3, r3, #268435456 ; 0x10000000
3000b5b0: e580304c str r3, [r0, #76] ; 0x4c
_Thread_Enable_dispatch();
3000b5b4: ebfff64e bl 30008ef4 <_Thread_Enable_dispatch>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
3000b5b8: e5d63000 ldrb r3, [r6]
3000b5bc: e353007a cmp r3, #122 ; 0x7a
3000b5c0: e2832001 add r2, r3, #1
c = 'a';
3000b5c4: 03a03061 moveq r3, #97 ; 0x61
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
3000b5c8: e5c62000 strb r2, [r6]
c = 'a';
3000b5cc: 05c63000 strbeq r3, [r6]
3000b5d0: ea000009 b 3000b5fc <fifo_open+0x1d4>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
3000b5d4: e59a0030 ldr r0, [sl, #48] ; 0x30
3000b5d8: eb00061e bl 3000ce58 <rtems_barrier_delete>
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
3000b5dc: e59a002c ldr r0, [sl, #44] ; 0x2c
3000b5e0: eb00061c bl 3000ce58 <rtems_barrier_delete>
err_rbar:
free(pipe->Buffer);
3000b5e4: e59a0000 ldr r0, [sl]
3000b5e8: ebffe0c3 bl 300038fc <free>
err_buf:
free(pipe);
3000b5ec: e1a0000a mov r0, sl
3000b5f0: ebffe0c1 bl 300038fc <free>
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
3000b5f4: e3e0600b mvn r6, #11
3000b5f8: ea00000d b 3000b634 <fifo_open+0x20c>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
3000b5fc: e3a01000 mov r1, #0
3000b600: e5940028 ldr r0, [r4, #40] ; 0x28
3000b604: e1a02001 mov r2, r1
3000b608: ebffee79 bl 30006ff4 <rtems_semaphore_obtain>
err = -EINTR;
if (*pipep == NULL) {
3000b60c: e5983000 ldr r3, [r8]
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
3000b610: e3500000 cmp r0, #0
3000b614: 03a06000 moveq r6, #0
3000b618: 13e06003 mvnne r6, #3
if (*pipep == NULL) {
3000b61c: e3530000 cmp r3, #0
3000b620: 1a000003 bne 3000b634 <fifo_open+0x20c>
if (err)
3000b624: e3560000 cmp r6, #0
pipe_free(pipe);
else
*pipep = pipe;
3000b628: 05884000 streq r4, [r8]
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
pipe_free(pipe);
3000b62c: 11a00004 movne r0, r4
3000b630: 1bffff43 blne 3000b344 <pipe_free>
else
*pipep = pipe;
}
out:
pipe_unlock();
3000b634: ebffff3e bl 3000b334 <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
3000b638: e3560000 cmp r6, #0
3000b63c: 1a000069 bne 3000b7e8 <fifo_open+0x3c0>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
3000b640: e5973014 ldr r3, [r7, #20]
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
3000b644: e5984000 ldr r4, [r8]
switch (LIBIO_ACCMODE(iop)) {
3000b648: e2033006 and r3, r3, #6
3000b64c: e3530004 cmp r3, #4
3000b650: 0a000024 beq 3000b6e8 <fifo_open+0x2c0>
3000b654: e3530006 cmp r3, #6
3000b658: 0a000047 beq 3000b77c <fifo_open+0x354>
3000b65c: e3530002 cmp r3, #2
3000b660: 1a000059 bne 3000b7cc <fifo_open+0x3a4>
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
3000b664: e5943020 ldr r3, [r4, #32]
3000b668: e2833001 add r3, r3, #1
3000b66c: e5843020 str r3, [r4, #32]
if (pipe->Readers ++ == 0)
3000b670: e5943010 ldr r3, [r4, #16]
3000b674: e2832001 add r2, r3, #1
3000b678: e3530000 cmp r3, #0
3000b67c: e5842010 str r2, [r4, #16]
PIPE_WAKEUPWRITERS(pipe);
3000b680: 05940030 ldreq r0, [r4, #48] ; 0x30
3000b684: 028d1008 addeq r1, sp, #8
3000b688: 0b00061a bleq 3000cef8 <rtems_barrier_release>
if (pipe->Writers == 0) {
3000b68c: e5943014 ldr r3, [r4, #20]
3000b690: e3530000 cmp r3, #0
3000b694: 1a00004c bne 3000b7cc <fifo_open+0x3a4>
/* Not an error */
if (LIBIO_NODELAY(iop))
3000b698: e5973014 ldr r3, [r7, #20]
3000b69c: e3130001 tst r3, #1
3000b6a0: 1a000049 bne 3000b7cc <fifo_open+0x3a4>
break;
prevCounter = pipe->writerCounter;
3000b6a4: e5945024 ldr r5, [r4, #36] ; 0x24
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
3000b6a8: e5940028 ldr r0, [r4, #40] ; 0x28
3000b6ac: ebffee96 bl 3000710c <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
3000b6b0: e3a01000 mov r1, #0
3000b6b4: e594002c ldr r0, [r4, #44] ; 0x2c
3000b6b8: eb000624 bl 3000cf50 <rtems_barrier_wait>
3000b6bc: e2501000 subs r1, r0, #0
3000b6c0: 1a000044 bne 3000b7d8 <fifo_open+0x3b0>
goto out_error;
if (! PIPE_LOCK(pipe))
3000b6c4: e5940028 ldr r0, [r4, #40] ; 0x28
3000b6c8: e1a02001 mov r2, r1
3000b6cc: ebffee48 bl 30006ff4 <rtems_semaphore_obtain>
3000b6d0: e3500000 cmp r0, #0
3000b6d4: 1a00003f bne 3000b7d8 <fifo_open+0x3b0>
goto out_error;
} while (prevCounter == pipe->writerCounter);
3000b6d8: e5943024 ldr r3, [r4, #36] ; 0x24
3000b6dc: e1550003 cmp r5, r3
3000b6e0: 0afffff0 beq 3000b6a8 <fifo_open+0x280>
3000b6e4: ea000038 b 3000b7cc <fifo_open+0x3a4>
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
3000b6e8: e5943024 ldr r3, [r4, #36] ; 0x24
3000b6ec: e2833001 add r3, r3, #1
3000b6f0: e5843024 str r3, [r4, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000b6f4: e5943014 ldr r3, [r4, #20]
3000b6f8: e2832001 add r2, r3, #1
3000b6fc: e3530000 cmp r3, #0
3000b700: e5842014 str r2, [r4, #20]
PIPE_WAKEUPREADERS(pipe);
3000b704: 0594002c ldreq r0, [r4, #44] ; 0x2c
3000b708: 028d1008 addeq r1, sp, #8
3000b70c: 0b0005f9 bleq 3000cef8 <rtems_barrier_release>
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
3000b710: e5943010 ldr r3, [r4, #16]
3000b714: e3530000 cmp r3, #0
3000b718: 1a00002b bne 3000b7cc <fifo_open+0x3a4>
3000b71c: e5973014 ldr r3, [r7, #20]
3000b720: e3130001 tst r3, #1
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
3000b724: 05945020 ldreq r5, [r4, #32]
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
3000b728: 0a000003 beq 3000b73c <fifo_open+0x314>
PIPE_UNLOCK(pipe);
3000b72c: e5940028 ldr r0, [r4, #40] ; 0x28
3000b730: ebffee75 bl 3000710c <rtems_semaphore_release>
err = -ENXIO;
3000b734: e3e06005 mvn r6, #5
goto out_error;
3000b738: ea000027 b 3000b7dc <fifo_open+0x3b4>
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
3000b73c: e5940028 ldr r0, [r4, #40] ; 0x28
3000b740: ebffee71 bl 3000710c <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
3000b744: e3a01000 mov r1, #0
3000b748: e5940030 ldr r0, [r4, #48] ; 0x30
3000b74c: eb0005ff bl 3000cf50 <rtems_barrier_wait>
3000b750: e2501000 subs r1, r0, #0
3000b754: 1a00001f bne 3000b7d8 <fifo_open+0x3b0>
goto out_error;
if (! PIPE_LOCK(pipe))
3000b758: e5940028 ldr r0, [r4, #40] ; 0x28
3000b75c: e1a02001 mov r2, r1
3000b760: ebffee23 bl 30006ff4 <rtems_semaphore_obtain>
3000b764: e3500000 cmp r0, #0
3000b768: 1a00001a bne 3000b7d8 <fifo_open+0x3b0>
goto out_error;
} while (prevCounter == pipe->readerCounter);
3000b76c: e5943020 ldr r3, [r4, #32]
3000b770: e1550003 cmp r5, r3
3000b774: 0afffff0 beq 3000b73c <fifo_open+0x314>
3000b778: ea000013 b 3000b7cc <fifo_open+0x3a4>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
3000b77c: e5943020 ldr r3, [r4, #32]
3000b780: e2833001 add r3, r3, #1
3000b784: e5843020 str r3, [r4, #32]
if (pipe->Readers ++ == 0)
3000b788: e5943010 ldr r3, [r4, #16]
3000b78c: e2832001 add r2, r3, #1
3000b790: e3530000 cmp r3, #0
3000b794: e5842010 str r2, [r4, #16]
PIPE_WAKEUPWRITERS(pipe);
3000b798: 05940030 ldreq r0, [r4, #48] ; 0x30
3000b79c: 028d1008 addeq r1, sp, #8
3000b7a0: 0b0005d4 bleq 3000cef8 <rtems_barrier_release>
pipe->writerCounter ++;
3000b7a4: e5943024 ldr r3, [r4, #36] ; 0x24
3000b7a8: e2833001 add r3, r3, #1
3000b7ac: e5843024 str r3, [r4, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000b7b0: e5943014 ldr r3, [r4, #20]
3000b7b4: e2832001 add r2, r3, #1
3000b7b8: e3530000 cmp r3, #0
3000b7bc: e5842014 str r2, [r4, #20]
PIPE_WAKEUPREADERS(pipe);
3000b7c0: 0594002c ldreq r0, [r4, #44] ; 0x2c
3000b7c4: 028d1008 addeq r1, sp, #8
3000b7c8: 0b0005ca bleq 3000cef8 <rtems_barrier_release>
break;
}
PIPE_UNLOCK(pipe);
3000b7cc: e5940028 ldr r0, [r4, #40] ; 0x28
3000b7d0: ebffee4d bl 3000710c <rtems_semaphore_release>
return 0;
3000b7d4: ea000003 b 3000b7e8 <fifo_open+0x3c0>
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
3000b7d8: e3e06003 mvn r6, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
3000b7dc: e1a00008 mov r0, r8
3000b7e0: e1a01007 mov r1, r7
3000b7e4: ebfffee3 bl 3000b378 <pipe_release>
return err;
}
3000b7e8: e1a00006 mov r0, r6
3000b7ec: e8bd85fe pop {r1, r2, r3, r4, r5, r6, r7, r8, sl, pc}
30002948 <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
30002948: e59f3104 ldr r3, [pc, #260] ; 30002a54 <fpathconf+0x10c>
long fpathconf(
int fd,
int name
)
{
3000294c: 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);
30002950: e5933000 ldr r3, [r3]
30002954: e1500003 cmp r0, r3
30002958: 2a000006 bcs 30002978 <fpathconf+0x30>
iop = rtems_libio_iop(fd);
3000295c: e59f30f4 ldr r3, [pc, #244] ; 30002a58 <fpathconf+0x110>
30002960: e3a02038 mov r2, #56 ; 0x38
30002964: e5933000 ldr r3, [r3]
30002968: e0203092 mla r0, r2, r0, r3
rtems_libio_check_is_open(iop);
3000296c: e5903014 ldr r3, [r0, #20]
30002970: e3130c01 tst r3, #256 ; 0x100
30002974: 1a000002 bne 30002984 <fpathconf+0x3c>
30002978: eb002c40 bl 3000da80 <__errno>
3000297c: e3a03009 mov r3, #9
30002980: ea000003 b 30002994 <fpathconf+0x4c>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
30002984: e3130002 tst r3, #2
30002988: 1a000004 bne 300029a0 <fpathconf+0x58>
3000298c: eb002c3b bl 3000da80 <__errno>
30002990: e3a03016 mov r3, #22
30002994: e5803000 str r3, [r0]
30002998: e3e00000 mvn r0, #0
3000299c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
300029a0: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
300029a4: e351000b cmp r1, #11
300029a8: 979ff101 ldrls pc, [pc, r1, lsl #2]
300029ac: ea000023 b 30002a40 <fpathconf+0xf8>
300029b0: 300029e0 .word 0x300029e0 <== NOT EXECUTED
300029b4: 300029e8 .word 0x300029e8 <== NOT EXECUTED
300029b8: 300029f0 .word 0x300029f0 <== NOT EXECUTED
300029bc: 300029f8 .word 0x300029f8 <== NOT EXECUTED
300029c0: 30002a00 .word 0x30002a00 <== NOT EXECUTED
300029c4: 30002a08 .word 0x30002a08 <== NOT EXECUTED
300029c8: 30002a10 .word 0x30002a10 <== NOT EXECUTED
300029cc: 30002a18 .word 0x30002a18 <== NOT EXECUTED
300029d0: 30002a20 .word 0x30002a20 <== NOT EXECUTED
300029d4: 30002a28 .word 0x30002a28 <== NOT EXECUTED
300029d8: 30002a30 .word 0x30002a30 <== NOT EXECUTED
300029dc: 30002a38 .word 0x30002a38 <== NOT EXECUTED
case _PC_LINK_MAX:
return_value = the_limits->link_max;
300029e0: e5930038 ldr r0, [r3, #56] ; 0x38
break;
300029e4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
300029e8: e593003c ldr r0, [r3, #60] ; 0x3c
break;
300029ec: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
300029f0: e5930040 ldr r0, [r3, #64] ; 0x40
break;
300029f4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX:
return_value = the_limits->name_max;
300029f8: e5930044 ldr r0, [r3, #68] ; 0x44
break;
300029fc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX:
return_value = the_limits->path_max;
30002a00: e5930048 ldr r0, [r3, #72] ; 0x48
break;
30002a04: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
30002a08: e593004c ldr r0, [r3, #76] ; 0x4c
break;
30002a0c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
30002a10: e5930054 ldr r0, [r3, #84] ; 0x54
break;
30002a14: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
30002a18: e5930058 ldr r0, [r3, #88] ; 0x58
break;
30002a1c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
30002a20: e5930064 ldr r0, [r3, #100] ; 0x64
break;
30002a24: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
30002a28: e5930050 ldr r0, [r3, #80] ; 0x50
break;
30002a2c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
30002a30: e593005c ldr r0, [r3, #92] ; 0x5c
break;
30002a34: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
30002a38: e5930060 ldr r0, [r3, #96] ; 0x60
break;
30002a3c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default:
rtems_set_errno_and_return_minus_one( EINVAL );
30002a40: eb002c0e bl 3000da80 <__errno>
30002a44: e3a03016 mov r3, #22
30002a48: e5803000 str r3, [r0]
30002a4c: e3e00000 mvn r0, #0
break;
}
return return_value;
}
30002a50: e49df004 pop {pc} ; (ldr pc, [sp], #4)
3000bea8 <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 )
3000bea8: e5903018 ldr r3, [r0, #24]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000beac: 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 )
3000beb0: e593304c ldr r3, [r3, #76] ; 0x4c
3000beb4: e3530001 cmp r3, #1
3000beb8: 1a000005 bne 3000bed4 <imfs_dir_open+0x2c>
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
3000bebc: e3a03000 mov r3, #0
3000bec0: e3a04000 mov r4, #0
3000bec4: e580300c str r3, [r0, #12]
3000bec8: e5804010 str r4, [r0, #16]
return 0;
3000becc: e3a00000 mov r0, #0
3000bed0: 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 */
3000bed4: e3e00000 mvn r0, #0 <== NOT EXECUTED
iop->offset = 0;
return 0;
}
3000bed8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30003b0c <iproc>:
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
30003b0c: e5913030 ldr r3, [r1, #48] ; 0x30
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003b10: e92d4030 push {r4, r5, lr}
if (tty->termios.c_iflag & ISTRIP)
30003b14: e3130020 tst r3, #32
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003b18: e20050ff and r5, r0, #255 ; 0xff
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
30003b1c: 1200507f andne r5, r0, #127 ; 0x7f
if (tty->termios.c_iflag & IUCLC)
30003b20: e3130c02 tst r3, #512 ; 0x200
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003b24: e1a04001 mov r4, r1
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
30003b28: 0a000007 beq 30003b4c <iproc+0x40>
c = tolower (c);
30003b2c: e59f2164 ldr r2, [pc, #356] ; 30003c98 <iproc+0x18c>
30003b30: e5922000 ldr r2, [r2]
30003b34: e0822005 add r2, r2, r5
30003b38: e5d22001 ldrb r2, [r2, #1]
30003b3c: e2022003 and r2, r2, #3
30003b40: e3520001 cmp r2, #1
30003b44: 02855020 addeq r5, r5, #32
30003b48: e20550ff and r5, r5, #255 ; 0xff
if (c == '\r') {
30003b4c: e355000d cmp r5, #13
30003b50: 1a000005 bne 30003b6c <iproc+0x60>
if (tty->termios.c_iflag & IGNCR)
30003b54: e3130080 tst r3, #128 ; 0x80
30003b58: 1a000048 bne 30003c80 <iproc+0x174>
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
30003b5c: e3130c01 tst r3, #256 ; 0x100
30003b60: 03a0500d moveq r5, #13
30003b64: 13a0500a movne r5, #10
30003b68: ea000007 b 30003b8c <iproc+0x80>
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
30003b6c: e355000a cmp r5, #10
30003b70: 1a000003 bne 30003b84 <iproc+0x78>
c = '\r';
30003b74: e3130040 tst r3, #64 ; 0x40
30003b78: 03a0500a moveq r5, #10
30003b7c: 13a0500d movne r5, #13
30003b80: ea000001 b 30003b8c <iproc+0x80>
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
30003b84: e3550000 cmp r5, #0
30003b88: 0a00002c beq 30003c40 <iproc+0x134>
30003b8c: e594303c ldr r3, [r4, #60] ; 0x3c
30003b90: e3130002 tst r3, #2
30003b94: 0a000029 beq 30003c40 <iproc+0x134>
if (c == tty->termios.c_cc[VERASE]) {
30003b98: e5d42043 ldrb r2, [r4, #67] ; 0x43
30003b9c: e1520005 cmp r2, r5
erase (tty, 0);
30003ba0: 01a00004 moveq r0, r4
30003ba4: 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]) {
30003ba8: 0a000004 beq 30003bc0 <iproc+0xb4>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
30003bac: e5d42044 ldrb r2, [r4, #68] ; 0x44
30003bb0: e1520005 cmp r2, r5
30003bb4: 1a000003 bne 30003bc8 <iproc+0xbc>
erase (tty, 1);
30003bb8: e1a00004 mov r0, r4
30003bbc: e3a01001 mov r1, #1
30003bc0: ebffff60 bl 30003948 <erase>
30003bc4: ea00002d b 30003c80 <iproc+0x174>
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
30003bc8: e5d42045 ldrb r2, [r4, #69] ; 0x45
30003bcc: e1520005 cmp r2, r5
30003bd0: 0a00002c beq 30003c88 <iproc+0x17c>
return 1;
} else if (c == '\n') {
30003bd4: e355000a cmp r5, #10
30003bd8: 1a000008 bne 30003c00 <iproc+0xf4>
if (tty->termios.c_lflag & (ECHO | ECHONL))
30003bdc: e3130048 tst r3, #72 ; 0x48
echo (c, tty);
30003be0: 11a00005 movne r0, r5
30003be4: 11a01004 movne r1, r4
30003be8: 1bffff33 blne 300038bc <echo>
tty->cbuf[tty->ccount++] = c;
30003bec: e5943020 ldr r3, [r4, #32]
30003bf0: e594201c ldr r2, [r4, #28]
30003bf4: e3a0100a mov r1, #10
30003bf8: e7c21003 strb r1, [r2, r3]
30003bfc: ea00000c b 30003c34 <iproc+0x128>
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
30003c00: e5d4204c ldrb r2, [r4, #76] ; 0x4c
30003c04: e1520005 cmp r2, r5
30003c08: 0a000002 beq 30003c18 <iproc+0x10c>
30003c0c: e5d42051 ldrb r2, [r4, #81] ; 0x51
30003c10: e1520005 cmp r2, r5
30003c14: 1a000009 bne 30003c40 <iproc+0x134>
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
30003c18: e3130008 tst r3, #8 <== NOT EXECUTED
echo (c, tty);
30003c1c: 11a00005 movne r0, r5 <== NOT EXECUTED
30003c20: 11a01004 movne r1, r4 <== NOT EXECUTED
30003c24: 1bffff24 blne 300038bc <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
30003c28: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
30003c2c: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
30003c30: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED
30003c34: e2833001 add r3, r3, #1
30003c38: e5843020 str r3, [r4, #32]
30003c3c: ea000011 b 30003c88 <iproc+0x17c>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
30003c40: e59f3054 ldr r3, [pc, #84] ; 30003c9c <iproc+0x190>
30003c44: e5942020 ldr r2, [r4, #32]
30003c48: e5933008 ldr r3, [r3, #8]
30003c4c: e2433001 sub r3, r3, #1
30003c50: e1520003 cmp r2, r3
30003c54: aa00000d bge 30003c90 <iproc+0x184>
if (tty->termios.c_lflag & ECHO)
30003c58: e594303c ldr r3, [r4, #60] ; 0x3c
30003c5c: e3130008 tst r3, #8
echo (c, tty);
30003c60: 11a00005 movne r0, r5
30003c64: 11a01004 movne r1, r4
30003c68: 1bffff13 blne 300038bc <echo>
tty->cbuf[tty->ccount++] = c;
30003c6c: e5943020 ldr r3, [r4, #32]
30003c70: e594201c ldr r2, [r4, #28]
30003c74: e7c25003 strb r5, [r2, r3]
30003c78: e2833001 add r3, r3, #1
30003c7c: 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;
30003c80: e3a00000 mov r0, #0
30003c84: 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;
30003c88: e3a00001 mov r0, #1
30003c8c: 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;
30003c90: e3a00000 mov r0, #0 <== NOT EXECUTED
}
30003c94: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
3000bc18 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000bc18: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000bc1c: e5905018 ldr r5, [r0, #24]
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000bc20: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
3000bc24: e595304c ldr r3, [r5, #76] ; 0x4c
3000bc28: e3530006 cmp r3, #6
3000bc2c: 1a00000b bne 3000bc60 <memfile_lseek+0x48>
if (iop->offset > the_jnode->info.linearfile.size)
3000bc30: e5953054 ldr r3, [r5, #84] ; 0x54
3000bc34: e5901010 ldr r1, [r0, #16]
3000bc38: e5952050 ldr r2, [r5, #80] ; 0x50
3000bc3c: e1510003 cmp r1, r3
3000bc40: ca000003 bgt 3000bc54 <memfile_lseek+0x3c>
3000bc44: 1a000014 bne 3000bc9c <memfile_lseek+0x84>
3000bc48: e590100c ldr r1, [r0, #12]
3000bc4c: e1510002 cmp r1, r2
3000bc50: 9a000011 bls 3000bc9c <memfile_lseek+0x84>
iop->offset = the_jnode->info.linearfile.size;
3000bc54: e584200c str r2, [r4, #12] <== NOT EXECUTED
3000bc58: e5843010 str r3, [r4, #16] <== NOT EXECUTED
3000bc5c: ea00000e b 3000bc9c <memfile_lseek+0x84> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
3000bc60: e1a00005 mov r0, r5
3000bc64: e284200c add r2, r4, #12
3000bc68: e8920006 ldm r2, {r1, r2}
3000bc6c: ebfffeed bl 3000b828 <IMFS_memfile_extend>
3000bc70: e3500000 cmp r0, #0
3000bc74: 0a000005 beq 3000bc90 <memfile_lseek+0x78>
rtems_set_errno_and_return_minus_one( ENOSPC );
3000bc78: eb00039f bl 3000cafc <__errno>
3000bc7c: e3a0301c mov r3, #28
3000bc80: e5803000 str r3, [r0]
3000bc84: e3e04000 mvn r4, #0
3000bc88: e3e03000 mvn r3, #0
3000bc8c: ea000004 b 3000bca4 <memfile_lseek+0x8c>
iop->size = the_jnode->info.file.size;
3000bc90: e2853050 add r3, r5, #80 ; 0x50
3000bc94: e893000c ldm r3, {r2, r3}
3000bc98: e984000c stmib r4, {r2, r3}
}
return iop->offset;
3000bc9c: e284400c add r4, r4, #12
3000bca0: e8940018 ldm r4, {r3, r4}
}
3000bca4: e1a00003 mov r0, r3
3000bca8: e1a01004 mov r1, r4
3000bcac: e8bd8030 pop {r4, r5, pc}
3000bb24 <memfile_open>:
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000bb24: e5903014 ldr r3, [r0, #20]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000bb28: 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))
3000bb2c: e3130f81 tst r3, #516 ; 0x204
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000bb30: e1a05000 mov r5, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000bb34: e5904018 ldr r4, [r0, #24]
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000bb38: 0a000015 beq 3000bb94 <memfile_open+0x70>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
3000bb3c: e594304c ldr r3, [r4, #76] ; 0x4c
3000bb40: e3530006 cmp r3, #6
3000bb44: 1a000012 bne 3000bb94 <memfile_open+0x70>
uint32_t count = the_jnode->info.linearfile.size;
3000bb48: 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;
3000bb4c: 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;
3000bb50: e3a02005 mov r2, #5 <== NOT EXECUTED
3000bb54: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED
the_jnode->info.file.size = 0;
3000bb58: e3a01000 mov r1, #0 <== NOT EXECUTED
3000bb5c: 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)
3000bb60: 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;
3000bb64: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
3000bb68: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED
3000bb6c: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
3000bb70: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
3000bb74: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
3000bb78: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED
if ((count != 0)
3000bb7c: 0a000004 beq 3000bb94 <memfile_open+0x70> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
3000bb80: e1a00004 mov r0, r4 <== NOT EXECUTED
3000bb84: e58dc000 str ip, [sp] <== NOT EXECUTED
3000bb88: ebffff6d bl 3000b944 <IMFS_memfile_write> <== NOT EXECUTED
3000bb8c: e3700001 cmn r0, #1 <== NOT EXECUTED
3000bb90: 0a000009 beq 3000bbbc <memfile_open+0x98> <== NOT EXECUTED
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
3000bb94: e5953014 ldr r3, [r5, #20]
3000bb98: e3130c02 tst r3, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
3000bb9c: 12843050 addne r3, r4, #80 ; 0x50
3000bba0: 1893000c ldmne r3, {r2, r3}
3000bba4: 1585200c strne r2, [r5, #12]
3000bba8: 15853010 strne r3, [r5, #16]
iop->size = the_jnode->info.file.size;
3000bbac: e2844050 add r4, r4, #80 ; 0x50
3000bbb0: e8940018 ldm r4, {r3, r4}
3000bbb4: e9850018 stmib r5, {r3, r4}
return 0;
3000bbb8: e3a00000 mov r0, #0
}
3000bbbc: e8bd8038 pop {r3, r4, r5, pc}
30002378 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
30002378: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
3000237c: e3530001 cmp r3, #1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
30002380: e24dd02c sub sp, sp, #44 ; 0x2c
30002384: e1a06000 mov r6, r0
30002388: e1a0b001 mov fp, r1
3000238c: e1a0a002 mov sl, r2
30002390: e58d300c str r3, [sp, #12]
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
30002394: 8a000004 bhi 300023ac <mount+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
30002398: e1a00002 mov r0, r2
3000239c: eb001d5d bl 30009918 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
300023a0: e3500000 cmp r0, #0
300023a4: e58d0014 str r0, [sp, #20]
300023a8: 1a000002 bne 300023b8 <mount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
300023ac: eb0029d2 bl 3000cafc <__errno>
300023b0: e3a03016 mov r3, #22
300023b4: ea00003b b 300024a8 <mount+0x130>
{
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;
300023b8: e25b5000 subs r5, fp, #0
300023bc: 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 : "/";
300023c0: e59f3258 ldr r3, [pc, #600] ; 30002620 <mount+0x2a8>
300023c4: e3550000 cmp r5, #0
300023c8: 11a0300b movne r3, fp
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
300023cc: e1a0000a mov r0, sl
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
300023d0: e58d3004 str r3, [sp, #4]
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
300023d4: eb002db2 bl 3000daa4 <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
300023d8: 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;
300023dc: e2809001 add r9, r0, #1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
300023e0: 01a07006 moveq r7, r6
300023e4: 0a000002 beq 300023f4 <mount+0x7c>
300023e8: e1a00006 mov r0, r6
300023ec: eb002dac bl 3000daa4 <strlen>
300023f0: e2807001 add r7, r0, #1
size_t target_size = strlen( target ) + 1;
300023f4: e59d0004 ldr r0, [sp, #4]
300023f8: eb002da9 bl 3000daa4 <strlen>
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
300023fc: e2891074 add r1, r9, #116 ; 0x74
{
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_size = strlen( target ) + 1;
30002400: e2803001 add r3, r0, #1
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
30002404: e0811007 add r1, r1, r7
{
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_size = strlen( target ) + 1;
30002408: e58d0010 str r0, [sp, #16]
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
3000240c: e0811003 add r1, r1, r3
30002410: e3a00001 mov r0, #1
{
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_size = strlen( target ) + 1;
30002414: e58d3008 str r3, [sp, #8]
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
30002418: ebfffe15 bl 30001c74 <calloc>
if ( mt_entry != NULL ) {
3000241c: e2504000 subs r4, r0, #0
30002420: 0a00001e beq 300024a0 <mount+0x128>
char *str = (char *) mt_entry + sizeof( *mt_entry );
30002424: e2848074 add r8, r4, #116 ; 0x74
memcpy( str, filesystemtype, filesystemtype_size );
30002428: e1a00008 mov r0, r8
3000242c: e1a0100a mov r1, sl
30002430: e1a02009 mov r2, r9
30002434: eb002bde bl 3000d3b4 <memcpy>
mt_entry->type = str;
30002438: e584806c str r8, [r4, #108] ; 0x6c
str += filesystemtype_size;
3000243c: e0888009 add r8, r8, r9
memcpy( str, source_or_null, source_size );
30002440: e1a00008 mov r0, r8
30002444: e1a01006 mov r1, r6
30002448: e1a02007 mov r2, r7
3000244c: eb002bd8 bl 3000d3b4 <memcpy>
mt_entry->dev = str;
30002450: e5848070 str r8, [r4, #112] ; 0x70
str += source_size;
30002454: e0888007 add r8, r8, r7
memcpy( str, target, target_size );
30002458: e99d0006 ldmib sp, {r1, r2}
3000245c: e1a00008 mov r0, r8
30002460: eb002bd3 bl 3000d3b4 <memcpy>
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
30002464: e59d300c ldr r3, [sp, #12]
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
30002468: e59fe1b4 ldr lr, [pc, #436] ; 30002624 <mount+0x2ac>
3000246c: 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;
30002470: e5843030 str r3, [r4, #48] ; 0x30
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
30002474: e8be000f ldm lr!, {r0, r1, r2, r3}
30002478: e8ac000f stmia ip!, {r0, r1, r2, r3}
3000247c: e8be000f ldm lr!, {r0, r1, r2, r3}
30002480: e8ac000f stmia ip!, {r0, r1, r2, r3}
30002484: 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 ) {
30002488: e3550000 cmp r5, #0
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
memcpy( str, target, target_size );
mt_entry->target = str;
3000248c: e5848068 str r8, [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;
30002490: e584402c str r4, [r4, #44] ; 0x2c
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
30002494: 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 ) {
30002498: 0a00002e beq 30002558 <mount+0x1e0>
3000249c: ea000003 b 300024b0 <mount+0x138>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
300024a0: eb002995 bl 3000cafc <__errno> <== NOT EXECUTED
300024a4: e3a0300c mov r3, #12 <== NOT EXECUTED
300024a8: e5803000 str r3, [r0]
300024ac: ea000058 b 30002614 <mount+0x29c>
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
300024b0: e3a03001 mov r3, #1
300024b4: e28d6018 add r6, sp, #24
300024b8: e58d3000 str r3, [sp]
300024bc: e1a0000b mov r0, fp
300024c0: e59d1010 ldr r1, [sp, #16]
300024c4: e3a02007 mov r2, #7
300024c8: e1a03006 mov r3, r6
300024cc: ebfffe17 bl 30001d30 <rtems_filesystem_evaluate_path>
300024d0: e3700001 cmn r0, #1
300024d4: 0a000048 beq 300025fc <mount+0x284>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
300024d8: e1a00006 mov r0, r6
300024dc: e59d3024 ldr r3, [sp, #36] ; 0x24
300024e0: e1a0e00f mov lr, pc
300024e4: e593f010 ldr pc, [r3, #16]
300024e8: e3500001 cmp r0, #1
300024ec: 0a000002 beq 300024fc <mount+0x184>
errno = ENOTDIR;
300024f0: eb002981 bl 3000cafc <__errno>
300024f4: e3a03014 mov r3, #20
300024f8: ea000006 b 30002518 <mount+0x1a0>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
300024fc: e59f0124 ldr r0, [pc, #292] ; 30002628 <mount+0x2b0>
30002500: e59d1018 ldr r1, [sp, #24]
30002504: ebffff85 bl 30002320 <rtems_filesystem_mount_iterate>
30002508: e3500000 cmp r0, #0
3000250c: 0a000003 beq 30002520 <mount+0x1a8>
errno = EBUSY;
30002510: eb002979 bl 3000cafc <__errno>
30002514: e3a03010 mov r3, #16
30002518: e5803000 str r3, [r0]
goto cleanup_and_bail;
3000251c: ea000037 b 30002600 <mount+0x288>
* 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;
30002520: e59d3018 ldr r3, [sp, #24]
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;
30002524: e59d2028 ldr r2, [sp, #40] ; 0x28
* 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;
30002528: e5843008 str r3, [r4, #8]
mt_entry->mt_point_node.handlers = loc.handlers;
3000252c: e59d3020 ldr r3, [sp, #32]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
30002530: 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;
30002534: e5843010 str r3, [r4, #16]
mt_entry->mt_point_node.ops = loc.ops;
30002538: e59d3024 ldr r3, [sp, #36] ; 0x24
/*
* 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 ) ) {
3000253c: 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;
30002540: 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 ) ) {
30002544: e1a0e00f mov lr, pc
30002548: e593f020 ldr pc, [r3, #32]
3000254c: e3500000 cmp r0, #0
30002550: 0a00000b beq 30002584 <mount+0x20c>
30002554: ea000029 b 30002600 <mount+0x288> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
30002558: e59f30cc ldr r3, [pc, #204] ; 3000262c <mount+0x2b4>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3000255c: e2832004 add r2, r3, #4
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
30002560: e5933000 ldr r3, [r3]
30002564: 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;
30002568: 01a06005 moveq r6, r5
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
3000256c: 0a000004 beq 30002584 <mount+0x20c>
errno = EINVAL;
30002570: eb002961 bl 3000cafc <__errno> <== NOT EXECUTED
30002574: e3a03016 mov r3, #22 <== NOT EXECUTED
30002578: 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;
3000257c: 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;
30002580: ea00001e b 30002600 <mount+0x288> <== 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 ) ) {
30002584: e1a00004 mov r0, r4
30002588: e59d1050 ldr r1, [sp, #80] ; 0x50
3000258c: e59d3014 ldr r3, [sp, #20]
30002590: e1a0e00f mov lr, pc
30002594: e12fff13 bx r3
30002598: e2507000 subs r7, r0, #0
3000259c: 0a000004 beq 300025b4 <mount+0x23c>
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
300025a0: e1a00004 mov r0, r4
300025a4: e59d3024 ldr r3, [sp, #36] ; 0x24
300025a8: e1a0e00f mov lr, pc
300025ac: e593f028 ldr pc, [r3, #40] ; 0x28
goto cleanup_and_bail;
300025b0: ea000012 b 30002600 <mount+0x288>
}
/*
* Add the mount table entry to the mount table chain
*/
rtems_libio_lock();
300025b4: ebffff4f bl 300022f8 <rtems_libio_lock>
300025b8: e59f006c ldr r0, [pc, #108] ; 3000262c <mount+0x2b4>
300025bc: e1a01004 mov r1, r4
300025c0: eb000cd7 bl 30005924 <_Chain_Append>
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
300025c4: ebffff51 bl 30002310 <rtems_libio_unlock>
if ( !has_target )
300025c8: e3550000 cmp r5, #0
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
300025cc: 11a00007 movne r0, r7
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
300025d0: 1a000010 bne 30002618 <mount+0x2a0>
rtems_filesystem_root = mt_entry->mt_fs_root;
300025d4: e59f3054 ldr r3, [pc, #84] ; 30002630 <mount+0x2b8>
300025d8: e284401c add r4, r4, #28
300025dc: e593c000 ldr ip, [r3]
300025e0: e8b4000f ldm r4!, {r0, r1, r2, r3}
300025e4: e28cc018 add ip, ip, #24
300025e8: e8ac000f stmia ip!, {r0, r1, r2, r3}
300025ec: e5943000 ldr r3, [r4]
return 0;
300025f0: 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;
300025f4: e58c3000 str r3, [ip]
300025f8: ea000006 b 30002618 <mount+0x2a0>
)
{
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;
300025fc: e3a06000 mov r6, #0 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
30002600: e1a00004 mov r0, r4
30002604: ebfffdfe bl 30001e04 <free>
if ( loc_to_free )
30002608: e3560000 cmp r6, #0
rtems_filesystem_freenode( loc_to_free );
3000260c: 11a00006 movne r0, r6
30002610: 1bfffdf6 blne 30001df0 <rtems_filesystem_freenode>
return -1;
30002614: e3e00000 mvn r0, #0
}
30002618: e28dd02c add sp, sp, #44 ; 0x2c
3000261c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
30002638 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
30002638: e92d4010 push {r4, lr}
3000263c: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
30002640: eb002a30 bl 3000cf08 <fileno>
30002644: e3500002 cmp r0, #2
30002648: 8a00000b bhi 3000267c <newlib_free_buffers+0x44>
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
3000264c: e1d430bc ldrh r3, [r4, #12]
30002650: e3130080 tst r3, #128 ; 0x80
30002654: 0a00000a beq 30002684 <newlib_free_buffers+0x4c>
free( fp->_bf._base );
30002658: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3000265c: ebfffde8 bl 30001e04 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
30002660: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED
30002664: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED
30002668: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
3000266c: e3a03000 mov r3, #0 <== NOT EXECUTED
30002670: e5843000 str r3, [r4] <== NOT EXECUTED
30002674: e5843010 str r3, [r4, #16] <== NOT EXECUTED
30002678: ea000001 b 30002684 <newlib_free_buffers+0x4c> <== NOT EXECUTED
}
break;
default:
fclose(fp);
3000267c: e1a00004 mov r0, r4 <== NOT EXECUTED
30002680: eb00296b bl 3000cc34 <fclose> <== NOT EXECUTED
}
return 0;
}
30002684: e3a00000 mov r0, #0
30002688: e8bd8010 pop {r4, pc}
3000376c <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
3000376c: e92d4011 push {r0, r4, lr}
30003770: e5cd0000 strb r0, [sp]
int i;
if (tty->termios.c_oflag & OPOST) {
30003774: e5913034 ldr r3, [r1, #52] ; 0x34
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003778: e1a04001 mov r4, r1
int i;
if (tty->termios.c_oflag & OPOST) {
3000377c: e3130001 tst r3, #1
30003780: 0a000045 beq 3000389c <oproc+0x130>
switch (c) {
30003784: e5dd2000 ldrb r2, [sp]
30003788: e2421008 sub r1, r2, #8
3000378c: e3510005 cmp r1, #5
30003790: 979ff101 ldrls pc, [pc, r1, lsl #2]
30003794: ea00002c b 3000384c <oproc+0xe0>
30003798: 30003838 .word 0x30003838 <== NOT EXECUTED
3000379c: 30003810 .word 0x30003810 <== NOT EXECUTED
300037a0: 300037b0 .word 0x300037b0 <== NOT EXECUTED
300037a4: 3000384c .word 0x3000384c <== NOT EXECUTED
300037a8: 3000384c .word 0x3000384c <== NOT EXECUTED
300037ac: 300037d8 .word 0x300037d8 <== NOT EXECUTED
case '\n':
if (tty->termios.c_oflag & ONLRET)
300037b0: e3130020 tst r3, #32
tty->column = 0;
300037b4: 13a02000 movne r2, #0
300037b8: 15842028 strne r2, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
300037bc: e3130004 tst r3, #4
300037c0: 0a000035 beq 3000389c <oproc+0x130>
rtems_termios_puts ("\r", 1, tty);
300037c4: e59f00e4 ldr r0, [pc, #228] ; 300038b0 <oproc+0x144>
300037c8: e3a01001 mov r1, #1
300037cc: e1a02004 mov r2, r4
300037d0: ebffffa5 bl 3000366c <rtems_termios_puts>
300037d4: ea00000b b 30003808 <oproc+0x9c>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
300037d8: e3130010 tst r3, #16 <== NOT EXECUTED
300037dc: 0a000002 beq 300037ec <oproc+0x80> <== NOT EXECUTED
300037e0: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED
300037e4: e3520000 cmp r2, #0 <== NOT EXECUTED
300037e8: 0a00002f beq 300038ac <oproc+0x140> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
300037ec: e2132008 ands r2, r3, #8 <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
break;
}
tty->column = 0;
300037f0: 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) {
300037f4: 0a000028 beq 3000389c <oproc+0x130> <== NOT EXECUTED
c = '\n';
300037f8: e3a0200a mov r2, #10 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
300037fc: 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';
30003800: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
30003804: 0a000024 beq 3000389c <oproc+0x130> <== NOT EXECUTED
tty->column = 0;
30003808: e3a03000 mov r3, #0
3000380c: ea000021 b 30003898 <oproc+0x12c>
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
30003810: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003814: e2033b06 and r3, r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
30003818: e2021007 and r1, r2, #7
3000381c: e2611008 rsb r1, r1, #8
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003820: e3530b06 cmp r3, #6144 ; 0x1800
30003824: e0813002 add r3, r1, r2
tty->column += i;
30003828: 05843028 streq r3, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
3000382c: 059f0080 ldreq r0, [pc, #128] ; 300038b4 <oproc+0x148>
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003830: 1a000018 bne 30003898 <oproc+0x12c>
30003834: ea00001a b 300038a4 <oproc+0x138>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
30003838: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3000383c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003840: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
30003844: ca000013 bgt 30003898 <oproc+0x12c> <== NOT EXECUTED
30003848: ea000013 b 3000389c <oproc+0x130> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
3000384c: e3130002 tst r3, #2
30003850: 0a000007 beq 30003874 <oproc+0x108>
c = toupper(c);
30003854: e59f305c ldr r3, [pc, #92] ; 300038b8 <oproc+0x14c> <== NOT EXECUTED
30003858: e5933000 ldr r3, [r3] <== NOT EXECUTED
3000385c: e0833002 add r3, r3, r2 <== NOT EXECUTED
30003860: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED
30003864: e2033003 and r3, r3, #3 <== NOT EXECUTED
30003868: e3530002 cmp r3, #2 <== NOT EXECUTED
3000386c: 02422020 subeq r2, r2, #32 <== NOT EXECUTED
30003870: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (!iscntrl(c))
30003874: e59f203c ldr r2, [pc, #60] ; 300038b8 <oproc+0x14c>
30003878: e5dd3000 ldrb r3, [sp]
3000387c: e5922000 ldr r2, [r2]
30003880: e0823003 add r3, r2, r3
30003884: e5d33001 ldrb r3, [r3, #1]
30003888: e3130020 tst r3, #32
3000388c: 1a000002 bne 3000389c <oproc+0x130>
tty->column++;
30003890: e5943028 ldr r3, [r4, #40] ; 0x28
30003894: e2833001 add r3, r3, #1
30003898: e5843028 str r3, [r4, #40] ; 0x28
break;
}
}
rtems_termios_puts (&c, 1, tty);
3000389c: e1a0000d mov r0, sp
300038a0: e3a01001 mov r1, #1
300038a4: e1a02004 mov r2, r4
300038a8: ebffff6f bl 3000366c <rtems_termios_puts>
}
300038ac: e8bd8018 pop {r3, r4, pc}
3000bb3c <pipe_ioctl>:
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
3000bb3c: e59f3058 ldr r3, [pc, #88] ; 3000bb9c <pipe_ioctl+0x60>
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
3000bb40: e92d4070 push {r4, r5, r6, lr}
if (cmd == FIONREAD) {
3000bb44: e1510003 cmp r1, r3
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
3000bb48: e1a04000 mov r4, r0
3000bb4c: e1a05002 mov r5, r2
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
3000bb50: 13e00015 mvnne r0, #21
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
3000bb54: 18bd8070 popne {r4, r5, r6, pc}
if (buffer == NULL)
3000bb58: e3520000 cmp r2, #0
return -EFAULT;
3000bb5c: 03e0000d mvneq r0, #13
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
3000bb60: 08bd8070 popeq {r4, r5, r6, pc}
return -EFAULT;
if (! PIPE_LOCK(pipe))
3000bb64: e3a01000 mov r1, #0
3000bb68: e5940028 ldr r0, [r4, #40] ; 0x28
3000bb6c: e1a02001 mov r2, r1
3000bb70: ebffed1f bl 30006ff4 <rtems_semaphore_obtain>
3000bb74: e2506000 subs r6, r0, #0
3000bb78: 1a000005 bne 3000bb94 <pipe_ioctl+0x58>
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
3000bb7c: e594300c ldr r3, [r4, #12]
PIPE_UNLOCK(pipe);
3000bb80: e5940028 ldr r0, [r4, #40] ; 0x28
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
3000bb84: e5853000 str r3, [r5]
PIPE_UNLOCK(pipe);
3000bb88: ebffed5f bl 3000710c <rtems_semaphore_release>
return 0;
3000bb8c: e1a00006 mov r0, r6
3000bb90: e8bd8070 pop {r4, r5, r6, pc}
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
if (! PIPE_LOCK(pipe))
return -EINTR;
3000bb94: e3e00003 mvn r0, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
3000bb98: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
3000b810 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000b810: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000b814: e1a09001 mov r9, r1
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000b818: e3a01000 mov r1, #0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000b81c: e1a04000 mov r4, r0
3000b820: e1a05002 mov r5, r2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000b824: e5900028 ldr r0, [r0, #40] ; 0x28
3000b828: e1a02001 mov r2, r1
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000b82c: e1a0a003 mov sl, r3
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000b830: ebffedef bl 30006ff4 <rtems_semaphore_obtain>
3000b834: e2506000 subs r6, r0, #0
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
3000b838: 01a0b00d moveq fp, sp
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000b83c: 0a000043 beq 3000b950 <pipe_read+0x140>
3000b840: ea00004e b 3000b980 <pipe_read+0x170> <== NOT EXECUTED
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
3000b844: e5947014 ldr r7, [r4, #20]
3000b848: e3570000 cmp r7, #0
3000b84c: 0a000044 beq 3000b964 <pipe_read+0x154>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
3000b850: e59a8014 ldr r8, [sl, #20]
3000b854: e2188001 ands r8, r8, #1
3000b858: 1a000040 bne 3000b960 <pipe_read+0x150>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
3000b85c: e5943018 ldr r3, [r4, #24]
PIPE_UNLOCK(pipe);
3000b860: e5940028 ldr r0, [r4, #40] ; 0x28
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
3000b864: e2833001 add r3, r3, #1
3000b868: e5843018 str r3, [r4, #24]
PIPE_UNLOCK(pipe);
3000b86c: ebffee26 bl 3000710c <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
3000b870: e1a01008 mov r1, r8
3000b874: e594002c ldr r0, [r4, #44] ; 0x2c
3000b878: eb0005b4 bl 3000cf50 <rtems_barrier_wait>
3000b87c: e3500000 cmp r0, #0
3000b880: 01a07000 moveq r7, r0
3000b884: 13e07003 mvnne r7, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000b888: e1a01008 mov r1, r8
3000b88c: e5940028 ldr r0, [r4, #40] ; 0x28
3000b890: e1a02008 mov r2, r8
3000b894: ebffedd6 bl 30006ff4 <rtems_semaphore_obtain>
3000b898: e3500000 cmp r0, #0
3000b89c: 1a000033 bne 3000b970 <pipe_read+0x160>
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
3000b8a0: e5943018 ldr r3, [r4, #24]
if (ret != 0)
3000b8a4: e3570000 cmp r7, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
3000b8a8: e2433001 sub r3, r3, #1
3000b8ac: e5843018 str r3, [r4, #24]
if (ret != 0)
3000b8b0: 1a00002b bne 3000b964 <pipe_read+0x154>
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
3000b8b4: e594300c ldr r3, [r4, #12]
3000b8b8: e3530000 cmp r3, #0
3000b8bc: 0affffe0 beq 3000b844 <pipe_read+0x34>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
3000b8c0: e0667005 rsb r7, r6, r5
3000b8c4: e1530007 cmp r3, r7
3000b8c8: 31a07003 movcc r7, r3
chunk1 = pipe->Size - pipe->Start;
3000b8cc: e5948004 ldr r8, [r4, #4]
3000b8d0: e5943008 ldr r3, [r4, #8]
3000b8d4: e5941000 ldr r1, [r4]
3000b8d8: e0638008 rsb r8, r3, r8
if (chunk > chunk1) {
3000b8dc: e1570008 cmp r7, r8
3000b8e0: 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);
3000b8e4: d0811003 addle r1, r1, r3
3000b8e8: d1a02007 movle r2, r7
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
3000b8ec: da000006 ble 3000b90c <pipe_read+0xfc>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
3000b8f0: e0811003 add r1, r1, r3
3000b8f4: e1a02008 mov r2, r8
3000b8f8: eb0010ef bl 3000fcbc <memcpy>
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
3000b8fc: e0860008 add r0, r6, r8
3000b900: e5941000 ldr r1, [r4]
3000b904: e0890000 add r0, r9, r0
3000b908: e0682007 rsb r2, r8, r7
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
3000b90c: eb0010ea bl 3000fcbc <memcpy>
pipe->Start += chunk;
3000b910: e5940008 ldr r0, [r4, #8]
pipe->Start %= pipe->Size;
3000b914: e5941004 ldr r1, [r4, #4]
3000b918: e0870000 add r0, r7, r0
3000b91c: eb003d31 bl 3001ade8 <__umodsi3>
pipe->Length -= chunk;
3000b920: e594300c ldr r3, [r4, #12]
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
3000b924: e5840008 str r0, [r4, #8]
pipe->Length -= chunk;
3000b928: e0673003 rsb r3, r7, r3
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
3000b92c: e3530000 cmp r3, #0
pipe->Start = 0;
3000b930: 05843008 streq r3, [r4, #8]
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
pipe->Length -= chunk;
3000b934: e584300c str r3, [r4, #12]
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
3000b938: e594301c ldr r3, [r4, #28]
3000b93c: e3530000 cmp r3, #0
PIPE_WAKEUPWRITERS(pipe);
3000b940: 15940030 ldrne r0, [r4, #48] ; 0x30
3000b944: 11a0100d movne r1, sp
3000b948: 1b00056a blne 3000cef8 <rtems_barrier_release>
read += chunk;
3000b94c: e0866007 add r6, r6, r7
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
3000b950: e1560005 cmp r6, r5
3000b954: 3affffd6 bcc 3000b8b4 <pipe_read+0xa4>
3000b958: e3a07000 mov r7, #0
3000b95c: ea000000 b 3000b964 <pipe_read+0x154>
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
3000b960: e3e0700a mvn r7, #10
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
3000b964: e5940028 ldr r0, [r4, #40] ; 0x28
3000b968: ebffede7 bl 3000710c <rtems_semaphore_release>
3000b96c: ea000000 b 3000b974 <pipe_read+0x164>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
3000b970: e3e07003 mvn r7, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
3000b974: e3560000 cmp r6, #0
3000b978: d1a06007 movle r6, r7
3000b97c: ea000000 b 3000b984 <pipe_read+0x174>
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
3000b980: e3e06003 mvn r6, #3 <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
3000b984: e1a00006 mov r0, r6
3000b988: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
3000b98c <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000b98c: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
3000b990: e2527000 subs r7, r2, #0
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000b994: e1a04000 mov r4, r0
3000b998: e1a0b001 mov fp, r1
3000b99c: e1a08003 mov r8, r3
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
3000b9a0: 01a05007 moveq r5, r7
)
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
3000b9a4: 0a000062 beq 3000bb34 <pipe_write+0x1a8>
return 0;
if (! PIPE_LOCK(pipe))
3000b9a8: e3a01000 mov r1, #0
3000b9ac: e5900028 ldr r0, [r0, #40] ; 0x28
3000b9b0: e1a02001 mov r2, r1
3000b9b4: ebffed8e bl 30006ff4 <rtems_semaphore_obtain>
3000b9b8: e3500000 cmp r0, #0
return -EINTR;
3000b9bc: 13e05003 mvnne r5, #3
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
3000b9c0: 1a00005b bne 3000bb34 <pipe_write+0x1a8>
return -EINTR;
if (pipe->Readers == 0) {
3000b9c4: e5945010 ldr r5, [r4, #16]
3000b9c8: e3550000 cmp r5, #0
3000b9cc: 0a00004c beq 3000bb04 <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;
3000b9d0: 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;
3000b9d4: 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;
3000b9d8: e1570009 cmp r7, r9
3000b9dc: 91a09007 movls r9, r7
3000b9e0: 83a09001 movhi r9, #1
3000b9e4: ea000040 b 3000baec <pipe_write+0x160>
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
3000b9e8: e598a014 ldr sl, [r8, #20]
3000b9ec: e21aa001 ands sl, sl, #1
3000b9f0: 1a000041 bne 3000bafc <pipe_write+0x170>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
3000b9f4: e594301c ldr r3, [r4, #28]
PIPE_UNLOCK(pipe);
3000b9f8: e5940028 ldr r0, [r4, #40] ; 0x28
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
3000b9fc: e2833001 add r3, r3, #1
3000ba00: e584301c str r3, [r4, #28]
PIPE_UNLOCK(pipe);
3000ba04: ebffedc0 bl 3000710c <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
3000ba08: e1a0100a mov r1, sl
3000ba0c: e5940030 ldr r0, [r4, #48] ; 0x30
3000ba10: eb00054e bl 3000cf50 <rtems_barrier_wait>
3000ba14: e3500000 cmp r0, #0
3000ba18: 01a06000 moveq r6, r0
3000ba1c: 13e06003 mvnne r6, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000ba20: e1a0100a mov r1, sl
3000ba24: e5940028 ldr r0, [r4, #40] ; 0x28
3000ba28: e1a0200a mov r2, sl
3000ba2c: ebffed70 bl 30006ff4 <rtems_semaphore_obtain>
3000ba30: e3500000 cmp r0, #0
3000ba34: 1a00003b bne 3000bb28 <pipe_write+0x19c>
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
3000ba38: e594301c ldr r3, [r4, #28]
if (ret != 0)
3000ba3c: e3560000 cmp r6, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
3000ba40: e2433001 sub r3, r3, #1
3000ba44: e584301c str r3, [r4, #28]
if (ret != 0)
3000ba48: 1a00002e bne 3000bb08 <pipe_write+0x17c>
goto out_locked;
if (pipe->Readers == 0) {
3000ba4c: e5943010 ldr r3, [r4, #16]
3000ba50: e3530000 cmp r3, #0
3000ba54: 0a00002a beq 3000bb04 <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) {
3000ba58: e594a004 ldr sl, [r4, #4]
3000ba5c: e594300c ldr r3, [r4, #12]
3000ba60: e063200a rsb r2, r3, sl
3000ba64: e1520009 cmp r2, r9
3000ba68: 3affffde bcc 3000b9e8 <pipe_write+0x5c>
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000ba6c: e5940008 ldr r0, [r4, #8]
3000ba70: e1a0100a mov r1, sl
3000ba74: e0830000 add r0, r3, r0
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
3000ba78: e0656007 rsb r6, r5, r7
3000ba7c: e1520006 cmp r2, r6
3000ba80: 31a06002 movcc r6, r2
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000ba84: eb003cd7 bl 3001ade8 <__umodsi3>
3000ba88: e5943000 ldr r3, [r4]
3000ba8c: e060a00a rsb sl, r0, sl
if (chunk > chunk1) {
3000ba90: e156000a cmp r6, sl
3000ba94: 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);
3000ba98: d0830000 addle r0, r3, r0
3000ba9c: d1a02006 movle r2, r6
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
if (chunk > chunk1) {
3000baa0: da000006 ble 3000bac0 <pipe_write+0x134>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
3000baa4: e1a0200a mov r2, sl
3000baa8: e0830000 add r0, r3, r0
3000baac: eb001082 bl 3000fcbc <memcpy>
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
3000bab0: e08a1005 add r1, sl, r5
3000bab4: e5940000 ldr r0, [r4]
3000bab8: e08b1001 add r1, fp, r1
3000babc: e06a2006 rsb r2, sl, r6
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
3000bac0: eb00107d bl 3000fcbc <memcpy>
pipe->Length += chunk;
3000bac4: e594300c ldr r3, [r4, #12]
3000bac8: e0833006 add r3, r3, r6
3000bacc: e584300c str r3, [r4, #12]
if (pipe->waitingReaders > 0)
3000bad0: e5943018 ldr r3, [r4, #24]
3000bad4: e3530000 cmp r3, #0
PIPE_WAKEUPREADERS(pipe);
3000bad8: 1594002c ldrne r0, [r4, #44] ; 0x2c
3000badc: 11a0100d movne r1, sp
3000bae0: 1b000504 blne 3000cef8 <rtems_barrier_release>
written += chunk;
3000bae4: e0855006 add r5, r5, r6
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
3000bae8: e3a09001 mov r9, #1
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
3000baec: e1550007 cmp r5, r7
3000baf0: 3affffd8 bcc 3000ba58 <pipe_write+0xcc>
3000baf4: e3a06000 mov r6, #0
3000baf8: ea000002 b 3000bb08 <pipe_write+0x17c>
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
3000bafc: e3e0600a mvn r6, #10
3000bb00: ea000000 b 3000bb08 <pipe_write+0x17c>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
3000bb04: e3e0601f mvn r6, #31
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
3000bb08: e5940028 ldr r0, [r4, #40] ; 0x28
3000bb0c: ebffed7e bl 3000710c <rtems_semaphore_release>
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
3000bb10: e3760020 cmn r6, #32
3000bb14: 1a000004 bne 3000bb2c <pipe_write+0x1a0>
kill(getpid(), SIGPIPE);
3000bb18: eb0001f1 bl 3000c2e4 <getpid>
3000bb1c: e3a0100d mov r1, #13
3000bb20: eb0002a4 bl 3000c5b8 <kill>
3000bb24: ea000000 b 3000bb2c <pipe_write+0x1a0>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
3000bb28: e3e06003 mvn r6, #3 <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
3000bb2c: e3550000 cmp r5, #0
3000bb30: d1a05006 movle r5, r6
return written;
return ret;
}
3000bb34: e1a00005 mov r0, r5
3000bb38: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
3000a354 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
3000a354: e3500000 cmp r0, #0
3000a358: 0a00000b beq 3000a38c <pthread_attr_setschedpolicy+0x38>
3000a35c: e5903000 ldr r3, [r0]
3000a360: e3530000 cmp r3, #0
3000a364: 0a000008 beq 3000a38c <pthread_attr_setschedpolicy+0x38>
return EINVAL;
switch ( policy ) {
3000a368: e3510004 cmp r1, #4
3000a36c: 8a000008 bhi 3000a394 <pthread_attr_setschedpolicy+0x40>
3000a370: e3a03001 mov r3, #1
3000a374: e1a03113 lsl r3, r3, r1
3000a378: e3130017 tst r3, #23
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
3000a37c: 15801014 strne r1, [r0, #20]
return 0;
3000a380: 13a00000 movne r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
3000a384: 112fff1e bxne lr
3000a388: ea000001 b 3000a394 <pthread_attr_setschedpolicy+0x40> <== NOT EXECUTED
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
3000a38c: e3a00016 mov r0, #22
3000a390: e12fff1e bx lr
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
3000a394: e3a00086 mov r0, #134 ; 0x86
}
}
3000a398: e12fff1e bx lr
3000719c <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
3000719c: e3500000 cmp r0, #0
300071a0: 0a000007 beq 300071c4 <pthread_mutexattr_setpshared+0x28>
300071a4: e5903000 ldr r3, [r0]
300071a8: e3530000 cmp r3, #0
300071ac: 0a000004 beq 300071c4 <pthread_mutexattr_setpshared+0x28>
return EINVAL;
switch ( pshared ) {
300071b0: e3510001 cmp r1, #1
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
300071b4: 95801004 strls r1, [r0, #4]
return 0;
300071b8: 93a00000 movls r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
300071bc: 912fff1e bxls lr
300071c0: ea000001 b 300071cc <pthread_mutexattr_setpshared+0x30> <== NOT EXECUTED
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
300071c4: e3a00016 mov r0, #22
300071c8: e12fff1e bx lr
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
300071cc: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
300071d0: e12fff1e bx lr <== NOT EXECUTED
30006c08 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
30006c08: e3500000 cmp r0, #0
30006c0c: 0a000007 beq 30006c30 <pthread_rwlockattr_setpshared+0x28>
return EINVAL;
if ( !attr->is_initialized )
30006c10: e5903000 ldr r3, [r0]
30006c14: e3530000 cmp r3, #0
30006c18: 0a000004 beq 30006c30 <pthread_rwlockattr_setpshared+0x28>
return EINVAL;
switch ( pshared ) {
30006c1c: e3510001 cmp r1, #1
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
30006c20: 95801004 strls r1, [r0, #4]
return 0;
30006c24: 93a00000 movls r0, #0
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
30006c28: 912fff1e bxls lr
30006c2c: ea000001 b 30006c38 <pthread_rwlockattr_setpshared+0x30> <== NOT EXECUTED
{
if ( !attr )
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
30006c30: e3a00016 mov r0, #22
30006c34: e12fff1e bx lr
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
30006c38: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
30006c3c: e12fff1e bx lr <== NOT EXECUTED
300124c8 <realloc>:
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
300124c8: e59f310c ldr r3, [pc, #268] ; 300125dc <realloc+0x114>
void *realloc(
void *ptr,
size_t size
)
{
300124cc: e92d40f1 push {r0, r4, r5, r6, r7, lr}
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
300124d0: e5932010 ldr r2, [r3, #16]
void *realloc(
void *ptr,
size_t size
)
{
300124d4: e1a04000 mov r4, r0
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
300124d8: e2822001 add r2, r2, #1
300124dc: 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())) {
300124e0: e59f30f8 ldr r3, [pc, #248] ; 300125e0 <realloc+0x118>
void *realloc(
void *ptr,
size_t size
)
{
300124e4: 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())) {
300124e8: e5933000 ldr r3, [r3]
300124ec: e3530003 cmp r3, #3
300124f0: 1a000009 bne 3001251c <realloc+0x54>
if (_Thread_Dispatch_disable_level > 0)
300124f4: e59f30e8 ldr r3, [pc, #232] ; 300125e4 <realloc+0x11c>
300124f8: e5933000 ldr r3, [r3]
300124fc: e3530000 cmp r3, #0
return (void *) 0;
30012500: 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)
30012504: 1a000032 bne 300125d4 <realloc+0x10c>
return (void *) 0;
if (_ISR_Nest_level > 0)
30012508: e59f20d8 ldr r2, [pc, #216] ; 300125e8 <realloc+0x120>
3001250c: e5922000 ldr r2, [r2]
30012510: e3520000 cmp r2, #0
return (void *) 0;
30012514: 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)
30012518: 1a00002d bne 300125d4 <realloc+0x10c>
}
/*
* Continue with realloc().
*/
if ( !ptr )
3001251c: e3540000 cmp r4, #0
30012520: 1a000003 bne 30012534 <realloc+0x6c>
return malloc( size );
30012524: e1a00005 mov r0, r5
30012528: ebffbf04 bl 30002140 <malloc>
3001252c: e1a04000 mov r4, r0
30012530: ea000027 b 300125d4 <realloc+0x10c>
if ( !size ) {
30012534: e3550000 cmp r5, #0
30012538: 1a000003 bne 3001254c <realloc+0x84>
free( ptr );
3001253c: e1a00004 mov r0, r4 <== NOT EXECUTED
30012540: ebffbe2f bl 30001e04 <free> <== NOT EXECUTED
return (void *) 0;
30012544: e1a04005 mov r4, r5 <== NOT EXECUTED
30012548: ea000021 b 300125d4 <realloc+0x10c> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
3001254c: e59f6098 ldr r6, [pc, #152] ; 300125ec <realloc+0x124>
30012550: e1a01004 mov r1, r4
30012554: e5960000 ldr r0, [r6]
30012558: e1a0200d mov r2, sp
3001255c: eb00004e bl 3001269c <_Protected_heap_Get_block_size>
30012560: e2507000 subs r7, r0, #0
30012564: 1a000004 bne 3001257c <realloc+0xb4>
errno = EINVAL;
30012568: ebffe963 bl 3000cafc <__errno>
3001256c: e3a03016 mov r3, #22
30012570: e5803000 str r3, [r0]
return (void *) 0;
30012574: e1a04007 mov r4, r7
30012578: ea000015 b 300125d4 <realloc+0x10c>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
3001257c: e5960000 ldr r0, [r6]
30012580: e1a01004 mov r1, r4
30012584: e1a02005 mov r2, r5
30012588: eb000054 bl 300126e0 <_Protected_heap_Resize_block>
3001258c: e3500000 cmp r0, #0
30012590: 1a00000f bne 300125d4 <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 );
30012594: e1a00005 mov r0, r5
30012598: ebffbee8 bl 30002140 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
3001259c: e59f3038 ldr r3, [pc, #56] ; 300125dc <realloc+0x114>
if ( !new_area ) {
300125a0: e2506000 subs r6, r0, #0
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
300125a4: e5932004 ldr r2, [r3, #4]
300125a8: e2422001 sub r2, r2, #1
300125ac: e5832004 str r2, [r3, #4]
if ( !new_area ) {
300125b0: 0a000006 beq 300125d0 <realloc+0x108>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
300125b4: e59d2000 ldr r2, [sp]
300125b8: e1a01004 mov r1, r4
300125bc: e1550002 cmp r5, r2
300125c0: 31a02005 movcc r2, r5
300125c4: ebffeb7a bl 3000d3b4 <memcpy>
free( ptr );
300125c8: e1a00004 mov r0, r4
300125cc: ebffbe0c bl 30001e04 <free>
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
300125d0: e1a04006 mov r4, r6
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
300125d4: e1a00004 mov r0, r4
300125d8: e8bd80f8 pop {r3, 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: 0a000055 beq 300025bc <rtems_cpu_usage_report_with_plugin+0x16c>
* 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: eb00147a bl 30007660 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
30002474: e1a01005 mov r1, r5
30002478: e59f0144 ldr r0, [pc, #324] ; 300025c4 <rtems_cpu_usage_report_with_plugin+0x174>
3000247c: e1a02004 mov r2, r4
30002480: eb001d59 bl 300099ec <_Timespec_Subtract>
}
}
}
#endif
(*print)(
30002484: e1a00008 mov r0, r8
30002488: e59f1138 ldr r1, [pc, #312] ; 300025c8 <rtems_cpu_usage_report_with_plugin+0x178>
3000248c: e1a0e00f mov lr, pc
30002490: e12fff1a bx sl
30002494: e59f5130 ldr r5, [pc, #304] ; 300025cc <rtems_cpu_usage_report_with_plugin+0x17c>
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
#if defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
3000249c: e5b53004 ldr r3, [r5, #4]!
300024a0: e5936004 ldr r6, [r3, #4]
if ( information ) {
300024a4: e3560000 cmp r6, #0
300024a8: 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(
300024ac: 128d9018 addne r9, sp, #24
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
300024b0: 1a000032 bne 30002580 <rtems_cpu_usage_report_with_plugin+0x130>
300024b4: ea000034 b 3000258c <rtems_cpu_usage_report_with_plugin+0x13c><== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
300024b8: e596301c ldr r3, [r6, #28]
300024bc: e7934107 ldr r4, [r3, r7, lsl #2]
if ( !the_thread )
300024c0: e3540000 cmp r4, #0
300024c4: 0a00002c beq 3000257c <rtems_cpu_usage_report_with_plugin+0x12c>
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
300024c8: e3a0100d mov r1, #13
300024cc: e1a0200b mov r2, fp
300024d0: e5940008 ldr r0, [r4, #8]
300024d4: eb000fc5 bl 300063f0 <rtems_object_get_name>
(*print)(
300024d8: e5942008 ldr r2, [r4, #8]
300024dc: e1a0300b mov r3, fp
300024e0: e1a00008 mov r0, r8
300024e4: e59f10e4 ldr r1, [pc, #228] ; 300025d0 <rtems_cpu_usage_report_with_plugin+0x180>
300024e8: e1a0e00f mov lr, pc
300024ec: 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;
300024f0: e2843084 add r3, r4, #132 ; 0x84
300024f4: e893000c ldm r3, {r2, r3}
300024f8: e58d2020 str r2, [sp, #32]
300024fc: e58d3024 str r3, [sp, #36] ; 0x24
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
30002500: e59f20cc ldr r2, [pc, #204] ; 300025d4 <rtems_cpu_usage_report_with_plugin+0x184>
30002504: e5923004 ldr r3, [r2, #4]
30002508: e5932008 ldr r2, [r3, #8]
3000250c: e5943008 ldr r3, [r4, #8]
30002510: e1520003 cmp r2, r3
30002514: 1a000006 bne 30002534 <rtems_cpu_usage_report_with_plugin+0xe4>
Timestamp_Control used;
_Timestamp_Subtract(
30002518: e59f00b8 ldr r0, [pc, #184] ; 300025d8 <rtems_cpu_usage_report_with_plugin+0x188>
3000251c: e28d1030 add r1, sp, #48 ; 0x30
30002520: e1a02009 mov r2, r9
30002524: eb001d30 bl 300099ec <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
30002528: e28d0020 add r0, sp, #32
3000252c: e1a01009 mov r1, r9
30002530: eb001cf2 bl 30009900 <_Timespec_Add_to>
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
30002534: e28d203c add r2, sp, #60 ; 0x3c
30002538: e28d3038 add r3, sp, #56 ; 0x38
3000253c: e28d0020 add r0, sp, #32
30002540: e28d1028 add r1, sp, #40 ; 0x28
30002544: eb001d05 bl 30009960 <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
30002548: e3a01ffa mov r1, #1000 ; 0x3e8
3000254c: e59d0024 ldr r0, [sp, #36] ; 0x24
30002550: eb0054f8 bl 30017938 <__aeabi_uidiv>
30002554: e59d203c ldr r2, [sp, #60] ; 0x3c
30002558: e1a03000 mov r3, r0
3000255c: e58d2000 str r2, [sp]
30002560: e59d2038 ldr r2, [sp, #56] ; 0x38
30002564: e1a00008 mov r0, r8
30002568: e58d2004 str r2, [sp, #4]
3000256c: e59f1068 ldr r1, [pc, #104] ; 300025dc <rtems_cpu_usage_report_with_plugin+0x18c>
30002570: e59d2020 ldr r2, [sp, #32]
30002574: e1a0e00f mov lr, pc
30002578: e12fff1a bx sl
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
3000257c: e2877001 add r7, r7, #1
30002580: e1d631b0 ldrh r3, [r6, #16]
30002584: e1570003 cmp r7, r3
30002588: 9affffca bls 300024b8 <rtems_cpu_usage_report_with_plugin+0x68>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
3000258c: e59f304c ldr r3, [pc, #76] ; 300025e0 <rtems_cpu_usage_report_with_plugin+0x190>
30002590: e1550003 cmp r5, r3
30002594: 1affffc0 bne 3000249c <rtems_cpu_usage_report_with_plugin+0x4c>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
30002598: e3a01ffa mov r1, #1000 ; 0x3e8
3000259c: e59d002c ldr r0, [sp, #44] ; 0x2c
300025a0: eb0054e4 bl 30017938 <__aeabi_uidiv>
300025a4: e59f1038 ldr r1, [pc, #56] ; 300025e4 <rtems_cpu_usage_report_with_plugin+0x194>
300025a8: e1a03000 mov r3, r0
300025ac: e59d2028 ldr r2, [sp, #40] ; 0x28
300025b0: e1a00008 mov r0, r8
300025b4: e1a0e00f mov lr, pc
300025b8: e12fff1a bx sl
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
300025bc: e28dd040 add sp, sp, #64 ; 0x40
300025c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
30001b64 <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 )
{
30001b64: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001b68: e59f60e0 ldr r6, [pc, #224] ; 30001c50 <rtems_filesystem_initialize+0xec>
30001b6c: e3a02012 mov r2, #18
30001b70: 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 )
{
30001b74: e24dd018 sub sp, sp, #24
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001b78: e583202c str r2, [r3, #44] ; 0x2c
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001b7c: e59f30d0 ldr r3, [pc, #208] ; 30001c54 <rtems_filesystem_initialize+0xf0>
30001b80: e5933000 ldr r3, [r3]
30001b84: e3530000 cmp r3, #0
rtems_fatal_error_occurred( 0xABCD0001 );
30001b88: 059f00c8 ldreq r0, [pc, #200] ; 30001c58 <rtems_filesystem_initialize+0xf4>
rtems_filesystem_umask = 022;
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001b8c: 0a00000a beq 30001bbc <rtems_filesystem_initialize+0x58>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
30001b90: e59f30c4 ldr r3, [pc, #196] ; 30001c5c <rtems_filesystem_initialize+0xf8>
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
30001b94: e3a05000 mov r5, #0
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
30001b98: e5933000 ldr r3, [r3]
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
30001b9c: e58d5000 str r5, [sp]
30001ba0: e5930008 ldr r0, [r3, #8]
30001ba4: e593100c ldr r1, [r3, #12]
30001ba8: e893000c ldm r3, {r2, r3}
30001bac: eb0001f1 bl 30002378 <mount>
if ( status == -1 )
30001bb0: e3700001 cmn r0, #1
30001bb4: 1a000001 bne 30001bc0 <rtems_filesystem_initialize+0x5c>
rtems_fatal_error_occurred( 0xABCD0002 );
30001bb8: e59f00a0 ldr r0, [pc, #160] ; 30001c60 <rtems_filesystem_initialize+0xfc><== NOT EXECUTED
30001bbc: eb000e9b bl 30005630 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_filesystem_link_counts = 0;
30001bc0: e5963000 ldr r3, [r6]
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001bc4: 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;
30001bc8: 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);
30001bcc: e3a01001 mov r1, #1
30001bd0: e1a03004 mov r3, r4
30001bd4: e1a02005 mov r2, r5
30001bd8: e59f0084 ldr r0, [pc, #132] ; 30001c64 <rtems_filesystem_initialize+0x100>
30001bdc: e58d5000 str r5, [sp]
30001be0: eb000052 bl 30001d30 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
30001be4: e596c000 ldr ip, [r6]
30001be8: e1a07004 mov r7, r4
30001bec: e28cc018 add ip, ip, #24
30001bf0: e8b7000f ldm r7!, {r0, r1, r2, r3}
30001bf4: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001bf8: e5973000 ldr r3, [r7]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001bfc: 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;
30001c00: e58c3000 str r3, [ip]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001c04: e1a02005 mov r2, r5
30001c08: e1a03004 mov r3, r4
30001c0c: e59f0050 ldr r0, [pc, #80] ; 30001c64 <rtems_filesystem_initialize+0x100>
30001c10: e58d5000 str r5, [sp]
30001c14: eb000045 bl 30001d30 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
30001c18: e8b4000f ldm r4!, {r0, r1, r2, r3}
30001c1c: e596c000 ldr ip, [r6]
30001c20: e28cc004 add ip, ip, #4
30001c24: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001c28: 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);
30001c2c: e59f0034 ldr r0, [pc, #52] ; 30001c68 <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;
30001c30: 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);
30001c34: e59f1030 ldr r1, [pc, #48] ; 30001c6c <rtems_filesystem_initialize+0x108>
30001c38: eb00017c bl 30002230 <mkdir>
if ( status != 0 )
30001c3c: e3500000 cmp r0, #0
rtems_fatal_error_occurred( 0xABCD0003 );
30001c40: 159f0028 ldrne r0, [pc, #40] ; 30001c70 <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 )
30001c44: 1affffdc bne 30001bbc <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.
*/
}
30001c48: e28dd018 add sp, sp, #24
30001c4c: e8bd80f0 pop {r4, r5, r6, r7, pc}
30009628 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
30009628: e2003006 and r3, r0, #6
3000962c: e3530006 cmp r3, #6
fcntl_flags |= O_RDWR;
30009630: 03a03002 moveq r3, #2
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
30009634: 0a000005 beq 30009650 <rtems_libio_to_fcntl_flags+0x28>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
30009638: e3100002 tst r0, #2
fcntl_flags |= O_RDONLY;
3000963c: 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) {
30009640: 1a000002 bne 30009650 <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;
30009644: e3100004 tst r0, #4 <== NOT EXECUTED
30009648: 03a03000 moveq r3, #0 <== NOT EXECUTED
3000964c: 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 ) {
30009650: e3100001 tst r0, #1
fcntl_flags |= O_NONBLOCK;
30009654: 13833901 orrne r3, r3, #16384 ; 0x4000
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
30009658: e3100c02 tst r0, #512 ; 0x200
fcntl_flags |= O_APPEND;
3000965c: 13833008 orrne r3, r3, #8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
30009660: e3100b01 tst r0, #1024 ; 0x400
fcntl_flags |= O_CREAT;
30009664: 13833c02 orrne r3, r3, #512 ; 0x200
}
return fcntl_flags;
}
30009668: e1a00003 mov r0, r3
3000966c: e12fff1e bx lr
30001c74 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
30001c74: e92d4810 push {r4, fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
30001c78: e59f3078 ldr r3, [pc, #120] ; 30001cf8 <rtems_stack_checker_is_blown+0x84>
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
30001c7c: e28db008 add fp, sp, #8
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
30001c80: e5933004 ldr r3, [r3, #4]
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30001c84: e59300c8 ldr r0, [r3, #200] ; 0xc8
30001c88: e15b0000 cmp fp, r0
return false;
30001c8c: 33a04000 movcc r4, #0
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30001c90: 3a000004 bcc 30001ca8 <rtems_stack_checker_is_blown+0x34>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
30001c94: e59340c4 ldr r4, [r3, #196] ; 0xc4
30001c98: e0804004 add r4, r0, r4
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
30001c9c: e15b0004 cmp fp, r4
30001ca0: 83a04000 movhi r4, #0
30001ca4: 93a04001 movls r4, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
30001ca8: e59f304c ldr r3, [pc, #76] ; 30001cfc <rtems_stack_checker_is_blown+0x88>
30001cac: e5933008 ldr r3, [r3, #8]
30001cb0: e3530000 cmp r3, #0
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
30001cb4: 03a01001 moveq r1, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
30001cb8: 0a000005 beq 30001cd4 <rtems_stack_checker_is_blown+0x60>
pattern_ok = (!memcmp(
30001cbc: e59f103c ldr r1, [pc, #60] ; 30001d00 <rtems_stack_checker_is_blown+0x8c>
30001cc0: e2800008 add r0, r0, #8
30001cc4: e3a02010 mov r2, #16
30001cc8: eb003718 bl 3000f930 <memcmp>
30001ccc: e2701001 rsbs r1, r0, #1
30001cd0: 33a01000 movcc r1, #0
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
30001cd4: e3540000 cmp r4, #0
30001cd8: 0a000001 beq 30001ce4 <rtems_stack_checker_is_blown+0x70>
30001cdc: e3510000 cmp r1, #0
30001ce0: 1a000002 bne 30001cf0 <rtems_stack_checker_is_blown+0x7c>
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
30001ce4: e59f300c ldr r3, [pc, #12] ; 30001cf8 <rtems_stack_checker_is_blown+0x84><== NOT EXECUTED
30001ce8: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
30001cec: ebffff9d bl 30001b68 <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
30001cf0: e3a00000 mov r0, #0
30001cf4: e8bd8810 pop {r4, fp, pc}
30001d64 <rtems_stack_checker_report_usage>:
}
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
30001d64: e59f1004 ldr r1, [pc, #4] ; 30001d70 <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED
30001d68: e3a00000 mov r0, #0 <== NOT EXECUTED
30001d6c: eaffffe4 b 30001d04 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
30001d04 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
30001d04: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
if ( !print )
30001d08: e2515000 subs r5, r1, #0 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
30001d0c: e1a06000 mov r6, r0 <== NOT EXECUTED
if ( !print )
30001d10: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return;
print_context = context;
30001d14: e59f4038 ldr r4, [pc, #56] ; 30001d54 <rtems_stack_checker_report_usage_with_plugin+0x50><== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
30001d18: e59f1038 ldr r1, [pc, #56] ; 30001d58 <rtems_stack_checker_report_usage_with_plugin+0x54><== NOT EXECUTED
)
{
if ( !print )
return;
print_context = context;
30001d1c: e5840004 str r0, [r4, #4] <== NOT EXECUTED
print_handler = print;
30001d20: e5845000 str r5, [r4] <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
30001d24: e1a0e00f mov lr, pc <== NOT EXECUTED
30001d28: e12fff15 bx r5 <== NOT EXECUTED
(*print)( context,
30001d2c: e59f1028 ldr r1, [pc, #40] ; 30001d5c <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED
30001d30: e1a00006 mov r0, r6 <== NOT EXECUTED
30001d34: e1a0e00f mov lr, pc <== NOT EXECUTED
30001d38: 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 );
30001d3c: e59f001c ldr r0, [pc, #28] ; 30001d60 <rtems_stack_checker_report_usage_with_plugin+0x5c><== NOT EXECUTED
30001d40: eb0019bf bl 30008444 <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;
30001d44: e3a03000 mov r3, #0 <== NOT EXECUTED
30001d48: e5843004 str r3, [r4, #4] <== NOT EXECUTED
print_handler = NULL;
30001d4c: e5843000 str r3, [r4] <== NOT EXECUTED
30001d50: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
30001c10 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
30001c10: 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;
30001c14: e59030c8 ldr r3, [r0, #200] ; 0xc8
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
30001c18: e28db00c add fp, sp, #12
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30001c1c: e15b0003 cmp fp, r3
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
30001c20: e1a04000 mov r4, r0
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
30001c24: 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;
30001c28: e2830008 add r0, r3, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30001c2c: 3a000004 bcc 30001c44 <rtems_stack_checker_switch_extension+0x34>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
30001c30: e59450c4 ldr r5, [r4, #196] ; 0xc4
30001c34: e0835005 add r5, r3, r5
}
/*
* rtems_stack_checker_switch_extension
*/
void rtems_stack_checker_switch_extension(
30001c38: e15b0005 cmp fp, r5
30001c3c: 83a05000 movhi r5, #0
30001c40: 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,
30001c44: e59f1024 ldr r1, [pc, #36] ; 30001c70 <rtems_stack_checker_switch_extension+0x60>
30001c48: e3a02010 mov r2, #16
30001c4c: eb003737 bl 3000f930 <memcmp>
30001c50: e2701001 rsbs r1, r0, #1
30001c54: 33a01000 movcc r1, #0
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
30001c58: e3550000 cmp r5, #0
30001c5c: 0a000001 beq 30001c68 <rtems_stack_checker_switch_extension+0x58>
30001c60: e3510000 cmp r1, #0
30001c64: 18bd8830 popne {r4, r5, fp, pc}
Stack_check_report_blown_task( running, pattern_ok );
30001c68: e1a00004 mov r0, r4 <== NOT EXECUTED
30001c6c: ebffffbd bl 30001b68 <Stack_check_report_blown_task> <== NOT EXECUTED
3000b5a0 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
3000b5a0: e92d40f1 push {r0, r4, r5, r6, r7, lr}
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
3000b5a4: e2514000 subs r4, r1, #0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
3000b5a8: e1a05000 mov r5, r0
3000b5ac: e1a06002 mov r6, r2
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
3000b5b0: 03a00009 moveq r0, #9
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
3000b5b4: 0a000018 beq 3000b61c <rtems_string_to_pointer+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
3000b5b8: eb000ac6 bl 3000e0d8 <__errno>
3000b5bc: e3a03000 mov r3, #0
3000b5c0: 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 );
3000b5c4: e1a0100d mov r1, sp
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
3000b5c8: 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 );
3000b5cc: e1a00005 mov r0, r5
3000b5d0: e3a02010 mov r2, #16
3000b5d4: eb0017ee bl 30011594 <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 )
3000b5d8: e3560000 cmp r6, #0
*endptr = end;
3000b5dc: 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 );
3000b5e0: 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;
3000b5e4: 15863000 strne r3, [r6]
/* nothing was converted */
if ( end == s )
3000b5e8: e59d3000 ldr r3, [sp]
3000b5ec: e1530005 cmp r3, r5
return RTEMS_NOT_DEFINED;
3000b5f0: 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 )
3000b5f4: 0a000008 beq 3000b61c <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))
3000b5f8: e3770001 cmn r7, #1
3000b5fc: 1a000004 bne 3000b614 <rtems_string_to_pointer+0x74>
3000b600: eb000ab4 bl 3000e0d8 <__errno> <== NOT EXECUTED
3000b604: e5903000 ldr r3, [r0] <== NOT EXECUTED
3000b608: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
3000b60c: 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))
3000b610: 0a000001 beq 3000b61c <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;
3000b614: e5847000 str r7, [r4]
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
3000b618: e3a00000 mov r0, #0
}
3000b61c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
30001bc8 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
30001bc8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30001bcc: e24ddf6b sub sp, sp, #428 ; 0x1ac
30001bd0: e58d1010 str r1, [sp, #16]
30001bd4: e58d2018 str r2, [sp, #24]
30001bd8: e58d000c str r0, [sp, #12]
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
30001bdc: eb003f84 bl 300119f4 <strlen>
30001be0: e3a02000 mov r2, #0
30001be4: e1a01000 mov r1, r0
30001be8: e28d3f65 add r3, sp, #404 ; 0x194
30001bec: e59d000c ldr r0, [sp, #12]
30001bf0: e58d2000 str r2, [sp]
30001bf4: eb00029b bl 30002668 <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
30001bf8: e2504000 subs r4, r0, #0
30001bfc: 1a00006c bne 30001db4 <rtems_tarfs_load+0x1ec>
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
30001c00: e59d31a0 ldr r3, [sp, #416] ; 0x1a0
30001c04: e59f21c0 ldr r2, [pc, #448] ; 30001dcc <rtems_tarfs_load+0x204>
30001c08: e1530002 cmp r3, r2
30001c0c: 0a000005 beq 30001c28 <rtems_tarfs_load+0x60>
30001c10: e59f21b8 ldr r2, [pc, #440] ; 30001dd0 <rtems_tarfs_load+0x208>
30001c14: e1530002 cmp r3, r2
30001c18: 1a000065 bne 30001db4 <rtems_tarfs_load+0x1ec>
30001c1c: ea000001 b 30001c28 <rtems_tarfs_load+0x60> <== NOT EXECUTED
30001c20: e1a08004 mov r8, r4
30001c24: ea000006 b 30001c44 <rtems_tarfs_load+0x7c>
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001c28: e28d2f65 add r2, sp, #404 ; 0x194
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
30001c2c: e1a08004 mov r8, r4
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
30001c30: e28d7f47 add r7, sp, #284 ; 0x11c
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001c34: e28d9d06 add r9, sp, #384 ; 0x180
30001c38: 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);
30001c3c: e28d501c add r5, sp, #28
30001c40: e1a0a004 mov sl, r4
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
30001c44: e59d3018 ldr r3, [sp, #24]
30001c48: e2884c02 add r4, r8, #512 ; 0x200
30001c4c: e1540003 cmp r4, r3
30001c50: 8a000059 bhi 30001dbc <rtems_tarfs_load+0x1f4>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
30001c54: e59de010 ldr lr, [sp, #16]
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
30001c58: e59f1174 ldr r1, [pc, #372] ; 30001dd4 <rtems_tarfs_load+0x20c>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
30001c5c: e08e8008 add r8, lr, r8
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
30001c60: e2880c01 add r0, r8, #256 ; 0x100
30001c64: e2800001 add r0, r0, #1
30001c68: e3a02005 mov r2, #5
30001c6c: eb003f78 bl 30011a54 <strncmp>
30001c70: e2506000 subs r6, r0, #0
30001c74: 1a000050 bne 30001dbc <rtems_tarfs_load+0x1f4>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
30001c78: e3a02063 mov r2, #99 ; 0x63
30001c7c: e1a01008 mov r1, r8
30001c80: e1a00007 mov r0, r7
30001c84: eb003fce bl 30011bc4 <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
30001c88: e5cd617f strb r6, [sp, #383] ; 0x17f
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
30001c8c: e3a01008 mov r1, #8
30001c90: 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];
30001c94: e5d8609c ldrb r6, [r8, #156] ; 0x9c
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
30001c98: eb001dc2 bl 300093a8 <_rtems_octal2ulong>
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
30001c9c: 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);
30001ca0: e58d0014 str r0, [sp, #20]
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
30001ca4: e288007c add r0, r8, #124 ; 0x7c
30001ca8: eb001dbe bl 300093a8 <_rtems_octal2ulong>
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
30001cac: 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);
30001cb0: e1a0b000 mov fp, r0
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
30001cb4: e2880094 add r0, r8, #148 ; 0x94
30001cb8: eb001dba bl 300093a8 <_rtems_octal2ulong>
30001cbc: e1a03000 mov r3, r0
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
30001cc0: e1a00008 mov r0, r8
30001cc4: e58d3008 str r3, [sp, #8]
30001cc8: eb001dc4 bl 300093e0 <_rtems_tar_header_checksum>
30001ccc: e59d3008 ldr r3, [sp, #8]
30001cd0: e1500003 cmp r0, r3
30001cd4: 1a000038 bne 30001dbc <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) {
30001cd8: e3560035 cmp r6, #53 ; 0x35
30001cdc: 1a000012 bne 30001d2c <rtems_tarfs_load+0x164>
strcpy(full_filename, mountpoint);
30001ce0: e59d100c ldr r1, [sp, #12]
30001ce4: e1a00005 mov r0, r5
30001ce8: eb003d7d bl 300112e4 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
30001cec: e1a00005 mov r0, r5
30001cf0: eb003f3f bl 300119f4 <strlen>
30001cf4: e28d2f6b add r2, sp, #428 ; 0x1ac
30001cf8: e0820000 add r0, r2, r0
30001cfc: e5503191 ldrb r3, [r0, #-401] ; 0x191
30001d00: e353002f cmp r3, #47 ; 0x2f
strcat(full_filename, "/");
30001d04: 11a00005 movne r0, r5
30001d08: 159f10c8 ldrne r1, [pc, #200] ; 30001dd8 <rtems_tarfs_load+0x210>
30001d0c: 1b003cbd blne 30011008 <strcat>
strcat(full_filename, filename);
30001d10: e1a01007 mov r1, r7
30001d14: e1a00005 mov r0, r5
30001d18: eb003cba bl 30011008 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
30001d1c: e1a00005 mov r0, r5
30001d20: e59f10b4 ldr r1, [pc, #180] ; 30001ddc <rtems_tarfs_load+0x214>
30001d24: eb000464 bl 30002ebc <mkdir>
30001d28: eaffffbc b 30001c20 <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) {
30001d2c: e3560030 cmp r6, #48 ; 0x30
30001d30: 1affffba bne 30001c20 <rtems_tarfs_load+0x58>
const char *name;
loc = root_loc;
30001d34: e59dc004 ldr ip, [sp, #4]
30001d38: e1a0e009 mov lr, r9
30001d3c: e8bc000f ldm ip!, {r0, r1, r2, r3}
30001d40: e8ae000f stmia lr!, {r0, r1, r2, r3}
30001d44: e59c2000 ldr r2, [ip]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
30001d48: e1a00007 mov r0, r7
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001d4c: e58e2000 str r2, [lr]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
30001d50: e1a01009 mov r1, r9
30001d54: e28d2f6a add r2, sp, #424 ; 0x1a8
30001d58: eb002086 bl 30009f78 <IMFS_evaluate_for_make>
30001d5c: e2506000 subs r6, r0, #0
30001d60: 1a00000d bne 30001d9c <rtems_tarfs_load+0x1d4>
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
30001d64: 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(
30001d68: e1a00009 mov r0, r9
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
30001d6c: e1a03b82 lsl r3, r2, #23
30001d70: 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(
30001d74: e59d21a8 ldr r2, [sp, #424] ; 0x1a8
30001d78: e3833902 orr r3, r3, #32768 ; 0x8000
30001d7c: e3a01006 mov r1, #6
30001d80: e58d6000 str r6, [sp]
30001d84: eb001eef bl 30009948 <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];
30001d88: 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;
30001d8c: e580b050 str fp, [r0, #80] ; 0x50
node->info.linearfile.direct = &tar_image[offset];
30001d90: 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;
30001d94: e5806054 str r6, [r0, #84] ; 0x54
node->info.linearfile.direct = &tar_image[offset];
30001d98: e5803058 str r3, [r0, #88] ; 0x58
}
nblocks = (((file_size) + 511) & ~511) / 512;
30001d9c: e28bbf7f add fp, fp, #508 ; 0x1fc
30001da0: e28bb003 add fp, fp, #3
offset += 512 * nblocks;
30001da4: e3cbbf7f bic fp, fp, #508 ; 0x1fc
30001da8: e3cbb003 bic fp, fp, #3
30001dac: e08b4004 add r4, fp, r4
30001db0: eaffff9a b 30001c20 <rtems_tarfs_load+0x58>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
return -1;
30001db4: e3e04000 mvn r4, #0
30001db8: ea000000 b 30001dc0 <rtems_tarfs_load+0x1f8>
30001dbc: e1a0400a mov r4, sl
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
30001dc0: e1a00004 mov r0, r4
30001dc4: e28ddf6b add sp, sp, #428 ; 0x1ac
30001dc8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
3000c620 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
3000c620: 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 )
3000c624: e252a000 subs sl, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
3000c628: e1a04000 mov r4, r0
3000c62c: 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;
3000c630: 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 )
3000c634: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
3000c638: e59f313c ldr r3, [pc, #316] ; 3000c77c <rtems_task_mode+0x15c>
3000c63c: 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;
3000c640: e5d78074 ldrb r8, [r7, #116] ; 0x74
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
3000c644: e5976104 ldr r6, [r7, #260] ; 0x104
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
3000c648: 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;
3000c64c: 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;
3000c650: 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;
3000c654: 03a08c01 moveq r8, #256 ; 0x100
3000c658: 13a08000 movne r8, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
3000c65c: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
3000c660: 13888c02 orrne r8, r8, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
3000c664: e3590000 cmp r9, #0
3000c668: 03a09b01 moveq r9, #1024 ; 0x400
3000c66c: 13a09000 movne r9, #0
old_mode |= _ISR_Get_level();
3000c670: ebffeff8 bl 30008658 <_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;
3000c674: e1899000 orr r9, r9, r0
old_mode |= _ISR_Get_level();
3000c678: e1898008 orr r8, r9, r8
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
3000c67c: 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;
3000c680: e58a8000 str r8, [sl]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
3000c684: 0a000003 beq 3000c698 <rtems_task_mode+0x78>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
3000c688: e3140c01 tst r4, #256 ; 0x100
3000c68c: 13a03000 movne r3, #0
3000c690: 03a03001 moveq r3, #1
3000c694: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
3000c698: e3150c02 tst r5, #512 ; 0x200
3000c69c: 0a000006 beq 3000c6bc <rtems_task_mode+0x9c>
if ( _Modes_Is_timeslice(mode_set) ) {
3000c6a0: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
3000c6a4: 13a03001 movne r3, #1
3000c6a8: 1587307c strne r3, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
3000c6ac: 159f30cc ldrne r3, [pc, #204] ; 3000c780 <rtems_task_mode+0x160>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
3000c6b0: 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;
3000c6b4: 15933000 ldrne r3, [r3]
3000c6b8: 15873078 strne r3, [r7, #120] ; 0x78
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
3000c6bc: e3150080 tst r5, #128 ; 0x80
3000c6c0: 0a000001 beq 3000c6cc <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 ) );
3000c6c4: e2040080 and r0, r4, #128 ; 0x80
3000c6c8: ebffefdd bl 30008644 <_CPU_ISR_Set_level>
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
3000c6cc: e2150b01 ands r0, r5, #1024 ; 0x400
3000c6d0: 0a000013 beq 3000c724 <rtems_task_mode+0x104>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
3000c6d4: 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 ) {
3000c6d8: e5d62008 ldrb r2, [r6, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
3000c6dc: 13a03000 movne r3, #0
3000c6e0: 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 ) {
3000c6e4: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
3000c6e8: 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 ) {
3000c6ec: 0a00000c beq 3000c724 <rtems_task_mode+0x104>
asr->is_enabled = is_asr_enabled;
3000c6f0: e5c63008 strb r3, [r6, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000c6f4: e10f3000 mrs r3, CPSR
3000c6f8: e3832080 orr r2, r3, #128 ; 0x80
3000c6fc: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
3000c700: e5962018 ldr r2, [r6, #24]
information->signals_pending = information->signals_posted;
3000c704: e5961014 ldr r1, [r6, #20]
information->signals_posted = _signals;
3000c708: 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;
3000c70c: e5861018 str r1, [r6, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000c710: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
3000c714: e5960014 ldr r0, [r6, #20]
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
3000c718: e3500000 cmp r0, #0
3000c71c: 13a00001 movne r0, #1
3000c720: 03a00000 moveq r0, #0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
3000c724: e59f3058 ldr r3, [pc, #88] ; 3000c784 <rtems_task_mode+0x164>
3000c728: e5933000 ldr r3, [r3]
3000c72c: e3530003 cmp r3, #3
3000c730: 1a00000f bne 3000c774 <rtems_task_mode+0x154>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
3000c734: e59f2040 ldr r2, [pc, #64] ; 3000c77c <rtems_task_mode+0x15c>
if ( are_signals_pending ||
3000c738: e3500000 cmp r0, #0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
3000c73c: e5923004 ldr r3, [r2, #4]
if ( are_signals_pending ||
3000c740: 1a000005 bne 3000c75c <rtems_task_mode+0x13c>
3000c744: e5922008 ldr r2, [r2, #8]
3000c748: e1530002 cmp r3, r2
3000c74c: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
3000c750: e5d33074 ldrb r3, [r3, #116] ; 0x74
3000c754: e3530000 cmp r3, #0
3000c758: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
_Thread_Dispatch_necessary = true;
3000c75c: e59f3018 ldr r3, [pc, #24] ; 3000c77c <rtems_task_mode+0x15c>
3000c760: e3a02001 mov r2, #1
3000c764: e5c32010 strb r2, [r3, #16]
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
3000c768: ebffe9c1 bl 30006e74 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
3000c76c: e3a00000 mov r0, #0
3000c770: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
3000c774: e3a00000 mov r0, #0 <== NOT EXECUTED
}
3000c778: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
30003118 <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;
30003118: e5903000 ldr r3, [r0]
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
3000311c: e92d4030 push {r4, r5, lr}
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003120: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain(
30003124: e59f317c ldr r3, [pc, #380] ; 300032a8 <rtems_termios_close+0x190>
30003128: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
3000312c: 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(
30003130: e1a02001 mov r2, r1
30003134: e5930000 ldr r0, [r3]
30003138: eb0007a5 bl 30004fd4 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3000313c: e3500000 cmp r0, #0
30003140: 1a000024 bne 300031d8 <rtems_termios_close+0xc0>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
30003144: e5943008 ldr r3, [r4, #8]
30003148: e2433001 sub r3, r3, #1
3000314c: e3530000 cmp r3, #0
30003150: e5843008 str r3, [r4, #8]
30003154: 1a00004e bne 30003294 <rtems_termios_close+0x17c>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
30003158: e59420cc ldr r2, [r4, #204] ; 0xcc
3000315c: e59f3148 ldr r3, [pc, #328] ; 300032ac <rtems_termios_close+0x194>
30003160: e0833282 add r3, r3, r2, lsl #5
30003164: e5931004 ldr r1, [r3, #4]
30003168: e3510000 cmp r1, #0
3000316c: 0a000003 beq 30003180 <rtems_termios_close+0x68>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
30003170: e1a00004 mov r0, r4
30003174: e1a0e00f mov lr, pc
30003178: e12fff11 bx r1
3000317c: ea000008 b 300031a4 <rtems_termios_close+0x8c>
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003180: e5940018 ldr r0, [r4, #24]
30003184: e1a02001 mov r2, r1
30003188: eb000791 bl 30004fd4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
3000318c: e3500000 cmp r0, #0
30003190: 1a000010 bne 300031d8 <rtems_termios_close+0xc0>
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
30003194: e1a00004 mov r0, r4
30003198: ebfffeb2 bl 30002c68 <drainOutput>
rtems_semaphore_release (tty->osem);
3000319c: e5940018 ldr r0, [r4, #24]
300031a0: eb0007d1 bl 300050ec <rtems_semaphore_release>
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300031a4: e59430b4 ldr r3, [r4, #180] ; 0xb4
300031a8: e3530002 cmp r3, #2
300031ac: 1a00000a bne 300031dc <rtems_termios_close+0xc4>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
300031b0: e59400c4 ldr r0, [r4, #196] ; 0xc4
300031b4: e3a01001 mov r1, #1
300031b8: eb000673 bl 30004b8c <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
300031bc: e3500000 cmp r0, #0
300031c0: 1a000004 bne 300031d8 <rtems_termios_close+0xc0>
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
300031c4: e59400c8 ldr r0, [r4, #200] ; 0xc8
300031c8: e3a01001 mov r1, #1
300031cc: eb00066e bl 30004b8c <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
300031d0: e3500000 cmp r0, #0
300031d4: 0a000000 beq 300031dc <rtems_termios_close+0xc4>
rtems_fatal_error_occurred (sc);
300031d8: eb000914 bl 30005630 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
300031dc: e594309c ldr r3, [r4, #156] ; 0x9c
300031e0: e3530000 cmp r3, #0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
300031e4: 1594000c ldrne r0, [r4, #12]
300031e8: 15941010 ldrne r1, [r4, #16]
300031ec: 11a02005 movne r2, r5
300031f0: 11a0e00f movne lr, pc
300031f4: 112fff13 bxne r3
if (tty->forw == NULL) {
300031f8: e894000c ldm r4, {r2, r3}
300031fc: 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;
30003200: 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) {
30003204: 1a000003 bne 30003218 <rtems_termios_close+0x100>
rtems_termios_ttyTail = tty->back;
30003208: e59f10a0 ldr r1, [pc, #160] ; 300032b0 <rtems_termios_close+0x198>
if ( rtems_termios_ttyTail != NULL ) {
3000320c: 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;
30003210: e5813000 str r3, [r1]
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
30003214: 15832000 strne r2, [r3]
}
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
30003218: e5942004 ldr r2, [r4, #4]
3000321c: e5943000 ldr r3, [r4]
30003220: 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;
30003224: 15823000 strne r3, [r2]
}
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
30003228: 1a000003 bne 3000323c <rtems_termios_close+0x124>
rtems_termios_ttyHead = tty->forw;
3000322c: e59f1080 ldr r1, [pc, #128] ; 300032b4 <rtems_termios_close+0x19c>
if ( rtems_termios_ttyHead != NULL ) {
30003230: e3530000 cmp r3, #0
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
30003234: e5813000 str r3, [r1]
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
30003238: 15832004 strne r2, [r3, #4]
}
} else {
tty->back->forw = tty->forw;
}
rtems_semaphore_delete (tty->isem);
3000323c: e5940014 ldr r0, [r4, #20]
30003240: eb00073c bl 30004f38 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
30003244: e5940018 ldr r0, [r4, #24]
30003248: eb00073a bl 30004f38 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
3000324c: e594008c ldr r0, [r4, #140] ; 0x8c
30003250: eb000738 bl 30004f38 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
30003254: e59430a0 ldr r3, [r4, #160] ; 0xa0
30003258: e3530000 cmp r3, #0
3000325c: 0a000002 beq 3000326c <rtems_termios_close+0x154>
30003260: e59430b4 ldr r3, [r4, #180] ; 0xb4
30003264: e3530002 cmp r3, #2
30003268: 1a000001 bne 30003274 <rtems_termios_close+0x15c>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
3000326c: e5940068 ldr r0, [r4, #104] ; 0x68
30003270: eb000730 bl 30004f38 <rtems_semaphore_delete>
free (tty->rawInBuf.theBuf);
30003274: e5940058 ldr r0, [r4, #88] ; 0x58
30003278: ebfffae1 bl 30001e04 <free>
free (tty->rawOutBuf.theBuf);
3000327c: e594007c ldr r0, [r4, #124] ; 0x7c
30003280: ebfffadf bl 30001e04 <free>
free (tty->cbuf);
30003284: e594001c ldr r0, [r4, #28]
30003288: ebfffadd bl 30001e04 <free>
free (tty);
3000328c: e1a00004 mov r0, r4
30003290: ebfffadb bl 30001e04 <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
30003294: e59f300c ldr r3, [pc, #12] ; 300032a8 <rtems_termios_close+0x190>
30003298: e5930000 ldr r0, [r3]
3000329c: eb000792 bl 300050ec <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
300032a0: e3a00000 mov r0, #0
300032a4: e8bd8030 pop {r4, r5, pc}
30004634 <rtems_termios_dequeue_characters>:
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
30004634: 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)
{
30004638: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
3000463c: e0822001 add r2, r2, r1
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30004640: e59010b4 ldr r1, [r0, #180] ; 0xb4
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
30004644: e5802090 str r2, [r0, #144] ; 0x90
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30004648: e3510002 cmp r1, #2
3000464c: 1a000004 bne 30004664 <rtems_termios_dequeue_characters+0x30>
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
30004650: e59000c8 ldr r0, [r0, #200] ; 0xc8
30004654: eb00014c bl 30004b8c <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
30004658: e2503000 subs r3, r0, #0
3000465c: 0a00000d beq 30004698 <rtems_termios_dequeue_characters+0x64>
rtems_fatal_error_occurred (sc);
30004660: eb0003f2 bl 30005630 <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
30004664: e59030cc ldr r3, [r0, #204] ; 0xcc
30004668: e3530005 cmp r3, #5
3000466c: 1a000007 bne 30004690 <rtems_termios_dequeue_characters+0x5c>
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
30004670: e59f3028 ldr r3, [pc, #40] ; 300046a0 <rtems_termios_dequeue_characters+0x6c>
30004674: e59330b4 ldr r3, [r3, #180] ; 0xb4
30004678: e3530000 cmp r3, #0
3000467c: 0a000005 beq 30004698 <rtems_termios_dequeue_characters+0x64>
rtems_termios_linesw[tty->t_line].l_start(tty);
30004680: e1a0e00f mov lr, pc
30004684: e12fff13 bx r3
}
return 0; /* nothing to output in IRQ... */
30004688: e3a03000 mov r3, #0
3000468c: ea000001 b 30004698 <rtems_termios_dequeue_characters+0x64>
}
return rtems_termios_refill_transmitter(tty);
}
30004690: 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);
30004694: eaffff5a b 30004404 <rtems_termios_refill_transmitter>
}
30004698: e1a00003 mov r0, r3
3000469c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
30004100 <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)
{
30004100: 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) {
30004104: e59030cc ldr r3, [r0, #204] ; 0xcc
30004108: e59f7288 ldr r7, [pc, #648] ; 30004398 <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)
{
3000410c: 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) {
30004110: e0873283 add r3, r7, r3, lsl #5
30004114: 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)
{
30004118: 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) {
3000411c: e3590000 cmp r9, #0
30004120: 11a05002 movne r5, r2
30004124: 1a00000d bne 30004160 <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);
30004128: e2803030 add r3, r0, #48 ; 0x30
3000412c: 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,
30004130: 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) {
30004134: e1a08002 mov r8, r2
30004138: 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,
3000413c: e58d3004 str r3, [sp, #4]
30004140: ea00008b b 30004374 <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);
30004144: e59430cc ldr r3, [r4, #204] ; 0xcc
30004148: e4d60001 ldrb r0, [r6], #1
3000414c: e0873283 add r3, r7, r3, lsl #5
30004150: e1a01004 mov r1, r4
30004154: e1a0e00f mov lr, pc
30004158: e593f010 ldr pc, [r3, #16]
3000415c: 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--) {
30004160: e3550000 cmp r5, #0
30004164: 1afffff6 bne 30004144 <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 )) {
30004168: e59430e4 ldr r3, [r4, #228] ; 0xe4
3000416c: e3530000 cmp r3, #0
30004170: 1a000086 bne 30004390 <rtems_termios_enqueue_raw_characters+0x290>
30004174: e59430dc ldr r3, [r4, #220] ; 0xdc
30004178: e3530000 cmp r3, #0
3000417c: 0a000083 beq 30004390 <rtems_termios_enqueue_raw_characters+0x290>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
30004180: e2840030 add r0, r4, #48 ; 0x30
30004184: e59410e0 ldr r1, [r4, #224] ; 0xe0
30004188: e1a0e00f mov lr, pc
3000418c: e12fff13 bx r3
tty->tty_rcvwakeup = 1;
30004190: e3a03001 mov r3, #1
30004194: e58430e4 str r3, [r4, #228] ; 0xe4
30004198: ea00007c b 30004390 <rtems_termios_enqueue_raw_characters+0x290>
while (len--) {
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
3000419c: e59430b8 ldr r3, [r4, #184] ; 0xb8
}
return 0;
}
while (len--) {
c = *buf++;
300041a0: 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) {
300041a4: e3130c02 tst r3, #512 ; 0x200
300041a8: 0a00000f beq 300041ec <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]) {
300041ac: e5d4204a ldrb r2, [r4, #74] ; 0x4a
300041b0: e5d43049 ldrb r3, [r4, #73] ; 0x49
300041b4: e152000a cmp r2, sl
300041b8: 1a000007 bne 300041dc <rtems_termios_enqueue_raw_characters+0xdc>
if (c == tty->termios.c_cc[VSTART]) {
300041bc: e1530002 cmp r3, r2
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
300041c0: 059430b8 ldreq r3, [r4, #184] ; 0xb8
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
300041c4: 159430b8 ldrne r3, [r4, #184] ; 0xb8
/* 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;
300041c8: 02233010 eoreq r3, r3, #16
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
300041cc: 13833010 orrne r3, r3, #16
300041d0: e58430b8 str r3, [r4, #184] ; 0xb8
* 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)
{
300041d4: e3a09001 mov r9, #1
300041d8: ea000005 b 300041f4 <rtems_termios_enqueue_raw_characters+0xf4>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
300041dc: e153000a cmp r3, sl
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
300041e0: 059430b8 ldreq r3, [r4, #184] ; 0xb8
300041e4: 03c33010 biceq r3, r3, #16
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
300041e8: 0afffff8 beq 300041d0 <rtems_termios_enqueue_raw_characters+0xd0>
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
300041ec: e3590000 cmp r9, #0
300041f0: 0a000014 beq 30004248 <rtems_termios_enqueue_raw_characters+0x148>
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
300041f4: e59430b8 ldr r3, [r4, #184] ; 0xb8
300041f8: e2033030 and r3, r3, #48 ; 0x30
300041fc: e3530020 cmp r3, #32
30004200: 1a00005a bne 30004370 <rtems_termios_enqueue_raw_characters+0x270>
/* disable interrupts */
rtems_interrupt_disable(level);
30004204: ebfffa93 bl 30002c58 <arm_interrupt_disable> <== NOT EXECUTED
30004208: e1a07000 mov r7, r0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
3000420c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004210: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
30004214: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30004218: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
3000421c: e3530000 cmp r3, #0 <== NOT EXECUTED
30004220: 0a000006 beq 30004240 <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);
30004224: 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)(
30004228: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
3000422c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
30004230: e0811003 add r1, r1, r3 <== NOT EXECUTED
30004234: e3a02001 mov r2, #1 <== NOT EXECUTED
30004238: e1a0e00f mov lr, pc <== NOT EXECUTED
3000423c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
30004240: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
30004244: ea000049 b 30004370 <rtems_termios_enqueue_raw_characters+0x270><== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
30004248: e5940060 ldr r0, [r4, #96] ; 0x60
3000424c: e5941064 ldr r1, [r4, #100] ; 0x64
30004250: e2800001 add r0, r0, #1
30004254: eb00305f bl 300103d8 <__umodsi3>
30004258: e1a07000 mov r7, r0
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
3000425c: ebfffa7d bl 30002c58 <arm_interrupt_disable>
30004260: e1a0b000 mov fp, r0
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
30004264: e594305c ldr r3, [r4, #92] ; 0x5c
30004268: e5940064 ldr r0, [r4, #100] ; 0x64
% tty->rawInBuf.Size) > tty->highwater) &&
3000426c: 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)
30004270: e0630000 rsb r0, r3, r0
% tty->rawInBuf.Size) > tty->highwater) &&
30004274: e0800007 add r0, r0, r7
30004278: eb003056 bl 300103d8 <__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)
3000427c: e59430c0 ldr r3, [r4, #192] ; 0xc0
30004280: e1500003 cmp r0, r3
30004284: 9a000025 bls 30004320 <rtems_termios_enqueue_raw_characters+0x220>
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
30004288: 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) &&
3000428c: e3130001 tst r3, #1 <== NOT EXECUTED
30004290: 1a000022 bne 30004320 <rtems_termios_enqueue_raw_characters+0x220><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
30004294: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004298: e3833001 orr r3, r3, #1 <== NOT EXECUTED
3000429c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
300042a0: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
300042a4: e59f30f0 ldr r3, [pc, #240] ; 3000439c <rtems_termios_enqueue_raw_characters+0x29c><== NOT EXECUTED
300042a8: e0023003 and r3, r2, r3 <== NOT EXECUTED
300042ac: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED
300042b0: 1a00000e bne 300042f0 <rtems_termios_enqueue_raw_characters+0x1f0><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
300042b4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300042b8: e3130020 tst r3, #32 <== NOT EXECUTED
300042bc: 1a000002 bne 300042cc <rtems_termios_enqueue_raw_characters+0x1cc><== NOT EXECUTED
300042c0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
300042c4: e3530000 cmp r3, #0 <== NOT EXECUTED
300042c8: 1a000014 bne 30004320 <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;
300042cc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
300042d0: 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;
300042d4: e3833002 orr r3, r3, #2 <== NOT EXECUTED
300042d8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
300042dc: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
300042e0: e3a02001 mov r2, #1 <== NOT EXECUTED
300042e4: e1a0e00f mov lr, pc <== NOT EXECUTED
300042e8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
300042ec: ea00000b b 30004320 <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) ) {
300042f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300042f4: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED
300042f8: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED
300042fc: 1a000007 bne 30004320 <rtems_termios_enqueue_raw_characters+0x220><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
30004300: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004304: e3833004 orr r3, r3, #4 <== NOT EXECUTED
30004308: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
3000430c: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED
30004310: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
30004314: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
30004318: 11a0e00f movne lr, pc <== NOT EXECUTED
3000431c: 112fff13 bxne r3 <== NOT EXECUTED
30004320: e129f00b msr CPSR_fc, fp
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
30004324: e594305c ldr r3, [r4, #92] ; 0x5c
30004328: e1570003 cmp r7, r3
dropped++;
3000432c: 02855001 addeq r5, r5, #1
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
30004330: 0a00000e beq 30004370 <rtems_termios_enqueue_raw_characters+0x270>
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
30004334: e5943058 ldr r3, [r4, #88] ; 0x58
30004338: 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 )) {
3000433c: e59430e4 ldr r3, [r4, #228] ; 0xe4
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
30004340: 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 )) {
30004344: e3530000 cmp r3, #0
30004348: 1a000008 bne 30004370 <rtems_termios_enqueue_raw_characters+0x270>
3000434c: e59430dc ldr r3, [r4, #220] ; 0xdc
30004350: e3530000 cmp r3, #0
30004354: 0a000005 beq 30004370 <rtems_termios_enqueue_raw_characters+0x270>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
30004358: e59d0000 ldr r0, [sp] <== NOT EXECUTED
3000435c: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
30004360: e1a0e00f mov lr, pc <== NOT EXECUTED
30004364: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
30004368: e3a03001 mov r3, #1 <== NOT EXECUTED
3000436c: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
30004370: e2488001 sub r8, r8, #1
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
30004374: e3580000 cmp r8, #0
30004378: 1affff87 bne 3000419c <rtems_termios_enqueue_raw_characters+0x9c>
}
}
}
}
tty->rawInBufDropped += dropped;
3000437c: e5943078 ldr r3, [r4, #120] ; 0x78
rtems_semaphore_release (tty->rawInBuf.Semaphore);
30004380: e5940068 ldr r0, [r4, #104] ; 0x68
}
}
}
}
tty->rawInBufDropped += dropped;
30004384: e0833005 add r3, r3, r5
30004388: e5843078 str r3, [r4, #120] ; 0x78
rtems_semaphore_release (tty->rawInBuf.Semaphore);
3000438c: eb000356 bl 300050ec <rtems_semaphore_release>
return dropped;
}
30004390: e1a00005 mov r0, r5
30004394: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
300032d0 <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;
300032d0: e5903000 ldr r3, [r0]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
300032d4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
300032d8: e5934034 ldr r4, [r3, #52] ; 0x34
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
300032dc: 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;
300032e0: e5907008 ldr r7, [r0, #8]
rtems_status_code sc;
args->ioctl_return = 0;
300032e4: e580100c str r1, [r0, #12]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
300032e8: 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);
300032ec: e1a02001 mov r2, r1
300032f0: e5940018 ldr r0, [r4, #24]
300032f4: eb000736 bl 30004fd4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
300032f8: e2506000 subs r6, r0, #0
300032fc: 1a0000d4 bne 30003654 <rtems_termios_ioctl+0x384>
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
30003300: e5953004 ldr r3, [r5, #4]
30003304: e3530004 cmp r3, #4
30003308: 0a0000a8 beq 300035b0 <rtems_termios_ioctl+0x2e0>
3000330c: 8a000005 bhi 30003328 <rtems_termios_ioctl+0x58>
30003310: e3530002 cmp r3, #2
30003314: 0a000029 beq 300033c0 <rtems_termios_ioctl+0xf0>
30003318: 8a00009d bhi 30003594 <rtems_termios_ioctl+0x2c4>
3000331c: e3530001 cmp r3, #1
30003320: 1a000010 bne 30003368 <rtems_termios_ioctl+0x98>
30003324: ea00001b b 30003398 <rtems_termios_ioctl+0xc8>
30003328: e59f2330 ldr r2, [pc, #816] ; 30003660 <rtems_termios_ioctl+0x390>
3000332c: e1530002 cmp r3, r2
30003330: 0a0000ba beq 30003620 <rtems_termios_ioctl+0x350>
30003334: 8a000002 bhi 30003344 <rtems_termios_ioctl+0x74>
30003338: e3530005 cmp r3, #5
3000333c: 1a000009 bne 30003368 <rtems_termios_ioctl+0x98>
30003340: ea000096 b 300035a0 <rtems_termios_ioctl+0x2d0>
30003344: e59f2318 ldr r2, [pc, #792] ; 30003664 <rtems_termios_ioctl+0x394>
30003348: 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;
3000334c: 05953008 ldreq r3, [r5, #8]
30003350: 059420cc ldreq r2, [r4, #204] ; 0xcc
30003354: 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) {
30003358: 0a0000bb beq 3000364c <rtems_termios_ioctl+0x37c>
3000335c: e2822105 add r2, r2, #1073741825 ; 0x40000001
30003360: e1530002 cmp r3, r2
30003364: 0a000095 beq 300035c0 <rtems_termios_ioctl+0x2f0>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
30003368: e59420cc ldr r2, [r4, #204] ; 0xcc
3000336c: e59f32f4 ldr r3, [pc, #756] ; 30003668 <rtems_termios_ioctl+0x398>
30003370: e0833282 add r3, r3, r2, lsl #5
30003374: e5933018 ldr r3, [r3, #24]
30003378: e3530000 cmp r3, #0
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
3000337c: 03a0600a moveq r6, #10
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
30003380: 0a0000b1 beq 3000364c <rtems_termios_ioctl+0x37c>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
30003384: e1a00004 mov r0, r4
30003388: e1a01005 mov r1, r5
3000338c: e1a0e00f mov lr, pc
30003390: e12fff13 bx r3
30003394: ea00009f b 30003618 <rtems_termios_ioctl+0x348>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
30003398: e5957008 ldr r7, [r5, #8]
3000339c: e284c030 add ip, r4, #48 ; 0x30
300033a0: e1a0e007 mov lr, r7
300033a4: e8bc000f ldm ip!, {r0, r1, r2, r3}
300033a8: e8ae000f stmia lr!, {r0, r1, r2, r3}
300033ac: e8bc000f ldm ip!, {r0, r1, r2, r3}
300033b0: e8ae000f stmia lr!, {r0, r1, r2, r3}
300033b4: e59c3000 ldr r3, [ip]
300033b8: e58e3000 str r3, [lr]
break;
300033bc: ea0000a2 b 3000364c <rtems_termios_ioctl+0x37c>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
300033c0: e595e008 ldr lr, [r5, #8]
300033c4: e284c030 add ip, r4, #48 ; 0x30
300033c8: e8be000f ldm lr!, {r0, r1, r2, r3}
300033cc: e8ac000f stmia ip!, {r0, r1, r2, r3}
300033d0: e8be000f ldm lr!, {r0, r1, r2, r3}
300033d4: e8ac000f stmia ip!, {r0, r1, r2, r3}
300033d8: e59e3000 ldr r3, [lr]
300033dc: 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) &&
300033e0: e59430b8 ldr r3, [r4, #184] ; 0xb8
300033e4: e3130c02 tst r3, #512 ; 0x200
300033e8: 0a000018 beq 30003450 <rtems_termios_ioctl+0x180>
!(tty->termios.c_iflag & IXON)) {
300033ec: 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) &&
300033f0: e3130b01 tst r3, #1024 ; 0x400
300033f4: 1a000015 bne 30003450 <rtems_termios_ioctl+0x180>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
300033f8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300033fc: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED
30003400: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
30003404: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30003408: e3130020 tst r3, #32 <== NOT EXECUTED
3000340c: 0a00000f beq 30003450 <rtems_termios_ioctl+0x180> <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
30003410: ebfffe10 bl 30002c58 <arm_interrupt_disable> <== NOT EXECUTED
30003414: e1a07000 mov r7, r0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
30003418: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000341c: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
30003420: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30003424: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
30003428: e3530000 cmp r3, #0 <== NOT EXECUTED
3000342c: 0a000006 beq 3000344c <rtems_termios_ioctl+0x17c> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
30003430: 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)(
30003434: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
30003438: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3000343c: e0811003 add r1, r1, r3 <== NOT EXECUTED
30003440: e3a02001 mov r2, #1 <== NOT EXECUTED
30003444: e1a0e00f mov lr, pc <== NOT EXECUTED
30003448: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
3000344c: 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)) {
30003450: e59430b8 ldr r3, [r4, #184] ; 0xb8
30003454: e3130b01 tst r3, #1024 ; 0x400
30003458: 0a000008 beq 30003480 <rtems_termios_ioctl+0x1b0>
3000345c: e5943030 ldr r3, [r4, #48] ; 0x30
30003460: e3130a01 tst r3, #4096 ; 0x1000
30003464: 1a000005 bne 30003480 <rtems_termios_ioctl+0x1b0>
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
30003468: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000346c: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED
30003470: 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);
30003474: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30003478: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
3000347c: 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)) {
30003480: e59430b8 ldr r3, [r4, #184] ; 0xb8
30003484: e3130c01 tst r3, #256 ; 0x100
30003488: 0a000010 beq 300034d0 <rtems_termios_ioctl+0x200>
3000348c: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
30003490: e3530000 cmp r3, #0 <== NOT EXECUTED
30003494: ba00000d blt 300034d0 <rtems_termios_ioctl+0x200> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
30003498: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000349c: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
300034a0: 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)) {
300034a4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300034a8: e3130004 tst r3, #4 <== NOT EXECUTED
300034ac: 0a000004 beq 300034c4 <rtems_termios_ioctl+0x1f4> <== NOT EXECUTED
300034b0: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
300034b4: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
300034b8: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
300034bc: 11a0e00f movne lr, pc <== NOT EXECUTED
300034c0: 112fff13 bxne r3 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
300034c4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300034c8: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
300034cc: 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) {
300034d0: 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) {
300034d4: 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) {
300034d8: e3530000 cmp r3, #0
tty->flow_ctrl |= FL_MDRTS;
300034dc: b59430b8 ldrlt r3, [r4, #184] ; 0xb8
300034e0: b3833c01 orrlt r3, r3, #256 ; 0x100
300034e4: b58430b8 strlt r3, [r4, #184] ; 0xb8
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
300034e8: e5943030 ldr r3, [r4, #48] ; 0x30
300034ec: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
300034f0: 159420b8 ldrne r2, [r4, #184] ; 0xb8
300034f4: 13822b01 orrne r2, r2, #1024 ; 0x400
300034f8: 158420b8 strne r2, [r4, #184] ; 0xb8
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
300034fc: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
30003500: 159430b8 ldrne r3, [r4, #184] ; 0xb8
30003504: 13833c02 orrne r3, r3, #512 ; 0x200
30003508: 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) {
3000350c: e2177002 ands r7, r7, #2
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
30003510: 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) {
30003514: 1a000013 bne 30003568 <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] *
30003518: e5d48046 ldrb r8, [r4, #70] ; 0x46
rtems_clock_get_ticks_per_second() / 10;
3000351c: eb000519 bl 30004988 <rtems_clock_get_ticks_per_second>
30003520: e3a0100a mov r1, #10
30003524: e0000098 mul r0, r8, r0
30003528: eb003312 bl 30010178 <__aeabi_uidiv>
if (tty->termios.c_cc[VTIME]) {
3000352c: 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] *
30003530: e5840054 str r0, [r4, #84] ; 0x54
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
30003534: e3530000 cmp r3, #0
30003538: e5d42047 ldrb r2, [r4, #71] ; 0x47
3000353c: 0a000005 beq 30003558 <rtems_termios_ioctl+0x288>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003540: e3520000 cmp r2, #0
} 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;
30003544: e5840070 str r0, [r4, #112] ; 0x70
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003548: 13a00000 movne r0, #0
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;
3000354c: e584706c str r7, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003550: e5840074 str r0, [r4, #116] ; 0x74
30003554: ea000006 b 30003574 <rtems_termios_ioctl+0x2a4>
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
30003558: e3520000 cmp r2, #0
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
3000355c: 03a03001 moveq r3, #1
30003560: 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]) {
30003564: 0a000002 beq 30003574 <rtems_termios_ioctl+0x2a4>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
30003568: e584306c str r3, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
3000356c: e5843070 str r3, [r4, #112] ; 0x70
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003570: e5843074 str r3, [r4, #116] ; 0x74
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
30003574: e59430a8 ldr r3, [r4, #168] ; 0xa8
30003578: e3530000 cmp r3, #0
3000357c: 0a000032 beq 3000364c <rtems_termios_ioctl+0x37c>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
30003580: e5940010 ldr r0, [r4, #16]
30003584: e2841030 add r1, r4, #48 ; 0x30
30003588: e1a0e00f mov lr, pc
3000358c: e12fff13 bx r3
30003590: ea00002d b 3000364c <rtems_termios_ioctl+0x37c>
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
30003594: e1a00004 mov r0, r4
30003598: ebfffdb2 bl 30002c68 <drainOutput>
break;
3000359c: ea00002a b 3000364c <rtems_termios_ioctl+0x37c>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
300035a0: e897000c ldm r7, {r2, r3}
300035a4: e58420d4 str r2, [r4, #212] ; 0xd4
300035a8: e58430d8 str r3, [r4, #216] ; 0xd8
break;
300035ac: ea000026 b 3000364c <rtems_termios_ioctl+0x37c>
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
300035b0: e897000c ldm r7, {r2, r3}
300035b4: e58420dc str r2, [r4, #220] ; 0xdc
300035b8: e58430e0 str r3, [r4, #224] ; 0xe0
break;
300035bc: ea000022 b 3000364c <rtems_termios_ioctl+0x37c>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
300035c0: e59420cc ldr r2, [r4, #204] ; 0xcc
300035c4: e59f309c ldr r3, [pc, #156] ; 30003668 <rtems_termios_ioctl+0x398>
300035c8: e0833282 add r3, r3, r2, lsl #5
300035cc: e5933004 ldr r3, [r3, #4]
300035d0: e3530000 cmp r3, #0
300035d4: 0a000003 beq 300035e8 <rtems_termios_ioctl+0x318>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
300035d8: e1a00004 mov r0, r4
300035dc: e1a0e00f mov lr, pc
300035e0: e12fff13 bx r3
300035e4: e1a06000 mov r6, r0
}
tty->t_line=*(int*)(args->buffer);
300035e8: e5953008 ldr r3, [r5, #8]
tty->t_sc = NULL; /* ensure that no more valid data */
300035ec: 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);
300035f0: e5933000 ldr r3, [r3]
tty->t_sc = NULL; /* ensure that no more valid data */
300035f4: e58420d0 str r2, [r4, #208] ; 0xd0
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
300035f8: e59f2068 ldr r2, [pc, #104] ; 30003668 <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);
300035fc: 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) {
30003600: e7923283 ldr r3, [r2, r3, lsl #5]
30003604: e3530000 cmp r3, #0
30003608: 0a00000f beq 3000364c <rtems_termios_ioctl+0x37c>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
3000360c: e1a00004 mov r0, r4
30003610: e1a0e00f mov lr, pc
30003614: e12fff13 bx r3
30003618: e1a06000 mov r6, r0
3000361c: ea00000a b 3000364c <rtems_termios_ioctl+0x37c>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
30003620: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED
30003624: 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;
30003628: 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 )
3000362c: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
30003630: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
30003634: 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;
30003638: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
3000363c: e0611000 rsb r1, r1, r0 <== NOT EXECUTED
30003640: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED
30003644: e0813003 add r3, r1, r3 <== NOT EXECUTED
30003648: e5823000 str r3, [r2] <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
3000364c: e5940018 ldr r0, [r4, #24]
30003650: eb0006a5 bl 300050ec <rtems_semaphore_release>
args->ioctl_return = sc;
30003654: e585600c str r6, [r5, #12]
return sc;
}
30003658: e1a00006 mov r0, r6
3000365c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30003db4 <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;
30003db4: e5903000 ldr r3, [r0]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
30003db8: 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;
30003dbc: 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);
30003dc0: 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;
30003dc4: e5908010 ldr r8, [r0, #16]
char *buffer = args->buffer;
30003dc8: e590b00c ldr fp, [r0, #12]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
30003dcc: 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);
30003dd0: e1a02001 mov r2, r1
30003dd4: e5940014 ldr r0, [r4, #20]
30003dd8: eb00047d bl 30004fd4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
30003ddc: e2507000 subs r7, r0, #0
30003de0: 1a0000be bne 300040e0 <rtems_termios_read+0x32c>
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
30003de4: e59420cc ldr r2, [r4, #204] ; 0xcc
30003de8: e59f32f8 ldr r3, [pc, #760] ; 300040e8 <rtems_termios_read+0x334>
30003dec: e0833282 add r3, r3, r2, lsl #5
30003df0: e5933008 ldr r3, [r3, #8]
30003df4: e3530000 cmp r3, #0
30003df8: 0a000005 beq 30003e14 <rtems_termios_read+0x60>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
30003dfc: e1a00004 mov r0, r4
30003e00: e1a01005 mov r1, r5
30003e04: e1a0e00f mov lr, pc
30003e08: e12fff13 bx r3
30003e0c: e1a07000 mov r7, r0
30003e10: ea0000ae b 300040d0 <rtems_termios_read+0x31c>
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
30003e14: e5942024 ldr r2, [r4, #36] ; 0x24
30003e18: e5943020 ldr r3, [r4, #32]
30003e1c: e1520003 cmp r2, r3
30003e20: 1a0000a1 bne 300040ac <rtems_termios_read+0x2f8>
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
30003e24: e5943028 ldr r3, [r4, #40] ; 0x28
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
30003e28: e5847020 str r7, [r4, #32]
tty->read_start_column = tty->column;
30003e2c: e584302c str r3, [r4, #44] ; 0x2c
if (tty->device.pollRead != NULL &&
30003e30: e59430a0 ldr r3, [r4, #160] ; 0xa0
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
30003e34: e5847024 str r7, [r4, #36] ; 0x24
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
30003e38: e3530000 cmp r3, #0
30003e3c: 0a00003b beq 30003f30 <rtems_termios_read+0x17c>
30003e40: e59430b4 ldr r3, [r4, #180] ; 0xb4
30003e44: e3530000 cmp r3, #0
30003e48: 1a000038 bne 30003f30 <rtems_termios_read+0x17c>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
30003e4c: e594303c ldr r3, [r4, #60] ; 0x3c
30003e50: e3130002 tst r3, #2
30003e54: 0a00000d beq 30003e90 <rtems_termios_read+0xdc>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
30003e58: e5940010 ldr r0, [r4, #16]
30003e5c: e1a0e00f mov lr, pc
30003e60: e594f0a0 ldr pc, [r4, #160] ; 0xa0
if (n < 0) {
30003e64: e3500000 cmp r0, #0
30003e68: aa000002 bge 30003e78 <rtems_termios_read+0xc4>
rtems_task_wake_after (1);
30003e6c: e3a00001 mov r0, #1
30003e70: eb000584 bl 30005488 <rtems_task_wake_after>
30003e74: eafffff7 b 30003e58 <rtems_termios_read+0xa4>
} else {
if (siproc (n, tty))
30003e78: e20000ff and r0, r0, #255 ; 0xff
30003e7c: e1a01004 mov r1, r4
30003e80: ebffff86 bl 30003ca0 <siproc>
30003e84: e3500000 cmp r0, #0
30003e88: 0afffff2 beq 30003e58 <rtems_termios_read+0xa4>
30003e8c: ea000086 b 300040ac <rtems_termios_read+0x2f8>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
30003e90: eb0002c4 bl 300049a8 <rtems_clock_get_ticks_since_boot>
30003e94: e1a06000 mov r6, r0
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
30003e98: e5940010 ldr r0, [r4, #16]
30003e9c: e1a0e00f mov lr, pc
30003ea0: e594f0a0 ldr pc, [r4, #160] ; 0xa0
if (n < 0) {
30003ea4: e3500000 cmp r0, #0
30003ea8: aa000013 bge 30003efc <rtems_termios_read+0x148>
if (tty->termios.c_cc[VMIN]) {
30003eac: e5d43047 ldrb r3, [r4, #71] ; 0x47
30003eb0: e3530000 cmp r3, #0
30003eb4: e5d43046 ldrb r3, [r4, #70] ; 0x46
30003eb8: 0a000005 beq 30003ed4 <rtems_termios_read+0x120>
if (tty->termios.c_cc[VTIME] && tty->ccount) {
30003ebc: e3530000 cmp r3, #0
30003ec0: 0a00000a beq 30003ef0 <rtems_termios_read+0x13c>
30003ec4: e5943020 ldr r3, [r4, #32]
30003ec8: e3530000 cmp r3, #0
30003ecc: 0a000007 beq 30003ef0 <rtems_termios_read+0x13c>
30003ed0: ea000001 b 30003edc <rtems_termios_read+0x128>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
30003ed4: e3530000 cmp r3, #0 <== NOT EXECUTED
30003ed8: 0a000073 beq 300040ac <rtems_termios_read+0x2f8> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
30003edc: eb0002b1 bl 300049a8 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
30003ee0: e5943054 ldr r3, [r4, #84] ; 0x54
30003ee4: e0660000 rsb r0, r6, r0
30003ee8: e1500003 cmp r0, r3
30003eec: 8a00006e bhi 300040ac <rtems_termios_read+0x2f8>
break;
}
}
rtems_task_wake_after (1);
30003ef0: e3a00001 mov r0, #1
30003ef4: eb000563 bl 30005488 <rtems_task_wake_after>
30003ef8: eaffffe6 b 30003e98 <rtems_termios_read+0xe4>
} else {
siproc (n, tty);
30003efc: e20000ff and r0, r0, #255 ; 0xff
30003f00: e1a01004 mov r1, r4
30003f04: ebffff65 bl 30003ca0 <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
30003f08: e5d43047 ldrb r3, [r4, #71] ; 0x47
30003f0c: e5942020 ldr r2, [r4, #32]
30003f10: e1520003 cmp r2, r3
30003f14: aa000064 bge 300040ac <rtems_termios_read+0x2f8>
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
30003f18: e3530000 cmp r3, #0
30003f1c: 0affffdd beq 30003e98 <rtems_termios_read+0xe4>
30003f20: e5d43046 ldrb r3, [r4, #70] ; 0x46
30003f24: e3530000 cmp r3, #0
30003f28: 0affffda beq 30003e98 <rtems_termios_read+0xe4>
30003f2c: eaffffd7 b 30003e90 <rtems_termios_read+0xdc>
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)(
30003f30: 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;
30003f34: e594a074 ldr sl, [r4, #116] ; 0x74
rtems_status_code sc;
int wait = (int)1;
30003f38: e3a06001 mov r6, #1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
30003f3c: e59f91a8 ldr r9, [pc, #424] ; 300040ec <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)(
30003f40: e58d2000 str r2, [sp]
30003f44: ea000040 b 3000404c <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;
30003f48: e594005c ldr r0, [r4, #92] ; 0x5c
30003f4c: e5941064 ldr r1, [r4, #100] ; 0x64
30003f50: e2800001 add r0, r0, #1
30003f54: eb00311f bl 300103d8 <__umodsi3>
c = tty->rawInBuf.theBuf[newHead];
30003f58: e5943058 ldr r3, [r4, #88] ; 0x58
30003f5c: e7d3a000 ldrb sl, [r3, r0]
tty->rawInBuf.Head = newHead;
30003f60: e584005c str r0, [r4, #92] ; 0x5c
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
30003f64: e5943060 ldr r3, [r4, #96] ; 0x60
30003f68: e5942064 ldr r2, [r4, #100] ; 0x64
% tty->rawInBuf.Size)
30003f6c: 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)
30003f70: e0823003 add r3, r2, r3
% tty->rawInBuf.Size)
30003f74: e0600003 rsb r0, r0, r3
30003f78: eb003116 bl 300103d8 <__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)
30003f7c: e59430bc ldr r3, [r4, #188] ; 0xbc
30003f80: e1500003 cmp r0, r3
30003f84: 2a00001f bcs 30004008 <rtems_termios_read+0x254>
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
30003f88: e59430b8 ldr r3, [r4, #184] ; 0xb8
30003f8c: e3c33001 bic r3, r3, #1
30003f90: e58430b8 str r3, [r4, #184] ; 0xb8
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
30003f94: e59420b8 ldr r2, [r4, #184] ; 0xb8
30003f98: e59f3150 ldr r3, [pc, #336] ; 300040f0 <rtems_termios_read+0x33c>
30003f9c: e0023003 and r3, r2, r3
30003fa0: e59f2148 ldr r2, [pc, #328] ; 300040f0 <rtems_termios_read+0x33c>
30003fa4: e1530002 cmp r3, r2
30003fa8: 1a00000b bne 30003fdc <rtems_termios_read+0x228>
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
30003fac: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
30003fb0: e3530000 cmp r3, #0 <== NOT EXECUTED
30003fb4: 0a000002 beq 30003fc4 <rtems_termios_read+0x210> <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
30003fb8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30003fbc: e3130020 tst r3, #32 <== NOT EXECUTED
30003fc0: 0a000005 beq 30003fdc <rtems_termios_read+0x228> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
30003fc4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
30003fc8: e59d1000 ldr r1, [sp] <== NOT EXECUTED
30003fcc: e3a02001 mov r2, #1 <== NOT EXECUTED
30003fd0: e1a0e00f mov lr, pc <== NOT EXECUTED
30003fd4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
30003fd8: ea00000a b 30004008 <rtems_termios_read+0x254> <== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
30003fdc: e59430b8 ldr r3, [r4, #184] ; 0xb8
30003fe0: e3130c01 tst r3, #256 ; 0x100
30003fe4: 0a000007 beq 30004008 <rtems_termios_read+0x254>
tty->flow_ctrl &= ~FL_IRTSOFF;
30003fe8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30003fec: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
30003ff0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
30003ff4: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
30003ff8: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
30003ffc: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
30004000: 11a0e00f movne lr, pc <== NOT EXECUTED
30004004: 112fff13 bxne r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
30004008: e594303c ldr r3, [r4, #60] ; 0x3c
3000400c: e3130002 tst r3, #2
30004010: 0a000005 beq 3000402c <rtems_termios_read+0x278>
if (siproc (c, tty))
30004014: e1a0000a mov r0, sl
30004018: e1a01004 mov r1, r4
3000401c: ebffff1f bl 30003ca0 <siproc>
wait = 0;
30004020: e3500000 cmp r0, #0
30004024: 13a06000 movne r6, #0
30004028: ea000006 b 30004048 <rtems_termios_read+0x294>
} else {
siproc (c, tty);
3000402c: e1a0000a mov r0, sl <== NOT EXECUTED
30004030: e1a01004 mov r1, r4 <== NOT EXECUTED
30004034: ebffff19 bl 30003ca0 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
30004038: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
3000403c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
wait = 0;
30004040: e1520003 cmp r2, r3 <== NOT EXECUTED
30004044: a3a06000 movge r6, #0 <== NOT EXECUTED
}
timeout = tty->rawInBufSemaphoreTimeout;
30004048: e594a070 ldr sl, [r4, #112] ; 0x70
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3000404c: e594205c ldr r2, [r4, #92] ; 0x5c
30004050: e5943060 ldr r3, [r4, #96] ; 0x60
30004054: e1520003 cmp r2, r3
30004058: 0a000004 beq 30004070 <rtems_termios_read+0x2bc>
(tty->ccount < (CBUFSIZE-1))) {
3000405c: e5993008 ldr r3, [r9, #8]
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004060: e5942020 ldr r2, [r4, #32]
(tty->ccount < (CBUFSIZE-1))) {
30004064: e2433001 sub r3, r3, #1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004068: e1520003 cmp r2, r3
3000406c: baffffb5 blt 30003f48 <rtems_termios_read+0x194>
}
/*
* Wait for characters
*/
if ( wait ) {
30004070: e3560000 cmp r6, #0
30004074: 0a00000c beq 300040ac <rtems_termios_read+0x2f8>
sc = rtems_semaphore_obtain(
30004078: e5940068 ldr r0, [r4, #104] ; 0x68
3000407c: e594106c ldr r1, [r4, #108] ; 0x6c
30004080: e1a0200a mov r2, sl
30004084: eb0003d2 bl 30004fd4 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
30004088: e3500000 cmp r0, #0
3000408c: 0affffee beq 3000404c <rtems_termios_read+0x298>
30004090: ea000005 b 300040ac <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++];
30004094: e594201c ldr r2, [r4, #28]
count--;
30004098: 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++];
3000409c: e7d22003 ldrb r2, [r2, r3]
300040a0: e2833001 add r3, r3, #1
300040a4: e4cb2001 strb r2, [fp], #1
300040a8: e5843024 str r3, [r4, #36] ; 0x24
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
300040ac: e3580000 cmp r8, #0
300040b0: 0a000003 beq 300040c4 <rtems_termios_read+0x310>
300040b4: e5943024 ldr r3, [r4, #36] ; 0x24
300040b8: e5942020 ldr r2, [r4, #32]
300040bc: e1530002 cmp r3, r2
300040c0: bafffff3 blt 30004094 <rtems_termios_read+0x2e0>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
300040c4: e5953010 ldr r3, [r5, #16]
300040c8: e0688003 rsb r8, r8, r3
300040cc: e5858018 str r8, [r5, #24]
tty->tty_rcvwakeup = 0;
300040d0: e3a03000 mov r3, #0
300040d4: e58430e4 str r3, [r4, #228] ; 0xe4
rtems_semaphore_release (tty->isem);
300040d8: e5940014 ldr r0, [r4, #20]
300040dc: eb000402 bl 300050ec <rtems_semaphore_release>
return sc;
}
300040e0: e1a00007 mov r0, r7
300040e4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
30004404 <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))
30004404: e59020b8 ldr r2, [r0, #184] ; 0xb8
30004408: e59f31b8 ldr r3, [pc, #440] ; 300045c8 <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)
{
3000440c: 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))
30004410: e0023003 and r3, r2, r3
30004414: e59f21b0 ldr r2, [pc, #432] ; 300045cc <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)
{
30004418: 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))
3000441c: e1530002 cmp r3, r2
30004420: 1a00000c bne 30004458 <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);
30004424: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED
30004428: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED
3000442c: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
30004430: e1a0e00f mov lr, pc <== NOT EXECUTED
30004434: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
rtems_interrupt_disable(level);
30004438: ebfffa06 bl 30002c58 <arm_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
3000443c: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED
30004440: e2433001 sub r3, r3, #1 <== NOT EXECUTED
30004444: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
30004448: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000444c: e3833002 orr r3, r3, #2 <== NOT EXECUTED
30004450: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
rtems_interrupt_enable(level);
30004454: ea00000f b 30004498 <rtems_termios_refill_transmitter+0x94><== NOT EXECUTED
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
30004458: e59030b8 ldr r3, [r0, #184] ; 0xb8
3000445c: e2033003 and r3, r3, #3
30004460: e3530002 cmp r3, #2
30004464: 1a00000e bne 300044a4 <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);
30004468: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED
3000446c: e3a02001 mov r2, #1 <== NOT EXECUTED
30004470: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
30004474: e1a0e00f mov lr, pc <== NOT EXECUTED
30004478: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
rtems_interrupt_disable(level);
3000447c: ebfff9f5 bl 30002c58 <arm_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
30004480: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED
30004484: e2433001 sub r3, r3, #1 <== NOT EXECUTED
30004488: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
3000448c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004490: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
30004494: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004498: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
3000449c: e3a05001 mov r5, #1 <== NOT EXECUTED
300044a0: ea000046 b 300045c0 <rtems_termios_refill_transmitter+0x1bc><== NOT EXECUTED
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
300044a4: e5902080 ldr r2, [r0, #128] ; 0x80
300044a8: e5903084 ldr r3, [r0, #132] ; 0x84
300044ac: e1520003 cmp r2, r3
300044b0: 1a000005 bne 300044cc <rtems_termios_refill_transmitter+0xc8>
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
300044b4: e5903094 ldr r3, [r0, #148] ; 0x94
300044b8: e3530002 cmp r3, #2
300044bc: 1a00003e bne 300045bc <rtems_termios_refill_transmitter+0x1b8>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
300044c0: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED
300044c4: eb000308 bl 300050ec <rtems_semaphore_release> <== NOT EXECUTED
300044c8: ea00003b b 300045bc <rtems_termios_refill_transmitter+0x1b8><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
300044cc: ebfff9e1 bl 30002c58 <arm_interrupt_disable>
len = tty->t_dqlen;
tty->t_dqlen = 0;
300044d0: e3a03000 mov r3, #0
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
300044d4: e5942090 ldr r2, [r4, #144] ; 0x90
tty->t_dqlen = 0;
300044d8: e5843090 str r3, [r4, #144] ; 0x90
300044dc: e129f000 msr CPSR_fc, r0
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
300044e0: e5943084 ldr r3, [r4, #132] ; 0x84
300044e4: e5941088 ldr r1, [r4, #136] ; 0x88
300044e8: e0820003 add r0, r2, r3
300044ec: eb002fb9 bl 300103d8 <__umodsi3>
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
300044f0: 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;
300044f4: e1a06000 mov r6, r0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
300044f8: 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;
300044fc: e5840084 str r0, [r4, #132] ; 0x84
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
30004500: 0594008c ldreq r0, [r4, #140] ; 0x8c
30004504: 0b0002f8 bleq 300050ec <rtems_semaphore_release>
}
if (newTail == tty->rawOutBuf.Head) {
30004508: e5943080 ldr r3, [r4, #128] ; 0x80
3000450c: e1560003 cmp r6, r3
30004510: 1a00000a bne 30004540 <rtems_termios_refill_transmitter+0x13c>
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
30004514: e59430d4 ldr r3, [r4, #212] ; 0xd4
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
30004518: e3a05000 mov r5, #0
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
3000451c: e1530005 cmp r3, r5
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
30004520: e5845094 str r5, [r4, #148] ; 0x94
nToSend = 0;
30004524: 01a05003 moveq r5, r3
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
30004528: 0a000021 beq 300045b4 <rtems_termios_refill_transmitter+0x1b0>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
3000452c: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
30004530: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED
30004534: e1a0e00f mov lr, pc <== NOT EXECUTED
30004538: e12fff13 bx r3 <== NOT EXECUTED
3000453c: ea00001c b 300045b4 <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))
30004540: e59430b8 ldr r3, [r4, #184] ; 0xb8
30004544: e2033e21 and r3, r3, #528 ; 0x210
30004548: e3530e21 cmp r3, #528 ; 0x210
3000454c: 1a000008 bne 30004574 <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);
30004550: ebfff9c0 bl 30002c58 <arm_interrupt_disable> <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
30004554: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004558: e3833020 orr r3, r3, #32 <== NOT EXECUTED
3000455c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
30004560: e3a03001 mov r3, #1 <== NOT EXECUTED
30004564: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
30004568: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 0;
3000456c: e3a05000 mov r5, #0 <== NOT EXECUTED
30004570: ea00000f b 300045b4 <rtems_termios_refill_transmitter+0x1b0><== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
30004574: 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)(
30004578: e594107c ldr r1, [r4, #124] ; 0x7c
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
3000457c: e1560003 cmp r6, r3
nToSend = tty->rawOutBuf.Size - newTail;
30004580: 85945088 ldrhi r5, [r4, #136] ; 0x88
else
nToSend = tty->rawOutBuf.Head - newTail;
30004584: 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)) {
30004588: 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;
3000458c: 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)) {
30004590: e3130c06 tst r3, #1536 ; 0x600
nToSend = 1;
30004594: 13a05001 movne r5, #1
}
tty->rawOutBufState = rob_busy; /*apm*/
30004598: e3a03001 mov r3, #1
3000459c: e5843094 str r3, [r4, #148] ; 0x94
(*tty->device.write)(
300045a0: e5940010 ldr r0, [r4, #16]
300045a4: e0811006 add r1, r1, r6
300045a8: e1a02005 mov r2, r5
300045ac: e1a0e00f mov lr, pc
300045b0: e594f0a4 ldr pc, [r4, #164] ; 0xa4
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
300045b4: e5846084 str r6, [r4, #132] ; 0x84
300045b8: ea000000 b 300045c0 <rtems_termios_refill_transmitter+0x1bc>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
300045bc: e3a05000 mov r5, #0
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
300045c0: e1a00005 mov r0, r5
300045c4: e8bd8070 pop {r4, r5, r6, pc}
30003cfc <rtems_termios_write>:
rtems_status_code
rtems_termios_write (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003cfc: e5903000 ldr r3, [r0]
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
30003d00: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003d04: e5935034 ldr r5, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003d08: e3a01000 mov r1, #0
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
30003d0c: e1a04000 mov r4, r0
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003d10: e1a02001 mov r2, r1
30003d14: e5950018 ldr r0, [r5, #24]
30003d18: eb0004ad bl 30004fd4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
30003d1c: e2506000 subs r6, r0, #0
30003d20: 1a000020 bne 30003da8 <rtems_termios_write+0xac>
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
30003d24: e59520cc ldr r2, [r5, #204] ; 0xcc
30003d28: e59f3080 ldr r3, [pc, #128] ; 30003db0 <rtems_termios_write+0xb4>
30003d2c: e0833282 add r3, r3, r2, lsl #5
30003d30: e593300c ldr r3, [r3, #12]
30003d34: e3530000 cmp r3, #0
30003d38: 0a000005 beq 30003d54 <rtems_termios_write+0x58>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
30003d3c: e1a00005 mov r0, r5
30003d40: e1a01004 mov r1, r4
30003d44: e1a0e00f mov lr, pc
30003d48: e12fff13 bx r3
30003d4c: e1a06000 mov r6, r0
30003d50: ea000012 b 30003da0 <rtems_termios_write+0xa4>
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
30003d54: e5953034 ldr r3, [r5, #52] ; 0x34
30003d58: e3130001 tst r3, #1
uint32_t count = args->count;
30003d5c: 15947010 ldrne r7, [r4, #16]
char *buffer = args->buffer;
30003d60: 1594800c ldrne r8, [r4, #12]
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
30003d64: 1a000004 bne 30003d7c <rtems_termios_write+0x80>
30003d68: ea000006 b 30003d88 <rtems_termios_write+0x8c> <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
30003d6c: e4d80001 ldrb r0, [r8], #1
30003d70: e1a01005 mov r1, r5
30003d74: ebfffe7c bl 3000376c <oproc>
30003d78: e2477001 sub r7, r7, #1
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
30003d7c: e3570000 cmp r7, #0
30003d80: 1afffff9 bne 30003d6c <rtems_termios_write+0x70>
30003d84: ea000003 b 30003d98 <rtems_termios_write+0x9c>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
30003d88: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
30003d8c: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED
30003d90: e1a02005 mov r2, r5 <== NOT EXECUTED
30003d94: ebfffe34 bl 3000366c <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
30003d98: e5943010 ldr r3, [r4, #16]
30003d9c: e5843018 str r3, [r4, #24]
}
rtems_semaphore_release (tty->osem);
30003da0: e5950018 ldr r0, [r5, #24]
30003da4: eb0004d0 bl 300050ec <rtems_semaphore_release>
return sc;
}
30003da8: e1a00006 mov r0, r6
30003dac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
300062fc <rtems_verror>:
{
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
300062fc: e3100202 tst r0, #536870912 ; 0x20000000
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
30006300: e92d41f0 push {r4, r5, r6, r7, r8, lr}
30006304: e1a05000 mov r5, r0
30006308: e1a08001 mov r8, r1
3000630c: e1a04002 mov r4, r2
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
30006310: 0a00000e beq 30006350 <rtems_verror+0x54>
if (rtems_panic_in_progress++)
30006314: e59f212c ldr r2, [pc, #300] ; 30006448 <rtems_verror+0x14c>
30006318: e5923000 ldr r3, [r2]
3000631c: e2831001 add r1, r3, #1
30006320: e3530000 cmp r3, #0
30006324: e5821000 str r1, [r2]
30006328: 0a000003 beq 3000633c <rtems_verror+0x40>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
3000632c: e59f3118 ldr r3, [pc, #280] ; 3000644c <rtems_verror+0x150><== NOT EXECUTED
30006330: e5932000 ldr r2, [r3] <== NOT EXECUTED
30006334: e2822001 add r2, r2, #1 <== NOT EXECUTED
30006338: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
3000633c: e59f3104 ldr r3, [pc, #260] ; 30006448 <rtems_verror+0x14c>
30006340: e5933000 ldr r3, [r3]
30006344: e3530002 cmp r3, #2
return 0;
30006348: 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)
3000634c: ca00003b bgt 30006440 <rtems_verror+0x144>
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
30006350: e59f30f8 ldr r3, [pc, #248] ; 30006450 <rtems_verror+0x154>
status = error_flag & ~RTEMS_ERROR_MASK;
30006354: 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 */
30006358: e5933000 ldr r3, [r3]
3000635c: e5930008 ldr r0, [r3, #8]
30006360: eb002f1b bl 30011fd4 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
30006364: e2155101 ands r5, r5, #1073741824 ; 0x40000000
30006368: 0a000001 beq 30006374 <rtems_verror+0x78>
local_errno = errno;
3000636c: eb002e21 bl 30011bf8 <__errno>
30006370: 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);
30006374: e59f70d4 ldr r7, [pc, #212] ; 30006450 <rtems_verror+0x154>
30006378: e1a02004 mov r2, r4
3000637c: e5973000 ldr r3, [r7]
30006380: e1a01008 mov r1, r8
30006384: e593000c ldr r0, [r3, #12]
30006388: eb004783 bl 3001819c <vfprintf>
if (status)
3000638c: 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);
30006390: e1a04000 mov r4, r0
if (status)
30006394: 0a000008 beq 300063bc <rtems_verror+0xc0>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
30006398: e5973000 ldr r3, [r7]
3000639c: e1a00006 mov r0, r6
300063a0: e593700c ldr r7, [r3, #12]
300063a4: ebffffd0 bl 300062ec <rtems_status_text>
300063a8: e59f10a4 ldr r1, [pc, #164] ; 30006454 <rtems_verror+0x158>
300063ac: e1a02000 mov r2, r0
300063b0: e1a00007 mov r0, r7
300063b4: eb002fec bl 3001236c <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
300063b8: e0844000 add r4, r4, r0
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
300063bc: e3550000 cmp r5, #0
300063c0: 0a000015 beq 3000641c <rtems_verror+0x120>
if ((local_errno > 0) && *strerror(local_errno))
300063c4: da00000d ble 30006400 <rtems_verror+0x104>
300063c8: e1a00005 mov r0, r5
300063cc: eb0032e9 bl 30012f78 <strerror>
300063d0: e5d03000 ldrb r3, [r0]
300063d4: e3530000 cmp r3, #0
300063d8: 0a000008 beq 30006400 <rtems_verror+0x104>
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
300063dc: e59f306c ldr r3, [pc, #108] ; 30006450 <rtems_verror+0x154>
300063e0: e1a00005 mov r0, r5
300063e4: e5933000 ldr r3, [r3]
300063e8: e593600c ldr r6, [r3, #12]
300063ec: eb0032e1 bl 30012f78 <strerror>
300063f0: e59f1060 ldr r1, [pc, #96] ; 30006458 <rtems_verror+0x15c>
300063f4: e1a02000 mov r2, r0
300063f8: e1a00006 mov r0, r6
300063fc: ea000004 b 30006414 <rtems_verror+0x118>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
30006400: e59f3048 ldr r3, [pc, #72] ; 30006450 <rtems_verror+0x154>
30006404: e59f1050 ldr r1, [pc, #80] ; 3000645c <rtems_verror+0x160>
30006408: e5933000 ldr r3, [r3]
3000640c: e1a02005 mov r2, r5
30006410: e593000c ldr r0, [r3, #12]
30006414: eb002fd4 bl 3001236c <fprintf>
30006418: e0844000 add r4, r4, r0
}
chars_written += fprintf(stderr, "\n");
3000641c: e59f502c ldr r5, [pc, #44] ; 30006450 <rtems_verror+0x154>
30006420: e59f1038 ldr r1, [pc, #56] ; 30006460 <rtems_verror+0x164>
30006424: e5953000 ldr r3, [r5]
30006428: e593000c ldr r0, [r3, #12]
3000642c: eb002fce bl 3001236c <fprintf>
(void) fflush(stderr);
30006430: 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");
30006434: e0804004 add r4, r0, r4
(void) fflush(stderr);
30006438: e593000c ldr r0, [r3, #12]
3000643c: eb002ee4 bl 30011fd4 <fflush>
return chars_written;
}
30006440: e1a00004 mov r0, r4
30006444: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
30002500 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
30002500: 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;
30002504: e3a04000 mov r4, #0
int d;
for (;;) {
c = getc(fp);
30002508: e59fb0d8 ldr fp, [pc, #216] ; 300025e8 <scanInt+0xe8>
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
3000250c: e59f90d8 ldr r9, [pc, #216] ; 300025ec <scanInt+0xec>
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
30002510: e1a05000 mov r5, r0
30002514: e58d1000 str r1, [sp]
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
30002518: e3e08102 mvn r8, #-2147483648 ; 0x80000000
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
3000251c: e1a07004 mov r7, r4
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
30002520: e3a0a00a mov sl, #10
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
30002524: e5953004 ldr r3, [r5, #4]
30002528: e2433001 sub r3, r3, #1
3000252c: e3530000 cmp r3, #0
30002530: e5853004 str r3, [r5, #4]
30002534: a5953000 ldrge r3, [r5]
30002538: a4d36001 ldrbge r6, [r3], #1
3000253c: a5853000 strge r3, [r5]
30002540: aa000003 bge 30002554 <scanInt+0x54>
30002544: e59b0000 ldr r0, [fp] <== NOT EXECUTED
30002548: e1a01005 mov r1, r5 <== NOT EXECUTED
3000254c: eb003447 bl 3000f670 <__srget_r> <== NOT EXECUTED
30002550: e1a06000 mov r6, r0 <== NOT EXECUTED
if (c == ':')
30002554: e356003a cmp r6, #58 ; 0x3a
30002558: 0a000019 beq 300025c4 <scanInt+0xc4>
break;
if (sign == 0) {
3000255c: e3540000 cmp r4, #0
30002560: 1a000004 bne 30002578 <scanInt+0x78>
if (c == '-') {
30002564: e356002d cmp r6, #45 ; 0x2d
sign = -1;
limit++;
30002568: 02888001 addeq r8, r8, #1
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
3000256c: 03e04000 mvneq r4, #0
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
30002570: 0affffeb beq 30002524 <scanInt+0x24>
sign = -1;
limit++;
continue;
}
sign = 1;
30002574: e3a04001 mov r4, #1
}
if (!isdigit(c))
30002578: e5993000 ldr r3, [r9]
3000257c: e0833006 add r3, r3, r6
30002580: e5d30001 ldrb r0, [r3, #1]
30002584: e2100004 ands r0, r0, #4
30002588: 0a000015 beq 300025e4 <scanInt+0xe4>
return 0;
d = c - '0';
if ((i > (limit / 10))
3000258c: e1a00008 mov r0, r8
30002590: e3a0100a mov r1, #10
30002594: eb003d3f bl 30011a98 <__aeabi_uidiv>
30002598: e1570000 cmp r7, r0
3000259c: 8a00000f bhi 300025e0 <scanInt+0xe0>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
300025a0: e2466030 sub r6, r6, #48 ; 0x30
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
300025a4: 1a000004 bne 300025bc <scanInt+0xbc>
300025a8: e1a00008 mov r0, r8
300025ac: e3a0100a mov r1, #10
300025b0: eb003dd0 bl 30011cf8 <__umodsi3>
300025b4: e1560000 cmp r6, r0
300025b8: 8a000008 bhi 300025e0 <scanInt+0xe0>
return 0;
i = i * 10 + d;
300025bc: e027679a mla r7, sl, r7, r6
300025c0: eaffffd7 b 30002524 <scanInt+0x24>
}
if (sign == 0)
300025c4: e3540000 cmp r4, #0
return 0;
300025c8: 01a00004 moveq r0, r4
*val = i * sign;
300025cc: 10040497 mulne r4, r7, r4
300025d0: 159d3000 ldrne r3, [sp]
return 1;
300025d4: 13a00001 movne r0, #1
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
300025d8: 15834000 strne r4, [r3]
return 1;
300025dc: ea000000 b 300025e4 <scanInt+0xe4>
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
300025e0: e3a00000 mov r0, #0
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
300025e4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
30005890 <sigaction>:
struct sigaction *oact
)
{
ISR_Level level;
if ( oact )
30005890: e2523000 subs r3, r2, #0
*oact = _POSIX_signals_Vectors[ sig ];
30005894: 159f20b8 ldrne r2, [pc, #184] ; 30005954 <sigaction+0xc4>
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
30005898: e92d40f0 push {r4, r5, r6, r7, lr}
3000589c: e1a05001 mov r5, r1
ISR_Level level;
if ( oact )
*oact = _POSIX_signals_Vectors[ sig ];
300058a0: 13a0100c movne r1, #12
300058a4: 10222091 mlane r2, r1, r0, r2
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
300058a8: e1a04000 mov r4, r0
ISR_Level level;
if ( oact )
*oact = _POSIX_signals_Vectors[ sig ];
300058ac: 18920007 ldmne r2, {r0, r1, r2}
300058b0: 18830007 stmne r3, {r0, r1, r2}
if ( !sig )
300058b4: e3540000 cmp r4, #0
300058b8: 0a000004 beq 300058d0 <sigaction+0x40>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
300058bc: e2443001 sub r3, r4, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
300058c0: e353001f cmp r3, #31
300058c4: 8a000001 bhi 300058d0 <sigaction+0x40>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
300058c8: e3540009 cmp r4, #9
300058cc: 1a000004 bne 300058e4 <sigaction+0x54>
rtems_set_errno_and_return_minus_one( EINVAL );
300058d0: eb002104 bl 3000dce8 <__errno>
300058d4: e3a03016 mov r3, #22
300058d8: e5803000 str r3, [r0]
300058dc: e3e00000 mvn r0, #0
300058e0: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
300058e4: e3550000 cmp r5, #0
300058e8: 0a000017 beq 3000594c <sigaction+0xbc>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300058ec: e10f6000 mrs r6, CPSR
300058f0: e3863080 orr r3, r6, #128 ; 0x80
300058f4: e129f003 msr CPSR_fc, r3
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
300058f8: e5953008 ldr r3, [r5, #8]
300058fc: e59f7050 ldr r7, [pc, #80] ; 30005954 <sigaction+0xc4>
30005900: e3530000 cmp r3, #0
30005904: 1a000007 bne 30005928 <sigaction+0x98>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
30005908: e283300c add r3, r3, #12
3000590c: e0040493 mul r4, r3, r4
30005910: e59f2040 ldr r2, [pc, #64] ; 30005958 <sigaction+0xc8>
30005914: e0873004 add r3, r7, r4
30005918: e0824004 add r4, r2, r4
3000591c: e8940007 ldm r4, {r0, r1, r2}
30005920: e8830007 stm r3, {r0, r1, r2}
30005924: ea000005 b 30005940 <sigaction+0xb0>
} else {
_POSIX_signals_Clear_process_signals( sig );
30005928: e1a00004 mov r0, r4
3000592c: eb001575 bl 3000af08 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
30005930: e8950007 ldm r5, {r0, r1, r2}
30005934: e3a0300c mov r3, #12
30005938: e0247493 mla r4, r3, r4, r7
3000593c: e8840007 stm r4, {r0, r1, r2}
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30005940: e129f006 msr CPSR_fc, r6
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
30005944: e3a00000 mov r0, #0
30005948: e8bd80f0 pop {r4, r5, r6, r7, pc}
3000594c: e1a00005 mov r0, r5 <== NOT EXECUTED
}
30005950: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
30007f08 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
30007f08: e92d4010 push {r4, lr}
30007f0c: e1a04001 mov r4, r1
int status;
status = sigtimedwait( set, NULL, NULL );
30007f10: e3a01000 mov r1, #0
30007f14: e1a02001 mov r2, r1
30007f18: ebffff84 bl 30007d30 <sigtimedwait>
if ( status != -1 ) {
30007f1c: e3700001 cmn r0, #1
30007f20: 0a000004 beq 30007f38 <sigwait+0x30>
if ( sig )
30007f24: e3540000 cmp r4, #0
*sig = status;
30007f28: 15840000 strne r0, [r4]
return 0;
30007f2c: 13a00000 movne r0, #0
int status;
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
30007f30: 18bd8010 popne {r4, pc}
30007f34: ea000002 b 30007f44 <sigwait+0x3c> <== NOT EXECUTED
*sig = status;
return 0;
}
return errno;
30007f38: eb002032 bl 30010008 <__errno>
30007f3c: e5900000 ldr r0, [r0]
30007f40: e8bd8010 pop {r4, pc}
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
30007f44: e1a00004 mov r0, r4 <== NOT EXECUTED
}
return errno;
}
30007f48: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30003ca0 <siproc>:
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
30003ca0: e591203c ldr r2, [r1, #60] ; 0x3c
30003ca4: e59f304c ldr r3, [pc, #76] ; 30003cf8 <siproc+0x58>
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003ca8: 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)) {
30003cac: e0023003 and r3, r2, r3
30003cb0: e3530000 cmp r3, #0
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003cb4: e1a04001 mov r4, r1
30003cb8: 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)) {
30003cbc: 0a00000b beq 30003cf0 <siproc+0x50>
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003cc0: e5910018 ldr r0, [r1, #24]
30003cc4: e3a01000 mov r1, #0
30003cc8: e1a02001 mov r2, r1
30003ccc: eb0004c0 bl 30004fd4 <rtems_semaphore_obtain>
i = iproc (c, tty);
30003cd0: e1a01004 mov r1, r4
30003cd4: e1a00005 mov r0, r5
30003cd8: ebffff8b bl 30003b0c <iproc>
30003cdc: e1a05000 mov r5, r0
rtems_semaphore_release (tty->osem);
30003ce0: e5940018 ldr r0, [r4, #24]
30003ce4: eb000500 bl 300050ec <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
30003ce8: e1a00005 mov r0, r5
30003cec: e8bd8030 pop {r4, r5, pc}
30003cf0: 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);
30003cf4: eaffff84 b 30003b0c <iproc> <== NOT EXECUTED
30005b68 <unmount>:
*/
int unmount(
const char *path
)
{
30005b68: e92d4070 push {r4, r5, r6, lr}
30005b6c: e24dd018 sub sp, sp, #24
30005b70: 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 ) )
30005b74: eb002602 bl 3000f384 <strlen>
30005b78: e28d4004 add r4, sp, #4
30005b7c: e3a03001 mov r3, #1
30005b80: e1a01000 mov r1, r0
30005b84: e58d3000 str r3, [sp]
30005b88: e1a00005 mov r0, r5
30005b8c: e3a02000 mov r2, #0
30005b90: e1a03004 mov r3, r4
30005b94: ebfff475 bl 30002d70 <rtems_filesystem_evaluate_path>
30005b98: e3500000 cmp r0, #0
30005b9c: 1a000040 bne 30005ca4 <unmount+0x13c>
return -1;
mt_entry = loc.mt_entry;
30005ba0: 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 ){
30005ba4: e59d3004 ldr r3, [sp, #4]
30005ba8: e595201c ldr r2, [r5, #28]
30005bac: e1520003 cmp r2, r3
30005bb0: 0a000004 beq 30005bc8 <unmount+0x60>
rtems_filesystem_freenode( &loc );
30005bb4: e1a00004 mov r0, r4
30005bb8: ebfff49c bl 30002e30 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
30005bbc: eb002078 bl 3000dda4 <__errno>
30005bc0: e3a0300d mov r3, #13
30005bc4: ea000011 b 30005c10 <unmount+0xa8>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
30005bc8: e1a00004 mov r0, r4
30005bcc: ebfff497 bl 30002e30 <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 )
30005bd0: e59f30d8 ldr r3, [pc, #216] ; 30005cb0 <unmount+0x148>
30005bd4: e5933000 ldr r3, [r3]
30005bd8: e5933014 ldr r3, [r3, #20]
30005bdc: e1530005 cmp r3, r5
30005be0: 0a000008 beq 30005c08 <unmount+0xa0>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
30005be4: e59f00c8 ldr r0, [pc, #200] ; 30005cb4 <unmount+0x14c>
30005be8: e595102c ldr r1, [r5, #44] ; 0x2c
30005bec: ebfff6b1 bl 300036b8 <rtems_filesystem_mount_iterate>
30005bf0: e3500000 cmp r0, #0
30005bf4: 1a000003 bne 30005c08 <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 )
30005bf8: e1a00005 mov r0, r5
30005bfc: ebfff566 bl 3000319c <rtems_libio_is_open_files_in_fs>
30005c00: e3500001 cmp r0, #1
30005c04: 1a000003 bne 30005c18 <unmount+0xb0>
rtems_set_errno_and_return_minus_one( EBUSY );
30005c08: eb002065 bl 3000dda4 <__errno>
30005c0c: e3a03010 mov r3, #16
30005c10: e5803000 str r3, [r0]
30005c14: ea000022 b 30005ca4 <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 )
30005c18: e5953014 ldr r3, [r5, #20]
30005c1c: e1a00005 mov r0, r5
30005c20: e1a0e00f mov lr, pc
30005c24: e593f028 ldr pc, [r3, #40] ; 0x28
30005c28: e2506000 subs r6, r0, #0
30005c2c: 1a00001c bne 30005ca4 <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){
30005c30: e5953028 ldr r3, [r5, #40] ; 0x28
30005c34: e1a00005 mov r0, r5
30005c38: e1a0e00f mov lr, pc
30005c3c: e593f02c ldr pc, [r3, #44] ; 0x2c
30005c40: e2504000 subs r4, r0, #0
30005c44: 0a000007 beq 30005c68 <unmount+0x100>
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
30005c48: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
30005c4c: e1a00005 mov r0, r5 <== NOT EXECUTED
30005c50: e1a0e00f mov lr, pc <== NOT EXECUTED
30005c54: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED
30005c58: e3500000 cmp r0, #0 <== NOT EXECUTED
30005c5c: 0a000010 beq 30005ca4 <unmount+0x13c> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
30005c60: e1a00006 mov r0, r6 <== NOT EXECUTED
30005c64: eb0003df bl 30006be8 <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 );
30005c68: e59f6048 ldr r6, [pc, #72] ; 30005cb8 <unmount+0x150>
30005c6c: e1a01004 mov r1, r4
30005c70: e1a02004 mov r2, r4
30005c74: e5960000 ldr r0, [r6]
30005c78: eb00025b bl 300065ec <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
30005c7c: e1a00005 mov r0, r5
30005c80: eb0004a0 bl 30006f08 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
30005c84: e5960000 ldr r0, [r6]
30005c88: eb00029d bl 30006704 <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 );
30005c8c: e2850008 add r0, r5, #8
30005c90: ebfff466 bl 30002e30 <rtems_filesystem_freenode>
free( mt_entry );
30005c94: e1a00005 mov r0, r5
30005c98: ebfff469 bl 30002e44 <free>
return 0;
30005c9c: e1a00004 mov r0, r4
30005ca0: ea000000 b 30005ca8 <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;
30005ca4: e3e00000 mvn r0, #0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
30005ca8: e28dd018 add sp, sp, #24
30005cac: e8bd8070 pop {r4, r5, r6, pc}