RTEMS 4.11Annotated Report
Fri Jul 16 20:17:58 2010
300092a0 <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 ) {
300092a0: e5903000 ldr r3, [r0]
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
300092a4: e5902010 ldr r2, [r0, #16]
switch( node->type ) {
300092a8: e593304c ldr r3, [r3, #76] ; 0x4c
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
300092ac: e5922034 ldr r2, [r2, #52] ; 0x34
switch( node->type ) {
300092b0: e2433001 sub r3, r3, #1
300092b4: e3530006 cmp r3, #6
300092b8: 979ff103 ldrls pc, [pc, r3, lsl #2]
300092bc: ea000008 b 300092e4 <IMFS_Set_handlers+0x44> <== NOT EXECUTED
300092c0: 3000930c .word 0x3000930c <== NOT EXECUTED
300092c4: 3000931c .word 0x3000931c <== NOT EXECUTED
300092c8: 300092fc .word 0x300092fc <== NOT EXECUTED
300092cc: 300092fc .word 0x300092fc <== NOT EXECUTED
300092d0: 300092ec .word 0x300092ec <== NOT EXECUTED
300092d4: 300092ec .word 0x300092ec <== NOT EXECUTED
300092d8: 300092dc .word 0x300092dc <== NOT EXECUTED
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
300092dc: e5923010 ldr r3, [r2, #16]
300092e0: e5803008 str r3, [r0, #8]
break;
}
return 0;
}
300092e4: e3a00000 mov r0, #0
300092e8: e12fff1e bx lr
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
300092ec: e5923008 ldr r3, [r2, #8]
300092f0: e5803008 str r3, [r0, #8]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
300092f4: e3a00000 mov r0, #0
300092f8: e12fff1e bx lr
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
300092fc: e59f3028 ldr r3, [pc, #40] ; 3000932c <IMFS_Set_handlers+0x8c>
30009300: e5803008 str r3, [r0, #8]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
30009304: e3a00000 mov r0, #0
30009308: e12fff1e bx lr
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
3000930c: e592300c ldr r3, [r2, #12]
30009310: e5803008 str r3, [r0, #8]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
30009314: e3a00000 mov r0, #0
30009318: e12fff1e bx lr
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
3000931c: e59f300c ldr r3, [pc, #12] ; 30009330 <IMFS_Set_handlers+0x90>
30009320: e5803008 str r3, [r0, #8]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
30009324: e3a00000 mov r0, #0
30009328: e12fff1e bx lr
3000911c <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
3000911c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
30009120: e3500000 cmp r0, #0
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
30009124: e1a04001 mov r4, r1
30009128: e59d7018 ldr r7, [sp, #24]
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
3000912c: 01a08000 moveq r8, r0
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
30009130: 0a000026 beq 300091d0 <IMFS_create_node+0xb4>
return NULL;
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
30009134: e5901010 ldr r1, [r0, #16]
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
30009138: e3540007 cmp r4, #7
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
parent = parent_loc->node_access;
3000913c: e5906000 ldr r6, [r0]
fs_info = parent_loc->mt_entry->fs_info;
30009140: e5915034 ldr r5, [r1, #52] ; 0x34
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
30009144: 0a000023 beq 300091d8 <IMFS_create_node+0xbc>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
30009148: e59f1108 ldr r1, [pc, #264] ; 30009258 <IMFS_create_node+0x13c>
3000914c: e1a00004 mov r0, r4
30009150: e591c000 ldr ip, [r1]
30009154: e1a01002 mov r1, r2
30009158: e59c202c ldr r2, [ip, #44] ; 0x2c
3000915c: e1c32002 bic r2, r3, r2
30009160: ebffffce bl 300090a0 <IMFS_allocate_node>
if ( !node )
30009164: e2508000 subs r8, r0, #0
30009168: 0a000018 beq 300091d0 <IMFS_create_node+0xb4>
return NULL;
/*
* Set the type specific information
*/
switch (type) {
3000916c: e2444001 sub r4, r4, #1
30009170: e3540006 cmp r4, #6
30009174: 979ff104 ldrls pc, [pc, r4, lsl #2]
30009178: ea00000c b 300091b0 <IMFS_create_node+0x94> <== NOT EXECUTED
3000917c: 30009198 .word 0x30009198 <== NOT EXECUTED
30009180: 30009248 .word 0x30009248 <== NOT EXECUTED
30009184: 300091f4 .word 0x300091f4 <== NOT EXECUTED
30009188: 300091f4 .word 0x300091f4 <== NOT EXECUTED
3000918c: 30009218 .word 0x30009218 <== NOT EXECUTED
30009190: 30009200 .word 0x30009200 <== NOT EXECUTED
30009194: 3000923c .word 0x3000923c <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30009198: e2882054 add r2, r8, #84 ; 0x54
case IMFS_DIRECTORY:
rtems_chain_initialize_empty(&node->info.directory.Entries);
3000919c: e2883050 add r3, r8, #80 ; 0x50
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
300091a0: e5882050 str r2, [r8, #80] ; 0x50
the_chain->permanent_null = NULL;
300091a4: e3a02000 mov r2, #0
300091a8: e5882054 str r2, [r8, #84] ; 0x54
the_chain->last = _Chain_Head(the_chain);
300091ac: e5883058 str r3, [r8, #88] ; 0x58
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
300091b0: e5953004 ldr r3, [r5, #4]
300091b4: e2860050 add r0, r6, #80 ; 0x50
300091b8: e2833001 add r3, r3, #1
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
300091bc: e5886008 str r6, [r8, #8]
300091c0: e1a01008 mov r1, r8
node->st_ino = ++fs_info->ino_count;
300091c4: e5853004 str r3, [r5, #4]
300091c8: e5883038 str r3, [r8, #56] ; 0x38
300091cc: ebfff39e bl 3000604c <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
300091d0: e1a00008 mov r0, r8
300091d4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
300091d8: e5950010 ldr r0, [r5, #16]
300091dc: e59f1078 ldr r1, [pc, #120] ; 3000925c <IMFS_create_node+0x140>
300091e0: e1500001 cmp r0, r1
fs_info->fifo_handlers == &rtems_filesystem_handlers_default )
return NULL;
300091e4: 03a08000 moveq r8, #0
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
300091e8: 1affffd6 bne 30009148 <IMFS_create_node+0x2c>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
300091ec: e1a00008 mov r0, r8
300091f0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
case IMFS_HARD_LINK:
node->info.hard_link.link_node = info->hard_link.link_node;
break;
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
300091f4: e5973000 ldr r3, [r7]
300091f8: e5883050 str r3, [r8, #80] ; 0x50
break;
300091fc: eaffffeb b 300091b0 <IMFS_create_node+0x94>
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
30009200: e3a03000 mov r3, #0
30009204: e3a04000 mov r4, #0
30009208: e5883050 str r3, [r8, #80] ; 0x50
3000920c: e5884054 str r4, [r8, #84] ; 0x54
node->info.linearfile.direct = 0;
30009210: e3a03000 mov r3, #0
30009214: e5883058 str r3, [r8, #88] ; 0x58
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
node->info.file.indirect = 0;
30009218: e3a03000 mov r3, #0
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
3000921c: e3a01000 mov r1, #0
30009220: e3a02000 mov r2, #0
30009224: e5881050 str r1, [r8, #80] ; 0x50
30009228: e5882054 str r2, [r8, #84] ; 0x54
node->info.file.indirect = 0;
3000922c: e5883058 str r3, [r8, #88] ; 0x58
node->info.file.doubly_indirect = 0;
30009230: e588305c str r3, [r8, #92] ; 0x5c
node->info.file.triply_indirect = 0;
30009234: e5883060 str r3, [r8, #96] ; 0x60
break;
30009238: eaffffdc b 300091b0 <IMFS_create_node+0x94>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
3000923c: e3a03000 mov r3, #0
30009240: e5883050 str r3, [r8, #80] ; 0x50
break;
30009244: eaffffd9 b 300091b0 <IMFS_create_node+0x94>
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
30009248: e897000c ldm r7, {r2, r3}
3000924c: e5882050 str r2, [r8, #80] ; 0x50
node->info.device.minor = info->device.minor;
30009250: e5883054 str r3, [r8, #84] ; 0x54
break;
30009254: eaffffd5 b 300091b0 <IMFS_create_node+0x94>
300093b8 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
300093b8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
300093bc: e5937000 ldr r7, [r3]
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
300093c0: e24dd044 sub sp, sp, #68 ; 0x44
300093c4: e1a08003 mov r8, r3
300093c8: e58d0000 str r0, [sp]
300093cc: e1a04001 mov r4, r1
300093d0: e58d2004 str r2, [sp, #4]
int i = 0;
300093d4: e3a05000 mov r5, #0
300093d8: e28da008 add sl, sp, #8
* 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 );
300093dc: e59d2000 ldr r2, [sp]
300093e0: e1a01004 mov r1, r4
300093e4: e0820005 add r0, r2, r5
300093e8: e28d3040 add r3, sp, #64 ; 0x40
300093ec: e1a0200a mov r2, sl
300093f0: eb00020e bl 30009c30 <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
300093f4: e5989000 ldr r9, [r8]
* 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 );
300093f8: e1a0b000 mov fp, r0
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
300093fc: e3590000 cmp r9, #0
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
30009400: e59d6040 ldr r6, [sp, #64] ; 0x40
i += len;
if ( !pathloc->node_access )
30009404: 0a00004d beq 30009540 <IMFS_eval_path+0x188>
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
30009408: e3500000 cmp r0, #0
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
3000940c: e0664004 rsb r4, r6, r4
i += len;
30009410: e0855006 add r5, r5, r6
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
30009414: 1a00000f bne 30009458 <IMFS_eval_path+0xa0>
* 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 ) {
30009418: e599304c ldr r3, [r9, #76] ; 0x4c
3000941c: e3530001 cmp r3, #1
30009420: 0a000069 beq 300095cc <IMFS_eval_path+0x214>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
30009424: e1a00008 mov r0, r8
30009428: ebffff9c bl 300092a0 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
3000942c: e59d1004 ldr r1, [sp, #4]
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
30009430: e1a06000 mov r6, r0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
30009434: e1a00008 mov r0, r8
30009438: ebffffbd bl 30009334 <IMFS_evaluate_permission>
3000943c: e3500000 cmp r0, #0
30009440: 1a000036 bne 30009520 <IMFS_eval_path+0x168>
rtems_set_errno_and_return_minus_one( EACCES );
30009444: eb000e1b bl 3000ccb8 <__errno>
30009448: e3a0300d mov r3, #13
3000944c: e5803000 str r3, [r0]
30009450: e3e06000 mvn r6, #0
30009454: ea000031 b 30009520 <IMFS_eval_path+0x168>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
30009458: e597104c ldr r1, [r7, #76] ; 0x4c
3000945c: e3510001 cmp r1, #1
30009460: 0a000031 beq 3000952c <IMFS_eval_path+0x174>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
30009464: e35b0003 cmp fp, #3
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;
30009468: e1a07009 mov r7, r9
switch( type ) {
3000946c: 0a000006 beq 3000948c <IMFS_eval_path+0xd4>
30009470: e35b0004 cmp fp, #4
30009474: 0a000025 beq 30009510 <IMFS_eval_path+0x158>
30009478: e35b0002 cmp fp, #2
3000947c: 0a000013 beq 300094d0 <IMFS_eval_path+0x118>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
30009480: e35b0004 cmp fp, #4
30009484: 1affffd4 bne 300093dc <IMFS_eval_path+0x24>
30009488: eaffffe2 b 30009418 <IMFS_eval_path+0x60> <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
3000948c: e599304c ldr r3, [r9, #76] ; 0x4c
30009490: e3530003 cmp r3, #3
30009494: 0a00002e beq 30009554 <IMFS_eval_path+0x19c>
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
30009498: e3530004 cmp r3, #4
3000949c: 0a00006b beq 30009650 <IMFS_eval_path+0x298>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
300094a0: e3530001 cmp r3, #1
300094a4: 1a00004d bne 300095e0 <IMFS_eval_path+0x228>
/*
* 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 ) {
300094a8: e597e05c ldr lr, [r7, #92] ; 0x5c
300094ac: e35e0000 cmp lr, #0
300094b0: 1a00004f bne 300095f4 <IMFS_eval_path+0x23c>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
300094b4: e1a00007 mov r0, r7
300094b8: e1a0100a mov r1, sl
300094bc: eb0001b4 bl 30009b94 <IMFS_find_match_in_dir>
if ( !node )
300094c0: e2507000 subs r7, r0, #0
300094c4: 0a00001d beq 30009540 <IMFS_eval_path+0x188>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
300094c8: e5887000 str r7, [r8]
300094cc: eaffffc2 b 300093dc <IMFS_eval_path+0x24>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
300094d0: e59fe19c ldr lr, [pc, #412] ; 30009674 <IMFS_eval_path+0x2bc>
300094d4: e59e3000 ldr r3, [lr]
300094d8: e5933018 ldr r3, [r3, #24]
300094dc: e1590003 cmp r9, r3
300094e0: 0affffbd beq 300093dc <IMFS_eval_path+0x24>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
300094e4: e598e010 ldr lr, [r8, #16]
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
300094e8: e59e301c ldr r3, [lr, #28]
300094ec: e1590003 cmp r9, r3
300094f0: 0a00001f beq 30009574 <IMFS_eval_path+0x1bc>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
300094f4: e5997008 ldr r7, [r9, #8]
300094f8: e3570000 cmp r7, #0
300094fc: 1afffff1 bne 300094c8 <IMFS_eval_path+0x110>
rtems_set_errno_and_return_minus_one( ENOENT );
30009500: eb000dec bl 3000ccb8 <__errno>
30009504: e3e06000 mvn r6, #0
30009508: e580b000 str fp, [r0]
3000950c: ea000003 b 30009520 <IMFS_eval_path+0x168>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
30009510: eb000de8 bl 3000ccb8 <__errno>
30009514: e3a0305b mov r3, #91 ; 0x5b
30009518: e5803000 str r3, [r0]
3000951c: e3e06000 mvn r6, #0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
30009520: e1a00006 mov r0, r6
30009524: e28dd044 add sp, sp, #68 ; 0x44
30009528: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
3000952c: e1a00008 mov r0, r8
30009530: ebffff7f bl 30009334 <IMFS_evaluate_permission>
30009534: e3500000 cmp r0, #0
30009538: 1affffc9 bne 30009464 <IMFS_eval_path+0xac>
3000953c: eaffffc0 b 30009444 <IMFS_eval_path+0x8c>
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
30009540: eb000ddc bl 3000ccb8 <__errno>
30009544: e3a03002 mov r3, #2
30009548: e5803000 str r3, [r0]
3000954c: e3e06000 mvn r6, #0
30009550: eafffff2 b 30009520 <IMFS_eval_path+0x168>
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
30009554: e1a00008 mov r0, r8
30009558: e3a01000 mov r1, #0
3000955c: ebffff7c bl 30009354 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
30009560: e5987000 ldr r7, [r8]
if ( !node )
30009564: e3570000 cmp r7, #0
30009568: 0a00001c beq 300095e0 <IMFS_eval_path+0x228>
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
3000956c: e597304c ldr r3, [r7, #76] ; 0x4c
30009570: eaffffca b 300094a0 <IMFS_eval_path+0xe8>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
30009574: e28ee008 add lr, lr, #8
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
30009578: e28d702c add r7, sp, #44 ; 0x2c
3000957c: e8be000f ldm lr!, {r0, r1, r2, r3}
30009580: e8a7000f stmia r7!, {r0, r1, r2, r3}
*pathloc = newloc;
30009584: e28dc02c add ip, sp, #44 ; 0x2c
30009588: e8bc000f ldm ip!, {r0, r1, r2, r3}
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
3000958c: e59ec000 ldr ip, [lr]
*pathloc = newloc;
30009590: e1a0e008 mov lr, r8
30009594: e8ae000f stmia lr!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
30009598: e59d2000 ldr r2, [sp]
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
3000959c: e58ec000 str ip, [lr]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
300095a0: e0660005 rsb r0, r6, r5
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
300095a4: e587c000 str ip, [r7]
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
300095a8: e0820000 add r0, r2, r0
300095ac: e0841006 add r1, r4, r6
300095b0: e598c00c ldr ip, [r8, #12]
300095b4: e59d2004 ldr r2, [sp, #4]
300095b8: e1a03008 mov r3, r8
300095bc: e1a0e00f mov lr, pc
300095c0: e59cf000 ldr pc, [ip]
300095c4: e1a06000 mov r6, r0
300095c8: eaffffd4 b 30009520 <IMFS_eval_path+0x168>
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
300095cc: e599e05c ldr lr, [r9, #92] ; 0x5c
300095d0: e35e0000 cmp lr, #0
300095d4: 0affff92 beq 30009424 <IMFS_eval_path+0x6c>
newloc = node->info.directory.mt_fs->mt_fs_root;
300095d8: e28ee01c add lr, lr, #28
300095dc: eaffffe5 b 30009578 <IMFS_eval_path+0x1c0>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
300095e0: eb000db4 bl 3000ccb8 <__errno>
300095e4: e3a03014 mov r3, #20
300095e8: e5803000 str r3, [r0]
300095ec: e3e06000 mvn r6, #0
300095f0: eaffffca b 30009520 <IMFS_eval_path+0x168>
* 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 ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
300095f4: e28ee01c add lr, lr, #28
300095f8: e28d602c add r6, sp, #44 ; 0x2c
300095fc: e8be000f ldm lr!, {r0, r1, r2, r3}
30009600: e8a6000f stmia r6!, {r0, r1, r2, r3}
*pathloc = newloc;
30009604: e28dc02c add ip, sp, #44 ; 0x2c
30009608: e8bc000f ldm ip!, {r0, r1, r2, r3}
* 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 ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
3000960c: e59ec000 ldr ip, [lr]
*pathloc = newloc;
30009610: e1a0e008 mov lr, r8
30009614: e8ae000f stmia lr!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
30009618: e59d1040 ldr r1, [sp, #64] ; 0x40
3000961c: e59d2000 ldr r2, [sp]
* 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;
30009620: e58ec000 str ip, [lr]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
30009624: e0610005 rsb r0, r1, r5
* 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 ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
30009628: e586c000 str ip, [r6]
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
3000962c: e0820000 add r0, r2, r0
30009630: e598c00c ldr ip, [r8, #12]
30009634: e0841001 add r1, r4, r1
30009638: e59d2004 ldr r2, [sp, #4]
3000963c: e1a03008 mov r3, r8
30009640: e1a0e00f mov lr, pc
30009644: e59cf000 ldr pc, [ip]
30009648: e1a06000 mov r6, r0
3000964c: eaffffb3 b 30009520 <IMFS_eval_path+0x168>
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
30009650: e1a00008 mov r0, r8
30009654: e3a01000 mov r1, #0
30009658: eb000006 bl 30009678 <IMFS_evaluate_sym_link>
node = pathloc->node_access;
if ( result == -1 )
3000965c: e3700001 cmn r0, #1
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
30009660: e1a06000 mov r6, r0
node = pathloc->node_access;
30009664: e5987000 ldr r7, [r8]
if ( result == -1 )
30009668: 0affffac beq 30009520 <IMFS_eval_path+0x168>
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
3000966c: e597304c ldr r3, [r7, #76] ; 0x4c
30009670: eaffff8a b 300094a0 <IMFS_eval_path+0xe8>
3000980c <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 */
)
{
3000980c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30009810: e24dd044 sub sp, sp, #68 ; 0x44
30009814: e1a06001 mov r6, r1
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
30009818: e5915000 ldr r5, [r1]
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
3000981c: e88d0005 stm sp, {r0, r2}
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
30009820: eb001114 bl 3000dc78 <strlen>
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
30009824: e3a07000 mov r7, #0
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
30009828: e1a04000 mov r4, r0
3000982c: e28da008 add sl, sp, #8
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
30009830: e59d2000 ldr r2, [sp]
30009834: e1a01004 mov r1, r4
30009838: e0820007 add r0, r2, r7
3000983c: e28d3040 add r3, sp, #64 ; 0x40
30009840: e1a0200a mov r2, sl
30009844: eb0000f9 bl 30009c30 <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
30009848: e5969000 ldr r9, [r6]
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
3000984c: e59d8040 ldr r8, [sp, #64] ; 0x40
i += len;
if ( !pathloc->node_access )
30009850: e3590000 cmp r9, #0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
30009854: e1a0b000 mov fp, r0
pathlen -= len;
30009858: e0684004 rsb r4, r8, r4
i += len;
if ( !pathloc->node_access )
3000985c: 0a000035 beq 30009938 <IMFS_evaluate_for_make+0x12c>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
30009860: e3500000 cmp r0, #0
30009864: 1a000006 bne 30009884 <IMFS_evaluate_for_make+0x78>
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
30009868: eb000d12 bl 3000ccb8 <__errno>
3000986c: e3a03011 mov r3, #17
30009870: e5803000 str r3, [r0]
30009874: e3e05000 mvn r5, #0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
30009878: e1a00005 mov r0, r5
3000987c: e28dd044 add sp, sp, #68 ; 0x44
30009880: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
30009884: e595104c ldr r1, [r5, #76] ; 0x4c
30009888: e3510001 cmp r1, #1
3000988c: 0a000033 beq 30009960 <IMFS_evaluate_for_make+0x154>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
30009890: e0877008 add r7, r7, r8
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
30009894: e1a05009 mov r5, r9
switch( type ) {
30009898: e35b0004 cmp fp, #4
3000989c: 979ff10b ldrls pc, [pc, fp, lsl #2]
300098a0: eaffffe2 b 30009830 <IMFS_evaluate_for_make+0x24> <== NOT EXECUTED
300098a4: 30009868 .word 0x30009868 <== NOT EXECUTED
300098a8: 30009830 .word 0x30009830 <== NOT EXECUTED
300098ac: 30009908 .word 0x30009908 <== NOT EXECUTED
300098b0: 300098b8 .word 0x300098b8 <== NOT EXECUTED
300098b4: 3000994c .word 0x3000994c <== NOT EXECUTED
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
300098b8: e599304c ldr r3, [r9, #76] ; 0x4c
300098bc: e3530003 cmp r3, #3
300098c0: 0a000076 beq 30009aa0 <IMFS_evaluate_for_make+0x294>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
300098c4: e3530004 cmp r3, #4
300098c8: 0a000074 beq 30009aa0 <IMFS_evaluate_for_make+0x294>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
300098cc: e3550000 cmp r5, #0
300098d0: 0a000060 beq 30009a58 <IMFS_evaluate_for_make+0x24c>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
300098d4: e595304c ldr r3, [r5, #76] ; 0x4c
300098d8: e3530001 cmp r3, #1
300098dc: 1a00005d bne 30009a58 <IMFS_evaluate_for_make+0x24c>
/*
* 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 ) {
300098e0: e595c05c ldr ip, [r5, #92] ; 0x5c
300098e4: e35c0000 cmp ip, #0
300098e8: 1a00005f bne 30009a6c <IMFS_evaluate_for_make+0x260>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
300098ec: e1a00005 mov r0, r5
300098f0: e1a0100a mov r1, sl
300098f4: eb0000a6 bl 30009b94 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
300098f8: e2505000 subs r5, r0, #0
300098fc: 0a000020 beq 30009984 <IMFS_evaluate_for_make+0x178>
done = true;
else
pathloc->node_access = node;
30009900: e5865000 str r5, [r6]
30009904: eaffffc9 b 30009830 <IMFS_evaluate_for_make+0x24>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
30009908: e59fe1b0 ldr lr, [pc, #432] ; 30009ac0 <IMFS_evaluate_for_make+0x2b4>
3000990c: e59e3000 ldr r3, [lr]
30009910: e5933018 ldr r3, [r3, #24]
30009914: e1590003 cmp r9, r3
30009918: 0affffc4 beq 30009830 <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){
3000991c: e596e010 ldr lr, [r6, #16]
30009920: e59e301c ldr r3, [lr, #28]
30009924: e1590003 cmp r9, r3
30009928: 0a000028 beq 300099d0 <IMFS_evaluate_for_make+0x1c4>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
3000992c: e5995008 ldr r5, [r9, #8]
30009930: e3550000 cmp r5, #0
30009934: 1afffff1 bne 30009900 <IMFS_evaluate_for_make+0xf4>
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
rtems_set_errno_and_return_minus_one( ENOENT );
30009938: eb000cde bl 3000ccb8 <__errno>
3000993c: e3a03002 mov r3, #2
30009940: e5803000 str r3, [r0]
30009944: e3e05000 mvn r5, #0
30009948: eaffffca b 30009878 <IMFS_evaluate_for_make+0x6c>
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
3000994c: eb000cd9 bl 3000ccb8 <__errno>
30009950: e3a0305b mov r3, #91 ; 0x5b
30009954: e5803000 str r3, [r0]
30009958: e3e05000 mvn r5, #0
3000995c: eaffffc5 b 30009878 <IMFS_evaluate_for_make+0x6c>
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
30009960: e1a00006 mov r0, r6
30009964: ebfffe72 bl 30009334 <IMFS_evaluate_permission>
30009968: e3500000 cmp r0, #0
3000996c: 1affffc7 bne 30009890 <IMFS_evaluate_for_make+0x84>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
30009970: eb000cd0 bl 3000ccb8 <__errno>
30009974: e3a0300d mov r3, #13
30009978: e5803000 str r3, [r0]
3000997c: e3e05000 mvn r5, #0
30009980: eaffffbc b 30009878 <IMFS_evaluate_for_make+0x6c>
/*
* 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++) {
30009984: e59d3000 ldr r3, [sp]
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
30009988: e59de000 ldr lr, [sp]
/*
* 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++) {
3000998c: e0834007 add r4, r3, r7
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
30009990: e59d3040 ldr r3, [sp, #64] ; 0x40
30009994: e59d2004 ldr r2, [sp, #4]
30009998: e0633007 rsb r3, r3, r7
3000999c: e08e3003 add r3, lr, r3
300099a0: e5823000 str r3, [r2]
/*
* 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++) {
300099a4: e7de0007 ldrb r0, [lr, r7]
300099a8: e3500000 cmp r0, #0
300099ac: 1a000003 bne 300099c0 <IMFS_evaluate_for_make+0x1b4>
300099b0: ea00001b b 30009a24 <IMFS_evaluate_for_make+0x218>
300099b4: e5f40001 ldrb r0, [r4, #1]!
300099b8: e3500000 cmp r0, #0
300099bc: 0a000018 beq 30009a24 <IMFS_evaluate_for_make+0x218>
if ( !IMFS_is_separator( path[ i ] ) )
300099c0: ebffe566 bl 30002f60 <rtems_filesystem_is_separator>
300099c4: e3500000 cmp r0, #0
300099c8: 1afffff9 bne 300099b4 <IMFS_evaluate_for_make+0x1a8>
300099cc: eaffffd9 b 30009938 <IMFS_evaluate_for_make+0x12c>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
300099d0: e28ee008 add lr, lr, #8
300099d4: e28d402c add r4, sp, #44 ; 0x2c
300099d8: e8be000f ldm lr!, {r0, r1, r2, r3}
300099dc: e8a4000f stmia r4!, {r0, r1, r2, r3}
*pathloc = newloc;
300099e0: e28dc02c add ip, sp, #44 ; 0x2c
300099e4: e8bc000f ldm ip!, {r0, r1, r2, r3}
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
300099e8: e59ec000 ldr ip, [lr]
*pathloc = newloc;
300099ec: e1a0e006 mov lr, r6
300099f0: e8ae000f stmia lr!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
300099f4: e0680007 rsb r0, r8, r7
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
300099f8: e58ec000 str ip, [lr]
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
300099fc: e59d2000 ldr r2, [sp]
* 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 ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
30009a00: e584c000 str ip, [r4]
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
30009a04: e0820000 add r0, r2, r0
30009a08: e596300c ldr r3, [r6, #12]
30009a0c: e1a01006 mov r1, r6
30009a10: e59d2004 ldr r2, [sp, #4]
30009a14: e1a0e00f mov lr, pc
30009a18: e593f004 ldr pc, [r3, #4]
30009a1c: e1a05000 mov r5, r0
30009a20: eaffff94 b 30009878 <IMFS_evaluate_for_make+0x6c>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
30009a24: e1a00006 mov r0, r6
30009a28: ebfffe1c bl 300092a0 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
30009a2c: e5963000 ldr r3, [r6]
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
30009a30: e1a05000 mov r5, r0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
30009a34: e593304c ldr r3, [r3, #76] ; 0x4c
30009a38: e3530001 cmp r3, #1
30009a3c: 1a000005 bne 30009a58 <IMFS_evaluate_for_make+0x24c>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
30009a40: e1a00006 mov r0, r6
30009a44: e3a01003 mov r1, #3
30009a48: ebfffe39 bl 30009334 <IMFS_evaluate_permission>
30009a4c: e3500000 cmp r0, #0
30009a50: 1affff88 bne 30009878 <IMFS_evaluate_for_make+0x6c>
30009a54: eaffffc5 b 30009970 <IMFS_evaluate_for_make+0x164>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
30009a58: eb000c96 bl 3000ccb8 <__errno>
30009a5c: e3a03014 mov r3, #20
30009a60: e5803000 str r3, [r0]
30009a64: e3e05000 mvn r5, #0
30009a68: eaffff82 b 30009878 <IMFS_evaluate_for_make+0x6c>
* 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 ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
30009a6c: e28cc01c add ip, ip, #28
30009a70: e28d402c add r4, sp, #44 ; 0x2c
30009a74: e8bc000f ldm ip!, {r0, r1, r2, r3}
30009a78: e8a4000f stmia r4!, {r0, r1, r2, r3}
*pathloc = newloc;
30009a7c: e28de02c add lr, sp, #44 ; 0x2c
30009a80: e8be000f ldm lr!, {r0, r1, r2, r3}
30009a84: e1a0e006 mov lr, r6
* 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 ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
30009a88: e59cc000 ldr ip, [ip]
*pathloc = newloc;
30009a8c: e8ae000f stmia lr!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
30009a90: e59d0040 ldr r0, [sp, #64] ; 0x40
* 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;
30009a94: e58ec000 str ip, [lr]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
30009a98: e0600007 rsb r0, r0, r7
30009a9c: eaffffd6 b 300099fc <IMFS_evaluate_for_make+0x1f0>
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
30009aa0: e1a00006 mov r0, r6
30009aa4: e3a01000 mov r1, #0
30009aa8: ebffff22 bl 30009738 <IMFS_evaluate_link>
if ( result == -1 )
30009aac: e3700001 cmn r0, #1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
30009ab0: e1a05000 mov r5, r0
if ( result == -1 )
30009ab4: 0affff6f beq 30009878 <IMFS_evaluate_for_make+0x6c>
30009ab8: e5965000 ldr r5, [r6]
30009abc: eaffff82 b 300098cc <IMFS_evaluate_for_make+0xc0>
30009354 <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
IMFS_jnode_t *jnode = node->node_access;
30009354: e5903000 ldr r3, [r0]
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009358: e92d4030 push {r4, r5, lr}
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
3000935c: e593204c ldr r2, [r3, #76] ; 0x4c
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009360: e1a04000 mov r4, r0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
30009364: e3520003 cmp r2, #3
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009368: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
3000936c: 1a00000e bne 300093ac <IMFS_evaluate_hard_link+0x58>
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
30009370: e5933050 ldr r3, [r3, #80] ; 0x50
30009374: e5803000 str r3, [r0]
IMFS_Set_handlers( node );
30009378: ebffffc8 bl 300092a0 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
3000937c: e1a00004 mov r0, r4
30009380: e1a01005 mov r1, r5
30009384: ebffffea bl 30009334 <IMFS_evaluate_permission>
30009388: e3500000 cmp r0, #0
3000938c: 0a000001 beq 30009398 <IMFS_evaluate_hard_link+0x44>
rtems_set_errno_and_return_minus_one( EACCES );
return result;
30009390: e3a00000 mov r0, #0
}
30009394: e8bd8030 pop {r4, r5, pc}
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
30009398: eb000e46 bl 3000ccb8 <__errno> <== NOT EXECUTED
3000939c: e3a0300d mov r3, #13 <== NOT EXECUTED
300093a0: e5803000 str r3, [r0] <== NOT EXECUTED
300093a4: e3e00000 mvn r0, #0 <== NOT EXECUTED
300093a8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
300093ac: e59f0000 ldr r0, [pc, #0] ; 300093b4 <IMFS_evaluate_hard_link+0x60><== NOT EXECUTED
300093b0: ebfff26d bl 30005d6c <rtems_fatal_error_occurred> <== NOT EXECUTED
30009678 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009678: e92d4070 push {r4, r5, r6, lr}
IMFS_jnode_t *jnode = node->node_access;
3000967c: e5906000 ldr r6, [r0]
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009680: e24dd004 sub sp, sp, #4
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
30009684: e596304c ldr r3, [r6, #76] ; 0x4c
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009688: e1a04000 mov r4, r0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
3000968c: e3530004 cmp r3, #4
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009690: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
30009694: 1a000023 bne 30009728 <IMFS_evaluate_sym_link+0xb0>
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
30009698: e5963008 ldr r3, [r6, #8]
3000969c: e3530000 cmp r3, #0
300096a0: 0a00001e beq 30009720 <IMFS_evaluate_sym_link+0xa8>
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
rtems_filesystem_get_sym_start_loc(
300096a4: e5960050 ldr r0, [r6, #80] ; 0x50
300096a8: e1a0100d mov r1, sp
300096ac: e1a02004 mov r2, r4
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
300096b0: e5843000 str r3, [r4]
rtems_filesystem_get_sym_start_loc(
300096b4: eb0003c0 bl 3000a5bc <rtems_filesystem_get_sym_start_loc>
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
300096b8: e59d3000 ldr r3, [sp]
300096bc: e5966050 ldr r6, [r6, #80] ; 0x50
300096c0: e0866003 add r6, r6, r3
300096c4: e1a00006 mov r0, r6
300096c8: eb00116a bl 3000dc78 <strlen>
300096cc: e1a02005 mov r2, r5
300096d0: e1a01000 mov r1, r0
300096d4: e1a03004 mov r3, r4
300096d8: e1a00006 mov r0, r6
300096dc: ebffff35 bl 300093b8 <IMFS_eval_path>
300096e0: e1a06000 mov r6, r0
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
300096e4: e1a00004 mov r0, r4
300096e8: ebfffeec bl 300092a0 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
300096ec: e1a00004 mov r0, r4
300096f0: e1a01005 mov r1, r5
300096f4: ebffff0e bl 30009334 <IMFS_evaluate_permission>
300096f8: e3500000 cmp r0, #0
300096fc: 0a000002 beq 3000970c <IMFS_evaluate_sym_link+0x94>
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
30009700: e1a00006 mov r0, r6
30009704: e28dd004 add sp, sp, #4
30009708: e8bd8070 pop {r4, r5, r6, pc}
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
3000970c: eb000d69 bl 3000ccb8 <__errno> <== NOT EXECUTED
30009710: e3a0300d mov r3, #13 <== NOT EXECUTED
30009714: e5803000 str r3, [r0] <== NOT EXECUTED
30009718: e3e06000 mvn r6, #0 <== NOT EXECUTED
3000971c: eafffff7 b 30009700 <IMFS_evaluate_sym_link+0x88> <== NOT EXECUTED
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
30009720: e59f0008 ldr r0, [pc, #8] ; 30009730 <IMFS_evaluate_sym_link+0xb8><== NOT EXECUTED
30009724: ebfff190 bl 30005d6c <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
30009728: e59f0004 ldr r0, [pc, #4] ; 30009734 <IMFS_evaluate_sym_link+0xbc><== NOT EXECUTED
3000972c: ebfff18e bl 30005d6c <rtems_fatal_error_occurred> <== NOT EXECUTED
3000252c <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
3000252c: e92d4070 push {r4, r5, r6, lr}
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
30002530: e5905018 ldr r5, [r0, #24]
int err = pipe_release(&JNODE2PIPE(jnode), iop);
30002534: e1a01000 mov r1, r0
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
30002538: e1a04000 mov r4, r0
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
3000253c: e2850050 add r0, r5, #80 ; 0x50
30002540: eb0024cd bl 3000b87c <pipe_release>
if (err == 0) {
30002544: e2506000 subs r6, r0, #0
30002548: 0a000002 beq 30002558 <IMFS_fifo_close+0x2c>
iop->flags &= ~LIBIO_FLAGS_OPEN;
IMFS_check_node_remove(jnode);
}
IMFS_FIFO_RETURN(err);
3000254c: ba000008 blt 30002574 <IMFS_fifo_close+0x48> <== NOT EXECUTED
}
30002550: e1a00006 mov r0, r6 <== NOT EXECUTED
30002554: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (err == 0) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
30002558: e5943014 ldr r3, [r4, #20]
IMFS_check_node_remove(jnode);
3000255c: e1a00005 mov r0, r5
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (err == 0) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
30002560: e3c33c01 bic r3, r3, #256 ; 0x100
30002564: e5843014 str r3, [r4, #20]
IMFS_check_node_remove(jnode);
30002568: eb0001a0 bl 30002bf0 <IMFS_check_node_remove>
}
IMFS_FIFO_RETURN(err);
}
3000256c: e1a00006 mov r0, r6
30002570: e8bd8070 pop {r4, r5, r6, pc}
if (err == 0) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
IMFS_check_node_remove(jnode);
}
IMFS_FIFO_RETURN(err);
30002574: eb002fcd bl 3000e4b0 <__errno> <== NOT EXECUTED
30002578: e2666000 rsb r6, r6, #0 <== NOT EXECUTED
3000257c: e5806000 str r6, [r0] <== NOT EXECUTED
30002580: e3e06000 mvn r6, #0 <== NOT EXECUTED
30002584: eafffff1 b 30002550 <IMFS_fifo_close+0x24> <== NOT EXECUTED
30009ac4 <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
)
{
30009ac4: 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;
30009ac8: e1a0c000 mov ip, r0
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
30009acc: 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;
30009ad0: e5bc401c ldr r4, [ip, #28]!
loc = temp_mt_entry->mt_fs_root;
30009ad4: e1a0600d mov r6, sp
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
30009ad8: e1a0e000 mov lr, 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;
30009adc: e8bc000f ldm ip!, {r0, r1, r2, r3}
30009ae0: e8a6000f stmia r6!, {r0, r1, r2, r3}
30009ae4: e59c2000 ldr r2, [ip]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
30009ae8: e3a03000 mov r3, #0
* 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;
30009aec: e1a0500d mov r5, sp
30009af0: e5862000 str r2, [r6]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
30009af4: e58e301c str r3, [lr, #28]
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
30009af8: e1a0000d mov r0, sp
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
30009afc: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode;
30009b00: e58d4000 str r4, [sp]
IMFS_Set_handlers( &loc );
30009b04: ebfffde5 bl 300092a0 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
30009b08: e594304c ldr r3, [r4, #76] ; 0x4c
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30009b0c: e2842054 add r2, r4, #84 ; 0x54
30009b10: e3530001 cmp r3, #1
30009b14: 1a000010 bne 30009b5c <IMFS_fsunmount+0x98>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
30009b18: e5943050 ldr r3, [r4, #80] ; 0x50
30009b1c: e1530002 cmp r3, r2
30009b20: 0a000014 beq 30009b78 <IMFS_fsunmount+0xb4>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
30009b24: e3540000 cmp r4, #0
30009b28: 0a000008 beq 30009b50 <IMFS_fsunmount+0x8c>
if ( jnode->type == IMFS_DIRECTORY ) {
30009b2c: e594304c ldr r3, [r4, #76] ; 0x4c
30009b30: e3530001 cmp r3, #1
30009b34: 1affffef bne 30009af8 <IMFS_fsunmount+0x34>
if ( jnode_has_children( jnode ) )
30009b38: e5943050 ldr r3, [r4, #80] ; 0x50
30009b3c: e2842054 add r2, r4, #84 ; 0x54
30009b40: e1530002 cmp r3, r2
30009b44: 0affffeb beq 30009af8 <IMFS_fsunmount+0x34>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
30009b48: e2534000 subs r4, r3, #0
30009b4c: 1affffe9 bne 30009af8 <IMFS_fsunmount+0x34>
return 0;
30009b50: e1a00004 mov r0, r4
}
30009b54: e28dd014 add sp, sp, #20
30009b58: e8bd8070 pop {r4, r5, r6, pc}
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
result = IMFS_unlink( NULL, &loc );
30009b5c: e1a0100d mov r1, sp
30009b60: e3a00000 mov r0, #0
30009b64: ebffdff5 bl 30001b40 <IMFS_unlink>
if (result != 0)
30009b68: e3500000 cmp r0, #0
30009b6c: 1a000006 bne 30009b8c <IMFS_fsunmount+0xc8>
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
30009b70: e1a04006 mov r4, r6
30009b74: eaffffea b 30009b24 <IMFS_fsunmount+0x60>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
30009b78: e3a00000 mov r0, #0
30009b7c: e1a0100d mov r1, sp
30009b80: ebffdfee bl 30001b40 <IMFS_unlink>
if (result != 0)
30009b84: e3500000 cmp r0, #0
30009b88: 0afffff8 beq 30009b70 <IMFS_fsunmount+0xac>
return -1;
30009b8c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30009b90: eaffffef b 30009b54 <IMFS_fsunmount+0x90> <== NOT EXECUTED
30001700 <IMFS_initialize_support>:
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
30001700: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
30001704: e1a04000 mov r4, r0
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
30001708: e59f00d4 ldr r0, [pc, #212] ; 300017e4 <IMFS_initialize_support+0xe4>
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
3000170c: e1a08001 mov r8, r1
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
30001710: e5900000 ldr r0, [r0]
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
30001714: e1a0a002 mov sl, r2
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
30001718: e3500010 cmp r0, #16
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
3000171c: e1a07003 mov r7, r3
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
30001720: 0a000007 beq 30001744 <IMFS_initialize_support+0x44>
30001724: e3a02005 mov r2, #5
30001728: e3a03020 mov r3, #32
3000172c: e1500003 cmp r0, r3
30001730: 0a000003 beq 30001744 <IMFS_initialize_support+0x44>
30001734: e2522001 subs r2, r2, #1
30001738: e1a03083 lsl r3, r3, #1
3000173c: 1afffffa bne 3000172c <IMFS_initialize_support+0x2c>
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
30001740: e3a00080 mov r0, #128 ; 0x80 <== NOT EXECUTED
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
30001744: e59f509c ldr r5, [pc, #156] ; 300017e8 <IMFS_initialize_support+0xe8>
30001748: e5850000 str r0, [r5]
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
3000174c: eb001ec3 bl 30009260 <IMFS_create_root_node>
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
30001750: e59fe094 ldr lr, [pc, #148] ; 300017ec <IMFS_initialize_support+0xec>
30001754: e284c038 add ip, r4, #56 ; 0x38
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
30001758: e1a06000 mov r6, r0
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
3000175c: e8be000f ldm lr!, {r0, r1, r2, r3}
30001760: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001764: e8be000f ldm lr!, {r0, r1, r2, r3}
30001768: e8ac000f stmia ip!, {r0, r1, r2, r3}
3000176c: e89e000f ldm lr, {r0, r1, r2, r3}
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
30001770: e584601c str r6, [r4, #28]
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
30001774: e88c000f stm ip, {r0, r1, r2, r3}
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
30001778: e5847024 str r7, [r4, #36] ; 0x24
temp_mt_entry->mt_fs_root.ops = op_table;
3000177c: e5848028 str r8, [r4, #40] ; 0x28
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
30001780: e3a00001 mov r0, #1
30001784: e3a01014 mov r1, #20
30001788: eb0001ba bl 30001e78 <calloc>
if ( !fs_info ) {
3000178c: e3500000 cmp r0, #0
30001790: 0a00000c beq 300017c8 <IMFS_initialize_support+0xc8>
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
30001794: e5952004 ldr r2, [r5, #4]
fs_info->ino_count = 1;
30001798: e3a03001 mov r3, #1
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
3000179c: e5840034 str r0, [r4, #52] ; 0x34
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
300017a0: e0821003 add r1, r2, r3
300017a4: e5802000 str r2, [r0]
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
fs_info->fifo_handlers = fifo_handlers;
300017a8: e59d201c ldr r2, [sp, #28]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
300017ac: e9800408 stmib r0, {r3, sl}
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
300017b0: e580700c str r7, [r0, #12]
fs_info->fifo_handlers = fifo_handlers;
300017b4: e5802010 str r2, [r0, #16]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
300017b8: e5851004 str r1, [r5, #4]
fs_info->fifo_handlers = fifo_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
300017bc: e3a00000 mov r0, #0
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
fs_info->fifo_handlers = fifo_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
300017c0: e5863038 str r3, [r6, #56] ; 0x38
return 0;
}
300017c4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
300017c8: e1a00006 mov r0, r6 <== NOT EXECUTED
300017cc: eb000235 bl 300020a8 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
300017d0: eb002d38 bl 3000ccb8 <__errno> <== NOT EXECUTED
300017d4: e3a0300c mov r3, #12 <== NOT EXECUTED
300017d8: e5803000 str r3, [r0] <== NOT EXECUTED
300017dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
300017e0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
300017f0 <IMFS_link>:
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
300017f0: e92d4070 push {r4, r5, r6, lr}
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
300017f4: e5903000 ldr r3, [r0]
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
300017f8: e1a05001 mov r5, r1
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
300017fc: e1d313b4 ldrh r1, [r3, #52] ; 0x34
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
30001800: e24dd048 sub sp, sp, #72 ; 0x48
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
30001804: e3510007 cmp r1, #7
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
30001808: e1a06002 mov r6, r2
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
3000180c: e58d3028 str r3, [sp, #40] ; 0x28
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
30001810: 8a00001d bhi 3000188c <IMFS_link+0x9c>
rtems_set_errno_and_return_minus_one( EMLINK );
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
30001814: e1a00002 mov r0, r2
30001818: eb003116 bl 3000dc78 <strlen>
3000181c: e28d4004 add r4, sp, #4
30001820: e1a01000 mov r1, r0
30001824: e1a02004 mov r2, r4
30001828: e28d3044 add r3, sp, #68 ; 0x44
3000182c: e1a00006 mov r0, r6
30001830: eb0020fe bl 30009c30 <IMFS_get_token>
new_node = IMFS_create_node(
parent_loc,
IMFS_HARD_LINK,
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
30001834: e28d3028 add r3, sp, #40 ; 0x28
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
30001838: e58d3000 str r3, [sp]
3000183c: e3a01003 mov r1, #3
30001840: e1a00005 mov r0, r5
30001844: e1a02004 mov r2, r4
30001848: e59f3064 ldr r3, [pc, #100] ; 300018b4 <IMFS_link+0xc4>
3000184c: eb001e32 bl 3000911c <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
30001850: e3500000 cmp r0, #0
30001854: 0a000011 beq 300018a0 <IMFS_link+0xb0>
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
30001858: e59d3028 ldr r3, [sp, #40] ; 0x28
IMFS_update_ctime( info.hard_link.link_node );
3000185c: e28d003c add r0, sp, #60 ; 0x3c
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
30001860: e1d323b4 ldrh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
30001864: e3a01000 mov r1, #0
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
30001868: e2822001 add r2, r2, #1
3000186c: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
30001870: eb000235 bl 3000214c <gettimeofday>
30001874: e59d203c ldr r2, [sp, #60] ; 0x3c
30001878: e59d3028 ldr r3, [sp, #40] ; 0x28
return 0;
3000187c: e3a00000 mov r0, #0
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
30001880: e5832048 str r2, [r3, #72] ; 0x48
return 0;
}
30001884: e28dd048 add sp, sp, #72 ; 0x48
30001888: e8bd8070 pop {r4, r5, r6, pc}
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
rtems_set_errno_and_return_minus_one( EMLINK );
3000188c: eb002d09 bl 3000ccb8 <__errno>
30001890: e3a0301f mov r3, #31
30001894: e5803000 str r3, [r0]
30001898: e3e00000 mvn r0, #0
3000189c: eafffff8 b 30001884 <IMFS_link+0x94>
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
300018a0: eb002d04 bl 3000ccb8 <__errno> <== NOT EXECUTED
300018a4: e3a0300c mov r3, #12 <== NOT EXECUTED
300018a8: e5803000 str r3, [r0] <== NOT EXECUTED
300018ac: e3e00000 mvn r0, #0 <== NOT EXECUTED
300018b0: eafffff3 b 30001884 <IMFS_link+0x94> <== NOT EXECUTED
3000bc98 <IMFS_memfile_extend>:
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000bc98: e59f3128 ldr r3, [pc, #296] ; 3000bdc8 <IMFS_memfile_extend+0x130>
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
3000bc9c: e92d4df0 push {r4, r5, r6, r7, r8, sl, fp, lr}
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000bca0: e593b000 ldr fp, [r3]
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
3000bca4: e1a06002 mov r6, r2
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000bca8: e1a0312b lsr r3, fp, #2
3000bcac: e0223393 mla r2, r3, r3, r3
3000bcb0: e0233392 mla r3, r2, r3, r3
3000bcb4: e3a02000 mov r2, #0
3000bcb8: e2433001 sub r3, r3, #1
3000bcbc: e1520006 cmp r2, r6
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
3000bcc0: e24dd004 sub sp, sp, #4
3000bcc4: e1a04000 mov r4, r0
3000bcc8: e1a08001 mov r8, r1
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000bccc: e003039b mul r3, fp, r3
3000bcd0: da000034 ble 3000bda8 <IMFS_memfile_extend+0x110>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
3000bcd4: e5947054 ldr r7, [r4, #84] ; 0x54
3000bcd8: e594a050 ldr sl, [r4, #80] ; 0x50
3000bcdc: e1560007 cmp r6, r7
3000bce0: da000027 ble 3000bd84 <IMFS_memfile_extend+0xec>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000bce4: e1a0cfcb asr ip, fp, #31
3000bce8: e1a0300c mov r3, ip
3000bcec: e1a0200b mov r2, fp
3000bcf0: e1a00008 mov r0, r8
3000bcf4: e1a01006 mov r1, r6
3000bcf8: e58dc000 str ip, [sp]
3000bcfc: eb001442 bl 30010e0c <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000bd00: e59dc000 ldr ip, [sp]
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000bd04: e1a05000 mov r5, r0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000bd08: e1a01007 mov r1, r7
3000bd0c: e1a0000a mov r0, sl
3000bd10: e1a0200b mov r2, fp
3000bd14: e1a0300c mov r3, ip
3000bd18: eb00143b bl 30010e0c <__divdi3>
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
3000bd1c: e1550000 cmp r5, r0
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000bd20: e1a0a000 mov sl, r0
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
3000bd24: 3a00001b bcc 3000bd98 <IMFS_memfile_extend+0x100>
3000bd28: e1a07000 mov r7, r0
3000bd2c: ea000002 b 3000bd3c <IMFS_memfile_extend+0xa4>
3000bd30: e2877001 add r7, r7, #1
3000bd34: e1550007 cmp r5, r7
3000bd38: 3a000016 bcc 3000bd98 <IMFS_memfile_extend+0x100>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
3000bd3c: e1a01007 mov r1, r7
3000bd40: e1a00004 mov r0, r4
3000bd44: ebffff4c bl 3000ba7c <IMFS_memfile_addblock>
3000bd48: e3500000 cmp r0, #0
3000bd4c: 0afffff7 beq 3000bd30 <IMFS_memfile_extend+0x98>
3000bd50: ea000003 b 3000bd64 <IMFS_memfile_extend+0xcc> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
3000bd54: e1a01007 mov r1, r7 <== NOT EXECUTED
3000bd58: e1a00004 mov r0, r4 <== NOT EXECUTED
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
3000bd5c: e2477001 sub r7, r7, #1 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
3000bd60: ebffffc2 bl 3000bc70 <IMFS_memfile_remove_block> <== NOT EXECUTED
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
3000bd64: e15a0007 cmp sl, r7 <== NOT EXECUTED
3000bd68: 9afffff9 bls 3000bd54 <IMFS_memfile_extend+0xbc> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
3000bd6c: eb0003d1 bl 3000ccb8 <__errno> <== NOT EXECUTED
3000bd70: e3a0301c mov r3, #28 <== NOT EXECUTED
3000bd74: e5803000 str r3, [r0] <== NOT EXECUTED
3000bd78: e3e00000 mvn r0, #0 <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
3000bd7c: e28dd004 add sp, sp, #4
3000bd80: e8bd8df0 pop {r4, r5, r6, r7, r8, sl, fp, pc}
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
3000bd84: 1a000001 bne 3000bd90 <IMFS_memfile_extend+0xf8>
3000bd88: e158000a cmp r8, sl
3000bd8c: 8affffd4 bhi 3000bce4 <IMFS_memfile_extend+0x4c>
return 0;
3000bd90: e3a00000 mov r0, #0
3000bd94: eafffff8 b 3000bd7c <IMFS_memfile_extend+0xe4>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
3000bd98: e5848050 str r8, [r4, #80] ; 0x50
3000bd9c: e5846054 str r6, [r4, #84] ; 0x54
return 0;
3000bda0: e3a00000 mov r0, #0
3000bda4: eafffff4 b 3000bd7c <IMFS_memfile_extend+0xe4>
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000bda8: 1a000001 bne 3000bdb4 <IMFS_memfile_extend+0x11c>
3000bdac: e1530001 cmp r3, r1
3000bdb0: 8affffc7 bhi 3000bcd4 <IMFS_memfile_extend+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
3000bdb4: eb0003bf bl 3000ccb8 <__errno>
3000bdb8: e3a03016 mov r3, #22
3000bdbc: e5803000 str r3, [r0]
3000bdc0: e3e00000 mvn r0, #0
3000bdc4: eaffffec b 3000bd7c <IMFS_memfile_extend+0xe4>
3000b618 <IMFS_memfile_get_block_pointer>:
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000b618: e59f31f8 ldr r3, [pc, #504] ; 3000b818 <IMFS_memfile_get_block_pointer+0x200>
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000b61c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000b620: e5934000 ldr r4, [r3]
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000b624: e24dd004 sub sp, sp, #4
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000b628: e1a04124 lsr r4, r4, #2
3000b62c: e2443001 sub r3, r4, #1
3000b630: e1510003 cmp r1, r3
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000b634: e1a05000 mov r5, r0
3000b638: e1a06002 mov r6, r2
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000b63c: 8a000007 bhi 3000b660 <IMFS_memfile_get_block_pointer+0x48>
p = info->indirect;
if ( malloc_it ) {
3000b640: e3520000 cmp r2, #0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
3000b644: e5900058 ldr r0, [r0, #88] ; 0x58
if ( malloc_it ) {
3000b648: 0a00001c beq 3000b6c0 <IMFS_memfile_get_block_pointer+0xa8>
if ( !p ) {
3000b64c: e3500000 cmp r0, #0
3000b650: 0a000041 beq 3000b75c <IMFS_memfile_get_block_pointer+0x144>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
3000b654: e0800101 add r0, r0, r1, lsl #2
/*
* This means the requested block number is out of range.
*/
return 0;
}
3000b658: e28dd004 add sp, sp, #4
3000b65c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
3000b660: e0274494 mla r7, r4, r4, r4
3000b664: e2473001 sub r3, r7, #1
3000b668: e1510003 cmp r1, r3
3000b66c: 8a000016 bhi 3000b6cc <IMFS_memfile_get_block_pointer+0xb4>
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
3000b670: e0647001 rsb r7, r4, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000b674: e1a00007 mov r0, r7
3000b678: e1a01004 mov r1, r4
3000b67c: eb001382 bl 3001048c <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b680: e1a01004 mov r1, r4
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000b684: e1a08000 mov r8, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b688: e1a00007 mov r0, r7
3000b68c: eb001338 bl 30010374 <__aeabi_uidiv>
p = info->doubly_indirect;
if ( malloc_it ) {
3000b690: e3560000 cmp r6, #0
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b694: e1a04000 mov r4, r0
p = info->doubly_indirect;
3000b698: e595305c ldr r3, [r5, #92] ; 0x5c
if ( malloc_it ) {
3000b69c: 0a00003f beq 3000b7a0 <IMFS_memfile_get_block_pointer+0x188>
if ( !p ) {
3000b6a0: e3530000 cmp r3, #0
3000b6a4: 0a000045 beq 3000b7c0 <IMFS_memfile_get_block_pointer+0x1a8>
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
3000b6a8: e7930104 ldr r0, [r3, r4, lsl #2]
3000b6ac: e0834104 add r4, r3, r4, lsl #2
if ( !p1 ) {
3000b6b0: e3500000 cmp r0, #0
3000b6b4: 0a00002f beq 3000b778 <IMFS_memfile_get_block_pointer+0x160>
#if 0
fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly,
singly, p, &p[singly] );
fflush(stdout);
#endif
return (block_p *)&p[ singly ];
3000b6b8: e0800108 add r0, r0, r8, lsl #2
3000b6bc: eaffffe5 b 3000b658 <IMFS_memfile_get_block_pointer+0x40>
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
3000b6c0: e3500000 cmp r0, #0
3000b6c4: 1affffe2 bne 3000b654 <IMFS_memfile_get_block_pointer+0x3c>
3000b6c8: eaffffe2 b 3000b658 <IMFS_memfile_get_block_pointer+0x40> <== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
3000b6cc: e0234497 mla r3, r7, r4, r4
3000b6d0: e2433001 sub r3, r3, #1
3000b6d4: e1510003 cmp r1, r3
/*
* This means the requested block number is out of range.
*/
return 0;
3000b6d8: 83a00000 movhi r0, #0
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
3000b6dc: 8affffdd bhi 3000b658 <IMFS_memfile_get_block_pointer+0x40>
my_block -= FIRST_TRIPLY_INDIRECT;
3000b6e0: e0677001 rsb r7, r7, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000b6e4: e1a00007 mov r0, r7
3000b6e8: e1a01004 mov r1, r4
3000b6ec: eb001366 bl 3001048c <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b6f0: e1a01004 mov r1, r4
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000b6f4: e1a0a000 mov sl, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000b6f8: e1a00007 mov r0, r7
3000b6fc: eb00131c bl 30010374 <__aeabi_uidiv>
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
3000b700: e1a01004 mov r1, r4
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;
3000b704: e1a08000 mov r8, r0
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
3000b708: eb001319 bl 30010374 <__aeabi_uidiv>
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000b70c: e1a01004 mov r1, r4
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;
3000b710: e1a07000 mov r7, r0
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000b714: e1a00008 mov r0, r8
3000b718: eb00135b bl 3001048c <__umodsi3>
p = info->triply_indirect;
if ( malloc_it ) {
3000b71c: e3560000 cmp r6, #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;
3000b720: e1a04000 mov r4, r0
p = info->triply_indirect;
3000b724: e5950060 ldr r0, [r5, #96] ; 0x60
if ( malloc_it ) {
3000b728: 0a000029 beq 3000b7d4 <IMFS_memfile_get_block_pointer+0x1bc>
if ( !p ) {
3000b72c: e3500000 cmp r0, #0
3000b730: 0a000033 beq 3000b804 <IMFS_memfile_get_block_pointer+0x1ec>
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
3000b734: e7903107 ldr r3, [r0, r7, lsl #2]
3000b738: e0807107 add r7, r0, r7, lsl #2
if ( !p1 ) {
3000b73c: e3530000 cmp r3, #0
3000b740: 0a00002a beq 3000b7f0 <IMFS_memfile_get_block_pointer+0x1d8>
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
3000b744: e7930104 ldr r0, [r3, r4, lsl #2]
3000b748: e0834104 add r4, r3, r4, lsl #2
if ( !p2 ) {
3000b74c: e3500000 cmp r0, #0
3000b750: 0a00000d beq 3000b78c <IMFS_memfile_get_block_pointer+0x174>
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
3000b754: e080010a add r0, r0, sl, lsl #2
3000b758: eaffffbe b 3000b658 <IMFS_memfile_get_block_pointer+0x40>
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
3000b75c: e58d1000 str r1, [sp]
3000b760: ebffff9f bl 3000b5e4 <memfile_alloc_block>
if ( !p )
3000b764: e3500000 cmp r0, #0
3000b768: e59d1000 ldr r1, [sp]
return 0;
info->indirect = p;
3000b76c: 15850058 strne r0, [r5, #88] ; 0x58
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
3000b770: 1affffb7 bne 3000b654 <IMFS_memfile_get_block_pointer+0x3c>
3000b774: eaffffb7 b 3000b658 <IMFS_memfile_get_block_pointer+0x40> <== NOT EXECUTED
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
3000b778: ebffff99 bl 3000b5e4 <memfile_alloc_block>
if ( !p1 )
3000b77c: e3500000 cmp r0, #0
return 0;
p[ doubly ] = (block_p) p1;
3000b780: 15840000 strne r0, [r4]
#if 0
fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly,
singly, p, &p[singly] );
fflush(stdout);
#endif
return (block_p *)&p[ singly ];
3000b784: 10800108 addne r0, r0, r8, lsl #2
3000b788: eaffffb2 b 3000b658 <IMFS_memfile_get_block_pointer+0x40>
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
3000b78c: ebffff94 bl 3000b5e4 <memfile_alloc_block>
if ( !p2 )
3000b790: e3500000 cmp r0, #0
return 0;
p1[ doubly ] = (block_p) p2;
3000b794: 15840000 strne r0, [r4]
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
3000b798: 1080010a addne r0, r0, sl, lsl #2
3000b79c: eaffffad b 3000b658 <IMFS_memfile_get_block_pointer+0x40>
}
return (block_p *)&p1[ singly ];
}
if ( !p )
3000b7a0: e3530000 cmp r3, #0
3000b7a4: 1a000001 bne 3000b7b0 <IMFS_memfile_get_block_pointer+0x198>
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
return 0;
3000b7a8: e1a00003 mov r0, r3 <== NOT EXECUTED
3000b7ac: eaffffa9 b 3000b658 <IMFS_memfile_get_block_pointer+0x40> <== NOT EXECUTED
}
if ( !p )
return 0;
p = (block_p *)p[ doubly ];
3000b7b0: e7930100 ldr r0, [r3, r0, lsl #2]
if ( !p )
3000b7b4: e3500000 cmp r0, #0
#if 0
fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly,
singly, p, &p[singly] );
fflush(stdout);
#endif
return (block_p *)&p[ singly ];
3000b7b8: 10800108 addne r0, r0, r8, lsl #2
3000b7bc: eaffffa5 b 3000b658 <IMFS_memfile_get_block_pointer+0x40>
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
3000b7c0: ebffff87 bl 3000b5e4 <memfile_alloc_block>
if ( !p )
3000b7c4: e2503000 subs r3, r0, #0
3000b7c8: 0afffff6 beq 3000b7a8 <IMFS_memfile_get_block_pointer+0x190>
return 0;
info->doubly_indirect = p;
3000b7cc: e585305c str r3, [r5, #92] ; 0x5c
3000b7d0: eaffffb4 b 3000b6a8 <IMFS_memfile_get_block_pointer+0x90>
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
3000b7d4: e3500000 cmp r0, #0
3000b7d8: 0affff9e beq 3000b658 <IMFS_memfile_get_block_pointer+0x40>
#if 0
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
3000b7dc: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 )
3000b7e0: e3500000 cmp r0, #0
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
3000b7e4: 17900104 ldrne r0, [r0, r4, lsl #2]
3000b7e8: 1080010a addne r0, r0, sl, lsl #2
3000b7ec: eaffff99 b 3000b658 <IMFS_memfile_get_block_pointer+0x40>
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
3000b7f0: ebffff7b bl 3000b5e4 <memfile_alloc_block>
if ( !p1 )
3000b7f4: e2503000 subs r3, r0, #0
3000b7f8: 0affffea beq 3000b7a8 <IMFS_memfile_get_block_pointer+0x190>
return 0;
p[ triply ] = (block_p) p1;
3000b7fc: e5873000 str r3, [r7]
3000b800: eaffffcf b 3000b744 <IMFS_memfile_get_block_pointer+0x12c>
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
3000b804: ebffff76 bl 3000b5e4 <memfile_alloc_block>
if ( !p )
3000b808: e3500000 cmp r0, #0
3000b80c: 0affff91 beq 3000b658 <IMFS_memfile_get_block_pointer+0x40>
return 0;
info->triply_indirect = p;
3000b810: e5850060 str r0, [r5, #96] ; 0x60
3000b814: eaffffc6 b 3000b734 <IMFS_memfile_get_block_pointer+0x11c>
3000b81c <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
3000b81c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Error checks on arguments
*/
if ( !dest )
3000b820: e253b000 subs fp, r3, #0
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
3000b824: e24dd014 sub sp, sp, #20
3000b828: e1a09000 mov r9, r0
3000b82c: e1a07001 mov r7, r1
3000b830: e1a08002 mov r8, r2
3000b834: e59d5038 ldr r5, [sp, #56] ; 0x38
/*
* Error checks on arguments
*/
if ( !dest )
3000b838: 0a00007c beq 3000ba30 <IMFS_memfile_read+0x214>
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
3000b83c: e3550000 cmp r5, #0
3000b840: 0a00007a beq 3000ba30 <IMFS_memfile_read+0x214>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
3000b844: e590304c ldr r3, [r0, #76] ; 0x4c
3000b848: e3530006 cmp r3, #6
3000b84c: 0a00005c beq 3000b9c4 <IMFS_memfile_read+0x1a8>
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
3000b850: e5902054 ldr r2, [r0, #84] ; 0x54
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
3000b854: e1a03001 mov r3, r1
if ( last_byte > the_jnode->info.file.size )
3000b858: e3a01000 mov r1, #0
3000b85c: e1510002 cmp r1, r2
3000b860: e5902050 ldr r2, [r0, #80] ; 0x50
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
3000b864: e0851007 add r1, r5, r7
if ( last_byte > the_jnode->info.file.size )
3000b868: da00003d ble 3000b964 <IMFS_memfile_read+0x148>
my_length = the_jnode->info.file.size - start;
3000b86c: e0635002 rsb r5, r3, r2
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000b870: e59f61cc ldr r6, [pc, #460] ; 3000ba44 <IMFS_memfile_read+0x228>
3000b874: e1a00007 mov r0, r7
3000b878: e5964000 ldr r4, [r6]
3000b87c: e1a01008 mov r1, r8
3000b880: e1a02004 mov r2, r4
3000b884: e1a03fc2 asr r3, r2, #31
3000b888: e98d000c stmib sp, {r2, r3}
3000b88c: eb001698 bl 300112f4 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000b890: e99d000c ldmib sp, {r2, r3}
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000b894: e1a0a000 mov sl, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000b898: e1a01008 mov r1, r8
3000b89c: e1a00007 mov r0, r7
3000b8a0: eb001559 bl 30010e0c <__divdi3>
if ( start_offset ) {
3000b8a4: e35a0000 cmp sl, #0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000b8a8: e1a07000 mov r7, r0
if ( start_offset ) {
3000b8ac: 01a0800b moveq r8, fp
3000b8b0: 0a000014 beq 3000b908 <IMFS_memfile_read+0xec>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000b8b4: e1a00009 mov r0, r9
3000b8b8: e1a01007 mov r1, r7
3000b8bc: e3a02000 mov r2, #0
3000b8c0: ebffff54 bl 3000b618 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000b8c4: e3500000 cmp r0, #0
3000b8c8: 0a000023 beq 3000b95c <IMFS_memfile_read+0x140>
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
3000b8cc: e5901000 ldr r1, [r0]
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
3000b8d0: e06a3004 rsb r3, sl, r4
3000b8d4: e1550003 cmp r5, r3
3000b8d8: 31a03005 movcc r3, r5
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
3000b8dc: e081100a add r1, r1, sl
3000b8e0: e1a02003 mov r2, r3
3000b8e4: e1a0000b mov r0, fp
3000b8e8: e58d3000 str r3, [sp]
3000b8ec: eb00071f bl 3000d570 <memcpy>
dest += to_copy;
3000b8f0: e59d3000 ldr r3, [sp]
block++;
my_length -= to_copy;
3000b8f4: e5964000 ldr r4, [r6]
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
dest += to_copy;
3000b8f8: e08b8003 add r8, fp, r3
block++;
3000b8fc: e2877001 add r7, r7, #1
my_length -= to_copy;
3000b900: e0635005 rsb r5, r3, r5
copied += to_copy;
3000b904: e1a0a003 mov sl, r3
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000b908: e1550004 cmp r5, r4
3000b90c: 2a000008 bcs 3000b934 <IMFS_memfile_read+0x118>
3000b910: ea000017 b 3000b974 <IMFS_memfile_read+0x158>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
3000b914: e5931000 ldr r1, [r3]
3000b918: eb000714 bl 3000d570 <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000b91c: e5963000 ldr r3, [r6]
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
3000b920: e0888004 add r8, r8, r4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000b924: e1530005 cmp r3, r5
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
3000b928: e2877001 add r7, r7, #1
my_length -= to_copy;
copied += to_copy;
3000b92c: e08aa004 add sl, sl, r4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000b930: 8a00000f bhi 3000b974 <IMFS_memfile_read+0x158>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000b934: e3a02000 mov r2, #0
3000b938: e1a01007 mov r1, r7
3000b93c: e1a00009 mov r0, r9
3000b940: ebffff34 bl 3000b618 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000b944: e2503000 subs r3, r0, #0
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
3000b948: e1a02004 mov r2, r4
dest += to_copy;
block++;
my_length -= to_copy;
3000b94c: e0645005 rsb r5, r4, r5
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
3000b950: e1a00008 mov r0, r8
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
3000b954: 1affffee bne 3000b914 <IMFS_memfile_read+0xf8>
#endif
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
3000b958: e1a0000a mov r0, sl <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
3000b95c: e28dd014 add sp, sp, #20
3000b960: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
3000b964: 1affffc1 bne 3000b870 <IMFS_memfile_read+0x54>
3000b968: e1510002 cmp r1, r2
3000b96c: 9affffbf bls 3000b870 <IMFS_memfile_read+0x54>
3000b970: eaffffbd b 3000b86c <IMFS_memfile_read+0x50>
#if defined(RTEMS_DEBUG)
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
#endif
if ( my_length ) {
3000b974: e3550000 cmp r5, #0
3000b978: 0a00000a beq 3000b9a8 <IMFS_memfile_read+0x18c>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000b97c: e1a00009 mov r0, r9
3000b980: e1a01007 mov r1, r7
3000b984: e3a02000 mov r2, #0
3000b988: ebffff22 bl 3000b618 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000b98c: e2503000 subs r3, r0, #0
3000b990: 0afffff0 beq 3000b958 <IMFS_memfile_read+0x13c>
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
3000b994: e1a00008 mov r0, r8
3000b998: e5931000 ldr r1, [r3]
3000b99c: e1a02005 mov r2, r5
3000b9a0: eb0006f2 bl 3000d570 <memcpy>
copied += my_length;
3000b9a4: e08aa005 add sl, sl, r5
}
IMFS_update_atime( the_jnode );
3000b9a8: e28d000c add r0, sp, #12
3000b9ac: e3a01000 mov r1, #0
3000b9b0: ebffd9e5 bl 3000214c <gettimeofday>
3000b9b4: e59d300c ldr r3, [sp, #12]
return copied;
3000b9b8: e1a0000a mov r0, sl
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
copied += my_length;
}
IMFS_update_atime( the_jnode );
3000b9bc: e5893040 str r3, [r9, #64] ; 0x40
return copied;
3000b9c0: eaffffe5 b 3000b95c <IMFS_memfile_read+0x140>
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
3000b9c4: e2804050 add r4, r0, #80 ; 0x50
3000b9c8: e8940018 ldm r4, {r3, r4}
3000b9cc: e1a00003 mov r0, r3
3000b9d0: e1a01004 mov r1, r4
3000b9d4: e3a02000 mov r2, #0
3000b9d8: e0500007 subs r0, r0, r7
3000b9dc: e0c11008 sbc r1, r1, r8
3000b9e0: e1520001 cmp r2, r1
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
3000b9e4: e5992058 ldr r2, [r9, #88] ; 0x58
if (my_length > (the_jnode->info.linearfile.size - start))
3000b9e8: da00000b ble 3000ba1c <IMFS_memfile_read+0x200>
my_length = the_jnode->info.linearfile.size - start;
3000b9ec: e067a003 rsb sl, r7, r3
memcpy(dest, &file_ptr[start], my_length);
3000b9f0: e0821007 add r1, r2, r7
3000b9f4: e1a0000b mov r0, fp
3000b9f8: e1a0200a mov r2, sl
3000b9fc: eb0006db bl 3000d570 <memcpy>
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
copied += my_length;
}
IMFS_update_atime( the_jnode );
3000ba00: e28d000c add r0, sp, #12
3000ba04: e3a01000 mov r1, #0
3000ba08: ebffd9cf bl 3000214c <gettimeofday>
3000ba0c: e59d300c ldr r3, [sp, #12]
return copied;
3000ba10: e1a0000a mov r0, sl
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
copied += my_length;
}
IMFS_update_atime( the_jnode );
3000ba14: e5893040 str r3, [r9, #64] ; 0x40
3000ba18: eaffffcf b 3000b95c <IMFS_memfile_read+0x140>
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
3000ba1c: 1a000001 bne 3000ba28 <IMFS_memfile_read+0x20c>
3000ba20: e1550000 cmp r5, r0
3000ba24: 8afffff0 bhi 3000b9ec <IMFS_memfile_read+0x1d0>
3000ba28: e1a0a005 mov sl, r5 <== NOT EXECUTED
3000ba2c: eaffffef b 3000b9f0 <IMFS_memfile_read+0x1d4> <== NOT EXECUTED
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
3000ba30: eb0004a0 bl 3000ccb8 <__errno> <== NOT EXECUTED
3000ba34: e3a03016 mov r3, #22 <== NOT EXECUTED
3000ba38: e5803000 str r3, [r0] <== NOT EXECUTED
3000ba3c: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000ba40: eaffffc5 b 3000b95c <IMFS_memfile_read+0x140> <== NOT EXECUTED
3000bb30 <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
3000bb30: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
3000bb34: e59f6130 ldr r6, [pc, #304] ; 3000bc6c <IMFS_memfile_remove+0x13c>
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
3000bb38: e5903058 ldr r3, [r0, #88] ; 0x58
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
3000bb3c: e5967000 ldr r7, [r6]
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
3000bb40: e3530000 cmp r3, #0
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
3000bb44: e1a0a000 mov sl, r0
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
3000bb48: e1a07127 lsr r7, r7, #2
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
3000bb4c: 12800058 addne r0, r0, #88 ; 0x58
3000bb50: 11a01007 movne r1, r7
3000bb54: 1bffffde blne 3000bad4 <memfile_free_blocks_in_table>
}
if ( info->doubly_indirect ) {
3000bb58: e59a305c ldr r3, [sl, #92] ; 0x5c
3000bb5c: e3530000 cmp r3, #0
3000bb60: 0a000014 beq 3000bbb8 <IMFS_memfile_remove+0x88>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000bb64: e5962000 ldr r2, [r6] <== NOT EXECUTED
3000bb68: e1b02122 lsrs r2, r2, #2 <== NOT EXECUTED
3000bb6c: 0a00000e beq 3000bbac <IMFS_memfile_remove+0x7c> <== NOT EXECUTED
3000bb70: e3a02000 mov r2, #0 <== NOT EXECUTED
3000bb74: e1a04002 mov r4, r2 <== NOT EXECUTED
3000bb78: ea000000 b 3000bb80 <IMFS_memfile_remove+0x50> <== NOT EXECUTED
3000bb7c: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
3000bb80: e7931102 ldr r1, [r3, r2, lsl #2] <== NOT EXECUTED
3000bb84: e1a02102 lsl r2, r2, #2 <== NOT EXECUTED
3000bb88: e3510000 cmp r1, #0 <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000bb8c: e2844001 add r4, r4, #1 <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
3000bb90: e1a01007 mov r1, r7 <== NOT EXECUTED
3000bb94: e0830002 add r0, r3, r2 <== NOT EXECUTED
3000bb98: 1bffffcd blne 3000bad4 <memfile_free_blocks_in_table> <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000bb9c: e5963000 ldr r3, [r6] <== NOT EXECUTED
3000bba0: e1a02004 mov r2, r4 <== NOT EXECUTED
3000bba4: e1540123 cmp r4, r3, lsr #2 <== NOT EXECUTED
3000bba8: 3afffff3 bcc 3000bb7c <IMFS_memfile_remove+0x4c> <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
(block_p **)&info->doubly_indirect[i], to_free );
}
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
3000bbac: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED
3000bbb0: e1a01007 mov r1, r7 <== NOT EXECUTED
3000bbb4: ebffffc6 bl 3000bad4 <memfile_free_blocks_in_table> <== NOT EXECUTED
}
if ( info->triply_indirect ) {
3000bbb8: e59a0060 ldr r0, [sl, #96] ; 0x60
3000bbbc: e3500000 cmp r0, #0
3000bbc0: 0a000027 beq 3000bc64 <IMFS_memfile_remove+0x134>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000bbc4: e5963000 ldr r3, [r6] <== NOT EXECUTED
3000bbc8: e1b03123 lsrs r3, r3, #2 <== NOT EXECUTED
3000bbcc: 0a000021 beq 3000bc58 <IMFS_memfile_remove+0x128> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
3000bbd0: e5905000 ldr r5, [r0] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
3000bbd4: e3550000 cmp r5, #0 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
3000bbd8: 13a09000 movne r9, #0 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
3000bbdc: 11a08009 movne r8, r9 <== NOT EXECUTED
3000bbe0: 0a00001c beq 3000bc58 <IMFS_memfile_remove+0x128> <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
3000bbe4: e3530000 cmp r3, #0 <== NOT EXECUTED
3000bbe8: 0a00000d beq 3000bc24 <IMFS_memfile_remove+0xf4> <== NOT EXECUTED
3000bbec: e3a00000 mov r0, #0 <== NOT EXECUTED
3000bbf0: e1a04000 mov r4, r0 <== NOT EXECUTED
if ( p[j] ) {
3000bbf4: e7953100 ldr r3, [r5, r0, lsl #2] <== NOT EXECUTED
3000bbf8: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED
3000bbfc: e3530000 cmp r3, #0 <== NOT EXECUTED
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
3000bc00: e2844001 add r4, r4, #1 <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
3000bc04: e1a01007 mov r1, r7 <== NOT EXECUTED
3000bc08: e0850000 add r0, r5, r0 <== NOT EXECUTED
3000bc0c: 1bffffb0 blne 3000bad4 <memfile_free_blocks_in_table> <== NOT EXECUTED
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
3000bc10: e5963000 ldr r3, [r6] <== NOT EXECUTED
3000bc14: e1a00004 mov r0, r4 <== NOT EXECUTED
3000bc18: e1540123 cmp r4, r3, lsr #2 <== NOT EXECUTED
3000bc1c: 3afffff4 bcc 3000bbf4 <IMFS_memfile_remove+0xc4> <== NOT EXECUTED
3000bc20: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
3000bc24: e0800009 add r0, r0, r9 <== NOT EXECUTED
3000bc28: e1a01007 mov r1, r7 <== NOT EXECUTED
3000bc2c: ebffffa8 bl 3000bad4 <memfile_free_blocks_in_table> <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000bc30: e5963000 ldr r3, [r6] <== NOT EXECUTED
3000bc34: e2888001 add r8, r8, #1 <== NOT EXECUTED
3000bc38: e1a03123 lsr r3, r3, #2 <== NOT EXECUTED
3000bc3c: e1530008 cmp r3, r8 <== NOT EXECUTED
3000bc40: 9a000004 bls 3000bc58 <IMFS_memfile_remove+0x128> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
3000bc44: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
3000bc48: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
3000bc4c: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
3000bc50: e3550000 cmp r5, #0 <== NOT EXECUTED
3000bc54: 1affffe2 bne 3000bbe4 <IMFS_memfile_remove+0xb4> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
3000bc58: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED
3000bc5c: e1a01007 mov r1, r7 <== NOT EXECUTED
3000bc60: ebffff9b bl 3000bad4 <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
3000bc64: e3a00000 mov r0, #0
3000bc68: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
3000bc70 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
3000bc70: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000bc74: e3a02000 mov r2, #0 <== NOT EXECUTED
3000bc78: ebfffe66 bl 3000b618 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( block_ptr );
#endif
if ( block_ptr ) {
3000bc7c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
ptr = *block_ptr;
*block_ptr = 0;
3000bc80: 13a02000 movne r2, #0 <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( block_ptr );
#endif
if ( block_ptr ) {
ptr = *block_ptr;
3000bc84: 15930000 ldrne r0, [r3] <== NOT EXECUTED
*block_ptr = 0;
3000bc88: 15832000 strne r2, [r3] <== NOT EXECUTED
memfile_free_block( ptr );
3000bc8c: 1bffff88 blne 3000bab4 <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
3000bc90: e3a00001 mov r0, #1 <== NOT EXECUTED
3000bc94: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
3000bdcc <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
3000bdcc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Error check arguments
*/
if ( !source )
3000bdd0: e2538000 subs r8, r3, #0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
3000bdd4: e24dd010 sub sp, sp, #16
3000bdd8: e1a09000 mov r9, r0
3000bddc: e1a06001 mov r6, r1
3000bde0: e1a07002 mov r7, r2
3000bde4: e59db034 ldr fp, [sp, #52] ; 0x34
/*
* Error check arguments
*/
if ( !source )
3000bde8: 0a000064 beq 3000bf80 <IMFS_memfile_write+0x1b4>
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
3000bdec: e35b0000 cmp fp, #0
3000bdf0: 0a000062 beq 3000bf80 <IMFS_memfile_write+0x1b4>
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
3000bdf4: e5903054 ldr r3, [r0, #84] ; 0x54
/*
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
3000bdf8: e08b1001 add r1, fp, r1
if ( last_byte > the_jnode->info.file.size ) {
3000bdfc: e3530000 cmp r3, #0
3000be00: ba000040 blt 3000bf08 <IMFS_memfile_write+0x13c>
3000be04: 0a00003c beq 3000befc <IMFS_memfile_write+0x130>
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000be08: e59f5184 ldr r5, [pc, #388] ; 3000bf94 <IMFS_memfile_write+0x1c8>
3000be0c: e1a00006 mov r0, r6
3000be10: e5954000 ldr r4, [r5]
3000be14: e1a01007 mov r1, r7
3000be18: e1a02004 mov r2, r4
3000be1c: e1a03fc2 asr r3, r2, #31
3000be20: e88d000c stm sp, {r2, r3}
3000be24: eb001532 bl 300112f4 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000be28: e89d000c ldm sp, {r2, r3}
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000be2c: e1a0a000 mov sl, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000be30: e1a01007 mov r1, r7
3000be34: e1a00006 mov r0, r6
3000be38: eb0013f3 bl 30010e0c <__divdi3>
if ( start_offset ) {
3000be3c: e35a0000 cmp sl, #0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000be40: e1a07000 mov r7, r0
if ( start_offset ) {
3000be44: 01a0600b moveq r6, fp
3000be48: 1a000016 bne 3000bea8 <IMFS_memfile_write+0xdc>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000be4c: e1560004 cmp r6, r4
3000be50: 2a000008 bcs 3000be78 <IMFS_memfile_write+0xac>
3000be54: ea000035 b 3000bf30 <IMFS_memfile_write+0x164>
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
3000be58: e5900000 ldr r0, [r0]
3000be5c: eb0005c3 bl 3000d570 <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000be60: e5953000 ldr r3, [r5]
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
3000be64: e0888004 add r8, r8, r4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000be68: e1530006 cmp r3, r6
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
block++;
3000be6c: e2877001 add r7, r7, #1
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
3000be70: e08aa004 add sl, sl, r4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000be74: 8a00002d bhi 3000bf30 <IMFS_memfile_write+0x164>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000be78: e1a01007 mov r1, r7
3000be7c: e3a02000 mov r2, #0
3000be80: e1a00009 mov r0, r9
3000be84: ebfffde3 bl 3000b618 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000be88: e3500000 cmp r0, #0
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
3000be8c: e1a01008 mov r1, r8
3000be90: e1a02004 mov r2, r4
src += to_copy;
block++;
my_length -= to_copy;
3000be94: e0646006 rsb r6, r4, r6
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
3000be98: 1affffee bne 3000be58 <IMFS_memfile_write+0x8c>
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
3000be9c: e1a0000a mov r0, sl
3000bea0: e28dd010 add sp, sp, #16
3000bea4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000bea8: e1a00009 mov r0, r9
3000beac: e1a01007 mov r1, r7
3000beb0: e3a02000 mov r2, #0
3000beb4: ebfffdd7 bl 3000b618 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000beb8: e3500000 cmp r0, #0
return copied;
3000bebc: 01a0a000 moveq sl, r0
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
3000bec0: 0afffff5 beq 3000be9c <IMFS_memfile_write+0xd0>
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
3000bec4: e06a4004 rsb r4, sl, r4
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
3000bec8: e5900000 ldr r0, [r0]
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
3000becc: e154000b cmp r4, fp
3000bed0: 21a0400b movcs r4, fp
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
3000bed4: e080000a add r0, r0, sl
3000bed8: e1a01008 mov r1, r8
3000bedc: e1a02004 mov r2, r4
3000bee0: eb0005a2 bl 3000d570 <memcpy>
src += to_copy;
3000bee4: e0888004 add r8, r8, r4
block++;
my_length -= to_copy;
3000bee8: e064600b rsb r6, r4, fp
copied += to_copy;
3000beec: e1a0a004 mov sl, r4
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
3000bef0: e2877001 add r7, r7, #1
my_length -= to_copy;
copied += to_copy;
3000bef4: e5954000 ldr r4, [r5]
3000bef8: eaffffd3 b 3000be4c <IMFS_memfile_write+0x80>
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
3000befc: e5903050 ldr r3, [r0, #80] ; 0x50
3000bf00: e1530001 cmp r3, r1
3000bf04: 2affffbf bcs 3000be08 <IMFS_memfile_write+0x3c>
status = IMFS_memfile_extend( the_jnode, last_byte );
3000bf08: e1a00009 mov r0, r9
3000bf0c: e3a02000 mov r2, #0
3000bf10: ebffff60 bl 3000bc98 <IMFS_memfile_extend>
if ( status )
3000bf14: e3500000 cmp r0, #0
3000bf18: 0affffba beq 3000be08 <IMFS_memfile_write+0x3c>
rtems_set_errno_and_return_minus_one( ENOSPC );
3000bf1c: eb000365 bl 3000ccb8 <__errno>
3000bf20: e3a0301c mov r3, #28
3000bf24: e5803000 str r3, [r0]
3000bf28: e3e0a000 mvn sl, #0
3000bf2c: eaffffda b 3000be9c <IMFS_memfile_write+0xd0>
#if defined(RTEMS_DEBUG)
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
#endif
to_copy = my_length;
if ( my_length ) {
3000bf30: e3560000 cmp r6, #0
3000bf34: 0a00000a beq 3000bf64 <IMFS_memfile_write+0x198>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000bf38: e1a00009 mov r0, r9
3000bf3c: e1a01007 mov r1, r7
3000bf40: e3a02000 mov r2, #0
3000bf44: ebfffdb3 bl 3000b618 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000bf48: e3500000 cmp r0, #0
3000bf4c: 0affffd2 beq 3000be9c <IMFS_memfile_write+0xd0>
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
3000bf50: e5900000 ldr r0, [r0]
3000bf54: e1a01008 mov r1, r8
3000bf58: e1a02006 mov r2, r6
3000bf5c: eb000583 bl 3000d570 <memcpy>
my_length = 0;
copied += to_copy;
3000bf60: e08aa006 add sl, sl, r6
}
IMFS_mtime_ctime_update( the_jnode );
3000bf64: e28d0008 add r0, sp, #8
3000bf68: e3a01000 mov r1, #0
3000bf6c: ebffd876 bl 3000214c <gettimeofday>
3000bf70: e59d3008 ldr r3, [sp, #8]
3000bf74: e5893044 str r3, [r9, #68] ; 0x44
3000bf78: e5893048 str r3, [r9, #72] ; 0x48
return copied;
3000bf7c: eaffffc6 b 3000be9c <IMFS_memfile_write+0xd0>
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
3000bf80: eb00034c bl 3000ccb8 <__errno> <== NOT EXECUTED
3000bf84: e3a03016 mov r3, #22 <== NOT EXECUTED
3000bf88: e5803000 str r3, [r0] <== NOT EXECUTED
3000bf8c: e3e0a000 mvn sl, #0 <== NOT EXECUTED
3000bf90: eaffffc1 b 3000be9c <IMFS_memfile_write+0xd0> <== NOT EXECUTED
300018b8 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
300018b8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
300018bc: e24dd040 sub sp, sp, #64 ; 0x40
300018c0: e1a04001 mov r4, r1
300018c4: e1a08000 mov r8, r0
300018c8: e1a07002 mov r7, r2
300018cc: e1a06003 mov r6, r3
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
300018d0: eb0030e8 bl 3000dc78 <strlen>
300018d4: e28d5004 add r5, sp, #4
300018d8: e1a01000 mov r1, r0
300018dc: e28d303c add r3, sp, #60 ; 0x3c
300018e0: e1a00008 mov r0, r8
300018e4: e1a02005 mov r2, r5
300018e8: eb0020d0 bl 30009c30 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
300018ec: e2043a0f and r3, r4, #61440 ; 0xf000
300018f0: e3530901 cmp r3, #16384 ; 0x4000
300018f4: 0a00001c beq 3000196c <IMFS_mknod+0xb4>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
300018f8: e3530902 cmp r3, #32768 ; 0x8000
300018fc: 0a000018 beq 30001964 <IMFS_mknod+0xac>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
30001900: e3530a06 cmp r3, #24576 ; 0x6000
30001904: 13530a02 cmpne r3, #8192 ; 0x2000
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
30001908: 058d7028 streq r7, [sp, #40] ; 0x28
3000190c: 058d602c streq r6, [sp, #44] ; 0x2c
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
30001910: 03a01002 moveq r1, #2
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
30001914: 1a00000a bne 30001944 <IMFS_mknod+0x8c>
new_node = IMFS_create_node(
pathloc,
type,
new_name,
mode,
&info
30001918: e28d3028 add r3, sp, #40 ; 0x28
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
3000191c: e58d3000 str r3, [sp]
30001920: e59d0058 ldr r0, [sp, #88] ; 0x58
30001924: e1a02005 mov r2, r5
30001928: e1a03004 mov r3, r4
3000192c: eb001dfa bl 3000911c <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
30001930: e3500000 cmp r0, #0
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
30001934: 13a00000 movne r0, #0
new_name,
mode,
&info
);
if ( !new_node )
30001938: 0a00000d beq 30001974 <IMFS_mknod+0xbc>
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
3000193c: e28dd040 add sp, sp, #64 ; 0x40
30001940: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
30001944: e3530a01 cmp r3, #4096 ; 0x1000
type = IMFS_FIFO;
30001948: 03a01007 moveq r1, #7
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
3000194c: 0afffff1 beq 30001918 <IMFS_mknod+0x60>
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
30001950: eb002cd8 bl 3000ccb8 <__errno> <== NOT EXECUTED
30001954: e3a03016 mov r3, #22 <== NOT EXECUTED
30001958: e5803000 str r3, [r0] <== NOT EXECUTED
3000195c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001960: eafffff5 b 3000193c <IMFS_mknod+0x84> <== NOT EXECUTED
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
30001964: e3a01005 mov r1, #5
30001968: eaffffea b 30001918 <IMFS_mknod+0x60>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
3000196c: e3a01001 mov r1, #1
30001970: eaffffe8 b 30001918 <IMFS_mknod+0x60>
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
30001974: eb002ccf bl 3000ccb8 <__errno>
30001978: e3a0300c mov r3, #12
3000197c: e5803000 str r3, [r0]
30001980: e3e00000 mvn r0, #0
30001984: eaffffec b 3000193c <IMFS_mknod+0x84>
30001988 <IMFS_mount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
30001988: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
3000198c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
30001990: e593204c ldr r2, [r3, #76] ; 0x4c
30001994: e3520001 cmp r2, #1
30001998: 1a000002 bne 300019a8 <IMFS_mount+0x20>
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
3000199c: e583005c str r0, [r3, #92] ; 0x5c
return 0;
300019a0: e3a00000 mov r0, #0
}
300019a4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
300019a8: eb002cc2 bl 3000ccb8 <__errno> <== NOT EXECUTED
300019ac: e3a03014 mov r3, #20 <== NOT EXECUTED
300019b0: e5803000 str r3, [r0] <== NOT EXECUTED
300019b4: e3e00000 mvn r0, #0 <== NOT EXECUTED
300019b8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30003cd4 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
30003cd4: e92d4030 push {r4, r5, lr}
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
30003cd8: e59f50f8 ldr r5, [pc, #248] ; 30003dd8 <IMFS_print_jnode+0x104>
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
30003cdc: e1a04000 mov r4, r0
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
30003ce0: e5953000 ldr r3, [r5]
30003ce4: e280000c add r0, r0, #12
30003ce8: e5931008 ldr r1, [r3, #8]
30003cec: eb00341b bl 30010d60 <fputs>
switch( the_jnode->type ) {
30003cf0: e594204c ldr r2, [r4, #76] ; 0x4c
30003cf4: e2423001 sub r3, r2, #1
30003cf8: e3530006 cmp r3, #6
30003cfc: 979ff103 ldrls pc, [pc, r3, lsl #2]
30003d00: ea000023 b 30003d94 <IMFS_print_jnode+0xc0> <== NOT EXECUTED
30003d04: 30003da8 .word 0x30003da8 <== NOT EXECUTED
30003d08: 30003dbc .word 0x30003dbc <== NOT EXECUTED
30003d0c: 30003d20 .word 0x30003d20 <== NOT EXECUTED
30003d10: 30003d20 .word 0x30003d20 <== NOT EXECUTED
30003d14: 30003d58 .word 0x30003d58 <== NOT EXECUTED
30003d18: 30003d78 .word 0x30003d78 <== NOT EXECUTED
30003d1c: 30003d3c .word 0x30003d3c <== NOT EXECUTED
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
30003d20: e5953000 ldr r3, [r5] <== NOT EXECUTED
30003d24: e59f00b0 ldr r0, [pc, #176] ; 30003ddc <IMFS_print_jnode+0x108><== NOT EXECUTED
30003d28: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
30003d2c: e3a01001 mov r1, #1 <== NOT EXECUTED
30003d30: e3a02013 mov r2, #19 <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
30003d34: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
30003d38: ea003739 b 30011a24 <fwrite> <== NOT EXECUTED
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
30003d3c: e5953000 ldr r3, [r5] <== NOT EXECUTED
30003d40: e59f0098 ldr r0, [pc, #152] ; 30003de0 <IMFS_print_jnode+0x10c><== NOT EXECUTED
30003d44: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
30003d48: e3a01001 mov r1, #1 <== NOT EXECUTED
30003d4c: e3a02012 mov r2, #18 <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
30003d50: 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" );
30003d54: ea003732 b 30011a24 <fwrite> <== NOT EXECUTED
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
30003d58: e5953000 ldr r3, [r5]
30003d5c: e59f1080 ldr r1, [pc, #128] ; 30003de4 <IMFS_print_jnode+0x110>
30003d60: e5930008 ldr r0, [r3, #8]
30003d64: e5942050 ldr r2, [r4, #80] ; 0x50
30003d68: eb0033a7 bl 30010c0c <fprintf>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
30003d6c: e59f0074 ldr r0, [pc, #116] ; 30003de8 <IMFS_print_jnode+0x114>
}
30003d70: e8bd4030 pop {r4, r5, lr}
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
30003d74: ea003b25 b 30012a10 <puts>
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
30003d78: e5953000 ldr r3, [r5] <== NOT EXECUTED
30003d7c: e59f1068 ldr r1, [pc, #104] ; 30003dec <IMFS_print_jnode+0x118><== NOT EXECUTED
30003d80: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
30003d84: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED
30003d88: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
30003d8c: eb00339e bl 30010c0c <fprintf> <== NOT EXECUTED
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
30003d90: eafffff5 b 30003d6c <IMFS_print_jnode+0x98> <== NOT EXECUTED
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
30003d94: e5953000 ldr r3, [r5] <== NOT EXECUTED
30003d98: e59f1050 ldr r1, [pc, #80] ; 30003df0 <IMFS_print_jnode+0x11c><== NOT EXECUTED
30003d9c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
return;
}
puts("");
}
30003da0: 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 );
30003da4: ea003398 b 30010c0c <fprintf> <== NOT EXECUTED
#endif
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
30003da8: e5953000 ldr r3, [r5]
30003dac: e3a0002f mov r0, #47 ; 0x2f
30003db0: e5931008 ldr r1, [r3, #8]
30003db4: eb0033b4 bl 30010c8c <fputc>
break;
30003db8: eaffffeb b 30003d6c <IMFS_print_jnode+0x98>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
30003dbc: e5953000 ldr r3, [r5]
30003dc0: e59f102c ldr r1, [pc, #44] ; 30003df4 <IMFS_print_jnode+0x120>
30003dc4: e5930008 ldr r0, [r3, #8]
30003dc8: e5942050 ldr r2, [r4, #80] ; 0x50
30003dcc: e5943054 ldr r3, [r4, #84] ; 0x54
30003dd0: eb00338d bl 30010c0c <fprintf>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
30003dd4: eaffffe4 b 30003d6c <IMFS_print_jnode+0x98>
300019c8 <IMFS_readlink>:
)
{
IMFS_jnode_t *node;
int i;
node = loc->node_access;
300019c8: e5903000 ldr r3, [r0]
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
300019cc: e92d4010 push {r4, lr}
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
300019d0: e593004c ldr r0, [r3, #76] ; 0x4c
300019d4: e3500004 cmp r0, #4
300019d8: 1a000014 bne 30001a30 <IMFS_readlink+0x68>
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
300019dc: e3520000 cmp r2, #0
300019e0: 0a000010 beq 30001a28 <IMFS_readlink+0x60>
300019e4: e5930050 ldr r0, [r3, #80] ; 0x50
300019e8: e5d0c000 ldrb ip, [r0]
300019ec: e35c0000 cmp ip, #0
300019f0: 01a0000c moveq r0, ip
300019f4: 08bd8010 popeq {r4, pc}
300019f8: e3a04000 mov r4, #0
300019fc: e1a00004 mov r0, r4
30001a00: e2800001 add r0, r0, #1
30001a04: e1520000 cmp r2, r0
buf[i] = node->info.sym_link.name[i];
30001a08: e7c1c004 strb ip, [r1, r4]
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
30001a0c: e1a04000 mov r4, r0
30001a10: 98bd8010 popls {r4, pc}
30001a14: e593c050 ldr ip, [r3, #80] ; 0x50
30001a18: e7dcc000 ldrb ip, [ip, r0]
30001a1c: e35c0000 cmp ip, #0
30001a20: 1afffff6 bne 30001a00 <IMFS_readlink+0x38>
30001a24: e8bd8010 pop {r4, pc}
30001a28: e1a00002 mov r0, r2 <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i];
return i;
}
30001a2c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
30001a30: eb002ca0 bl 3000ccb8 <__errno> <== NOT EXECUTED
30001a34: e3a03016 mov r3, #22 <== NOT EXECUTED
30001a38: e5803000 str r3, [r0] <== NOT EXECUTED
30001a3c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001a40: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30009ddc <IMFS_stat>:
{
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
30009ddc: e5903000 ldr r3, [r0]
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
30009de0: e92d40f0 push {r4, r5, r6, r7, lr}
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
30009de4: e593204c ldr r2, [r3, #76] ; 0x4c
30009de8: e2422002 sub r2, r2, #2
30009dec: e3520005 cmp r2, #5
30009df0: 979ff102 ldrls pc, [pc, r2, lsl #2]
30009df4: ea000026 b 30009e94 <IMFS_stat+0xb8> <== NOT EXECUTED
30009df8: 30009e80 .word 0x30009e80 <== NOT EXECUTED
30009dfc: 30009e94 .word 0x30009e94 <== NOT EXECUTED
30009e00: 30009e10 .word 0x30009e10 <== NOT EXECUTED
30009e04: 30009ea8 .word 0x30009ea8 <== NOT EXECUTED
30009e08: 30009ea8 .word 0x30009ea8 <== NOT EXECUTED
30009e0c: 30009e10 .word 0x30009e10 <== NOT EXECUTED
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
30009e10: e3a04000 mov r4, #0
30009e14: e3a05000 mov r5, #0
30009e18: e5814020 str r4, [r1, #32]
30009e1c: e5815024 str r5, [r1, #36] ; 0x24
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
30009e20: e5902010 ldr r2, [r0, #16]
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
30009e24: e1d373b4 ldrh r7, [r3, #52] ; 0x34
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
30009e28: e5922034 ldr r2, [r2, #52] ; 0x34
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;
30009e2c: e5930044 ldr r0, [r3, #68] ; 0x44
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
30009e30: e5935030 ldr r5, [r3, #48] ; 0x30
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
30009e34: e5934038 ldr r4, [r3, #56] ; 0x38
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
30009e38: e5926000 ldr r6, [r2]
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
30009e3c: e593c040 ldr ip, [r3, #64] ; 0x40
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
30009e40: e5932048 ldr r2, [r3, #72] ; 0x48
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
30009e44: e1c171b0 strh r7, [r1, #16]
/*
* 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 =
30009e48: e59f706c ldr r7, [pc, #108] ; 30009ebc <IMFS_stat+0xe0>
30009e4c: e5817000 str r7, [r1]
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
30009e50: e1d373bc ldrh r7, [r3, #60] ; 0x3c
buf->st_gid = the_jnode->st_gid;
30009e54: e1d333be ldrh r3, [r3, #62] ; 0x3e
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
30009e58: e1c171b2 strh r7, [r1, #18]
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
30009e5c: e5810030 str r0, [r1, #48] ; 0x30
/*
* 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 =
30009e60: e5816004 str r6, [r1, #4]
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
30009e64: e1c131b4 strh r3, [r1, #20]
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
30009e68: e581500c str r5, [r1, #12]
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
30009e6c: e5814008 str r4, [r1, #8]
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
30009e70: e581c028 str ip, [r1, #40] ; 0x28
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
30009e74: e5812038 str r2, [r1, #56] ; 0x38
return 0;
30009e78: e3a00000 mov r0, #0
}
30009e7c: e8bd80f0 pop {r4, r5, r6, r7, pc}
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
30009e80: e593c054 ldr ip, [r3, #84] ; 0x54
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
30009e84: e5932050 ldr r2, [r3, #80] ; 0x50
30009e88: e581c01c str ip, [r1, #28]
30009e8c: e5812018 str r2, [r1, #24]
break;
30009e90: eaffffe2 b 30009e20 <IMFS_stat+0x44>
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
30009e94: eb000b87 bl 3000ccb8 <__errno> <== NOT EXECUTED
30009e98: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
30009e9c: e5803000 str r3, [r0] <== NOT EXECUTED
30009ea0: e3e00000 mvn r0, #0 <== NOT EXECUTED
30009ea4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
break;
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
30009ea8: e2835050 add r5, r3, #80 ; 0x50
30009eac: e8950030 ldm r5, {r4, r5}
30009eb0: e5814020 str r4, [r1, #32]
30009eb4: e5815024 str r5, [r1, #36] ; 0x24
break;
30009eb8: eaffffd8 b 30009e20 <IMFS_stat+0x44>
30001aa8 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
30001aa8: e92d40f0 push {r4, r5, r6, r7, lr}
30001aac: e1a06000 mov r6, r0
30001ab0: e24dd040 sub sp, sp, #64 ; 0x40
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
30001ab4: e1a00002 mov r0, r2
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
30001ab8: e1a07002 mov r7, r2
30001abc: e1a05001 mov r5, r1
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
30001ac0: eb00306c bl 3000dc78 <strlen>
30001ac4: e28d4004 add r4, sp, #4
30001ac8: e1a01000 mov r1, r0
30001acc: e1a02004 mov r2, r4
30001ad0: e28d303c add r3, sp, #60 ; 0x3c
30001ad4: e1a00007 mov r0, r7
30001ad8: eb002054 bl 30009c30 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
30001adc: e1a00005 mov r0, r5
30001ae0: eb003050 bl 3000dc28 <strdup>
if (info.sym_link.name == NULL) {
30001ae4: e3500000 cmp r0, #0
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
30001ae8: e58d0028 str r0, [sp, #40] ; 0x28
if (info.sym_link.name == NULL) {
30001aec: 0a00000d beq 30001b28 <IMFS_symlink+0x80>
new_node = IMFS_create_node(
parent_loc,
IMFS_SYM_LINK,
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
30001af0: e28d3028 add r3, sp, #40 ; 0x28
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
30001af4: e58d3000 str r3, [sp]
30001af8: e3a01004 mov r1, #4
30001afc: e1a00006 mov r0, r6
30001b00: e1a02004 mov r2, r4
30001b04: e59f3030 ldr r3, [pc, #48] ; 30001b3c <IMFS_symlink+0x94>
30001b08: eb001d83 bl 3000911c <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
30001b0c: e3500000 cmp r0, #0
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
30001b10: 13a00000 movne r0, #0
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
30001b14: 0a000001 beq 30001b20 <IMFS_symlink+0x78>
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
30001b18: e28dd040 add sp, sp, #64 ; 0x40
30001b1c: e8bd80f0 pop {r4, r5, r6, r7, pc}
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
30001b20: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED
30001b24: eb00015f bl 300020a8 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
30001b28: eb002c62 bl 3000ccb8 <__errno> <== NOT EXECUTED
30001b2c: e3a0300c mov r3, #12 <== NOT EXECUTED
30001b30: e5803000 str r3, [r0] <== NOT EXECUTED
30001b34: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001b38: eafffff6 b 30001b18 <IMFS_symlink+0x70> <== NOT EXECUTED
30001b40 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001b40: e92d41f0 push {r4, r5, r6, r7, r8, lr}
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
30001b44: e5915000 ldr r5, [r1]
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001b48: e24dd01c sub sp, sp, #28
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001b4c: e595304c ldr r3, [r5, #76] ; 0x4c
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001b50: e1a04001 mov r4, r1
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001b54: e3530003 cmp r3, #3
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001b58: e1a06000 mov r6, r0
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001b5c: 0a000006 beq 30001b7c <IMFS_unlink+0x3c>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
30001b60: e5943008 ldr r3, [r4, #8]
30001b64: e1a00006 mov r0, r6
30001b68: e1a01004 mov r1, r4
30001b6c: e1a0e00f mov lr, pc
30001b70: e593f034 ldr pc, [r3, #52] ; 0x34
return result;
}
30001b74: e28dd01c add sp, sp, #28
30001b78: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
30001b7c: e595e050 ldr lr, [r5, #80] ; 0x50
30001b80: e35e0000 cmp lr, #0
30001b84: 0a00001f beq 30001c08 <IMFS_unlink+0xc8>
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
30001b88: e1a0c00d mov ip, sp
30001b8c: e1a07001 mov r7, r1
30001b90: e8b7000f ldm r7!, {r0, r1, r2, r3}
30001b94: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001b98: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node;
30001b9c: e28d801c add r8, sp, #28
IMFS_Set_handlers( &the_link );
30001ba0: 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;
30001ba4: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node;
30001ba8: e528e01c str lr, [r8, #-28]!
IMFS_Set_handlers( &the_link );
30001bac: eb001dbb bl 300092a0 <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)
30001bb0: e5953050 ldr r3, [r5, #80] ; 0x50
30001bb4: e1d323b4 ldrh r2, [r3, #52] ; 0x34
30001bb8: e3520001 cmp r2, #1
30001bbc: 0a000008 beq 30001be4 <IMFS_unlink+0xa4>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
30001bc0: e2422001 sub r2, r2, #1
30001bc4: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
30001bc8: e28d0014 add r0, sp, #20
30001bcc: e3a01000 mov r1, #0
30001bd0: eb00015d bl 3000214c <gettimeofday>
30001bd4: e5953050 ldr r3, [r5, #80] ; 0x50
30001bd8: e59d2014 ldr r2, [sp, #20]
30001bdc: e5832048 str r2, [r3, #72] ; 0x48
30001be0: eaffffde b 30001b60 <IMFS_unlink+0x20>
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
30001be4: e1a00006 mov r0, r6
30001be8: e1a0100d mov r1, sp
30001bec: e59d3008 ldr r3, [sp, #8]
30001bf0: e1a0e00f mov lr, pc
30001bf4: e593f034 ldr pc, [r3, #52] ; 0x34
if ( result != 0 )
30001bf8: e3500000 cmp r0, #0
30001bfc: 0affffd7 beq 30001b60 <IMFS_unlink+0x20>
return -1;
30001c00: e3e00000 mvn r0, #0
30001c04: eaffffda b 30001b74 <IMFS_unlink+0x34>
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
30001c08: eb002c2a bl 3000ccb8 <__errno> <== NOT EXECUTED
30001c0c: e3a03016 mov r3, #22 <== NOT EXECUTED
30001c10: e5803000 str r3, [r0] <== NOT EXECUTED
30001c14: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001c18: eaffffd5 b 30001b74 <IMFS_unlink+0x34> <== NOT EXECUTED
30001c1c <IMFS_unmount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
30001c1c: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
30001c20: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
30001c24: e593204c ldr r2, [r3, #76] ; 0x4c
30001c28: e3520001 cmp r2, #1
30001c2c: 1a000005 bne 30001c48 <IMFS_unmount+0x2c>
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
30001c30: e593205c ldr r2, [r3, #92] ; 0x5c
30001c34: e3520000 cmp r2, #0
30001c38: 0a000007 beq 30001c5c <IMFS_unmount+0x40>
/*
* 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;
30001c3c: e3a00000 mov r0, #0
30001c40: e583005c str r0, [r3, #92] ; 0x5c
return 0;
}
30001c44: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
30001c48: eb002c1a bl 3000ccb8 <__errno> <== NOT EXECUTED
30001c4c: e3a03014 mov r3, #20 <== NOT EXECUTED
30001c50: e5803000 str r3, [r0] <== NOT EXECUTED
30001c54: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001c58: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
30001c5c: eb002c15 bl 3000ccb8 <__errno> <== NOT EXECUTED
30001c60: e3a03016 mov r3, #22 <== NOT EXECUTED
30001c64: e5803000 str r3, [r0] <== NOT EXECUTED
30001c68: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001c6c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
300016a4 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
300016a4: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
(*print_handler)(
300016a8: e5908008 ldr r8, [r0, #8] <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
300016ac: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
(*print_handler)(
300016b0: e59f4078 ldr r4, [pc, #120] ; 30001730 <Stack_check_Dump_threads_usage+0x8c><== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
300016b4: e1a05000 mov r5, r0 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
#endif
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
300016b8: e59090c0 ldr r9, [r0, #192] ; 0xc0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
(*print_handler)(
300016bc: e28d2008 add r2, sp, #8 <== NOT EXECUTED
300016c0: e1a00008 mov r0, r8 <== NOT EXECUTED
300016c4: e3a01005 mov r1, #5 <== NOT EXECUTED
300016c8: e594a004 ldr sl, [r4, #4] <== NOT EXECUTED
current = 0;
} else
#else
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
300016cc: e59560f0 ldr r6, [r5, #240] ; 0xf0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
(*print_handler)(
300016d0: e5947000 ldr r7, [r4] <== NOT EXECUTED
300016d4: eb001018 bl 3000573c <rtems_object_get_name> <== NOT EXECUTED
300016d8: e1a02008 mov r2, r8 <== NOT EXECUTED
300016dc: e1a03000 mov r3, r0 <== NOT EXECUTED
300016e0: e59f104c ldr r1, [pc, #76] ; 30001734 <Stack_check_Dump_threads_usage+0x90><== NOT EXECUTED
300016e4: e1a0000a mov r0, sl <== NOT EXECUTED
300016e8: e1a0e00f mov lr, pc <== NOT EXECUTED
300016ec: e12fff17 bx r7 <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
300016f0: e59530c0 ldr r3, [r5, #192] ; 0xc0 <== NOT EXECUTED
300016f4: e59520c4 ldr r2, [r5, #196] ; 0xc4 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
#endif
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
300016f8: e2499010 sub r9, r9, #16 <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
300016fc: e2433001 sub r3, r3, #1 <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
30001700: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
30001704: e88d0240 stm sp, {r6, r9} <== NOT EXECUTED
30001708: e59f1028 ldr r1, [pc, #40] ; 30001738 <Stack_check_Dump_threads_usage+0x94><== NOT EXECUTED
3000170c: e0823003 add r3, r2, r3 <== NOT EXECUTED
30001710: e1a0e00f mov lr, pc <== NOT EXECUTED
30001714: e594f000 ldr pc, [r4] <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
30001718: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
3000171c: e59f1018 ldr r1, [pc, #24] ; 3000173c <Stack_check_Dump_threads_usage+0x98><== NOT EXECUTED
30001720: e1a0e00f mov lr, pc <== NOT EXECUTED
30001724: e594f000 ldr pc, [r4] <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
30001728: e28dd010 add sp, sp, #16 <== NOT EXECUTED
3000172c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
30001740 <Stack_check_Initialize>:
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
}
#endif
Stack_check_Initialized = 1;
}
30001740: e12fff1e bx lr <== NOT EXECUTED
30001788 <Stack_check_report_blown_task>:
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
30001788: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
3000178c: e1a06000 mov r6, r0 <== NOT EXECUTED
30001790: e24dd020 sub sp, sp, #32 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
char name [32];
printk("BLOWN STACK!!!\n");
30001794: e59f0084 ldr r0, [pc, #132] ; 30001820 <Stack_check_report_blown_task+0x98><== NOT EXECUTED
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
30001798: e20140ff and r4, r1, #255 ; 0xff <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
3000179c: e59650c4 ldr r5, [r6, #196] ; 0xc4 <== NOT EXECUTED
char name [32];
printk("BLOWN STACK!!!\n");
300017a0: eb00066b bl 30003154 <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
300017a4: e59f0078 ldr r0, [pc, #120] ; 30001824 <Stack_check_report_blown_task+0x9c><== NOT EXECUTED
300017a8: e1a01006 mov r1, r6 <== NOT EXECUTED
300017ac: eb000668 bl 30003154 <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
300017b0: e59f0070 ldr r0, [pc, #112] ; 30001828 <Stack_check_report_blown_task+0xa0><== NOT EXECUTED
300017b4: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED
300017b8: eb000665 bl 30003154 <printk> <== NOT EXECUTED
printk(
300017bc: e59f0068 ldr r0, [pc, #104] ; 3000182c <Stack_check_report_blown_task+0xa4><== NOT EXECUTED
300017c0: e596100c ldr r1, [r6, #12] <== NOT EXECUTED
300017c4: eb000662 bl 30003154 <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
300017c8: e1a0200d mov r2, sp <== NOT EXECUTED
300017cc: e3a01020 mov r1, #32 <== NOT EXECUTED
300017d0: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED
300017d4: eb000fd8 bl 3000573c <rtems_object_get_name> <== NOT EXECUTED
300017d8: e1a01000 mov r1, r0 <== NOT EXECUTED
300017dc: e59f004c ldr r0, [pc, #76] ; 30001830 <Stack_check_report_blown_task+0xa8><== NOT EXECUTED
300017e0: eb00065b bl 30003154 <printk> <== NOT EXECUTED
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
300017e4: e59620c4 ldr r2, [r6, #196] ; 0xc4 <== NOT EXECUTED
300017e8: e59610c0 ldr r1, [r6, #192] ; 0xc0 <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
300017ec: e59f0040 ldr r0, [pc, #64] ; 30001834 <Stack_check_report_blown_task+0xac><== NOT EXECUTED
300017f0: e0823001 add r3, r2, r1 <== NOT EXECUTED
300017f4: eb000656 bl 30003154 <printk> <== NOT EXECUTED
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
300017f8: e3540000 cmp r4, #0 <== NOT EXECUTED
300017fc: 0a000001 beq 30001808 <Stack_check_report_blown_task+0x80> <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
30001800: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED
30001804: eb0011f3 bl 30005fd8 <rtems_fatal_error_occurred> <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
30001808: e59f0028 ldr r0, [pc, #40] ; 30001838 <Stack_check_report_blown_task+0xb0><== NOT EXECUTED
3000180c: e3a01010 mov r1, #16 <== NOT EXECUTED
30001810: e2852008 add r2, r5, #8 <== NOT EXECUTED
30001814: e2853018 add r3, r5, #24 <== NOT EXECUTED
30001818: eb00064d bl 30003154 <printk> <== NOT EXECUTED
3000181c: eafffff7 b 30001800 <Stack_check_report_blown_task+0x78> <== NOT EXECUTED
30016d44 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
30016d44: 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
)
{
30016d48: 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 ) {
30016d4c: e1530002 cmp r3, r2
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
30016d50: e1a07000 mov r7, r0
30016d54: e1a05002 mov r5, r2
30016d58: e1a08001 mov r8, r1
30016d5c: e59da020 ldr sl, [sp, #32]
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
30016d60: 3a000016 bcc 30016dc0 <_CORE_message_queue_Broadcast+0x7c>
* 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 ) {
30016d64: e5906048 ldr r6, [r0, #72] ; 0x48
30016d68: e3560000 cmp r6, #0
*count = 0;
30016d6c: 13a00000 movne r0, #0
30016d70: 158a0000 strne r0, [sl]
* 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 ) {
30016d74: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc}
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
30016d78: e1a00007 mov r0, r7
30016d7c: eb000a0d bl 300195b8 <_Thread_queue_Dequeue>
30016d80: e2504000 subs r4, r0, #0
30016d84: 0a00000a beq 30016db4 <_CORE_message_queue_Broadcast+0x70>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
30016d88: e594002c ldr r0, [r4, #44] ; 0x2c
30016d8c: e1a01008 mov r1, r8
30016d90: e1a02005 mov r2, r5
30016d94: eb00207d bl 3001ef90 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
30016d98: e5943028 ldr r3, [r4, #40] ; 0x28
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
30016d9c: e1a00007 mov r0, r7
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
30016da0: e5835000 str r5, [r3]
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
30016da4: eb000a03 bl 300195b8 <_Thread_queue_Dequeue>
30016da8: e2504000 subs r4, r0, #0
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
30016dac: e2866001 add r6, r6, #1
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
30016db0: 1afffff4 bne 30016d88 <_CORE_message_queue_Broadcast+0x44>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
30016db4: e58a6000 str r6, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
30016db8: e1a00004 mov r0, r4
30016dbc: 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;
30016dc0: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
30016dc4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
3000ac0c <_CORE_mutex_Seize_interrupt_trylock>:
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
3000ac0c: e59f215c ldr r2, [pc, #348] ; 3000ad70 <_CORE_mutex_Seize_interrupt_trylock+0x164>
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
3000ac10: e590c050 ldr ip, [r0, #80] ; 0x50
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
3000ac14: e1a03000 mov r3, r0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
3000ac18: e5922004 ldr r2, [r2, #4]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
3000ac1c: e3a00000 mov r0, #0
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
3000ac20: e15c0000 cmp ip, r0
3000ac24: e92d40f0 push {r4, r5, r6, r7, lr}
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
3000ac28: e5820034 str r0, [r2, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
3000ac2c: 0a00000e beq 3000ac6c <_CORE_mutex_Seize_interrupt_trylock+0x60>
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
3000ac30: e593c048 ldr ip, [r3, #72] ; 0x48
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
3000ac34: e5925008 ldr r5, [r2, #8]
the_mutex->nest_count = 1;
3000ac38: e3a04001 mov r4, #1
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
3000ac3c: e35c0002 cmp ip, #2
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
3000ac40: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->holder = executing;
3000ac44: e583205c str r2, [r3, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
3000ac48: e5835060 str r5, [r3, #96] ; 0x60
the_mutex->nest_count = 1;
3000ac4c: e5834054 str r4, [r3, #84] ; 0x54
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
3000ac50: 0a000013 beq 3000aca4 <_CORE_mutex_Seize_interrupt_trylock+0x98>
3000ac54: e35c0003 cmp ip, #3
3000ac58: 0a000018 beq 3000acc0 <_CORE_mutex_Seize_interrupt_trylock+0xb4>
3000ac5c: e5913000 ldr r3, [r1]
3000ac60: e129f003 msr CPSR_fc, r3
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
return 0;
3000ac64: e3a00000 mov r0, #0
3000ac68: e8bd80f0 pop {r4, r5, r6, r7, 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 ) ) {
3000ac6c: e593005c ldr r0, [r3, #92] ; 0x5c
3000ac70: e1520000 cmp r2, r0
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
3000ac74: 13a00001 movne r0, #1
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
3000ac78: 18bd80f0 popne {r4, r5, r6, r7, pc}
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
3000ac7c: e5930040 ldr r0, [r3, #64] ; 0x40
3000ac80: e3500000 cmp r0, #0
3000ac84: 1a00001e bne 3000ad04 <_CORE_mutex_Seize_interrupt_trylock+0xf8>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
3000ac88: e5932054 ldr r2, [r3, #84] ; 0x54
3000ac8c: e2822001 add r2, r2, #1
3000ac90: e5832054 str r2, [r3, #84] ; 0x54
3000ac94: e5913000 ldr r3, [r1]
3000ac98: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
3000ac9c: e3a00000 mov r0, #0
3000aca0: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
3000aca4: e592301c ldr r3, [r2, #28]
3000aca8: e2833001 add r3, r3, #1
3000acac: e582301c str r3, [r2, #28]
3000acb0: e5913000 ldr r3, [r1]
3000acb4: e129f003 msr CPSR_fc, r3
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
return 0;
3000acb8: e3a00000 mov r0, #0
3000acbc: e8bd80f0 pop {r4, r5, r6, r7, pc}
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
3000acc0: e592c01c ldr ip, [r2, #28]
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
3000acc4: e593704c ldr r7, [r3, #76] ; 0x4c
current = executing->current_priority;
3000acc8: e5926014 ldr r6, [r2, #20]
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
3000accc: e08c5004 add r5, ip, r4
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
3000acd0: e1570006 cmp r7, r6
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
3000acd4: e582501c str r5, [r2, #28]
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
3000acd8: 0a000020 beq 3000ad60 <_CORE_mutex_Seize_interrupt_trylock+0x154>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
3000acdc: 3a000012 bcc 3000ad2c <_CORE_mutex_Seize_interrupt_trylock+0x120>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
3000ace0: e3a05006 mov r5, #6
3000ace4: e5825034 str r5, [r2, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
3000ace8: e5834050 str r4, [r3, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
3000acec: e5830054 str r0, [r3, #84] ; 0x54
executing->resource_count--; /* undo locking above */
3000acf0: e582c01c str ip, [r2, #28]
3000acf4: e5913000 ldr r3, [r1]
3000acf8: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
3000acfc: e3a00000 mov r0, #0
3000ad00: e8bd80f0 pop {r4, r5, r6, r7, 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 ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
3000ad04: e3500001 cmp r0, #1
3000ad08: 0a000001 beq 3000ad14 <_CORE_mutex_Seize_interrupt_trylock+0x108>
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
3000ad0c: e3a00001 mov r0, #1
3000ad10: e8bd80f0 pop {r4, r5, r6, r7, pc}
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
3000ad14: e3a03002 mov r3, #2 <== NOT EXECUTED
3000ad18: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED
3000ad1c: e5913000 ldr r3, [r1] <== NOT EXECUTED
3000ad20: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_ISR_Enable( *level_p );
return 0;
3000ad24: e3a00000 mov r0, #0 <== NOT EXECUTED
3000ad28: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
3000ad2c: e59f2040 ldr r2, [pc, #64] ; 3000ad74 <_CORE_mutex_Seize_interrupt_trylock+0x168>
3000ad30: e5920000 ldr r0, [r2]
3000ad34: e2800001 add r0, r0, #1
3000ad38: e5820000 str r0, [r2]
3000ad3c: e5912000 ldr r2, [r1]
3000ad40: e129f002 msr CPSR_fc, r2
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
3000ad44: e3a02000 mov r2, #0
3000ad48: e593005c ldr r0, [r3, #92] ; 0x5c
3000ad4c: e593104c ldr r1, [r3, #76] ; 0x4c
3000ad50: ebfff149 bl 3000727c <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
3000ad54: ebfff2a3 bl 300077e8 <_Thread_Enable_dispatch>
return 0;
3000ad58: e3a00000 mov r0, #0
3000ad5c: e8bd80f0 pop {r4, r5, r6, r7, pc}
3000ad60: e5913000 ldr r3, [r1]
3000ad64: e129f003 msr CPSR_fc, r3
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
return 0;
3000ad68: e3a00000 mov r0, #0
3000ad6c: e8bd80f0 pop {r4, r5, r6, r7, pc}
3000abb0 <_Chain_Initialize>:
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
3000abb0: e3520000 cmp r2, #0
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
3000abb4: e3a0c000 mov ip, #0
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
3000abb8: e92d0070 push {r4, r5, r6}
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
3000abbc: e580c004 str ip, [r0, #4]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
3000abc0: e1a04000 mov r4, r0
next = starting_address;
3000abc4: 11a05002 movne r5, r2
3000abc8: 11a0c001 movne ip, r1
while ( count-- ) {
3000abcc: 1a000002 bne 3000abdc <_Chain_Initialize+0x2c>
3000abd0: ea000008 b 3000abf8 <_Chain_Initialize+0x48> <== NOT EXECUTED
3000abd4: e1a0400c mov r4, ip
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
3000abd8: e1a0c006 mov ip, r6
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
3000abdc: e2555001 subs r5, r5, #1
current->next = next;
3000abe0: e584c000 str ip, [r4]
next->previous = current;
3000abe4: e58c4004 str r4, [ip, #4]
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
3000abe8: e08c6003 add r6, ip, r3
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
3000abec: 1afffff8 bne 3000abd4 <_Chain_Initialize+0x24>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
3000abf0: e2422001 sub r2, r2, #1
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
3000abf4: e0241293 mla r4, r3, r2, r1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3000abf8: e2803004 add r3, r0, #4
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
3000abfc: e5843000 str r3, [r4]
the_chain->last = current;
3000ac00: e5804008 str r4, [r0, #8]
}
3000ac04: e8bd0070 pop {r4, r5, r6}
3000ac08: e12fff1e bx lr
3000adec <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
3000adec: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000adf0: e1a08002 mov r8, r2
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
3000adf4: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
3000adf8: e24dd01c sub sp, sp, #28
3000adfc: e1a05001 mov r5, r1
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
3000ae00: e2911004 adds r1, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
3000ae04: e1a07000 mov r7, r0
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
3000ae08: e58d1000 str r1, [sp]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
3000ae0c: e1a0b003 mov fp, r3
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
3000ae10: e5909008 ldr r9, [r0, #8]
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
3000ae14: e58d200c str r2, [sp, #12]
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
3000ae18: 2a000073 bcs 3000afec <_Heap_Allocate_aligned_with_boundary+0x200>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
3000ae1c: e3530000 cmp r3, #0
3000ae20: 1a00006f bne 3000afe4 <_Heap_Allocate_aligned_with_boundary+0x1f8>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000ae24: e1570009 cmp r7, r9
3000ae28: 0a00006f beq 3000afec <_Heap_Allocate_aligned_with_boundary+0x200>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
3000ae2c: e59d300c ldr r3, [sp, #12]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
3000ae30: e2651004 rsb r1, r5, #4
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
3000ae34: e2833007 add r3, r3, #7
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000ae38: e3a06000 mov r6, #0
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
3000ae3c: e58d3010 str r3, [sp, #16]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
3000ae40: e58d1014 str r1, [sp, #20]
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
3000ae44: e599a004 ldr sl, [r9, #4]
3000ae48: e59d2000 ldr r2, [sp]
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
3000ae4c: e2866001 add r6, r6, #1
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
3000ae50: e152000a cmp r2, sl
3000ae54: 2a00004f bcs 3000af98 <_Heap_Allocate_aligned_with_boundary+0x1ac>
if ( alignment == 0 ) {
3000ae58: e3580000 cmp r8, #0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
3000ae5c: 02894008 addeq r4, r9, #8
3000ae60: 0a00004a beq 3000af90 <_Heap_Allocate_aligned_with_boundary+0x1a4>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
3000ae64: e5973014 ldr r3, [r7, #20]
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
3000ae68: e59d1014 ldr r1, [sp, #20]
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
3000ae6c: e59d2010 ldr r2, [sp, #16]
- 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;
3000ae70: e3caa001 bic sl, sl, #1
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
3000ae74: e089a00a add sl, r9, sl
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
3000ae78: e081400a add r4, r1, sl
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
3000ae7c: e58d3004 str r3, [sp, #4]
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
3000ae80: e0633002 rsb r3, r3, r2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
3000ae84: e1a00004 mov r0, r4
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
3000ae88: e083a00a add sl, r3, sl
3000ae8c: e1a01008 mov r1, r8
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
3000ae90: e2893008 add r3, r9, #8
3000ae94: e58d3008 str r3, [sp, #8]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
3000ae98: eb00157b bl 3001048c <__umodsi3>
3000ae9c: e0604004 rsb r4, r0, r4
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
3000aea0: e15a0004 cmp sl, r4
3000aea4: 2a000003 bcs 3000aeb8 <_Heap_Allocate_aligned_with_boundary+0xcc>
3000aea8: e1a0000a mov r0, sl
3000aeac: e1a01008 mov r1, r8
3000aeb0: eb001575 bl 3001048c <__umodsi3>
3000aeb4: e060400a rsb r4, r0, sl
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
3000aeb8: e35b0000 cmp fp, #0
3000aebc: 0a000025 beq 3000af58 <_Heap_Allocate_aligned_with_boundary+0x16c>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
3000aec0: e084a005 add sl, r4, r5
3000aec4: e1a0000a mov r0, sl
3000aec8: e1a0100b mov r1, fp
3000aecc: eb00156e bl 3001048c <__umodsi3>
3000aed0: e060000a rsb r0, r0, sl
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
3000aed4: e1540000 cmp r4, r0
3000aed8: 23a03000 movcs r3, #0
3000aedc: 33a03001 movcc r3, #1
3000aee0: e15a0000 cmp sl, r0
3000aee4: 93a03000 movls r3, #0
3000aee8: e3530000 cmp r3, #0
3000aeec: 0a000019 beq 3000af58 <_Heap_Allocate_aligned_with_boundary+0x16c>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
3000aef0: e59d1008 ldr r1, [sp, #8]
3000aef4: e081a005 add sl, r1, r5
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
3000aef8: e15a0000 cmp sl, r0
3000aefc: 958d6018 strls r6, [sp, #24]
3000af00: 9a000002 bls 3000af10 <_Heap_Allocate_aligned_with_boundary+0x124>
3000af04: ea000023 b 3000af98 <_Heap_Allocate_aligned_with_boundary+0x1ac>
3000af08: e15a0000 cmp sl, r0
3000af0c: 8a000038 bhi 3000aff4 <_Heap_Allocate_aligned_with_boundary+0x208>
return 0;
}
alloc_begin = boundary_line - alloc_size;
3000af10: e0654000 rsb r4, r5, r0
3000af14: e1a01008 mov r1, r8
3000af18: e1a00004 mov r0, r4
3000af1c: eb00155a bl 3001048c <__umodsi3>
3000af20: e0604004 rsb r4, r0, r4
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
3000af24: e0846005 add r6, r4, r5
3000af28: e1a00006 mov r0, r6
3000af2c: e1a0100b mov r1, fp
3000af30: eb001555 bl 3001048c <__umodsi3>
3000af34: e0600006 rsb r0, r0, r6
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
3000af38: e1560000 cmp r6, r0
3000af3c: 93a06000 movls r6, #0
3000af40: 83a06001 movhi r6, #1
3000af44: e1540000 cmp r4, r0
3000af48: 23a06000 movcs r6, #0
3000af4c: e3560000 cmp r6, #0
3000af50: 1affffec bne 3000af08 <_Heap_Allocate_aligned_with_boundary+0x11c>
3000af54: e59d6018 ldr r6, [sp, #24]
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
3000af58: e59d2008 ldr r2, [sp, #8]
3000af5c: e1520004 cmp r2, r4
3000af60: 8a00000c bhi 3000af98 <_Heap_Allocate_aligned_with_boundary+0x1ac>
3000af64: e59d100c ldr r1, [sp, #12]
3000af68: e1a00004 mov r0, r4
3000af6c: eb001546 bl 3001048c <__umodsi3>
3000af70: e3e0a007 mvn sl, #7
3000af74: e069a00a rsb sl, r9, sl
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
3000af78: e08aa004 add sl, sl, r4
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
if ( free_size >= min_block_size || free_size == 0 ) {
3000af7c: e59d1004 ldr r1, [sp, #4]
3000af80: e060300a rsb r3, r0, sl
3000af84: e15a0000 cmp sl, r0
3000af88: 11510003 cmpne r1, r3
3000af8c: 8a000001 bhi 3000af98 <_Heap_Allocate_aligned_with_boundary+0x1ac>
boundary
);
}
}
if ( alloc_begin != 0 ) {
3000af90: e3540000 cmp r4, #0
3000af94: 1a000004 bne 3000afac <_Heap_Allocate_aligned_with_boundary+0x1c0>
break;
}
block = block->next;
3000af98: e5999008 ldr r9, [r9, #8]
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000af9c: e1570009 cmp r7, r9
3000afa0: 1affffa7 bne 3000ae44 <_Heap_Allocate_aligned_with_boundary+0x58>
3000afa4: e3a00000 mov r0, #0
3000afa8: ea000008 b 3000afd0 <_Heap_Allocate_aligned_with_boundary+0x1e4>
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
3000afac: e597304c ldr r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
3000afb0: e1a00007 mov r0, r7
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
3000afb4: e0833006 add r3, r3, r6
3000afb8: e587304c str r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
3000afbc: e1a01009 mov r1, r9
3000afc0: e1a02004 mov r2, r4
3000afc4: e1a03005 mov r3, r5
3000afc8: ebffee29 bl 30006874 <_Heap_Block_allocate>
3000afcc: e1a00004 mov r0, r4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
3000afd0: e5973044 ldr r3, [r7, #68] ; 0x44
3000afd4: e1530006 cmp r3, r6
stats->max_search = search_count;
3000afd8: 35876044 strcc r6, [r7, #68] ; 0x44
}
return (void *) alloc_begin;
}
3000afdc: e28dd01c add sp, sp, #28
3000afe0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
3000afe4: e1550003 cmp r5, r3
3000afe8: 9a000006 bls 3000b008 <_Heap_Allocate_aligned_with_boundary+0x21c>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000afec: e3a00000 mov r0, #0
3000aff0: eafffff9 b 3000afdc <_Heap_Allocate_aligned_with_boundary+0x1f0>
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
3000aff4: e5999008 ldr r9, [r9, #8] <== NOT EXECUTED
3000aff8: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000affc: e1570009 cmp r7, r9 <== NOT EXECUTED
3000b000: 1affff8f bne 3000ae44 <_Heap_Allocate_aligned_with_boundary+0x58><== NOT EXECUTED
3000b004: eaffffe6 b 3000afa4 <_Heap_Allocate_aligned_with_boundary+0x1b8><== NOT EXECUTED
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
alignment = page_size;
3000b008: e3580000 cmp r8, #0
3000b00c: 01a08002 moveq r8, r2
3000b010: eaffff83 b 3000ae24 <_Heap_Allocate_aligned_with_boundary+0x38>
3000b014 <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
3000b014: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
3000b018: e1a04000 mov r4, r0
3000b01c: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
3000b020: e1a00001 mov r0, r1
3000b024: e5941010 ldr r1, [r4, #16]
3000b028: eb001517 bl 3001048c <__umodsi3>
3000b02c: e2455008 sub r5, r5, #8
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
3000b030: e5943020 ldr r3, [r4, #32]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
3000b034: e0605005 rsb r5, r0, r5
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;
3000b038: e1550003 cmp r5, r3
3000b03c: 3a00002f bcc 3000b100 <_Heap_Free+0xec>
3000b040: e5941024 ldr r1, [r4, #36] ; 0x24
3000b044: e1550001 cmp r5, r1
3000b048: 8a00002c bhi 3000b100 <_Heap_Free+0xec>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000b04c: e595c004 ldr ip, [r5, #4]
- 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;
3000b050: e3cc6001 bic r6, ip, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
3000b054: e0852006 add r2, r5, r6
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;
3000b058: e1530002 cmp r3, r2
3000b05c: 8a000027 bhi 3000b100 <_Heap_Free+0xec>
3000b060: e1510002 cmp r1, r2
3000b064: 3a000027 bcc 3000b108 <_Heap_Free+0xf4>
3000b068: e5927004 ldr r7, [r2, #4]
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
3000b06c: e2170001 ands r0, r7, #1
3000b070: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
3000b074: e1510002 cmp r1, r2
- 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;
3000b078: e3c77001 bic r7, r7, #1
3000b07c: 03a08000 moveq r8, #0
3000b080: 0a000004 beq 3000b098 <_Heap_Free+0x84>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000b084: e0820007 add r0, r2, 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;
3000b088: e5900004 ldr r0, [r0, #4]
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
3000b08c: e3100001 tst r0, #1
3000b090: 13a08000 movne r8, #0
3000b094: 03a08001 moveq r8, #1
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
3000b098: e21c0001 ands r0, ip, #1
3000b09c: 1a00001b bne 3000b110 <_Heap_Free+0xfc>
uintptr_t const prev_size = block->prev_size;
3000b0a0: e595c000 ldr ip, [r5]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
3000b0a4: e06ca005 rsb sl, ip, r5
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;
3000b0a8: e153000a cmp r3, sl
3000b0ac: 88bd85f0 pophi {r4, r5, r6, r7, r8, sl, pc}
3000b0b0: e151000a cmp r1, sl
3000b0b4: 38bd85f0 popcc {r4, r5, r6, r7, r8, sl, pc}
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;
3000b0b8: e59a0004 ldr r0, [sl, #4]
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
3000b0bc: e2100001 ands r0, r0, #1
3000b0c0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
3000b0c4: e3580000 cmp r8, #0
3000b0c8: 0a000039 beq 3000b1b4 <_Heap_Free+0x1a0>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
3000b0cc: e5940038 ldr r0, [r4, #56] ; 0x38
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
3000b0d0: e0867007 add r7, r6, r7
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000b0d4: e5923008 ldr r3, [r2, #8]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
3000b0d8: e087c00c add ip, r7, ip
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000b0dc: e592200c ldr r2, [r2, #12]
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
3000b0e0: e2400001 sub r0, r0, #1
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
3000b0e4: e38c1001 orr r1, ip, #1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
3000b0e8: e5823008 str r3, [r2, #8]
next->prev = prev;
3000b0ec: e583200c str r2, [r3, #12]
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
3000b0f0: e5840038 str r0, [r4, #56] ; 0x38
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
3000b0f4: e58a1004 str r1, [sl, #4]
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
3000b0f8: e78ac00c str ip, [sl, ip]
3000b0fc: ea00000f b 3000b140 <_Heap_Free+0x12c>
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
3000b100: e3a00000 mov r0, #0
3000b104: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
3000b108: e3a00000 mov r0, #0 <== NOT EXECUTED
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000b10c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
3000b110: e3580000 cmp r8, #0
3000b114: 0a000014 beq 3000b16c <_Heap_Free+0x158>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000b118: e5923008 ldr r3, [r2, #8]
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
3000b11c: e0877006 add r7, r7, r6
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000b120: e592200c ldr r2, [r2, #12]
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
3000b124: e3871001 orr r1, r7, #1
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
3000b128: e5853008 str r3, [r5, #8]
new_block->prev = prev;
3000b12c: e585200c str r2, [r5, #12]
next->prev = new_block;
prev->next = new_block;
3000b130: e5825008 str r5, [r2, #8]
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
3000b134: e583500c str r5, [r3, #12]
3000b138: e5851004 str r1, [r5, #4]
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
3000b13c: e7857007 str r7, [r5, r7]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
3000b140: e5942040 ldr r2, [r4, #64] ; 0x40
++stats->frees;
3000b144: e5943050 ldr r3, [r4, #80] ; 0x50
stats->free_size += block_size;
3000b148: e5941030 ldr r1, [r4, #48] ; 0x30
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
3000b14c: e2422001 sub r2, r2, #1
++stats->frees;
3000b150: e2833001 add r3, r3, #1
stats->free_size += block_size;
3000b154: e0816006 add r6, r1, r6
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
3000b158: e5842040 str r2, [r4, #64] ; 0x40
++stats->frees;
3000b15c: e5843050 str r3, [r4, #80] ; 0x50
stats->free_size += block_size;
3000b160: e5846030 str r6, [r4, #48] ; 0x30
return( true );
3000b164: e3a00001 mov r0, #1
3000b168: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
3000b16c: e3863001 orr r3, r6, #1
3000b170: e5853004 str r3, [r5, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
3000b174: e5943038 ldr r3, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
3000b178: e594c03c ldr ip, [r4, #60] ; 0x3c
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
3000b17c: e5920004 ldr r0, [r2, #4]
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
3000b180: e5941008 ldr r1, [r4, #8]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
3000b184: e2833001 add r3, r3, #1
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
3000b188: e3c00001 bic r0, r0, #1
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
3000b18c: e153000c cmp r3, ip
new_block->next = next;
3000b190: e5851008 str r1, [r5, #8]
new_block->prev = block_before;
3000b194: e585400c str r4, [r5, #12]
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
3000b198: e5820004 str r0, [r2, #4]
block_before->next = new_block;
next->prev = new_block;
3000b19c: e581500c str r5, [r1, #12]
next_block->prev_size = block_size;
3000b1a0: e7856006 str r6, [r5, r6]
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
3000b1a4: e5845008 str r5, [r4, #8]
/* Statistics */
++stats->free_blocks;
3000b1a8: e5843038 str r3, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
3000b1ac: 8584303c strhi r3, [r4, #60] ; 0x3c
3000b1b0: eaffffe2 b 3000b140 <_Heap_Free+0x12c>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
3000b1b4: e086c00c add ip, r6, ip
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
3000b1b8: e38c3001 orr r3, ip, #1
3000b1bc: e58a3004 str r3, [sl, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
3000b1c0: e5923004 ldr r3, [r2, #4]
next_block->prev_size = size;
3000b1c4: e785c006 str ip, [r5, r6]
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
3000b1c8: e3c33001 bic r3, r3, #1
3000b1cc: e5823004 str r3, [r2, #4]
3000b1d0: eaffffda b 3000b140 <_Heap_Free+0x12c>
30012a18 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
30012a18: e92d40f0 push {r4, r5, r6, r7, lr}
30012a1c: e1a04000 mov r4, r0
30012a20: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
30012a24: e1a00001 mov r0, r1
30012a28: e5941010 ldr r1, [r4, #16]
30012a2c: e1a07002 mov r7, r2
30012a30: ebfff695 bl 3001048c <__umodsi3>
30012a34: e2456008 sub r6, r5, #8
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
30012a38: e5943020 ldr r3, [r4, #32]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
30012a3c: e0600006 rsb r0, r0, r6
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;
30012a40: e1500003 cmp r0, r3
30012a44: 3a000010 bcc 30012a8c <_Heap_Size_of_alloc_area+0x74>
30012a48: e5942024 ldr r2, [r4, #36] ; 0x24
30012a4c: e1500002 cmp r0, r2
30012a50: 8a00000d bhi 30012a8c <_Heap_Size_of_alloc_area+0x74>
- 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;
30012a54: e5906004 ldr r6, [r0, #4]
30012a58: e3c66001 bic r6, r6, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
30012a5c: e0806006 add r6, r0, r6
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;
30012a60: e1530006 cmp r3, r6
30012a64: 8a000008 bhi 30012a8c <_Heap_Size_of_alloc_area+0x74>
30012a68: e1520006 cmp r2, r6
30012a6c: 3a000008 bcc 30012a94 <_Heap_Size_of_alloc_area+0x7c>
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;
30012a70: e5960004 ldr r0, [r6, #4]
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
30012a74: e2100001 ands r0, r0, #1
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
30012a78: 12655004 rsbne r5, r5, #4
30012a7c: 10856006 addne r6, r5, r6
30012a80: 15876000 strne r6, [r7]
return true;
30012a84: 13a00001 movne r0, #1
30012a88: e8bd80f0 pop {r4, r5, r6, r7, pc}
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
30012a8c: e3a00000 mov r0, #0
30012a90: e8bd80f0 pop {r4, r5, r6, r7, pc}
30012a94: e3a00000 mov r0, #0 <== NOT EXECUTED
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
}
30012a98: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
300075bc <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
300075bc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
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() ) ) {
300075c0: e59f35cc ldr r3, [pc, #1484] ; 30007b94 <_Heap_Walk+0x5d8>
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;
300075c4: e31200ff tst r2, #255 ; 0xff
if ( !_System_state_Is_up( _System_state_Get() ) ) {
300075c8: e5933000 ldr r3, [r3]
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;
300075cc: e59f25c4 ldr r2, [pc, #1476] ; 30007b98 <_Heap_Walk+0x5dc>
300075d0: e59f95c4 ldr r9, [pc, #1476] ; 30007b9c <_Heap_Walk+0x5e0>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
300075d4: e1a0a001 mov sl, 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;
300075d8: 11a09002 movne r9, r2
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
300075dc: e5901010 ldr r1, [r0, #16]
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() ) ) {
300075e0: e3530003 cmp r3, #3
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
300075e4: e5902014 ldr r2, [r0, #20]
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
300075e8: e5903024 ldr r3, [r0, #36] ; 0x24
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
300075ec: e24dd038 sub sp, sp, #56 ; 0x38
300075f0: e1a04000 mov r4, r0
uintptr_t const page_size = heap->page_size;
300075f4: e58d1024 str r1, [sp, #36] ; 0x24
uintptr_t const min_block_size = heap->min_block_size;
300075f8: e58d2028 str r2, [sp, #40] ; 0x28
Heap_Block *const first_block = heap->first_block;
300075fc: e5908020 ldr r8, [r0, #32]
Heap_Block *const last_block = heap->last_block;
30007600: e58d302c str r3, [sp, #44] ; 0x2c
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() ) ) {
30007604: 0a000002 beq 30007614 <_Heap_Walk+0x58>
}
block = next_block;
} while ( block != first_block );
return true;
30007608: e3a00001 mov r0, #1
}
3000760c: e28dd038 add sp, sp, #56 ; 0x38
30007610: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
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)(
30007614: e594101c ldr r1, [r4, #28]
30007618: e5900018 ldr r0, [r0, #24]
3000761c: e5942008 ldr r2, [r4, #8]
30007620: e594300c ldr r3, [r4, #12]
30007624: e59dc028 ldr ip, [sp, #40] ; 0x28
30007628: e58d1008 str r1, [sp, #8]
3000762c: e59d102c ldr r1, [sp, #44] ; 0x2c
30007630: e58d0004 str r0, [sp, #4]
30007634: e58d1010 str r1, [sp, #16]
30007638: e58d2014 str r2, [sp, #20]
3000763c: e58d3018 str r3, [sp, #24]
30007640: e59f2558 ldr r2, [pc, #1368] ; 30007ba0 <_Heap_Walk+0x5e4>
30007644: e58dc000 str ip, [sp]
30007648: e58d800c str r8, [sp, #12]
3000764c: e1a0000a mov r0, sl
30007650: e3a01000 mov r1, #0
30007654: e59d3024 ldr r3, [sp, #36] ; 0x24
30007658: e1a0e00f mov lr, pc
3000765c: e12fff19 bx r9
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
30007660: e59d2024 ldr r2, [sp, #36] ; 0x24
30007664: e3520000 cmp r2, #0
30007668: 0a000026 beq 30007708 <_Heap_Walk+0x14c>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
3000766c: e59d3024 ldr r3, [sp, #36] ; 0x24
30007670: e2135003 ands r5, r3, #3
30007674: 1a00002a bne 30007724 <_Heap_Walk+0x168>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30007678: e59d0028 ldr r0, [sp, #40] ; 0x28
3000767c: e59d1024 ldr r1, [sp, #36] ; 0x24
30007680: ebffe543 bl 30000b94 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
30007684: e250b000 subs fp, r0, #0
30007688: 1a00002c bne 30007740 <_Heap_Walk+0x184>
3000768c: e2880008 add r0, r8, #8
30007690: e59d1024 ldr r1, [sp, #36] ; 0x24
30007694: ebffe53e bl 30000b94 <__umodsi3>
);
return false;
}
if (
30007698: e2506000 subs r6, r0, #0
3000769c: 1a00002f bne 30007760 <_Heap_Walk+0x1a4>
block = next_block;
} while ( block != first_block );
return true;
}
300076a0: e598b004 ldr fp, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
300076a4: e21b5001 ands r5, fp, #1
300076a8: 0a0000cd beq 300079e4 <_Heap_Walk+0x428>
- 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;
300076ac: e59dc02c ldr ip, [sp, #44] ; 0x2c
300076b0: e59c3004 ldr r3, [ip, #4]
300076b4: e3c33001 bic r3, r3, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
300076b8: e08c3003 add r3, ip, 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;
300076bc: e5935004 ldr r5, [r3, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
300076c0: e2155001 ands r5, r5, #1
300076c4: 0a000008 beq 300076ec <_Heap_Walk+0x130>
);
return false;
}
if (
300076c8: e1580003 cmp r8, r3
300076cc: 0a00002b beq 30007780 <_Heap_Walk+0x1c4>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
300076d0: e1a0000a mov r0, sl <== NOT EXECUTED
300076d4: e3a01001 mov r1, #1 <== NOT EXECUTED
300076d8: e59f24c4 ldr r2, [pc, #1220] ; 30007ba4 <_Heap_Walk+0x5e8> <== NOT EXECUTED
300076dc: e1a0e00f mov lr, pc <== NOT EXECUTED
300076e0: e12fff19 bx r9 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
300076e4: e1a00006 mov r0, r6 <== NOT EXECUTED
300076e8: eaffffc7 b 3000760c <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
300076ec: e1a0000a mov r0, sl
300076f0: e3a01001 mov r1, #1
300076f4: e59f24ac ldr r2, [pc, #1196] ; 30007ba8 <_Heap_Walk+0x5ec>
300076f8: e1a0e00f mov lr, pc
300076fc: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007700: e1a00005 mov r0, r5
30007704: eaffffc0 b 3000760c <_Heap_Walk+0x50>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
30007708: e1a0000a mov r0, sl
3000770c: e3a01001 mov r1, #1
30007710: e59f2494 ldr r2, [pc, #1172] ; 30007bac <_Heap_Walk+0x5f0>
30007714: e1a0e00f mov lr, pc
30007718: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
3000771c: e59d0024 ldr r0, [sp, #36] ; 0x24
30007720: eaffffb9 b 3000760c <_Heap_Walk+0x50>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
30007724: e1a0000a mov r0, sl
30007728: e3a01001 mov r1, #1
3000772c: e59f247c ldr r2, [pc, #1148] ; 30007bb0 <_Heap_Walk+0x5f4>
30007730: e1a0e00f mov lr, pc
30007734: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007738: e3a00000 mov r0, #0
3000773c: eaffffb2 b 3000760c <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
30007740: e1a0000a mov r0, sl
30007744: e3a01001 mov r1, #1
30007748: e59f2464 ldr r2, [pc, #1124] ; 30007bb4 <_Heap_Walk+0x5f8>
3000774c: e59d3028 ldr r3, [sp, #40] ; 0x28
30007750: e1a0e00f mov lr, pc
30007754: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007758: e1a00005 mov r0, r5
3000775c: eaffffaa b 3000760c <_Heap_Walk+0x50>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
30007760: e1a0000a mov r0, sl
30007764: e3a01001 mov r1, #1
30007768: e59f2448 ldr r2, [pc, #1096] ; 30007bb8 <_Heap_Walk+0x5fc>
3000776c: e1a03008 mov r3, r8
30007770: e1a0e00f mov lr, pc
30007774: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007778: e1a0000b mov r0, fp
3000777c: eaffffa2 b 3000760c <_Heap_Walk+0x50>
block = next_block;
} while ( block != first_block );
return true;
}
30007780: e5945008 ldr r5, [r4, #8]
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
30007784: e5947010 ldr r7, [r4, #16]
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 ) {
30007788: e1540005 cmp r4, r5
3000778c: 05943020 ldreq r3, [r4, #32]
30007790: 0a00000d beq 300077cc <_Heap_Walk+0x210>
block = next_block;
} while ( block != first_block );
return true;
}
30007794: e5943020 ldr r3, [r4, #32]
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;
30007798: e1530005 cmp r3, r5
3000779c: 9a000097 bls 30007a00 <_Heap_Walk+0x444>
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 ) ) {
(*printer)(
300077a0: e1a0000a mov r0, sl
300077a4: e3a01001 mov r1, #1
300077a8: e59f240c ldr r2, [pc, #1036] ; 30007bbc <_Heap_Walk+0x600>
300077ac: e1a03005 mov r3, r5
300077b0: e1a0e00f mov lr, pc
300077b4: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
300077b8: e3a00000 mov r0, #0
300077bc: eaffff92 b 3000760c <_Heap_Walk+0x50>
300077c0: e1a03008 mov r3, r8
300077c4: e59db034 ldr fp, [sp, #52] ; 0x34
300077c8: e59d8030 ldr r8, [sp, #48] ; 0x30
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
300077cc: e1a06008 mov r6, r8
- 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;
300077d0: e3cb7001 bic r7, fp, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
300077d4: e0875006 add r5, r7, r6
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;
300077d8: e1530005 cmp r3, r5
300077dc: 9a000008 bls 30007804 <_Heap_Walk+0x248>
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
300077e0: e1a0000a mov r0, sl
300077e4: e58d5000 str r5, [sp]
300077e8: e3a01001 mov r1, #1
300077ec: e59f23cc ldr r2, [pc, #972] ; 30007bc0 <_Heap_Walk+0x604>
300077f0: e1a03006 mov r3, r6
300077f4: e1a0e00f mov lr, pc
300077f8: e12fff19 bx r9
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
300077fc: e3a00000 mov r0, #0
30007800: eaffff81 b 3000760c <_Heap_Walk+0x50>
30007804: e5943024 ldr r3, [r4, #36] ; 0x24
30007808: e1530005 cmp r3, r5
3000780c: 3afffff3 bcc 300077e0 <_Heap_Walk+0x224>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30007810: e59d1024 ldr r1, [sp, #36] ; 0x24
30007814: e1a00007 mov r0, r7
30007818: ebffe4dd bl 30000b94 <__umodsi3>
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;
3000781c: e59d102c ldr r1, [sp, #44] ; 0x2c
30007820: e0563001 subs r3, r6, r1
30007824: 13a03001 movne r3, #1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
30007828: e3500000 cmp r0, #0
3000782c: 0a000001 beq 30007838 <_Heap_Walk+0x27c>
30007830: e3530000 cmp r3, #0
30007834: 1a0000aa bne 30007ae4 <_Heap_Walk+0x528>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
30007838: e59d2028 ldr r2, [sp, #40] ; 0x28
3000783c: e1520007 cmp r2, r7
30007840: 9a000001 bls 3000784c <_Heap_Walk+0x290>
30007844: e3530000 cmp r3, #0
30007848: 1a0000ae bne 30007b08 <_Heap_Walk+0x54c>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
3000784c: e1560005 cmp r6, r5
30007850: 3a000001 bcc 3000785c <_Heap_Walk+0x2a0>
30007854: e3530000 cmp r3, #0
30007858: 1a0000b4 bne 30007b30 <_Heap_Walk+0x574>
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;
3000785c: e5953004 ldr r3, [r5, #4]
30007860: e20bb001 and fp, fp, #1
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
30007864: e3130001 tst r3, #1
30007868: 0a000018 beq 300078d0 <_Heap_Walk+0x314>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
3000786c: e35b0000 cmp fp, #0
30007870: 0a00000c beq 300078a8 <_Heap_Walk+0x2ec>
(*printer)(
30007874: e58d7000 str r7, [sp]
30007878: e1a0000a mov r0, sl
3000787c: e3a01000 mov r1, #0
30007880: e59f233c ldr r2, [pc, #828] ; 30007bc4 <_Heap_Walk+0x608>
30007884: e1a03006 mov r3, r6
30007888: e1a0e00f mov lr, pc
3000788c: e12fff19 bx r9
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
30007890: e1580005 cmp r8, r5
30007894: 0affff5b beq 30007608 <_Heap_Walk+0x4c>
30007898: e595b004 ldr fp, [r5, #4]
3000789c: e5943020 ldr r3, [r4, #32]
300078a0: e1a06005 mov r6, r5
300078a4: eaffffc9 b 300077d0 <_Heap_Walk+0x214>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
300078a8: e58d7000 str r7, [sp]
300078ac: e5963000 ldr r3, [r6]
300078b0: e1a0000a mov r0, sl
300078b4: e58d3004 str r3, [sp, #4]
300078b8: e1a0100b mov r1, fp
300078bc: e59f2304 ldr r2, [pc, #772] ; 30007bc8 <_Heap_Walk+0x60c>
300078c0: e1a03006 mov r3, r6
300078c4: e1a0e00f mov lr, pc
300078c8: e12fff19 bx r9
300078cc: eaffffef b 30007890 <_Heap_Walk+0x2d4>
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 ?
300078d0: e596200c ldr r2, [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)(
300078d4: e5943008 ldr r3, [r4, #8]
block = next_block;
} while ( block != first_block );
return true;
}
300078d8: e594100c ldr r1, [r4, #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)(
300078dc: e1530002 cmp r3, r2
300078e0: 059f02e4 ldreq r0, [pc, #740] ; 30007bcc <_Heap_Walk+0x610>
300078e4: 0a000003 beq 300078f8 <_Heap_Walk+0x33c>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
300078e8: e59f32e0 ldr r3, [pc, #736] ; 30007bd0 <_Heap_Walk+0x614>
300078ec: e1540002 cmp r4, r2
300078f0: e59f02dc ldr r0, [pc, #732] ; 30007bd4 <_Heap_Walk+0x618>
300078f4: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
300078f8: e5963008 ldr r3, [r6, #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)(
300078fc: e1510003 cmp r1, r3
30007900: 059f12d0 ldreq r1, [pc, #720] ; 30007bd8 <_Heap_Walk+0x61c>
30007904: 0a000003 beq 30007918 <_Heap_Walk+0x35c>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
30007908: e59fc2cc ldr ip, [pc, #716] ; 30007bdc <_Heap_Walk+0x620>
3000790c: e1540003 cmp r4, r3
30007910: e59f12bc ldr r1, [pc, #700] ; 30007bd4 <_Heap_Walk+0x618>
30007914: 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)(
30007918: e58d2004 str r2, [sp, #4]
3000791c: e58d0008 str r0, [sp, #8]
30007920: e58d300c str r3, [sp, #12]
30007924: e58d1010 str r1, [sp, #16]
30007928: e1a03006 mov r3, r6
3000792c: e58d7000 str r7, [sp]
30007930: e1a0000a mov r0, sl
30007934: e3a01000 mov r1, #0
30007938: e59f22a0 ldr r2, [pc, #672] ; 30007be0 <_Heap_Walk+0x624>
3000793c: e1a0e00f mov lr, pc
30007940: e12fff19 bx r9
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
30007944: e5953000 ldr r3, [r5]
30007948: e1570003 cmp r7, r3
3000794c: 1a000011 bne 30007998 <_Heap_Walk+0x3dc>
);
return false;
}
if ( !prev_used ) {
30007950: e35b0000 cmp fp, #0
30007954: 0a00001a beq 300079c4 <_Heap_Walk+0x408>
block = next_block;
} while ( block != first_block );
return true;
}
30007958: e5943008 ldr r3, [r4, #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 ) {
3000795c: e1540003 cmp r4, r3
30007960: 0a000004 beq 30007978 <_Heap_Walk+0x3bc>
if ( free_block == block ) {
30007964: e1560003 cmp r6, r3
30007968: 0affffc8 beq 30007890 <_Heap_Walk+0x2d4>
return true;
}
free_block = free_block->next;
3000796c: 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 ) {
30007970: e1540003 cmp r4, r3
30007974: 1afffffa bne 30007964 <_Heap_Walk+0x3a8>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
30007978: e1a0000a mov r0, sl
3000797c: e3a01001 mov r1, #1
30007980: e59f225c ldr r2, [pc, #604] ; 30007be4 <_Heap_Walk+0x628>
30007984: e1a03006 mov r3, r6
30007988: e1a0e00f mov lr, pc
3000798c: e12fff19 bx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
30007990: e3a00000 mov r0, #0
30007994: eaffff1c b 3000760c <_Heap_Walk+0x50>
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
30007998: e58d3004 str r3, [sp, #4]
3000799c: e1a0000a mov r0, sl
300079a0: e58d7000 str r7, [sp]
300079a4: e58d5008 str r5, [sp, #8]
300079a8: e3a01001 mov r1, #1
300079ac: e59f2234 ldr r2, [pc, #564] ; 30007be8 <_Heap_Walk+0x62c>
300079b0: e1a03006 mov r3, r6
300079b4: e1a0e00f mov lr, pc
300079b8: e12fff19 bx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
300079bc: e3a00000 mov r0, #0
300079c0: eaffff11 b 3000760c <_Heap_Walk+0x50>
return false;
}
if ( !prev_used ) {
(*printer)(
300079c4: e1a0000a mov r0, sl
300079c8: e3a01001 mov r1, #1
300079cc: e59f2218 ldr r2, [pc, #536] ; 30007bec <_Heap_Walk+0x630>
300079d0: e1a03006 mov r3, r6
300079d4: e1a0e00f mov lr, pc
300079d8: e12fff19 bx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
300079dc: e1a0000b mov r0, fp
300079e0: eaffff09 b 3000760c <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
300079e4: e1a0000a mov r0, sl
300079e8: e3a01001 mov r1, #1
300079ec: e59f21fc ldr r2, [pc, #508] ; 30007bf0 <_Heap_Walk+0x634>
300079f0: e1a0e00f mov lr, pc
300079f4: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
300079f8: e1a00005 mov r0, r5
300079fc: eaffff02 b 3000760c <_Heap_Walk+0x50>
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;
30007a00: e594c024 ldr ip, [r4, #36] ; 0x24
30007a04: e15c0005 cmp ip, r5
30007a08: 3affff64 bcc 300077a0 <_Heap_Walk+0x1e4>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30007a0c: e2850008 add r0, r5, #8
30007a10: e1a01007 mov r1, r7
30007a14: e58d301c str r3, [sp, #28]
30007a18: e58dc020 str ip, [sp, #32]
30007a1c: ebffe45c bl 30000b94 <__umodsi3>
);
return false;
}
if (
30007a20: e3500000 cmp r0, #0
30007a24: e59d301c ldr r3, [sp, #28]
30007a28: e59dc020 ldr ip, [sp, #32]
30007a2c: 1a000048 bne 30007b54 <_Heap_Walk+0x598>
- 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;
30007a30: e5952004 ldr r2, [r5, #4]
30007a34: e3c22001 bic r2, r2, #1
block = next_block;
} while ( block != first_block );
return true;
}
30007a38: e0852002 add r2, r5, r2
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;
30007a3c: e5922004 ldr r2, [r2, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
30007a40: e3120001 tst r2, #1
30007a44: 1a00004a bne 30007b74 <_Heap_Walk+0x5b8>
30007a48: e58d8030 str r8, [sp, #48] ; 0x30
30007a4c: e58db034 str fp, [sp, #52] ; 0x34
30007a50: e1a01004 mov r1, r4
30007a54: e1a06005 mov r6, r5
30007a58: e1a0b00c mov fp, ip
30007a5c: e1a08003 mov r8, r3
30007a60: ea000013 b 30007ab4 <_Heap_Walk+0x4f8>
return false;
}
prev_block = free_block;
free_block = free_block->next;
30007a64: e5955008 ldr r5, [r5, #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 ) {
30007a68: e1540005 cmp r4, r5
30007a6c: 0affff53 beq 300077c0 <_Heap_Walk+0x204>
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;
30007a70: e1580005 cmp r8, r5
30007a74: 8affff49 bhi 300077a0 <_Heap_Walk+0x1e4>
30007a78: e155000b cmp r5, fp
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30007a7c: e2850008 add r0, r5, #8
30007a80: e1a01007 mov r1, r7
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;
30007a84: 8affff45 bhi 300077a0 <_Heap_Walk+0x1e4>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30007a88: ebffe441 bl 30000b94 <__umodsi3>
);
return false;
}
if (
30007a8c: e3500000 cmp r0, #0
30007a90: 1a00002f bne 30007b54 <_Heap_Walk+0x598>
- 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;
30007a94: e5953004 ldr r3, [r5, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
30007a98: e1a01006 mov r1, r6
30007a9c: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
30007aa0: e0833005 add r3, r3, r5
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;
30007aa4: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
30007aa8: e1a06005 mov r6, r5
30007aac: e3130001 tst r3, #1
30007ab0: 1a00002f bne 30007b74 <_Heap_Walk+0x5b8>
);
return false;
}
if ( free_block->prev != prev_block ) {
30007ab4: e595200c ldr r2, [r5, #12]
30007ab8: e1520001 cmp r2, r1
30007abc: 0affffe8 beq 30007a64 <_Heap_Walk+0x4a8>
(*printer)(
30007ac0: e58d2000 str r2, [sp]
30007ac4: e1a0000a mov r0, sl
30007ac8: e3a01001 mov r1, #1
30007acc: e59f2120 ldr r2, [pc, #288] ; 30007bf4 <_Heap_Walk+0x638>
30007ad0: e1a03005 mov r3, r5
30007ad4: e1a0e00f mov lr, pc
30007ad8: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007adc: e3a00000 mov r0, #0
30007ae0: eafffec9 b 3000760c <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
30007ae4: e1a0000a mov r0, sl
30007ae8: e58d7000 str r7, [sp]
30007aec: e3a01001 mov r1, #1
30007af0: e59f2100 ldr r2, [pc, #256] ; 30007bf8 <_Heap_Walk+0x63c>
30007af4: e1a03006 mov r3, r6
30007af8: e1a0e00f mov lr, pc
30007afc: e12fff19 bx r9
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
30007b00: e3a00000 mov r0, #0
30007b04: eafffec0 b 3000760c <_Heap_Walk+0x50>
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
30007b08: e58d2004 str r2, [sp, #4]
30007b0c: e1a0000a mov r0, sl
30007b10: e58d7000 str r7, [sp]
30007b14: e3a01001 mov r1, #1
30007b18: e59f20dc ldr r2, [pc, #220] ; 30007bfc <_Heap_Walk+0x640>
30007b1c: e1a03006 mov r3, r6
30007b20: e1a0e00f mov lr, pc
30007b24: e12fff19 bx r9
block,
block_size,
min_block_size
);
return false;
30007b28: e3a00000 mov r0, #0
30007b2c: eafffeb6 b 3000760c <_Heap_Walk+0x50>
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
30007b30: e1a0000a mov r0, sl
30007b34: e58d5000 str r5, [sp]
30007b38: e3a01001 mov r1, #1
30007b3c: e59f20bc ldr r2, [pc, #188] ; 30007c00 <_Heap_Walk+0x644>
30007b40: e1a03006 mov r3, r6
30007b44: e1a0e00f mov lr, pc
30007b48: e12fff19 bx r9
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
30007b4c: e3a00000 mov r0, #0
30007b50: eafffead b 3000760c <_Heap_Walk+0x50>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
30007b54: e1a0000a mov r0, sl
30007b58: e3a01001 mov r1, #1
30007b5c: e59f20a0 ldr r2, [pc, #160] ; 30007c04 <_Heap_Walk+0x648>
30007b60: e1a03005 mov r3, r5
30007b64: e1a0e00f mov lr, pc
30007b68: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007b6c: e3a00000 mov r0, #0
30007b70: eafffea5 b 3000760c <_Heap_Walk+0x50>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
30007b74: e1a0000a mov r0, sl
30007b78: e3a01001 mov r1, #1
30007b7c: e59f2084 ldr r2, [pc, #132] ; 30007c08 <_Heap_Walk+0x64c>
30007b80: e1a03005 mov r3, r5
30007b84: e1a0e00f mov lr, pc
30007b88: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007b8c: e3a00000 mov r0, #0
30007b90: eafffe9d b 3000760c <_Heap_Walk+0x50>
300069b8 <_Internal_error_Occurred>:
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
300069b8: e59f303c ldr r3, [pc, #60] ; 300069fc <_Internal_error_Occurred+0x44>
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
300069bc: e201c0ff and ip, r1, #255 ; 0xff
300069c0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
300069c4: e1a0100c mov r1, ip
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
300069c8: e5830000 str r0, [r3]
_Internal_errors_What_happened.is_internal = is_internal;
300069cc: e5c3c004 strb ip, [r3, #4]
_Internal_errors_What_happened.the_error = the_error;
300069d0: e5832008 str r2, [r3, #8]
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
300069d4: e1a04002 mov r4, r2
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
300069d8: eb000735 bl 300086b4 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
300069dc: e59f301c ldr r3, [pc, #28] ; 30006a00 <_Internal_error_Occurred+0x48><== NOT EXECUTED
300069e0: e3a02005 mov r2, #5 <== NOT EXECUTED
300069e4: e5832000 str r2, [r3] <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300069e8: e10f2000 mrs r2, CPSR <== NOT EXECUTED
300069ec: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
300069f0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
300069f4: e1a00004 mov r0, r4 <== NOT EXECUTED
300069f8: eafffffe b 300069f8 <_Internal_error_Occurred+0x40> <== NOT EXECUTED
30006ac0 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
30006ac0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
30006ac4: e5904034 ldr r4, [r0, #52] ; 0x34
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
30006ac8: e24dd014 sub sp, sp, #20
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
30006acc: e3540000 cmp r4, #0
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
30006ad0: e1a05000 mov r5, r0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
30006ad4: e1d070b8 ldrh r7, [r0, #8]
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
30006ad8: 0a00009b beq 30006d4c <_Objects_Extend_information+0x28c>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
30006adc: e1d081b4 ldrh r8, [r0, #20]
30006ae0: e1d0a1b0 ldrh sl, [r0, #16]
30006ae4: e1a01008 mov r1, r8
30006ae8: e1a0000a mov r0, sl
30006aec: eb002620 bl 30010374 <__aeabi_uidiv>
30006af0: e1a03800 lsl r3, r0, #16
for ( ; block < block_count; block++ ) {
30006af4: e1b03823 lsrs r3, r3, #16
30006af8: 0a000099 beq 30006d64 <_Objects_Extend_information+0x2a4>
if ( information->object_blocks[ block ] == NULL ) {
30006afc: e5949000 ldr r9, [r4]
30006b00: e3590000 cmp r9, #0
30006b04: 01a01008 moveq r1, r8
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
30006b08: 01a06007 moveq r6, r7
index_base = minimum_index;
block = 0;
30006b0c: 01a04009 moveq r4, r9
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
30006b10: 0a00000c beq 30006b48 <_Objects_Extend_information+0x88>
30006b14: e1a02004 mov r2, r4
30006b18: e1a01008 mov r1, r8
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
30006b1c: e1a06007 mov r6, r7
index_base = minimum_index;
block = 0;
30006b20: e3a04000 mov r4, #0
30006b24: ea000002 b 30006b34 <_Objects_Extend_information+0x74>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
30006b28: e5b29004 ldr r9, [r2, #4]!
30006b2c: e3590000 cmp r9, #0
30006b30: 0a000004 beq 30006b48 <_Objects_Extend_information+0x88>
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
30006b34: e2844001 add r4, r4, #1
30006b38: e1530004 cmp r3, r4
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
break;
} else
index_base += information->allocation_size;
30006b3c: e0866008 add r6, r6, r8
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
30006b40: 8afffff8 bhi 30006b28 <_Objects_Extend_information+0x68>
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
30006b44: e3a09001 mov r9, #1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
30006b48: e08aa001 add sl, sl, r1
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
30006b4c: e35a0801 cmp sl, #65536 ; 0x10000
30006b50: 2a000063 bcs 30006ce4 <_Objects_Extend_information+0x224>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
30006b54: e5d52012 ldrb r2, [r5, #18]
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
30006b58: e5950018 ldr r0, [r5, #24]
if ( information->auto_extend ) {
30006b5c: e3520000 cmp r2, #0
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
30006b60: e0000091 mul r0, r1, r0
if ( information->auto_extend ) {
30006b64: 1a000060 bne 30006cec <_Objects_Extend_information+0x22c>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
30006b68: e58d3000 str r3, [sp]
30006b6c: eb000813 bl 30008bc0 <_Workspace_Allocate_or_fatal_error>
30006b70: e59d3000 ldr r3, [sp]
30006b74: e1a08000 mov r8, r0
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
30006b78: e3590000 cmp r9, #0
30006b7c: 0a000039 beq 30006c68 <_Objects_Extend_information+0x1a8>
*/
/*
* Up the block count and maximum
*/
block_count++;
30006b80: e283b001 add fp, r3, #1
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
30006b84: e08b008b add r0, fp, fp, lsl #1
((maximum + minimum_index) * sizeof(Objects_Control *));
30006b88: e08a0000 add r0, sl, r0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
30006b8c: e0800007 add r0, r0, r7
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
30006b90: e1a00100 lsl r0, r0, #2
30006b94: e58d3000 str r3, [sp]
30006b98: eb0007fe bl 30008b98 <_Workspace_Allocate>
if ( !object_blocks ) {
30006b9c: e2509000 subs r9, r0, #0
30006ba0: e59d3000 ldr r3, [sp]
30006ba4: 0a000073 beq 30006d78 <_Objects_Extend_information+0x2b8>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
30006ba8: e1d521b0 ldrh r2, [r5, #16]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
30006bac: e089c10b add ip, r9, fp, lsl #2
30006bb0: e1570002 cmp r7, r2
30006bb4: e089b18b add fp, r9, fp, lsl #3
30006bb8: 3a000051 bcc 30006d04 <_Objects_Extend_information+0x244>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
30006bbc: e3570000 cmp r7, #0
30006bc0: 13a02000 movne r2, #0
30006bc4: 11a0100b movne r1, fp
local_table[ index ] = NULL;
30006bc8: 11a00002 movne r0, r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
30006bcc: 0a000003 beq 30006be0 <_Objects_Extend_information+0x120>
30006bd0: e2822001 add r2, r2, #1
30006bd4: e1570002 cmp r7, r2
local_table[ index ] = NULL;
30006bd8: e4810004 str r0, [r1], #4
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
30006bdc: 8afffffb bhi 30006bd0 <_Objects_Extend_information+0x110>
30006be0: e1a03103 lsl r3, r3, #2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
30006be4: e1d511b4 ldrh r1, [r5, #20]
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
30006be8: e3a00000 mov r0, #0
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
30006bec: e0861001 add r1, r6, r1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
30006bf0: e1560001 cmp r6, r1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
30006bf4: e7890003 str r0, [r9, r3]
inactive_per_block[block_count] = 0;
30006bf8: e78c0003 str r0, [ip, r3]
for ( index=index_base ;
30006bfc: 2a000005 bcs 30006c18 <_Objects_Extend_information+0x158>
30006c00: e08b2106 add r2, fp, r6, lsl #2
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
30006c04: e1a03006 mov r3, r6
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
30006c08: e2833001 add r3, r3, #1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
30006c0c: e1530001 cmp r3, r1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
30006c10: e4820004 str r0, [r2], #4
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
30006c14: 3afffffb bcc 30006c08 <_Objects_Extend_information+0x148>
30006c18: e10f3000 mrs r3, CPSR
30006c1c: e3832080 orr r2, r3, #128 ; 0x80
30006c20: e129f002 msr CPSR_fc, r2
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
30006c24: e5952000 ldr r2, [r5]
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
30006c28: e1d510b4 ldrh r1, [r5, #4]
30006c2c: e1a02c02 lsl r2, r2, #24
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
30006c30: e1a0a80a lsl sl, sl, #16
30006c34: e3822801 orr r2, r2, #65536 ; 0x10000
30006c38: e1a0a82a lsr sl, sl, #16
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
30006c3c: e1822d81 orr r2, r2, r1, lsl #27
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
30006c40: e182200a orr r2, r2, sl
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
30006c44: e5950034 ldr r0, [r5, #52] ; 0x34
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
30006c48: e585c030 str ip, [r5, #48] ; 0x30
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
30006c4c: e5859034 str r9, [r5, #52] ; 0x34
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
30006c50: e585b01c str fp, [r5, #28]
information->maximum = (Objects_Maximum) maximum;
30006c54: e1c5a1b0 strh sl, [r5, #16]
information->maximum_id = _Objects_Build_id(
30006c58: e585200c str r2, [r5, #12]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30006c5c: e129f003 msr CPSR_fc, r3
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
30006c60: e3500000 cmp r0, #0
_Workspace_Free( old_tables );
30006c64: 1b0007d1 blne 30008bb0 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
30006c68: e5953034 ldr r3, [r5, #52] ; 0x34
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
30006c6c: e28d7008 add r7, sp, #8
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
30006c70: e7838104 str r8, [r3, r4, lsl #2]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
30006c74: e1a01008 mov r1, r8
30006c78: e1a00007 mov r0, r7
30006c7c: e1d521b4 ldrh r2, [r5, #20]
30006c80: e5953018 ldr r3, [r5, #24]
30006c84: eb000fc9 bl 3000abb0 <_Chain_Initialize>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
30006c88: e1a04104 lsl r4, r4, #2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
30006c8c: e2858020 add r8, r5, #32
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
30006c90: ea000009 b 30006cbc <_Objects_Extend_information+0x1fc>
30006c94: e5953000 ldr r3, [r5]
the_object->id = _Objects_Build_id(
30006c98: e1d520b4 ldrh r2, [r5, #4]
30006c9c: e1a03c03 lsl r3, r3, #24
30006ca0: e3833801 orr r3, r3, #65536 ; 0x10000
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
30006ca4: e1833d82 orr r3, r3, r2, lsl #27
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
30006ca8: e1833006 orr r3, r3, r6
30006cac: e5813008 str r3, [r1, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
30006cb0: e1a00008 mov r0, r8
30006cb4: ebfffce4 bl 3000604c <_Chain_Append>
index++;
30006cb8: e2866001 add r6, r6, #1
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
30006cbc: e1a00007 mov r0, r7
30006cc0: ebfffcf4 bl 30006098 <_Chain_Get>
30006cc4: e2501000 subs r1, r0, #0
30006cc8: 1afffff1 bne 30006c94 <_Objects_Extend_information+0x1d4>
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
30006ccc: e1d522bc ldrh r2, [r5, #44] ; 0x2c
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
30006cd0: e1d531b4 ldrh r3, [r5, #20]
30006cd4: e5951030 ldr r1, [r5, #48] ; 0x30
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
30006cd8: e0832002 add r2, r3, r2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
30006cdc: e7813004 str r3, [r1, r4]
information->inactive =
30006ce0: e1c522bc strh r2, [r5, #44] ; 0x2c
(Objects_Maximum)(information->inactive + information->allocation_size);
}
30006ce4: e28dd014 add sp, sp, #20
30006ce8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
30006cec: e58d3000 str r3, [sp]
30006cf0: eb0007a8 bl 30008b98 <_Workspace_Allocate>
if ( !new_object_block )
30006cf4: e2508000 subs r8, r0, #0
30006cf8: e59d3000 ldr r3, [sp]
30006cfc: 1affff9d bne 30006b78 <_Objects_Extend_information+0xb8>
30006d00: eafffff7 b 30006ce4 <_Objects_Extend_information+0x224>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
30006d04: e1a03103 lsl r3, r3, #2
30006d08: e5951034 ldr r1, [r5, #52] ; 0x34
30006d0c: e1a02003 mov r2, r3
30006d10: e88d1008 stm sp, {r3, ip}
30006d14: eb001a15 bl 3000d570 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
30006d18: e89d1008 ldm sp, {r3, ip}
30006d1c: e1a0000c mov r0, ip
30006d20: e1a02003 mov r2, r3
30006d24: e5951030 ldr r1, [r5, #48] ; 0x30
30006d28: eb001a10 bl 3000d570 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
30006d2c: e1d521b0 ldrh r2, [r5, #16]
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
30006d30: e1a0000b mov r0, fp
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
30006d34: e0872002 add r2, r7, r2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
30006d38: e595101c ldr r1, [r5, #28]
30006d3c: e1a02102 lsl r2, r2, #2
30006d40: eb001a0a bl 3000d570 <memcpy>
30006d44: e89d1008 ldm sp, {r3, ip}
30006d48: eaffffa5 b 30006be4 <_Objects_Extend_information+0x124>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
30006d4c: e1d0a1b0 ldrh sl, [r0, #16]
30006d50: e1d011b4 ldrh r1, [r0, #20]
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
30006d54: e1a06007 mov r6, r7
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
30006d58: e3a09001 mov r9, #1
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
30006d5c: e1a03004 mov r3, r4
30006d60: eaffff78 b 30006b48 <_Objects_Extend_information+0x88>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
30006d64: e1a01008 mov r1, r8 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
30006d68: e1a06007 mov r6, r7 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
30006d6c: e3a09001 mov r9, #1 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
30006d70: e1a04003 mov r4, r3 <== NOT EXECUTED
30006d74: eaffff73 b 30006b48 <_Objects_Extend_information+0x88> <== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
30006d78: e1a00008 mov r0, r8
30006d7c: eb00078b bl 30008bb0 <_Workspace_Free>
return;
30006d80: eaffffd7 b 30006ce4 <_Objects_Extend_information+0x224>
300070bc <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
300070bc: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
300070c0: e1d040b8 ldrh r4, [r0, #8]
block_count = (information->maximum - index_base) /
300070c4: e1d051b4 ldrh r5, [r0, #20]
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
300070c8: e1a06000 mov r6, r0
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
300070cc: e1d001b0 ldrh r0, [r0, #16]
300070d0: e1a01005 mov r1, r5
300070d4: e0640000 rsb r0, r4, r0
300070d8: eb0024a5 bl 30010374 <__aeabi_uidiv>
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
300070dc: e3500000 cmp r0, #0
300070e0: 08bd80f0 popeq {r4, r5, r6, r7, pc}
if ( information->inactive_per_block[ block ] ==
300070e4: e5962030 ldr r2, [r6, #48] ; 0x30
300070e8: e5923000 ldr r3, [r2]
300070ec: e1550003 cmp r5, r3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
300070f0: 13a03000 movne r3, #0
if ( information->inactive_per_block[ block ] ==
300070f4: 1a000005 bne 30007110 <_Objects_Shrink_information+0x54>
300070f8: ea000008 b 30007120 <_Objects_Shrink_information+0x64> <== NOT EXECUTED
300070fc: e5b21004 ldr r1, [r2, #4]!
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
30007100: e0844005 add r4, r4, r5
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
30007104: e1550001 cmp r5, r1
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
30007108: e1a07103 lsl r7, r3, #2
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
3000710c: 0a000004 beq 30007124 <_Objects_Shrink_information+0x68>
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
30007110: e2833001 add r3, r3, #1
30007114: e1500003 cmp r0, r3
30007118: 8afffff7 bhi 300070fc <_Objects_Shrink_information+0x40>
3000711c: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( information->inactive_per_block[ block ] ==
30007120: e3a07000 mov r7, #0 <== NOT EXECUTED
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
30007124: e5960020 ldr r0, [r6, #32]
30007128: ea000002 b 30007138 <_Objects_Shrink_information+0x7c>
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
3000712c: e3550000 cmp r5, #0
30007130: 0a00000b beq 30007164 <_Objects_Shrink_information+0xa8>
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
30007134: e1a00005 mov r0, r5
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
do {
index = _Objects_Get_index( the_object->id );
30007138: e1d030b8 ldrh r3, [r0, #8]
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
3000713c: e5905000 ldr r5, [r0]
if ((index >= index_base) &&
30007140: e1530004 cmp r3, r4
30007144: 3afffff8 bcc 3000712c <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
30007148: e1d621b4 ldrh r2, [r6, #20]
3000714c: e0842002 add r2, r4, r2
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
30007150: e1530002 cmp r3, r2
30007154: 2afffff4 bcs 3000712c <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
30007158: ebfffbc6 bl 30006078 <_Chain_Extract>
}
}
while ( the_object );
3000715c: e3550000 cmp r5, #0
30007160: 1afffff3 bne 30007134 <_Objects_Shrink_information+0x78>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
30007164: e5963034 ldr r3, [r6, #52] ; 0x34
30007168: e7930007 ldr r0, [r3, r7]
3000716c: eb00068f bl 30008bb0 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
30007170: e1d602bc ldrh r0, [r6, #44] ; 0x2c
30007174: e1d631b4 ldrh r3, [r6, #20]
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
30007178: e5961034 ldr r1, [r6, #52] ; 0x34
information->inactive_per_block[ block ] = 0;
3000717c: e5962030 ldr r2, [r6, #48] ; 0x30
information->inactive -= information->allocation_size;
30007180: e0633000 rsb r3, r3, r0
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
30007184: e7815007 str r5, [r1, r7]
information->inactive_per_block[ block ] = 0;
30007188: e7825007 str r5, [r2, r7]
information->inactive -= information->allocation_size;
3000718c: e1c632bc strh r3, [r6, #44] ; 0x2c
return;
30007190: e8bd80f0 pop {r4, r5, r6, r7, pc}
30006730 <_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();
30006730: e59f30b0 ldr r3, [pc, #176] ; 300067e8 <_TOD_Validate+0xb8>
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
30006734: 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) ||
30006738: 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();
3000673c: e593100c ldr r1, [r3, #12]
(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;
30006740: 01a00004 moveq r0, r4
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) ||
30006744: 08bd8010 popeq {r4, pc}
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
30006748: e59f009c ldr r0, [pc, #156] ; 300067ec <_TOD_Validate+0xbc>
3000674c: eb004540 bl 30017c54 <__aeabi_uidiv>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
30006750: e5943018 ldr r3, [r4, #24]
30006754: e1500003 cmp r0, r3
30006758: 9a00001e bls 300067d8 <_TOD_Validate+0xa8>
(the_tod->ticks >= ticks_per_second) ||
3000675c: e5943014 ldr r3, [r4, #20]
30006760: e353003b cmp r3, #59 ; 0x3b
30006764: 8a00001b bhi 300067d8 <_TOD_Validate+0xa8>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
30006768: e5943010 ldr r3, [r4, #16]
3000676c: e353003b cmp r3, #59 ; 0x3b
30006770: 8a000018 bhi 300067d8 <_TOD_Validate+0xa8>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
30006774: e594300c ldr r3, [r4, #12]
30006778: e3530017 cmp r3, #23
3000677c: 8a000015 bhi 300067d8 <_TOD_Validate+0xa8>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
30006780: e5940004 ldr r0, [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) ||
30006784: e3500000 cmp r0, #0
30006788: 08bd8010 popeq {r4, pc}
(the_tod->month == 0) ||
3000678c: e350000c cmp r0, #12
30006790: 8a000010 bhi 300067d8 <_TOD_Validate+0xa8>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
30006794: e5943000 ldr r3, [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) ||
30006798: e59f2050 ldr r2, [pc, #80] ; 300067f0 <_TOD_Validate+0xc0>
3000679c: e1530002 cmp r3, r2
300067a0: 9a00000c bls 300067d8 <_TOD_Validate+0xa8>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
300067a4: e5944008 ldr r4, [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) ||
300067a8: e3540000 cmp r4, #0
300067ac: 0a00000b beq 300067e0 <_TOD_Validate+0xb0>
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
300067b0: e3130003 tst r3, #3
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
300067b4: 059f3038 ldreq r3, [pc, #56] ; 300067f4 <_TOD_Validate+0xc4>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
300067b8: 159f3034 ldrne r3, [pc, #52] ; 300067f4 <_TOD_Validate+0xc4>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
300067bc: 0280000d addeq r0, r0, #13
300067c0: 07930100 ldreq r0, [r3, r0, lsl #2]
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
300067c4: 17930100 ldrne r0, [r3, r0, lsl #2]
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
300067c8: e1500004 cmp r0, r4
300067cc: 33a00000 movcc r0, #0
300067d0: 23a00001 movcs r0, #1
300067d4: 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;
300067d8: e3a00000 mov r0, #0
300067dc: e8bd8010 pop {r4, pc}
300067e0: e1a00004 mov r0, r4 <== NOT EXECUTED
if ( the_tod->day > days_in_month )
return false;
return true;
}
300067e4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30007d28 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
30007d28: e5913014 ldr r3, [r1, #20]
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
30007d2c: e92d0ff0 push {r4, r5, r6, r7, r8, r9, sl, fp}
30007d30: e281403c add r4, r1, #60 ; 0x3c
Chain_Node *previous_node;
Chain_Node *search_node;
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
30007d34: e281c038 add ip, r1, #56 ; 0x38
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30007d38: e5814038 str r4, [r1, #56] ; 0x38
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
30007d3c: e3130020 tst r3, #32
the_chain->permanent_null = NULL;
30007d40: e3a04000 mov r4, #0
30007d44: e581403c str r4, [r1, #60] ; 0x3c
the_chain->last = _Chain_Head(the_chain);
30007d48: e581c040 str ip, [r1, #64] ; 0x40
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
30007d4c: e1a08323 lsr r8, r3, #6
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
30007d50: e5905038 ldr r5, [r0, #56] ; 0x38
if ( _Thread_queue_Is_reverse_search( priority ) )
30007d54: 1a00001f bne 30007dd8 <_Thread_queue_Enqueue_priority+0xb0>
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
30007d58: e0888088 add r8, r8, r8, lsl #1
30007d5c: e1a09108 lsl r9, r8, #2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30007d60: e2898004 add r8, r9, #4
30007d64: e0808008 add r8, r0, r8
30007d68: e0809009 add r9, r0, r9
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30007d6c: e10f7000 mrs r7, CPSR
30007d70: e387c080 orr ip, r7, #128 ; 0x80
30007d74: e129f00c msr CPSR_fc, ip
30007d78: e1a0a007 mov sl, r7
30007d7c: e599c000 ldr ip, [r9]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
30007d80: e15c0008 cmp ip, r8
30007d84: 1a000009 bne 30007db0 <_Thread_queue_Enqueue_priority+0x88>
30007d88: ea000054 b 30007ee0 <_Thread_queue_Enqueue_priority+0x1b8>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
30007d8c: e10f6000 mrs r6, CPSR
30007d90: e129f007 msr CPSR_fc, r7
30007d94: e129f006 msr CPSR_fc, r6
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
30007d98: e59c6010 ldr r6, [ip, #16]
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
30007d9c: e1150006 tst r5, r6
30007da0: 0a000036 beq 30007e80 <_Thread_queue_Enqueue_priority+0x158>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
30007da4: e59cc000 ldr ip, [ip]
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
30007da8: e15c0008 cmp ip, r8
30007dac: 0a000002 beq 30007dbc <_Thread_queue_Enqueue_priority+0x94>
search_priority = search_thread->current_priority;
30007db0: e59c4014 ldr r4, [ip, #20]
if ( priority <= search_priority )
30007db4: e1530004 cmp r3, r4
30007db8: 8afffff3 bhi 30007d8c <_Thread_queue_Enqueue_priority+0x64>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
30007dbc: e5905030 ldr r5, [r0, #48] ; 0x30
30007dc0: e3550001 cmp r5, #1
30007dc4: 0a00002f beq 30007e88 <_Thread_queue_Enqueue_priority+0x160>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
30007dc8: e582a000 str sl, [r2]
return the_thread_queue->sync_state;
}
30007dcc: e1a00005 mov r0, r5
30007dd0: e8bd0ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp}
30007dd4: e12fff1e bx lr
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
30007dd8: e0888088 add r8, r8, r8, lsl #1
30007ddc: e0808108 add r8, r0, r8, lsl #2
30007de0: e59f9100 ldr r9, [pc, #256] ; 30007ee8 <_Thread_queue_Enqueue_priority+0x1c0>
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
30007de4: e1a0b008 mov fp, r8
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
30007de8: e5d94000 ldrb r4, [r9]
30007dec: e2844001 add r4, r4, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30007df0: e10f7000 mrs r7, CPSR
30007df4: e387c080 orr ip, r7, #128 ; 0x80
30007df8: e129f00c msr CPSR_fc, ip
30007dfc: e1a0a007 mov sl, r7
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
30007e00: e59bc008 ldr ip, [fp, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
30007e04: e15c0008 cmp ip, r8
30007e08: 1a000009 bne 30007e34 <_Thread_queue_Enqueue_priority+0x10c>
30007e0c: ea00000b b 30007e40 <_Thread_queue_Enqueue_priority+0x118>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
30007e10: e10f6000 mrs r6, CPSR
30007e14: e129f007 msr CPSR_fc, r7
30007e18: e129f006 msr CPSR_fc, r6
30007e1c: e59c6010 ldr r6, [ip, #16]
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
30007e20: e1150006 tst r5, r6
30007e24: 0a000013 beq 30007e78 <_Thread_queue_Enqueue_priority+0x150>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
30007e28: e59cc004 ldr ip, [ip, #4]
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
30007e2c: e15c0008 cmp ip, r8
30007e30: 0a000002 beq 30007e40 <_Thread_queue_Enqueue_priority+0x118>
search_priority = search_thread->current_priority;
30007e34: e59c4014 ldr r4, [ip, #20]
if ( priority >= search_priority )
30007e38: e1530004 cmp r3, r4
30007e3c: 3afffff3 bcc 30007e10 <_Thread_queue_Enqueue_priority+0xe8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
30007e40: e5905030 ldr r5, [r0, #48] ; 0x30
30007e44: e3550001 cmp r5, #1
30007e48: 1affffde bne 30007dc8 <_Thread_queue_Enqueue_priority+0xa0>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
30007e4c: e1530004 cmp r3, r4
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
30007e50: e3a03000 mov r3, #0
30007e54: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
30007e58: 0a000016 beq 30007eb8 <_Thread_queue_Enqueue_priority+0x190>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
30007e5c: e59c3000 ldr r3, [ip]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
30007e60: e8811008 stm r1, {r3, ip}
search_node->next = the_node;
next_node->previous = the_node;
30007e64: e5831004 str r1, [r3, #4]
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
30007e68: e58c1000 str r1, [ip]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
30007e6c: e5810044 str r0, [r1, #68] ; 0x44
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30007e70: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
30007e74: eaffffd4 b 30007dcc <_Thread_queue_Enqueue_priority+0xa4>
30007e78: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
30007e7c: eaffffd9 b 30007de8 <_Thread_queue_Enqueue_priority+0xc0> <== NOT EXECUTED
30007e80: e129f007 msr CPSR_fc, r7
30007e84: eaffffb8 b 30007d6c <_Thread_queue_Enqueue_priority+0x44>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
30007e88: e1530004 cmp r3, r4
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
30007e8c: e3a03000 mov r3, #0
30007e90: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
30007e94: 0a000007 beq 30007eb8 <_Thread_queue_Enqueue_priority+0x190>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
30007e98: e59c3004 ldr r3, [ip, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
30007e9c: e581c000 str ip, [r1]
the_node->previous = previous_node;
30007ea0: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
30007ea4: e5831000 str r1, [r3]
search_node->previous = the_node;
30007ea8: e58c1004 str r1, [ip, #4]
the_thread->Wait.queue = the_thread_queue;
30007eac: e5810044 str r0, [r1, #68] ; 0x44
30007eb0: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
30007eb4: eaffffc4 b 30007dcc <_Thread_queue_Enqueue_priority+0xa4>
30007eb8: e28cc03c add ip, ip, #60 ; 0x3c
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
30007ebc: e59c3004 ldr r3, [ip, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
30007ec0: e581c000 str ip, [r1]
the_node->previous = previous_node;
30007ec4: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
30007ec8: e5831000 str r1, [r3]
search_node->previous = the_node;
30007ecc: e58c1004 str r1, [ip, #4]
the_thread->Wait.queue = the_thread_queue;
30007ed0: e5810044 str r0, [r1, #68] ; 0x44
30007ed4: e129f00a msr CPSR_fc, sl
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
30007ed8: e3a05001 mov r5, #1
30007edc: eaffffba b 30007dcc <_Thread_queue_Enqueue_priority+0xa4>
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
30007ee0: e3e04000 mvn r4, #0
30007ee4: eaffffb4 b 30007dbc <_Thread_queue_Enqueue_priority+0x94>
3000b344 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
3000b344: e92d4070 push {r4, r5, r6, lr}
3000b348: e20220ff and r2, r2, #255 ; 0xff
3000b34c: e24dd004 sub sp, sp, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000b350: e10fc000 mrs ip, CPSR
3000b354: e38c3080 orr r3, ip, #128 ; 0x80
3000b358: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
3000b35c: e59f30bc ldr r3, [pc, #188] ; 3000b420 <_Thread_queue_Extract_priority_helper+0xdc>
3000b360: e5910010 ldr r0, [r1, #16]
3000b364: e0003003 and r3, r0, r3
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
3000b368: e3530000 cmp r3, #0
3000b36c: 0a000021 beq 3000b3f8 <_Thread_queue_Extract_priority_helper+0xb4>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
3000b370: e5913038 ldr r3, [r1, #56] ; 0x38
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
3000b374: e8910030 ldm r1, {r4, r5}
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3000b378: e281003c add r0, r1, #60 ; 0x3c
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
3000b37c: e1530000 cmp r3, r0
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
3000b380: 05854000 streq r4, [r5]
next_node->previous = previous_node;
3000b384: 05845004 streq r5, [r4, #4]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
3000b388: 0a00000c beq 3000b3c0 <_Thread_queue_Extract_priority_helper+0x7c>
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
3000b38c: e5910040 ldr r0, [r1, #64] ; 0x40
new_second_node = new_first_node->next;
3000b390: e5936000 ldr r6, [r3]
previous_node->next = new_first_node;
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
3000b394: e1500003 cmp r0, r3
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
3000b398: e5853000 str r3, [r5]
next_node->previous = new_first_node;
3000b39c: e5843004 str r3, [r4, #4]
new_first_node->next = next_node;
3000b3a0: e8830030 stm r3, {r4, r5}
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
3000b3a4: 0a000005 beq 3000b3c0 <_Thread_queue_Extract_priority_helper+0x7c>
/* > two threads on 2-n */
new_second_node->previous =
_Chain_Head( &new_first_thread->Wait.Block2n );
3000b3a8: e2835038 add r5, r3, #56 ; 0x38
3000b3ac: e283403c add r4, r3, #60 ; 0x3c
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
new_second_node->previous =
3000b3b0: e5865004 str r5, [r6, #4]
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
3000b3b4: e5836038 str r6, [r3, #56] ; 0x38
new_first_thread->Wait.Block2n.last = last_node;
3000b3b8: e5830040 str r0, [r3, #64] ; 0x40
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
3000b3bc: e5804000 str r4, [r0]
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
3000b3c0: e3520000 cmp r2, #0
3000b3c4: 1a000008 bne 3000b3ec <_Thread_queue_Extract_priority_helper+0xa8>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
3000b3c8: e5913050 ldr r3, [r1, #80] ; 0x50
3000b3cc: e3530002 cmp r3, #2
3000b3d0: 0a00000a beq 3000b400 <_Thread_queue_Extract_priority_helper+0xbc>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000b3d4: e129f00c msr CPSR_fc, ip
3000b3d8: e1a00001 mov r0, r1
3000b3dc: e59f1040 ldr r1, [pc, #64] ; 3000b424 <_Thread_queue_Extract_priority_helper+0xe0>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
3000b3e0: e28dd004 add sp, sp, #4
3000b3e4: e8bd4070 pop {r4, r5, r6, lr}
3000b3e8: eafff007 b 3000740c <_Thread_Clear_state>
3000b3ec: e129f00c msr CPSR_fc, ip
3000b3f0: e28dd004 add sp, sp, #4
3000b3f4: e8bd8070 pop {r4, r5, r6, pc}
3000b3f8: e129f00c msr CPSR_fc, ip
3000b3fc: eafffffb b 3000b3f0 <_Thread_queue_Extract_priority_helper+0xac>
3000b400: e3a03003 mov r3, #3 <== NOT EXECUTED
3000b404: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED
3000b408: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
3000b40c: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED
3000b410: e58d1000 str r1, [sp] <== NOT EXECUTED
3000b414: ebfff576 bl 300089f4 <_Watchdog_Remove> <== NOT EXECUTED
3000b418: e59d1000 ldr r1, [sp] <== NOT EXECUTED
3000b41c: eaffffed b 3000b3d8 <_Thread_queue_Extract_priority_helper+0x94><== NOT EXECUTED
30016118 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
30016118: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3001611c: e24dd024 sub sp, sp, #36 ; 0x24
30016120: e28d700c add r7, sp, #12
30016124: e28d2018 add r2, sp, #24
30016128: e282a004 add sl, r2, #4
3001612c: e2872004 add r2, r7, #4
30016130: e58d2000 str r2, [sp]
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
30016134: e28d2018 add r2, sp, #24
30016138: e58d2020 str r2, [sp, #32]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3001613c: e59d2000 ldr r2, [sp]
the_chain->permanent_null = NULL;
30016140: e3a03000 mov r3, #0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30016144: e58d200c str r2, [sp, #12]
30016148: e2802008 add r2, r0, #8
3001614c: e58d2004 str r2, [sp, #4]
30016150: e59f91bc ldr r9, [pc, #444] ; 30016314 <_Timer_server_Body+0x1fc>
30016154: e2802040 add r2, r0, #64 ; 0x40
30016158: e59fb1b8 ldr fp, [pc, #440] ; 30016318 <_Timer_server_Body+0x200>
3001615c: e1a04000 mov r4, r0
30016160: e58da018 str sl, [sp, #24]
the_chain->permanent_null = NULL;
30016164: e58d301c str r3, [sp, #28]
30016168: e58d3010 str r3, [sp, #16]
the_chain->last = _Chain_Head(the_chain);
3001616c: e58d7014 str r7, [sp, #20]
30016170: e2806030 add r6, r0, #48 ; 0x30
30016174: e2808068 add r8, r0, #104 ; 0x68
30016178: e58d2008 str r2, [sp, #8]
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
3001617c: e28d3018 add r3, sp, #24
30016180: e5843078 str r3, [r4, #120] ; 0x78
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
30016184: e5993000 ldr r3, [r9]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
30016188: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
3001618c: e1a02007 mov r2, r7
30016190: e1a00006 mov r0, r6
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
30016194: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
30016198: e0611003 rsb r1, r1, r3
3001619c: eb001150 bl 3001a6e4 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
300161a0: e59b5000 ldr r5, [fp]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
300161a4: e5942074 ldr r2, [r4, #116] ; 0x74
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
300161a8: e1550002 cmp r5, r2
300161ac: 8a000022 bhi 3001623c <_Timer_server_Body+0x124>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
300161b0: 3a000018 bcc 30016218 <_Timer_server_Body+0x100>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
300161b4: e5845074 str r5, [r4, #116] ; 0x74
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
300161b8: e5940078 ldr r0, [r4, #120] ; 0x78
300161bc: eb0002bc bl 30016cb4 <_Chain_Get>
if ( timer == NULL ) {
300161c0: e2501000 subs r1, r0, #0
300161c4: 0a00000b beq 300161f8 <_Timer_server_Body+0xe0>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
300161c8: e5913038 ldr r3, [r1, #56] ; 0x38
300161cc: e3530001 cmp r3, #1
300161d0: 0a000015 beq 3001622c <_Timer_server_Body+0x114>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
300161d4: e3530003 cmp r3, #3
300161d8: 1afffff6 bne 300161b8 <_Timer_server_Body+0xa0>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
300161dc: e2811010 add r1, r1, #16
300161e0: e1a00008 mov r0, r8
300161e4: eb001168 bl 3001a78c <_Watchdog_Insert>
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
300161e8: e5940078 ldr r0, [r4, #120] ; 0x78
300161ec: eb0002b0 bl 30016cb4 <_Chain_Get>
if ( timer == NULL ) {
300161f0: e2501000 subs r1, r0, #0
300161f4: 1afffff3 bne 300161c8 <_Timer_server_Body+0xb0>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300161f8: e10f2000 mrs r2, CPSR
300161fc: e3823080 orr r3, r2, #128 ; 0x80
30016200: e129f003 msr CPSR_fc, r3
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
30016204: e59d3018 ldr r3, [sp, #24]
30016208: e15a0003 cmp sl, r3
3001620c: 0a00000f beq 30016250 <_Timer_server_Body+0x138>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30016210: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
30016214: eaffffda b 30016184 <_Timer_server_Body+0x6c> <== NOT EXECUTED
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
30016218: e1a00008 mov r0, r8
3001621c: e3a01001 mov r1, #1
30016220: e0652002 rsb r2, r5, r2
30016224: eb0010ff bl 3001a628 <_Watchdog_Adjust>
30016228: eaffffe1 b 300161b4 <_Timer_server_Body+0x9c>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
3001622c: e1a00006 mov r0, r6
30016230: e2811010 add r1, r1, #16
30016234: eb001154 bl 3001a78c <_Watchdog_Insert>
30016238: eaffffde b 300161b8 <_Timer_server_Body+0xa0>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
3001623c: e0621005 rsb r1, r2, r5
30016240: e1a00008 mov r0, r8
30016244: e1a02007 mov r2, r7
30016248: eb001125 bl 3001a6e4 <_Watchdog_Adjust_to_chain>
3001624c: eaffffd8 b 300161b4 <_Timer_server_Body+0x9c>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
30016250: e5841078 str r1, [r4, #120] ; 0x78
30016254: e129f002 msr CPSR_fc, r2
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
30016258: e59d300c ldr r3, [sp, #12]
3001625c: e59d2000 ldr r2, [sp]
30016260: e1520003 cmp r2, r3
30016264: 0a000015 beq 300162c0 <_Timer_server_Body+0x1a8>
30016268: e1a05004 mov r5, r4
3001626c: e59d4000 ldr r4, [sp]
30016270: ea000009 b 3001629c <_Timer_server_Body+0x184>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
30016274: e5932000 ldr r2, [r3]
the_chain->first = new_first;
new_first->previous = _Chain_Head(the_chain);
30016278: e5827004 str r7, [r2, #4]
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
3001627c: e58d200c str r2, [sp, #12]
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
30016280: e3a02000 mov r2, #0
30016284: e5832008 str r2, [r3, #8]
30016288: e129f001 msr CPSR_fc, r1
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
3001628c: e5930020 ldr r0, [r3, #32]
30016290: e5931024 ldr r1, [r3, #36] ; 0x24
30016294: e1a0e00f mov lr, pc
30016298: e593f01c ldr pc, [r3, #28]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3001629c: e10f1000 mrs r1, CPSR
300162a0: e3813080 orr r3, r1, #128 ; 0x80
300162a4: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
300162a8: e59d300c ldr r3, [sp, #12]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
300162ac: e1540003 cmp r4, r3
300162b0: 1affffef bne 30016274 <_Timer_server_Body+0x15c>
300162b4: e1a04005 mov r4, r5
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300162b8: e129f001 msr CPSR_fc, r1
300162bc: eaffffae b 3001617c <_Timer_server_Body+0x64>
300162c0: e59f2054 ldr r2, [pc, #84] ; 3001631c <_Timer_server_Body+0x204>
}
} else {
ts->active = false;
300162c4: e3a03000 mov r3, #0
300162c8: e5c4307c strb r3, [r4, #124] ; 0x7c
300162cc: e5923000 ldr r3, [r2]
300162d0: e2833001 add r3, r3, #1
300162d4: e5823000 str r3, [r2]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
300162d8: e3a01008 mov r1, #8
300162dc: e5940000 ldr r0, [r4]
300162e0: eb000e77 bl 30019cc4 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
300162e4: e1a00004 mov r0, r4
300162e8: ebffff5e bl 30016068 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
300162ec: e1a00004 mov r0, r4
300162f0: ebffff72 bl 300160c0 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
300162f4: eb000be6 bl 30019294 <_Thread_Enable_dispatch>
ts->active = true;
300162f8: e3a03001 mov r3, #1
300162fc: e5c4307c strb r3, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
30016300: e59d0004 ldr r0, [sp, #4]
30016304: eb00118d bl 3001a940 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
30016308: e59d0008 ldr r0, [sp, #8]
3001630c: eb00118b bl 3001a940 <_Watchdog_Remove>
30016310: eaffff99 b 3001617c <_Timer_server_Body+0x64>
3000a314 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
3000a314: e5902000 ldr r2, [r0]
3000a318: e5913000 ldr r3, [r1]
3000a31c: e1520003 cmp r2, r3
return true;
3000a320: c3a00001 movgt r0, #1
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
3000a324: c12fff1e bxgt lr
return true;
if ( lhs->tv_sec < rhs->tv_sec )
3000a328: ba000005 blt 3000a344 <_Timespec_Greater_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
3000a32c: e5900004 ldr r0, [r0, #4]
3000a330: e5913004 ldr r3, [r1, #4]
3000a334: e1500003 cmp r0, r3
3000a338: d3a00000 movle r0, #0
3000a33c: c3a00001 movgt r0, #1
3000a340: e12fff1e bx lr
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
3000a344: e3a00000 mov r0, #0 <== NOT EXECUTED
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
3000a348: e12fff1e bx lr <== NOT EXECUTED
300086b4 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
300086b4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
300086b8: e59f5040 ldr r5, [pc, #64] ; 30008700 <_User_extensions_Fatal+0x4c>
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
300086bc: e1a08000 mov r8, r0
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
300086c0: e5954008 ldr r4, [r5, #8]
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
300086c4: e1a07002 mov r7, r2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
300086c8: e1540005 cmp r4, r5
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
300086cc: e20160ff and r6, r1, #255 ; 0xff
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
300086d0: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
300086d4: e5943030 ldr r3, [r4, #48] ; 0x30
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
300086d8: e1a00008 mov r0, r8
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
300086dc: e3530000 cmp r3, #0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
300086e0: e1a01006 mov r1, r6
300086e4: e1a02007 mov r2, r7
300086e8: 11a0e00f movne lr, pc
300086ec: 112fff13 bxne r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
300086f0: e5944004 ldr r4, [r4, #4]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
300086f4: e1540005 cmp r4, r5
300086f8: 1afffff5 bne 300086d4 <_User_extensions_Fatal+0x20>
300086fc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
30008704 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
30008704: e92d40f0 push {r4, r5, r6, r7, lr}
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
30008708: e59f5050 ldr r5, [pc, #80] ; 30008760 <_User_extensions_Thread_create+0x5c>
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
3000870c: e1a06000 mov r6, r0
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
30008710: e4954004 ldr r4, [r5], #4
30008714: e1540005 cmp r4, r5
30008718: 0a00000e beq 30008758 <_User_extensions_Thread_create+0x54>
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
3000871c: e59f7040 ldr r7, [pc, #64] ; 30008764 <_User_extensions_Thread_create+0x60>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
30008720: e5943014 ldr r3, [r4, #20]
status = (*the_extension->Callouts.thread_create)(
30008724: e1a01006 mov r1, r6
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
30008728: e3530000 cmp r3, #0
3000872c: 0a000004 beq 30008744 <_User_extensions_Thread_create+0x40>
status = (*the_extension->Callouts.thread_create)(
30008730: e5970004 ldr r0, [r7, #4]
30008734: e1a0e00f mov lr, pc
30008738: e12fff13 bx r3
_Thread_Executing,
the_thread
);
if ( !status )
3000873c: e3500000 cmp r0, #0
30008740: 08bd80f0 popeq {r4, r5, r6, r7, pc}
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
30008744: e5944000 ldr r4, [r4]
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
30008748: e1540005 cmp r4, r5
3000874c: 1afffff3 bne 30008720 <_User_extensions_Thread_create+0x1c>
if ( !status )
return false;
}
}
return true;
30008750: e3a00001 mov r0, #1
30008754: e8bd80f0 pop {r4, r5, r6, r7, pc}
30008758: e3a00001 mov r0, #1 <== NOT EXECUTED
}
3000875c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
3000a6b0 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
3000a6b0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
3000a6b4: e1a04000 mov r4, r0
3000a6b8: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000a6bc: e10f3000 mrs r3, CPSR
3000a6c0: e3832080 orr r2, r3, #128 ; 0x80
3000a6c4: e129f002 msr CPSR_fc, r2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
3000a6c8: e1a07000 mov r7, r0
3000a6cc: e4972004 ldr r2, [r7], #4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
3000a6d0: e1520007 cmp r2, r7
3000a6d4: 0a000018 beq 3000a73c <_Watchdog_Adjust+0x8c>
switch ( direction ) {
3000a6d8: e3510000 cmp r1, #0
3000a6dc: 1a000018 bne 3000a744 <_Watchdog_Adjust+0x94>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
3000a6e0: e3550000 cmp r5, #0
3000a6e4: 0a000014 beq 3000a73c <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
3000a6e8: e5926010 ldr r6, [r2, #16]
3000a6ec: e1550006 cmp r5, r6
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
3000a6f0: 23a08001 movcs r8, #1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
3000a6f4: 2a000005 bcs 3000a710 <_Watchdog_Adjust+0x60>
3000a6f8: ea000018 b 3000a760 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
3000a6fc: e0555006 subs r5, r5, r6
3000a700: 0a00000d beq 3000a73c <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
3000a704: e5926010 ldr r6, [r2, #16]
3000a708: e1560005 cmp r6, r5
3000a70c: 8a000013 bhi 3000a760 <_Watchdog_Adjust+0xb0>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
3000a710: e5828010 str r8, [r2, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000a714: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Watchdog_Tickle( header );
3000a718: e1a00004 mov r0, r4
3000a71c: eb0000aa bl 3000a9cc <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000a720: e10f3000 mrs r3, CPSR
3000a724: e3832080 orr r2, r3, #128 ; 0x80
3000a728: e129f002 msr CPSR_fc, r2
3000a72c: e5941000 ldr r1, [r4]
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
3000a730: e1570001 cmp r7, r1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
3000a734: e1a02001 mov r2, r1
3000a738: 1affffef bne 3000a6fc <_Watchdog_Adjust+0x4c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000a73c: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
3000a740: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
3000a744: e3510001 cmp r1, #1
3000a748: 1afffffb bne 3000a73c <_Watchdog_Adjust+0x8c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
3000a74c: e5921010 ldr r1, [r2, #16]
3000a750: e0815005 add r5, r1, r5
3000a754: e5825010 str r5, [r2, #16]
3000a758: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
3000a75c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
3000a760: e0655006 rsb r5, r5, r6
3000a764: e5825010 str r5, [r2, #16]
break;
3000a768: eafffff3 b 3000a73c <_Watchdog_Adjust+0x8c>
30020a54 <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
30020a54: e3a00000 mov r0, #0 <== NOT EXECUTED
30020a58: e12fff1e bx lr <== NOT EXECUTED
30012528 <_exit>:
extern void FINI_SYMBOL( void );
#endif
void EXIT_SYMBOL(int status)
{
30012528: e52de004 push {lr} ; (str lr, [sp, #-4]!)
3001252c: e24dd004 sub sp, sp, #4
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
30012530: e58d0000 str r0, [sp]
30012534: eb0001ee bl 30012cf4 <_fini>
* We need to do the exit processing on the global reentrancy structure.
* This has already been done on the per task reentrancy structure
* associated with this task.
*/
libc_wrapup();
30012538: ebffffe0 bl 300124c0 <libc_wrapup>
rtems_shutdown_executive(status);
3001253c: e59d0000 ldr r0, [sp]
30012540: eb000038 bl 30012628 <rtems_shutdown_executive>
30012544: eafffffe b 30012544 <_exit+0x1c> <== NOT EXECUTED
300021c0 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
300021c0: eaffffe1 b 3000214c <gettimeofday> <== NOT EXECUTED
30005e9c <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
30005e9c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
30005ea0: e1a00001 mov r0, r1
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
30005ea4: e24dd048 sub sp, sp, #72 ; 0x48
30005ea8: e1a05001 mov r5, r1
30005eac: e1a06002 mov r6, r2
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
30005eb0: ebfffab5 bl 3000498c <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
30005eb4: e2507000 subs r7, r0, #0
30005eb8: 1a000059 bne 30006024 <_rename_r+0x188>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
30005ebc: e28d4018 add r4, sp, #24
30005ec0: e1a00005 mov r0, r5
30005ec4: e28d1044 add r1, sp, #68 ; 0x44
30005ec8: e1a02004 mov r2, r4
30005ecc: eb0000e8 bl 30006274 <rtems_filesystem_get_start_loc>
rtems_filesystem_location_info_t old_parent_loc;
rtems_filesystem_location_info_t new_parent_loc;
int i;
int result;
const char *name;
bool free_old_parentloc = false;
30005ed0: e1a08007 mov r8, r7
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
30005ed4: e28dc02c add ip, sp, #44 ; 0x2c
30005ed8: e1a0e004 mov lr, r4
30005edc: e8be000f ldm lr!, {r0, r1, r2, r3}
30005ee0: e8ac000f stmia ip!, {r0, r1, r2, r3}
30005ee4: e59e3000 ldr r3, [lr]
name = old + old_parent_pathlen;
30005ee8: e0855007 add r5, r5, r7
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
30005eec: e58c3000 str r3, [ip]
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30005ef0: e1a00005 mov r0, r5
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
30005ef4: e58d5040 str r5, [sp, #64] ; 0x40
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30005ef8: eb0035d5 bl 30013654 <strlen>
30005efc: e1a01000 mov r1, r0
30005f00: e1a00005 mov r0, r5
30005f04: ebfffaaf bl 300049c8 <rtems_filesystem_prefix_separators>
30005f08: e0855000 add r5, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
30005f0c: e1a00005 mov r0, r5
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30005f10: e58d5040 str r5, [sp, #64] ; 0x40
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
30005f14: eb0035ce bl 30013654 <strlen>
30005f18: e28d702c add r7, sp, #44 ; 0x2c
30005f1c: e1a01000 mov r1, r0
30005f20: e3a02000 mov r2, #0
30005f24: e1a00005 mov r0, r5
30005f28: e1a03007 mov r3, r7
30005f2c: e58d2000 str r2, [sp]
30005f30: ebfffa49 bl 3000485c <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
30005f34: e3500000 cmp r0, #0
30005f38: 1a000031 bne 30006004 <_rename_r+0x168>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
30005f3c: e28d5004 add r5, sp, #4
30005f40: e1a00006 mov r0, r6
30005f44: e1a02005 mov r2, r5
30005f48: e28d1044 add r1, sp, #68 ; 0x44
30005f4c: eb0000c8 bl 30006274 <rtems_filesystem_get_start_loc>
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
30005f50: e59d0044 ldr r0, [sp, #68] ; 0x44
30005f54: e1a01005 mov r1, r5
30005f58: e0860000 add r0, r6, r0
30005f5c: e28d2040 add r2, sp, #64 ; 0x40
30005f60: e59d3010 ldr r3, [sp, #16]
30005f64: e1a0e00f mov lr, pc
30005f68: e593f004 ldr pc, [r3, #4]
if ( result != 0 ) {
30005f6c: e3500000 cmp r0, #0
30005f70: 1a000037 bne 30006054 <_rename_r+0x1b8>
/*
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
30005f74: e59d3014 ldr r3, [sp, #20]
30005f78: e59d2028 ldr r2, [sp, #40] ; 0x28
30005f7c: e1520003 cmp r2, r3
30005f80: 1a000013 bne 30005fd4 <_rename_r+0x138>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
30005f84: e1a01007 mov r1, r7
30005f88: e1a02005 mov r2, r5
30005f8c: e59d3040 ldr r3, [sp, #64] ; 0x40
30005f90: e59dc010 ldr ip, [sp, #16]
30005f94: e1a00004 mov r0, r4
30005f98: e1a0e00f mov lr, pc
30005f9c: e59cf040 ldr pc, [ip, #64] ; 0x40
30005fa0: e1a06000 mov r6, r0
rtems_filesystem_freenode( &new_parent_loc );
30005fa4: e1a00005 mov r0, r5
30005fa8: ebfffaa0 bl 30004a30 <rtems_filesystem_freenode>
if ( free_old_parentloc )
30005fac: e3580000 cmp r8, #0
30005fb0: 1a000004 bne 30005fc8 <_rename_r+0x12c>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
30005fb4: e1a00007 mov r0, r7
30005fb8: ebfffa9c bl 30004a30 <rtems_filesystem_freenode>
return result;
}
30005fbc: e1a00006 mov r0, r6
30005fc0: e28dd048 add sp, sp, #72 ; 0x48
30005fc4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
30005fc8: e1a00004 mov r0, r4
30005fcc: ebfffa97 bl 30004a30 <rtems_filesystem_freenode>
30005fd0: eafffff7 b 30005fb4 <_rename_r+0x118>
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
30005fd4: e1a00005 mov r0, r5
30005fd8: ebfffa94 bl 30004a30 <rtems_filesystem_freenode>
if ( free_old_parentloc )
30005fdc: e3580000 cmp r8, #0
rtems_filesystem_freenode( &old_parent_loc );
30005fe0: 11a00004 movne r0, r4
30005fe4: 1bfffa91 blne 30004a30 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &old_loc );
30005fe8: e1a00007 mov r0, r7
30005fec: ebfffa8f bl 30004a30 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EXDEV );
30005ff0: eb00287a bl 300101e0 <__errno>
30005ff4: e3a03012 mov r3, #18
30005ff8: e5803000 str r3, [r0]
30005ffc: e3e06000 mvn r6, #0
30006000: eaffffed b 30005fbc <_rename_r+0x120>
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
30006004: e3580000 cmp r8, #0
30006008: 1a000001 bne 30006014 <_rename_r+0x178>
rtems_filesystem_freenode( &old_parent_loc );
return -1;
3000600c: e3e06000 mvn r6, #0 <== NOT EXECUTED
30006010: eaffffe9 b 30005fbc <_rename_r+0x120> <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
30006014: e1a00004 mov r0, r4
30006018: ebfffa84 bl 30004a30 <rtems_filesystem_freenode>
return -1;
3000601c: e3e06000 mvn r6, #0
30006020: eaffffe5 b 30005fbc <_rename_r+0x120>
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
30006024: e3a03000 mov r3, #0
30006028: e28d4018 add r4, sp, #24
3000602c: e58d3000 str r3, [sp]
30006030: e3a02002 mov r2, #2
30006034: e1a00005 mov r0, r5
30006038: e1a01007 mov r1, r7
3000603c: e1a03004 mov r3, r4
30006040: ebfffa2f bl 30004904 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
30006044: e3500000 cmp r0, #0
30006048: 1affffef bne 3000600c <_rename_r+0x170>
return -1;
free_old_parentloc = true;
3000604c: e3a08001 mov r8, #1
30006050: eaffff9f b 30005ed4 <_rename_r+0x38>
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
30006054: e1a00005 mov r0, r5
30006058: ebfffa74 bl 30004a30 <rtems_filesystem_freenode>
if ( free_old_parentloc )
3000605c: e3580000 cmp r8, #0
rtems_filesystem_freenode( &old_parent_loc );
30006060: 11a00004 movne r0, r4
30006064: 1bfffa71 blne 30004a30 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &old_loc );
30006068: e1a00007 mov r0, r7
3000606c: ebfffa6f bl 30004a30 <rtems_filesystem_freenode>
return -1;
30006070: e3e06000 mvn r6, #0
30006074: eaffffd0 b 30005fbc <_rename_r+0x120>
3000212c <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
3000212c: e92d4070 push {r4, r5, r6, lr}
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
30002130: e59f50b4 ldr r5, [pc, #180] ; 300021ec <chroot+0xc0>
30002134: e59f30b4 ldr r3, [pc, #180] ; 300021f0 <chroot+0xc4>
30002138: e5954000 ldr r4, [r5]
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
3000213c: e24dd018 sub sp, sp, #24
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
30002140: e1540003 cmp r4, r3
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
30002144: e1a06000 mov r6, r0
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
30002148: 0a000017 beq 300021ac <chroot+0x80>
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = chdir(pathname);
3000214c: e1a00006 mov r0, r6
30002150: eb002273 bl 3000ab24 <chdir>
if (result) {
30002154: e2502000 subs r2, r0, #0
30002158: 1a00001c bne 300021d0 <chroot+0xa4>
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
3000215c: e28d4004 add r4, sp, #4
30002160: e59f008c ldr r0, [pc, #140] ; 300021f4 <chroot+0xc8>
30002164: e3a01001 mov r1, #1
30002168: e1a03004 mov r3, r4
3000216c: e58d2000 str r2, [sp]
30002170: eb00006a bl 30002320 <rtems_filesystem_evaluate_path>
30002174: e2506000 subs r6, r0, #0
30002178: 1a000014 bne 300021d0 <chroot+0xa4>
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
3000217c: e5950000 ldr r0, [r5]
30002180: e2800018 add r0, r0, #24
30002184: eb0000b0 bl 3000244c <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
30002188: e8b4000f ldm r4!, {r0, r1, r2, r3}
3000218c: e595c000 ldr ip, [r5]
30002190: e5944000 ldr r4, [r4]
30002194: e28cc018 add ip, ip, #24
30002198: e8ac000f stmia ip!, {r0, r1, r2, r3}
return 0;
3000219c: e1a00006 mov r0, r6
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
300021a0: e58c4000 str r4, [ip]
return 0;
}
300021a4: e28dd018 add sp, sp, #24
300021a8: e8bd8070 pop {r4, r5, r6, pc}
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
300021ac: eb000510 bl 300035f4 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
300021b0: e5953000 ldr r3, [r5]
300021b4: e1530004 cmp r3, r4
300021b8: 1affffe3 bne 3000214c <chroot+0x20>
rtems_set_errno_and_return_minus_one( ENOTSUP );
300021bc: eb002cd6 bl 3000d51c <__errno> <== NOT EXECUTED
300021c0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
300021c4: e5803000 str r3, [r0] <== NOT EXECUTED
300021c8: e3e00000 mvn r0, #0 <== NOT EXECUTED
300021cc: eafffff4 b 300021a4 <chroot+0x78> <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
300021d0: eb002cd1 bl 3000d51c <__errno> <== NOT EXECUTED
300021d4: e1a04000 mov r4, r0 <== NOT EXECUTED
300021d8: eb002ccf bl 3000d51c <__errno> <== NOT EXECUTED
300021dc: e5903000 ldr r3, [r0] <== NOT EXECUTED
300021e0: e3e00000 mvn r0, #0 <== NOT EXECUTED
300021e4: e5843000 str r3, [r4] <== NOT EXECUTED
300021e8: eaffffed b 300021a4 <chroot+0x78> <== NOT EXECUTED
30008fc4 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
30008fc4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
30008fc8: e5936000 ldr r6, [r3]
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
30008fcc: e1a0b003 mov fp, r3
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
30008fd0: e3560000 cmp r6, #0
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
30008fd4: e1a0a000 mov sl, r0
30008fd8: e1a07001 mov r7, r1
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
30008fdc: 0a000025 beq 30009078 <devFS_evaluate_path+0xb4>
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
30008fe0: e59f30a4 ldr r3, [pc, #164] ; 3000908c <devFS_evaluate_path+0xc8>
30008fe4: e5938000 ldr r8, [r3]
30008fe8: e3580000 cmp r8, #0
30008fec: 13a09000 movne r9, #0
30008ff0: 11a04009 movne r4, r9
30008ff4: 0a000010 beq 3000903c <devFS_evaluate_path+0x78>
if (!device_name_table[i].device_name)
30008ff8: e0899109 add r9, r9, r9, lsl #2
30008ffc: e7965109 ldr r5, [r6, r9, lsl #2]
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
30009000: e1a0000a mov r0, sl
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++) {
if (!device_name_table[i].device_name)
30009004: e2551000 subs r1, r5, #0
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
30009008: e1a02007 mov r2, r7
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++) {
if (!device_name_table[i].device_name)
3000900c: e0869109 add r9, r6, r9, lsl #2
30009010: 0a000005 beq 3000902c <devFS_evaluate_path+0x68>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
30009014: eb000ab5 bl 3000baf0 <strncmp>
30009018: e3500000 cmp r0, #0
3000901c: 1a000002 bne 3000902c <devFS_evaluate_path+0x68>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
30009020: e7d50007 ldrb r0, [r5, r7]
30009024: e3500000 cmp r0, #0
30009028: 0a000008 beq 30009050 <devFS_evaluate_path+0x8c>
/* 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++) {
3000902c: e2844001 add r4, r4, #1
30009030: e1580004 cmp r8, r4
30009034: e1a09004 mov r9, r4
30009038: 8affffee bhi 30008ff8 <devFS_evaluate_path+0x34>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
3000903c: eb0006e2 bl 3000abcc <__errno>
30009040: e3a03002 mov r3, #2
30009044: e5803000 str r3, [r0]
30009048: e3e00000 mvn r0, #0
}
3000904c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
30009050: e59f3038 ldr r3, [pc, #56] ; 30009090 <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];
pathloc->handlers = &devFS_file_handlers;
30009054: e59f2038 ldr r2, [pc, #56] ; 30009094 <devFS_evaluate_path+0xd0>
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
30009058: e5933000 ldr r3, [r3]
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
3000905c: e58b2008 str r2, [fp, #8]
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
30009060: e5933028 ldr r3, [r3, #40] ; 0x28
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
30009064: e59f202c ldr r2, [pc, #44] ; 30009098 <devFS_evaluate_path+0xd4>
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
30009068: e58b9000 str r9, [fp]
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
3000906c: e58b200c str r2, [fp, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
30009070: e58b3010 str r3, [fp, #16]
return 0;
30009074: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, 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 );
30009078: eb0006d3 bl 3000abcc <__errno> <== NOT EXECUTED
3000907c: e3a0300e mov r3, #14 <== NOT EXECUTED
30009080: e5803000 str r3, [r0] <== NOT EXECUTED
30009084: e3e00000 mvn r0, #0 <== NOT EXECUTED
30009088: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
300017a8 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
300017a8: e92d4070 push {r4, r5, r6, lr}
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
300017ac: e59f605c ldr r6, [pc, #92] ; 30001810 <devFS_initialize+0x68>
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
300017b0: e1a04000 mov r4, r0
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
300017b4: e5960000 ldr r0, [r6]
300017b8: e0800100 add r0, r0, r0, lsl #2
300017bc: e1a00100 lsl r0, r0, #2
300017c0: eb001c79 bl 300089ac <_Workspace_Allocate>
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
300017c4: e2505000 subs r5, r0, #0
300017c8: 0a00000b beq 300017fc <devFS_initialize+0x54>
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(
300017cc: e5962000 ldr r2, [r6]
300017d0: e3a01000 mov r1, #0
300017d4: e0822102 add r2, r2, r2, lsl #2
300017d8: e1a02102 lsl r2, r2, #2
300017dc: eb002767 bl 3000b580 <memset>
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
300017e0: e59f302c ldr r3, [pc, #44] ; 30001814 <devFS_initialize+0x6c>
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
300017e4: e584501c str r5, [r4, #28]
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
300017e8: e2832038 add r2, r3, #56 ; 0x38
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
300017ec: e5843024 str r3, [r4, #36] ; 0x24
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
300017f0: e5842028 str r2, [r4, #40] ; 0x28
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
return 0;
300017f4: e3a00000 mov r0, #0
}
300017f8: e8bd8070 pop {r4, r5, r6, pc}
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
300017fc: eb0024f2 bl 3000abcc <__errno> <== NOT EXECUTED
30001800: e3a0300c mov r3, #12 <== NOT EXECUTED
30001804: e5803000 str r3, [r0] <== NOT EXECUTED
30001808: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000180c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
30001a0c <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
30001a0c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
30001a10: e590c018 ldr ip, [r0, #24]
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
30001a14: e24dd010 sub sp, sp, #16
30001a18: e1a03000 mov r3, r0
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.command = command;
30001a1c: e98d0006 stmib sp, {r1, r2}
args.buffer = buffer;
status = rtems_io_control(
30001a20: e59c0008 ldr r0, [ip, #8]
30001a24: e59c100c ldr r1, [ip, #12]
30001a28: e1a0200d mov r2, sp
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
30001a2c: e58d3000 str r3, [sp]
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
30001a30: eb00104a bl 30005b60 <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
30001a34: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return args.ioctl_return;
30001a38: 059d000c ldreq r0, [sp, #12]
np->major,
np->minor,
(void *) &args
);
if ( status )
30001a3c: 1a000001 bne 30001a48 <devFS_ioctl+0x3c>
return rtems_deviceio_errno(status);
return args.ioctl_return;
}
30001a40: e28dd010 add sp, sp, #16
30001a44: e8bd8000 pop {pc}
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
30001a48: eb001d96 bl 300090a8 <rtems_deviceio_errno> <== NOT EXECUTED
30001a4c: eafffffb b 30001a40 <devFS_ioctl+0x34> <== NOT EXECUTED
30001818 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
30001818: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000181c: e1a04000 mov r4, r0
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
30001820: e5d00000 ldrb r0, [r0]
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
30001824: e1a05001 mov r5, r1
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
30001828: e3500064 cmp r0, #100 ; 0x64
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
3000182c: e1a06002 mov r6, r2
30001830: e1a0b003 mov fp, r3
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
30001834: 0a000035 beq 30001910 <devFS_mknod+0xf8>
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
30001838: e2053a0f and r3, r5, #61440 ; 0xf000
3000183c: e3530a02 cmp r3, #8192 ; 0x2000
30001840: 13530a06 cmpne r3, #24576 ; 0x6000
30001844: 03a03000 moveq r3, #0
30001848: 13a03001 movne r3, #1
3000184c: 1a000039 bne 30001938 <devFS_mknod+0x120>
rtems_set_errno_and_return_minus_one( EINVAL );
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
30001850: e59d2024 ldr r2, [sp, #36] ; 0x24
30001854: e5928000 ldr r8, [r2]
if (!device_name_table)
30001858: e3580000 cmp r8, #0
3000185c: 0a00003f beq 30001960 <devFS_mknod+0x148>
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
30001860: e59f210c ldr r2, [pc, #268] ; 30001974 <devFS_mknod+0x15c>
30001864: e592a000 ldr sl, [r2]
30001868: e35a0000 cmp sl, #0
3000186c: 13e09000 mvnne r9, #0
30001870: 11a07003 movne r7, r3
30001874: 1a000007 bne 30001898 <devFS_mknod+0x80>
30001878: ea000033 b 3000194c <devFS_mknod+0x134> <== NOT EXECUTED
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
3000187c: eb0027bb bl 3000b770 <strcmp> <== NOT EXECUTED
30001880: e3500000 cmp r0, #0 <== NOT EXECUTED
30001884: 0a00001c beq 300018fc <devFS_mknod+0xe4> <== NOT EXECUTED
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
30001888: e2877001 add r7, r7, #1 <== NOT EXECUTED
3000188c: e157000a cmp r7, sl <== NOT EXECUTED
30001890: e1a03007 mov r3, r7 <== NOT EXECUTED
30001894: 2a000009 bcs 300018c0 <devFS_mknod+0xa8> <== NOT EXECUTED
if (device_name_table[i].device_name == NULL)
30001898: e0833103 add r3, r3, r3, lsl #2
3000189c: e7983103 ldr r3, [r8, r3, lsl #2]
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
300018a0: e1a00004 mov r0, r4
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
300018a4: e2531000 subs r1, r3, #0
300018a8: 1afffff3 bne 3000187c <devFS_mknod+0x64>
300018ac: e1a09007 mov r9, r7
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
300018b0: e2877001 add r7, r7, #1
300018b4: e157000a cmp r7, sl
300018b8: e1a03007 mov r3, r7
300018bc: 3afffff5 bcc 30001898 <devFS_mknod+0x80>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
300018c0: e3790001 cmn r9, #1
300018c4: 0a000020 beq 3000194c <devFS_mknod+0x134>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300018c8: e10f7000 mrs r7, CPSR
300018cc: e3873080 orr r3, r7, #128 ; 0x80
300018d0: e129f003 msr CPSR_fc, r3
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
300018d4: e0899109 add r9, r9, r9, lsl #2
300018d8: e7884109 str r4, [r8, r9, lsl #2]
device_name_table[slot].device_name_length = strlen(path);
300018dc: e1a00004 mov r0, r4
300018e0: eb00286a bl 3000ba90 <strlen>
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
300018e4: e0888109 add r8, r8, r9, lsl #2
device_name_table[slot].device_name_length = strlen(path);
device_name_table[slot].major = major;
300018e8: e9880841 stmib r8, {r0, r6, fp}
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
300018ec: e5885010 str r5, [r8, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300018f0: e129f007 msr CPSR_fc, r7
_ISR_Enable(level);
return 0;
300018f4: e3a00000 mov r0, #0
}
300018f8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
300018fc: eb0024b2 bl 3000abcc <__errno> <== NOT EXECUTED
30001900: e3a03011 mov r3, #17 <== NOT EXECUTED
30001904: e5803000 str r3, [r0] <== NOT EXECUTED
30001908: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000190c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
30001910: e5d43001 ldrb r3, [r4, #1]
30001914: e3530065 cmp r3, #101 ; 0x65
30001918: 1affffc6 bne 30001838 <devFS_mknod+0x20>
3000191c: e5d43002 ldrb r3, [r4, #2]
30001920: e3530076 cmp r3, #118 ; 0x76
30001924: 1affffc3 bne 30001838 <devFS_mknod+0x20>
(path[2] == 'v') && (path[3] == '\0'))
30001928: e5d40003 ldrb r0, [r4, #3]
3000192c: e3500000 cmp r0, #0
30001930: 1affffc0 bne 30001838 <devFS_mknod+0x20>
30001934: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
rtems_set_errno_and_return_minus_one( EINVAL );
30001938: eb0024a3 bl 3000abcc <__errno> <== NOT EXECUTED
3000193c: e3a03016 mov r3, #22 <== NOT EXECUTED
30001940: e5803000 str r3, [r0] <== NOT EXECUTED
30001944: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001948: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
3000194c: eb00249e bl 3000abcc <__errno> <== NOT EXECUTED
30001950: e3a0300c mov r3, #12 <== NOT EXECUTED
30001954: e5803000 str r3, [r0] <== NOT EXECUTED
30001958: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000195c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
30001960: eb002499 bl 3000abcc <__errno> <== NOT EXECUTED
30001964: e3a0300e mov r3, #14 <== NOT EXECUTED
30001968: e5803000 str r3, [r0] <== NOT EXECUTED
3000196c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001970: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
30001a88 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
30001a88: e92d4800 push {fp, lr} <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
30001a8c: e590c018 ldr ip, [r0, #24] <== NOT EXECUTED
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
30001a90: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
30001a94: e1a03000 mov r3, r0 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
30001a98: e590e014 ldr lr, [r0, #20] <== NOT EXECUTED
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
30001a9c: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
30001aa0: e59c0008 ldr r0, [ip, #8] <== NOT EXECUTED
30001aa4: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
30001aa8: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
30001aac: e283c00c add ip, r3, #12 <== NOT EXECUTED
30001ab0: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
30001ab4: e58d3000 str r3, [sp] <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
30001ab8: e1a0200d mov r2, sp <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
30001abc: e3a03000 mov r3, #0 <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
30001ac0: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
30001ac4: e58de014 str lr, [sp, #20] <== NOT EXECUTED
args.bytes_moved = 0;
30001ac8: e58d3018 str r3, [sp, #24] <== NOT EXECUTED
status = rtems_io_read(
30001acc: eb001086 bl 30005cec <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
30001ad0: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
30001ad4: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
30001ad8: 1a000001 bne 30001ae4 <devFS_read+0x5c> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
30001adc: e28dd01c add sp, sp, #28 <== NOT EXECUTED
30001ae0: e8bd8800 pop {fp, pc} <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
30001ae4: eb001d6f bl 300090a8 <rtems_deviceio_errno> <== NOT EXECUTED
30001ae8: eafffffb b 30001adc <devFS_read+0x54> <== NOT EXECUTED
30001aec <devFS_stat>:
struct stat *buf
)
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
30001aec: e5903000 ldr r3, [r0]
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
30001af0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
30001af4: e3530000 cmp r3, #0
30001af8: 0a000006 beq 30001b18 <devFS_stat+0x2c>
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
30001afc: e2830008 add r0, r3, #8
30001b00: e890000d ldm r0, {r0, r2, r3}
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
30001b04: e5810018 str r0, [r1, #24]
30001b08: e581201c str r2, [r1, #28]
buf->st_mode = the_dev->mode;
30001b0c: e581300c str r3, [r1, #12]
return 0;
30001b10: e3a00000 mov r0, #0
}
30001b14: e49df004 pop {pc} ; (ldr pc, [sp], #4)
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
30001b18: eb00242b bl 3000abcc <__errno> <== NOT EXECUTED
30001b1c: e3a0300e mov r3, #14 <== NOT EXECUTED
30001b20: e5803000 str r3, [r0] <== NOT EXECUTED
30001b24: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001b28: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30001b2c <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
30001b2c: e92d4800 push {fp, lr}
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
30001b30: e590c018 ldr ip, [r0, #24]
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
30001b34: e24dd01c sub sp, sp, #28
30001b38: e1a03000 mov r3, r0
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
30001b3c: e590e014 ldr lr, [r0, #20]
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
30001b40: e58d100c str r1, [sp, #12]
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
30001b44: e59c0008 ldr r0, [ip, #8]
30001b48: e59c100c ldr r1, [ip, #12]
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
30001b4c: e58d2010 str r2, [sp, #16]
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
30001b50: e283c00c add ip, r3, #12
30001b54: e89c1800 ldm ip, {fp, ip}
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
30001b58: e58d3000 str r3, [sp]
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
30001b5c: e1a0200d mov r2, sp
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
30001b60: e3a03000 mov r3, #0
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
30001b64: e98d1800 stmib sp, {fp, ip}
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
30001b68: e58de014 str lr, [sp, #20]
args.bytes_moved = 0;
30001b6c: e58d3018 str r3, [sp, #24]
status = rtems_io_write(
30001b70: eb001072 bl 30005d40 <rtems_io_write>
np->major,
np->minor,
(void *) &args
);
if ( status )
30001b74: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
30001b78: 059d0018 ldreq r0, [sp, #24]
np->major,
np->minor,
(void *) &args
);
if ( status )
30001b7c: 1a000001 bne 30001b88 <devFS_write+0x5c>
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
30001b80: e28dd01c add sp, sp, #28
30001b84: e8bd8800 pop {fp, pc}
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
30001b88: eb001d46 bl 300090a8 <rtems_deviceio_errno> <== NOT EXECUTED
30001b8c: eafffffb b 30001b80 <devFS_write+0x54> <== NOT EXECUTED
3000c3a8 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
3000c3a8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
args.iop = iop;
args.command = command;
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
3000c3ac: e590c018 ldr ip, [r0, #24]
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
3000c3b0: e24dd010 sub sp, sp, #16
3000c3b4: e1a03000 mov r3, r0
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
3000c3b8: e98d0006 stmib sp, {r1, r2}
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
status = rtems_io_control(
3000c3bc: e59c0050 ldr r0, [ip, #80] ; 0x50
3000c3c0: e59c1054 ldr r1, [ip, #84] ; 0x54
3000c3c4: e1a0200d mov r2, sp
{
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
3000c3c8: e58d3000 str r3, [sp]
args.command = command;
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
status = rtems_io_control(
3000c3cc: eb00018b bl 3000ca00 <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000c3d0: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return args.ioctl_return;
3000c3d4: 059d000c ldreq r0, [sp, #12]
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000c3d8: 1a000001 bne 3000c3e4 <device_ioctl+0x3c>
return rtems_deviceio_errno(status);
return args.ioctl_return;
}
3000c3dc: e28dd010 add sp, sp, #16
3000c3e0: e8bd8000 pop {pc}
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
3000c3e4: eb000220 bl 3000cc6c <rtems_deviceio_errno> <== NOT EXECUTED
3000c3e8: eafffffb b 3000c3dc <device_ioctl+0x34> <== NOT EXECUTED
3000c2e0 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
3000c2e0: e92d4800 push {fp, lr}
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000c2e4: e590c018 ldr ip, [r0, #24]
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
3000c2e8: e24dd01c sub sp, sp, #28
3000c2ec: e1a03000 mov r3, r0
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
3000c2f0: e590e014 ldr lr, [r0, #20]
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
3000c2f4: e58d100c str r1, [sp, #12]
args.count = count;
3000c2f8: e58d2010 str r2, [sp, #16]
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
3000c2fc: e59c0050 ldr r0, [ip, #80] ; 0x50
3000c300: e59c1054 ldr r1, [ip, #84] ; 0x54
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
3000c304: e58d3000 str r3, [sp]
args.offset = iop->offset;
3000c308: e283c00c add ip, r3, #12
3000c30c: e89c1800 ldm ip, {fp, ip}
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
3000c310: e1a0200d mov r2, sp
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
3000c314: e3a03000 mov r3, #0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
3000c318: e98d1800 stmib sp, {fp, ip}
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
3000c31c: e58de014 str lr, [sp, #20]
args.bytes_moved = 0;
3000c320: e58d3018 str r3, [sp, #24]
status = rtems_io_read(
3000c324: eb0001df bl 3000caa8 <rtems_io_read>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000c328: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
3000c32c: 059d0018 ldreq r0, [sp, #24]
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000c330: 1a000001 bne 3000c33c <device_read+0x5c>
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
3000c334: e28dd01c add sp, sp, #28
3000c338: e8bd8800 pop {fp, pc}
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
3000c33c: eb00024a bl 3000cc6c <rtems_deviceio_errno> <== NOT EXECUTED
3000c340: eafffffb b 3000c334 <device_read+0x54> <== NOT EXECUTED
3000c344 <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
3000c344: e92d4800 push {fp, lr}
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000c348: e590c018 ldr ip, [r0, #24]
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
3000c34c: e24dd01c sub sp, sp, #28
3000c350: e1a03000 mov r3, r0
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
3000c354: e590e014 ldr lr, [r0, #20]
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
3000c358: e58d100c str r1, [sp, #12]
args.count = count;
3000c35c: e58d2010 str r2, [sp, #16]
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
3000c360: e59c0050 ldr r0, [ip, #80] ; 0x50
3000c364: e59c1054 ldr r1, [ip, #84] ; 0x54
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
3000c368: e58d3000 str r3, [sp]
args.offset = iop->offset;
3000c36c: e283c00c add ip, r3, #12
3000c370: e89c1800 ldm ip, {fp, ip}
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
3000c374: e1a0200d mov r2, sp
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
3000c378: e3a03000 mov r3, #0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
3000c37c: e98d1800 stmib sp, {fp, ip}
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
3000c380: e58de014 str lr, [sp, #20]
args.bytes_moved = 0;
3000c384: e58d3018 str r3, [sp, #24]
status = rtems_io_write(
3000c388: eb0001db bl 3000cafc <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000c38c: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
3000c390: 059d0018 ldreq r0, [sp, #24]
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000c394: 1a000001 bne 3000c3a0 <device_write+0x5c>
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
3000c398: e28dd01c add sp, sp, #28
3000c39c: e8bd8800 pop {fp, pc}
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
3000c3a0: eb000231 bl 3000cc6c <rtems_deviceio_errno> <== NOT EXECUTED
3000c3a4: eafffffb b 3000c398 <device_write+0x54> <== NOT EXECUTED
30002fcc <drainOutput>:
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002fcc: e59030b4 ldr r3, [r0, #180] ; 0xb4
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
30002fd0: e92d4030 push {r4, r5, lr}
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002fd4: e3530000 cmp r3, #0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
30002fd8: e1a04000 mov r4, r0
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002fdc: 08bd8030 popeq {r4, r5, pc}
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30002fe0: e10f3000 mrs r3, CPSR
30002fe4: e3832080 orr r2, r3, #128 ; 0x80
30002fe8: e129f002 msr CPSR_fc, r2
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
30002fec: e5901084 ldr r1, [r0, #132] ; 0x84
30002ff0: e5902080 ldr r2, [r0, #128] ; 0x80
30002ff4: e1510002 cmp r1, r2
30002ff8: 0a00000f beq 3000303c <drainOutput+0x70>
tty->rawOutBufState = rob_wait;
30002ffc: e3a05002 mov r5, #2 <== NOT EXECUTED
30003000: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003004: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
30003008: e3a01000 mov r1, #0 <== NOT EXECUTED
3000300c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
30003010: e1a02001 mov r2, r1 <== NOT EXECUTED
30003014: eb0009b1 bl 300056e0 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
30003018: e3500000 cmp r0, #0 <== NOT EXECUTED
3000301c: 1a000008 bne 30003044 <drainOutput+0x78> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30003020: e10f3000 mrs r3, CPSR <== NOT EXECUTED
30003024: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
30003028: e129f002 msr CPSR_fc, r2 <== 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) {
3000302c: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED
30003030: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED
30003034: e1510002 cmp r1, r2 <== NOT EXECUTED
30003038: 1afffff0 bne 30003000 <drainOutput+0x34> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000303c: e129f003 msr CPSR_fc, r3
30003040: e8bd8030 pop {r4, r5, pc}
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
30003044: eb000b48 bl 30005d6c <rtems_fatal_error_occurred> <== NOT EXECUTED
30002798 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
30002798: e92d4070 push {r4, r5, r6, lr}
3000279c: e24dd048 sub sp, sp, #72 ; 0x48
300027a0: e1a05001 mov r5, r1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
300027a4: e1a0100d mov r1, sp
int dup2(
int fildes,
int fildes2
)
{
300027a8: e1a06000 mov r6, r0
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
300027ac: eb000197 bl 30002e10 <fstat>
if ( status == -1 )
300027b0: e3700001 cmn r0, #1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
300027b4: e1a0400d mov r4, sp
if ( status == -1 )
300027b8: 1a000001 bne 300027c4 <dup2+0x2c>
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
}
300027bc: e28dd048 add sp, sp, #72 ; 0x48
300027c0: e8bd8070 pop {r4, r5, r6, pc}
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
300027c4: e1a00005 mov r0, r5
300027c8: e1a0100d mov r1, sp
300027cc: eb00018f bl 30002e10 <fstat>
if ( status == -1 )
300027d0: e3700001 cmn r0, #1
300027d4: 0afffff8 beq 300027bc <dup2+0x24>
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
300027d8: e1a00006 mov r0, r6 <== NOT EXECUTED
300027dc: e3a01000 mov r1, #0 <== NOT EXECUTED
300027e0: e1a02005 mov r2, r5 <== NOT EXECUTED
300027e4: eb000078 bl 300029cc <fcntl> <== NOT EXECUTED
300027e8: eafffff3 b 300027bc <dup2+0x24> <== NOT EXECUTED
30003dbc <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)
30003dbc: 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)
{
30003dc0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
if (tty->ccount == 0)
30003dc4: 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)
{
30003dc8: e1a04000 mov r4, r0
30003dcc: e1a06001 mov r6, r1
if (tty->ccount == 0)
30003dd0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return;
if (lineFlag) {
30003dd4: e3510000 cmp r1, #0
30003dd8: 0a000010 beq 30003e20 <erase+0x64>
if (!(tty->termios.c_lflag & ECHO)) {
30003ddc: e590103c ldr r1, [r0, #60] ; 0x3c
30003de0: e2112008 ands r2, r1, #8
tty->ccount = 0;
30003de4: 05802020 streq r2, [r0, #32]
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
30003de8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
30003dec: e2110010 ands r0, r1, #16
30003df0: 1a00000c bne 30003e28 <erase+0x6c>
tty->ccount = 0;
30003df4: e5840020 str r0, [r4, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
30003df8: e1a01004 mov r1, r4 <== NOT EXECUTED
30003dfc: e5d40044 ldrb r0, [r4, #68] ; 0x44 <== NOT EXECUTED
30003e00: ebffffc8 bl 30003d28 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
30003e04: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
30003e08: e3130020 tst r3, #32 <== NOT EXECUTED
30003e0c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
echo ('\n', tty);
30003e10: e3a0000a mov r0, #10 <== NOT EXECUTED
30003e14: e1a01004 mov r1, r4 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
30003e18: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
30003e1c: eaffffc1 b 30003d28 <echo> <== NOT EXECUTED
return;
}
}
while (tty->ccount) {
30003e20: e590103c ldr r1, [r0, #60] ; 0x3c
30003e24: e2012008 and r2, r1, #8
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
30003e28: e59f7198 ldr r7, [pc, #408] ; 30003fc8 <erase+0x20c>
30003e2c: ea000008 b 30003e54 <erase+0x98>
30003e30: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED
30003e34: 1a00004b bne 30003f68 <erase+0x1ac> <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
30003e38: e3560000 cmp r6, #0 <== NOT EXECUTED
30003e3c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
30003e40: e5943020 ldr r3, [r4, #32]
30003e44: e3530000 cmp r3, #0
30003e48: 0a000045 beq 30003f64 <erase+0x1a8>
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
30003e4c: e594103c ldr r1, [r4, #60] ; 0x3c
30003e50: e2012008 and r2, r1, #8
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
30003e54: e2433001 sub r3, r3, #1
30003e58: e594001c ldr r0, [r4, #28]
30003e5c: e5843020 str r3, [r4, #32]
if (tty->termios.c_lflag & ECHO) {
30003e60: e3520000 cmp r2, #0
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
30003e64: e7d05003 ldrb r5, [r0, r3]
if (tty->termios.c_lflag & ECHO) {
30003e68: 0afffff2 beq 30003e38 <erase+0x7c>
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
30003e6c: e3560000 cmp r6, #0
30003e70: 1a000001 bne 30003e7c <erase+0xc0>
30003e74: e3110010 tst r1, #16
30003e78: 0a000035 beq 30003f54 <erase+0x198>
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
30003e7c: e3550009 cmp r5, #9
30003e80: 0a00000f beq 30003ec4 <erase+0x108>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
30003e84: e5973000 ldr r3, [r7]
30003e88: e2855001 add r5, r5, #1
30003e8c: e7d33005 ldrb r3, [r3, r5]
30003e90: e3130020 tst r3, #32
30003e94: 1affffe5 bne 30003e30 <erase+0x74>
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
30003e98: e59f012c ldr r0, [pc, #300] ; 30003fcc <erase+0x210>
30003e9c: e3a01003 mov r1, #3
30003ea0: e1a02004 mov r2, r4
30003ea4: ebfffefd bl 30003aa0 <rtems_termios_puts>
if (tty->column)
30003ea8: e5943028 ldr r3, [r4, #40] ; 0x28
30003eac: e3530000 cmp r3, #0
tty->column--;
30003eb0: 12433001 subne r3, r3, #1
30003eb4: 15843028 strne r3, [r4, #40] ; 0x28
}
}
}
if (!lineFlag)
30003eb8: e3560000 cmp r6, #0
30003ebc: 1affffdf bne 30003e40 <erase+0x84>
30003ec0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
30003ec4: e3530000 cmp r3, #0
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;
30003ec8: e594502c ldr r5, [r4, #44] ; 0x2c
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
30003ecc: 0a000011 beq 30003f18 <erase+0x15c>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
30003ed0: e5978000 ldr r8, [r7]
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;
30003ed4: 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)
30003ed8: e201ac02 and sl, r1, #512 ; 0x200
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
30003edc: e7d01002 ldrb r1, [r0, r2]
30003ee0: e2822001 add r2, r2, #1
if (c == '\t') {
30003ee4: e3510009 cmp r1, #9
col = (col | 7) + 1;
30003ee8: 03855007 orreq r5, r5, #7
} else if (iscntrl (c)) {
30003eec: e088c001 add ip, r8, r1
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
30003ef0: 02855001 addeq r5, r5, #1
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
30003ef4: 0a000005 beq 30003f10 <erase+0x154>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
30003ef8: e5dcc001 ldrb ip, [ip, #1]
30003efc: e31c0020 tst ip, #32
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
} else {
col++;
30003f00: 02855001 addeq r5, r5, #1
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
30003f04: 0a000001 beq 30003f10 <erase+0x154>
if (tty->termios.c_lflag & ECHOCTL)
30003f08: e35a0000 cmp sl, #0 <== NOT EXECUTED
col += 2;
30003f0c: 12855002 addne r5, r5, #2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
30003f10: e1530002 cmp r3, r2
30003f14: 1afffff0 bne 30003edc <erase+0x120>
}
/*
* Back up over the tab
*/
while (tty->column > col) {
30003f18: e5943028 ldr r3, [r4, #40] ; 0x28
30003f1c: e1550003 cmp r5, r3
30003f20: aaffffc4 bge 30003e38 <erase+0x7c>
rtems_termios_puts ("\b", 1, tty);
30003f24: e59f00a4 ldr r0, [pc, #164] ; 30003fd0 <erase+0x214>
30003f28: e3a01001 mov r1, #1
30003f2c: e1a02004 mov r2, r4
30003f30: ebfffeda bl 30003aa0 <rtems_termios_puts>
tty->column--;
30003f34: e5943028 ldr r3, [r4, #40] ; 0x28
30003f38: e2433001 sub r3, r3, #1
}
/*
* Back up over the tab
*/
while (tty->column > col) {
30003f3c: e1530005 cmp r3, r5
rtems_termios_puts ("\b", 1, tty);
tty->column--;
30003f40: e5843028 str r3, [r4, #40] ; 0x28
}
/*
* Back up over the tab
*/
while (tty->column > col) {
30003f44: cafffff6 bgt 30003f24 <erase+0x168>
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
30003f48: e3560000 cmp r6, #0
30003f4c: 1affffbb bne 30003e40 <erase+0x84>
30003f50: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== 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);
30003f54: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED
30003f58: e1a01004 mov r1, r4 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
30003f5c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, 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);
30003f60: eaffff70 b 30003d28 <echo> <== NOT EXECUTED
30003f64: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
30003f68: e59f005c ldr r0, [pc, #92] ; 30003fcc <erase+0x210> <== NOT EXECUTED
30003f6c: e3a01003 mov r1, #3 <== NOT EXECUTED
30003f70: e1a02004 mov r2, r4 <== NOT EXECUTED
30003f74: ebfffec9 bl 30003aa0 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
30003f78: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003f7c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003f80: 12433001 subne r3, r3, #1 <== NOT EXECUTED
30003f84: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
30003f88: e5973000 ldr r3, [r7] <== NOT EXECUTED
30003f8c: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED
30003f90: e3130020 tst r3, #32 <== NOT EXECUTED
30003f94: 0affffbf beq 30003e98 <erase+0xdc> <== NOT EXECUTED
30003f98: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
30003f9c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
30003fa0: 0affffa4 beq 30003e38 <erase+0x7c> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
30003fa4: e59f0020 ldr r0, [pc, #32] ; 30003fcc <erase+0x210> <== NOT EXECUTED
30003fa8: e3a01003 mov r1, #3 <== NOT EXECUTED
30003fac: e1a02004 mov r2, r4 <== NOT EXECUTED
30003fb0: ebfffeba bl 30003aa0 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
30003fb4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003fb8: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003fbc: 12433001 subne r3, r3, #1 <== NOT EXECUTED
30003fc0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003fc4: eaffffbb b 30003eb8 <erase+0xfc> <== NOT EXECUTED
300029cc <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
300029cc: e92d000e push {r1, r2, r3}
300029d0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
300029d4: e59f31cc ldr r3, [pc, #460] ; 30002ba8 <fcntl+0x1dc>
int fcntl(
int fd,
int cmd,
...
)
{
300029d8: e24dd004 sub sp, sp, #4
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
300029dc: e5932000 ldr r2, [r3]
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
300029e0: e28d3028 add r3, sp, #40 ; 0x28
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
300029e4: e1500002 cmp r0, r2
int fcntl(
int fd,
int cmd,
...
)
{
300029e8: e59d4024 ldr r4, [sp, #36] ; 0x24
int ret;
va_list ap;
va_start( ap, cmd );
300029ec: e58d3000 str r3, [sp]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
300029f0: 2a000060 bcs 30002b78 <fcntl+0x1ac>
iop = rtems_libio_iop( fd );
300029f4: e59f71b0 ldr r7, [pc, #432] ; 30002bac <fcntl+0x1e0>
300029f8: e0600180 rsb r0, r0, r0, lsl #3
300029fc: e5976000 ldr r6, [r7]
30002a00: e0865180 add r5, r6, r0, lsl #3
rtems_libio_check_is_open(iop);
30002a04: e595c014 ldr ip, [r5, #20]
30002a08: e31c0c01 tst ip, #256 ; 0x100
30002a0c: 0a000059 beq 30002b78 <fcntl+0x1ac>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
30002a10: e3540009 cmp r4, #9
30002a14: 979ff104 ldrls pc, [pc, r4, lsl #2]
30002a18: ea000027 b 30002abc <fcntl+0xf0>
30002a1c: 30002acc .word 0x30002acc <== NOT EXECUTED
30002a20: 30002b30 .word 0x30002b30 <== NOT EXECUTED
30002a24: 30002b40 .word 0x30002b40 <== NOT EXECUTED
30002a28: 30002b60 .word 0x30002b60 <== NOT EXECUTED
30002a2c: 30002a68 .word 0x30002a68 <== NOT EXECUTED
30002a30: 30002a44 .word 0x30002a44 <== NOT EXECUTED
30002a34: 30002a44 .word 0x30002a44 <== NOT EXECUTED
30002a38: 30002a44 .word 0x30002a44 <== NOT EXECUTED
30002a3c: 30002a44 .word 0x30002a44 <== NOT EXECUTED
30002a40: 30002a44 .word 0x30002a44 <== NOT EXECUTED
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
30002a44: eb002ca8 bl 3000dcec <__errno>
30002a48: e3a03086 mov r3, #134 ; 0x86
30002a4c: e5803000 str r3, [r0]
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
30002a50: e3e06000 mvn r6, #0
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
30002a54: e1a00006 mov r0, r6
30002a58: e28dd004 add sp, sp, #4
30002a5c: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
30002a60: e28dd00c add sp, sp, #12
30002a64: e12fff1e bx lr
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
30002a68: e5930000 ldr r0, [r3]
30002a6c: eb000181 bl 30003078 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
30002a70: e5952014 ldr r2, [r5, #20]
30002a74: e59f3134 ldr r3, [pc, #308] ; 30002bb0 <fcntl+0x1e4>
30002a78: e3c22c02 bic r2, r2, #512 ; 0x200
30002a7c: e0003003 and r3, r0, r3
30002a80: e3c22001 bic r2, r2, #1
30002a84: e1833002 orr r3, r3, r2
30002a88: e5853014 str r3, [r5, #20]
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
30002a8c: e3a06000 mov r6, #0
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
30002a90: e1a00004 mov r0, r4
30002a94: e5953020 ldr r3, [r5, #32]
30002a98: e1a01005 mov r1, r5
30002a9c: e1a0e00f mov lr, pc
30002aa0: e593f030 ldr pc, [r3, #48] ; 0x30
if (err) {
30002aa4: e2504000 subs r4, r0, #0
30002aa8: 0affffe9 beq 30002a54 <fcntl+0x88>
errno = err;
30002aac: eb002c8e bl 3000dcec <__errno> <== NOT EXECUTED
ret = -1;
30002ab0: e3e06000 mvn r6, #0 <== NOT EXECUTED
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
30002ab4: e5804000 str r4, [r0] <== NOT EXECUTED
30002ab8: eaffffe5 b 30002a54 <fcntl+0x88> <== NOT EXECUTED
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
30002abc: eb002c8a bl 3000dcec <__errno>
30002ac0: e3a03016 mov r3, #22
30002ac4: e5803000 str r3, [r0]
30002ac8: eaffffe0 b 30002a50 <fcntl+0x84>
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
30002acc: e593a000 ldr sl, [r3]
if ( fd2 )
30002ad0: e35a0000 cmp sl, #0
30002ad4: 0a00002c beq 30002b8c <fcntl+0x1c0>
diop = rtems_libio_iop( fd2 );
30002ad8: e152000a cmp r2, sl <== NOT EXECUTED
30002adc: 806aa18a rsbhi sl, sl, sl, lsl #3 <== NOT EXECUTED
30002ae0: 8086a18a addhi sl, r6, sl, lsl #3 <== NOT EXECUTED
30002ae4: 81a0900a movhi r9, sl <== NOT EXECUTED
30002ae8: 93a09000 movls r9, #0 <== NOT EXECUTED
30002aec: 91a0a009 movls sl, r9 <== NOT EXECUTED
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
30002af0: e28a8018 add r8, sl, #24
30002af4: e2857018 add r7, r5, #24
30002af8: e8b7000f ldm r7!, {r0, r1, r2, r3}
ret = (int) (diop - rtems_libio_iops);
30002afc: e0666009 rsb r6, r6, r9
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
30002b00: e8a8000f stmia r8!, {r0, r1, r2, r3}
ret = (int) (diop - rtems_libio_iops);
30002b04: e1a061c6 asr r6, r6, #3
30002b08: e0863186 add r3, r6, r6, lsl #3
30002b0c: e0833303 add r3, r3, r3, lsl #6
30002b10: e0863183 add r3, r6, r3, lsl #3
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
30002b14: e5972000 ldr r2, [r7]
ret = (int) (diop - rtems_libio_iops);
30002b18: e0833783 add r3, r3, r3, lsl #15
30002b1c: e0866183 add r6, r6, r3, lsl #3
ret = -1;
break;
}
}
diop->flags = iop->flags;
30002b20: e58ac014 str ip, [sl, #20]
diop->pathinfo = iop->pathinfo;
30002b24: e5882000 str r2, [r8]
ret = (int) (diop - rtems_libio_iops);
30002b28: e2666000 rsb r6, r6, #0
30002b2c: ea00000e b 30002b6c <fcntl+0x1a0>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
30002b30: e31c0b02 tst ip, #2048 ; 0x800
30002b34: 03a06000 moveq r6, #0
30002b38: 13a06001 movne r6, #1
30002b3c: eaffffd3 b 30002a90 <fcntl+0xc4>
* 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 ) )
30002b40: e5936000 ldr r6, [r3]
30002b44: e3560000 cmp r6, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
30002b48: 138ccb02 orrne ip, ip, #2048 ; 0x800
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
30002b4c: 03cccb02 biceq ip, ip, #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;
30002b50: 1585c014 strne ip, [r5, #20]
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
30002b54: 13a06000 movne r6, #0
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
30002b58: 0585c014 streq ip, [r5, #20]
30002b5c: eaffffcb b 30002a90 <fcntl+0xc4>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
30002b60: e1a0000c mov r0, ip
30002b64: eb000150 bl 300030ac <rtems_libio_to_fcntl_flags>
30002b68: e1a06000 mov r6, r0
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
30002b6c: e3560000 cmp r6, #0
30002b70: aaffffc6 bge 30002a90 <fcntl+0xc4>
30002b74: eaffffb6 b 30002a54 <fcntl+0x88> <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
30002b78: eb002c5b bl 3000dcec <__errno>
30002b7c: e3a03009 mov r3, #9
30002b80: e5803000 str r3, [r0]
30002b84: e3e06000 mvn r6, #0
30002b88: eaffffb1 b 30002a54 <fcntl+0x88>
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
30002b8c: eb000159 bl 300030f8 <rtems_libio_allocate>
if ( diop == 0 ) {
30002b90: e250a000 subs sl, r0, #0
30002b94: 0affffad beq 30002a50 <fcntl+0x84>
30002b98: e595c014 ldr ip, [r5, #20]
30002b9c: e1a0900a mov r9, sl
30002ba0: e5976000 ldr r6, [r7]
30002ba4: eaffffd1 b 30002af0 <fcntl+0x124>
3000b980 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
3000b980: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
3000b984: e24dd008 sub sp, sp, #8
3000b988: e1a05000 mov r5, r0
3000b98c: e1a07001 mov r7, r1
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
3000b990: ebffff84 bl 3000b7a8 <pipe_lock>
if (err)
3000b994: e2504000 subs r4, r0, #0
3000b998: 1a00001b bne 3000ba0c <fifo_open+0x8c>
return err;
pipe = *pipep;
3000b99c: e5956000 ldr r6, [r5]
if (pipe == NULL) {
3000b9a0: e3560000 cmp r6, #0
3000b9a4: 0a00001b beq 3000ba18 <fifo_open+0x98>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
3000b9a8: e3a01000 mov r1, #0
3000b9ac: e5960028 ldr r0, [r6, #40] ; 0x28
3000b9b0: e1a02001 mov r2, r1
3000b9b4: ebffed52 bl 30006f04 <rtems_semaphore_obtain>
err = -EINTR;
if (*pipep == NULL) {
3000b9b8: e5953000 ldr r3, [r5]
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
3000b9bc: e3500000 cmp r0, #0
3000b9c0: 13e08003 mvnne r8, #3
3000b9c4: 03a08000 moveq r8, #0
err = -EINTR;
if (*pipep == NULL) {
3000b9c8: e3530000 cmp r3, #0
3000b9cc: 0a0000a9 beq 3000bc78 <fifo_open+0x2f8>
else
*pipep = pipe;
}
out:
pipe_unlock();
3000b9d0: ebffff9f bl 3000b854 <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
3000b9d4: e3580000 cmp r8, #0
3000b9d8: 11a04008 movne r4, r8
3000b9dc: 1a00000a bne 3000ba0c <fifo_open+0x8c>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
3000b9e0: e5973014 ldr r3, [r7, #20]
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
3000b9e4: e5956000 ldr r6, [r5]
switch (LIBIO_ACCMODE(iop)) {
3000b9e8: e2033006 and r3, r3, #6
3000b9ec: e3530004 cmp r3, #4
3000b9f0: 0a000080 beq 3000bbf8 <fifo_open+0x278>
3000b9f4: e3530006 cmp r3, #6
3000b9f8: 0a00006a beq 3000bba8 <fifo_open+0x228>
3000b9fc: e3530002 cmp r3, #2
3000ba00: 0a000044 beq 3000bb18 <fifo_open+0x198>
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
3000ba04: e5960028 ldr r0, [r6, #40] ; 0x28
3000ba08: ebffed86 bl 30007028 <rtems_semaphore_release>
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
3000ba0c: e1a00004 mov r0, r4
3000ba10: e28dd008 add sp, sp, #8
3000ba14: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
3000ba18: e3a00034 mov r0, #52 ; 0x34
3000ba1c: ebffe00f bl 30003a60 <malloc>
if (pipe == NULL)
3000ba20: e3500000 cmp r0, #0
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
3000ba24: e1a06000 mov r6, r0
3000ba28: e1a0a000 mov sl, r0
if (pipe == NULL)
3000ba2c: 0a0000bb beq 3000bd20 <fifo_open+0x3a0>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
3000ba30: e1a02000 mov r2, r0
3000ba34: e4824004 str r4, [r2], #4
3000ba38: e2822004 add r2, r2, #4
3000ba3c: e4824004 str r4, [r2], #4
3000ba40: e4824004 str r4, [r2], #4
3000ba44: e4824004 str r4, [r2], #4
3000ba48: e4824004 str r4, [r2], #4
3000ba4c: e4824004 str r4, [r2], #4
3000ba50: e4824004 str r4, [r2], #4
3000ba54: e4824004 str r4, [r2], #4
3000ba58: e4824004 str r4, [r2], #4
3000ba5c: e4824004 str r4, [r2], #4
3000ba60: e4824004 str r4, [r2], #4
pipe->Size = PIPE_BUF;
3000ba64: e3a03c02 mov r3, #512 ; 0x200
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
3000ba68: e5824000 str r4, [r2]
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
3000ba6c: e1a00003 mov r0, r3
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
3000ba70: e5863004 str r3, [r6, #4]
pipe->Buffer = malloc(pipe->Size);
3000ba74: ebffdff9 bl 30003a60 <malloc>
if (! pipe->Buffer)
3000ba78: 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);
3000ba7c: e5860000 str r0, [r6]
if (! pipe->Buffer)
3000ba80: 0a0000a4 beq 3000bd18 <fifo_open+0x398>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
3000ba84: e59f82a0 ldr r8, [pc, #672] ; 3000bd2c <fifo_open+0x3ac>
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
3000ba88: e59f02a0 ldr r0, [pc, #672] ; 3000bd30 <fifo_open+0x3b0>
rtems_build_name ('P', 'I', 'r', c),
3000ba8c: e5d83000 ldrb r3, [r8]
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
3000ba90: e1a01004 mov r1, r4
3000ba94: e1830000 orr r0, r3, r0
3000ba98: e1a02004 mov r2, r4
3000ba9c: e286302c add r3, r6, #44 ; 0x2c
3000baa0: eb0004af bl 3000cd64 <rtems_barrier_create>
3000baa4: e3500000 cmp r0, #0
3000baa8: 1a000098 bne 3000bd10 <fifo_open+0x390>
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),
3000baac: e5d83000 ldrb r3, [r8]
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(
3000bab0: e59f027c ldr r0, [pc, #636] ; 3000bd34 <fifo_open+0x3b4>
3000bab4: e1a01004 mov r1, r4
3000bab8: e1830000 orr r0, r3, r0
3000babc: e1a02004 mov r2, r4
3000bac0: e2863030 add r3, r6, #48 ; 0x30
3000bac4: eb0004a6 bl 3000cd64 <rtems_barrier_create>
3000bac8: e3500000 cmp r0, #0
3000bacc: 1a00008d bne 3000bd08 <fifo_open+0x388>
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,
3000bad0: e5d83000 ldrb r3, [r8]
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(
3000bad4: e59f025c ldr r0, [pc, #604] ; 3000bd38 <fifo_open+0x3b8>
3000bad8: e286c028 add ip, r6, #40 ; 0x28
3000badc: e1830000 orr r0, r3, r0
3000bae0: e3a01001 mov r1, #1
3000bae4: e3a02010 mov r2, #16
3000bae8: e1a03004 mov r3, r4
3000baec: e58dc000 str ip, [sp]
3000baf0: ebffec69 bl 30006c9c <rtems_semaphore_create>
3000baf4: e3500000 cmp r0, #0
3000baf8: 1a000080 bne 3000bd00 <fifo_open+0x380>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
3000bafc: e5d83000 ldrb r3, [r8]
3000bb00: e353007a cmp r3, #122 ; 0x7a
3000bb04: e2832001 add r2, r3, #1
c = 'a';
3000bb08: 03a03061 moveq r3, #97 ; 0x61
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
3000bb0c: e5c82000 strb r2, [r8]
c = 'a';
3000bb10: 05c83000 strbeq r3, [r8]
3000bb14: eaffffa3 b 3000b9a8 <fifo_open+0x28>
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
3000bb18: e5963010 ldr r3, [r6, #16]
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
3000bb1c: e5961020 ldr r1, [r6, #32]
if (pipe->Readers ++ == 0)
3000bb20: e2832001 add r2, r3, #1
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
3000bb24: e2811001 add r1, r1, #1
if (pipe->Readers ++ == 0)
3000bb28: e3530000 cmp r3, #0
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
3000bb2c: e5861020 str r1, [r6, #32]
if (pipe->Readers ++ == 0)
3000bb30: e5862010 str r2, [r6, #16]
3000bb34: 0a000069 beq 3000bce0 <fifo_open+0x360>
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
3000bb38: e5963014 ldr r3, [r6, #20]
3000bb3c: e3530000 cmp r3, #0
3000bb40: 1affffaf bne 3000ba04 <fifo_open+0x84>
/* Not an error */
if (LIBIO_NODELAY(iop))
3000bb44: e5973014 ldr r3, [r7, #20]
3000bb48: e3130001 tst r3, #1
3000bb4c: 1affffac bne 3000ba04 <fifo_open+0x84>
break;
prevCounter = pipe->writerCounter;
3000bb50: e5968024 ldr r8, [r6, #36] ; 0x24
3000bb54: ea000006 b 3000bb74 <fifo_open+0x1f4>
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
3000bb58: e5960028 ldr r0, [r6, #40] ; 0x28
3000bb5c: ebffece8 bl 30006f04 <rtems_semaphore_obtain>
3000bb60: e3500000 cmp r0, #0
3000bb64: 1a00000a bne 3000bb94 <fifo_open+0x214>
goto out_error;
} while (prevCounter == pipe->writerCounter);
3000bb68: e5963024 ldr r3, [r6, #36] ; 0x24
3000bb6c: e1530008 cmp r3, r8
3000bb70: 1affffa3 bne 3000ba04 <fifo_open+0x84>
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
3000bb74: e5960028 ldr r0, [r6, #40] ; 0x28
3000bb78: ebffed2a bl 30007028 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
3000bb7c: e3a01000 mov r1, #0
3000bb80: e596002c ldr r0, [r6, #44] ; 0x2c
3000bb84: eb0004ec bl 3000cf3c <rtems_barrier_wait>
3000bb88: e2501000 subs r1, r0, #0
goto out_error;
if (! PIPE_LOCK(pipe))
3000bb8c: e1a02001 mov r2, r1
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
3000bb90: 0afffff0 beq 3000bb58 <fifo_open+0x1d8>
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
3000bb94: e3e04003 mvn r4, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
3000bb98: e1a00005 mov r0, r5
3000bb9c: e1a01007 mov r1, r7
3000bba0: ebffff35 bl 3000b87c <pipe_release>
return err;
3000bba4: eaffff98 b 3000ba0c <fifo_open+0x8c>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
3000bba8: e5963010 ldr r3, [r6, #16]
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
3000bbac: e5961020 ldr r1, [r6, #32]
if (pipe->Readers ++ == 0)
3000bbb0: e2832001 add r2, r3, #1
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
3000bbb4: e2811001 add r1, r1, #1
if (pipe->Readers ++ == 0)
3000bbb8: e3530000 cmp r3, #0
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
3000bbbc: e5861020 str r1, [r6, #32]
if (pipe->Readers ++ == 0)
3000bbc0: e5862010 str r2, [r6, #16]
3000bbc4: 0a00003d beq 3000bcc0 <fifo_open+0x340>
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
3000bbc8: e5963014 ldr r3, [r6, #20]
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
3000bbcc: e5961024 ldr r1, [r6, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000bbd0: e2832001 add r2, r3, #1
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
3000bbd4: e2811001 add r1, r1, #1
if (pipe->Writers ++ == 0)
3000bbd8: e3530000 cmp r3, #0
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
3000bbdc: e5861024 str r1, [r6, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000bbe0: e5862014 str r2, [r6, #20]
3000bbe4: 1affff86 bne 3000ba04 <fifo_open+0x84>
PIPE_WAKEUPREADERS(pipe);
3000bbe8: e596002c ldr r0, [r6, #44] ; 0x2c
3000bbec: e28d1004 add r1, sp, #4
3000bbf0: eb0004b9 bl 3000cedc <rtems_barrier_release>
3000bbf4: eaffff82 b 3000ba04 <fifo_open+0x84>
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
3000bbf8: e5963014 ldr r3, [r6, #20]
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
3000bbfc: e5961024 ldr r1, [r6, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000bc00: e2832001 add r2, r3, #1
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
3000bc04: e2811001 add r1, r1, #1
if (pipe->Writers ++ == 0)
3000bc08: e3530000 cmp r3, #0
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
3000bc0c: e5861024 str r1, [r6, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000bc10: e5862014 str r2, [r6, #20]
3000bc14: 0a00002d beq 3000bcd0 <fifo_open+0x350>
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
3000bc18: e5963010 ldr r3, [r6, #16]
3000bc1c: e3530000 cmp r3, #0
3000bc20: 1affff77 bne 3000ba04 <fifo_open+0x84>
3000bc24: e5973014 ldr r3, [r7, #20]
3000bc28: e3130001 tst r3, #1
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
3000bc2c: 05968020 ldreq r8, [r6, #32]
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
3000bc30: 0a000007 beq 3000bc54 <fifo_open+0x2d4>
3000bc34: ea00002d b 3000bcf0 <fifo_open+0x370>
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
3000bc38: e5960028 ldr r0, [r6, #40] ; 0x28
3000bc3c: ebffecb0 bl 30006f04 <rtems_semaphore_obtain>
3000bc40: e3500000 cmp r0, #0
3000bc44: 1affffd2 bne 3000bb94 <fifo_open+0x214>
goto out_error;
} while (prevCounter == pipe->readerCounter);
3000bc48: e5963020 ldr r3, [r6, #32]
3000bc4c: e1530008 cmp r3, r8
3000bc50: 1affff6b bne 3000ba04 <fifo_open+0x84>
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
3000bc54: e5960028 ldr r0, [r6, #40] ; 0x28
3000bc58: ebffecf2 bl 30007028 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
3000bc5c: e3a01000 mov r1, #0
3000bc60: e5960030 ldr r0, [r6, #48] ; 0x30
3000bc64: eb0004b4 bl 3000cf3c <rtems_barrier_wait>
3000bc68: e2501000 subs r1, r0, #0
goto out_error;
if (! PIPE_LOCK(pipe))
3000bc6c: e1a02001 mov r2, r1
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
3000bc70: 0afffff0 beq 3000bc38 <fifo_open+0x2b8>
3000bc74: eaffffc6 b 3000bb94 <fifo_open+0x214> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
3000bc78: e3580000 cmp r8, #0
3000bc7c: 1a000002 bne 3000bc8c <fifo_open+0x30c>
pipe_free(pipe);
else
*pipep = pipe;
3000bc80: e5856000 str r6, [r5]
}
out:
pipe_unlock();
3000bc84: ebfffef2 bl 3000b854 <pipe_unlock>
3000bc88: eaffff54 b 3000b9e0 <fifo_open+0x60>
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
3000bc8c: e596002c ldr r0, [r6, #44] ; 0x2c <== NOT EXECUTED
3000bc90: eb000465 bl 3000ce2c <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
3000bc94: e5960030 ldr r0, [r6, #48] ; 0x30 <== NOT EXECUTED
3000bc98: eb000463 bl 3000ce2c <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
3000bc9c: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED
3000bca0: ebffec6e bl 30006e60 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
3000bca4: e5960000 ldr r0, [r6] <== NOT EXECUTED
3000bca8: ebffddcd bl 300033e4 <free> <== NOT EXECUTED
free(pipe);
3000bcac: e1a00006 mov r0, r6 <== NOT EXECUTED
3000bcb0: ebffddcb bl 300033e4 <free> <== NOT EXECUTED
3000bcb4: e1a04008 mov r4, r8 <== NOT EXECUTED
else
*pipep = pipe;
}
out:
pipe_unlock();
3000bcb8: ebfffee5 bl 3000b854 <pipe_unlock> <== NOT EXECUTED
3000bcbc: eaffff52 b 3000ba0c <fifo_open+0x8c> <== NOT EXECUTED
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
3000bcc0: e5960030 ldr r0, [r6, #48] ; 0x30
3000bcc4: e28d1004 add r1, sp, #4
3000bcc8: eb000483 bl 3000cedc <rtems_barrier_release>
3000bccc: eaffffbd b 3000bbc8 <fifo_open+0x248>
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
3000bcd0: e596002c ldr r0, [r6, #44] ; 0x2c
3000bcd4: e28d1004 add r1, sp, #4
3000bcd8: eb00047f bl 3000cedc <rtems_barrier_release>
3000bcdc: eaffffcd b 3000bc18 <fifo_open+0x298>
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
3000bce0: e5960030 ldr r0, [r6, #48] ; 0x30
3000bce4: e28d1004 add r1, sp, #4
3000bce8: eb00047b bl 3000cedc <rtems_barrier_release>
3000bcec: eaffff91 b 3000bb38 <fifo_open+0x1b8>
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
3000bcf0: e5960028 ldr r0, [r6, #40] ; 0x28
3000bcf4: ebffeccb bl 30007028 <rtems_semaphore_release>
err = -ENXIO;
3000bcf8: e3e04005 mvn r4, #5
goto out_error;
3000bcfc: eaffffa5 b 3000bb98 <fifo_open+0x218>
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
3000bd00: e5960030 ldr r0, [r6, #48] ; 0x30
3000bd04: eb000448 bl 3000ce2c <rtems_barrier_delete>
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
3000bd08: e59a002c ldr r0, [sl, #44] ; 0x2c
3000bd0c: eb000446 bl 3000ce2c <rtems_barrier_delete>
err_rbar:
free(pipe->Buffer);
3000bd10: e59a0000 ldr r0, [sl]
3000bd14: ebffddb2 bl 300033e4 <free>
err_buf:
free(pipe);
3000bd18: e1a0000a mov r0, sl
3000bd1c: ebffddb0 bl 300033e4 <free>
{
rtems_barrier_delete(pipe->readBarrier);
rtems_barrier_delete(pipe->writeBarrier);
rtems_semaphore_delete(pipe->Semaphore);
free(pipe->Buffer);
free(pipe);
3000bd20: e3e0400b mvn r4, #11
else
*pipep = pipe;
}
out:
pipe_unlock();
3000bd24: ebfffeca bl 3000b854 <pipe_unlock>
3000bd28: eaffff37 b 3000ba0c <fifo_open+0x8c>
30002c3c <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
30002c3c: e59f310c ldr r3, [pc, #268] ; 30002d50 <fpathconf+0x114>
long fpathconf(
int fd,
int name
)
{
30002c40: 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);
30002c44: e5933000 ldr r3, [r3]
30002c48: e1500003 cmp r0, r3
30002c4c: 2a000035 bcs 30002d28 <fpathconf+0xec>
iop = rtems_libio_iop(fd);
30002c50: e59f30fc ldr r3, [pc, #252] ; 30002d54 <fpathconf+0x118>
30002c54: e0600180 rsb r0, r0, r0, lsl #3
30002c58: e5933000 ldr r3, [r3]
30002c5c: e0830180 add r0, r3, r0, lsl #3
rtems_libio_check_is_open(iop);
30002c60: e5903014 ldr r3, [r0, #20]
30002c64: e3130c01 tst r3, #256 ; 0x100
30002c68: 0a00002e beq 30002d28 <fpathconf+0xec>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
30002c6c: e3130002 tst r3, #2
30002c70: 0a000031 beq 30002d3c <fpathconf+0x100>
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
30002c74: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
30002c78: e351000b cmp r1, #11
30002c7c: 979ff101 ldrls pc, [pc, r1, lsl #2]
30002c80: ea00000d b 30002cbc <fpathconf+0x80>
30002c84: 30002cd0 .word 0x30002cd0 <== NOT EXECUTED
30002c88: 30002cd8 .word 0x30002cd8 <== NOT EXECUTED
30002c8c: 30002ce0 .word 0x30002ce0 <== NOT EXECUTED
30002c90: 30002ce8 .word 0x30002ce8 <== NOT EXECUTED
30002c94: 30002cf0 .word 0x30002cf0 <== NOT EXECUTED
30002c98: 30002cf8 .word 0x30002cf8 <== NOT EXECUTED
30002c9c: 30002d00 .word 0x30002d00 <== NOT EXECUTED
30002ca0: 30002d08 .word 0x30002d08 <== NOT EXECUTED
30002ca4: 30002d10 .word 0x30002d10 <== NOT EXECUTED
30002ca8: 30002d18 .word 0x30002d18 <== NOT EXECUTED
30002cac: 30002d20 .word 0x30002d20 <== NOT EXECUTED
30002cb0: 30002cb4 .word 0x30002cb4 <== NOT EXECUTED
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
30002cb4: e5930060 ldr r0, [r3, #96] ; 0x60
break;
30002cb8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default:
rtems_set_errno_and_return_minus_one( EINVAL );
30002cbc: eb002c0a bl 3000dcec <__errno>
30002cc0: e3a03016 mov r3, #22
30002cc4: e5803000 str r3, [r0]
30002cc8: e3e00000 mvn r0, #0
break;
}
return return_value;
}
30002ccc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
30002cd0: e5930038 ldr r0, [r3, #56] ; 0x38
break;
30002cd4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
30002cd8: e593003c ldr r0, [r3, #60] ; 0x3c
break;
30002cdc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
30002ce0: e5930040 ldr r0, [r3, #64] ; 0x40
break;
30002ce4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX:
return_value = the_limits->name_max;
30002ce8: e5930044 ldr r0, [r3, #68] ; 0x44
break;
30002cec: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX:
return_value = the_limits->path_max;
30002cf0: e5930048 ldr r0, [r3, #72] ; 0x48
break;
30002cf4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
30002cf8: e593004c ldr r0, [r3, #76] ; 0x4c
break;
30002cfc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
30002d00: e5930054 ldr r0, [r3, #84] ; 0x54
break;
30002d04: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
30002d08: e5930058 ldr r0, [r3, #88] ; 0x58
break;
30002d0c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
30002d10: e5930064 ldr r0, [r3, #100] ; 0x64
break;
30002d14: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
30002d18: e5930050 ldr r0, [r3, #80] ; 0x50
break;
30002d1c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
30002d20: e593005c ldr r0, [r3, #92] ; 0x5c
break;
30002d24: e49df004 pop {pc} ; (ldr pc, [sp], #4)
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
30002d28: eb002bef bl 3000dcec <__errno>
30002d2c: e3a03009 mov r3, #9
30002d30: e5803000 str r3, [r0]
30002d34: e3e00000 mvn r0, #0
30002d38: e49df004 pop {pc} ; (ldr pc, [sp], #4)
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
30002d3c: eb002bea bl 3000dcec <__errno> <== NOT EXECUTED
30002d40: e3a03016 mov r3, #22 <== NOT EXECUTED
30002d44: e5803000 str r3, [r0] <== NOT EXECUTED
30002d48: e3e00000 mvn r0, #0 <== NOT EXECUTED
30002d4c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
300035c0 <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
300035c0: e59f3028 ldr r3, [pc, #40] ; 300035f0 <free_user_env+0x30> <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
300035c4: e92d4010 push {r4, lr} <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
300035c8: e1500003 cmp r0, r3 <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
300035cc: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
300035d0: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
300035d4: e2800004 add r0, r0, #4 <== NOT EXECUTED
300035d8: ebfffb9b bl 3000244c <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
300035dc: e2840018 add r0, r4, #24 <== NOT EXECUTED
300035e0: ebfffb99 bl 3000244c <rtems_filesystem_freenode> <== NOT EXECUTED
free(env);
300035e4: e1a00004 mov r0, r4 <== NOT EXECUTED
}
}
300035e8: e8bd4010 pop {r4, lr} <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
300035ec: eafffb9b b 30002460 <free> <== NOT EXECUTED
3000214c <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
3000214c: e92d4030 push {r4, r5, lr}
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
30002150: e2504000 subs r4, r0, #0
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
30002154: e24dd008 sub sp, sp, #8
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
30002158: 0a00000f beq 3000219c <gettimeofday+0x50>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000215c: e10f5000 mrs r5, CPSR
30002160: e3853080 orr r3, r5, #128 ; 0x80
30002164: e129f003 msr CPSR_fc, r3
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
30002168: e1a0000d mov r0, sp
3000216c: eb0010c0 bl 30006474 <_TOD_Get>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30002170: e129f005 msr CPSR_fc, r5
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
30002174: e59f2034 ldr r2, [pc, #52] ; 300021b0 <gettimeofday+0x64>
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
30002178: e59d3004 ldr r3, [sp, #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;
3000217c: e3a00000 mov r0, #0
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
30002180: e0c21293 smull r1, r2, r3, r2
30002184: e1a03fc3 asr r3, r3, #31
30002188: e0633342 rsb r3, r3, r2, asr #6
time->tv_sec = now.tv_sec;
3000218c: e59d2000 ldr r2, [sp]
time->tv_usec = useconds;
30002190: e884000c stm r4, {r2, r3}
}
30002194: e28dd008 add sp, sp, #8
30002198: e8bd8030 pop {r4, r5, pc}
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
rtems_set_errno_and_return_minus_one( EFAULT );
3000219c: eb002ac5 bl 3000ccb8 <__errno> <== NOT EXECUTED
300021a0: e3a0300e mov r3, #14 <== NOT EXECUTED
300021a4: e5803000 str r3, [r0] <== NOT EXECUTED
300021a8: e3e00000 mvn r0, #0 <== NOT EXECUTED
300021ac: eafffff8 b 30002194 <gettimeofday+0x48> <== NOT EXECUTED
30003fd4 <iproc>:
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
30003fd4: e5913030 ldr r3, [r1, #48] ; 0x30
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003fd8: e92d4030 push {r4, r5, lr}
if (tty->termios.c_iflag & ISTRIP)
30003fdc: e3130020 tst r3, #32
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003fe0: e20040ff and r4, r0, #255 ; 0xff
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
30003fe4: 1200407f andne r4, r0, #127 ; 0x7f
if (tty->termios.c_iflag & IUCLC)
30003fe8: e3130c02 tst r3, #512 ; 0x200
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003fec: e1a05001 mov r5, r1
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
30003ff0: 0a000007 beq 30004014 <iproc+0x40>
c = tolower (c);
30003ff4: e59f21a0 ldr r2, [pc, #416] ; 3000419c <iproc+0x1c8>
30003ff8: e5922000 ldr r2, [r2]
30003ffc: e0822004 add r2, r2, r4
30004000: e5d22001 ldrb r2, [r2, #1]
30004004: e2022003 and r2, r2, #3
30004008: e3520001 cmp r2, #1
3000400c: 02844020 addeq r4, r4, #32
30004010: e20440ff and r4, r4, #255 ; 0xff
if (c == '\r') {
30004014: e354000d cmp r4, #13
30004018: 0a000014 beq 30004070 <iproc+0x9c>
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
3000401c: e354000a cmp r4, #10
30004020: 0a000036 beq 30004100 <iproc+0x12c>
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
30004024: e3540000 cmp r4, #0
30004028: 1a000016 bne 30004088 <iproc+0xb4>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
3000402c: e59f216c ldr r2, [pc, #364] ; 300041a0 <iproc+0x1cc>
30004030: e5953020 ldr r3, [r5, #32]
30004034: e5922008 ldr r2, [r2, #8]
30004038: e2422001 sub r2, r2, #1
3000403c: e1530002 cmp r3, r2
30004040: aa000008 bge 30004068 <iproc+0x94>
if (tty->termios.c_lflag & ECHO)
30004044: e595203c ldr r2, [r5, #60] ; 0x3c
30004048: e3120008 tst r2, #8
3000404c: 1a00002e bne 3000410c <iproc+0x138>
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
30004050: e595101c ldr r1, [r5, #28] <== NOT EXECUTED
30004054: e2832001 add r2, r3, #1 <== NOT EXECUTED
30004058: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED
}
return 0;
3000405c: e3a00000 mov r0, #0 <== NOT EXECUTED
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
30004060: e5852020 str r2, [r5, #32] <== NOT EXECUTED
30004064: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
}
return 0;
30004068: e3a00000 mov r0, #0 <== NOT EXECUTED
}
3000406c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
30004070: e3130080 tst r3, #128 ; 0x80
return 0;
30004074: 13a00000 movne r0, #0
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
30004078: 18bd8030 popne {r4, r5, pc}
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
3000407c: e3130c01 tst r3, #256 ; 0x100
30004080: 03a0400d moveq r4, #13
30004084: 13a0400a movne r4, #10
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
30004088: e595303c ldr r3, [r5, #60] ; 0x3c
3000408c: e3130002 tst r3, #2
30004090: 0affffe5 beq 3000402c <iproc+0x58>
if (c == tty->termios.c_cc[VERASE]) {
30004094: e5d52043 ldrb r2, [r5, #67] ; 0x43
30004098: e1520004 cmp r2, r4
3000409c: 0a000039 beq 30004188 <iproc+0x1b4>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
300040a0: e5d52044 ldrb r2, [r5, #68] ; 0x44
300040a4: e1520004 cmp r2, r4
300040a8: 0a000025 beq 30004144 <iproc+0x170>
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
300040ac: e5d52045 ldrb r2, [r5, #69] ; 0x45
300040b0: e1520004 cmp r2, r4
return 1;
300040b4: 03a00001 moveq r0, #1
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
300040b8: 08bd8030 popeq {r4, r5, pc}
return 1;
} else if (c == '\n') {
300040bc: e354000a cmp r4, #10
300040c0: 0a000024 beq 30004158 <iproc+0x184>
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
300040c4: e5d5204c ldrb r2, [r5, #76] ; 0x4c
300040c8: e1520004 cmp r2, r4
300040cc: 0a000002 beq 300040dc <iproc+0x108>
300040d0: e5d52051 ldrb r2, [r5, #81] ; 0x51
300040d4: e1520004 cmp r2, r4
300040d8: 1affffd3 bne 3000402c <iproc+0x58>
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
300040dc: e3130008 tst r3, #8 <== NOT EXECUTED
300040e0: 1a000013 bne 30004134 <iproc+0x160> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
300040e4: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED
300040e8: e595101c ldr r1, [r5, #28] <== NOT EXECUTED
300040ec: e2832001 add r2, r3, #1 <== NOT EXECUTED
300040f0: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED
return 1;
300040f4: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
300040f8: e5852020 str r2, [r5, #32] <== NOT EXECUTED
return 1;
300040fc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
30004100: e3130040 tst r3, #64 ; 0x40
30004104: 13a0400d movne r4, #13
30004108: eaffffde b 30004088 <iproc+0xb4>
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
3000410c: e1a00004 mov r0, r4
30004110: e1a01005 mov r1, r5
30004114: ebffff03 bl 30003d28 <echo>
30004118: e5953020 ldr r3, [r5, #32]
tty->cbuf[tty->ccount++] = c;
3000411c: e595101c ldr r1, [r5, #28]
30004120: e2832001 add r2, r3, #1
30004124: e7c14003 strb r4, [r1, r3]
}
return 0;
30004128: e3a00000 mov r0, #0
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
3000412c: e5852020 str r2, [r5, #32]
30004130: e8bd8030 pop {r4, r5, pc}
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
30004134: e1a00004 mov r0, r4 <== NOT EXECUTED
30004138: e1a01005 mov r1, r5 <== NOT EXECUTED
3000413c: ebfffef9 bl 30003d28 <echo> <== NOT EXECUTED
30004140: eaffffe7 b 300040e4 <iproc+0x110> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
30004144: e1a00005 mov r0, r5
30004148: e3a01001 mov r1, #1
3000414c: ebffff1a bl 30003dbc <erase>
return 0;
30004150: e3a00000 mov r0, #0
30004154: e8bd8030 pop {r4, r5, pc}
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
30004158: e3130048 tst r3, #72 ; 0x48
echo (c, tty);
3000415c: 11a00004 movne r0, r4
30004160: 11a01005 movne r1, r5
30004164: 1bfffeef blne 30003d28 <echo>
tty->cbuf[tty->ccount++] = c;
30004168: e5953020 ldr r3, [r5, #32]
3000416c: e595101c ldr r1, [r5, #28]
30004170: e3a0000a mov r0, #10
30004174: e2832001 add r2, r3, #1
30004178: e7c10003 strb r0, [r1, r3]
return 1;
3000417c: e3a00001 mov r0, #1
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
30004180: e5852020 str r2, [r5, #32]
return 1;
30004184: e8bd8030 pop {r4, r5, pc}
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
30004188: e1a00005 mov r0, r5
3000418c: e3a01000 mov r1, #0
30004190: ebffff09 bl 30003dbc <erase>
return 0;
30004194: e3a00000 mov r0, #0
30004198: e8bd8030 pop {r4, r5, pc}
30020a44 <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
30020a44: e3a00000 mov r0, #0 <== NOT EXECUTED
30020a48: e12fff1e bx lr <== NOT EXECUTED
30002410 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
30002410: e59f30d4 ldr r3, [pc, #212] ; 300024ec <malloc+0xdc>
#include "malloc_p.h"
void *malloc(
size_t size
)
{
30002414: e92d4030 push {r4, r5, lr}
void *return_this;
MSBUMP(malloc_calls, 1);
30002418: e5932004 ldr r2, [r3, #4]
#include "malloc_p.h"
void *malloc(
size_t size
)
{
3000241c: e1a04000 mov r4, r0
void *return_this;
MSBUMP(malloc_calls, 1);
30002420: e2822001 add r2, r2, #1
30002424: e5832004 str r2, [r3, #4]
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
30002428: ebffffb0 bl 300022f0 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
3000242c: e3540000 cmp r4, #0
return (void *) 0;
30002430: 01a05004 moveq r5, r4
malloc_deferred_frees_process();
/*
* Validate the parameters
*/
if ( !size )
30002434: 0a000018 beq 3000249c <malloc+0x8c>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
30002438: e59f30b0 ldr r3, [pc, #176] ; 300024f0 <malloc+0xe0>
3000243c: e5933000 ldr r3, [r3]
30002440: e3530003 cmp r3, #3
30002444: 0a000024 beq 300024dc <malloc+0xcc>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
30002448: e59f30a4 ldr r3, [pc, #164] ; 300024f4 <malloc+0xe4>
3000244c: e3a02000 mov r2, #0
30002450: e5930000 ldr r0, [r3]
30002454: e1a01004 mov r1, r4
30002458: e1a03002 mov r3, r2
3000245c: eb00134c bl 30007194 <_Protected_heap_Allocate_aligned_with_boundary>
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
30002460: e2505000 subs r5, r0, #0
30002464: 0a00000e beq 300024a4 <malloc+0x94>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
30002468: e59f3088 ldr r3, [pc, #136] ; 300024f8 <malloc+0xe8>
3000246c: e5933000 ldr r3, [r3]
30002470: e3530000 cmp r3, #0
(*rtems_malloc_dirty_helper)( return_this, size );
30002474: 11a00005 movne r0, r5
30002478: 11a01004 movne r1, r4
3000247c: 11a0e00f movne lr, pc
30002480: 112fff13 bxne r3
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
30002484: e59f3070 ldr r3, [pc, #112] ; 300024fc <malloc+0xec>
30002488: e5933000 ldr r3, [r3]
3000248c: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
30002490: 11a00005 movne r0, r5
30002494: 11a0e00f movne lr, pc
30002498: 1593f004 ldrne pc, [r3, #4]
return return_this;
}
3000249c: e1a00005 mov r0, r5
300024a0: e8bd8030 pop {r4, r5, pc}
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
300024a4: e59f3054 ldr r3, [pc, #84] ; 30002500 <malloc+0xf0>
300024a8: e5933000 ldr r3, [r3]
300024ac: e3530000 cmp r3, #0
300024b0: 0a000005 beq 300024cc <malloc+0xbc>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
300024b4: e1a00004 mov r0, r4
300024b8: e1a0e00f mov lr, pc
300024bc: e593f004 ldr pc, [r3, #4]
if ( !return_this ) {
300024c0: e3500000 cmp r0, #0
300024c4: 11a05000 movne r5, r0
300024c8: 1affffe6 bne 30002468 <malloc+0x58>
errno = ENOMEM;
300024cc: eb0029f9 bl 3000ccb8 <__errno>
300024d0: e3a0300c mov r3, #12
300024d4: e5803000 str r3, [r0]
return (void *) 0;
300024d8: eaffffef b 3000249c <malloc+0x8c>
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
300024dc: ebffff6f bl 300022a0 <malloc_is_system_state_OK>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
300024e0: e2505000 subs r5, r0, #0
300024e4: 1affffd7 bne 30002448 <malloc+0x38>
300024e8: eaffffeb b 3000249c <malloc+0x8c> <== NOT EXECUTED
3000c08c <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
3000c08c: e92d4010 push {r4, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000c090: e5904018 ldr r4, [r0, #24]
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
3000c094: e1a03000 mov r3, r0
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
3000c098: e5940054 ldr r0, [r4, #84] ; 0x54
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
3000c09c: e24dd008 sub sp, sp, #8
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
3000c0a0: e1500002 cmp r0, r2
3000c0a4: ba00000e blt 3000c0e4 <memfile_ftruncate+0x58>
3000c0a8: 0a00000a beq 3000c0d8 <memfile_ftruncate+0x4c>
* The in-memory files do not currently reclaim memory until the file is
* deleted. So we leave the previously allocated blocks in place for
* future use and just set the length.
*/
the_jnode->info.file.size = length;
3000c0ac: e5841050 str r1, [r4, #80] ; 0x50
3000c0b0: e5842054 str r2, [r4, #84] ; 0x54
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
3000c0b4: e1a0000d mov r0, sp
* deleted. So we leave the previously allocated blocks in place for
* future use and just set the length.
*/
the_jnode->info.file.size = length;
iop->size = the_jnode->info.file.size;
3000c0b8: e9830006 stmib r3, {r1, r2}
IMFS_update_atime( the_jnode );
3000c0bc: e3a01000 mov r1, #0
3000c0c0: ebffd821 bl 3000214c <gettimeofday>
3000c0c4: e59d3000 ldr r3, [sp]
return 0;
3000c0c8: e3a00000 mov r0, #0
*/
the_jnode->info.file.size = length;
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
3000c0cc: e5843040 str r3, [r4, #64] ; 0x40
return 0;
}
3000c0d0: e28dd008 add sp, sp, #8
3000c0d4: e8bd8010 pop {r4, pc}
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
3000c0d8: e5940050 ldr r0, [r4, #80] ; 0x50
3000c0dc: e1500001 cmp r0, r1
3000c0e0: 2afffff1 bcs 3000c0ac <memfile_ftruncate+0x20>
return IMFS_memfile_extend( the_jnode, length );
3000c0e4: e1a00004 mov r0, r4 <== NOT EXECUTED
3000c0e8: ebfffeea bl 3000bc98 <IMFS_memfile_extend> <== NOT EXECUTED
3000c0ec: eafffff7 b 3000c0d0 <memfile_ftruncate+0x44> <== NOT EXECUTED
3000c0f0 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000c0f0: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000c0f4: e5905018 ldr r5, [r0, #24]
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000c0f8: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
3000c0fc: e595304c ldr r3, [r5, #76] ; 0x4c
3000c100: e3530006 cmp r3, #6
3000c104: 0a00000d beq 3000c140 <memfile_lseek+0x50>
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
3000c108: e1a00005 mov r0, r5
3000c10c: e284200c add r2, r4, #12
3000c110: e8920006 ldm r2, {r1, r2}
3000c114: ebfffedf bl 3000bc98 <IMFS_memfile_extend>
3000c118: e3500000 cmp r0, #0
3000c11c: 1a000018 bne 3000c184 <memfile_lseek+0x94>
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
3000c120: e2853050 add r3, r5, #80 ; 0x50
3000c124: e893000c ldm r3, {r2, r3}
3000c128: e984000c stmib r4, {r2, r3}
3000c12c: e284300c add r3, r4, #12
3000c130: e893000c ldm r3, {r2, r3}
}
return iop->offset;
}
3000c134: e1a00002 mov r0, r2
3000c138: e1a01003 mov r1, r3
3000c13c: e8bd8030 pop {r4, r5, pc}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
3000c140: e5951054 ldr r1, [r5, #84] ; 0x54
3000c144: e280300c add r3, r0, #12
3000c148: e893000c ldm r3, {r2, r3}
3000c14c: e1530001 cmp r3, r1
3000c150: e5950050 ldr r0, [r5, #80] ; 0x50
3000c154: ca000002 bgt 3000c164 <memfile_lseek+0x74>
3000c158: 1afffff5 bne 3000c134 <memfile_lseek+0x44>
3000c15c: e1520000 cmp r2, r0
3000c160: 9afffff3 bls 3000c134 <memfile_lseek+0x44>
iop->offset = the_jnode->info.linearfile.size;
3000c164: e1a02000 mov r2, r0 <== NOT EXECUTED
3000c168: e1a03001 mov r3, r1 <== NOT EXECUTED
3000c16c: e1a05000 mov r5, r0 <== NOT EXECUTED
3000c170: e584000c str r0, [r4, #12] <== NOT EXECUTED
3000c174: e5841010 str r1, [r4, #16] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
3000c178: e1a00002 mov r0, r2 <== NOT EXECUTED
3000c17c: e1a01003 mov r1, r3 <== NOT EXECUTED
3000c180: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
3000c184: eb0002cb bl 3000ccb8 <__errno> <== NOT EXECUTED
3000c188: e3a0301c mov r3, #28 <== NOT EXECUTED
3000c18c: e5803000 str r3, [r0] <== NOT EXECUTED
3000c190: e3e02000 mvn r2, #0 <== NOT EXECUTED
3000c194: e3e03000 mvn r3, #0 <== NOT EXECUTED
3000c198: eaffffe5 b 3000c134 <memfile_lseek+0x44> <== NOT EXECUTED
3000bfdc <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000bfdc: e92d40f0 push {r4, r5, r6, r7, lr}
3000bfe0: e1a04000 mov r4, r0
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000bfe4: e5900014 ldr r0, [r0, #20]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000bfe8: e24dd004 sub sp, sp, #4
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000bfec: e3100f81 tst r0, #516 ; 0x204
uint32_t mode
)
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000bff0: e5945018 ldr r5, [r4, #24]
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000bff4: 0a000002 beq 3000c004 <memfile_open+0x28>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
3000bff8: e595304c ldr r3, [r5, #76] ; 0x4c
3000bffc: e3530006 cmp r3, #6
3000c000: 0a00000c beq 3000c038 <memfile_open+0x5c>
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
3000c004: e3100c02 tst r0, #512 ; 0x200
3000c008: 1a000005 bne 3000c024 <memfile_open+0x48>
3000c00c: e2853050 add r3, r5, #80 ; 0x50
3000c010: e893000c ldm r3, {r2, r3}
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
3000c014: e984000c stmib r4, {r2, r3}
return 0;
3000c018: e3a00000 mov r0, #0
}
3000c01c: e28dd004 add sp, sp, #4
3000c020: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
3000c024: e2853050 add r3, r5, #80 ; 0x50
3000c028: e893000c ldm r3, {r2, r3}
3000c02c: e584200c str r2, [r4, #12]
3000c030: e5843010 str r3, [r4, #16]
3000c034: eafffff6 b 3000c014 <memfile_open+0x38>
/*
* 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;
3000c038: e595c050 ldr ip, [r5, #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;
3000c03c: e3a06000 mov r6, #0 <== NOT EXECUTED
&& (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;
the_jnode->info.file.size = 0;
3000c040: e3a01000 mov r1, #0 <== NOT EXECUTED
3000c044: e3a02000 mov r2, #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;
3000c048: e3a07005 mov r7, #5 <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
3000c04c: e15c0006 cmp ip, r6 <== 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;
3000c050: e5953058 ldr r3, [r5, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
3000c054: e585704c str r7, [r5, #76] ; 0x4c <== NOT EXECUTED
the_jnode->info.file.size = 0;
3000c058: e5851050 str r1, [r5, #80] ; 0x50 <== NOT EXECUTED
3000c05c: e5852054 str r2, [r5, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
3000c060: e5856058 str r6, [r5, #88] ; 0x58 <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
3000c064: e585605c str r6, [r5, #92] ; 0x5c <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
3000c068: e5856060 str r6, [r5, #96] ; 0x60 <== NOT EXECUTED
if ((count != 0)
3000c06c: 0affffe4 beq 3000c004 <memfile_open+0x28> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
3000c070: e1a00005 mov r0, r5 <== NOT EXECUTED
3000c074: e58dc000 str ip, [sp] <== NOT EXECUTED
3000c078: ebffff53 bl 3000bdcc <IMFS_memfile_write> <== NOT EXECUTED
3000c07c: e3700001 cmn r0, #1 <== NOT EXECUTED
3000c080: 0affffe5 beq 3000c01c <memfile_open+0x40> <== NOT EXECUTED
3000c084: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
3000c088: eaffffdd b 3000c004 <memfile_open+0x28> <== NOT EXECUTED
30002514 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
30002514: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
30002518: e3110a0f tst r1, #61440 ; 0xf000
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
3000251c: e24dd020 sub sp, sp, #32
30002520: e1a04001 mov r4, r1
30002524: e1a06000 mov r6, r0
30002528: e1a07002 mov r7, r2
3000252c: e1a08003 mov r8, r3
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
30002530: 1a000006 bne 30002550 <mknod+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
30002534: eb0029df bl 3000ccb8 <__errno> <== NOT EXECUTED
30002538: e3a03016 mov r3, #22 <== NOT EXECUTED
3000253c: e5803000 str r3, [r0] <== NOT EXECUTED
30002540: e3e04000 mvn r4, #0 <== NOT EXECUTED
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
30002544: e1a00004 mov r0, r4
30002548: e28dd020 add sp, sp, #32
3000254c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
rtems_set_errno_and_return_minus_one( EINVAL );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
30002550: e28d5004 add r5, sp, #4
30002554: e1a02005 mov r2, r5
30002558: e28d101c add r1, sp, #28
3000255c: eb000264 bl 30002ef4 <rtems_filesystem_get_start_loc>
result = (*temp_loc.ops->evalformake_h)(
30002560: e59d001c ldr r0, [sp, #28]
30002564: e1a01005 mov r1, r5
30002568: e0860000 add r0, r6, r0
3000256c: e28d2018 add r2, sp, #24
30002570: e59d3010 ldr r3, [sp, #16]
30002574: e1a0e00f mov lr, pc
30002578: e593f004 ldr pc, [r3, #4]
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
3000257c: e3500000 cmp r0, #0
return -1;
30002580: 13e04000 mvnne r4, #0
result = (*temp_loc.ops->evalformake_h)(
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
30002584: 1affffee bne 30002544 <mknod+0x30>
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
30002588: e1a01004 mov r1, r4
3000258c: e1a02007 mov r2, r7
30002590: e1a03008 mov r3, r8
30002594: e58d5000 str r5, [sp]
30002598: e59d0018 ldr r0, [sp, #24]
3000259c: e59dc010 ldr ip, [sp, #16]
300025a0: e1a0e00f mov lr, pc
300025a4: e59cf014 ldr pc, [ip, #20]
300025a8: e1a04000 mov r4, r0
rtems_filesystem_freenode( &temp_loc );
300025ac: e1a00005 mov r0, r5
300025b0: ebfffeb7 bl 30002094 <rtems_filesystem_freenode>
return result;
300025b4: eaffffe2 b 30002544 <mknod+0x30>
30002644 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
30002644: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
30002648: e3530001 cmp r3, #1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
3000264c: e24dd028 sub sp, sp, #40 ; 0x28
30002650: e58d3004 str r3, [sp, #4]
30002654: e1a08000 mov r8, r0
30002658: e1a06001 mov r6, r1
3000265c: e1a0a002 mov sl, r2
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
30002660: 8a000092 bhi 300028b0 <mount+0x26c>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
30002664: e1a00002 mov r0, r2
30002668: eb001f6d bl 3000a424 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
3000266c: e3500000 cmp r0, #0
30002670: e58d000c str r0, [sp, #12]
30002674: 0a00008d beq 300028b0 <mount+0x26c>
{
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;
30002678: e2565000 subs r5, r6, #0
3000267c: 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 : "/";
30002680: e3550000 cmp r5, #0
30002684: 0a000084 beq 3000289c <mount+0x258>
* 4) The mount point exists with the proper permissions to allow mounting
* 5) The selected mount point already has a file system mounted to it
*
*/
int mount(
30002688: e1a00006 mov r0, r6
3000268c: eb002d79 bl 3000dc78 <strlen>
30002690: e58d6010 str r6, [sp, #16]
30002694: e58d0008 str r0, [sp, #8]
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;
30002698: e1a0000a mov r0, sl
3000269c: eb002d75 bl 3000dc78 <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
300026a0: e3580000 cmp r8, #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;
300026a4: e280b001 add fp, r0, #1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
300026a8: 01a09008 moveq r9, r8
300026ac: 0a000002 beq 300026bc <mount+0x78>
300026b0: e1a00008 mov r0, r8
300026b4: eb002d6f bl 3000dc78 <strlen>
300026b8: e2809001 add r9, r0, #1
size_t target_length = strlen( target );
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
300026bc: e59d3008 ldr r3, [sp, #8]
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
300026c0: e3a00001 mov r0, #1
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_length = strlen( target );
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
300026c4: e2831075 add r1, r3, #117 ; 0x75
300026c8: e081100b add r1, r1, fp
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
300026cc: e0811009 add r1, r1, r9
300026d0: ebfffde8 bl 30001e78 <calloc>
if ( mt_entry != NULL ) {
300026d4: e2504000 subs r4, r0, #0
300026d8: 0a00006a beq 30002888 <mount+0x244>
char *str = (char *) mt_entry + sizeof( *mt_entry );
300026dc: e2847074 add r7, r4, #116 ; 0x74
strcpy( str, filesystemtype );
300026e0: e1a00007 mov r0, r7
300026e4: e1a0100a mov r1, sl
300026e8: eb002d12 bl 3000db38 <strcpy>
mt_entry->type = str;
str += filesystemtype_size;
if ( source_or_null != NULL ) {
300026ec: e3580000 cmp r8, #0
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
mt_entry->type = str;
300026f0: e584706c str r7, [r4, #108] ; 0x6c
str += filesystemtype_size;
300026f4: e087700b add r7, r7, fp
if ( source_or_null != NULL ) {
300026f8: 0a000004 beq 30002710 <mount+0xcc>
strcpy( str, source_or_null );
300026fc: e1a00007 mov r0, r7
30002700: e1a01008 mov r1, r8
30002704: eb002d0b bl 3000db38 <strcpy>
mt_entry->dev = str;
30002708: e5847070 str r7, [r4, #112] ; 0x70
str += source_size;
3000270c: e0877009 add r7, r7, r9
}
strcpy( str, target );
30002710: e59d1010 ldr r1, [sp, #16]
30002714: e1a00007 mov r0, r7
30002718: eb002d06 bl 3000db38 <strcpy>
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
3000271c: e59fe204 ldr lr, [pc, #516] ; 30002928 <mount+0x2e4>
30002720: e284c038 add ip, r4, #56 ; 0x38
30002724: e8be000f ldm lr!, {r0, r1, r2, r3}
30002728: e8ac000f stmia ip!, {r0, r1, r2, r3}
3000272c: e8be000f ldm lr!, {r0, r1, r2, r3}
30002730: e8ac000f stmia ip!, {r0, r1, r2, r3}
30002734: e89e000f ldm lr, {r0, r1, r2, r3}
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
30002738: e59de004 ldr lr, [sp, #4]
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
3000273c: e3550000 cmp r5, #0
mt_entry->dev = str;
str += source_size;
}
strcpy( str, target );
mt_entry->target = str;
30002740: e5847068 str r7, [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;
30002744: e584402c str r4, [r4, #44] ; 0x2c
mt_entry->options = options;
30002748: e584e030 str lr, [r4, #48] ; 0x30
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
3000274c: 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 ) {
30002750: 1a000024 bne 300027e8 <mount+0x1a4>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
30002754: e59f31d0 ldr r3, [pc, #464] ; 3000292c <mount+0x2e8>
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
30002758: e5932000 ldr r2, [r3]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3000275c: e2833004 add r3, r3, #4
30002760: e1520003 cmp r2, r3
)
{
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;
30002764: 01a07005 moveq r7, r5
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
30002768: 1a000055 bne 300028c4 <mount+0x280>
* 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 ) ) {
3000276c: e1a00004 mov r0, r4
30002770: e59d104c ldr r1, [sp, #76] ; 0x4c
30002774: e59d300c ldr r3, [sp, #12]
30002778: e1a0e00f mov lr, pc
3000277c: e12fff13 bx r3
30002780: e2506000 subs r6, r0, #0
30002784: 1a000055 bne 300028e0 <mount+0x29c>
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 );
30002788: e59f71a0 ldr r7, [pc, #416] ; 30002930 <mount+0x2ec>
3000278c: e1a02006 mov r2, r6
30002790: e1a01006 mov r1, r6
30002794: e5970000 ldr r0, [r7]
30002798: eb000bd0 bl 300056e0 <rtems_semaphore_obtain>
3000279c: e59f0188 ldr r0, [pc, #392] ; 3000292c <mount+0x2e8>
300027a0: e1a01004 mov r1, r4
300027a4: eb000e28 bl 3000604c <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
300027a8: e5970000 ldr r0, [r7]
300027ac: eb000c14 bl 30005804 <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
300027b0: e3550000 cmp r5, #0
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
300027b4: 11a00006 movne r0, r6
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
300027b8: 1a000008 bne 300027e0 <mount+0x19c>
rtems_filesystem_root = mt_entry->mt_fs_root;
300027bc: e59f3170 ldr r3, [pc, #368] ; 30002934 <mount+0x2f0>
300027c0: e284401c add r4, r4, #28
300027c4: e593c000 ldr ip, [r3]
300027c8: e8b4000f ldm r4!, {r0, r1, r2, r3}
300027cc: e28cc018 add ip, ip, #24
300027d0: e8ac000f stmia ip!, {r0, r1, r2, r3}
300027d4: e5943000 ldr r3, [r4]
return 0;
300027d8: 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;
300027dc: e58c3000 str r3, [ip]
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
300027e0: e28dd028 add sp, sp, #40 ; 0x28
300027e4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
300027e8: e28d7014 add r7, sp, #20
300027ec: e3a0c001 mov ip, #1
300027f0: e1a00006 mov r0, r6
300027f4: e59d1008 ldr r1, [sp, #8]
300027f8: e3a02007 mov r2, #7
300027fc: e1a03007 mov r3, r7
30002800: e58dc000 str ip, [sp]
30002804: ebfffdd7 bl 30001f68 <rtems_filesystem_evaluate_path>
30002808: e3700001 cmn r0, #1
3000280c: 0a00002f beq 300028d0 <mount+0x28c>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
30002810: e1a00007 mov r0, r7
30002814: e59d3020 ldr r3, [sp, #32]
30002818: e1a0e00f mov lr, pc
3000281c: e593f010 ldr pc, [r3, #16]
30002820: e3500001 cmp r0, #1
30002824: 1a000037 bne 30002908 <mount+0x2c4>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
30002828: e59f0108 ldr r0, [pc, #264] ; 30002938 <mount+0x2f4>
3000282c: e59d1014 ldr r1, [sp, #20]
30002830: ebffff65 bl 300025cc <rtems_filesystem_mount_iterate>
30002834: e3500000 cmp r0, #0
30002838: 1a000036 bne 30002918 <mount+0x2d4>
* 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;
3000283c: e59d2014 ldr r2, [sp, #20]
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
30002840: e59d3020 ldr r3, [sp, #32]
* 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;
30002844: e5842008 str r2, [r4, #8]
mt_entry->mt_point_node.handlers = loc.handlers;
30002848: e59d201c ldr r2, [sp, #28]
mt_entry->mt_point_node.ops = loc.ops;
3000284c: e5843014 str r3, [r4, #20]
* 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;
30002850: e5842010 str r2, [r4, #16]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
30002854: e59d2024 ldr r2, [sp, #36] ; 0x24
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
30002858: e1a00004 mov r0, r4
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
3000285c: e5842018 str r2, [r4, #24]
/*
* 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 ) ) {
30002860: e1a0e00f mov lr, pc
30002864: e593f020 ldr pc, [r3, #32]
30002868: e3500000 cmp r0, #0
3000286c: 0affffbe beq 3000276c <mount+0x128>
return 0;
cleanup_and_bail:
free( mt_entry );
30002870: e1a00004 mov r0, r4
30002874: ebfffe0b bl 300020a8 <free>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
30002878: e1a00007 mov r0, r7
3000287c: ebfffe04 bl 30002094 <rtems_filesystem_freenode>
return -1;
30002880: e3e00000 mvn r0, #0
30002884: eaffffd5 b 300027e0 <mount+0x19c>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
30002888: eb00290a bl 3000ccb8 <__errno> <== NOT EXECUTED
3000288c: e3a0300c mov r3, #12 <== NOT EXECUTED
30002890: e5803000 str r3, [r0] <== NOT EXECUTED
30002894: e3e00000 mvn r0, #0 <== NOT EXECUTED
30002898: eaffffd0 b 300027e0 <mount+0x19c> <== NOT EXECUTED
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
3000289c: e59f3098 ldr r3, [pc, #152] ; 3000293c <mount+0x2f8>
300028a0: e3a0e001 mov lr, #1
300028a4: e58d3010 str r3, [sp, #16]
300028a8: e58de008 str lr, [sp, #8]
300028ac: eaffff79 b 30002698 <mount+0x54>
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
300028b0: eb002900 bl 3000ccb8 <__errno>
300028b4: e3a03016 mov r3, #22
300028b8: e5803000 str r3, [r0]
300028bc: e3e00000 mvn r0, #0
300028c0: eaffffc6 b 300027e0 <mount+0x19c>
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
300028c4: eb0028fb bl 3000ccb8 <__errno> <== NOT EXECUTED
300028c8: e3a03016 mov r3, #22 <== NOT EXECUTED
300028cc: e5803000 str r3, [r0] <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
300028d0: e1a00004 mov r0, r4 <== NOT EXECUTED
300028d4: ebfffdf3 bl 300020a8 <free> <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
300028d8: e3e00000 mvn r0, #0 <== NOT EXECUTED
300028dc: eaffffbf b 300027e0 <mount+0x19c> <== NOT EXECUTED
if ( (*mount_h)( mt_entry, data ) ) {
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
300028e0: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
300028e4: e1a00004 mov r0, r4 <== NOT EXECUTED
300028e8: e1a0e00f mov lr, pc <== NOT EXECUTED
300028ec: e593f028 ldr pc, [r3, #40] ; 0x28 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
300028f0: e1a00004 mov r0, r4 <== NOT EXECUTED
300028f4: ebfffdeb bl 300020a8 <free> <== NOT EXECUTED
if ( loc_to_free )
300028f8: e3570000 cmp r7, #0 <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
return -1;
300028fc: 03e00000 mvneq r0, #0 <== NOT EXECUTED
cleanup_and_bail:
free( mt_entry );
if ( loc_to_free )
30002900: 0affffb6 beq 300027e0 <mount+0x19c> <== NOT EXECUTED
30002904: eaffffdb b 30002878 <mount+0x234> <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
30002908: eb0028ea bl 3000ccb8 <__errno>
3000290c: e3a03014 mov r3, #20
30002910: e5803000 str r3, [r0]
goto cleanup_and_bail;
30002914: eaffffd5 b 30002870 <mount+0x22c>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
errno = EBUSY;
30002918: eb0028e6 bl 3000ccb8 <__errno>
3000291c: e3a03010 mov r3, #16
30002920: e5803000 str r3, [r0]
goto cleanup_and_bail;
30002924: eaffffd1 b 30002870 <mount+0x22c>
30002944 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
30002944: e92d4010 push {r4, lr}
30002948: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
3000294c: eb0029dc bl 3000d0c4 <fileno>
30002950: e3500002 cmp r0, #2
30002954: 9a000003 bls 30002968 <newlib_free_buffers+0x24>
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
30002958: e1a00004 mov r0, r4 <== NOT EXECUTED
3000295c: eb002923 bl 3000cdf0 <fclose> <== NOT EXECUTED
}
return 0;
}
30002960: e3a00000 mov r0, #0
30002964: e8bd8010 pop {r4, pc}
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
30002968: e1d430bc ldrh r3, [r4, #12]
3000296c: e3130080 tst r3, #128 ; 0x80
30002970: 0afffffa beq 30002960 <newlib_free_buffers+0x1c>
free( fp->_bf._base );
30002974: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
30002978: ebfffdca bl 300020a8 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
3000297c: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
30002980: e3a03000 mov r3, #0 <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
30002984: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED
30002988: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
3000298c: e5843000 str r3, [r4] <== NOT EXECUTED
30002990: e5843010 str r3, [r4, #16] <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
30002994: e3a00000 mov r0, #0 <== NOT EXECUTED
30002998: e8bd8010 pop {r4, pc} <== NOT EXECUTED
300025f0 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
300025f0: e92d4010 push {r4, lr}
rtems_device_driver status;
if ( !initialized ) {
300025f4: e59f3044 ldr r3, [pc, #68] ; 30002640 <null_initialize+0x50>
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
300025f8: e1a04000 mov r4, r0
rtems_device_driver status;
if ( !initialized ) {
300025fc: e5d32000 ldrb r2, [r3]
30002600: e3520000 cmp r2, #0
30002604: 0a000001 beq 30002610 <null_initialize+0x20>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
30002608: e3a00000 mov r0, #0
3000260c: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
30002610: e3a0c001 mov ip, #1
status = rtems_io_register_name(
30002614: e59f0028 ldr r0, [pc, #40] ; 30002644 <null_initialize+0x54>
30002618: e1a01004 mov r1, r4
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
3000261c: e5c3c000 strb ip, [r3]
status = rtems_io_register_name(
30002620: eb000189 bl 30002c4c <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
30002624: e3500000 cmp r0, #0
30002628: 1a000003 bne 3000263c <null_initialize+0x4c>
rtems_fatal_error_occurred(status);
NULL_major = major;
3000262c: e59f3014 ldr r3, [pc, #20] ; 30002648 <null_initialize+0x58>
}
return RTEMS_SUCCESSFUL;
}
30002630: e3a00000 mov r0, #0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
NULL_major = major;
30002634: e5834000 str r4, [r3]
}
return RTEMS_SUCCESSFUL;
}
30002638: e8bd8010 pop {r4, pc}
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
3000263c: eb001259 bl 30006fa8 <rtems_fatal_error_occurred> <== NOT EXECUTED
30003bb8 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003bb8: e92d4010 push {r4, lr}
int i;
if (tty->termios.c_oflag & OPOST) {
30003bbc: e5913034 ldr r3, [r1, #52] ; 0x34
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003bc0: e24dd004 sub sp, sp, #4
int i;
if (tty->termios.c_oflag & OPOST) {
30003bc4: e3130001 tst r3, #1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003bc8: e1a04001 mov r4, r1
30003bcc: e5cd0000 strb r0, [sp]
int i;
if (tty->termios.c_oflag & OPOST) {
30003bd0: 0a000014 beq 30003c28 <oproc+0x70>
switch (c) {
30003bd4: e5dd1000 ldrb r1, [sp]
30003bd8: e2412008 sub r2, r1, #8
30003bdc: e3520005 cmp r2, #5
30003be0: 979ff102 ldrls pc, [pc, r2, lsl #2]
30003be4: ea000005 b 30003c00 <oproc+0x48>
30003be8: 30003cb0 .word 0x30003cb0 <== NOT EXECUTED
30003bec: 30003c78 .word 0x30003c78 <== NOT EXECUTED
30003bf0: 30003cc4 .word 0x30003cc4 <== NOT EXECUTED
30003bf4: 30003c00 .word 0x30003c00 <== NOT EXECUTED
30003bf8: 30003c00 .word 0x30003c00 <== NOT EXECUTED
30003bfc: 30003c40 .word 0x30003c40 <== NOT EXECUTED
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
30003c00: e3130002 tst r3, #2
30003c04: 1a00003a bne 30003cf4 <oproc+0x13c>
30003c08: e59f310c ldr r3, [pc, #268] ; 30003d1c <oproc+0x164>
30003c0c: e5933000 ldr r3, [r3]
c = toupper(c);
if (!iscntrl(c))
30003c10: e0831001 add r1, r3, r1
30003c14: e5d13001 ldrb r3, [r1, #1]
30003c18: e3130020 tst r3, #32
tty->column++;
30003c1c: 05943028 ldreq r3, [r4, #40] ; 0x28
30003c20: 02833001 addeq r3, r3, #1
30003c24: 05843028 streq r3, [r4, #40] ; 0x28
break;
}
}
rtems_termios_puts (&c, 1, tty);
30003c28: e1a0000d mov r0, sp
30003c2c: e3a01001 mov r1, #1
30003c30: e1a02004 mov r2, r4
30003c34: ebffff99 bl 30003aa0 <rtems_termios_puts>
}
30003c38: e28dd004 add sp, sp, #4
30003c3c: e8bd8010 pop {r4, pc}
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
30003c40: e3130010 tst r3, #16 <== NOT EXECUTED
30003c44: 0a000002 beq 30003c54 <oproc+0x9c> <== NOT EXECUTED
30003c48: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED
30003c4c: e3520000 cmp r2, #0 <== NOT EXECUTED
30003c50: 0afffff8 beq 30003c38 <oproc+0x80> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
30003c54: e2132008 ands r2, r3, #8 <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
break;
}
tty->column = 0;
30003c58: 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) {
30003c5c: 0afffff1 beq 30003c28 <oproc+0x70> <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
30003c60: 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';
30003c64: e3a0300a mov r3, #10 <== NOT EXECUTED
30003c68: e5cd3000 strb r3, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
30003c6c: 13a03000 movne r3, #0 <== NOT EXECUTED
30003c70: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003c74: eaffffeb b 30003c28 <oproc+0x70> <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
30003c78: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003c7c: e2033b06 and r3, r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
30003c80: e2021007 and r1, r2, #7
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003c84: e3530b06 cmp r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
30003c88: e2611008 rsb r1, r1, #8
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
30003c8c: 10811002 addne r1, r1, r2
30003c90: 15841028 strne r1, [r4, #40] ; 0x28
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003c94: 1affffe3 bne 30003c28 <oproc+0x70>
tty->column += i;
30003c98: e0812002 add r2, r1, r2
30003c9c: e5842028 str r2, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
30003ca0: e59f0078 ldr r0, [pc, #120] ; 30003d20 <oproc+0x168>
30003ca4: e1a02004 mov r2, r4
30003ca8: ebffff7c bl 30003aa0 <rtems_termios_puts>
return;
30003cac: eaffffe1 b 30003c38 <oproc+0x80>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
30003cb0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003cb4: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003cb8: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
30003cbc: c5843028 strgt r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003cc0: eaffffd8 b 30003c28 <oproc+0x70> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
30003cc4: e3130020 tst r3, #32
tty->column = 0;
30003cc8: 13a02000 movne r2, #0
30003ccc: 15842028 strne r2, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
30003cd0: e3130004 tst r3, #4
30003cd4: 0affffd3 beq 30003c28 <oproc+0x70>
rtems_termios_puts ("\r", 1, tty);
30003cd8: e59f0044 ldr r0, [pc, #68] ; 30003d24 <oproc+0x16c>
30003cdc: e3a01001 mov r1, #1
30003ce0: e1a02004 mov r2, r4
30003ce4: ebffff6d bl 30003aa0 <rtems_termios_puts>
tty->column = 0;
30003ce8: e3a03000 mov r3, #0
30003cec: e5843028 str r3, [r4, #40] ; 0x28
30003cf0: eaffffcc b 30003c28 <oproc+0x70>
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
30003cf4: e59f3020 ldr r3, [pc, #32] ; 30003d1c <oproc+0x164> <== NOT EXECUTED
30003cf8: e5933000 ldr r3, [r3] <== NOT EXECUTED
30003cfc: e0832001 add r2, r3, r1 <== NOT EXECUTED
30003d00: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED
30003d04: e2022003 and r2, r2, #3 <== NOT EXECUTED
30003d08: e3520002 cmp r2, #2 <== NOT EXECUTED
30003d0c: 02411020 subeq r1, r1, #32 <== NOT EXECUTED
30003d10: e20110ff and r1, r1, #255 ; 0xff <== NOT EXECUTED
30003d14: e5cd1000 strb r1, [sp] <== NOT EXECUTED
30003d18: eaffffbc b 30003c10 <oproc+0x58> <== NOT EXECUTED
3000c0f0 <pipe_ioctl>:
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
3000c0f0: e59f3058 ldr r3, [pc, #88] ; 3000c150 <pipe_ioctl+0x60>
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
3000c0f4: e92d4070 push {r4, r5, r6, lr}
if (cmd == FIONREAD) {
3000c0f8: e1510003 cmp r1, r3
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
3000c0fc: e1a05000 mov r5, r0
3000c100: e1a04002 mov r4, r2
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
3000c104: 13e00015 mvnne r0, #21
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
3000c108: 18bd8070 popne {r4, r5, r6, pc}
if (buffer == NULL)
3000c10c: e3520000 cmp r2, #0
return -EFAULT;
3000c110: 03e0000d mvneq r0, #13
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
3000c114: 08bd8070 popeq {r4, r5, r6, pc}
return -EFAULT;
if (! PIPE_LOCK(pipe))
3000c118: e3a01000 mov r1, #0
3000c11c: e5950028 ldr r0, [r5, #40] ; 0x28
3000c120: e1a02001 mov r2, r1
3000c124: ebffeb76 bl 30006f04 <rtems_semaphore_obtain>
3000c128: e2506000 subs r6, r0, #0
3000c12c: 0a000001 beq 3000c138 <pipe_ioctl+0x48>
return -EINTR;
3000c130: e3e00003 mvn r0, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
3000c134: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
3000c138: e595300c ldr r3, [r5, #12]
PIPE_UNLOCK(pipe);
3000c13c: e5950028 ldr r0, [r5, #40] ; 0x28
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
3000c140: e5843000 str r3, [r4]
PIPE_UNLOCK(pipe);
3000c144: ebffebb7 bl 30007028 <rtems_semaphore_release>
return 0;
3000c148: e1a00006 mov r0, r6
3000c14c: e8bd8070 pop {r4, r5, r6, pc}
3000b7a8 <pipe_lock>:
free(pipe->Buffer);
free(pipe);
}
static rtems_status_code pipe_lock(void)
{
3000b7a8: e92d4070 push {r4, r5, r6, lr}
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b7ac: e59f4094 ldr r4, [pc, #148] ; 3000b848 <pipe_lock+0xa0>
free(pipe->Buffer);
free(pipe);
}
static rtems_status_code pipe_lock(void)
{
3000b7b0: e24dd004 sub sp, sp, #4
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b7b4: e5946000 ldr r6, [r4]
3000b7b8: e3560000 cmp r6, #0
3000b7bc: 0a000007 beq 3000b7e0 <pipe_lock+0x38>
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3000b7c0: e3a01000 mov r1, #0
3000b7c4: e1a00006 mov r0, r6
3000b7c8: e1a02001 mov r2, r1
3000b7cc: ebffedcc bl 30006f04 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
return -ENOMEM;
3000b7d0: e3500000 cmp r0, #0
3000b7d4: 13e0000b mvnne r0, #11
}
}
3000b7d8: e28dd004 add sp, sp, #4
3000b7dc: e8bd8070 pop {r4, r5, r6, pc}
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 );
3000b7e0: e59f5064 ldr r5, [pc, #100] ; 3000b84c <pipe_lock+0xa4>
3000b7e4: e1a01006 mov r1, r6
3000b7e8: e5950000 ldr r0, [r5]
3000b7ec: e1a02006 mov r2, r6
3000b7f0: ebffedc3 bl 30006f04 <rtems_semaphore_obtain>
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b7f4: e5943000 ldr r3, [r4]
3000b7f8: e3530000 cmp r3, #0
3000b7fc: 0a000003 beq 3000b810 <pipe_lock+0x68>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
3000b800: e5950000 ldr r0, [r5] <== NOT EXECUTED
3000b804: ebffee07 bl 30007028 <rtems_semaphore_release> <== NOT EXECUTED
3000b808: e5946000 ldr r6, [r4] <== NOT EXECUTED
3000b80c: eaffffeb b 3000b7c0 <pipe_lock+0x18> <== NOT EXECUTED
sc = rtems_semaphore_create(
3000b810: e1a03006 mov r3, r6
3000b814: e3a01001 mov r1, #1
3000b818: e3a02054 mov r2, #84 ; 0x54
3000b81c: e59f002c ldr r0, [pc, #44] ; 3000b850 <pipe_lock+0xa8>
3000b820: e58d4000 str r4, [sp]
3000b824: ebffed1c bl 30006c9c <rtems_semaphore_create>
3000b828: e1a06000 mov r6, r0
3000b82c: e5950000 ldr r0, [r5]
3000b830: ebffedfc bl 30007028 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
3000b834: e3560000 cmp r6, #0
}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
return -ENOMEM;
3000b838: 13e0000b mvnne r0, #11
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
3000b83c: 1affffe5 bne 3000b7d8 <pipe_lock+0x30>
3000b840: e5946000 ldr r6, [r4]
3000b844: eaffffdd b 3000b7c0 <pipe_lock+0x18>
3000bd3c <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000bd3c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000bd40: e1a09001 mov r9, r1
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000bd44: e3a01000 mov r1, #0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000bd48: e24dd008 sub sp, sp, #8
3000bd4c: e1a04000 mov r4, r0
3000bd50: e1a05002 mov r5, r2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000bd54: e5900028 ldr r0, [r0, #40] ; 0x28
3000bd58: e1a02001 mov r2, r1
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000bd5c: e1a08003 mov r8, r3
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000bd60: ebffec67 bl 30006f04 <rtems_semaphore_obtain>
3000bd64: e250a000 subs sl, r0, #0
return -EINTR;
3000bd68: 13e07003 mvnne r7, #3
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000bd6c: 1a000027 bne 3000be10 <pipe_read+0xd4>
return -EINTR;
while (read < count) {
3000bd70: e3550000 cmp r5, #0
3000bd74: 01a07005 moveq r7, r5
3000bd78: 01a06007 moveq r6, r7
3000bd7c: 0a00001f beq 3000be00 <pipe_read+0xc4>
3000bd80: e1a0700a mov r7, sl
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
3000bd84: e28db004 add fp, sp, #4
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
3000bd88: e594200c ldr r2, [r4, #12]
3000bd8c: e3520000 cmp r2, #0
3000bd90: 1a000021 bne 3000be1c <pipe_read+0xe0>
/* Not an error */
if (pipe->Writers == 0)
3000bd94: e5946014 ldr r6, [r4, #20]
3000bd98: e3560000 cmp r6, #0
3000bd9c: 0a000017 beq 3000be00 <pipe_read+0xc4>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
3000bda0: e5986014 ldr r6, [r8, #20]
3000bda4: e2166001 ands r6, r6, #1
3000bda8: 1a00003b bne 3000be9c <pipe_read+0x160>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
3000bdac: e5943018 ldr r3, [r4, #24]
PIPE_UNLOCK(pipe);
3000bdb0: e5940028 ldr r0, [r4, #40] ; 0x28
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
3000bdb4: e2833001 add r3, r3, #1
3000bdb8: e5843018 str r3, [r4, #24]
PIPE_UNLOCK(pipe);
3000bdbc: ebffec99 bl 30007028 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
3000bdc0: e1a01006 mov r1, r6
3000bdc4: e594002c ldr r0, [r4, #44] ; 0x2c
3000bdc8: eb00045b bl 3000cf3c <rtems_barrier_wait>
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000bdcc: e1a01006 mov r1, r6
3000bdd0: e1a02001 mov r2, r1
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
3000bdd4: e2506000 subs r6, r0, #0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000bdd8: e5940028 ldr r0, [r4, #40] ; 0x28
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
3000bddc: 13e06003 mvnne r6, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000bde0: ebffec47 bl 30006f04 <rtems_semaphore_obtain>
3000bde4: e3500000 cmp r0, #0
3000bde8: 1a00002d bne 3000bea4 <pipe_read+0x168>
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
3000bdec: e5943018 ldr r3, [r4, #24]
if (ret != 0)
3000bdf0: e3560000 cmp r6, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
3000bdf4: e2433001 sub r3, r3, #1
3000bdf8: e5843018 str r3, [r4, #24]
if (ret != 0)
3000bdfc: 0affffe1 beq 3000bd88 <pipe_read+0x4c>
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
3000be00: e5940028 ldr r0, [r4, #40] ; 0x28
3000be04: ebffec87 bl 30007028 <rtems_semaphore_release>
out_nolock:
if (read > 0)
return read;
return ret;
3000be08: e3570000 cmp r7, #0
3000be0c: d1a07006 movle r7, r6
}
3000be10: e1a00007 mov r0, r7
3000be14: e28dd008 add sp, sp, #8
3000be18: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
3000be1c: e5941008 ldr r1, [r4, #8]
3000be20: e5943004 ldr r3, [r4, #4]
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
3000be24: e06a6005 rsb r6, sl, r5
3000be28: e1520006 cmp r2, r6
3000be2c: 31a06002 movcc r6, r2
chunk1 = pipe->Size - pipe->Start;
3000be30: e0613003 rsb r3, r1, r3
if (chunk > chunk1) {
3000be34: e1560003 cmp r6, r3
3000be38: ca00001b bgt 3000beac <pipe_read+0x170>
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);
3000be3c: e5943000 ldr r3, [r4]
3000be40: e089000a add r0, r9, sl
3000be44: e0831001 add r1, r3, r1
3000be48: e1a02006 mov r2, r6
3000be4c: eb000bc5 bl 3000ed68 <memcpy>
pipe->Start += chunk;
3000be50: e5940008 ldr r0, [r4, #8]
pipe->Start %= pipe->Size;
3000be54: e5941004 ldr r1, [r4, #4]
3000be58: e0860000 add r0, r6, r0
3000be5c: eb002f21 bl 30017ae8 <__umodsi3>
pipe->Length -= chunk;
3000be60: e594300c ldr r3, [r4, #12]
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
3000be64: e5840008 str r0, [r4, #8]
pipe->Length -= chunk;
3000be68: e0663003 rsb r3, r6, r3
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
3000be6c: e3530000 cmp r3, #0
pipe->Start = 0;
3000be70: 05843008 streq r3, [r4, #8]
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
pipe->Length -= chunk;
3000be74: e584300c str r3, [r4, #12]
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
3000be78: e594301c ldr r3, [r4, #28]
3000be7c: e3530000 cmp r3, #0
3000be80: 1a000016 bne 3000bee0 <pipe_read+0x1a4>
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
3000be84: e0877006 add r7, r7, r6
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
3000be88: e1570005 cmp r7, r5
3000be8c: e1a0a007 mov sl, r7
3000be90: 3affffbc bcc 3000bd88 <pipe_read+0x4c>
3000be94: e3a06000 mov r6, #0
3000be98: eaffffd8 b 3000be00 <pipe_read+0xc4>
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
3000be9c: e3e0600a mvn r6, #10
3000bea0: eaffffd6 b 3000be00 <pipe_read+0xc4>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
3000bea4: e3e06003 mvn r6, #3 <== NOT EXECUTED
3000bea8: eaffffd6 b 3000be08 <pipe_read+0xcc> <== NOT EXECUTED
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
3000beac: e5940000 ldr r0, [r4]
3000beb0: e1a02003 mov r2, r3
3000beb4: e0801001 add r1, r0, r1
3000beb8: e089000a add r0, r9, sl
3000bebc: e58d3000 str r3, [sp]
3000bec0: eb000ba8 bl 3000ed68 <memcpy>
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
3000bec4: e59d3000 ldr r3, [sp]
3000bec8: e5941000 ldr r1, [r4]
3000becc: e08a0003 add r0, sl, r3
3000bed0: e0890000 add r0, r9, r0
3000bed4: e0632006 rsb r2, r3, r6
3000bed8: eb000ba2 bl 3000ed68 <memcpy>
3000bedc: eaffffdb b 3000be50 <pipe_read+0x114>
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
3000bee0: e5940030 ldr r0, [r4, #48] ; 0x30
3000bee4: e1a0100b mov r1, fp
3000bee8: eb0003fb bl 3000cedc <rtems_barrier_release>
3000beec: eaffffe4 b 3000be84 <pipe_read+0x148>
3000b87c <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
3000b87c: e92d40f0 push {r4, r5, r6, r7, lr}
3000b880: e24dd004 sub sp, sp, #4
3000b884: e1a06001 mov r6, r1
3000b888: e1a05000 mov r5, r0
pipe_control_t *pipe = *pipep;
3000b88c: e5904000 ldr r4, [r0]
uint32_t mode;
if (pipe_lock())
3000b890: ebffffc4 bl 3000b7a8 <pipe_lock>
3000b894: e2501000 subs r1, r0, #0
3000b898: 1a000035 bne 3000b974 <pipe_release+0xf8>
/* WARN pipe not freed and pipep not set to NULL! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
if (!PIPE_LOCK(pipe))
3000b89c: e5940028 ldr r0, [r4, #40] ; 0x28
3000b8a0: e1a02001 mov r2, r1
3000b8a4: ebffed96 bl 30006f04 <rtems_semaphore_obtain>
3000b8a8: e3500000 cmp r0, #0
3000b8ac: 1a000030 bne 3000b974 <pipe_release+0xf8>
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
mode = LIBIO_ACCMODE(iop);
3000b8b0: e5966014 ldr r6, [r6, #20]
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
PIPE_UNLOCK(pipe);
3000b8b4: e5940028 ldr r0, [r4, #40] ; 0x28
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
3000b8b8: e3160002 tst r6, #2
pipe->Readers --;
3000b8bc: 15943010 ldrne r3, [r4, #16]
if (!PIPE_LOCK(pipe))
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
mode = LIBIO_ACCMODE(iop);
3000b8c0: e2066006 and r6, r6, #6
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
3000b8c4: 12433001 subne r3, r3, #1
3000b8c8: 15843010 strne r3, [r4, #16]
if (mode & LIBIO_FLAGS_WRITE)
3000b8cc: e3160004 tst r6, #4
pipe->Writers --;
3000b8d0: 15943014 ldrne r3, [r4, #20]
3000b8d4: 12433001 subne r3, r3, #1
3000b8d8: 15843014 strne r3, [r4, #20]
PIPE_UNLOCK(pipe);
3000b8dc: ebffedd1 bl 30007028 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
3000b8e0: e5943010 ldr r3, [r4, #16]
3000b8e4: e3530000 cmp r3, #0
3000b8e8: 0a00000c beq 3000b920 <pipe_release+0xa4>
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
3000b8ec: e5943014 ldr r3, [r4, #20]
3000b8f0: e2733001 rsbs r3, r3, #1
3000b8f4: 33a03000 movcc r3, #0
3000b8f8: e3560002 cmp r6, #2
3000b8fc: 03a03000 moveq r3, #0
3000b900: e3530000 cmp r3, #0
PIPE_WAKEUPREADERS(pipe);
3000b904: 1594002c ldrne r0, [r4, #44] ; 0x2c
3000b908: 11a0100d movne r1, sp
3000b90c: 1b000572 blne 3000cedc <rtems_barrier_release>
pipe_unlock();
3000b910: ebffffcf bl 3000b854 <pipe_unlock>
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
3000b914: e3a00000 mov r0, #0
3000b918: e28dd004 add sp, sp, #4
3000b91c: e8bd80f0 pop {r4, r5, r6, r7, pc}
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
3000b920: e5947014 ldr r7, [r4, #20]
3000b924: e3570000 cmp r7, #0
3000b928: 0a000005 beq 3000b944 <pipe_release+0xc8>
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
3000b92c: e3560004 cmp r6, #4
3000b930: 0afffff6 beq 3000b910 <pipe_release+0x94>
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
3000b934: e5940030 ldr r0, [r4, #48] ; 0x30
3000b938: e1a0100d mov r1, sp
3000b93c: eb000566 bl 3000cedc <rtems_barrier_release>
3000b940: eafffff2 b 3000b910 <pipe_release+0x94>
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
3000b944: e594002c ldr r0, [r4, #44] ; 0x2c
3000b948: eb000537 bl 3000ce2c <rtems_barrier_delete>
rtems_barrier_delete(pipe->writeBarrier);
3000b94c: e5940030 ldr r0, [r4, #48] ; 0x30
3000b950: eb000535 bl 3000ce2c <rtems_barrier_delete>
rtems_semaphore_delete(pipe->Semaphore);
3000b954: e5940028 ldr r0, [r4, #40] ; 0x28
3000b958: ebffed40 bl 30006e60 <rtems_semaphore_delete>
free(pipe->Buffer);
3000b95c: e5940000 ldr r0, [r4]
3000b960: ebffde9f bl 300033e4 <free>
free(pipe);
3000b964: e1a00004 mov r0, r4
3000b968: ebffde9d bl 300033e4 <free>
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
3000b96c: e5857000 str r7, [r5]
3000b970: eaffffe6 b 3000b910 <pipe_release+0x94>
rtems_fatal_error_occurred(0xdeadbeef);
if (!PIPE_LOCK(pipe))
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
3000b974: e59f0000 ldr r0, [pc, #0] ; 3000b97c <pipe_release+0x100> <== NOT EXECUTED
3000b978: ebffeeed bl 30007534 <rtems_fatal_error_occurred> <== NOT EXECUTED
3000b854 <pipe_unlock>:
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
3000b854: e59f3018 ldr r3, [pc, #24] ; 3000b874 <pipe_unlock+0x20>
return -ENOMEM;
}
}
static void pipe_unlock(void)
{
3000b858: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
3000b85c: e5930000 ldr r0, [r3]
3000b860: ebffedf0 bl 30007028 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
3000b864: e3500000 cmp r0, #0
3000b868: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
3000b86c: e59f0004 ldr r0, [pc, #4] ; 3000b878 <pipe_unlock+0x24> <== NOT EXECUTED
3000b870: ebffef2f bl 30007534 <rtems_fatal_error_occurred> <== NOT EXECUTED
3000bef0 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000bef0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
3000bef4: e2524000 subs r4, r2, #0
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000bef8: e24dd008 sub sp, sp, #8
3000befc: e1a05000 mov r5, r0
3000bf00: e1a06001 mov r6, r1
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
3000bf04: 01a07004 moveq r7, r4
)
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
3000bf08: 1a000002 bne 3000bf18 <pipe_write+0x28>
#endif
if (written > 0)
return written;
return ret;
}
3000bf0c: e1a00007 mov r0, r7
3000bf10: e28dd008 add sp, sp, #8
3000bf14: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
3000bf18: e3a01000 mov r1, #0
3000bf1c: e5900028 ldr r0, [r0, #40] ; 0x28
3000bf20: e1a02001 mov r2, r1
3000bf24: e58d3000 str r3, [sp]
3000bf28: ebffebf5 bl 30006f04 <rtems_semaphore_obtain>
3000bf2c: e2509000 subs r9, r0, #0
3000bf30: e59d3000 ldr r3, [sp]
return -EINTR;
3000bf34: 13e07003 mvnne r7, #3
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
3000bf38: 1afffff3 bne 3000bf0c <pipe_write+0x1c>
return -EINTR;
if (pipe->Readers == 0) {
3000bf3c: e5957010 ldr r7, [r5, #16]
3000bf40: e3570000 cmp r7, #0
3000bf44: 0a000055 beq 3000c0a0 <pipe_write+0x1b0>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
3000bf48: e5958004 ldr r8, [r5, #4]
3000bf4c: e1a07009 mov r7, r9
3000bf50: e1540008 cmp r4, r8
3000bf54: 91a0a004 movls sl, r4
3000bf58: 83a0a001 movhi sl, #1
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
3000bf5c: e28db004 add fp, sp, #4
/* 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) {
3000bf60: e595100c ldr r1, [r5, #12]
3000bf64: e0612008 rsb r2, r1, r8
3000bf68: e152000a cmp r2, sl
3000bf6c: 2a000021 bcs 3000bff8 <pipe_write+0x108>
if (LIBIO_NODELAY(iop)) {
3000bf70: e5938014 ldr r8, [r3, #20]
3000bf74: e2188001 ands r8, r8, #1
3000bf78: 1a00004c bne 3000c0b0 <pipe_write+0x1c0>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
3000bf7c: e595201c ldr r2, [r5, #28]
PIPE_UNLOCK(pipe);
3000bf80: e5950028 ldr r0, [r5, #40] ; 0x28
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
3000bf84: e2822001 add r2, r2, #1
3000bf88: e585201c str r2, [r5, #28]
PIPE_UNLOCK(pipe);
3000bf8c: e58d3000 str r3, [sp]
3000bf90: ebffec24 bl 30007028 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
3000bf94: e1a01008 mov r1, r8
3000bf98: e5950030 ldr r0, [r5, #48] ; 0x30
3000bf9c: eb0003e6 bl 3000cf3c <rtems_barrier_wait>
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000bfa0: e1a01008 mov r1, r8
3000bfa4: e1a02001 mov r2, r1
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
3000bfa8: e2508000 subs r8, r0, #0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000bfac: e5950028 ldr r0, [r5, #40] ; 0x28
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
3000bfb0: 13e08003 mvnne r8, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000bfb4: ebffebd2 bl 30006f04 <rtems_semaphore_obtain>
3000bfb8: e3500000 cmp r0, #0
3000bfbc: e59d3000 ldr r3, [sp]
3000bfc0: 1a000038 bne 3000c0a8 <pipe_write+0x1b8>
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
3000bfc4: e595201c ldr r2, [r5, #28]
if (ret != 0)
3000bfc8: e3580000 cmp r8, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
3000bfcc: e2422001 sub r2, r2, #1
3000bfd0: e585201c str r2, [r5, #28]
if (ret != 0)
3000bfd4: 1a00002c bne 3000c08c <pipe_write+0x19c>
goto out_locked;
if (pipe->Readers == 0) {
3000bfd8: e5952010 ldr r2, [r5, #16]
3000bfdc: e3520000 cmp r2, #0
3000bfe0: 0a00002e beq 3000c0a0 <pipe_write+0x1b0>
3000bfe4: e5958004 ldr r8, [r5, #4]
/* 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) {
3000bfe8: e595100c ldr r1, [r5, #12]
3000bfec: e0612008 rsb r2, r1, r8
3000bff0: e152000a cmp r2, sl
3000bff4: 3affffdd bcc 3000bf70 <pipe_write+0x80>
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000bff8: e5950008 ldr r0, [r5, #8]
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
3000bffc: e069a004 rsb sl, r9, r4
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000c000: e0810000 add r0, r1, r0
3000c004: e1a01008 mov r1, r8
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
3000c008: e152000a cmp r2, sl
3000c00c: 31a0a002 movcc sl, r2
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000c010: e58d3000 str r3, [sp]
3000c014: eb002eb3 bl 30017ae8 <__umodsi3>
3000c018: e0608008 rsb r8, r0, r8
if (chunk > chunk1) {
3000c01c: e15a0008 cmp sl, r8
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000c020: e1a0c000 mov ip, r0
if (chunk > chunk1) {
3000c024: e59d3000 ldr r3, [sp]
3000c028: da000022 ble 3000c0b8 <pipe_write+0x1c8>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
3000c02c: e5950000 ldr r0, [r5]
3000c030: e0861009 add r1, r6, r9
3000c034: e1a02008 mov r2, r8
3000c038: e080000c add r0, r0, ip
3000c03c: eb000b49 bl 3000ed68 <memcpy>
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
3000c040: e0881009 add r1, r8, r9
3000c044: e5950000 ldr r0, [r5]
3000c048: e0861001 add r1, r6, r1
3000c04c: e068200a rsb r2, r8, sl
3000c050: eb000b44 bl 3000ed68 <memcpy>
3000c054: e59d3000 ldr r3, [sp]
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
3000c058: e595200c ldr r2, [r5, #12]
if (pipe->waitingReaders > 0)
3000c05c: e5951018 ldr r1, [r5, #24]
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
3000c060: e082200a add r2, r2, sl
if (pipe->waitingReaders > 0)
3000c064: e3510000 cmp r1, #0
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
3000c068: e585200c str r2, [r5, #12]
if (pipe->waitingReaders > 0)
3000c06c: 1a000019 bne 3000c0d8 <pipe_write+0x1e8>
PIPE_WAKEUPREADERS(pipe);
written += chunk;
3000c070: e087700a add r7, r7, sl
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
3000c074: e1540007 cmp r4, r7
3000c078: e1a09007 mov r9, r7
3000c07c: 85958004 ldrhi r8, [r5, #4]
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
written += chunk;
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
3000c080: 83a0a001 movhi sl, #1
3000c084: 8affffb5 bhi 3000bf60 <pipe_write+0x70>
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
3000c088: e3a08000 mov r8, #0
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
3000c08c: e5950028 ldr r0, [r5, #40] ; 0x28
3000c090: ebffebe4 bl 30007028 <rtems_semaphore_release>
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
return written;
return ret;
3000c094: e3570000 cmp r7, #0
3000c098: d1a07008 movle r7, r8
3000c09c: eaffff9a b 3000bf0c <pipe_write+0x1c>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
3000c0a0: e3e0801f mvn r8, #31
3000c0a4: eafffff8 b 3000c08c <pipe_write+0x19c>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
3000c0a8: e3e08003 mvn r8, #3 <== NOT EXECUTED
3000c0ac: eafffff8 b 3000c094 <pipe_write+0x1a4> <== NOT EXECUTED
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
3000c0b0: e3e0800a mvn r8, #10
3000c0b4: eafffff4 b 3000c08c <pipe_write+0x19c>
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
3000c0b8: e5950000 ldr r0, [r5]
3000c0bc: e0861009 add r1, r6, r9
3000c0c0: e080000c add r0, r0, ip
3000c0c4: e1a0200a mov r2, sl
3000c0c8: e58d3000 str r3, [sp]
3000c0cc: eb000b25 bl 3000ed68 <memcpy>
3000c0d0: e59d3000 ldr r3, [sp]
3000c0d4: eaffffdf b 3000c058 <pipe_write+0x168>
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
3000c0d8: e595002c ldr r0, [r5, #44] ; 0x2c
3000c0dc: e1a0100b mov r1, fp
3000c0e0: e58d3000 str r3, [sp]
3000c0e4: eb00037c bl 3000cedc <rtems_barrier_release>
3000c0e8: e59d3000 ldr r3, [sp]
3000c0ec: eaffffdf b 3000c070 <pipe_write+0x180>
30012548 <read>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
30012548: e59f30a4 ldr r3, [pc, #164] ; 300125f4 <read+0xac>
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
3001254c: e92d4010 push {r4, lr}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
30012550: e5933000 ldr r3, [r3]
30012554: e1500003 cmp r0, r3
30012558: 2a00001b bcs 300125cc <read+0x84>
iop = rtems_libio_iop( fd );
3001255c: e59f4094 ldr r4, [pc, #148] ; 300125f8 <read+0xb0>
30012560: e0600180 rsb r0, r0, r0, lsl #3
30012564: e5944000 ldr r4, [r4]
30012568: e0844180 add r4, r4, r0, lsl #3
rtems_libio_check_is_open( iop );
3001256c: e5940014 ldr r0, [r4, #20]
30012570: e3100c01 tst r0, #256 ; 0x100
30012574: 0a000014 beq 300125cc <read+0x84>
rtems_libio_check_buffer( buffer );
30012578: e3510000 cmp r1, #0
3001257c: 0a000017 beq 300125e0 <read+0x98>
rtems_libio_check_count( count );
30012580: e3520000 cmp r2, #0
30012584: 0a00000e beq 300125c4 <read+0x7c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
30012588: e3100002 tst r0, #2
3001258c: 0a000013 beq 300125e0 <read+0x98>
return 0;
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
30012590: e5943020 ldr r3, [r4, #32]
30012594: e1a00004 mov r0, r4
30012598: e1a0e00f mov lr, pc
3001259c: e593f008 ldr pc, [r3, #8]
if ( rc > 0 )
300125a0: e3500000 cmp r0, #0
300125a4: d8bd8010 pople {r4, pc}
iop->offset += rc;
300125a8: e284300c add r3, r4, #12
300125ac: e893000c ldm r3, {r2, r3}
300125b0: e0922000 adds r2, r2, r0
300125b4: e0a33fc0 adc r3, r3, r0, asr #31
300125b8: e584200c str r2, [r4, #12]
300125bc: e5843010 str r3, [r4, #16]
300125c0: e8bd8010 pop {r4, pc}
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
300125c4: e1a00002 mov r0, r2 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
300125c8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
300125cc: ebffe9b9 bl 3000ccb8 <__errno>
300125d0: e3a03009 mov r3, #9
300125d4: e5803000 str r3, [r0]
300125d8: e3e00000 mvn r0, #0
300125dc: e8bd8010 pop {r4, pc}
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
300125e0: ebffe9b4 bl 3000ccb8 <__errno> <== NOT EXECUTED
300125e4: e3a03016 mov r3, #22 <== NOT EXECUTED
300125e8: e5803000 str r3, [r0] <== NOT EXECUTED
300125ec: e3e00000 mvn r0, #0 <== NOT EXECUTED
300125f0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
300057d4 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
300057d4: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
300057d8: e2516000 subs r6, r1, #0
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
300057dc: e24dd018 sub sp, sp, #24
300057e0: e1a07000 mov r7, r0
300057e4: e1a05002 mov r5, r2
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
300057e8: 0a00001d beq 30005864 <readlink+0x90>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
300057ec: eb00313e bl 30011cec <strlen>
300057f0: e28d4004 add r4, sp, #4
300057f4: e1a01000 mov r1, r0
300057f8: e3a02000 mov r2, #0
300057fc: e1a00007 mov r0, r7
30005800: e1a03004 mov r3, r4
30005804: e58d2000 str r2, [sp]
30005808: ebfffb70 bl 300045d0 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
3000580c: e3500000 cmp r0, #0
return -1;
30005810: 13e05000 mvnne r5, #0
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
30005814: 0a000002 beq 30005824 <readlink+0x50>
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
30005818: e1a00005 mov r0, r5
3000581c: e28dd018 add sp, sp, #24
30005820: e8bd80f0 pop {r4, r5, r6, r7, pc}
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
30005824: e1a00004 mov r0, r4
30005828: e59d3010 ldr r3, [sp, #16]
3000582c: e1a0e00f mov lr, pc
30005830: e593f010 ldr pc, [r3, #16]
30005834: e3500004 cmp r0, #4
30005838: 1a00000e bne 30005878 <readlink+0xa4>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
3000583c: e1a02005 mov r2, r5
30005840: e1a00004 mov r0, r4
30005844: e1a01006 mov r1, r6
30005848: e59d3010 ldr r3, [sp, #16]
3000584c: e1a0e00f mov lr, pc
30005850: e593f03c ldr pc, [r3, #60] ; 0x3c
30005854: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
30005858: e1a00004 mov r0, r4
3000585c: ebfffba6 bl 300046fc <rtems_filesystem_freenode>
return result;
30005860: eaffffec b 30005818 <readlink+0x44>
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
30005864: eb0029c6 bl 3000ff84 <__errno> <== NOT EXECUTED
30005868: e3a0300e mov r3, #14 <== NOT EXECUTED
3000586c: e5803000 str r3, [r0] <== NOT EXECUTED
30005870: e3e05000 mvn r5, #0 <== NOT EXECUTED
30005874: eaffffe7 b 30005818 <readlink+0x44> <== NOT EXECUTED
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
30005878: e1a00004 mov r0, r4
3000587c: ebfffb9e bl 300046fc <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EINVAL );
30005880: eb0029bf bl 3000ff84 <__errno>
30005884: e3a03016 mov r3, #22
30005888: e5803000 str r3, [r0]
3000588c: e3e05000 mvn r5, #0
30005890: eaffffe0 b 30005818 <readlink+0x44>
30004184 <readv>:
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
30004184: e59f313c ldr r3, [pc, #316] ; 300042c8 <readv+0x144>
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
30004188: e92d41f0 push {r4, r5, r6, r7, r8, lr}
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
3000418c: e5933000 ldr r3, [r3]
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
30004190: e1a04002 mov r4, r2
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
30004194: e1500003 cmp r0, r3
30004198: 2a000045 bcs 300042b4 <readv+0x130>
iop = rtems_libio_iop( fd );
3000419c: e59f3128 ldr r3, [pc, #296] ; 300042cc <readv+0x148>
300041a0: e0600180 rsb r0, r0, r0, lsl #3
300041a4: e5933000 ldr r3, [r3]
300041a8: e0836180 add r6, r3, r0, lsl #3
rtems_libio_check_is_open( iop );
300041ac: e5963014 ldr r3, [r6, #20]
300041b0: e3130c01 tst r3, #256 ; 0x100
300041b4: 0a00003e beq 300042b4 <readv+0x130>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
300041b8: e3130002 tst r3, #2
300041bc: 0a000036 beq 3000429c <readv+0x118>
/*
* Argument validation on IO vector
*/
if ( !iov )
300041c0: e3510000 cmp r1, #0
300041c4: 0a000034 beq 3000429c <readv+0x118>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
300041c8: e3520000 cmp r2, #0
300041cc: da000032 ble 3000429c <readv+0x118>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
300041d0: e3520b01 cmp r2, #1024 ; 0x400
300041d4: ca000030 bgt 3000429c <readv+0x118>
300041d8: e3a02000 mov r2, #0
rtems_set_errno_and_return_minus_one( EINVAL );
300041dc: e1a05001 mov r5, r1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
300041e0: e1a03001 mov r3, r1
300041e4: e3a07001 mov r7, #1
300041e8: e1a01002 mov r1, r2
300041ec: ea000000 b 300041f4 <readv+0x70>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
300041f0: e1a0100c mov r1, ip
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ssize_t old;
if ( !iov[v].iov_base )
300041f4: e5930000 ldr r0, [r3]
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
300041f8: e2822001 add r2, r2, #1
ssize_t old;
if ( !iov[v].iov_base )
300041fc: e3500000 cmp r0, #0
30004200: 0a000025 beq 3000429c <readv+0x118>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
30004204: e5930004 ldr r0, [r3, #4]
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30004208: e2833008 add r3, r3, #8
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
3000420c: e081c000 add ip, r1, r0
if ( total < old )
30004210: e151000c cmp r1, ip
30004214: ca000020 bgt 3000429c <readv+0x118>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
30004218: e3500000 cmp r0, #0
3000421c: 13a07000 movne r7, #0
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30004220: e1540002 cmp r4, r2
30004224: cafffff1 bgt 300041f0 <readv+0x6c>
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
30004228: e3570000 cmp r7, #0
return 0;
3000422c: 13a08000 movne r8, #0
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
30004230: 1a00001d bne 300042ac <readv+0x128>
30004234: e1a08007 mov r8, r7
30004238: ea00000d b 30004274 <readv+0xf0>
);
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
3000423c: 0a000006 beq 3000425c <readv+0xd8>
iop->offset += bytes;
30004240: e286300c add r3, r6, #12
30004244: e893000c ldm r3, {r2, r3}
30004248: e0922000 adds r2, r2, r0
3000424c: e0a33fc0 adc r3, r3, r0, asr #31
30004250: e586200c str r2, [r6, #12]
30004254: e5863010 str r3, [r6, #16]
total += bytes;
30004258: e0888000 add r8, r8, r0
}
if (bytes != iov[ v ].iov_len)
3000425c: e5953004 ldr r3, [r5, #4]
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30004260: e2855008 add r5, r5, #8
if ( bytes > 0 ) {
iop->offset += bytes;
total += bytes;
}
if (bytes != iov[ v ].iov_len)
30004264: e1500003 cmp r0, r3
30004268: 1a00000f bne 300042ac <readv+0x128>
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3000426c: e1540007 cmp r4, r7
30004270: da00000d ble 300042ac <readv+0x128>
bytes = (*iop->pathinfo.handlers->read_h)(
30004274: e8950006 ldm r5, {r1, r2}
30004278: e5963020 ldr r3, [r6, #32]
3000427c: e1a00006 mov r0, r6
30004280: e1a0e00f mov lr, pc
30004284: e593f008 ldr pc, [r3, #8]
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
30004288: e3500000 cmp r0, #0
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3000428c: e2877001 add r7, r7, #1
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
30004290: aaffffe9 bge 3000423c <readv+0xb8>
return -1;
30004294: e3e08000 mvn r8, #0 <== NOT EXECUTED
30004298: ea000003 b 300042ac <readv+0x128> <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
3000429c: eb0026af bl 3000dd60 <__errno>
300042a0: e3a03016 mov r3, #22
300042a4: e5803000 str r3, [r0]
300042a8: e3e08000 mvn r8, #0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
300042ac: e1a00008 mov r0, r8
300042b0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
300042b4: eb0026a9 bl 3000dd60 <__errno>
300042b8: e3a03009 mov r3, #9
300042bc: e5803000 str r3, [r0]
300042c0: e3e08000 mvn r8, #0
300042c4: eafffff8 b 300042ac <readv+0x128>
30012654 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
30012654: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
30012658: e59f2118 ldr r2, [pc, #280] ; 30012778 <realloc+0x124>
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
3001265c: e59f5118 ldr r5, [pc, #280] ; 3001277c <realloc+0x128>
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
30012660: e5922000 ldr r2, [r2]
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
30012664: e5953010 ldr r3, [r5, #16]
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
30012668: e3520003 cmp r2, #3
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
3001266c: e2833001 add r3, r3, #1
void *realloc(
void *ptr,
size_t size
)
{
30012670: e24dd004 sub sp, sp, #4
30012674: e1a04000 mov r4, r0
30012678: e1a06001 mov r6, r1
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
3001267c: e5853010 str r3, [r5, #16]
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
30012680: 0a000020 beq 30012708 <realloc+0xb4>
}
/*
* Continue with realloc().
*/
if ( !ptr )
30012684: e3540000 cmp r4, #0
30012688: 0a00001a beq 300126f8 <realloc+0xa4>
return malloc( size );
if ( !size ) {
3001268c: e3560000 cmp r6, #0
30012690: 0a00000f beq 300126d4 <realloc+0x80>
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
30012694: e59f70e4 ldr r7, [pc, #228] ; 30012780 <realloc+0x12c>
30012698: e1a01004 mov r1, r4
3001269c: e5970000 ldr r0, [r7]
300126a0: e1a0200d mov r2, sp
300126a4: eb000065 bl 30012840 <_Protected_heap_Get_block_size>
300126a8: e2508000 subs r8, r0, #0
300126ac: 0a00000c beq 300126e4 <realloc+0x90>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
300126b0: e5970000 ldr r0, [r7]
300126b4: e1a01004 mov r1, r4
300126b8: e1a02006 mov r2, r6
300126bc: eb000070 bl 30012884 <_Protected_heap_Resize_block>
300126c0: e3500000 cmp r0, #0
300126c4: 0a00001a beq 30012734 <realloc+0xe0>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
300126c8: e1a00004 mov r0, r4
300126cc: e28dd004 add sp, sp, #4
300126d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
300126d4: e1a00004 mov r0, r4 <== NOT EXECUTED
300126d8: ebffbe72 bl 300020a8 <free> <== NOT EXECUTED
return (void *) 0;
300126dc: e1a04006 mov r4, r6 <== NOT EXECUTED
300126e0: eafffff8 b 300126c8 <realloc+0x74> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
300126e4: ebffe973 bl 3000ccb8 <__errno>
300126e8: e3a03016 mov r3, #22
300126ec: e5803000 str r3, [r0]
return (void *) 0;
300126f0: e1a04008 mov r4, r8
300126f4: eafffff3 b 300126c8 <realloc+0x74>
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
300126f8: e1a00006 mov r0, r6
300126fc: ebffbf43 bl 30002410 <malloc>
30012700: e1a04000 mov r4, r0
30012704: eaffffef b 300126c8 <realloc+0x74>
/*
* 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)
30012708: e59f3074 ldr r3, [pc, #116] ; 30012784 <realloc+0x130>
3001270c: e5933000 ldr r3, [r3]
30012710: e3530000 cmp r3, #0
return (void *) 0;
30012714: 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)
30012718: 1affffea bne 300126c8 <realloc+0x74>
return (void *) 0;
if (_ISR_Nest_level > 0)
3001271c: e59f2064 ldr r2, [pc, #100] ; 30012788 <realloc+0x134>
30012720: e5922000 ldr r2, [r2]
30012724: e3520000 cmp r2, #0
return (void *) 0;
30012728: 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)
3001272c: 0affffd4 beq 30012684 <realloc+0x30>
30012730: eaffffe4 b 300126c8 <realloc+0x74> <== NOT EXECUTED
* 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 );
30012734: e1a00006 mov r0, r6
30012738: ebffbf34 bl 30002410 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
3001273c: e5953004 ldr r3, [r5, #4]
if ( !new_area ) {
30012740: e2507000 subs r7, r0, #0
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
30012744: e2433001 sub r3, r3, #1
30012748: e5853004 str r3, [r5, #4]
if ( !new_area ) {
return (void *) 0;
3001274c: 01a04007 moveq r4, r7
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
30012750: 0affffdc beq 300126c8 <realloc+0x74>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
30012754: e59d2000 ldr r2, [sp]
30012758: e1a01004 mov r1, r4
3001275c: e1560002 cmp r6, r2
30012760: 31a02006 movcc r2, r6
30012764: ebffeb81 bl 3000d570 <memcpy>
free( ptr );
30012768: e1a00004 mov r0, r4
3001276c: ebffbe4d bl 300020a8 <free>
return new_area;
30012770: e1a04007 mov r4, r7
30012774: eaffffd3 b 300126c8 <realloc+0x74>
30004340 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
30004340: e92d40f0 push {r4, r5, r6, r7, lr}
30004344: e24dd030 sub sp, sp, #48 ; 0x30
30004348: e1a07000 mov r7, r0
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
3000434c: ebfffade bl 30002ecc <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
30004350: e2505000 subs r5, r0, #0
30004354: 1a000045 bne 30004470 <rmdir+0x130>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
30004358: e28d4018 add r4, sp, #24
3000435c: e1a00007 mov r0, r7
30004360: e28d102c add r1, sp, #44 ; 0x2c
30004364: e1a02004 mov r2, r4
30004368: eb00004c bl 300044a0 <rtems_filesystem_get_start_loc>
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
3000436c: e1a06005 mov r6, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
30004370: e28dc004 add ip, sp, #4
30004374: e1a0e004 mov lr, r4
30004378: e8be000f ldm lr!, {r0, r1, r2, r3}
3000437c: e8ac000f stmia ip!, {r0, r1, r2, r3}
name = pathname + parentpathlen;
30004380: e0875005 add r5, r7, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
30004384: e59e3000 ldr r3, [lr]
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30004388: e1a00005 mov r0, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
3000438c: e58c3000 str r3, [ip]
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30004390: eb002ab2 bl 3000ee60 <strlen>
30004394: e1a01000 mov r1, r0
30004398: e1a00005 mov r0, r5
3000439c: ebfffad9 bl 30002f08 <rtems_filesystem_prefix_separators>
300043a0: e0857000 add r7, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
300043a4: e1a00007 mov r0, r7
300043a8: eb002aac bl 3000ee60 <strlen>
300043ac: e28d5004 add r5, sp, #4
300043b0: e1a01000 mov r1, r0
300043b4: e3a02000 mov r2, #0
300043b8: e1a00007 mov r0, r7
300043bc: e1a03005 mov r3, r5
300043c0: e58d2000 str r2, [sp]
300043c4: ebfffa74 bl 30002d9c <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
300043c8: e3500000 cmp r0, #0
300043cc: 1a000015 bne 30004428 <rmdir+0xe8>
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
300043d0: e1a00005 mov r0, r5
300043d4: e59d3010 ldr r3, [sp, #16]
300043d8: e1a0e00f mov lr, pc
300043dc: e593f010 ldr pc, [r3, #16]
300043e0: e3500001 cmp r0, #1
300043e4: 1a000013 bne 30004438 <rmdir+0xf8>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
300043e8: e1a01005 mov r1, r5
300043ec: e59d300c ldr r3, [sp, #12]
300043f0: e1a00004 mov r0, r4
300043f4: e1a0e00f mov lr, pc
300043f8: e593f034 ldr pc, [r3, #52] ; 0x34
300043fc: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc );
30004400: e1a00005 mov r0, r5
30004404: ebfffb70 bl 300031cc <rtems_filesystem_freenode>
if ( free_parentloc )
30004408: e3560000 cmp r6, #0
3000440c: 1a000002 bne 3000441c <rmdir+0xdc>
rtems_filesystem_freenode( &parentloc );
return result;
}
30004410: e1a00007 mov r0, r7
30004414: e28dd030 add sp, sp, #48 ; 0x30
30004418: e8bd80f0 pop {r4, r5, r6, r7, pc}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
3000441c: e1a00004 mov r0, r4
30004420: ebfffb69 bl 300031cc <rtems_filesystem_freenode>
30004424: eafffff9 b 30004410 <rmdir+0xd0>
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
30004428: e3560000 cmp r6, #0
3000442c: 1a00000b bne 30004460 <rmdir+0x120>
rtems_filesystem_freenode( &parentloc );
return -1;
30004430: e3e07000 mvn r7, #0
30004434: eafffff5 b 30004410 <rmdir+0xd0>
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
30004438: e1a00005 mov r0, r5
3000443c: ebfffb62 bl 300031cc <rtems_filesystem_freenode>
if ( free_parentloc )
30004440: e3560000 cmp r6, #0
rtems_filesystem_freenode( &parentloc );
30004444: 11a00004 movne r0, r4
30004448: 1bfffb5f blne 300031cc <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( ENOTDIR );
3000444c: eb0026be bl 3000df4c <__errno>
30004450: e3a03014 mov r3, #20
30004454: e5803000 str r3, [r0]
30004458: e3e07000 mvn r7, #0
3000445c: eaffffeb b 30004410 <rmdir+0xd0>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
30004460: e1a00004 mov r0, r4 <== NOT EXECUTED
30004464: ebfffb58 bl 300031cc <rtems_filesystem_freenode> <== NOT EXECUTED
return -1;
30004468: e3e07000 mvn r7, #0 <== NOT EXECUTED
3000446c: eaffffe7 b 30004410 <rmdir+0xd0> <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
30004470: e3a03000 mov r3, #0
30004474: e28d4018 add r4, sp, #24
30004478: e58d3000 str r3, [sp]
3000447c: e3a02002 mov r2, #2
30004480: e1a00007 mov r0, r7
30004484: e1a01005 mov r1, r5
30004488: e1a03004 mov r3, r4
3000448c: ebfffa6c bl 30002e44 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
30004490: e3500000 cmp r0, #0
30004494: 1affffe5 bne 30004430 <rmdir+0xf0>
return -1;
free_parentloc = true;
30004498: e3a06001 mov r6, #1
3000449c: eaffffb3 b 30004370 <rmdir+0x30>
30002c20 <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
30002c20: e92d41f0 push {r4, r5, r6, r7, r8, lr}
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
30002c24: e5904000 ldr r4, [r0]
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
30002c28: e1a06000 mov r6, r0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
30002c2c: e3540000 cmp r4, #0
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
30002c30: e1a07001 mov r7, r1
const rtems_assoc_t *default_ap = 0;
30002c34: 01a06004 moveq r6, r4
if (rtems_assoc_is_default(ap))
30002c38: 0a000011 beq 30002c84 <rtems_assoc_ptr_by_name+0x64>
30002c3c: e1a00004 mov r0, r4
30002c40: e59f106c ldr r1, [pc, #108] ; 30002cb4 <rtems_assoc_ptr_by_name+0x94>
30002c44: eb002ed4 bl 3000e79c <strcmp>
30002c48: e3500000 cmp r0, #0
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
30002c4c: 13a08000 movne r8, #0
if (rtems_assoc_is_default(ap))
30002c50: 0a00000d beq 30002c8c <rtems_assoc_ptr_by_name+0x6c>
default_ap = ap++;
for ( ; ap->name; ap++)
30002c54: e1a05006 mov r5, r6
30002c58: ea000003 b 30002c6c <rtems_assoc_ptr_by_name+0x4c>
30002c5c: e595400c ldr r4, [r5, #12]
30002c60: e285500c add r5, r5, #12
30002c64: e3540000 cmp r4, #0
30002c68: 0a00000e beq 30002ca8 <rtems_assoc_ptr_by_name+0x88>
if (strcmp(ap->name, name) == 0)
30002c6c: e1a00004 mov r0, r4
30002c70: e1a01007 mov r1, r7
30002c74: eb002ec8 bl 3000e79c <strcmp>
30002c78: e3500000 cmp r0, #0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
30002c7c: e1a06005 mov r6, r5
if (strcmp(ap->name, name) == 0)
30002c80: 1afffff5 bne 30002c5c <rtems_assoc_ptr_by_name+0x3c>
return ap;
return default_ap;
}
30002c84: e1a00006 mov r0, r6
30002c88: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
30002c8c: e596400c ldr r4, [r6, #12]
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
30002c90: e286300c add r3, r6, #12
for ( ; ap->name; ap++)
30002c94: e3540000 cmp r4, #0
30002c98: 11a08006 movne r8, r6
30002c9c: 11a06003 movne r6, r3
30002ca0: 1affffeb bne 30002c54 <rtems_assoc_ptr_by_name+0x34>
30002ca4: eafffff6 b 30002c84 <rtems_assoc_ptr_by_name+0x64> <== NOT EXECUTED
30002ca8: e1a06008 mov r6, r8
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
30002cac: e1a00006 mov r0, r6
30002cb0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
3000cc6c <rtems_deviceio_errno>:
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
3000cc6c: e2503000 subs r3, r0, #0
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
3000cc70: e92d4010 push {r4, lr}
if (sc == RTEMS_SUCCESSFUL) {
3000cc74: 1a000001 bne 3000cc80 <rtems_deviceio_errno+0x14>
errno = eno;
return -1;
}
}
3000cc78: e1a00003 mov r0, r3
3000cc7c: e8bd8010 pop {r4, pc}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
3000cc80: e353001c cmp r3, #28 <== NOT EXECUTED
eno = status_code_to_errno [sc];
3000cc84: 959f2014 ldrls r2, [pc, #20] ; 3000cca0 <rtems_deviceio_errno+0x34><== NOT EXECUTED
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
3000cc88: 83a04016 movhi r4, #22 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
3000cc8c: 97924103 ldrls r4, [r2, r3, lsl #2] <== NOT EXECUTED
}
errno = eno;
3000cc90: eb000008 bl 3000ccb8 <__errno> <== NOT EXECUTED
return -1;
3000cc94: e3e03000 mvn r3, #0 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
3000cc98: e5804000 str r4, [r0] <== NOT EXECUTED
return -1;
3000cc9c: eafffff5 b 3000cc78 <rtems_deviceio_errno+0xc> <== NOT EXECUTED
30001ff0 <rtems_filesystem_dirname>:
}
int rtems_filesystem_dirname(
const char *pathname
)
{
30001ff0: e92d4030 push {r4, r5, lr}
30001ff4: e1a05000 mov r5, r0
int len = strlen( pathname );
30001ff8: eb002f1e bl 3000dc78 <strlen>
while ( len ) {
30001ffc: e2504000 subs r4, r0, #0
30002000: 1a000002 bne 30002010 <rtems_filesystem_dirname+0x20>
30002004: ea000006 b 30002024 <rtems_filesystem_dirname+0x34> <== NOT EXECUTED
30002008: e3540000 cmp r4, #0
3000200c: 0a000004 beq 30002024 <rtems_filesystem_dirname+0x34>
len--;
30002010: e2444001 sub r4, r4, #1
if ( rtems_filesystem_is_separator( pathname[len] ) )
30002014: e7d50004 ldrb r0, [r5, r4]
30002018: eb0003d0 bl 30002f60 <rtems_filesystem_is_separator>
3000201c: e3500000 cmp r0, #0
30002020: 0afffff8 beq 30002008 <rtems_filesystem_dirname+0x18>
break;
}
return len;
}
30002024: e1a00004 mov r0, r4
30002028: e8bd8030 pop {r4, r5, pc}
30001f68 <rtems_filesystem_evaluate_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
30001f68: e92d40f0 push {r4, r5, r6, r7, lr}
30001f6c: e1a07003 mov r7, r3
30001f70: e24dd008 sub sp, sp, #8
int i = 0;
30001f74: e3a03000 mov r3, #0
/*
* Verify Input parameters.
*/
if ( !pathname )
30001f78: e2505000 subs r5, r0, #0
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
30001f7c: e1a04001 mov r4, r1
30001f80: e1a06002 mov r6, r2
int i = 0;
30001f84: e58d3004 str r3, [sp, #4]
/*
* Verify Input parameters.
*/
if ( !pathname )
30001f88: 0a000013 beq 30001fdc <rtems_filesystem_evaluate_path+0x74>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
30001f8c: e3570000 cmp r7, #0
30001f90: 0a00000c beq 30001fc8 <rtems_filesystem_evaluate_path+0x60>
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
30001f94: e28d1004 add r1, sp, #4
30001f98: e1a02007 mov r2, r7
30001f9c: eb0003d4 bl 30002ef4 <rtems_filesystem_get_start_loc>
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
30001fa0: e59d1004 ldr r1, [sp, #4]
30001fa4: e59dc01c ldr ip, [sp, #28]
30001fa8: e0850001 add r0, r5, r1
30001fac: e1a02006 mov r2, r6
30001fb0: e0611004 rsb r1, r1, r4
30001fb4: e1a03007 mov r3, r7
30001fb8: e58dc000 str ip, [sp]
30001fbc: ebffffbf bl 30001ec0 <rtems_filesystem_evaluate_relative_path>
pathnamelen - i,
flags,
pathloc,
follow_link );
}
30001fc0: e28dd008 add sp, sp, #8
30001fc4: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
30001fc8: eb002b3a bl 3000ccb8 <__errno> <== NOT EXECUTED
30001fcc: e3a03005 mov r3, #5 <== NOT EXECUTED
30001fd0: e5803000 str r3, [r0] <== NOT EXECUTED
30001fd4: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001fd8: eafffff8 b 30001fc0 <rtems_filesystem_evaluate_path+0x58> <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
30001fdc: eb002b35 bl 3000ccb8 <__errno> <== NOT EXECUTED
30001fe0: e3a0300e mov r3, #14 <== NOT EXECUTED
30001fe4: e5803000 str r3, [r0] <== NOT EXECUTED
30001fe8: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001fec: eafffff3 b 30001fc0 <rtems_filesystem_evaluate_path+0x58> <== NOT EXECUTED
30001ec0 <rtems_filesystem_evaluate_relative_path>:
/*
* Verify Input parameters.
*/
if ( !pathname )
30001ec0: e3500000 cmp r0, #0
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
30001ec4: e92d4030 push {r4, r5, lr}
30001ec8: e1a05002 mov r5, r2
30001ecc: e1a04003 mov r4, r3
/*
* Verify Input parameters.
*/
if ( !pathname )
30001ed0: 0a00001f beq 30001f54 <rtems_filesystem_evaluate_relative_path+0x94>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
30001ed4: e3530000 cmp r3, #0
30001ed8: 0a000018 beq 30001f40 <rtems_filesystem_evaluate_relative_path+0x80>
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
30001edc: e593c00c ldr ip, [r3, #12]
30001ee0: e1a0e00f mov lr, pc
30001ee4: e59cf000 ldr pc, [ip]
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
30001ee8: e59d200c ldr r2, [sp, #12]
30001eec: e2703001 rsbs r3, r0, #1
30001ef0: 33a03000 movcc r3, #0
30001ef4: e3520000 cmp r2, #0
30001ef8: 03a03000 moveq r3, #0
30001efc: e3530000 cmp r3, #0
30001f00: 08bd8030 popeq {r4, r5, pc}
type = (*pathloc->ops->node_type_h)( pathloc );
30001f04: e594300c ldr r3, [r4, #12]
30001f08: e1a00004 mov r0, r4
30001f0c: e1a0e00f mov lr, pc
30001f10: e593f010 ldr pc, [r3, #16]
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
30001f14: e2400003 sub r0, r0, #3
30001f18: e3500001 cmp r0, #1
30001f1c: 9a000001 bls 30001f28 <rtems_filesystem_evaluate_relative_path+0x68>
30001f20: e3a00000 mov r0, #0
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
30001f24: e8bd8030 pop {r4, r5, pc}
* pathloc will be passed up (and eventually released).
* Hence, the (valid) originial node that we submit to
* eval_link_h() should be released by the handler.
*/
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
30001f28: e594300c ldr r3, [r4, #12]
30001f2c: e1a00004 mov r0, r4
30001f30: e1a01005 mov r1, r5
30001f34: e1a0e00f mov lr, pc
30001f38: e593f034 ldr pc, [r3, #52] ; 0x34
30001f3c: e8bd8030 pop {r4, r5, pc}
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
30001f40: eb002b5c bl 3000ccb8 <__errno> <== NOT EXECUTED
30001f44: e3a03005 mov r3, #5 <== NOT EXECUTED
30001f48: e5803000 str r3, [r0] <== NOT EXECUTED
30001f4c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001f50: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
30001f54: eb002b57 bl 3000ccb8 <__errno> <== NOT EXECUTED
30001f58: e3a0300e mov r3, #14 <== NOT EXECUTED
30001f5c: e5803000 str r3, [r0] <== NOT EXECUTED
30001f60: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001f64: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
30001d60 <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 )
{
30001d60: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001d64: e59f20e8 ldr r2, [pc, #232] ; 30001e54 <rtems_filesystem_initialize+0xf4>
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001d68: e59f60e8 ldr r6, [pc, #232] ; 30001e58 <rtems_filesystem_initialize+0xf8>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001d6c: e5922000 ldr r2, [r2]
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001d70: e5963000 ldr r3, [r6]
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001d74: e3520000 cmp r2, #0
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001d78: 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 )
{
30001d7c: e24dd018 sub sp, sp, #24
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001d80: e583202c str r2, [r3, #44] ; 0x2c
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001d84: 0a00002c beq 30001e3c <rtems_filesystem_initialize+0xdc>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
30001d88: e59f30cc ldr r3, [pc, #204] ; 30001e5c <rtems_filesystem_initialize+0xfc>
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
30001d8c: e3a05000 mov r5, #0
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
30001d90: e5933000 ldr r3, [r3]
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
30001d94: e5930008 ldr r0, [r3, #8]
30001d98: e593100c ldr r1, [r3, #12]
30001d9c: e893000c ldm r3, {r2, r3}
30001da0: e58d5000 str r5, [sp]
30001da4: eb000226 bl 30002644 <mount>
if ( status == -1 )
30001da8: e3700001 cmn r0, #1
30001dac: 0a000026 beq 30001e4c <rtems_filesystem_initialize+0xec>
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
30001db0: e5963000 ldr r3, [r6]
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001db4: e28d4004 add r4, sp, #4
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
30001db8: 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);
30001dbc: e3a01001 mov r1, #1
30001dc0: e1a03004 mov r3, r4
30001dc4: e1a02005 mov r2, r5
30001dc8: e59f0090 ldr r0, [pc, #144] ; 30001e60 <rtems_filesystem_initialize+0x100>
30001dcc: e58d5000 str r5, [sp]
30001dd0: eb000064 bl 30001f68 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
30001dd4: e596c000 ldr ip, [r6]
30001dd8: e1a07004 mov r7, r4
30001ddc: e28cc018 add ip, ip, #24
30001de0: e8b7000f ldm r7!, {r0, r1, r2, r3}
30001de4: e597e000 ldr lr, [r7]
30001de8: e8ac000f stmia ip!, {r0, r1, r2, r3}
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001dec: e3a01001 mov r1, #1
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
30001df0: e58ce000 str lr, [ip]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001df4: e1a02005 mov r2, r5
30001df8: e1a03004 mov r3, r4
30001dfc: e59f005c ldr r0, [pc, #92] ; 30001e60 <rtems_filesystem_initialize+0x100>
30001e00: e58d5000 str r5, [sp]
30001e04: eb000057 bl 30001f68 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
30001e08: e8b4000f ldm r4!, {r0, r1, r2, r3}
30001e0c: e596c000 ldr ip, [r6]
30001e10: e597e000 ldr lr, [r7]
30001e14: e28cc004 add ip, ip, #4
30001e18: e8ac000f stmia ip!, {r0, r1, r2, r3}
*
* 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);
30001e1c: e59f0040 ldr r0, [pc, #64] ; 30001e64 <rtems_filesystem_initialize+0x104>
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
30001e20: e58ce000 str lr, [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);
30001e24: e59f103c ldr r1, [pc, #60] ; 30001e68 <rtems_filesystem_initialize+0x108>
30001e28: eb0001b5 bl 30002504 <mkdir>
if ( status != 0 )
30001e2c: e3500000 cmp r0, #0
30001e30: 1a000003 bne 30001e44 <rtems_filesystem_initialize+0xe4>
* 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.
*/
}
30001e34: e28dd018 add sp, sp, #24
30001e38: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
30001e3c: e59f0028 ldr r0, [pc, #40] ; 30001e6c <rtems_filesystem_initialize+0x10c><== NOT EXECUTED
30001e40: eb000fc9 bl 30005d6c <rtems_fatal_error_occurred> <== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
30001e44: e59f0024 ldr r0, [pc, #36] ; 30001e70 <rtems_filesystem_initialize+0x110><== NOT EXECUTED
30001e48: eb000fc7 bl 30005d6c <rtems_fatal_error_occurred> <== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
30001e4c: e59f0020 ldr r0, [pc, #32] ; 30001e74 <rtems_filesystem_initialize+0x114><== NOT EXECUTED
30001e50: eb000fc5 bl 30005d6c <rtems_fatal_error_occurred> <== NOT EXECUTED
3000a360 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
3000a360: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000a364: e59f60ac ldr r6, [pc, #172] ; 3000a418 <rtems_filesystem_iterate+0xb8>
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
3000a368: e1a04000 mov r4, r0
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000a36c: e5963000 ldr r3, [r6]
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
3000a370: e1a05001 mov r5, r1
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000a374: e3530000 cmp r3, #0
3000a378: 1a000002 bne 3000a388 <rtems_filesystem_iterate+0x28>
3000a37c: ea00000c b 3000a3b4 <rtems_filesystem_iterate+0x54> <== NOT EXECUTED
3000a380: e3500000 cmp r0, #0 <== NOT EXECUTED
3000a384: 1a000021 bne 3000a410 <rtems_filesystem_iterate+0xb0> <== NOT EXECUTED
stop = (*routine)( table_entry, routine_arg );
3000a388: e1a00006 mov r0, r6
3000a38c: e1a01005 mov r1, r5
3000a390: e1a0e00f mov lr, pc
3000a394: e12fff14 bx r4
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000a398: e5963008 ldr r3, [r6, #8]
stop = (*routine)( table_entry, routine_arg );
3000a39c: e1a0a000 mov sl, r0
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000a3a0: e3530000 cmp r3, #0
3000a3a4: e2866008 add r6, r6, #8
3000a3a8: 1afffff4 bne 3000a380 <rtems_filesystem_iterate+0x20>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
3000a3ac: e3500000 cmp r0, #0
3000a3b0: 1a000016 bne 3000a410 <rtems_filesystem_iterate+0xb0>
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 );
3000a3b4: e59f7060 ldr r7, [pc, #96] ; 3000a41c <rtems_filesystem_iterate+0xbc>
3000a3b8: e3a01000 mov r1, #0
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
3000a3bc: e59f605c ldr r6, [pc, #92] ; 3000a420 <rtems_filesystem_iterate+0xc0>
3000a3c0: e5970000 ldr r0, [r7]
3000a3c4: e1a02001 mov r2, r1
3000a3c8: ebffecc4 bl 300056e0 <rtems_semaphore_obtain>
3000a3cc: e4968004 ldr r8, [r6], #4
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
3000a3d0: e1580006 cmp r8, r6
3000a3d4: 03a0a000 moveq sl, #0
3000a3d8: 1a000002 bne 3000a3e8 <rtems_filesystem_iterate+0x88>
3000a3dc: ea000009 b 3000a408 <rtems_filesystem_iterate+0xa8>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
3000a3e0: e3500000 cmp r0, #0
3000a3e4: 1a000007 bne 3000a408 <rtems_filesystem_iterate+0xa8>
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
3000a3e8: e2880008 add r0, r8, #8
3000a3ec: e1a01005 mov r1, r5
3000a3f0: e1a0e00f mov lr, pc
3000a3f4: e12fff14 bx r4
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
3000a3f8: e5988000 ldr r8, [r8]
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
3000a3fc: e1a0a000 mov sl, r0
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
3000a400: e1580006 cmp r8, r6
3000a404: 1afffff5 bne 3000a3e0 <rtems_filesystem_iterate+0x80>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
3000a408: e5970000 ldr r0, [r7]
3000a40c: ebffecfc bl 30005804 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
return stop;
}
3000a410: e1a0000a mov r0, sl
3000a414: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
300025cc <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
300025cc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
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 );
300025d0: e59f7064 ldr r7, [pc, #100] ; 3000263c <rtems_filesystem_mount_iterate+0x70>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
300025d4: e59f4064 ldr r4, [pc, #100] ; 30002640 <rtems_filesystem_mount_iterate+0x74>
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
300025d8: e1a06001 mov r6, r1
300025dc: e3a01000 mov r1, #0
300025e0: e1a05000 mov r5, r0
300025e4: e1a02001 mov r2, r1
300025e8: e5970000 ldr r0, [r7]
300025ec: eb000c3b bl 300056e0 <rtems_semaphore_obtain>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
300025f0: e4948004 ldr r8, [r4], #4
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
300025f4: e1580004 cmp r8, r4
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
rtems_chain_node *node = NULL;
bool stop = false;
300025f8: 03a0a000 moveq sl, #0
rtems_libio_lock();
for (
300025fc: 1a000002 bne 3000260c <rtems_filesystem_mount_iterate+0x40>
30002600: ea000009 b 3000262c <rtems_filesystem_mount_iterate+0x60> <== NOT EXECUTED
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
30002604: e3500000 cmp r0, #0
30002608: 1a000007 bne 3000262c <rtems_filesystem_mount_iterate+0x60>
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
3000260c: e1a00008 mov r0, r8
30002610: e1a01006 mov r1, r6
30002614: e1a0e00f mov lr, pc
30002618: e12fff15 bx r5
}
rtems_libio_unlock();
return stop;
}
3000261c: e5988000 ldr r8, [r8]
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
30002620: e1a0a000 mov sl, r0
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
30002624: e1580004 cmp r8, r4
30002628: 1afffff5 bne 30002604 <rtems_filesystem_mount_iterate+0x38>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
3000262c: e5970000 ldr r0, [r7]
30002630: eb000c73 bl 30005804 <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
30002634: e1a0000a mov r0, sl
30002638: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
3000202c <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
3000202c: e92d4070 push {r4, r5, r6, lr}
30002030: e1a06000 mov r6, r0
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
30002034: e5d00000 ldrb r0, [r0]
30002038: e1a04001 mov r4, r1
3000203c: e3510000 cmp r1, #0
30002040: 13500000 cmpne r0, #0
30002044: 03a05000 moveq r5, #0
30002048: 13a05001 movne r5, #1
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
3000204c: 13a05000 movne r5, #0
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
30002050: 1a00000a bne 30002080 <rtems_filesystem_prefix_separators+0x54>
30002054: ea00000c b 3000208c <rtems_filesystem_prefix_separators+0x60><== NOT EXECUTED
30002058: e2544001 subs r4, r4, #1
3000205c: e5f60001 ldrb r0, [r6, #1]!
30002060: 03a03000 moveq r3, #0
30002064: 13a03001 movne r3, #1
30002068: e3500000 cmp r0, #0
3000206c: 03a03000 moveq r3, #0
30002070: 12033001 andne r3, r3, #1
30002074: e3530000 cmp r3, #0
{
pathname++;
pathnamelen--;
stripped++;
30002078: e2855001 add r5, r5, #1
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
3000207c: 0a000002 beq 3000208c <rtems_filesystem_prefix_separators+0x60>
30002080: eb0003b6 bl 30002f60 <rtems_filesystem_is_separator>
30002084: e3500000 cmp r0, #0
30002088: 1afffff2 bne 30002058 <rtems_filesystem_prefix_separators+0x2c>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
3000208c: e1a00005 mov r0, r5
30002090: e8bd8070 pop {r4, r5, r6, pc}
30002a4c <rtems_gxx_getspecific>:
void *rtems_gxx_getspecific(__gthread_key_t key)
{
30002a4c: e92d4030 push {r4, r5, lr}
30002a50: e24dd004 sub sp, sp, #4
rtems_status_code status;
void *p= 0;
30002a54: e3a05000 mov r5, #0
}
return 0;
}
void *rtems_gxx_getspecific(__gthread_key_t key)
{
30002a58: e1a04000 mov r4, r0
rtems_status_code status;
void *p= 0;
30002a5c: e28d2004 add r2, sp, #4
30002a60: e5225004 str r5, [r2, #-4]!
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p );
30002a64: e1a00005 mov r0, r5
30002a68: e1a01004 mov r1, r4
30002a6c: e1a0200d mov r2, sp
30002a70: eb000f63 bl 30006804 <rtems_task_variable_get>
if ( status == RTEMS_SUCCESSFUL ) {
30002a74: e1500005 cmp r0, r5
/* We do not have to do this, but what the heck ! */
p= key->val;
30002a78: 05940000 ldreq r0, [r4]
rtems_status_code status;
void *p= 0;
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p );
if ( status == RTEMS_SUCCESSFUL ) {
30002a7c: 1a000001 bne 30002a88 <rtems_gxx_getspecific+0x3c>
p,
rtems_task_self()
);
#endif
return p;
}
30002a80: e28dd004 add sp, sp, #4
30002a84: e8bd8030 pop {r4, r5, pc}
p= key->val;
} else {
/* fisrt time, always set to zero, it is unknown the value that the others
* threads are using at the moment of this call
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
30002a88: e1a00005 mov r0, r5 <== NOT EXECUTED
30002a8c: e1a01004 mov r1, r4 <== NOT EXECUTED
30002a90: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
30002a94: eb000f07 bl 300066b8 <rtems_task_variable_add> <== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL ) {
30002a98: e2503000 subs r3, r0, #0 <== NOT EXECUTED
rtems_panic ("rtems_gxx_getspecific");
}
key->val = (void *)0;
30002a9c: 059d0000 ldreq r0, [sp] <== NOT EXECUTED
30002aa0: 05843000 streq r3, [r4] <== NOT EXECUTED
30002aa4: 0afffff5 beq 30002a80 <rtems_gxx_getspecific+0x34> <== NOT EXECUTED
/* fisrt time, always set to zero, it is unknown the value that the others
* threads are using at the moment of this call
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
if ( status != RTEMS_SUCCESSFUL ) {
rtems_panic ("rtems_gxx_getspecific");
30002aa8: e59f0000 ldr r0, [pc, #0] ; 30002ab0 <rtems_gxx_getspecific+0x64><== NOT EXECUTED
30002aac: eb0020c2 bl 3000adbc <rtems_panic> <== NOT EXECUTED
30002a0c <rtems_gxx_key_dtor>:
{
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
#endif
key->val = 0;
30002a0c: e3a03000 mov r3, #0 <== NOT EXECUTED
30002a10: e5803000 str r3, [r0] <== NOT EXECUTED
return 0;
}
30002a14: e1a00003 mov r0, r3 <== NOT EXECUTED
30002a18: e12fff1e bx lr <== NOT EXECUTED
30002b40 <rtems_gxx_mutex_destroy>:
int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex)
{
30002b40: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: destroy mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_delete(*(rtems_id *)mutex);
30002b44: e5900000 ldr r0, [r0] <== NOT EXECUTED
30002b48: eb000d32 bl 30006018 <rtems_semaphore_delete> <== NOT EXECUTED
if ( status == RTEMS_SUCCESSFUL )
30002b4c: e3500000 cmp r0, #0 <== NOT EXECUTED
return 0;
return -1;
}
30002b50: 13e00000 mvnne r0, #0 <== NOT EXECUTED
30002b54: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30002ae0 <rtems_gxx_mutex_init>:
/*
* MUTEX support
*/
void rtems_gxx_mutex_init (__gthread_mutex_t *mutex)
{
30002ae0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
30002ae4: e24dd004 sub sp, sp, #4
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: mutex init =%X\n", *mutex );
#endif
status = rtems_semaphore_create(
30002ae8: e58d0000 str r0, [sp]
30002aec: e3a01001 mov r1, #1
30002af0: e59f0020 ldr r0, [pc, #32] ; 30002b18 <rtems_gxx_mutex_init+0x38>
30002af4: e3a02054 mov r2, #84 ; 0x54
30002af8: e3a03000 mov r3, #0
30002afc: eb000cd4 bl 30005e54 <rtems_semaphore_create>
RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|
RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
0,
(rtems_id *)mutex
);
if ( status != RTEMS_SUCCESSFUL ) {
30002b00: e3500000 cmp r0, #0
30002b04: 1a000001 bne 30002b10 <rtems_gxx_mutex_init+0x30>
rtems_panic ("rtems_gxx_mutex_init");
}
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: mutex init complete =%X\n", *mutex );
#endif
}
30002b08: e28dd004 add sp, sp, #4
30002b0c: e8bd8000 pop {pc}
"gxx_wrappers: mutex init failed %s (%d)\n",
rtems_status_text(status),
status
);
#endif
rtems_panic ("rtems_gxx_mutex_init");
30002b10: e59f0004 ldr r0, [pc, #4] ; 30002b1c <rtems_gxx_mutex_init+0x3c><== NOT EXECUTED
30002b14: eb0020a8 bl 3000adbc <rtems_panic> <== NOT EXECUTED
30002948 <rtems_gxx_once>:
typedef int __gthread_once_t;
typedef void *__gthread_mutex_t;
typedef void *__gthread_recursive_mutex_t;
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
30002948: e92d4070 push {r4, r5, r6, lr}
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
3000294c: e5903000 ldr r3, [r0]
typedef int __gthread_once_t;
typedef void *__gthread_mutex_t;
typedef void *__gthread_recursive_mutex_t;
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
30002950: e24dd004 sub sp, sp, #4
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
30002954: e3530000 cmp r3, #0
typedef int __gthread_once_t;
typedef void *__gthread_mutex_t;
typedef void *__gthread_recursive_mutex_t;
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
30002958: e1a04000 mov r4, r0
3000295c: e1a05001 mov r5, r1
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
30002960: 0a000002 beq 30002970 <rtems_gxx_once+0x28>
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
if ( o == 0 )
(*func)();
}
return 0;
}
30002964: e3a00000 mov r0, #0
30002968: e28dd004 add sp, sp, #4
3000296c: e8bd8070 pop {r4, r5, r6, pc}
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
30002970: e3a00c01 mov r0, #256 ; 0x100
30002974: e1a01000 mov r1, r0
30002978: e1a0200d mov r2, sp
3000297c: eb000ed4 bl 300064d4 <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
30002980: e5943000 ldr r3, [r4]
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
30002984: e1a0600d mov r6, sp
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
30002988: e3530000 cmp r3, #0
3000298c: 1a000008 bne 300029b4 <rtems_gxx_once+0x6c>
*(volatile __gthread_once_t *)once = 1;
30002990: e3a03001 mov r3, #1
30002994: e5843000 str r3, [r4]
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
30002998: e3a01c01 mov r1, #256 ; 0x100
3000299c: e1a0200d mov r2, sp
300029a0: e59d0000 ldr r0, [sp]
300029a4: eb000eca bl 300064d4 <rtems_task_mode>
if ( o == 0 )
(*func)();
300029a8: e1a0e00f mov lr, pc
300029ac: e12fff15 bx r5
300029b0: eaffffeb b 30002964 <rtems_gxx_once+0x1c>
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
300029b4: e59d0000 ldr r0, [sp] <== NOT EXECUTED
300029b8: e3a01c01 mov r1, #256 ; 0x100 <== NOT EXECUTED
300029bc: e1a0200d mov r2, sp <== NOT EXECUTED
300029c0: eb000ec3 bl 300064d4 <rtems_task_mode> <== NOT EXECUTED
300029c4: eaffffe6 b 30002964 <rtems_gxx_once+0x1c> <== NOT EXECUTED
30007324 <rtems_io_register_driver>:
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
30007324: e59fc150 ldr ip, [pc, #336] ; 3000747c <rtems_io_register_driver+0x158>
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
30007328: e59f3150 ldr r3, [pc, #336] ; 30007480 <rtems_io_register_driver+0x15c>
if ( rtems_interrupt_is_in_progress() )
3000732c: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
30007330: e92d4030 push {r4, r5, lr}
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
30007334: e35c0000 cmp ip, #0
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
30007338: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
3000733c: e5930000 ldr r0, [r3]
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
30007340: 13a00012 movne r0, #18
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
30007344: 18bd8030 popne {r4, r5, pc}
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
30007348: e3520000 cmp r2, #0
3000734c: 0a00003f beq 30007450 <rtems_io_register_driver+0x12c>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
30007350: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
30007354: e5820000 str r0, [r2]
if ( driver_table == NULL )
30007358: 0a00003c beq 30007450 <rtems_io_register_driver+0x12c>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
3000735c: e591c000 ldr ip, [r1]
30007360: e35c0000 cmp ip, #0
30007364: 0a000036 beq 30007444 <rtems_io_register_driver+0x120>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
30007368: e1500004 cmp r0, r4
3000736c: 9a000027 bls 30007410 <rtems_io_register_driver+0xec>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
30007370: e59f010c ldr r0, [pc, #268] ; 30007484 <rtems_io_register_driver+0x160>
30007374: e590c000 ldr ip, [r0]
30007378: e28cc001 add ip, ip, #1
3000737c: e580c000 str ip, [r0]
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
30007380: e3540000 cmp r4, #0
30007384: 1a000023 bne 30007418 <rtems_io_register_driver+0xf4>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
30007388: e593c000 ldr ip, [r3]
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
3000738c: e35c0000 cmp ip, #0
30007390: 0a000030 beq 30007458 <rtems_io_register_driver+0x134>
30007394: e59fe0ec ldr lr, [pc, #236] ; 30007488 <rtems_io_register_driver+0x164>
30007398: e59e3000 ldr r3, [lr]
3000739c: ea000003 b 300073b0 <rtems_io_register_driver+0x8c>
300073a0: e2844001 add r4, r4, #1
300073a4: e15c0004 cmp ip, r4
300073a8: e2833018 add r3, r3, #24
300073ac: 9a000005 bls 300073c8 <rtems_io_register_driver+0xa4>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
300073b0: e5930000 ldr r0, [r3]
300073b4: e3500000 cmp r0, #0
300073b8: 1afffff8 bne 300073a0 <rtems_io_register_driver+0x7c>
300073bc: e5930004 ldr r0, [r3, #4]
300073c0: e3500000 cmp r0, #0
300073c4: 1afffff5 bne 300073a0 <rtems_io_register_driver+0x7c>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
300073c8: e15c0004 cmp ip, r4
300073cc: 1084c084 addne ip, r4, r4, lsl #1
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
300073d0: e5824000 str r4, [r2]
if ( m != n )
300073d4: 11a0c18c lslne ip, ip, #3
300073d8: 0a00001f beq 3000745c <rtems_io_register_driver+0x138>
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
300073dc: e59e5000 ldr r5, [lr]
300073e0: e1a0e001 mov lr, r1
300073e4: e085c00c add ip, r5, ip
300073e8: e8be000f ldm lr!, {r0, r1, r2, r3}
300073ec: e8ac000f stmia ip!, {r0, r1, r2, r3}
300073f0: e89e0003 ldm lr, {r0, r1}
300073f4: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
300073f8: eb0006a8 bl 30008ea0 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
300073fc: e3a01000 mov r1, #0
30007400: e1a00004 mov r0, r4
30007404: e1a02001 mov r2, r1
}
30007408: e8bd4030 pop {r4, r5, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
3000740c: ea001f08 b 3000f034 <rtems_io_initialize>
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
30007410: e3a0000a mov r0, #10
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
30007414: e8bd8030 pop {r4, r5, pc}
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
30007418: e59fe068 ldr lr, [pc, #104] ; 30007488 <rtems_io_register_driver+0x164>
3000741c: e0840084 add r0, r4, r4, lsl #1
30007420: e59e3000 ldr r3, [lr]
30007424: e1a0c180 lsl ip, r0, #3
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
30007428: e7930180 ldr r0, [r3, r0, lsl #3]
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
3000742c: e083300c add r3, r3, ip
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
30007430: e3500000 cmp r0, #0
30007434: 0a00000b beq 30007468 <rtems_io_register_driver+0x144>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
30007438: eb000698 bl 30008ea0 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
3000743c: e3a0000c mov r0, #12
30007440: e8bd8030 pop {r4, r5, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
30007444: e591c004 ldr ip, [r1, #4]
30007448: e35c0000 cmp ip, #0
3000744c: 1affffc5 bne 30007368 <rtems_io_register_driver+0x44>
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
30007450: e3a00009 mov r0, #9
30007454: e8bd8030 pop {r4, r5, pc}
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
30007458: e5824000 str r4, [r2] <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
3000745c: eb00068f bl 30008ea0 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
30007460: e3a00005 mov r0, #5
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
return sc;
30007464: e8bd8030 pop {r4, r5, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
30007468: e5933004 ldr r3, [r3, #4]
3000746c: e3530000 cmp r3, #0
30007470: 1afffff0 bne 30007438 <rtems_io_register_driver+0x114>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
30007474: e5824000 str r4, [r2]
30007478: eaffffd7 b 300073dc <rtems_io_register_driver+0xb8>
300021c4 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
300021c4: e92d4010 push {r4, lr}
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
300021c8: e59f30b8 ldr r3, [pc, #184] ; 30002288 <rtems_libio_init+0xc4>
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
300021cc: e24dd004 sub sp, sp, #4
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
300021d0: e5934000 ldr r4, [r3]
300021d4: e3540000 cmp r4, #0
300021d8: 0a000017 beq 3000223c <rtems_libio_init+0x78>
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
300021dc: e1a00004 mov r0, r4
300021e0: e3a01038 mov r1, #56 ; 0x38
300021e4: ebffff23 bl 30001e78 <calloc>
300021e8: e59f309c ldr r3, [pc, #156] ; 3000228c <rtems_libio_init+0xc8>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
300021ec: e3500000 cmp r0, #0
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
300021f0: e1a02000 mov r2, r0
300021f4: e5830000 str r0, [r3]
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
300021f8: 0a000020 beq 30002280 <rtems_libio_init+0xbc>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
300021fc: e59f308c ldr r3, [pc, #140] ; 30002290 <rtems_libio_init+0xcc>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
30002200: e3540001 cmp r4, #1
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
30002204: e5830000 str r0, [r3]
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
30002208: 9a000009 bls 30002234 <rtems_libio_init+0x70>
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
3000220c: e2803038 add r3, r0, #56 ; 0x38
30002210: e3a02001 mov r2, #1
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
iop->data1 = iop + 1;
30002214: e2822001 add r2, r2, #1
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
30002218: e1520004 cmp r2, r4
iop->data1 = iop + 1;
3000221c: e5033004 str r3, [r3, #-4]
30002220: e2833038 add r3, r3, #56 ; 0x38
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
30002224: 1afffffa bne 30002214 <rtems_libio_init+0x50>
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
30002228: e2422001 sub r2, r2, #1
3000222c: e0622182 rsb r2, r2, r2, lsl #3
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
30002230: e0802182 add r2, r0, r2, lsl #3
iop->data1 = iop + 1;
iop->data1 = NULL;
30002234: e3a03000 mov r3, #0
30002238: e5823034 str r3, [r2, #52] ; 0x34
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
3000223c: e59fc050 ldr ip, [pc, #80] ; 30002294 <rtems_libio_init+0xd0>
30002240: e59f0050 ldr r0, [pc, #80] ; 30002298 <rtems_libio_init+0xd4>
30002244: e3a01001 mov r1, #1
30002248: e3a02054 mov r2, #84 ; 0x54
3000224c: e3a03000 mov r3, #0
30002250: e58dc000 str ip, [sp]
30002254: eb000c87 bl 30005478 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
30002258: e3500000 cmp r0, #0
3000225c: 1a000006 bne 3000227c <rtems_libio_init+0xb8>
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
30002260: e59f3034 ldr r3, [pc, #52] ; 3000229c <rtems_libio_init+0xd8>
30002264: e5933000 ldr r3, [r3]
30002268: e3530000 cmp r3, #0
(* rtems_fs_init_helper)();
3000226c: 11a0e00f movne lr, pc
30002270: 112fff13 bxne r3
}
30002274: e28dd004 add sp, sp, #4
30002278: e8bd8010 pop {r4, pc}
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
3000227c: eb000eba bl 30005d6c <rtems_fatal_error_occurred> <== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
30002280: e280001a add r0, r0, #26
30002284: eb000eb8 bl 30005d6c <rtems_fatal_error_occurred>
300035f4 <rtems_libio_set_private_env>:
}
}
rtems_status_code rtems_libio_set_private_env(void)
{
300035f4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
300035f8: e3a00000 mov r0, #0
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void)
{
300035fc: e24dd01c sub sp, sp, #28
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
30003600: e1a01000 mov r1, r0
30003604: e28d2018 add r2, sp, #24
30003608: eb000b6f bl 300063cc <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
3000360c: e2508000 subs r8, r0, #0
30003610: 1a000025 bne 300036ac <rtems_libio_set_private_env+0xb8>
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
30003614: e59f60dc ldr r6, [pc, #220] ; 300036f8 <rtems_libio_set_private_env+0x104>
30003618: e59f30dc ldr r3, [pc, #220] ; 300036fc <rtems_libio_set_private_env+0x108>
3000361c: e5967000 ldr r7, [r6]
30003620: e1570003 cmp r7, r3
30003624: 0a000023 beq 300036b8 <rtems_libio_set_private_env+0xc4>
return sc;
}
rtems_current_user_env = tmp;
}
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
30003628: e59f10cc ldr r1, [pc, #204] ; 300036fc <rtems_libio_set_private_env+0x108>
3000362c: e3a02048 mov r2, #72 ; 0x48
30003630: e1a00007 mov r0, r7
30003634: eb0029e6 bl 3000ddd4 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
30003638: e59d3018 ldr r3, [sp, #24]
* what we are trying to do here is forking off
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
3000363c: e28d4004 add r4, sp, #4
30003640: e3a05000 mov r5, #0
}
rtems_current_user_env = tmp;
}
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
30003644: e5873000 str r3, [r7]
* what we are trying to do here is forking off
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30003648: e3a01001 mov r1, #1
3000364c: e1a03004 mov r3, r4
30003650: e1a02005 mov r2, r5
30003654: e59f00a4 ldr r0, [pc, #164] ; 30003700 <rtems_libio_set_private_env+0x10c>
30003658: e58d5000 str r5, [sp]
3000365c: ebfffb2f bl 30002320 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
30003660: e596c000 ldr ip, [r6]
30003664: e1a07004 mov r7, r4
30003668: e28cc018 add ip, ip, #24
3000366c: e8b7000f ldm r7!, {r0, r1, r2, r3}
30003670: e597e000 ldr lr, [r7]
30003674: e8ac000f stmia ip!, {r0, r1, r2, r3}
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30003678: e3a01001 mov r1, #1
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
3000367c: e58ce000 str lr, [ip]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30003680: e1a02005 mov r2, r5
30003684: e1a03004 mov r3, r4
30003688: e59f0070 ldr r0, [pc, #112] ; 30003700 <rtems_libio_set_private_env+0x10c>
3000368c: e58d5000 str r5, [sp]
30003690: ebfffb22 bl 30002320 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
30003694: e8b4000f ldm r4!, {r0, r1, r2, r3}
30003698: e596c000 ldr ip, [r6]
3000369c: e5974000 ldr r4, [r7]
300036a0: e28cc004 add ip, ip, #4
300036a4: e8ac000f stmia ip!, {r0, r1, r2, r3}
300036a8: e58c4000 str r4, [ip]
return RTEMS_SUCCESSFUL;
}
300036ac: e1a00008 mov r0, r8
300036b0: e28dd01c add sp, sp, #28
300036b4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
300036b8: e3a00048 mov r0, #72 ; 0x48
300036bc: ebfffd06 bl 30002adc <malloc>
if (!tmp)
300036c0: e2507000 subs r7, r0, #0
return RTEMS_NO_MEMORY;
300036c4: 03a0801a moveq r8, #26
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
if (!tmp)
300036c8: 0afffff7 beq 300036ac <rtems_libio_set_private_env+0xb8>
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(
300036cc: e1a00008 mov r0, r8
300036d0: e1a01006 mov r1, r6
300036d4: e59f2028 ldr r2, [pc, #40] ; 30003704 <rtems_libio_set_private_env+0x110>
300036d8: eb000b90 bl 30006520 <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
300036dc: e2504000 subs r4, r0, #0
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
300036e0: 05867000 streq r7, [r6]
sc = rtems_task_variable_add(
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
300036e4: 0affffcf beq 30003628 <rtems_libio_set_private_env+0x34>
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
300036e8: e1a00007 mov r0, r7 <== NOT EXECUTED
300036ec: ebfffb5b bl 30002460 <free> <== NOT EXECUTED
return sc;
300036f0: e1a08004 mov r8, r4 <== NOT EXECUTED
300036f4: eaffffec b 300036ac <rtems_libio_set_private_env+0xb8> <== NOT EXECUTED
30003708 <rtems_libio_share_private_env>:
* while changing any of those (chdir(), chroot()).
*/
#ifndef HAVE_USERENV_REFCNT
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
30003708: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
3000370c: e1a05000 mov r5, r0 <== NOT EXECUTED
30003710: e24dd008 sub sp, sp, #8 <== NOT EXECUTED
rtems_status_code sc;
rtems_user_env_t * shared_user_env;
rtems_id current_task_id;
sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id);
30003714: e3a00000 mov r0, #0 <== NOT EXECUTED
30003718: e1a01000 mov r1, r0 <== NOT EXECUTED
3000371c: e1a0200d mov r2, sp <== NOT EXECUTED
30003720: eb000b29 bl 300063cc <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
30003724: e2503000 subs r3, r0, #0 <== NOT EXECUTED
30003728: 1a000013 bne 3000377c <rtems_libio_share_private_env+0x74> <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
3000372c: e59f407c ldr r4, [pc, #124] ; 300037b0 <rtems_libio_share_private_env+0xa8><== NOT EXECUTED
30003730: e59d3000 ldr r3, [sp] <== NOT EXECUTED
30003734: e5946000 ldr r6, [r4] <== NOT EXECUTED
30003738: e5962000 ldr r2, [r6] <== NOT EXECUTED
3000373c: e1520003 cmp r2, r3 <== NOT EXECUTED
30003740: 0a000010 beq 30003788 <rtems_libio_share_private_env+0x80> <== NOT EXECUTED
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
if (sc != RTEMS_SUCCESSFUL) return sc;
free_user_env(tmp);
} else {
sc = rtems_task_variable_get(
30003744: e1a00005 mov r0, r5 <== NOT EXECUTED
30003748: e1a01004 mov r1, r4 <== NOT EXECUTED
3000374c: e28d2004 add r2, sp, #4 <== NOT EXECUTED
30003750: eb000bc5 bl 3000666c <rtems_task_variable_get> <== NOT EXECUTED
task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
30003754: e2503000 subs r3, r0, #0 <== NOT EXECUTED
30003758: 1a000005 bne 30003774 <rtems_libio_share_private_env+0x6c> <== NOT EXECUTED
goto bailout;
}
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_add(
3000375c: e3a00000 mov r0, #0 <== NOT EXECUTED
30003760: e59f1048 ldr r1, [pc, #72] ; 300037b0 <rtems_libio_share_private_env+0xa8><== NOT EXECUTED
30003764: e59f2048 ldr r2, [pc, #72] ; 300037b4 <rtems_libio_share_private_env+0xac><== NOT EXECUTED
30003768: eb000b6c bl 30006520 <rtems_task_variable_add> <== NOT EXECUTED
RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
3000376c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
30003770: 0a00000b beq 300037a4 <rtems_libio_share_private_env+0x9c> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
30003774: e59f203c ldr r2, [pc, #60] ; 300037b8 <rtems_libio_share_private_env+0xb0><== NOT EXECUTED
30003778: e5842000 str r2, [r4] <== NOT EXECUTED
return sc;
}
3000377c: e1a00003 mov r0, r3 <== NOT EXECUTED
30003780: e28dd008 add sp, sp, #8 <== NOT EXECUTED
30003784: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
if (rtems_current_user_env->task_id==current_task_id) {
/* kill the current user env & task_var*/
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
30003788: e1a01004 mov r1, r4 <== NOT EXECUTED
3000378c: eb000b8f bl 300065d0 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
30003790: e2503000 subs r3, r0, #0 <== NOT EXECUTED
30003794: 1afffff8 bne 3000377c <rtems_libio_share_private_env+0x74> <== NOT EXECUTED
free_user_env(tmp);
30003798: e1a00006 mov r0, r6 <== NOT EXECUTED
3000379c: ebffff87 bl 300035c0 <free_user_env> <== NOT EXECUTED
300037a0: eaffffed b 3000375c <rtems_libio_share_private_env+0x54> <== NOT EXECUTED
RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
300037a4: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
300037a8: e5842000 str r2, [r4] <== NOT EXECUTED
/* increase the reference count */
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
300037ac: eafffff2 b 3000377c <rtems_libio_share_private_env+0x74> <== NOT EXECUTED
3000a050 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
3000a050: e2002006 and r2, r0, #6
3000a054: e3520006 cmp r2, #6
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
3000a058: e1a03000 mov r3, r0
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
3000a05c: 03a00002 moveq r0, #2
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
3000a060: 0a000002 beq 3000a070 <rtems_libio_to_fcntl_flags+0x20>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
3000a064: e3130002 tst r3, #2
fcntl_flags |= O_RDONLY;
3000a068: 13a00000 movne r0, #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) {
3000a06c: 0a000006 beq 3000a08c <rtems_libio_to_fcntl_flags+0x3c>
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 ) {
3000a070: e3130001 tst r3, #1
fcntl_flags |= O_NONBLOCK;
3000a074: 13800901 orrne r0, r0, #16384 ; 0x4000
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
3000a078: e3130c02 tst r3, #512 ; 0x200
fcntl_flags |= O_APPEND;
3000a07c: 13800008 orrne r0, r0, #8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
3000a080: e3130b01 tst r3, #1024 ; 0x400
fcntl_flags |= O_CREAT;
3000a084: 13800c02 orrne r0, r0, #512 ; 0x200
}
return fcntl_flags;
}
3000a088: e12fff1e bx lr
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
3000a08c: e3130004 tst r3, #4 <== NOT EXECUTED
3000a090: 03a00000 moveq r0, #0 <== NOT EXECUTED
3000a094: 13a00001 movne r0, #1 <== NOT EXECUTED
3000a098: eafffff4 b 3000a070 <rtems_libio_to_fcntl_flags+0x20> <== NOT EXECUTED
3000cb04 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
3000cb04: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000cb08: e24dd048 sub sp, sp, #72 ; 0x48
3000cb0c: e1a0a001 mov sl, r1
int success = 0;
char *dup_path = strdup(path);
3000cb10: eb000a4e bl 3000f450 <strdup>
if (dup_path != NULL) {
3000cb14: e2506000 subs r6, r0, #0
3000cb18: 0a000054 beq 3000cc70 <rtems_mkdir+0x16c>
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
3000cb1c: e5d63000 ldrb r3, [r6]
3000cb20: e3a07000 mov r7, #0
3000cb24: e353002f cmp r3, #47 ; 0x2f
++p;
3000cb28: 05d63001 ldrbeq r3, [r6, #1]
3000cb2c: 02865001 addeq r5, r6, #1
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
3000cb30: 11a05006 movne r5, r6
3000cb34: e3a02001 mov r2, #1
retval = 0;
break;
}
}
if (!last)
*p = '/';
3000cb38: e3a0802f mov r8, #47 ; 0x2f
3000cb3c: e1a09007 mov r9, r7
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
3000cb40: e1a0b00d mov fp, sp
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
3000cb44: e3530000 cmp r3, #0
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
3000cb48: 05c53000 strbeq r3, [r5]
3000cb4c: 03a04001 moveq r4, #1
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
3000cb50: 0a000006 beq 3000cb70 <rtems_mkdir+0x6c>
last = 1;
else if (p[0] != '/')
3000cb54: e353002f cmp r3, #47 ; 0x2f
retval = 0;
break;
}
}
if (!last)
*p = '/';
3000cb58: 15f53001 ldrbne r3, [r5, #1]!
3000cb5c: 1afffff8 bne 3000cb44 <rtems_mkdir+0x40>
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
if (!last && p[1] == '\0')
3000cb60: e5d54001 ldrb r4, [r5, #1]
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
3000cb64: e5c59000 strb r9, [r5]
if (!last && p[1] == '\0')
3000cb68: e2744001 rsbs r4, r4, #1
3000cb6c: 33a04000 movcc r4, #0
last = 1;
if (first) {
3000cb70: e3520000 cmp r2, #0
3000cb74: 1a000030 bne 3000cc3c <rtems_mkdir+0x138>
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
3000cb78: e3540000 cmp r4, #0
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
3000cb7c: 059f1124 ldreq r1, [pc, #292] ; 3000cca8 <rtems_mkdir+0x1a4>
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
3000cb80: 1a000011 bne 3000cbcc <rtems_mkdir+0xc8>
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
3000cb84: e1a00006 mov r0, r6
3000cb88: ebffdbf1 bl 30003b54 <mkdir>
3000cb8c: e3500000 cmp r0, #0
3000cb90: ba000014 blt 3000cbe8 <rtems_mkdir+0xe4>
} else {
retval = 0;
break;
}
}
if (!last)
3000cb94: e3540000 cmp r4, #0
3000cb98: 0a000007 beq 3000cbbc <rtems_mkdir+0xb8>
3000cb9c: e3a04001 mov r4, #1
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
3000cba0: e1a00006 mov r0, r6
3000cba4: ebffda0e bl 300033e4 <free>
}
return success != 0 ? 0 : -1;
3000cba8: e3540000 cmp r4, #0
3000cbac: 13a00000 movne r0, #0
3000cbb0: 0a00002e beq 3000cc70 <rtems_mkdir+0x16c>
}
3000cbb4: e28dd048 add sp, sp, #72 ; 0x48
3000cbb8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
retval = 0;
break;
}
}
if (!last)
*p = '/';
3000cbbc: e5c58000 strb r8, [r5]
3000cbc0: e3a02000 mov r2, #0
3000cbc4: e5f53001 ldrb r3, [r5, #1]!
3000cbc8: eaffffdd b 3000cb44 <rtems_mkdir+0x40>
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
3000cbcc: e1a00007 mov r0, r7
3000cbd0: eb00005c bl 3000cd48 <umask>
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
3000cbd4: e1a0100a mov r1, sl
3000cbd8: e1a00006 mov r0, r6
3000cbdc: ebffdbdc bl 30003b54 <mkdir>
3000cbe0: e3500000 cmp r0, #0
3000cbe4: aaffffea bge 3000cb94 <rtems_mkdir+0x90>
if (errno == EEXIST || errno == EISDIR) {
3000cbe8: eb000630 bl 3000e4b0 <__errno>
3000cbec: e5903000 ldr r3, [r0]
3000cbf0: e3530011 cmp r3, #17
3000cbf4: 0a000003 beq 3000cc08 <rtems_mkdir+0x104>
3000cbf8: eb00062c bl 3000e4b0 <__errno> <== NOT EXECUTED
3000cbfc: e5903000 ldr r3, [r0] <== NOT EXECUTED
3000cc00: e3530015 cmp r3, #21 <== NOT EXECUTED
3000cc04: 1a000024 bne 3000cc9c <rtems_mkdir+0x198> <== NOT EXECUTED
if (stat(path, &sb) < 0) {
3000cc08: e1a00006 mov r0, r6
3000cc0c: e1a0100d mov r1, sp
3000cc10: eb000025 bl 3000ccac <stat>
3000cc14: e3500000 cmp r0, #0
3000cc18: ba00001f blt 3000cc9c <rtems_mkdir+0x198>
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
3000cc1c: e59d300c ldr r3, [sp, #12]
3000cc20: e2033a0f and r3, r3, #61440 ; 0xf000
3000cc24: e3530901 cmp r3, #16384 ; 0x4000
3000cc28: 1a000012 bne 3000cc78 <rtems_mkdir+0x174>
else
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
3000cc2c: e3540000 cmp r4, #0
3000cc30: 0affffe1 beq 3000cbbc <rtems_mkdir+0xb8>
retval = 2;
3000cc34: e3a04002 mov r4, #2
3000cc38: eaffffd8 b 3000cba0 <rtems_mkdir+0x9c>
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
3000cc3c: e3a00000 mov r0, #0
3000cc40: eb000040 bl 3000cd48 <umask>
3000cc44: e1a07000 mov r7, r0
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
3000cc48: e3c000c0 bic r0, r0, #192 ; 0xc0
3000cc4c: eb00003d bl 3000cd48 <umask>
3000cc50: eaffffc8 b 3000cb78 <rtems_mkdir+0x74>
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
3000cc54: eb000615 bl 3000e4b0 <__errno> <== NOT EXECUTED
3000cc58: e3a03014 mov r3, #20 <== NOT EXECUTED
3000cc5c: e5803000 str r3, [r0] <== NOT EXECUTED
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
3000cc60: e1a00007 mov r0, r7 <== NOT EXECUTED
3000cc64: eb000037 bl 3000cd48 <umask> <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
3000cc68: e1a00006 mov r0, r6 <== NOT EXECUTED
3000cc6c: ebffd9dc bl 300033e4 <free> <== NOT EXECUTED
}
return success != 0 ? 0 : -1;
3000cc70: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000cc74: eaffffce b 3000cbb4 <rtems_mkdir+0xb0> <== NOT EXECUTED
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
3000cc78: e3540000 cmp r4, #0
3000cc7c: 0afffff4 beq 3000cc54 <rtems_mkdir+0x150>
errno = EEXIST;
3000cc80: eb00060a bl 3000e4b0 <__errno>
3000cc84: e3a03011 mov r3, #17
3000cc88: e5803000 str r3, [r0]
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
3000cc8c: e1a00006 mov r0, r6
3000cc90: ebffd9d3 bl 300033e4 <free>
}
return success != 0 ? 0 : -1;
3000cc94: e3e00000 mvn r0, #0
3000cc98: eaffffc5 b 3000cbb4 <rtems_mkdir+0xb0>
}
}
if (!last)
*p = '/';
}
if (!first && !last)
3000cc9c: e3540000 cmp r4, #0 <== NOT EXECUTED
3000cca0: 0affffee beq 3000cc60 <rtems_mkdir+0x15c> <== NOT EXECUTED
3000cca4: eaffffef b 3000cc68 <rtems_mkdir+0x164> <== NOT EXECUTED
30001c6c <rtems_print_buffer>:
void rtems_print_buffer(
const unsigned char *buffer,
int length
)
{
30001c6c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
int i, mod, max;
if ( !length ) return;
30001c70: e3510000 cmp r1, #0
void rtems_print_buffer(
const unsigned char *buffer,
int length
)
{
30001c74: e24dd078 sub sp, sp, #120 ; 0x78
30001c78: e1a0b000 mov fp, r0
int i, mod, max;
if ( !length ) return;
30001c7c: 0a000037 beq 30001d60 <rtems_print_buffer+0xf4>
mod = length % 16;
30001c80: e1a03fc1 asr r3, r1, #31
30001c84: e1a03e23 lsr r3, r3, #28
30001c88: e081a003 add sl, r1, r3
30001c8c: e20aa00f and sl, sl, #15
30001c90: e063a00a rsb sl, r3, sl
max = length - mod;
30001c94: e06a9001 rsb r9, sl, r1
for ( i=0 ; i<max ; i+=16 )
30001c98: e3590000 cmp r9, #0
30001c9c: da00002d ble 30001d58 <rtems_print_buffer+0xec>
30001ca0: e59f71f4 ldr r7, [pc, #500] ; 30001e9c <rtems_print_buffer+0x230>
30001ca4: e3a08000 mov r8, #0
30001ca8: e1a0400d mov r4, sp
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
30001cac: e3a03000 mov r3, #0
static inline void Dump_Line(
const unsigned char *buffer,
int length
);
void rtems_print_buffer(
30001cb0: e08b6008 add r6, fp, r8
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
30001cb4: e5cd3000 strb r3, [sp]
for( i=0 ; i<length ; i++ )
30001cb8: e3a05000 mov r5, #0
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
30001cbc: e7d63005 ldrb r3, [r6, r5]
30001cc0: e1a0000d mov r0, sp
30001cc4: e59f11d4 ldr r1, [pc, #468] ; 30001ea0 <rtems_print_buffer+0x234>
30001cc8: e1a0200d mov r2, sp
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
30001ccc: e2855001 add r5, r5, #1
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
30001cd0: eb003117 bl 3000e134 <sprintf>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
30001cd4: e3550010 cmp r5, #16
30001cd8: 1afffff7 bne 30001cbc <rtems_print_buffer+0x50>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
30001cdc: e1a0000d mov r0, sp
30001ce0: eb00324a bl 3000e610 <strlen>
30001ce4: e59f11b8 ldr r1, [pc, #440] ; 30001ea4 <rtems_print_buffer+0x238>
30001ce8: e0840000 add r0, r4, r0
30001cec: e3a02002 mov r2, #2
30001cf0: eb003078 bl 3000ded8 <memcpy>
for( i=0 ; i<length ; i++ )
30001cf4: e3a05000 mov r5, #0
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
30001cf8: e7d63005 ldrb r3, [r6, r5]
30001cfc: e5972000 ldr r2, [r7]
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
30001d00: e1a0000d mov r0, sp
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
30001d04: e0822003 add r2, r2, r3
30001d08: e5d22001 ldrb r2, [r2, #1]
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
30001d0c: e59f1194 ldr r1, [pc, #404] ; 30001ea8 <rtems_print_buffer+0x23c>
30001d10: e3120097 tst r2, #151 ; 0x97
30001d14: 03a0302e moveq r3, #46 ; 0x2e
30001d18: e1a0200d mov r2, sp
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
30001d1c: e2855001 add r5, r5, #1
sprintf( line_buffer, "%s%c", line_buffer,
30001d20: eb003103 bl 3000e134 <sprintf>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
30001d24: e3550010 cmp r5, #16
30001d28: 1afffff2 bne 30001cf8 <rtems_print_buffer+0x8c>
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
30001d2c: e1a0000d mov r0, sp
30001d30: eb003236 bl 3000e610 <strlen>
30001d34: e59f1170 ldr r1, [pc, #368] ; 30001eac <rtems_print_buffer+0x240>
30001d38: e3a02003 mov r2, #3
30001d3c: e0840000 add r0, r4, r0
30001d40: eb003064 bl 3000ded8 <memcpy>
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
30001d44: e2888010 add r8, r8, #16
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
printk( line_buffer );
30001d48: e1a0000d mov r0, sp
30001d4c: eb00073d bl 30003a48 <printk>
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
30001d50: e1590008 cmp r9, r8
30001d54: caffffd4 bgt 30001cac <rtems_print_buffer+0x40>
Dump_Line( &buffer[ i ], 16 );
if ( mod )
30001d58: e35a0000 cmp sl, #0
30001d5c: 1a000001 bne 30001d68 <rtems_print_buffer+0xfc>
Dump_Line( &buffer[ max ], mod );
}
30001d60: e28dd078 add sp, sp, #120 ; 0x78
30001d64: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
30001d68: e3a05000 mov r5, #0
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
30001d6c: e08b9009 add r9, fp, r9
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
30001d70: e5cd5000 strb r5, [sp]
30001d74: d1a0400d movle r4, sp
for( i=0 ; i<length ; i++ )
30001d78: da00000b ble 30001dac <rtems_print_buffer+0x140>
30001d7c: e1a0400d mov r4, sp
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
30001d80: e7d93005 ldrb r3, [r9, r5]
30001d84: e1a0000d mov r0, sp
30001d88: e59f1110 ldr r1, [pc, #272] ; 30001ea0 <rtems_print_buffer+0x234>
30001d8c: e1a0200d mov r2, sp
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
30001d90: e2855001 add r5, r5, #1
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
30001d94: eb0030e6 bl 3000e134 <sprintf>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
30001d98: e15a0005 cmp sl, r5
30001d9c: cafffff7 bgt 30001d80 <rtems_print_buffer+0x114>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
30001da0: e35a000f cmp sl, #15
30001da4: d1a0500a movle r5, sl
30001da8: ca000034 bgt 30001e80 <rtems_print_buffer+0x214>
strcat( line_buffer, " " );
30001dac: e1a0000d mov r0, sp
30001db0: eb003216 bl 3000e610 <strlen>
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
30001db4: e2855001 add r5, r5, #1
strcat( line_buffer, " " );
30001db8: e59f10f0 ldr r1, [pc, #240] ; 30001eb0 <rtems_print_buffer+0x244>
30001dbc: e0840000 add r0, r4, r0
30001dc0: e3a02004 mov r2, #4
30001dc4: eb003043 bl 3000ded8 <memcpy>
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
30001dc8: e355000f cmp r5, #15
30001dcc: dafffff6 ble 30001dac <rtems_print_buffer+0x140>
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
30001dd0: e1a0000d mov r0, sp
30001dd4: eb00320d bl 3000e610 <strlen>
30001dd8: e59f10c4 ldr r1, [pc, #196] ; 30001ea4 <rtems_print_buffer+0x238>
30001ddc: e0840000 add r0, r4, r0
30001de0: e3a02002 mov r2, #2
30001de4: eb00303b bl 3000ded8 <memcpy>
for( i=0 ; i<length ; i++ )
30001de8: e35a0000 cmp sl, #0
30001dec: d3a0a000 movle sl, #0
30001df0: da000010 ble 30001e38 <rtems_print_buffer+0x1cc>
30001df4: e59f70a0 ldr r7, [pc, #160] ; 30001e9c <rtems_print_buffer+0x230>
30001df8: e3a05000 mov r5, #0
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
30001dfc: e7d93005 ldrb r3, [r9, r5]
30001e00: e5972000 ldr r2, [r7]
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
30001e04: e1a0000d mov r0, sp
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
30001e08: e0822003 add r2, r2, r3
30001e0c: e5d22001 ldrb r2, [r2, #1]
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
30001e10: e59f1090 ldr r1, [pc, #144] ; 30001ea8 <rtems_print_buffer+0x23c>
30001e14: e3120097 tst r2, #151 ; 0x97
30001e18: 03a0302e moveq r3, #46 ; 0x2e
30001e1c: e1a0200d mov r2, sp
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
30001e20: e2855001 add r5, r5, #1
sprintf( line_buffer, "%s%c", line_buffer,
30001e24: eb0030c2 bl 3000e134 <sprintf>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
30001e28: e15a0005 cmp sl, r5
30001e2c: cafffff2 bgt 30001dfc <rtems_print_buffer+0x190>
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
30001e30: e35a000f cmp sl, #15
30001e34: ca000008 bgt 30001e5c <rtems_print_buffer+0x1f0>
strcat( line_buffer, " " );
30001e38: e1a0000d mov r0, sp
30001e3c: eb0031f3 bl 3000e610 <strlen>
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
30001e40: e28aa001 add sl, sl, #1
strcat( line_buffer, " " );
30001e44: e59f1068 ldr r1, [pc, #104] ; 30001eb4 <rtems_print_buffer+0x248>
30001e48: e0840000 add r0, r4, r0
30001e4c: e3a02002 mov r2, #2
30001e50: eb003020 bl 3000ded8 <memcpy>
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
30001e54: e35a000f cmp sl, #15
30001e58: dafffff6 ble 30001e38 <rtems_print_buffer+0x1cc>
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
30001e5c: e1a0000d mov r0, sp
30001e60: eb0031ea bl 3000e610 <strlen>
30001e64: e59f1040 ldr r1, [pc, #64] ; 30001eac <rtems_print_buffer+0x240>
30001e68: e0840000 add r0, r4, r0
30001e6c: e3a02003 mov r2, #3
30001e70: eb003018 bl 3000ded8 <memcpy>
printk( line_buffer );
30001e74: e1a0000d mov r0, sp
30001e78: eb0006f2 bl 30003a48 <printk>
30001e7c: eaffffb7 b 30001d60 <rtems_print_buffer+0xf4>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
30001e80: e1a0000d mov r0, sp <== NOT EXECUTED
30001e84: eb0031e1 bl 3000e610 <strlen> <== NOT EXECUTED
30001e88: e59f1014 ldr r1, [pc, #20] ; 30001ea4 <rtems_print_buffer+0x238><== NOT EXECUTED
30001e8c: e0840000 add r0, r4, r0 <== NOT EXECUTED
30001e90: e3a02002 mov r2, #2 <== NOT EXECUTED
30001e94: eb00300f bl 3000ded8 <memcpy> <== NOT EXECUTED
30001e98: eaffffd5 b 30001df4 <rtems_print_buffer+0x188> <== NOT EXECUTED
300018a4 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
300018a4: e92d4800 push {fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
300018a8: e59f3034 ldr r3, [pc, #52] ; 300018e4 <rtems_stack_checker_is_blown+0x40>
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
300018ac: e28db004 add fp, sp, #4
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
300018b0: e5931004 ldr r1, [r3, #4]
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
300018b4: e59120c4 ldr r2, [r1, #196] ; 0xc4
300018b8: e15b0002 cmp fp, r2
300018bc: 3a000003 bcc 300018d0 <rtems_stack_checker_is_blown+0x2c>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
300018c0: e59110c0 ldr r1, [r1, #192] ; 0xc0
300018c4: e0822001 add r2, r2, r1
300018c8: e15b0002 cmp fp, r2
300018cc: 9a000002 bls 300018dc <rtems_stack_checker_is_blown+0x38>
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
300018d0: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
300018d4: e3a01001 mov r1, #1 <== NOT EXECUTED
300018d8: ebffffaa bl 30001788 <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
300018dc: e3a00000 mov r0, #0
300018e0: e8bd8800 pop {fp, pc}
30001948 <rtems_stack_checker_report_usage>:
}
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
30001948: e59f1004 ldr r1, [pc, #4] ; 30001954 <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED
3000194c: e3a00000 mov r0, #0 <== NOT EXECUTED
30001950: eaffffe4 b 300018e8 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
300018e8 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
300018e8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
if ( !print )
300018ec: e2515000 subs r5, r1, #0 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
300018f0: e1a06000 mov r6, r0 <== NOT EXECUTED
if ( !print )
300018f4: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return;
print_context = context;
300018f8: e59f4038 ldr r4, [pc, #56] ; 30001938 <rtems_stack_checker_report_usage_with_plugin+0x50><== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
300018fc: e59f1038 ldr r1, [pc, #56] ; 3000193c <rtems_stack_checker_report_usage_with_plugin+0x54><== NOT EXECUTED
)
{
if ( !print )
return;
print_context = context;
30001900: e5840004 str r0, [r4, #4] <== NOT EXECUTED
print_handler = print;
30001904: e5845000 str r5, [r4] <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
30001908: e1a0e00f mov lr, pc <== NOT EXECUTED
3000190c: e12fff15 bx r5 <== NOT EXECUTED
(*print)( context,
30001910: e59f1028 ldr r1, [pc, #40] ; 30001940 <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED
30001914: e1a00006 mov r0, r6 <== NOT EXECUTED
30001918: e1a0e00f mov lr, pc <== NOT EXECUTED
3000191c: e12fff15 bx r5 <== NOT EXECUTED
" ID NAME LOW HIGH CURRENT AVAILABLE USED\n"
);
/* iterate over all threads and dump the usage */
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
30001920: e59f001c ldr r0, [pc, #28] ; 30001944 <rtems_stack_checker_report_usage_with_plugin+0x5c><== NOT EXECUTED
30001924: eb0014d6 bl 30006c84 <rtems_iterate_over_all_threads> <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
#endif
print_context = NULL;
30001928: e3a03000 mov r3, #0 <== NOT EXECUTED
3000192c: e5843004 str r3, [r4, #4] <== NOT EXECUTED
print_handler = NULL;
30001930: e5843000 str r3, [r4] <== NOT EXECUTED
30001934: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
3000183c <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
3000183c: e92d4810 push {r4, fp, lr}
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
30001840: e59030c4 ldr r3, [r0, #196] ; 0xc4
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
30001844: e28db008 add fp, sp, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30001848: e15b0003 cmp fp, r3
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
3000184c: e1a04000 mov r4, r0
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
30001850: e2830008 add r0, r3, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30001854: 3a000003 bcc 30001868 <rtems_stack_checker_switch_extension+0x2c>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
30001858: e59420c0 ldr r2, [r4, #192] ; 0xc0
3000185c: e0833002 add r3, r3, r2
30001860: e15b0003 cmp fp, r3
30001864: 9a000006 bls 30001884 <rtems_stack_checker_switch_extension+0x48>
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
30001868: e59f1030 ldr r1, [pc, #48] ; 300018a0 <rtems_stack_checker_switch_extension+0x64><== NOT EXECUTED
3000186c: e3a02010 mov r2, #16 <== NOT EXECUTED
30001870: eb003015 bl 3000d8cc <memcmp> <== NOT EXECUTED
30001874: e2701001 rsbs r1, r0, #1 <== NOT EXECUTED
30001878: 33a01000 movcc r1, #0 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
3000187c: e1a00004 mov r0, r4 <== NOT EXECUTED
30001880: ebffffc0 bl 30001788 <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
30001884: e59f1014 ldr r1, [pc, #20] ; 300018a0 <rtems_stack_checker_switch_extension+0x64>
30001888: e3a02010 mov r2, #16
3000188c: eb00300e bl 3000d8cc <memcmp>
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
30001890: e3500000 cmp r0, #0
30001894: 08bd8810 popeq {r4, fp, pc}
30001898: e3a01000 mov r1, #0 <== NOT EXECUTED
3000189c: eafffff6 b 3000187c <rtems_stack_checker_switch_extension+0x40><== NOT EXECUTED
3000bf70 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
3000bf70: e92d40f0 push {r4, r5, r6, r7, lr}
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
3000bf74: e2515000 subs r5, r1, #0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
3000bf78: e1a04000 mov r4, r0
3000bf7c: e24dd004 sub sp, sp, #4
3000bf80: e1a06002 mov r6, r2
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
3000bf84: 03a00009 moveq r0, #9
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
3000bf88: 0a000013 beq 3000bfdc <rtems_string_to_pointer+0x6c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
3000bf8c: eb000856 bl 3000e0ec <__errno>
3000bf90: e3a03000 mov r3, #0
3000bf94: 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 );
3000bf98: e1a0100d mov r1, sp
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
3000bf9c: e5853000 str r3, [r5]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
3000bfa0: e1a00004 mov r0, r4
3000bfa4: e3a02010 mov r2, #16
3000bfa8: eb0015dc bl 30011720 <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 )
3000bfac: e3560000 cmp r6, #0
*endptr = end;
3000bfb0: 159d3000 ldrne r3, [sp]
#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 )
3000bfb4: 059d3000 ldreq r3, [sp]
*endptr = end;
3000bfb8: 15863000 strne r3, [r6]
/* nothing was converted */
if ( end == s )
3000bfbc: e1540003 cmp r4, r3
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
3000bfc0: e1a07000 mov r7, r0
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
3000bfc4: 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 )
3000bfc8: 0a000003 beq 3000bfdc <rtems_string_to_pointer+0x6c>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
3000bfcc: e3770001 cmn r7, #1
3000bfd0: 0a000003 beq 3000bfe4 <rtems_string_to_pointer+0x74>
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
3000bfd4: e5857000 str r7, [r5]
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
3000bfd8: e3a00000 mov r0, #0
}
3000bfdc: e28dd004 add sp, sp, #4
3000bfe0: e8bd80f0 pop {r4, r5, r6, r7, pc}
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
3000bfe4: eb000840 bl 3000e0ec <__errno> <== NOT EXECUTED
3000bfe8: e5903000 ldr r3, [r0] <== NOT EXECUTED
3000bfec: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
3000bff0: 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))
3000bff4: 1afffff6 bne 3000bfd4 <rtems_string_to_pointer+0x64> <== NOT EXECUTED
3000bff8: eafffff7 b 3000bfdc <rtems_string_to_pointer+0x6c> <== NOT EXECUTED
30001b50 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
30001b50: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30001b54: e24ddf6a sub sp, sp, #424 ; 0x1a8
30001b58: e1a06001 mov r6, r1
30001b5c: e1a07002 mov r7, r2
30001b60: e58d0014 str r0, [sp, #20]
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
30001b64: eb003ca5 bl 30010e00 <strlen>
30001b68: e28d2e19 add r2, sp, #400 ; 0x190
30001b6c: e1a01000 mov r1, r0
30001b70: e58d2008 str r2, [sp, #8]
30001b74: e59d0014 ldr r0, [sp, #20]
30001b78: e3a02000 mov r2, #0
30001b7c: e28d3e19 add r3, sp, #400 ; 0x190
30001b80: e58d2000 str r2, [sp]
30001b84: eb0002d7 bl 300026e8 <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
30001b88: e3500000 cmp r0, #0
return -1;
30001b8c: 13e02000 mvnne r2, #0
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
30001b90: e58d0010 str r0, [sp, #16]
return -1;
30001b94: 158d2010 strne r2, [sp, #16]
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
30001b98: 1a000032 bne 30001c68 <rtems_tarfs_load+0x118>
return -1;
if (root_loc.ops != &IMFS_ops
30001b9c: e59d319c ldr r3, [sp, #412] ; 0x19c
30001ba0: e59f21d0 ldr r2, [pc, #464] ; 30001d78 <rtems_tarfs_load+0x228>
30001ba4: e1530002 cmp r3, r2
30001ba8: 059da010 ldreq sl, [sp, #16]
30001bac: 1a00006a bne 30001d5c <rtems_tarfs_load+0x20c>
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
30001bb0: e28a4c02 add r4, sl, #512 ; 0x200
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001bb4: e28d3f5f add r3, sp, #380 ; 0x17c
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
30001bb8: e1540007 cmp r4, r7
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
30001bbc: e28d5f46 add r5, sp, #280 ; 0x118
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001bc0: e58d3004 str r3, [sp, #4]
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
30001bc4: 8a000027 bhi 30001c68 <rtems_tarfs_load+0x118>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
30001bc8: e086a00a add sl, r6, sl
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
30001bcc: e28a0c01 add r0, sl, #256 ; 0x100
30001bd0: e2800001 add r0, r0, #1
30001bd4: e59f11a0 ldr r1, [pc, #416] ; 30001d7c <rtems_tarfs_load+0x22c>
30001bd8: e3a02007 mov r2, #7
30001bdc: eb003c9f bl 30010e60 <strncmp>
30001be0: e2508000 subs r8, r0, #0
30001be4: 1a00001f bne 30001c68 <rtems_tarfs_load+0x118>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
30001be8: e3a02063 mov r2, #99 ; 0x63
30001bec: e1a0100a mov r1, sl
30001bf0: e1a00005 mov r0, r5
30001bf4: eb003cf5 bl 30010fd0 <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
30001bf8: e5cd817b strb r8, [sp, #379] ; 0x17b
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
30001bfc: e3a01008 mov r1, #8
30001c00: e28a0064 add r0, sl, #100 ; 0x64
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
30001c04: e5dab09c ldrb fp, [sl, #156] ; 0x9c
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
30001c08: eb001ffc bl 30009c00 <_rtems_octal2ulong>
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
30001c0c: 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);
30001c10: e1a09000 mov r9, r0
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
30001c14: e28a007c add r0, sl, #124 ; 0x7c
30001c18: eb001ff8 bl 30009c00 <_rtems_octal2ulong>
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
30001c1c: 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);
30001c20: e1a08000 mov r8, r0
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
30001c24: e28a0094 add r0, sl, #148 ; 0x94
30001c28: eb001ff4 bl 30009c00 <_rtems_octal2ulong>
30001c2c: e1a03000 mov r3, r0
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
30001c30: e1a0000a mov r0, sl
30001c34: e58d300c str r3, [sp, #12]
30001c38: eb0020fd bl 3000a034 <_rtems_tar_header_checksum>
30001c3c: e59d300c ldr r3, [sp, #12]
30001c40: e1500003 cmp r0, r3
30001c44: 1a000007 bne 30001c68 <rtems_tarfs_load+0x118>
* 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) {
30001c48: e35b0035 cmp fp, #53 ; 0x35
30001c4c: 0a00001a beq 30001cbc <rtems_tarfs_load+0x16c>
* 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) {
30001c50: e35b0030 cmp fp, #48 ; 0x30
30001c54: 0a000006 beq 30001c74 <rtems_tarfs_load+0x124>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
30001c58: e1a0a004 mov sl, r4
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
30001c5c: e28a4c02 add r4, sl, #512 ; 0x200
30001c60: e1540007 cmp r4, r7
30001c64: 9affffd7 bls 30001bc8 <rtems_tarfs_load+0x78>
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
30001c68: e59d0010 ldr r0, [sp, #16]
30001c6c: e28ddf6a add sp, sp, #424 ; 0x1a8
30001c70: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001c74: e59dc008 ldr ip, [sp, #8]
30001c78: e59de004 ldr lr, [sp, #4]
30001c7c: e8bc000f ldm ip!, {r0, r1, r2, r3}
30001c80: e8ae000f stmia lr!, {r0, r1, r2, r3}
30001c84: e59cc000 ldr ip, [ip]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
30001c88: e1a00005 mov r0, r5
30001c8c: e28d1f5f add r1, sp, #380 ; 0x17c
30001c90: e28d2f69 add r2, sp, #420 ; 0x1a4
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001c94: e58ec000 str ip, [lr]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
30001c98: eb002314 bl 3000a8f0 <IMFS_evaluate_for_make>
30001c9c: e250a000 subs sl, r0, #0
30001ca0: 0a00001c beq 30001d18 <rtems_tarfs_load+0x1c8>
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
30001ca4: e2888f7f add r8, r8, #508 ; 0x1fc <== NOT EXECUTED
30001ca8: e2888003 add r8, r8, #3 <== NOT EXECUTED
30001cac: e1a084a8 lsr r8, r8, #9 <== NOT EXECUTED
offset += 512 * nblocks;
30001cb0: e0844488 add r4, r4, r8, lsl #9 <== NOT EXECUTED
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
30001cb4: e1a0a004 mov sl, r4
30001cb8: eaffffe7 b 30001c5c <rtems_tarfs_load+0x10c>
* - 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);
30001cbc: e59d1014 ldr r1, [sp, #20]
30001cc0: e28d0018 add r0, sp, #24
30001cc4: eb003a89 bl 300106f0 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
30001cc8: e28d0018 add r0, sp, #24
30001ccc: eb003c4b bl 30010e00 <strlen>
30001cd0: e28def6a add lr, sp, #424 ; 0x1a8
30001cd4: e08e3000 add r3, lr, r0
30001cd8: e5533191 ldrb r3, [r3, #-401] ; 0x191
30001cdc: e353002f cmp r3, #47 ; 0x2f
30001ce0: 0a000004 beq 30001cf8 <rtems_tarfs_load+0x1a8>
strcat(full_filename, "/");
30001ce4: e28d2018 add r2, sp, #24 <== NOT EXECUTED
30001ce8: e0820000 add r0, r2, r0 <== NOT EXECUTED
30001cec: e59f108c ldr r1, [pc, #140] ; 30001d80 <rtems_tarfs_load+0x230><== NOT EXECUTED
30001cf0: e3a02002 mov r2, #2 <== NOT EXECUTED
30001cf4: eb003828 bl 3000fd9c <memcpy> <== NOT EXECUTED
strcat(full_filename, filename);
30001cf8: e1a01005 mov r1, r5
30001cfc: e28d0018 add r0, sp, #24
30001d00: eb0039c3 bl 30010414 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
30001d04: e28d0018 add r0, sp, #24
30001d08: e59f1074 ldr r1, [pc, #116] ; 30001d84 <rtems_tarfs_load+0x234>
30001d0c: eb0004e9 bl 300030b8 <mkdir>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
30001d10: e1a0a004 mov sl, r4
30001d14: eaffffd0 b 30001c5c <rtems_tarfs_load+0x10c>
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
30001d18: e1a03b89 lsl r3, r9, #23
30001d1c: 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(
30001d20: e3833902 orr r3, r3, #32768 ; 0x8000
30001d24: e3a01006 mov r1, #6
30001d28: e28d0f5f add r0, sp, #380 ; 0x17c
30001d2c: e59d21a4 ldr r2, [sp, #420] ; 0x1a4
30001d30: e58da000 str sl, [sp]
30001d34: eb002131 bl 3000a200 <IMFS_create_node>
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
30001d38: e5808050 str r8, [r0, #80] ; 0x50
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
30001d3c: e2888f7f add r8, r8, #508 ; 0x1fc
30001d40: e2888003 add r8, r8, #3
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];
30001d44: e0863004 add r3, r6, r4
}
nblocks = (((file_size) + 511) & ~511) / 512;
30001d48: e1a084a8 lsr r8, r8, #9
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
30001d4c: e580a054 str sl, [r0, #84] ; 0x54
node->info.linearfile.direct = &tar_image[offset];
30001d50: e5803058 str r3, [r0, #88] ; 0x58
}
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
30001d54: e0844488 add r4, r4, r8, lsl #9
30001d58: eaffffd5 b 30001cb4 <rtems_tarfs_load+0x164>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
30001d5c: e59f2024 ldr r2, [pc, #36] ; 30001d88 <rtems_tarfs_load+0x238><== NOT EXECUTED
30001d60: e1530002 cmp r3, r2 <== NOT EXECUTED
30001d64: 01a0a000 moveq sl, r0 <== NOT EXECUTED
30001d68: 0affff90 beq 30001bb0 <rtems_tarfs_load+0x60> <== NOT EXECUTED
return -1;
30001d6c: e3e03000 mvn r3, #0 <== NOT EXECUTED
30001d70: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
30001d74: eaffffbb b 30001c68 <rtems_tarfs_load+0x118> <== NOT EXECUTED
300036b4 <rtems_termios_bufsize>:
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
300036b4: e59f300c ldr r3, [pc, #12] ; 300036c8 <rtems_termios_bufsize+0x14><== NOT EXECUTED
300036b8: e5830008 str r0, [r3, #8] <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
300036bc: e8830006 stm r3, {r1, r2} <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
return RTEMS_SUCCESSFUL;
}
300036c0: e3a00000 mov r0, #0 <== NOT EXECUTED
300036c4: e12fff1e bx lr <== NOT EXECUTED
300034fc <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
300034fc: e92d4070 push {r4, r5, r6, lr}
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain(
30003500: e59f519c ldr r5, [pc, #412] ; 300036a4 <rtems_termios_close+0x1a8>
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003504: e5903000 ldr r3, [r0]
rtems_status_code sc;
sc = rtems_semaphore_obtain(
30003508: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
3000350c: e1a06000 mov r6, 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(
30003510: e1a02001 mov r2, r1
30003514: e5950000 ldr r0, [r5]
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003518: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain(
3000351c: eb00086f bl 300056e0 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
30003520: e3500000 cmp r0, #0
30003524: 1a00005d bne 300036a0 <rtems_termios_close+0x1a4>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
30003528: e5943008 ldr r3, [r4, #8]
3000352c: e2433001 sub r3, r3, #1
30003530: e3530000 cmp r3, #0
30003534: e5843008 str r3, [r4, #8]
30003538: 1a00002f bne 300035fc <rtems_termios_close+0x100>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
3000353c: e59420cc ldr r2, [r4, #204] ; 0xcc
30003540: e59f3160 ldr r3, [pc, #352] ; 300036a8 <rtems_termios_close+0x1ac>
30003544: e0833282 add r3, r3, r2, lsl #5
30003548: e5931004 ldr r1, [r3, #4]
3000354c: e3510000 cmp r1, #0
30003550: 0a00003e beq 30003650 <rtems_termios_close+0x154>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
30003554: e1a00004 mov r0, r4
30003558: e1a0e00f mov lr, pc
3000355c: e12fff11 bx r1
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30003560: e59430b4 ldr r3, [r4, #180] ; 0xb4
30003564: e3530002 cmp r3, #2
30003568: 0a000042 beq 30003678 <rtems_termios_close+0x17c>
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
3000356c: e594309c ldr r3, [r4, #156] ; 0x9c
30003570: e3530000 cmp r3, #0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
30003574: 1594000c ldrne r0, [r4, #12]
30003578: 15941010 ldrne r1, [r4, #16]
3000357c: 11a02006 movne r2, r6
30003580: 11a0e00f movne lr, pc
30003584: 112fff13 bxne r3
if (tty->forw == NULL) {
30003588: e5943000 ldr r3, [r4]
3000358c: e3530000 cmp r3, #0
30003590: 0a000026 beq 30003630 <rtems_termios_close+0x134>
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
30003594: e5942004 ldr r2, [r4, #4]
30003598: e5832004 str r2, [r3, #4]
3000359c: e5942004 ldr r2, [r4, #4]
}
if (tty->back == NULL) {
300035a0: e3520000 cmp r2, #0
300035a4: 0a00001b beq 30003618 <rtems_termios_close+0x11c>
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
300035a8: e5823000 str r3, [r2] <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
300035ac: e5940014 ldr r0, [r4, #20]
300035b0: eb000821 bl 3000563c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
300035b4: e5940018 ldr r0, [r4, #24]
300035b8: eb00081f bl 3000563c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
300035bc: e594008c ldr r0, [r4, #140] ; 0x8c
300035c0: eb00081d bl 3000563c <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
300035c4: e59430a0 ldr r3, [r4, #160] ; 0xa0
300035c8: e3530000 cmp r3, #0
300035cc: 0a00000e beq 3000360c <rtems_termios_close+0x110>
300035d0: e59430b4 ldr r3, [r4, #180] ; 0xb4
300035d4: e3530002 cmp r3, #2
300035d8: 0a00000b beq 3000360c <rtems_termios_close+0x110>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
300035dc: e5940058 ldr r0, [r4, #88] ; 0x58
300035e0: ebfffab0 bl 300020a8 <free>
free (tty->rawOutBuf.theBuf);
300035e4: e594007c ldr r0, [r4, #124] ; 0x7c
300035e8: ebfffaae bl 300020a8 <free>
free (tty->cbuf);
300035ec: e594001c ldr r0, [r4, #28]
300035f0: ebfffaac bl 300020a8 <free>
free (tty);
300035f4: e1a00004 mov r0, r4
300035f8: ebfffaaa bl 300020a8 <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
300035fc: e5950000 ldr r0, [r5]
30003600: eb00087f bl 30005804 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
30003604: e3a00000 mov r0, #0
30003608: e8bd8070 pop {r4, r5, r6, pc}
rtems_semaphore_delete (tty->isem);
rtems_semaphore_delete (tty->osem);
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
3000360c: e5940068 ldr r0, [r4, #104] ; 0x68
30003610: eb000809 bl 3000563c <rtems_semaphore_delete>
30003614: eafffff0 b 300035dc <rtems_termios_close+0xe0>
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
30003618: e59f208c ldr r2, [pc, #140] ; 300036ac <rtems_termios_close+0x1b0>
if ( rtems_termios_ttyHead != NULL ) {
3000361c: e3530000 cmp r3, #0
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
30003620: e5823000 str r3, [r2]
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
30003624: 13a02000 movne r2, #0
30003628: 15832004 strne r2, [r3, #4]
3000362c: eaffffde b 300035ac <rtems_termios_close+0xb0>
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;
30003630: e5942004 ldr r2, [r4, #4]
30003634: e59f1074 ldr r1, [pc, #116] ; 300036b0 <rtems_termios_close+0x1b4>
if ( rtems_termios_ttyTail != NULL ) {
30003638: e3520000 cmp r2, #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;
3000363c: e5812000 str r2, [r1]
if ( rtems_termios_ttyTail != NULL ) {
30003640: 0afffff4 beq 30003618 <rtems_termios_close+0x11c>
rtems_termios_ttyTail->forw = NULL;
30003644: e5823000 str r3, [r2] <== NOT EXECUTED
30003648: e5943000 ldr r3, [r4] <== NOT EXECUTED
3000364c: eaffffd5 b 300035a8 <rtems_termios_close+0xac> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003650: e5940018 ldr r0, [r4, #24]
30003654: e1a02001 mov r2, r1
30003658: eb000820 bl 300056e0 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
3000365c: e3500000 cmp r0, #0
30003660: 1a00000e bne 300036a0 <rtems_termios_close+0x1a4>
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
30003664: e1a00004 mov r0, r4
30003668: ebfffe57 bl 30002fcc <drainOutput>
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
3000366c: e59430b4 ldr r3, [r4, #180] ; 0xb4
30003670: e3530002 cmp r3, #2
30003674: 1affffbc bne 3000356c <rtems_termios_close+0x70>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
30003678: e59400c4 ldr r0, [r4, #196] ; 0xc4
3000367c: e3a01001 mov r1, #1
30003680: eb0006f3 bl 30005254 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
30003684: e3500000 cmp r0, #0
30003688: 1a000004 bne 300036a0 <rtems_termios_close+0x1a4>
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
3000368c: e59400c8 ldr r0, [r4, #200] ; 0xc8
30003690: e3a01001 mov r1, #1
30003694: eb0006ee bl 30005254 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
30003698: e3500000 cmp r0, #0
3000369c: 0affffb2 beq 3000356c <rtems_termios_close+0x70>
rtems_fatal_error_occurred (sc);
300036a0: eb0009b1 bl 30005d6c <rtems_fatal_error_occurred> <== NOT EXECUTED
30004c64 <rtems_termios_dequeue_characters>:
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
30004c64: e590c090 ldr ip, [r0, #144] ; 0x90
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30004c68: e59020b4 ldr r2, [r0, #180] ; 0xb4
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
30004c6c: e08c1001 add r1, ip, r1
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30004c70: e3520002 cmp r2, #2
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
30004c74: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
30004c78: e5801090 str r1, [r0, #144] ; 0x90
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30004c7c: 0a00000c beq 30004cb4 <rtems_termios_dequeue_characters+0x50>
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
30004c80: e59030cc ldr r3, [r0, #204] ; 0xcc
30004c84: e3530005 cmp r3, #5
30004c88: 0a000001 beq 30004c94 <rtems_termios_dequeue_characters+0x30>
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
30004c8c: 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);
30004c90: eaffff55 b 300049ec <rtems_termios_refill_transmitter>
if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
30004c94: e59f303c ldr r3, [pc, #60] ; 30004cd8 <rtems_termios_dequeue_characters+0x74>
30004c98: e59330b4 ldr r3, [r3, #180] ; 0xb4
30004c9c: e3530000 cmp r3, #0
30004ca0: 0a00000a beq 30004cd0 <rtems_termios_dequeue_characters+0x6c>
rtems_termios_linesw[tty->t_line].l_start(tty);
30004ca4: e1a0e00f mov lr, pc
30004ca8: e12fff13 bx r3
}
return 0; /* nothing to output in IRQ... */
30004cac: e3a00000 mov r0, #0
30004cb0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
30004cb4: e59000c8 ldr r0, [r0, #200] ; 0xc8
30004cb8: e1a01002 mov r1, r2
30004cbc: eb000164 bl 30005254 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
30004cc0: e2503000 subs r3, r0, #0
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
30004cc4: 01a00003 moveq r0, r3
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
30004cc8: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
rtems_fatal_error_occurred (sc);
30004ccc: eb000426 bl 30005d6c <rtems_fatal_error_occurred> <== NOT EXECUTED
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
30004cd0: e1a00003 mov r0, r3 <== NOT EXECUTED
}
return rtems_termios_refill_transmitter(tty);
}
30004cd4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30004674 <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)
{
30004674: e92d4ff0 push {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) {
30004678: e59030cc ldr r3, [r0, #204] ; 0xcc
3000467c: e59f72d4 ldr r7, [pc, #724] ; 30004958 <rtems_termios_enqueue_raw_characters+0x2e4>
* 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)
{
30004680: e24dd008 sub sp, sp, #8
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) {
30004684: e0873283 add r3, r7, r3, lsl #5
30004688: e5939010 ldr r9, [r3, #16]
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
3000468c: e1a04000 mov r4, r0
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
30004690: e3590000 cmp r9, #0
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
30004694: e1a05001 mov r5, 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) {
30004698: 0a00001d beq 30004714 <rtems_termios_enqueue_raw_characters+0xa0>
while (len--) {
3000469c: e3520000 cmp r2, #0
300046a0: 0a00000a beq 300046d0 <rtems_termios_enqueue_raw_characters+0x5c>
300046a4: e1a06002 mov r6, r2
300046a8: ea000002 b 300046b8 <rtems_termios_enqueue_raw_characters+0x44>
300046ac: e59430cc ldr r3, [r4, #204] ; 0xcc
300046b0: e0873283 add r3, r7, r3, lsl #5
300046b4: e5939010 ldr r9, [r3, #16]
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
300046b8: e4d50001 ldrb r0, [r5], #1
300046bc: e1a01004 mov r1, r4
300046c0: e1a0e00f mov lr, pc
300046c4: e12fff19 bx r9
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--) {
300046c8: e2566001 subs r6, r6, #1
300046cc: 1afffff6 bne 300046ac <rtems_termios_enqueue_raw_characters+0x38>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
300046d0: e594a0e4 ldr sl, [r4, #228] ; 0xe4
300046d4: e35a0000 cmp sl, #0
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
300046d8: 13a0a000 movne sl, #0
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
300046dc: 1a000009 bne 30004708 <rtems_termios_enqueue_raw_characters+0x94>
300046e0: e59430dc ldr r3, [r4, #220] ; 0xdc
300046e4: e3530000 cmp r3, #0
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
300046e8: 01a0a003 moveq sl, r3
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
300046ec: 0a000005 beq 30004708 <rtems_termios_enqueue_raw_characters+0x94>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
300046f0: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
300046f4: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
300046f8: e1a0e00f mov lr, pc <== NOT EXECUTED
300046fc: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
30004700: e3a03001 mov r3, #1 <== NOT EXECUTED
30004704: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
30004708: e1a0000a mov r0, sl
3000470c: e28dd008 add sp, sp, #8
30004710: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* 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);
30004714: e2803030 add r3, r0, #48 ; 0x30
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) {
30004718: e1a06002 mov r6, r2
/*
* 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);
3000471c: e58d3000 str r3, [sp]
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
30004720: e3560000 cmp r6, #0
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,
30004724: e280304a add r3, r0, #74 ; 0x4a
30004728: e58d3004 str r3, [sp, #4]
3000472c: e1a0b009 mov fp, r9
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
30004730: 0a000042 beq 30004840 <rtems_termios_enqueue_raw_characters+0x1cc>
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
30004734: e59430b8 ldr r3, [r4, #184] ; 0xb8
}
return 0;
}
while (len--) {
c = *buf++;
30004738: e4d58001 ldrb r8, [r5], #1
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
3000473c: e3130c02 tst r3, #512 ; 0x200
30004740: 0a000005 beq 3000475c <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]) {
30004744: e5d4304a ldrb r3, [r4, #74] ; 0x4a
30004748: e1530008 cmp r3, r8
3000474c: 0a000056 beq 300048ac <rtems_termios_enqueue_raw_characters+0x238>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
30004750: e5d43049 ldrb r3, [r4, #73] ; 0x49
30004754: e1530008 cmp r3, r8
30004758: 0a00003f beq 3000485c <rtems_termios_enqueue_raw_characters+0x1e8>
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
3000475c: e3590000 cmp r9, #0
30004760: 1a000041 bne 3000486c <rtems_termios_enqueue_raw_characters+0x1f8>
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
30004764: e5940060 ldr r0, [r4, #96] ; 0x60
30004768: e5941064 ldr r1, [r4, #100] ; 0x64
3000476c: e2800001 add r0, r0, #1
30004770: eb002f45 bl 3001048c <__umodsi3>
30004774: e1a07000 mov r7, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30004778: e10fa000 mrs sl, CPSR
3000477c: e38a3080 orr r3, sl, #128 ; 0x80
30004780: e129f003 msr CPSR_fc, r3
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
30004784: e594305c ldr r3, [r4, #92] ; 0x5c
30004788: e5940064 ldr r0, [r4, #100] ; 0x64
% tty->rawInBuf.Size) > tty->highwater) &&
3000478c: 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)
30004790: e0630000 rsb r0, r3, r0
% tty->rawInBuf.Size) > tty->highwater) &&
30004794: e0800007 add r0, r0, r7
30004798: eb002f3b bl 3001048c <__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)
3000479c: e59430c0 ldr r3, [r4, #192] ; 0xc0
300047a0: e1500003 cmp r0, r3
300047a4: 9a00000e bls 300047e4 <rtems_termios_enqueue_raw_characters+0x170>
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
300047a8: 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) &&
300047ac: e3130001 tst r3, #1 <== NOT EXECUTED
300047b0: 1a00000b bne 300047e4 <rtems_termios_enqueue_raw_characters+0x170><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
300047b4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
300047b8: e59f319c ldr r3, [pc, #412] ; 3000495c <rtems_termios_enqueue_raw_characters+0x2e8><== NOT EXECUTED
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
300047bc: e3822001 orr r2, r2, #1 <== NOT EXECUTED
300047c0: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
300047c4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
300047c8: e0023003 and r3, r2, r3 <== NOT EXECUTED
300047cc: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED
300047d0: 0a000047 beq 300048f4 <rtems_termios_enqueue_raw_characters+0x280><== NOT EXECUTED
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
300047d4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300047d8: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED
300047dc: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED
300047e0: 0a000052 beq 30004930 <rtems_termios_enqueue_raw_characters+0x2bc><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300047e4: e129f00a msr CPSR_fc, sl
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
300047e8: e594305c ldr r3, [r4, #92] ; 0x5c
300047ec: e1530007 cmp r3, r7
dropped++;
300047f0: 028bb001 addeq fp, fp, #1
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
300047f4: 0a00000e beq 30004834 <rtems_termios_enqueue_raw_characters+0x1c0>
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
300047f8: e5943058 ldr r3, [r4, #88] ; 0x58
300047fc: 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 )) {
30004800: e59430e4 ldr r3, [r4, #228] ; 0xe4
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
30004804: 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 )) {
30004808: e3530000 cmp r3, #0
3000480c: 1a000008 bne 30004834 <rtems_termios_enqueue_raw_characters+0x1c0>
30004810: e59430dc ldr r3, [r4, #220] ; 0xdc
30004814: e3530000 cmp r3, #0
30004818: 0a000005 beq 30004834 <rtems_termios_enqueue_raw_characters+0x1c0>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
3000481c: e59d0000 ldr r0, [sp] <== NOT EXECUTED
30004820: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
30004824: e1a0e00f mov lr, pc <== NOT EXECUTED
30004828: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
3000482c: e3a03001 mov r3, #1 <== NOT EXECUTED
30004830: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
30004834: e2466001 sub r6, r6, #1
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
30004838: e3560000 cmp r6, #0
3000483c: 1affffbc bne 30004734 <rtems_termios_enqueue_raw_characters+0xc0>
}
}
}
}
tty->rawInBufDropped += dropped;
30004840: e5943078 ldr r3, [r4, #120] ; 0x78
rtems_semaphore_release (tty->rawInBuf.Semaphore);
30004844: e5940068 ldr r0, [r4, #104] ; 0x68
}
}
}
}
tty->rawInBufDropped += dropped;
30004848: e083300b add r3, r3, fp
3000484c: e5843078 str r3, [r4, #120] ; 0x78
30004850: e1a0a00b mov sl, fp
rtems_semaphore_release (tty->rawInBuf.Semaphore);
30004854: eb0003ea bl 30005804 <rtems_semaphore_release>
return dropped;
30004858: eaffffaa b 30004708 <rtems_termios_enqueue_raw_characters+0x94>
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
3000485c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
30004860: e3a09001 mov r9, #1 <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
30004864: e3c33010 bic r3, r3, #16 <== NOT EXECUTED
30004868: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
3000486c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004870: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED
30004874: e3530020 cmp r3, #32 <== NOT EXECUTED
30004878: 1affffed bne 30004834 <rtems_termios_enqueue_raw_characters+0x1c0><== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000487c: e10f7000 mrs r7, CPSR <== NOT EXECUTED
30004880: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED
30004884: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
30004888: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3000488c: e5942094 ldr r2, [r4, #148] ; 0x94 <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
30004890: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30004894: e3520000 cmp r2, #0 <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
30004898: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3000489c: 1a00000c bne 300048d4 <rtems_termios_enqueue_raw_characters+0x260><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300048a0: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
/*
* 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);
tty->tty_rcvwakeup = 1;
300048a4: e2466001 sub r6, r6, #1 <== NOT EXECUTED
300048a8: eaffffe2 b 30004838 <rtems_termios_enqueue_raw_characters+0x1c4><== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
300048ac: e5d42049 ldrb r2, [r4, #73] ; 0x49 <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
300048b0: e3a09001 mov r9, #1 <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
300048b4: e1520003 cmp r2, r3 <== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
300048b8: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
300048bc: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
300048c0: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
300048c4: 13833010 orrne r3, r3, #16 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
300048c8: 058430b8 streq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
300048cc: 158430b8 strne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300048d0: eaffffe5 b 3000486c <rtems_termios_enqueue_raw_characters+0x1f8><== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
300048d4: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
300048d8: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
300048dc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
300048e0: e0811003 add r1, r1, r3 <== NOT EXECUTED
300048e4: e3a02001 mov r2, #1 <== NOT EXECUTED
300048e8: e1a0e00f mov lr, pc <== NOT EXECUTED
300048ec: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
300048f0: eaffffea b 300048a0 <rtems_termios_enqueue_raw_characters+0x22c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
300048f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300048f8: e3130020 tst r3, #32 <== NOT EXECUTED
300048fc: 1a000002 bne 3000490c <rtems_termios_enqueue_raw_characters+0x298><== NOT EXECUTED
30004900: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
30004904: e3530000 cmp r3, #0 <== NOT EXECUTED
30004908: 1affffb5 bne 300047e4 <rtems_termios_enqueue_raw_characters+0x170><== 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;
3000490c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
30004910: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
30004914: e3833002 orr r3, r3, #2 <== NOT EXECUTED
30004918: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
3000491c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
30004920: e3a02001 mov r2, #1 <== NOT EXECUTED
30004924: e1a0e00f mov lr, pc <== NOT EXECUTED
30004928: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
3000492c: eaffffac b 300047e4 <rtems_termios_enqueue_raw_characters+0x170><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
30004930: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
30004934: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
30004938: e3822004 orr r2, r2, #4 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
3000493c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
30004940: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
30004944: 0affffa6 beq 300047e4 <rtems_termios_enqueue_raw_characters+0x170><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
30004948: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3000494c: e1a0e00f mov lr, pc <== NOT EXECUTED
30004950: e12fff13 bx r3 <== NOT EXECUTED
30004954: eaffffa2 b 300047e4 <rtems_termios_enqueue_raw_characters+0x170><== NOT EXECUTED
300036cc <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;
300036cc: e5902000 ldr r2, [r0]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
300036d0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
300036d4: e5925034 ldr r5, [r2, #52] ; 0x34
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
300036d8: e3a03000 mov r3, #0
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
300036dc: e1a04000 mov r4, r0
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
300036e0: e580300c str r3, [r0, #12]
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
300036e4: e1a01003 mov r1, r3
300036e8: e5950018 ldr r0, [r5, #24]
300036ec: e1a02003 mov r2, r3
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;
300036f0: e5947008 ldr r7, [r4, #8]
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
300036f4: eb0007f9 bl 300056e0 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
300036f8: e2506000 subs r6, r0, #0
300036fc: 1a00000e bne 3000373c <rtems_termios_ioctl+0x70>
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
30003700: e5943004 ldr r3, [r4, #4]
30003704: e3530004 cmp r3, #4
30003708: 0a000006 beq 30003728 <rtems_termios_ioctl+0x5c>
3000370c: 8a00000d bhi 30003748 <rtems_termios_ioctl+0x7c>
30003710: e3530002 cmp r3, #2
30003714: 0a00001e beq 30003794 <rtems_termios_ioctl+0xc8>
30003718: 9a000085 bls 30003934 <rtems_termios_ioctl+0x268>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
3000371c: e1a00005 mov r0, r5
30003720: ebfffe29 bl 30002fcc <drainOutput>
break;
30003724: ea000002 b 30003734 <rtems_termios_ioctl+0x68>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
30003728: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
3000372c: e58520dc str r2, [r5, #220] ; 0xdc <== NOT EXECUTED
30003730: e58530e0 str r3, [r5, #224] ; 0xe0 <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
30003734: e5950018 ldr r0, [r5, #24]
30003738: eb000831 bl 30005804 <rtems_semaphore_release>
args->ioctl_return = sc;
3000373c: e584600c str r6, [r4, #12]
return sc;
}
30003740: e1a00006 mov r0, r6
30003744: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
30003748: e59f2340 ldr r2, [pc, #832] ; 30003a90 <rtems_termios_ioctl+0x3c4>
3000374c: e1530002 cmp r3, r2
30003750: 0a00006b beq 30003904 <rtems_termios_ioctl+0x238>
30003754: 8a000082 bhi 30003964 <rtems_termios_ioctl+0x298>
30003758: e3530005 cmp r3, #5
3000375c: 0a0000a1 beq 300039e8 <rtems_termios_ioctl+0x31c>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
30003760: e59520cc ldr r2, [r5, #204] ; 0xcc
30003764: e59f3328 ldr r3, [pc, #808] ; 30003a94 <rtems_termios_ioctl+0x3c8>
30003768: e0833282 add r3, r3, r2, lsl #5
3000376c: e5933018 ldr r3, [r3, #24]
30003770: e3530000 cmp r3, #0
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
30003774: 03a0600a moveq r6, #10
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
30003778: 0affffed beq 30003734 <rtems_termios_ioctl+0x68>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
3000377c: e1a00005 mov r0, r5
30003780: e1a01004 mov r1, r4
30003784: e1a0e00f mov lr, pc
30003788: e12fff13 bx r3
3000378c: e1a06000 mov r6, r0
30003790: eaffffe7 b 30003734 <rtems_termios_ioctl+0x68>
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
30003794: e594e008 ldr lr, [r4, #8]
30003798: e2857030 add r7, r5, #48 ; 0x30
3000379c: e1a0c007 mov ip, r7
300037a0: e8be000f ldm lr!, {r0, r1, r2, r3}
300037a4: e8ac000f stmia ip!, {r0, r1, r2, r3}
300037a8: e8be000f ldm lr!, {r0, r1, r2, r3}
300037ac: e8ac000f stmia ip!, {r0, r1, r2, r3}
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
300037b0: e59520b8 ldr r2, [r5, #184] ; 0xb8
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
300037b4: e59e3000 ldr r3, [lr]
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
300037b8: e3120c02 tst r2, #512 ; 0x200
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
300037bc: 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) &&
300037c0: 0a000012 beq 30003810 <rtems_termios_ioctl+0x144>
!(tty->termios.c_iflag & IXON)) {
300037c4: e5953030 ldr r3, [r5, #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) &&
300037c8: e3130b01 tst r3, #1024 ; 0x400
300037cc: 1a00000f bne 30003810 <rtems_termios_ioctl+0x144>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
300037d0: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
300037d4: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED
300037d8: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
300037dc: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
300037e0: e3130020 tst r3, #32 <== NOT EXECUTED
300037e4: 0a000009 beq 30003810 <rtems_termios_ioctl+0x144> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300037e8: e10f8000 mrs r8, CPSR <== NOT EXECUTED
300037ec: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED
300037f0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
300037f4: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
300037f8: e5952094 ldr r2, [r5, #148] ; 0x94 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
300037fc: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30003800: e3520000 cmp r2, #0 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
30003804: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30003808: 1a000098 bne 30003a70 <rtems_termios_ioctl+0x3a4> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000380c: e129f008 msr CPSR_fc, r8 <== 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)) {
30003810: e59530b8 ldr r3, [r5, #184] ; 0xb8
30003814: e3130b01 tst r3, #1024 ; 0x400
30003818: 0a000008 beq 30003840 <rtems_termios_ioctl+0x174>
3000381c: e5953030 ldr r3, [r5, #48] ; 0x30 <== NOT EXECUTED
30003820: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED
30003824: 1a000005 bne 30003840 <rtems_termios_ioctl+0x174> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
30003828: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
3000382c: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED
30003830: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
30003834: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
30003838: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
3000383c: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
30003840: e59530b8 ldr r3, [r5, #184] ; 0xb8
30003844: e3130c01 tst r3, #256 ; 0x100
30003848: 05952038 ldreq r2, [r5, #56] ; 0x38
3000384c: 0a000012 beq 3000389c <rtems_termios_ioctl+0x1d0>
30003850: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED
30003854: e3520000 cmp r2, #0 <== NOT EXECUTED
30003858: ba000078 blt 30003a40 <rtems_termios_ioctl+0x374> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
3000385c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
30003860: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
30003864: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
30003868: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
3000386c: e3130004 tst r3, #4 <== NOT EXECUTED
30003870: 0a000006 beq 30003890 <rtems_termios_ioctl+0x1c4> <== NOT EXECUTED
30003874: e59530b0 ldr r3, [r5, #176] ; 0xb0 <== NOT EXECUTED
30003878: e3530000 cmp r3, #0 <== NOT EXECUTED
3000387c: 0a000003 beq 30003890 <rtems_termios_ioctl+0x1c4> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
30003880: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
30003884: e1a0e00f mov lr, pc <== NOT EXECUTED
30003888: e12fff13 bx r3 <== NOT EXECUTED
3000388c: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
30003890: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
30003894: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
30003898: e58530b8 str r3, [r5, #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) {
3000389c: e3520000 cmp r2, #0
300038a0: ba000066 blt 30003a40 <rtems_termios_ioctl+0x374>
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
300038a4: e5953030 ldr r3, [r5, #48] ; 0x30
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) {
300038a8: e595803c ldr r8, [r5, #60] ; 0x3c
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
300038ac: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
300038b0: 159520b8 ldrne r2, [r5, #184] ; 0xb8
300038b4: 13822b01 orrne r2, r2, #1024 ; 0x400
300038b8: 158520b8 strne r2, [r5, #184] ; 0xb8
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
300038bc: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
300038c0: 159530b8 ldrne r3, [r5, #184] ; 0xb8
300038c4: 13833c02 orrne r3, r3, #512 ; 0x200
300038c8: 158530b8 strne r3, [r5, #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) {
300038cc: e2188002 ands r8, r8, #2
300038d0: 0a000048 beq 300039f8 <rtems_termios_ioctl+0x32c>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
300038d4: e3a03000 mov r3, #0
300038d8: e585306c str r3, [r5, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
300038dc: e5853070 str r3, [r5, #112] ; 0x70
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
300038e0: e5853074 str r3, [r5, #116] ; 0x74
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
300038e4: e59530a8 ldr r3, [r5, #168] ; 0xa8
300038e8: e3530000 cmp r3, #0
300038ec: 0affff90 beq 30003734 <rtems_termios_ioctl+0x68>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
300038f0: e5950010 ldr r0, [r5, #16]
300038f4: e1a01007 mov r1, r7
300038f8: e1a0e00f mov lr, pc
300038fc: e12fff13 bx r3
30003900: eaffff8b b 30003734 <rtems_termios_ioctl+0x68>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
30003904: e5952060 ldr r2, [r5, #96] ; 0x60 <== NOT EXECUTED
30003908: e595305c ldr r3, [r5, #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;
3000390c: e5950020 ldr r0, [r5, #32] <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
30003910: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
30003914: 45952064 ldrmi r2, [r5, #100] ; 0x64 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
30003918: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
3000391c: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
30003920: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED
30003924: e0622000 rsb r2, r2, r0 <== NOT EXECUTED
30003928: e0823003 add r3, r2, r3 <== NOT EXECUTED
3000392c: e5813000 str r3, [r1] <== NOT EXECUTED
}
break;
30003930: eaffff7f b 30003734 <rtems_termios_ioctl+0x68> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
30003934: e3530001 cmp r3, #1
30003938: 1affff88 bne 30003760 <rtems_termios_ioctl+0x94>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
3000393c: e5947008 ldr r7, [r4, #8]
30003940: e285c030 add ip, r5, #48 ; 0x30
30003944: e1a0e007 mov lr, r7
30003948: e8bc000f ldm ip!, {r0, r1, r2, r3}
3000394c: e8ae000f stmia lr!, {r0, r1, r2, r3}
30003950: e8bc000f ldm ip!, {r0, r1, r2, r3}
30003954: e8ae000f stmia lr!, {r0, r1, r2, r3}
30003958: e59c3000 ldr r3, [ip]
3000395c: e58e3000 str r3, [lr]
break;
30003960: eaffff73 b 30003734 <rtems_termios_ioctl+0x68>
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
30003964: e59f212c ldr r2, [pc, #300] ; 30003a98 <rtems_termios_ioctl+0x3cc>
30003968: e1530002 cmp r3, r2
3000396c: 0a000019 beq 300039d8 <rtems_termios_ioctl+0x30c>
30003970: e2822105 add r2, r2, #1073741825 ; 0x40000001
30003974: e1530002 cmp r3, r2
30003978: 1affff78 bne 30003760 <rtems_termios_ioctl+0x94>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
3000397c: e59f7110 ldr r7, [pc, #272] ; 30003a94 <rtems_termios_ioctl+0x3c8>
30003980: e59530cc ldr r3, [r5, #204] ; 0xcc
30003984: e0873283 add r3, r7, r3, lsl #5
30003988: e5933004 ldr r3, [r3, #4]
3000398c: e3530000 cmp r3, #0
30003990: 0a000003 beq 300039a4 <rtems_termios_ioctl+0x2d8>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
30003994: e1a00005 mov r0, r5
30003998: e1a0e00f mov lr, pc
3000399c: e12fff13 bx r3
300039a0: e1a06000 mov r6, r0
}
tty->t_line=*(int*)(args->buffer);
300039a4: e5943008 ldr r3, [r4, #8]
300039a8: e5932000 ldr r2, [r3]
tty->t_sc = NULL; /* ensure that no more valid data */
300039ac: e3a03000 mov r3, #0
300039b0: e58530d0 str r3, [r5, #208] ; 0xd0
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
300039b4: e7973282 ldr r3, [r7, r2, lsl #5]
* 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);
300039b8: e58520cc str r2, [r5, #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) {
300039bc: e3530000 cmp r3, #0
300039c0: 0affff5b beq 30003734 <rtems_termios_ioctl+0x68>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
300039c4: e1a00005 mov r0, r5
300039c8: e1a0e00f mov lr, pc
300039cc: e12fff13 bx r3
300039d0: e1a06000 mov r6, r0
300039d4: eaffff56 b 30003734 <rtems_termios_ioctl+0x68>
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
300039d8: e5943008 ldr r3, [r4, #8]
300039dc: e59520cc ldr r2, [r5, #204] ; 0xcc
300039e0: e5832000 str r2, [r3]
break;
300039e4: eaffff52 b 30003734 <rtems_termios_ioctl+0x68>
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
300039e8: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
300039ec: e58520d4 str r2, [r5, #212] ; 0xd4 <== NOT EXECUTED
300039f0: e58530d8 str r3, [r5, #216] ; 0xd8 <== NOT EXECUTED
break;
300039f4: eaffff4e b 30003734 <rtems_termios_ioctl+0x68> <== NOT EXECUTED
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] *
300039f8: e5d5a046 ldrb sl, [r5, #70] ; 0x46 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
300039fc: eb00058f bl 30005040 <rtems_clock_get_ticks_per_second> <== NOT EXECUTED
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] *
30003a00: e000009a mul r0, sl, r0 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
30003a04: e59f3090 ldr r3, [pc, #144] ; 30003a9c <rtems_termios_ioctl+0x3d0><== NOT EXECUTED
if (tty->termios.c_cc[VTIME]) {
30003a08: e5d52046 ldrb r2, [r5, #70] ; 0x46 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
30003a0c: e0831390 umull r1, r3, r0, r3 <== NOT EXECUTED
if (tty->termios.c_cc[VTIME]) {
30003a10: e3520000 cmp r2, #0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
30003a14: e1a031a3 lsr r3, r3, #3 <== NOT EXECUTED
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] *
30003a18: e5853054 str r3, [r5, #84] ; 0x54 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
30003a1c: 0a00000b beq 30003a50 <rtems_termios_ioctl+0x384> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
30003a20: e5d52047 ldrb r2, [r5, #71] ; 0x47 <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
30003a24: e585806c str r8, [r5, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003a28: e3520000 cmp r2, #0 <== NOT EXECUTED
30003a2c: 01a02003 moveq r2, r3 <== NOT EXECUTED
30003a30: 13a02000 movne r2, #0 <== NOT EXECUTED
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
30003a34: e5853070 str r3, [r5, #112] ; 0x70 <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003a38: e5852074 str r2, [r5, #116] ; 0x74 <== NOT EXECUTED
30003a3c: eaffffa8 b 300038e4 <rtems_termios_ioctl+0x218> <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
tty->flow_ctrl |= FL_MDRTS;
30003a40: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
30003a44: e3833c01 orr r3, r3, #256 ; 0x100 <== NOT EXECUTED
30003a48: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
30003a4c: eaffff94 b 300038a4 <rtems_termios_ioctl+0x1d8> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
30003a50: e5d53047 ldrb r3, [r5, #71] ; 0x47 <== NOT EXECUTED
30003a54: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
30003a58: 03a03001 moveq r3, #1 <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
30003a5c: 1585206c strne r2, [r5, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
30003a60: 15852070 strne r2, [r5, #112] ; 0x70 <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003a64: 15852074 strne r2, [r5, #116] ; 0x74 <== NOT EXECUTED
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
30003a68: 0585306c streq r3, [r5, #108] ; 0x6c <== NOT EXECUTED
30003a6c: eaffff9c b 300038e4 <rtems_termios_ioctl+0x218> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
30003a70: e5953084 ldr r3, [r5, #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)(
30003a74: e595107c ldr r1, [r5, #124] ; 0x7c <== NOT EXECUTED
30003a78: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
30003a7c: e0811003 add r1, r1, r3 <== NOT EXECUTED
30003a80: e3a02001 mov r2, #1 <== NOT EXECUTED
30003a84: e1a0e00f mov lr, pc <== NOT EXECUTED
30003a88: e595f0a4 ldr pc, [r5, #164] ; 0xa4 <== NOT EXECUTED
30003a8c: eaffff5e b 3000380c <rtems_termios_ioctl+0x140> <== NOT EXECUTED
30003048 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
30003048: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
3000304c: e59f7468 ldr r7, [pc, #1128] ; 300034bc <rtems_termios_open+0x474>
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
30003050: e1a06001 mov r6, r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
30003054: e3a01000 mov r1, #0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
30003058: e24dd018 sub sp, sp, #24
3000305c: e1a05000 mov r5, r0
30003060: e1a08002 mov r8, r2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
30003064: e5970000 ldr r0, [r7]
30003068: e1a02001 mov r2, r1
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
3000306c: e58d3010 str r3, [sp, #16]
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
30003070: eb00099a bl 300056e0 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
30003074: e250a000 subs sl, r0, #0
30003078: 1a000021 bne 30003104 <rtems_termios_open+0xbc>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
3000307c: e59fb43c ldr fp, [pc, #1084] ; 300034c0 <rtems_termios_open+0x478>
30003080: e59b9000 ldr r9, [fp]
30003084: e3590000 cmp r9, #0
30003088: 0a00002d beq 30003144 <rtems_termios_open+0xfc>
3000308c: e1a04009 mov r4, r9
30003090: ea000002 b 300030a0 <rtems_termios_open+0x58>
30003094: e5944000 ldr r4, [r4]
30003098: e3540000 cmp r4, #0
3000309c: 0a000028 beq 30003144 <rtems_termios_open+0xfc>
if ((tty->major == major) && (tty->minor == minor))
300030a0: e594300c ldr r3, [r4, #12]
300030a4: e1530005 cmp r3, r5
300030a8: 1afffff9 bne 30003094 <rtems_termios_open+0x4c>
300030ac: e5943010 ldr r3, [r4, #16]
300030b0: e1530006 cmp r3, r6
300030b4: 1afffff6 bne 30003094 <rtems_termios_open+0x4c>
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
if (!tty->refcount++) {
300030b8: e5943008 ldr r3, [r4, #8]
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
300030bc: e5981000 ldr r1, [r8]
if (!tty->refcount++) {
300030c0: e2832001 add r2, r3, #1
300030c4: e3530000 cmp r3, #0
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
300030c8: e5814034 str r4, [r1, #52] ; 0x34
if (!tty->refcount++) {
300030cc: e5842008 str r2, [r4, #8]
300030d0: 1a000009 bne 300030fc <rtems_termios_open+0xb4>
if (tty->device.firstOpen)
300030d4: e5943098 ldr r3, [r4, #152] ; 0x98
300030d8: e3530000 cmp r3, #0
(*tty->device.firstOpen)(major, minor, arg);
300030dc: 11a00005 movne r0, r5
300030e0: 11a01006 movne r1, r6
300030e4: 11a02008 movne r2, r8
300030e8: 11a0e00f movne lr, pc
300030ec: 112fff13 bxne r3
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300030f0: e59430b4 ldr r3, [r4, #180] ; 0xb4
300030f4: e3530002 cmp r3, #2
300030f8: 0a000004 beq 30003110 <rtems_termios_open+0xc8>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
300030fc: e5970000 ldr r0, [r7]
30003100: eb0009bf bl 30005804 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
30003104: e1a0000a mov r0, sl
30003108: e28dd018 add sp, sp, #24
3000310c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(
30003110: e59400c4 ldr r0, [r4, #196] ; 0xc4
30003114: e59f13a8 ldr r1, [pc, #936] ; 300034c4 <rtems_termios_open+0x47c>
30003118: e1a02004 mov r2, r4
3000311c: eb000a8c bl 30005b54 <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
30003120: e3500000 cmp r0, #0
30003124: 1a0000ca bne 30003454 <rtems_termios_open+0x40c>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
30003128: e59400c8 ldr r0, [r4, #200] ; 0xc8
3000312c: e59f1394 ldr r1, [pc, #916] ; 300034c8 <rtems_termios_open+0x480>
30003130: e1a02004 mov r2, r4
30003134: eb000a86 bl 30005b54 <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
30003138: e3500000 cmp r0, #0
3000313c: 0affffee beq 300030fc <rtems_termios_open+0xb4>
30003140: ea0000c3 b 30003454 <rtems_termios_open+0x40c> <== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
30003144: e3a00001 mov r0, #1
30003148: e3a010e8 mov r1, #232 ; 0xe8
3000314c: ebfffb49 bl 30001e78 <calloc>
if (tty == NULL) {
30003150: e3500000 cmp r0, #0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
30003154: e58d0014 str r0, [sp, #20]
30003158: e1a04000 mov r4, r0
if (tty == NULL) {
3000315c: 0a0000a8 beq 30003404 <rtems_termios_open+0x3bc>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
30003160: e59f0364 ldr r0, [pc, #868] ; 300034cc <rtems_termios_open+0x484>
30003164: e59d1014 ldr r1, [sp, #20]
30003168: e5903000 ldr r3, [r0]
3000316c: e5813064 str r3, [r1, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
30003170: e5910064 ldr r0, [r1, #100] ; 0x64
30003174: ebfffca5 bl 30002410 <malloc>
30003178: e59d2014 ldr r2, [sp, #20]
if (tty->rawInBuf.theBuf == NULL) {
3000317c: e3500000 cmp r0, #0
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
30003180: e1a03000 mov r3, r0
30003184: e5820058 str r0, [r2, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) {
30003188: 0a0000a1 beq 30003414 <rtems_termios_open+0x3cc>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
3000318c: e59fe338 ldr lr, [pc, #824] ; 300034cc <rtems_termios_open+0x484>
30003190: e59d0014 ldr r0, [sp, #20]
30003194: e59e2004 ldr r2, [lr, #4]
30003198: e5802088 str r2, [r0, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
3000319c: e5900088 ldr r0, [r0, #136] ; 0x88
300031a0: e58d3008 str r3, [sp, #8]
300031a4: ebfffc99 bl 30002410 <malloc>
300031a8: e59de014 ldr lr, [sp, #20]
if (tty->rawOutBuf.theBuf == NULL) {
300031ac: e3500000 cmp r0, #0
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
300031b0: e1a02000 mov r2, r0
300031b4: e58e007c str r0, [lr, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) {
300031b8: e59d3008 ldr r3, [sp, #8]
300031bc: 0a00008c beq 300033f4 <rtems_termios_open+0x3ac>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
300031c0: e59f1304 ldr r1, [pc, #772] ; 300034cc <rtems_termios_open+0x484>
300031c4: e5910008 ldr r0, [r1, #8]
300031c8: e58d200c str r2, [sp, #12]
300031cc: e58d3008 str r3, [sp, #8]
300031d0: ebfffc8e bl 30002410 <malloc>
300031d4: e59de014 ldr lr, [sp, #20]
if (tty->cbuf == NULL) {
300031d8: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
300031dc: e58e001c str r0, [lr, #28]
if (tty->cbuf == NULL) {
300031e0: e59d200c ldr r2, [sp, #12]
300031e4: 0a00007f beq 300033e8 <rtems_termios_open+0x3a0>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
300031e8: e59d0014 ldr r0, [sp, #20]
300031ec: e3a03000 mov r3, #0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
300031f0: e5803004 str r3, [r0, #4]
if (rtems_termios_ttyHead != NULL)
300031f4: e1590003 cmp r9, r3
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
300031f8: e58030d4 str r3, [r0, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
300031fc: e58030d8 str r3, [r0, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
30003200: e58030dc str r3, [r0, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
30003204: e58030e0 str r3, [r0, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
30003208: e58030e4 str r3, [r0, #228] ; 0xe4
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)
3000320c: e59f32bc ldr r3, [pc, #700] ; 300034d0 <rtems_termios_open+0x488>
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
30003210: 15890004 strne r0, [r9, #4]
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
30003214: e5932000 ldr r2, [r3]
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
30003218: e59d1014 ldr r1, [sp, #20]
if (rtems_termios_ttyTail == NULL)
3000321c: e3520000 cmp r2, #0
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
30003220: e59f22a4 ldr r2, [pc, #676] ; 300034cc <rtems_termios_open+0x484>
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
30003224: 05831000 streq r1, [r3]
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
30003228: e5809000 str r9, [r0]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
3000322c: e5d2300c ldrb r3, [r2, #12]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
30003230: e59de014 ldr lr, [sp, #20]
30003234: e59f0298 ldr r0, [pc, #664] ; 300034d4 <rtems_termios_open+0x48c>
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
30003238: e58b1000 str r1, [fp]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
3000323c: e28ec014 add ip, lr, #20
30003240: e1830000 orr r0, r3, r0
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
30003244: e58e6010 str r6, [lr, #16]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
30003248: e3a03000 mov r3, #0
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
tty->major = major;
3000324c: e58e500c str r5, [lr, #12]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
30003250: e3a01001 mov r1, #1
30003254: e3a02054 mov r2, #84 ; 0x54
30003258: e58dc000 str ip, [sp]
3000325c: eb000885 bl 30005478 <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)
30003260: e2503000 subs r3, r0, #0
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
30003264: e59f9260 ldr r9, [pc, #608] ; 300034cc <rtems_termios_open+0x484>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
30003268: 1a000079 bne 30003454 <rtems_termios_open+0x40c>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'o', c),
3000326c: e5d9200c ldrb r2, [r9, #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 (
30003270: e59d1014 ldr r1, [sp, #20]
30003274: e59f025c ldr r0, [pc, #604] ; 300034d8 <rtems_termios_open+0x490>
30003278: e281c018 add ip, r1, #24
3000327c: e1820000 orr r0, r2, r0
30003280: e3a01001 mov r1, #1
30003284: e3a02054 mov r2, #84 ; 0x54
30003288: e58dc000 str ip, [sp]
3000328c: eb000879 bl 30005478 <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)
30003290: e2501000 subs r1, r0, #0
30003294: 1a00006e bne 30003454 <rtems_termios_open+0x40c>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'x', c),
30003298: e5d9300c ldrb r3, [r9, #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 (
3000329c: e59d2014 ldr r2, [sp, #20]
300032a0: e59f0234 ldr r0, [pc, #564] ; 300034dc <rtems_termios_open+0x494>
300032a4: e282c08c add ip, r2, #140 ; 0x8c
300032a8: e1830000 orr r0, r3, r0
300032ac: e3a02020 mov r2, #32
300032b0: e1a03001 mov r3, r1
300032b4: e58dc000 str ip, [sp]
300032b8: eb00086e bl 30005478 <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)
300032bc: e250b000 subs fp, r0, #0
300032c0: 1a000063 bne 30003454 <rtems_termios_open+0x40c>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
300032c4: e59d3014 ldr r3, [sp, #20]
300032c8: e59dc010 ldr ip, [sp, #16]
300032cc: e283e098 add lr, r3, #152 ; 0x98
300032d0: e8bc000f ldm ip!, {r0, r1, r2, r3}
300032d4: e8ae000f stmia lr!, {r0, r1, r2, r3}
300032d8: e89c000f ldm ip, {r0, r1, r2, r3}
300032dc: e88e000f stm lr, {r0, r1, r2, r3}
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300032e0: e59de014 ldr lr, [sp, #20]
300032e4: e59e30b4 ldr r3, [lr, #180] ; 0xb4
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
300032e8: e58eb094 str fp, [lr, #148] ; 0x94
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300032ec: e3530002 cmp r3, #2
300032f0: 0a000058 beq 30003458 <rtems_termios_open+0x410>
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
300032f4: e59d2014 ldr r2, [sp, #20]
300032f8: e59230a0 ldr r3, [r2, #160] ; 0xa0
300032fc: e3530000 cmp r3, #0
30003300: 0a000046 beq 30003420 <rtems_termios_open+0x3d8>
30003304: e59230b4 ldr r3, [r2, #180] ; 0xb4
30003308: e3530002 cmp r3, #2
3000330c: 0a000043 beq 30003420 <rtems_termios_open+0x3d8>
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;
30003310: e59de014 ldr lr, [sp, #20]
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';
30003314: 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;
30003318: e58e30b8 str r3, [lr, #184] ; 0xb8
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
3000331c: e59f01a8 ldr r0, [pc, #424] ; 300034cc <rtems_termios_open+0x484>
/* 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;
30003320: e59ec064 ldr ip, [lr, #100] ; 0x64
tty->highwater = tty->rawInBuf.Size * 3/4;
30003324: e59e1064 ldr r1, [lr, #100] ; 0x64
/*
* Bump name characer
*/
if (c++ == 'z')
30003328: e5d0200c ldrb r2, [r0, #12]
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;
3000332c: e0811081 add r1, r1, r1, lsl #1
/*
* Bump name characer
*/
if (c++ == 'z')
30003330: e352007a cmp r2, #122 ; 0x7a
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;
30003334: e1a00121 lsr r0, r1, #2
/*
* Bump name characer
*/
if (c++ == 'z')
30003338: e2821001 add r1, r2, #1
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
3000333c: e59f219c ldr r2, [pc, #412] ; 300034e0 <rtems_termios_open+0x498>
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';
30003340: e5ce304c strb r3, [lr, #76] ; 0x4c
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
30003344: e58e2030 str r2, [lr, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
30003348: e59f2194 ldr r2, [pc, #404] ; 300034e4 <rtems_termios_open+0x49c>
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
3000334c: e5ce3051 strb r3, [lr, #81] ; 0x51
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
30003350: e58e2034 str r2, [lr, #52] ; 0x34
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
30003354: e59f218c ldr r2, [pc, #396] ; 300034e8 <rtems_termios_open+0x4a0>
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';
30003358: e3a03011 mov r3, #17
/*
* 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;
3000335c: e58e2038 str r2, [lr, #56] ; 0x38
tty->termios.c_lflag =
30003360: e59f2184 ldr r2, [pc, #388] ; 300034ec <rtems_termios_open+0x4a4>
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';
30003364: e5ce3049 strb r3, [lr, #73] ; 0x49
* 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 =
30003368: e58e203c str r2, [lr, #60] ; 0x3c
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';
3000336c: e3a03013 mov r3, #19
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
30003370: e3a02003 mov r2, #3
30003374: e5ce2041 strb r2, [lr, #65] ; 0x41
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';
30003378: e5ce304a strb r3, [lr, #74] ; 0x4a
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
3000337c: e3a0201c mov r2, #28
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';
30003380: e3a0301a mov r3, #26
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
30003384: e5ce2042 strb r2, [lr, #66] ; 0x42
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';
30003388: e5ce304b strb r3, [lr, #75] ; 0x4b
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
3000338c: e3a0207f mov r2, #127 ; 0x7f
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';
30003390: e3a03012 mov r3, #18
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
30003394: e5ce2043 strb r2, [lr, #67] ; 0x43
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';
30003398: e5ce304d strb r3, [lr, #77] ; 0x4d
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
3000339c: e3a02015 mov r2, #21
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';
300033a0: e3a0300f mov r3, #15
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
300033a4: e5ce2044 strb r2, [lr, #68] ; 0x44
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';
300033a8: e5ce304e strb r3, [lr, #78] ; 0x4e
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';
300033ac: e3a02004 mov r2, #4
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';
300033b0: e3a03017 mov r3, #23
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';
300033b4: e5ce2045 strb r2, [lr, #69] ; 0x45
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';
300033b8: e5ce304f strb r3, [lr, #79] ; 0x4f
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
300033bc: e59f2108 ldr r2, [pc, #264] ; 300034cc <rtems_termios_open+0x484>
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';
300033c0: e3a03016 mov r3, #22
300033c4: e5ce3050 strb r3, [lr, #80] ; 0x50
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
c = 'a';
300033c8: 059f30fc ldreq r3, [pc, #252] ; 300034cc <rtems_termios_open+0x484>
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
300033cc: e5c2100c strb r1, [r2, #12]
/* 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;
300033d0: e1a0c0ac lsr ip, ip, #1
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
c = 'a';
300033d4: 03a02061 moveq r2, #97 ; 0x61
/* 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;
300033d8: e58ec0bc str ip, [lr, #188] ; 0xbc
tty->highwater = tty->rawInBuf.Size * 3/4;
300033dc: e58e00c0 str r0, [lr, #192] ; 0xc0
/*
* Bump name characer
*/
if (c++ == 'z')
c = 'a';
300033e0: 05c3200c strbeq r2, [r3, #12]
300033e4: eaffff33 b 300030b8 <rtems_termios_open+0x70>
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
300033e8: e1a00002 mov r0, r2 <== NOT EXECUTED
300033ec: ebfffb2d bl 300020a8 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
300033f0: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
300033f4: e1a00003 mov r0, r3 <== NOT EXECUTED
300033f8: ebfffb2a bl 300020a8 <free> <== NOT EXECUTED
free(tty);
300033fc: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
30003400: ebfffb28 bl 300020a8 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
30003404: e5970000 ldr r0, [r7] <== NOT EXECUTED
30003408: eb0008fd bl 30005804 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
3000340c: e3a0a01a mov sl, #26 <== NOT EXECUTED
30003410: eaffff3b b 30003104 <rtems_termios_open+0xbc> <== NOT EXECUTED
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
30003414: e1a00002 mov r0, r2 <== NOT EXECUTED
30003418: ebfffb22 bl 300020a8 <free> <== NOT EXECUTED
3000341c: eafffff8 b 30003404 <rtems_termios_open+0x3bc> <== NOT EXECUTED
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'r', c),
30003420: e59fe0a4 ldr lr, [pc, #164] ; 300034cc <rtems_termios_open+0x484>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
30003424: e59d2014 ldr r2, [sp, #20]
rtems_build_name ('T', 'R', 'r', c),
30003428: e5de300c ldrb r3, [lr, #12]
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
3000342c: e59f00bc ldr r0, [pc, #188] ; 300034f0 <rtems_termios_open+0x4a8>
30003430: e3a01000 mov r1, #0
30003434: e282c068 add ip, r2, #104 ; 0x68
30003438: e1830000 orr r0, r3, r0
3000343c: e3a02024 mov r2, #36 ; 0x24
30003440: e1a03001 mov r3, r1
30003444: e58dc000 str ip, [sp]
30003448: eb00080a bl 30005478 <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)
3000344c: e3500000 cmp r0, #0
30003450: 0affffae beq 30003310 <rtems_termios_open+0x2c8>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
30003454: eb000a44 bl 30005d6c <rtems_fatal_error_occurred>
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
rtems_build_name ('T', 'x', 'T', c),
30003458: e5d9300c ldrb r3, [r9, #12]
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
3000345c: e59f0090 ldr r0, [pc, #144] ; 300034f4 <rtems_termios_open+0x4ac>
30003460: e28ec0c8 add ip, lr, #200 ; 0xc8
30003464: e1830000 orr r0, r3, r0
30003468: e3a0100a mov r1, #10
3000346c: e3a02b01 mov r2, #1024 ; 0x400
30003470: e3a03c05 mov r3, #1280 ; 0x500
30003474: e88d1800 stm sp, {fp, ip}
30003478: eb00090b bl 300058ac <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)
3000347c: e250e000 subs lr, r0, #0
30003480: 1afffff3 bne 30003454 <rtems_termios_open+0x40c>
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
rtems_build_name ('R', 'x', 'T', c),
30003484: e5d9300c ldrb r3, [r9, #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 (
30003488: e59d1014 ldr r1, [sp, #20]
3000348c: e59f0064 ldr r0, [pc, #100] ; 300034f8 <rtems_termios_open+0x4b0>
30003490: e281c0c4 add ip, r1, #196 ; 0xc4
30003494: e1830000 orr r0, r3, r0
30003498: e3a01009 mov r1, #9
3000349c: e3a02b01 mov r2, #1024 ; 0x400
300034a0: e3a03c05 mov r3, #1280 ; 0x500
300034a4: e58de000 str lr, [sp]
300034a8: e58dc004 str ip, [sp, #4]
300034ac: eb0008fe bl 300058ac <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)
300034b0: e3500000 cmp r0, #0
300034b4: 0affff8e beq 300032f4 <rtems_termios_open+0x2ac>
300034b8: eaffffe5 b 30003454 <rtems_termios_open+0x40c> <== NOT EXECUTED
30003aa0 <rtems_termios_puts>:
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
30003aa0: e59230b4 ldr r3, [r2, #180] ; 0xb4
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
30003aa4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
30003aa8: e3530000 cmp r3, #0
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
30003aac: e1a04002 mov r4, r2
30003ab0: e1a09000 mov r9, r0
30003ab4: e1a0a001 mov sl, r1
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
30003ab8: 0a000037 beq 30003b9c <rtems_termios_puts+0xfc>
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
30003abc: e3510000 cmp r1, #0
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
30003ac0: e5928080 ldr r8, [r2, #128] ; 0x80
while (len) {
30003ac4: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
30003ac8: e3a07002 mov r7, #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;
30003acc: e3a0b001 mov fp, #1
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
30003ad0: e5941088 ldr r1, [r4, #136] ; 0x88
30003ad4: e2880001 add r0, r8, #1
30003ad8: eb00326b bl 3001048c <__umodsi3>
30003adc: e1a08000 mov r8, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30003ae0: e10f5000 mrs r5, CPSR
30003ae4: e3853080 orr r3, r5, #128 ; 0x80
30003ae8: e129f003 msr CPSR_fc, r3
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
30003aec: e5946084 ldr r6, [r4, #132] ; 0x84
30003af0: e1560000 cmp r6, r0
30003af4: 1a00000d bne 30003b30 <rtems_termios_puts+0x90>
tty->rawOutBufState = rob_wait;
30003af8: e5847094 str r7, [r4, #148] ; 0x94
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003afc: e129f005 msr CPSR_fc, r5
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
30003b00: e3a01000 mov r1, #0
30003b04: e594008c ldr r0, [r4, #140] ; 0x8c
30003b08: e1a02001 mov r2, r1
30003b0c: eb0006f3 bl 300056e0 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
30003b10: e3500000 cmp r0, #0
30003b14: 1a000026 bne 30003bb4 <rtems_termios_puts+0x114>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30003b18: e10f5000 mrs r5, CPSR
30003b1c: e3853080 orr r3, r5, #128 ; 0x80
30003b20: e129f003 msr CPSR_fc, r3
* 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) {
30003b24: e5943084 ldr r3, [r4, #132] ; 0x84
30003b28: e1530006 cmp r3, r6
30003b2c: 0afffff1 beq 30003af8 <rtems_termios_puts+0x58>
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++;
30003b30: e5943080 ldr r3, [r4, #128] ; 0x80
30003b34: e4d91001 ldrb r1, [r9], #1
30003b38: e594207c ldr r2, [r4, #124] ; 0x7c
30003b3c: e7c21003 strb r1, [r2, r3]
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
30003b40: 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;
30003b44: e5848080 str r8, [r4, #128] ; 0x80
if (tty->rawOutBufState == rob_idle) {
30003b48: e3530000 cmp r3, #0
30003b4c: 1a000006 bne 30003b6c <rtems_termios_puts+0xcc>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
30003b50: e59430b8 ldr r3, [r4, #184] ; 0xb8
30003b54: e3130010 tst r3, #16
30003b58: 0a000007 beq 30003b7c <rtems_termios_puts+0xdc>
(*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;
30003b5c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30003b60: e3833020 orr r3, r3, #32 <== NOT EXECUTED
30003b64: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
30003b68: e584b094 str fp, [r4, #148] ; 0x94
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003b6c: e129f005 msr CPSR_fc, r5
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
30003b70: e25aa001 subs sl, sl, #1
30003b74: 1affffd5 bne 30003ad0 <rtems_termios_puts+0x30>
30003b78: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
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,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
30003b7c: e5943084 ldr r3, [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,
30003b80: e594107c ldr r1, [r4, #124] ; 0x7c
30003b84: e5940010 ldr r0, [r4, #16]
30003b88: e0811003 add r1, r1, r3
30003b8c: e3a02001 mov r2, #1
30003b90: e1a0e00f mov lr, pc
30003b94: e594f0a4 ldr pc, [r4, #164] ; 0xa4
30003b98: eafffff2 b 30003b68 <rtems_termios_puts+0xc8>
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
30003b9c: e5920010 ldr r0, [r2, #16]
30003ba0: e1a01009 mov r1, r9
30003ba4: e1a0200a mov r2, sl
30003ba8: e1a0e00f mov lr, pc
30003bac: e594f0a4 ldr pc, [r4, #164] ; 0xa4
return;
30003bb0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
30003bb4: eb00086c bl 30005d6c <rtems_fatal_error_occurred> <== NOT EXECUTED
300042c8 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
300042c8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
300042cc: e5903000 ldr r3, [r0]
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
300042d0: 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;
300042d4: e5934034 ldr r4, [r3, #52] ; 0x34
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
300042d8: e1a09000 mov r9, r0
300042dc: e24dd008 sub sp, sp, #8
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);
300042e0: e1a02001 mov r2, r1
300042e4: e5940014 ldr r0, [r4, #20]
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;
300042e8: e5998010 ldr r8, [r9, #16]
char *buffer = args->buffer;
300042ec: e599a00c ldr sl, [r9, #12]
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
300042f0: eb0004fa bl 300056e0 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
300042f4: e3500000 cmp r0, #0
300042f8: e58d0000 str r0, [sp]
300042fc: 1a00000e bne 3000433c <rtems_termios_read+0x74>
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
30004300: e59420cc ldr r2, [r4, #204] ; 0xcc
30004304: e59f3350 ldr r3, [pc, #848] ; 3000465c <rtems_termios_read+0x394>
30004308: e0833282 add r3, r3, r2, lsl #5
3000430c: e5933008 ldr r3, [r3, #8]
30004310: e3530000 cmp r3, #0
30004314: 0a00000b beq 30004348 <rtems_termios_read+0x80>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
30004318: e1a00004 mov r0, r4
3000431c: e1a01009 mov r1, r9
30004320: e1a0e00f mov lr, pc
30004324: e12fff13 bx r3
tty->tty_rcvwakeup = 0;
30004328: e3a03000 mov r3, #0
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
3000432c: e58d0000 str r0, [sp]
tty->tty_rcvwakeup = 0;
30004330: e58430e4 str r3, [r4, #228] ; 0xe4
rtems_semaphore_release (tty->isem);
30004334: e5940014 ldr r0, [r4, #20]
30004338: eb000531 bl 30005804 <rtems_semaphore_release>
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
3000433c: e59d0000 ldr r0, [sp]
30004340: e28dd008 add sp, sp, #8
30004344: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
30004348: e5942024 ldr r2, [r4, #36] ; 0x24
3000434c: e5943020 ldr r3, [r4, #32]
30004350: e1520003 cmp r2, r3
30004354: 0a000018 beq 300043bc <rtems_termios_read+0xf4>
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30004358: e3580000 cmp r8, #0
3000435c: 0a00000e beq 3000439c <rtems_termios_read+0xd4>
30004360: e5943024 ldr r3, [r4, #36] ; 0x24
30004364: e5942020 ldr r2, [r4, #32]
30004368: e1530002 cmp r3, r2
3000436c: ba000003 blt 30004380 <rtems_termios_read+0xb8>
30004370: ea000009 b 3000439c <rtems_termios_read+0xd4> <== NOT EXECUTED
30004374: e5942020 ldr r2, [r4, #32]
30004378: e1520003 cmp r2, r3
3000437c: da000006 ble 3000439c <rtems_termios_read+0xd4>
*buffer++ = tty->cbuf[tty->cindex++];
30004380: e594201c ldr r2, [r4, #28]
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30004384: e2588001 subs r8, r8, #1
*buffer++ = tty->cbuf[tty->cindex++];
30004388: e7d22003 ldrb r2, [r2, r3]
3000438c: e2833001 add r3, r3, #1
30004390: e4ca2001 strb r2, [sl], #1
30004394: e5843024 str r3, [r4, #36] ; 0x24
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30004398: 1afffff5 bne 30004374 <rtems_termios_read+0xac>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
3000439c: e5993010 ldr r3, [r9, #16]
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
300043a0: e5940014 ldr r0, [r4, #20]
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
300043a4: e0688003 rsb r8, r8, r3
tty->tty_rcvwakeup = 0;
300043a8: e3a03000 mov r3, #0
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
300043ac: e5898018 str r8, [r9, #24]
tty->tty_rcvwakeup = 0;
300043b0: e58430e4 str r3, [r4, #228] ; 0xe4
rtems_semaphore_release (tty->isem);
300043b4: eb000512 bl 30005804 <rtems_semaphore_release>
return sc;
300043b8: eaffffdf b 3000433c <rtems_termios_read+0x74>
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
300043bc: e59430a0 ldr r3, [r4, #160] ; 0xa0
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
300043c0: e59d1000 ldr r1, [sp]
tty->read_start_column = tty->column;
300043c4: e5942028 ldr r2, [r4, #40] ; 0x28
if (tty->device.pollRead != NULL &&
300043c8: e3530000 cmp r3, #0
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
300043cc: e5841020 str r1, [r4, #32]
300043d0: e5841024 str r1, [r4, #36] ; 0x24
tty->read_start_column = tty->column;
300043d4: e584202c str r2, [r4, #44] ; 0x2c
if (tty->device.pollRead != NULL &&
300043d8: 0a000002 beq 300043e8 <rtems_termios_read+0x120>
300043dc: e59420b4 ldr r2, [r4, #180] ; 0xb4
300043e0: e3520000 cmp r2, #0
300043e4: 0a000060 beq 3000456c <rtems_termios_read+0x2a4>
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)(
300043e8: e2843049 add r3, 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;
300043ec: e5946074 ldr r6, [r4, #116] ; 0x74
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
300043f0: e59f7268 ldr r7, [pc, #616] ; 30004660 <rtems_termios_read+0x398>
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
300043f4: e59fb268 ldr fp, [pc, #616] ; 30004664 <rtems_termios_read+0x39c>
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
rtems_status_code sc;
int wait = (int)1;
300043f8: e3a05001 mov r5, #1
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)(
300043fc: e58d3004 str r3, [sp, #4]
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004400: e594205c ldr r2, [r4, #92] ; 0x5c
30004404: e5943060 ldr r3, [r4, #96] ; 0x60
30004408: e1520003 cmp r2, r3
3000440c: 1a00000a bne 3000443c <rtems_termios_read+0x174>
30004410: ea000040 b 30004518 <rtems_termios_read+0x250>
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
30004414: e1a00006 mov r0, r6
30004418: e1a01004 mov r1, r4
3000441c: ebffff60 bl 300041a4 <siproc>
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004420: e594205c ldr r2, [r4, #92] ; 0x5c
30004424: e5943060 ldr r3, [r4, #96] ; 0x60
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
30004428: e3500000 cmp r0, #0
3000442c: 13a05000 movne r5, #0
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004430: e1520003 cmp r2, r3
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
30004434: e5946070 ldr r6, [r4, #112] ; 0x70
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004438: 0a000036 beq 30004518 <rtems_termios_read+0x250>
(tty->ccount < (CBUFSIZE-1))) {
3000443c: e5973008 ldr r3, [r7, #8]
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004440: e5942020 ldr r2, [r4, #32]
(tty->ccount < (CBUFSIZE-1))) {
30004444: e2433001 sub r3, r3, #1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004448: e1520003 cmp r2, r3
3000444c: aa000031 bge 30004518 <rtems_termios_read+0x250>
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
30004450: e594005c ldr r0, [r4, #92] ; 0x5c
30004454: e5941064 ldr r1, [r4, #100] ; 0x64
30004458: e2800001 add r0, r0, #1
3000445c: eb00300a bl 3001048c <__umodsi3>
c = tty->rawInBuf.theBuf[newHead];
30004460: e5943058 ldr r3, [r4, #88] ; 0x58
30004464: e7d36000 ldrb r6, [r3, r0]
tty->rawInBuf.Head = newHead;
30004468: e584005c str r0, [r4, #92] ; 0x5c
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
3000446c: e5943060 ldr r3, [r4, #96] ; 0x60
30004470: e5942064 ldr r2, [r4, #100] ; 0x64
% tty->rawInBuf.Size)
30004474: 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)
30004478: e0823003 add r3, r2, r3
% tty->rawInBuf.Size)
3000447c: e0600003 rsb r0, r0, r3
30004480: eb003001 bl 3001048c <__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)
30004484: e59430bc ldr r3, [r4, #188] ; 0xbc
30004488: e1500003 cmp r0, r3
3000448c: 2a000012 bcs 300044dc <rtems_termios_read+0x214>
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
30004490: e59420b8 ldr r2, [r4, #184] ; 0xb8
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
30004494: e59f31c8 ldr r3, [pc, #456] ; 30004664 <rtems_termios_read+0x39c>
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
30004498: e3c22001 bic r2, r2, #1
3000449c: e58420b8 str r2, [r4, #184] ; 0xb8
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
300044a0: e59420b8 ldr r2, [r4, #184] ; 0xb8
300044a4: e0023003 and r3, r2, r3
300044a8: e153000b cmp r3, fp
300044ac: 0a000022 beq 3000453c <rtems_termios_read+0x274>
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
300044b0: e59430b8 ldr r3, [r4, #184] ; 0xb8
300044b4: e3130c01 tst r3, #256 ; 0x100
300044b8: 0a000007 beq 300044dc <rtems_termios_read+0x214>
tty->flow_ctrl &= ~FL_IRTSOFF;
300044bc: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
300044c0: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
300044c4: e3c22004 bic r2, r2, #4 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
300044c8: e3530000 cmp r3, #0 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
300044cc: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
tty->device.startRemoteTx(tty->minor);
300044d0: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
300044d4: 11a0e00f movne lr, pc <== NOT EXECUTED
300044d8: 112fff13 bxne r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
300044dc: e594303c ldr r3, [r4, #60] ; 0x3c
300044e0: e3130002 tst r3, #2
300044e4: 1affffca bne 30004414 <rtems_termios_read+0x14c>
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
300044e8: e1a00006 mov r0, r6 <== NOT EXECUTED
300044ec: e1a01004 mov r1, r4 <== NOT EXECUTED
300044f0: ebffff2b bl 300041a4 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
300044f4: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
300044f8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
300044fc: e5946070 ldr r6, [r4, #112] ; 0x70 <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
30004500: e1520003 cmp r2, r3 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004504: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED
30004508: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
3000450c: a3a05000 movge r5, #0 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004510: e1520003 cmp r2, r3 <== NOT EXECUTED
30004514: 1affffc8 bne 3000443c <rtems_termios_read+0x174> <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
30004518: e3550000 cmp r5, #0
3000451c: 0affff8d beq 30004358 <rtems_termios_read+0x90>
sc = rtems_semaphore_obtain(
30004520: e5940068 ldr r0, [r4, #104] ; 0x68
30004524: e594106c ldr r1, [r4, #108] ; 0x6c
30004528: e1a02006 mov r2, r6
3000452c: eb00046b bl 300056e0 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
30004530: e3500000 cmp r0, #0
30004534: 0affffb1 beq 30004400 <rtems_termios_read+0x138>
30004538: eaffff86 b 30004358 <rtems_termios_read+0x90> <== NOT EXECUTED
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
3000453c: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
30004540: e3530000 cmp r3, #0 <== NOT EXECUTED
30004544: 0a000002 beq 30004554 <rtems_termios_read+0x28c> <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
30004548: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000454c: e3130020 tst r3, #32 <== NOT EXECUTED
30004550: 0affffd6 beq 300044b0 <rtems_termios_read+0x1e8> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
30004554: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
30004558: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
3000455c: e3a02001 mov r2, #1 <== NOT EXECUTED
30004560: e1a0e00f mov lr, pc <== NOT EXECUTED
30004564: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
30004568: eaffffdb b 300044dc <rtems_termios_read+0x214> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
3000456c: e594203c ldr r2, [r4, #60] ; 0x3c
30004570: e3120002 tst r2, #2
30004574: 0a00000b beq 300045a8 <rtems_termios_read+0x2e0>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
30004578: e5940010 ldr r0, [r4, #16]
3000457c: e1a0e00f mov lr, pc
30004580: e12fff13 bx r3
if (n < 0) {
30004584: e3500000 cmp r0, #0
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
30004588: e1a01004 mov r1, r4
3000458c: e20000ff and r0, r0, #255 ; 0xff
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
30004590: ba00002d blt 3000464c <rtems_termios_read+0x384>
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
30004594: ebffff02 bl 300041a4 <siproc>
30004598: e3500000 cmp r0, #0
3000459c: 1affff6d bne 30004358 <rtems_termios_read+0x90>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
300045a0: e59430a0 ldr r3, [r4, #160] ; 0xa0
300045a4: eafffff3 b 30004578 <rtems_termios_read+0x2b0>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
300045a8: eb0002ac bl 30005060 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
300045ac: e1a05000 mov r5, r0 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
300045b0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
300045b4: e1a0e00f mov lr, pc <== NOT EXECUTED
300045b8: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (n < 0) {
300045bc: e3500000 cmp r0, #0 <== NOT EXECUTED
300045c0: ba00000c blt 300045f8 <rtems_termios_read+0x330> <== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
300045c4: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
300045c8: e1a01004 mov r1, r4 <== NOT EXECUTED
300045cc: ebfffef4 bl 300041a4 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
300045d0: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
300045d4: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
300045d8: e1520003 cmp r2, r3 <== NOT EXECUTED
300045dc: aaffff5d bge 30004358 <rtems_termios_read+0x90> <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
300045e0: e3530000 cmp r3, #0 <== NOT EXECUTED
300045e4: 0afffff1 beq 300045b0 <rtems_termios_read+0x2e8> <== NOT EXECUTED
300045e8: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
300045ec: e3530000 cmp r3, #0 <== NOT EXECUTED
300045f0: 0affffee beq 300045b0 <rtems_termios_read+0x2e8> <== NOT EXECUTED
300045f4: eaffffeb b 300045a8 <rtems_termios_read+0x2e0> <== NOT EXECUTED
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
300045f8: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
300045fc: e3530000 cmp r3, #0 <== NOT EXECUTED
30004600: 0a000008 beq 30004628 <rtems_termios_read+0x360> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
30004604: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
30004608: e3530000 cmp r3, #0 <== NOT EXECUTED
3000460c: 0a000002 beq 3000461c <rtems_termios_read+0x354> <== NOT EXECUTED
30004610: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
30004614: e3530000 cmp r3, #0 <== NOT EXECUTED
30004618: 1a000005 bne 30004634 <rtems_termios_read+0x36c> <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
3000461c: e3a00001 mov r0, #1 <== NOT EXECUTED
30004620: eb000565 bl 30005bbc <rtems_task_wake_after> <== NOT EXECUTED
30004624: eaffffe1 b 300045b0 <rtems_termios_read+0x2e8> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
30004628: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
3000462c: e3530000 cmp r3, #0 <== NOT EXECUTED
30004630: 0affff48 beq 30004358 <rtems_termios_read+0x90> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
30004634: eb000289 bl 30005060 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
30004638: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED
3000463c: e0650000 rsb r0, r5, r0 <== NOT EXECUTED
30004640: e1500003 cmp r0, r3 <== NOT EXECUTED
30004644: 9afffff4 bls 3000461c <rtems_termios_read+0x354> <== NOT EXECUTED
30004648: eaffff42 b 30004358 <rtems_termios_read+0x90> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
3000464c: e3a00001 mov r0, #1
30004650: eb000559 bl 30005bbc <rtems_task_wake_after>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
30004654: e59430a0 ldr r3, [r4, #160] ; 0xa0
30004658: eaffffc6 b 30004578 <rtems_termios_read+0x2b0>
300049ec <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))
300049ec: e59020b8 ldr r2, [r0, #184] ; 0xb8
300049f0: e59f31f4 ldr r3, [pc, #500] ; 30004bec <rtems_termios_refill_transmitter+0x200>
* 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)
{
300049f4: 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))
300049f8: e0023003 and r3, r2, r3
300049fc: e59f21ec ldr r2, [pc, #492] ; 30004bf0 <rtems_termios_refill_transmitter+0x204>
* 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)
{
30004a00: 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))
30004a04: e1530002 cmp r3, r2
30004a08: 0a000048 beq 30004b30 <rtems_termios_refill_transmitter+0x144>
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
30004a0c: e59030b8 ldr r3, [r0, #184] ; 0xb8
30004a10: e2033003 and r3, r3, #3
30004a14: e3530002 cmp r3, #2
30004a18: 0a000056 beq 30004b78 <rtems_termios_refill_transmitter+0x18c>
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
30004a1c: e5902080 ldr r2, [r0, #128] ; 0x80
30004a20: e5903084 ldr r3, [r0, #132] ; 0x84
30004a24: e1520003 cmp r2, r3
30004a28: 0a00002a beq 30004ad8 <rtems_termios_refill_transmitter+0xec>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30004a2c: e10f3000 mrs r3, CPSR
30004a30: e3832080 orr r2, r3, #128 ; 0x80
30004a34: e129f002 msr CPSR_fc, r2
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
30004a38: e3a02000 mov r2, #0
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
30004a3c: e5900090 ldr r0, [r0, #144] ; 0x90
tty->t_dqlen = 0;
30004a40: e5842090 str r2, [r4, #144] ; 0x90
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30004a44: e129f003 msr CPSR_fc, r3
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
30004a48: e5943084 ldr r3, [r4, #132] ; 0x84
30004a4c: e5941088 ldr r1, [r4, #136] ; 0x88
30004a50: e0800003 add r0, r0, r3
30004a54: eb002e8c bl 3001048c <__umodsi3>
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
30004a58: 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;
30004a5c: e1a05000 mov r5, r0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
30004a60: e3530002 cmp r3, #2
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
30004a64: e5840084 str r0, [r4, #132] ; 0x84
if (tty->rawOutBufState == rob_wait) {
30004a68: 0a00002d beq 30004b24 <rtems_termios_refill_transmitter+0x138>
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
30004a6c: e5943080 ldr r3, [r4, #128] ; 0x80
30004a70: e1530005 cmp r3, r5
30004a74: 0a00001f beq 30004af8 <rtems_termios_refill_transmitter+0x10c>
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
30004a78: e59430b8 ldr r3, [r4, #184] ; 0xb8
30004a7c: e2033e21 and r3, r3, #528 ; 0x210
30004a80: e3530e21 cmp r3, #528 ; 0x210
30004a84: 0a00004d beq 30004bc0 <rtems_termios_refill_transmitter+0x1d4>
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
30004a88: 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)(
30004a8c: e594107c ldr r1, [r4, #124] ; 0x7c
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
30004a90: e1550003 cmp r5, r3
nToSend = tty->rawOutBuf.Size - newTail;
30004a94: 85946088 ldrhi r6, [r4, #136] ; 0x88
else
nToSend = tty->rawOutBuf.Head - newTail;
30004a98: 95946080 ldrls r6, [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)) {
30004a9c: e59430b8 ldr r3, [r4, #184] ; 0xb8
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
30004aa0: 80656006 rsbhi r6, r5, r6
else
nToSend = tty->rawOutBuf.Head - newTail;
30004aa4: 90656006 rsbls r6, r5, r6
/* 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)) {
30004aa8: e3130c06 tst r3, #1536 ; 0x600
30004aac: 13a06001 movne r6, #1
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
30004ab0: e3a03001 mov r3, #1
nToSend = tty->rawOutBuf.Head - newTail;
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
30004ab4: e1a02006 mov r2, r6
}
tty->rawOutBufState = rob_busy; /*apm*/
30004ab8: e5843094 str r3, [r4, #148] ; 0x94
(*tty->device.write)(
30004abc: e5940010 ldr r0, [r4, #16]
30004ac0: e0811005 add r1, r1, r5
30004ac4: e1a0e00f mov lr, pc
30004ac8: e594f0a4 ldr pc, [r4, #164] ; 0xa4
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
30004acc: e5845084 str r5, [r4, #132] ; 0x84
}
return nToSend;
}
30004ad0: e1a00006 mov r0, r6
30004ad4: e8bd8070 pop {r4, r5, r6, pc}
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
30004ad8: e5903094 ldr r3, [r0, #148] ; 0x94
30004adc: e3530002 cmp r3, #2
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
30004ae0: 13a06000 movne r6, #0
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
30004ae4: 1afffff9 bne 30004ad0 <rtems_termios_refill_transmitter+0xe4>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
30004ae8: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED
30004aec: eb000344 bl 30005804 <rtems_semaphore_release> <== NOT EXECUTED
}
return 0;
30004af0: e3a06000 mov r6, #0 <== NOT EXECUTED
30004af4: eafffff5 b 30004ad0 <rtems_termios_refill_transmitter+0xe4><== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
30004af8: e59430d4 ldr r3, [r4, #212] ; 0xd4
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
30004afc: e3a06000 mov r6, #0
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
30004b00: e1530006 cmp r3, r6
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
30004b04: e5846094 str r6, [r4, #148] ; 0x94
nToSend = 0;
30004b08: 01a06003 moveq r6, r3
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
30004b0c: 0affffee beq 30004acc <rtems_termios_refill_transmitter+0xe0>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
30004b10: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
30004b14: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED
30004b18: e1a0e00f mov lr, pc <== NOT EXECUTED
30004b1c: e12fff13 bx r3 <== NOT EXECUTED
30004b20: eaffffe9 b 30004acc <rtems_termios_refill_transmitter+0xe0><== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
30004b24: e594008c ldr r0, [r4, #140] ; 0x8c
30004b28: eb000335 bl 30005804 <rtems_semaphore_release>
30004b2c: eaffffce b 30004a6c <rtems_termios_refill_transmitter+0x80>
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
30004b30: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED
30004b34: e3a02001 mov r2, #1 <== NOT EXECUTED
30004b38: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
30004b3c: e1a0e00f mov lr, pc <== NOT EXECUTED
30004b40: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30004b44: e10f3000 mrs r3, CPSR <== NOT EXECUTED
30004b48: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
30004b4c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->t_dqlen--;
30004b50: e5941090 ldr r1, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
30004b54: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
30004b58: e2411001 sub r1, r1, #1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
30004b5c: e3822002 orr r2, r2, #2 <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
30004b60: e5841090 str r1, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
30004b64: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30004b68: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
30004b6c: e3a06001 mov r6, #1 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
30004b70: e1a00006 mov r0, r6 <== NOT EXECUTED
30004b74: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
30004b78: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED
30004b7c: e3a02001 mov r2, #1 <== NOT EXECUTED
30004b80: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
30004b84: e1a0e00f mov lr, pc <== NOT EXECUTED
30004b88: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30004b8c: e10f3000 mrs r3, CPSR <== NOT EXECUTED
30004b90: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
30004b94: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->t_dqlen--;
30004b98: e5941090 ldr r1, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
30004b9c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
30004ba0: e2411001 sub r1, r1, #1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
30004ba4: e3c22002 bic r2, r2, #2 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
30004ba8: e5841090 str r1, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
30004bac: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30004bb0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
30004bb4: e3a06001 mov r6, #1 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
30004bb8: e1a00006 mov r0, r6 <== NOT EXECUTED
30004bbc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30004bc0: e10f3000 mrs r3, CPSR <== NOT EXECUTED
30004bc4: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
30004bc8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
30004bcc: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004bd0: e3822020 orr r2, r2, #32 <== NOT EXECUTED
30004bd4: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
30004bd8: e3a02001 mov r2, #1 <== NOT EXECUTED
30004bdc: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30004be0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 0;
30004be4: e3a06000 mov r6, #0 <== NOT EXECUTED
30004be8: eaffffb7 b 30004acc <rtems_termios_refill_transmitter+0xe0><== NOT EXECUTED
30004960 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
30004960: e92d40f0 push {r4, r5, r6, r7, lr}
30004964: e24dd008 sub sp, sp, #8
30004968: e1a04000 mov r4, r0
3000496c: e28d7007 add r7, sp, #7
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
30004970: e3a06000 mov r6, #0
30004974: ea000005 b 30004990 <rtems_termios_rxdaemon+0x30>
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
30004978: e5940010 ldr r0, [r4, #16]
3000497c: e1a0e00f mov lr, pc
30004980: e594f0a0 ldr pc, [r4, #160] ; 0xa0
if (c != EOF) {
30004984: e3700001 cmn r0, #1
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
30004988: e1a03000 mov r3, r0
if (c != EOF) {
3000498c: 1a000010 bne 300049d4 <rtems_termios_rxdaemon+0x74>
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
30004990: e1a0300d mov r3, sp
30004994: e3a01002 mov r1, #2
30004998: e3a02000 mov r2, #0
3000499c: e3a00003 mov r0, #3
300049a0: eb0001ce bl 300050e0 <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) {
300049a4: e59d3000 ldr r3, [sp]
300049a8: e3130001 tst r3, #1
300049ac: 0afffff1 beq 30004978 <rtems_termios_rxdaemon+0x18>
tty->rxTaskId = 0;
300049b0: e58460c4 str r6, [r4, #196] ; 0xc4 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
300049b4: e1a00006 mov r0, r6 <== NOT EXECUTED
300049b8: eb00040a bl 300059e8 <rtems_task_delete> <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
300049bc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
300049c0: e1a0e00f mov lr, pc <== NOT EXECUTED
300049c4: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (c != EOF) {
300049c8: e3700001 cmn r0, #1 <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
300049cc: e1a03000 mov r3, r0 <== NOT EXECUTED
if (c != EOF) {
300049d0: 0affffee beq 30004990 <rtems_termios_rxdaemon+0x30> <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
300049d4: e1a00004 mov r0, r4
300049d8: e1a01007 mov r1, r7
300049dc: e3a02001 mov r2, #1
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
300049e0: e5cd3007 strb r3, [sp, #7]
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
300049e4: ebffff22 bl 30004674 <rtems_termios_enqueue_raw_characters>
300049e8: eaffffe8 b 30004990 <rtems_termios_rxdaemon+0x30>
30004bf4 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
30004bf4: e92d40f0 push {r4, r5, r6, r7, lr}
30004bf8: e59f6060 ldr r6, [pc, #96] ; 30004c60 <rtems_termios_txdaemon+0x6c>
30004bfc: e24dd004 sub sp, sp, #4
30004c00: e1a04000 mov r4, r0
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
30004c04: e3a07000 mov r7, #0
30004c08: ea000008 b 30004c30 <rtems_termios_txdaemon+0x3c>
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
30004c0c: e59430cc ldr r3, [r4, #204] ; 0xcc
rtems_termios_linesw[tty->t_line].l_start(tty);
30004c10: e1a00004 mov r0, r4
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
30004c14: e0863283 add r3, r6, r3, lsl #5
30004c18: e5933014 ldr r3, [r3, #20]
30004c1c: e3530000 cmp r3, #0
rtems_termios_linesw[tty->t_line].l_start(tty);
30004c20: 11a0e00f movne lr, pc
30004c24: 112fff13 bxne r3
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
30004c28: e1a00004 mov r0, r4
30004c2c: ebffff6e bl 300049ec <rtems_termios_refill_transmitter>
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
30004c30: e1a0300d mov r3, sp
30004c34: e3a01002 mov r1, #2
30004c38: e3a02000 mov r2, #0
30004c3c: e3a00003 mov r0, #3
30004c40: eb000126 bl 300050e0 <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) {
30004c44: e59d3000 ldr r3, [sp]
30004c48: e3130001 tst r3, #1
30004c4c: 0affffee beq 30004c0c <rtems_termios_txdaemon+0x18>
tty->txTaskId = 0;
30004c50: e58470c8 str r7, [r4, #200] ; 0xc8 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
30004c54: e1a00007 mov r0, r7 <== NOT EXECUTED
30004c58: eb000362 bl 300059e8 <rtems_task_delete> <== NOT EXECUTED
30004c5c: eaffffea b 30004c0c <rtems_termios_txdaemon+0x18> <== NOT EXECUTED
30006ac4 <rtems_verror>:
{
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
30006ac4: e3100202 tst r0, #536870912 ; 0x20000000
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
30006ac8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
30006acc: e1a04000 mov r4, r0
30006ad0: e1a08001 mov r8, r1
30006ad4: e1a06002 mov r6, r2
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
30006ad8: 0a00000d beq 30006b14 <rtems_verror+0x50>
if (rtems_panic_in_progress++)
30006adc: e59f212c ldr r2, [pc, #300] ; 30006c10 <rtems_verror+0x14c>
30006ae0: e5921000 ldr r1, [r2]
30006ae4: e2813001 add r3, r1, #1
30006ae8: e3510000 cmp r1, #0
30006aec: e5823000 str r3, [r2]
30006af0: 0a000004 beq 30006b08 <rtems_verror+0x44>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
30006af4: e59f3118 ldr r3, [pc, #280] ; 30006c14 <rtems_verror+0x150><== NOT EXECUTED
30006af8: e5931000 ldr r1, [r3] <== NOT EXECUTED
30006afc: e2811001 add r1, r1, #1 <== NOT EXECUTED
30006b00: e5831000 str r1, [r3] <== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
30006b04: e5923000 ldr r3, [r2] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
30006b08: e3530002 cmp r3, #2
return 0;
30006b0c: c3a06000 movgt r6, #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)
30006b10: ca000024 bgt 30006ba8 <rtems_verror+0xe4>
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
30006b14: e59f50fc ldr r5, [pc, #252] ; 30006c18 <rtems_verror+0x154>
status = error_flag & ~RTEMS_ERROR_MASK;
30006b18: e3c47207 bic r7, r4, #1879048192 ; 0x70000000
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
30006b1c: e5953000 ldr r3, [r5]
30006b20: e5930008 ldr r0, [r3, #8]
30006b24: eb002f1a bl 30012794 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
30006b28: e2144101 ands r4, r4, #1073741824 ; 0x40000000
30006b2c: 1a00002a bne 30006bdc <rtems_verror+0x118>
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
30006b30: e5953000 ldr r3, [r5]
30006b34: e1a02006 mov r2, r6
30006b38: e1a01008 mov r1, r8
30006b3c: e593000c ldr r0, [r3, #12]
30006b40: eb00478a bl 30018970 <vfprintf>
if (status)
30006b44: e3570000 cmp r7, #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);
30006b48: e1a06000 mov r6, r0
if (status)
30006b4c: 1a000017 bne 30006bb0 <rtems_verror+0xec>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
30006b50: e3540000 cmp r4, #0
30006b54: 0a00000b beq 30006b88 <rtems_verror+0xc4>
if ((local_errno > 0) && *strerror(local_errno))
30006b58: da000004 ble 30006b70 <rtems_verror+0xac>
30006b5c: e1a00004 mov r0, r4
30006b60: eb0032fa bl 30013750 <strerror>
30006b64: e5d03000 ldrb r3, [r0]
30006b68: e3530000 cmp r3, #0
30006b6c: 1a00001d bne 30006be8 <rtems_verror+0x124>
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
30006b70: e5953000 ldr r3, [r5]
30006b74: e59f10a0 ldr r1, [pc, #160] ; 30006c1c <rtems_verror+0x158>
30006b78: e593000c ldr r0, [r3, #12]
30006b7c: e1a02004 mov r2, r4
30006b80: eb002fe9 bl 30012b2c <fprintf>
30006b84: e0866000 add r6, r6, r0
}
chars_written += fprintf(stderr, "\n");
30006b88: e5953000 ldr r3, [r5]
30006b8c: e59f108c ldr r1, [pc, #140] ; 30006c20 <rtems_verror+0x15c>
30006b90: e593000c ldr r0, [r3, #12]
30006b94: eb002fe4 bl 30012b2c <fprintf>
(void) fflush(stderr);
30006b98: 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");
30006b9c: e0806006 add r6, r0, r6
(void) fflush(stderr);
30006ba0: e593000c ldr r0, [r3, #12]
30006ba4: eb002efa bl 30012794 <fflush>
return chars_written;
}
30006ba8: e1a00006 mov r0, r6
30006bac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
30006bb0: e59f3060 ldr r3, [pc, #96] ; 30006c18 <rtems_verror+0x154>
30006bb4: e1a00007 mov r0, r7
30006bb8: e5933000 ldr r3, [r3]
30006bbc: e593700c ldr r7, [r3, #12]
30006bc0: ebffffbb bl 30006ab4 <rtems_status_text>
30006bc4: e59f1058 ldr r1, [pc, #88] ; 30006c24 <rtems_verror+0x160>
30006bc8: e1a02000 mov r2, r0
30006bcc: e1a00007 mov r0, r7
30006bd0: eb002fd5 bl 30012b2c <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
30006bd4: e0866000 add r6, r6, r0
30006bd8: eaffffdc b 30006b50 <rtems_verror+0x8c>
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
30006bdc: eb002df5 bl 300123b8 <__errno>
30006be0: e5904000 ldr r4, [r0]
30006be4: eaffffd1 b 30006b30 <rtems_verror+0x6c>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
30006be8: e5953000 ldr r3, [r5]
30006bec: e1a00004 mov r0, r4
30006bf0: e593400c ldr r4, [r3, #12]
30006bf4: eb0032d5 bl 30013750 <strerror>
30006bf8: e59f1028 ldr r1, [pc, #40] ; 30006c28 <rtems_verror+0x164>
30006bfc: e1a02000 mov r2, r0
30006c00: e1a00004 mov r0, r4
30006c04: eb002fc8 bl 30012b2c <fprintf>
30006c08: e0866000 add r6, r6, r0
30006c0c: eaffffdd b 30006b88 <rtems_verror+0xc4>
300027f0 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
300027f0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
300027f4: e3a06000 mov r6, #0
int d;
for (;;) {
c = getc(fp);
300027f8: e59f90f8 ldr r9, [pc, #248] ; 300028f8 <scanInt+0x108>
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
300027fc: e59f80f8 ldr r8, [pc, #248] ; 300028fc <scanInt+0x10c>
return 0;
d = c - '0';
if ((i > (limit / 10))
30002800: e59fa0f8 ldr sl, [pc, #248] ; 30002900 <scanInt+0x110>
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
30002804: e1a04000 mov r4, r0
30002808: e1a0b001 mov fp, r1
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
3000280c: e3e07102 mvn r7, #-2147483648 ; 0x80000000
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
30002810: e1a05006 mov r5, r6
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
30002814: e5943004 ldr r3, [r4, #4]
30002818: e2433001 sub r3, r3, #1
3000281c: e3530000 cmp r3, #0
30002820: e5843004 str r3, [r4, #4]
30002824: ba00001d blt 300028a0 <scanInt+0xb0>
30002828: e5943000 ldr r3, [r4]
3000282c: e4d30001 ldrb r0, [r3], #1
if (c == ':')
30002830: e350003a cmp r0, #58 ; 0x3a
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
30002834: e5843000 str r3, [r4]
if (c == ':')
30002838: 0a00001d beq 300028b4 <scanInt+0xc4>
break;
if (sign == 0) {
3000283c: e3560000 cmp r6, #0
30002840: 1a000004 bne 30002858 <scanInt+0x68>
if (c == '-') {
30002844: e350002d cmp r0, #45 ; 0x2d
sign = -1;
limit++;
30002848: 02877001 addeq r7, r7, #1
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
3000284c: 03e06000 mvneq r6, #0
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
30002850: 0affffef beq 30002814 <scanInt+0x24>
sign = -1;
limit++;
continue;
}
sign = 1;
30002854: e3a06001 mov r6, #1
}
if (!isdigit(c))
30002858: e5983000 ldr r3, [r8]
3000285c: e0833000 add r3, r3, r0
30002860: e5d33001 ldrb r3, [r3, #1]
30002864: e2133004 ands r3, r3, #4
30002868: 0a00001e beq 300028e8 <scanInt+0xf8>
return 0;
d = c - '0';
if ((i > (limit / 10))
3000286c: e083279a umull r2, r3, sl, r7
30002870: e15501a3 cmp r5, r3, lsr #3
30002874: 8a000019 bhi 300028e0 <scanInt+0xf0>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
30002878: e2400030 sub r0, r0, #48 ; 0x30
3000287c: 11a03105 lslne r3, r5, #2
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
30002880: 0a000011 beq 300028cc <scanInt+0xdc>
return 0;
i = i * 10 + d;
30002884: e0835005 add r5, r3, r5
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
30002888: e5943004 ldr r3, [r4, #4]
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
3000288c: e0805085 add r5, r0, r5, lsl #1
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
30002890: e2433001 sub r3, r3, #1
30002894: e3530000 cmp r3, #0
30002898: e5843004 str r3, [r4, #4]
3000289c: aaffffe1 bge 30002828 <scanInt+0x38>
300028a0: e5990000 ldr r0, [r9] <== NOT EXECUTED
300028a4: e1a01004 mov r1, r4 <== NOT EXECUTED
300028a8: eb00328c bl 3000f2e0 <__srget_r> <== NOT EXECUTED
if (c == ':')
300028ac: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED
300028b0: 1affffe1 bne 3000283c <scanInt+0x4c> <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
300028b4: e3560000 cmp r6, #0
300028b8: 0a00000c beq 300028f0 <scanInt+0x100>
return 0;
*val = i * sign;
300028bc: e0050596 mul r5, r6, r5
return 1;
300028c0: e3a00001 mov r0, #1
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
300028c4: e58b5000 str r5, [fp]
return 1;
300028c8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
300028cc: e1a03105 lsl r3, r5, #2 <== NOT EXECUTED
300028d0: e0832005 add r2, r3, r5 <== NOT EXECUTED
300028d4: e0472082 sub r2, r7, r2, lsl #1 <== NOT EXECUTED
300028d8: e1500002 cmp r0, r2 <== NOT EXECUTED
300028dc: 9affffe8 bls 30002884 <scanInt+0x94> <== NOT EXECUTED
return 0;
300028e0: e3a00000 mov r0, #0 <== NOT EXECUTED
300028e4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
continue;
}
sign = 1;
}
if (!isdigit(c))
return 0;
300028e8: e1a00003 mov r0, r3
300028ec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
300028f0: e1a00006 mov r0, r6 <== NOT EXECUTED
*val = i * sign;
return 1;
}
300028f4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
30002904 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
30002904: e92d41f0 push {r4, r5, r6, r7, r8, lr}
30002908: e1a05002 mov r5, r2
int c;
*name = *bufp;
3000290c: e5922000 ldr r2, [r2]
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
30002910: e59d7018 ldr r7, [sp, #24]
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
30002914: e59f60d8 ldr r6, [pc, #216] ; 300029f4 <scanString+0xf0>
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
30002918: e1a04000 mov r4, r0
3000291c: e1a08003 mov r8, r3
int c;
*name = *bufp;
30002920: e5812000 str r2, [r1]
30002924: ea000013 b 30002978 <scanString+0x74>
for (;;) {
c = getc(fp);
30002928: e5943000 ldr r3, [r4]
3000292c: e4d30001 ldrb r0, [r3], #1
if (c == ':') {
30002930: e350003a cmp r0, #58 ; 0x3a
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
30002934: e5843000 str r3, [r4]
if (c == ':') {
30002938: 0a000018 beq 300029a0 <scanString+0x9c>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
3000293c: e350000a cmp r0, #10
30002940: 0a000025 beq 300029dc <scanString+0xd8>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
30002944: e3700001 cmn r0, #1
30002948: 0a000021 beq 300029d4 <scanString+0xd0>
return 0;
if (*nleft < 2)
3000294c: e5983000 ldr r3, [r8]
30002950: e3530001 cmp r3, #1
30002954: 9a000024 bls 300029ec <scanString+0xe8>
return 0;
**bufp = c;
30002958: e5953000 ldr r3, [r5]
3000295c: e5c30000 strb r0, [r3]
++(*bufp);
30002960: e5952000 ldr r2, [r5]
--(*nleft);
30002964: e5983000 ldr r3, [r8]
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
30002968: e2822001 add r2, r2, #1
--(*nleft);
3000296c: e2433001 sub r3, r3, #1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
30002970: e5852000 str r2, [r5]
--(*nleft);
30002974: e5883000 str r3, [r8]
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
30002978: e5943004 ldr r3, [r4, #4]
3000297c: e2433001 sub r3, r3, #1
30002980: e3530000 cmp r3, #0
30002984: e5843004 str r3, [r4, #4]
30002988: aaffffe6 bge 30002928 <scanString+0x24>
3000298c: e5960000 ldr r0, [r6]
30002990: e1a01004 mov r1, r4
30002994: eb003251 bl 3000f2e0 <__srget_r>
if (c == ':') {
30002998: e350003a cmp r0, #58 ; 0x3a
3000299c: 1affffe6 bne 3000293c <scanString+0x38>
if (nlFlag)
300029a0: e3570000 cmp r7, #0
300029a4: 1a00000a bne 300029d4 <scanString+0xd0>
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
300029a8: e5953000 ldr r3, [r5]
300029ac: e3a02000 mov r2, #0
300029b0: e5c32000 strb r2, [r3]
++(*bufp);
300029b4: e5952000 ldr r2, [r5]
--(*nleft);
300029b8: e5983000 ldr r3, [r8]
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
300029bc: e2822001 add r2, r2, #1
--(*nleft);
300029c0: e2433001 sub r3, r3, #1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
300029c4: e5852000 str r2, [r5]
--(*nleft);
return 1;
300029c8: e3a00001 mov r0, #1
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
--(*nleft);
300029cc: e5883000 str r3, [r8]
return 1;
300029d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
return 0;
300029d4: e3a00000 mov r0, #0
300029d8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
300029dc: e3570000 cmp r7, #0
300029e0: 1afffff0 bne 300029a8 <scanString+0xa4>
return 0;
300029e4: e1a00007 mov r0, r7
300029e8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
break;
}
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
300029ec: e3a00000 mov r0, #0 <== NOT EXECUTED
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
300029f0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
300029f8 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
300029f8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
300029fc: e24dd014 sub sp, sp, #20
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
30002a00: e28d5008 add r5, sp, #8
30002a04: e28d4004 add r4, sp, #4
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
30002a08: e58d2008 str r2, [sp, #8]
30002a0c: e58d3004 str r3, [sp, #4]
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
30002a10: e3a06000 mov r6, #0
30002a14: e1a02005 mov r2, r5
30002a18: e1a03004 mov r3, r4
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
30002a1c: e1a07000 mov r7, r0
30002a20: e1a08001 mov r8, r1
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
30002a24: e58d6000 str r6, [sp]
30002a28: ebffffb5 bl 30002904 <scanString>
30002a2c: e3500000 cmp r0, #0
30002a30: 1a000001 bne 30002a3c <scangr+0x44>
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
30002a34: e28dd014 add sp, sp, #20
30002a38: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
30002a3c: e1a00007 mov r0, r7
30002a40: e2881004 add r1, r8, #4
30002a44: e1a02005 mov r2, r5
30002a48: e1a03004 mov r3, r4
30002a4c: e58d6000 str r6, [sp]
30002a50: ebffffab bl 30002904 <scanString>
30002a54: e3500000 cmp r0, #0
30002a58: 0afffff5 beq 30002a34 <scangr+0x3c>
|| !scanInt(fp, &grgid)
30002a5c: e1a00007 mov r0, r7
30002a60: e28d1010 add r1, sp, #16
30002a64: ebffff61 bl 300027f0 <scanInt>
30002a68: e3500000 cmp r0, #0
30002a6c: 0afffff0 beq 30002a34 <scangr+0x3c>
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
30002a70: e3a06001 mov r6, #1
30002a74: e1a00007 mov r0, r7
30002a78: e28d100c add r1, sp, #12
30002a7c: e1a02005 mov r2, r5
30002a80: e1a03004 mov r3, r4
30002a84: e58d6000 str r6, [sp]
30002a88: ebffff9d bl 30002904 <scanString>
30002a8c: e3500000 cmp r0, #0
30002a90: 0affffe7 beq 30002a34 <scangr+0x3c>
return 0;
grp->gr_gid = grgid;
30002a94: e1dd31b0 ldrh r3, [sp, #16]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002a98: e59d100c ldr r1, [sp, #12]
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
30002a9c: e1c830b8 strh r3, [r8, #8]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002aa0: e5d13000 ldrb r3, [r1]
30002aa4: e3530000 cmp r3, #0
30002aa8: 03a06017 moveq r6, #23
30002aac: 0a000007 beq 30002ad0 <scangr+0xd8>
30002ab0: e1a02001 mov r2, r1
if(*cp == ',')
30002ab4: e353002c cmp r3, #44 ; 0x2c
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002ab8: e5f23001 ldrb r3, [r2, #1]!
if(*cp == ',')
memcount++;
30002abc: 02866001 addeq r6, r6, #1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002ac0: e3530000 cmp r3, #0
30002ac4: 1afffffa bne 30002ab4 <scangr+0xbc>
30002ac8: e1a06106 lsl r6, r6, #2
30002acc: e2866013 add r6, r6, #19
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
30002ad0: e59d3004 ldr r3, [sp, #4]
30002ad4: e1530006 cmp r3, r6
return 0;
30002ad8: 33a00000 movcc r0, #0
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
30002adc: 3affffd4 bcc 30002a34 <scangr+0x3c>
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
30002ae0: e59d0008 ldr r0, [sp, #8]
30002ae4: e280000f add r0, r0, #15
30002ae8: e3c0000f bic r0, r0, #15
30002aec: e588000c str r0, [r8, #12]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
30002af0: e5801000 str r1, [r0]
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002af4: e59d200c ldr r2, [sp, #12]
30002af8: e5d23000 ldrb r3, [r2]
30002afc: e3530000 cmp r3, #0
30002b00: 0a000010 beq 30002b48 <scangr+0x150>
}
/*
* Extract a single group record from the database
*/
static int scangr(
30002b04: e2822001 add r2, r2, #1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002b08: e3a01001 mov r1, #1
if(*cp == ',') {
*cp = '\0';
30002b0c: e3a00000 mov r0, #0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
30002b10: e353002c cmp r3, #44 ; 0x2c
*cp = '\0';
30002b14: 05420001 strbeq r0, [r2, #-1]
grp->gr_mem[memcount++] = cp + 1;
30002b18: 0598300c ldreq r3, [r8, #12]
30002b1c: 07832101 streq r2, [r3, r1, lsl #2]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002b20: e4d23001 ldrb r3, [r2], #1
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
30002b24: 02811001 addeq r1, r1, #1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002b28: e3530000 cmp r3, #0
30002b2c: 1afffff7 bne 30002b10 <scangr+0x118>
30002b30: e598000c ldr r0, [r8, #12]
30002b34: e1a01101 lsl r1, r1, #2
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
30002b38: e3a03000 mov r3, #0
30002b3c: e7803001 str r3, [r0, r1]
return 1;
30002b40: e3a00001 mov r0, #1
30002b44: eaffffba b 30002a34 <scangr+0x3c>
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002b48: e3a01004 mov r1, #4 <== NOT EXECUTED
30002b4c: eafffff9 b 30002b38 <scangr+0x140> <== NOT EXECUTED
300041a4 <siproc>:
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
300041a4: e591203c ldr r2, [r1, #60] ; 0x3c
300041a8: e59f304c ldr r3, [pc, #76] ; 300041fc <siproc+0x58>
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
300041ac: 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)) {
300041b0: e0023003 and r3, r2, r3
300041b4: e3530000 cmp r3, #0
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
300041b8: e1a04001 mov r4, r1
300041bc: 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)) {
300041c0: 1a000001 bne 300041cc <siproc+0x28>
}
else {
i = iproc (c, tty);
}
return i;
}
300041c4: 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);
300041c8: eaffff81 b 30003fd4 <iproc> <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
300041cc: e3a01000 mov r1, #0
300041d0: e1a02001 mov r2, r1
300041d4: e5940018 ldr r0, [r4, #24]
300041d8: eb000540 bl 300056e0 <rtems_semaphore_obtain>
i = iproc (c, tty);
300041dc: e1a01004 mov r1, r4
300041e0: e1a00005 mov r0, r5
300041e4: ebffff7a bl 30003fd4 <iproc>
300041e8: e1a05000 mov r5, r0
rtems_semaphore_release (tty->osem);
300041ec: e5940018 ldr r0, [r4, #24]
300041f0: eb000583 bl 30005804 <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
300041f4: e1a00005 mov r0, r5
300041f8: e8bd8030 pop {r4, r5, pc}
30006098 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
30006098: e92d40f0 push {r4, r5, r6, r7, lr}
3000609c: e24dd030 sub sp, sp, #48 ; 0x30
300060a0: e1a07000 mov r7, r0
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
300060a4: ebfff472 bl 30003274 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
300060a8: e2505000 subs r5, r0, #0
300060ac: 1a000039 bne 30006198 <unlink+0x100>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
300060b0: e28d4018 add r4, sp, #24
300060b4: e1a00007 mov r0, r7
300060b8: e28d102c add r1, sp, #44 ; 0x2c
300060bc: e1a02004 mov r2, r4
300060c0: ebfff87a bl 300042b0 <rtems_filesystem_get_start_loc>
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
300060c4: e1a06005 mov r6, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
300060c8: e28dc004 add ip, sp, #4
300060cc: e1a0e004 mov lr, r4
300060d0: e8be000f ldm lr!, {r0, r1, r2, r3}
300060d4: e8ac000f stmia ip!, {r0, r1, r2, r3}
name = path + parentpathlen;
300060d8: e0875005 add r5, r7, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
300060dc: e59e3000 ldr r3, [lr]
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
300060e0: e1a00005 mov r0, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
300060e4: e58c3000 str r3, [ip]
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
300060e8: eb003006 bl 30012108 <strlen>
300060ec: e1a01000 mov r1, r0
300060f0: e1a00005 mov r0, r5
300060f4: ebfff46d bl 300032b0 <rtems_filesystem_prefix_separators>
300060f8: e0857000 add r7, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
300060fc: e1a00007 mov r0, r7
30006100: eb003000 bl 30012108 <strlen>
30006104: e28d5004 add r5, sp, #4
30006108: e1a01000 mov r1, r0
3000610c: e3a02000 mov r2, #0
30006110: e1a00007 mov r0, r7
30006114: e1a03005 mov r3, r5
30006118: e58d2000 str r2, [sp]
3000611c: ebfff408 bl 30003144 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
30006120: e3500000 cmp r0, #0
30006124: 1a000013 bne 30006178 <unlink+0xe0>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
30006128: e1a00005 mov r0, r5
3000612c: e59d3010 ldr r3, [sp, #16]
30006130: e1a0e00f mov lr, pc
30006134: e593f010 ldr pc, [r3, #16]
30006138: e3500001 cmp r0, #1
3000613c: 0a000021 beq 300061c8 <unlink+0x130>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
30006140: e1a01005 mov r1, r5
30006144: e59d3010 ldr r3, [sp, #16]
30006148: e1a00004 mov r0, r4
3000614c: e1a0e00f mov lr, pc
30006150: e593f00c ldr pc, [r3, #12]
30006154: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc );
30006158: e1a00005 mov r0, r5
3000615c: ebfff46d bl 30003318 <rtems_filesystem_freenode>
if ( free_parentloc )
30006160: e3560000 cmp r6, #0
rtems_filesystem_freenode( &parentloc );
30006164: 11a00004 movne r0, r4
30006168: 1bfff46a blne 30003318 <rtems_filesystem_freenode>
return result;
}
3000616c: e1a00007 mov r0, r7
30006170: e28dd030 add sp, sp, #48 ; 0x30
30006174: e8bd80f0 pop {r4, r5, r6, r7, pc}
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
30006178: e3560000 cmp r6, #0
3000617c: 1a000001 bne 30006188 <unlink+0xf0>
rtems_filesystem_freenode( &parentloc );
return -1;
30006180: e3e07000 mvn r7, #0 <== NOT EXECUTED
30006184: eafffff8 b 3000616c <unlink+0xd4> <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
30006188: e1a00004 mov r0, r4
3000618c: ebfff461 bl 30003318 <rtems_filesystem_freenode>
return -1;
30006190: e3e07000 mvn r7, #0
30006194: eafffff4 b 3000616c <unlink+0xd4>
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
30006198: e3a03000 mov r3, #0
3000619c: e28d4018 add r4, sp, #24
300061a0: e58d3000 str r3, [sp]
300061a4: e3a02002 mov r2, #2
300061a8: e1a00007 mov r0, r7
300061ac: e1a01005 mov r1, r5
300061b0: e1a03004 mov r3, r4
300061b4: ebfff40c bl 300031ec <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
300061b8: e3500000 cmp r0, #0
300061bc: 1affffef bne 30006180 <unlink+0xe8>
return -1;
free_parentloc = true;
300061c0: e3a06001 mov r6, #1
300061c4: eaffffbf b 300060c8 <unlink+0x30>
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
300061c8: e1a00005 mov r0, r5
300061cc: ebfff451 bl 30003318 <rtems_filesystem_freenode>
if ( free_parentloc )
300061d0: e3560000 cmp r6, #0
rtems_filesystem_freenode( &parentloc );
300061d4: 11a00004 movne r0, r4
300061d8: 1bfff44e blne 30003318 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EISDIR );
300061dc: eb002c04 bl 300111f4 <__errno>
300061e0: e3a03015 mov r3, #21
300061e4: e5803000 str r3, [r0]
300061e8: e3e07000 mvn r7, #0
300061ec: eaffffde b 3000616c <unlink+0xd4>
300063b8 <unmount>:
*/
int unmount(
const char *path
)
{
300063b8: e92d4070 push {r4, r5, r6, lr}
300063bc: e24dd018 sub sp, sp, #24
300063c0: 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 ) )
300063c4: eb0024bd bl 3000f6c0 <strlen>
300063c8: e28d4004 add r4, sp, #4
300063cc: e1a01000 mov r1, r0
300063d0: e3a0c001 mov ip, #1
300063d4: e1a00005 mov r0, r5
300063d8: e3a02000 mov r2, #0
300063dc: e1a03004 mov r3, r4
300063e0: e58dc000 str ip, [sp]
300063e4: ebfff345 bl 30003100 <rtems_filesystem_evaluate_path>
300063e8: e3500000 cmp r0, #0
300063ec: 1a00001a bne 3000645c <unmount+0xa4>
return -1;
mt_entry = loc.mt_entry;
300063f0: 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 ){
300063f4: e59d3004 ldr r3, [sp, #4]
300063f8: e595201c ldr r2, [r5, #28]
300063fc: e1520003 cmp r2, r3
30006400: 1a00002d bne 300064bc <unmount+0x104>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
30006404: e1a00004 mov r0, r4
30006408: ebfff387 bl 3000322c <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 )
3000640c: e59f30f8 ldr r3, [pc, #248] ; 3000650c <unmount+0x154>
30006410: e5933000 ldr r3, [r3]
30006414: e5933014 ldr r3, [r3, #20]
30006418: e1530005 cmp r3, r5
3000641c: 0a00002d beq 300064d8 <unmount+0x120>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
30006420: e59f00e8 ldr r0, [pc, #232] ; 30006510 <unmount+0x158>
30006424: e595102c ldr r1, [r5, #44] ; 0x2c
30006428: ebfff5d3 bl 30003b7c <rtems_filesystem_mount_iterate>
3000642c: e3500000 cmp r0, #0
30006430: 1a000028 bne 300064d8 <unmount+0x120>
* 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 )
30006434: e1a00005 mov r0, r5
30006438: ebfff475 bl 30003614 <rtems_libio_is_open_files_in_fs>
3000643c: e3500001 cmp r0, #1
30006440: 0a000024 beq 300064d8 <unmount+0x120>
* 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 )
30006444: e5953014 ldr r3, [r5, #20]
30006448: e1a00005 mov r0, r5
3000644c: e1a0e00f mov lr, pc
30006450: e593f028 ldr pc, [r3, #40] ; 0x28
30006454: e2506000 subs r6, r0, #0
30006458: 0a000002 beq 30006468 <unmount+0xb0>
*/
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;
3000645c: e3e00000 mvn r0, #0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
30006460: e28dd018 add sp, sp, #24
30006464: e8bd8070 pop {r4, r5, r6, pc}
* 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){
30006468: e5953028 ldr r3, [r5, #40] ; 0x28
3000646c: e1a00005 mov r0, r5
30006470: e1a0e00f mov lr, pc
30006474: e593f02c ldr pc, [r3, #44] ; 0x2c
30006478: e2504000 subs r4, r0, #0
3000647c: 1a00001a bne 300064ec <unmount+0x134>
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 );
30006480: e59f608c ldr r6, [pc, #140] ; 30006514 <unmount+0x15c>
30006484: e1a01004 mov r1, r4
30006488: e1a02004 mov r2, r4
3000648c: e5960000 ldr r0, [r6]
30006490: eb0002a1 bl 30006f1c <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
30006494: e1a00005 mov r0, r5
30006498: eb0004ee bl 30007858 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
3000649c: e5960000 ldr r0, [r6]
300064a0: eb0002e6 bl 30007040 <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 );
300064a4: e2850008 add r0, r5, #8
300064a8: ebfff35f bl 3000322c <rtems_filesystem_freenode>
free( mt_entry );
300064ac: e1a00005 mov r0, r5
300064b0: ebfff362 bl 30003240 <free>
return 0;
300064b4: e1a00004 mov r0, r4
300064b8: eaffffe8 b 30006460 <unmount+0xa8>
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
rtems_filesystem_freenode( &loc );
300064bc: e1a00004 mov r0, r4
300064c0: ebfff359 bl 3000322c <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
300064c4: eb001f01 bl 3000e0d0 <__errno>
300064c8: e3a0300d mov r3, #13
300064cc: e5803000 str r3, [r0]
300064d0: e3e00000 mvn r0, #0
300064d4: eaffffe1 b 30006460 <unmount+0xa8>
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
rtems_set_errno_and_return_minus_one( EBUSY );
300064d8: eb001efc bl 3000e0d0 <__errno>
300064dc: e3a03010 mov r3, #16
300064e0: e5803000 str r3, [r0]
300064e4: e3e00000 mvn r0, #0
300064e8: eaffffdc b 30006460 <unmount+0xa8>
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
300064ec: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
300064f0: e1a00005 mov r0, r5 <== NOT EXECUTED
300064f4: e1a0e00f mov lr, pc <== NOT EXECUTED
300064f8: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED
300064fc: e3500000 cmp r0, #0 <== NOT EXECUTED
30006500: 0affffd5 beq 3000645c <unmount+0xa4> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
30006504: e1a00006 mov r0, r6 <== NOT EXECUTED
30006508: eb00040f bl 3000754c <rtems_fatal_error_occurred> <== NOT EXECUTED
30006064 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
30006064: e92d4070 push {r4, r5, r6, lr}
30006068: e24dd018 sub sp, sp, #24
3000606c: e1a05001 mov r5, r1
30006070: e1a06000 mov r6, r0
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
30006074: eb002635 bl 3000f950 <strlen>
30006078: e28d4004 add r4, sp, #4
3000607c: e3a03001 mov r3, #1
30006080: e1a01000 mov r1, r0
30006084: e58d3000 str r3, [sp]
30006088: e3a02000 mov r2, #0
3000608c: e1a00006 mov r0, r6
30006090: e1a03004 mov r3, r4
30006094: ebfff201 bl 300028a0 <rtems_filesystem_evaluate_path>
30006098: e3500000 cmp r0, #0
return -1;
3000609c: 13e05000 mvnne r5, #0
{
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
300060a0: 1a000009 bne 300060cc <utime+0x68>
return -1;
if ( times == NULL ) {
300060a4: e3550000 cmp r5, #0
300060a8: 0a00000a beq 300060d8 <utime+0x74>
300060ac: e8950006 ldm r5, {r1, r2}
now.actime = now.modtime = time( NULL );
times = &now;
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
300060b0: e1a00004 mov r0, r4
300060b4: e59d3010 ldr r3, [sp, #16]
300060b8: e1a0e00f mov lr, pc
300060bc: e593f030 ldr pc, [r3, #48] ; 0x30
300060c0: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc );
300060c4: e1a00004 mov r0, r4
300060c8: ebfff322 bl 30002d58 <rtems_filesystem_freenode>
return result;
}
300060cc: e1a00005 mov r0, r5
300060d0: e28dd018 add sp, sp, #24
300060d4: e8bd8070 pop {r4, r5, r6, pc}
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( times == NULL ) {
now.actime = now.modtime = time( NULL );
300060d8: eb00266f bl 3000fa9c <time> <== NOT EXECUTED
300060dc: e1a01000 mov r1, r0 <== NOT EXECUTED
300060e0: e1a02000 mov r2, r0 <== NOT EXECUTED
300060e4: eafffff1 b 300060b0 <utime+0x4c> <== NOT EXECUTED
30004cdc <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
30004cdc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30004ce0: e1a0a000 mov sl, r0
for (; *fmt != '\0'; fmt++) {
30004ce4: e5d00000 ldrb r0, [r0]
*/
void vprintk(
const char *fmt,
va_list ap
)
{
30004ce8: e24dd01c sub sp, sp, #28
for (; *fmt != '\0'; fmt++) {
30004cec: e3500000 cmp r0, #0
*/
void vprintk(
const char *fmt,
va_list ap
)
{
30004cf0: e58d1000 str r1, [sp]
for (; *fmt != '\0'; fmt++) {
30004cf4: 0a00006e beq 30004eb4 <vprintk+0x1d8>
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
BSP_output_char(*fmt);
30004cf8: e59f8334 ldr r8, [pc, #820] ; 30005034 <vprintk+0x358>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
30004cfc: e28db008 add fp, sp, #8
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
30004d00: e3500025 cmp r0, #37 ; 0x25
30004d04: 1a00006c bne 30004ebc <vprintk+0x1e0>
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
30004d08: e5fa0001 ldrb r0, [sl, #1]!
30004d0c: e3500030 cmp r0, #48 ; 0x30
lead = '0';
fmt++;
30004d10: 05fa0001 ldrbeq r0, [sl, #1]!
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
30004d14: 13a03020 movne r3, #32
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
30004d18: 03a02030 moveq r2, #48 ; 0x30
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
30004d1c: 158d3004 strne r3, [sp, #4]
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
30004d20: 058d2004 streq r2, [sp, #4]
fmt++;
}
if (*fmt == '-' ) {
30004d24: e350002d cmp r0, #45 ; 0x2d
minus = true;
fmt++;
30004d28: 05fa0001 ldrbeq r0, [sl, #1]!
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
30004d2c: 03a09001 moveq r9, #1
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
30004d30: e2403030 sub r3, r0, #48 ; 0x30
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
30004d34: 13a09000 movne r9, #0
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
30004d38: e3530009 cmp r3, #9
30004d3c: 83a04000 movhi r4, #0
30004d40: 8a000009 bhi 30004d6c <vprintk+0x90>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
30004d44: e28a3001 add r3, sl, #1
30004d48: e3a04000 mov r4, #0
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
30004d4c: e0844104 add r4, r4, r4, lsl #2
width += ((unsigned) *fmt - '0');
30004d50: e0804084 add r4, r0, r4, lsl #1
30004d54: e1a0a003 mov sl, r3
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
30004d58: e4d30001 ldrb r0, [r3], #1
width *= 10;
width += ((unsigned) *fmt - '0');
30004d5c: e2444030 sub r4, r4, #48 ; 0x30
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
30004d60: e2402030 sub r2, r0, #48 ; 0x30
30004d64: e3520009 cmp r2, #9
30004d68: 9afffff7 bls 30004d4c <vprintk+0x70>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
30004d6c: e350006c cmp r0, #108 ; 0x6c
lflag = true;
c = *++fmt;
30004d70: 05fa0001 ldrbeq r0, [sl, #1]!
}
if ( c == 'c' ) {
30004d74: e3500063 cmp r0, #99 ; 0x63
30004d78: 0a00008b beq 30004fac <vprintk+0x2d0>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
continue;
}
if ( c == 's' ) {
30004d7c: e3500073 cmp r0, #115 ; 0x73
30004d80: 0a000053 beq 30004ed4 <vprintk+0x1f8>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
30004d84: e350006f cmp r0, #111 ; 0x6f
30004d88: 1350004f cmpne r0, #79 ; 0x4f
base = 8; sign = false;
30004d8c: 03a02000 moveq r2, #0
30004d90: 03a09008 moveq r9, #8
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
30004d94: 0a000009 beq 30004dc0 <vprintk+0xe4>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
30004d98: e3500069 cmp r0, #105 ; 0x69
30004d9c: 13500049 cmpne r0, #73 ; 0x49
30004da0: 0a000004 beq 30004db8 <vprintk+0xdc>
c == 'd' || c == 'D' ) {
30004da4: e3500064 cmp r0, #100 ; 0x64
30004da8: 13500044 cmpne r0, #68 ; 0x44
30004dac: 13a02000 movne r2, #0
30004db0: 03a02001 moveq r2, #1
30004db4: 1a000086 bne 30004fd4 <vprintk+0x2f8>
base = 10; sign = true;
30004db8: e3a02001 mov r2, #1
30004dbc: e3a0900a mov r9, #10
} else {
BSP_output_char(c);
continue;
}
printNum(
30004dc0: e59d3000 ldr r3, [sp]
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
30004dc4: e3520000 cmp r2, #0
} else {
BSP_output_char(c);
continue;
}
printNum(
30004dc8: e5937000 ldr r7, [r3]
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
30004dcc: e2833004 add r3, r3, #4
30004dd0: e58d3000 str r3, [sp]
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
30004dd4: 0a000001 beq 30004de0 <vprintk+0x104>
30004dd8: e3570000 cmp r7, #0
30004ddc: ba00008d blt 30005018 <vprintk+0x33c>
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
30004de0: e1a00007 mov r0, r7
30004de4: e1a01009 mov r1, r9
30004de8: eb002d61 bl 30010374 <__aeabi_uidiv>
30004dec: e3500000 cmp r0, #0
30004df0: e1a05000 mov r5, r0
30004df4: e1a06000 mov r6, r0
30004df8: 01a05007 moveq r5, r7
30004dfc: 03a07001 moveq r7, #1
30004e00: 0a000010 beq 30004e48 <vprintk+0x16c>
30004e04: e20930ff and r3, r9, #255 ; 0xff
30004e08: e1a02007 mov r2, r7
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
30004e0c: e3a06000 mov r6, #0
30004e10: e1a07003 mov r7, r3
30004e14: ea000001 b 30004e20 <vprintk+0x144>
while ((n = unsigned_num / base) > 0) {
30004e18: e1a02005 mov r2, r5
30004e1c: e1a05000 mov r5, r0
toPrint[count++] = (char) (unsigned_num - (n * base));
30004e20: e0030795 mul r3, r5, r7
30004e24: e0633002 rsb r3, r3, r2
30004e28: e7cb3006 strb r3, [fp, r6]
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
30004e2c: e1a00005 mov r0, r5
30004e30: e1a01009 mov r1, r9
30004e34: eb002d4e bl 30010374 <__aeabi_uidiv>
30004e38: e3500000 cmp r0, #0
toPrint[count++] = (char) (unsigned_num - (n * base));
30004e3c: e2866001 add r6, r6, #1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
30004e40: 1afffff4 bne 30004e18 <vprintk+0x13c>
30004e44: e2867001 add r7, r6, #1
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
30004e48: e28d201c add r2, sp, #28
30004e4c: e0826006 add r6, r2, r6
for (n=maxwidth ; n > count; n-- )
30004e50: e1570004 cmp r7, r4
count = 0;
while ((n = unsigned_num / base) > 0) {
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
30004e54: e5465014 strb r5, [r6, #-20]
for (n=maxwidth ; n > count; n-- )
30004e58: 2a000006 bcs 30004e78 <vprintk+0x19c>
30004e5c: e59d5004 ldr r5, [sp, #4]
BSP_output_char(lead);
30004e60: e1a00005 mov r0, r5
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
30004e64: e2444001 sub r4, r4, #1
BSP_output_char(lead);
30004e68: e1a0e00f mov lr, pc
30004e6c: e598f000 ldr pc, [r8]
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
30004e70: e1570004 cmp r7, r4
30004e74: 3afffff9 bcc 30004e60 <vprintk+0x184>
BSP_output_char(lead);
for (n = 0; n < count; n++) {
30004e78: e3570000 cmp r7, #0
30004e7c: 0a000009 beq 30004ea8 <vprintk+0x1cc>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
30004e80: e08b5007 add r5, fp, r7
30004e84: e3a04000 mov r4, #0
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
30004e88: e5753001 ldrb r3, [r5, #-1]!
30004e8c: e59f21a4 ldr r2, [pc, #420] ; 30005038 <vprintk+0x35c>
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
30004e90: e2844001 add r4, r4, #1
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
30004e94: e7d20003 ldrb r0, [r2, r3]
30004e98: e1a0e00f mov lr, pc
30004e9c: e598f000 ldr pc, [r8]
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
30004ea0: e1570004 cmp r7, r4
30004ea4: 8afffff7 bhi 30004e88 <vprintk+0x1ac>
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
30004ea8: e5fa0001 ldrb r0, [sl, #1]!
30004eac: e3500000 cmp r0, #0
30004eb0: 1affff92 bne 30004d00 <vprintk+0x24>
sign,
width,
lead
);
}
}
30004eb4: e28dd01c add sp, sp, #28
30004eb8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
30004ebc: e1a0e00f mov lr, pc
30004ec0: e598f000 ldr pc, [r8]
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
30004ec4: e5fa0001 ldrb r0, [sl, #1]!
30004ec8: e3500000 cmp r0, #0
30004ecc: 1affff8b bne 30004d00 <vprintk+0x24>
30004ed0: eafffff7 b 30004eb4 <vprintk+0x1d8>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
30004ed4: e59d3000 ldr r3, [sp]
30004ed8: e5936000 ldr r6, [r3]
30004edc: e2832004 add r2, r3, #4
if ( str == NULL ) {
str = "";
30004ee0: e59f3154 ldr r3, [pc, #340] ; 3000503c <vprintk+0x360>
30004ee4: e3560000 cmp r6, #0
30004ee8: 01a06003 moveq r6, r3
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
30004eec: e58d2000 str r2, [sp]
if ( str == NULL ) {
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
30004ef0: e5d65000 ldrb r5, [r6]
30004ef4: e3550000 cmp r5, #0
30004ef8: 0a000005 beq 30004f14 <vprintk+0x238>
30004efc: e1a03006 mov r3, r6
30004f00: e3a05000 mov r5, #0
30004f04: e5f32001 ldrb r2, [r3, #1]!
30004f08: e2855001 add r5, r5, #1
30004f0c: e3520000 cmp r2, #0
30004f10: 1afffffb bne 30004f04 <vprintk+0x228>
;
/* leading spaces */
if ( !minus )
30004f14: e3590000 cmp r9, #0
30004f18: 1a000008 bne 30004f40 <vprintk+0x264>
for ( i=len ; i<width ; i++ )
30004f1c: e1550004 cmp r5, r4
30004f20: 2a000006 bcs 30004f40 <vprintk+0x264>
30004f24: e1a07005 mov r7, r5
BSP_output_char(' ');
30004f28: e3a00020 mov r0, #32
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
30004f2c: e2877001 add r7, r7, #1
BSP_output_char(' ');
30004f30: e1a0e00f mov lr, pc
30004f34: e598f000 ldr pc, [r8]
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
30004f38: e1570004 cmp r7, r4
30004f3c: 3afffff9 bcc 30004f28 <vprintk+0x24c>
BSP_output_char(' ');
/* no width option */
if (width == 0) {
30004f40: e3540000 cmp r4, #0
30004f44: 1a000002 bne 30004f54 <vprintk+0x278>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
30004f48: e3550000 cmp r5, #0
30004f4c: 0a000008 beq 30004f74 <vprintk+0x298>
30004f50: e1a04005 mov r4, r5
30004f54: e5d60000 ldrb r0, [r6]
30004f58: e3500000 cmp r0, #0
30004f5c: 0a000004 beq 30004f74 <vprintk+0x298>
BSP_output_char(*str);
30004f60: e1a0e00f mov lr, pc
30004f64: e598f000 ldr pc, [r8]
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
30004f68: e5f60001 ldrb r0, [r6, #1]!
30004f6c: e3500000 cmp r0, #0
30004f70: 1afffffa bne 30004f60 <vprintk+0x284>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
30004f74: e3590000 cmp r9, #0
30004f78: 0affffca beq 30004ea8 <vprintk+0x1cc>
for ( i=len ; i<width ; i++ )
30004f7c: e1550004 cmp r5, r4
30004f80: 2affffc8 bcs 30004ea8 <vprintk+0x1cc>
BSP_output_char(' ');
30004f84: e3a00020 mov r0, #32
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
30004f88: e2855001 add r5, r5, #1
BSP_output_char(' ');
30004f8c: e1a0e00f mov lr, pc
30004f90: e598f000 ldr pc, [r8]
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
30004f94: e1550004 cmp r5, r4
30004f98: 3afffff9 bcc 30004f84 <vprintk+0x2a8>
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
30004f9c: e5fa0001 ldrb r0, [sl, #1]!
30004fa0: e3500000 cmp r0, #0
30004fa4: 1affff55 bne 30004d00 <vprintk+0x24>
30004fa8: eaffffc1 b 30004eb4 <vprintk+0x1d8> <== NOT EXECUTED
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
30004fac: e59d2000 ldr r2, [sp]
30004fb0: e2824004 add r4, r2, #4
BSP_output_char(chr);
30004fb4: e5d20000 ldrb r0, [r2]
30004fb8: e1a0e00f mov lr, pc
30004fbc: e598f000 ldr pc, [r8]
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
30004fc0: e58d4000 str r4, [sp]
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
30004fc4: e5fa0001 ldrb r0, [sl, #1]!
30004fc8: e3500000 cmp r0, #0
30004fcc: 1affff4b bne 30004d00 <vprintk+0x24>
30004fd0: eaffffb7 b 30004eb4 <vprintk+0x1d8> <== NOT EXECUTED
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
30004fd4: e3500075 cmp r0, #117 ; 0x75
30004fd8: 13500055 cmpne r0, #85 ; 0x55
30004fdc: 13a01000 movne r1, #0
30004fe0: 03a01001 moveq r1, #1
base = 10; sign = false;
30004fe4: 03a0900a moveq r9, #10
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
30004fe8: 0affff74 beq 30004dc0 <vprintk+0xe4>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
30004fec: e3500078 cmp r0, #120 ; 0x78
30004ff0: 13500058 cmpne r0, #88 ; 0x58
30004ff4: 13a02000 movne r2, #0
30004ff8: 03a02001 moveq r2, #1
base = 16; sign = false;
30004ffc: 03a09010 moveq r9, #16
30005000: 01a02001 moveq r2, r1
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
30005004: 0affff6d beq 30004dc0 <vprintk+0xe4>
base = 16; sign = false;
} else if ( c == 'p' ) {
30005008: e3500070 cmp r0, #112 ; 0x70
3000500c: 1affffaa bne 30004ebc <vprintk+0x1e0>
base = 16; sign = false; lflag = true;
30005010: e3a09010 mov r9, #16
30005014: eaffff69 b 30004dc0 <vprintk+0xe4>
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
30005018: e3a0002d mov r0, #45 ; 0x2d
3000501c: e1a0e00f mov lr, pc
30005020: e598f000 ldr pc, [r8]
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
30005024: e3540000 cmp r4, #0
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
30005028: e2677000 rsb r7, r7, #0
if (maxwidth) maxwidth--;
3000502c: 12444001 subne r4, r4, #1
30005030: eaffff6a b 30004de0 <vprintk+0x104>
3001278c <write>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
3001278c: e59f30a4 ldr r3, [pc, #164] ; 30012838 <write+0xac>
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
30012790: e92d4010 push {r4, lr}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
30012794: e5933000 ldr r3, [r3]
30012798: e1500003 cmp r0, r3
3001279c: 2a00001b bcs 30012810 <write+0x84>
iop = rtems_libio_iop( fd );
300127a0: e59f4094 ldr r4, [pc, #148] ; 3001283c <write+0xb0>
300127a4: e0600180 rsb r0, r0, r0, lsl #3
300127a8: e5944000 ldr r4, [r4]
300127ac: e0844180 add r4, r4, r0, lsl #3
rtems_libio_check_is_open( iop );
300127b0: e5940014 ldr r0, [r4, #20]
300127b4: e3100c01 tst r0, #256 ; 0x100
300127b8: 0a000014 beq 30012810 <write+0x84>
rtems_libio_check_buffer( buffer );
300127bc: e3510000 cmp r1, #0
300127c0: 0a000017 beq 30012824 <write+0x98>
rtems_libio_check_count( count );
300127c4: e3520000 cmp r2, #0
300127c8: 0a00000e beq 30012808 <write+0x7c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
300127cc: e3100004 tst r0, #4
300127d0: 0a000013 beq 30012824 <write+0x98>
return 0;
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
300127d4: e5943020 ldr r3, [r4, #32]
300127d8: e1a00004 mov r0, r4
300127dc: e1a0e00f mov lr, pc
300127e0: e593f00c ldr pc, [r3, #12]
if ( rc > 0 )
300127e4: e3500000 cmp r0, #0
300127e8: d8bd8010 pople {r4, pc}
iop->offset += rc;
300127ec: e284300c add r3, r4, #12
300127f0: e893000c ldm r3, {r2, r3}
300127f4: e0922000 adds r2, r2, r0
300127f8: e0a33fc0 adc r3, r3, r0, asr #31
300127fc: e584200c str r2, [r4, #12]
30012800: e5843010 str r3, [r4, #16]
30012804: e8bd8010 pop {r4, pc}
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
30012808: e1a00002 mov r0, r2
if ( rc > 0 )
iop->offset += rc;
return rc;
}
3001280c: e8bd8010 pop {r4, pc}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
30012810: ebffe928 bl 3000ccb8 <__errno>
30012814: e3a03009 mov r3, #9
30012818: e5803000 str r3, [r0]
3001281c: e3e00000 mvn r0, #0
30012820: e8bd8010 pop {r4, pc}
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
30012824: ebffe923 bl 3000ccb8 <__errno> <== NOT EXECUTED
30012828: e3a03016 mov r3, #22 <== NOT EXECUTED
3001282c: e5803000 str r3, [r0] <== NOT EXECUTED
30012830: e3e00000 mvn r0, #0 <== NOT EXECUTED
30012834: e8bd8010 pop {r4, pc} <== NOT EXECUTED
300064d0 <writev>:
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
300064d0: e59f3158 ldr r3, [pc, #344] ; 30006630 <writev+0x160>
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
300064d4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
300064d8: e5933000 ldr r3, [r3]
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
300064dc: e1a05002 mov r5, r2
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
300064e0: e1500003 cmp r0, r3
300064e4: 2a00004a bcs 30006614 <writev+0x144>
iop = rtems_libio_iop( fd );
300064e8: e59f3144 ldr r3, [pc, #324] ; 30006634 <writev+0x164>
300064ec: e0600180 rsb r0, r0, r0, lsl #3
300064f0: e5933000 ldr r3, [r3]
300064f4: e0838180 add r8, r3, r0, lsl #3
rtems_libio_check_is_open( iop );
300064f8: e5983014 ldr r3, [r8, #20]
300064fc: e3130c01 tst r3, #256 ; 0x100
30006500: 0a000043 beq 30006614 <writev+0x144>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
30006504: e3130004 tst r3, #4
30006508: 0a00003b beq 300065fc <writev+0x12c>
/*
* Argument validation on IO vector
*/
if ( !iov )
3000650c: e3510000 cmp r1, #0
30006510: 0a000039 beq 300065fc <writev+0x12c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
30006514: e3520000 cmp r2, #0
30006518: da000037 ble 300065fc <writev+0x12c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
3000651c: e3520b01 cmp r2, #1024 ; 0x400
30006520: ca000035 bgt 300065fc <writev+0x12c>
rtems_set_errno_and_return_minus_one( EINVAL );
30006524: e1a04001 mov r4, r1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
30006528: e3a01000 mov r1, #0
3000652c: e1a02004 mov r2, r4
30006530: e3a06001 mov r6, #1
30006534: e1a07001 mov r7, r1
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
30006538: e59fc0f8 ldr ip, [pc, #248] ; 30006638 <writev+0x168>
3000653c: ea000000 b 30006544 <writev+0x74>
if ( iov[v].iov_len )
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
30006540: e1a07003 mov r7, r3
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
if ( !iov[v].iov_base )
30006544: e5923000 ldr r3, [r2]
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
30006548: e2811001 add r1, r1, #1
if ( !iov[v].iov_base )
3000654c: e3530000 cmp r3, #0
30006550: 0a000029 beq 300065fc <writev+0x12c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
30006554: e5920004 ldr r0, [r2, #4]
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
30006558: e2822008 add r2, r2, #8
if ( iov[v].iov_len )
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
3000655c: e0873000 add r3, r7, r0
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
30006560: e3500000 cmp r0, #0
30006564: 13a06000 movne r6, #0
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
30006568: e1570003 cmp r7, r3
3000656c: d153000c cmple r3, ip
30006570: d3a07000 movle r7, #0
30006574: c3a07001 movgt r7, #1
30006578: ca00001f bgt 300065fc <writev+0x12c>
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
3000657c: e1550001 cmp r5, r1
30006580: caffffee bgt 30006540 <writev+0x70>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
30006584: e3560000 cmp r6, #0
30006588: 1a00001f bne 3000660c <writev+0x13c>
3000658c: e1a07006 mov r7, r6
30006590: ea000003 b 300065a4 <writev+0xd4>
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30006594: e2866001 add r6, r6, #1
30006598: e1550006 cmp r5, r6
3000659c: e2844008 add r4, r4, #8
300065a0: da000019 ble 3000660c <writev+0x13c>
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
300065a4: e5942004 ldr r2, [r4, #4]
300065a8: e3520000 cmp r2, #0
300065ac: 0afffff8 beq 30006594 <writev+0xc4>
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
300065b0: e5941000 ldr r1, [r4]
300065b4: e5983020 ldr r3, [r8, #32]
300065b8: e1a00008 mov r0, r8
300065bc: e1a0e00f mov lr, pc
300065c0: e593f00c ldr pc, [r3, #12]
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
300065c4: e3500000 cmp r0, #0
300065c8: ba000016 blt 30006628 <writev+0x158>
return -1;
if ( bytes > 0 ) {
300065cc: 0a000006 beq 300065ec <writev+0x11c>
iop->offset += bytes;
300065d0: e288300c add r3, r8, #12
300065d4: e893000c ldm r3, {r2, r3}
300065d8: e0922000 adds r2, r2, r0
300065dc: e0a33fc0 adc r3, r3, r0, asr #31
300065e0: e588200c str r2, [r8, #12]
300065e4: e5883010 str r3, [r8, #16]
total += bytes;
300065e8: e0877000 add r7, r7, r0
}
if (bytes != iov[ v ].iov_len)
300065ec: e5943004 ldr r3, [r4, #4]
300065f0: e1500003 cmp r0, r3
300065f4: 0affffe6 beq 30006594 <writev+0xc4>
300065f8: ea000003 b 3000660c <writev+0x13c> <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
300065fc: eb001dd7 bl 3000dd60 <__errno>
30006600: e3a03016 mov r3, #22
30006604: e5803000 str r3, [r0]
30006608: e3e07000 mvn r7, #0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
3000660c: e1a00007 mov r0, r7
30006610: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
30006614: eb001dd1 bl 3000dd60 <__errno>
30006618: e3a03009 mov r3, #9
3000661c: e5803000 str r3, [r0]
30006620: e3e07000 mvn r7, #0
30006624: eafffff8 b 3000660c <writev+0x13c>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
30006628: e3e07000 mvn r7, #0 <== NOT EXECUTED
3000662c: eafffff6 b 3000660c <writev+0x13c> <== NOT EXECUTED