RTEMS 4.11Annotated Report
Sat Nov 27 22:31:31 2010
a0008834 <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 ) {
a0008834: e5902000 ldr r2, [r0]
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
a0008838: e5903010 ldr r3, [r0, #16]
switch( node->type ) {
a000883c: 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;
a0008840: e5933034 ldr r3, [r3, #52] ; 0x34
switch( node->type ) {
a0008844: e2422001 sub r2, r2, #1
a0008848: e3520006 cmp r2, #6
a000884c: 979ff102 ldrls pc, [pc, r2, lsl #2]
a0008850: ea000010 b a0008898 <IMFS_Set_handlers+0x64> <== NOT EXECUTED
a0008854: a0008870 .word 0xa0008870 <== NOT EXECUTED
a0008858: a0008878 .word 0xa0008878 <== NOT EXECUTED
a000885c: a0008880 .word 0xa0008880 <== NOT EXECUTED
a0008860: a0008880 .word 0xa0008880 <== NOT EXECUTED
a0008864: a0008888 .word 0xa0008888 <== NOT EXECUTED
a0008868: a0008888 .word 0xa0008888 <== NOT EXECUTED
a000886c: a0008890 .word 0xa0008890 <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
a0008870: e593300c ldr r3, [r3, #12]
a0008874: ea000006 b a0008894 <IMFS_Set_handlers+0x60>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
a0008878: e59f3020 ldr r3, [pc, #32] ; a00088a0 <IMFS_Set_handlers+0x6c>
a000887c: ea000004 b a0008894 <IMFS_Set_handlers+0x60>
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
a0008880: e59f301c ldr r3, [pc, #28] ; a00088a4 <IMFS_Set_handlers+0x70>
a0008884: ea000002 b a0008894 <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;
a0008888: e5933008 ldr r3, [r3, #8]
a000888c: ea000000 b a0008894 <IMFS_Set_handlers+0x60>
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
a0008890: e5933010 ldr r3, [r3, #16]
a0008894: e5803008 str r3, [r0, #8]
break;
}
return 0;
}
a0008898: e3a00000 mov r0, #0
a000889c: e12fff1e bx lr
a0008934 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
a0008934: 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 ) ) {
a0008938: e3d27007 bics r7, r2, #7
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
a000893c: e24dd040 sub sp, sp, #64 ; 0x40
a0008940: e58d0000 str r0, [sp]
a0008944: e1a06001 mov r6, r1
a0008948: e1a08002 mov r8, r2
a000894c: e1a04003 mov r4, r3
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
a0008950: 05935000 ldreq r5, [r3]
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
int len;
IMFS_token_types type = IMFS_CURRENT_DIR;
a0008954: 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 );
a0008958: 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 ) ) {
a000895c: 0a000057 beq a0008ac0 <IMFS_eval_path+0x18c>
rtems_set_errno_and_return_minus_one( EIO );
a0008960: eb000cdf bl a000bce4 <__errno> <== NOT EXECUTED
a0008964: e3a03005 mov r3, #5 <== NOT EXECUTED
a0008968: ea00007e b a0008b68 <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 );
a000896c: e59d2000 ldr r2, [sp]
a0008970: e28d303c add r3, sp, #60 ; 0x3c
a0008974: e1a01006 mov r1, r6
a0008978: e0820007 add r0, r2, r7
a000897c: e1a0200a mov r2, sl
a0008980: eb0001ae bl a0009040 <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
a0008984: e5943000 ldr r3, [r4]
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
a0008988: e1a09000 mov r9, r0
pathnamelen -= len;
a000898c: e59db03c ldr fp, [sp, #60] ; 0x3c
i += len;
if ( !pathloc->node_access )
a0008990: e3530000 cmp r3, #0
a0008994: 0a000041 beq a0008aa0 <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 )
a0008998: e3500000 cmp r0, #0
a000899c: 0a000006 beq a00089bc <IMFS_eval_path+0x88>
if ( node->type == IMFS_DIRECTORY )
a00089a0: e595104c ldr r1, [r5, #76] ; 0x4c
a00089a4: e3510001 cmp r1, #1
a00089a8: 1a000003 bne a00089bc <IMFS_eval_path+0x88>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
a00089ac: e1a00004 mov r0, r4
a00089b0: ebffffbc bl a00088a8 <IMFS_evaluate_permission>
a00089b4: e3500000 cmp r0, #0
a00089b8: 0a000068 beq a0008b60 <IMFS_eval_path+0x22c>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
a00089bc: 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;
a00089c0: e06b6006 rsb r6, fp, r6
i += len;
a00089c4: 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;
a00089c8: e5945000 ldr r5, [r4]
switch( type ) {
a00089cc: 0a000014 beq a0008a24 <IMFS_eval_path+0xf0>
a00089d0: e3590004 cmp r9, #4
a00089d4: 0a000036 beq a0008ab4 <IMFS_eval_path+0x180>
a00089d8: e3590002 cmp r9, #2
a00089dc: 1a000037 bne a0008ac0 <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 )
a00089e0: e59fc194 ldr ip, [pc, #404] ; a0008b7c <IMFS_eval_path+0x248>
a00089e4: e59c3000 ldr r3, [ip]
a00089e8: e5933018 ldr r3, [r3, #24]
a00089ec: e1550003 cmp r5, r3
a00089f0: 0a000032 beq a0008ac0 <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) {
a00089f4: e594e010 ldr lr, [r4, #16]
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
a00089f8: e59e301c ldr r3, [lr, #28]
a00089fc: 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;
a0008a00: 028dc028 addeq ip, sp, #40 ; 0x28
a0008a04: 028ee008 addeq lr, lr, #8
a0008a08: 0a000037 beq a0008aec <IMFS_eval_path+0x1b8>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
a0008a0c: e5955008 ldr r5, [r5, #8]
a0008a10: e3550000 cmp r5, #0
a0008a14: 1a000024 bne a0008aac <IMFS_eval_path+0x178>
rtems_set_errno_and_return_minus_one( ENOENT );
a0008a18: eb000cb1 bl a000bce4 <__errno>
a0008a1c: e5809000 str r9, [r0]
a0008a20: ea000051 b a0008b6c <IMFS_eval_path+0x238>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
a0008a24: e595304c ldr r3, [r5, #76] ; 0x4c
a0008a28: e3530003 cmp r3, #3
a0008a2c: 1a000004 bne a0008a44 <IMFS_eval_path+0x110>
IMFS_evaluate_hard_link( pathloc, 0 );
a0008a30: e1a00004 mov r0, r4
a0008a34: e3a01000 mov r1, #0
a0008a38: ebffffaa bl a00088e8 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
a0008a3c: e5945000 ldr r5, [r4]
a0008a40: ea000008 b a0008a68 <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 ) {
a0008a44: e3530004 cmp r3, #4
a0008a48: 1a000006 bne a0008a68 <IMFS_eval_path+0x134>
result = IMFS_evaluate_sym_link( pathloc, 0 );
a0008a4c: e1a00004 mov r0, r4
a0008a50: e3a01000 mov r1, #0
a0008a54: eb000049 bl a0008b80 <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 )
a0008a58: e3700001 cmn r0, #1
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
a0008a5c: e1a0b000 mov fp, r0
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
a0008a60: e5945000 ldr r5, [r4]
if ( result == -1 )
a0008a64: 0a000041 beq a0008b70 <IMFS_eval_path+0x23c>
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
a0008a68: e595304c ldr r3, [r5, #76] ; 0x4c
a0008a6c: e3530001 cmp r3, #1
a0008a70: 0a000002 beq a0008a80 <IMFS_eval_path+0x14c>
rtems_set_errno_and_return_minus_one( ENOTDIR );
a0008a74: eb000c9a bl a000bce4 <__errno>
a0008a78: e3a03014 mov r3, #20
a0008a7c: ea000039 b a0008b68 <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 ) {
a0008a80: e595e05c ldr lr, [r5, #92] ; 0x5c
a0008a84: e35e0000 cmp lr, #0
a0008a88: 1a000015 bne a0008ae4 <IMFS_eval_path+0x1b0>
}
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
a0008a8c: e1a00005 mov r0, r5
a0008a90: e1a0100a mov r1, sl
a0008a94: eb000149 bl a0008fc0 <IMFS_find_match_in_dir>
if ( !node )
a0008a98: e2505000 subs r5, r0, #0
a0008a9c: 1a000002 bne a0008aac <IMFS_eval_path+0x178>
rtems_set_errno_and_return_minus_one( ENOENT );
a0008aa0: eb000c8f bl a000bce4 <__errno>
a0008aa4: e3a03002 mov r3, #2
a0008aa8: ea00002e b a0008b68 <IMFS_eval_path+0x234>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
a0008aac: e5845000 str r5, [r4]
a0008ab0: ea000002 b a0008ac0 <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 );
a0008ab4: eb000c8a bl a000bce4 <__errno>
a0008ab8: e3a0305b mov r3, #91 ; 0x5b
a0008abc: ea000029 b a0008b68 <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) ) {
a0008ac0: e3590004 cmp r9, #4
a0008ac4: 13590000 cmpne r9, #0
a0008ac8: 1affffa7 bne a000896c <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 ) {
a0008acc: e595304c ldr r3, [r5, #76] ; 0x4c
a0008ad0: e3530001 cmp r3, #1
a0008ad4: 1a000019 bne a0008b40 <IMFS_eval_path+0x20c>
if ( node->info.directory.mt_fs != NULL ) {
a0008ad8: e595e05c ldr lr, [r5, #92] ; 0x5c
a0008adc: e35e0000 cmp lr, #0
a0008ae0: 0a000016 beq a0008b40 <IMFS_eval_path+0x20c>
newloc = node->info.directory.mt_fs->mt_fs_root;
a0008ae4: e28dc028 add ip, sp, #40 ; 0x28
a0008ae8: e28ee01c add lr, lr, #28
a0008aec: e8be000f ldm lr!, {r0, r1, r2, r3}
a0008af0: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0008af4: e59ee000 ldr lr, [lr]
a0008af8: e58ce000 str lr, [ip]
*pathloc = newloc;
a0008afc: e28dc028 add ip, sp, #40 ; 0x28
a0008b00: e8bc000f ldm ip!, {r0, r1, r2, r3}
a0008b04: e1a0c004 mov ip, r4
a0008b08: e8ac000f stmia ip!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
a0008b0c: e59d103c ldr r1, [sp, #60] ; 0x3c
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
a0008b10: e58ce000 str lr, [ip]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
a0008b14: e594300c ldr r3, [r4, #12]
a0008b18: e59d2000 ldr r2, [sp]
a0008b1c: e0610007 rsb r0, r1, r7
a0008b20: e593c000 ldr ip, [r3]
a0008b24: e0820000 add r0, r2, r0
a0008b28: e0861001 add r1, r6, r1
a0008b2c: e1a02008 mov r2, r8
a0008b30: e1a03004 mov r3, r4
a0008b34: e12fff3c blx ip
a0008b38: e1a0b000 mov fp, r0
a0008b3c: ea00000b b a0008b70 <IMFS_eval_path+0x23c>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
a0008b40: e1a00004 mov r0, r4
a0008b44: ebffff3a bl a0008834 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
a0008b48: e1a01008 mov r1, r8
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
a0008b4c: e1a0b000 mov fp, r0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
a0008b50: e1a00004 mov r0, r4
a0008b54: ebffff53 bl a00088a8 <IMFS_evaluate_permission>
a0008b58: e3500000 cmp r0, #0
a0008b5c: 1a000003 bne a0008b70 <IMFS_eval_path+0x23c>
rtems_set_errno_and_return_minus_one( EACCES );
a0008b60: eb000c5f bl a000bce4 <__errno>
a0008b64: e3a0300d mov r3, #13
a0008b68: e5803000 str r3, [r0]
a0008b6c: e3e0b000 mvn fp, #0
return result;
}
a0008b70: e1a0000b mov r0, fp
a0008b74: e28dd040 add sp, sp, #64 ; 0x40
a0008b78: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0008cbc <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 */
)
{
a0008cbc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0008cc0: e24dd03c sub sp, sp, #60 ; 0x3c
a0008cc4: e1a07000 mov r7, r0
a0008cc8: e1a04001 mov r4, r1
a0008ccc: e1a0a002 mov sl, r2
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
a0008cd0: e5916000 ldr r6, [r1]
/*
* Get the path length.
*/
pathlen = strlen( path );
a0008cd4: eb000fec bl a000cc8c <strlen>
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
a0008cd8: e3a05000 mov r5, #0
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
a0008cdc: 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 );
a0008ce0: e1a01008 mov r1, r8
a0008ce4: e28d3038 add r3, sp, #56 ; 0x38
a0008ce8: e0870005 add r0, r7, r5
a0008cec: e1a0200d mov r2, sp
a0008cf0: eb0000d2 bl a0009040 <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
a0008cf4: e5943000 ldr r3, [r4]
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
a0008cf8: e59db038 ldr fp, [sp, #56] ; 0x38
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
a0008cfc: e1a09000 mov r9, r0
pathlen -= len;
i += len;
if ( !pathloc->node_access )
a0008d00: e3530000 cmp r3, #0
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
a0008d04: e06b8008 rsb r8, fp, r8
i += len;
if ( !pathloc->node_access )
a0008d08: 0a000060 beq a0008e90 <IMFS_evaluate_for_make+0x1d4>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
a0008d0c: e3500000 cmp r0, #0
a0008d10: 0a000006 beq a0008d30 <IMFS_evaluate_for_make+0x74>
if ( node->type == IMFS_DIRECTORY )
a0008d14: e596104c ldr r1, [r6, #76] ; 0x4c
a0008d18: e3510001 cmp r1, #1
a0008d1c: 1a000003 bne a0008d30 <IMFS_evaluate_for_make+0x74>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
a0008d20: e1a00004 mov r0, r4
a0008d24: ebfffedf bl a00088a8 <IMFS_evaluate_permission>
a0008d28: e3500000 cmp r0, #0
a0008d2c: 0a00006c beq a0008ee4 <IMFS_evaluate_for_make+0x228>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
a0008d30: e5943000 ldr r3, [r4]
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
a0008d34: 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;
a0008d38: e1a06003 mov r6, r3
switch( type ) {
a0008d3c: e3590004 cmp r9, #4
a0008d40: 979ff109 ldrls pc, [pc, r9, lsl #2]
a0008d44: eaffffe5 b a0008ce0 <IMFS_evaluate_for_make+0x24> <== NOT EXECUTED
a0008d48: a0008e54 .word 0xa0008e54 <== NOT EXECUTED
a0008d4c: a0008ce0 .word 0xa0008ce0 <== NOT EXECUTED
a0008d50: a0008d5c .word 0xa0008d5c <== NOT EXECUTED
a0008d54: a0008d98 .word 0xa0008d98 <== NOT EXECUTED
a0008d58: a0008e60 .word 0xa0008e60 <== 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 )
a0008d5c: e59f119c ldr r1, [pc, #412] ; a0008f00 <IMFS_evaluate_for_make+0x244>
a0008d60: e5912000 ldr r2, [r1]
a0008d64: e5922018 ldr r2, [r2, #24]
a0008d68: e1530002 cmp r3, r2
a0008d6c: 0affffdb beq a0008ce0 <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){
a0008d70: e594e010 ldr lr, [r4, #16]
a0008d74: e59e201c ldr r2, [lr, #28]
a0008d78: e1530002 cmp r3, r2
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
a0008d7c: 028dc024 addeq ip, sp, #36 ; 0x24
a0008d80: 028ee008 addeq lr, lr, #8
a0008d84: 0a000019 beq a0008df0 <IMFS_evaluate_for_make+0x134>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
a0008d88: e5936008 ldr r6, [r3, #8]
a0008d8c: e3560000 cmp r6, #0
a0008d90: 1a00002d bne a0008e4c <IMFS_evaluate_for_make+0x190>
a0008d94: ea00003d b a0008e90 <IMFS_evaluate_for_make+0x1d4>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
a0008d98: e593304c ldr r3, [r3, #76] ; 0x4c
a0008d9c: e3530003 cmp r3, #3
a0008da0: 0a000001 beq a0008dac <IMFS_evaluate_for_make+0xf0>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
a0008da4: e3530004 cmp r3, #4
a0008da8: 1a000005 bne a0008dc4 <IMFS_evaluate_for_make+0x108>
result = IMFS_evaluate_link( pathloc, 0 );
a0008dac: e1a00004 mov r0, r4
a0008db0: e3a01000 mov r1, #0
a0008db4: ebffff93 bl a0008c08 <IMFS_evaluate_link>
if ( result == -1 )
a0008db8: e3700001 cmn r0, #1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
a0008dbc: e1a06000 mov r6, r0
if ( result == -1 )
a0008dc0: 0a00004b beq a0008ef4 <IMFS_evaluate_for_make+0x238>
return -1;
}
node = pathloc->node_access;
a0008dc4: e5940000 ldr r0, [r4]
if ( !node )
a0008dc8: e3500000 cmp r0, #0
a0008dcc: 0a00003c beq a0008ec4 <IMFS_evaluate_for_make+0x208>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
a0008dd0: e590304c ldr r3, [r0, #76] ; 0x4c
a0008dd4: e3530001 cmp r3, #1
a0008dd8: 1a000039 bne a0008ec4 <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 ) {
a0008ddc: e590e05c ldr lr, [r0, #92] ; 0x5c
a0008de0: e35e0000 cmp lr, #0
a0008de4: 0a000014 beq a0008e3c <IMFS_evaluate_for_make+0x180>
newloc = node->info.directory.mt_fs->mt_fs_root;
a0008de8: e28dc024 add ip, sp, #36 ; 0x24
a0008dec: e28ee01c add lr, lr, #28
a0008df0: e8be000f ldm lr!, {r0, r1, r2, r3}
a0008df4: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0008df8: e59ee000 ldr lr, [lr]
a0008dfc: e58ce000 str lr, [ip]
*pathloc = newloc;
a0008e00: e28dc024 add ip, sp, #36 ; 0x24
a0008e04: e8bc000f ldm ip!, {r0, r1, r2, r3}
a0008e08: e1a0c004 mov ip, r4
a0008e0c: e8ac000f stmia ip!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
a0008e10: 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;
a0008e14: e58ce000 str lr, [ip]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
a0008e18: e594300c ldr r3, [r4, #12]
a0008e1c: e0625005 rsb r5, r2, r5
a0008e20: e0870005 add r0, r7, r5
a0008e24: e5933004 ldr r3, [r3, #4]
a0008e28: e1a01004 mov r1, r4
a0008e2c: e1a0200a mov r2, sl
a0008e30: e12fff33 blx r3
a0008e34: e1a06000 mov r6, r0
a0008e38: ea00002d b a0008ef4 <IMFS_evaluate_for_make+0x238>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
a0008e3c: e1a0100d mov r1, sp
a0008e40: eb00005e bl a0008fc0 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
a0008e44: e2506000 subs r6, r0, #0
a0008e48: 0a000007 beq a0008e6c <IMFS_evaluate_for_make+0x1b0>
done = true;
else
pathloc->node_access = node;
a0008e4c: e5846000 str r6, [r4]
a0008e50: eaffffa2 b a0008ce0 <IMFS_evaluate_for_make+0x24>
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
a0008e54: eb000ba2 bl a000bce4 <__errno>
a0008e58: e3a03011 mov r3, #17
a0008e5c: ea000022 b a0008eec <IMFS_evaluate_for_make+0x230>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
a0008e60: eb000b9f bl a000bce4 <__errno>
a0008e64: e3a0305b mov r3, #91 ; 0x5b
a0008e68: ea00001f b a0008eec <IMFS_evaluate_for_make+0x230>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
a0008e6c: e59d3038 ldr r3, [sp, #56] ; 0x38
a0008e70: e0633005 rsb r3, r3, r5
a0008e74: e0873003 add r3, r7, r3
a0008e78: 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(
a0008e7c: 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++) {
a0008e80: ea000005 b a0008e9c <IMFS_evaluate_for_make+0x1e0>
if ( !IMFS_is_separator( path[ i ] ) )
a0008e84: ebffe6f6 bl a0002a64 <rtems_filesystem_is_separator>
a0008e88: e3500000 cmp r0, #0
a0008e8c: 1a000002 bne a0008e9c <IMFS_evaluate_for_make+0x1e0>
rtems_set_errno_and_return_minus_one( ENOENT );
a0008e90: eb000b93 bl a000bce4 <__errno>
a0008e94: e3a03002 mov r3, #2
a0008e98: ea000013 b a0008eec <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++) {
a0008e9c: e4d50001 ldrb r0, [r5], #1
a0008ea0: e3500000 cmp r0, #0
a0008ea4: 1afffff6 bne a0008e84 <IMFS_evaluate_for_make+0x1c8>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
a0008ea8: e1a00004 mov r0, r4
a0008eac: ebfffe60 bl a0008834 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
a0008eb0: e5943000 ldr r3, [r4]
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
a0008eb4: e1a06000 mov r6, r0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
a0008eb8: e593304c ldr r3, [r3, #76] ; 0x4c
a0008ebc: e3530001 cmp r3, #1
a0008ec0: 0a000002 beq a0008ed0 <IMFS_evaluate_for_make+0x214>
rtems_set_errno_and_return_minus_one( ENOTDIR );
a0008ec4: eb000b86 bl a000bce4 <__errno>
a0008ec8: e3a03014 mov r3, #20
a0008ecc: ea000006 b a0008eec <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 ) )
a0008ed0: e1a00004 mov r0, r4
a0008ed4: e3a01003 mov r1, #3
a0008ed8: ebfffe72 bl a00088a8 <IMFS_evaluate_permission>
a0008edc: e3500000 cmp r0, #0
a0008ee0: 1a000003 bne a0008ef4 <IMFS_evaluate_for_make+0x238>
rtems_set_errno_and_return_minus_one( EACCES );
a0008ee4: eb000b7e bl a000bce4 <__errno>
a0008ee8: e3a0300d mov r3, #13
a0008eec: e5803000 str r3, [r0]
a0008ef0: e3e06000 mvn r6, #0
return result;
}
a0008ef4: e1a00006 mov r0, r6
a0008ef8: e28dd03c add sp, sp, #60 ; 0x3c
a0008efc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a00088a8 <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 ) )
a00088a8: e3d13007 bics r3, r1, #7
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
a00088ac: 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 ) )
a00088b0: 0a000004 beq a00088c8 <IMFS_evaluate_permission+0x20>
rtems_set_errno_and_return_minus_one( EPERM );
a00088b4: eb000d0a bl a000bce4 <__errno> <== NOT EXECUTED
a00088b8: e3a03001 mov r3, #1 <== NOT EXECUTED
a00088bc: e5803000 str r3, [r0] <== NOT EXECUTED
a00088c0: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00088c4: 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 )
a00088c8: e5903000 ldr r3, [r0]
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
a00088cc: 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 )
a00088d0: e5930030 ldr r0, [r3, #48] ; 0x30
a00088d4: 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 );
a00088d8: e1500001 cmp r0, r1
a00088dc: 13a00000 movne r0, #0
a00088e0: 03a00001 moveq r0, #1
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
a00088e4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a0008f04 <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
)
{
a0008f04: 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;
a0008f08: e1a0c000 mov ip, r0
a0008f0c: 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
)
{
a0008f10: 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;
a0008f14: e1a0e00d mov lr, sp
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
a0008f18: e1a05000 mov r5, r0
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
a0008f1c: e8bc000f ldm ip!, {r0, r1, r2, r3}
a0008f20: e8ae000f stmia lr!, {r0, r1, r2, r3}
a0008f24: e59c3000 ldr r3, [ip]
a0008f28: e58e3000 str r3, [lr]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
a0008f2c: e3a03000 mov r3, #0
a0008f30: e585301c str r3, [r5, #28]
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
a0008f34: e1a0500d mov r5, sp
a0008f38: e1a0000d mov r0, sp
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
a0008f3c: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode;
a0008f40: e58d4000 str r4, [sp]
IMFS_Set_handlers( &loc );
a0008f44: ebfffe3a bl a0008834 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
a0008f48: e594304c ldr r3, [r4, #76] ; 0x4c
a0008f4c: e3530001 cmp r3, #1
a0008f50: 1a000003 bne a0008f64 <IMFS_fsunmount+0x60>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
a0008f54: 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 );
a0008f58: e2843054 add r3, r4, #84 ; 0x54
a0008f5c: e1520003 cmp r2, r3
a0008f60: 1a000005 bne a0008f7c <IMFS_fsunmount+0x78>
result = IMFS_unlink( NULL, &loc );
a0008f64: e3a00000 mov r0, #0
a0008f68: e1a0100d mov r1, sp
a0008f6c: ebffe1ff bl a0001770 <IMFS_unlink>
if (result != 0)
a0008f70: e3500000 cmp r0, #0
a0008f74: 1a00000c bne a0008fac <IMFS_fsunmount+0xa8>
return -1;
jnode = next;
a0008f78: e1a04006 mov r4, r6
}
if ( jnode != NULL ) {
a0008f7c: e3540000 cmp r4, #0
a0008f80: 0a00000b beq a0008fb4 <IMFS_fsunmount+0xb0>
if ( jnode->type == IMFS_DIRECTORY ) {
a0008f84: e594304c ldr r3, [r4, #76] ; 0x4c
a0008f88: e3530001 cmp r3, #1
a0008f8c: 1affffe9 bne a0008f38 <IMFS_fsunmount+0x34>
}
}
} while (jnode != NULL);
return 0;
}
a0008f90: e5943050 ldr r3, [r4, #80] ; 0x50
a0008f94: e2842054 add r2, r4, #84 ; 0x54
return -1;
jnode = next;
}
if ( jnode != NULL ) {
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
a0008f98: e1530002 cmp r3, r2
a0008f9c: 0affffe5 beq a0008f38 <IMFS_fsunmount+0x34>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
a0008fa0: e2534000 subs r4, r3, #0
a0008fa4: 1affffe3 bne a0008f38 <IMFS_fsunmount+0x34>
a0008fa8: ea000001 b a0008fb4 <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;
a0008fac: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0008fb0: ea000000 b a0008fb8 <IMFS_fsunmount+0xb4> <== NOT EXECUTED
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
return 0;
a0008fb4: e1a00004 mov r0, r4
}
a0008fb8: e28dd014 add sp, sp, #20
a0008fbc: e8bd8070 pop {r4, r5, r6, pc}
a000a85c <IMFS_memfile_get_block_pointer>:
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
a000a85c: e59f31e4 ldr r3, [pc, #484] ; a000aa48 <IMFS_memfile_get_block_pointer+0x1ec>
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
a000a860: 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 ) {
a000a864: e5935000 ldr r5, [r3]
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
a000a868: e1a04000 mov r4, r0
a000a86c: e1a06001 mov r6, r1
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
a000a870: e1a05125 lsr r5, r5, #2
a000a874: e2453001 sub r3, r5, #1
a000a878: e1510003 cmp r1, r3
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
a000a87c: e1a08002 mov r8, r2
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
a000a880: 8a00000e bhi a000a8c0 <IMFS_memfile_get_block_pointer+0x64>
p = info->indirect;
if ( malloc_it ) {
a000a884: e3520000 cmp r2, #0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
a000a888: e5900058 ldr r0, [r0, #88] ; 0x58
if ( malloc_it ) {
a000a88c: 0a000007 beq a000a8b0 <IMFS_memfile_get_block_pointer+0x54>
if ( !p ) {
a000a890: e3500000 cmp r0, #0
a000a894: 1a000003 bne a000a8a8 <IMFS_memfile_get_block_pointer+0x4c>
p = memfile_alloc_block();
a000a898: ebffffe2 bl a000a828 <memfile_alloc_block>
if ( !p )
a000a89c: e3500000 cmp r0, #0
a000a8a0: 0a000067 beq a000aa44 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
info->indirect = p;
a000a8a4: e5840058 str r0, [r4, #88] ; 0x58
}
return &info->indirect[ my_block ];
a000a8a8: e5940058 ldr r0, [r4, #88] ; 0x58
a000a8ac: ea000001 b a000a8b8 <IMFS_memfile_get_block_pointer+0x5c>
}
if ( !p )
a000a8b0: e3500000 cmp r0, #0
a000a8b4: 0a000062 beq a000aa44 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
return &info->indirect[ my_block ];
a000a8b8: e0800106 add r0, r0, r6, lsl #2
a000a8bc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
a000a8c0: e2853001 add r3, r5, #1
a000a8c4: e0030395 mul r3, r5, r3
a000a8c8: e2432001 sub r2, r3, #1
a000a8cc: e1510002 cmp r1, r2
a000a8d0: 8a000021 bhi a000a95c <IMFS_memfile_get_block_pointer+0x100>
my_block -= FIRST_DOUBLY_INDIRECT;
a000a8d4: e0656001 rsb r6, r5, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
a000a8d8: e1a00006 mov r0, r6
a000a8dc: e1a01005 mov r1, r5
a000a8e0: eb001336 bl a000f5c0 <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
a000a8e4: e1a01005 mov r1, r5
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
a000a8e8: e1a07000 mov r7, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
a000a8ec: e1a00006 mov r0, r6
a000a8f0: eb00129a bl a000f360 <__aeabi_uidiv>
p = info->doubly_indirect;
if ( malloc_it ) {
a000a8f4: 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;
a000a8f8: e1a05000 mov r5, r0
p = info->doubly_indirect;
a000a8fc: e594005c ldr r0, [r4, #92] ; 0x5c
if ( malloc_it ) {
a000a900: 0a00000e beq a000a940 <IMFS_memfile_get_block_pointer+0xe4>
if ( !p ) {
a000a904: e3500000 cmp r0, #0
a000a908: 1a000003 bne a000a91c <IMFS_memfile_get_block_pointer+0xc0>
p = memfile_alloc_block();
a000a90c: ebffffc5 bl a000a828 <memfile_alloc_block>
if ( !p )
a000a910: e3500000 cmp r0, #0
a000a914: 0a00004a beq a000aa44 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
info->doubly_indirect = p;
a000a918: e584005c str r0, [r4, #92] ; 0x5c
}
p1 = (block_p *)p[ doubly ];
a000a91c: e0804105 add r4, r0, r5, lsl #2
a000a920: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p1 ) {
a000a924: e3500000 cmp r0, #0
a000a928: 1a000009 bne a000a954 <IMFS_memfile_get_block_pointer+0xf8>
p1 = memfile_alloc_block();
a000a92c: ebffffbd bl a000a828 <memfile_alloc_block>
if ( !p1 )
a000a930: e3500000 cmp r0, #0
return 0;
p[ doubly ] = (block_p) p1;
a000a934: 15840000 strne r0, [r4]
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
a000a938: 1a000005 bne a000a954 <IMFS_memfile_get_block_pointer+0xf8>
a000a93c: ea000040 b a000aa44 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
a000a940: e3500000 cmp r0, #0
a000a944: 0a00003e beq a000aa44 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
p = (block_p *)p[ doubly ];
a000a948: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p )
a000a94c: e3500000 cmp r0, #0
a000a950: 0a00003b beq a000aa44 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
return (block_p *)&p[ singly ];
a000a954: e0800107 add r0, r0, r7, lsl #2
a000a958: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
a000a95c: e2832001 add r2, r3, #1
a000a960: e0020295 mul r2, r5, r2
a000a964: e2422001 sub r2, r2, #1
a000a968: e1510002 cmp r1, r2
a000a96c: 8a000033 bhi a000aa40 <IMFS_memfile_get_block_pointer+0x1e4>
my_block -= FIRST_TRIPLY_INDIRECT;
a000a970: e0636001 rsb r6, r3, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
a000a974: e1a00006 mov r0, r6
a000a978: e1a01005 mov r1, r5
a000a97c: eb00130f bl a000f5c0 <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
a000a980: 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;
a000a984: e1a0a000 mov sl, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
a000a988: e1a00006 mov r0, r6
a000a98c: eb001273 bl a000f360 <__aeabi_uidiv>
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
a000a990: 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;
a000a994: e1a06000 mov r6, r0
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
a000a998: eb001270 bl a000f360 <__aeabi_uidiv>
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
a000a99c: 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;
a000a9a0: e1a07000 mov r7, r0
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
a000a9a4: e1a00006 mov r0, r6
a000a9a8: eb001304 bl a000f5c0 <__umodsi3>
p = info->triply_indirect;
if ( malloc_it ) {
a000a9ac: 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;
a000a9b0: e1a05000 mov r5, r0
p = info->triply_indirect;
a000a9b4: e5940060 ldr r0, [r4, #96] ; 0x60
if ( malloc_it ) {
a000a9b8: 0a000016 beq a000aa18 <IMFS_memfile_get_block_pointer+0x1bc>
if ( !p ) {
a000a9bc: e3500000 cmp r0, #0
a000a9c0: 1a000003 bne a000a9d4 <IMFS_memfile_get_block_pointer+0x178>
p = memfile_alloc_block();
a000a9c4: ebffff97 bl a000a828 <memfile_alloc_block>
if ( !p )
a000a9c8: e3500000 cmp r0, #0
a000a9cc: 0a00001c beq a000aa44 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
info->triply_indirect = p;
a000a9d0: e5840060 str r0, [r4, #96] ; 0x60
}
p1 = (block_p *) p[ triply ];
a000a9d4: e0804107 add r4, r0, r7, lsl #2
a000a9d8: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 ) {
a000a9dc: e3500000 cmp r0, #0
a000a9e0: 1a000003 bne a000a9f4 <IMFS_memfile_get_block_pointer+0x198>
p1 = memfile_alloc_block();
a000a9e4: ebffff8f bl a000a828 <memfile_alloc_block>
if ( !p1 )
a000a9e8: e3500000 cmp r0, #0
a000a9ec: 0a000014 beq a000aa44 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
p[ triply ] = (block_p) p1;
a000a9f0: e5840000 str r0, [r4]
}
p2 = (block_p *)p1[ doubly ];
a000a9f4: e0804105 add r4, r0, r5, lsl #2
a000a9f8: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p2 ) {
a000a9fc: e3500000 cmp r0, #0
a000aa00: 1a00000c bne a000aa38 <IMFS_memfile_get_block_pointer+0x1dc>
p2 = memfile_alloc_block();
a000aa04: ebffff87 bl a000a828 <memfile_alloc_block>
if ( !p2 )
a000aa08: e3500000 cmp r0, #0
return 0;
p1[ doubly ] = (block_p) p2;
a000aa0c: 15840000 strne r0, [r4]
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
a000aa10: 1a000008 bne a000aa38 <IMFS_memfile_get_block_pointer+0x1dc>
a000aa14: ea00000a b a000aa44 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
a000aa18: e3500000 cmp r0, #0
a000aa1c: 0a000008 beq a000aa44 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
p1 = (block_p *) p[ triply ];
a000aa20: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 )
a000aa24: e3500000 cmp r0, #0
a000aa28: 0a000005 beq a000aa44 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
p2 = (block_p *)p1[ doubly ];
a000aa2c: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p2 )
a000aa30: e3500000 cmp r0, #0
a000aa34: 0a000002 beq a000aa44 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
return (block_p *)&p2[ singly ];
a000aa38: e080010a add r0, r0, sl, lsl #2
a000aa3c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
/*
* This means the requested block number is out of range.
*/
return 0;
a000aa40: e3a00000 mov r0, #0 <== NOT EXECUTED
}
a000aa44: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000160c <IMFS_mount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
a000160c: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
a0001610: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
a0001614: e593204c ldr r2, [r3, #76] ; 0x4c
a0001618: e3520001 cmp r2, #1
a000161c: 0a000004 beq a0001634 <IMFS_mount+0x28>
rtems_set_errno_and_return_minus_one( ENOTDIR );
a0001620: eb0029af bl a000bce4 <__errno> <== NOT EXECUTED
a0001624: e3a03014 mov r3, #20 <== NOT EXECUTED
a0001628: e5803000 str r3, [r0] <== NOT EXECUTED
a000162c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0001630: 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;
a0001634: e583005c str r0, [r3, #92] ; 0x5c
return 0;
a0001638: e3a00000 mov r0, #0
}
a000163c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a0003f98 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
a0003f98: e92d4030 push {r4, r5, lr}
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
a0003f9c: e59f50e0 ldr r5, [pc, #224] ; a0004084 <IMFS_print_jnode+0xec>
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
a0003fa0: e1a04000 mov r4, r0
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
a0003fa4: e280000c add r0, r0, #12
a0003fa8: e5953000 ldr r3, [r5]
a0003fac: e5931008 ldr r1, [r3, #8]
a0003fb0: eb00312c bl a0010468 <fputs>
switch( the_jnode->type ) {
a0003fb4: e594204c ldr r2, [r4, #76] ; 0x4c
a0003fb8: e2423001 sub r3, r2, #1
a0003fbc: e3530006 cmp r3, #6
a0003fc0: 979ff103 ldrls pc, [pc, r3, lsl #2]
a0003fc4: ea000026 b a0004064 <IMFS_print_jnode+0xcc> <== NOT EXECUTED
a0003fc8: a0003fe4 .word 0xa0003fe4 <== NOT EXECUTED
a0003fcc: a0003ff8 .word 0xa0003ff8 <== NOT EXECUTED
a0003fd0: a0004044 .word 0xa0004044 <== NOT EXECUTED
a0003fd4: a0004044 .word 0xa0004044 <== NOT EXECUTED
a0003fd8: a000402c .word 0xa000402c <== NOT EXECUTED
a0003fdc: a0004010 .word 0xa0004010 <== NOT EXECUTED
a0003fe0: a0004050 .word 0xa0004050 <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
a0003fe4: e5953000 ldr r3, [r5]
a0003fe8: e3a0002f mov r0, #47 ; 0x2f
a0003fec: e5931008 ldr r1, [r3, #8]
a0003ff0: eb0030e7 bl a0010394 <fputc>
break;
a0003ff4: ea00001f b a0004078 <IMFS_print_jnode+0xe0>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
a0003ff8: e5953000 ldr r3, [r5]
a0003ffc: e59f1084 ldr r1, [pc, #132] ; a0004088 <IMFS_print_jnode+0xf0>
a0004000: e5942050 ldr r2, [r4, #80] ; 0x50
a0004004: e5930008 ldr r0, [r3, #8]
a0004008: e5943054 ldr r3, [r4, #84] ; 0x54
a000400c: ea000004 b a0004024 <IMFS_print_jnode+0x8c>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
a0004010: e5953000 ldr r3, [r5]
a0004014: e59f1070 ldr r1, [pc, #112] ; a000408c <IMFS_print_jnode+0xf4>
a0004018: e5942050 ldr r2, [r4, #80] ; 0x50
a000401c: e5930008 ldr r0, [r3, #8]
a0004020: e5943058 ldr r3, [r4, #88] ; 0x58
a0004024: eb0030ba bl a0010314 <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
a0004028: ea000012 b a0004078 <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 ")",
a000402c: e5953000 ldr r3, [r5]
a0004030: e59f1058 ldr r1, [pc, #88] ; a0004090 <IMFS_print_jnode+0xf8>
a0004034: e5942050 ldr r2, [r4, #80] ; 0x50
a0004038: e5930008 ldr r0, [r3, #8]
a000403c: eb0030b4 bl a0010314 <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
a0004040: ea00000c b a0004078 <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" );
a0004044: e5953000 ldr r3, [r5] <== NOT EXECUTED
a0004048: e59f0044 ldr r0, [pc, #68] ; a0004094 <IMFS_print_jnode+0xfc><== NOT EXECUTED
a000404c: ea000001 b a0004058 <IMFS_print_jnode+0xc0> <== NOT EXECUTED
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
a0004050: e5953000 ldr r3, [r5] <== NOT EXECUTED
a0004054: e59f003c ldr r0, [pc, #60] ; a0004098 <IMFS_print_jnode+0x100><== NOT EXECUTED
a0004058: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
a000405c: 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" );
a0004060: ea003100 b a0010468 <fputs> <== NOT EXECUTED
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
a0004064: e5953000 ldr r3, [r5] <== NOT EXECUTED
a0004068: e59f102c ldr r1, [pc, #44] ; a000409c <IMFS_print_jnode+0x104><== NOT EXECUTED
a000406c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
return;
}
puts("");
}
a0004070: 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 );
a0004074: ea0030a6 b a0010314 <fprintf> <== NOT EXECUTED
return;
}
puts("");
a0004078: e59f0020 ldr r0, [pc, #32] ; a00040a0 <IMFS_print_jnode+0x108>
}
a000407c: e8bd4030 pop {r4, r5, lr}
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
a0004080: ea0037d2 b a0011fd0 <puts>
a00091ec <IMFS_stat>:
{
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
a00091ec: e5903000 ldr r3, [r0]
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
a00091f0: e92d4800 push {fp, lr}
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
a00091f4: e593204c ldr r2, [r3, #76] ; 0x4c
a00091f8: e2422002 sub r2, r2, #2
a00091fc: e3520005 cmp r2, #5
a0009200: 979ff102 ldrls pc, [pc, r2, lsl #2]
a0009204: ea000012 b a0009254 <IMFS_stat+0x68> <== NOT EXECUTED
a0009208: a0009220 .word 0xa0009220 <== NOT EXECUTED
a000920c: a0009254 .word 0xa0009254 <== NOT EXECUTED
a0009210: a0009240 .word 0xa0009240 <== NOT EXECUTED
a0009214: a0009234 .word 0xa0009234 <== NOT EXECUTED
a0009218: a0009234 .word 0xa0009234 <== NOT EXECUTED
a000921c: a0009240 .word 0xa0009240 <== NOT EXECUTED
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
a0009220: e5932054 ldr r2, [r3, #84] ; 0x54
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
a0009224: e593c050 ldr ip, [r3, #80] ; 0x50
a0009228: e581201c str r2, [r1, #28]
a000922c: e581c018 str ip, [r1, #24]
break;
a0009230: ea00000c b a0009268 <IMFS_stat+0x7c>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
a0009234: e283c050 add ip, r3, #80 ; 0x50
a0009238: e89c1800 ldm ip, {fp, ip}
a000923c: ea000001 b a0009248 <IMFS_stat+0x5c>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
a0009240: e3a0b000 mov fp, #0
a0009244: e3a0c000 mov ip, #0
a0009248: e581b020 str fp, [r1, #32]
a000924c: e581c024 str ip, [r1, #36] ; 0x24
break;
a0009250: ea000004 b a0009268 <IMFS_stat+0x7c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
a0009254: eb000aa2 bl a000bce4 <__errno>
a0009258: e3a03086 mov r3, #134 ; 0x86
a000925c: e5803000 str r3, [r0]
a0009260: e3e00000 mvn r0, #0
a0009264: 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;
a0009268: e5902010 ldr r2, [r0, #16]
a000926c: e59f0054 ldr r0, [pc, #84] ; a00092c8 <IMFS_stat+0xdc>
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
a0009270: e5922034 ldr r2, [r2, #52] ; 0x34
a0009274: 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 =
a0009278: e5810000 str r0, [r1]
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
a000927c: e3a00000 mov r0, #0
/*
* 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 =
a0009280: e5812004 str r2, [r1, #4]
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
a0009284: e5932030 ldr r2, [r3, #48] ; 0x30
a0009288: e581200c str r2, [r1, #12]
buf->st_nlink = the_jnode->st_nlink;
a000928c: e1d323b4 ldrh r2, [r3, #52] ; 0x34
a0009290: e1c121b0 strh r2, [r1, #16]
buf->st_ino = the_jnode->st_ino;
a0009294: e5932038 ldr r2, [r3, #56] ; 0x38
a0009298: e5812008 str r2, [r1, #8]
buf->st_uid = the_jnode->st_uid;
a000929c: e1d323bc ldrh r2, [r3, #60] ; 0x3c
a00092a0: e1c121b2 strh r2, [r1, #18]
buf->st_gid = the_jnode->st_gid;
a00092a4: e1d323be ldrh r2, [r3, #62] ; 0x3e
a00092a8: e1c121b4 strh r2, [r1, #20]
buf->st_atime = the_jnode->stat_atime;
a00092ac: e5932040 ldr r2, [r3, #64] ; 0x40
a00092b0: e5812028 str r2, [r1, #40] ; 0x28
buf->st_mtime = the_jnode->stat_mtime;
a00092b4: e5932044 ldr r2, [r3, #68] ; 0x44
buf->st_ctime = the_jnode->stat_ctime;
a00092b8: e5933048 ldr r3, [r3, #72] ; 0x48
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
a00092bc: e5812030 str r2, [r1, #48] ; 0x30
buf->st_ctime = the_jnode->stat_ctime;
a00092c0: e5813038 str r3, [r1, #56] ; 0x38
return 0;
}
a00092c4: e8bd8800 pop {fp, pc}
a0001770 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
a0001770: 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;
a0001774: e5915000 ldr r5, [r1]
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
a0001778: e24dd01c sub sp, sp, #28
a000177c: e1a06000 mov r6, r0
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
a0001780: e595304c ldr r3, [r5, #76] ; 0x4c
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
a0001784: e1a04001 mov r4, r1
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
a0001788: e3530003 cmp r3, #3
a000178c: 1a000024 bne a0001824 <IMFS_unlink+0xb4>
if ( !node->info.hard_link.link_node )
a0001790: e595e050 ldr lr, [r5, #80] ; 0x50
a0001794: e35e0000 cmp lr, #0
a0001798: 1a000003 bne a00017ac <IMFS_unlink+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
a000179c: eb002950 bl a000bce4 <__errno> <== NOT EXECUTED
a00017a0: e3a03016 mov r3, #22 <== NOT EXECUTED
a00017a4: e5803000 str r3, [r0] <== NOT EXECUTED
a00017a8: ea000023 b a000183c <IMFS_unlink+0xcc> <== NOT EXECUTED
the_link = *loc;
a00017ac: e1a0c00d mov ip, sp
a00017b0: e1a07001 mov r7, r1
a00017b4: e8b7000f ldm r7!, {r0, r1, r2, r3}
a00017b8: e8ac000f stmia ip!, {r0, r1, r2, r3}
a00017bc: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node;
a00017c0: e28d701c add r7, sp, #28
a00017c4: e527e01c str lr, [r7, #-28]!
IMFS_Set_handlers( &the_link );
a00017c8: 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;
a00017cc: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
a00017d0: eb001c17 bl a0008834 <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)
a00017d4: e5953050 ldr r3, [r5, #80] ; 0x50
a00017d8: e1d323b4 ldrh r2, [r3, #52] ; 0x34
a00017dc: e3520001 cmp r2, #1
a00017e0: 1a000007 bne a0001804 <IMFS_unlink+0x94>
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
a00017e4: e59d3008 ldr r3, [sp, #8]
a00017e8: e1a00006 mov r0, r6
a00017ec: e1a0100d mov r1, sp
a00017f0: e5933034 ldr r3, [r3, #52] ; 0x34
a00017f4: e12fff33 blx r3
if ( result != 0 )
a00017f8: e3500000 cmp r0, #0
a00017fc: 0a000008 beq a0001824 <IMFS_unlink+0xb4>
a0001800: ea00000d b a000183c <IMFS_unlink+0xcc>
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
a0001804: e2422001 sub r2, r2, #1
a0001808: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
a000180c: e28d0014 add r0, sp, #20
a0001810: e3a01000 mov r1, #0
a0001814: eb000139 bl a0001d00 <gettimeofday>
a0001818: e5953050 ldr r3, [r5, #80] ; 0x50
a000181c: e59d2014 ldr r2, [sp, #20]
a0001820: e5832048 str r2, [r3, #72] ; 0x48
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
a0001824: e5943008 ldr r3, [r4, #8]
a0001828: e1a00006 mov r0, r6
a000182c: e1a01004 mov r1, r4
a0001830: e5933034 ldr r3, [r3, #52] ; 0x34
a0001834: e12fff33 blx r3
return result;
a0001838: ea000000 b a0001840 <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;
a000183c: e3e00000 mvn r0, #0
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
a0001840: e28dd01c add sp, sp, #28
a0001844: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0001848 <IMFS_unmount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
a0001848: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
a000184c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
a0001850: e593204c ldr r2, [r3, #76] ; 0x4c
a0001854: e3520001 cmp r2, #1
a0001858: 0a000002 beq a0001868 <IMFS_unmount+0x20>
rtems_set_errno_and_return_minus_one( ENOTDIR );
a000185c: eb002920 bl a000bce4 <__errno> <== NOT EXECUTED
a0001860: e3a03014 mov r3, #20 <== NOT EXECUTED
a0001864: ea000004 b a000187c <IMFS_unmount+0x34> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
a0001868: e593205c ldr r2, [r3, #92] ; 0x5c
a000186c: e3520000 cmp r2, #0
a0001870: 1a000004 bne a0001888 <IMFS_unmount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
a0001874: eb00291a bl a000bce4 <__errno> <== NOT EXECUTED
a0001878: e3a03016 mov r3, #22 <== NOT EXECUTED
a000187c: e5803000 str r3, [r0] <== NOT EXECUTED
a0001880: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0001884: 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;
a0001888: e3a00000 mov r0, #0
a000188c: e583005c str r0, [r3, #92] ; 0x5c
return 0;
}
a0001890: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a00010e0 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
a00010e0: 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);
a00010e4: e59030b8 ldr r3, [r0, #184] ; 0xb8
size = Stack_check_usable_stack_size(stack);
a00010e8: e59070b4 ldr r7, [r0, #180] ; 0xb4
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
a00010ec: e1a05000 mov r5, r0
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
a00010f0: e2832010 add r2, r3, #16
size = Stack_check_usable_stack_size(stack);
a00010f4: 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++)
a00010f8: e3c71003 bic r1, r7, #3
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
a00010fc: e590b0e4 ldr fp, [r0, #228] ; 0xe4
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
a0001100: e2820010 add r0, r2, #16
for (ebase = base + length; base < ebase; base++)
a0001104: 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(
a0001108: e2833020 add r3, r3, #32
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
a000110c: e59f10bc ldr r1, [pc, #188] ; a00011d0 <Stack_check_Dump_threads_usage+0xf0>
a0001110: ea000002 b a0001120 <Stack_check_Dump_threads_usage+0x40>
a0001114: e493c004 ldr ip, [r3], #4
a0001118: e15c0001 cmp ip, r1
a000111c: 1a000004 bne a0001134 <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++)
a0001120: e1530000 cmp r3, r0
if (*base != U32_PATTERN)
a0001124: 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++)
a0001128: 3afffff9 bcc a0001114 <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;
a000112c: e3a06000 mov r6, #0 <== NOT EXECUTED
a0001130: ea000002 b a0001140 <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 )
a0001134: e3560000 cmp r6, #0
used = Stack_check_Calculate_used( low, size, high_water_mark );
a0001138: 10822007 addne r2, r2, r7
a000113c: 10666002 rsbne r6, r6, r2
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
#endif
{
(*print_handler)(
a0001140: e5958008 ldr r8, [r5, #8]
a0001144: e59f4088 ldr r4, [pc, #136] ; a00011d4 <Stack_check_Dump_threads_usage+0xf4>
a0001148: e3a01005 mov r1, #5
a000114c: e28d2008 add r2, sp, #8
a0001150: e1a00008 mov r0, r8
a0001154: e8940600 ldm r4, {r9, sl}
a0001158: eb000edc bl a0004cd0 <rtems_object_get_name>
a000115c: e59f1074 ldr r1, [pc, #116] ; a00011d8 <Stack_check_Dump_threads_usage+0xf8>
a0001160: e1a03000 mov r3, r0
a0001164: e1a02008 mov r2, r8
a0001168: e1a0000a mov r0, sl
a000116c: e12fff39 blx r9
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
a0001170: e59530b4 ldr r3, [r5, #180] ; 0xb4
a0001174: e59520b8 ldr r2, [r5, #184] ; 0xb8
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
a0001178: e58db000 str fp, [sp]
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
a000117c: e2433001 sub r3, r3, #1
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
a0001180: e0823003 add r3, r2, r3
a0001184: e58d7004 str r7, [sp, #4]
a0001188: e594c000 ldr ip, [r4]
a000118c: e5940004 ldr r0, [r4, #4]
a0001190: e59f1044 ldr r1, [pc, #68] ; a00011dc <Stack_check_Dump_threads_usage+0xfc>
a0001194: e12fff3c blx ip
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
a0001198: e5943008 ldr r3, [r4, #8]
a000119c: e3530000 cmp r3, #0
a00011a0: 1a000004 bne a00011b8 <Stack_check_Dump_threads_usage+0xd8>
(*print_handler)( print_context, "Unavailable\n" );
a00011a4: e5943000 ldr r3, [r4] <== NOT EXECUTED
a00011a8: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
a00011ac: e59f102c ldr r1, [pc, #44] ; a00011e0 <Stack_check_Dump_threads_usage+0x100><== NOT EXECUTED
a00011b0: e12fff33 blx r3 <== NOT EXECUTED
a00011b4: ea000004 b a00011cc <Stack_check_Dump_threads_usage+0xec> <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
a00011b8: e5943000 ldr r3, [r4]
a00011bc: e5940004 ldr r0, [r4, #4]
a00011c0: e59f101c ldr r1, [pc, #28] ; a00011e4 <Stack_check_Dump_threads_usage+0x104>
a00011c4: e1a02006 mov r2, r6
a00011c8: e12fff33 blx r3
}
}
a00011cc: e8bd8fff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0014b20 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a0014b20: 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
)
{
a0014b24: 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 ) {
a0014b28: 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
)
{
a0014b2c: e1a06000 mov r6, r0
a0014b30: e1a0a001 mov sl, r1
a0014b34: e1a07002 mov r7, r2
a0014b38: 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 ) {
a0014b3c: 8a000013 bhi a0014b90 <_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 ) {
a0014b40: e5905048 ldr r5, [r0, #72] ; 0x48
a0014b44: e3550000 cmp r5, #0
a0014b48: 0a000009 beq a0014b74 <_CORE_message_queue_Broadcast+0x54>
*count = 0;
a0014b4c: e3a00000 mov r0, #0
a0014b50: e5880000 str r0, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0014b54: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a0014b58: e594002c ldr r0, [r4, #44] ; 0x2c
a0014b5c: e1a0100a mov r1, sl
a0014b60: e1a02007 mov r2, r7
a0014b64: eb001e66 bl a001c504 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0014b68: e5943028 ldr r3, [r4, #40] ; 0x28
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
a0014b6c: e2855001 add r5, r5, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0014b70: e5837000 str r7, [r3]
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
a0014b74: e1a00006 mov r0, r6
a0014b78: eb000a5c bl a00174f0 <_Thread_queue_Dequeue>
a0014b7c: e2504000 subs r4, r0, #0
a0014b80: 1afffff4 bne a0014b58 <_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;
a0014b84: e5885000 str r5, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0014b88: e1a00004 mov r0, r4
a0014b8c: 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;
a0014b90: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
a0014b94: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000dbec <_CORE_message_queue_Initialize>:
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
a000dbec: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
a000dbf0: e3130003 tst r3, #3
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
a000dbf4: e1a04000 mov r4, r0
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
a000dbf8: e3a00000 mov r0, #0
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
a000dbfc: e1a06002 mov r6, r2
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
a000dc00: e5842044 str r2, [r4, #68] ; 0x44
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
a000dc04: e1a05001 mov r5, r1
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
a000dc08: e5840048 str r0, [r4, #72] ; 0x48
the_message_queue->maximum_message_size = maximum_message_size;
a000dc0c: e584304c str r3, [r4, #76] ; 0x4c
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
a000dc10: 01a02003 moveq r2, r3
a000dc14: 0a000003 beq a000dc28 <_CORE_message_queue_Initialize+0x3c>
allocated_message_size += sizeof(uint32_t);
a000dc18: e2832004 add r2, r3, #4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
a000dc1c: e3c22003 bic r2, r2, #3
}
if (allocated_message_size < maximum_message_size)
a000dc20: e1520003 cmp r2, r3
a000dc24: 3a00001e bcc a000dca4 <_CORE_message_queue_Initialize+0xb8>
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
a000dc28: e2827010 add r7, r2, #16
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
a000dc2c: e0000796 mul r0, r6, r7
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
a000dc30: e1500002 cmp r0, r2
a000dc34: 3a000018 bcc a000dc9c <_CORE_message_queue_Initialize+0xb0>
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
a000dc38: eb000b02 bl a0010848 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
a000dc3c: e3500000 cmp r0, #0
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
a000dc40: e1a01000 mov r1, r0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
a000dc44: e584005c str r0, [r4, #92] ; 0x5c
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
a000dc48: 0a000015 beq a000dca4 <_CORE_message_queue_Initialize+0xb8>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
a000dc4c: e2840060 add r0, r4, #96 ; 0x60
a000dc50: e1a02006 mov r2, r6
a000dc54: e1a03007 mov r3, r7
a000dc58: eb00123f bl a001255c <_Chain_Initialize>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
a000dc5c: e2843054 add r3, r4, #84 ; 0x54
head->next = tail;
a000dc60: e5843050 str r3, [r4, #80] ; 0x50
head->previous = NULL;
a000dc64: e3a03000 mov r3, #0
a000dc68: e5843054 str r3, [r4, #84] ; 0x54
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
a000dc6c: e2843050 add r3, r4, #80 ; 0x50
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
a000dc70: e5843058 str r3, [r4, #88] ; 0x58
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
a000dc74: e5951000 ldr r1, [r5]
a000dc78: e1a00004 mov r0, r4
a000dc7c: e3a02080 mov r2, #128 ; 0x80
a000dc80: e3510001 cmp r1, #1
a000dc84: 13a01000 movne r1, #0
a000dc88: 03a01001 moveq r1, #1
a000dc8c: e3a03006 mov r3, #6
a000dc90: eb000889 bl a000febc <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
a000dc94: e3a00001 mov r0, #1
a000dc98: e8bd80f0 pop {r4, r5, r6, r7, pc}
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
return false;
a000dc9c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000dca0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
a000dca4: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0009e88 <_CORE_mutex_Seize_interrupt_trylock>:
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a0009e88: e59f212c ldr r2, [pc, #300] ; a0009fbc <_CORE_mutex_Seize_interrupt_trylock+0x134>
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
a0009e8c: e1a03000 mov r3, r0
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a0009e90: e593c050 ldr ip, [r3, #80] ; 0x50
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a0009e94: e5922004 ldr r2, [r2, #4]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a0009e98: e3a00000 mov r0, #0
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a0009e9c: e15c0000 cmp ip, r0
a0009ea0: e92d4010 push {r4, lr}
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a0009ea4: e5820034 str r0, [r2, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a0009ea8: 0a00002c beq a0009f60 <_CORE_mutex_Seize_interrupt_trylock+0xd8>
the_mutex->lock = CORE_MUTEX_LOCKED;
a0009eac: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
a0009eb0: e5920008 ldr r0, [r2, #8]
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
a0009eb4: e583205c str r2, [r3, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
a0009eb8: e5830060 str r0, [r3, #96] ; 0x60
the_mutex->nest_count = 1;
a0009ebc: e3a00001 mov r0, #1
a0009ec0: e5830054 str r0, [r3, #84] ; 0x54
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
a0009ec4: e5930048 ldr r0, [r3, #72] ; 0x48
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a0009ec8: e3500002 cmp r0, #2
a0009ecc: 0a000001 beq a0009ed8 <_CORE_mutex_Seize_interrupt_trylock+0x50>
a0009ed0: e3500003 cmp r0, #3
a0009ed4: 1a000004 bne a0009eec <_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++;
a0009ed8: e592c01c ldr ip, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a0009edc: 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++;
a0009ee0: e28c4001 add r4, ip, #1
a0009ee4: e582401c str r4, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a0009ee8: 0a000000 beq a0009ef0 <_CORE_mutex_Seize_interrupt_trylock+0x68>
_ISR_Enable( *level_p );
a0009eec: ea00002a b a0009f9c <_CORE_mutex_Seize_interrupt_trylock+0x114>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
a0009ef0: e593004c ldr r0, [r3, #76] ; 0x4c
current = executing->current_priority;
a0009ef4: e5924014 ldr r4, [r2, #20]
if ( current == ceiling ) {
a0009ef8: e1540000 cmp r4, r0
a0009efc: 1a000000 bne a0009f04 <_CORE_mutex_Seize_interrupt_trylock+0x7c>
_ISR_Enable( *level_p );
a0009f00: ea000025 b a0009f9c <_CORE_mutex_Seize_interrupt_trylock+0x114>
return 0;
}
if ( current > ceiling ) {
a0009f04: 9a00000b bls a0009f38 <_CORE_mutex_Seize_interrupt_trylock+0xb0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0009f08: e59f20b0 ldr r2, [pc, #176] ; a0009fc0 <_CORE_mutex_Seize_interrupt_trylock+0x138>
a0009f0c: e5920000 ldr r0, [r2]
a0009f10: e2800001 add r0, r0, #1
a0009f14: e5820000 str r0, [r2]
a0009f18: e5912000 ldr r2, [r1]
a0009f1c: e129f002 msr CPSR_fc, r2
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
a0009f20: e3a02000 mov r2, #0
a0009f24: e593005c ldr r0, [r3, #92] ; 0x5c
a0009f28: e593104c ldr r1, [r3, #76] ; 0x4c
a0009f2c: ebfff32f bl a0006bf0 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
a0009f30: ebfff454 bl a0007088 <_Thread_Enable_dispatch>
a0009f34: ea00001a b a0009fa4 <_CORE_mutex_Seize_interrupt_trylock+0x11c>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
a0009f38: e3a00006 mov r0, #6
a0009f3c: e5820034 str r0, [r2, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a0009f40: e3a00001 mov r0, #1
a0009f44: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
a0009f48: e3a00000 mov r0, #0
a0009f4c: e5830054 str r0, [r3, #84] ; 0x54
executing->resource_count--; /* undo locking above */
a0009f50: e582c01c str ip, [r2, #28]
a0009f54: e5913000 ldr r3, [r1]
a0009f58: e129f003 msr CPSR_fc, r3
a0009f5c: 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 ) ) {
a0009f60: e593005c ldr r0, [r3, #92] ; 0x5c
a0009f64: e1500002 cmp r0, r2
a0009f68: 1a00000f bne a0009fac <_CORE_mutex_Seize_interrupt_trylock+0x124>
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
a0009f6c: e5932040 ldr r2, [r3, #64] ; 0x40
a0009f70: e3520000 cmp r2, #0
a0009f74: 0a000002 beq a0009f84 <_CORE_mutex_Seize_interrupt_trylock+0xfc>
a0009f78: e3520001 cmp r2, #1
a0009f7c: 1a00000c bne a0009fb4 <_CORE_mutex_Seize_interrupt_trylock+0x12c>
a0009f80: ea000003 b a0009f94 <_CORE_mutex_Seize_interrupt_trylock+0x10c><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
a0009f84: e5932054 ldr r2, [r3, #84] ; 0x54
a0009f88: e2822001 add r2, r2, #1
a0009f8c: e5832054 str r2, [r3, #84] ; 0x54
_ISR_Enable( *level_p );
a0009f90: ea000001 b a0009f9c <_CORE_mutex_Seize_interrupt_trylock+0x114>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
a0009f94: e3a03002 mov r3, #2 <== NOT EXECUTED
a0009f98: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED
a0009f9c: e5913000 ldr r3, [r1]
a0009fa0: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
a0009fa4: e3a00000 mov r0, #0
a0009fa8: e8bd8010 pop {r4, pc}
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
a0009fac: e3a00001 mov r0, #1
a0009fb0: e8bd8010 pop {r4, pc}
a0009fb4: e3a00001 mov r0, #1
a0009fb8: e8bd8010 pop {r4, pc}
a000a544 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a000a544: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000a548: e1a05001 mov r5, r1
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
a000a54c: e5901020 ldr r1, [r0, #32]
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a000a550: e24dd028 sub sp, sp, #40 ; 0x28
a000a554: e58d3018 str r3, [sp, #24]
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
a000a558: 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;
a000a55c: 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;
a000a560: 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;
a000a564: 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 ) {
a000a568: e0956002 adds r6, r5, r2
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a000a56c: 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;
a000a570: 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;
a000a574: 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;
a000a578: 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;
a000a57c: 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;
a000a580: 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;
a000a584: 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 ) {
a000a588: 2a00009e bcs a000a808 <_Heap_Extend+0x2c4>
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
a000a58c: e28d1024 add r1, sp, #36 ; 0x24
a000a590: e58d1000 str r1, [sp]
a000a594: e28d1020 add r1, sp, #32
a000a598: e58d1004 str r1, [sp, #4]
a000a59c: e1a00005 mov r0, r5
a000a5a0: e1a01002 mov r1, r2
a000a5a4: e59d2014 ldr r2, [sp, #20]
a000a5a8: ebffeecc bl a00060e0 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
a000a5ac: e3500000 cmp r0, #0
a000a5b0: 0a000094 beq a000a808 <_Heap_Extend+0x2c4>
a000a5b4: e59da010 ldr sl, [sp, #16]
a000a5b8: e1a07008 mov r7, r8
a000a5bc: e1a09008 mov r9, r8
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
a000a5c0: e5941018 ldr r1, [r4, #24]
a000a5c4: e1a03008 mov r3, r8
a000a5c8: e1a0c004 mov ip, r4
a000a5cc: ea000000 b a000a5d4 <_Heap_Extend+0x90>
a000a5d0: e1a0100a mov r1, sl
uintptr_t const sub_area_end = start_block->prev_size;
a000a5d4: e59a4000 ldr r4, [sl]
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
a000a5d8: e1560001 cmp r6, r1
a000a5dc: 93a00000 movls r0, #0
a000a5e0: 83a00001 movhi r0, #1
a000a5e4: e1550004 cmp r5, r4
a000a5e8: 23a00000 movcs r0, #0
a000a5ec: e3500000 cmp r0, #0
a000a5f0: 1a000083 bne a000a804 <_Heap_Extend+0x2c0>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
a000a5f4: e1560001 cmp r6, r1
a000a5f8: 01a0300a moveq r3, sl
a000a5fc: 0a000001 beq a000a608 <_Heap_Extend+0xc4>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
a000a600: e1560004 cmp r6, r4
a000a604: 31a0900a movcc r9, sl
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000a608: e1a00004 mov r0, r4
a000a60c: e59d1014 ldr r1, [sp, #20]
a000a610: e58d300c str r3, [sp, #12]
a000a614: e58dc008 str ip, [sp, #8]
a000a618: eb00153e bl a000fb18 <__umodsi3>
a000a61c: e244b008 sub fp, r4, #8
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
a000a620: 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);
a000a624: e060000b rsb r0, r0, fp
a000a628: e59d300c ldr r3, [sp, #12]
a000a62c: 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 )
a000a630: 01a07000 moveq r7, r0
start_block->prev_size = extend_area_end;
a000a634: 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 ) {
a000a638: 0a000000 beq a000a640 <_Heap_Extend+0xfc>
a000a63c: 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;
a000a640: 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 );
a000a644: e59d2010 ldr r2, [sp, #16]
a000a648: 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);
a000a64c: e080a00a add sl, r0, sl
a000a650: e15a0002 cmp sl, r2
a000a654: 1affffdd bne a000a5d0 <_Heap_Extend+0x8c>
a000a658: e1a02009 mov r2, r9
a000a65c: e1a09003 mov r9, r3
if ( extend_area_begin < heap->area_begin ) {
a000a660: e59c3018 ldr r3, [ip, #24]
a000a664: e1a0400c mov r4, ip
a000a668: e1550003 cmp r5, r3
heap->area_begin = extend_area_begin;
a000a66c: 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 ) {
a000a670: 3a000002 bcc a000a680 <_Heap_Extend+0x13c>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
a000a674: e59c301c ldr r3, [ip, #28]
a000a678: e1530006 cmp r3, r6
heap->area_end = extend_area_end;
a000a67c: 358c601c strcc r6, [ip, #28]
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
a000a680: e59d1024 ldr r1, [sp, #36] ; 0x24
a000a684: e59d3020 ldr r3, [sp, #32]
extend_first_block->prev_size = extend_area_end;
a000a688: e5816000 str r6, [r1]
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
a000a68c: e0610003 rsb r0, r1, r3
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
a000a690: e380c001 orr ip, r0, #1
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
a000a694: e5830000 str r0, [r3]
extend_last_block->size_and_flag = 0;
a000a698: 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 =
a000a69c: 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;
a000a6a0: e5830004 str r0, [r3, #4]
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
a000a6a4: e5940020 ldr r0, [r4, #32]
a000a6a8: e1500001 cmp r0, r1
heap->first_block = extend_first_block;
a000a6ac: 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 ) {
a000a6b0: 8a000002 bhi a000a6c0 <_Heap_Extend+0x17c>
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
a000a6b4: e5941024 ldr r1, [r4, #36] ; 0x24
a000a6b8: e1510003 cmp r1, r3
heap->last_block = extend_last_block;
a000a6bc: 35843024 strcc r3, [r4, #36] ; 0x24
}
if ( merge_below_block != NULL ) {
a000a6c0: e3590000 cmp r9, #0
a000a6c4: 0a000010 beq a000a70c <_Heap_Extend+0x1c8>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
a000a6c8: 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 );
a000a6cc: 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;
a000a6d0: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a6d4: e1a0100a mov r1, sl <== NOT EXECUTED
a000a6d8: eb00150e bl a000fb18 <__umodsi3> <== NOT EXECUTED
if ( remainder != 0 ) {
a000a6dc: e3500000 cmp r0, #0 <== NOT EXECUTED
return value - remainder + alignment;
a000a6e0: 1085500a addne r5, r5, sl <== 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;
a000a6e4: e5993000 ldr r3, [r9] <== NOT EXECUTED
a000a6e8: 10605005 rsbne r5, r0, r5 <== 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 =
a000a6ec: 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;
a000a6f0: 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 =
a000a6f4: 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;
a000a6f8: e3833001 orr r3, r3, #1 <== NOT EXECUTED
a000a6fc: e5053004 str r3, [r5, #-4] <== NOT EXECUTED
_Heap_Free_block( heap, new_first_block );
a000a700: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a704: ebffff86 bl a000a524 <_Heap_Free_block> <== NOT EXECUTED
a000a708: ea000004 b a000a720 <_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 ) {
a000a70c: e3520000 cmp r2, #0
_Heap_Link_below(
a000a710: 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;
a000a714: 10632002 rsbne r2, r3, r2
a000a718: 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 =
a000a71c: 15832004 strne r2, [r3, #4]
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
a000a720: e3570000 cmp r7, #0
a000a724: 0a000012 beq a000a774 <_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,
a000a728: 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(
a000a72c: e0676006 rsb r6, r7, r6
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000a730: e5941010 ldr r1, [r4, #16]
a000a734: e1a00006 mov r0, r6
a000a738: eb0014f6 bl a000fb18 <__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)
a000a73c: e5972004 ldr r2, [r7, #4]
a000a740: e0606006 rsb r6, r0, r6
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
a000a744: e0863007 add r3, r6, r7
(last_block->size_and_flag - last_block_new_size)
a000a748: e0662002 rsb r2, r6, r2
| HEAP_PREV_BLOCK_USED;
a000a74c: 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 =
a000a750: 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;
a000a754: e5973004 ldr r3, [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 );
a000a758: e1a00004 mov r0, r4
a000a75c: e1a01007 mov r1, r7
a000a760: e2033001 and r3, r3, #1
block->size_and_flag = size | flag;
a000a764: e1866003 orr r6, r6, r3
a000a768: e5876004 str r6, [r7, #4]
a000a76c: ebffff6c bl a000a524 <_Heap_Free_block>
a000a770: ea00000b b a000a7a4 <_Heap_Extend+0x260>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
a000a774: e3580000 cmp r8, #0
a000a778: 0a000009 beq a000a7a4 <_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;
a000a77c: 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 );
a000a780: e59d1024 ldr r1, [sp, #36] ; 0x24
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
a000a784: e59d3020 ldr r3, [sp, #32]
a000a788: e2022001 and r2, r2, #1
)
{
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 );
a000a78c: e0681001 rsb r1, r8, r1
block->size_and_flag = size | flag;
a000a790: e1812002 orr r2, r1, r2
a000a794: e5882004 str r2, [r8, #4]
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a000a798: e5932004 ldr r2, [r3, #4]
a000a79c: e3822001 orr r2, r2, #1
a000a7a0: e5832004 str r2, [r3, #4]
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
a000a7a4: e3570000 cmp r7, #0
a000a7a8: 03590000 cmpeq r9, #0
a000a7ac: 1a000002 bne a000a7bc <_Heap_Extend+0x278>
_Heap_Free_block( heap, extend_first_block );
a000a7b0: e1a00004 mov r0, r4
a000a7b4: e59d1024 ldr r1, [sp, #36] ; 0x24
a000a7b8: ebffff59 bl a000a524 <_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
a000a7bc: e5943024 ldr r3, [r4, #36] ; 0x24
* 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(
a000a7c0: e5941020 ldr r1, [r4, #32]
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
a000a7c4: e3a00001 mov r0, #1
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;
a000a7c8: 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(
a000a7cc: 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;
a000a7d0: e2022001 and r2, r2, #1
block->size_and_flag = size | flag;
a000a7d4: e1812002 orr r2, r1, r2
a000a7d8: e5832004 str r2, [r3, #4]
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
a000a7dc: e59d101c ldr r1, [sp, #28]
a000a7e0: e5943030 ldr r3, [r4, #48] ; 0x30
/* Statistics */
stats->size += extended_size;
a000a7e4: e594202c ldr r2, [r4, #44] ; 0x2c
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
a000a7e8: e0613003 rsb r3, r1, r3
/* Statistics */
stats->size += extended_size;
a000a7ec: e0822003 add r2, r2, r3
a000a7f0: e584202c str r2, [r4, #44] ; 0x2c
if ( extended_size_ptr != NULL )
a000a7f4: e59d2018 ldr r2, [sp, #24]
a000a7f8: e3520000 cmp r2, #0
*extended_size_ptr = extended_size;
a000a7fc: 15823000 strne r3, [r2]
a000a800: ea000000 b a000a808 <_Heap_Extend+0x2c4>
_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;
a000a804: e3a00000 mov r0, #0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
a000a808: e28dd028 add sp, sp, #40 ; 0x28
a000a80c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0006c44 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a0006c44: 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;
a0006c48: e5903014 ldr r3, [r0, #20]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a0006c4c: e24dd030 sub sp, sp, #48 ; 0x30
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a0006c50: e59f44c8 ldr r4, [pc, #1224] ; a0007120 <_Heap_Walk+0x4dc>
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a0006c54: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
a0006c58: e5903024 ldr r3, [r0, #36] ; 0x24
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a0006c5c: e31200ff tst r2, #255 ; 0xff
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;
a0006c60: e590c020 ldr ip, [r0, #32]
Heap_Block *const last_block = heap->last_block;
a0006c64: e58d3028 str r3, [sp, #40] ; 0x28
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a0006c68: e59f34b4 ldr r3, [pc, #1204] ; a0007124 <_Heap_Walk+0x4e0>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a0006c6c: e1a06000 mov r6, r0
a0006c70: e1a05001 mov r5, r1
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a0006c74: 11a04003 movne r4, r3
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a0006c78: e59f34a8 ldr r3, [pc, #1192] ; a0007128 <_Heap_Walk+0x4e4>
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
a0006c7c: e5909010 ldr r9, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
a0006c80: 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() ) ) {
a0006c84: e5933000 ldr r3, [r3]
a0006c88: e3530003 cmp r3, #3
a0006c8c: 1a000118 bne a00070f4 <_Heap_Walk+0x4b0>
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)(
a0006c90: e59dc024 ldr ip, [sp, #36] ; 0x24
a0006c94: e59d2020 ldr r2, [sp, #32]
a0006c98: e58dc000 str ip, [sp]
a0006c9c: e5903018 ldr r3, [r0, #24]
a0006ca0: e58d3004 str r3, [sp, #4]
a0006ca4: e590301c ldr r3, [r0, #28]
a0006ca8: e58d200c str r2, [sp, #12]
a0006cac: e59f2478 ldr r2, [pc, #1144] ; a000712c <_Heap_Walk+0x4e8>
a0006cb0: e58d3008 str r3, [sp, #8]
a0006cb4: e59d3028 ldr r3, [sp, #40] ; 0x28
a0006cb8: e58d3010 str r3, [sp, #16]
a0006cbc: e5903008 ldr r3, [r0, #8]
a0006cc0: e58d3014 str r3, [sp, #20]
a0006cc4: e590300c ldr r3, [r0, #12]
a0006cc8: e1a00001 mov r0, r1
a0006ccc: e3a01000 mov r1, #0
a0006cd0: e58d3018 str r3, [sp, #24]
a0006cd4: e1a03009 mov r3, r9
a0006cd8: e12fff34 blx r4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
a0006cdc: e3590000 cmp r9, #0
a0006ce0: 1a000005 bne a0006cfc <_Heap_Walk+0xb8>
(*printer)( source, true, "page size is zero\n" );
a0006ce4: e1a00005 mov r0, r5
a0006ce8: e3a01001 mov r1, #1
a0006cec: e59f243c ldr r2, [pc, #1084] ; a0007130 <_Heap_Walk+0x4ec>
a0006cf0: e12fff34 blx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0006cf4: e1a08009 mov r8, r9
a0006cf8: ea0000fe b a00070f8 <_Heap_Walk+0x4b4>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
a0006cfc: e2198007 ands r8, r9, #7
(*printer)(
a0006d00: 11a00005 movne r0, r5
a0006d04: 13a01001 movne r1, #1
a0006d08: 159f2424 ldrne r2, [pc, #1060] ; a0007134 <_Heap_Walk+0x4f0>
a0006d0c: 11a03009 movne r3, r9
a0006d10: 1a0000ff bne a0007114 <_Heap_Walk+0x4d0>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a0006d14: e59d0024 ldr r0, [sp, #36] ; 0x24
a0006d18: e1a01009 mov r1, r9
a0006d1c: ebffe754 bl a0000a74 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
a0006d20: e250b000 subs fp, r0, #0
a0006d24: 0a000005 beq a0006d40 <_Heap_Walk+0xfc>
(*printer)(
a0006d28: e1a00005 mov r0, r5
a0006d2c: e3a01001 mov r1, #1
a0006d30: e59f2400 ldr r2, [pc, #1024] ; a0007138 <_Heap_Walk+0x4f4>
a0006d34: e59d3024 ldr r3, [sp, #36] ; 0x24
a0006d38: e12fff34 blx r4
a0006d3c: ea0000ed b a00070f8 <_Heap_Walk+0x4b4>
a0006d40: e59dc020 ldr ip, [sp, #32]
a0006d44: e1a01009 mov r1, r9
a0006d48: e28c0008 add r0, ip, #8
a0006d4c: ebffe748 bl a0000a74 <__umodsi3>
);
return false;
}
if (
a0006d50: e250a000 subs sl, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
a0006d54: 11a00005 movne r0, r5
a0006d58: 13a01001 movne r1, #1
a0006d5c: 159f23d8 ldrne r2, [pc, #984] ; a000713c <_Heap_Walk+0x4f8>
a0006d60: 159d3020 ldrne r3, [sp, #32]
a0006d64: 1a0000c3 bne a0007078 <_Heap_Walk+0x434>
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;
a0006d68: e59d2020 ldr r2, [sp, #32]
a0006d6c: e5928004 ldr r8, [r2, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
a0006d70: e2188001 ands r8, r8, #1
(*printer)(
a0006d74: 01a00005 moveq r0, r5
a0006d78: 03a01001 moveq r1, #1
a0006d7c: 059f23bc ldreq r2, [pc, #956] ; a0007140 <_Heap_Walk+0x4fc>
a0006d80: 0a000009 beq a0006dac <_Heap_Walk+0x168>
- 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;
a0006d84: e59d3028 ldr r3, [sp, #40] ; 0x28
a0006d88: e5937004 ldr r7, [r3, #4]
a0006d8c: 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);
a0006d90: 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;
a0006d94: e5978004 ldr r8, [r7, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
a0006d98: e2188001 ands r8, r8, #1
a0006d9c: 1a000004 bne a0006db4 <_Heap_Walk+0x170>
(*printer)(
a0006da0: e59f239c ldr r2, [pc, #924] ; a0007144 <_Heap_Walk+0x500>
a0006da4: e1a00005 mov r0, r5
a0006da8: e3a01001 mov r1, #1
a0006dac: e12fff34 blx r4
a0006db0: ea0000d0 b a00070f8 <_Heap_Walk+0x4b4>
);
return false;
}
if (
a0006db4: e59dc020 ldr ip, [sp, #32]
a0006db8: e157000c cmp r7, ip
a0006dbc: 0a000005 beq a0006dd8 <_Heap_Walk+0x194>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
a0006dc0: e1a00005 mov r0, r5 <== NOT EXECUTED
a0006dc4: e3a01001 mov r1, #1 <== NOT EXECUTED
a0006dc8: e59f2378 ldr r2, [pc, #888] ; a0007148 <_Heap_Walk+0x504> <== NOT EXECUTED
a0006dcc: e12fff34 blx r4 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0006dd0: e1a0800a mov r8, sl <== NOT EXECUTED
a0006dd4: ea0000c7 b a00070f8 <_Heap_Walk+0x4b4> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
a0006dd8: e596b010 ldr fp, [r6, #16]
block = next_block;
} while ( block != first_block );
return true;
}
a0006ddc: 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 );
a0006de0: e1a0a006 mov sl, r6
a0006de4: ea000032 b a0006eb4 <_Heap_Walk+0x270>
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;
a0006de8: e5963020 ldr r3, [r6, #32]
a0006dec: e1530008 cmp r3, r8
a0006df0: 83a0c000 movhi ip, #0
a0006df4: 8a000003 bhi a0006e08 <_Heap_Walk+0x1c4>
a0006df8: e596c024 ldr ip, [r6, #36] ; 0x24
a0006dfc: e15c0008 cmp ip, r8
a0006e00: 33a0c000 movcc ip, #0
a0006e04: 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 ) ) {
a0006e08: e21cc0ff ands ip, ip, #255 ; 0xff
(*printer)(
a0006e0c: 01a00005 moveq r0, r5
a0006e10: 03a01001 moveq r1, #1
a0006e14: 059f2330 ldreq r2, [pc, #816] ; a000714c <_Heap_Walk+0x508>
a0006e18: 0a000012 beq a0006e68 <_Heap_Walk+0x224>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a0006e1c: e2880008 add r0, r8, #8
a0006e20: e1a0100b mov r1, fp
a0006e24: ebffe712 bl a0000a74 <__umodsi3>
);
return false;
}
if (
a0006e28: e250c000 subs ip, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
a0006e2c: 11a00005 movne r0, r5
a0006e30: 13a01001 movne r1, #1
a0006e34: 159f2314 ldrne r2, [pc, #788] ; a0007150 <_Heap_Walk+0x50c>
a0006e38: 11a03008 movne r3, r8
a0006e3c: 1a0000b4 bne a0007114 <_Heap_Walk+0x4d0>
- 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;
a0006e40: e5983004 ldr r3, [r8, #4]
a0006e44: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
a0006e48: 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;
a0006e4c: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a0006e50: e2133001 ands r3, r3, #1
a0006e54: e58d302c str r3, [sp, #44] ; 0x2c
a0006e58: 0a000008 beq a0006e80 <_Heap_Walk+0x23c>
(*printer)(
a0006e5c: e59f22f0 ldr r2, [pc, #752] ; a0007154 <_Heap_Walk+0x510>
a0006e60: e1a00005 mov r0, r5
a0006e64: e3a01001 mov r1, #1
a0006e68: e1a03008 mov r3, r8
a0006e6c: e58dc01c str ip, [sp, #28]
a0006e70: e12fff34 blx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0006e74: e59dc01c ldr ip, [sp, #28]
a0006e78: e1a0800c mov r8, ip
a0006e7c: ea00009d b a00070f8 <_Heap_Walk+0x4b4>
);
return false;
}
if ( free_block->prev != prev_block ) {
a0006e80: e598300c ldr r3, [r8, #12]
a0006e84: e153000a cmp r3, sl
a0006e88: 0a000007 beq a0006eac <_Heap_Walk+0x268>
(*printer)(
a0006e8c: e58d3000 str r3, [sp]
a0006e90: e1a00005 mov r0, r5
a0006e94: e1a03008 mov r3, r8
a0006e98: e3a01001 mov r1, #1
a0006e9c: e59f22b4 ldr r2, [pc, #692] ; a0007158 <_Heap_Walk+0x514>
a0006ea0: e12fff34 blx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a0006ea4: e59d802c ldr r8, [sp, #44] ; 0x2c
a0006ea8: ea000092 b a00070f8 <_Heap_Walk+0x4b4>
return false;
}
prev_block = free_block;
free_block = free_block->next;
a0006eac: e1a0a008 mov sl, r8
a0006eb0: 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 ) {
a0006eb4: e1580006 cmp r8, r6
a0006eb8: 1affffca bne a0006de8 <_Heap_Walk+0x1a4>
a0006ebc: ea000000 b a0006ec4 <_Heap_Walk+0x280>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
a0006ec0: e1a07008 mov r7, r8
return true;
}
a0006ec4: 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;
a0006ec8: 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;
a0006ecc: 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);
a0006ed0: 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;
a0006ed4: e1520008 cmp r2, r8
a0006ed8: 83a0b000 movhi fp, #0
a0006edc: 8a000003 bhi a0006ef0 <_Heap_Walk+0x2ac>
a0006ee0: e596b024 ldr fp, [r6, #36] ; 0x24
a0006ee4: e15b0008 cmp fp, r8
a0006ee8: 33a0b000 movcc fp, #0
a0006eec: 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 ) ) {
a0006ef0: e21bb0ff ands fp, fp, #255 ; 0xff
a0006ef4: 1a000006 bne a0006f14 <_Heap_Walk+0x2d0>
(*printer)(
a0006ef8: e58d8000 str r8, [sp]
a0006efc: e1a00005 mov r0, r5
a0006f00: e3a01001 mov r1, #1
a0006f04: e59f2250 ldr r2, [pc, #592] ; a000715c <_Heap_Walk+0x518>
a0006f08: e1a03007 mov r3, r7
a0006f0c: e12fff34 blx r4
a0006f10: ea000059 b a000707c <_Heap_Walk+0x438>
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;
a0006f14: e59d2028 ldr r2, [sp, #40] ; 0x28
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a0006f18: e1a0000a mov r0, sl
a0006f1c: e1a01009 mov r1, r9
a0006f20: e057b002 subs fp, r7, r2
a0006f24: 13a0b001 movne fp, #1
a0006f28: e58d301c str r3, [sp, #28]
a0006f2c: ebffe6d0 bl a0000a74 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
a0006f30: e3500000 cmp r0, #0
a0006f34: e59d301c ldr r3, [sp, #28]
a0006f38: 0a000005 beq a0006f54 <_Heap_Walk+0x310>
a0006f3c: e35b0000 cmp fp, #0
(*printer)(
a0006f40: 158da000 strne sl, [sp]
a0006f44: 11a00005 movne r0, r5
a0006f48: 13a01001 movne r1, #1
a0006f4c: 159f220c ldrne r2, [pc, #524] ; a0007160 <_Heap_Walk+0x51c>
a0006f50: 1a000013 bne a0006fa4 <_Heap_Walk+0x360>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
a0006f54: e59dc024 ldr ip, [sp, #36] ; 0x24
a0006f58: e15a000c cmp sl, ip
a0006f5c: 2a000008 bcs a0006f84 <_Heap_Walk+0x340>
a0006f60: e35b0000 cmp fp, #0
a0006f64: 0a000006 beq a0006f84 <_Heap_Walk+0x340>
(*printer)(
a0006f68: e88d1400 stm sp, {sl, ip}
a0006f6c: e1a00005 mov r0, r5
a0006f70: e3a01001 mov r1, #1
a0006f74: e59f21e8 ldr r2, [pc, #488] ; a0007164 <_Heap_Walk+0x520>
a0006f78: e1a03007 mov r3, r7
a0006f7c: e12fff34 blx r4
a0006f80: ea000064 b a0007118 <_Heap_Walk+0x4d4>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
a0006f84: e1580007 cmp r8, r7
a0006f88: 8a000008 bhi a0006fb0 <_Heap_Walk+0x36c>
a0006f8c: e35b0000 cmp fp, #0
a0006f90: 0a000006 beq a0006fb0 <_Heap_Walk+0x36c>
(*printer)(
a0006f94: e59f21cc ldr r2, [pc, #460] ; a0007168 <_Heap_Walk+0x524>
a0006f98: e58d8000 str r8, [sp]
a0006f9c: e1a00005 mov r0, r5
a0006fa0: e3a01001 mov r1, #1
a0006fa4: e1a03007 mov r3, r7
a0006fa8: e12fff34 blx r4
a0006fac: ea000059 b a0007118 <_Heap_Walk+0x4d4>
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;
a0006fb0: e203b001 and fp, r3, #1
a0006fb4: e5983004 ldr r3, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
a0006fb8: e3130001 tst r3, #1
a0006fbc: 1a000038 bne a00070a4 <_Heap_Walk+0x460>
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 ?
a0006fc0: 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)(
a0006fc4: e5963008 ldr r3, [r6, #8]
block = next_block;
} while ( block != first_block );
return true;
}
a0006fc8: 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)(
a0006fcc: e1520003 cmp r2, r3
a0006fd0: 059f0194 ldreq r0, [pc, #404] ; a000716c <_Heap_Walk+0x528>
a0006fd4: 0a000003 beq a0006fe8 <_Heap_Walk+0x3a4>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
a0006fd8: e59f3190 ldr r3, [pc, #400] ; a0007170 <_Heap_Walk+0x52c>
a0006fdc: e1520006 cmp r2, r6
a0006fe0: e59f018c ldr r0, [pc, #396] ; a0007174 <_Heap_Walk+0x530>
a0006fe4: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
a0006fe8: 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)(
a0006fec: e1530001 cmp r3, r1
a0006ff0: 059f1180 ldreq r1, [pc, #384] ; a0007178 <_Heap_Walk+0x534>
a0006ff4: 0a000003 beq a0007008 <_Heap_Walk+0x3c4>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
a0006ff8: e59fc17c ldr ip, [pc, #380] ; a000717c <_Heap_Walk+0x538>
a0006ffc: e1530006 cmp r3, r6
a0007000: e59f116c ldr r1, [pc, #364] ; a0007174 <_Heap_Walk+0x530>
a0007004: 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)(
a0007008: e58d2004 str r2, [sp, #4]
a000700c: e58d0008 str r0, [sp, #8]
a0007010: e58d300c str r3, [sp, #12]
a0007014: e58d1010 str r1, [sp, #16]
a0007018: e1a03007 mov r3, r7
a000701c: e58da000 str sl, [sp]
a0007020: e1a00005 mov r0, r5
a0007024: e3a01000 mov r1, #0
a0007028: e59f2150 ldr r2, [pc, #336] ; a0007180 <_Heap_Walk+0x53c>
a000702c: e12fff34 blx r4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
a0007030: e5983000 ldr r3, [r8]
a0007034: e15a0003 cmp sl, r3
a0007038: 0a000008 beq a0007060 <_Heap_Walk+0x41c>
(*printer)(
a000703c: e58d3004 str r3, [sp, #4]
a0007040: e58da000 str sl, [sp]
a0007044: e58d8008 str r8, [sp, #8]
a0007048: e1a00005 mov r0, r5
a000704c: e3a01001 mov r1, #1
a0007050: e59f212c ldr r2, [pc, #300] ; a0007184 <_Heap_Walk+0x540>
a0007054: e1a03007 mov r3, r7
a0007058: e12fff34 blx r4
a000705c: ea00002d b a0007118 <_Heap_Walk+0x4d4>
);
return false;
}
if ( !prev_used ) {
a0007060: e35b0000 cmp fp, #0
a0007064: 1a000006 bne a0007084 <_Heap_Walk+0x440>
(*printer)(
a0007068: e59f2118 ldr r2, [pc, #280] ; a0007188 <_Heap_Walk+0x544>
a000706c: e1a00005 mov r0, r5
a0007070: e3a01001 mov r1, #1
a0007074: e1a03007 mov r3, r7
a0007078: e12fff34 blx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a000707c: e1a0800b mov r8, fp
a0007080: ea00001c b a00070f8 <_Heap_Walk+0x4b4>
block = next_block;
} while ( block != first_block );
return true;
}
a0007084: e5963008 ldr r3, [r6, #8]
a0007088: ea000002 b a0007098 <_Heap_Walk+0x454>
{
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 ) {
a000708c: e1530007 cmp r3, r7
a0007090: 0a000014 beq a00070e8 <_Heap_Walk+0x4a4>
return true;
}
free_block = free_block->next;
a0007094: 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 ) {
a0007098: e1530006 cmp r3, r6
a000709c: 1afffffa bne a000708c <_Heap_Walk+0x448>
a00070a0: ea000017 b a0007104 <_Heap_Walk+0x4c0>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
a00070a4: e35b0000 cmp fp, #0
a00070a8: 0a000006 beq a00070c8 <_Heap_Walk+0x484>
(*printer)(
a00070ac: e58da000 str sl, [sp]
a00070b0: e1a00005 mov r0, r5
a00070b4: e3a01000 mov r1, #0
a00070b8: e59f20cc ldr r2, [pc, #204] ; a000718c <_Heap_Walk+0x548>
a00070bc: e1a03007 mov r3, r7
a00070c0: e12fff34 blx r4
a00070c4: ea000007 b a00070e8 <_Heap_Walk+0x4a4>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
a00070c8: e58da000 str sl, [sp]
a00070cc: e5973000 ldr r3, [r7]
a00070d0: e1a00005 mov r0, r5
a00070d4: e1a0100b mov r1, fp
a00070d8: e58d3004 str r3, [sp, #4]
a00070dc: e59f20ac ldr r2, [pc, #172] ; a0007190 <_Heap_Walk+0x54c>
a00070e0: e1a03007 mov r3, r7
a00070e4: e12fff34 blx r4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
a00070e8: e59d2020 ldr r2, [sp, #32]
a00070ec: e1580002 cmp r8, r2
a00070f0: 1affff72 bne a0006ec0 <_Heap_Walk+0x27c>
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;
a00070f4: e3a08001 mov r8, #1
block = next_block;
} while ( block != first_block );
return true;
}
a00070f8: e1a00008 mov r0, r8
a00070fc: e28dd030 add sp, sp, #48 ; 0x30
a0007100: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
a0007104: e59f2088 ldr r2, [pc, #136] ; a0007194 <_Heap_Walk+0x550>
a0007108: e1a00005 mov r0, r5
a000710c: e3a01001 mov r1, #1
a0007110: e1a03007 mov r3, r7
a0007114: e12fff34 blx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a0007118: e3a08000 mov r8, #0
a000711c: eafffff5 b a00070f8 <_Heap_Walk+0x4b4>
a0005e20 <_TOD_Validate>:
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
a0005e20: e59f30b4 ldr r3, [pc, #180] ; a0005edc <_TOD_Validate+0xbc>
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
a0005e24: e92d4010 push {r4, lr}
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
a0005e28: e2504000 subs r4, r0, #0
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
a0005e2c: e593100c ldr r1, [r3, #12]
if ((!the_tod) ||
a0005e30: 0a000021 beq a0005ebc <_TOD_Validate+0x9c>
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
a0005e34: e59f00a4 ldr r0, [pc, #164] ; a0005ee0 <_TOD_Validate+0xc0>
a0005e38: eb0042d5 bl a0016994 <__aeabi_uidiv>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
a0005e3c: e5943018 ldr r3, [r4, #24]
a0005e40: e1530000 cmp r3, r0
a0005e44: 2a000020 bcs a0005ecc <_TOD_Validate+0xac>
(the_tod->ticks >= ticks_per_second) ||
a0005e48: e5943014 ldr r3, [r4, #20]
a0005e4c: e353003b cmp r3, #59 ; 0x3b
a0005e50: 8a00001d bhi a0005ecc <_TOD_Validate+0xac>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
a0005e54: e5943010 ldr r3, [r4, #16]
a0005e58: e353003b cmp r3, #59 ; 0x3b
a0005e5c: 8a00001a bhi a0005ecc <_TOD_Validate+0xac>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
a0005e60: e594300c ldr r3, [r4, #12]
a0005e64: e3530017 cmp r3, #23
a0005e68: 8a000017 bhi a0005ecc <_TOD_Validate+0xac>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
a0005e6c: e5943004 ldr r3, [r4, #4]
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
a0005e70: e3530000 cmp r3, #0
a0005e74: 0a000012 beq a0005ec4 <_TOD_Validate+0xa4>
(the_tod->month == 0) ||
a0005e78: e353000c cmp r3, #12
a0005e7c: 8a000012 bhi a0005ecc <_TOD_Validate+0xac>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
a0005e80: e5942000 ldr r2, [r4]
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
a0005e84: e59f1058 ldr r1, [pc, #88] ; a0005ee4 <_TOD_Validate+0xc4>
a0005e88: e1520001 cmp r2, r1
a0005e8c: 9a000010 bls a0005ed4 <_TOD_Validate+0xb4>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
a0005e90: e5940008 ldr r0, [r4, #8]
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
a0005e94: e3500000 cmp r0, #0
a0005e98: 0a00000e beq a0005ed8 <_TOD_Validate+0xb8>
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
a0005e9c: e3120003 tst r2, #3
a0005ea0: e59f2040 ldr r2, [pc, #64] ; a0005ee8 <_TOD_Validate+0xc8>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
a0005ea4: 0283300d addeq r3, r3, #13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a0005ea8: e7924103 ldr r4, [r2, r3, lsl #2]
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
a0005eac: e1500004 cmp r0, r4
a0005eb0: 83a00000 movhi r0, #0
a0005eb4: 93a00001 movls r0, #1
a0005eb8: e8bd8010 pop {r4, pc}
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
a0005ebc: e1a00004 mov r0, r4 <== NOT EXECUTED
a0005ec0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0005ec4: e1a00003 mov r0, r3 <== NOT EXECUTED
a0005ec8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0005ecc: e3a00000 mov r0, #0
a0005ed0: e8bd8010 pop {r4, pc}
a0005ed4: e3a00000 mov r0, #0
if ( the_tod->day > days_in_month )
return false;
return true;
}
a0005ed8: e8bd8010 pop {r4, pc}
a0007140 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a0007140: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
a0007144: e3a06000 mov r6, #0
a0007148: e58160f4 str r6, [r1, #244] ; 0xf4
a000714c: e58160f8 str r6, [r1, #248] ; 0xf8
extensions_area = NULL;
the_thread->libc_reent = NULL;
a0007150: e58160f0 str r6, [r1, #240] ; 0xf0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a0007154: e1a05000 mov r5, r0
a0007158: e1a04001 mov r4, r1
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
a000715c: e1a00001 mov r0, r1
a0007160: e1a01003 mov r1, r3
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a0007164: e1a07003 mov r7, r3
a0007168: e59da024 ldr sl, [sp, #36] ; 0x24
a000716c: e5dd8028 ldrb r8, [sp, #40] ; 0x28
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
a0007170: eb00020e bl a00079b0 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
a0007174: e1500006 cmp r0, r6
a0007178: 13a03000 movne r3, #0
a000717c: 03a03001 moveq r3, #1
a0007180: e1500007 cmp r0, r7
a0007184: 21a07003 movcs r7, r3
a0007188: 33837001 orrcc r7, r3, #1
a000718c: e1570006 cmp r7, r6
a0007190: 1a000058 bne a00072f8 <_Thread_Initialize+0x1b8>
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
a0007194: e59430bc ldr r3, [r4, #188] ; 0xbc
the_stack->size = size;
a0007198: e58400b4 str r0, [r4, #180] ; 0xb4
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000719c: e5847050 str r7, [r4, #80] ; 0x50
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
a00071a0: e58430b8 str r3, [r4, #184] ; 0xb8
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
a00071a4: e59f315c ldr r3, [pc, #348] ; a0007308 <_Thread_Initialize+0x1c8>
the_watchdog->routine = routine;
a00071a8: e5847064 str r7, [r4, #100] ; 0x64
the_watchdog->id = id;
a00071ac: e5847068 str r7, [r4, #104] ; 0x68
a00071b0: e5936000 ldr r6, [r3]
the_watchdog->user_data = user_data;
a00071b4: e584706c str r7, [r4, #108] ; 0x6c
a00071b8: e3560000 cmp r6, #0
a00071bc: 0a000004 beq a00071d4 <_Thread_Initialize+0x94>
extensions_area = _Workspace_Allocate(
a00071c0: e2866001 add r6, r6, #1
a00071c4: e1a00106 lsl r0, r6, #2
a00071c8: eb0003dc bl a0008140 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
a00071cc: e2506000 subs r6, r0, #0
a00071d0: 0a00002f beq a0007294 <_Thread_Initialize+0x154>
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
a00071d4: e3560000 cmp r6, #0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
a00071d8: e58460fc str r6, [r4, #252] ; 0xfc
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
a00071dc: 0a000009 beq a0007208 <_Thread_Initialize+0xc8>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
a00071e0: e59f3120 ldr r3, [pc, #288] ; a0007308 <_Thread_Initialize+0x1c8>
a00071e4: e1a02006 mov r2, r6
a00071e8: e5930000 ldr r0, [r3]
a00071ec: e3a03000 mov r3, #0
the_thread->extensions[i] = NULL;
a00071f0: e1a01003 mov r1, r3
a00071f4: ea000001 b a0007200 <_Thread_Initialize+0xc0>
a00071f8: e4821004 str r1, [r2], #4
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
a00071fc: e2833001 add r3, r3, #1
a0007200: e1530000 cmp r3, r0
a0007204: 9afffffb bls a00071f8 <_Thread_Initialize+0xb8>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
a0007208: e59d302c ldr r3, [sp, #44] ; 0x2c
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return
the_scheduler->Operations.scheduler_allocate( the_scheduler, the_thread );
a000720c: e59f00f8 ldr r0, [pc, #248] ; a000730c <_Thread_Initialize+0x1cc>
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
a0007210: e3a07000 mov r7, #0
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
a0007214: e58430a4 str r3, [r4, #164] ; 0xa4
the_thread->Start.budget_callout = budget_callout;
a0007218: e59d3030 ldr r3, [sp, #48] ; 0x30
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
a000721c: e3a09001 mov r9, #1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
a0007220: e5c480a0 strb r8, [r4, #160] ; 0xa0
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
a0007224: e58430a8 str r3, [r4, #168] ; 0xa8
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
a0007228: e59d3034 ldr r3, [sp, #52] ; 0x34
the_thread->current_state = STATES_DORMANT;
a000722c: e5849010 str r9, [r4, #16]
the_thread->Wait.queue = NULL;
a0007230: e5847044 str r7, [r4, #68] ; 0x44
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
a0007234: e58430ac str r3, [r4, #172] ; 0xac
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
a0007238: e584701c str r7, [r4, #28]
the_thread->real_priority = priority;
a000723c: e584a018 str sl, [r4, #24]
the_thread->Start.initial_priority = priority;
a0007240: e584a0b0 str sl, [r4, #176] ; 0xb0
RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return
a0007244: e5903014 ldr r3, [r0, #20]
a0007248: e1a01004 mov r1, r4
a000724c: e12fff33 blx r3
sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread );
if ( !sched )
a0007250: e2508000 subs r8, r0, #0
a0007254: 0a00000f beq a0007298 <_Thread_Initialize+0x158>
goto failed;
_Thread_Set_priority( the_thread, priority );
a0007258: e1a00004 mov r0, r4
a000725c: e1a0100a mov r1, sl
a0007260: eb000192 bl a00078b0 <_Thread_Set_priority>
_Thread_Stack_Free( the_thread );
return false;
}
a0007264: e595301c ldr r3, [r5, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a0007268: e1d420b8 ldrh r2, [r4, #8]
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
a000726c: e5847084 str r7, [r4, #132] ; 0x84
a0007270: e5847088 str r7, [r4, #136] ; 0x88
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0007274: e7834102 str r4, [r3, r2, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0007278: e59d3038 ldr r3, [sp, #56] ; 0x38
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
a000727c: e1a00004 mov r0, r4
a0007280: e584300c str r3, [r4, #12]
a0007284: eb0002ac bl a0007d3c <_User_extensions_Thread_create>
if ( extension_status )
a0007288: e1500007 cmp r0, r7
a000728c: 0a000001 beq a0007298 <_Thread_Initialize+0x158>
a0007290: ea00001a b a0007300 <_Thread_Initialize+0x1c0>
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
a0007294: e1a08006 mov r8, r6
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
a0007298: e59400f0 ldr r0, [r4, #240] ; 0xf0
a000729c: e3500000 cmp r0, #0
a00072a0: 0a000000 beq a00072a8 <_Thread_Initialize+0x168>
_Workspace_Free( the_thread->libc_reent );
a00072a4: eb0003ab bl a0008158 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
a00072a8: e59400f4 ldr r0, [r4, #244] ; 0xf4
a00072ac: e3500000 cmp r0, #0
a00072b0: 0a000000 beq a00072b8 <_Thread_Initialize+0x178>
_Workspace_Free( the_thread->API_Extensions[i] );
a00072b4: eb0003a7 bl a0008158 <_Workspace_Free>
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
a00072b8: e59400f8 ldr r0, [r4, #248] ; 0xf8
a00072bc: e3500000 cmp r0, #0
a00072c0: 0a000000 beq a00072c8 <_Thread_Initialize+0x188>
_Workspace_Free( the_thread->API_Extensions[i] );
a00072c4: eb0003a3 bl a0008158 <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
a00072c8: e3560000 cmp r6, #0
a00072cc: 0a000001 beq a00072d8 <_Thread_Initialize+0x198>
(void) _Workspace_Free( extensions_area );
a00072d0: e1a00006 mov r0, r6
a00072d4: eb00039f bl a0008158 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
if ( sched )
a00072d8: e3580000 cmp r8, #0
a00072dc: 0a000001 beq a00072e8 <_Thread_Initialize+0x1a8>
(void) _Workspace_Free( sched );
a00072e0: e1a00008 mov r0, r8
a00072e4: eb00039b bl a0008158 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
a00072e8: e1a00004 mov r0, r4
a00072ec: eb0001c6 bl a0007a0c <_Thread_Stack_Free>
return false;
a00072f0: e3a00000 mov r0, #0
a00072f4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
a00072f8: e1a00006 mov r0, r6
a00072fc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
a0007300: e1a00009 mov r0, r9
_Thread_Stack_Free( the_thread );
return false;
}
a0007304: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a00096f8 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
a00096f8: e5902000 ldr r2, [r0]
a00096fc: e5913000 ldr r3, [r1]
a0009700: e1520003 cmp r2, r3
return true;
a0009704: c3a00001 movgt r0, #1
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
a0009708: c12fff1e bxgt lr
return true;
if ( lhs->tv_sec < rhs->tv_sec )
a000970c: ba000005 blt a0009728 <_Timespec_Greater_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
a0009710: e5900004 ldr r0, [r0, #4]
a0009714: e5913004 ldr r3, [r1, #4]
a0009718: e1500003 cmp r0, r3
a000971c: d3a00000 movle r0, #0
a0009720: c3a00001 movgt r0, #1
a0009724: e12fff1e bx lr
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
a0009728: e3a00000 mov r0, #0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
a000972c: e12fff1e bx lr
a001f55c <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
a001f55c: e3a00000 mov r0, #0 <== NOT EXECUTED
a001f560: e12fff1e bx lr <== NOT EXECUTED
a0001d64 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
a0001d64: eaffffe5 b a0001d00 <gettimeofday> <== NOT EXECUTED
a0008554 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
a0008554: 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 ) )
a0008558: e3d27007 bics r7, r2, #7
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
a000855c: e1a09000 mov r9, r0
a0008560: e1a04001 mov r4, r1
a0008564: 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 ) )
a0008568: 0a000002 beq a0008578 <devFS_evaluate_path+0x24>
rtems_set_errno_and_return_minus_one( EPERM );
a000856c: eb000670 bl a0009f34 <__errno> <== NOT EXECUTED
a0008570: e3a03001 mov r3, #1 <== NOT EXECUTED
a0008574: ea000005 b a0008590 <devFS_evaluate_path+0x3c> <== NOT EXECUTED
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
a0008578: e5936000 ldr r6, [r3]
if (!device_name_table)
a000857c: e3560000 cmp r6, #0
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
a0008580: 159fa094 ldrne sl, [pc, #148] ; a000861c <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)
a0008584: 1a00001c bne a00085fc <devFS_evaluate_path+0xa8>
rtems_set_errno_and_return_minus_one( EFAULT );
a0008588: eb000669 bl a0009f34 <__errno>
a000858c: e3a0300e mov r3, #14
a0008590: e5803000 str r3, [r0]
a0008594: e3e00000 mvn r0, #0
a0008598: 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)
a000859c: e5968000 ldr r8, [r6]
a00085a0: e3580000 cmp r8, #0
a00085a4: 0a000012 beq a00085f4 <devFS_evaluate_path+0xa0>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
a00085a8: e1a00009 mov r0, r9
a00085ac: e1a01008 mov r1, r8
a00085b0: e1a02004 mov r2, r4
a00085b4: eb0009e5 bl a000ad50 <strncmp>
a00085b8: e3500000 cmp r0, #0
a00085bc: 1a00000c bne a00085f4 <devFS_evaluate_path+0xa0>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
a00085c0: e7d80004 ldrb r0, [r8, r4]
a00085c4: e3500000 cmp r0, #0
a00085c8: 1a000009 bne a00085f4 <devFS_evaluate_path+0xa0>
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
a00085cc: e59f304c ldr r3, [pc, #76] ; a0008620 <devFS_evaluate_path+0xcc>
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
a00085d0: e5856000 str r6, [r5]
pathloc->handlers = &devFS_file_handlers;
a00085d4: e5853008 str r3, [r5, #8]
pathloc->ops = &devFS_ops;
a00085d8: e59f3044 ldr r3, [pc, #68] ; a0008624 <devFS_evaluate_path+0xd0>
a00085dc: e585300c str r3, [r5, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
a00085e0: e59f3040 ldr r3, [pc, #64] ; a0008628 <devFS_evaluate_path+0xd4>
a00085e4: e5933000 ldr r3, [r3]
a00085e8: e5933028 ldr r3, [r3, #40] ; 0x28
a00085ec: e5853010 str r3, [r5, #16]
return 0;
a00085f0: 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++) {
a00085f4: e2877001 add r7, r7, #1
a00085f8: e2866014 add r6, r6, #20
a00085fc: e59a3000 ldr r3, [sl]
a0008600: e1570003 cmp r7, r3
a0008604: 3affffe4 bcc a000859c <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 );
a0008608: eb000649 bl a0009f34 <__errno>
a000860c: e3a03002 mov r3, #2
a0008610: e5803000 str r3, [r0]
a0008614: e3e00000 mvn r0, #0
}
a0008618: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a0002ad8 <drainOutput>:
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
a0002ad8: e59030b4 ldr r3, [r0, #180] ; 0xb4
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
a0002adc: e92d4030 push {r4, r5, lr}
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
a0002ae0: e3530000 cmp r3, #0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
a0002ae4: e1a04000 mov r4, r0
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
a0002ae8: 0a000011 beq a0002b34 <drainOutput+0x5c>
rtems_interrupt_disable (level);
a0002aec: ebfffff5 bl a0002ac8 <arm_interrupt_disable>
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
a0002af0: 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) {
a0002af4: ea000009 b a0002b20 <drainOutput+0x48>
tty->rawOutBufState = rob_wait;
a0002af8: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0002afc: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
a0002b00: e3a01000 mov r1, #0 <== NOT EXECUTED
a0002b04: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
a0002b08: e1a02001 mov r2, r1 <== NOT EXECUTED
a0002b0c: eb0008cb bl a0004e40 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
a0002b10: e3500000 cmp r0, #0 <== NOT EXECUTED
a0002b14: 0a000000 beq a0002b1c <drainOutput+0x44> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
a0002b18: eb000a62 bl a00054a8 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
a0002b1c: ebffffe9 bl a0002ac8 <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) {
a0002b20: e5942084 ldr r2, [r4, #132] ; 0x84
a0002b24: e5943080 ldr r3, [r4, #128] ; 0x80
a0002b28: e1520003 cmp r2, r3
a0002b2c: 1afffff1 bne a0002af8 <drainOutput+0x20>
a0002b30: e129f000 msr CPSR_fc, r0
a0002b34: e8bd8030 pop {r4, r5, pc}
a00037ac <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)
a00037ac: e5903020 ldr r3, [r0, #32]
* FIXME: Needs support for WERASE and ECHOPRT.
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
a00037b0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
if (tty->ccount == 0)
a00037b4: 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)
{
a00037b8: e1a04000 mov r4, r0
a00037bc: e1a07001 mov r7, r1
if (tty->ccount == 0)
a00037c0: 0a000067 beq a0003964 <erase+0x1b8>
return;
if (lineFlag) {
a00037c4: e3510000 cmp r1, #0
a00037c8: 0a000061 beq a0003954 <erase+0x1a8>
if (!(tty->termios.c_lflag & ECHO)) {
a00037cc: e590303c ldr r3, [r0, #60] ; 0x3c
a00037d0: e2132008 ands r2, r3, #8
a00037d4: 1a000001 bne a00037e0 <erase+0x34>
tty->ccount = 0;
a00037d8: e5802020 str r2, [r0, #32] <== NOT EXECUTED
return;
a00037dc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
a00037e0: e2133010 ands r3, r3, #16
a00037e4: 1a00005a bne a0003954 <erase+0x1a8>
tty->ccount = 0;
a00037e8: e5803020 str r3, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
a00037ec: e1a01004 mov r1, r4 <== NOT EXECUTED
a00037f0: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED
a00037f4: ebffffc9 bl a0003720 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
a00037f8: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
a00037fc: e3130020 tst r3, #32 <== NOT EXECUTED
echo ('\n', tty);
a0003800: 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)
a0003804: 0a000056 beq a0003964 <erase+0x1b8> <== NOT EXECUTED
a0003808: ea00000b b a000383c <erase+0x90> <== NOT EXECUTED
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
a000380c: e594303c ldr r3, [r4, #60] ; 0x3c
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
a0003810: e594001c ldr r0, [r4, #28]
a0003814: e2411001 sub r1, r1, #1
a0003818: e5841020 str r1, [r4, #32]
if (tty->termios.c_lflag & ECHO) {
a000381c: e3130008 tst r3, #8
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
a0003820: e7d05001 ldrb r5, [r0, r1]
if (tty->termios.c_lflag & ECHO) {
a0003824: 0a000047 beq a0003948 <erase+0x19c>
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
a0003828: e3570000 cmp r7, #0
a000382c: 1a000005 bne a0003848 <erase+0x9c>
a0003830: e3130010 tst r3, #16
a0003834: 1a000003 bne a0003848 <erase+0x9c>
echo (tty->termios.c_cc[VERASE], tty);
a0003838: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED
a000383c: e1a01004 mov r1, r4 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
a0003840: 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);
a0003844: eaffffb5 b a0003720 <echo> <== NOT EXECUTED
} else if (c == '\t') {
a0003848: e3550009 cmp r5, #9
a000384c: 1a00001f bne a00038d0 <erase+0x124>
int col = tty->read_start_column;
a0003850: 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)) {
a0003854: 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;
a0003858: 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)
a000385c: e2033c02 and r3, r3, #512 ; 0x200
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
a0003860: ea00000c b a0003898 <erase+0xec>
c = tty->cbuf[i++];
a0003864: e7d0c002 ldrb ip, [r0, r2]
a0003868: e2822001 add r2, r2, #1
if (c == '\t') {
a000386c: e35c0009 cmp ip, #9
col = (col | 7) + 1;
a0003870: 03855007 orreq r5, r5, #7
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
a0003874: 0a000006 beq a0003894 <erase+0xe8>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
a0003878: e088c00c add ip, r8, ip
a000387c: e5dcc001 ldrb ip, [ip, #1]
a0003880: e31c0020 tst ip, #32
a0003884: 0a000002 beq a0003894 <erase+0xe8>
if (tty->termios.c_lflag & ECHOCTL)
a0003888: e3530000 cmp r3, #0 <== NOT EXECUTED
col += 2;
a000388c: 12855002 addne r5, r5, #2 <== NOT EXECUTED
a0003890: ea000000 b a0003898 <erase+0xec> <== NOT EXECUTED
} else {
col++;
a0003894: e2855001 add r5, r5, #1
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
a0003898: e1520001 cmp r2, r1
a000389c: 1afffff0 bne a0003864 <erase+0xb8>
a00038a0: ea000006 b a00038c0 <erase+0x114>
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
a00038a4: e59f00bc ldr r0, [pc, #188] ; a0003968 <erase+0x1bc>
a00038a8: e3a01001 mov r1, #1
a00038ac: e1a02004 mov r2, r4
a00038b0: ebffff05 bl a00034cc <rtems_termios_puts>
tty->column--;
a00038b4: e5943028 ldr r3, [r4, #40] ; 0x28
a00038b8: e2433001 sub r3, r3, #1
a00038bc: e5843028 str r3, [r4, #40] ; 0x28
}
/*
* Back up over the tab
*/
while (tty->column > col) {
a00038c0: e5943028 ldr r3, [r4, #40] ; 0x28
a00038c4: e1530005 cmp r3, r5
a00038c8: cafffff5 bgt a00038a4 <erase+0xf8>
a00038cc: ea00001d b a0003948 <erase+0x19c>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
a00038d0: e5962000 ldr r2, [r6]
a00038d4: e2855001 add r5, r5, #1
a00038d8: e7d22005 ldrb r2, [r2, r5]
a00038dc: e3120020 tst r2, #32
a00038e0: 0a000009 beq a000390c <erase+0x160>
a00038e4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
a00038e8: 0a000007 beq a000390c <erase+0x160> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
a00038ec: e59f0078 ldr r0, [pc, #120] ; a000396c <erase+0x1c0> <== NOT EXECUTED
a00038f0: e3a01003 mov r1, #3 <== NOT EXECUTED
a00038f4: e1a02004 mov r2, r4 <== NOT EXECUTED
a00038f8: ebfffef3 bl a00034cc <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
a00038fc: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
a0003900: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
a0003904: 12433001 subne r3, r3, #1 <== NOT EXECUTED
a0003908: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
a000390c: e5963000 ldr r3, [r6]
a0003910: e7d33005 ldrb r3, [r3, r5]
a0003914: e3130020 tst r3, #32
a0003918: 0a000002 beq a0003928 <erase+0x17c>
a000391c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
a0003920: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
a0003924: 0a000007 beq a0003948 <erase+0x19c> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
a0003928: e59f003c ldr r0, [pc, #60] ; a000396c <erase+0x1c0>
a000392c: e3a01003 mov r1, #3
a0003930: e1a02004 mov r2, r4
a0003934: ebfffee4 bl a00034cc <rtems_termios_puts>
if (tty->column)
a0003938: e5943028 ldr r3, [r4, #40] ; 0x28
a000393c: e3530000 cmp r3, #0
tty->column--;
a0003940: 12433001 subne r3, r3, #1
a0003944: 15843028 strne r3, [r4, #40] ; 0x28
}
}
}
if (!lineFlag)
a0003948: e3570000 cmp r7, #0
a000394c: 1a000001 bne a0003958 <erase+0x1ac>
a0003950: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a0003954: e59f6014 ldr r6, [pc, #20] ; a0003970 <erase+0x1c4>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
a0003958: e5941020 ldr r1, [r4, #32]
a000395c: e3510000 cmp r1, #0
a0003960: 1affffa9 bne a000380c <erase+0x60>
a0003964: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a0002530 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
a0002530: e92d000e push {r1, r2, r3}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
a0002534: e59f21a8 ldr r2, [pc, #424] ; a00026e4 <fcntl+0x1b4>
int fcntl(
int fd,
int cmd,
...
)
{
a0002538: e92d40f1 push {r0, r4, r5, r6, r7, lr}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
a000253c: e5921000 ldr r1, [r2]
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
a0002540: e28d301c add r3, sp, #28
int fcntl(
int fd,
int cmd,
...
)
{
a0002544: e59d7018 ldr r7, [sp, #24]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
a0002548: e1500001 cmp r0, r1
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
a000254c: e58d3000 str r3, [sp]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
a0002550: 2a000006 bcs a0002570 <fcntl+0x40>
iop = rtems_libio_iop( fd );
a0002554: e59f218c ldr r2, [pc, #396] ; a00026e8 <fcntl+0x1b8>
a0002558: e3a04038 mov r4, #56 ; 0x38
a000255c: e5922000 ldr r2, [r2]
a0002560: e0242490 mla r4, r0, r4, r2
rtems_libio_check_is_open(iop);
a0002564: e5940014 ldr r0, [r4, #20]
a0002568: e3100c01 tst r0, #256 ; 0x100
a000256c: 1a000002 bne a000257c <fcntl+0x4c>
a0002570: eb0029bd bl a000cc6c <__errno>
a0002574: e3a03009 mov r3, #9
a0002578: ea000047 b a000269c <fcntl+0x16c>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
a000257c: e3570009 cmp r7, #9
a0002580: 979ff107 ldrls pc, [pc, r7, lsl #2]
a0002584: ea000042 b a0002694 <fcntl+0x164>
a0002588: a00025b0 .word 0xa00025b0
a000258c: a0002620 .word 0xa0002620
a0002590: a0002630 .word 0xa0002630
a0002594: a0002650 .word 0xa0002650
a0002598: a000265c .word 0xa000265c
a000259c: a0002688 .word 0xa0002688
a00025a0: a0002688 .word 0xa0002688
a00025a4: a0002688 .word 0xa0002688
a00025a8: a0002688 .word 0xa0002688
a00025ac: a0002688 .word 0xa0002688
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
a00025b0: e5933000 ldr r3, [r3]
if ( fd2 )
a00025b4: e3530000 cmp r3, #0
a00025b8: 0a000004 beq a00025d0 <fcntl+0xa0>
diop = rtems_libio_iop( fd2 );
a00025bc: e1530001 cmp r3, r1
a00025c0: 33a06038 movcc r6, #56 ; 0x38
a00025c4: 30262693 mlacc r6, r3, r6, r2
a00025c8: 3a000005 bcc a00025e4 <fcntl+0xb4>
a00025cc: ea000003 b a00025e0 <fcntl+0xb0> <== NOT EXECUTED
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
a00025d0: eb00019c bl a0002c48 <rtems_libio_allocate>
if ( diop == 0 ) {
a00025d4: e2506000 subs r6, r0, #0
a00025d8: 1a000001 bne a00025e4 <fcntl+0xb4>
a00025dc: ea00003b b a00026d0 <fcntl+0x1a0> <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
a00025e0: e3a06000 mov r6, #0 <== NOT EXECUTED
ret = -1;
break;
}
}
diop->flags = iop->flags;
a00025e4: e5943014 ldr r3, [r4, #20]
diop->pathinfo = iop->pathinfo;
a00025e8: e286c018 add ip, r6, #24
a00025ec: e2845018 add r5, r4, #24
ret = -1;
break;
}
}
diop->flags = iop->flags;
a00025f0: e5863014 str r3, [r6, #20]
diop->pathinfo = iop->pathinfo;
a00025f4: e8b5000f ldm r5!, {r0, r1, r2, r3}
a00025f8: e8ac000f stmia ip!, {r0, r1, r2, r3}
a00025fc: e5953000 ldr r3, [r5]
a0002600: e58c3000 str r3, [ip]
ret = (int) (diop - rtems_libio_iops);
a0002604: e59f30dc ldr r3, [pc, #220] ; a00026e8 <fcntl+0x1b8>
a0002608: e5933000 ldr r3, [r3]
a000260c: e0636006 rsb r6, r3, r6
a0002610: e59f30d4 ldr r3, [pc, #212] ; a00026ec <fcntl+0x1bc>
a0002614: e1a061c6 asr r6, r6, #3
a0002618: e0060693 mul r6, r3, r6
a000261c: ea000020 b a00026a4 <fcntl+0x174>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
a0002620: e3100b02 tst r0, #2048 ; 0x800
a0002624: 03a06000 moveq r6, #0
a0002628: 13a06001 movne r6, #1
a000262c: ea00001e b a00026ac <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 ) )
a0002630: e5936000 ldr r6, [r3]
a0002634: e3560000 cmp r6, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
a0002638: 13800b02 orrne r0, r0, #2048 ; 0x800
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
a000263c: 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;
a0002640: 15840014 strne r0, [r4, #20]
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
a0002644: 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 ) )
a0002648: 0a000017 beq a00026ac <fcntl+0x17c>
a000264c: ea00000b b a0002680 <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 );
a0002650: eb00016a bl a0002c00 <rtems_libio_to_fcntl_flags>
a0002654: e1a06000 mov r6, r0
a0002658: ea000011 b a00026a4 <fcntl+0x174>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
a000265c: e5930000 ldr r0, [r3]
a0002660: eb000159 bl a0002bcc <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
a0002664: e5942014 ldr r2, [r4, #20]
a0002668: e59f3080 ldr r3, [pc, #128] ; a00026f0 <fcntl+0x1c0>
a000266c: e3c22c02 bic r2, r2, #512 ; 0x200
a0002670: e0003003 and r3, r0, r3
a0002674: e3c22001 bic r2, r2, #1
a0002678: e1833002 orr r3, r3, r2
a000267c: e5843014 str r3, [r4, #20]
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
a0002680: e3a06000 mov r6, #0
a0002684: ea000008 b a00026ac <fcntl+0x17c>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
a0002688: eb002977 bl a000cc6c <__errno>
a000268c: e3a03086 mov r3, #134 ; 0x86
a0002690: ea000001 b a000269c <fcntl+0x16c>
ret = -1;
break;
default:
errno = EINVAL;
a0002694: eb002974 bl a000cc6c <__errno>
a0002698: e3a03016 mov r3, #22
a000269c: e5803000 str r3, [r0]
a00026a0: ea00000a b a00026d0 <fcntl+0x1a0>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
a00026a4: e3560000 cmp r6, #0
a00026a8: ba000009 blt a00026d4 <fcntl+0x1a4>
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
a00026ac: e5943020 ldr r3, [r4, #32]
a00026b0: e1a01004 mov r1, r4
a00026b4: e1a00007 mov r0, r7
a00026b8: e5933030 ldr r3, [r3, #48] ; 0x30
a00026bc: e12fff33 blx r3
if (err) {
a00026c0: e2504000 subs r4, r0, #0
a00026c4: 0a000002 beq a00026d4 <fcntl+0x1a4>
errno = err;
a00026c8: eb002967 bl a000cc6c <__errno> <== NOT EXECUTED
a00026cc: e5804000 str r4, [r0] <== NOT EXECUTED
ret = -1;
a00026d0: e3e06000 mvn r6, #0
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
a00026d4: e1a00006 mov r0, r6
a00026d8: e8bd40f8 pop {r3, r4, r5, r6, r7, lr}
a00026dc: e28dd00c add sp, sp, #12
a00026e0: e12fff1e bx lr
a000b2a4 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
a000b2a4: 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) {
a000b2a8: e59f538c ldr r5, [pc, #908] ; a000b63c <fifo_open+0x398>
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
a000b2ac: e1a08000 mov r8, r0
a000b2b0: e1a07001 mov r7, r1
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
a000b2b4: e5954000 ldr r4, [r5]
a000b2b8: e3540000 cmp r4, #0
a000b2bc: 1a000012 bne a000b30c <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 );
a000b2c0: e59f3378 ldr r3, [pc, #888] ; a000b640 <fifo_open+0x39c>
a000b2c4: e1a01004 mov r1, r4
a000b2c8: e1a02004 mov r2, r4
a000b2cc: e5930000 ldr r0, [r3]
a000b2d0: ebffeec3 bl a0006de4 <rtems_semaphore_obtain>
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
a000b2d4: e5953000 ldr r3, [r5]
a000b2d8: e3530000 cmp r3, #0
a000b2dc: 1a000005 bne a000b2f8 <fifo_open+0x54>
sc = rtems_semaphore_create(
a000b2e0: e59f035c ldr r0, [pc, #860] ; a000b644 <fifo_open+0x3a0>
a000b2e4: e3a01001 mov r1, #1
a000b2e8: e3a02054 mov r2, #84 ; 0x54
a000b2ec: e58d5000 str r5, [sp]
a000b2f0: ebffee29 bl a0006b9c <rtems_semaphore_create>
a000b2f4: e1a04000 mov r4, r0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
a000b2f8: e59f3340 ldr r3, [pc, #832] ; a000b640 <fifo_open+0x39c>
a000b2fc: e5930000 ldr r0, [r3]
a000b300: ebffeefd bl a0006efc <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
a000b304: e3540000 cmp r4, #0
a000b308: 1a000006 bne a000b328 <fifo_open+0x84>
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
a000b30c: e59f3328 ldr r3, [pc, #808] ; a000b63c <fifo_open+0x398>
a000b310: e3a01000 mov r1, #0
a000b314: e1a02001 mov r2, r1
a000b318: e5930000 ldr r0, [r3]
a000b31c: ebffeeb0 bl a0006de4 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
a000b320: e2505000 subs r5, r0, #0
a000b324: 0a000000 beq a000b32c <fifo_open+0x88>
return 0;
} else {
return -ENOMEM;
a000b328: e3e0500b mvn r5, #11
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
if (err)
a000b32c: e2556000 subs r6, r5, #0
a000b330: 1a0000bf bne a000b634 <fifo_open+0x390>
return err;
pipe = *pipep;
a000b334: e5984000 ldr r4, [r8]
if (pipe == NULL) {
a000b338: e3540000 cmp r4, #0
a000b33c: 1a00003c bne a000b434 <fifo_open+0x190>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
a000b340: e3a00034 mov r0, #52 ; 0x34
a000b344: ebffe2c2 bl a0003e54 <malloc>
if (pipe == NULL)
a000b348: e250a000 subs sl, r0, #0
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
a000b34c: e1a04000 mov r4, r0
if (pipe == NULL)
a000b350: 0a000035 beq a000b42c <fifo_open+0x188>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
a000b354: e1a01005 mov r1, r5
a000b358: e3a02034 mov r2, #52 ; 0x34
a000b35c: eb000e0f bl a000eba0 <memset>
pipe->Size = PIPE_BUF;
a000b360: e3a00c02 mov r0, #512 ; 0x200
a000b364: e5840004 str r0, [r4, #4]
pipe->Buffer = malloc(pipe->Size);
a000b368: ebffe2b9 bl a0003e54 <malloc>
if (! pipe->Buffer)
a000b36c: 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);
a000b370: e5840000 str r0, [r4]
if (! pipe->Buffer)
a000b374: 0a00002a beq a000b424 <fifo_open+0x180>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
a000b378: e59f62c8 ldr r6, [pc, #712] ; a000b648 <fifo_open+0x3a4>
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
a000b37c: e59f02c8 ldr r0, [pc, #712] ; a000b64c <fifo_open+0x3a8>
a000b380: e1a01005 mov r1, r5
rtems_build_name ('P', 'I', 'r', c),
a000b384: e5d63000 ldrb r3, [r6]
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
a000b388: e1a02005 mov r2, r5
a000b38c: e1830000 orr r0, r3, r0
a000b390: e284302c add r3, r4, #44 ; 0x2c
a000b394: eb0003e5 bl a000c330 <rtems_barrier_create>
a000b398: e3500000 cmp r0, #0
a000b39c: 1a00001e bne a000b41c <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),
a000b3a0: 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(
a000b3a4: e59f02a4 ldr r0, [pc, #676] ; a000b650 <fifo_open+0x3ac>
a000b3a8: e1a01005 mov r1, r5
a000b3ac: e1a02005 mov r2, r5
a000b3b0: e1830000 orr r0, r3, r0
a000b3b4: e2843030 add r3, r4, #48 ; 0x30
a000b3b8: eb0003dc bl a000c330 <rtems_barrier_create>
a000b3bc: e3500000 cmp r0, #0
a000b3c0: 1a000013 bne a000b414 <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,
a000b3c4: 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(
a000b3c8: e59f0284 ldr r0, [pc, #644] ; a000b654 <fifo_open+0x3b0>
a000b3cc: e2842028 add r2, r4, #40 ; 0x28
a000b3d0: e58d2000 str r2, [sp]
a000b3d4: e1830000 orr r0, r3, r0
a000b3d8: e3a01001 mov r1, #1
a000b3dc: e3a02010 mov r2, #16
a000b3e0: e1a03005 mov r3, r5
a000b3e4: ebffedec bl a0006b9c <rtems_semaphore_create>
a000b3e8: e3500000 cmp r0, #0
a000b3ec: 1a000006 bne a000b40c <fifo_open+0x168>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
a000b3f0: e5d63000 ldrb r3, [r6]
a000b3f4: e353007a cmp r3, #122 ; 0x7a
a000b3f8: e2832001 add r2, r3, #1
c = 'a';
a000b3fc: 03a03061 moveq r3, #97 ; 0x61
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
a000b400: e5c62000 strb r2, [r6]
c = 'a';
a000b404: 05c63000 strbeq r3, [r6]
a000b408: ea000009 b a000b434 <fifo_open+0x190>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
a000b40c: e59a0030 ldr r0, [sl, #48] ; 0x30
a000b410: eb0003f6 bl a000c3f0 <rtems_barrier_delete>
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
a000b414: e59a002c ldr r0, [sl, #44] ; 0x2c
a000b418: eb0003f4 bl a000c3f0 <rtems_barrier_delete>
err_rbar:
free(pipe->Buffer);
a000b41c: e59a0000 ldr r0, [sl]
a000b420: ebffe0a8 bl a00036c8 <free>
err_buf:
free(pipe);
a000b424: e1a0000a mov r0, sl
a000b428: ebffe0a6 bl a00036c8 <free>
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
a000b42c: e3e0600b mvn r6, #11
a000b430: ea00000e b a000b470 <fifo_open+0x1cc>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
a000b434: e3a01000 mov r1, #0
a000b438: e5940028 ldr r0, [r4, #40] ; 0x28
a000b43c: e1a02001 mov r2, r1
a000b440: ebffee67 bl a0006de4 <rtems_semaphore_obtain>
err = -EINTR;
if (*pipep == NULL) {
a000b444: e5983000 ldr r3, [r8]
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
a000b448: e3500000 cmp r0, #0
a000b44c: 03a06000 moveq r6, #0
a000b450: 13e06003 mvnne r6, #3
if (*pipep == NULL) {
a000b454: e3530000 cmp r3, #0
a000b458: 1a000004 bne a000b470 <fifo_open+0x1cc>
if (err)
a000b45c: e3560000 cmp r6, #0
pipe_free(pipe);
else
*pipep = pipe;
a000b460: 05884000 streq r4, [r8]
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
a000b464: 0a000001 beq a000b470 <fifo_open+0x1cc>
pipe_free(pipe);
a000b468: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b46c: ebffff53 bl a000b1c0 <pipe_free> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
pipe_unlock();
a000b470: ebffff4e bl a000b1b0 <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
a000b474: e3560000 cmp r6, #0
a000b478: 1a00006d bne a000b634 <fifo_open+0x390>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
a000b47c: e5973014 ldr r3, [r7, #20]
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
a000b480: e5984000 ldr r4, [r8]
switch (LIBIO_ACCMODE(iop)) {
a000b484: e2033006 and r3, r3, #6
a000b488: e3530004 cmp r3, #4
a000b48c: 0a000025 beq a000b528 <fifo_open+0x284>
a000b490: e3530006 cmp r3, #6
a000b494: 0a000049 beq a000b5c0 <fifo_open+0x31c>
a000b498: e3530002 cmp r3, #2
a000b49c: 1a00005d bne a000b618 <fifo_open+0x374>
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
a000b4a0: e5943020 ldr r3, [r4, #32]
a000b4a4: e2833001 add r3, r3, #1
a000b4a8: e5843020 str r3, [r4, #32]
if (pipe->Readers ++ == 0)
a000b4ac: e5943010 ldr r3, [r4, #16]
a000b4b0: e2832001 add r2, r3, #1
a000b4b4: e3530000 cmp r3, #0
a000b4b8: e5842010 str r2, [r4, #16]
a000b4bc: 1a000002 bne a000b4cc <fifo_open+0x228>
PIPE_WAKEUPWRITERS(pipe);
a000b4c0: e5940030 ldr r0, [r4, #48] ; 0x30
a000b4c4: e28d1004 add r1, sp, #4
a000b4c8: eb0003f0 bl a000c490 <rtems_barrier_release>
if (pipe->Writers == 0) {
a000b4cc: e5943014 ldr r3, [r4, #20]
a000b4d0: e3530000 cmp r3, #0
a000b4d4: 1a00004f bne a000b618 <fifo_open+0x374>
/* Not an error */
if (LIBIO_NODELAY(iop))
a000b4d8: e5973014 ldr r3, [r7, #20]
a000b4dc: e3130001 tst r3, #1
a000b4e0: 1a00004c bne a000b618 <fifo_open+0x374>
break;
prevCounter = pipe->writerCounter;
a000b4e4: e5945024 ldr r5, [r4, #36] ; 0x24
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
a000b4e8: e5940028 ldr r0, [r4, #40] ; 0x28
a000b4ec: ebffee82 bl a0006efc <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
a000b4f0: e3a01000 mov r1, #0
a000b4f4: e594002c ldr r0, [r4, #44] ; 0x2c
a000b4f8: eb0003fa bl a000c4e8 <rtems_barrier_wait>
a000b4fc: e2501000 subs r1, r0, #0
a000b500: 1a000047 bne a000b624 <fifo_open+0x380>
goto out_error;
if (! PIPE_LOCK(pipe))
a000b504: e5940028 ldr r0, [r4, #40] ; 0x28
a000b508: e1a02001 mov r2, r1
a000b50c: ebffee34 bl a0006de4 <rtems_semaphore_obtain>
a000b510: e3500000 cmp r0, #0
a000b514: 1a000042 bne a000b624 <fifo_open+0x380>
goto out_error;
} while (prevCounter == pipe->writerCounter);
a000b518: e5943024 ldr r3, [r4, #36] ; 0x24
a000b51c: e1550003 cmp r5, r3
a000b520: 0afffff0 beq a000b4e8 <fifo_open+0x244>
a000b524: ea00003b b a000b618 <fifo_open+0x374>
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
a000b528: e5943024 ldr r3, [r4, #36] ; 0x24
a000b52c: e2833001 add r3, r3, #1
a000b530: e5843024 str r3, [r4, #36] ; 0x24
if (pipe->Writers ++ == 0)
a000b534: e5943014 ldr r3, [r4, #20]
a000b538: e2832001 add r2, r3, #1
a000b53c: e3530000 cmp r3, #0
a000b540: e5842014 str r2, [r4, #20]
a000b544: 1a000002 bne a000b554 <fifo_open+0x2b0>
PIPE_WAKEUPREADERS(pipe);
a000b548: e594002c ldr r0, [r4, #44] ; 0x2c
a000b54c: e28d1004 add r1, sp, #4
a000b550: eb0003ce bl a000c490 <rtems_barrier_release>
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
a000b554: e5943010 ldr r3, [r4, #16]
a000b558: e3530000 cmp r3, #0
a000b55c: 1a00002d bne a000b618 <fifo_open+0x374>
a000b560: e5973014 ldr r3, [r7, #20]
a000b564: e3130001 tst r3, #1
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
a000b568: 05945020 ldreq r5, [r4, #32]
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
a000b56c: 0a000003 beq a000b580 <fifo_open+0x2dc>
PIPE_UNLOCK(pipe);
a000b570: e5940028 ldr r0, [r4, #40] ; 0x28
a000b574: ebffee60 bl a0006efc <rtems_semaphore_release>
err = -ENXIO;
a000b578: e3e06005 mvn r6, #5
goto out_error;
a000b57c: ea000029 b a000b628 <fifo_open+0x384>
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
a000b580: e5940028 ldr r0, [r4, #40] ; 0x28
a000b584: ebffee5c bl a0006efc <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
a000b588: e3a01000 mov r1, #0
a000b58c: e5940030 ldr r0, [r4, #48] ; 0x30
a000b590: eb0003d4 bl a000c4e8 <rtems_barrier_wait>
a000b594: e2501000 subs r1, r0, #0
a000b598: 1a000021 bne a000b624 <fifo_open+0x380>
goto out_error;
if (! PIPE_LOCK(pipe))
a000b59c: e5940028 ldr r0, [r4, #40] ; 0x28
a000b5a0: e1a02001 mov r2, r1
a000b5a4: ebffee0e bl a0006de4 <rtems_semaphore_obtain>
a000b5a8: e3500000 cmp r0, #0
a000b5ac: 1a00001c bne a000b624 <fifo_open+0x380>
goto out_error;
} while (prevCounter == pipe->readerCounter);
a000b5b0: e5943020 ldr r3, [r4, #32]
a000b5b4: e1550003 cmp r5, r3
a000b5b8: 0afffff0 beq a000b580 <fifo_open+0x2dc>
a000b5bc: ea000015 b a000b618 <fifo_open+0x374>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
a000b5c0: e5943020 ldr r3, [r4, #32]
a000b5c4: e2833001 add r3, r3, #1
a000b5c8: e5843020 str r3, [r4, #32]
if (pipe->Readers ++ == 0)
a000b5cc: e5943010 ldr r3, [r4, #16]
a000b5d0: e2832001 add r2, r3, #1
a000b5d4: e3530000 cmp r3, #0
a000b5d8: e5842010 str r2, [r4, #16]
a000b5dc: 1a000002 bne a000b5ec <fifo_open+0x348>
PIPE_WAKEUPWRITERS(pipe);
a000b5e0: e5940030 ldr r0, [r4, #48] ; 0x30
a000b5e4: e28d1004 add r1, sp, #4
a000b5e8: eb0003a8 bl a000c490 <rtems_barrier_release>
pipe->writerCounter ++;
a000b5ec: e5943024 ldr r3, [r4, #36] ; 0x24
a000b5f0: e2833001 add r3, r3, #1
a000b5f4: e5843024 str r3, [r4, #36] ; 0x24
if (pipe->Writers ++ == 0)
a000b5f8: e5943014 ldr r3, [r4, #20]
a000b5fc: e2832001 add r2, r3, #1
a000b600: e3530000 cmp r3, #0
a000b604: e5842014 str r2, [r4, #20]
a000b608: 1a000002 bne a000b618 <fifo_open+0x374>
PIPE_WAKEUPREADERS(pipe);
a000b60c: e594002c ldr r0, [r4, #44] ; 0x2c
a000b610: e28d1004 add r1, sp, #4
a000b614: eb00039d bl a000c490 <rtems_barrier_release>
break;
}
PIPE_UNLOCK(pipe);
a000b618: e5940028 ldr r0, [r4, #40] ; 0x28
a000b61c: ebffee36 bl a0006efc <rtems_semaphore_release>
return 0;
a000b620: ea000003 b a000b634 <fifo_open+0x390>
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
a000b624: e3e06003 mvn r6, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
a000b628: e1a00008 mov r0, r8
a000b62c: e1a01007 mov r1, r7
a000b630: ebfffeef bl a000b1f4 <pipe_release>
return err;
}
a000b634: e1a00006 mov r0, r6
a000b638: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc}
a0002774 <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
a0002774: e59f3104 ldr r3, [pc, #260] ; a0002880 <fpathconf+0x10c>
long fpathconf(
int fd,
int name
)
{
a0002778: 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);
a000277c: e5933000 ldr r3, [r3]
a0002780: e1500003 cmp r0, r3
a0002784: 2a000006 bcs a00027a4 <fpathconf+0x30>
iop = rtems_libio_iop(fd);
a0002788: e59f30f4 ldr r3, [pc, #244] ; a0002884 <fpathconf+0x110>
a000278c: e3a02038 mov r2, #56 ; 0x38
a0002790: e5933000 ldr r3, [r3]
a0002794: e0203092 mla r0, r2, r0, r3
rtems_libio_check_is_open(iop);
a0002798: e5903014 ldr r3, [r0, #20]
a000279c: e3130c01 tst r3, #256 ; 0x100
a00027a0: 1a000002 bne a00027b0 <fpathconf+0x3c>
a00027a4: eb002930 bl a000cc6c <__errno>
a00027a8: e3a03009 mov r3, #9
a00027ac: ea000003 b a00027c0 <fpathconf+0x4c>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
a00027b0: e3130002 tst r3, #2
a00027b4: 1a000004 bne a00027cc <fpathconf+0x58>
a00027b8: eb00292b bl a000cc6c <__errno>
a00027bc: e3a03016 mov r3, #22
a00027c0: e5803000 str r3, [r0]
a00027c4: e3e00000 mvn r0, #0
a00027c8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
a00027cc: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
a00027d0: e351000b cmp r1, #11
a00027d4: 979ff101 ldrls pc, [pc, r1, lsl #2]
a00027d8: ea000023 b a000286c <fpathconf+0xf8>
a00027dc: a000280c .word 0xa000280c
a00027e0: a0002814 .word 0xa0002814
a00027e4: a000281c .word 0xa000281c
a00027e8: a0002824 .word 0xa0002824
a00027ec: a000282c .word 0xa000282c
a00027f0: a0002834 .word 0xa0002834
a00027f4: a000283c .word 0xa000283c
a00027f8: a0002844 .word 0xa0002844
a00027fc: a000284c .word 0xa000284c
a0002800: a0002854 .word 0xa0002854
a0002804: a000285c .word 0xa000285c
a0002808: a0002864 .word 0xa0002864
case _PC_LINK_MAX:
return_value = the_limits->link_max;
a000280c: e5930038 ldr r0, [r3, #56] ; 0x38
break;
a0002810: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
a0002814: e593003c ldr r0, [r3, #60] ; 0x3c
break;
a0002818: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
a000281c: e5930040 ldr r0, [r3, #64] ; 0x40
break;
a0002820: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX:
return_value = the_limits->name_max;
a0002824: e5930044 ldr r0, [r3, #68] ; 0x44
break;
a0002828: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX:
return_value = the_limits->path_max;
a000282c: e5930048 ldr r0, [r3, #72] ; 0x48
break;
a0002830: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
a0002834: e593004c ldr r0, [r3, #76] ; 0x4c
break;
a0002838: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
a000283c: e5930054 ldr r0, [r3, #84] ; 0x54
break;
a0002840: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
a0002844: e5930058 ldr r0, [r3, #88] ; 0x58
break;
a0002848: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
a000284c: e5930064 ldr r0, [r3, #100] ; 0x64
break;
a0002850: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
a0002854: e5930050 ldr r0, [r3, #80] ; 0x50
break;
a0002858: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
a000285c: e593005c ldr r0, [r3, #92] ; 0x5c
break;
a0002860: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
a0002864: e5930060 ldr r0, [r3, #96] ; 0x60
break;
a0002868: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default:
rtems_set_errno_and_return_minus_one( EINVAL );
a000286c: eb0028fe bl a000cc6c <__errno>
a0002870: e3a03016 mov r3, #22
a0002874: e5803000 str r3, [r0]
a0002878: e3e00000 mvn r0, #0
break;
}
return return_value;
}
a000287c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a0002f0c <free_user_env>:
static void
free_user_env(void *venv)
{
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
a0002f0c: e59f302c ldr r3, [pc, #44] ; a0002f40 <free_user_env+0x34>
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
a0002f10: e92d4010 push {r4, lr}
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
a0002f14: e1500003 cmp r0, r3
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
a0002f18: e1a04000 mov r4, r0
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
a0002f1c: 0a000006 beq a0002f3c <free_user_env+0x30>
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
a0002f20: e2800004 add r0, r0, #4
a0002f24: ebfffbdf bl a0001ea8 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &env->root_directory);
a0002f28: e2840018 add r0, r4, #24
a0002f2c: ebfffbdd bl a0001ea8 <rtems_filesystem_freenode>
free(env);
a0002f30: e1a00004 mov r0, r4
}
}
a0002f34: e8bd4010 pop {r4, lr}
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
a0002f38: eafffbdf b a0001ebc <free>
a0002f3c: e8bd8010 pop {r4, pc}
a0001d00 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
a0001d00: e92d4033 push {r0, r1, r4, r5, lr}
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
a0001d04: e2504000 subs r4, r0, #0
a0001d08: 1a000004 bne a0001d20 <gettimeofday+0x20>
rtems_set_errno_and_return_minus_one( EFAULT );
a0001d0c: eb0027f4 bl a000bce4 <__errno> <== NOT EXECUTED
a0001d10: e3a0300e mov r3, #14 <== NOT EXECUTED
a0001d14: e5803000 str r3, [r0] <== NOT EXECUTED
a0001d18: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0001d1c: ea00000c b a0001d54 <gettimeofday+0x54> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0001d20: e10f5000 mrs r5, CPSR
a0001d24: e3853080 orr r3, r5, #128 ; 0x80
a0001d28: e129f003 msr CPSR_fc, r3
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
a0001d2c: e1a0000d mov r0, sp
a0001d30: eb000f8a bl a0005b60 <_TOD_Get>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0001d34: 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;
a0001d38: 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;
a0001d3c: e59d0004 ldr r0, [sp, #4]
a0001d40: e3a01ffa mov r1, #1000 ; 0x3e8
time->tv_sec = now.tv_sec;
a0001d44: 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;
a0001d48: eb0035ca bl a000f478 <__aeabi_idiv>
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
a0001d4c: 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;
a0001d50: e3a00000 mov r0, #0
}
a0001d54: e8bd803c pop {r2, r3, r4, r5, pc}
a000b4d0 <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 )
a000b4d0: e5903018 ldr r3, [r0, #24]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
a000b4d4: 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 )
a000b4d8: e593304c ldr r3, [r3, #76] ; 0x4c
a000b4dc: e3530001 cmp r3, #1
a000b4e0: 1a000005 bne a000b4fc <imfs_dir_open+0x2c>
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
a000b4e4: e3a03000 mov r3, #0
a000b4e8: e3a04000 mov r4, #0
a000b4ec: e580300c str r3, [r0, #12]
a000b4f0: e5804010 str r4, [r0, #16]
return 0;
a000b4f4: e3a00000 mov r0, #0
a000b4f8: 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 */
a000b4fc: e3e00000 mvn r0, #0 <== NOT EXECUTED
iop->offset = 0;
return 0;
}
a000b500: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0003974 <iproc>:
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
a0003974: e5913030 ldr r3, [r1, #48] ; 0x30
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
a0003978: e92d4030 push {r4, r5, lr}
if (tty->termios.c_iflag & ISTRIP)
a000397c: e3130020 tst r3, #32
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
a0003980: e20050ff and r5, r0, #255 ; 0xff
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
a0003984: 1200507f andne r5, r0, #127 ; 0x7f
if (tty->termios.c_iflag & IUCLC)
a0003988: e3130c02 tst r3, #512 ; 0x200
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
a000398c: e1a04001 mov r4, r1
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
a0003990: 0a000007 beq a00039b4 <iproc+0x40>
c = tolower (c);
a0003994: e59f2170 ldr r2, [pc, #368] ; a0003b0c <iproc+0x198>
a0003998: e5922000 ldr r2, [r2]
a000399c: e0822005 add r2, r2, r5
a00039a0: e5d22001 ldrb r2, [r2, #1]
a00039a4: e2022003 and r2, r2, #3
a00039a8: e3520001 cmp r2, #1
a00039ac: 02855020 addeq r5, r5, #32
a00039b0: e20550ff and r5, r5, #255 ; 0xff
if (c == '\r') {
a00039b4: e355000d cmp r5, #13
a00039b8: 1a000005 bne a00039d4 <iproc+0x60>
if (tty->termios.c_iflag & IGNCR)
a00039bc: e3130080 tst r3, #128 ; 0x80
a00039c0: 1a00004b bne a0003af4 <iproc+0x180>
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
a00039c4: e3130c01 tst r3, #256 ; 0x100
a00039c8: 03a0500d moveq r5, #13
a00039cc: 13a0500a movne r5, #10
a00039d0: ea000007 b a00039f4 <iproc+0x80>
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
a00039d4: e355000a cmp r5, #10
a00039d8: 1a000003 bne a00039ec <iproc+0x78>
c = '\r';
a00039dc: e3130040 tst r3, #64 ; 0x40
a00039e0: 03a0500a moveq r5, #10
a00039e4: 13a0500d movne r5, #13
a00039e8: ea000001 b a00039f4 <iproc+0x80>
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
a00039ec: e3550000 cmp r5, #0
a00039f0: 0a00002e beq a0003ab0 <iproc+0x13c>
a00039f4: e594303c ldr r3, [r4, #60] ; 0x3c
a00039f8: e3130002 tst r3, #2
a00039fc: 0a00002b beq a0003ab0 <iproc+0x13c>
if (c == tty->termios.c_cc[VERASE]) {
a0003a00: e5d42043 ldrb r2, [r4, #67] ; 0x43
a0003a04: e1520005 cmp r2, r5
erase (tty, 0);
a0003a08: 01a00004 moveq r0, r4
a0003a0c: 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]) {
a0003a10: 0a000004 beq a0003a28 <iproc+0xb4>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
a0003a14: e5d42044 ldrb r2, [r4, #68] ; 0x44
a0003a18: e1520005 cmp r2, r5
a0003a1c: 1a000003 bne a0003a30 <iproc+0xbc>
erase (tty, 1);
a0003a20: e1a00004 mov r0, r4
a0003a24: e3a01001 mov r1, #1
a0003a28: ebffff5f bl a00037ac <erase>
a0003a2c: ea000030 b a0003af4 <iproc+0x180>
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
a0003a30: e5d42045 ldrb r2, [r4, #69] ; 0x45
a0003a34: e1520005 cmp r2, r5
a0003a38: 0a00002f beq a0003afc <iproc+0x188>
return 1;
} else if (c == '\n') {
a0003a3c: e355000a cmp r5, #10
a0003a40: 1a000009 bne a0003a6c <iproc+0xf8>
if (tty->termios.c_lflag & (ECHO | ECHONL))
a0003a44: e3130048 tst r3, #72 ; 0x48
a0003a48: 0a000002 beq a0003a58 <iproc+0xe4>
echo (c, tty);
a0003a4c: e1a00005 mov r0, r5
a0003a50: e1a01004 mov r1, r4
a0003a54: ebffff31 bl a0003720 <echo>
tty->cbuf[tty->ccount++] = c;
a0003a58: e5943020 ldr r3, [r4, #32]
a0003a5c: e594201c ldr r2, [r4, #28]
a0003a60: e3a0100a mov r1, #10
a0003a64: e7c21003 strb r1, [r2, r3]
a0003a68: ea00000d b a0003aa4 <iproc+0x130>
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
a0003a6c: e5d4204c ldrb r2, [r4, #76] ; 0x4c
a0003a70: e1520005 cmp r2, r5
a0003a74: 0a000002 beq a0003a84 <iproc+0x110>
a0003a78: e5d42051 ldrb r2, [r4, #81] ; 0x51
a0003a7c: e1520005 cmp r2, r5
a0003a80: 1a00000a bne a0003ab0 <iproc+0x13c>
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
a0003a84: e3130008 tst r3, #8 <== NOT EXECUTED
a0003a88: 0a000002 beq a0003a98 <iproc+0x124> <== NOT EXECUTED
echo (c, tty);
a0003a8c: e1a00005 mov r0, r5 <== NOT EXECUTED
a0003a90: e1a01004 mov r1, r4 <== NOT EXECUTED
a0003a94: ebffff21 bl a0003720 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
a0003a98: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
a0003a9c: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
a0003aa0: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED
a0003aa4: e2833001 add r3, r3, #1
a0003aa8: e5843020 str r3, [r4, #32]
a0003aac: ea000012 b a0003afc <iproc+0x188>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
a0003ab0: e59f3058 ldr r3, [pc, #88] ; a0003b10 <iproc+0x19c>
a0003ab4: e5942020 ldr r2, [r4, #32]
a0003ab8: e5933008 ldr r3, [r3, #8]
a0003abc: e2433001 sub r3, r3, #1
a0003ac0: e1520003 cmp r2, r3
a0003ac4: aa00000e bge a0003b04 <iproc+0x190>
if (tty->termios.c_lflag & ECHO)
a0003ac8: e594303c ldr r3, [r4, #60] ; 0x3c
a0003acc: e3130008 tst r3, #8
a0003ad0: 0a000002 beq a0003ae0 <iproc+0x16c>
echo (c, tty);
a0003ad4: e1a00005 mov r0, r5
a0003ad8: e1a01004 mov r1, r4
a0003adc: ebffff0f bl a0003720 <echo>
tty->cbuf[tty->ccount++] = c;
a0003ae0: e5943020 ldr r3, [r4, #32]
a0003ae4: e594201c ldr r2, [r4, #28]
a0003ae8: e7c25003 strb r5, [r2, r3]
a0003aec: e2833001 add r3, r3, #1
a0003af0: 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;
a0003af4: e3a00000 mov r0, #0
a0003af8: 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;
a0003afc: e3a00001 mov r0, #1
a0003b00: 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;
a0003b04: e3a00000 mov r0, #0 <== NOT EXECUTED
}
a0003b08: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a001f54c <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
a001f54c: e3a00000 mov r0, #0 <== NOT EXECUTED
a001f550: e12fff1e bx lr <== NOT EXECUTED
a0010c6c <libc_wrapup>:
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
a0010c6c: e59f3060 ldr r3, [pc, #96] ; a0010cd4 <libc_wrapup+0x68>
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
a0010c70: e92d4030 push {r4, r5, lr}
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
a0010c74: e5933000 ldr r3, [r3]
a0010c78: e3530003 cmp r3, #3
a0010c7c: 1a000013 bne a0010cd0 <libc_wrapup+0x64>
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
a0010c80: e59f3050 ldr r3, [pc, #80] ; a0010cd8 <libc_wrapup+0x6c>
a0010c84: e59f5050 ldr r5, [pc, #80] ; a0010cdc <libc_wrapup+0x70>
a0010c88: e5934000 ldr r4, [r3]
a0010c8c: e5953000 ldr r3, [r5]
a0010c90: e1530004 cmp r3, r4
a0010c94: 0a000002 beq a0010ca4 <libc_wrapup+0x38>
_wrapup_reent(_global_impure_ptr);
a0010c98: e1a00004 mov r0, r4
a0010c9c: eb0001b4 bl a0011374 <_wrapup_reent>
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = _global_impure_ptr;
a0010ca0: e5854000 str r4, [r5]
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
a0010ca4: e59f4030 ldr r4, [pc, #48] ; a0010cdc <libc_wrapup+0x70>
a0010ca8: e5943000 ldr r3, [r4]
a0010cac: e5930004 ldr r0, [r3, #4]
a0010cb0: ebffec59 bl a000be1c <fclose>
fclose (stdout);
a0010cb4: e5943000 ldr r3, [r4]
a0010cb8: e5930008 ldr r0, [r3, #8]
a0010cbc: ebffec56 bl a000be1c <fclose>
fclose (stderr);
a0010cc0: e5943000 ldr r3, [r4]
a0010cc4: e593000c ldr r0, [r3, #12]
}
a0010cc8: e8bd4030 pop {r4, r5, lr}
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
a0010ccc: eaffec52 b a000be1c <fclose>
a0010cd0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a0002354 <malloc_sbrk_extend_and_allocate>:
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
a0002354: e59f30a0 ldr r3, [pc, #160] ; a00023fc <malloc_sbrk_extend_and_allocate+0xa8>
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
a0002358: e92d40f0 push {r4, r5, r6, r7, lr}
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
a000235c: e5934000 ldr r4, [r3]
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
a0002360: e1a05000 mov r5, r0
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
a0002364: e3540000 cmp r4, #0
a0002368: 0a00001f beq a00023ec <malloc_sbrk_extend_and_allocate+0x98>
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
a000236c: e1a01004 mov r1, r4
a0002370: e0800004 add r0, r0, r4
a0002374: eb00354f bl a000f8b8 <__aeabi_uidiv>
a0002378: e0040490 mul r4, r0, r4
starting_address = (void *) sbrk(the_size);
a000237c: e1a00004 mov r0, r4
a0002380: ebfff86b bl a0000534 <sbrk>
if ( starting_address == (void*) -1 )
a0002384: e3700001 cmn r0, #1
if ( sbrk_amount == 0 )
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
starting_address = (void *) sbrk(the_size);
a0002388: e1a01000 mov r1, r0
if ( starting_address == (void*) -1 )
a000238c: 0a000018 beq a00023f4 <malloc_sbrk_extend_and_allocate+0xa0>
return (void *) 0;
if ( !_Protected_heap_Extend(
a0002390: e59f6068 ldr r6, [pc, #104] ; a0002400 <malloc_sbrk_extend_and_allocate+0xac>
a0002394: e1a02004 mov r2, r4
a0002398: e5960000 ldr r0, [r6]
a000239c: eb0011d4 bl a0006af4 <_Protected_heap_Extend>
a00023a0: e2507000 subs r7, r0, #0
a00023a4: 1a000006 bne a00023c4 <malloc_sbrk_extend_and_allocate+0x70>
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
a00023a8: e2640000 rsb r0, r4, #0
a00023ac: ebfff860 bl a0000534 <sbrk>
errno = ENOMEM;
a00023b0: eb0027cc bl a000c2e8 <__errno>
a00023b4: e3a0300c mov r3, #12
a00023b8: e5803000 str r3, [r0]
return (void *) 0;
a00023bc: e1a00007 mov r0, r7
a00023c0: e8bd80f0 pop {r4, r5, r6, r7, pc}
}
MSBUMP(space_available, the_size);
a00023c4: e59f3038 ldr r3, [pc, #56] ; a0002404 <malloc_sbrk_extend_and_allocate+0xb0>
a00023c8: e5960000 ldr r0, [r6]
a00023cc: e1a01005 mov r1, r5
a00023d0: e5932000 ldr r2, [r3]
a00023d4: e0844002 add r4, r4, r2
a00023d8: e3a02000 mov r2, #0
a00023dc: e5834000 str r4, [r3]
a00023e0: e1a03002 mov r3, r2
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
a00023e4: e8bd40f0 pop {r4, r5, r6, r7, lr}
a00023e8: ea0011ae b a0006aa8 <_Protected_heap_Allocate_aligned_with_boundary>
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
return (void *) 0;
a00023ec: e1a00004 mov r0, r4 <== NOT EXECUTED
a00023f0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
starting_address = (void *) sbrk(the_size);
if ( starting_address == (void*) -1 )
return (void *) 0;
a00023f4: e3a00000 mov r0, #0
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
a00023f8: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000b230 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
a000b230: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
a000b234: e5905018 ldr r5, [r0, #24]
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
a000b238: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
a000b23c: e595304c ldr r3, [r5, #76] ; 0x4c
a000b240: e3530006 cmp r3, #6
a000b244: 1a00000b bne a000b278 <memfile_lseek+0x48>
if (iop->offset > the_jnode->info.linearfile.size)
a000b248: e5953054 ldr r3, [r5, #84] ; 0x54
a000b24c: e5901010 ldr r1, [r0, #16]
a000b250: e5952050 ldr r2, [r5, #80] ; 0x50
a000b254: e1510003 cmp r1, r3
a000b258: ca000003 bgt a000b26c <memfile_lseek+0x3c>
a000b25c: 1a000014 bne a000b2b4 <memfile_lseek+0x84>
a000b260: e590100c ldr r1, [r0, #12]
a000b264: e1510002 cmp r1, r2
a000b268: 9a000011 bls a000b2b4 <memfile_lseek+0x84>
iop->offset = the_jnode->info.linearfile.size;
a000b26c: e584200c str r2, [r4, #12] <== NOT EXECUTED
a000b270: e5843010 str r3, [r4, #16] <== NOT EXECUTED
a000b274: ea00000e b a000b2b4 <memfile_lseek+0x84> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
a000b278: e1a00005 mov r0, r5
a000b27c: e284200c add r2, r4, #12
a000b280: e8920006 ldm r2, {r1, r2}
a000b284: ebfffeed bl a000ae40 <IMFS_memfile_extend>
a000b288: e3500000 cmp r0, #0
a000b28c: 0a000005 beq a000b2a8 <memfile_lseek+0x78>
rtems_set_errno_and_return_minus_one( ENOSPC );
a000b290: eb000293 bl a000bce4 <__errno>
a000b294: e3a0301c mov r3, #28
a000b298: e5803000 str r3, [r0]
a000b29c: e3e04000 mvn r4, #0
a000b2a0: e3e03000 mvn r3, #0
a000b2a4: ea000004 b a000b2bc <memfile_lseek+0x8c>
iop->size = the_jnode->info.file.size;
a000b2a8: e2853050 add r3, r5, #80 ; 0x50
a000b2ac: e893000c ldm r3, {r2, r3}
a000b2b0: e984000c stmib r4, {r2, r3}
}
return iop->offset;
a000b2b4: e284400c add r4, r4, #12
a000b2b8: e8940018 ldm r4, {r3, r4}
}
a000b2bc: e1a00003 mov r0, r3
a000b2c0: e1a01004 mov r1, r4
a000b2c4: e8bd8030 pop {r4, r5, pc}
a000b13c <memfile_open>:
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
a000b13c: e5903014 ldr r3, [r0, #20]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
a000b140: e92d4031 push {r0, r4, r5, lr}
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
a000b144: e3130f81 tst r3, #516 ; 0x204
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
a000b148: e1a05000 mov r5, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
a000b14c: e5904018 ldr r4, [r0, #24]
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
a000b150: 0a000015 beq a000b1ac <memfile_open+0x70>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
a000b154: e594304c ldr r3, [r4, #76] ; 0x4c
a000b158: e3530006 cmp r3, #6
a000b15c: 1a000012 bne a000b1ac <memfile_open+0x70>
uint32_t count = the_jnode->info.linearfile.size;
a000b160: 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;
a000b164: 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;
a000b168: e3a02005 mov r2, #5 <== NOT EXECUTED
a000b16c: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED
the_jnode->info.file.size = 0;
a000b170: e3a01000 mov r1, #0 <== NOT EXECUTED
a000b174: 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)
a000b178: 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;
a000b17c: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
a000b180: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED
a000b184: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
a000b188: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
a000b18c: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
a000b190: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED
if ((count != 0)
a000b194: 0a000004 beq a000b1ac <memfile_open+0x70> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
a000b198: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b19c: e58dc000 str ip, [sp] <== NOT EXECUTED
a000b1a0: ebffff6d bl a000af5c <IMFS_memfile_write> <== NOT EXECUTED
a000b1a4: e3700001 cmn r0, #1 <== NOT EXECUTED
a000b1a8: 0a000009 beq a000b1d4 <memfile_open+0x98> <== NOT EXECUTED
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
a000b1ac: e5953014 ldr r3, [r5, #20]
a000b1b0: e3130c02 tst r3, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
a000b1b4: 12843050 addne r3, r4, #80 ; 0x50
a000b1b8: 1893000c ldmne r3, {r2, r3}
a000b1bc: 1585200c strne r2, [r5, #12]
a000b1c0: 15853010 strne r3, [r5, #16]
iop->size = the_jnode->info.file.size;
a000b1c4: e2844050 add r4, r4, #80 ; 0x50
a000b1c8: e8940018 ldm r4, {r3, r4}
a000b1cc: e9850018 stmib r5, {r3, r4}
return 0;
a000b1d0: e3a00000 mov r0, #0
}
a000b1d4: e8bd8038 pop {r3, r4, r5, pc}
a00021dc <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
a00021dc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
a00021e0: e3530001 cmp r3, #1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
a00021e4: e24dd02c sub sp, sp, #44 ; 0x2c
a00021e8: e1a06000 mov r6, r0
a00021ec: e1a0b001 mov fp, r1
a00021f0: e1a0a002 mov sl, r2
a00021f4: e58d300c str r3, [sp, #12]
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
a00021f8: 8a000004 bhi a0002210 <mount+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
a00021fc: e1a00002 mov r0, r2
a0002200: eb001d56 bl a0009760 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
a0002204: e3500000 cmp r0, #0
a0002208: e58d0014 str r0, [sp, #20]
a000220c: 1a000002 bne a000221c <mount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
a0002210: eb0026b3 bl a000bce4 <__errno>
a0002214: e3a03016 mov r3, #22
a0002218: ea00003b b a000230c <mount+0x130>
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
a000221c: e59f3260 ldr r3, [pc, #608] ; a0002484 <mount+0x2a8>
{
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;
a0002220: e25b5000 subs r5, fp, #0
a0002224: 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 : "/";
a0002228: e3550000 cmp r5, #0
a000222c: 11a0300b movne r3, fp
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
a0002230: 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 : "/";
a0002234: e58d3004 str r3, [sp, #4]
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
a0002238: eb002a93 bl a000cc8c <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
a000223c: 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;
a0002240: e2809001 add r9, r0, #1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
a0002244: 01a07006 moveq r7, r6
a0002248: 0a000002 beq a0002258 <mount+0x7c>
a000224c: e1a00006 mov r0, r6
a0002250: eb002a8d bl a000cc8c <strlen>
a0002254: e2807001 add r7, r0, #1
size_t target_size = strlen( target ) + 1;
a0002258: e59d0004 ldr r0, [sp, #4]
a000225c: eb002a8a bl a000cc8c <strlen>
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
a0002260: 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;
a0002264: e2803001 add r3, r0, #1
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
a0002268: 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;
a000226c: 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 );
a0002270: e0811003 add r1, r1, r3
a0002274: 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;
a0002278: 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 );
a000227c: ebfffe05 bl a0001a98 <calloc>
if ( mt_entry != NULL ) {
a0002280: e2504000 subs r4, r0, #0
a0002284: 0a00001e beq a0002304 <mount+0x128>
char *str = (char *) mt_entry + sizeof( *mt_entry );
a0002288: e2848074 add r8, r4, #116 ; 0x74
memcpy( str, filesystemtype, filesystemtype_size );
a000228c: e1a00008 mov r0, r8
a0002290: e1a0100a mov r1, sl
a0002294: e1a02009 mov r2, r9
a0002298: eb0028bf bl a000c59c <memcpy>
mt_entry->type = str;
a000229c: e584806c str r8, [r4, #108] ; 0x6c
str += filesystemtype_size;
a00022a0: e0888009 add r8, r8, r9
memcpy( str, source_or_null, source_size );
a00022a4: e1a00008 mov r0, r8
a00022a8: e1a01006 mov r1, r6
a00022ac: e1a02007 mov r2, r7
a00022b0: eb0028b9 bl a000c59c <memcpy>
mt_entry->dev = str;
a00022b4: e5848070 str r8, [r4, #112] ; 0x70
str += source_size;
a00022b8: e0888007 add r8, r8, r7
memcpy( str, target, target_size );
a00022bc: e99d0006 ldmib sp, {r1, r2}
a00022c0: e1a00008 mov r0, r8
a00022c4: eb0028b4 bl a000c59c <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;
a00022c8: e59d300c ldr r3, [sp, #12]
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
a00022cc: e59fe1b4 ldr lr, [pc, #436] ; a0002488 <mount+0x2ac>
a00022d0: e284c038 add ip, r4, #56 ; 0x38
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
a00022d4: e5843030 str r3, [r4, #48] ; 0x30
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
a00022d8: e8be000f ldm lr!, {r0, r1, r2, r3}
a00022dc: e8ac000f stmia ip!, {r0, r1, r2, r3}
a00022e0: e8be000f ldm lr!, {r0, r1, r2, r3}
a00022e4: e8ac000f stmia ip!, {r0, r1, r2, r3}
a00022e8: 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 ) {
a00022ec: 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;
a00022f0: 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;
a00022f4: e584402c str r4, [r4, #44] ; 0x2c
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
a00022f8: 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 ) {
a00022fc: 0a00002e beq a00023bc <mount+0x1e0>
a0002300: ea000003 b a0002314 <mount+0x138>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
a0002304: eb002676 bl a000bce4 <__errno> <== NOT EXECUTED
a0002308: e3a0300c mov r3, #12 <== NOT EXECUTED
a000230c: e5803000 str r3, [r0]
a0002310: ea000058 b a0002478 <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(
a0002314: e3a03001 mov r3, #1
a0002318: e28d6018 add r6, sp, #24
a000231c: e58d3000 str r3, [sp]
a0002320: e1a0000b mov r0, fp
a0002324: e59d1010 ldr r1, [sp, #16]
a0002328: e3a02007 mov r2, #7
a000232c: e1a03006 mov r3, r6
a0002330: ebfffe08 bl a0001b58 <rtems_filesystem_evaluate_path>
a0002334: e3700001 cmn r0, #1
a0002338: 0a000047 beq a000245c <mount+0x280>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
a000233c: e59d3024 ldr r3, [sp, #36] ; 0x24
a0002340: e1a00006 mov r0, r6
a0002344: e5933010 ldr r3, [r3, #16]
a0002348: e12fff33 blx r3
a000234c: e3500001 cmp r0, #1
a0002350: 0a000002 beq a0002360 <mount+0x184>
errno = ENOTDIR;
a0002354: eb002662 bl a000bce4 <__errno>
a0002358: e3a03014 mov r3, #20
a000235c: ea000006 b a000237c <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 ) ) {
a0002360: e59f0124 ldr r0, [pc, #292] ; a000248c <mount+0x2b0>
a0002364: e59d1018 ldr r1, [sp, #24]
a0002368: ebffff86 bl a0002188 <rtems_filesystem_mount_iterate>
a000236c: e3500000 cmp r0, #0
a0002370: 0a000003 beq a0002384 <mount+0x1a8>
errno = EBUSY;
a0002374: eb00265a bl a000bce4 <__errno>
a0002378: e3a03010 mov r3, #16
a000237c: e5803000 str r3, [r0]
goto cleanup_and_bail;
a0002380: ea000036 b a0002460 <mount+0x284>
* 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;
a0002384: e59d3018 ldr r3, [sp, #24]
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
a0002388: e59d2028 ldr r2, [sp, #40] ; 0x28
/*
* 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 ) ) {
a000238c: e1a00004 mov r0, r4
* 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;
a0002390: e5843008 str r3, [r4, #8]
mt_entry->mt_point_node.handlers = loc.handlers;
a0002394: e59d3020 ldr r3, [sp, #32]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
a0002398: e5842018 str r2, [r4, #24]
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
a000239c: e5843010 str r3, [r4, #16]
mt_entry->mt_point_node.ops = loc.ops;
a00023a0: e59d3024 ldr r3, [sp, #36] ; 0x24
a00023a4: 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 ) ) {
a00023a8: e5933020 ldr r3, [r3, #32]
a00023ac: e12fff33 blx r3
a00023b0: e3500000 cmp r0, #0
a00023b4: 0a00000b beq a00023e8 <mount+0x20c>
a00023b8: ea000028 b a0002460 <mount+0x284> <== NOT EXECUTED
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
a00023bc: e59f30cc ldr r3, [pc, #204] ; a0002490 <mount+0x2b4>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
a00023c0: e2832004 add r2, r3, #4
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
a00023c4: e5933000 ldr r3, [r3]
a00023c8: 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;
a00023cc: 01a06005 moveq r6, r5
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
a00023d0: 0a000004 beq a00023e8 <mount+0x20c>
errno = EINVAL;
a00023d4: eb002642 bl a000bce4 <__errno> <== NOT EXECUTED
a00023d8: e3a03016 mov r3, #22 <== NOT EXECUTED
a00023dc: e5803000 str r3, [r0] <== NOT EXECUTED
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
a00023e0: e1a06005 mov r6, r5 <== NOT EXECUTED
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
goto cleanup_and_bail;
a00023e4: ea00001d b a0002460 <mount+0x284> <== NOT EXECUTED
* mt_point_node.node_access will be left to null to indicate that this
* is the root of the entire file system.
*/
}
if ( (*mount_h)( mt_entry, data ) ) {
a00023e8: e1a00004 mov r0, r4
a00023ec: e59d1050 ldr r1, [sp, #80] ; 0x50
a00023f0: e59d3014 ldr r3, [sp, #20]
a00023f4: e12fff33 blx r3
a00023f8: e2507000 subs r7, r0, #0
a00023fc: 0a000004 beq a0002414 <mount+0x238>
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
a0002400: e59d3024 ldr r3, [sp, #36] ; 0x24
a0002404: e1a00004 mov r0, r4
a0002408: e5933028 ldr r3, [r3, #40] ; 0x28
a000240c: e12fff33 blx r3
goto cleanup_and_bail;
a0002410: ea000012 b a0002460 <mount+0x284>
}
/*
* Add the mount table entry to the mount table chain
*/
rtems_libio_lock();
a0002414: ebffff51 bl a0002160 <rtems_libio_lock>
a0002418: e59f0070 ldr r0, [pc, #112] ; a0002490 <mount+0x2b4>
a000241c: e1a01004 mov r1, r4
a0002420: eb000ccc bl a0005758 <_Chain_Append>
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
a0002424: ebffff53 bl a0002178 <rtems_libio_unlock>
if ( !has_target )
a0002428: e3550000 cmp r5, #0
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
a000242c: 11a00007 movne r0, r7
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
a0002430: 1a000011 bne a000247c <mount+0x2a0>
rtems_filesystem_root = mt_entry->mt_fs_root;
a0002434: e59f3058 ldr r3, [pc, #88] ; a0002494 <mount+0x2b8>
a0002438: e284401c add r4, r4, #28
a000243c: e593c000 ldr ip, [r3]
a0002440: e8b4000f ldm r4!, {r0, r1, r2, r3}
a0002444: e28cc018 add ip, ip, #24
a0002448: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000244c: e5943000 ldr r3, [r4]
return 0;
a0002450: 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;
a0002454: e58c3000 str r3, [ip]
a0002458: ea000007 b a000247c <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;
a000245c: e3a06000 mov r6, #0 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
a0002460: e1a00004 mov r0, r4
a0002464: ebfffdf0 bl a0001c2c <free>
if ( loc_to_free )
a0002468: e3560000 cmp r6, #0
a000246c: 0a000001 beq a0002478 <mount+0x29c>
rtems_filesystem_freenode( loc_to_free );
a0002470: e1a00006 mov r0, r6
a0002474: ebfffde7 bl a0001c18 <rtems_filesystem_freenode>
return -1;
a0002478: e3e00000 mvn r0, #0
}
a000247c: e28dd02c add sp, sp, #44 ; 0x2c
a0002480: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000249c <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
a000249c: e92d4010 push {r4, lr}
a00024a0: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
a00024a4: eb002711 bl a000c0f0 <fileno>
a00024a8: e3500002 cmp r0, #2
a00024ac: 8a00000b bhi a00024e0 <newlib_free_buffers+0x44>
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
a00024b0: e1d430bc ldrh r3, [r4, #12]
a00024b4: e3130080 tst r3, #128 ; 0x80
a00024b8: 0a00000a beq a00024e8 <newlib_free_buffers+0x4c>
free( fp->_bf._base );
a00024bc: e5940010 ldr r0, [r4, #16]
a00024c0: ebfffdd9 bl a0001c2c <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
a00024c4: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED
a00024c8: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED
a00024cc: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
a00024d0: e3a03000 mov r3, #0 <== NOT EXECUTED
a00024d4: e5843000 str r3, [r4] <== NOT EXECUTED
a00024d8: e5843010 str r3, [r4, #16] <== NOT EXECUTED
a00024dc: ea000001 b a00024e8 <newlib_free_buffers+0x4c> <== NOT EXECUTED
}
break;
default:
fclose(fp);
a00024e0: e1a00004 mov r0, r4 <== NOT EXECUTED
a00024e4: eb00264c bl a000be1c <fclose> <== NOT EXECUTED
}
return 0;
}
a00024e8: e3a00000 mov r0, #0
a00024ec: e8bd8010 pop {r4, pc}
a00035d0 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
a00035d0: e92d4011 push {r0, r4, lr}
a00035d4: e5cd0000 strb r0, [sp]
int i;
if (tty->termios.c_oflag & OPOST) {
a00035d8: e5913034 ldr r3, [r1, #52] ; 0x34
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
a00035dc: e1a04001 mov r4, r1
int i;
if (tty->termios.c_oflag & OPOST) {
a00035e0: e3130001 tst r3, #1
a00035e4: 0a000045 beq a0003700 <oproc+0x130>
switch (c) {
a00035e8: e5dd2000 ldrb r2, [sp]
a00035ec: e2421008 sub r1, r2, #8
a00035f0: e3510005 cmp r1, #5
a00035f4: 979ff101 ldrls pc, [pc, r1, lsl #2]
a00035f8: ea00002c b a00036b0 <oproc+0xe0>
a00035fc: a000369c .word 0xa000369c
a0003600: a0003674 .word 0xa0003674
a0003604: a0003614 .word 0xa0003614
a0003608: a00036b0 .word 0xa00036b0
a000360c: a00036b0 .word 0xa00036b0
a0003610: a000363c .word 0xa000363c
case '\n':
if (tty->termios.c_oflag & ONLRET)
a0003614: e3130020 tst r3, #32
tty->column = 0;
a0003618: 13a02000 movne r2, #0
a000361c: 15842028 strne r2, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
a0003620: e3130004 tst r3, #4
a0003624: 0a000035 beq a0003700 <oproc+0x130>
rtems_termios_puts ("\r", 1, tty);
a0003628: e59f00e4 ldr r0, [pc, #228] ; a0003714 <oproc+0x144>
a000362c: e3a01001 mov r1, #1
a0003630: e1a02004 mov r2, r4
a0003634: ebffffa4 bl a00034cc <rtems_termios_puts>
a0003638: ea00000b b a000366c <oproc+0x9c>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
a000363c: e3130010 tst r3, #16 <== NOT EXECUTED
a0003640: 0a000002 beq a0003650 <oproc+0x80> <== NOT EXECUTED
a0003644: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED
a0003648: e3520000 cmp r2, #0 <== NOT EXECUTED
a000364c: 0a00002f beq a0003710 <oproc+0x140> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
a0003650: e2132008 ands r2, r3, #8 <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
break;
}
tty->column = 0;
a0003654: 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) {
a0003658: 0a000028 beq a0003700 <oproc+0x130> <== NOT EXECUTED
c = '\n';
a000365c: e3a0200a mov r2, #10 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
a0003660: 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';
a0003664: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
a0003668: 0a000024 beq a0003700 <oproc+0x130> <== NOT EXECUTED
tty->column = 0;
a000366c: e3a03000 mov r3, #0
a0003670: ea000021 b a00036fc <oproc+0x12c>
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
a0003674: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
a0003678: e2033b06 and r3, r3, #6144 ; 0x1800
a000367c: e3530b06 cmp r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
a0003680: e2021007 and r1, r2, #7
a0003684: e2611008 rsb r1, r1, #8
a0003688: e0813002 add r3, r1, r2
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
a000368c: 05843028 streq r3, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
a0003690: 059f0080 ldreq r0, [pc, #128] ; a0003718 <oproc+0x148>
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
a0003694: 1a000018 bne a00036fc <oproc+0x12c>
a0003698: ea00001a b a0003708 <oproc+0x138>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
a000369c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
a00036a0: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
a00036a4: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
a00036a8: ca000013 bgt a00036fc <oproc+0x12c> <== NOT EXECUTED
a00036ac: ea000013 b a0003700 <oproc+0x130> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
a00036b0: e3130002 tst r3, #2
a00036b4: 0a000007 beq a00036d8 <oproc+0x108>
c = toupper(c);
a00036b8: e59f305c ldr r3, [pc, #92] ; a000371c <oproc+0x14c> <== NOT EXECUTED
a00036bc: e5933000 ldr r3, [r3] <== NOT EXECUTED
a00036c0: e0833002 add r3, r3, r2 <== NOT EXECUTED
a00036c4: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED
a00036c8: e2033003 and r3, r3, #3 <== NOT EXECUTED
a00036cc: e3530002 cmp r3, #2 <== NOT EXECUTED
a00036d0: 02422020 subeq r2, r2, #32 <== NOT EXECUTED
a00036d4: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (!iscntrl(c))
a00036d8: e59f203c ldr r2, [pc, #60] ; a000371c <oproc+0x14c>
a00036dc: e5dd3000 ldrb r3, [sp]
a00036e0: e5922000 ldr r2, [r2]
a00036e4: e0823003 add r3, r2, r3
a00036e8: e5d33001 ldrb r3, [r3, #1]
a00036ec: e3130020 tst r3, #32
a00036f0: 1a000002 bne a0003700 <oproc+0x130>
tty->column++;
a00036f4: e5943028 ldr r3, [r4, #40] ; 0x28
a00036f8: e2833001 add r3, r3, #1
a00036fc: e5843028 str r3, [r4, #40] ; 0x28
break;
}
}
rtems_termios_puts (&c, 1, tty);
a0003700: e1a0000d mov r0, sp
a0003704: e3a01001 mov r1, #1
a0003708: e1a02004 mov r2, r4
a000370c: ebffff6e bl a00034cc <rtems_termios_puts>
}
a0003710: e8bd8018 pop {r3, r4, pc}
a000b978 <pipe_ioctl>:
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
a000b978: e59f3060 ldr r3, [pc, #96] ; a000b9e0 <pipe_ioctl+0x68>
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
a000b97c: e92d4070 push {r4, r5, r6, lr}
if (cmd == FIONREAD) {
a000b980: e1510003 cmp r1, r3
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
a000b984: e1a04000 mov r4, r0
a000b988: e1a05002 mov r5, r2
if (cmd == FIONREAD) {
a000b98c: 1a00000d bne a000b9c8 <pipe_ioctl+0x50>
if (buffer == NULL)
a000b990: e3520000 cmp r2, #0
a000b994: 0a00000d beq a000b9d0 <pipe_ioctl+0x58>
return -EFAULT;
if (! PIPE_LOCK(pipe))
a000b998: e3a01000 mov r1, #0
a000b99c: e5900028 ldr r0, [r0, #40] ; 0x28
a000b9a0: e1a02001 mov r2, r1
a000b9a4: ebffed0e bl a0006de4 <rtems_semaphore_obtain>
a000b9a8: e2506000 subs r6, r0, #0
a000b9ac: 1a000009 bne a000b9d8 <pipe_ioctl+0x60>
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
a000b9b0: e594300c ldr r3, [r4, #12]
PIPE_UNLOCK(pipe);
a000b9b4: e5940028 ldr r0, [r4, #40] ; 0x28
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
a000b9b8: e5853000 str r3, [r5]
PIPE_UNLOCK(pipe);
a000b9bc: ebffed4e bl a0006efc <rtems_semaphore_release>
return 0;
a000b9c0: e1a00006 mov r0, r6
a000b9c4: e8bd8070 pop {r4, r5, r6, pc}
}
return -EINVAL;
a000b9c8: e3e00015 mvn r0, #21
a000b9cc: e8bd8070 pop {r4, r5, r6, pc}
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
a000b9d0: e3e0000d mvn r0, #13
a000b9d4: e8bd8070 pop {r4, r5, r6, pc}
if (! PIPE_LOCK(pipe))
return -EINTR;
a000b9d8: e3e00003 mvn r0, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
a000b9dc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000b658 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
a000b658: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000b65c: e1a09001 mov r9, r1
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
a000b660: e3a01000 mov r1, #0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
a000b664: e1a04000 mov r4, r0
a000b668: e1a05002 mov r5, r2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
a000b66c: e5900028 ldr r0, [r0, #40] ; 0x28
a000b670: e1a02001 mov r2, r1
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
a000b674: e1a0a003 mov sl, r3
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
a000b678: ebffedd9 bl a0006de4 <rtems_semaphore_obtain>
a000b67c: e2506000 subs r6, r0, #0
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
a000b680: 01a0b00d moveq fp, sp
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
a000b684: 0a000044 beq a000b79c <pipe_read+0x144>
a000b688: ea00004f b a000b7cc <pipe_read+0x174> <== NOT EXECUTED
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
a000b68c: e5947014 ldr r7, [r4, #20]
a000b690: e3570000 cmp r7, #0
a000b694: 0a000045 beq a000b7b0 <pipe_read+0x158>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
a000b698: e59a8014 ldr r8, [sl, #20]
a000b69c: e2188001 ands r8, r8, #1
a000b6a0: 1a000041 bne a000b7ac <pipe_read+0x154>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
a000b6a4: e5943018 ldr r3, [r4, #24]
PIPE_UNLOCK(pipe);
a000b6a8: e5940028 ldr r0, [r4, #40] ; 0x28
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
a000b6ac: e2833001 add r3, r3, #1
a000b6b0: e5843018 str r3, [r4, #24]
PIPE_UNLOCK(pipe);
a000b6b4: ebffee10 bl a0006efc <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
a000b6b8: e1a01008 mov r1, r8
a000b6bc: e594002c ldr r0, [r4, #44] ; 0x2c
a000b6c0: eb000388 bl a000c4e8 <rtems_barrier_wait>
a000b6c4: e3500000 cmp r0, #0
a000b6c8: 01a07000 moveq r7, r0
a000b6cc: 13e07003 mvnne r7, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
a000b6d0: e1a01008 mov r1, r8
a000b6d4: e5940028 ldr r0, [r4, #40] ; 0x28
a000b6d8: e1a02008 mov r2, r8
a000b6dc: ebffedc0 bl a0006de4 <rtems_semaphore_obtain>
a000b6e0: e3500000 cmp r0, #0
a000b6e4: 1a000034 bne a000b7bc <pipe_read+0x164>
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
a000b6e8: e5943018 ldr r3, [r4, #24]
if (ret != 0)
a000b6ec: e3570000 cmp r7, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
a000b6f0: e2433001 sub r3, r3, #1
a000b6f4: e5843018 str r3, [r4, #24]
if (ret != 0)
a000b6f8: 1a00002c bne a000b7b0 <pipe_read+0x158>
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
a000b6fc: e594300c ldr r3, [r4, #12]
a000b700: e3530000 cmp r3, #0
a000b704: 0affffe0 beq a000b68c <pipe_read+0x34>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
a000b708: e0667005 rsb r7, r6, r5
a000b70c: e1530007 cmp r3, r7
a000b710: 31a07003 movcc r7, r3
chunk1 = pipe->Size - pipe->Start;
a000b714: e5948004 ldr r8, [r4, #4]
a000b718: e5943008 ldr r3, [r4, #8]
a000b71c: e5941000 ldr r1, [r4]
a000b720: e0890006 add r0, r9, r6
a000b724: e0638008 rsb r8, r3, r8
if (chunk > chunk1) {
a000b728: e1570008 cmp r7, r8
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);
a000b72c: d0811003 addle r1, r1, r3
a000b730: d1a02007 movle r2, r7
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
a000b734: da000006 ble a000b754 <pipe_read+0xfc>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
a000b738: e0811003 add r1, r1, r3
a000b73c: e1a02008 mov r2, r8
a000b740: eb000c9a bl a000e9b0 <memcpy>
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
a000b744: e5941000 ldr r1, [r4]
a000b748: e0860008 add r0, r6, r8
a000b74c: e0890000 add r0, r9, r0
a000b750: e0682007 rsb r2, r8, r7
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
a000b754: eb000c95 bl a000e9b0 <memcpy>
pipe->Start += chunk;
a000b758: e5940008 ldr r0, [r4, #8]
pipe->Start %= pipe->Size;
a000b75c: e5941004 ldr r1, [r4, #4]
a000b760: e0870000 add r0, r7, r0
a000b764: eb0038dc bl a0019adc <__umodsi3>
pipe->Length -= chunk;
a000b768: e594300c ldr r3, [r4, #12]
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
a000b76c: e5840008 str r0, [r4, #8]
pipe->Length -= chunk;
a000b770: e0673003 rsb r3, r7, r3
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
a000b774: e3530000 cmp r3, #0
pipe->Start = 0;
a000b778: 05843008 streq r3, [r4, #8]
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
pipe->Length -= chunk;
a000b77c: e584300c str r3, [r4, #12]
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
a000b780: e594301c ldr r3, [r4, #28]
a000b784: e3530000 cmp r3, #0
a000b788: 0a000002 beq a000b798 <pipe_read+0x140>
PIPE_WAKEUPWRITERS(pipe);
a000b78c: e5940030 ldr r0, [r4, #48] ; 0x30
a000b790: e1a0100d mov r1, sp
a000b794: eb00033d bl a000c490 <rtems_barrier_release>
read += chunk;
a000b798: e0866007 add r6, r6, r7
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
a000b79c: e1560005 cmp r6, r5
a000b7a0: 3affffd5 bcc a000b6fc <pipe_read+0xa4>
a000b7a4: e3a07000 mov r7, #0
a000b7a8: ea000000 b a000b7b0 <pipe_read+0x158>
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
a000b7ac: e3e0700a mvn r7, #10
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
a000b7b0: e5940028 ldr r0, [r4, #40] ; 0x28
a000b7b4: ebffedd0 bl a0006efc <rtems_semaphore_release>
a000b7b8: ea000000 b a000b7c0 <pipe_read+0x168>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
a000b7bc: e3e07003 mvn r7, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
a000b7c0: e3560000 cmp r6, #0
a000b7c4: d1a06007 movle r6, r7
a000b7c8: ea000000 b a000b7d0 <pipe_read+0x178>
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
a000b7cc: e3e06003 mvn r6, #3 <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
a000b7d0: e1a00006 mov r0, r6
a000b7d4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000b7d8 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
a000b7d8: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
a000b7dc: e2527000 subs r7, r2, #0
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
a000b7e0: e1a04000 mov r4, r0
a000b7e4: e1a0b001 mov fp, r1
a000b7e8: e1a08003 mov r8, r3
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
a000b7ec: 01a05007 moveq r5, r7
)
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
a000b7f0: 0a00005e beq a000b970 <pipe_write+0x198>
return 0;
if (! PIPE_LOCK(pipe))
a000b7f4: e3a01000 mov r1, #0
a000b7f8: e5900028 ldr r0, [r0, #40] ; 0x28
a000b7fc: e1a02001 mov r2, r1
a000b800: ebffed77 bl a0006de4 <rtems_semaphore_obtain>
a000b804: e3500000 cmp r0, #0
return -EINTR;
a000b808: 13e05003 mvnne r5, #3
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
a000b80c: 1a000057 bne a000b970 <pipe_write+0x198>
return -EINTR;
if (pipe->Readers == 0) {
a000b810: e5945010 ldr r5, [r4, #16]
a000b814: e3550000 cmp r5, #0
a000b818: 0a00004d beq a000b954 <pipe_write+0x17c>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
a000b81c: e5949004 ldr r9, [r4, #4]
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
a000b820: e1a05000 mov r5, r0
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
a000b824: e1570009 cmp r7, r9
a000b828: 91a09007 movls r9, r7
a000b82c: 83a09001 movhi r9, #1
a000b830: ea000041 b a000b93c <pipe_write+0x164>
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
a000b834: e598a014 ldr sl, [r8, #20]
a000b838: e21aa001 ands sl, sl, #1
a000b83c: 1a000042 bne a000b94c <pipe_write+0x174>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
a000b840: e594301c ldr r3, [r4, #28]
PIPE_UNLOCK(pipe);
a000b844: e5940028 ldr r0, [r4, #40] ; 0x28
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
a000b848: e2833001 add r3, r3, #1
a000b84c: e584301c str r3, [r4, #28]
PIPE_UNLOCK(pipe);
a000b850: ebffeda9 bl a0006efc <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
a000b854: e1a0100a mov r1, sl
a000b858: e5940030 ldr r0, [r4, #48] ; 0x30
a000b85c: eb000321 bl a000c4e8 <rtems_barrier_wait>
a000b860: e3500000 cmp r0, #0
a000b864: 01a06000 moveq r6, r0
a000b868: 13e06003 mvnne r6, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
a000b86c: e1a0100a mov r1, sl
a000b870: e5940028 ldr r0, [r4, #40] ; 0x28
a000b874: e1a0200a mov r2, sl
a000b878: ebffed59 bl a0006de4 <rtems_semaphore_obtain>
a000b87c: e3500000 cmp r0, #0
a000b880: 1a000037 bne a000b964 <pipe_write+0x18c>
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
a000b884: e594301c ldr r3, [r4, #28]
if (ret != 0)
a000b888: e3560000 cmp r6, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
a000b88c: e2433001 sub r3, r3, #1
a000b890: e584301c str r3, [r4, #28]
if (ret != 0)
a000b894: 1a00002f bne a000b958 <pipe_write+0x180>
goto out_locked;
if (pipe->Readers == 0) {
a000b898: e5943010 ldr r3, [r4, #16]
a000b89c: e3530000 cmp r3, #0
a000b8a0: 0a00002b beq a000b954 <pipe_write+0x17c>
/* 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) {
a000b8a4: e594a004 ldr sl, [r4, #4]
a000b8a8: e594300c ldr r3, [r4, #12]
a000b8ac: e063200a rsb r2, r3, sl
a000b8b0: e1520009 cmp r2, r9
a000b8b4: 3affffde bcc a000b834 <pipe_write+0x5c>
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
a000b8b8: e5940008 ldr r0, [r4, #8]
a000b8bc: e1a0100a mov r1, sl
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
a000b8c0: e0656007 rsb r6, r5, r7
chunk1 = pipe->Size - PIPE_WSTART(pipe);
a000b8c4: e0830000 add r0, r3, r0
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
a000b8c8: e1520006 cmp r2, r6
a000b8cc: 31a06002 movcc r6, r2
chunk1 = pipe->Size - PIPE_WSTART(pipe);
a000b8d0: eb003881 bl a0019adc <__umodsi3>
a000b8d4: e5943000 ldr r3, [r4]
a000b8d8: e060a00a rsb sl, r0, sl
if (chunk > chunk1) {
a000b8dc: e156000a cmp r6, sl
a000b8e0: 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);
a000b8e4: d0830000 addle r0, r3, r0
a000b8e8: d1a02006 movle r2, r6
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
if (chunk > chunk1) {
a000b8ec: da000006 ble a000b90c <pipe_write+0x134>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
a000b8f0: e1a0200a mov r2, sl
a000b8f4: e0830000 add r0, r3, r0
a000b8f8: eb000c2c bl a000e9b0 <memcpy>
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
a000b8fc: e5940000 ldr r0, [r4]
a000b900: e08a1005 add r1, sl, r5
a000b904: e08b1001 add r1, fp, r1
a000b908: e06a2006 rsb r2, sl, r6
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
a000b90c: eb000c27 bl a000e9b0 <memcpy>
pipe->Length += chunk;
a000b910: e594300c ldr r3, [r4, #12]
a000b914: e0833006 add r3, r3, r6
a000b918: e584300c str r3, [r4, #12]
if (pipe->waitingReaders > 0)
a000b91c: e5943018 ldr r3, [r4, #24]
a000b920: e3530000 cmp r3, #0
a000b924: 0a000002 beq a000b934 <pipe_write+0x15c>
PIPE_WAKEUPREADERS(pipe);
a000b928: e594002c ldr r0, [r4, #44] ; 0x2c
a000b92c: e1a0100d mov r1, sp
a000b930: eb0002d6 bl a000c490 <rtems_barrier_release>
written += chunk;
a000b934: e0855006 add r5, r5, r6
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
a000b938: e3a09001 mov r9, #1
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
a000b93c: e1550007 cmp r5, r7
a000b940: 3affffd7 bcc a000b8a4 <pipe_write+0xcc>
a000b944: e3a06000 mov r6, #0
a000b948: ea000002 b a000b958 <pipe_write+0x180>
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
a000b94c: e3e0600a mvn r6, #10
a000b950: ea000000 b a000b958 <pipe_write+0x180>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
a000b954: e3e0601f mvn r6, #31
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
a000b958: e5940028 ldr r0, [r4, #40] ; 0x28
a000b95c: ebffed66 bl a0006efc <rtems_semaphore_release>
a000b960: ea000000 b a000b968 <pipe_write+0x190>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
a000b964: e3e06003 mvn r6, #3 <== NOT EXECUTED
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
return written;
return ret;
a000b968: e3550000 cmp r5, #0
a000b96c: d1a05006 movle r5, r6
}
a000b970: e1a00005 mov r0, r5
a000b974: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0010e0c <realloc>:
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
a0010e0c: e59f310c ldr r3, [pc, #268] ; a0010f20 <realloc+0x114>
void *realloc(
void *ptr,
size_t size
)
{
a0010e10: e92d40f1 push {r0, r4, r5, r6, r7, lr}
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
a0010e14: e5932010 ldr r2, [r3, #16]
void *realloc(
void *ptr,
size_t size
)
{
a0010e18: e1a04000 mov r4, r0
a0010e1c: e1a05001 mov r5, r1
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
a0010e20: e2822001 add r2, r2, #1
a0010e24: 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())) {
a0010e28: e59f30f4 ldr r3, [pc, #244] ; a0010f24 <realloc+0x118>
a0010e2c: e5933000 ldr r3, [r3]
a0010e30: e3530003 cmp r3, #3
a0010e34: 1a000009 bne a0010e60 <realloc+0x54>
if (_Thread_Dispatch_disable_level > 0)
a0010e38: e59f30e8 ldr r3, [pc, #232] ; a0010f28 <realloc+0x11c>
a0010e3c: e5933000 ldr r3, [r3]
a0010e40: e3530000 cmp r3, #0
return (void *) 0;
a0010e44: 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)
a0010e48: 1a000032 bne a0010f18 <realloc+0x10c>
return (void *) 0;
if (_ISR_Nest_level > 0)
a0010e4c: e59f20d8 ldr r2, [pc, #216] ; a0010f2c <realloc+0x120>
a0010e50: e5922000 ldr r2, [r2]
a0010e54: e3520000 cmp r2, #0
return (void *) 0;
a0010e58: 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)
a0010e5c: 1a00002d bne a0010f18 <realloc+0x10c>
}
/*
* Continue with realloc().
*/
if ( !ptr )
a0010e60: e3540000 cmp r4, #0
a0010e64: 1a000003 bne a0010e78 <realloc+0x6c>
return malloc( size );
a0010e68: e1a00005 mov r0, r5
a0010e6c: ebffc44c bl a0001fa4 <malloc>
a0010e70: e1a04000 mov r4, r0
a0010e74: ea000027 b a0010f18 <realloc+0x10c>
if ( !size ) {
a0010e78: e3550000 cmp r5, #0
a0010e7c: 1a000003 bne a0010e90 <realloc+0x84>
free( ptr );
a0010e80: e1a00004 mov r0, r4 <== NOT EXECUTED
a0010e84: ebffc368 bl a0001c2c <free> <== NOT EXECUTED
return (void *) 0;
a0010e88: e1a04005 mov r4, r5 <== NOT EXECUTED
a0010e8c: ea000021 b a0010f18 <realloc+0x10c> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
a0010e90: e59f6098 ldr r6, [pc, #152] ; a0010f30 <realloc+0x124>
a0010e94: e1a01004 mov r1, r4
a0010e98: e1a0200d mov r2, sp
a0010e9c: e5960000 ldr r0, [r6]
a0010ea0: eb00004e bl a0010fe0 <_Protected_heap_Get_block_size>
a0010ea4: e2507000 subs r7, r0, #0
a0010ea8: 1a000004 bne a0010ec0 <realloc+0xb4>
errno = EINVAL;
a0010eac: ebffeb8c bl a000bce4 <__errno>
a0010eb0: e3a03016 mov r3, #22
a0010eb4: e5803000 str r3, [r0]
return (void *) 0;
a0010eb8: e1a04007 mov r4, r7
a0010ebc: ea000015 b a0010f18 <realloc+0x10c>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
a0010ec0: e5960000 ldr r0, [r6]
a0010ec4: e1a01004 mov r1, r4
a0010ec8: e1a02005 mov r2, r5
a0010ecc: eb000054 bl a0011024 <_Protected_heap_Resize_block>
a0010ed0: e3500000 cmp r0, #0
a0010ed4: 1a00000f bne a0010f18 <realloc+0x10c>
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
a0010ed8: e1a00005 mov r0, r5
a0010edc: ebffc430 bl a0001fa4 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
a0010ee0: e59f3038 ldr r3, [pc, #56] ; a0010f20 <realloc+0x114>
if ( !new_area ) {
a0010ee4: e2506000 subs r6, r0, #0
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
a0010ee8: e5932004 ldr r2, [r3, #4]
a0010eec: e2422001 sub r2, r2, #1
a0010ef0: e5832004 str r2, [r3, #4]
if ( !new_area ) {
a0010ef4: 0a000006 beq a0010f14 <realloc+0x108>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
a0010ef8: e59d2000 ldr r2, [sp]
a0010efc: e1a01004 mov r1, r4
a0010f00: e1550002 cmp r5, r2
a0010f04: 31a02005 movcc r2, r5
a0010f08: ebffeda3 bl a000c59c <memcpy>
free( ptr );
a0010f0c: e1a00004 mov r0, r4
a0010f10: ebffc345 bl a0001c2c <free>
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
a0010f14: e1a04006 mov r4, r6
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
a0010f18: e1a00004 mov r0, r4
a0010f1c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
a0005b10 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a0005b10: e92d4030 push {r4, r5, lr}
a0005b14: e1a04002 mov r4, r2
a0005b18: e1a05003 mov r5, r3
RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Append_with_empty_check( chain, node );
a0005b1c: eb000127 bl a0005fc0 <_Chain_Append_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
a0005b20: e3500000 cmp r0, #0
a0005b24: 0a000003 beq a0005b38 <rtems_chain_append_with_notification+0x28>
sc = rtems_event_send( task, events );
a0005b28: e1a00004 mov r0, r4
a0005b2c: e1a01005 mov r1, r5
}
return sc;
}
a0005b30: e8bd4030 pop {r4, r5, lr}
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
a0005b34: eafffda5 b a00051d0 <rtems_event_send>
}
return sc;
}
a0005b38: e8bd8030 pop {r4, r5, pc}
a0005bc0 <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a0005bc0: e92d4030 push {r4, r5, lr}
a0005bc4: e1a04002 mov r4, r2
a0005bc8: e1a05003 mov r5, r3
RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Prepend_with_empty_check( chain, node );
a0005bcc: eb00014a bl a00060fc <_Chain_Prepend_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
a0005bd0: e3500000 cmp r0, #0
a0005bd4: 0a000003 beq a0005be8 <rtems_chain_prepend_with_notification+0x28>
sc = rtems_event_send( task, events );
a0005bd8: e1a00004 mov r0, r4
a0005bdc: e1a01005 mov r1, r5
}
return sc;
}
a0005be0: e8bd4030 pop {r4, r5, lr}
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
a0005be4: eafffd79 b a00051d0 <rtems_event_send>
}
return sc;
}
a0005be8: e8bd8030 pop {r4, r5, pc}
a000226c <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a000226c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
a0002270: e251a000 subs sl, r1, #0
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a0002274: e24dd040 sub sp, sp, #64 ; 0x40
a0002278: e1a08000 mov r8, r0
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
a000227c: 0a000053 beq a00023d0 <rtems_cpu_usage_report_with_plugin+0x164>
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
a0002280: e28d5030 add r5, sp, #48 ; 0x30
a0002284: e1a00005 mov r0, r5
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
a0002288: e28d4028 add r4, sp, #40 ; 0x28
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
a000228c: eb001487 bl a00074b0 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
a0002290: e1a01005 mov r1, r5
a0002294: e59f013c ldr r0, [pc, #316] ; a00023d8 <rtems_cpu_usage_report_with_plugin+0x16c>
a0002298: e1a02004 mov r2, r4
a000229c: eb001d24 bl a0009734 <_Timespec_Subtract>
}
}
}
#endif
(*print)(
a00022a0: e1a00008 mov r0, r8
a00022a4: e59f1130 ldr r1, [pc, #304] ; a00023dc <rtems_cpu_usage_report_with_plugin+0x170>
a00022a8: e12fff3a blx sl
a00022ac: e59f512c ldr r5, [pc, #300] ; a00023e0 <rtems_cpu_usage_report_with_plugin+0x174>
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
a00022b0: 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 ] )
a00022b4: e5b53004 ldr r3, [r5, #4]!
a00022b8: e3530000 cmp r3, #0
a00022bc: 0a000038 beq a00023a4 <rtems_cpu_usage_report_with_plugin+0x138>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
a00022c0: e5936004 ldr r6, [r3, #4]
if ( information ) {
a00022c4: e3560000 cmp r6, #0
a00022c8: 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(
a00022cc: 128d9018 addne r9, sp, #24
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
a00022d0: 1a000030 bne a0002398 <rtems_cpu_usage_report_with_plugin+0x12c>
a00022d4: ea000032 b a00023a4 <rtems_cpu_usage_report_with_plugin+0x138><== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
a00022d8: e596301c ldr r3, [r6, #28]
a00022dc: e7934107 ldr r4, [r3, r7, lsl #2]
if ( !the_thread )
a00022e0: e3540000 cmp r4, #0
a00022e4: 0a00002a beq a0002394 <rtems_cpu_usage_report_with_plugin+0x128>
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
a00022e8: e3a0100d mov r1, #13
a00022ec: e1a0200b mov r2, fp
a00022f0: e5940008 ldr r0, [r4, #8]
a00022f4: eb000fd8 bl a000625c <rtems_object_get_name>
(*print)(
a00022f8: e5942008 ldr r2, [r4, #8]
a00022fc: e1a0300b mov r3, fp
a0002300: e1a00008 mov r0, r8
a0002304: e59f10d8 ldr r1, [pc, #216] ; a00023e4 <rtems_cpu_usage_report_with_plugin+0x178>
a0002308: e12fff3a blx 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;
a000230c: e2843084 add r3, r4, #132 ; 0x84
a0002310: e893000c ldm r3, {r2, r3}
a0002314: e58d2020 str r2, [sp, #32]
a0002318: e58d3024 str r3, [sp, #36] ; 0x24
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
a000231c: e59f20c4 ldr r2, [pc, #196] ; a00023e8 <rtems_cpu_usage_report_with_plugin+0x17c>
a0002320: e5923004 ldr r3, [r2, #4]
a0002324: e5932008 ldr r2, [r3, #8]
a0002328: e5943008 ldr r3, [r4, #8]
a000232c: e1520003 cmp r2, r3
a0002330: 1a000006 bne a0002350 <rtems_cpu_usage_report_with_plugin+0xe4>
Timestamp_Control used;
_Timestamp_Subtract(
a0002334: e59f00b0 ldr r0, [pc, #176] ; a00023ec <rtems_cpu_usage_report_with_plugin+0x180>
a0002338: e28d1030 add r1, sp, #48 ; 0x30
a000233c: e1a02009 mov r2, r9
a0002340: eb001cfb bl a0009734 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
a0002344: e28d0020 add r0, sp, #32
a0002348: e1a01009 mov r1, r9
a000234c: eb001cbc bl a0009644 <_Timespec_Add_to>
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
a0002350: e28d203c add r2, sp, #60 ; 0x3c
a0002354: e28d3038 add r3, sp, #56 ; 0x38
a0002358: e28d0020 add r0, sp, #32
a000235c: e28d1028 add r1, sp, #40 ; 0x28
a0002360: eb001ccf bl a00096a4 <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
a0002364: e3a01ffa mov r1, #1000 ; 0x3e8
a0002368: e59d0024 ldr r0, [sp, #36] ; 0x24
a000236c: eb005188 bl a0016994 <__aeabi_uidiv>
a0002370: e59d203c ldr r2, [sp, #60] ; 0x3c
a0002374: e1a03000 mov r3, r0
a0002378: e59f1070 ldr r1, [pc, #112] ; a00023f0 <rtems_cpu_usage_report_with_plugin+0x184>
a000237c: e58d2000 str r2, [sp]
a0002380: e59d2038 ldr r2, [sp, #56] ; 0x38
a0002384: e1a00008 mov r0, r8
a0002388: e58d2004 str r2, [sp, #4]
a000238c: e59d2020 ldr r2, [sp, #32]
a0002390: e12fff3a blx sl
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
a0002394: e2877001 add r7, r7, #1
a0002398: e1d631b0 ldrh r3, [r6, #16]
a000239c: e1570003 cmp r7, r3
a00023a0: 9affffcc bls a00022d8 <rtems_cpu_usage_report_with_plugin+0x6c>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
a00023a4: e59f3048 ldr r3, [pc, #72] ; a00023f4 <rtems_cpu_usage_report_with_plugin+0x188>
a00023a8: e1550003 cmp r5, r3
a00023ac: 1affffc0 bne a00022b4 <rtems_cpu_usage_report_with_plugin+0x48>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
a00023b0: e3a01ffa mov r1, #1000 ; 0x3e8
a00023b4: e59d002c ldr r0, [sp, #44] ; 0x2c
a00023b8: eb005175 bl a0016994 <__aeabi_uidiv>
a00023bc: e59f1034 ldr r1, [pc, #52] ; a00023f8 <rtems_cpu_usage_report_with_plugin+0x18c>
a00023c0: e1a03000 mov r3, r0
a00023c4: e59d2028 ldr r2, [sp, #40] ; 0x28
a00023c8: e1a00008 mov r0, r8
a00023cc: e12fff3a blx sl
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
a00023d0: e28dd040 add sp, sp, #64 ; 0x40
a00023d4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0001988 <rtems_filesystem_initialize>:
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
a0001988: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
a000198c: e59f60e0 ldr r6, [pc, #224] ; a0001a74 <rtems_filesystem_initialize+0xec>
a0001990: e3a02012 mov r2, #18
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
a0001994: e24dd018 sub sp, sp, #24
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
a0001998: e5963000 ldr r3, [r6]
a000199c: e583202c str r2, [r3, #44] ; 0x2c
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
a00019a0: e59f30d0 ldr r3, [pc, #208] ; a0001a78 <rtems_filesystem_initialize+0xf0>
a00019a4: e5933000 ldr r3, [r3]
a00019a8: e3530000 cmp r3, #0
rtems_fatal_error_occurred( 0xABCD0001 );
a00019ac: 059f00c8 ldreq r0, [pc, #200] ; a0001a7c <rtems_filesystem_initialize+0xf4>
rtems_filesystem_umask = 022;
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
a00019b0: 0a00000a beq a00019e0 <rtems_filesystem_initialize+0x58>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
a00019b4: e59f30c4 ldr r3, [pc, #196] ; a0001a80 <rtems_filesystem_initialize+0xf8>
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
a00019b8: e3a05000 mov r5, #0
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
a00019bc: e5933000 ldr r3, [r3]
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
a00019c0: e58d5000 str r5, [sp]
a00019c4: e5930008 ldr r0, [r3, #8]
a00019c8: e593100c ldr r1, [r3, #12]
a00019cc: e893000c ldm r3, {r2, r3}
a00019d0: eb000201 bl a00021dc <mount>
if ( status == -1 )
a00019d4: e3700001 cmn r0, #1
a00019d8: 1a000001 bne a00019e4 <rtems_filesystem_initialize+0x5c>
rtems_fatal_error_occurred( 0xABCD0002 );
a00019dc: e59f00a0 ldr r0, [pc, #160] ; a0001a84 <rtems_filesystem_initialize+0xfc><== NOT EXECUTED
a00019e0: eb000eb0 bl a00054a8 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_filesystem_link_counts = 0;
a00019e4: e5963000 ldr r3, [r6]
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
a00019e8: e28d4004 add r4, sp, #4
a00019ec: e3a01001 mov r1, #1
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
a00019f0: e1c353b0 strh r5, [r3, #48] ; 0x30
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
a00019f4: e1a02005 mov r2, r5
a00019f8: e1a03004 mov r3, r4
a00019fc: e59f0084 ldr r0, [pc, #132] ; a0001a88 <rtems_filesystem_initialize+0x100>
a0001a00: e58d5000 str r5, [sp]
a0001a04: eb000053 bl a0001b58 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
a0001a08: e596c000 ldr ip, [r6]
a0001a0c: e1a07004 mov r7, r4
a0001a10: e8b7000f ldm r7!, {r0, r1, r2, r3}
a0001a14: e28cc018 add ip, ip, #24
a0001a18: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0001a1c: e5973000 ldr r3, [r7]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
a0001a20: e3a01001 mov r1, #1
a0001a24: e1a02005 mov r2, r5
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
a0001a28: e58c3000 str r3, [ip]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
a0001a2c: e59f0054 ldr r0, [pc, #84] ; a0001a88 <rtems_filesystem_initialize+0x100>
a0001a30: e1a03004 mov r3, r4
a0001a34: e58d5000 str r5, [sp]
a0001a38: eb000046 bl a0001b58 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
a0001a3c: e8b4000f ldm r4!, {r0, r1, r2, r3}
a0001a40: e596c000 ldr ip, [r6]
a0001a44: e28cc004 add ip, ip, #4
a0001a48: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0001a4c: e5973000 ldr r3, [r7]
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
a0001a50: e59f0034 ldr r0, [pc, #52] ; a0001a8c <rtems_filesystem_initialize+0x104>
a0001a54: e59f1034 ldr r1, [pc, #52] ; a0001a90 <rtems_filesystem_initialize+0x108>
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
a0001a58: e58c3000 str r3, [ip]
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
a0001a5c: eb00018d bl a0002098 <mkdir>
if ( status != 0 )
a0001a60: e3500000 cmp r0, #0
rtems_fatal_error_occurred( 0xABCD0003 );
a0001a64: 159f0028 ldrne r0, [pc, #40] ; a0001a94 <rtems_filesystem_initialize+0x10c>
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
a0001a68: 1affffdc bne a00019e0 <rtems_filesystem_initialize+0x58>
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
a0001a6c: e28dd018 add sp, sp, #24
a0001a70: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000273c <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
a000273c: e92d4070 push {r4, r5, r6, lr}
a0002740: 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 ) );
a0002744: e3a00008 mov r0, #8
}
return 0;
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
a0002748: 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 ) );
a000274c: eb000100 bl a0002b54 <malloc>
a0002750: e1a04000 mov r4, r0
*key = new_key;
a0002754: 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 );
a0002758: 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;
a000275c: 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 );
a0002760: 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;
a0002764: 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 );
a0002768: eb000e10 bl a0005fb0 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
a000276c: e3500000 cmp r0, #0
a0002770: 0a000002 beq a0002780 <rtems_gxx_key_create+0x44>
return 0;
free( new_key );
a0002774: e1a00004 mov r0, r4 <== NOT EXECUTED
a0002778: ebffff89 bl a00025a4 <free> <== NOT EXECUTED
return -1;
a000277c: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a0002780: e8bd8070 pop {r4, r5, r6, pc}
a0009474 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
a0009474: e2003006 and r3, r0, #6
a0009478: e3530006 cmp r3, #6
fcntl_flags |= O_RDWR;
a000947c: 03a03002 moveq r3, #2
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
a0009480: 0a000005 beq a000949c <rtems_libio_to_fcntl_flags+0x28>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
a0009484: e3100002 tst r0, #2
fcntl_flags |= O_RDONLY;
a0009488: 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) {
a000948c: 1a000002 bne a000949c <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;
a0009490: e3100004 tst r0, #4 <== NOT EXECUTED
a0009494: 03a03000 moveq r3, #0 <== NOT EXECUTED
a0009498: 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 ) {
a000949c: e3100001 tst r0, #1
fcntl_flags |= O_NONBLOCK;
a00094a0: 13833901 orrne r3, r3, #16384 ; 0x4000
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
a00094a4: e3100c02 tst r0, #512 ; 0x200
fcntl_flags |= O_APPEND;
a00094a8: 13833008 orrne r3, r3, #8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
a00094ac: e3100b01 tst r0, #1024 ; 0x400
fcntl_flags |= O_CREAT;
a00094b0: 13833c02 orrne r3, r3, #512 ; 0x200
}
return fcntl_flags;
}
a00094b4: e1a00003 mov r0, r3
a00094b8: e12fff1e bx lr
a00013a4 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
a00013a4: e59f307c ldr r3, [pc, #124] ; a0001428 <rtems_stack_checker_is_blown+0x84>
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
a00013a8: e92d4810 push {r4, fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
a00013ac: e5933004 ldr r3, [r3, #4]
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
a00013b0: e28db008 add fp, sp, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
a00013b4: e59300b8 ldr r0, [r3, #184] ; 0xb8
a00013b8: e15b0000 cmp fp, r0
return false;
a00013bc: 33a04000 movcc r4, #0
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
a00013c0: 3a000004 bcc a00013d8 <rtems_stack_checker_is_blown+0x34>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
a00013c4: e59340b4 ldr r4, [r3, #180] ; 0xb4
a00013c8: e0804004 add r4, r0, r4
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
a00013cc: e15b0004 cmp fp, r4
a00013d0: 83a04000 movhi r4, #0
a00013d4: 93a04001 movls r4, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
a00013d8: e59f304c ldr r3, [pc, #76] ; a000142c <rtems_stack_checker_is_blown+0x88>
a00013dc: e5933008 ldr r3, [r3, #8]
a00013e0: 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;
a00013e4: 03a01001 moveq r1, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
a00013e8: 0a000005 beq a0001404 <rtems_stack_checker_is_blown+0x60>
pattern_ok = (!memcmp(
a00013ec: e59f103c ldr r1, [pc, #60] ; a0001430 <rtems_stack_checker_is_blown+0x8c>
a00013f0: e2800008 add r0, r0, #8
a00013f4: e3a02010 mov r2, #16
a00013f8: eb002c53 bl a000c54c <memcmp>
a00013fc: e2701001 rsbs r1, r0, #1
a0001400: 33a01000 movcc r1, #0
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
a0001404: e3540000 cmp r4, #0
a0001408: 0a000001 beq a0001414 <rtems_stack_checker_is_blown+0x70>
a000140c: e3510000 cmp r1, #0
a0001410: 1a000002 bne a0001420 <rtems_stack_checker_is_blown+0x7c>
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
a0001414: e59f300c ldr r3, [pc, #12] ; a0001428 <rtems_stack_checker_is_blown+0x84><== NOT EXECUTED
a0001418: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
a000141c: ebffff9b bl a0001290 <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
a0001420: e3a00000 mov r0, #0
a0001424: e8bd8810 pop {r4, fp, pc}
a000b020 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
a000b020: e92d40f1 push {r0, r4, r5, r6, r7, lr}
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
a000b024: e2514000 subs r4, r1, #0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
a000b028: e1a05000 mov r5, r0
a000b02c: e1a06002 mov r6, r2
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
a000b030: 03a00009 moveq r0, #9
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
a000b034: 0a000018 beq a000b09c <rtems_string_to_pointer+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
a000b038: eb0007ab bl a000ceec <__errno>
a000b03c: e3a03000 mov r3, #0
a000b040: 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 );
a000b044: e1a0100d mov r1, sp
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
a000b048: 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 );
a000b04c: e1a00005 mov r0, r5
a000b050: e3a02010 mov r2, #16
a000b054: eb0014d3 bl a00103a8 <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 )
a000b058: e3560000 cmp r6, #0
*endptr = end;
a000b05c: 159d3000 ldrne r3, [sp]
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
a000b060: e1a07000 mov r7, r0
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
a000b064: 15863000 strne r3, [r6]
/* nothing was converted */
if ( end == s )
a000b068: e59d3000 ldr r3, [sp]
a000b06c: e1530005 cmp r3, r5
return RTEMS_NOT_DEFINED;
a000b070: 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 )
a000b074: 0a000008 beq a000b09c <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))
a000b078: e3770001 cmn r7, #1
a000b07c: 1a000004 bne a000b094 <rtems_string_to_pointer+0x74>
a000b080: eb000799 bl a000ceec <__errno> <== NOT EXECUTED
a000b084: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000b088: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
a000b08c: 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))
a000b090: 0a000001 beq a000b09c <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;
a000b094: e5847000 str r7, [r4]
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
a000b098: e3a00000 mov r0, #0
}
a000b09c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
a0001764 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
a0001764: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0001768: e24ddf6b sub sp, sp, #428 ; 0x1ac
a000176c: e58d1010 str r1, [sp, #16]
a0001770: e58d2018 str r2, [sp, #24]
a0001774: e58d000c str r0, [sp, #12]
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
a0001778: eb003ac1 bl a0010284 <strlen>
a000177c: e3a02000 mov r2, #0
a0001780: e1a01000 mov r1, r0
a0001784: e28d3f65 add r3, sp, #404 ; 0x194
a0001788: e59d000c ldr r0, [sp, #12]
a000178c: e58d2000 str r2, [sp]
a0001790: eb00029e bl a0002210 <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
a0001794: e2504000 subs r4, r0, #0
a0001798: 1a00006d bne a0001954 <rtems_tarfs_load+0x1f0>
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
a000179c: e59d31a0 ldr r3, [sp, #416] ; 0x1a0
a00017a0: e59f21c4 ldr r2, [pc, #452] ; a000196c <rtems_tarfs_load+0x208>
a00017a4: e1530002 cmp r3, r2
a00017a8: 0a000005 beq a00017c4 <rtems_tarfs_load+0x60>
a00017ac: e59f21bc ldr r2, [pc, #444] ; a0001970 <rtems_tarfs_load+0x20c>
a00017b0: e1530002 cmp r3, r2
a00017b4: 1a000066 bne a0001954 <rtems_tarfs_load+0x1f0>
a00017b8: ea000001 b a00017c4 <rtems_tarfs_load+0x60> <== NOT EXECUTED
a00017bc: e1a08004 mov r8, r4
a00017c0: ea000006 b a00017e0 <rtems_tarfs_load+0x7c>
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
a00017c4: e28d2f65 add r2, sp, #404 ; 0x194
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
a00017c8: 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);
a00017cc: e28d7f47 add r7, sp, #284 ; 0x11c
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
a00017d0: e28d9d06 add r9, sp, #384 ; 0x180
a00017d4: e58d2004 str r2, [sp, #4]
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
a00017d8: e28d501c add r5, sp, #28
a00017dc: e1a0a004 mov sl, r4
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
a00017e0: e59d3018 ldr r3, [sp, #24]
a00017e4: e2884c02 add r4, r8, #512 ; 0x200
a00017e8: e1540003 cmp r4, r3
a00017ec: 8a00005a bhi a000195c <rtems_tarfs_load+0x1f8>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
a00017f0: e59de010 ldr lr, [sp, #16]
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
a00017f4: e59f1178 ldr r1, [pc, #376] ; a0001974 <rtems_tarfs_load+0x210>
a00017f8: e3a02005 mov r2, #5
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
a00017fc: e08e8008 add r8, lr, r8
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
a0001800: e2880c01 add r0, r8, #256 ; 0x100
a0001804: e2800001 add r0, r0, #1
a0001808: eb003ab5 bl a00102e4 <strncmp>
a000180c: e2506000 subs r6, r0, #0
a0001810: 1a000051 bne a000195c <rtems_tarfs_load+0x1f8>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
a0001814: e3a02063 mov r2, #99 ; 0x63
a0001818: e1a01008 mov r1, r8
a000181c: e1a00007 mov r0, r7
a0001820: eb003b0b bl a0010454 <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
a0001824: e5cd617f strb r6, [sp, #383] ; 0x17f
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
a0001828: e3a01008 mov r1, #8
a000182c: 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];
a0001830: e5d8609c ldrb r6, [r8, #156] ; 0x9c
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
a0001834: eb001d7c bl a0008e2c <_rtems_octal2ulong>
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
a0001838: 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);
a000183c: e58d0014 str r0, [sp, #20]
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
a0001840: e288007c add r0, r8, #124 ; 0x7c
a0001844: eb001d78 bl a0008e2c <_rtems_octal2ulong>
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
a0001848: 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);
a000184c: e1a0b000 mov fp, r0
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
a0001850: e2880094 add r0, r8, #148 ; 0x94
a0001854: eb001d74 bl a0008e2c <_rtems_octal2ulong>
a0001858: e1a03000 mov r3, r0
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
a000185c: e1a00008 mov r0, r8
a0001860: e58d3008 str r3, [sp, #8]
a0001864: eb001d7e bl a0008e64 <_rtems_tar_header_checksum>
a0001868: e59d3008 ldr r3, [sp, #8]
a000186c: e1500003 cmp r0, r3
a0001870: 1a000039 bne a000195c <rtems_tarfs_load+0x1f8>
* 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) {
a0001874: e3560035 cmp r6, #53 ; 0x35
a0001878: 1a000013 bne a00018cc <rtems_tarfs_load+0x168>
strcpy(full_filename, mountpoint);
a000187c: e59d100c ldr r1, [sp, #12]
a0001880: e1a00005 mov r0, r5
a0001884: eb0038ba bl a000fb74 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
a0001888: e1a00005 mov r0, r5
a000188c: eb003a7c bl a0010284 <strlen>
a0001890: e28d2f6b add r2, sp, #428 ; 0x1ac
a0001894: e0820000 add r0, r2, r0
a0001898: e5503191 ldrb r3, [r0, #-401] ; 0x191
a000189c: e353002f cmp r3, #47 ; 0x2f
a00018a0: 0a000002 beq a00018b0 <rtems_tarfs_load+0x14c>
strcat(full_filename, "/");
a00018a4: e1a00005 mov r0, r5 <== NOT EXECUTED
a00018a8: e59f10c8 ldr r1, [pc, #200] ; a0001978 <rtems_tarfs_load+0x214><== NOT EXECUTED
a00018ac: eb0037f9 bl a000f898 <strcat> <== NOT EXECUTED
strcat(full_filename, filename);
a00018b0: e1a01007 mov r1, r7
a00018b4: e1a00005 mov r0, r5
a00018b8: eb0037f6 bl a000f898 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
a00018bc: e1a00005 mov r0, r5
a00018c0: e59f10b4 ldr r1, [pc, #180] ; a000197c <rtems_tarfs_load+0x218>
a00018c4: eb000477 bl a0002aa8 <mkdir>
a00018c8: eaffffbb b a00017bc <rtems_tarfs_load+0x58>
* IMFS_create_node was ONLY passed a NULL when we created the
* root node. We added a new IMFS_create_root_node() so this
* path no longer existed. The result was simpler code which
* should not have this path.
*/
else if (linkflag == REGTYPE) {
a00018cc: e3560030 cmp r6, #48 ; 0x30
a00018d0: 1affffb9 bne a00017bc <rtems_tarfs_load+0x58>
const char *name;
loc = root_loc;
a00018d4: e59dc004 ldr ip, [sp, #4]
a00018d8: e1a0e009 mov lr, r9
a00018dc: e8bc000f ldm ip!, {r0, r1, r2, r3}
a00018e0: e8ae000f stmia lr!, {r0, r1, r2, r3}
a00018e4: e59c2000 ldr r2, [ip]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
a00018e8: e1a00007 mov r0, r7
a00018ec: e1a01009 mov r1, r9
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
a00018f0: e58e2000 str r2, [lr]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
a00018f4: e28d2f6a add r2, sp, #424 ; 0x1a8
a00018f8: eb002024 bl a0009990 <IMFS_evaluate_for_make>
a00018fc: e2506000 subs r6, r0, #0
a0001900: 1a00000d bne a000193c <rtems_tarfs_load+0x1d8>
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
a0001904: e59d2014 ldr r2, [sp, #20]
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
a0001908: e1a00009 mov r0, r9
a000190c: e3a01006 mov r1, #6
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
a0001910: e1a03b82 lsl r3, r2, #23
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
a0001914: e59d21a8 ldr r2, [sp, #424] ; 0x1a8
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
a0001918: 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(
a000191c: e3833902 orr r3, r3, #32768 ; 0x8000
a0001920: e58d6000 str r6, [sp]
a0001924: eb001e97 bl a0009388 <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];
a0001928: e59d2010 ldr r2, [sp, #16]
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
a000192c: e580b050 str fp, [r0, #80] ; 0x50
a0001930: e5806054 str r6, [r0, #84] ; 0x54
node->info.linearfile.direct = &tar_image[offset];
a0001934: e0823004 add r3, r2, r4
a0001938: e5803058 str r3, [r0, #88] ; 0x58
}
nblocks = (((file_size) + 511) & ~511) / 512;
a000193c: e28bbf7f add fp, fp, #508 ; 0x1fc
a0001940: e28bb003 add fp, fp, #3
offset += 512 * nblocks;
a0001944: e3cbbf7f bic fp, fp, #508 ; 0x1fc
a0001948: e3cbb003 bic fp, fp, #3
a000194c: e08b4004 add r4, fp, r4
a0001950: eaffff99 b a00017bc <rtems_tarfs_load+0x58>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
return -1;
a0001954: e3e04000 mvn r4, #0
a0001958: ea000000 b a0001960 <rtems_tarfs_load+0x1fc>
a000195c: e1a0400a mov r4, sl
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
a0001960: e1a00004 mov r0, r4
a0001964: e28ddf6b add sp, sp, #428 ; 0x1ac
a0001968: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0002f8c <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;
a0002f8c: e5903000 ldr r3, [r0]
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
a0002f90: e92d4030 push {r4, r5, lr}
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
a0002f94: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain(
a0002f98: e59f3178 ldr r3, [pc, #376] ; a0003118 <rtems_termios_close+0x18c>
a0002f9c: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
a0002fa0: 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(
a0002fa4: e1a02001 mov r2, r1
a0002fa8: e5930000 ldr r0, [r3]
a0002fac: eb0007a3 bl a0004e40 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
a0002fb0: e3500000 cmp r0, #0
a0002fb4: 1a000023 bne a0003048 <rtems_termios_close+0xbc>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
a0002fb8: e5943008 ldr r3, [r4, #8]
a0002fbc: e2433001 sub r3, r3, #1
a0002fc0: e3530000 cmp r3, #0
a0002fc4: e5843008 str r3, [r4, #8]
a0002fc8: 1a00004d bne a0003104 <rtems_termios_close+0x178>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
a0002fcc: e59420cc ldr r2, [r4, #204] ; 0xcc
a0002fd0: e59f3144 ldr r3, [pc, #324] ; a000311c <rtems_termios_close+0x190>
a0002fd4: e0833282 add r3, r3, r2, lsl #5
a0002fd8: e5931004 ldr r1, [r3, #4]
a0002fdc: e3510000 cmp r1, #0
a0002fe0: 0a000002 beq a0002ff0 <rtems_termios_close+0x64>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
a0002fe4: e1a00004 mov r0, r4
a0002fe8: e12fff31 blx r1
a0002fec: ea000008 b a0003014 <rtems_termios_close+0x88>
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
a0002ff0: e5940018 ldr r0, [r4, #24]
a0002ff4: e1a02001 mov r2, r1
a0002ff8: eb000790 bl a0004e40 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
a0002ffc: e3500000 cmp r0, #0
a0003000: 1a000010 bne a0003048 <rtems_termios_close+0xbc>
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
a0003004: e1a00004 mov r0, r4
a0003008: ebfffeb2 bl a0002ad8 <drainOutput>
rtems_semaphore_release (tty->osem);
a000300c: e5940018 ldr r0, [r4, #24]
a0003010: eb0007d0 bl a0004f58 <rtems_semaphore_release>
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
a0003014: e59430b4 ldr r3, [r4, #180] ; 0xb4
a0003018: e3530002 cmp r3, #2
a000301c: 1a00000a bne a000304c <rtems_termios_close+0xc0>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
a0003020: e59400c4 ldr r0, [r4, #196] ; 0xc4
a0003024: e3a01001 mov r1, #1
a0003028: eb000672 bl a00049f8 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
a000302c: e3500000 cmp r0, #0
a0003030: 1a000004 bne a0003048 <rtems_termios_close+0xbc>
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
a0003034: e59400c8 ldr r0, [r4, #200] ; 0xc8
a0003038: e3a01001 mov r1, #1
a000303c: eb00066d bl a00049f8 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
a0003040: e3500000 cmp r0, #0
a0003044: 0a000000 beq a000304c <rtems_termios_close+0xc0>
rtems_fatal_error_occurred (sc);
a0003048: eb000916 bl a00054a8 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
a000304c: e594309c ldr r3, [r4, #156] ; 0x9c
a0003050: e3530000 cmp r3, #0
a0003054: 0a000003 beq a0003068 <rtems_termios_close+0xdc>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
a0003058: e594000c ldr r0, [r4, #12]
a000305c: e5941010 ldr r1, [r4, #16]
a0003060: e1a02005 mov r2, r5
a0003064: e12fff33 blx r3
if (tty->forw == NULL) {
a0003068: e894000c ldm r4, {r2, r3}
a000306c: 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;
a0003070: 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) {
a0003074: 1a000003 bne a0003088 <rtems_termios_close+0xfc>
rtems_termios_ttyTail = tty->back;
a0003078: e59f10a0 ldr r1, [pc, #160] ; a0003120 <rtems_termios_close+0x194>
if ( rtems_termios_ttyTail != NULL ) {
a000307c: 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;
a0003080: e5813000 str r3, [r1]
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
a0003084: 15832000 strne r2, [r3]
}
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
a0003088: e5942004 ldr r2, [r4, #4]
a000308c: e5943000 ldr r3, [r4]
a0003090: 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;
a0003094: 15823000 strne r3, [r2]
}
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
a0003098: 1a000003 bne a00030ac <rtems_termios_close+0x120>
rtems_termios_ttyHead = tty->forw;
a000309c: e59f1080 ldr r1, [pc, #128] ; a0003124 <rtems_termios_close+0x198>
if ( rtems_termios_ttyHead != NULL ) {
a00030a0: e3530000 cmp r3, #0
rtems_termios_ttyHead->back = NULL;
a00030a4: 15832004 strne r2, [r3, #4]
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
a00030a8: e5813000 str r3, [r1]
}
} else {
tty->back->forw = tty->forw;
}
rtems_semaphore_delete (tty->isem);
a00030ac: e5940014 ldr r0, [r4, #20]
a00030b0: eb00073b bl a0004da4 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
a00030b4: e5940018 ldr r0, [r4, #24]
a00030b8: eb000739 bl a0004da4 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
a00030bc: e594008c ldr r0, [r4, #140] ; 0x8c
a00030c0: eb000737 bl a0004da4 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
a00030c4: e59430a0 ldr r3, [r4, #160] ; 0xa0
a00030c8: e3530000 cmp r3, #0
a00030cc: 0a000002 beq a00030dc <rtems_termios_close+0x150>
a00030d0: e59430b4 ldr r3, [r4, #180] ; 0xb4
a00030d4: e3530002 cmp r3, #2
a00030d8: 1a000001 bne a00030e4 <rtems_termios_close+0x158>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
a00030dc: e5940068 ldr r0, [r4, #104] ; 0x68
a00030e0: eb00072f bl a0004da4 <rtems_semaphore_delete>
free (tty->rawInBuf.theBuf);
a00030e4: e5940058 ldr r0, [r4, #88] ; 0x58
a00030e8: ebfffacf bl a0001c2c <free>
free (tty->rawOutBuf.theBuf);
a00030ec: e594007c ldr r0, [r4, #124] ; 0x7c
a00030f0: ebfffacd bl a0001c2c <free>
free (tty->cbuf);
a00030f4: e594001c ldr r0, [r4, #28]
a00030f8: ebfffacb bl a0001c2c <free>
free (tty);
a00030fc: e1a00004 mov r0, r4
a0003100: ebfffac9 bl a0001c2c <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
a0003104: e59f300c ldr r3, [pc, #12] ; a0003118 <rtems_termios_close+0x18c>
a0003108: e5930000 ldr r0, [r3]
a000310c: eb000791 bl a0004f58 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
a0003110: e3a00000 mov r0, #0
a0003114: e8bd8030 pop {r4, r5, pc}
a00044a0 <rtems_termios_dequeue_characters>:
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
a00044a0: e5902090 ldr r2, [r0, #144] ; 0x90
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
a00044a4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
a00044a8: e0822001 add r2, r2, r1
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
a00044ac: e59010b4 ldr r1, [r0, #180] ; 0xb4
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
a00044b0: e5802090 str r2, [r0, #144] ; 0x90
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
a00044b4: e3510002 cmp r1, #2
a00044b8: 1a000004 bne a00044d0 <rtems_termios_dequeue_characters+0x30>
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
a00044bc: e59000c8 ldr r0, [r0, #200] ; 0xc8
a00044c0: eb00014c bl a00049f8 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
a00044c4: e2503000 subs r3, r0, #0
a00044c8: 0a00000c beq a0004500 <rtems_termios_dequeue_characters+0x60>
rtems_fatal_error_occurred (sc);
a00044cc: eb0003f5 bl a00054a8 <rtems_fatal_error_occurred>
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
a00044d0: e59030cc ldr r3, [r0, #204] ; 0xcc
a00044d4: e3530005 cmp r3, #5
a00044d8: 1a000006 bne a00044f8 <rtems_termios_dequeue_characters+0x58>
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
a00044dc: e59f3024 ldr r3, [pc, #36] ; a0004508 <rtems_termios_dequeue_characters+0x68>
a00044e0: e59330b4 ldr r3, [r3, #180] ; 0xb4
a00044e4: e3530000 cmp r3, #0
a00044e8: 0a000004 beq a0004500 <rtems_termios_dequeue_characters+0x60>
rtems_termios_linesw[tty->t_line].l_start(tty);
a00044ec: e12fff33 blx r3
}
return 0; /* nothing to output in IRQ... */
a00044f0: e3a03000 mov r3, #0
a00044f4: ea000001 b a0004500 <rtems_termios_dequeue_characters+0x60>
}
return rtems_termios_refill_transmitter(tty);
}
a00044f8: 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);
a00044fc: eaffff5a b a000426c <rtems_termios_refill_transmitter>
}
a0004500: e1a00003 mov r0, r3
a0004504: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a0003f6c <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)
{
a0003f6c: 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) {
a0003f70: e59030cc ldr r3, [r0, #204] ; 0xcc
a0003f74: e59f7280 ldr r7, [pc, #640] ; a00041fc <rtems_termios_enqueue_raw_characters+0x290>
* 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)
{
a0003f78: e1a04000 mov r4, r0
a0003f7c: 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) {
a0003f80: e0873283 add r3, r7, r3, lsl #5
a0003f84: e5939010 ldr r9, [r3, #16]
a0003f88: e3590000 cmp r9, #0
a0003f8c: 11a05002 movne r5, r2
a0003f90: 1a00000d bne a0003fcc <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);
a0003f94: e2803030 add r3, r0, #48 ; 0x30
a0003f98: 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,
a0003f9c: 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) {
a0003fa0: e1a0a002 mov sl, r2
a0003fa4: 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,
a0003fa8: e58d3004 str r3, [sp, #4]
a0003fac: ea000089 b a00041d8 <rtems_termios_enqueue_raw_characters+0x26c>
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);
a0003fb0: e59430cc ldr r3, [r4, #204] ; 0xcc
a0003fb4: e4d60001 ldrb r0, [r6], #1
a0003fb8: e1a01004 mov r1, r4
a0003fbc: e0873283 add r3, r7, r3, lsl #5
a0003fc0: e5933010 ldr r3, [r3, #16]
a0003fc4: e12fff33 blx r3
a0003fc8: 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--) {
a0003fcc: e3550000 cmp r5, #0
a0003fd0: 1afffff6 bne a0003fb0 <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 )) {
a0003fd4: e59430e4 ldr r3, [r4, #228] ; 0xe4
a0003fd8: e3530000 cmp r3, #0
a0003fdc: 1a000084 bne a00041f4 <rtems_termios_enqueue_raw_characters+0x288>
a0003fe0: e59430dc ldr r3, [r4, #220] ; 0xdc
a0003fe4: e3530000 cmp r3, #0
a0003fe8: 0a000081 beq a00041f4 <rtems_termios_enqueue_raw_characters+0x288>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
a0003fec: e2840030 add r0, r4, #48 ; 0x30
a0003ff0: e59410e0 ldr r1, [r4, #224] ; 0xe0
a0003ff4: e12fff33 blx r3
tty->tty_rcvwakeup = 1;
a0003ff8: e3a03001 mov r3, #1
a0003ffc: e58430e4 str r3, [r4, #228] ; 0xe4
a0004000: ea00007b b a00041f4 <rtems_termios_enqueue_raw_characters+0x288>
while (len--) {
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
a0004004: e59430b8 ldr r3, [r4, #184] ; 0xb8
}
return 0;
}
while (len--) {
c = *buf++;
a0004008: e4d68001 ldrb r8, [r6], #1
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
a000400c: e3130c02 tst r3, #512 ; 0x200
a0004010: 0a00000f beq a0004054 <rtems_termios_enqueue_raw_characters+0xe8>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
a0004014: e5d4204a ldrb r2, [r4, #74] ; 0x4a
a0004018: e5d43049 ldrb r3, [r4, #73] ; 0x49
a000401c: e1520008 cmp r2, r8
a0004020: 1a000007 bne a0004044 <rtems_termios_enqueue_raw_characters+0xd8>
if (c == tty->termios.c_cc[VSTART]) {
a0004024: e1530002 cmp r3, r2
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
a0004028: 059430b8 ldreq r3, [r4, #184] ; 0xb8
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
a000402c: 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;
a0004030: 02233010 eoreq r3, r3, #16
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
a0004034: 13833010 orrne r3, r3, #16
a0004038: 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)
{
a000403c: e3a09001 mov r9, #1
a0004040: ea000005 b a000405c <rtems_termios_enqueue_raw_characters+0xf0>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
a0004044: e1530008 cmp r3, r8
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
a0004048: 059430b8 ldreq r3, [r4, #184] ; 0xb8
a000404c: 03c33010 biceq r3, r3, #16
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
a0004050: 0afffff8 beq a0004038 <rtems_termios_enqueue_raw_characters+0xcc>
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
a0004054: e3590000 cmp r9, #0
a0004058: 0a000014 beq a00040b0 <rtems_termios_enqueue_raw_characters+0x144>
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
a000405c: e59430b8 ldr r3, [r4, #184] ; 0xb8
a0004060: e2033030 and r3, r3, #48 ; 0x30
a0004064: e3530020 cmp r3, #32
a0004068: 1a000059 bne a00041d4 <rtems_termios_enqueue_raw_characters+0x268>
/* disable interrupts */
rtems_interrupt_disable(level);
a000406c: ebfffa95 bl a0002ac8 <arm_interrupt_disable> <== NOT EXECUTED
a0004070: e1a07000 mov r7, r0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
a0004074: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0004078: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
a000407c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
a0004080: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
a0004084: e3530000 cmp r3, #0 <== NOT EXECUTED
a0004088: 0a000006 beq a00040a8 <rtems_termios_enqueue_raw_characters+0x13c><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
a000408c: e5942084 ldr r2, [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)(
a0004090: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
a0004094: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED
a0004098: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a000409c: e0811002 add r1, r1, r2 <== NOT EXECUTED
a00040a0: e3a02001 mov r2, #1 <== NOT EXECUTED
a00040a4: e12fff33 blx r3 <== NOT EXECUTED
a00040a8: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
a00040ac: ea000048 b a00041d4 <rtems_termios_enqueue_raw_characters+0x268><== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
a00040b0: e5940060 ldr r0, [r4, #96] ; 0x60
a00040b4: e5941064 ldr r1, [r4, #100] ; 0x64
a00040b8: e2800001 add r0, r0, #1
a00040bc: eb002d3f bl a000f5c0 <__umodsi3>
a00040c0: e1a07000 mov r7, r0
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
a00040c4: ebfffa7f bl a0002ac8 <arm_interrupt_disable>
a00040c8: e1a0b000 mov fp, r0
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
a00040cc: e594305c ldr r3, [r4, #92] ; 0x5c
a00040d0: e5940064 ldr r0, [r4, #100] ; 0x64
% tty->rawInBuf.Size) > tty->highwater) &&
a00040d4: e5941064 ldr r1, [r4, #100] ; 0x64
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
a00040d8: e0630000 rsb r0, r3, r0
% tty->rawInBuf.Size) > tty->highwater) &&
a00040dc: e0800007 add r0, r0, r7
a00040e0: eb002d36 bl a000f5c0 <__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)
a00040e4: e59430c0 ldr r3, [r4, #192] ; 0xc0
a00040e8: e1500003 cmp r0, r3
a00040ec: 9a000025 bls a0004188 <rtems_termios_enqueue_raw_characters+0x21c>
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
a00040f0: 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) &&
a00040f4: e3130001 tst r3, #1 <== NOT EXECUTED
a00040f8: 1a000022 bne a0004188 <rtems_termios_enqueue_raw_characters+0x21c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
a00040fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0004100: e3833001 orr r3, r3, #1 <== NOT EXECUTED
a0004104: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
a0004108: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
a000410c: e59f30ec ldr r3, [pc, #236] ; a0004200 <rtems_termios_enqueue_raw_characters+0x294><== NOT EXECUTED
a0004110: e0023003 and r3, r2, r3 <== NOT EXECUTED
a0004114: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED
a0004118: 1a00000e bne a0004158 <rtems_termios_enqueue_raw_characters+0x1ec><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
a000411c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0004120: e3130020 tst r3, #32 <== NOT EXECUTED
a0004124: 1a000002 bne a0004134 <rtems_termios_enqueue_raw_characters+0x1c8><== NOT EXECUTED
a0004128: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
a000412c: e3530000 cmp r3, #0 <== NOT EXECUTED
a0004130: 1a000014 bne a0004188 <rtems_termios_enqueue_raw_characters+0x21c><== 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;
a0004134: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
a0004138: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a000413c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
a0004140: e3833002 orr r3, r3, #2 <== NOT EXECUTED
a0004144: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
a0004148: e3a02001 mov r2, #1 <== NOT EXECUTED
a000414c: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED
a0004150: e12fff33 blx r3 <== NOT EXECUTED
a0004154: ea00000b b a0004188 <rtems_termios_enqueue_raw_characters+0x21c><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
a0004158: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a000415c: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED
a0004160: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED
a0004164: 1a000007 bne a0004188 <rtems_termios_enqueue_raw_characters+0x21c><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
a0004168: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a000416c: e3833004 orr r3, r3, #4 <== NOT EXECUTED
a0004170: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
a0004174: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED
a0004178: e3530000 cmp r3, #0 <== NOT EXECUTED
a000417c: 0a000001 beq a0004188 <rtems_termios_enqueue_raw_characters+0x21c><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
a0004180: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a0004184: e12fff33 blx r3 <== NOT EXECUTED
a0004188: e129f00b msr CPSR_fc, fp
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
a000418c: e594305c ldr r3, [r4, #92] ; 0x5c
a0004190: e1570003 cmp r7, r3
dropped++;
a0004194: 02855001 addeq r5, r5, #1
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
a0004198: 0a00000d beq a00041d4 <rtems_termios_enqueue_raw_characters+0x268>
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
a000419c: e5943058 ldr r3, [r4, #88] ; 0x58
a00041a0: e7c38007 strb r8, [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 )) {
a00041a4: e59430e4 ldr r3, [r4, #228] ; 0xe4
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
a00041a8: 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 )) {
a00041ac: e3530000 cmp r3, #0
a00041b0: 1a000007 bne a00041d4 <rtems_termios_enqueue_raw_characters+0x268>
a00041b4: e59430dc ldr r3, [r4, #220] ; 0xdc
a00041b8: e3530000 cmp r3, #0
a00041bc: 0a000004 beq a00041d4 <rtems_termios_enqueue_raw_characters+0x268>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
a00041c0: e59d0000 ldr r0, [sp] <== NOT EXECUTED
a00041c4: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
a00041c8: e12fff33 blx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
a00041cc: e3a03001 mov r3, #1 <== NOT EXECUTED
a00041d0: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
a00041d4: e24aa001 sub sl, sl, #1
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
a00041d8: e35a0000 cmp sl, #0
a00041dc: 1affff88 bne a0004004 <rtems_termios_enqueue_raw_characters+0x98>
}
}
}
}
tty->rawInBufDropped += dropped;
a00041e0: e5943078 ldr r3, [r4, #120] ; 0x78
rtems_semaphore_release (tty->rawInBuf.Semaphore);
a00041e4: e5940068 ldr r0, [r4, #104] ; 0x68
}
}
}
}
tty->rawInBufDropped += dropped;
a00041e8: e0833005 add r3, r3, r5
a00041ec: e5843078 str r3, [r4, #120] ; 0x78
rtems_semaphore_release (tty->rawInBuf.Semaphore);
a00041f0: eb000358 bl a0004f58 <rtems_semaphore_release>
return dropped;
}
a00041f4: e1a00005 mov r0, r5
a00041f8: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0003140 <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;
a0003140: e5903000 ldr r3, [r0]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
a0003144: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
a0003148: e5934034 ldr r4, [r3, #52] ; 0x34
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
a000314c: 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;
a0003150: e5907008 ldr r7, [r0, #8]
rtems_status_code sc;
args->ioctl_return = 0;
a0003154: e580100c str r1, [r0, #12]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
a0003158: 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);
a000315c: e1a02001 mov r2, r1
a0003160: e5940018 ldr r0, [r4, #24]
a0003164: eb000735 bl a0004e40 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
a0003168: e2506000 subs r6, r0, #0
a000316c: 1a0000d0 bne a00034b4 <rtems_termios_ioctl+0x374>
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
a0003170: e5953004 ldr r3, [r5, #4]
a0003174: e3530004 cmp r3, #4
a0003178: 0a0000a6 beq a0003418 <rtems_termios_ioctl+0x2d8>
a000317c: 8a000005 bhi a0003198 <rtems_termios_ioctl+0x58>
a0003180: e3530002 cmp r3, #2
a0003184: 0a000028 beq a000322c <rtems_termios_ioctl+0xec>
a0003188: 8a00009b bhi a00033fc <rtems_termios_ioctl+0x2bc>
a000318c: e3530001 cmp r3, #1
a0003190: 1a000010 bne a00031d8 <rtems_termios_ioctl+0x98>
a0003194: ea00001a b a0003204 <rtems_termios_ioctl+0xc4>
a0003198: e59f2320 ldr r2, [pc, #800] ; a00034c0 <rtems_termios_ioctl+0x380>
a000319c: e1530002 cmp r3, r2
a00031a0: 0a0000b6 beq a0003480 <rtems_termios_ioctl+0x340>
a00031a4: 8a000002 bhi a00031b4 <rtems_termios_ioctl+0x74>
a00031a8: e3530005 cmp r3, #5
a00031ac: 1a000009 bne a00031d8 <rtems_termios_ioctl+0x98>
a00031b0: ea000094 b a0003408 <rtems_termios_ioctl+0x2c8>
a00031b4: e59f2308 ldr r2, [pc, #776] ; a00034c4 <rtems_termios_ioctl+0x384>
a00031b8: 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;
a00031bc: 05953008 ldreq r3, [r5, #8]
a00031c0: 059420cc ldreq r2, [r4, #204] ; 0xcc
a00031c4: 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) {
a00031c8: 0a0000b7 beq a00034ac <rtems_termios_ioctl+0x36c>
a00031cc: e2822105 add r2, r2, #1073741825 ; 0x40000001
a00031d0: e1530002 cmp r3, r2
a00031d4: 0a000093 beq a0003428 <rtems_termios_ioctl+0x2e8>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
a00031d8: e59420cc ldr r2, [r4, #204] ; 0xcc
a00031dc: e59f32e4 ldr r3, [pc, #740] ; a00034c8 <rtems_termios_ioctl+0x388>
a00031e0: e0833282 add r3, r3, r2, lsl #5
a00031e4: e5933018 ldr r3, [r3, #24]
a00031e8: e3530000 cmp r3, #0
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
a00031ec: 03a0600a moveq r6, #10
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
a00031f0: 0a0000ad beq a00034ac <rtems_termios_ioctl+0x36c>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
a00031f4: e1a00004 mov r0, r4
a00031f8: e1a01005 mov r1, r5
a00031fc: e12fff33 blx r3
a0003200: ea00009c b a0003478 <rtems_termios_ioctl+0x338>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
a0003204: e5957008 ldr r7, [r5, #8]
a0003208: e284c030 add ip, r4, #48 ; 0x30
a000320c: e8bc000f ldm ip!, {r0, r1, r2, r3}
a0003210: e1a0e007 mov lr, r7
a0003214: e8ae000f stmia lr!, {r0, r1, r2, r3}
a0003218: e8bc000f ldm ip!, {r0, r1, r2, r3}
a000321c: e8ae000f stmia lr!, {r0, r1, r2, r3}
a0003220: e59c3000 ldr r3, [ip]
a0003224: e58e3000 str r3, [lr]
break;
a0003228: ea00009f b a00034ac <rtems_termios_ioctl+0x36c>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
a000322c: e595e008 ldr lr, [r5, #8]
a0003230: e284c030 add ip, r4, #48 ; 0x30
a0003234: e8be000f ldm lr!, {r0, r1, r2, r3}
a0003238: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000323c: e8be000f ldm lr!, {r0, r1, r2, r3}
a0003240: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0003244: e59e3000 ldr r3, [lr]
a0003248: 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) &&
a000324c: e59430b8 ldr r3, [r4, #184] ; 0xb8
a0003250: e3130c02 tst r3, #512 ; 0x200
a0003254: 0a000018 beq a00032bc <rtems_termios_ioctl+0x17c>
!(tty->termios.c_iflag & IXON)) {
a0003258: 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) &&
a000325c: e3130b01 tst r3, #1024 ; 0x400
a0003260: 1a000015 bne a00032bc <rtems_termios_ioctl+0x17c>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
a0003264: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0003268: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED
a000326c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
a0003270: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0003274: e3130020 tst r3, #32 <== NOT EXECUTED
a0003278: 0a00000f beq a00032bc <rtems_termios_ioctl+0x17c> <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
a000327c: ebfffe11 bl a0002ac8 <arm_interrupt_disable> <== NOT EXECUTED
a0003280: e1a07000 mov r7, r0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
a0003284: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0003288: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
a000328c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
a0003290: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
a0003294: e3530000 cmp r3, #0 <== NOT EXECUTED
a0003298: 0a000006 beq a00032b8 <rtems_termios_ioctl+0x178> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
a000329c: e5942084 ldr r2, [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)(
a00032a0: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
a00032a4: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED
a00032a8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a00032ac: e0811002 add r1, r1, r2 <== NOT EXECUTED
a00032b0: e3a02001 mov r2, #1 <== NOT EXECUTED
a00032b4: e12fff33 blx r3 <== NOT EXECUTED
a00032b8: 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)) {
a00032bc: e59430b8 ldr r3, [r4, #184] ; 0xb8
a00032c0: e3130b01 tst r3, #1024 ; 0x400
a00032c4: 0a000008 beq a00032ec <rtems_termios_ioctl+0x1ac>
a00032c8: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED
a00032cc: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED
a00032d0: 1a000005 bne a00032ec <rtems_termios_ioctl+0x1ac> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
a00032d4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00032d8: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED
a00032dc: 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);
a00032e0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00032e4: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
a00032e8: 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)) {
a00032ec: e59430b8 ldr r3, [r4, #184] ; 0xb8
a00032f0: e3130c01 tst r3, #256 ; 0x100
a00032f4: 0a000010 beq a000333c <rtems_termios_ioctl+0x1fc>
a00032f8: e5943038 ldr r3, [r4, #56] ; 0x38
a00032fc: e3530000 cmp r3, #0
a0003300: ba00000d blt a000333c <rtems_termios_ioctl+0x1fc>
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
a0003304: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0003308: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
a000330c: 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)) {
a0003310: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0003314: e3130004 tst r3, #4 <== NOT EXECUTED
a0003318: 0a000004 beq a0003330 <rtems_termios_ioctl+0x1f0> <== NOT EXECUTED
a000331c: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
a0003320: e3530000 cmp r3, #0 <== NOT EXECUTED
a0003324: 0a000001 beq a0003330 <rtems_termios_ioctl+0x1f0> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
a0003328: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a000332c: e12fff33 blx r3 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
a0003330: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0003334: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
a0003338: 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) {
a000333c: e5943038 ldr r3, [r4, #56] ; 0x38
tty->termios = *(struct termios *)args->buffer;
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
a0003340: e594703c ldr r7, [r4, #60] ; 0x3c
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
a0003344: e3530000 cmp r3, #0
tty->flow_ctrl |= FL_MDRTS;
a0003348: b59430b8 ldrlt r3, [r4, #184] ; 0xb8
a000334c: b3833c01 orrlt r3, r3, #256 ; 0x100
a0003350: b58430b8 strlt r3, [r4, #184] ; 0xb8
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
a0003354: e5943030 ldr r3, [r4, #48] ; 0x30
a0003358: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
a000335c: 159420b8 ldrne r2, [r4, #184] ; 0xb8
a0003360: 13822b01 orrne r2, r2, #1024 ; 0x400
a0003364: 158420b8 strne r2, [r4, #184] ; 0xb8
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
a0003368: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
a000336c: 159430b8 ldrne r3, [r4, #184] ; 0xb8
a0003370: 13833c02 orrne r3, r3, #512 ; 0x200
a0003374: 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) {
a0003378: e2177002 ands r7, r7, #2
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
a000337c: 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) {
a0003380: 1a000013 bne a00033d4 <rtems_termios_ioctl+0x294>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
a0003384: e5d48046 ldrb r8, [r4, #70] ; 0x46
rtems_clock_get_ticks_per_second() / 10;
a0003388: eb000518 bl a00047f0 <rtems_clock_get_ticks_per_second>
a000338c: e3a0100a mov r1, #10
a0003390: e0000098 mul r0, r8, r0
a0003394: eb002ff1 bl a000f360 <__aeabi_uidiv>
if (tty->termios.c_cc[VTIME]) {
a0003398: e5d43046 ldrb r3, [r4, #70] ; 0x46
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
a000339c: e5840054 str r0, [r4, #84] ; 0x54
a00033a0: e5d42047 ldrb r2, [r4, #71] ; 0x47
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
a00033a4: e3530000 cmp r3, #0
a00033a8: 0a000005 beq a00033c4 <rtems_termios_ioctl+0x284>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
a00033ac: 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;
a00033b0: e5840070 str r0, [r4, #112] ; 0x70
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
a00033b4: 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;
a00033b8: e584706c str r7, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
a00033bc: e5840074 str r0, [r4, #116] ; 0x74
a00033c0: ea000006 b a00033e0 <rtems_termios_ioctl+0x2a0>
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
a00033c4: e3520000 cmp r2, #0
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
a00033c8: 03a03001 moveq r3, #1
a00033cc: 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]) {
a00033d0: 0a000002 beq a00033e0 <rtems_termios_ioctl+0x2a0>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
a00033d4: e584306c str r3, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
a00033d8: e5843070 str r3, [r4, #112] ; 0x70
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
a00033dc: e5843074 str r3, [r4, #116] ; 0x74
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
a00033e0: e59430a8 ldr r3, [r4, #168] ; 0xa8
a00033e4: e3530000 cmp r3, #0
a00033e8: 0a00002f beq a00034ac <rtems_termios_ioctl+0x36c>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
a00033ec: e5940010 ldr r0, [r4, #16]
a00033f0: e2841030 add r1, r4, #48 ; 0x30
a00033f4: e12fff33 blx r3
a00033f8: ea00002b b a00034ac <rtems_termios_ioctl+0x36c>
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
a00033fc: e1a00004 mov r0, r4
a0003400: ebfffdb4 bl a0002ad8 <drainOutput>
break;
a0003404: ea000028 b a00034ac <rtems_termios_ioctl+0x36c>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
a0003408: e897000c ldm r7, {r2, r3}
a000340c: e58420d4 str r2, [r4, #212] ; 0xd4
a0003410: e58430d8 str r3, [r4, #216] ; 0xd8
break;
a0003414: ea000024 b a00034ac <rtems_termios_ioctl+0x36c>
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
a0003418: e897000c ldm r7, {r2, r3}
a000341c: e58420dc str r2, [r4, #220] ; 0xdc
a0003420: e58430e0 str r3, [r4, #224] ; 0xe0
break;
a0003424: ea000020 b a00034ac <rtems_termios_ioctl+0x36c>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
a0003428: e59420cc ldr r2, [r4, #204] ; 0xcc
a000342c: e59f3094 ldr r3, [pc, #148] ; a00034c8 <rtems_termios_ioctl+0x388>
a0003430: e0833282 add r3, r3, r2, lsl #5
a0003434: e5933004 ldr r3, [r3, #4]
a0003438: e3530000 cmp r3, #0
a000343c: 0a000002 beq a000344c <rtems_termios_ioctl+0x30c>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
a0003440: e1a00004 mov r0, r4
a0003444: e12fff33 blx r3
a0003448: e1a06000 mov r6, r0
}
tty->t_line=*(int*)(args->buffer);
a000344c: e5953008 ldr r3, [r5, #8]
tty->t_sc = NULL; /* ensure that no more valid data */
a0003450: 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);
a0003454: e5933000 ldr r3, [r3]
tty->t_sc = NULL; /* ensure that no more valid data */
a0003458: e58420d0 str r2, [r4, #208] ; 0xd0
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
a000345c: e59f2064 ldr r2, [pc, #100] ; a00034c8 <rtems_termios_ioctl+0x388>
* 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);
a0003460: 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) {
a0003464: e7923283 ldr r3, [r2, r3, lsl #5]
a0003468: e3530000 cmp r3, #0
a000346c: 0a00000e beq a00034ac <rtems_termios_ioctl+0x36c>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
a0003470: e1a00004 mov r0, r4
a0003474: e12fff33 blx r3
a0003478: e1a06000 mov r6, r0
a000347c: ea00000a b a00034ac <rtems_termios_ioctl+0x36c>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
a0003480: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED
a0003484: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
a0003488: e5940020 ldr r0, [r4, #32] <== NOT EXECUTED
a000348c: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
a0003490: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
a0003494: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
a0003498: e0611000 rsb r1, r1, r0 <== NOT EXECUTED
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
a000349c: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
a00034a0: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED
a00034a4: e0813003 add r3, r1, r3 <== NOT EXECUTED
a00034a8: e5823000 str r3, [r2] <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
a00034ac: e5940018 ldr r0, [r4, #24]
a00034b0: eb0006a8 bl a0004f58 <rtems_semaphore_release>
args->ioctl_return = sc;
a00034b4: e585600c str r6, [r5, #12]
return sc;
}
a00034b8: e1a00006 mov r0, r6
a00034bc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a0002b38 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
a0002b38: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0002b3c: e58d300c str r3, [sp, #12]
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
a0002b40: e59f3404 ldr r3, [pc, #1028] ; a0002f4c <rtems_termios_open+0x414>
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
a0002b44: e1a0a001 mov sl, r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
a0002b48: e3a01000 mov r1, #0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
a0002b4c: e1a09000 mov r9, r0
a0002b50: e1a08002 mov r8, r2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
a0002b54: e5930000 ldr r0, [r3]
a0002b58: e1a02001 mov r2, r1
a0002b5c: eb0008b7 bl a0004e40 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
a0002b60: e2506000 subs r6, r0, #0
a0002b64: 1a0000ee bne a0002f24 <rtems_termios_open+0x3ec>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
a0002b68: e59f33e0 ldr r3, [pc, #992] ; a0002f50 <rtems_termios_open+0x418>
a0002b6c: e5937000 ldr r7, [r3]
a0002b70: e1a05007 mov r5, r7
a0002b74: ea000006 b a0002b94 <rtems_termios_open+0x5c>
if ((tty->major == major) && (tty->minor == minor))
a0002b78: e595300c ldr r3, [r5, #12]
a0002b7c: e1530009 cmp r3, r9
a0002b80: 1a000002 bne a0002b90 <rtems_termios_open+0x58>
a0002b84: e5953010 ldr r3, [r5, #16]
a0002b88: e153000a cmp r3, sl
a0002b8c: 0a0000c3 beq a0002ea0 <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) {
a0002b90: e5955000 ldr r5, [r5]
a0002b94: e3550000 cmp r5, #0
a0002b98: 1afffff6 bne a0002b78 <rtems_termios_open+0x40>
a0002b9c: ea0000e3 b a0002f30 <rtems_termios_open+0x3f8>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
a0002ba0: e59f23ac ldr r2, [pc, #940] ; a0002f54 <rtems_termios_open+0x41c>
a0002ba4: e5923000 ldr r3, [r2]
a0002ba8: e5853064 str r3, [r5, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
a0002bac: e5950064 ldr r0, [r5, #100] ; 0x64
a0002bb0: e58d2008 str r2, [sp, #8]
a0002bb4: ebfffcfa bl a0001fa4 <malloc>
if (tty->rawInBuf.theBuf == NULL) {
a0002bb8: e3500000 cmp r0, #0
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
a0002bbc: e1a0b000 mov fp, r0
a0002bc0: e5850058 str r0, [r5, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) {
a0002bc4: e59d2008 ldr r2, [sp, #8]
a0002bc8: 1a000006 bne a0002be8 <rtems_termios_open+0xb0>
free(tty);
a0002bcc: e1a00005 mov r0, r5
a0002bd0: ebfffc15 bl a0001c2c <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
a0002bd4: e59f3370 ldr r3, [pc, #880] ; a0002f4c <rtems_termios_open+0x414>
return RTEMS_NO_MEMORY;
a0002bd8: e3a0601a mov r6, #26
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
a0002bdc: e5930000 ldr r0, [r3]
a0002be0: eb0008dc bl a0004f58 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
a0002be4: ea0000ce b a0002f24 <rtems_termios_open+0x3ec>
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
a0002be8: e5923004 ldr r3, [r2, #4]
a0002bec: e5853088 str r3, [r5, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
a0002bf0: e5950088 ldr r0, [r5, #136] ; 0x88
a0002bf4: e58d2008 str r2, [sp, #8]
a0002bf8: ebfffce9 bl a0001fa4 <malloc>
if (tty->rawOutBuf.theBuf == NULL) {
a0002bfc: e3500000 cmp r0, #0
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
a0002c00: e1a03000 mov r3, r0
a0002c04: e585007c str r0, [r5, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) {
a0002c08: e59d2008 ldr r2, [sp, #8]
a0002c0c: 0a000008 beq a0002c34 <rtems_termios_open+0xfc>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
a0002c10: e5920008 ldr r0, [r2, #8]
a0002c14: e58d3008 str r3, [sp, #8]
a0002c18: ebfffce1 bl a0001fa4 <malloc>
if (tty->cbuf == NULL) {
a0002c1c: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
a0002c20: e585001c str r0, [r5, #28]
if (tty->cbuf == NULL) {
a0002c24: e59d3008 ldr r3, [sp, #8]
a0002c28: 1a000004 bne a0002c40 <rtems_termios_open+0x108>
free((void *)(tty->rawOutBuf.theBuf));
a0002c2c: e1a00003 mov r0, r3 <== NOT EXECUTED
a0002c30: ebfffbfd bl a0001c2c <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
a0002c34: e1a0000b mov r0, fp
a0002c38: ebfffbfb bl a0001c2c <free>
a0002c3c: eaffffe2 b a0002bcc <rtems_termios_open+0x94>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
a0002c40: e3a03000 mov r3, #0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
a0002c44: e5853004 str r3, [r5, #4]
if (rtems_termios_ttyHead != NULL)
a0002c48: e1570003 cmp r7, r3
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
a0002c4c: e58530d4 str r3, [r5, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
a0002c50: e58530d8 str r3, [r5, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
a0002c54: e58530dc str r3, [r5, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
a0002c58: e58530e0 str r3, [r5, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
a0002c5c: 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;
a0002c60: e59f32e8 ldr r3, [pc, #744] ; a0002f50 <rtems_termios_open+0x418>
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
a0002c64: 15875004 strne r5, [r7, #4]
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
a0002c68: e5857000 str r7, [r5]
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
a0002c6c: e5834000 str r4, [r3]
if (rtems_termios_ttyTail == NULL)
a0002c70: e59f32e0 ldr r3, [pc, #736] ; a0002f58 <rtems_termios_open+0x420>
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
a0002c74: e59f72d8 ldr r7, [pc, #728] ; a0002f54 <rtems_termios_open+0x41c>
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
a0002c78: e59f02dc ldr r0, [pc, #732] ; a0002f5c <rtems_termios_open+0x424>
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)
a0002c7c: e5932000 ldr r2, [r3]
rtems_termios_ttyTail = tty;
tty->minor = minor;
a0002c80: e584a010 str sl, [r4, #16]
tty->major = major;
a0002c84: e584900c str r9, [r4, #12]
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)
a0002c88: e3520000 cmp r2, #0
rtems_termios_ttyTail = tty;
a0002c8c: 05834000 streq r4, [r3]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
a0002c90: e5d7300c ldrb r3, [r7, #12]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
a0002c94: e2842014 add r2, r4, #20
a0002c98: e58d2000 str r2, [sp]
a0002c9c: e1830000 orr r0, r3, r0
a0002ca0: e3a01001 mov r1, #1
a0002ca4: e3a03000 mov r3, #0
a0002ca8: e3a02054 mov r2, #84 ; 0x54
a0002cac: eb0007d1 bl a0004bf8 <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)
a0002cb0: e2503000 subs r3, r0, #0
a0002cb4: 1a000096 bne a0002f14 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'o', c),
a0002cb8: 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 (
a0002cbc: e59f029c ldr r0, [pc, #668] ; a0002f60 <rtems_termios_open+0x428>
a0002cc0: e2841018 add r1, r4, #24
a0002cc4: e58d1000 str r1, [sp]
a0002cc8: e1820000 orr r0, r2, r0
a0002ccc: e3a01001 mov r1, #1
a0002cd0: e3a02054 mov r2, #84 ; 0x54
a0002cd4: eb0007c7 bl a0004bf8 <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)
a0002cd8: e2501000 subs r1, r0, #0
a0002cdc: 1a00008c bne a0002f14 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'x', c),
a0002ce0: 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 (
a0002ce4: e59f0278 ldr r0, [pc, #632] ; a0002f64 <rtems_termios_open+0x42c>
a0002ce8: e284208c add r2, r4, #140 ; 0x8c
a0002cec: e58d2000 str r2, [sp]
a0002cf0: e1830000 orr r0, r3, r0
a0002cf4: e3a02020 mov r2, #32
a0002cf8: e1a03001 mov r3, r1
a0002cfc: eb0007bd bl a0004bf8 <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)
a0002d00: e250b000 subs fp, r0, #0
a0002d04: 1a000082 bne a0002f14 <rtems_termios_open+0x3dc>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
a0002d08: e59de00c ldr lr, [sp, #12]
a0002d0c: e284c098 add ip, r4, #152 ; 0x98
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;
a0002d10: e584b094 str fp, [r4, #148] ; 0x94
/*
* Set callbacks
*/
tty->device = *callbacks;
a0002d14: e8be000f ldm lr!, {r0, r1, r2, r3}
a0002d18: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0002d1c: e89e000f ldm lr, {r0, r1, r2, r3}
a0002d20: e88c000f stm ip, {r0, r1, r2, r3}
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
a0002d24: e59430b4 ldr r3, [r4, #180] ; 0xb4
a0002d28: e3530002 cmp r3, #2
a0002d2c: 1a000017 bne a0002d90 <rtems_termios_open+0x258>
sc = rtems_task_create (
rtems_build_name ('T', 'x', 'T', c),
a0002d30: e5d7300c ldrb r3, [r7, #12]
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
a0002d34: e59f022c ldr r0, [pc, #556] ; a0002f68 <rtems_termios_open+0x430>
a0002d38: e28420c8 add r2, r4, #200 ; 0xc8
a0002d3c: e58d2004 str r2, [sp, #4]
a0002d40: e1830000 orr r0, r3, r0
a0002d44: e3a02b01 mov r2, #1024 ; 0x400
a0002d48: e3a0100a mov r1, #10
a0002d4c: e3a03c05 mov r3, #1280 ; 0x500
a0002d50: e58db000 str fp, [sp]
a0002d54: eb0008a6 bl a0004ff4 <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)
a0002d58: e2502000 subs r2, r0, #0
a0002d5c: 1a00006c bne a0002f14 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
rtems_build_name ('R', 'x', 'T', c),
a0002d60: 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 (
a0002d64: e59f0200 ldr r0, [pc, #512] ; a0002f6c <rtems_termios_open+0x434>
a0002d68: e58d2000 str r2, [sp]
a0002d6c: e28420c4 add r2, r4, #196 ; 0xc4
a0002d70: e58d2004 str r2, [sp, #4]
a0002d74: e1830000 orr r0, r3, r0
a0002d78: e3a01009 mov r1, #9
a0002d7c: e3a02b01 mov r2, #1024 ; 0x400
a0002d80: e3a03c05 mov r3, #1280 ; 0x500
a0002d84: eb00089a bl a0004ff4 <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)
a0002d88: e3500000 cmp r0, #0
a0002d8c: 1a000060 bne a0002f14 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
a0002d90: e59430a0 ldr r3, [r4, #160] ; 0xa0
a0002d94: e3530000 cmp r3, #0
a0002d98: 0a000002 beq a0002da8 <rtems_termios_open+0x270>
a0002d9c: e59430b4 ldr r3, [r4, #180] ; 0xb4
a0002da0: e3530002 cmp r3, #2
a0002da4: 1a00000b bne a0002dd8 <rtems_termios_open+0x2a0>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'r', c),
a0002da8: e59f31a4 ldr r3, [pc, #420] ; a0002f54 <rtems_termios_open+0x41c>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
a0002dac: e59f01bc ldr r0, [pc, #444] ; a0002f70 <rtems_termios_open+0x438>
a0002db0: e2842068 add r2, r4, #104 ; 0x68
rtems_build_name ('T', 'R', 'r', c),
a0002db4: 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 (
a0002db8: e3a01000 mov r1, #0
a0002dbc: e58d2000 str r2, [sp]
a0002dc0: e1830000 orr r0, r3, r0
a0002dc4: e3a02024 mov r2, #36 ; 0x24
a0002dc8: e1a03001 mov r3, r1
a0002dcc: eb000789 bl a0004bf8 <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)
a0002dd0: e3500000 cmp r0, #0
a0002dd4: 1a00004e bne a0002f14 <rtems_termios_open+0x3dc>
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
a0002dd8: e59f3194 ldr r3, [pc, #404] ; a0002f74 <rtems_termios_open+0x43c>
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
a0002ddc: e3a02011 mov r2, #17
a0002de0: e5c42049 strb r2, [r4, #73] ; 0x49
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
a0002de4: e5843030 str r3, [r4, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
a0002de8: e59f3188 ldr r3, [pc, #392] ; a0002f78 <rtems_termios_open+0x440>
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
a0002dec: e2822002 add r2, r2, #2
a0002df0: e5c4204a strb r2, [r4, #74] ; 0x4a
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
a0002df4: e5843034 str r3, [r4, #52] ; 0x34
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
a0002df8: e59f317c ldr r3, [pc, #380] ; a0002f7c <rtems_termios_open+0x444>
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';
a0002dfc: e2822007 add r2, r2, #7
a0002e00: e5c4204b strb r2, [r4, #75] ; 0x4b
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
a0002e04: e5843038 str r3, [r4, #56] ; 0x38
tty->termios.c_lflag =
a0002e08: e59f3170 ldr r3, [pc, #368] ; a0002f80 <rtems_termios_open+0x448>
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';
a0002e0c: e3a02012 mov r2, #18
a0002e10: e5c4204d strb r2, [r4, #77] ; 0x4d
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
a0002e14: e584303c str r3, [r4, #60] ; 0x3c
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
a0002e18: e3a03003 mov r3, #3
a0002e1c: e5c43041 strb r3, [r4, #65] ; 0x41
tty->termios.c_cc[VQUIT] = '\034';
a0002e20: e2833019 add r3, r3, #25
a0002e24: e5c43042 strb r3, [r4, #66] ; 0x42
tty->termios.c_cc[VERASE] = '\177';
a0002e28: e2833063 add r3, r3, #99 ; 0x63
a0002e2c: e5c43043 strb r3, [r4, #67] ; 0x43
tty->termios.c_cc[VKILL] = '\025';
a0002e30: e3a03015 mov r3, #21
a0002e34: e5c43044 strb r3, [r4, #68] ; 0x44
tty->termios.c_cc[VEOF] = '\004';
a0002e38: e3a03004 mov r3, #4
a0002e3c: e5c43045 strb r3, [r4, #69] ; 0x45
tty->termios.c_cc[VEOL] = '\000';
a0002e40: 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;
a0002e44: 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';
a0002e48: e5c4304c strb r3, [r4, #76] ; 0x4c
tty->termios.c_cc[VEOL2] = '\000';
a0002e4c: e5c43051 strb r3, [r4, #81] ; 0x51
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
a0002e50: e5943064 ldr r3, [r4, #100] ; 0x64
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
a0002e54: e3a0200f mov r2, #15
a0002e58: e5c4204e strb r2, [r4, #78] ; 0x4e
/* 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;
a0002e5c: e1a030a3 lsr r3, r3, #1
a0002e60: e58430bc str r3, [r4, #188] ; 0xbc
tty->highwater = tty->rawInBuf.Size * 3/4;
a0002e64: e5943064 ldr r3, [r4, #100] ; 0x64
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';
a0002e68: e2822008 add r2, r2, #8
a0002e6c: 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;
a0002e70: e0833083 add r3, r3, r3, lsl #1
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';
a0002e74: e3a02016 mov r2, #22
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;
a0002e78: e1a03123 lsr r3, r3, #2
a0002e7c: e58430c0 str r3, [r4, #192] ; 0xc0
/*
* Bump name characer
*/
if (c++ == 'z')
a0002e80: e59f30cc ldr r3, [pc, #204] ; a0002f54 <rtems_termios_open+0x41c>
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
a0002e84: e5c42050 strb r2, [r4, #80] ; 0x50
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
a0002e88: e5d3200c ldrb r2, [r3, #12]
a0002e8c: e352007a cmp r2, #122 ; 0x7a
a0002e90: e2821001 add r1, r2, #1
c = 'a';
a0002e94: 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')
a0002e98: e5c3100c strb r1, [r3, #12]
c = 'a';
a0002e9c: 05c3200c strbeq r2, [r3, #12]
}
args->iop->data1 = tty;
a0002ea0: e5983000 ldr r3, [r8]
a0002ea4: e5835034 str r5, [r3, #52] ; 0x34
if (!tty->refcount++) {
a0002ea8: e5953008 ldr r3, [r5, #8]
a0002eac: e2832001 add r2, r3, #1
a0002eb0: e3530000 cmp r3, #0
a0002eb4: e5852008 str r2, [r5, #8]
a0002eb8: 1a000016 bne a0002f18 <rtems_termios_open+0x3e0>
if (tty->device.firstOpen)
a0002ebc: e5953098 ldr r3, [r5, #152] ; 0x98
a0002ec0: e3530000 cmp r3, #0
a0002ec4: 0a000003 beq a0002ed8 <rtems_termios_open+0x3a0>
(*tty->device.firstOpen)(major, minor, arg);
a0002ec8: e1a00009 mov r0, r9
a0002ecc: e1a0100a mov r1, sl
a0002ed0: e1a02008 mov r2, r8
a0002ed4: e12fff33 blx r3
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
a0002ed8: e59530b4 ldr r3, [r5, #180] ; 0xb4
a0002edc: e3530002 cmp r3, #2
a0002ee0: 1a00000c bne a0002f18 <rtems_termios_open+0x3e0>
sc = rtems_task_start(
a0002ee4: e59500c4 ldr r0, [r5, #196] ; 0xc4
a0002ee8: e59f1094 ldr r1, [pc, #148] ; a0002f84 <rtems_termios_open+0x44c>
a0002eec: e1a02005 mov r2, r5
a0002ef0: eb0008e7 bl a0005294 <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
a0002ef4: e3500000 cmp r0, #0
a0002ef8: 1a000005 bne a0002f14 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
a0002efc: e59500c8 ldr r0, [r5, #200] ; 0xc8
a0002f00: e59f1080 ldr r1, [pc, #128] ; a0002f88 <rtems_termios_open+0x450>
a0002f04: e1a02005 mov r2, r5
a0002f08: eb0008e1 bl a0005294 <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
a0002f0c: e3500000 cmp r0, #0
a0002f10: 0a000000 beq a0002f18 <rtems_termios_open+0x3e0>
rtems_fatal_error_occurred (sc);
a0002f14: eb000963 bl a00054a8 <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
a0002f18: e59f302c ldr r3, [pc, #44] ; a0002f4c <rtems_termios_open+0x414>
a0002f1c: e5930000 ldr r0, [r3]
a0002f20: eb00080c bl a0004f58 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
a0002f24: e1a00006 mov r0, r6
a0002f28: e28dd010 add sp, sp, #16
a0002f2c: 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));
a0002f30: e3a00001 mov r0, #1
a0002f34: e3a010e8 mov r1, #232 ; 0xe8
a0002f38: ebfffad6 bl a0001a98 <calloc>
if (tty == NULL) {
a0002f3c: e2504000 subs r4, r0, #0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
a0002f40: e1a05000 mov r5, r0
if (tty == NULL) {
a0002f44: 1affff15 bne a0002ba0 <rtems_termios_open+0x68>
a0002f48: eaffff21 b a0002bd4 <rtems_termios_open+0x9c>
a00034cc <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
a00034cc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
a00034d0: e1a04002 mov r4, r2
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
a00034d4: e59220b4 ldr r2, [r2, #180] ; 0xb4
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
a00034d8: e1a03000 mov r3, r0
a00034dc: e1a06001 mov r6, r1
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
a00034e0: e3520000 cmp r2, #0
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
const unsigned char *buf = _buf;
a00034e4: e1a08000 mov r8, r0
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
a00034e8: 15945080 ldrne r5, [r4, #128] ; 0x80
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
a00034ec: 13a0a002 movne sl, #2
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
a00034f0: 13a09001 movne r9, #1
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
a00034f4: 1a000032 bne a00035c4 <rtems_termios_puts+0xf8>
(*tty->device.write)(tty->minor, (void *)buf, len);
a00034f8: e594c0a4 ldr ip, [r4, #164] ; 0xa4
a00034fc: e5940010 ldr r0, [r4, #16]
a0003500: e1a01003 mov r1, r3
a0003504: e1a02006 mov r2, r6
a0003508: e12fff3c blx ip
return;
a000350c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
a0003510: e5941088 ldr r1, [r4, #136] ; 0x88
a0003514: e2850001 add r0, r5, #1
a0003518: eb003028 bl a000f5c0 <__umodsi3>
a000351c: e1a05000 mov r5, r0
rtems_interrupt_disable (level);
a0003520: ebfffd68 bl a0002ac8 <arm_interrupt_disable>
a0003524: e1a07000 mov r7, r0
while (newHead == tty->rawOutBuf.Tail) {
a0003528: ea00000a b a0003558 <rtems_termios_puts+0x8c>
tty->rawOutBufState = rob_wait;
a000352c: e584a094 str sl, [r4, #148] ; 0x94
a0003530: e129f007 msr CPSR_fc, r7
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
a0003534: e3a01000 mov r1, #0
a0003538: e594008c ldr r0, [r4, #140] ; 0x8c
a000353c: e1a02001 mov r2, r1
a0003540: eb00063e bl a0004e40 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
a0003544: e3500000 cmp r0, #0
a0003548: 0a000000 beq a0003550 <rtems_termios_puts+0x84>
rtems_fatal_error_occurred (sc);
a000354c: eb0007d5 bl a00054a8 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
a0003550: ebfffd5c bl a0002ac8 <arm_interrupt_disable>
a0003554: e1a07000 mov r7, r0
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
a0003558: e5943084 ldr r3, [r4, #132] ; 0x84
a000355c: e1550003 cmp r5, r3
a0003560: 0afffff1 beq a000352c <rtems_termios_puts+0x60>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
a0003564: e5943080 ldr r3, [r4, #128] ; 0x80
a0003568: e4d81001 ldrb r1, [r8], #1
a000356c: e594207c ldr r2, [r4, #124] ; 0x7c
a0003570: e7c21003 strb r1, [r2, r3]
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
a0003574: e5943094 ldr r3, [r4, #148] ; 0x94
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
a0003578: e5845080 str r5, [r4, #128] ; 0x80
if (tty->rawOutBufState == rob_idle) {
a000357c: e3530000 cmp r3, #0
a0003580: 1a00000d bne a00035bc <rtems_termios_puts+0xf0>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
a0003584: e59430b8 ldr r3, [r4, #184] ; 0xb8
a0003588: e3130010 tst r3, #16
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
a000358c: 159430b8 ldrne r3, [r4, #184] ; 0xb8
a0003590: 13833020 orrne r3, r3, #32
a0003594: 158430b8 strne r3, [r4, #184] ; 0xb8
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
a0003598: 1a000006 bne a00035b8 <rtems_termios_puts+0xec>
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
a000359c: e5942084 ldr r2, [r4, #132] ; 0x84
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
a00035a0: e594107c ldr r1, [r4, #124] ; 0x7c
a00035a4: e59430a4 ldr r3, [r4, #164] ; 0xa4
a00035a8: e5940010 ldr r0, [r4, #16]
a00035ac: e0811002 add r1, r1, r2
a00035b0: e3a02001 mov r2, #1
a00035b4: e12fff33 blx r3
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
a00035b8: e5849094 str r9, [r4, #148] ; 0x94
a00035bc: e129f007 msr CPSR_fc, r7
}
rtems_interrupt_enable (level);
len--;
a00035c0: e2466001 sub r6, r6, #1
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
a00035c4: e3560000 cmp r6, #0
a00035c8: 1affffd0 bne a0003510 <rtems_termios_puts+0x44>
a00035cc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a0003c24 <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;
a0003c24: e5903000 ldr r3, [r0]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
a0003c28: 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;
a0003c2c: 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);
a0003c30: 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;
a0003c34: e5908010 ldr r8, [r0, #16]
char *buffer = args->buffer;
a0003c38: e590b00c ldr fp, [r0, #12]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
a0003c3c: 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);
a0003c40: e1a02001 mov r2, r1
a0003c44: e5940014 ldr r0, [r4, #20]
a0003c48: eb00047c bl a0004e40 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
a0003c4c: e2507000 subs r7, r0, #0
a0003c50: 1a0000bd bne a0003f4c <rtems_termios_read+0x328>
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
a0003c54: e59420cc ldr r2, [r4, #204] ; 0xcc
a0003c58: e59f32f4 ldr r3, [pc, #756] ; a0003f54 <rtems_termios_read+0x330>
a0003c5c: e0833282 add r3, r3, r2, lsl #5
a0003c60: e5933008 ldr r3, [r3, #8]
a0003c64: e3530000 cmp r3, #0
a0003c68: 0a000004 beq a0003c80 <rtems_termios_read+0x5c>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
a0003c6c: e1a00004 mov r0, r4
a0003c70: e1a01005 mov r1, r5
a0003c74: e12fff33 blx r3
a0003c78: e1a07000 mov r7, r0
a0003c7c: ea0000ae b a0003f3c <rtems_termios_read+0x318>
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
a0003c80: e5942024 ldr r2, [r4, #36] ; 0x24
a0003c84: e5943020 ldr r3, [r4, #32]
a0003c88: e1520003 cmp r2, r3
a0003c8c: 1a0000a1 bne a0003f18 <rtems_termios_read+0x2f4>
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
a0003c90: e5943028 ldr r3, [r4, #40] ; 0x28
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
a0003c94: e5847020 str r7, [r4, #32]
a0003c98: e5847024 str r7, [r4, #36] ; 0x24
tty->read_start_column = tty->column;
a0003c9c: e584302c str r3, [r4, #44] ; 0x2c
if (tty->device.pollRead != NULL &&
a0003ca0: e59430a0 ldr r3, [r4, #160] ; 0xa0
a0003ca4: e3530000 cmp r3, #0
a0003ca8: 0a00003b beq a0003d9c <rtems_termios_read+0x178>
a0003cac: e59430b4 ldr r3, [r4, #180] ; 0xb4
a0003cb0: e3530000 cmp r3, #0
a0003cb4: 1a000038 bne a0003d9c <rtems_termios_read+0x178>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
a0003cb8: e594303c ldr r3, [r4, #60] ; 0x3c
a0003cbc: e3130002 tst r3, #2
a0003cc0: 0a00000d beq a0003cfc <rtems_termios_read+0xd8>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
a0003cc4: e59430a0 ldr r3, [r4, #160] ; 0xa0
a0003cc8: e5940010 ldr r0, [r4, #16]
a0003ccc: e12fff33 blx r3
if (n < 0) {
a0003cd0: e3500000 cmp r0, #0
a0003cd4: aa000002 bge a0003ce4 <rtems_termios_read+0xc0>
rtems_task_wake_after (1);
a0003cd8: e3a00001 mov r0, #1
a0003cdc: eb000584 bl a00052f4 <rtems_task_wake_after>
a0003ce0: eafffff7 b a0003cc4 <rtems_termios_read+0xa0>
} else {
if (siproc (n, tty))
a0003ce4: e20000ff and r0, r0, #255 ; 0xff
a0003ce8: e1a01004 mov r1, r4
a0003cec: ebffff88 bl a0003b14 <siproc>
a0003cf0: e3500000 cmp r0, #0
a0003cf4: 0afffff2 beq a0003cc4 <rtems_termios_read+0xa0>
a0003cf8: ea000086 b a0003f18 <rtems_termios_read+0x2f4>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
a0003cfc: eb0002c3 bl a0004810 <rtems_clock_get_ticks_since_boot>
a0003d00: e1a06000 mov r6, r0
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
a0003d04: e59430a0 ldr r3, [r4, #160] ; 0xa0
a0003d08: e5940010 ldr r0, [r4, #16]
a0003d0c: e12fff33 blx r3
if (n < 0) {
a0003d10: e3500000 cmp r0, #0
a0003d14: aa000013 bge a0003d68 <rtems_termios_read+0x144>
if (tty->termios.c_cc[VMIN]) {
a0003d18: e5d43047 ldrb r3, [r4, #71] ; 0x47
a0003d1c: e3530000 cmp r3, #0
a0003d20: e5d43046 ldrb r3, [r4, #70] ; 0x46
a0003d24: 0a000005 beq a0003d40 <rtems_termios_read+0x11c>
if (tty->termios.c_cc[VTIME] && tty->ccount) {
a0003d28: e3530000 cmp r3, #0
a0003d2c: 0a00000a beq a0003d5c <rtems_termios_read+0x138>
a0003d30: e5943020 ldr r3, [r4, #32]
a0003d34: e3530000 cmp r3, #0
a0003d38: 0a000007 beq a0003d5c <rtems_termios_read+0x138>
a0003d3c: ea000001 b a0003d48 <rtems_termios_read+0x124>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
a0003d40: e3530000 cmp r3, #0 <== NOT EXECUTED
a0003d44: 0a000073 beq a0003f18 <rtems_termios_read+0x2f4> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
a0003d48: eb0002b0 bl a0004810 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
a0003d4c: e5943054 ldr r3, [r4, #84] ; 0x54
a0003d50: e0660000 rsb r0, r6, r0
a0003d54: e1500003 cmp r0, r3
a0003d58: 8a00006e bhi a0003f18 <rtems_termios_read+0x2f4>
break;
}
}
rtems_task_wake_after (1);
a0003d5c: e3a00001 mov r0, #1
a0003d60: eb000563 bl a00052f4 <rtems_task_wake_after>
a0003d64: eaffffe6 b a0003d04 <rtems_termios_read+0xe0>
} else {
siproc (n, tty);
a0003d68: e20000ff and r0, r0, #255 ; 0xff
a0003d6c: e1a01004 mov r1, r4
a0003d70: ebffff67 bl a0003b14 <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
a0003d74: e5d43047 ldrb r3, [r4, #71] ; 0x47
a0003d78: e5942020 ldr r2, [r4, #32]
a0003d7c: e1520003 cmp r2, r3
a0003d80: aa000064 bge a0003f18 <rtems_termios_read+0x2f4>
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
a0003d84: e3530000 cmp r3, #0
a0003d88: 0affffdd beq a0003d04 <rtems_termios_read+0xe0>
a0003d8c: e5d43046 ldrb r3, [r4, #70] ; 0x46
a0003d90: e3530000 cmp r3, #0
a0003d94: 0affffda beq a0003d04 <rtems_termios_read+0xe0>
a0003d98: eaffffd7 b a0003cfc <rtems_termios_read+0xd8>
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)(
a0003d9c: 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;
a0003da0: e594a074 ldr sl, [r4, #116] ; 0x74
rtems_status_code sc;
int wait = (int)1;
a0003da4: e3a06001 mov r6, #1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
a0003da8: e59f91a8 ldr r9, [pc, #424] ; a0003f58 <rtems_termios_read+0x334>
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)(
a0003dac: e58d2000 str r2, [sp]
a0003db0: ea000040 b a0003eb8 <rtems_termios_read+0x294>
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;
a0003db4: e594005c ldr r0, [r4, #92] ; 0x5c
a0003db8: e5941064 ldr r1, [r4, #100] ; 0x64
a0003dbc: e2800001 add r0, r0, #1
a0003dc0: eb002dfe bl a000f5c0 <__umodsi3>
c = tty->rawInBuf.theBuf[newHead];
a0003dc4: e5943058 ldr r3, [r4, #88] ; 0x58
a0003dc8: e7d3a000 ldrb sl, [r3, r0]
tty->rawInBuf.Head = newHead;
a0003dcc: e584005c str r0, [r4, #92] ; 0x5c
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
a0003dd0: e5943060 ldr r3, [r4, #96] ; 0x60
a0003dd4: e5942064 ldr r2, [r4, #100] ; 0x64
% tty->rawInBuf.Size)
a0003dd8: e5941064 ldr r1, [r4, #100] ; 0x64
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
a0003ddc: e0823003 add r3, r2, r3
% tty->rawInBuf.Size)
a0003de0: e0600003 rsb r0, r0, r3
a0003de4: eb002df5 bl a000f5c0 <__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)
a0003de8: e59430bc ldr r3, [r4, #188] ; 0xbc
a0003dec: e1500003 cmp r0, r3
a0003df0: 2a00001f bcs a0003e74 <rtems_termios_read+0x250>
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
a0003df4: e59430b8 ldr r3, [r4, #184] ; 0xb8
a0003df8: e3c33001 bic r3, r3, #1
a0003dfc: e58430b8 str r3, [r4, #184] ; 0xb8
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
a0003e00: e59420b8 ldr r2, [r4, #184] ; 0xb8
a0003e04: e59f3150 ldr r3, [pc, #336] ; a0003f5c <rtems_termios_read+0x338>
a0003e08: e0023003 and r3, r2, r3
a0003e0c: e59f2148 ldr r2, [pc, #328] ; a0003f5c <rtems_termios_read+0x338>
a0003e10: e1530002 cmp r3, r2
a0003e14: 1a00000b bne a0003e48 <rtems_termios_read+0x224>
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
a0003e18: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
a0003e1c: e3530000 cmp r3, #0 <== NOT EXECUTED
a0003e20: 0a000002 beq a0003e30 <rtems_termios_read+0x20c> <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
a0003e24: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0003e28: e3130020 tst r3, #32 <== NOT EXECUTED
a0003e2c: 0a000005 beq a0003e48 <rtems_termios_read+0x224> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
a0003e30: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED
a0003e34: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a0003e38: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a0003e3c: e3a02001 mov r2, #1 <== NOT EXECUTED
a0003e40: e12fff33 blx r3 <== NOT EXECUTED
a0003e44: ea00000a b a0003e74 <rtems_termios_read+0x250> <== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
a0003e48: e59430b8 ldr r3, [r4, #184] ; 0xb8
a0003e4c: e3130c01 tst r3, #256 ; 0x100
a0003e50: 0a000007 beq a0003e74 <rtems_termios_read+0x250>
tty->flow_ctrl &= ~FL_IRTSOFF;
a0003e54: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0003e58: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
a0003e5c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
a0003e60: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
a0003e64: e3530000 cmp r3, #0 <== NOT EXECUTED
a0003e68: 0a000001 beq a0003e74 <rtems_termios_read+0x250> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
a0003e6c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a0003e70: e12fff33 blx r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
a0003e74: e594303c ldr r3, [r4, #60] ; 0x3c
a0003e78: e3130002 tst r3, #2
a0003e7c: 0a000005 beq a0003e98 <rtems_termios_read+0x274>
if (siproc (c, tty))
a0003e80: e1a0000a mov r0, sl
a0003e84: e1a01004 mov r1, r4
a0003e88: ebffff21 bl a0003b14 <siproc>
wait = 0;
a0003e8c: e3500000 cmp r0, #0
a0003e90: 13a06000 movne r6, #0
a0003e94: ea000006 b a0003eb4 <rtems_termios_read+0x290>
} else {
siproc (c, tty);
a0003e98: e1a0000a mov r0, sl <== NOT EXECUTED
a0003e9c: e1a01004 mov r1, r4 <== NOT EXECUTED
a0003ea0: ebffff1b bl a0003b14 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
a0003ea4: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
a0003ea8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
wait = 0;
a0003eac: e1520003 cmp r2, r3 <== NOT EXECUTED
a0003eb0: a3a06000 movge r6, #0 <== NOT EXECUTED
}
timeout = tty->rawInBufSemaphoreTimeout;
a0003eb4: e594a070 ldr sl, [r4, #112] ; 0x70
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
a0003eb8: e594205c ldr r2, [r4, #92] ; 0x5c
a0003ebc: e5943060 ldr r3, [r4, #96] ; 0x60
a0003ec0: e1520003 cmp r2, r3
a0003ec4: 0a000004 beq a0003edc <rtems_termios_read+0x2b8>
(tty->ccount < (CBUFSIZE-1))) {
a0003ec8: e5993008 ldr r3, [r9, #8]
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
a0003ecc: e5942020 ldr r2, [r4, #32]
(tty->ccount < (CBUFSIZE-1))) {
a0003ed0: e2433001 sub r3, r3, #1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
a0003ed4: e1520003 cmp r2, r3
a0003ed8: baffffb5 blt a0003db4 <rtems_termios_read+0x190>
}
/*
* Wait for characters
*/
if ( wait ) {
a0003edc: e3560000 cmp r6, #0
a0003ee0: 0a00000c beq a0003f18 <rtems_termios_read+0x2f4>
sc = rtems_semaphore_obtain(
a0003ee4: e5940068 ldr r0, [r4, #104] ; 0x68
a0003ee8: e594106c ldr r1, [r4, #108] ; 0x6c
a0003eec: e1a0200a mov r2, sl
a0003ef0: eb0003d2 bl a0004e40 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
a0003ef4: e3500000 cmp r0, #0
a0003ef8: 0affffee beq a0003eb8 <rtems_termios_read+0x294>
a0003efc: ea000005 b a0003f18 <rtems_termios_read+0x2f4> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
a0003f00: e594201c ldr r2, [r4, #28]
count--;
a0003f04: e2488001 sub r8, r8, #1
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
a0003f08: e7d22003 ldrb r2, [r2, r3]
a0003f0c: e2833001 add r3, r3, #1
a0003f10: e4cb2001 strb r2, [fp], #1
a0003f14: e5843024 str r3, [r4, #36] ; 0x24
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
a0003f18: e3580000 cmp r8, #0
a0003f1c: 0a000003 beq a0003f30 <rtems_termios_read+0x30c>
a0003f20: e5943024 ldr r3, [r4, #36] ; 0x24
a0003f24: e5942020 ldr r2, [r4, #32]
a0003f28: e1530002 cmp r3, r2
a0003f2c: bafffff3 blt a0003f00 <rtems_termios_read+0x2dc>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
a0003f30: e5953010 ldr r3, [r5, #16]
a0003f34: e0688003 rsb r8, r8, r3
a0003f38: e5858018 str r8, [r5, #24]
tty->tty_rcvwakeup = 0;
a0003f3c: e3a03000 mov r3, #0
a0003f40: e58430e4 str r3, [r4, #228] ; 0xe4
rtems_semaphore_release (tty->isem);
a0003f44: e5940014 ldr r0, [r4, #20]
a0003f48: eb000402 bl a0004f58 <rtems_semaphore_release>
return sc;
}
a0003f4c: e1a00007 mov r0, r7
a0003f50: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000426c <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))
a000426c: e59020b8 ldr r2, [r0, #184] ; 0xb8
a0004270: e59f31b8 ldr r3, [pc, #440] ; a0004430 <rtems_termios_refill_transmitter+0x1c4>
* in task-driven mode, this function is called in Tx task context
* in interrupt-driven mode, this function is called in TxIRQ context
*/
int
rtems_termios_refill_transmitter (struct rtems_termios_tty *tty)
{
a0004274: e92d4070 push {r4, r5, r6, lr}
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
a0004278: e0023003 and r3, r2, r3
a000427c: e59f21b0 ldr r2, [pc, #432] ; a0004434 <rtems_termios_refill_transmitter+0x1c8>
* in task-driven mode, this function is called in Tx task context
* in interrupt-driven mode, this function is called in TxIRQ context
*/
int
rtems_termios_refill_transmitter (struct rtems_termios_tty *tty)
{
a0004280: 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))
a0004284: e1530002 cmp r3, r2
a0004288: 1a00000c bne a00042c0 <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);
a000428c: e59030a4 ldr r3, [r0, #164] ; 0xa4 <== NOT EXECUTED
a0004290: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED
a0004294: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED
a0004298: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
a000429c: e12fff33 blx r3 <== NOT EXECUTED
rtems_interrupt_disable(level);
a00042a0: ebfffa08 bl a0002ac8 <arm_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
a00042a4: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED
a00042a8: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a00042ac: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
a00042b0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00042b4: e3833002 orr r3, r3, #2 <== NOT EXECUTED
a00042b8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
rtems_interrupt_enable(level);
a00042bc: ea00000f b a0004300 <rtems_termios_refill_transmitter+0x94><== NOT EXECUTED
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
a00042c0: e59030b8 ldr r3, [r0, #184] ; 0xb8
a00042c4: e2033003 and r3, r3, #3
a00042c8: e3530002 cmp r3, #2
a00042cc: 1a00000e bne a000430c <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);
a00042d0: e59030a4 ldr r3, [r0, #164] ; 0xa4 <== NOT EXECUTED
a00042d4: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED
a00042d8: e3a02001 mov r2, #1 <== NOT EXECUTED
a00042dc: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
a00042e0: e12fff33 blx r3 <== NOT EXECUTED
rtems_interrupt_disable(level);
a00042e4: ebfff9f7 bl a0002ac8 <arm_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
a00042e8: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED
a00042ec: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a00042f0: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
a00042f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00042f8: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
a00042fc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0004300: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
a0004304: e3a05001 mov r5, #1 <== NOT EXECUTED
a0004308: ea000046 b a0004428 <rtems_termios_refill_transmitter+0x1bc><== NOT EXECUTED
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
a000430c: e5902080 ldr r2, [r0, #128] ; 0x80
a0004310: e5903084 ldr r3, [r0, #132] ; 0x84
a0004314: e1520003 cmp r2, r3
a0004318: 1a000005 bne a0004334 <rtems_termios_refill_transmitter+0xc8>
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
a000431c: e5903094 ldr r3, [r0, #148] ; 0x94
a0004320: e3530002 cmp r3, #2
a0004324: 1a00003e bne a0004424 <rtems_termios_refill_transmitter+0x1b8>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
a0004328: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED
a000432c: eb000309 bl a0004f58 <rtems_semaphore_release> <== NOT EXECUTED
a0004330: ea00003b b a0004424 <rtems_termios_refill_transmitter+0x1b8><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
a0004334: ebfff9e3 bl a0002ac8 <arm_interrupt_disable>
len = tty->t_dqlen;
tty->t_dqlen = 0;
a0004338: e3a03000 mov r3, #0
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
a000433c: e5942090 ldr r2, [r4, #144] ; 0x90
tty->t_dqlen = 0;
a0004340: e5843090 str r3, [r4, #144] ; 0x90
a0004344: e129f000 msr CPSR_fc, r0
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
a0004348: e5943084 ldr r3, [r4, #132] ; 0x84
a000434c: e5941088 ldr r1, [r4, #136] ; 0x88
a0004350: e0820003 add r0, r2, r3
a0004354: eb002c99 bl a000f5c0 <__umodsi3>
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
a0004358: e5943094 ldr r3, [r4, #148] ; 0x94
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
a000435c: e1a06000 mov r6, r0
tty->rawOutBuf.Tail = newTail;
a0004360: e5840084 str r0, [r4, #132] ; 0x84
if (tty->rawOutBufState == rob_wait) {
a0004364: e3530002 cmp r3, #2
a0004368: 1a000001 bne a0004374 <rtems_termios_refill_transmitter+0x108>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
a000436c: e594008c ldr r0, [r4, #140] ; 0x8c
a0004370: eb0002f8 bl a0004f58 <rtems_semaphore_release>
}
if (newTail == tty->rawOutBuf.Head) {
a0004374: e5943080 ldr r3, [r4, #128] ; 0x80
a0004378: e1560003 cmp r6, r3
a000437c: 1a000009 bne a00043a8 <rtems_termios_refill_transmitter+0x13c>
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
a0004380: e59430d4 ldr r3, [r4, #212] ; 0xd4
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
a0004384: e3a05000 mov r5, #0
a0004388: e5845094 str r5, [r4, #148] ; 0x94
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
a000438c: e1530005 cmp r3, r5
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
a0004390: 01a05003 moveq r5, r3
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
a0004394: 0a000020 beq a000441c <rtems_termios_refill_transmitter+0x1b0>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
a0004398: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
a000439c: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED
a00043a0: e12fff33 blx r3 <== NOT EXECUTED
a00043a4: ea00001c b a000441c <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))
a00043a8: e59430b8 ldr r3, [r4, #184] ; 0xb8
a00043ac: e2033e21 and r3, r3, #528 ; 0x210
a00043b0: e3530e21 cmp r3, #528 ; 0x210
a00043b4: 1a000008 bne a00043dc <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);
a00043b8: ebfff9c2 bl a0002ac8 <arm_interrupt_disable> <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
a00043bc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00043c0: e3833020 orr r3, r3, #32 <== NOT EXECUTED
a00043c4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
a00043c8: e3a03001 mov r3, #1 <== NOT EXECUTED
a00043cc: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
a00043d0: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 0;
a00043d4: e3a05000 mov r5, #0 <== NOT EXECUTED
a00043d8: ea00000f b a000441c <rtems_termios_refill_transmitter+0x1b0><== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
a00043dc: e5943080 ldr r3, [r4, #128] ; 0x80
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
a00043e0: e594107c ldr r1, [r4, #124] ; 0x7c
a00043e4: e5940010 ldr r0, [r4, #16]
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
a00043e8: e1560003 cmp r6, r3
nToSend = tty->rawOutBuf.Size - newTail;
a00043ec: 85945088 ldrhi r5, [r4, #136] ; 0x88
else
nToSend = tty->rawOutBuf.Head - newTail;
a00043f0: 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)) {
a00043f4: e59430b8 ldr r3, [r4, #184] ; 0xb8
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
a00043f8: e0811006 add r1, r1, r6
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
a00043fc: 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)) {
a0004400: e3130c06 tst r3, #1536 ; 0x600
nToSend = 1;
a0004404: 13a05001 movne r5, #1
}
tty->rawOutBufState = rob_busy; /*apm*/
a0004408: e3a03001 mov r3, #1
a000440c: e5843094 str r3, [r4, #148] ; 0x94
(*tty->device.write)(
a0004410: e1a02005 mov r2, r5
a0004414: e59430a4 ldr r3, [r4, #164] ; 0xa4
a0004418: e12fff33 blx r3
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
a000441c: e5846084 str r6, [r4, #132] ; 0x84
a0004420: ea000000 b a0004428 <rtems_termios_refill_transmitter+0x1bc>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
a0004424: e3a05000 mov r5, #0
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
a0004428: e1a00005 mov r0, r5
a000442c: e8bd8070 pop {r4, r5, r6, pc}
a0004204 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
a0004204: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr}
a0004208: e1a04000 mov r4, r0
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
a000420c: e3a05000 mov r5, #0
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
a0004210: e28d6007 add r6, sp, #7
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
a0004214: e1a0300d mov r3, sp
a0004218: e3a00003 mov r0, #3
a000421c: e3a01002 mov r1, #2
a0004220: e3a02000 mov r2, #0
a0004224: eb000197 bl a0004888 <rtems_event_receive>
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
a0004228: e59d3000 ldr r3, [sp]
a000422c: e3130001 tst r3, #1
a0004230: 0a000002 beq a0004240 <rtems_termios_rxdaemon+0x3c>
tty->rxTaskId = 0;
a0004234: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
a0004238: e1a00005 mov r0, r5 <== NOT EXECUTED
a000423c: eb0003be bl a000513c <rtems_task_delete> <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
a0004240: e59430a0 ldr r3, [r4, #160] ; 0xa0
a0004244: e5940010 ldr r0, [r4, #16]
a0004248: e12fff33 blx r3
if (c != EOF) {
a000424c: e3700001 cmn r0, #1
a0004250: 0affffef beq a0004214 <rtems_termios_rxdaemon+0x10>
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
a0004254: e5cd0007 strb r0, [sp, #7]
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
a0004258: e1a01006 mov r1, r6
a000425c: e1a00004 mov r0, r4
a0004260: e3a02001 mov r2, #1
a0004264: ebffff40 bl a0003f6c <rtems_termios_enqueue_raw_characters>
a0004268: eaffffe9 b a0004214 <rtems_termios_rxdaemon+0x10>
a0004438 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
a0004438: e92d40f1 push {r0, r4, r5, r6, r7, lr}
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
a000443c: e59f6058 ldr r6, [pc, #88] ; a000449c <rtems_termios_txdaemon+0x64>
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
a0004440: e1a04000 mov r4, r0
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
a0004444: e3a05000 mov r5, #0
a0004448: e1a0300d mov r3, sp
a000444c: e3a00003 mov r0, #3
a0004450: e3a01002 mov r1, #2
a0004454: e3a02000 mov r2, #0
a0004458: eb00010a bl a0004888 <rtems_event_receive>
(TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
a000445c: e59d3000 ldr r3, [sp]
a0004460: e3130001 tst r3, #1
a0004464: 0a000002 beq a0004474 <rtems_termios_txdaemon+0x3c>
tty->txTaskId = 0;
a0004468: e58450c8 str r5, [r4, #200] ; 0xc8
rtems_task_delete(RTEMS_SELF);
a000446c: e1a00005 mov r0, r5 <== NOT EXECUTED
a0004470: eb000331 bl a000513c <rtems_task_delete> <== NOT EXECUTED
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
a0004474: e59430cc ldr r3, [r4, #204] ; 0xcc
a0004478: e0863283 add r3, r6, r3, lsl #5
a000447c: e5933014 ldr r3, [r3, #20]
a0004480: e3530000 cmp r3, #0
a0004484: 0a000001 beq a0004490 <rtems_termios_txdaemon+0x58>
rtems_termios_linesw[tty->t_line].l_start(tty);
a0004488: e1a00004 mov r0, r4
a000448c: e12fff33 blx r3 <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
a0004490: e1a00004 mov r0, r4
a0004494: ebffff74 bl a000426c <rtems_termios_refill_transmitter>
}
a0004498: eaffffea b a0004448 <rtems_termios_txdaemon+0x10>
a0003b70 <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;
a0003b70: e5903000 ldr r3, [r0]
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
a0003b74: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
a0003b78: e5935034 ldr r5, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
a0003b7c: e3a01000 mov r1, #0
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
a0003b80: 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);
a0003b84: e1a02001 mov r2, r1
a0003b88: e5950018 ldr r0, [r5, #24]
a0003b8c: eb0004ab bl a0004e40 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
a0003b90: e2506000 subs r6, r0, #0
a0003b94: 1a00001f bne a0003c18 <rtems_termios_write+0xa8>
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
a0003b98: e59520cc ldr r2, [r5, #204] ; 0xcc
a0003b9c: e59f307c ldr r3, [pc, #124] ; a0003c20 <rtems_termios_write+0xb0>
a0003ba0: e0833282 add r3, r3, r2, lsl #5
a0003ba4: e593300c ldr r3, [r3, #12]
a0003ba8: e3530000 cmp r3, #0
a0003bac: 0a000004 beq a0003bc4 <rtems_termios_write+0x54>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
a0003bb0: e1a00005 mov r0, r5
a0003bb4: e1a01004 mov r1, r4
a0003bb8: e12fff33 blx r3
a0003bbc: e1a06000 mov r6, r0
a0003bc0: ea000012 b a0003c10 <rtems_termios_write+0xa0>
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
a0003bc4: e5953034 ldr r3, [r5, #52] ; 0x34
a0003bc8: e3130001 tst r3, #1
uint32_t count = args->count;
a0003bcc: 15947010 ldrne r7, [r4, #16]
char *buffer = args->buffer;
a0003bd0: 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) {
a0003bd4: 1a000004 bne a0003bec <rtems_termios_write+0x7c>
a0003bd8: ea000006 b a0003bf8 <rtems_termios_write+0x88> <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
a0003bdc: e4d80001 ldrb r0, [r8], #1
a0003be0: e1a01005 mov r1, r5
a0003be4: ebfffe79 bl a00035d0 <oproc>
a0003be8: e2477001 sub r7, r7, #1
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
a0003bec: e3570000 cmp r7, #0
a0003bf0: 1afffff9 bne a0003bdc <rtems_termios_write+0x6c>
a0003bf4: ea000003 b a0003c08 <rtems_termios_write+0x98>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
a0003bf8: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
a0003bfc: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED
a0003c00: e1a02005 mov r2, r5 <== NOT EXECUTED
a0003c04: ebfffe30 bl a00034cc <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
a0003c08: e5943010 ldr r3, [r4, #16]
a0003c0c: e5843018 str r3, [r4, #24]
}
rtems_semaphore_release (tty->osem);
a0003c10: e5950018 ldr r0, [r5, #24]
a0003c14: eb0004cf bl a0004f58 <rtems_semaphore_release>
return sc;
}
a0003c18: e1a00006 mov r0, r6
a0003c1c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a00061cc <rtems_verror>:
{
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
a00061cc: e3100202 tst r0, #536870912 ; 0x20000000
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
a00061d0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a00061d4: e1a05000 mov r5, r0
a00061d8: e1a08001 mov r8, r1
a00061dc: e1a04002 mov r4, r2
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
a00061e0: 0a00000e beq a0006220 <rtems_verror+0x54>
if (rtems_panic_in_progress++)
a00061e4: e59f212c ldr r2, [pc, #300] ; a0006318 <rtems_verror+0x14c>
a00061e8: e5923000 ldr r3, [r2]
a00061ec: e2831001 add r1, r3, #1
a00061f0: e3530000 cmp r3, #0
a00061f4: e5821000 str r1, [r2]
a00061f8: 0a000003 beq a000620c <rtems_verror+0x40>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a00061fc: e59f3118 ldr r3, [pc, #280] ; a000631c <rtems_verror+0x150><== NOT EXECUTED
a0006200: e5932000 ldr r2, [r3] <== NOT EXECUTED
a0006204: e2822001 add r2, r2, #1 <== NOT EXECUTED
a0006208: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
a000620c: e59f3104 ldr r3, [pc, #260] ; a0006318 <rtems_verror+0x14c>
a0006210: e5933000 ldr r3, [r3]
a0006214: e3530002 cmp r3, #2
return 0;
a0006218: 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)
a000621c: ca00003b bgt a0006310 <rtems_verror+0x144>
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
a0006220: e59f30f8 ldr r3, [pc, #248] ; a0006320 <rtems_verror+0x154>
status = error_flag & ~RTEMS_ERROR_MASK;
a0006224: e3c56207 bic r6, r5, #1879048192 ; 0x70000000
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
a0006228: e5933000 ldr r3, [r3]
a000622c: e5930008 ldr r0, [r3, #8]
a0006230: eb002c10 bl a0011278 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
a0006234: e2155101 ands r5, r5, #1073741824 ; 0x40000000
a0006238: 0a000001 beq a0006244 <rtems_verror+0x78>
local_errno = errno;
a000623c: eb002b16 bl a0010e9c <__errno>
a0006240: 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);
a0006244: e59f70d4 ldr r7, [pc, #212] ; a0006320 <rtems_verror+0x154>
a0006248: e1a02004 mov r2, r4
a000624c: e1a01008 mov r1, r8
a0006250: e5973000 ldr r3, [r7]
a0006254: e593000c ldr r0, [r3, #12]
a0006258: eb004478 bl a0017440 <vfprintf>
if (status)
a000625c: 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);
a0006260: e1a04000 mov r4, r0
if (status)
a0006264: 0a000008 beq a000628c <rtems_verror+0xc0>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
a0006268: e5973000 ldr r3, [r7]
a000626c: e1a00006 mov r0, r6
a0006270: e593700c ldr r7, [r3, #12]
a0006274: ebffffd0 bl a00061bc <rtems_status_text>
a0006278: e59f10a4 ldr r1, [pc, #164] ; a0006324 <rtems_verror+0x158>
a000627c: e1a02000 mov r2, r0
a0006280: e1a00007 mov r0, r7
a0006284: eb002ce1 bl a0011610 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
a0006288: e0844000 add r4, r4, r0
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
a000628c: e3550000 cmp r5, #0
a0006290: 0a000015 beq a00062ec <rtems_verror+0x120>
if ((local_errno > 0) && *strerror(local_errno))
a0006294: da00000d ble a00062d0 <rtems_verror+0x104>
a0006298: e1a00005 mov r0, r5
a000629c: eb002fde bl a001221c <strerror>
a00062a0: e5d03000 ldrb r3, [r0]
a00062a4: e3530000 cmp r3, #0
a00062a8: 0a000008 beq a00062d0 <rtems_verror+0x104>
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
a00062ac: e59f306c ldr r3, [pc, #108] ; a0006320 <rtems_verror+0x154>
a00062b0: e1a00005 mov r0, r5
a00062b4: e5933000 ldr r3, [r3]
a00062b8: e593600c ldr r6, [r3, #12]
a00062bc: eb002fd6 bl a001221c <strerror>
a00062c0: e59f1060 ldr r1, [pc, #96] ; a0006328 <rtems_verror+0x15c>
a00062c4: e1a02000 mov r2, r0
a00062c8: e1a00006 mov r0, r6
a00062cc: ea000004 b a00062e4 <rtems_verror+0x118>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
a00062d0: e59f3048 ldr r3, [pc, #72] ; a0006320 <rtems_verror+0x154>
a00062d4: e59f1050 ldr r1, [pc, #80] ; a000632c <rtems_verror+0x160>
a00062d8: e1a02005 mov r2, r5
a00062dc: e5933000 ldr r3, [r3]
a00062e0: e593000c ldr r0, [r3, #12]
a00062e4: eb002cc9 bl a0011610 <fprintf>
a00062e8: e0844000 add r4, r4, r0
}
chars_written += fprintf(stderr, "\n");
a00062ec: e59f502c ldr r5, [pc, #44] ; a0006320 <rtems_verror+0x154>
a00062f0: e59f1038 ldr r1, [pc, #56] ; a0006330 <rtems_verror+0x164>
a00062f4: e5953000 ldr r3, [r5]
a00062f8: e593000c ldr r0, [r3, #12]
a00062fc: eb002cc3 bl a0011610 <fprintf>
(void) fflush(stderr);
a0006300: 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");
a0006304: e0804004 add r4, r0, r4
(void) fflush(stderr);
a0006308: e593000c ldr r0, [r3, #12]
a000630c: eb002bd9 bl a0011278 <fflush>
return chars_written;
}
a0006310: e1a00004 mov r0, r4
a0006314: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a000235c <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
a000235c: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
a0002360: e59fb0dc ldr fp, [pc, #220] ; a0002444 <scanInt+0xe8>
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
a0002364: e59f90dc ldr r9, [pc, #220] ; a0002448 <scanInt+0xec>
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
a0002368: e3a04000 mov r4, #0
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
a000236c: e1a05000 mov r5, r0
a0002370: e58d1000 str r1, [sp]
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
a0002374: e3e08102 mvn r8, #-2147483648 ; 0x80000000
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
a0002378: e1a07004 mov r7, r4
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
a000237c: e3a0a00a mov sl, #10
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
a0002380: e5953004 ldr r3, [r5, #4]
a0002384: e2433001 sub r3, r3, #1
a0002388: e3530000 cmp r3, #0
a000238c: e5853004 str r3, [r5, #4]
a0002390: a5953000 ldrge r3, [r5]
a0002394: a4d36001 ldrbge r6, [r3], #1
a0002398: a5853000 strge r3, [r5]
a000239c: aa000003 bge a00023b0 <scanInt+0x54>
a00023a0: e59b0000 ldr r0, [fp] <== NOT EXECUTED
a00023a4: e1a01005 mov r1, r5 <== NOT EXECUTED
a00023a8: eb003137 bl a000e88c <__srget_r> <== NOT EXECUTED
a00023ac: e1a06000 mov r6, r0 <== NOT EXECUTED
if (c == ':')
a00023b0: e356003a cmp r6, #58 ; 0x3a
a00023b4: 0a000019 beq a0002420 <scanInt+0xc4>
break;
if (sign == 0) {
a00023b8: e3540000 cmp r4, #0
a00023bc: 1a000004 bne a00023d4 <scanInt+0x78>
if (c == '-') {
a00023c0: e356002d cmp r6, #45 ; 0x2d
sign = -1;
limit++;
a00023c4: 02888001 addeq r8, r8, #1
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
a00023c8: 03e04000 mvneq r4, #0
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
a00023cc: 0affffeb beq a0002380 <scanInt+0x24>
sign = -1;
limit++;
continue;
}
sign = 1;
a00023d0: e3a04001 mov r4, #1
}
if (!isdigit(c))
a00023d4: e5993000 ldr r3, [r9]
a00023d8: e0833006 add r3, r3, r6
a00023dc: e5d30001 ldrb r0, [r3, #1]
a00023e0: e2100004 ands r0, r0, #4
a00023e4: 0a000015 beq a0002440 <scanInt+0xe4>
return 0;
d = c - '0';
if ((i > (limit / 10))
a00023e8: e1a00008 mov r0, r8
a00023ec: e3a0100a mov r1, #10
a00023f0: eb003a2f bl a0010cb4 <__aeabi_uidiv>
a00023f4: e1570000 cmp r7, r0
a00023f8: 8a00000f bhi a000243c <scanInt+0xe0>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
a00023fc: e2466030 sub r6, r6, #48 ; 0x30
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
a0002400: 1a000004 bne a0002418 <scanInt+0xbc>
a0002404: e1a00008 mov r0, r8
a0002408: e3a0100a mov r1, #10
a000240c: eb003ac0 bl a0010f14 <__umodsi3>
a0002410: e1560000 cmp r6, r0
a0002414: 8a000008 bhi a000243c <scanInt+0xe0>
return 0;
i = i * 10 + d;
a0002418: e027679a mla r7, sl, r7, r6
a000241c: eaffffd7 b a0002380 <scanInt+0x24>
}
if (sign == 0)
a0002420: e3540000 cmp r4, #0
return 0;
a0002424: 01a00004 moveq r0, r4
*val = i * sign;
a0002428: 10040497 mulne r4, r7, r4
a000242c: 159d3000 ldrne r3, [sp]
return 1;
a0002430: 13a00001 movne r0, #1
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
a0002434: 15834000 strne r4, [r3]
return 1;
a0002438: ea000000 b a0002440 <scanInt+0xe4>
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
a000243c: e3a00000 mov r0, #0
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
a0002440: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0003b14 <siproc>:
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
a0003b14: e591203c ldr r2, [r1, #60] ; 0x3c
a0003b18: e59f304c ldr r3, [pc, #76] ; a0003b6c <siproc+0x58>
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
a0003b1c: e92d4030 push {r4, r5, lr}
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
a0003b20: e0023003 and r3, r2, r3
a0003b24: e3530000 cmp r3, #0
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
a0003b28: e1a04001 mov r4, r1
a0003b2c: 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)) {
a0003b30: 0a00000b beq a0003b64 <siproc+0x50>
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
a0003b34: e5910018 ldr r0, [r1, #24]
a0003b38: e3a01000 mov r1, #0
a0003b3c: e1a02001 mov r2, r1
a0003b40: eb0004be bl a0004e40 <rtems_semaphore_obtain>
i = iproc (c, tty);
a0003b44: e1a01004 mov r1, r4
a0003b48: e1a00005 mov r0, r5
a0003b4c: ebffff88 bl a0003974 <iproc>
a0003b50: e1a05000 mov r5, r0
rtems_semaphore_release (tty->osem);
a0003b54: e5940018 ldr r0, [r4, #24]
a0003b58: eb0004fe bl a0004f58 <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
a0003b5c: e1a00005 mov r0, r5
a0003b60: e8bd8030 pop {r4, r5, pc}
a0003b64: 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);
a0003b68: eaffff81 b a0003974 <iproc> <== NOT EXECUTED
a000574c <unmount>:
*/
int unmount(
const char *path
)
{
a000574c: e92d4070 push {r4, r5, r6, lr}
a0005750: e24dd018 sub sp, sp, #24
a0005754: 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 ) )
a0005758: eb002264 bl a000e0f0 <strlen>
a000575c: e28d4004 add r4, sp, #4
a0005760: e3a03001 mov r3, #1
a0005764: e1a01000 mov r1, r0
a0005768: e58d3000 str r3, [sp]
a000576c: e1a00005 mov r0, r5
a0005770: e3a02000 mov r2, #0
a0005774: e1a03004 mov r3, r4
a0005778: ebfff464 bl a0002910 <rtems_filesystem_evaluate_path>
a000577c: e3500000 cmp r0, #0
a0005780: 1a000040 bne a0005888 <unmount+0x13c>
return -1;
mt_entry = loc.mt_entry;
a0005784: 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 ){
a0005788: e59d3004 ldr r3, [sp, #4]
a000578c: e595201c ldr r2, [r5, #28]
a0005790: e1520003 cmp r2, r3
a0005794: 0a000004 beq a00057ac <unmount+0x60>
rtems_filesystem_freenode( &loc );
a0005798: e1a00004 mov r0, r4
a000579c: ebfff48b bl a00029d0 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
a00057a0: eb001cda bl a000cb10 <__errno>
a00057a4: e3a0300d mov r3, #13
a00057a8: ea000011 b a00057f4 <unmount+0xa8>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
a00057ac: e1a00004 mov r0, r4
a00057b0: ebfff486 bl a00029d0 <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 )
a00057b4: e59f30d8 ldr r3, [pc, #216] ; a0005894 <unmount+0x148>
a00057b8: e5933000 ldr r3, [r3]
a00057bc: e5933014 ldr r3, [r3, #20]
a00057c0: e1530005 cmp r3, r5
a00057c4: 0a000008 beq a00057ec <unmount+0xa0>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
a00057c8: e59f00c8 ldr r0, [pc, #200] ; a0005898 <unmount+0x14c>
a00057cc: e595102c ldr r1, [r5, #44] ; 0x2c
a00057d0: ebfff6b1 bl a000329c <rtems_filesystem_mount_iterate>
a00057d4: e3500000 cmp r0, #0
a00057d8: 1a000003 bne a00057ec <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 )
a00057dc: e1a00005 mov r0, r5
a00057e0: ebfff562 bl a0002d70 <rtems_libio_is_open_files_in_fs>
a00057e4: e3500001 cmp r0, #1
a00057e8: 1a000003 bne a00057fc <unmount+0xb0>
rtems_set_errno_and_return_minus_one( EBUSY );
a00057ec: eb001cc7 bl a000cb10 <__errno>
a00057f0: e3a03010 mov r3, #16
a00057f4: e5803000 str r3, [r0]
a00057f8: ea000022 b a0005888 <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 )
a00057fc: e5953014 ldr r3, [r5, #20]
a0005800: e1a00005 mov r0, r5
a0005804: e5933028 ldr r3, [r3, #40] ; 0x28
a0005808: e12fff33 blx r3
a000580c: e2506000 subs r6, r0, #0
a0005810: 1a00001c bne a0005888 <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){
a0005814: e5953028 ldr r3, [r5, #40] ; 0x28
a0005818: e1a00005 mov r0, r5
a000581c: e593302c ldr r3, [r3, #44] ; 0x2c
a0005820: e12fff33 blx r3
a0005824: e2504000 subs r4, r0, #0
a0005828: 0a000007 beq a000584c <unmount+0x100>
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
a000582c: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
a0005830: e1a00005 mov r0, r5 <== NOT EXECUTED
a0005834: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
a0005838: e12fff33 blx r3 <== NOT EXECUTED
a000583c: e3500000 cmp r0, #0 <== NOT EXECUTED
a0005840: 0a000010 beq a0005888 <unmount+0x13c> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
a0005844: e1a00006 mov r0, r6 <== NOT EXECUTED
a0005848: eb0003c9 bl a0006774 <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 );
a000584c: e59f6048 ldr r6, [pc, #72] ; a000589c <unmount+0x150>
a0005850: e1a01004 mov r1, r4
a0005854: e1a02004 mov r2, r4
a0005858: e5960000 ldr r0, [r6]
a000585c: eb000242 bl a000616c <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
a0005860: e1a00005 mov r0, r5
a0005864: eb000479 bl a0006a50 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
a0005868: e5960000 ldr r0, [r6]
a000586c: eb000284 bl a0006284 <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 );
a0005870: e2850008 add r0, r5, #8
a0005874: ebfff455 bl a00029d0 <rtems_filesystem_freenode>
free( mt_entry );
a0005878: e1a00005 mov r0, r5
a000587c: ebfff458 bl a00029e4 <free>
return 0;
a0005880: e1a00004 mov r0, r4
a0005884: ea000000 b a000588c <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;
a0005888: e3e00000 mvn r0, #0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
a000588c: e28dd018 add sp, sp, #24
a0005890: e8bd8070 pop {r4, r5, r6, pc}