RTEMS 4.11Annotated Report
Sat Jan 8 18:58:51 2011
00008c68 <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 ) {
8c68: e5902000 ldr r2, [r0]
8c6c: 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;
8c70: e5903010 ldr r3, [r0, #16]
switch( node->type ) {
8c74: e2422001 sub r2, r2, #1
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
8c78: e5933034 ldr r3, [r3, #52] ; 0x34
switch( node->type ) {
8c7c: e3520006 cmp r2, #6
8c80: 979ff102 ldrls pc, [pc, r2, lsl #2]
8c84: ea000010 b 8ccc <IMFS_Set_handlers+0x64> <== NOT EXECUTED
8c88: 00008ca4 .word 0x00008ca4 <== NOT EXECUTED
8c8c: 00008cac .word 0x00008cac <== NOT EXECUTED
8c90: 00008cb4 .word 0x00008cb4 <== NOT EXECUTED
8c94: 00008cb4 .word 0x00008cb4 <== NOT EXECUTED
8c98: 00008cbc .word 0x00008cbc <== NOT EXECUTED
8c9c: 00008cbc .word 0x00008cbc <== NOT EXECUTED
8ca0: 00008cc4 .word 0x00008cc4 <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
8ca4: e593300c ldr r3, [r3, #12]
8ca8: ea000006 b 8cc8 <IMFS_Set_handlers+0x60>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
8cac: e59f3020 ldr r3, [pc, #32] ; 8cd4 <IMFS_Set_handlers+0x6c>
8cb0: ea000004 b 8cc8 <IMFS_Set_handlers+0x60>
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
8cb4: e59f301c ldr r3, [pc, #28] ; 8cd8 <IMFS_Set_handlers+0x70>
8cb8: ea000002 b 8cc8 <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;
8cbc: e5933008 ldr r3, [r3, #8]
8cc0: ea000000 b 8cc8 <IMFS_Set_handlers+0x60>
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
8cc4: e5933010 ldr r3, [r3, #16]
8cc8: e5803008 str r3, [r0, #8]
break;
}
return 0;
}
8ccc: e3a00000 mov r0, #0
8cd0: e12fff1e bx lr
00008d68 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
8d68: 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 ) ) {
8d6c: e3d27007 bics r7, r2, #7
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
8d70: e24dd040 sub sp, sp, #64 ; 0x40
8d74: e58d0000 str r0, [sp]
8d78: e1a06001 mov r6, r1
8d7c: e1a08002 mov r8, r2
8d80: e1a04003 mov r4, r3
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
8d84: 05935000 ldreq r5, [r3]
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
int len;
IMFS_token_types type = IMFS_CURRENT_DIR;
8d88: 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 );
8d8c: 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 ) ) {
8d90: 0a000057 beq 8ef4 <IMFS_eval_path+0x18c>
rtems_set_errno_and_return_minus_one( EIO );
8d94: eb000ccf bl c0d8 <__errno> <== NOT EXECUTED
8d98: e3a03005 mov r3, #5 <== NOT EXECUTED
8d9c: ea00007e b 8f9c <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 );
8da0: e59d2000 ldr r2, [sp]
8da4: e28d303c add r3, sp, #60 ; 0x3c
8da8: e0820007 add r0, r2, r7
8dac: e1a01006 mov r1, r6
8db0: e1a0200a mov r2, sl
8db4: eb0001ae bl 9474 <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
8db8: e5943000 ldr r3, [r4]
8dbc: e3530000 cmp r3, #0
* 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 );
8dc0: e1a09000 mov r9, r0
pathnamelen -= len;
8dc4: e59db03c ldr fp, [sp, #60] ; 0x3c
i += len;
if ( !pathloc->node_access )
8dc8: 0a000041 beq 8ed4 <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 )
8dcc: e3500000 cmp r0, #0
8dd0: 0a000006 beq 8df0 <IMFS_eval_path+0x88>
if ( node->type == IMFS_DIRECTORY )
8dd4: e595104c ldr r1, [r5, #76] ; 0x4c
8dd8: e3510001 cmp r1, #1
8ddc: 1a000003 bne 8df0 <IMFS_eval_path+0x88>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
8de0: e1a00004 mov r0, r4
8de4: ebffffbc bl 8cdc <IMFS_evaluate_permission>
8de8: e3500000 cmp r0, #0
8dec: 0a000068 beq 8f94 <IMFS_eval_path+0x22c>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
8df0: 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;
8df4: e06b6006 rsb r6, fp, r6
i += len;
8df8: 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;
8dfc: e5945000 ldr r5, [r4]
switch( type ) {
8e00: 0a000014 beq 8e58 <IMFS_eval_path+0xf0>
8e04: e3590004 cmp r9, #4
8e08: 0a000036 beq 8ee8 <IMFS_eval_path+0x180>
8e0c: e3590002 cmp r9, #2
8e10: 1a000037 bne 8ef4 <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 )
8e14: e59fc194 ldr ip, [pc, #404] ; 8fb0 <IMFS_eval_path+0x248>
8e18: e59c3000 ldr r3, [ip]
8e1c: e5933018 ldr r3, [r3, #24]
8e20: e1550003 cmp r5, r3
8e24: 0a000032 beq 8ef4 <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) {
8e28: e594e010 ldr lr, [r4, #16]
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
8e2c: e59e301c ldr r3, [lr, #28]
8e30: 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;
8e34: 028dc028 addeq ip, sp, #40 ; 0x28
8e38: 028ee008 addeq lr, lr, #8
8e3c: 0a000037 beq 8f20 <IMFS_eval_path+0x1b8>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
8e40: e5955008 ldr r5, [r5, #8]
8e44: e3550000 cmp r5, #0
8e48: 1a000024 bne 8ee0 <IMFS_eval_path+0x178>
rtems_set_errno_and_return_minus_one( ENOENT );
8e4c: eb000ca1 bl c0d8 <__errno>
8e50: e5809000 str r9, [r0]
8e54: ea000051 b 8fa0 <IMFS_eval_path+0x238>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
8e58: e595304c ldr r3, [r5, #76] ; 0x4c
8e5c: e3530003 cmp r3, #3
8e60: 1a000004 bne 8e78 <IMFS_eval_path+0x110>
IMFS_evaluate_hard_link( pathloc, 0 );
8e64: e1a00004 mov r0, r4
8e68: e3a01000 mov r1, #0
8e6c: ebffffaa bl 8d1c <IMFS_evaluate_hard_link>
node = pathloc->node_access;
8e70: e5945000 ldr r5, [r4]
8e74: ea000008 b 8e9c <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 ) {
8e78: e3530004 cmp r3, #4
8e7c: 1a000006 bne 8e9c <IMFS_eval_path+0x134>
result = IMFS_evaluate_sym_link( pathloc, 0 );
8e80: e1a00004 mov r0, r4
8e84: e3a01000 mov r1, #0
8e88: eb000049 bl 8fb4 <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 )
8e8c: e3700001 cmn r0, #1
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
8e90: e1a0b000 mov fp, r0
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
8e94: e5945000 ldr r5, [r4]
if ( result == -1 )
8e98: 0a000041 beq 8fa4 <IMFS_eval_path+0x23c>
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
8e9c: e595304c ldr r3, [r5, #76] ; 0x4c
8ea0: e3530001 cmp r3, #1
8ea4: 0a000002 beq 8eb4 <IMFS_eval_path+0x14c>
rtems_set_errno_and_return_minus_one( ENOTDIR );
8ea8: eb000c8a bl c0d8 <__errno>
8eac: e3a03014 mov r3, #20
8eb0: ea000039 b 8f9c <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 ) {
8eb4: e595e05c ldr lr, [r5, #92] ; 0x5c
8eb8: e35e0000 cmp lr, #0
8ebc: 1a000015 bne 8f18 <IMFS_eval_path+0x1b0>
}
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
8ec0: e1a00005 mov r0, r5
8ec4: e1a0100a mov r1, sl
8ec8: eb000149 bl 93f4 <IMFS_find_match_in_dir>
if ( !node )
8ecc: e2505000 subs r5, r0, #0
8ed0: 1a000002 bne 8ee0 <IMFS_eval_path+0x178>
rtems_set_errno_and_return_minus_one( ENOENT );
8ed4: eb000c7f bl c0d8 <__errno>
8ed8: e3a03002 mov r3, #2
8edc: ea00002e b 8f9c <IMFS_eval_path+0x234>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
8ee0: e5845000 str r5, [r4]
8ee4: ea000002 b 8ef4 <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 );
8ee8: eb000c7a bl c0d8 <__errno>
8eec: e3a0305b mov r3, #91 ; 0x5b
8ef0: ea000029 b 8f9c <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) ) {
8ef4: e3590004 cmp r9, #4
8ef8: 13590000 cmpne r9, #0
8efc: 1affffa7 bne 8da0 <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 ) {
8f00: e595304c ldr r3, [r5, #76] ; 0x4c
8f04: e3530001 cmp r3, #1
8f08: 1a000019 bne 8f74 <IMFS_eval_path+0x20c>
if ( node->info.directory.mt_fs != NULL ) {
8f0c: e595e05c ldr lr, [r5, #92] ; 0x5c
8f10: e35e0000 cmp lr, #0
8f14: 0a000016 beq 8f74 <IMFS_eval_path+0x20c>
newloc = node->info.directory.mt_fs->mt_fs_root;
8f18: e28dc028 add ip, sp, #40 ; 0x28
8f1c: e28ee01c add lr, lr, #28
8f20: e8be000f ldm lr!, {r0, r1, r2, r3}
8f24: e8ac000f stmia ip!, {r0, r1, r2, r3}
8f28: e59ee000 ldr lr, [lr]
8f2c: e58ce000 str lr, [ip]
*pathloc = newloc;
8f30: e28dc028 add ip, sp, #40 ; 0x28
8f34: e8bc000f ldm ip!, {r0, r1, r2, r3}
8f38: e1a0c004 mov ip, r4
8f3c: e8ac000f stmia ip!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
8f40: e59d103c ldr r1, [sp, #60] ; 0x3c
8f44: 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;
8f48: e58ce000 str lr, [ip]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
8f4c: e0610007 rsb r0, r1, r7
8f50: e0820000 add r0, r2, r0
8f54: e594c00c ldr ip, [r4, #12]
8f58: e0861001 add r1, r6, r1
8f5c: e1a02008 mov r2, r8
8f60: e1a03004 mov r3, r4
8f64: e1a0e00f mov lr, pc
8f68: e59cf000 ldr pc, [ip]
8f6c: e1a0b000 mov fp, r0
8f70: ea00000b b 8fa4 <IMFS_eval_path+0x23c>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
8f74: e1a00004 mov r0, r4
8f78: ebffff3a bl 8c68 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
8f7c: e1a01008 mov r1, r8
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
8f80: e1a0b000 mov fp, r0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
8f84: e1a00004 mov r0, r4
8f88: ebffff53 bl 8cdc <IMFS_evaluate_permission>
8f8c: e3500000 cmp r0, #0
8f90: 1a000003 bne 8fa4 <IMFS_eval_path+0x23c>
rtems_set_errno_and_return_minus_one( EACCES );
8f94: eb000c4f bl c0d8 <__errno>
8f98: e3a0300d mov r3, #13
8f9c: e5803000 str r3, [r0]
8fa0: e3e0b000 mvn fp, #0
return result;
}
8fa4: e1a0000b mov r0, fp
8fa8: e28dd040 add sp, sp, #64 ; 0x40
8fac: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
000090f0 <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 */
)
{
90f0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
90f4: e24dd03c sub sp, sp, #60 ; 0x3c
90f8: e1a07000 mov r7, r0
90fc: e1a04001 mov r4, r1
9100: e1a0a002 mov sl, r2
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
9104: e5916000 ldr r6, [r1]
/*
* Get the path length.
*/
pathlen = strlen( path );
9108: eb000fdc bl d080 <strlen>
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
910c: e3a05000 mov r5, #0
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
9110: 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 );
9114: e1a01008 mov r1, r8
9118: e28d3038 add r3, sp, #56 ; 0x38
911c: e0870005 add r0, r7, r5
9120: e1a0200d mov r2, sp
9124: eb0000d2 bl 9474 <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
9128: e5943000 ldr r3, [r4]
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
912c: e59db038 ldr fp, [sp, #56] ; 0x38
i += len;
if ( !pathloc->node_access )
9130: 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 );
9134: e1a09000 mov r9, r0
pathlen -= len;
9138: e06b8008 rsb r8, fp, r8
i += len;
if ( !pathloc->node_access )
913c: 0a000060 beq 92c4 <IMFS_evaluate_for_make+0x1d4>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
9140: e3500000 cmp r0, #0
9144: 0a000006 beq 9164 <IMFS_evaluate_for_make+0x74>
if ( node->type == IMFS_DIRECTORY )
9148: e596104c ldr r1, [r6, #76] ; 0x4c
914c: e3510001 cmp r1, #1
9150: 1a000003 bne 9164 <IMFS_evaluate_for_make+0x74>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
9154: e1a00004 mov r0, r4
9158: ebfffedf bl 8cdc <IMFS_evaluate_permission>
915c: e3500000 cmp r0, #0
9160: 0a00006c beq 9318 <IMFS_evaluate_for_make+0x228>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
9164: e5943000 ldr r3, [r4]
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
9168: 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;
916c: e1a06003 mov r6, r3
switch( type ) {
9170: e3590004 cmp r9, #4
9174: 979ff109 ldrls pc, [pc, r9, lsl #2]
9178: eaffffe5 b 9114 <IMFS_evaluate_for_make+0x24> <== NOT EXECUTED
917c: 00009288 .word 0x00009288 <== NOT EXECUTED
9180: 00009114 .word 0x00009114 <== NOT EXECUTED
9184: 00009190 .word 0x00009190 <== NOT EXECUTED
9188: 000091cc .word 0x000091cc <== NOT EXECUTED
918c: 00009294 .word 0x00009294 <== 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 )
9190: e59f119c ldr r1, [pc, #412] ; 9334 <IMFS_evaluate_for_make+0x244>
9194: e5912000 ldr r2, [r1]
9198: e5922018 ldr r2, [r2, #24]
919c: e1530002 cmp r3, r2
91a0: 0affffdb beq 9114 <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){
91a4: e594e010 ldr lr, [r4, #16]
91a8: e59e201c ldr r2, [lr, #28]
91ac: e1530002 cmp r3, r2
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
91b0: 028dc024 addeq ip, sp, #36 ; 0x24
91b4: 028ee008 addeq lr, lr, #8
91b8: 0a000019 beq 9224 <IMFS_evaluate_for_make+0x134>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
91bc: e5936008 ldr r6, [r3, #8]
91c0: e3560000 cmp r6, #0
91c4: 1a00002d bne 9280 <IMFS_evaluate_for_make+0x190>
91c8: ea00003d b 92c4 <IMFS_evaluate_for_make+0x1d4>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
91cc: e593304c ldr r3, [r3, #76] ; 0x4c
91d0: e3530003 cmp r3, #3
91d4: 0a000001 beq 91e0 <IMFS_evaluate_for_make+0xf0>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
91d8: e3530004 cmp r3, #4
91dc: 1a000005 bne 91f8 <IMFS_evaluate_for_make+0x108>
result = IMFS_evaluate_link( pathloc, 0 );
91e0: e1a00004 mov r0, r4
91e4: e3a01000 mov r1, #0
91e8: ebffff93 bl 903c <IMFS_evaluate_link>
if ( result == -1 )
91ec: e3700001 cmn r0, #1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
91f0: e1a06000 mov r6, r0
if ( result == -1 )
91f4: 0a00004b beq 9328 <IMFS_evaluate_for_make+0x238>
return -1;
}
node = pathloc->node_access;
91f8: e5940000 ldr r0, [r4]
if ( !node )
91fc: e3500000 cmp r0, #0
9200: 0a00003c beq 92f8 <IMFS_evaluate_for_make+0x208>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
9204: e590304c ldr r3, [r0, #76] ; 0x4c
9208: e3530001 cmp r3, #1
920c: 1a000039 bne 92f8 <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 ) {
9210: e590e05c ldr lr, [r0, #92] ; 0x5c
9214: e35e0000 cmp lr, #0
9218: 0a000014 beq 9270 <IMFS_evaluate_for_make+0x180>
newloc = node->info.directory.mt_fs->mt_fs_root;
921c: e28dc024 add ip, sp, #36 ; 0x24
9220: e28ee01c add lr, lr, #28
9224: e8be000f ldm lr!, {r0, r1, r2, r3}
9228: e8ac000f stmia ip!, {r0, r1, r2, r3}
922c: e59ee000 ldr lr, [lr]
9230: e58ce000 str lr, [ip]
*pathloc = newloc;
9234: e28dc024 add ip, sp, #36 ; 0x24
9238: e8bc000f ldm ip!, {r0, r1, r2, r3}
923c: e1a0c004 mov ip, r4
9240: e8ac000f stmia ip!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
9244: 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;
9248: e58ce000 str lr, [ip]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
924c: e0625005 rsb r5, r2, r5
9250: e594300c ldr r3, [r4, #12]
9254: e0870005 add r0, r7, r5
9258: e1a01004 mov r1, r4
925c: e1a0200a mov r2, sl
9260: e1a0e00f mov lr, pc
9264: e593f004 ldr pc, [r3, #4]
9268: e1a06000 mov r6, r0
926c: ea00002d b 9328 <IMFS_evaluate_for_make+0x238>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
9270: e1a0100d mov r1, sp
9274: eb00005e bl 93f4 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
9278: e2506000 subs r6, r0, #0
927c: 0a000007 beq 92a0 <IMFS_evaluate_for_make+0x1b0>
done = true;
else
pathloc->node_access = node;
9280: e5846000 str r6, [r4]
9284: eaffffa2 b 9114 <IMFS_evaluate_for_make+0x24>
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
9288: eb000b92 bl c0d8 <__errno>
928c: e3a03011 mov r3, #17
9290: ea000022 b 9320 <IMFS_evaluate_for_make+0x230>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
9294: eb000b8f bl c0d8 <__errno>
9298: e3a0305b mov r3, #91 ; 0x5b
929c: ea00001f b 9320 <IMFS_evaluate_for_make+0x230>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
92a0: e59d3038 ldr r3, [sp, #56] ; 0x38
92a4: e0633005 rsb r3, r3, r5
92a8: e0873003 add r3, r7, r3
92ac: 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(
92b0: 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++) {
92b4: ea000005 b 92d0 <IMFS_evaluate_for_make+0x1e0>
if ( !IMFS_is_separator( path[ i ] ) )
92b8: ebffe708 bl 2ee0 <rtems_filesystem_is_separator>
92bc: e3500000 cmp r0, #0
92c0: 1a000002 bne 92d0 <IMFS_evaluate_for_make+0x1e0>
rtems_set_errno_and_return_minus_one( ENOENT );
92c4: eb000b83 bl c0d8 <__errno>
92c8: e3a03002 mov r3, #2
92cc: ea000013 b 9320 <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++) {
92d0: e4d50001 ldrb r0, [r5], #1
92d4: e3500000 cmp r0, #0
92d8: 1afffff6 bne 92b8 <IMFS_evaluate_for_make+0x1c8>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
92dc: e1a00004 mov r0, r4
92e0: ebfffe60 bl 8c68 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
92e4: e5943000 ldr r3, [r4]
92e8: e593304c ldr r3, [r3, #76] ; 0x4c
92ec: e3530001 cmp r3, #1
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
92f0: e1a06000 mov r6, r0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
92f4: 0a000002 beq 9304 <IMFS_evaluate_for_make+0x214>
rtems_set_errno_and_return_minus_one( ENOTDIR );
92f8: eb000b76 bl c0d8 <__errno>
92fc: e3a03014 mov r3, #20
9300: ea000006 b 9320 <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 ) )
9304: e1a00004 mov r0, r4
9308: e3a01003 mov r1, #3
930c: ebfffe72 bl 8cdc <IMFS_evaluate_permission>
9310: e3500000 cmp r0, #0
9314: 1a000003 bne 9328 <IMFS_evaluate_for_make+0x238>
rtems_set_errno_and_return_minus_one( EACCES );
9318: eb000b6e bl c0d8 <__errno>
931c: e3a0300d mov r3, #13
9320: e5803000 str r3, [r0]
9324: e3e06000 mvn r6, #0
return result;
}
9328: e1a00006 mov r0, r6
932c: e28dd03c add sp, sp, #60 ; 0x3c
9330: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
00008cdc <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 ) )
8cdc: e3d13007 bics r3, r1, #7
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
8ce0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
8ce4: 0a000004 beq 8cfc <IMFS_evaluate_permission+0x20>
rtems_set_errno_and_return_minus_one( EPERM );
8ce8: eb000cfa bl c0d8 <__errno> <== NOT EXECUTED
8cec: e3a03001 mov r3, #1 <== NOT EXECUTED
8cf0: e5803000 str r3, [r0] <== NOT EXECUTED
8cf4: e3e00000 mvn r0, #0 <== NOT EXECUTED
8cf8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
8cfc: e5903000 ldr r3, [r0]
8d00: e5930030 ldr r0, [r3, #48] ; 0x30
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
8d04: e1a01301 lsl r1, r1, #6
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
8d08: e0010000 and r0, r1, 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 );
8d0c: e1500001 cmp r0, r1
8d10: 13a00000 movne r0, #0
8d14: 03a00001 moveq r0, #1
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
8d18: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00009338 <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
)
{
9338: 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;
933c: e1a0c000 mov ip, r0
9340: e5bc401c ldr r4, [ip, #28]!
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
9344: e1a05000 mov r5, r0
9348: 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;
loc = temp_mt_entry->mt_fs_root;
934c: e8bc000f ldm ip!, {r0, r1, r2, r3}
9350: e1a0e00d mov lr, sp
9354: e8ae000f stmia lr!, {r0, r1, r2, r3}
9358: e59c3000 ldr r3, [ip]
935c: e58e3000 str r3, [lr]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
9360: e3a03000 mov r3, #0
9364: e585301c str r3, [r5, #28]
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
9368: e1a0500d mov r5, sp
936c: e1a0000d mov r0, sp
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
9370: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode;
9374: e58d4000 str r4, [sp]
IMFS_Set_handlers( &loc );
9378: ebfffe3a bl 8c68 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
937c: e594304c ldr r3, [r4, #76] ; 0x4c
9380: e3530001 cmp r3, #1
9384: 1a000003 bne 9398 <IMFS_fsunmount+0x60>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
9388: e5942050 ldr r2, [r4, #80] ; 0x50
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
938c: e2843054 add r3, r4, #84 ; 0x54
9390: e1520003 cmp r2, r3
9394: 1a000005 bne 93b0 <IMFS_fsunmount+0x78>
result = IMFS_unlink( NULL, &loc );
9398: e3a00000 mov r0, #0
939c: e1a0100d mov r1, sp
93a0: ebffe223 bl 1c34 <IMFS_unlink>
if (result != 0)
93a4: e3500000 cmp r0, #0
93a8: 1a00000c bne 93e0 <IMFS_fsunmount+0xa8>
return -1;
jnode = next;
93ac: e1a04006 mov r4, r6
}
if ( jnode != NULL ) {
93b0: e3540000 cmp r4, #0
93b4: 0a00000b beq 93e8 <IMFS_fsunmount+0xb0>
if ( jnode->type == IMFS_DIRECTORY ) {
93b8: e594304c ldr r3, [r4, #76] ; 0x4c
93bc: e3530001 cmp r3, #1
93c0: 1affffe9 bne 936c <IMFS_fsunmount+0x34>
}
}
} while (jnode != NULL);
return 0;
}
93c4: e5943050 ldr r3, [r4, #80] ; 0x50
93c8: e2842054 add r2, r4, #84 ; 0x54
return -1;
jnode = next;
}
if ( jnode != NULL ) {
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
93cc: e1530002 cmp r3, r2
93d0: 0affffe5 beq 936c <IMFS_fsunmount+0x34>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
93d4: e2534000 subs r4, r3, #0
93d8: 1affffe3 bne 936c <IMFS_fsunmount+0x34>
93dc: ea000001 b 93e8 <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;
93e0: e3e00000 mvn r0, #0 <== NOT EXECUTED
93e4: ea000000 b 93ec <IMFS_fsunmount+0xb4> <== NOT EXECUTED
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
return 0;
93e8: e1a00004 mov r0, r4
}
93ec: e28dd014 add sp, sp, #20
93f0: e8bd8070 pop {r4, r5, r6, pc}
0000ac80 <IMFS_memfile_get_block_pointer>:
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ac80: e59f31e4 ldr r3, [pc, #484] ; ae6c <IMFS_memfile_get_block_pointer+0x1ec>
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ac84: 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 ) {
ac88: e5935000 ldr r5, [r3]
ac8c: e1a05125 lsr r5, r5, #2
ac90: e2453001 sub r3, r5, #1
ac94: e1510003 cmp r1, r3
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ac98: e1a04000 mov r4, r0
ac9c: e1a06001 mov r6, r1
aca0: e1a08002 mov r8, r2
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
aca4: 8a00000e bhi ace4 <IMFS_memfile_get_block_pointer+0x64>
p = info->indirect;
if ( malloc_it ) {
aca8: e3520000 cmp r2, #0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
acac: e5900058 ldr r0, [r0, #88] ; 0x58
if ( malloc_it ) {
acb0: 0a000007 beq acd4 <IMFS_memfile_get_block_pointer+0x54>
if ( !p ) {
acb4: e3500000 cmp r0, #0
acb8: 1a000003 bne accc <IMFS_memfile_get_block_pointer+0x4c>
p = memfile_alloc_block();
acbc: ebffffe2 bl ac4c <memfile_alloc_block>
if ( !p )
acc0: e3500000 cmp r0, #0
acc4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
info->indirect = p;
acc8: e5840058 str r0, [r4, #88] ; 0x58
}
return &info->indirect[ my_block ];
accc: e5940058 ldr r0, [r4, #88] ; 0x58
acd0: ea000001 b acdc <IMFS_memfile_get_block_pointer+0x5c>
}
if ( !p )
acd4: e3500000 cmp r0, #0
acd8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
return &info->indirect[ my_block ];
acdc: e0800106 add r0, r0, r6, lsl #2
ace0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
ace4: e2853001 add r3, r5, #1
ace8: e0030395 mul r3, r5, r3
acec: e2432001 sub r2, r3, #1
acf0: e1510002 cmp r1, r2
acf4: 8a000021 bhi ad80 <IMFS_memfile_get_block_pointer+0x100>
my_block -= FIRST_DOUBLY_INDIRECT;
acf8: e0656001 rsb r6, r5, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
acfc: e1a00006 mov r0, r6
ad00: e1a01005 mov r1, r5
ad04: eb001329 bl f9b0 <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
ad08: e1a01005 mov r1, r5
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ad0c: e1a07000 mov r7, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
ad10: e1a00006 mov r0, r6
ad14: eb00128d bl f750 <__aeabi_uidiv>
p = info->doubly_indirect;
if ( malloc_it ) {
ad18: 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;
ad1c: e1a05000 mov r5, r0
p = info->doubly_indirect;
ad20: e594005c ldr r0, [r4, #92] ; 0x5c
if ( malloc_it ) {
ad24: 0a00000e beq ad64 <IMFS_memfile_get_block_pointer+0xe4>
if ( !p ) {
ad28: e3500000 cmp r0, #0
ad2c: 1a000003 bne ad40 <IMFS_memfile_get_block_pointer+0xc0>
p = memfile_alloc_block();
ad30: ebffffc5 bl ac4c <memfile_alloc_block>
if ( !p )
ad34: e3500000 cmp r0, #0
ad38: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
info->doubly_indirect = p;
ad3c: e584005c str r0, [r4, #92] ; 0x5c
}
p1 = (block_p *)p[ doubly ];
ad40: e0804105 add r4, r0, r5, lsl #2
ad44: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p1 ) {
ad48: e3500000 cmp r0, #0
ad4c: 1a000009 bne ad78 <IMFS_memfile_get_block_pointer+0xf8>
p1 = memfile_alloc_block();
ad50: ebffffbd bl ac4c <memfile_alloc_block>
if ( !p1 )
ad54: e3500000 cmp r0, #0
return 0;
p[ doubly ] = (block_p) p1;
ad58: 15840000 strne r0, [r4]
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
ad5c: 1a000005 bne ad78 <IMFS_memfile_get_block_pointer+0xf8>
ad60: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
ad64: e3500000 cmp r0, #0
ad68: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p = (block_p *)p[ doubly ];
ad6c: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p )
ad70: e3500000 cmp r0, #0
ad74: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
return (block_p *)&p[ singly ];
ad78: e0800107 add r0, r0, r7, lsl #2
ad7c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
ad80: e2832001 add r2, r3, #1
ad84: e0020295 mul r2, r5, r2
ad88: e2422001 sub r2, r2, #1
ad8c: e1510002 cmp r1, r2
ad90: 8a000033 bhi ae64 <IMFS_memfile_get_block_pointer+0x1e4>
my_block -= FIRST_TRIPLY_INDIRECT;
ad94: e0636001 rsb r6, r3, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ad98: e1a00006 mov r0, r6
ad9c: e1a01005 mov r1, r5
ada0: eb001302 bl f9b0 <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
ada4: 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;
ada8: e1a0a000 mov sl, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
adac: e1a00006 mov r0, r6
adb0: eb001266 bl f750 <__aeabi_uidiv>
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
adb4: 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;
adb8: e1a06000 mov r6, r0
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
adbc: eb001263 bl f750 <__aeabi_uidiv>
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
adc0: 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;
adc4: e1a07000 mov r7, r0
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
adc8: e1a00006 mov r0, r6
adcc: eb0012f7 bl f9b0 <__umodsi3>
p = info->triply_indirect;
if ( malloc_it ) {
add0: 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;
add4: e1a05000 mov r5, r0
p = info->triply_indirect;
add8: e5940060 ldr r0, [r4, #96] ; 0x60
if ( malloc_it ) {
addc: 0a000016 beq ae3c <IMFS_memfile_get_block_pointer+0x1bc>
if ( !p ) {
ade0: e3500000 cmp r0, #0
ade4: 1a000003 bne adf8 <IMFS_memfile_get_block_pointer+0x178>
p = memfile_alloc_block();
ade8: ebffff97 bl ac4c <memfile_alloc_block>
if ( !p )
adec: e3500000 cmp r0, #0
adf0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
info->triply_indirect = p;
adf4: e5840060 str r0, [r4, #96] ; 0x60
}
p1 = (block_p *) p[ triply ];
adf8: e0804107 add r4, r0, r7, lsl #2
adfc: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 ) {
ae00: e3500000 cmp r0, #0
ae04: 1a000003 bne ae18 <IMFS_memfile_get_block_pointer+0x198>
p1 = memfile_alloc_block();
ae08: ebffff8f bl ac4c <memfile_alloc_block>
if ( !p1 )
ae0c: e3500000 cmp r0, #0
ae10: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p[ triply ] = (block_p) p1;
ae14: e5840000 str r0, [r4]
}
p2 = (block_p *)p1[ doubly ];
ae18: e0804105 add r4, r0, r5, lsl #2
ae1c: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p2 ) {
ae20: e3500000 cmp r0, #0
ae24: 1a00000c bne ae5c <IMFS_memfile_get_block_pointer+0x1dc>
p2 = memfile_alloc_block();
ae28: ebffff87 bl ac4c <memfile_alloc_block>
if ( !p2 )
ae2c: e3500000 cmp r0, #0
return 0;
p1[ doubly ] = (block_p) p2;
ae30: 15840000 strne r0, [r4]
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
ae34: 1a000008 bne ae5c <IMFS_memfile_get_block_pointer+0x1dc>
ae38: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
ae3c: e3500000 cmp r0, #0
ae40: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p1 = (block_p *) p[ triply ];
ae44: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 )
ae48: e3500000 cmp r0, #0
ae4c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
p2 = (block_p *)p1[ doubly ];
ae50: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p2 )
ae54: e3500000 cmp r0, #0
ae58: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return 0;
return (block_p *)&p2[ singly ];
ae5c: e080010a add r0, r0, sl, lsl #2
ae60: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
/*
* This means the requested block number is out of range.
*/
return 0;
ae64: e3a00000 mov r0, #0 <== NOT EXECUTED
}
ae68: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00001ad4 <IMFS_mount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
1ad4: e5903008 ldr r3, [r0, #8]
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1ad8: e593204c ldr r2, [r3, #76] ; 0x4c
1adc: e3520001 cmp r2, #1
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
1ae0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1ae4: 0a000004 beq 1afc <IMFS_mount+0x28>
rtems_set_errno_and_return_minus_one( ENOTDIR );
1ae8: eb00297a bl c0d8 <__errno> <== NOT EXECUTED
1aec: e3a03014 mov r3, #20 <== NOT EXECUTED
1af0: e5803000 str r3, [r0] <== NOT EXECUTED
1af4: e3e00000 mvn r0, #0 <== NOT EXECUTED
1af8: 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;
1afc: e583005c str r0, [r3, #92] ; 0x5c
return 0;
1b00: e3a00000 mov r0, #0
}
1b04: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00004458 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
4458: e92d4030 push {r4, r5, lr}
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
445c: e59f50e0 ldr r5, [pc, #224] ; 4544 <IMFS_print_jnode+0xec>
4460: e5953000 ldr r3, [r5]
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
4464: e1a04000 mov r4, r0
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
4468: e5931008 ldr r1, [r3, #8]
446c: e280000c add r0, r0, #12
4470: eb0030f1 bl 1083c <fputs>
switch( the_jnode->type ) {
4474: e594204c ldr r2, [r4, #76] ; 0x4c
4478: e2423001 sub r3, r2, #1
447c: e3530006 cmp r3, #6
4480: 979ff103 ldrls pc, [pc, r3, lsl #2]
4484: ea000026 b 4524 <IMFS_print_jnode+0xcc>
4488: 000044a4 .word 0x000044a4
448c: 000044b8 .word 0x000044b8
4490: 00004504 .word 0x00004504
4494: 00004504 .word 0x00004504
4498: 000044ec .word 0x000044ec
449c: 000044d0 .word 0x000044d0
44a0: 00004510 .word 0x00004510
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
44a4: e5953000 ldr r3, [r5]
44a8: e3a0002f mov r0, #47 ; 0x2f
44ac: e5931008 ldr r1, [r3, #8]
44b0: eb0030ac bl 10768 <fputc>
break;
44b4: ea00001f b 4538 <IMFS_print_jnode+0xe0>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
44b8: e5953000 ldr r3, [r5]
44bc: e59f1084 ldr r1, [pc, #132] ; 4548 <IMFS_print_jnode+0xf0>
44c0: e5930008 ldr r0, [r3, #8]
44c4: e2842050 add r2, r4, #80 ; 0x50
44c8: e892000c ldm r2, {r2, r3}
44cc: ea000004 b 44e4 <IMFS_print_jnode+0x8c>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
44d0: e5953000 ldr r3, [r5]
44d4: e59f1070 ldr r1, [pc, #112] ; 454c <IMFS_print_jnode+0xf4>
44d8: e5930008 ldr r0, [r3, #8]
44dc: e5942050 ldr r2, [r4, #80] ; 0x50
44e0: e5943058 ldr r3, [r4, #88] ; 0x58
44e4: eb00307f bl 106e8 <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
44e8: ea000012 b 4538 <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 ")",
44ec: e5953000 ldr r3, [r5]
44f0: e59f1058 ldr r1, [pc, #88] ; 4550 <IMFS_print_jnode+0xf8>
44f4: e5930008 ldr r0, [r3, #8]
44f8: e5942050 ldr r2, [r4, #80] ; 0x50
44fc: eb003079 bl 106e8 <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
4500: ea00000c b 4538 <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" );
4504: e5953000 ldr r3, [r5]
4508: e59f0044 ldr r0, [pc, #68] ; 4554 <IMFS_print_jnode+0xfc> <== NOT EXECUTED
450c: ea000001 b 4518 <IMFS_print_jnode+0xc0> <== NOT EXECUTED
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
4510: e5953000 ldr r3, [r5] <== NOT EXECUTED
4514: e59f003c ldr r0, [pc, #60] ; 4558 <IMFS_print_jnode+0x100> <== NOT EXECUTED
4518: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
451c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
4520: ea0030c5 b 1083c <fputs> <== NOT EXECUTED
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
4524: e5953000 ldr r3, [r5] <== NOT EXECUTED
4528: e59f102c ldr r1, [pc, #44] ; 455c <IMFS_print_jnode+0x104> <== NOT EXECUTED
452c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
return;
}
puts("");
}
4530: 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 );
4534: ea00306b b 106e8 <fprintf> <== NOT EXECUTED
return;
}
puts("");
4538: e59f0020 ldr r0, [pc, #32] ; 4560 <IMFS_print_jnode+0x108>
}
453c: e8bd4030 pop {r4, r5, lr}
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
4540: ea003797 b 123a4 <puts>
0000961c <IMFS_stat>:
{
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
961c: e5903000 ldr r3, [r0]
switch ( the_jnode->type ) {
9620: e593204c ldr r2, [r3, #76] ; 0x4c
9624: e2422002 sub r2, r2, #2
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
9628: e92d4800 push {fp, lr}
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
962c: e3520005 cmp r2, #5
9630: 979ff102 ldrls pc, [pc, r2, lsl #2]
9634: ea000012 b 9684 <IMFS_stat+0x68> <== NOT EXECUTED
9638: 00009650 .word 0x00009650 <== NOT EXECUTED
963c: 00009684 .word 0x00009684 <== NOT EXECUTED
9640: 00009670 .word 0x00009670 <== NOT EXECUTED
9644: 00009664 .word 0x00009664 <== NOT EXECUTED
9648: 00009664 .word 0x00009664 <== NOT EXECUTED
964c: 00009670 .word 0x00009670 <== NOT EXECUTED
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
9650: e5932054 ldr r2, [r3, #84] ; 0x54
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
9654: e593c050 ldr ip, [r3, #80] ; 0x50
9658: e581201c str r2, [r1, #28]
965c: e581c018 str ip, [r1, #24]
break;
9660: ea00000c b 9698 <IMFS_stat+0x7c>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
9664: e283c050 add ip, r3, #80 ; 0x50
9668: e89c1800 ldm ip, {fp, ip}
966c: ea000001 b 9678 <IMFS_stat+0x5c>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
9670: e3a0b000 mov fp, #0
9674: e3a0c000 mov ip, #0
9678: e581b020 str fp, [r1, #32]
967c: e581c024 str ip, [r1, #36] ; 0x24
break;
9680: ea000004 b 9698 <IMFS_stat+0x7c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
9684: eb000a93 bl c0d8 <__errno>
9688: e3a03086 mov r3, #134 ; 0x86
968c: e5803000 str r3, [r0]
9690: e3e00000 mvn r0, #0
9694: 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;
9698: e5902010 ldr r2, [r0, #16]
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
969c: e5922034 ldr r2, [r2, #52] ; 0x34
96a0: 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 =
96a4: e5812004 str r2, [r1, #4]
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
96a8: e5932030 ldr r2, [r3, #48] ; 0x30
96ac: e581200c str r2, [r1, #12]
buf->st_nlink = the_jnode->st_nlink;
96b0: e1d323b4 ldrh r2, [r3, #52] ; 0x34
96b4: e1c121b0 strh r2, [r1, #16]
buf->st_ino = the_jnode->st_ino;
96b8: e5932038 ldr r2, [r3, #56] ; 0x38
96bc: e5812008 str r2, [r1, #8]
buf->st_uid = the_jnode->st_uid;
96c0: e1d323bc ldrh r2, [r3, #60] ; 0x3c
96c4: e1c121b2 strh r2, [r1, #18]
buf->st_gid = the_jnode->st_gid;
96c8: e1d323be ldrh r2, [r3, #62] ; 0x3e
96cc: e1c121b4 strh r2, [r1, #20]
buf->st_atime = the_jnode->stat_atime;
96d0: e5932040 ldr r2, [r3, #64] ; 0x40
96d4: e59f001c ldr r0, [pc, #28] ; 96f8 <IMFS_stat+0xdc>
96d8: e5812028 str r2, [r1, #40] ; 0x28
buf->st_mtime = the_jnode->stat_mtime;
96dc: e2832044 add r2, r3, #68 ; 0x44
96e0: e892000c ldm r2, {r2, r3}
/*
* 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 =
96e4: e5810000 str r0, [r1]
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;
96e8: e5812030 str r2, [r1, #48] ; 0x30
buf->st_ctime = the_jnode->stat_ctime;
96ec: e5813038 str r3, [r1, #56] ; 0x38
return 0;
96f0: e3a00000 mov r0, #0
}
96f4: e8bd8800 pop {fp, pc}
00001c34 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
1c34: 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;
1c38: e5915000 ldr r5, [r1]
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
1c3c: e595304c ldr r3, [r5, #76] ; 0x4c
1c40: e3530003 cmp r3, #3
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
1c44: e24dd01c sub sp, sp, #28
1c48: e1a06000 mov r6, r0
1c4c: e1a04001 mov r4, r1
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
1c50: 1a000024 bne 1ce8 <IMFS_unlink+0xb4>
if ( !node->info.hard_link.link_node )
1c54: e595e050 ldr lr, [r5, #80] ; 0x50
1c58: e35e0000 cmp lr, #0
1c5c: 1a000003 bne 1c70 <IMFS_unlink+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
1c60: eb00291c bl c0d8 <__errno> <== NOT EXECUTED
1c64: e3a03016 mov r3, #22 <== NOT EXECUTED
1c68: e5803000 str r3, [r0] <== NOT EXECUTED
1c6c: ea000023 b 1d00 <IMFS_unlink+0xcc> <== NOT EXECUTED
the_link = *loc;
1c70: e1a07001 mov r7, r1
1c74: e8b7000f ldm r7!, {r0, r1, r2, r3}
1c78: e1a0c00d mov ip, sp
1c7c: e8ac000f stmia ip!, {r0, r1, r2, r3}
1c80: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node;
1c84: e28d701c add r7, sp, #28
1c88: e527e01c str lr, [r7, #-28]!
IMFS_Set_handlers( &the_link );
1c8c: 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;
1c90: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
1c94: eb001bf3 bl 8c68 <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)
1c98: e5953050 ldr r3, [r5, #80] ; 0x50
1c9c: e1d323b4 ldrh r2, [r3, #52] ; 0x34
1ca0: e3520001 cmp r2, #1
1ca4: 1a000007 bne 1cc8 <IMFS_unlink+0x94>
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
1ca8: e1a00006 mov r0, r6
1cac: e1a0100d mov r1, sp
1cb0: e59d3008 ldr r3, [sp, #8]
1cb4: e1a0e00f mov lr, pc
1cb8: e593f034 ldr pc, [r3, #52] ; 0x34
if ( result != 0 )
1cbc: e3500000 cmp r0, #0
1cc0: 0a000008 beq 1ce8 <IMFS_unlink+0xb4>
1cc4: ea00000d b 1d00 <IMFS_unlink+0xcc>
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
1cc8: e2422001 sub r2, r2, #1
1ccc: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
1cd0: e28d0014 add r0, sp, #20
1cd4: e3a01000 mov r1, #0
1cd8: eb00012c bl 2190 <gettimeofday>
1cdc: e5953050 ldr r3, [r5, #80] ; 0x50
1ce0: e59d2014 ldr r2, [sp, #20]
1ce4: e5832048 str r2, [r3, #72] ; 0x48
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
1ce8: e5943008 ldr r3, [r4, #8]
1cec: e1a00006 mov r0, r6
1cf0: e1a01004 mov r1, r4
1cf4: e1a0e00f mov lr, pc
1cf8: e593f034 ldr pc, [r3, #52] ; 0x34
return result;
1cfc: ea000000 b 1d04 <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;
1d00: e3e00000 mvn r0, #0
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
1d04: e28dd01c add sp, sp, #28
1d08: e8bd80f0 pop {r4, r5, r6, r7, pc}
00001d0c <IMFS_unmount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
1d0c: e5903008 ldr r3, [r0, #8]
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1d10: e593204c ldr r2, [r3, #76] ; 0x4c
1d14: e3520001 cmp r2, #1
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
1d18: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1d1c: 0a000002 beq 1d2c <IMFS_unmount+0x20>
rtems_set_errno_and_return_minus_one( ENOTDIR );
1d20: eb0028ec bl c0d8 <__errno> <== NOT EXECUTED
1d24: e3a03014 mov r3, #20 <== NOT EXECUTED
1d28: ea000004 b 1d40 <IMFS_unmount+0x34> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
1d2c: e593205c ldr r2, [r3, #92] ; 0x5c
1d30: e3520000 cmp r2, #0
1d34: 1a000004 bne 1d4c <IMFS_unmount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
1d38: eb0028e6 bl c0d8 <__errno> <== NOT EXECUTED
1d3c: e3a03016 mov r3, #22 <== NOT EXECUTED
1d40: e5803000 str r3, [r0] <== NOT EXECUTED
1d44: e3e00000 mvn r0, #0 <== NOT EXECUTED
1d48: 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;
1d4c: e3a00000 mov r0, #0
1d50: e583005c str r0, [r3, #92] ; 0x5c
return 0;
}
1d54: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00001644 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
1644: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
1648: e59030b8 ldr r3, [r0, #184] ; 0xb8
size = Stack_check_usable_stack_size(stack);
164c: e59070b4 ldr r7, [r0, #180] ; 0xb4
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
1650: e2832010 add r2, r3, #16
size = Stack_check_usable_stack_size(stack);
1654: e2477010 sub r7, r7, #16
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
1658: e3c71003 bic r1, r7, #3
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
165c: e1a05000 mov r5, r0
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
1660: e590b0e4 ldr fp, [r0, #228] ; 0xe4
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
1664: e2820010 add r0, r2, #16
for (ebase = base + length; base < ebase; base++)
1668: e0800001 add r0, r0, r1
* 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(
166c: e2833020 add r3, r3, #32
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
1670: e59f10c0 ldr r1, [pc, #192] ; 1738 <Stack_check_Dump_threads_usage+0xf4>
1674: ea000002 b 1684 <Stack_check_Dump_threads_usage+0x40>
1678: e493c004 ldr ip, [r3], #4
167c: e15c0001 cmp ip, r1
1680: 1a000004 bne 1698 <Stack_check_Dump_threads_usage+0x54>
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
1684: e1530000 cmp r3, r0
if (*base != U32_PATTERN)
1688: e1a06003 mov r6, r3
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
168c: 3afffff9 bcc 1678 <Stack_check_Dump_threads_usage+0x34>
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;
1690: e3a06000 mov r6, #0 <== NOT EXECUTED
1694: ea000002 b 16a4 <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 )
1698: e3560000 cmp r6, #0
used = Stack_check_Calculate_used( low, size, high_water_mark );
169c: 10822007 addne r2, r2, r7
16a0: 10666002 rsbne r6, r6, r2
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
#endif
{
(*print_handler)(
16a4: e5958008 ldr r8, [r5, #8]
16a8: e59f408c ldr r4, [pc, #140] ; 173c <Stack_check_Dump_threads_usage+0xf8>
16ac: e3a01005 mov r1, #5
16b0: e28d2008 add r2, sp, #8
16b4: e1a00008 mov r0, r8
16b8: e8940600 ldm r4, {r9, sl}
16bc: eb000eca bl 51ec <rtems_object_get_name>
16c0: e59f1078 ldr r1, [pc, #120] ; 1740 <Stack_check_Dump_threads_usage+0xfc>
16c4: e1a03000 mov r3, r0
16c8: e1a02008 mov r2, r8
16cc: e1a0000a mov r0, sl
16d0: e1a0e00f mov lr, pc
16d4: e12fff19 bx r9
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
16d8: e59530b4 ldr r3, [r5, #180] ; 0xb4
16dc: e59520b8 ldr r2, [r5, #184] ; 0xb8
16e0: e2433001 sub r3, r3, #1
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
16e4: e0823003 add r3, r2, r3
16e8: e58db000 str fp, [sp]
16ec: e58d7004 str r7, [sp, #4]
16f0: e5940004 ldr r0, [r4, #4]
16f4: e59f1048 ldr r1, [pc, #72] ; 1744 <Stack_check_Dump_threads_usage+0x100>
16f8: e1a0e00f mov lr, pc
16fc: e594f000 ldr pc, [r4]
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
1700: e5943008 ldr r3, [r4, #8]
1704: e3530000 cmp r3, #0
1708: 1a000004 bne 1720 <Stack_check_Dump_threads_usage+0xdc>
(*print_handler)( print_context, "Unavailable\n" );
170c: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
1710: e59f1030 ldr r1, [pc, #48] ; 1748 <Stack_check_Dump_threads_usage+0x104><== NOT EXECUTED
1714: e1a0e00f mov lr, pc <== NOT EXECUTED
1718: e594f000 ldr pc, [r4] <== NOT EXECUTED
171c: ea000004 b 1734 <Stack_check_Dump_threads_usage+0xf0> <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
1720: e5940004 ldr r0, [r4, #4]
1724: e59f1020 ldr r1, [pc, #32] ; 174c <Stack_check_Dump_threads_usage+0x108>
1728: e1a02006 mov r2, r6
172c: e1a0e00f mov lr, pc
1730: e594f000 ldr pc, [r4]
}
}
1734: e8bd8fff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
00014f4c <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
14f4c: 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
)
{
14f50: 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 ) {
14f54: 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
)
{
14f58: e1a06000 mov r6, r0
14f5c: e1a0a001 mov sl, r1
14f60: e1a07002 mov r7, r2
14f64: 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 ) {
14f68: 8a000013 bhi 14fbc <_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 ) {
14f6c: e5905048 ldr r5, [r0, #72] ; 0x48
14f70: e3550000 cmp r5, #0
*count = 0;
14f74: 13a00000 movne r0, #0
14f78: 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 ) {
14f7c: 0a000007 beq 14fa0 <_CORE_message_queue_Broadcast+0x54>
14f80: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
14f84: e594002c ldr r0, [r4, #44] ; 0x2c
14f88: e1a0100a mov r1, sl
14f8c: e1a02007 mov r2, r7
14f90: eb001e3e bl 1c890 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
14f94: e5943028 ldr r3, [r4, #40] ; 0x28
14f98: e5837000 str r7, [r3]
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
14f9c: e2855001 add r5, r5, #1
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
14fa0: e1a00006 mov r0, r6
14fa4: eb000a3d bl 178a0 <_Thread_queue_Dequeue>
14fa8: e2504000 subs r4, r0, #0
14fac: 1afffff4 bne 14f84 <_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;
14fb0: e5885000 str r5, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
14fb4: e1a00004 mov r0, r4
14fb8: 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;
14fbc: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
14fc0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
0000a2b8 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
a2b8: e1a03000 mov r3, r0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a2bc: e59f2124 ldr r2, [pc, #292] ; a3e8 <_CORE_mutex_Seize_interrupt_trylock+0x130>
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a2c0: e593c050 ldr ip, [r3, #80] ; 0x50
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a2c4: e3a00000 mov r0, #0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a2c8: e5922004 ldr r2, [r2, #4]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a2cc: e15c0000 cmp ip, r0
a2d0: e92d4010 push {r4, lr}
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a2d4: e5820034 str r0, [r2, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a2d8: 0a00002c beq a390 <_CORE_mutex_Seize_interrupt_trylock+0xd8>
the_mutex->lock = CORE_MUTEX_LOCKED;
a2dc: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
a2e0: e5920008 ldr r0, [r2, #8]
a2e4: e5830060 str r0, [r3, #96] ; 0x60
the_mutex->nest_count = 1;
a2e8: e3a00001 mov r0, #1
a2ec: e5830054 str r0, [r3, #84] ; 0x54
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
a2f0: e5930048 ldr r0, [r3, #72] ; 0x48
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a2f4: e3500002 cmp r0, #2
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
a2f8: e583205c str r2, [r3, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a2fc: 0a000001 beq a308 <_CORE_mutex_Seize_interrupt_trylock+0x50>
a300: e3500003 cmp r0, #3
a304: 1a000004 bne a31c <_CORE_mutex_Seize_interrupt_trylock+0x64>
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a308: e592c01c ldr ip, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a30c: e3500003 cmp r0, #3
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a310: e28c4001 add r4, ip, #1
a314: e582401c str r4, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a318: 0a000000 beq a320 <_CORE_mutex_Seize_interrupt_trylock+0x68>
_ISR_Enable( *level_p );
a31c: ea00002b b a3d0 <_CORE_mutex_Seize_interrupt_trylock+0x118>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
a320: e593004c ldr r0, [r3, #76] ; 0x4c
current = executing->current_priority;
a324: e5924014 ldr r4, [r2, #20]
if ( current == ceiling ) {
a328: e1540000 cmp r4, r0
a32c: 1a000000 bne a334 <_CORE_mutex_Seize_interrupt_trylock+0x7c>
_ISR_Enable( *level_p );
a330: ea000026 b a3d0 <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0;
}
if ( current > ceiling ) {
a334: 9a00000b bls a368 <_CORE_mutex_Seize_interrupt_trylock+0xb0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a338: e59f20ac ldr r2, [pc, #172] ; a3ec <_CORE_mutex_Seize_interrupt_trylock+0x134>
a33c: e5920000 ldr r0, [r2]
a340: e2800001 add r0, r0, #1
a344: e5820000 str r0, [r2]
a348: e5912000 ldr r2, [r1]
a34c: e129f002 msr CPSR_fc, r2
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
a350: e3a02000 mov r2, #0
a354: e593005c ldr r0, [r3, #92] ; 0x5c
a358: e593104c ldr r1, [r3, #76] ; 0x4c
a35c: ebfff331 bl 7028 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
a360: ebfff455 bl 74bc <_Thread_Enable_dispatch>
a364: ea00001b b a3d8 <_CORE_mutex_Seize_interrupt_trylock+0x120>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
a368: e3a00006 mov r0, #6
a36c: e5820034 str r0, [r2, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a370: e3a00001 mov r0, #1
a374: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
a378: e3a00000 mov r0, #0
a37c: e5830054 str r0, [r3, #84] ; 0x54
executing->resource_count--; /* undo locking above */
a380: e582c01c str ip, [r2, #28]
a384: e5913000 ldr r3, [r1]
a388: e129f003 msr CPSR_fc, r3
a38c: e8bd8010 pop {r4, pc}
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
a390: e593005c ldr r0, [r3, #92] ; 0x5c
a394: e1500002 cmp r0, r2
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
a398: 13a00001 movne r0, #1
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
a39c: 18bd8010 popne {r4, pc}
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
a3a0: e5932040 ldr r2, [r3, #64] ; 0x40
a3a4: e3520000 cmp r2, #0
a3a8: 0a000002 beq a3b8 <_CORE_mutex_Seize_interrupt_trylock+0x100>
a3ac: e3520001 cmp r2, #1
a3b0: 1a00000a bne a3e0 <_CORE_mutex_Seize_interrupt_trylock+0x128>
a3b4: ea000003 b a3c8 <_CORE_mutex_Seize_interrupt_trylock+0x110><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
a3b8: e5932054 ldr r2, [r3, #84] ; 0x54
a3bc: e2822001 add r2, r2, #1
a3c0: e5832054 str r2, [r3, #84] ; 0x54
_ISR_Enable( *level_p );
a3c4: ea000001 b a3d0 <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
a3c8: e3a03002 mov r3, #2 <== NOT EXECUTED
a3cc: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED
a3d0: e5913000 ldr r3, [r1]
a3d4: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
a3d8: e3a00000 mov r0, #0
a3dc: e8bd8010 pop {r4, pc}
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
a3e0: e3a00001 mov r0, #1
a3e4: e8bd8010 pop {r4, pc}
0000a968 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a968: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a96c: e1a05001 mov r5, r1
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
a970: e5901020 ldr r1, [r0, #32]
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a974: e24dd028 sub sp, sp, #40 ; 0x28
a978: e58d3018 str r3, [sp, #24]
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
a97c: e58d1010 str r1, [sp, #16]
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
a980: e5903010 ldr r3, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
a984: e5901030 ldr r1, [r0, #48] ; 0x30
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
a988: e3a08000 mov r8, #0
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
a98c: e0956002 adds r6, r5, r2
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a990: e1a04000 mov r4, r0
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
a994: e58d3014 str r3, [sp, #20]
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
a998: e58d8024 str r8, [sp, #36] ; 0x24
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a99c: e5903014 ldr r3, [r0, #20]
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
a9a0: e58d8020 str r8, [sp, #32]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
a9a4: e58d101c str r1, [sp, #28]
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
return false;
a9a8: 21a00008 movcs r0, r8
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
a9ac: 2a00009d bcs ac28 <_Heap_Extend+0x2c0>
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
a9b0: e28d1024 add r1, sp, #36 ; 0x24
a9b4: e58d1000 str r1, [sp]
a9b8: e28d1020 add r1, sp, #32
a9bc: e58d1004 str r1, [sp, #4]
a9c0: e1a00005 mov r0, r5
a9c4: e1a01002 mov r1, r2
a9c8: e59d2014 ldr r2, [sp, #20]
a9cc: ebffeeda bl 653c <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
a9d0: e3500000 cmp r0, #0
a9d4: 0a000093 beq ac28 <_Heap_Extend+0x2c0>
a9d8: e59da010 ldr sl, [sp, #16]
a9dc: e1a07008 mov r7, r8
a9e0: e1a09008 mov r9, r8
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
a9e4: e5941018 ldr r1, [r4, #24]
a9e8: e1a03008 mov r3, r8
a9ec: e1a0c004 mov ip, r4
a9f0: ea000000 b a9f8 <_Heap_Extend+0x90>
a9f4: e1a0100a mov r1, sl
uintptr_t const sub_area_end = start_block->prev_size;
a9f8: e59a4000 ldr r4, [sl]
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
a9fc: e1560001 cmp r6, r1
aa00: 93a00000 movls r0, #0
aa04: 83a00001 movhi r0, #1
aa08: e1550004 cmp r5, r4
aa0c: 23a00000 movcs r0, #0
aa10: e3500000 cmp r0, #0
aa14: 1a000082 bne ac24 <_Heap_Extend+0x2bc>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
aa18: e1560001 cmp r6, r1
aa1c: 01a0300a moveq r3, sl
aa20: 0a000001 beq aa2c <_Heap_Extend+0xc4>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
aa24: e1560004 cmp r6, r4
aa28: 31a0900a movcc r9, sl
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
aa2c: e1a00004 mov r0, r4
aa30: e59d1014 ldr r1, [sp, #20]
aa34: e58d300c str r3, [sp, #12]
aa38: e58dc008 str ip, [sp, #8]
aa3c: eb001530 bl ff04 <__umodsi3>
aa40: e244b008 sub fp, r4, #8
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
aa44: e1540005 cmp r4, r5
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
aa48: e060000b rsb r0, r0, fp
aa4c: e59d300c ldr r3, [sp, #12]
aa50: e59dc008 ldr ip, [sp, #8]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
aa54: 01a07000 moveq r7, r0
start_block->prev_size = extend_area_end;
aa58: 058a6000 streq r6, [sl]
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
aa5c: 0a000000 beq aa64 <_Heap_Extend+0xfc>
aa60: 31a08000 movcc r8, r0
- 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;
aa64: e590a004 ldr sl, [r0, #4]
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
aa68: e59d2010 ldr r2, [sp, #16]
aa6c: e3caa001 bic sl, sl, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
aa70: e080a00a add sl, r0, sl
aa74: e15a0002 cmp sl, r2
aa78: 1affffdd bne a9f4 <_Heap_Extend+0x8c>
aa7c: e1a02009 mov r2, r9
aa80: e1a09003 mov r9, r3
if ( extend_area_begin < heap->area_begin ) {
aa84: e59c3018 ldr r3, [ip, #24]
aa88: e1550003 cmp r5, r3
aa8c: e1a0400c mov r4, ip
heap->area_begin = extend_area_begin;
aa90: 358c5018 strcc r5, [ip, #24]
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
aa94: 3a000002 bcc aaa4 <_Heap_Extend+0x13c>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
aa98: e59c301c ldr r3, [ip, #28]
aa9c: e1530006 cmp r3, r6
heap->area_end = extend_area_end;
aaa0: 358c601c strcc r6, [ip, #28]
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
aaa4: e59d1024 ldr r1, [sp, #36] ; 0x24
aaa8: e59d3020 ldr r3, [sp, #32]
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
aaac: e0610003 rsb r0, r1, r3
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
aab0: e5816000 str r6, [r1]
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
aab4: e380c001 orr ip, r0, #1
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
aab8: e5830000 str r0, [r3]
extend_last_block->size_and_flag = 0;
aabc: e3a00000 mov r0, #0
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
aac0: e581c004 str ip, [r1, #4]
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
aac4: e5830004 str r0, [r3, #4]
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
aac8: e5940020 ldr r0, [r4, #32]
aacc: e1500001 cmp r0, r1
heap->first_block = extend_first_block;
aad0: 85841020 strhi r1, [r4, #32]
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
aad4: 8a000002 bhi aae4 <_Heap_Extend+0x17c>
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
aad8: e5941024 ldr r1, [r4, #36] ; 0x24
aadc: e1510003 cmp r1, r3
heap->last_block = extend_last_block;
aae0: 35843024 strcc r3, [r4, #36] ; 0x24
}
if ( merge_below_block != NULL ) {
aae4: e3590000 cmp r9, #0
aae8: 0a000010 beq ab30 <_Heap_Extend+0x1c8>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
aaec: e594a010 ldr sl, [r4, #16] <== NOT EXECUTED
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
aaf0: e2855008 add r5, r5, #8 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
aaf4: e1a00005 mov r0, r5 <== NOT EXECUTED
aaf8: e1a0100a mov r1, sl <== NOT EXECUTED
aafc: eb001500 bl ff04 <__umodsi3> <== NOT EXECUTED
if ( remainder != 0 ) {
ab00: e3500000 cmp r0, #0 <== NOT EXECUTED
return value - remainder + alignment;
ab04: 1085500a addne r5, r5, sl <== NOT EXECUTED
ab08: 10605005 rsbne r5, r0, r5 <== NOT EXECUTED
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
ab0c: e5993000 ldr r3, [r9] <== NOT EXECUTED
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
ab10: e2451008 sub r1, r5, #8 <== NOT EXECUTED
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
ab14: e5053008 str r3, [r5, #-8] <== NOT EXECUTED
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
ab18: e0613009 rsb r3, r1, r9 <== NOT EXECUTED
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
ab1c: e3833001 orr r3, r3, #1 <== NOT EXECUTED
ab20: e5053004 str r3, [r5, #-4] <== NOT EXECUTED
_Heap_Free_block( heap, new_first_block );
ab24: e1a00004 mov r0, r4 <== NOT EXECUTED
ab28: ebffff86 bl a948 <_Heap_Free_block> <== NOT EXECUTED
ab2c: ea000004 b ab44 <_Heap_Extend+0x1dc> <== NOT EXECUTED
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
ab30: e3520000 cmp r2, #0
_Heap_Link_below(
ab34: 159d3020 ldrne r3, [sp, #32]
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
ab38: 10632002 rsbne r2, r3, r2
ab3c: 13822001 orrne r2, r2, #1
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
ab40: 15832004 strne r2, [r3, #4]
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
ab44: e3570000 cmp r7, #0
ab48: 0a000012 beq ab98 <_Heap_Extend+0x230>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
ab4c: e2466008 sub r6, r6, #8
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
ab50: e0676006 rsb r6, r7, r6
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ab54: e5941010 ldr r1, [r4, #16]
ab58: e1a00006 mov r0, r6
ab5c: eb0014e8 bl ff04 <__umodsi3>
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
ab60: e5972004 ldr r2, [r7, #4]
ab64: e0606006 rsb r6, r0, r6
ab68: e0662002 rsb r2, r6, r2
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
ab6c: e0863007 add r3, r6, r7
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
ab70: e3822001 orr r2, r2, #1
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
ab74: e5832004 str r2, [r3, #4]
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ab78: e5973004 ldr r3, [r7, #4]
ab7c: e2033001 and r3, r3, #1
block->size_and_flag = size | flag;
ab80: e1866003 orr r6, r6, r3
ab84: e5876004 str r6, [r7, #4]
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
ab88: e1a00004 mov r0, r4
ab8c: e1a01007 mov r1, r7
ab90: ebffff6c bl a948 <_Heap_Free_block>
ab94: ea00000b b abc8 <_Heap_Extend+0x260>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
ab98: e3580000 cmp r8, #0
ab9c: 0a000009 beq abc8 <_Heap_Extend+0x260>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
aba0: e5982004 ldr r2, [r8, #4]
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
aba4: e59d1024 ldr r1, [sp, #36] ; 0x24
aba8: e2022001 and r2, r2, #1
abac: e0681001 rsb r1, r8, r1
block->size_and_flag = size | flag;
abb0: e1812002 orr r2, r1, r2
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
abb4: e59d3020 ldr r3, [sp, #32]
abb8: e5882004 str r2, [r8, #4]
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
abbc: e5932004 ldr r2, [r3, #4]
abc0: e3822001 orr r2, r2, #1
abc4: e5832004 str r2, [r3, #4]
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
abc8: e3570000 cmp r7, #0
abcc: 03590000 cmpeq r9, #0
_Heap_Free_block( heap, extend_first_block );
abd0: 01a00004 moveq r0, r4
abd4: 059d1024 ldreq r1, [sp, #36] ; 0x24
abd8: 0bffff5a bleq a948 <_Heap_Free_block>
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
abdc: e2841020 add r1, r4, #32
abe0: e891000a ldm r1, {r1, r3}
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
abe4: e5932004 ldr r2, [r3, #4]
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
abe8: e0631001 rsb r1, r3, r1
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
abec: e2022001 and r2, r2, #1
block->size_and_flag = size | flag;
abf0: e1812002 orr r2, r1, r2
abf4: e5832004 str r2, [r3, #4]
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
abf8: e59d101c ldr r1, [sp, #28]
abfc: e284202c add r2, r4, #44 ; 0x2c
ac00: e892000c ldm r2, {r2, r3}
ac04: e0613003 rsb r3, r1, r3
/* Statistics */
stats->size += extended_size;
ac08: e0822003 add r2, r2, r3
ac0c: e584202c str r2, [r4, #44] ; 0x2c
if ( extended_size_ptr != NULL )
ac10: e59d2018 ldr r2, [sp, #24]
ac14: e3520000 cmp r2, #0
*extended_size_ptr = extended_size;
ac18: 15823000 strne r3, [r2]
return true;
ac1c: e3a00001 mov r0, #1
ac20: ea000000 b ac28 <_Heap_Extend+0x2c0>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
ac24: e3a00000 mov r0, #0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
ac28: e28dd028 add sp, sp, #40 ; 0x28
ac2c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000709c <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
709c: 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;
70a0: e5903014 ldr r3, [r0, #20]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
70a4: e24dd030 sub sp, sp, #48 ; 0x30
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
70a8: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
70ac: e5903024 ldr r3, [r0, #36] ; 0x24
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
70b0: e59f4500 ldr r4, [pc, #1280] ; 75b8 <_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;
70b4: e58d3028 str r3, [sp, #40] ; 0x28
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
70b8: e59f34fc ldr r3, [pc, #1276] ; 75bc <_Heap_Walk+0x520>
70bc: e31200ff tst r2, #255 ; 0xff
70c0: 11a04003 movne r4, r3
if ( !_System_state_Is_up( _System_state_Get() ) ) {
70c4: e59f34f4 ldr r3, [pc, #1268] ; 75c0 <_Heap_Walk+0x524>
70c8: e5933000 ldr r3, [r3]
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;
70cc: 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() ) ) {
70d0: e3530003 cmp r3, #3
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
70d4: e1a06000 mov r6, r0
70d8: e1a05001 mov r5, r1
uintptr_t const page_size = heap->page_size;
70dc: e5909010 ldr r9, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
70e0: 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() ) ) {
70e4: 1a000127 bne 7588 <_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)(
70e8: e59dc024 ldr ip, [sp, #36] ; 0x24
70ec: e58dc000 str ip, [sp]
70f0: e5903018 ldr r3, [r0, #24]
70f4: e58d3004 str r3, [sp, #4]
70f8: e590301c ldr r3, [r0, #28]
70fc: e59d2020 ldr r2, [sp, #32]
7100: e58d3008 str r3, [sp, #8]
7104: e59d3028 ldr r3, [sp, #40] ; 0x28
7108: e58d200c str r2, [sp, #12]
710c: e58d3010 str r3, [sp, #16]
7110: e5903008 ldr r3, [r0, #8]
7114: e58d3014 str r3, [sp, #20]
7118: e590300c ldr r3, [r0, #12]
711c: e59f24a0 ldr r2, [pc, #1184] ; 75c4 <_Heap_Walk+0x528>
7120: e58d3018 str r3, [sp, #24]
7124: e1a00001 mov r0, r1
7128: e1a03009 mov r3, r9
712c: e3a01000 mov r1, #0
7130: e1a0e00f mov lr, pc
7134: e12fff14 bx r4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
7138: e3590000 cmp r9, #0
713c: 1a000006 bne 715c <_Heap_Walk+0xc0>
(*printer)( source, true, "page size is zero\n" );
7140: e1a00005 mov r0, r5
7144: e3a01001 mov r1, #1
7148: e59f2478 ldr r2, [pc, #1144] ; 75c8 <_Heap_Walk+0x52c>
714c: e1a0e00f mov lr, pc
7150: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
7154: e1a08009 mov r8, r9
7158: ea00010b b 758c <_Heap_Walk+0x4f0>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
715c: e2198007 ands r8, r9, #7
(*printer)(
7160: 11a00005 movne r0, r5
7164: 13a01001 movne r1, #1
7168: 159f245c ldrne r2, [pc, #1116] ; 75cc <_Heap_Walk+0x530>
716c: 11a03009 movne r3, r9
7170: 1a00010c bne 75a8 <_Heap_Walk+0x50c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
7174: e59d0024 ldr r0, [sp, #36] ; 0x24
7178: e1a01009 mov r1, r9
717c: ebffe798 bl fe4 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
7180: e250b000 subs fp, r0, #0
7184: 0a000006 beq 71a4 <_Heap_Walk+0x108>
(*printer)(
7188: e1a00005 mov r0, r5
718c: e3a01001 mov r1, #1
7190: e59f2438 ldr r2, [pc, #1080] ; 75d0 <_Heap_Walk+0x534>
7194: e59d3024 ldr r3, [sp, #36] ; 0x24
7198: e1a0e00f mov lr, pc
719c: e12fff14 bx r4
71a0: ea0000f9 b 758c <_Heap_Walk+0x4f0>
71a4: e59dc020 ldr ip, [sp, #32]
71a8: e1a01009 mov r1, r9
71ac: e28c0008 add r0, ip, #8
71b0: ebffe78b bl fe4 <__umodsi3>
);
return false;
}
if (
71b4: e250a000 subs sl, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
71b8: 11a00005 movne r0, r5
71bc: 13a01001 movne r1, #1
71c0: 159f240c ldrne r2, [pc, #1036] ; 75d4 <_Heap_Walk+0x538>
71c4: 159d3020 ldrne r3, [sp, #32]
71c8: 1a0000cc bne 7500 <_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;
71cc: e59d2020 ldr r2, [sp, #32]
71d0: e5928004 ldr r8, [r2, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
71d4: e2188001 ands r8, r8, #1
(*printer)(
71d8: 01a00005 moveq r0, r5
71dc: 03a01001 moveq r1, #1
71e0: 059f23f0 ldreq r2, [pc, #1008] ; 75d8 <_Heap_Walk+0x53c>
71e4: 0a000009 beq 7210 <_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;
71e8: e59d3028 ldr r3, [sp, #40] ; 0x28
71ec: e5937004 ldr r7, [r3, #4]
71f0: 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);
71f4: 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;
71f8: e5978004 ldr r8, [r7, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
71fc: e2188001 ands r8, r8, #1
7200: 1a000005 bne 721c <_Heap_Walk+0x180>
(*printer)(
7204: e59f23d0 ldr r2, [pc, #976] ; 75dc <_Heap_Walk+0x540>
7208: e1a00005 mov r0, r5
720c: e3a01001 mov r1, #1
7210: e1a0e00f mov lr, pc
7214: e12fff14 bx r4
7218: ea0000db b 758c <_Heap_Walk+0x4f0>
);
return false;
}
if (
721c: e59dc020 ldr ip, [sp, #32]
7220: e157000c cmp r7, ip
7224: 0a000006 beq 7244 <_Heap_Walk+0x1a8>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
7228: e1a00005 mov r0, r5 <== NOT EXECUTED
722c: e3a01001 mov r1, #1 <== NOT EXECUTED
7230: e59f23a8 ldr r2, [pc, #936] ; 75e0 <_Heap_Walk+0x544> <== NOT EXECUTED
7234: e1a0e00f mov lr, pc <== NOT EXECUTED
7238: 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;
723c: e1a0800a mov r8, sl <== NOT EXECUTED
7240: ea0000d1 b 758c <_Heap_Walk+0x4f0> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
7244: e596b010 ldr fp, [r6, #16]
block = next_block;
} while ( block != first_block );
return true;
}
7248: 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 );
724c: e1a0a006 mov sl, r6
7250: ea000034 b 7328 <_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;
7254: e5963020 ldr r3, [r6, #32]
7258: e1530008 cmp r3, r8
725c: 83a0c000 movhi ip, #0
7260: 8a000003 bhi 7274 <_Heap_Walk+0x1d8>
7264: e596c024 ldr ip, [r6, #36] ; 0x24
7268: e15c0008 cmp ip, r8
726c: 33a0c000 movcc ip, #0
7270: 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 ) ) {
7274: e21cc0ff ands ip, ip, #255 ; 0xff
(*printer)(
7278: 01a00005 moveq r0, r5
727c: 03a01001 moveq r1, #1
7280: 059f235c ldreq r2, [pc, #860] ; 75e4 <_Heap_Walk+0x548>
7284: 0a000012 beq 72d4 <_Heap_Walk+0x238>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
7288: e2880008 add r0, r8, #8
728c: e1a0100b mov r1, fp
7290: ebffe753 bl fe4 <__umodsi3>
);
return false;
}
if (
7294: e250c000 subs ip, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
7298: 11a00005 movne r0, r5
729c: 13a01001 movne r1, #1
72a0: 159f2340 ldrne r2, [pc, #832] ; 75e8 <_Heap_Walk+0x54c>
72a4: 11a03008 movne r3, r8
72a8: 1a0000be bne 75a8 <_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;
72ac: e5983004 ldr r3, [r8, #4]
72b0: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
72b4: 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;
72b8: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
72bc: e2133001 ands r3, r3, #1
72c0: e58d302c str r3, [sp, #44] ; 0x2c
72c4: 0a000009 beq 72f0 <_Heap_Walk+0x254>
(*printer)(
72c8: e59f231c ldr r2, [pc, #796] ; 75ec <_Heap_Walk+0x550>
72cc: e1a00005 mov r0, r5
72d0: e3a01001 mov r1, #1
72d4: e1a03008 mov r3, r8
72d8: e58dc01c str ip, [sp, #28]
72dc: e1a0e00f mov lr, pc
72e0: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
72e4: e59dc01c ldr ip, [sp, #28]
72e8: e1a0800c mov r8, ip
72ec: ea0000a6 b 758c <_Heap_Walk+0x4f0>
);
return false;
}
if ( free_block->prev != prev_block ) {
72f0: e598300c ldr r3, [r8, #12]
72f4: e153000a cmp r3, sl
72f8: 0a000008 beq 7320 <_Heap_Walk+0x284>
(*printer)(
72fc: e58d3000 str r3, [sp]
7300: e1a00005 mov r0, r5
7304: e1a03008 mov r3, r8
7308: e3a01001 mov r1, #1
730c: e59f22dc ldr r2, [pc, #732] ; 75f0 <_Heap_Walk+0x554>
7310: e1a0e00f mov lr, pc
7314: e12fff14 bx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
7318: e59d802c ldr r8, [sp, #44] ; 0x2c
731c: ea00009a b 758c <_Heap_Walk+0x4f0>
return false;
}
prev_block = free_block;
free_block = free_block->next;
7320: e1a0a008 mov sl, r8
7324: 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 ) {
7328: e1580006 cmp r8, r6
732c: 1affffc8 bne 7254 <_Heap_Walk+0x1b8>
7330: ea000000 b 7338 <_Heap_Walk+0x29c>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
7334: e1a07008 mov r7, r8
return true;
}
7338: 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;
733c: 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;
7340: 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);
7344: 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;
7348: e1520008 cmp r2, r8
734c: 83a0b000 movhi fp, #0
7350: 8a000003 bhi 7364 <_Heap_Walk+0x2c8>
7354: e596b024 ldr fp, [r6, #36] ; 0x24
7358: e15b0008 cmp fp, r8
735c: 33a0b000 movcc fp, #0
7360: 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 ) ) {
7364: e21bb0ff ands fp, fp, #255 ; 0xff
7368: 1a000007 bne 738c <_Heap_Walk+0x2f0>
(*printer)(
736c: e58d8000 str r8, [sp]
7370: e1a00005 mov r0, r5
7374: e3a01001 mov r1, #1
7378: e59f2274 ldr r2, [pc, #628] ; 75f4 <_Heap_Walk+0x558>
737c: e1a03007 mov r3, r7
7380: e1a0e00f mov lr, pc
7384: e12fff14 bx r4
7388: ea00005e b 7508 <_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;
738c: e59d2028 ldr r2, [sp, #40] ; 0x28
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
7390: e1a0000a mov r0, sl
7394: e1a01009 mov r1, r9
7398: e057b002 subs fp, r7, r2
739c: 13a0b001 movne fp, #1
73a0: e58d301c str r3, [sp, #28]
73a4: ebffe70e bl fe4 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
73a8: e3500000 cmp r0, #0
73ac: e59d301c ldr r3, [sp, #28]
73b0: 0a000005 beq 73cc <_Heap_Walk+0x330>
73b4: e35b0000 cmp fp, #0
(*printer)(
73b8: 158da000 strne sl, [sp]
73bc: 11a00005 movne r0, r5
73c0: 13a01001 movne r1, #1
73c4: 159f222c ldrne r2, [pc, #556] ; 75f8 <_Heap_Walk+0x55c>
73c8: 1a000014 bne 7420 <_Heap_Walk+0x384>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
73cc: e59dc024 ldr ip, [sp, #36] ; 0x24
73d0: e15a000c cmp sl, ip
73d4: 2a000009 bcs 7400 <_Heap_Walk+0x364>
73d8: e35b0000 cmp fp, #0
73dc: 0a000007 beq 7400 <_Heap_Walk+0x364>
(*printer)(
73e0: e88d1400 stm sp, {sl, ip}
73e4: e1a00005 mov r0, r5
73e8: e3a01001 mov r1, #1
73ec: e59f2208 ldr r2, [pc, #520] ; 75fc <_Heap_Walk+0x560>
73f0: e1a03007 mov r3, r7
73f4: e1a0e00f mov lr, pc
73f8: e12fff14 bx r4
73fc: ea00006b b 75b0 <_Heap_Walk+0x514>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
7400: e1580007 cmp r8, r7
7404: 8a000009 bhi 7430 <_Heap_Walk+0x394>
7408: e35b0000 cmp fp, #0
740c: 0a000007 beq 7430 <_Heap_Walk+0x394>
(*printer)(
7410: e58d8000 str r8, [sp]
7414: e59f21e4 ldr r2, [pc, #484] ; 7600 <_Heap_Walk+0x564>
7418: e1a00005 mov r0, r5
741c: e3a01001 mov r1, #1
7420: e1a03007 mov r3, r7
7424: e1a0e00f mov lr, pc
7428: e12fff14 bx r4
742c: ea00005f b 75b0 <_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;
7430: e203b001 and fp, r3, #1
7434: e5983004 ldr r3, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
7438: e3130001 tst r3, #1
743c: 1a00003b bne 7530 <_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 ?
7440: 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)(
7444: e5963008 ldr r3, [r6, #8]
7448: e1520003 cmp r2, r3
block = next_block;
} while ( block != first_block );
return true;
}
744c: 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)(
7450: 059f01ac ldreq r0, [pc, #428] ; 7604 <_Heap_Walk+0x568>
7454: 0a000003 beq 7468 <_Heap_Walk+0x3cc>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
7458: e59f31a8 ldr r3, [pc, #424] ; 7608 <_Heap_Walk+0x56c>
745c: e1520006 cmp r2, r6
7460: e59f01a4 ldr r0, [pc, #420] ; 760c <_Heap_Walk+0x570>
7464: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
7468: 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)(
746c: e1530001 cmp r3, r1
7470: 059f1198 ldreq r1, [pc, #408] ; 7610 <_Heap_Walk+0x574>
7474: 0a000003 beq 7488 <_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)" : "")
7478: e59fc194 ldr ip, [pc, #404] ; 7614 <_Heap_Walk+0x578>
747c: e1530006 cmp r3, r6
7480: e59f1184 ldr r1, [pc, #388] ; 760c <_Heap_Walk+0x570>
7484: 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)(
7488: e58d2004 str r2, [sp, #4]
748c: e58d0008 str r0, [sp, #8]
7490: e58d300c str r3, [sp, #12]
7494: e58d1010 str r1, [sp, #16]
7498: e1a03007 mov r3, r7
749c: e58da000 str sl, [sp]
74a0: e1a00005 mov r0, r5
74a4: e3a01000 mov r1, #0
74a8: e59f2168 ldr r2, [pc, #360] ; 7618 <_Heap_Walk+0x57c>
74ac: e1a0e00f mov lr, pc
74b0: e12fff14 bx r4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
74b4: e5983000 ldr r3, [r8]
74b8: e15a0003 cmp sl, r3
74bc: 0a000009 beq 74e8 <_Heap_Walk+0x44c>
(*printer)(
74c0: e58d3004 str r3, [sp, #4]
74c4: e58da000 str sl, [sp]
74c8: e58d8008 str r8, [sp, #8]
74cc: e1a00005 mov r0, r5
74d0: e3a01001 mov r1, #1
74d4: e59f2140 ldr r2, [pc, #320] ; 761c <_Heap_Walk+0x580>
74d8: e1a03007 mov r3, r7
74dc: e1a0e00f mov lr, pc
74e0: e12fff14 bx r4
74e4: ea000031 b 75b0 <_Heap_Walk+0x514>
);
return false;
}
if ( !prev_used ) {
74e8: e35b0000 cmp fp, #0
74ec: 1a000007 bne 7510 <_Heap_Walk+0x474>
(*printer)(
74f0: e59f2128 ldr r2, [pc, #296] ; 7620 <_Heap_Walk+0x584>
74f4: e1a00005 mov r0, r5
74f8: e3a01001 mov r1, #1
74fc: e1a03007 mov r3, r7
7500: e1a0e00f mov lr, pc
7504: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
7508: e1a0800b mov r8, fp
750c: ea00001e b 758c <_Heap_Walk+0x4f0>
block = next_block;
} while ( block != first_block );
return true;
}
7510: e5963008 ldr r3, [r6, #8]
7514: ea000002 b 7524 <_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 ) {
7518: e1530007 cmp r3, r7
751c: 0a000016 beq 757c <_Heap_Walk+0x4e0>
return true;
}
free_block = free_block->next;
7520: 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 ) {
7524: e1530006 cmp r3, r6
7528: 1afffffa bne 7518 <_Heap_Walk+0x47c>
752c: ea000019 b 7598 <_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) {
7530: e35b0000 cmp fp, #0
7534: 0a000007 beq 7558 <_Heap_Walk+0x4bc>
(*printer)(
7538: e58da000 str sl, [sp]
753c: e1a00005 mov r0, r5
7540: e3a01000 mov r1, #0
7544: e59f20d8 ldr r2, [pc, #216] ; 7624 <_Heap_Walk+0x588>
7548: e1a03007 mov r3, r7
754c: e1a0e00f mov lr, pc
7550: e12fff14 bx r4
7554: ea000008 b 757c <_Heap_Walk+0x4e0>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
7558: e58da000 str sl, [sp]
755c: e5973000 ldr r3, [r7]
7560: e1a00005 mov r0, r5
7564: e58d3004 str r3, [sp, #4]
7568: e1a0100b mov r1, fp
756c: e59f20b4 ldr r2, [pc, #180] ; 7628 <_Heap_Walk+0x58c>
7570: e1a03007 mov r3, r7
7574: e1a0e00f mov lr, pc
7578: e12fff14 bx r4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
757c: e59d2020 ldr r2, [sp, #32]
7580: e1580002 cmp r8, r2
7584: 1affff6a bne 7334 <_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;
7588: e3a08001 mov r8, #1
block = next_block;
} while ( block != first_block );
return true;
}
758c: e1a00008 mov r0, r8
7590: e28dd030 add sp, sp, #48 ; 0x30
7594: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
7598: e59f208c ldr r2, [pc, #140] ; 762c <_Heap_Walk+0x590>
759c: e1a00005 mov r0, r5
75a0: e3a01001 mov r1, #1
75a4: e1a03007 mov r3, r7
75a8: e1a0e00f mov lr, pc
75ac: e12fff14 bx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
75b0: e3a08000 mov r8, #0
75b4: eafffff4 b 758c <_Heap_Walk+0x4f0>
00009b2c <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
9b2c: e5902000 ldr r2, [r0]
9b30: e5913000 ldr r3, [r1]
9b34: e1520003 cmp r2, r3
return true;
9b38: c3a00001 movgt r0, #1
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
9b3c: c12fff1e bxgt lr
return true;
if ( lhs->tv_sec < rhs->tv_sec )
9b40: ba000005 blt 9b5c <_Timespec_Greater_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
9b44: e5900004 ldr r0, [r0, #4]
9b48: e5913004 ldr r3, [r1, #4]
9b4c: e1500003 cmp r0, r3
9b50: d3a00000 movle r0, #0
9b54: c3a00001 movgt r0, #1
9b58: e12fff1e bx lr
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
9b5c: e3a00000 mov r0, #0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
9b60: e12fff1e bx lr <== NOT EXECUTED
0001fa5c <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
1fa5c: e3a00000 mov r0, #0 <== NOT EXECUTED
1fa60: e12fff1e bx lr <== NOT EXECUTED
000021f4 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
21f4: eaffffe5 b 2190 <gettimeofday> <== NOT EXECUTED
0000898c <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
898c: 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 ) )
8990: e3d27007 bics r7, r2, #7
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
8994: e1a09000 mov r9, r0
8998: e1a04001 mov r4, r1
899c: 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 ) )
89a0: 0a000002 beq 89b0 <devFS_evaluate_path+0x24>
rtems_set_errno_and_return_minus_one( EPERM );
89a4: eb00066b bl a358 <__errno> <== NOT EXECUTED
89a8: e3a03001 mov r3, #1 <== NOT EXECUTED
89ac: ea000005 b 89c8 <devFS_evaluate_path+0x3c> <== NOT EXECUTED
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
89b0: e5936000 ldr r6, [r3]
if (!device_name_table)
89b4: e3560000 cmp r6, #0
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
89b8: 159fa094 ldrne sl, [pc, #148] ; 8a54 <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)
89bc: 1a00001c bne 8a34 <devFS_evaluate_path+0xa8>
rtems_set_errno_and_return_minus_one( EFAULT );
89c0: eb000664 bl a358 <__errno>
89c4: e3a0300e mov r3, #14
89c8: e5803000 str r3, [r0]
89cc: e3e00000 mvn r0, #0
89d0: 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)
89d4: e5968000 ldr r8, [r6]
89d8: e3580000 cmp r8, #0
89dc: 0a000012 beq 8a2c <devFS_evaluate_path+0xa0>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
89e0: e1a00009 mov r0, r9
89e4: e1a01008 mov r1, r8
89e8: e1a02004 mov r2, r4
89ec: eb0009e0 bl b174 <strncmp>
89f0: e3500000 cmp r0, #0
89f4: 1a00000c bne 8a2c <devFS_evaluate_path+0xa0>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
89f8: e7d80004 ldrb r0, [r8, r4]
89fc: e3500000 cmp r0, #0
8a00: 1a000009 bne 8a2c <devFS_evaluate_path+0xa0>
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
8a04: e59f304c ldr r3, [pc, #76] ; 8a58 <devFS_evaluate_path+0xcc>
8a08: e5853008 str r3, [r5, #8]
pathloc->ops = &devFS_ops;
8a0c: e59f3048 ldr r3, [pc, #72] ; 8a5c <devFS_evaluate_path+0xd0>
8a10: e585300c str r3, [r5, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8a14: e59f3044 ldr r3, [pc, #68] ; 8a60 <devFS_evaluate_path+0xd4>
8a18: e5933000 ldr r3, [r3]
8a1c: e5933028 ldr r3, [r3, #40] ; 0x28
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
8a20: e5856000 str r6, [r5]
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8a24: e5853010 str r3, [r5, #16]
return 0;
8a28: 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++) {
8a2c: e2877001 add r7, r7, #1
8a30: e2866014 add r6, r6, #20
8a34: e59a3000 ldr r3, [sl]
8a38: e1570003 cmp r7, r3
8a3c: 3affffe4 bcc 89d4 <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 );
8a40: eb000644 bl a358 <__errno>
8a44: e3a03002 mov r3, #2
8a48: e5803000 str r3, [r0]
8a4c: e3e00000 mvn r0, #0
}
8a50: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
00002f50 <drainOutput>:
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
2f50: e59030b4 ldr r3, [r0, #180] ; 0xb4
2f54: e3530000 cmp r3, #0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
2f58: e92d4030 push {r4, r5, lr}
2f5c: e1a04000 mov r4, r0
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
2f60: 08bd8030 popeq {r4, r5, pc}
rtems_interrupt_disable (level);
2f64: ebfffff5 bl 2f40 <arm_interrupt_disable>
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
2f68: 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) {
2f6c: ea000008 b 2f94 <drainOutput+0x44>
tty->rawOutBufState = rob_wait;
2f70: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
2f74: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
2f78: e3a01000 mov r1, #0 <== NOT EXECUTED
2f7c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
2f80: e1a02001 mov r2, r1 <== NOT EXECUTED
2f84: eb0008cc bl 52bc <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2f88: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
2f8c: 1b000a65 blne 5928 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
2f90: ebffffea bl 2f40 <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) {
2f94: e5942084 ldr r2, [r4, #132] ; 0x84
2f98: e5943080 ldr r3, [r4, #128] ; 0x80
2f9c: e1520003 cmp r2, r3
2fa0: 1afffff2 bne 2f70 <drainOutput+0x20>
2fa4: e129f000 msr CPSR_fc, r0
2fa8: e8bd8030 pop {r4, r5, pc}
00003c30 <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)
3c30: e5903020 ldr r3, [r0, #32]
3c34: 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)
{
3c38: e92d41f0 push {r4, r5, r6, r7, r8, lr}
3c3c: e1a04000 mov r4, r0
3c40: e1a07001 mov r7, r1
if (tty->ccount == 0)
3c44: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
return;
if (lineFlag) {
3c48: e3510000 cmp r1, #0
3c4c: 0a000060 beq 3dd4 <erase+0x1a4>
if (!(tty->termios.c_lflag & ECHO)) {
3c50: e590303c ldr r3, [r0, #60] ; 0x3c
3c54: e2132008 ands r2, r3, #8
tty->ccount = 0;
3c58: 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)) {
3c5c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
3c60: e2133010 ands r3, r3, #16
3c64: 1a00005a bne 3dd4 <erase+0x1a4>
tty->ccount = 0;
3c68: e5803020 str r3, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
3c6c: e1a01004 mov r1, r4 <== NOT EXECUTED
3c70: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED
3c74: ebffffca bl 3ba4 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
3c78: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
3c7c: e3130020 tst r3, #32 <== NOT EXECUTED
echo ('\n', tty);
3c80: 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)
3c84: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
3c88: ea00000b b 3cbc <erase+0x8c> <== NOT EXECUTED
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
3c8c: e2411001 sub r1, r1, #1
if (tty->termios.c_lflag & ECHO) {
3c90: e594303c ldr r3, [r4, #60] ; 0x3c
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
3c94: e594001c ldr r0, [r4, #28]
3c98: e5841020 str r1, [r4, #32]
if (tty->termios.c_lflag & ECHO) {
3c9c: e3130008 tst r3, #8
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
3ca0: e7d05001 ldrb r5, [r0, r1]
if (tty->termios.c_lflag & ECHO) {
3ca4: 0a000047 beq 3dc8 <erase+0x198>
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
3ca8: e3570000 cmp r7, #0
3cac: 1a000005 bne 3cc8 <erase+0x98>
3cb0: e3130010 tst r3, #16
3cb4: 1a000003 bne 3cc8 <erase+0x98>
echo (tty->termios.c_cc[VERASE], tty);
3cb8: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED
3cbc: e1a01004 mov r1, r4 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
3cc0: 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);
3cc4: eaffffb6 b 3ba4 <echo> <== NOT EXECUTED
} else if (c == '\t') {
3cc8: e3550009 cmp r5, #9
3ccc: 1a00001f bne 3d50 <erase+0x120>
int col = tty->read_start_column;
3cd0: 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)) {
3cd4: 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;
3cd8: 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)
3cdc: e2033c02 and r3, r3, #512 ; 0x200
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
3ce0: ea00000c b 3d18 <erase+0xe8>
c = tty->cbuf[i++];
3ce4: e7d0c002 ldrb ip, [r0, r2]
if (c == '\t') {
3ce8: e35c0009 cmp ip, #9
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
3cec: e2822001 add r2, r2, #1
if (c == '\t') {
col = (col | 7) + 1;
3cf0: 03855007 orreq r5, r5, #7
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
3cf4: 0a000006 beq 3d14 <erase+0xe4>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
3cf8: e088c00c add ip, r8, ip
3cfc: e5dcc001 ldrb ip, [ip, #1]
3d00: e31c0020 tst ip, #32
3d04: 0a000002 beq 3d14 <erase+0xe4>
if (tty->termios.c_lflag & ECHOCTL)
3d08: e3530000 cmp r3, #0 <== NOT EXECUTED
col += 2;
3d0c: 12855002 addne r5, r5, #2 <== NOT EXECUTED
3d10: ea000000 b 3d18 <erase+0xe8> <== NOT EXECUTED
} else {
col++;
3d14: e2855001 add r5, r5, #1
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
3d18: e1520001 cmp r2, r1
3d1c: 1afffff0 bne 3ce4 <erase+0xb4>
3d20: ea000006 b 3d40 <erase+0x110>
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
3d24: e59f00bc ldr r0, [pc, #188] ; 3de8 <erase+0x1b8>
3d28: e3a01001 mov r1, #1
3d2c: e1a02004 mov r2, r4
3d30: ebffff07 bl 3954 <rtems_termios_puts>
tty->column--;
3d34: e5943028 ldr r3, [r4, #40] ; 0x28
3d38: e2433001 sub r3, r3, #1
3d3c: e5843028 str r3, [r4, #40] ; 0x28
}
/*
* Back up over the tab
*/
while (tty->column > col) {
3d40: e5943028 ldr r3, [r4, #40] ; 0x28
3d44: e1530005 cmp r3, r5
3d48: cafffff5 bgt 3d24 <erase+0xf4>
3d4c: ea00001d b 3dc8 <erase+0x198>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
3d50: e5962000 ldr r2, [r6]
3d54: e2855001 add r5, r5, #1
3d58: e7d22005 ldrb r2, [r2, r5]
3d5c: e3120020 tst r2, #32
3d60: 0a000009 beq 3d8c <erase+0x15c>
3d64: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
3d68: 0a000007 beq 3d8c <erase+0x15c> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
3d6c: e59f0078 ldr r0, [pc, #120] ; 3dec <erase+0x1bc> <== NOT EXECUTED
3d70: e3a01003 mov r1, #3 <== NOT EXECUTED
3d74: e1a02004 mov r2, r4 <== NOT EXECUTED
3d78: ebfffef5 bl 3954 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
3d7c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3d80: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3d84: 12433001 subne r3, r3, #1 <== NOT EXECUTED
3d88: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
3d8c: e5963000 ldr r3, [r6]
3d90: e7d33005 ldrb r3, [r3, r5]
3d94: e3130020 tst r3, #32
3d98: 0a000002 beq 3da8 <erase+0x178>
3d9c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
3da0: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
3da4: 0a000007 beq 3dc8 <erase+0x198> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
3da8: e59f003c ldr r0, [pc, #60] ; 3dec <erase+0x1bc>
3dac: e3a01003 mov r1, #3
3db0: e1a02004 mov r2, r4
3db4: ebfffee6 bl 3954 <rtems_termios_puts>
if (tty->column)
3db8: e5943028 ldr r3, [r4, #40] ; 0x28
3dbc: e3530000 cmp r3, #0
tty->column--;
3dc0: 12433001 subne r3, r3, #1
3dc4: 15843028 strne r3, [r4, #40] ; 0x28
}
}
}
if (!lineFlag)
3dc8: e3570000 cmp r7, #0
3dcc: 1a000001 bne 3dd8 <erase+0x1a8>
3dd0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
3dd4: e59f6014 ldr r6, [pc, #20] ; 3df0 <erase+0x1c0>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
3dd8: e5941020 ldr r1, [r4, #32]
3ddc: e3510000 cmp r1, #0
3de0: 1affffa9 bne 3c8c <erase+0x5c>
3de4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
000029ec <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
29ec: e92d000e push {r1, r2, r3}
29f0: e92d40f1 push {r0, r4, r5, r6, r7, lr}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
29f4: e59f21a4 ldr r2, [pc, #420] ; 2ba0 <fcntl+0x1b4>
29f8: e5921000 ldr r1, [r2]
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
29fc: e28d301c add r3, sp, #28
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
2a00: e1500001 cmp r0, r1
int fcntl(
int fd,
int cmd,
...
)
{
2a04: e59d7018 ldr r7, [sp, #24]
int ret;
va_list ap;
va_start( ap, cmd );
2a08: e58d3000 str r3, [sp]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
2a0c: 2a000006 bcs 2a2c <fcntl+0x40>
iop = rtems_libio_iop( fd );
2a10: e59f218c ldr r2, [pc, #396] ; 2ba4 <fcntl+0x1b8>
2a14: e5922000 ldr r2, [r2]
2a18: e3a04038 mov r4, #56 ; 0x38
2a1c: e0242490 mla r4, r0, r4, r2
rtems_libio_check_is_open(iop);
2a20: e5940014 ldr r0, [r4, #20]
2a24: e3100c01 tst r0, #256 ; 0x100
2a28: 1a000002 bne 2a38 <fcntl+0x4c>
2a2c: eb00298c bl d064 <__errno>
2a30: e3a03009 mov r3, #9
2a34: ea000047 b 2b58 <fcntl+0x16c>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
2a38: e3570009 cmp r7, #9
2a3c: 979ff107 ldrls pc, [pc, r7, lsl #2]
2a40: ea000042 b 2b50 <fcntl+0x164>
2a44: 00002a6c .word 0x00002a6c
2a48: 00002adc .word 0x00002adc
2a4c: 00002aec .word 0x00002aec
2a50: 00002b0c .word 0x00002b0c
2a54: 00002b18 .word 0x00002b18
2a58: 00002b44 .word 0x00002b44
2a5c: 00002b44 .word 0x00002b44
2a60: 00002b44 .word 0x00002b44
2a64: 00002b44 .word 0x00002b44
2a68: 00002b44 .word 0x00002b44
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
2a6c: e5933000 ldr r3, [r3]
if ( fd2 )
2a70: e3530000 cmp r3, #0
2a74: 0a000004 beq 2a8c <fcntl+0xa0>
diop = rtems_libio_iop( fd2 );
2a78: e1530001 cmp r3, r1
2a7c: 33a06038 movcc r6, #56 ; 0x38
2a80: 30262693 mlacc r6, r3, r6, r2
2a84: 3a000005 bcc 2aa0 <fcntl+0xb4>
2a88: ea000003 b 2a9c <fcntl+0xb0> <== NOT EXECUTED
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
2a8c: eb000190 bl 30d4 <rtems_libio_allocate>
if ( diop == 0 ) {
2a90: e2506000 subs r6, r0, #0
2a94: 1a000001 bne 2aa0 <fcntl+0xb4>
2a98: ea00003b b 2b8c <fcntl+0x1a0> <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
2a9c: e3a06000 mov r6, #0 <== NOT EXECUTED
ret = -1;
break;
}
}
diop->flags = iop->flags;
2aa0: e5943014 ldr r3, [r4, #20]
diop->pathinfo = iop->pathinfo;
2aa4: e2845018 add r5, r4, #24
ret = -1;
break;
}
}
diop->flags = iop->flags;
2aa8: e5863014 str r3, [r6, #20]
diop->pathinfo = iop->pathinfo;
2aac: e8b5000f ldm r5!, {r0, r1, r2, r3}
2ab0: e286c018 add ip, r6, #24
2ab4: e8ac000f stmia ip!, {r0, r1, r2, r3}
2ab8: e5953000 ldr r3, [r5]
2abc: e58c3000 str r3, [ip]
ret = (int) (diop - rtems_libio_iops);
2ac0: e59f30dc ldr r3, [pc, #220] ; 2ba4 <fcntl+0x1b8>
2ac4: e5933000 ldr r3, [r3]
2ac8: e0636006 rsb r6, r3, r6
2acc: e59f30d4 ldr r3, [pc, #212] ; 2ba8 <fcntl+0x1bc>
2ad0: e1a061c6 asr r6, r6, #3
2ad4: e0060693 mul r6, r3, r6
2ad8: ea000020 b 2b60 <fcntl+0x174>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
2adc: e3100b02 tst r0, #2048 ; 0x800
2ae0: 03a06000 moveq r6, #0
2ae4: 13a06001 movne r6, #1
2ae8: ea00001e b 2b68 <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 ) )
2aec: e5936000 ldr r6, [r3]
2af0: e3560000 cmp r6, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
2af4: 13800b02 orrne r0, r0, #2048 ; 0x800
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
2af8: 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;
2afc: 15840014 strne r0, [r4, #20]
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
2b00: 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 ) )
2b04: 0a000017 beq 2b68 <fcntl+0x17c>
2b08: ea00000b b 2b3c <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 );
2b0c: eb00015e bl 308c <rtems_libio_to_fcntl_flags>
2b10: e1a06000 mov r6, r0
2b14: ea000011 b 2b60 <fcntl+0x174>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
2b18: e5930000 ldr r0, [r3]
2b1c: eb00014d bl 3058 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
2b20: e5942014 ldr r2, [r4, #20]
2b24: e59f3080 ldr r3, [pc, #128] ; 2bac <fcntl+0x1c0>
2b28: e3c22c02 bic r2, r2, #512 ; 0x200
2b2c: e0003003 and r3, r0, r3
2b30: e3c22001 bic r2, r2, #1
2b34: e1833002 orr r3, r3, r2
2b38: e5843014 str r3, [r4, #20]
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
2b3c: e3a06000 mov r6, #0
2b40: ea000008 b 2b68 <fcntl+0x17c>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
2b44: eb002946 bl d064 <__errno>
2b48: e3a03086 mov r3, #134 ; 0x86
2b4c: ea000001 b 2b58 <fcntl+0x16c>
ret = -1;
break;
default:
errno = EINVAL;
2b50: eb002943 bl d064 <__errno>
2b54: e3a03016 mov r3, #22
2b58: e5803000 str r3, [r0]
2b5c: ea00000a b 2b8c <fcntl+0x1a0>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
2b60: e3560000 cmp r6, #0
2b64: ba000009 blt 2b90 <fcntl+0x1a4>
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
2b68: e5943020 ldr r3, [r4, #32]
2b6c: e1a01004 mov r1, r4
2b70: e1a00007 mov r0, r7
2b74: e1a0e00f mov lr, pc
2b78: e593f030 ldr pc, [r3, #48] ; 0x30
if (err) {
2b7c: e2504000 subs r4, r0, #0
2b80: 0a000002 beq 2b90 <fcntl+0x1a4>
errno = err;
2b84: eb002936 bl d064 <__errno> <== NOT EXECUTED
2b88: e5804000 str r4, [r0] <== NOT EXECUTED
ret = -1;
2b8c: e3e06000 mvn r6, #0
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
2b90: e1a00006 mov r0, r6
2b94: e8bd40f8 pop {r3, r4, r5, r6, r7, lr}
2b98: e28dd00c add sp, sp, #12
2b9c: e12fff1e bx lr
0000b6b8 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
b6b8: e92d45f3 push {r0, r1, 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) {
b6bc: e59f5378 ldr r5, [pc, #888] ; ba3c <fifo_open+0x384>
b6c0: e5954000 ldr r4, [r5]
b6c4: e3540000 cmp r4, #0
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
b6c8: e1a08000 mov r8, r0
b6cc: e1a07001 mov r7, r1
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
b6d0: 1a000012 bne b720 <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 );
b6d4: e59f3364 ldr r3, [pc, #868] ; ba40 <fifo_open+0x388>
b6d8: e1a01004 mov r1, r4
b6dc: e5930000 ldr r0, [r3]
b6e0: e1a02004 mov r2, r4
b6e4: ebffeedd bl 7260 <rtems_semaphore_obtain>
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
b6e8: e5953000 ldr r3, [r5]
b6ec: e3530000 cmp r3, #0
b6f0: 1a000005 bne b70c <fifo_open+0x54>
sc = rtems_semaphore_create(
b6f4: e59f0348 ldr r0, [pc, #840] ; ba44 <fifo_open+0x38c>
b6f8: e3a01001 mov r1, #1
b6fc: e3a02054 mov r2, #84 ; 0x54
b700: e58d5000 str r5, [sp]
b704: ebffee43 bl 7018 <rtems_semaphore_create>
b708: e1a04000 mov r4, r0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
b70c: e59f332c ldr r3, [pc, #812] ; ba40 <fifo_open+0x388>
b710: e5930000 ldr r0, [r3]
b714: ebffef17 bl 7378 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
b718: e3540000 cmp r4, #0
b71c: 1a000006 bne b73c <fifo_open+0x84>
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
b720: e59f3314 ldr r3, [pc, #788] ; ba3c <fifo_open+0x384>
b724: e3a01000 mov r1, #0
b728: e5930000 ldr r0, [r3]
b72c: e1a02001 mov r2, r1
b730: ebffeeca bl 7260 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
b734: e2505000 subs r5, r0, #0
b738: 0a000000 beq b740 <fifo_open+0x88>
return 0;
} else {
return -ENOMEM;
b73c: e3e0500b mvn r5, #11
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
if (err)
b740: e2556000 subs r6, r5, #0
b744: 1a0000ba bne ba34 <fifo_open+0x37c>
return err;
pipe = *pipep;
b748: e5984000 ldr r4, [r8]
if (pipe == NULL) {
b74c: e3540000 cmp r4, #0
b750: 1a00003c bne b848 <fifo_open+0x190>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
b754: e3a00034 mov r0, #52 ; 0x34
b758: ebffe2df bl 42dc <malloc>
if (pipe == NULL)
b75c: e250a000 subs sl, r0, #0
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
b760: e1a04000 mov r4, r0
if (pipe == NULL)
b764: 0a000035 beq b840 <fifo_open+0x188>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
b768: e1a01005 mov r1, r5
b76c: e3a02034 mov r2, #52 ; 0x34
b770: eb000e03 bl ef84 <memset>
pipe->Size = PIPE_BUF;
b774: e3a00c02 mov r0, #512 ; 0x200
b778: e5840004 str r0, [r4, #4]
pipe->Buffer = malloc(pipe->Size);
b77c: ebffe2d6 bl 42dc <malloc>
if (! pipe->Buffer)
b780: 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);
b784: e5840000 str r0, [r4]
if (! pipe->Buffer)
b788: 0a00002a beq b838 <fifo_open+0x180>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
b78c: e59f62b4 ldr r6, [pc, #692] ; ba48 <fifo_open+0x390>
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
b790: e59f02b4 ldr r0, [pc, #692] ; ba4c <fifo_open+0x394>
rtems_build_name ('P', 'I', 'r', c),
b794: e5d63000 ldrb r3, [r6]
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
b798: e1a01005 mov r1, r5
b79c: e1830000 orr r0, r3, r0
b7a0: e1a02005 mov r2, r5
b7a4: e284302c add r3, r4, #44 ; 0x2c
b7a8: eb0003dd bl c724 <rtems_barrier_create>
b7ac: e3500000 cmp r0, #0
b7b0: 1a00001e bne b830 <fifo_open+0x178>
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),
b7b4: 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(
b7b8: e59f0290 ldr r0, [pc, #656] ; ba50 <fifo_open+0x398>
b7bc: e1a01005 mov r1, r5
b7c0: e1830000 orr r0, r3, r0
b7c4: e1a02005 mov r2, r5
b7c8: e2843030 add r3, r4, #48 ; 0x30
b7cc: eb0003d4 bl c724 <rtems_barrier_create>
b7d0: e3500000 cmp r0, #0
b7d4: 1a000013 bne b828 <fifo_open+0x170>
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,
b7d8: 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(
b7dc: e59f0270 ldr r0, [pc, #624] ; ba54 <fifo_open+0x39c>
b7e0: e2842028 add r2, r4, #40 ; 0x28
b7e4: e58d2000 str r2, [sp]
b7e8: e1830000 orr r0, r3, r0
b7ec: e3a01001 mov r1, #1
b7f0: e3a02010 mov r2, #16
b7f4: e1a03005 mov r3, r5
b7f8: ebffee06 bl 7018 <rtems_semaphore_create>
b7fc: e3500000 cmp r0, #0
b800: 1a000006 bne b820 <fifo_open+0x168>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
b804: e5d63000 ldrb r3, [r6]
b808: e353007a cmp r3, #122 ; 0x7a
b80c: e2832001 add r2, r3, #1
c = 'a';
b810: 03a03061 moveq r3, #97 ; 0x61
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
b814: e5c62000 strb r2, [r6]
c = 'a';
b818: 05c63000 strbeq r3, [r6]
b81c: ea000009 b b848 <fifo_open+0x190>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
b820: e59a0030 ldr r0, [sl, #48] ; 0x30
b824: eb0003ee bl c7e4 <rtems_barrier_delete>
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
b828: e59a002c ldr r0, [sl, #44] ; 0x2c
b82c: eb0003ec bl c7e4 <rtems_barrier_delete>
err_rbar:
free(pipe->Buffer);
b830: e59a0000 ldr r0, [sl]
b834: ebffe0d5 bl 3b90 <free>
err_buf:
free(pipe);
b838: e1a0000a mov r0, sl
b83c: ebffe0d3 bl 3b90 <free>
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
b840: e3e0600b mvn r6, #11
b844: ea00000d b b880 <fifo_open+0x1c8>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
b848: e3a01000 mov r1, #0
b84c: e5940028 ldr r0, [r4, #40] ; 0x28
b850: e1a02001 mov r2, r1
b854: ebffee81 bl 7260 <rtems_semaphore_obtain>
err = -EINTR;
if (*pipep == NULL) {
b858: e5983000 ldr r3, [r8]
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
b85c: e3500000 cmp r0, #0
b860: 03a06000 moveq r6, #0
b864: 13e06003 mvnne r6, #3
if (*pipep == NULL) {
b868: e3530000 cmp r3, #0
b86c: 1a000003 bne b880 <fifo_open+0x1c8>
if (err)
b870: e3560000 cmp r6, #0
pipe_free(pipe);
else
*pipep = pipe;
b874: 05884000 streq r4, [r8]
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
pipe_free(pipe);
b878: 11a00004 movne r0, r4
b87c: 1bffff54 blne b5d4 <pipe_free>
else
*pipep = pipe;
}
out:
pipe_unlock();
b880: ebffff4f bl b5c4 <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
b884: e3560000 cmp r6, #0
b888: 1a000069 bne ba34 <fifo_open+0x37c>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
b88c: e5973014 ldr r3, [r7, #20]
b890: e2033006 and r3, r3, #6
b894: e3530004 cmp r3, #4
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
b898: e5984000 ldr r4, [r8]
switch (LIBIO_ACCMODE(iop)) {
b89c: 0a000024 beq b934 <fifo_open+0x27c>
b8a0: e3530006 cmp r3, #6
b8a4: 0a000047 beq b9c8 <fifo_open+0x310>
b8a8: e3530002 cmp r3, #2
b8ac: 1a000059 bne ba18 <fifo_open+0x360>
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
b8b0: e5943020 ldr r3, [r4, #32]
b8b4: e2833001 add r3, r3, #1
b8b8: e5843020 str r3, [r4, #32]
if (pipe->Readers ++ == 0)
b8bc: e5943010 ldr r3, [r4, #16]
b8c0: e2832001 add r2, r3, #1
b8c4: e3530000 cmp r3, #0
b8c8: e5842010 str r2, [r4, #16]
PIPE_WAKEUPWRITERS(pipe);
b8cc: 05940030 ldreq r0, [r4, #48] ; 0x30
b8d0: 028d1004 addeq r1, sp, #4
b8d4: 0b0003ea bleq c884 <rtems_barrier_release>
if (pipe->Writers == 0) {
b8d8: e5943014 ldr r3, [r4, #20]
b8dc: e3530000 cmp r3, #0
b8e0: 1a00004c bne ba18 <fifo_open+0x360>
/* Not an error */
if (LIBIO_NODELAY(iop))
b8e4: e5973014 ldr r3, [r7, #20]
b8e8: e3130001 tst r3, #1
b8ec: 1a000049 bne ba18 <fifo_open+0x360>
break;
prevCounter = pipe->writerCounter;
b8f0: e5945024 ldr r5, [r4, #36] ; 0x24
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
b8f4: e5940028 ldr r0, [r4, #40] ; 0x28
b8f8: ebffee9e bl 7378 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
b8fc: e3a01000 mov r1, #0
b900: e594002c ldr r0, [r4, #44] ; 0x2c
b904: eb0003f4 bl c8dc <rtems_barrier_wait>
b908: e2501000 subs r1, r0, #0
b90c: 1a000044 bne ba24 <fifo_open+0x36c>
goto out_error;
if (! PIPE_LOCK(pipe))
b910: e5940028 ldr r0, [r4, #40] ; 0x28
b914: e1a02001 mov r2, r1
b918: ebffee50 bl 7260 <rtems_semaphore_obtain>
b91c: e3500000 cmp r0, #0
b920: 1a00003f bne ba24 <fifo_open+0x36c>
goto out_error;
} while (prevCounter == pipe->writerCounter);
b924: e5943024 ldr r3, [r4, #36] ; 0x24
b928: e1550003 cmp r5, r3
b92c: 0afffff0 beq b8f4 <fifo_open+0x23c>
b930: ea000038 b ba18 <fifo_open+0x360>
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
b934: e5943024 ldr r3, [r4, #36] ; 0x24
b938: e2833001 add r3, r3, #1
b93c: e5843024 str r3, [r4, #36] ; 0x24
if (pipe->Writers ++ == 0)
b940: e5943014 ldr r3, [r4, #20]
b944: e2832001 add r2, r3, #1
b948: e3530000 cmp r3, #0
b94c: e5842014 str r2, [r4, #20]
PIPE_WAKEUPREADERS(pipe);
b950: 0594002c ldreq r0, [r4, #44] ; 0x2c
b954: 028d1004 addeq r1, sp, #4
b958: 0b0003c9 bleq c884 <rtems_barrier_release>
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
b95c: e5943010 ldr r3, [r4, #16]
b960: e3530000 cmp r3, #0
b964: 1a00002b bne ba18 <fifo_open+0x360>
b968: e5973014 ldr r3, [r7, #20]
b96c: e3130001 tst r3, #1
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
b970: 05945020 ldreq r5, [r4, #32]
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
b974: 0a000003 beq b988 <fifo_open+0x2d0>
PIPE_UNLOCK(pipe);
b978: e5940028 ldr r0, [r4, #40] ; 0x28
b97c: ebffee7d bl 7378 <rtems_semaphore_release>
err = -ENXIO;
b980: e3e06005 mvn r6, #5
goto out_error;
b984: ea000027 b ba28 <fifo_open+0x370>
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
b988: e5940028 ldr r0, [r4, #40] ; 0x28
b98c: ebffee79 bl 7378 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
b990: e3a01000 mov r1, #0
b994: e5940030 ldr r0, [r4, #48] ; 0x30
b998: eb0003cf bl c8dc <rtems_barrier_wait>
b99c: e2501000 subs r1, r0, #0
b9a0: 1a00001f bne ba24 <fifo_open+0x36c>
goto out_error;
if (! PIPE_LOCK(pipe))
b9a4: e5940028 ldr r0, [r4, #40] ; 0x28
b9a8: e1a02001 mov r2, r1
b9ac: ebffee2b bl 7260 <rtems_semaphore_obtain>
b9b0: e3500000 cmp r0, #0
b9b4: 1a00001a bne ba24 <fifo_open+0x36c>
goto out_error;
} while (prevCounter == pipe->readerCounter);
b9b8: e5943020 ldr r3, [r4, #32]
b9bc: e1550003 cmp r5, r3
b9c0: 0afffff0 beq b988 <fifo_open+0x2d0>
b9c4: ea000013 b ba18 <fifo_open+0x360>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
b9c8: e5943020 ldr r3, [r4, #32]
b9cc: e2833001 add r3, r3, #1
b9d0: e5843020 str r3, [r4, #32]
if (pipe->Readers ++ == 0)
b9d4: e5943010 ldr r3, [r4, #16]
b9d8: e2832001 add r2, r3, #1
b9dc: e3530000 cmp r3, #0
b9e0: e5842010 str r2, [r4, #16]
PIPE_WAKEUPWRITERS(pipe);
b9e4: 05940030 ldreq r0, [r4, #48] ; 0x30
b9e8: 028d1004 addeq r1, sp, #4
b9ec: 0b0003a4 bleq c884 <rtems_barrier_release>
pipe->writerCounter ++;
b9f0: e5943024 ldr r3, [r4, #36] ; 0x24
b9f4: e2833001 add r3, r3, #1
b9f8: e5843024 str r3, [r4, #36] ; 0x24
if (pipe->Writers ++ == 0)
b9fc: e5943014 ldr r3, [r4, #20]
ba00: e2832001 add r2, r3, #1
ba04: e3530000 cmp r3, #0
ba08: e5842014 str r2, [r4, #20]
PIPE_WAKEUPREADERS(pipe);
ba0c: 0594002c ldreq r0, [r4, #44] ; 0x2c
ba10: 028d1004 addeq r1, sp, #4
ba14: 0b00039a bleq c884 <rtems_barrier_release>
break;
}
PIPE_UNLOCK(pipe);
ba18: e5940028 ldr r0, [r4, #40] ; 0x28
ba1c: ebffee55 bl 7378 <rtems_semaphore_release>
return 0;
ba20: ea000003 b ba34 <fifo_open+0x37c>
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
ba24: e3e06003 mvn r6, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
ba28: e1a00008 mov r0, r8
ba2c: e1a01007 mov r1, r7
ba30: ebfffef4 bl b608 <pipe_release>
return err;
}
ba34: e1a00006 mov r0, r6
ba38: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc}
00002c30 <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
2c30: e59f3104 ldr r3, [pc, #260] ; 2d3c <fpathconf+0x10c>
2c34: e5933000 ldr r3, [r3]
2c38: e1500003 cmp r0, r3
long fpathconf(
int fd,
int name
)
{
2c3c: 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);
2c40: 2a000006 bcs 2c60 <fpathconf+0x30>
iop = rtems_libio_iop(fd);
2c44: e59f30f4 ldr r3, [pc, #244] ; 2d40 <fpathconf+0x110>
2c48: e5933000 ldr r3, [r3]
2c4c: e3a02038 mov r2, #56 ; 0x38
2c50: e0203092 mla r0, r2, r0, r3
rtems_libio_check_is_open(iop);
2c54: e5903014 ldr r3, [r0, #20]
2c58: e3130c01 tst r3, #256 ; 0x100
2c5c: 1a000002 bne 2c6c <fpathconf+0x3c>
2c60: eb0028ff bl d064 <__errno>
2c64: e3a03009 mov r3, #9
2c68: ea000003 b 2c7c <fpathconf+0x4c>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
2c6c: e3130002 tst r3, #2
2c70: 1a000004 bne 2c88 <fpathconf+0x58>
2c74: eb0028fa bl d064 <__errno>
2c78: e3a03016 mov r3, #22
2c7c: e5803000 str r3, [r0]
2c80: e3e00000 mvn r0, #0
2c84: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
2c88: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
2c8c: e351000b cmp r1, #11
2c90: 979ff101 ldrls pc, [pc, r1, lsl #2]
2c94: ea000023 b 2d28 <fpathconf+0xf8>
2c98: 00002cc8 .word 0x00002cc8
2c9c: 00002cd0 .word 0x00002cd0
2ca0: 00002cd8 .word 0x00002cd8
2ca4: 00002ce0 .word 0x00002ce0
2ca8: 00002ce8 .word 0x00002ce8
2cac: 00002cf0 .word 0x00002cf0
2cb0: 00002cf8 .word 0x00002cf8
2cb4: 00002d00 .word 0x00002d00
2cb8: 00002d08 .word 0x00002d08
2cbc: 00002d10 .word 0x00002d10
2cc0: 00002d18 .word 0x00002d18
2cc4: 00002d20 .word 0x00002d20
case _PC_LINK_MAX:
return_value = the_limits->link_max;
2cc8: e5930038 ldr r0, [r3, #56] ; 0x38
break;
2ccc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
2cd0: e593003c ldr r0, [r3, #60] ; 0x3c
break;
2cd4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
2cd8: e5930040 ldr r0, [r3, #64] ; 0x40
break;
2cdc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX:
return_value = the_limits->name_max;
2ce0: e5930044 ldr r0, [r3, #68] ; 0x44
break;
2ce4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX:
return_value = the_limits->path_max;
2ce8: e5930048 ldr r0, [r3, #72] ; 0x48
break;
2cec: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
2cf0: e593004c ldr r0, [r3, #76] ; 0x4c
break;
2cf4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
2cf8: e5930054 ldr r0, [r3, #84] ; 0x54
break;
2cfc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
2d00: e5930058 ldr r0, [r3, #88] ; 0x58
break;
2d04: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
2d08: e5930064 ldr r0, [r3, #100] ; 0x64
break;
2d0c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
2d10: e5930050 ldr r0, [r3, #80] ; 0x50
break;
2d14: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
2d18: e593005c ldr r0, [r3, #92] ; 0x5c
break;
2d1c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
2d20: e5930060 ldr r0, [r3, #96] ; 0x60
break;
2d24: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2d28: eb0028cd bl d064 <__errno>
2d2c: e3a03016 mov r3, #22
2d30: e5803000 str r3, [r0]
2d34: e3e00000 mvn r0, #0
break;
}
return return_value;
}
2d38: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00002190 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
2190: e92d4033 push {r0, r1, r4, r5, lr}
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
2194: e2504000 subs r4, r0, #0
2198: 1a000004 bne 21b0 <gettimeofday+0x20>
rtems_set_errno_and_return_minus_one( EFAULT );
219c: eb0027cd bl c0d8 <__errno> <== NOT EXECUTED
21a0: e3a0300e mov r3, #14 <== NOT EXECUTED
21a4: e5803000 str r3, [r0] <== NOT EXECUTED
21a8: e3e00000 mvn r0, #0 <== NOT EXECUTED
21ac: ea00000c b 21e4 <gettimeofday+0x54> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
21b0: e10f5000 mrs r5, CPSR
21b4: e3853080 orr r3, r5, #128 ; 0x80
21b8: e129f003 msr CPSR_fc, r3
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
21bc: e1a0000d mov r0, sp
21c0: eb000f81 bl 5fcc <_TOD_Get>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
21c4: e129f005 msr CPSR_fc, r5
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
21c8: e59d3000 ldr r3, [sp]
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
21cc: e59d0004 ldr r0, [sp, #4]
time->tv_sec = now.tv_sec;
21d0: e5843000 str r3, [r4]
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
21d4: e3a01ffa mov r1, #1000 ; 0x3e8
21d8: eb0035a2 bl f868 <__aeabi_idiv>
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
21dc: e5840004 str r0, [r4, #4]
* Timezone information ignored by the OS proper. Per email
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
21e0: e3a00000 mov r0, #0
}
21e4: e8bd803c pop {r2, r3, r4, r5, pc}
0000b8cc <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 )
b8cc: e5903018 ldr r3, [r0, #24]
b8d0: e593304c ldr r3, [r3, #76] ; 0x4c
b8d4: e3530001 cmp r3, #1
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
b8d8: 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 )
b8dc: 1a000005 bne b8f8 <imfs_dir_open+0x2c>
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
b8e0: e3a03000 mov r3, #0
b8e4: e3a04000 mov r4, #0
b8e8: e580300c str r3, [r0, #12]
b8ec: e5804010 str r4, [r0, #16]
return 0;
b8f0: e3a00000 mov r0, #0
b8f4: 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 */
b8f8: e3e00000 mvn r0, #0 <== NOT EXECUTED
iop->offset = 0;
return 0;
}
b8fc: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00003df4 <iproc>:
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
3df4: e5913030 ldr r3, [r1, #48] ; 0x30
3df8: e3130020 tst r3, #32
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
3dfc: e92d4030 push {r4, r5, lr}
3e00: e20050ff and r5, r0, #255 ; 0xff
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
3e04: 1200507f andne r5, r0, #127 ; 0x7f
if (tty->termios.c_iflag & IUCLC)
3e08: e3130c02 tst r3, #512 ; 0x200
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
3e0c: e1a04001 mov r4, r1
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
3e10: 0a000007 beq 3e34 <iproc+0x40>
c = tolower (c);
3e14: e59f2164 ldr r2, [pc, #356] ; 3f80 <iproc+0x18c>
3e18: e5922000 ldr r2, [r2]
3e1c: e0822005 add r2, r2, r5
3e20: e5d22001 ldrb r2, [r2, #1]
3e24: e2022003 and r2, r2, #3
3e28: e3520001 cmp r2, #1
3e2c: 02855020 addeq r5, r5, #32
3e30: e20550ff and r5, r5, #255 ; 0xff
if (c == '\r') {
3e34: e355000d cmp r5, #13
3e38: 1a000005 bne 3e54 <iproc+0x60>
if (tty->termios.c_iflag & IGNCR)
3e3c: e3130080 tst r3, #128 ; 0x80
3e40: 1a000048 bne 3f68 <iproc+0x174>
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
3e44: e3130c01 tst r3, #256 ; 0x100
3e48: 03a0500d moveq r5, #13
3e4c: 13a0500a movne r5, #10
3e50: ea000007 b 3e74 <iproc+0x80>
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
3e54: e355000a cmp r5, #10
3e58: 1a000003 bne 3e6c <iproc+0x78>
c = '\r';
3e5c: e3130040 tst r3, #64 ; 0x40
3e60: 03a0500a moveq r5, #10
3e64: 13a0500d movne r5, #13
3e68: ea000001 b 3e74 <iproc+0x80>
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
3e6c: e3550000 cmp r5, #0
3e70: 0a00002c beq 3f28 <iproc+0x134>
3e74: e594303c ldr r3, [r4, #60] ; 0x3c
3e78: e3130002 tst r3, #2
3e7c: 0a000029 beq 3f28 <iproc+0x134>
if (c == tty->termios.c_cc[VERASE]) {
3e80: e5d42043 ldrb r2, [r4, #67] ; 0x43
3e84: e1520005 cmp r2, r5
erase (tty, 0);
3e88: 01a00004 moveq r0, r4
3e8c: 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]) {
3e90: 0a000004 beq 3ea8 <iproc+0xb4>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
3e94: e5d42044 ldrb r2, [r4, #68] ; 0x44
3e98: e1520005 cmp r2, r5
3e9c: 1a000003 bne 3eb0 <iproc+0xbc>
erase (tty, 1);
3ea0: e1a00004 mov r0, r4
3ea4: e3a01001 mov r1, #1
3ea8: ebffff60 bl 3c30 <erase>
3eac: ea00002d b 3f68 <iproc+0x174>
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
3eb0: e5d42045 ldrb r2, [r4, #69] ; 0x45
3eb4: e1520005 cmp r2, r5
3eb8: 0a00002c beq 3f70 <iproc+0x17c>
return 1;
} else if (c == '\n') {
3ebc: e355000a cmp r5, #10
3ec0: 1a000008 bne 3ee8 <iproc+0xf4>
if (tty->termios.c_lflag & (ECHO | ECHONL))
3ec4: e3130048 tst r3, #72 ; 0x48
echo (c, tty);
3ec8: 11a00005 movne r0, r5
3ecc: 11a01004 movne r1, r4
3ed0: 1bffff33 blne 3ba4 <echo>
tty->cbuf[tty->ccount++] = c;
3ed4: e284201c add r2, r4, #28
3ed8: e892000c ldm r2, {r2, r3}
3edc: e3a0100a mov r1, #10
3ee0: e7c21003 strb r1, [r2, r3]
3ee4: ea00000c b 3f1c <iproc+0x128>
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
3ee8: e5d4204c ldrb r2, [r4, #76] ; 0x4c
3eec: e1520005 cmp r2, r5
3ef0: 0a000002 beq 3f00 <iproc+0x10c>
3ef4: e5d42051 ldrb r2, [r4, #81] ; 0x51
3ef8: e1520005 cmp r2, r5
3efc: 1a000009 bne 3f28 <iproc+0x134>
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
3f00: e3130008 tst r3, #8 <== NOT EXECUTED
echo (c, tty);
3f04: 11a00005 movne r0, r5 <== NOT EXECUTED
3f08: 11a01004 movne r1, r4 <== NOT EXECUTED
3f0c: 1bffff24 blne 3ba4 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
3f10: e284201c add r2, r4, #28 <== NOT EXECUTED
3f14: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
3f18: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED
3f1c: e2833001 add r3, r3, #1
3f20: e5843020 str r3, [r4, #32]
3f24: ea000011 b 3f70 <iproc+0x17c>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
3f28: e59f3054 ldr r3, [pc, #84] ; 3f84 <iproc+0x190>
3f2c: e5933008 ldr r3, [r3, #8]
3f30: e5942020 ldr r2, [r4, #32]
3f34: e2433001 sub r3, r3, #1
3f38: e1520003 cmp r2, r3
3f3c: aa00000d bge 3f78 <iproc+0x184>
if (tty->termios.c_lflag & ECHO)
3f40: e594303c ldr r3, [r4, #60] ; 0x3c
3f44: e3130008 tst r3, #8
echo (c, tty);
3f48: 11a00005 movne r0, r5
3f4c: 11a01004 movne r1, r4
3f50: 1bffff13 blne 3ba4 <echo>
tty->cbuf[tty->ccount++] = c;
3f54: e284201c add r2, r4, #28
3f58: e892000c ldm r2, {r2, r3}
3f5c: e7c25003 strb r5, [r2, r3]
3f60: e2833001 add r3, r3, #1
3f64: 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;
3f68: e3a00000 mov r0, #0
3f6c: 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;
3f70: e3a00001 mov r0, #1
3f74: 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;
3f78: e3a00000 mov r0, #0 <== NOT EXECUTED
}
3f7c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0001fa4c <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
1fa4c: e3a00000 mov r0, #0 <== NOT EXECUTED
1fa50: e12fff1e bx lr <== NOT EXECUTED
0000b63c <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
b63c: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
b640: e5905018 ldr r5, [r0, #24]
if (the_jnode->type == IMFS_LINEAR_FILE) {
b644: e595304c ldr r3, [r5, #76] ; 0x4c
b648: e3530006 cmp r3, #6
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
b64c: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
b650: 1a00000b bne b684 <memfile_lseek+0x48>
if (iop->offset > the_jnode->info.linearfile.size)
b654: e5953054 ldr r3, [r5, #84] ; 0x54
b658: e5901010 ldr r1, [r0, #16]
b65c: e1510003 cmp r1, r3
b660: e5952050 ldr r2, [r5, #80] ; 0x50
b664: ca000003 bgt b678 <memfile_lseek+0x3c>
b668: 1a000014 bne b6c0 <memfile_lseek+0x84>
b66c: e590100c ldr r1, [r0, #12]
b670: e1510002 cmp r1, r2
b674: 9a000011 bls b6c0 <memfile_lseek+0x84>
iop->offset = the_jnode->info.linearfile.size;
b678: e584200c str r2, [r4, #12] <== NOT EXECUTED
b67c: e5843010 str r3, [r4, #16] <== NOT EXECUTED
b680: ea00000e b b6c0 <memfile_lseek+0x84> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
b684: e1a00005 mov r0, r5
b688: e284200c add r2, r4, #12
b68c: e8920006 ldm r2, {r1, r2}
b690: ebfffeed bl b24c <IMFS_memfile_extend>
b694: e3500000 cmp r0, #0
b698: 0a000005 beq b6b4 <memfile_lseek+0x78>
rtems_set_errno_and_return_minus_one( ENOSPC );
b69c: eb00028d bl c0d8 <__errno>
b6a0: e3a0301c mov r3, #28
b6a4: e5803000 str r3, [r0]
b6a8: e3e04000 mvn r4, #0
b6ac: e3e03000 mvn r3, #0
b6b0: ea000004 b b6c8 <memfile_lseek+0x8c>
iop->size = the_jnode->info.file.size;
b6b4: e2853050 add r3, r5, #80 ; 0x50
b6b8: e893000c ldm r3, {r2, r3}
b6bc: e984000c stmib r4, {r2, r3}
}
return iop->offset;
b6c0: e284400c add r4, r4, #12
b6c4: e8940018 ldm r4, {r3, r4}
}
b6c8: e1a00003 mov r0, r3
b6cc: e1a01004 mov r1, r4
b6d0: e8bd8030 pop {r4, r5, pc}
0000b548 <memfile_open>:
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
b548: e5903014 ldr r3, [r0, #20]
b54c: e3130f81 tst r3, #516 ; 0x204
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
b550: e92d4031 push {r0, r4, r5, lr}
b554: e1a05000 mov r5, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
b558: e5904018 ldr r4, [r0, #24]
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
b55c: 0a000015 beq b5b8 <memfile_open+0x70>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
b560: e594304c ldr r3, [r4, #76] ; 0x4c
b564: e3530006 cmp r3, #6
b568: 1a000012 bne b5b8 <memfile_open+0x70>
uint32_t count = the_jnode->info.linearfile.size;
b56c: 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;
b570: 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;
b574: e3a02005 mov r2, #5 <== NOT EXECUTED
b578: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED
the_jnode->info.file.size = 0;
b57c: e3a01000 mov r1, #0 <== NOT EXECUTED
b580: 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)
b584: 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;
b588: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
b58c: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED
b590: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
b594: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
b598: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
b59c: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED
if ((count != 0)
b5a0: 0a000004 beq b5b8 <memfile_open+0x70> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
b5a4: e1a00004 mov r0, r4 <== NOT EXECUTED
b5a8: e58dc000 str ip, [sp] <== NOT EXECUTED
b5ac: ebffff6d bl b368 <IMFS_memfile_write> <== NOT EXECUTED
b5b0: e3700001 cmn r0, #1 <== NOT EXECUTED
b5b4: 0a000009 beq b5e0 <memfile_open+0x98> <== NOT EXECUTED
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
b5b8: e5953014 ldr r3, [r5, #20]
b5bc: e3130c02 tst r3, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
b5c0: 12843050 addne r3, r4, #80 ; 0x50
b5c4: 1893000c ldmne r3, {r2, r3}
b5c8: 1585200c strne r2, [r5, #12]
b5cc: 15853010 strne r3, [r5, #16]
iop->size = the_jnode->info.file.size;
b5d0: e2844050 add r4, r4, #80 ; 0x50
b5d4: e8940018 ldm r4, {r3, r4}
b5d8: e9850018 stmib r5, {r3, r4}
return 0;
b5dc: e3a00000 mov r0, #0
}
b5e0: e8bd8038 pop {r3, r4, r5, pc}
00002660 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
2660: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
2664: e3530001 cmp r3, #1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
2668: e24dd02c sub sp, sp, #44 ; 0x2c
266c: e1a06000 mov r6, r0
2670: e1a0b001 mov fp, r1
2674: e1a0a002 mov sl, r2
2678: e58d300c str r3, [sp, #12]
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
267c: 8a000004 bhi 2694 <mount+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
2680: e1a00002 mov r0, r2
2684: eb001d42 bl 9b94 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
2688: e3500000 cmp r0, #0
268c: e58d0014 str r0, [sp, #20]
2690: 1a000002 bne 26a0 <mount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
2694: eb00268f bl c0d8 <__errno>
2698: e3a03016 mov r3, #22
269c: ea00003b b 2790 <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;
26a0: e25b5000 subs r5, fp, #0
26a4: 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 : "/";
26a8: e59f3258 ldr r3, [pc, #600] ; 2908 <mount+0x2a8>
26ac: e3550000 cmp r5, #0
26b0: 11a0300b movne r3, fp
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
26b4: 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 : "/";
26b8: e58d3004 str r3, [sp, #4]
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
26bc: eb002a6f bl d080 <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
26c0: 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;
26c4: e2809001 add r9, r0, #1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
26c8: 01a07006 moveq r7, r6
26cc: 0a000002 beq 26dc <mount+0x7c>
26d0: e1a00006 mov r0, r6
26d4: eb002a69 bl d080 <strlen>
26d8: e2807001 add r7, r0, #1
size_t target_size = strlen( target ) + 1;
26dc: e59d0004 ldr r0, [sp, #4]
26e0: eb002a66 bl d080 <strlen>
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
26e4: 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;
26e8: e2803001 add r3, r0, #1
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
26ec: 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;
26f0: 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 );
26f4: e0811003 add r1, r1, r3
26f8: 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;
26fc: 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 );
2700: ebfffe15 bl 1f5c <calloc>
if ( mt_entry != NULL ) {
2704: e2504000 subs r4, r0, #0
2708: 0a00001e beq 2788 <mount+0x128>
char *str = (char *) mt_entry + sizeof( *mt_entry );
270c: e2848074 add r8, r4, #116 ; 0x74
memcpy( str, filesystemtype, filesystemtype_size );
2710: e1a00008 mov r0, r8
2714: e1a0100a mov r1, sl
2718: e1a02009 mov r2, r9
271c: eb00289b bl c990 <memcpy>
mt_entry->type = str;
2720: e584806c str r8, [r4, #108] ; 0x6c
str += filesystemtype_size;
2724: e0888009 add r8, r8, r9
memcpy( str, source_or_null, source_size );
2728: e1a00008 mov r0, r8
272c: e1a01006 mov r1, r6
2730: e1a02007 mov r2, r7
2734: eb002895 bl c990 <memcpy>
mt_entry->dev = str;
2738: e5848070 str r8, [r4, #112] ; 0x70
str += source_size;
273c: e0888007 add r8, r8, r7
memcpy( str, target, target_size );
2740: e99d0006 ldmib sp, {r1, r2}
2744: e1a00008 mov r0, r8
2748: eb002890 bl c990 <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;
274c: e59d300c ldr r3, [sp, #12]
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
2750: e59fe1b4 ldr lr, [pc, #436] ; 290c <mount+0x2ac>
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
2754: e5843030 str r3, [r4, #48] ; 0x30
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
2758: e8be000f ldm lr!, {r0, r1, r2, r3}
275c: e284c038 add ip, r4, #56 ; 0x38
2760: e8ac000f stmia ip!, {r0, r1, r2, r3}
2764: e8be000f ldm lr!, {r0, r1, r2, r3}
2768: e8ac000f stmia ip!, {r0, r1, r2, r3}
276c: 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 ) {
2770: 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;
2774: 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;
2778: e584402c str r4, [r4, #44] ; 0x2c
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
277c: 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 ) {
2780: 0a00002e beq 2840 <mount+0x1e0>
2784: ea000003 b 2798 <mount+0x138>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
2788: eb002652 bl c0d8 <__errno> <== NOT EXECUTED
278c: e3a0300c mov r3, #12 <== NOT EXECUTED
2790: e5803000 str r3, [r0]
2794: ea000058 b 28fc <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(
2798: e3a03001 mov r3, #1
279c: e28d6018 add r6, sp, #24
27a0: e58d3000 str r3, [sp]
27a4: e1a0000b mov r0, fp
27a8: e59d1010 ldr r1, [sp, #16]
27ac: e3a02007 mov r2, #7
27b0: e1a03006 mov r3, r6
27b4: ebfffe17 bl 2018 <rtems_filesystem_evaluate_path>
27b8: e3700001 cmn r0, #1
27bc: 0a000048 beq 28e4 <mount+0x284>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
27c0: e1a00006 mov r0, r6
27c4: e59d3024 ldr r3, [sp, #36] ; 0x24
27c8: e1a0e00f mov lr, pc
27cc: e593f010 ldr pc, [r3, #16]
27d0: e3500001 cmp r0, #1
27d4: 0a000002 beq 27e4 <mount+0x184>
errno = ENOTDIR;
27d8: eb00263e bl c0d8 <__errno>
27dc: e3a03014 mov r3, #20
27e0: ea000006 b 2800 <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 ) ) {
27e4: e59f0124 ldr r0, [pc, #292] ; 2910 <mount+0x2b0>
27e8: e59d1018 ldr r1, [sp, #24]
27ec: ebffff85 bl 2608 <rtems_filesystem_mount_iterate>
27f0: e3500000 cmp r0, #0
27f4: 0a000003 beq 2808 <mount+0x1a8>
errno = EBUSY;
27f8: eb002636 bl c0d8 <__errno>
27fc: e3a03010 mov r3, #16
2800: e5803000 str r3, [r0]
goto cleanup_and_bail;
2804: ea000037 b 28e8 <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;
2808: e59d3018 ldr r3, [sp, #24]
280c: e5843008 str r3, [r4, #8]
mt_entry->mt_point_node.handlers = loc.handlers;
2810: e59d3020 ldr r3, [sp, #32]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
2814: e59d2028 ldr r2, [sp, #40] ; 0x28
* 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;
2818: e5843010 str r3, [r4, #16]
mt_entry->mt_point_node.ops = loc.ops;
281c: e59d3024 ldr r3, [sp, #36] ; 0x24
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
2820: e5842018 str r2, [r4, #24]
* 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;
2824: 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 ) ) {
2828: e1a00004 mov r0, r4
282c: e1a0e00f mov lr, pc
2830: e593f020 ldr pc, [r3, #32]
2834: e3500000 cmp r0, #0
2838: 0a00000b beq 286c <mount+0x20c>
283c: ea000029 b 28e8 <mount+0x288> <== NOT EXECUTED
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
2840: e59f30cc ldr r3, [pc, #204] ; 2914 <mount+0x2b4>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
2844: e2832004 add r2, r3, #4
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
2848: e5933000 ldr r3, [r3]
284c: 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;
2850: 01a06005 moveq r6, r5
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
2854: 0a000004 beq 286c <mount+0x20c>
errno = EINVAL;
2858: eb00261e bl c0d8 <__errno>
285c: e3a03016 mov r3, #22
2860: e5803000 str r3, [r0]
)
{
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;
2864: e1a06005 mov r6, r5
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
goto cleanup_and_bail;
2868: ea00001e b 28e8 <mount+0x288>
* 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 ) ) {
286c: e1a00004 mov r0, r4
2870: e59d1050 ldr r1, [sp, #80] ; 0x50
2874: e59d3014 ldr r3, [sp, #20]
2878: e1a0e00f mov lr, pc
287c: e12fff13 bx r3
2880: e2507000 subs r7, r0, #0
2884: 0a000004 beq 289c <mount+0x23c>
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
2888: e1a00004 mov r0, r4
288c: e59d3024 ldr r3, [sp, #36] ; 0x24
2890: e1a0e00f mov lr, pc
2894: e593f028 ldr pc, [r3, #40] ; 0x28
goto cleanup_and_bail;
2898: ea000012 b 28e8 <mount+0x288>
}
/*
* Add the mount table entry to the mount table chain
*/
rtems_libio_lock();
289c: ebffff4f bl 25e0 <rtems_libio_lock>
28a0: e59f006c ldr r0, [pc, #108] ; 2914 <mount+0x2b4>
28a4: e1a01004 mov r1, r4
28a8: eb000cc9 bl 5bd4 <_Chain_Append>
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
28ac: ebffff51 bl 25f8 <rtems_libio_unlock>
if ( !has_target )
28b0: e3550000 cmp r5, #0
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
28b4: 11a00007 movne r0, r7
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
28b8: 1a000010 bne 2900 <mount+0x2a0>
rtems_filesystem_root = mt_entry->mt_fs_root;
28bc: e59f3054 ldr r3, [pc, #84] ; 2918 <mount+0x2b8>
28c0: e284401c add r4, r4, #28
28c4: e593c000 ldr ip, [r3]
28c8: e8b4000f ldm r4!, {r0, r1, r2, r3}
28cc: e28cc018 add ip, ip, #24
28d0: e8ac000f stmia ip!, {r0, r1, r2, r3}
28d4: e5943000 ldr r3, [r4]
return 0;
28d8: 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;
28dc: e58c3000 str r3, [ip]
28e0: ea000006 b 2900 <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;
28e4: e3a06000 mov r6, #0 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
28e8: e1a00004 mov r0, r4
28ec: ebfffdfe bl 20ec <free>
if ( loc_to_free )
28f0: e3560000 cmp r6, #0
rtems_filesystem_freenode( loc_to_free );
28f4: 11a00006 movne r0, r6
28f8: 1bfffdf6 blne 20d8 <rtems_filesystem_freenode>
return -1;
28fc: e3e00000 mvn r0, #0
}
2900: e28dd02c add sp, sp, #44 ; 0x2c
2904: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
00002920 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
2920: e92d4010 push {r4, lr}
2924: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
2928: eb0026ed bl c4e4 <fileno>
292c: e3500002 cmp r0, #2
2930: 8a00000b bhi 2964 <newlib_free_buffers+0x44>
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
2934: e1d430bc ldrh r3, [r4, #12]
2938: e3130080 tst r3, #128 ; 0x80
293c: 0a00000a beq 296c <newlib_free_buffers+0x4c>
free( fp->_bf._base );
2940: e5940010 ldr r0, [r4, #16]
2944: ebfffde8 bl 20ec <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
2948: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED
294c: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED
2950: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
2954: e3a03000 mov r3, #0 <== NOT EXECUTED
2958: e5843000 str r3, [r4] <== NOT EXECUTED
295c: e5843010 str r3, [r4, #16] <== NOT EXECUTED
2960: ea000001 b 296c <newlib_free_buffers+0x4c> <== NOT EXECUTED
}
break;
default:
fclose(fp);
2964: e1a00004 mov r0, r4 <== NOT EXECUTED
2968: eb002628 bl c210 <fclose> <== NOT EXECUTED
}
return 0;
}
296c: e3a00000 mov r0, #0
2970: e8bd8010 pop {r4, pc}
00003a54 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
3a54: e92d4011 push {r0, r4, lr}
3a58: e5cd0000 strb r0, [sp]
int i;
if (tty->termios.c_oflag & OPOST) {
3a5c: e5913034 ldr r3, [r1, #52] ; 0x34
3a60: e3130001 tst r3, #1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
3a64: e1a04001 mov r4, r1
int i;
if (tty->termios.c_oflag & OPOST) {
3a68: 0a000045 beq 3b84 <oproc+0x130>
switch (c) {
3a6c: e5dd2000 ldrb r2, [sp]
3a70: e2421008 sub r1, r2, #8
3a74: e3510005 cmp r1, #5
3a78: 979ff101 ldrls pc, [pc, r1, lsl #2]
3a7c: ea00002c b 3b34 <oproc+0xe0>
3a80: 00003b20 .word 0x00003b20
3a84: 00003af8 .word 0x00003af8
3a88: 00003a98 .word 0x00003a98
3a8c: 00003b34 .word 0x00003b34
3a90: 00003b34 .word 0x00003b34
3a94: 00003ac0 .word 0x00003ac0
case '\n':
if (tty->termios.c_oflag & ONLRET)
3a98: e3130020 tst r3, #32
tty->column = 0;
3a9c: 13a02000 movne r2, #0
3aa0: 15842028 strne r2, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
3aa4: e3130004 tst r3, #4
3aa8: 0a000035 beq 3b84 <oproc+0x130>
rtems_termios_puts ("\r", 1, tty);
3aac: e59f00e4 ldr r0, [pc, #228] ; 3b98 <oproc+0x144>
3ab0: e3a01001 mov r1, #1
3ab4: e1a02004 mov r2, r4
3ab8: ebffffa5 bl 3954 <rtems_termios_puts>
3abc: ea00000b b 3af0 <oproc+0x9c>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
3ac0: e3130010 tst r3, #16 <== NOT EXECUTED
3ac4: 0a000002 beq 3ad4 <oproc+0x80> <== NOT EXECUTED
3ac8: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED
3acc: e3520000 cmp r2, #0 <== NOT EXECUTED
3ad0: 0a00002f beq 3b94 <oproc+0x140> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
3ad4: e2132008 ands r2, r3, #8 <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
break;
}
tty->column = 0;
3ad8: 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) {
3adc: 0a000028 beq 3b84 <oproc+0x130> <== NOT EXECUTED
c = '\n';
3ae0: e3a0200a mov r2, #10 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
3ae4: 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';
3ae8: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
3aec: 0a000024 beq 3b84 <oproc+0x130> <== NOT EXECUTED
tty->column = 0;
3af0: e3a03000 mov r3, #0
3af4: ea000021 b 3b80 <oproc+0x12c>
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
3af8: e5942028 ldr r2, [r4, #40] ; 0x28
3afc: e2021007 and r1, r2, #7
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
3b00: e2033b06 and r3, r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
3b04: e2611008 rsb r1, r1, #8
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
3b08: e3530b06 cmp r3, #6144 ; 0x1800
3b0c: e0813002 add r3, r1, r2
tty->column += i;
3b10: 05843028 streq r3, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
3b14: 059f0080 ldreq r0, [pc, #128] ; 3b9c <oproc+0x148>
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
3b18: 1a000018 bne 3b80 <oproc+0x12c>
3b1c: ea00001a b 3b8c <oproc+0x138>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
3b20: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3b24: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3b28: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
3b2c: ca000013 bgt 3b80 <oproc+0x12c> <== NOT EXECUTED
3b30: ea000013 b 3b84 <oproc+0x130> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
3b34: e3130002 tst r3, #2
3b38: 0a000007 beq 3b5c <oproc+0x108>
c = toupper(c);
3b3c: e59f305c ldr r3, [pc, #92] ; 3ba0 <oproc+0x14c> <== NOT EXECUTED
3b40: e5933000 ldr r3, [r3] <== NOT EXECUTED
3b44: e0833002 add r3, r3, r2 <== NOT EXECUTED
3b48: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED
3b4c: e2033003 and r3, r3, #3 <== NOT EXECUTED
3b50: e3530002 cmp r3, #2 <== NOT EXECUTED
3b54: 02422020 subeq r2, r2, #32 <== NOT EXECUTED
3b58: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (!iscntrl(c))
3b5c: e59f203c ldr r2, [pc, #60] ; 3ba0 <oproc+0x14c>
3b60: e5dd3000 ldrb r3, [sp]
3b64: e5922000 ldr r2, [r2]
3b68: e0823003 add r3, r2, r3
3b6c: e5d33001 ldrb r3, [r3, #1]
3b70: e3130020 tst r3, #32
3b74: 1a000002 bne 3b84 <oproc+0x130>
tty->column++;
3b78: e5943028 ldr r3, [r4, #40] ; 0x28
3b7c: e2833001 add r3, r3, #1
3b80: e5843028 str r3, [r4, #40] ; 0x28
break;
}
}
rtems_termios_puts (&c, 1, tty);
3b84: e1a0000d mov r0, sp
3b88: e3a01001 mov r1, #1
3b8c: e1a02004 mov r2, r4
3b90: ebffff6f bl 3954 <rtems_termios_puts>
}
3b94: e8bd8018 pop {r3, r4, pc}
0000bd70 <pipe_ioctl>:
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
bd70: e59f3058 ldr r3, [pc, #88] ; bdd0 <pipe_ioctl+0x60>
bd74: e1510003 cmp r1, r3
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
bd78: e92d4070 push {r4, r5, r6, lr}
bd7c: e1a04000 mov r4, r0
bd80: e1a05002 mov r5, r2
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
bd84: 13e00015 mvnne r0, #21
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
bd88: 18bd8070 popne {r4, r5, r6, pc}
if (buffer == NULL)
bd8c: e3520000 cmp r2, #0
return -EFAULT;
bd90: 03e0000d mvneq r0, #13
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
bd94: 08bd8070 popeq {r4, r5, r6, pc}
return -EFAULT;
if (! PIPE_LOCK(pipe))
bd98: e3a01000 mov r1, #0
bd9c: e5940028 ldr r0, [r4, #40] ; 0x28
bda0: e1a02001 mov r2, r1
bda4: ebffed2d bl 7260 <rtems_semaphore_obtain>
bda8: e2506000 subs r6, r0, #0
bdac: 1a000005 bne bdc8 <pipe_ioctl+0x58>
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
bdb0: e594300c ldr r3, [r4, #12]
PIPE_UNLOCK(pipe);
bdb4: e5940028 ldr r0, [r4, #40] ; 0x28
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
bdb8: e5853000 str r3, [r5]
PIPE_UNLOCK(pipe);
bdbc: ebffed6d bl 7378 <rtems_semaphore_release>
return 0;
bdc0: e1a00006 mov r0, r6
bdc4: e8bd8070 pop {r4, r5, r6, pc}
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
if (! PIPE_LOCK(pipe))
return -EINTR;
bdc8: e3e00003 mvn r0, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
bdcc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000ba58 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ba58: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
ba5c: e1a09001 mov r9, r1
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ba60: e3a01000 mov r1, #0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ba64: e1a04000 mov r4, r0
ba68: e1a05002 mov r5, r2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ba6c: e5900028 ldr r0, [r0, #40] ; 0x28
ba70: e1a02001 mov r2, r1
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ba74: e1a0a003 mov sl, r3
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ba78: ebffedf8 bl 7260 <rtems_semaphore_obtain>
ba7c: e2506000 subs r6, r0, #0
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
ba80: 01a0b00d moveq fp, sp
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ba84: 0a000043 beq bb98 <pipe_read+0x140>
ba88: ea00004f b bbcc <pipe_read+0x174> <== NOT EXECUTED
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
ba8c: e5947014 ldr r7, [r4, #20]
ba90: e3570000 cmp r7, #0
ba94: 0a000044 beq bbac <pipe_read+0x154>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ba98: e59a8014 ldr r8, [sl, #20]
ba9c: e2188001 ands r8, r8, #1
baa0: 1a000040 bne bba8 <pipe_read+0x150>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
baa4: e5943018 ldr r3, [r4, #24]
baa8: e2833001 add r3, r3, #1
baac: e5843018 str r3, [r4, #24]
PIPE_UNLOCK(pipe);
bab0: e5940028 ldr r0, [r4, #40] ; 0x28
bab4: ebffee2f bl 7378 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
bab8: e1a01008 mov r1, r8
babc: e594002c ldr r0, [r4, #44] ; 0x2c
bac0: eb000385 bl c8dc <rtems_barrier_wait>
bac4: e3500000 cmp r0, #0
bac8: 01a07000 moveq r7, r0
bacc: 13e07003 mvnne r7, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
bad0: e1a01008 mov r1, r8
bad4: e5940028 ldr r0, [r4, #40] ; 0x28
bad8: e1a02008 mov r2, r8
badc: ebffeddf bl 7260 <rtems_semaphore_obtain>
bae0: e3500000 cmp r0, #0
bae4: 1a000033 bne bbb8 <pipe_read+0x160>
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
bae8: e5943018 ldr r3, [r4, #24]
if (ret != 0)
baec: e3570000 cmp r7, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
baf0: e2433001 sub r3, r3, #1
baf4: e5843018 str r3, [r4, #24]
if (ret != 0)
baf8: 1a00002b bne bbac <pipe_read+0x154>
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
bafc: e594300c ldr r3, [r4, #12]
bb00: e3530000 cmp r3, #0
bb04: 0affffe0 beq ba8c <pipe_read+0x34>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
bb08: e0667005 rsb r7, r6, r5
bb0c: e1530007 cmp r3, r7
bb10: 31a07003 movcc r7, r3
chunk1 = pipe->Size - pipe->Start;
bb14: e5948004 ldr r8, [r4, #4]
bb18: e5943008 ldr r3, [r4, #8]
bb1c: e5941000 ldr r1, [r4]
bb20: e0638008 rsb r8, r3, r8
if (chunk > chunk1) {
bb24: e1570008 cmp r7, r8
bb28: 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);
bb2c: d0811003 addle r1, r1, r3
bb30: d1a02007 movle r2, r7
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
bb34: da000006 ble bb54 <pipe_read+0xfc>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
bb38: e0811003 add r1, r1, r3
bb3c: e1a02008 mov r2, r8
bb40: eb000c93 bl ed94 <memcpy>
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
bb44: e0860008 add r0, r6, r8
bb48: e5941000 ldr r1, [r4]
bb4c: e0890000 add r0, r9, r0
bb50: e0682007 rsb r2, r8, r7
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
bb54: eb000c8e bl ed94 <memcpy>
pipe->Start += chunk;
bb58: e5940008 ldr r0, [r4, #8]
pipe->Start %= pipe->Size;
bb5c: e5941004 ldr r1, [r4, #4]
bb60: e0870000 add r0, r7, r0
bb64: eb0038cf bl 19ea8 <__umodsi3>
pipe->Length -= chunk;
bb68: e594300c ldr r3, [r4, #12]
bb6c: e0673003 rsb r3, r7, r3
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
bb70: e3530000 cmp r3, #0
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
bb74: e5840008 str r0, [r4, #8]
pipe->Length -= chunk;
bb78: e584300c str r3, [r4, #12]
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
bb7c: 05843008 streq r3, [r4, #8]
if (pipe->waitingWriters > 0)
bb80: e594301c ldr r3, [r4, #28]
bb84: e3530000 cmp r3, #0
PIPE_WAKEUPWRITERS(pipe);
bb88: 15940030 ldrne r0, [r4, #48] ; 0x30
bb8c: 11a0100d movne r1, sp
bb90: 1b00033b blne c884 <rtems_barrier_release>
read += chunk;
bb94: e0866007 add r6, r6, r7
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
bb98: e1560005 cmp r6, r5
bb9c: 3affffd6 bcc bafc <pipe_read+0xa4>
bba0: e3a07000 mov r7, #0
bba4: ea000000 b bbac <pipe_read+0x154>
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
bba8: e3e0700a mvn r7, #10
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
bbac: e5940028 ldr r0, [r4, #40] ; 0x28
bbb0: ebffedf0 bl 7378 <rtems_semaphore_release>
bbb4: ea000000 b bbbc <pipe_read+0x164>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
bbb8: e3e07003 mvn r7, #3 <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
bbbc: e3560000 cmp r6, #0
bbc0: c1a00006 movgt r0, r6
bbc4: d1a00007 movle r0, r7
bbc8: ea000000 b bbd0 <pipe_read+0x178>
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
bbcc: e3e00003 mvn r0, #3 <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
bbd0: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000bbd4 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
bbd4: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
bbd8: e2527000 subs r7, r2, #0
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
bbdc: e1a04000 mov r4, r0
bbe0: e1a0b001 mov fp, r1
bbe4: e1a08003 mov r8, r3
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
bbe8: 01a00007 moveq r0, r7
)
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
bbec: 0a00005e beq bd6c <pipe_write+0x198>
return 0;
if (! PIPE_LOCK(pipe))
bbf0: e3a01000 mov r1, #0
bbf4: e5940028 ldr r0, [r4, #40] ; 0x28
bbf8: e1a02001 mov r2, r1
bbfc: ebffed97 bl 7260 <rtems_semaphore_obtain>
bc00: e3500000 cmp r0, #0
return -EINTR;
bc04: 13e00003 mvnne r0, #3
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
bc08: 1a000057 bne bd6c <pipe_write+0x198>
return -EINTR;
if (pipe->Readers == 0) {
bc0c: e5945010 ldr r5, [r4, #16]
bc10: e3550000 cmp r5, #0
bc14: 0a00004c beq bd4c <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;
bc18: e5949004 ldr r9, [r4, #4]
bc1c: e1570009 cmp r7, r9
bc20: 91a09007 movls r9, r7
bc24: 83a09001 movhi r9, #1
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
bc28: e1a05000 mov r5, r0
bc2c: ea000040 b bd34 <pipe_write+0x160>
/* 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) {
if (LIBIO_NODELAY(iop)) {
bc30: e598a014 ldr sl, [r8, #20]
bc34: e21aa001 ands sl, sl, #1
bc38: 1a000041 bne bd44 <pipe_write+0x170>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
bc3c: e594301c ldr r3, [r4, #28]
bc40: e2833001 add r3, r3, #1
bc44: e584301c str r3, [r4, #28]
PIPE_UNLOCK(pipe);
bc48: e5940028 ldr r0, [r4, #40] ; 0x28
bc4c: ebffedc9 bl 7378 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
bc50: e1a0100a mov r1, sl
bc54: e5940030 ldr r0, [r4, #48] ; 0x30
bc58: eb00031f bl c8dc <rtems_barrier_wait>
bc5c: e3500000 cmp r0, #0
bc60: 01a06000 moveq r6, r0
bc64: 13e06003 mvnne r6, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
bc68: e1a0100a mov r1, sl
bc6c: e5940028 ldr r0, [r4, #40] ; 0x28
bc70: e1a0200a mov r2, sl
bc74: ebffed79 bl 7260 <rtems_semaphore_obtain>
bc78: e3500000 cmp r0, #0
bc7c: 1a000036 bne bd5c <pipe_write+0x188>
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
bc80: e594301c ldr r3, [r4, #28]
if (ret != 0)
bc84: e3560000 cmp r6, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
bc88: e2433001 sub r3, r3, #1
bc8c: e584301c str r3, [r4, #28]
if (ret != 0)
bc90: 1a00002e bne bd50 <pipe_write+0x17c>
goto out_locked;
if (pipe->Readers == 0) {
bc94: e5943010 ldr r3, [r4, #16]
bc98: e3530000 cmp r3, #0
bc9c: 0a00002a beq bd4c <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) {
bca0: e594a004 ldr sl, [r4, #4]
bca4: e594300c ldr r3, [r4, #12]
bca8: e063200a rsb r2, r3, sl
bcac: e1520009 cmp r2, r9
bcb0: 3affffde bcc bc30 <pipe_write+0x5c>
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
bcb4: e5940008 ldr r0, [r4, #8]
bcb8: e1a0100a mov r1, sl
bcbc: e0830000 add r0, r3, r0
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
bcc0: e0656007 rsb r6, r5, r7
bcc4: e1520006 cmp r2, r6
bcc8: 31a06002 movcc r6, r2
chunk1 = pipe->Size - PIPE_WSTART(pipe);
bccc: eb003875 bl 19ea8 <__umodsi3>
bcd0: e5943000 ldr r3, [r4]
bcd4: e060a00a rsb sl, r0, sl
if (chunk > chunk1) {
bcd8: e156000a cmp r6, sl
bcdc: 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);
bce0: d0830000 addle r0, r3, r0
bce4: d1a02006 movle r2, r6
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
if (chunk > chunk1) {
bce8: da000006 ble bd08 <pipe_write+0x134>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
bcec: e1a0200a mov r2, sl
bcf0: e0830000 add r0, r3, r0
bcf4: eb000c26 bl ed94 <memcpy>
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
bcf8: e08a1005 add r1, sl, r5
bcfc: e5940000 ldr r0, [r4]
bd00: e08b1001 add r1, fp, r1
bd04: e06a2006 rsb r2, sl, r6
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
bd08: eb000c21 bl ed94 <memcpy>
pipe->Length += chunk;
bd0c: e594300c ldr r3, [r4, #12]
bd10: e0833006 add r3, r3, r6
bd14: e584300c str r3, [r4, #12]
if (pipe->waitingReaders > 0)
bd18: e5943018 ldr r3, [r4, #24]
bd1c: e3530000 cmp r3, #0
PIPE_WAKEUPREADERS(pipe);
bd20: 1594002c ldrne r0, [r4, #44] ; 0x2c
bd24: 11a0100d movne r1, sp
bd28: 1b0002d5 blne c884 <rtems_barrier_release>
written += chunk;
bd2c: e0855006 add r5, r5, r6
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
bd30: e3a09001 mov r9, #1
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
bd34: e1550007 cmp r5, r7
bd38: 3affffd8 bcc bca0 <pipe_write+0xcc>
bd3c: e3a06000 mov r6, #0
bd40: ea000002 b bd50 <pipe_write+0x17c>
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
bd44: e3e0600a mvn r6, #10
bd48: ea000000 b bd50 <pipe_write+0x17c>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
bd4c: e3e0601f mvn r6, #31
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
bd50: e5940028 ldr r0, [r4, #40] ; 0x28
bd54: ebffed87 bl 7378 <rtems_semaphore_release>
bd58: ea000000 b bd60 <pipe_write+0x18c>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
bd5c: e3e06003 mvn r6, #3 <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
bd60: e3550000 cmp r5, #0
bd64: c1a00005 movgt r0, r5
bd68: d1a00006 movle r0, r6
return written;
return ret;
}
bd6c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
000113a0 <realloc>:
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
113a0: e59f310c ldr r3, [pc, #268] ; 114b4 <bsp_section_text_size+0x54>
113a4: e5932010 ldr r2, [r3, #16]
113a8: e2822001 add r2, r2, #1
void *realloc(
void *ptr,
size_t size
)
{
113ac: e92d40f1 push {r0, r4, r5, r6, r7, lr}
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
113b0: 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())) {
113b4: e59f30fc ldr r3, [pc, #252] ; 114b8 <bsp_section_text_size+0x58>
113b8: e5933000 ldr r3, [r3]
113bc: e3530003 cmp r3, #3
void *realloc(
void *ptr,
size_t size
)
{
113c0: e1a04000 mov r4, r0
113c4: 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())) {
113c8: 1a000009 bne 113f4 <realloc+0x54>
if (_Thread_Dispatch_disable_level > 0)
113cc: e59f30e8 ldr r3, [pc, #232] ; 114bc <bsp_section_text_size+0x5c>
113d0: e5933000 ldr r3, [r3]
113d4: e3530000 cmp r3, #0
return (void *) 0;
113d8: 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)
113dc: 1a000032 bne 114ac <bsp_section_text_size+0x4c>
return (void *) 0;
if (_ISR_Nest_level > 0)
113e0: e59f20d8 ldr r2, [pc, #216] ; 114c0 <bsp_section_text_size+0x60>
113e4: e5922000 ldr r2, [r2]
113e8: e3520000 cmp r2, #0
return (void *) 0;
113ec: 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)
113f0: 1a00002d bne 114ac <bsp_section_text_size+0x4c>
}
/*
* Continue with realloc().
*/
if ( !ptr )
113f4: e3540000 cmp r4, #0
113f8: 1a000003 bne 1140c <realloc+0x6c>
return malloc( size );
113fc: e1a00005 mov r0, r5
11400: ebffc408 bl 2428 <malloc>
11404: e1a04000 mov r4, r0
11408: ea000027 b 114ac <bsp_section_text_size+0x4c>
if ( !size ) {
1140c: e3550000 cmp r5, #0
11410: 1a000003 bne 11424 <realloc+0x84>
free( ptr );
11414: e1a00004 mov r0, r4 <== NOT EXECUTED
11418: ebffc333 bl 20ec <free> <== NOT EXECUTED
return (void *) 0;
1141c: e1a04005 mov r4, r5 <== NOT EXECUTED
11420: ea000021 b 114ac <bsp_section_text_size+0x4c> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
11424: e59f6098 ldr r6, [pc, #152] ; 114c4 <bsp_section_text_size+0x64>
11428: e1a01004 mov r1, r4
1142c: e5960000 ldr r0, [r6]
11430: e1a0200d mov r2, sp
11434: eb00004e bl 11574 <_Protected_heap_Get_block_size>
11438: e2507000 subs r7, r0, #0
1143c: 1a000004 bne 11454 <realloc+0xb4>
errno = EINVAL;
11440: ebffeb24 bl c0d8 <__errno>
11444: e3a03016 mov r3, #22
11448: e5803000 str r3, [r0]
return (void *) 0;
1144c: e1a04007 mov r4, r7
11450: ea000015 b 114ac <bsp_section_text_size+0x4c>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
11454: e5960000 ldr r0, [r6]
11458: e1a01004 mov r1, r4
1145c: e1a02005 mov r2, r5
11460: eb000054 bl 115b8 <_Protected_heap_Resize_block>
11464: e3500000 cmp r0, #0
11468: 1a00000f bne 114ac <bsp_section_text_size+0x4c>
* 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 );
1146c: e1a00005 mov r0, r5
11470: ebffc3ec bl 2428 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
11474: e59f3038 ldr r3, [pc, #56] ; 114b4 <bsp_section_text_size+0x54>
11478: e5932004 ldr r2, [r3, #4]
if ( !new_area ) {
1147c: e2506000 subs r6, r0, #0
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
11480: e2422001 sub r2, r2, #1
11484: e5832004 str r2, [r3, #4]
if ( !new_area ) {
11488: 0a000006 beq 114a8 <bsp_section_text_size+0x48>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
1148c: e59d2000 ldr r2, [sp]
11490: e1a01004 mov r1, r4
11494: e1550002 cmp r5, r2
11498: 31a02005 movcc r2, r5
1149c: ebffed3b bl c990 <memcpy>
free( ptr );
114a0: e1a00004 mov r0, r4
114a4: ebffc310 bl 20ec <free>
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
114a8: e1a04006 mov r4, r6
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
114ac: e1a00004 mov r0, r4
114b0: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
00002738 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
2738: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Timestamp_Control uptime, total, ran, last_context_switch;
#else
uint32_t total_units = 0;
#endif
if ( !print )
273c: e251a000 subs sl, r1, #0
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
2740: e24dd048 sub sp, sp, #72 ; 0x48
2744: e1a08000 mov r8, r0
Timestamp_Control uptime, total, ran, last_context_switch;
#else
uint32_t total_units = 0;
#endif
if ( !print )
2748: 0a00005b beq 28bc <rtems_cpu_usage_report_with_plugin+0x184>
* 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__
last_context_switch = _Thread_Time_of_last_context_switch;
274c: e59f3170 ldr r3, [pc, #368] ; 28c4 <rtems_cpu_usage_report_with_plugin+0x18c>
2750: e8930018 ldm r3, {r3, r4}
_TOD_Get_uptime( &uptime );
2754: e28d5038 add r5, sp, #56 ; 0x38
* 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__
last_context_switch = _Thread_Time_of_last_context_switch;
2758: e58d3020 str r3, [sp, #32]
275c: e58d4024 str r4, [sp, #36] ; 0x24
_TOD_Get_uptime( &uptime );
2760: e1a00005 mov r0, r5
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
2764: e28d4030 add r4, sp, #48 ; 0x30
* 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__
last_context_switch = _Thread_Time_of_last_context_switch;
_TOD_Get_uptime( &uptime );
2768: eb00146c bl 7920 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
276c: e1a01005 mov r1, r5
2770: e59f0150 ldr r0, [pc, #336] ; 28c8 <rtems_cpu_usage_report_with_plugin+0x190>
2774: e1a02004 mov r2, r4
2778: eb001cfa bl 9b68 <_Timespec_Subtract>
}
}
}
#endif
(*print)(
277c: e1a00008 mov r0, r8
2780: e59f1144 ldr r1, [pc, #324] ; 28cc <rtems_cpu_usage_report_with_plugin+0x194>
2784: e1a0e00f mov lr, pc
2788: e12fff1a bx sl
278c: e59f513c ldr r5, [pc, #316] ; 28d0 <rtems_cpu_usage_report_with_plugin+0x198>
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2790: e28db008 add fp, sp, #8
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
2794: e5b53004 ldr r3, [r5, #4]!
2798: e3530000 cmp r3, #0
279c: 0a00003a beq 288c <rtems_cpu_usage_report_with_plugin+0x154>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
27a0: e5936004 ldr r6, [r3, #4]
if ( information ) {
27a4: e3560000 cmp r6, #0
27a8: 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( &last_context_switch, &uptime, &used );
27ac: 128d9018 addne r9, sp, #24
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
27b0: 1a000032 bne 2880 <rtems_cpu_usage_report_with_plugin+0x148>
27b4: ea000034 b 288c <rtems_cpu_usage_report_with_plugin+0x154> <== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
27b8: e596301c ldr r3, [r6, #28]
27bc: e7934107 ldr r4, [r3, r7, lsl #2]
if ( !the_thread )
27c0: e3540000 cmp r4, #0
27c4: 0a00002c beq 287c <rtems_cpu_usage_report_with_plugin+0x144>
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
27c8: e3a0100d mov r1, #13
27cc: e1a0200b mov r2, fp
27d0: e5940008 ldr r0, [r4, #8]
27d4: eb000fc5 bl 66f0 <rtems_object_get_name>
(*print)(
27d8: e5942008 ldr r2, [r4, #8]
27dc: e1a0300b mov r3, fp
27e0: e1a00008 mov r0, r8
27e4: e59f10e8 ldr r1, [pc, #232] ; 28d4 <rtems_cpu_usage_report_with_plugin+0x19c>
27e8: e1a0e00f mov lr, pc
27ec: 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;
27f0: e2843084 add r3, r4, #132 ; 0x84
27f4: e893000c ldm r3, {r2, r3}
27f8: e58d2028 str r2, [sp, #40] ; 0x28
27fc: e58d302c str r3, [sp, #44] ; 0x2c
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2800: e59f20d0 ldr r2, [pc, #208] ; 28d8 <rtems_cpu_usage_report_with_plugin+0x1a0>
2804: e5923004 ldr r3, [r2, #4]
2808: e5932008 ldr r2, [r3, #8]
280c: e5943008 ldr r3, [r4, #8]
2810: e1520003 cmp r2, r3
2814: 1a000006 bne 2834 <rtems_cpu_usage_report_with_plugin+0xfc>
Timestamp_Control used;
_Timestamp_Subtract( &last_context_switch, &uptime, &used );
2818: e28d0020 add r0, sp, #32
281c: e28d1038 add r1, sp, #56 ; 0x38
2820: e1a02009 mov r2, r9
2824: eb001ccf bl 9b68 <_Timespec_Subtract>
_Timestamp_Add_to( &ran, &used );
2828: e28d0028 add r0, sp, #40 ; 0x28
282c: e1a01009 mov r1, r9
2830: eb001c91 bl 9a7c <_Timespec_Add_to>
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
2834: e28d2044 add r2, sp, #68 ; 0x44
2838: e28d3040 add r3, sp, #64 ; 0x40
283c: e28d0028 add r0, sp, #40 ; 0x28
2840: e28d1030 add r1, sp, #48 ; 0x30
2844: eb001ca4 bl 9adc <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
2848: e3a01ffa mov r1, #1000 ; 0x3e8
284c: e59d002c ldr r0, [sp, #44] ; 0x2c
2850: eb00514f bl 16d94 <__aeabi_uidiv>
2854: e59d2044 ldr r2, [sp, #68] ; 0x44
2858: e58d2000 str r2, [sp]
285c: e59d2040 ldr r2, [sp, #64] ; 0x40
2860: e1a03000 mov r3, r0
2864: e58d2004 str r2, [sp, #4]
2868: e1a00008 mov r0, r8
286c: e59f1068 ldr r1, [pc, #104] ; 28dc <rtems_cpu_usage_report_with_plugin+0x1a4>
2870: e59d2028 ldr r2, [sp, #40] ; 0x28
2874: e1a0e00f mov lr, pc
2878: e12fff1a bx sl
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
287c: e2877001 add r7, r7, #1
2880: e1d631b0 ldrh r3, [r6, #16]
2884: e1570003 cmp r7, r3
2888: 9affffca bls 27b8 <rtems_cpu_usage_report_with_plugin+0x80>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
288c: e59f304c ldr r3, [pc, #76] ; 28e0 <rtems_cpu_usage_report_with_plugin+0x1a8>
2890: e1550003 cmp r5, r3
2894: 1affffbe bne 2794 <rtems_cpu_usage_report_with_plugin+0x5c>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
2898: e3a01ffa mov r1, #1000 ; 0x3e8
289c: e59d0034 ldr r0, [sp, #52] ; 0x34
28a0: eb00513b bl 16d94 <__aeabi_uidiv>
28a4: e59f1038 ldr r1, [pc, #56] ; 28e4 <rtems_cpu_usage_report_with_plugin+0x1ac>
28a8: e1a03000 mov r3, r0
28ac: e59d2030 ldr r2, [sp, #48] ; 0x30
28b0: e1a00008 mov r0, r8
28b4: e1a0e00f mov lr, pc
28b8: e12fff1a bx sl
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
28bc: e28dd048 add sp, sp, #72 ; 0x48
28c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
00002bcc <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
2bcc: e92d4070 push {r4, r5, r6, lr}
2bd0: e1a06000 mov r6, r0
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
2bd4: e3a00008 mov r0, #8
}
return 0;
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
2bd8: e1a05001 mov r5, r1
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
2bdc: eb0000fa bl 2fcc <malloc>
2be0: e1a04000 mov r4, r0
*key = new_key;
2be4: e5860000 str r0, [r6]
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
2be8: e1a01004 mov r1, r4
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
*key = new_key;
new_key->val = NULL;
2bec: e3a00000 mov r0, #0
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
2bf0: e1a02005 mov r2, r5
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
*key = new_key;
new_key->val = NULL;
2bf4: e8840021 stm r4, {r0, r5}
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
2bf8: eb000e07 bl 641c <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
2bfc: e3500000 cmp r0, #0
2c00: 08bd8070 popeq {r4, r5, r6, pc}
return 0;
free( new_key );
2c04: e1a00004 mov r0, r4 <== NOT EXECUTED
2c08: ebffff95 bl 2a64 <free> <== NOT EXECUTED
return -1;
2c0c: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
2c10: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
000098a4 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
98a4: e2003006 and r3, r0, #6
98a8: e3530006 cmp r3, #6
fcntl_flags |= O_RDWR;
98ac: 03a03002 moveq r3, #2
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
98b0: 0a000005 beq 98cc <rtems_libio_to_fcntl_flags+0x28>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
98b4: e3100002 tst r0, #2
fcntl_flags |= O_RDONLY;
98b8: 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) {
98bc: 1a000002 bne 98cc <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;
98c0: e3100004 tst r0, #4 <== NOT EXECUTED
98c4: 03a03000 moveq r3, #0 <== NOT EXECUTED
98c8: 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 ) {
98cc: e3100001 tst r0, #1
fcntl_flags |= O_NONBLOCK;
98d0: 13833901 orrne r3, r3, #16384 ; 0x4000
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
98d4: e3100c02 tst r0, #512 ; 0x200
fcntl_flags |= O_APPEND;
98d8: 13833008 orrne r3, r3, #8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
98dc: e3100b01 tst r0, #1024 ; 0x400
fcntl_flags |= O_CREAT;
98e0: 13833c02 orrne r3, r3, #512 ; 0x200
}
return fcntl_flags;
}
98e4: e1a00003 mov r0, r3
98e8: e12fff1e bx lr
00001900 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
1900: e92d4810 push {r4, fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
1904: e59f3078 ldr r3, [pc, #120] ; 1984 <rtems_stack_checker_is_blown+0x84>
1908: e5933004 ldr r3, [r3, #4]
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
190c: e59300b8 ldr r0, [r3, #184] ; 0xb8
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
1910: e28db008 add fp, sp, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
1914: e15b0000 cmp fp, r0
return false;
1918: 33a04000 movcc r4, #0
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
191c: 3a000004 bcc 1934 <rtems_stack_checker_is_blown+0x34>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
1920: e59340b4 ldr r4, [r3, #180] ; 0xb4
1924: e0804004 add r4, r0, r4
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
1928: e15b0004 cmp fp, r4
192c: 83a04000 movhi r4, #0
1930: 93a04001 movls r4, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
1934: e59f304c ldr r3, [pc, #76] ; 1988 <rtems_stack_checker_is_blown+0x88>
1938: e5933008 ldr r3, [r3, #8]
193c: 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;
1940: 03a01001 moveq r1, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
1944: 0a000005 beq 1960 <rtems_stack_checker_is_blown+0x60>
pattern_ok = (!memcmp(
1948: e59f103c ldr r1, [pc, #60] ; 198c <rtems_stack_checker_is_blown+0x8c>
194c: e2800008 add r0, r0, #8
1950: e3a02010 mov r2, #16
1954: eb002c20 bl c9dc <memcmp>
1958: e2701001 rsbs r1, r0, #1
195c: 33a01000 movcc r1, #0
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
1960: e3540000 cmp r4, #0
1964: 0a000001 beq 1970 <rtems_stack_checker_is_blown+0x70>
1968: e3510000 cmp r1, #0
196c: 1a000002 bne 197c <rtems_stack_checker_is_blown+0x7c>
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
1970: e59f300c ldr r3, [pc, #12] ; 1984 <rtems_stack_checker_is_blown+0x84><== NOT EXECUTED
1974: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
1978: ebffff9d bl 17f4 <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
197c: e3a00000 mov r0, #0
1980: e8bd8810 pop {r4, fp, pc}
0000b4e0 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
b4e0: e92d40f1 push {r0, r4, r5, r6, r7, lr}
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
b4e4: e2514000 subs r4, r1, #0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
b4e8: e1a05000 mov r5, r0
b4ec: e1a06002 mov r6, r2
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
b4f0: 03a00009 moveq r0, #9
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
b4f4: 0a000018 beq b55c <rtems_string_to_pointer+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
b4f8: eb0007a8 bl d3a0 <__errno>
b4fc: e3a03000 mov r3, #0
b500: 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 );
b504: e1a0100d mov r1, sp
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
b508: 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 );
b50c: e1a00005 mov r0, r5
b510: e3a02010 mov r2, #16
b514: eb0014ce bl 10854 <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 )
b518: e3560000 cmp r6, #0
*endptr = end;
b51c: 159d3000 ldrne r3, [sp]
b520: 15863000 strne r3, [r6]
/* nothing was converted */
if ( end == s )
b524: e59d3000 ldr r3, [sp]
b528: e1530005 cmp r3, r5
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
b52c: e1a07000 mov r7, r0
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
b530: 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 )
b534: 0a000008 beq b55c <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))
b538: e3770001 cmn r7, #1
b53c: 1a000004 bne b554 <rtems_string_to_pointer+0x74>
b540: eb000796 bl d3a0 <__errno> <== NOT EXECUTED
b544: e5903000 ldr r3, [r0] <== NOT EXECUTED
b548: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
b54c: 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))
b550: 0a000001 beq b55c <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;
b554: e5847000 str r7, [r4]
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
b558: e3a00000 mov r0, #0
}
b55c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
00001cc4 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
1cc4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
1cc8: e24ddf6b sub sp, sp, #428 ; 0x1ac
1ccc: e58d1010 str r1, [sp, #16]
1cd0: e58d2018 str r2, [sp, #24]
1cd4: e58d000c str r0, [sp, #12]
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
1cd8: eb003a83 bl 106ec <strlen>
1cdc: e3a02000 mov r2, #0
1ce0: e1a01000 mov r1, r0
1ce4: e28d3f65 add r3, sp, #404 ; 0x194
1ce8: e59d000c ldr r0, [sp, #12]
1cec: e58d2000 str r2, [sp]
1cf0: eb00029b bl 2764 <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
1cf4: e2504000 subs r4, r0, #0
1cf8: 1a00006c bne 1eb0 <bsp_section_bss_size+0x1d0>
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
1cfc: e59d31a0 ldr r3, [sp, #416] ; 0x1a0
1d00: e59f21c0 ldr r2, [pc, #448] ; 1ec8 <bsp_section_bss_size+0x1e8>
1d04: e1530002 cmp r3, r2
1d08: 0a000005 beq 1d24 <bsp_section_bss_size+0x44>
1d0c: e59f21b8 ldr r2, [pc, #440] ; 1ecc <bsp_section_bss_size+0x1ec>
1d10: e1530002 cmp r3, r2
1d14: 1a000065 bne 1eb0 <bsp_section_bss_size+0x1d0>
1d18: ea000001 b 1d24 <bsp_section_bss_size+0x44> <== NOT EXECUTED
1d1c: e1a08004 mov r8, r4
1d20: ea000006 b 1d40 <bsp_section_bss_size+0x60>
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
1d24: e28d2f65 add r2, sp, #404 ; 0x194
1d28: e58d2004 str r2, [sp, #4]
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
1d2c: 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);
1d30: e28d7f47 add r7, sp, #284 ; 0x11c
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
1d34: e28d9d06 add r9, sp, #384 ; 0x180
* - 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);
1d38: e28d501c add r5, sp, #28
1d3c: e1a0a004 mov sl, r4
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
1d40: e59d3018 ldr r3, [sp, #24]
1d44: e2884c02 add r4, r8, #512 ; 0x200
1d48: e1540003 cmp r4, r3
1d4c: 8a000059 bhi 1eb8 <bsp_section_bss_size+0x1d8>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
1d50: e59de010 ldr lr, [sp, #16]
1d54: e08e8008 add r8, lr, r8
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
1d58: e2880c01 add r0, r8, #256 ; 0x100
1d5c: e2800001 add r0, r0, #1
1d60: e59f1168 ldr r1, [pc, #360] ; 1ed0 <bsp_section_bss_size+0x1f0>
1d64: e3a02005 mov r2, #5
1d68: eb003a77 bl 1074c <strncmp>
1d6c: e2506000 subs r6, r0, #0
1d70: 1a000050 bne 1eb8 <bsp_section_bss_size+0x1d8>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
1d74: e3a02063 mov r2, #99 ; 0x63
1d78: e1a01008 mov r1, r8
1d7c: e1a00007 mov r0, r7
1d80: eb003ad2 bl 108d0 <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
1d84: e5cd617f strb r6, [sp, #383] ; 0x17f
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
1d88: e3a01008 mov r1, #8
1d8c: 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];
1d90: e5d8609c ldrb r6, [r8, #156] ; 0x9c
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
1d94: eb001d53 bl 92e8 <_rtems_octal2ulong>
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
1d98: 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);
1d9c: e58d0014 str r0, [sp, #20]
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
1da0: e288007c add r0, r8, #124 ; 0x7c
1da4: eb001d4f bl 92e8 <_rtems_octal2ulong>
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
1da8: 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);
1dac: e1a0b000 mov fp, r0
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
1db0: e2880094 add r0, r8, #148 ; 0x94
1db4: eb001d4b bl 92e8 <_rtems_octal2ulong>
1db8: e1a03000 mov r3, r0
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
1dbc: e1a00008 mov r0, r8
1dc0: e58d3008 str r3, [sp, #8]
1dc4: eb001d55 bl 9320 <_rtems_tar_header_checksum>
1dc8: e59d3008 ldr r3, [sp, #8]
1dcc: e1500003 cmp r0, r3
1dd0: 1a000038 bne 1eb8 <bsp_section_bss_size+0x1d8>
* 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) {
1dd4: e3560035 cmp r6, #53 ; 0x35
1dd8: 1a000012 bne 1e28 <bsp_section_bss_size+0x148>
strcpy(full_filename, mountpoint);
1ddc: e59d100c ldr r1, [sp, #12]
1de0: e1a00005 mov r0, r5
1de4: eb00387c bl ffdc <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
1de8: e1a00005 mov r0, r5
1dec: eb003a3e bl 106ec <strlen>
1df0: e28d2f6b add r2, sp, #428 ; 0x1ac
1df4: e0820000 add r0, r2, r0
1df8: e5503191 ldrb r3, [r0, #-401] ; 0x191
1dfc: e353002f cmp r3, #47 ; 0x2f
strcat(full_filename, "/");
1e00: 11a00005 movne r0, r5
1e04: 159f10c8 ldrne r1, [pc, #200] ; 1ed4 <bsp_section_bss_size+0x1f4>
1e08: 1b0037bc blne fd00 <strcat>
strcat(full_filename, filename);
1e0c: e1a01007 mov r1, r7
1e10: e1a00005 mov r0, r5
1e14: eb0037b9 bl fd00 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
1e18: e1a00005 mov r0, r5
1e1c: e59f10b4 ldr r1, [pc, #180] ; 1ed8 <bsp_section_bss_size+0x1f8>
1e20: eb000464 bl 2fb8 <mkdir>
1e24: eaffffbc b 1d1c <bsp_section_bss_size+0x3c>
* 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) {
1e28: e3560030 cmp r6, #48 ; 0x30
1e2c: 1affffba bne 1d1c <bsp_section_bss_size+0x3c>
const char *name;
loc = root_loc;
1e30: e59dc004 ldr ip, [sp, #4]
1e34: e8bc000f ldm ip!, {r0, r1, r2, r3}
1e38: e1a0e009 mov lr, r9
1e3c: e8ae000f stmia lr!, {r0, r1, r2, r3}
1e40: e59c2000 ldr r2, [ip]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
1e44: e1a00007 mov r0, r7
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
1e48: e58e2000 str r2, [lr]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
1e4c: e1a01009 mov r1, r9
1e50: e28d2f6a add r2, sp, #424 ; 0x1a8
1e54: eb001ffc bl 9e4c <IMFS_evaluate_for_make>
1e58: e2506000 subs r6, r0, #0
1e5c: 1a00000d bne 1e98 <bsp_section_bss_size+0x1b8>
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
1e60: e59d2014 ldr r2, [sp, #20]
1e64: e1a03b82 lsl r3, r2, #23
1e68: 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(
1e6c: e59d21a8 ldr r2, [sp, #424] ; 0x1a8
1e70: e3833902 orr r3, r3, #32768 ; 0x8000
1e74: e1a00009 mov r0, r9
1e78: e3a01006 mov r1, #6
1e7c: e58d6000 str r6, [sp]
1e80: eb001e6f bl 9844 <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];
1e84: e59d2010 ldr r2, [sp, #16]
1e88: 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;
1e8c: e580b050 str fp, [r0, #80] ; 0x50
1e90: e5806054 str r6, [r0, #84] ; 0x54
node->info.linearfile.direct = &tar_image[offset];
1e94: e5803058 str r3, [r0, #88] ; 0x58
}
nblocks = (((file_size) + 511) & ~511) / 512;
1e98: e28bbf7f add fp, fp, #508 ; 0x1fc
1e9c: e28bb003 add fp, fp, #3
offset += 512 * nblocks;
1ea0: e3cbbf7f bic fp, fp, #508 ; 0x1fc
1ea4: e3cbb003 bic fp, fp, #3
1ea8: e08b4004 add r4, fp, r4
1eac: eaffff9a b 1d1c <bsp_section_bss_size+0x3c>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
return -1;
1eb0: e3e04000 mvn r4, #0
1eb4: ea000000 b 1ebc <bsp_section_bss_size+0x1dc>
1eb8: e1a0400a mov r4, sl
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
1ebc: e1a00004 mov r0, r4
1ec0: e28ddf6b add sp, sp, #428 ; 0x1ac
1ec4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000bc90 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
bc90: 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 )
bc94: e252a000 subs sl, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
bc98: e1a04000 mov r4, r0
bc9c: 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;
bca0: 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 )
bca4: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
bca8: e59f313c ldr r3, [pc, #316] ; bdec <rtems_task_mode+0x15c>
bcac: 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;
bcb0: e5d78074 ldrb r8, [r7, #116] ; 0x74
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
bcb4: e59760f4 ldr r6, [r7, #244] ; 0xf4
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
bcb8: 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;
bcbc: 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;
bcc0: 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;
bcc4: 03a08c01 moveq r8, #256 ; 0x100
bcc8: 13a08000 movne r8, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
bccc: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
bcd0: 13888c02 orrne r8, r8, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
bcd4: e3590000 cmp r9, #0
bcd8: 03a09b01 moveq r9, #1024 ; 0x400
bcdc: 13a09000 movne r9, #0
old_mode |= _ISR_Get_level();
bce0: ebfff31f bl 8964 <_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;
bce4: e1899000 orr r9, r9, r0
old_mode |= _ISR_Get_level();
bce8: e1898008 orr r8, r9, r8
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
bcec: 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;
bcf0: e58a8000 str r8, [sl]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
bcf4: 0a000003 beq bd08 <rtems_task_mode+0x78>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
bcf8: e3140c01 tst r4, #256 ; 0x100
bcfc: 13a03000 movne r3, #0
bd00: 03a03001 moveq r3, #1
bd04: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
bd08: e3150c02 tst r5, #512 ; 0x200
bd0c: 0a000006 beq bd2c <rtems_task_mode+0x9c>
if ( _Modes_Is_timeslice(mode_set) ) {
bd10: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
bd14: 13a03001 movne r3, #1
bd18: 1587307c strne r3, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
bd1c: 159f30cc ldrne r3, [pc, #204] ; bdf0 <rtems_task_mode+0x160>
bd20: 15933000 ldrne r3, [r3]
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
bd24: 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;
bd28: 15873078 strne r3, [r7, #120] ; 0x78
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
bd2c: e3150080 tst r5, #128 ; 0x80
bd30: 0a000001 beq bd3c <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 ) );
bd34: e2040080 and r0, r4, #128 ; 0x80
bd38: ebfff304 bl 8950 <_CPU_ISR_Set_level>
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
bd3c: e2150b01 ands r0, r5, #1024 ; 0x400
bd40: 0a000013 beq bd94 <rtems_task_mode+0x104>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
bd44: 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 ) {
bd48: e5d62008 ldrb r2, [r6, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
bd4c: 13a03000 movne r3, #0
bd50: 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 ) {
bd54: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
bd58: 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 ) {
bd5c: 0a00000c beq bd94 <rtems_task_mode+0x104>
asr->is_enabled = is_asr_enabled;
bd60: e5c63008 strb r3, [r6, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
bd64: e10f3000 mrs r3, CPSR
bd68: e3832080 orr r2, r3, #128 ; 0x80
bd6c: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
bd70: e2861014 add r1, r6, #20
bd74: e8910006 ldm r1, {r1, r2}
information->signals_pending = information->signals_posted;
information->signals_posted = _signals;
bd78: 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;
bd7c: e5861018 str r1, [r6, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
bd80: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
bd84: e5960014 ldr r0, [r6, #20]
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
bd88: e3500000 cmp r0, #0
bd8c: 13a00001 movne r0, #1
bd90: 03a00000 moveq r0, #0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
bd94: e59f3058 ldr r3, [pc, #88] ; bdf4 <rtems_task_mode+0x164>
bd98: e5933000 ldr r3, [r3]
bd9c: e3530003 cmp r3, #3
bda0: 1a00000f bne bde4 <rtems_task_mode+0x154>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
bda4: e59f2040 ldr r2, [pc, #64] ; bdec <rtems_task_mode+0x15c>
if ( are_signals_pending ||
bda8: e3500000 cmp r0, #0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
bdac: e5923004 ldr r3, [r2, #4]
if ( are_signals_pending ||
bdb0: 1a000005 bne bdcc <rtems_task_mode+0x13c>
bdb4: e5922008 ldr r2, [r2, #8]
bdb8: e1530002 cmp r3, r2
bdbc: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
bdc0: e5d33074 ldrb r3, [r3, #116] ; 0x74
bdc4: e3530000 cmp r3, #0
bdc8: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
_Thread_Dispatch_necessary = true;
bdcc: e59f3018 ldr r3, [pc, #24] ; bdec <rtems_task_mode+0x15c>
bdd0: e3a02001 mov r2, #1
bdd4: e5c32010 strb r2, [r3, #16]
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
bdd8: ebffed73 bl 73ac <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
bddc: e3a00000 mov r0, #0
bde0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
bde4: e3a00000 mov r0, #0 <== NOT EXECUTED
}
bde8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
00003400 <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;
3400: e5903000 ldr r3, [r0]
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
3404: e92d4030 push {r4, r5, lr}
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3408: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain(
340c: e59f317c ldr r3, [pc, #380] ; 3590 <rtems_termios_close+0x190>
3410: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
3414: 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(
3418: e1a02001 mov r2, r1
341c: e5930000 ldr r0, [r3]
3420: eb0007a5 bl 52bc <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3424: e3500000 cmp r0, #0
3428: 1a000024 bne 34c0 <rtems_termios_close+0xc0>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
342c: e5943008 ldr r3, [r4, #8]
3430: e2433001 sub r3, r3, #1
3434: e3530000 cmp r3, #0
3438: e5843008 str r3, [r4, #8]
343c: 1a00004e bne 357c <rtems_termios_close+0x17c>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
3440: e59420cc ldr r2, [r4, #204] ; 0xcc
3444: e59f3148 ldr r3, [pc, #328] ; 3594 <rtems_termios_close+0x194>
3448: e0833282 add r3, r3, r2, lsl #5
344c: e5931004 ldr r1, [r3, #4]
3450: e3510000 cmp r1, #0
3454: 0a000003 beq 3468 <rtems_termios_close+0x68>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
3458: e1a00004 mov r0, r4
345c: e1a0e00f mov lr, pc
3460: e12fff11 bx r1
3464: ea000008 b 348c <rtems_termios_close+0x8c>
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3468: e5940018 ldr r0, [r4, #24]
346c: e1a02001 mov r2, r1
3470: eb000791 bl 52bc <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
3474: e3500000 cmp r0, #0
3478: 1a000010 bne 34c0 <rtems_termios_close+0xc0>
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
347c: e1a00004 mov r0, r4
3480: ebfffeb2 bl 2f50 <drainOutput>
rtems_semaphore_release (tty->osem);
3484: e5940018 ldr r0, [r4, #24]
3488: eb0007d1 bl 53d4 <rtems_semaphore_release>
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
348c: e59430b4 ldr r3, [r4, #180] ; 0xb4
3490: e3530002 cmp r3, #2
3494: 1a00000a bne 34c4 <rtems_termios_close+0xc4>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
3498: e59400c4 ldr r0, [r4, #196] ; 0xc4
349c: e3a01001 mov r1, #1
34a0: eb000673 bl 4e74 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
34a4: e3500000 cmp r0, #0
34a8: 1a000004 bne 34c0 <rtems_termios_close+0xc0>
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
34ac: e59400c8 ldr r0, [r4, #200] ; 0xc8
34b0: e3a01001 mov r1, #1
34b4: eb00066e bl 4e74 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
34b8: e3500000 cmp r0, #0
34bc: 0a000000 beq 34c4 <rtems_termios_close+0xc4>
rtems_fatal_error_occurred (sc);
34c0: eb000918 bl 5928 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
34c4: e594309c ldr r3, [r4, #156] ; 0x9c
34c8: e3530000 cmp r3, #0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
34cc: 1284000c addne r0, r4, #12
34d0: 18900003 ldmne r0, {r0, r1}
34d4: 11a02005 movne r2, r5
34d8: 11a0e00f movne lr, pc
34dc: 112fff13 bxne r3
if (tty->forw == NULL) {
34e0: e894000c ldm r4, {r2, r3}
34e4: 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;
34e8: 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) {
34ec: 1a000003 bne 3500 <rtems_termios_close+0x100>
rtems_termios_ttyTail = tty->back;
34f0: e59f10a0 ldr r1, [pc, #160] ; 3598 <rtems_termios_close+0x198>
if ( rtems_termios_ttyTail != NULL ) {
34f4: 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;
34f8: e5813000 str r3, [r1]
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
34fc: 15832000 strne r2, [r3]
}
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
3500: e5942004 ldr r2, [r4, #4]
3504: e5943000 ldr r3, [r4]
3508: 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;
350c: 15823000 strne r3, [r2]
}
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
3510: 1a000003 bne 3524 <rtems_termios_close+0x124>
rtems_termios_ttyHead = tty->forw;
3514: e59f1080 ldr r1, [pc, #128] ; 359c <rtems_termios_close+0x19c>
if ( rtems_termios_ttyHead != NULL ) {
3518: e3530000 cmp r3, #0
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
351c: e5813000 str r3, [r1]
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
3520: 15832004 strne r2, [r3, #4]
}
} else {
tty->back->forw = tty->forw;
}
rtems_semaphore_delete (tty->isem);
3524: e5940014 ldr r0, [r4, #20]
3528: eb00073c bl 5220 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
352c: e5940018 ldr r0, [r4, #24]
3530: eb00073a bl 5220 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
3534: e594008c ldr r0, [r4, #140] ; 0x8c
3538: eb000738 bl 5220 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
353c: e59430a0 ldr r3, [r4, #160] ; 0xa0
3540: e3530000 cmp r3, #0
3544: 0a000002 beq 3554 <rtems_termios_close+0x154>
3548: e59430b4 ldr r3, [r4, #180] ; 0xb4
354c: e3530002 cmp r3, #2
3550: 1a000001 bne 355c <rtems_termios_close+0x15c>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
3554: e5940068 ldr r0, [r4, #104] ; 0x68
3558: eb000730 bl 5220 <rtems_semaphore_delete>
free (tty->rawInBuf.theBuf);
355c: e5940058 ldr r0, [r4, #88] ; 0x58
3560: ebfffae1 bl 20ec <free>
free (tty->rawOutBuf.theBuf);
3564: e594007c ldr r0, [r4, #124] ; 0x7c
3568: ebfffadf bl 20ec <free>
free (tty->cbuf);
356c: e594001c ldr r0, [r4, #28]
3570: ebfffadd bl 20ec <free>
free (tty);
3574: e1a00004 mov r0, r4
3578: ebfffadb bl 20ec <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
357c: e59f300c ldr r3, [pc, #12] ; 3590 <rtems_termios_close+0x190>
3580: e5930000 ldr r0, [r3]
3584: eb000792 bl 53d4 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
3588: e3a00000 mov r0, #0
358c: e8bd8030 pop {r4, r5, pc}
0000491c <rtems_termios_dequeue_characters>:
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
491c: e5902090 ldr r2, [r0, #144] ; 0x90
4920: e0822001 add r2, r2, r1
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
4924: e59010b4 ldr r1, [r0, #180] ; 0xb4
4928: e3510002 cmp r1, #2
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
492c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
4930: e5802090 str r2, [r0, #144] ; 0x90
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
4934: 1a000004 bne 494c <rtems_termios_dequeue_characters+0x30>
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
4938: e59000c8 ldr r0, [r0, #200] ; 0xc8
493c: eb00014c bl 4e74 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
4940: e2503000 subs r3, r0, #0
4944: 0a00000d beq 4980 <rtems_termios_dequeue_characters+0x64>
rtems_fatal_error_occurred (sc);
4948: eb0003f6 bl 5928 <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
494c: e59030cc ldr r3, [r0, #204] ; 0xcc
4950: e3530005 cmp r3, #5
4954: 1a000007 bne 4978 <rtems_termios_dequeue_characters+0x5c>
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
4958: e59f3028 ldr r3, [pc, #40] ; 4988 <rtems_termios_dequeue_characters+0x6c>
495c: e59330b4 ldr r3, [r3, #180] ; 0xb4
4960: e3530000 cmp r3, #0
4964: 0a000005 beq 4980 <rtems_termios_dequeue_characters+0x64>
rtems_termios_linesw[tty->t_line].l_start(tty);
4968: e1a0e00f mov lr, pc
496c: e12fff13 bx r3
}
return 0; /* nothing to output in IRQ... */
4970: e3a03000 mov r3, #0
4974: ea000001 b 4980 <rtems_termios_dequeue_characters+0x64>
}
return rtems_termios_refill_transmitter(tty);
}
4978: 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);
497c: eaffff5a b 46ec <rtems_termios_refill_transmitter>
}
4980: e1a00003 mov r0, r3
4984: e49df004 pop {pc} ; (ldr pc, [sp], #4)
000043e8 <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)
{
43e8: 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) {
43ec: e59030cc ldr r3, [r0, #204] ; 0xcc
43f0: e59f7288 ldr r7, [pc, #648] ; 4680 <rtems_termios_enqueue_raw_characters+0x298>
43f4: e0873283 add r3, r7, r3, lsl #5
43f8: e5939010 ldr r9, [r3, #16]
43fc: e3590000 cmp r9, #0
* 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)
{
4400: e1a04000 mov r4, r0
4404: 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) {
4408: 11a05002 movne r5, r2
440c: 1a00000d bne 4448 <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);
4410: e2803030 add r3, r0, #48 ; 0x30
4414: 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,
4418: 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) {
441c: e1a08002 mov r8, r2
4420: 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,
4424: e58d3004 str r3, [sp, #4]
4428: ea00008b b 465c <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);
442c: e59430cc ldr r3, [r4, #204] ; 0xcc
4430: e4d60001 ldrb r0, [r6], #1
4434: e0873283 add r3, r7, r3, lsl #5
4438: e1a01004 mov r1, r4
443c: e1a0e00f mov lr, pc
4440: e593f010 ldr pc, [r3, #16]
4444: 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--) {
4448: e3550000 cmp r5, #0
444c: 1afffff6 bne 442c <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 )) {
4450: e59430e4 ldr r3, [r4, #228] ; 0xe4
4454: e3530000 cmp r3, #0
4458: 1a000086 bne 4678 <rtems_termios_enqueue_raw_characters+0x290>
445c: e59430dc ldr r3, [r4, #220] ; 0xdc
4460: e3530000 cmp r3, #0
4464: 0a000083 beq 4678 <rtems_termios_enqueue_raw_characters+0x290>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
4468: e2840030 add r0, r4, #48 ; 0x30
446c: e59410e0 ldr r1, [r4, #224] ; 0xe0
4470: e1a0e00f mov lr, pc
4474: e12fff13 bx r3
tty->tty_rcvwakeup = 1;
4478: e3a03001 mov r3, #1
447c: e58430e4 str r3, [r4, #228] ; 0xe4
4480: ea00007c b 4678 <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) {
4484: e59430b8 ldr r3, [r4, #184] ; 0xb8
4488: e3130c02 tst r3, #512 ; 0x200
}
return 0;
}
while (len--) {
c = *buf++;
448c: 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) {
4490: 0a00000f beq 44d4 <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]) {
4494: e5d4204a ldrb r2, [r4, #74] ; 0x4a
4498: e152000a cmp r2, sl
449c: e5d43049 ldrb r3, [r4, #73] ; 0x49
44a0: 1a000007 bne 44c4 <rtems_termios_enqueue_raw_characters+0xdc>
if (c == tty->termios.c_cc[VSTART]) {
44a4: e1530002 cmp r3, r2
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
44a8: 059430b8 ldreq r3, [r4, #184] ; 0xb8
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
44ac: 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;
44b0: 02233010 eoreq r3, r3, #16
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
44b4: 13833010 orrne r3, r3, #16
44b8: 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)
{
44bc: e3a09001 mov r9, #1
44c0: ea000005 b 44dc <rtems_termios_enqueue_raw_characters+0xf4>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
44c4: e153000a cmp r3, sl
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
44c8: 059430b8 ldreq r3, [r4, #184] ; 0xb8
44cc: 03c33010 biceq r3, r3, #16
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
44d0: 0afffff8 beq 44b8 <rtems_termios_enqueue_raw_characters+0xd0>
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
44d4: e3590000 cmp r9, #0
44d8: 0a000014 beq 4530 <rtems_termios_enqueue_raw_characters+0x148>
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
44dc: e59430b8 ldr r3, [r4, #184] ; 0xb8
44e0: e2033030 and r3, r3, #48 ; 0x30
44e4: e3530020 cmp r3, #32
44e8: 1a00005a bne 4658 <rtems_termios_enqueue_raw_characters+0x270>
/* disable interrupts */
rtems_interrupt_disable(level);
44ec: ebfffa93 bl 2f40 <arm_interrupt_disable> <== NOT EXECUTED
44f0: e1a07000 mov r7, r0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
44f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
44f8: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
44fc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
4500: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
4504: e3530000 cmp r3, #0 <== NOT EXECUTED
4508: 0a000006 beq 4528 <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);
450c: 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)(
4510: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
4514: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
4518: e0811003 add r1, r1, r3 <== NOT EXECUTED
451c: e3a02001 mov r2, #1 <== NOT EXECUTED
4520: e1a0e00f mov lr, pc <== NOT EXECUTED
4524: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
4528: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
452c: ea000049 b 4658 <rtems_termios_enqueue_raw_characters+0x270><== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
4530: e5940060 ldr r0, [r4, #96] ; 0x60
4534: e5941064 ldr r1, [r4, #100] ; 0x64
4538: e2800001 add r0, r0, #1
453c: eb002d1b bl f9b0 <__umodsi3>
4540: e1a07000 mov r7, r0
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
4544: ebfffa7d bl 2f40 <arm_interrupt_disable>
4548: e1a0b000 mov fp, r0
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
454c: e594305c ldr r3, [r4, #92] ; 0x5c
4550: e5940064 ldr r0, [r4, #100] ; 0x64
4554: e0630000 rsb r0, r3, r0
% tty->rawInBuf.Size) > tty->highwater) &&
4558: e5941064 ldr r1, [r4, #100] ; 0x64
455c: e0800007 add r0, r0, r7
4560: eb002d12 bl f9b0 <__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)
4564: e59430c0 ldr r3, [r4, #192] ; 0xc0
4568: e1500003 cmp r0, r3
456c: 9a000025 bls 4608 <rtems_termios_enqueue_raw_characters+0x220>
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
4570: 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) &&
4574: e3130001 tst r3, #1 <== NOT EXECUTED
4578: 1a000022 bne 4608 <rtems_termios_enqueue_raw_characters+0x220><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
457c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
4580: e3833001 orr r3, r3, #1 <== NOT EXECUTED
4584: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
4588: e59f30f4 ldr r3, [pc, #244] ; 4684 <rtems_termios_enqueue_raw_characters+0x29c><== NOT EXECUTED
458c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
4590: e0023003 and r3, r2, r3 <== NOT EXECUTED
4594: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED
4598: 1a00000e bne 45d8 <rtems_termios_enqueue_raw_characters+0x1f0><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
459c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
45a0: e3130020 tst r3, #32 <== NOT EXECUTED
45a4: 1a000002 bne 45b4 <rtems_termios_enqueue_raw_characters+0x1cc><== NOT EXECUTED
45a8: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
45ac: e3530000 cmp r3, #0 <== NOT EXECUTED
45b0: 1a000014 bne 4608 <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;
45b4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
45b8: e3833002 orr r3, r3, #2 <== NOT EXECUTED
45bc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
45c0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
45c4: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
45c8: e3a02001 mov r2, #1 <== NOT EXECUTED
45cc: e1a0e00f mov lr, pc <== NOT EXECUTED
45d0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
45d4: ea00000b b 4608 <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) ) {
45d8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
45dc: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED
45e0: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED
45e4: 1a000007 bne 4608 <rtems_termios_enqueue_raw_characters+0x220><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
45e8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
45ec: e3833004 orr r3, r3, #4 <== NOT EXECUTED
45f0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
45f4: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED
45f8: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
45fc: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
4600: 11a0e00f movne lr, pc <== NOT EXECUTED
4604: 112fff13 bxne r3 <== NOT EXECUTED
4608: e129f00b msr CPSR_fc, fp
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
460c: e594305c ldr r3, [r4, #92] ; 0x5c
4610: e1570003 cmp r7, r3
dropped++;
4614: 02855001 addeq r5, r5, #1
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
4618: 0a00000e beq 4658 <rtems_termios_enqueue_raw_characters+0x270>
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
461c: e5943058 ldr r3, [r4, #88] ; 0x58
4620: 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 )) {
4624: e59430e4 ldr r3, [r4, #228] ; 0xe4
4628: e3530000 cmp r3, #0
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
462c: 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 )) {
4630: 1a000008 bne 4658 <rtems_termios_enqueue_raw_characters+0x270>
4634: e59430dc ldr r3, [r4, #220] ; 0xdc
4638: e3530000 cmp r3, #0
463c: 0a000005 beq 4658 <rtems_termios_enqueue_raw_characters+0x270>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
4640: e59d0000 ldr r0, [sp] <== NOT EXECUTED
4644: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
4648: e1a0e00f mov lr, pc <== NOT EXECUTED
464c: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
4650: e3a03001 mov r3, #1 <== NOT EXECUTED
4654: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
4658: e2488001 sub r8, r8, #1
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
465c: e3580000 cmp r8, #0
4660: 1affff87 bne 4484 <rtems_termios_enqueue_raw_characters+0x9c>
}
}
}
}
tty->rawInBufDropped += dropped;
4664: e5943078 ldr r3, [r4, #120] ; 0x78
4668: e0833005 add r3, r3, r5
466c: e5843078 str r3, [r4, #120] ; 0x78
rtems_semaphore_release (tty->rawInBuf.Semaphore);
4670: e5940068 ldr r0, [r4, #104] ; 0x68
4674: eb000356 bl 53d4 <rtems_semaphore_release>
return dropped;
}
4678: e1a00005 mov r0, r5
467c: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
000035b8 <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;
35b8: e5903000 ldr r3, [r0]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
35bc: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
35c0: e5934034 ldr r4, [r3, #52] ; 0x34
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
35c4: 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;
35c8: e5907008 ldr r7, [r0, #8]
rtems_status_code sc;
args->ioctl_return = 0;
35cc: e580100c str r1, [r0, #12]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
35d0: 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);
35d4: e1a02001 mov r2, r1
35d8: e5940018 ldr r0, [r4, #24]
35dc: eb000736 bl 52bc <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
35e0: e2506000 subs r6, r0, #0
35e4: 1a0000d4 bne 393c <rtems_termios_ioctl+0x384>
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
35e8: e5953004 ldr r3, [r5, #4]
35ec: e3530004 cmp r3, #4
35f0: 0a0000a8 beq 3898 <rtems_termios_ioctl+0x2e0>
35f4: 8a000005 bhi 3610 <rtems_termios_ioctl+0x58>
35f8: e3530002 cmp r3, #2
35fc: 0a000029 beq 36a8 <rtems_termios_ioctl+0xf0>
3600: 8a00009d bhi 387c <rtems_termios_ioctl+0x2c4>
3604: e3530001 cmp r3, #1
3608: 1a000010 bne 3650 <rtems_termios_ioctl+0x98>
360c: ea00001b b 3680 <rtems_termios_ioctl+0xc8>
3610: e59f2330 ldr r2, [pc, #816] ; 3948 <rtems_termios_ioctl+0x390>
3614: e1530002 cmp r3, r2
3618: 0a0000ba beq 3908 <rtems_termios_ioctl+0x350>
361c: 8a000002 bhi 362c <rtems_termios_ioctl+0x74>
3620: e3530005 cmp r3, #5
3624: 1a000009 bne 3650 <rtems_termios_ioctl+0x98>
3628: ea000096 b 3888 <rtems_termios_ioctl+0x2d0>
362c: e59f2318 ldr r2, [pc, #792] ; 394c <rtems_termios_ioctl+0x394>
3630: 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;
3634: 05953008 ldreq r3, [r5, #8]
3638: 059420cc ldreq r2, [r4, #204] ; 0xcc
363c: 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) {
3640: 0a0000bb beq 3934 <rtems_termios_ioctl+0x37c>
3644: e2822105 add r2, r2, #1073741825 ; 0x40000001
3648: e1530002 cmp r3, r2
364c: 0a000095 beq 38a8 <rtems_termios_ioctl+0x2f0>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
3650: e59420cc ldr r2, [r4, #204] ; 0xcc
3654: e59f32f4 ldr r3, [pc, #756] ; 3950 <rtems_termios_ioctl+0x398>
3658: e0833282 add r3, r3, r2, lsl #5
365c: e5933018 ldr r3, [r3, #24]
3660: e3530000 cmp r3, #0
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
3664: 03a0600a moveq r6, #10
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
3668: 0a0000b1 beq 3934 <rtems_termios_ioctl+0x37c>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
366c: e1a00004 mov r0, r4
3670: e1a01005 mov r1, r5
3674: e1a0e00f mov lr, pc
3678: e12fff13 bx r3
367c: ea00009f b 3900 <rtems_termios_ioctl+0x348>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
3680: e5957008 ldr r7, [r5, #8]
3684: e284c030 add ip, r4, #48 ; 0x30
3688: e8bc000f ldm ip!, {r0, r1, r2, r3}
368c: e1a0e007 mov lr, r7
3690: e8ae000f stmia lr!, {r0, r1, r2, r3}
3694: e8bc000f ldm ip!, {r0, r1, r2, r3}
3698: e8ae000f stmia lr!, {r0, r1, r2, r3}
369c: e59c3000 ldr r3, [ip]
36a0: e58e3000 str r3, [lr]
break;
36a4: ea0000a2 b 3934 <rtems_termios_ioctl+0x37c>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
36a8: e595e008 ldr lr, [r5, #8]
36ac: e8be000f ldm lr!, {r0, r1, r2, r3}
36b0: e284c030 add ip, r4, #48 ; 0x30
36b4: e8ac000f stmia ip!, {r0, r1, r2, r3}
36b8: e8be000f ldm lr!, {r0, r1, r2, r3}
36bc: e8ac000f stmia ip!, {r0, r1, r2, r3}
36c0: e59e3000 ldr r3, [lr]
36c4: 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) &&
36c8: e59430b8 ldr r3, [r4, #184] ; 0xb8
36cc: e3130c02 tst r3, #512 ; 0x200
36d0: 0a000018 beq 3738 <rtems_termios_ioctl+0x180>
!(tty->termios.c_iflag & IXON)) {
36d4: 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) &&
36d8: e3130b01 tst r3, #1024 ; 0x400
36dc: 1a000015 bne 3738 <rtems_termios_ioctl+0x180>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
36e0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
36e4: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED
36e8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
36ec: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
36f0: e3130020 tst r3, #32 <== NOT EXECUTED
36f4: 0a00000f beq 3738 <rtems_termios_ioctl+0x180> <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
36f8: ebfffe10 bl 2f40 <arm_interrupt_disable> <== NOT EXECUTED
36fc: e1a07000 mov r7, r0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
3700: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3704: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
3708: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
370c: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
3710: e3530000 cmp r3, #0 <== NOT EXECUTED
3714: 0a000006 beq 3734 <rtems_termios_ioctl+0x17c> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
3718: 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)(
371c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
3720: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3724: e0811003 add r1, r1, r3 <== NOT EXECUTED
3728: e3a02001 mov r2, #1 <== NOT EXECUTED
372c: e1a0e00f mov lr, pc <== NOT EXECUTED
3730: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
3734: 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)) {
3738: e59430b8 ldr r3, [r4, #184] ; 0xb8
373c: e3130b01 tst r3, #1024 ; 0x400
3740: 0a000008 beq 3768 <rtems_termios_ioctl+0x1b0>
3744: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED
3748: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED
374c: 1a000005 bne 3768 <rtems_termios_ioctl+0x1b0> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
3750: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3754: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED
3758: 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);
375c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3760: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
3764: 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)) {
3768: e59430b8 ldr r3, [r4, #184] ; 0xb8
376c: e3130c01 tst r3, #256 ; 0x100
3770: 0a000010 beq 37b8 <rtems_termios_ioctl+0x200>
3774: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
3778: e3530000 cmp r3, #0 <== NOT EXECUTED
377c: ba00000d blt 37b8 <rtems_termios_ioctl+0x200> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
3780: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3784: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
3788: 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)) {
378c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3790: e3130004 tst r3, #4 <== NOT EXECUTED
3794: 0a000004 beq 37ac <rtems_termios_ioctl+0x1f4> <== NOT EXECUTED
3798: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
379c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
37a0: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
37a4: 11a0e00f movne lr, pc <== NOT EXECUTED
37a8: 112fff13 bxne r3 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
37ac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
37b0: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
37b4: 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) {
37b8: e5943038 ldr r3, [r4, #56] ; 0x38
37bc: e3530000 cmp r3, #0
tty->flow_ctrl |= FL_MDRTS;
37c0: b59430b8 ldrlt r3, [r4, #184] ; 0xb8
37c4: b3833c01 orrlt r3, r3, #256 ; 0x100
37c8: b58430b8 strlt r3, [r4, #184] ; 0xb8
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
37cc: e5943030 ldr r3, [r4, #48] ; 0x30
37d0: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
37d4: 159420b8 ldrne r2, [r4, #184] ; 0xb8
37d8: 13822b01 orrne r2, r2, #1024 ; 0x400
37dc: 158420b8 strne r2, [r4, #184] ; 0xb8
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
37e0: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
37e4: 159430b8 ldrne 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) {
37e8: e594703c ldr r7, [r4, #60] ; 0x3c
if (tty->termios.c_iflag & IXOFF) {
tty->flow_ctrl |= FL_MDXOF;
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
tty->flow_ctrl |= FL_MDXON;
37ec: 13833c02 orrne r3, r3, #512 ; 0x200
37f0: 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) {
37f4: e2177002 ands r7, r7, #2
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
37f8: 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) {
37fc: 1a000013 bne 3850 <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] *
3800: e5d48046 ldrb r8, [r4, #70] ; 0x46
rtems_clock_get_ticks_per_second() / 10;
3804: eb000519 bl 4c70 <rtems_clock_get_ticks_per_second>
3808: e3a0100a mov r1, #10
380c: e0000098 mul r0, r8, r0
3810: eb002fce bl f750 <__aeabi_uidiv>
if (tty->termios.c_cc[VTIME]) {
3814: e5d43046 ldrb r3, [r4, #70] ; 0x46
3818: e3530000 cmp r3, #0
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] *
381c: e5840054 str r0, [r4, #84] ; 0x54
3820: e5d42047 ldrb r2, [r4, #71] ; 0x47
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
3824: 0a000005 beq 3840 <rtems_termios_ioctl+0x288>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
3828: 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;
382c: e5840070 str r0, [r4, #112] ; 0x70
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
3830: 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;
3834: e584706c str r7, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
3838: e5840074 str r0, [r4, #116] ; 0x74
383c: ea000006 b 385c <rtems_termios_ioctl+0x2a4>
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
3840: e3520000 cmp r2, #0
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
3844: 03a03001 moveq r3, #1
3848: 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]) {
384c: 0a000002 beq 385c <rtems_termios_ioctl+0x2a4>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
3850: e584306c str r3, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
3854: e5843070 str r3, [r4, #112] ; 0x70
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
3858: e5843074 str r3, [r4, #116] ; 0x74
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
385c: e59430a8 ldr r3, [r4, #168] ; 0xa8
3860: e3530000 cmp r3, #0
3864: 0a000032 beq 3934 <rtems_termios_ioctl+0x37c>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
3868: e5940010 ldr r0, [r4, #16]
386c: e2841030 add r1, r4, #48 ; 0x30
3870: e1a0e00f mov lr, pc
3874: e12fff13 bx r3
3878: ea00002d b 3934 <rtems_termios_ioctl+0x37c>
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
387c: e1a00004 mov r0, r4
3880: ebfffdb2 bl 2f50 <drainOutput>
break;
3884: ea00002a b 3934 <rtems_termios_ioctl+0x37c>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
3888: e897000c ldm r7, {r2, r3}
388c: e58420d4 str r2, [r4, #212] ; 0xd4
3890: e58430d8 str r3, [r4, #216] ; 0xd8
break;
3894: ea000026 b 3934 <rtems_termios_ioctl+0x37c>
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
3898: e897000c ldm r7, {r2, r3}
389c: e58420dc str r2, [r4, #220] ; 0xdc
38a0: e58430e0 str r3, [r4, #224] ; 0xe0
break;
38a4: ea000022 b 3934 <rtems_termios_ioctl+0x37c>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
38a8: e59420cc ldr r2, [r4, #204] ; 0xcc
38ac: e59f309c ldr r3, [pc, #156] ; 3950 <rtems_termios_ioctl+0x398>
38b0: e0833282 add r3, r3, r2, lsl #5
38b4: e5933004 ldr r3, [r3, #4]
38b8: e3530000 cmp r3, #0
38bc: 0a000003 beq 38d0 <rtems_termios_ioctl+0x318>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
38c0: e1a00004 mov r0, r4
38c4: e1a0e00f mov lr, pc
38c8: e12fff13 bx r3
38cc: e1a06000 mov r6, r0
}
tty->t_line=*(int*)(args->buffer);
38d0: e5953008 ldr r3, [r5, #8]
tty->t_sc = NULL; /* ensure that no more valid data */
38d4: 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);
38d8: e5933000 ldr r3, [r3]
tty->t_sc = NULL; /* ensure that no more valid data */
38dc: e58420d0 str r2, [r4, #208] ; 0xd0
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
38e0: e59f2068 ldr r2, [pc, #104] ; 3950 <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);
38e4: 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) {
38e8: e7923283 ldr r3, [r2, r3, lsl #5]
38ec: e3530000 cmp r3, #0
38f0: 0a00000f beq 3934 <rtems_termios_ioctl+0x37c>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
38f4: e1a00004 mov r0, r4
38f8: e1a0e00f mov lr, pc
38fc: e12fff13 bx r3
3900: e1a06000 mov r6, r0
3904: ea00000a b 3934 <rtems_termios_ioctl+0x37c>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
3908: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED
390c: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( rawnc < 0 )
3910: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
3914: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
3918: e2840020 add r0, r4, #32 <== NOT EXECUTED
391c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
3920: e0401001 sub r1, r0, r1 <== NOT EXECUTED
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
3924: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
3928: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED
392c: e0813003 add r3, r1, r3 <== NOT EXECUTED
3930: e5823000 str r3, [r2] <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
3934: e5940018 ldr r0, [r4, #24]
3938: eb0006a5 bl 53d4 <rtems_semaphore_release>
args->ioctl_return = sc;
393c: e585600c str r6, [r5, #12]
return sc;
}
3940: e1a00006 mov r0, r6
3944: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00002fac <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
2fac: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
2fb0: e58d300c str r3, [sp, #12]
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
2fb4: e59f3404 ldr r3, [pc, #1028] ; 33c0 <rtems_termios_open+0x414>
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
2fb8: e1a0a001 mov sl, r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
2fbc: e3a01000 mov r1, #0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
2fc0: e1a09000 mov r9, r0
2fc4: e1a08002 mov r8, r2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
2fc8: e5930000 ldr r0, [r3]
2fcc: e1a02001 mov r2, r1
2fd0: eb0008b9 bl 52bc <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2fd4: e2506000 subs r6, r0, #0
2fd8: 1a0000ee bne 3398 <rtems_termios_open+0x3ec>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
2fdc: e59f33e0 ldr r3, [pc, #992] ; 33c4 <rtems_termios_open+0x418>
2fe0: e5937000 ldr r7, [r3]
2fe4: e1a05007 mov r5, r7
2fe8: ea000006 b 3008 <rtems_termios_open+0x5c>
if ((tty->major == major) && (tty->minor == minor))
2fec: e595300c ldr r3, [r5, #12]
2ff0: e1530009 cmp r3, r9
2ff4: 1a000002 bne 3004 <rtems_termios_open+0x58>
2ff8: e5953010 ldr r3, [r5, #16]
2ffc: e153000a cmp r3, sl
3000: 0a0000c3 beq 3314 <rtems_termios_open+0x368>
sc = rtems_semaphore_obtain(
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
3004: e5955000 ldr r5, [r5]
3008: e3550000 cmp r5, #0
300c: 1afffff6 bne 2fec <rtems_termios_open+0x40>
3010: ea0000e3 b 33a4 <rtems_termios_open+0x3f8>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
3014: e59f23ac ldr r2, [pc, #940] ; 33c8 <rtems_termios_open+0x41c>
3018: e5923000 ldr r3, [r2]
301c: e5853064 str r3, [r5, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
3020: e5950064 ldr r0, [r5, #100] ; 0x64
3024: e58d2008 str r2, [sp, #8]
3028: ebfffcfe bl 2428 <malloc>
if (tty->rawInBuf.theBuf == NULL) {
302c: e3500000 cmp r0, #0
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
3030: e1a0b000 mov fp, r0
3034: e5850058 str r0, [r5, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) {
3038: e59d2008 ldr r2, [sp, #8]
303c: 1a000006 bne 305c <rtems_termios_open+0xb0>
free(tty);
3040: e1a00005 mov r0, r5
3044: ebfffc28 bl 20ec <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
3048: e59f3370 ldr r3, [pc, #880] ; 33c0 <rtems_termios_open+0x414>
304c: e5930000 ldr r0, [r3]
3050: eb0008df bl 53d4 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
3054: e3a0601a mov r6, #26
3058: ea0000ce b 3398 <rtems_termios_open+0x3ec>
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
305c: e5923004 ldr r3, [r2, #4]
3060: e5853088 str r3, [r5, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
3064: e5950088 ldr r0, [r5, #136] ; 0x88
3068: e58d2008 str r2, [sp, #8]
306c: ebfffced bl 2428 <malloc>
if (tty->rawOutBuf.theBuf == NULL) {
3070: e3500000 cmp r0, #0
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
3074: e1a03000 mov r3, r0
3078: e585007c str r0, [r5, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) {
307c: e59d2008 ldr r2, [sp, #8]
3080: 0a000008 beq 30a8 <rtems_termios_open+0xfc>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
3084: e5920008 ldr r0, [r2, #8]
3088: e58d3008 str r3, [sp, #8]
308c: ebfffce5 bl 2428 <malloc>
if (tty->cbuf == NULL) {
3090: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
3094: e585001c str r0, [r5, #28]
if (tty->cbuf == NULL) {
3098: e59d3008 ldr r3, [sp, #8]
309c: 1a000004 bne 30b4 <rtems_termios_open+0x108>
free((void *)(tty->rawOutBuf.theBuf));
30a0: e1a00003 mov r0, r3 <== NOT EXECUTED
30a4: ebfffc10 bl 20ec <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
30a8: e1a0000b mov r0, fp
30ac: ebfffc0e bl 20ec <free>
30b0: eaffffe2 b 3040 <rtems_termios_open+0x94>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
30b4: e3a03000 mov r3, #0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
30b8: e5853004 str r3, [r5, #4]
if (rtems_termios_ttyHead != NULL)
30bc: e1570003 cmp r7, r3
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
30c0: e58530d4 str r3, [r5, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
30c4: e58530d8 str r3, [r5, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
30c8: e58530dc str r3, [r5, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
30cc: e58530e0 str r3, [r5, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
30d0: e58530e4 str r3, [r5, #228] ; 0xe4
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
30d4: e59f32e8 ldr r3, [pc, #744] ; 33c4 <rtems_termios_open+0x418>
30d8: e5834000 str r4, [r3]
if (rtems_termios_ttyTail == NULL)
30dc: e59f32e8 ldr r3, [pc, #744] ; 33cc <rtems_termios_open+0x420>
30e0: e5932000 ldr r2, [r3]
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
30e4: 15875004 strne r5, [r7, #4]
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
30e8: e5857000 str r7, [r5]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
30ec: e59f72d4 ldr r7, [pc, #724] ; 33c8 <rtems_termios_open+0x41c>
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
30f0: e3520000 cmp r2, #0
rtems_termios_ttyTail = tty;
30f4: 05834000 streq r4, [r3]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
30f8: e59f02d0 ldr r0, [pc, #720] ; 33d0 <rtems_termios_open+0x424>
rtems_build_name ('T', 'R', 'i', c),
30fc: e5d7300c ldrb r3, [r7, #12]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
3100: e2842014 add r2, r4, #20
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
3104: e584a010 str sl, [r4, #16]
tty->major = major;
3108: e584900c str r9, [r4, #12]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
310c: e1830000 orr r0, r3, r0
3110: e58d2000 str r2, [sp]
3114: e3a03000 mov r3, #0
3118: e3a01001 mov r1, #1
311c: e3a02054 mov r2, #84 ; 0x54
3120: eb0007d3 bl 5074 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'i', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
3124: e2503000 subs r3, r0, #0
3128: 1a000096 bne 3388 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'o', c),
312c: e5d7200c ldrb r2, [r7, #12]
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
3130: e59f029c ldr r0, [pc, #668] ; 33d4 <rtems_termios_open+0x428>
3134: e2841018 add r1, r4, #24
3138: e58d1000 str r1, [sp]
313c: e1820000 orr r0, r2, r0
3140: e3a01001 mov r1, #1
3144: e3a02054 mov r2, #84 ; 0x54
3148: eb0007c9 bl 5074 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'o', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
314c: e2501000 subs r1, r0, #0
3150: 1a00008c bne 3388 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'x', c),
3154: e5d7300c ldrb r3, [r7, #12]
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
3158: e59f0278 ldr r0, [pc, #632] ; 33d8 <rtems_termios_open+0x42c>
315c: e284208c add r2, r4, #140 ; 0x8c
3160: e58d2000 str r2, [sp]
3164: e1830000 orr r0, r3, r0
3168: e3a02020 mov r2, #32
316c: e1a03001 mov r3, r1
3170: eb0007bf bl 5074 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
3174: e250b000 subs fp, r0, #0
3178: 1a000082 bne 3388 <rtems_termios_open+0x3dc>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
317c: e59de00c ldr lr, [sp, #12]
3180: e8be000f ldm lr!, {r0, r1, r2, r3}
3184: e284c098 add ip, r4, #152 ; 0x98
3188: e8ac000f stmia ip!, {r0, r1, r2, r3}
318c: e89e000f ldm lr, {r0, r1, r2, r3}
3190: e88c000f stm ip, {r0, r1, r2, r3}
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
3194: e59430b4 ldr r3, [r4, #180] ; 0xb4
3198: e3530002 cmp r3, #2
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
319c: e584b094 str fp, [r4, #148] ; 0x94
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
31a0: 1a000017 bne 3204 <rtems_termios_open+0x258>
sc = rtems_task_create (
rtems_build_name ('T', 'x', 'T', c),
31a4: e5d7300c ldrb r3, [r7, #12]
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
31a8: e59f022c ldr r0, [pc, #556] ; 33dc <rtems_termios_open+0x430>
31ac: e28420c8 add r2, r4, #200 ; 0xc8
31b0: e58d2004 str r2, [sp, #4]
31b4: e1830000 orr r0, r3, r0
31b8: e3a02b01 mov r2, #1024 ; 0x400
31bc: e3a0100a mov r1, #10
31c0: e3a03c05 mov r3, #1280 ; 0x500
31c4: e58db000 str fp, [sp]
31c8: eb0008a8 bl 5470 <rtems_task_create>
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
31cc: e2502000 subs r2, r0, #0
31d0: 1a00006c bne 3388 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
rtems_build_name ('R', 'x', 'T', c),
31d4: e5d7300c ldrb r3, [r7, #12]
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
31d8: e59f0200 ldr r0, [pc, #512] ; 33e0 <rtems_termios_open+0x434>
31dc: e58d2000 str r2, [sp]
31e0: e28420c4 add r2, r4, #196 ; 0xc4
31e4: e58d2004 str r2, [sp, #4]
31e8: e1830000 orr r0, r3, r0
31ec: e3a01009 mov r1, #9
31f0: e3a02b01 mov r2, #1024 ; 0x400
31f4: e3a03c05 mov r3, #1280 ; 0x500
31f8: eb00089c bl 5470 <rtems_task_create>
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
31fc: e3500000 cmp r0, #0
3200: 1a000060 bne 3388 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
3204: e59430a0 ldr r3, [r4, #160] ; 0xa0
3208: e3530000 cmp r3, #0
320c: 0a000002 beq 321c <rtems_termios_open+0x270>
3210: e59430b4 ldr r3, [r4, #180] ; 0xb4
3214: e3530002 cmp r3, #2
3218: 1a00000b bne 324c <rtems_termios_open+0x2a0>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'r', c),
321c: e59f31a4 ldr r3, [pc, #420] ; 33c8 <rtems_termios_open+0x41c>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
3220: e59f01bc ldr r0, [pc, #444] ; 33e4 <rtems_termios_open+0x438>
rtems_build_name ('T', 'R', 'r', c),
3224: e5d3300c ldrb r3, [r3, #12]
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
3228: e2842068 add r2, r4, #104 ; 0x68
322c: e3a01000 mov r1, #0
3230: e58d2000 str r2, [sp]
3234: e1830000 orr r0, r3, r0
3238: e3a02024 mov r2, #36 ; 0x24
323c: e1a03001 mov r3, r1
3240: eb00078b bl 5074 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
3244: e3500000 cmp r0, #0
3248: 1a00004e bne 3388 <rtems_termios_open+0x3dc>
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
324c: e59f3194 ldr r3, [pc, #404] ; 33e8 <rtems_termios_open+0x43c>
3250: e5843030 str r3, [r4, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
3254: e59f3190 ldr r3, [pc, #400] ; 33ec <rtems_termios_open+0x440>
3258: e5843034 str r3, [r4, #52] ; 0x34
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
325c: e59f318c ldr r3, [pc, #396] ; 33f0 <rtems_termios_open+0x444>
3260: e5843038 str r3, [r4, #56] ; 0x38
tty->termios.c_lflag =
3264: e59f3188 ldr r3, [pc, #392] ; 33f4 <rtems_termios_open+0x448>
3268: e584303c str r3, [r4, #60] ; 0x3c
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
326c: e3a03003 mov r3, #3
3270: e5c43041 strb r3, [r4, #65] ; 0x41
tty->termios.c_cc[VQUIT] = '\034';
3274: e2833019 add r3, r3, #25
3278: e5c43042 strb r3, [r4, #66] ; 0x42
tty->termios.c_cc[VERASE] = '\177';
327c: e2833063 add r3, r3, #99 ; 0x63
3280: e5c43043 strb r3, [r4, #67] ; 0x43
tty->termios.c_cc[VKILL] = '\025';
3284: e3a03015 mov r3, #21
3288: e5c43044 strb r3, [r4, #68] ; 0x44
tty->termios.c_cc[VEOF] = '\004';
328c: e3a03004 mov r3, #4
3290: e5c43045 strb r3, [r4, #69] ; 0x45
tty->termios.c_cc[VEOL] = '\000';
3294: e3a03000 mov r3, #0
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
3298: e58430b8 str r3, [r4, #184] ; 0xb8
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
329c: e5c4304c strb r3, [r4, #76] ; 0x4c
tty->termios.c_cc[VEOL2] = '\000';
32a0: e5c43051 strb r3, [r4, #81] ; 0x51
tty->termios.c_cc[VSTART] = '\021';
32a4: e3a02011 mov r2, #17
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
32a8: e5943064 ldr r3, [r4, #100] ; 0x64
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
32ac: e5c42049 strb r2, [r4, #73] ; 0x49
tty->termios.c_cc[VSTOP] = '\023';
32b0: e2822002 add r2, r2, #2
32b4: e5c4204a strb r2, [r4, #74] ; 0x4a
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
32b8: e1a030a3 lsr r3, r3, #1
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
32bc: e2822007 add r2, r2, #7
32c0: e5c4204b strb r2, [r4, #75] ; 0x4b
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
32c4: e58430bc str r3, [r4, #188] ; 0xbc
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
32c8: e3a02012 mov r2, #18
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
32cc: e5943064 ldr r3, [r4, #100] ; 0x64
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
32d0: e5c4204d strb r2, [r4, #77] ; 0x4d
tty->termios.c_cc[VDISCARD] = '\017';
32d4: e3a0200f mov r2, #15
32d8: e5c4204e strb r2, [r4, #78] ; 0x4e
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
32dc: e0833083 add r3, r3, r3, lsl #1
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
32e0: e2822008 add r2, r2, #8
32e4: e5c4204f strb r2, [r4, #79] ; 0x4f
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
32e8: e1a03123 lsr r3, r3, #2
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
32ec: e3a02016 mov r2, #22
32f0: e5c42050 strb r2, [r4, #80] ; 0x50
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
32f4: e58430c0 str r3, [r4, #192] ; 0xc0
/*
* Bump name characer
*/
if (c++ == 'z')
32f8: e59f30c8 ldr r3, [pc, #200] ; 33c8 <rtems_termios_open+0x41c>
32fc: e5d3200c ldrb r2, [r3, #12]
3300: e352007a cmp r2, #122 ; 0x7a
3304: e2821001 add r1, r2, #1
c = 'a';
3308: 03a02061 moveq r2, #97 ; 0x61
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
330c: e5c3100c strb r1, [r3, #12]
c = 'a';
3310: 05c3200c strbeq r2, [r3, #12]
}
args->iop->data1 = tty;
3314: e5983000 ldr r3, [r8]
3318: e5835034 str r5, [r3, #52] ; 0x34
if (!tty->refcount++) {
331c: e5953008 ldr r3, [r5, #8]
3320: e2832001 add r2, r3, #1
3324: e3530000 cmp r3, #0
3328: e5852008 str r2, [r5, #8]
332c: 1a000016 bne 338c <rtems_termios_open+0x3e0>
if (tty->device.firstOpen)
3330: e5953098 ldr r3, [r5, #152] ; 0x98
3334: e3530000 cmp r3, #0
(*tty->device.firstOpen)(major, minor, arg);
3338: 11a00009 movne r0, r9
333c: 11a0100a movne r1, sl
3340: 11a02008 movne r2, r8
3344: 11a0e00f movne lr, pc
3348: 112fff13 bxne r3
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
334c: e59530b4 ldr r3, [r5, #180] ; 0xb4
3350: e3530002 cmp r3, #2
3354: 1a00000c bne 338c <rtems_termios_open+0x3e0>
sc = rtems_task_start(
3358: e59500c4 ldr r0, [r5, #196] ; 0xc4
335c: e59f1094 ldr r1, [pc, #148] ; 33f8 <rtems_termios_open+0x44c>
3360: e1a02005 mov r2, r5
3364: eb0008e9 bl 5710 <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
3368: e3500000 cmp r0, #0
336c: 1a000005 bne 3388 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
3370: e59500c8 ldr r0, [r5, #200] ; 0xc8
3374: e59f1080 ldr r1, [pc, #128] ; 33fc <rtems_termios_open+0x450>
3378: e1a02005 mov r2, r5
337c: eb0008e3 bl 5710 <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
3380: e3500000 cmp r0, #0
3384: 0a000000 beq 338c <rtems_termios_open+0x3e0>
rtems_fatal_error_occurred (sc);
3388: eb000966 bl 5928 <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
338c: e59f302c ldr r3, [pc, #44] ; 33c0 <rtems_termios_open+0x414>
3390: e5930000 ldr r0, [r3]
3394: eb00080e bl 53d4 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
3398: e1a00006 mov r0, r6
339c: e28dd010 add sp, sp, #16
33a0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
33a4: e3a00001 mov r0, #1
33a8: e3a010e8 mov r1, #232 ; 0xe8
33ac: ebfffaea bl 1f5c <calloc>
if (tty == NULL) {
33b0: e2504000 subs r4, r0, #0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
33b4: e1a05000 mov r5, r0
if (tty == NULL) {
33b8: 1affff15 bne 3014 <rtems_termios_open+0x68>
33bc: eaffff21 b 3048 <rtems_termios_open+0x9c>
0000409c <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;
409c: e5903000 ldr r3, [r0]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
40a0: 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;
40a4: 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);
40a8: 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;
40ac: e5908010 ldr r8, [r0, #16]
char *buffer = args->buffer;
40b0: e590b00c ldr fp, [r0, #12]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
40b4: 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);
40b8: e1a02001 mov r2, r1
40bc: e5940014 ldr r0, [r4, #20]
40c0: eb00047d bl 52bc <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
40c4: e2507000 subs r7, r0, #0
40c8: 1a0000be bne 43c8 <rtems_termios_read+0x32c>
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
40cc: e59420cc ldr r2, [r4, #204] ; 0xcc
40d0: e59f32f8 ldr r3, [pc, #760] ; 43d0 <rtems_termios_read+0x334>
40d4: e0833282 add r3, r3, r2, lsl #5
40d8: e5933008 ldr r3, [r3, #8]
40dc: e3530000 cmp r3, #0
40e0: 0a000005 beq 40fc <rtems_termios_read+0x60>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
40e4: e1a00004 mov r0, r4
40e8: e1a01005 mov r1, r5
40ec: e1a0e00f mov lr, pc
40f0: e12fff13 bx r3
40f4: e1a07000 mov r7, r0
40f8: ea0000ae b 43b8 <rtems_termios_read+0x31c>
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
40fc: e5942024 ldr r2, [r4, #36] ; 0x24
4100: e5943020 ldr r3, [r4, #32]
4104: e1520003 cmp r2, r3
4108: 1a0000a1 bne 4394 <rtems_termios_read+0x2f8>
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
410c: e5943028 ldr r3, [r4, #40] ; 0x28
4110: e584302c str r3, [r4, #44] ; 0x2c
if (tty->device.pollRead != NULL &&
4114: e59430a0 ldr r3, [r4, #160] ; 0xa0
4118: e3530000 cmp r3, #0
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
411c: e5847020 str r7, [r4, #32]
4120: e5847024 str r7, [r4, #36] ; 0x24
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
4124: 0a00003b beq 4218 <rtems_termios_read+0x17c>
4128: e59430b4 ldr r3, [r4, #180] ; 0xb4
412c: e3530000 cmp r3, #0
4130: 1a000038 bne 4218 <rtems_termios_read+0x17c>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
4134: e594303c ldr r3, [r4, #60] ; 0x3c
4138: e3130002 tst r3, #2
413c: 0a00000d beq 4178 <rtems_termios_read+0xdc>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
4140: e5940010 ldr r0, [r4, #16]
4144: e1a0e00f mov lr, pc
4148: e594f0a0 ldr pc, [r4, #160] ; 0xa0
if (n < 0) {
414c: e3500000 cmp r0, #0
4150: aa000002 bge 4160 <rtems_termios_read+0xc4>
rtems_task_wake_after (1);
4154: e3a00001 mov r0, #1
4158: eb000584 bl 5770 <rtems_task_wake_after>
415c: eafffff7 b 4140 <rtems_termios_read+0xa4>
} else {
if (siproc (n, tty))
4160: e20000ff and r0, r0, #255 ; 0xff
4164: e1a01004 mov r1, r4
4168: ebffff86 bl 3f88 <siproc>
416c: e3500000 cmp r0, #0
4170: 0afffff2 beq 4140 <rtems_termios_read+0xa4>
4174: ea000086 b 4394 <rtems_termios_read+0x2f8>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
4178: eb0002c4 bl 4c90 <rtems_clock_get_ticks_since_boot>
417c: e1a06000 mov r6, r0
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
4180: e5940010 ldr r0, [r4, #16]
4184: e1a0e00f mov lr, pc
4188: e594f0a0 ldr pc, [r4, #160] ; 0xa0
if (n < 0) {
418c: e3500000 cmp r0, #0
4190: aa000013 bge 41e4 <rtems_termios_read+0x148>
if (tty->termios.c_cc[VMIN]) {
4194: e5d43047 ldrb r3, [r4, #71] ; 0x47
4198: e3530000 cmp r3, #0
419c: e5d43046 ldrb r3, [r4, #70] ; 0x46
41a0: 0a000005 beq 41bc <rtems_termios_read+0x120>
if (tty->termios.c_cc[VTIME] && tty->ccount) {
41a4: e3530000 cmp r3, #0
41a8: 0a00000a beq 41d8 <rtems_termios_read+0x13c>
41ac: e5943020 ldr r3, [r4, #32]
41b0: e3530000 cmp r3, #0
41b4: 0a000007 beq 41d8 <rtems_termios_read+0x13c>
41b8: ea000001 b 41c4 <rtems_termios_read+0x128>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
41bc: e3530000 cmp r3, #0 <== NOT EXECUTED
41c0: 0a000073 beq 4394 <rtems_termios_read+0x2f8> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
41c4: eb0002b1 bl 4c90 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
41c8: e5943054 ldr r3, [r4, #84] ; 0x54
41cc: e0660000 rsb r0, r6, r0
41d0: e1500003 cmp r0, r3
41d4: 8a00006e bhi 4394 <rtems_termios_read+0x2f8>
break;
}
}
rtems_task_wake_after (1);
41d8: e3a00001 mov r0, #1
41dc: eb000563 bl 5770 <rtems_task_wake_after>
41e0: eaffffe6 b 4180 <rtems_termios_read+0xe4>
} else {
siproc (n, tty);
41e4: e20000ff and r0, r0, #255 ; 0xff
41e8: e1a01004 mov r1, r4
41ec: ebffff65 bl 3f88 <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
41f0: e5d43047 ldrb r3, [r4, #71] ; 0x47
41f4: e5942020 ldr r2, [r4, #32]
41f8: e1520003 cmp r2, r3
41fc: aa000064 bge 4394 <rtems_termios_read+0x2f8>
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
4200: e3530000 cmp r3, #0
4204: 0affffdd beq 4180 <rtems_termios_read+0xe4>
4208: e5d43046 ldrb r3, [r4, #70] ; 0x46
420c: e3530000 cmp r3, #0
4210: 0affffda beq 4180 <rtems_termios_read+0xe4>
4214: eaffffd7 b 4178 <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)(
4218: 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;
421c: e594a074 ldr sl, [r4, #116] ; 0x74
rtems_status_code sc;
int wait = (int)1;
4220: e3a06001 mov r6, #1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
4224: e59f91a8 ldr r9, [pc, #424] ; 43d4 <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)(
4228: e58d2000 str r2, [sp]
422c: ea000040 b 4334 <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;
4230: e594005c ldr r0, [r4, #92] ; 0x5c
4234: e5941064 ldr r1, [r4, #100] ; 0x64
4238: e2800001 add r0, r0, #1
423c: eb002ddb bl f9b0 <__umodsi3>
c = tty->rawInBuf.theBuf[newHead];
4240: e5943058 ldr r3, [r4, #88] ; 0x58
4244: e7d3a000 ldrb sl, [r3, r0]
tty->rawInBuf.Head = newHead;
4248: e584005c str r0, [r4, #92] ; 0x5c
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
424c: e5943060 ldr r3, [r4, #96] ; 0x60
4250: e5942064 ldr r2, [r4, #100] ; 0x64
4254: e0823003 add r3, r2, r3
% tty->rawInBuf.Size)
4258: e0600003 rsb r0, r0, r3
425c: e5941064 ldr r1, [r4, #100] ; 0x64
4260: eb002dd2 bl f9b0 <__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)
4264: e59430bc ldr r3, [r4, #188] ; 0xbc
4268: e1500003 cmp r0, r3
426c: 2a00001f bcs 42f0 <rtems_termios_read+0x254>
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
4270: e59430b8 ldr r3, [r4, #184] ; 0xb8
4274: e3c33001 bic r3, r3, #1
4278: e58430b8 str r3, [r4, #184] ; 0xb8
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
427c: e59f3154 ldr r3, [pc, #340] ; 43d8 <rtems_termios_read+0x33c>
4280: e59420b8 ldr r2, [r4, #184] ; 0xb8
4284: e0023003 and r3, r2, r3
4288: e59f2148 ldr r2, [pc, #328] ; 43d8 <rtems_termios_read+0x33c>
428c: e1530002 cmp r3, r2
4290: 1a00000b bne 42c4 <rtems_termios_read+0x228>
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
4294: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
4298: e3530000 cmp r3, #0 <== NOT EXECUTED
429c: 0a000002 beq 42ac <rtems_termios_read+0x210> <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
42a0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
42a4: e3130020 tst r3, #32 <== NOT EXECUTED
42a8: 0a000005 beq 42c4 <rtems_termios_read+0x228> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
42ac: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
42b0: e59d1000 ldr r1, [sp] <== NOT EXECUTED
42b4: e3a02001 mov r2, #1 <== NOT EXECUTED
42b8: e1a0e00f mov lr, pc <== NOT EXECUTED
42bc: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
42c0: ea00000a b 42f0 <rtems_termios_read+0x254> <== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
42c4: e59430b8 ldr r3, [r4, #184] ; 0xb8
42c8: e3130c01 tst r3, #256 ; 0x100
42cc: 0a000007 beq 42f0 <rtems_termios_read+0x254>
tty->flow_ctrl &= ~FL_IRTSOFF;
42d0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
42d4: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
42d8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
42dc: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
42e0: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
42e4: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
42e8: 11a0e00f movne lr, pc <== NOT EXECUTED
42ec: 112fff13 bxne r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
42f0: e594303c ldr r3, [r4, #60] ; 0x3c
42f4: e3130002 tst r3, #2
42f8: 0a000005 beq 4314 <rtems_termios_read+0x278>
if (siproc (c, tty))
42fc: e1a0000a mov r0, sl
4300: e1a01004 mov r1, r4
4304: ebffff1f bl 3f88 <siproc>
wait = 0;
4308: e3500000 cmp r0, #0
430c: 13a06000 movne r6, #0
4310: ea000006 b 4330 <rtems_termios_read+0x294>
} else {
siproc (c, tty);
4314: e1a0000a mov r0, sl <== NOT EXECUTED
4318: e1a01004 mov r1, r4 <== NOT EXECUTED
431c: ebffff19 bl 3f88 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
4320: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
4324: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
wait = 0;
4328: e1520003 cmp r2, r3 <== NOT EXECUTED
432c: a3a06000 movge r6, #0 <== NOT EXECUTED
}
timeout = tty->rawInBufSemaphoreTimeout;
4330: e594a070 ldr sl, [r4, #112] ; 0x70
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
4334: e594205c ldr r2, [r4, #92] ; 0x5c
4338: e5943060 ldr r3, [r4, #96] ; 0x60
433c: e1520003 cmp r2, r3
4340: 0a000004 beq 4358 <rtems_termios_read+0x2bc>
(tty->ccount < (CBUFSIZE-1))) {
4344: e5993008 ldr r3, [r9, #8]
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
4348: e5942020 ldr r2, [r4, #32]
(tty->ccount < (CBUFSIZE-1))) {
434c: e2433001 sub r3, r3, #1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
4350: e1520003 cmp r2, r3
4354: baffffb5 blt 4230 <rtems_termios_read+0x194>
}
/*
* Wait for characters
*/
if ( wait ) {
4358: e3560000 cmp r6, #0
435c: 0a00000c beq 4394 <rtems_termios_read+0x2f8>
sc = rtems_semaphore_obtain(
4360: e2840068 add r0, r4, #104 ; 0x68
4364: e8900003 ldm r0, {r0, r1}
4368: e1a0200a mov r2, sl
436c: eb0003d2 bl 52bc <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
4370: e3500000 cmp r0, #0
4374: 0affffee beq 4334 <rtems_termios_read+0x298>
4378: ea000005 b 4394 <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++];
437c: e594201c ldr r2, [r4, #28]
4380: e7d22003 ldrb r2, [r2, r3]
4384: e2833001 add r3, r3, #1
4388: e4cb2001 strb r2, [fp], #1
438c: e5843024 str r3, [r4, #36] ; 0x24
count--;
4390: e2488001 sub r8, r8, #1
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
4394: e3580000 cmp r8, #0
4398: 0a000003 beq 43ac <rtems_termios_read+0x310>
439c: e2842020 add r2, r4, #32
43a0: e892000c ldm r2, {r2, r3}
43a4: e1530002 cmp r3, r2
43a8: bafffff3 blt 437c <rtems_termios_read+0x2e0>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
43ac: e5953010 ldr r3, [r5, #16]
43b0: e0688003 rsb r8, r8, r3
43b4: e5858018 str r8, [r5, #24]
tty->tty_rcvwakeup = 0;
43b8: e3a03000 mov r3, #0
43bc: e58430e4 str r3, [r4, #228] ; 0xe4
rtems_semaphore_release (tty->isem);
43c0: e5940014 ldr r0, [r4, #20]
43c4: eb000402 bl 53d4 <rtems_semaphore_release>
return sc;
}
43c8: e1a00007 mov r0, r7
43cc: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
000046ec <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))
46ec: e59020b8 ldr r2, [r0, #184] ; 0xb8
46f0: e59f31b8 ldr r3, [pc, #440] ; 48b0 <rtems_termios_refill_transmitter+0x1c4>
46f4: e0023003 and r3, r2, r3
46f8: e59f21b4 ldr r2, [pc, #436] ; 48b4 <rtems_termios_refill_transmitter+0x1c8>
46fc: e1530002 cmp r3, r2
* 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)
{
4700: e92d4070 push {r4, r5, r6, lr}
4704: 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))
4708: 1a00000c bne 4740 <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);
470c: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED
4710: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED
4714: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
4718: e1a0e00f mov lr, pc <== NOT EXECUTED
471c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
rtems_interrupt_disable(level);
4720: ebfffa06 bl 2f40 <arm_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
4724: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED
4728: e2433001 sub r3, r3, #1 <== NOT EXECUTED
472c: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
4730: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
4734: e3833002 orr r3, r3, #2 <== NOT EXECUTED
4738: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
rtems_interrupt_enable(level);
473c: ea00000f b 4780 <rtems_termios_refill_transmitter+0x94> <== NOT EXECUTED
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
4740: e59030b8 ldr r3, [r0, #184] ; 0xb8
4744: e2033003 and r3, r3, #3
4748: e3530002 cmp r3, #2
474c: 1a00000e bne 478c <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);
4750: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED
4754: e3a02001 mov r2, #1 <== NOT EXECUTED
4758: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
475c: e1a0e00f mov lr, pc <== NOT EXECUTED
4760: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
rtems_interrupt_disable(level);
4764: ebfff9f5 bl 2f40 <arm_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
4768: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED
476c: e2433001 sub r3, r3, #1 <== NOT EXECUTED
4770: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
4774: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
4778: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
477c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
4780: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
4784: e3a05001 mov r5, #1 <== NOT EXECUTED
4788: ea000046 b 48a8 <rtems_termios_refill_transmitter+0x1bc> <== NOT EXECUTED
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
478c: e5902080 ldr r2, [r0, #128] ; 0x80
4790: e5903084 ldr r3, [r0, #132] ; 0x84
4794: e1520003 cmp r2, r3
4798: 1a000005 bne 47b4 <rtems_termios_refill_transmitter+0xc8>
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
479c: e5903094 ldr r3, [r0, #148] ; 0x94
47a0: e3530002 cmp r3, #2
47a4: 1a00003e bne 48a4 <rtems_termios_refill_transmitter+0x1b8>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
47a8: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED
47ac: eb000308 bl 53d4 <rtems_semaphore_release> <== NOT EXECUTED
47b0: ea00003b b 48a4 <rtems_termios_refill_transmitter+0x1b8> <== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
47b4: ebfff9e1 bl 2f40 <arm_interrupt_disable>
len = tty->t_dqlen;
tty->t_dqlen = 0;
47b8: e3a03000 mov r3, #0
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
47bc: e5942090 ldr r2, [r4, #144] ; 0x90
tty->t_dqlen = 0;
47c0: e5843090 str r3, [r4, #144] ; 0x90
47c4: e129f000 msr CPSR_fc, r0
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
47c8: e5943084 ldr r3, [r4, #132] ; 0x84
47cc: e5941088 ldr r1, [r4, #136] ; 0x88
47d0: e0820003 add r0, r2, r3
47d4: eb002c75 bl f9b0 <__umodsi3>
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
47d8: e5943094 ldr r3, [r4, #148] ; 0x94
47dc: e3530002 cmp r3, #2
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
47e0: e1a06000 mov r6, r0
tty->rawOutBuf.Tail = newTail;
47e4: e5840084 str r0, [r4, #132] ; 0x84
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
47e8: 0594008c ldreq r0, [r4, #140] ; 0x8c
47ec: 0b0002f8 bleq 53d4 <rtems_semaphore_release>
}
if (newTail == tty->rawOutBuf.Head) {
47f0: e5943080 ldr r3, [r4, #128] ; 0x80
47f4: e1560003 cmp r6, r3
47f8: 1a00000a bne 4828 <rtems_termios_refill_transmitter+0x13c>
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
47fc: e59430d4 ldr r3, [r4, #212] ; 0xd4
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
4800: e3a05000 mov r5, #0
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
4804: e1530005 cmp r3, r5
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
4808: e5845094 str r5, [r4, #148] ; 0x94
nToSend = 0;
480c: 01a05003 moveq r5, r3
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
4810: 0a000021 beq 489c <rtems_termios_refill_transmitter+0x1b0>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
4814: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
4818: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED
481c: e1a0e00f mov lr, pc <== NOT EXECUTED
4820: e12fff13 bx r3 <== NOT EXECUTED
4824: ea00001c b 489c <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))
4828: e59430b8 ldr r3, [r4, #184] ; 0xb8
482c: e2033e21 and r3, r3, #528 ; 0x210
4830: e3530e21 cmp r3, #528 ; 0x210
4834: 1a000008 bne 485c <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);
4838: ebfff9c0 bl 2f40 <arm_interrupt_disable> <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
483c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
4840: e3833020 orr r3, r3, #32 <== NOT EXECUTED
4844: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
4848: e3a03001 mov r3, #1 <== NOT EXECUTED
484c: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
4850: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 0;
4854: e3a05000 mov r5, #0 <== NOT EXECUTED
4858: ea00000f b 489c <rtems_termios_refill_transmitter+0x1b0> <== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
485c: e5943080 ldr r3, [r4, #128] ; 0x80
4860: e1560003 cmp r6, r3
nToSend = tty->rawOutBuf.Size - newTail;
4864: 85945088 ldrhi r5, [r4, #136] ; 0x88
else
nToSend = tty->rawOutBuf.Head - newTail;
4868: 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)) {
486c: 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;
4870: 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)) {
4874: e3130c06 tst r3, #1536 ; 0x600
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
4878: e594107c ldr r1, [r4, #124] ; 0x7c
nToSend = tty->rawOutBuf.Head - newTail;
/* 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)) {
nToSend = 1;
487c: 13a05001 movne r5, #1
}
tty->rawOutBufState = rob_busy; /*apm*/
4880: e3a03001 mov r3, #1
4884: e5843094 str r3, [r4, #148] ; 0x94
(*tty->device.write)(
4888: e5940010 ldr r0, [r4, #16]
488c: e0811006 add r1, r1, r6
4890: e1a02005 mov r2, r5
4894: e1a0e00f mov lr, pc
4898: e594f0a4 ldr pc, [r4, #164] ; 0xa4
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
489c: e5846084 str r6, [r4, #132] ; 0x84
48a0: ea000000 b 48a8 <rtems_termios_refill_transmitter+0x1bc>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
48a4: e3a05000 mov r5, #0
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
48a8: e1a00005 mov r0, r5
48ac: e8bd8070 pop {r4, r5, r6, pc}
00003fe4 <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;
3fe4: e5903000 ldr r3, [r0]
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
3fe8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3fec: e5935034 ldr r5, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3ff0: e3a01000 mov r1, #0
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
3ff4: 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);
3ff8: e1a02001 mov r2, r1
3ffc: e5950018 ldr r0, [r5, #24]
4000: eb0004ad bl 52bc <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
4004: e2506000 subs r6, r0, #0
4008: 1a000020 bne 4090 <rtems_termios_write+0xac>
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
400c: e59520cc ldr r2, [r5, #204] ; 0xcc
4010: e59f3080 ldr r3, [pc, #128] ; 4098 <rtems_termios_write+0xb4>
4014: e0833282 add r3, r3, r2, lsl #5
4018: e593300c ldr r3, [r3, #12]
401c: e3530000 cmp r3, #0
4020: 0a000005 beq 403c <rtems_termios_write+0x58>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
4024: e1a00005 mov r0, r5
4028: e1a01004 mov r1, r4
402c: e1a0e00f mov lr, pc
4030: e12fff13 bx r3
4034: e1a06000 mov r6, r0
4038: ea000012 b 4088 <rtems_termios_write+0xa4>
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
403c: e5953034 ldr r3, [r5, #52] ; 0x34
4040: e3130001 tst r3, #1
uint32_t count = args->count;
4044: 15947010 ldrne r7, [r4, #16]
char *buffer = args->buffer;
4048: 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) {
404c: 1a000004 bne 4064 <rtems_termios_write+0x80>
4050: ea000006 b 4070 <rtems_termios_write+0x8c> <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
4054: e4d80001 ldrb r0, [r8], #1
4058: e1a01005 mov r1, r5
405c: ebfffe7c bl 3a54 <oproc>
4060: e2477001 sub r7, r7, #1
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
4064: e3570000 cmp r7, #0
4068: 1afffff9 bne 4054 <rtems_termios_write+0x70>
406c: ea000003 b 4080 <rtems_termios_write+0x9c>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
4070: e284000c add r0, r4, #12 <== NOT EXECUTED
4074: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
4078: e1a02005 mov r2, r5 <== NOT EXECUTED
407c: ebfffe34 bl 3954 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
4080: e5943010 ldr r3, [r4, #16]
4084: e5843018 str r3, [r4, #24]
}
rtems_semaphore_release (tty->osem);
4088: e5950018 ldr r0, [r5, #24]
408c: eb0004d0 bl 53d4 <rtems_semaphore_release>
return sc;
}
4090: e1a00006 mov r0, r6
4094: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000661c <rtems_verror>:
{
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
661c: e3100202 tst r0, #536870912 ; 0x20000000
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
6620: e92d41f0 push {r4, r5, r6, r7, r8, lr}
6624: e1a05000 mov r5, r0
6628: e1a08001 mov r8, r1
662c: e1a04002 mov r4, r2
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
6630: 0a00000e beq 6670 <rtems_verror+0x54>
if (rtems_panic_in_progress++)
6634: e59f212c ldr r2, [pc, #300] ; 6768 <rtems_verror+0x14c>
6638: e5923000 ldr r3, [r2]
663c: e2831001 add r1, r3, #1
6640: e3530000 cmp r3, #0
6644: e5821000 str r1, [r2]
6648: 0a000003 beq 665c <rtems_verror+0x40>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
664c: e59f3118 ldr r3, [pc, #280] ; 676c <rtems_verror+0x150> <== NOT EXECUTED
6650: e5932000 ldr r2, [r3] <== NOT EXECUTED
6654: e2822001 add r2, r2, #1 <== NOT EXECUTED
6658: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
665c: e59f3104 ldr r3, [pc, #260] ; 6768 <rtems_verror+0x14c>
6660: e5933000 ldr r3, [r3]
6664: e3530002 cmp r3, #2
return 0;
6668: 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)
666c: ca00003b bgt 6760 <rtems_verror+0x144>
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
6670: e59f30f8 ldr r3, [pc, #248] ; 6770 <rtems_verror+0x154>
6674: e5933000 ldr r3, [r3]
6678: e5930008 ldr r0, [r3, #8]
667c: eb002bd9 bl 115e8 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
6680: e3c56207 bic r6, r5, #1879048192 ; 0x70000000
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
6684: e2155101 ands r5, r5, #1073741824 ; 0x40000000
6688: 0a000001 beq 6694 <rtems_verror+0x78>
local_errno = errno;
668c: eb002ade bl 1120c <__errno>
6690: 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);
6694: e59f70d4 ldr r7, [pc, #212] ; 6770 <rtems_verror+0x154>
6698: e5973000 ldr r3, [r7]
669c: e1a02004 mov r2, r4
66a0: e593000c ldr r0, [r3, #12]
66a4: e1a01008 mov r1, r8
66a8: eb00443b bl 1779c <vfprintf>
if (status)
66ac: 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);
66b0: e1a04000 mov r4, r0
if (status)
66b4: 0a000008 beq 66dc <rtems_verror+0xc0>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
66b8: e5973000 ldr r3, [r7]
66bc: e1a00006 mov r0, r6
66c0: e593700c ldr r7, [r3, #12]
66c4: ebffffd0 bl 660c <rtems_status_text>
66c8: e59f10a4 ldr r1, [pc, #164] ; 6774 <rtems_verror+0x158>
66cc: e1a02000 mov r2, r0
66d0: e1a00007 mov r0, r7
66d4: eb002ca9 bl 11980 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
66d8: e0844000 add r4, r4, r0
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
66dc: e3550000 cmp r5, #0
66e0: 0a000015 beq 673c <rtems_verror+0x120>
if ((local_errno > 0) && *strerror(local_errno))
66e4: da00000d ble 6720 <rtems_verror+0x104>
66e8: e1a00005 mov r0, r5
66ec: eb002fa6 bl 1258c <strerror>
66f0: e5d03000 ldrb r3, [r0]
66f4: e3530000 cmp r3, #0
66f8: 0a000008 beq 6720 <rtems_verror+0x104>
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
66fc: e59f306c ldr r3, [pc, #108] ; 6770 <rtems_verror+0x154>
6700: e5933000 ldr r3, [r3]
6704: e1a00005 mov r0, r5
6708: e593600c ldr r6, [r3, #12]
670c: eb002f9e bl 1258c <strerror>
6710: e59f1060 ldr r1, [pc, #96] ; 6778 <rtems_verror+0x15c>
6714: e1a02000 mov r2, r0
6718: e1a00006 mov r0, r6
671c: ea000004 b 6734 <rtems_verror+0x118>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
6720: e59f3048 ldr r3, [pc, #72] ; 6770 <rtems_verror+0x154>
6724: e5933000 ldr r3, [r3]
6728: e59f104c ldr r1, [pc, #76] ; 677c <rtems_verror+0x160>
672c: e593000c ldr r0, [r3, #12]
6730: e1a02005 mov r2, r5
6734: eb002c91 bl 11980 <fprintf>
6738: e0844000 add r4, r4, r0
}
chars_written += fprintf(stderr, "\n");
673c: e59f502c ldr r5, [pc, #44] ; 6770 <rtems_verror+0x154>
6740: e5953000 ldr r3, [r5]
6744: e59f1034 ldr r1, [pc, #52] ; 6780 <rtems_verror+0x164>
6748: e593000c ldr r0, [r3, #12]
674c: eb002c8b bl 11980 <fprintf>
(void) fflush(stderr);
6750: 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");
6754: e0804004 add r4, r0, r4
(void) fflush(stderr);
6758: e593000c ldr r0, [r3, #12]
675c: eb002ba1 bl 115e8 <fflush>
return chars_written;
}
6760: e1a00004 mov r0, r4
6764: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
000027e8 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
27e8: 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;
27ec: e3a04000 mov r4, #0
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
27f0: e58d1000 str r1, [sp]
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
27f4: e59fb0d4 ldr fp, [pc, #212] ; 28d0 <scanInt+0xe8>
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
27f8: e59f90d4 ldr r9, [pc, #212] ; 28d4 <scanInt+0xec>
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
27fc: e1a05000 mov r5, r0
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
2800: e3e08102 mvn r8, #-2147483648 ; 0x80000000
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
2804: e1a07004 mov r7, r4
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
2808: e3a0a00a mov sl, #10
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
280c: e5953004 ldr r3, [r5, #4]
2810: e2433001 sub r3, r3, #1
2814: e3530000 cmp r3, #0
2818: e5853004 str r3, [r5, #4]
281c: a5953000 ldrge r3, [r5]
2820: a4d36001 ldrbge r6, [r3], #1
2824: a5853000 strge r3, [r5]
2828: aa000003 bge 283c <scanInt+0x54>
282c: e59b0000 ldr r0, [fp] <== NOT EXECUTED
2830: e1a01005 mov r1, r5 <== NOT EXECUTED
2834: eb00310d bl ec70 <__srget_r> <== NOT EXECUTED
2838: e1a06000 mov r6, r0 <== NOT EXECUTED
if (c == ':')
283c: e356003a cmp r6, #58 ; 0x3a
2840: 0a000019 beq 28ac <scanInt+0xc4>
break;
if (sign == 0) {
2844: e3540000 cmp r4, #0
2848: 1a000004 bne 2860 <scanInt+0x78>
if (c == '-') {
284c: e356002d cmp r6, #45 ; 0x2d
sign = -1;
limit++;
2850: 02888001 addeq r8, r8, #1
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
2854: 03e04000 mvneq r4, #0
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
2858: 0affffeb beq 280c <scanInt+0x24>
sign = -1;
limit++;
continue;
}
sign = 1;
285c: e3a04001 mov r4, #1
}
if (!isdigit(c))
2860: e5993000 ldr r3, [r9]
2864: e0833006 add r3, r3, r6
2868: e5d30001 ldrb r0, [r3, #1]
286c: e2100004 ands r0, r0, #4
2870: 0a000015 beq 28cc <scanInt+0xe4>
return 0;
d = c - '0';
if ((i > (limit / 10))
2874: e1a00008 mov r0, r8
2878: e3a0100a mov r1, #10
287c: eb003a05 bl 11098 <__aeabi_uidiv>
2880: e1570000 cmp r7, r0
2884: 8a00000f bhi 28c8 <scanInt+0xe0>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
2888: e2466030 sub r6, r6, #48 ; 0x30
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
288c: 1a000004 bne 28a4 <scanInt+0xbc>
2890: e1a00008 mov r0, r8
2894: e3a0100a mov r1, #10
2898: eb003a96 bl 112f8 <__umodsi3>
289c: e1560000 cmp r6, r0
28a0: 8a000008 bhi 28c8 <scanInt+0xe0>
return 0;
i = i * 10 + d;
28a4: e027679a mla r7, sl, r7, r6
28a8: eaffffd7 b 280c <scanInt+0x24>
}
if (sign == 0)
28ac: e3540000 cmp r4, #0
return 0;
28b0: 01a00004 moveq r0, r4
*val = i * sign;
28b4: 10040497 mulne r4, r7, r4
28b8: 159d3000 ldrne r3, [sp]
return 1;
28bc: 13a00001 movne r0, #1
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
28c0: 15834000 strne r4, [r3]
return 1;
28c4: ea000000 b 28cc <scanInt+0xe4>
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
28c8: e3a00000 mov r0, #0
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
28cc: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
00003f88 <siproc>:
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
3f88: e591203c ldr r2, [r1, #60] ; 0x3c
3f8c: e59f304c ldr r3, [pc, #76] ; 3fe0 <siproc+0x58>
3f90: e0023003 and r3, r2, r3
3f94: e3530000 cmp r3, #0
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
3f98: e92d4030 push {r4, r5, lr}
3f9c: e1a04001 mov r4, r1
3fa0: 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)) {
3fa4: 0a00000b beq 3fd8 <siproc+0x50>
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3fa8: e5910018 ldr r0, [r1, #24]
3fac: e3a01000 mov r1, #0
3fb0: e1a02001 mov r2, r1
3fb4: eb0004c0 bl 52bc <rtems_semaphore_obtain>
i = iproc (c, tty);
3fb8: e1a01004 mov r1, r4
3fbc: e1a00005 mov r0, r5
3fc0: ebffff8b bl 3df4 <iproc>
3fc4: e1a05000 mov r5, r0
rtems_semaphore_release (tty->osem);
3fc8: e5940018 ldr r0, [r4, #24]
3fcc: eb000500 bl 53d4 <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
3fd0: e1a00005 mov r0, r5
3fd4: e8bd8030 pop {r4, r5, pc}
3fd8: 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);
3fdc: eaffff84 b 3df4 <iproc> <== NOT EXECUTED
00005c64 <unmount>:
*/
int unmount(
const char *path
)
{
5c64: e92d4070 push {r4, r5, r6, lr}
5c68: e24dd018 sub sp, sp, #24
5c6c: 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 ) )
5c70: eb002242 bl e580 <strlen>
5c74: e28d4004 add r4, sp, #4
5c78: e3a03001 mov r3, #1
5c7c: e1a01000 mov r1, r0
5c80: e58d3000 str r3, [sp]
5c84: e1a00005 mov r0, r5
5c88: e3a02000 mov r2, #0
5c8c: e1a03004 mov r3, r4
5c90: ebfff475 bl 2e6c <rtems_filesystem_evaluate_path>
5c94: e3500000 cmp r0, #0
5c98: 1a000040 bne 5da0 <unmount+0x13c>
return -1;
mt_entry = loc.mt_entry;
5c9c: 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 ){
5ca0: e59d3004 ldr r3, [sp, #4]
5ca4: e595201c ldr r2, [r5, #28]
5ca8: e1520003 cmp r2, r3
5cac: 0a000004 beq 5cc4 <unmount+0x60>
rtems_filesystem_freenode( &loc );
5cb0: e1a00004 mov r0, r4
5cb4: ebfff49c bl 2f2c <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
5cb8: eb001cb8 bl cfa0 <__errno>
5cbc: e3a0300d mov r3, #13
5cc0: ea000011 b 5d0c <unmount+0xa8>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
5cc4: e1a00004 mov r0, r4
5cc8: ebfff497 bl 2f2c <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 )
5ccc: e59f30d8 ldr r3, [pc, #216] ; 5dac <unmount+0x148>
5cd0: e5933000 ldr r3, [r3]
5cd4: e5933014 ldr r3, [r3, #20]
5cd8: e1530005 cmp r3, r5
5cdc: 0a000008 beq 5d04 <unmount+0xa0>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
5ce0: e59f00c8 ldr r0, [pc, #200] ; 5db0 <unmount+0x14c>
5ce4: e595102c ldr r1, [r5, #44] ; 0x2c
5ce8: ebfff6b1 bl 37b4 <rtems_filesystem_mount_iterate>
5cec: e3500000 cmp r0, #0
5cf0: 1a000003 bne 5d04 <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 )
5cf4: e1a00005 mov r0, r5
5cf8: ebfff566 bl 3298 <rtems_libio_is_open_files_in_fs>
5cfc: e3500001 cmp r0, #1
5d00: 1a000003 bne 5d14 <unmount+0xb0>
rtems_set_errno_and_return_minus_one( EBUSY );
5d04: eb001ca5 bl cfa0 <__errno>
5d08: e3a03010 mov r3, #16
5d0c: e5803000 str r3, [r0]
5d10: ea000022 b 5da0 <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 )
5d14: e5953014 ldr r3, [r5, #20]
5d18: e1a00005 mov r0, r5
5d1c: e1a0e00f mov lr, pc
5d20: e593f028 ldr pc, [r3, #40] ; 0x28
5d24: e2506000 subs r6, r0, #0
5d28: 1a00001c bne 5da0 <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){
5d2c: e5953028 ldr r3, [r5, #40] ; 0x28
5d30: e1a00005 mov r0, r5
5d34: e1a0e00f mov lr, pc
5d38: e593f02c ldr pc, [r3, #44] ; 0x2c
5d3c: e2504000 subs r4, r0, #0
5d40: 0a000007 beq 5d64 <unmount+0x100>
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
5d44: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
5d48: e1a00005 mov r0, r5 <== NOT EXECUTED
5d4c: e1a0e00f mov lr, pc <== NOT EXECUTED
5d50: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED
5d54: e3500000 cmp r0, #0 <== NOT EXECUTED
5d58: 0a000010 beq 5da0 <unmount+0x13c> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
5d5c: e1a00006 mov r0, r6 <== NOT EXECUTED
5d60: eb0003ca bl 6c90 <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 );
5d64: e59f6048 ldr r6, [pc, #72] ; 5db4 <unmount+0x150>
5d68: e1a01004 mov r1, r4
5d6c: e1a02004 mov r2, r4
5d70: e5960000 ldr r0, [r6]
5d74: eb000242 bl 6684 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
5d78: e1a00005 mov r0, r5
5d7c: eb000479 bl 6f68 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
5d80: e5960000 ldr r0, [r6]
5d84: eb000284 bl 679c <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 );
5d88: e2850008 add r0, r5, #8
5d8c: ebfff466 bl 2f2c <rtems_filesystem_freenode>
free( mt_entry );
5d90: e1a00005 mov r0, r5
5d94: ebfff469 bl 2f40 <free>
return 0;
5d98: e1a00004 mov r0, r4
5d9c: ea000000 b 5da4 <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;
5da0: e3e00000 mvn r0, #0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
5da4: e28dd018 add sp, sp, #24
5da8: e8bd8070 pop {r4, r5, r6, pc}