=============================================================================== 08007480 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 8007480: 28 22 00 00 lw r2,(r1+0) ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 8007484: 28 23 00 10 lw r3,(r1+16) switch( node->type ) { 8007488: 34 04 00 07 mvi r4,7 800748c: 28 42 00 4c lw r2,(r2+76) ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 8007490: 28 63 00 34 lw r3,(r3+52) switch( node->type ) { 8007494: 54 44 00 0a bgu r2,r4,80074bc <== NEVER TAKEN 8007498: 78 04 08 01 mvhi r4,0x801 800749c: b4 42 10 00 add r2,r2,r2 80074a0: 38 84 24 10 ori r4,r4,0x2410 80074a4: b4 42 10 00 add r2,r2,r2 80074a8: b4 82 10 00 add r2,r4,r2 80074ac: 28 42 00 00 lw r2,(r2+0) 80074b0: c0 40 00 00 b r2 case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 80074b4: 28 62 00 0c lw r2,(r3+12) 80074b8: 58 22 00 08 sw (r1+8),r2 loc->handlers = fs_info->fifo_handlers; break; } return 0; } 80074bc: 34 01 00 00 mvi r1,0 80074c0: c3 a0 00 00 ret break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 80074c4: 28 62 00 08 lw r2,(r3+8) 80074c8: 58 22 00 08 sw (r1+8),r2 loc->handlers = fs_info->fifo_handlers; break; } return 0; } 80074cc: 34 01 00 00 mvi r1,0 80074d0: c3 a0 00 00 ret case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 80074d4: 78 02 08 01 mvhi r2,0x801 80074d8: 38 42 24 b0 ori r2,r2,0x24b0 80074dc: 58 22 00 08 sw (r1+8),r2 loc->handlers = fs_info->fifo_handlers; break; } return 0; } 80074e0: 34 01 00 00 mvi r1,0 80074e4: c3 a0 00 00 ret break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 80074e8: 28 62 00 10 lw r2,(r3+16) 80074ec: 58 22 00 08 sw (r1+8),r2 break; } return 0; } 80074f0: 34 01 00 00 mvi r1,0 80074f4: c3 a0 00 00 ret switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 80074f8: 78 02 08 01 mvhi r2,0x801 80074fc: 38 42 24 40 ori r2,r2,0x2440 8007500: 58 22 00 08 sw (r1+8),r2 loc->handlers = fs_info->fifo_handlers; break; } return 0; } 8007504: 34 01 00 00 mvi r1,0 8007508: c3 a0 00 00 ret =============================================================================== 080072f8 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 80072f8: 37 9c ff e8 addi sp,sp,-24 80072fc: 5b 8b 00 18 sw (sp+24),r11 8007300: 5b 8c 00 14 sw (sp+20),r12 8007304: 5b 8d 00 10 sw (sp+16),r13 8007308: 5b 8e 00 0c sw (sp+12),r14 800730c: 5b 8f 00 08 sw (sp+8),r15 8007310: 5b 9d 00 04 sw (sp+4),ra /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; 8007314: 34 0b 00 00 mvi r11,0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 8007318: b8 40 60 00 mv r12,r2 800731c: b8 a0 70 00 mv r14,r5 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 8007320: 44 20 00 27 be r1,r0,80073bc <== NEVER TAKEN return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 8007324: 28 22 00 10 lw r2,(r1+16) * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; 8007328: 28 2f 00 00 lw r15,(r1+0) fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 800732c: 34 01 00 07 mvi r1,7 */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 8007330: 28 4d 00 34 lw r13,(r2+52) /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 8007334: 45 81 00 2b be r12,r1,80073e0 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 8007338: 78 06 08 01 mvhi r6,0x801 800733c: 38 c6 31 1c ori r6,r6,0x311c 8007340: 28 c5 00 00 lw r5,(r6+0) 8007344: b8 60 10 00 mv r2,r3 8007348: b9 80 08 00 mv r1,r12 800734c: 28 a3 00 2c lw r3,(r5+44) 8007350: a4 60 18 00 not r3,r3 8007354: a0 83 18 00 and r3,r4,r3 8007358: fb ff ff c1 calli 800725c 800735c: b8 20 58 00 mv r11,r1 if ( !node ) 8007360: 44 20 00 17 be r1,r0,80073bc return NULL; /* * Set the type specific information */ switch (type) { 8007364: 34 01 00 07 mvi r1,7 8007368: 55 81 00 0d bgu r12,r1,800739c <== NEVER TAKEN 800736c: 78 01 08 01 mvhi r1,0x801 8007370: b5 8c 60 00 add r12,r12,r12 8007374: 38 21 23 f0 ori r1,r1,0x23f0 8007378: b5 8c 60 00 add r12,r12,r12 800737c: b4 2c 60 00 add r12,r1,r12 8007380: 29 81 00 00 lw r1,(r12+0) 8007384: c0 20 00 00 b r1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8007388: 35 62 00 54 addi r2,r11,84 case IMFS_DIRECTORY: rtems_chain_initialize_empty(&node->info.directory.Entries); 800738c: 35 61 00 50 addi r1,r11,80 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8007390: 59 62 00 50 sw (r11+80),r2 the_chain->permanent_null = NULL; 8007394: 59 60 00 54 sw (r11+84),r0 the_chain->last = _Chain_Head(the_chain); 8007398: 59 61 00 58 sw (r11+88),r1 /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 800739c: 29 a2 00 04 lw r2,(r13+4) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 80073a0: 59 6f 00 08 sw (r11+8),r15 80073a4: 35 e1 00 50 addi r1,r15,80 node->st_ino = ++fs_info->ino_count; 80073a8: 34 42 00 01 addi r2,r2,1 80073ac: 59 a2 00 04 sw (r13+4),r2 80073b0: 59 62 00 38 sw (r11+56),r2 80073b4: b9 60 10 00 mv r2,r11 80073b8: fb ff f1 49 calli 80038dc <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 80073bc: b9 60 08 00 mv r1,r11 80073c0: 2b 9d 00 04 lw ra,(sp+4) 80073c4: 2b 8b 00 18 lw r11,(sp+24) 80073c8: 2b 8c 00 14 lw r12,(sp+20) 80073cc: 2b 8d 00 10 lw r13,(sp+16) 80073d0: 2b 8e 00 0c lw r14,(sp+12) 80073d4: 2b 8f 00 08 lw r15,(sp+8) 80073d8: 37 9c 00 18 addi sp,sp,24 80073dc: c3 a0 00 00 ret fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 80073e0: 29 a1 00 10 lw r1,(r13+16) 80073e4: 78 02 08 01 mvhi r2,0x801 80073e8: 38 42 23 88 ori r2,r2,0x2388 80073ec: 44 22 ff f4 be r1,r2,80073bc 80073f0: e3 ff ff d2 bi 8007338 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; 80073f4: 29 c1 00 00 lw r1,(r14+0) 80073f8: 59 61 00 50 sw (r11+80),r1 break; 80073fc: e3 ff ff e8 bi 800739c node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 8007400: 59 60 00 50 sw (r11+80),r0 8007404: 59 60 00 54 sw (r11+84),r0 node->info.linearfile.direct = 0; 8007408: 59 60 00 58 sw (r11+88),r0 case IMFS_MEMORY_FILE: node->info.file.size = 0; 800740c: 59 60 00 50 sw (r11+80),r0 8007410: 59 60 00 54 sw (r11+84),r0 node->info.file.indirect = 0; 8007414: 59 60 00 58 sw (r11+88),r0 node->info.file.doubly_indirect = 0; 8007418: 59 60 00 5c sw (r11+92),r0 node->info.file.triply_indirect = 0; 800741c: 59 60 00 60 sw (r11+96),r0 break; 8007420: e3 ff ff df bi 800739c case IMFS_FIFO: node->info.fifo.pipe = NULL; 8007424: 59 60 00 50 sw (r11+80),r0 break; 8007428: e3 ff ff dd bi 800739c case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 800742c: 29 c2 00 00 lw r2,(r14+0) node->info.device.minor = info->device.minor; 8007430: 29 c1 00 04 lw r1,(r14+4) case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 8007434: 59 62 00 50 sw (r11+80),r2 node->info.device.minor = info->device.minor; 8007438: 59 61 00 54 sw (r11+84),r1 break; 800743c: e3 ff ff d8 bi 800739c =============================================================================== 08007440 : return node; } IMFS_jnode_t *IMFS_create_root_node(void) { 8007440: 37 9c ff fc addi sp,sp,-4 8007444: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) ); 8007448: 78 02 08 01 mvhi r2,0x801 800744c: 34 01 00 01 mvi r1,1 8007450: 38 42 20 94 ori r2,r2,0x2094 8007454: 34 03 41 ed mvi r3,16877 8007458: fb ff ff 81 calli 800725c if ( !node ) 800745c: 44 20 00 06 be r1,r0,8007474 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8007460: 34 23 00 54 addi r3,r1,84 /* * Set the type specific information * * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); 8007464: 34 22 00 50 addi r2,r1,80 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8007468: 58 23 00 50 sw (r1+80),r3 the_chain->permanent_null = NULL; 800746c: 58 20 00 54 sw (r1+84),r0 the_chain->last = _Chain_Head(the_chain); 8007470: 58 22 00 58 sw (r1+88),r2 return node; } 8007474: 2b 9d 00 04 lw ra,(sp+4) 8007478: 37 9c 00 04 addi sp,sp,4 800747c: c3 a0 00 00 ret =============================================================================== 08002ed4 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 8002ed4: 37 9c ff e0 addi sp,sp,-32 8002ed8: 5b 8b 00 20 sw (sp+32),r11 8002edc: 5b 8c 00 1c sw (sp+28),r12 8002ee0: 5b 8d 00 18 sw (sp+24),r13 8002ee4: 5b 8e 00 14 sw (sp+20),r14 8002ee8: 5b 8f 00 10 sw (sp+16),r15 8002eec: 5b 90 00 0c sw (sp+12),r16 8002ef0: 5b 91 00 08 sw (sp+8),r17 8002ef4: 5b 9d 00 04 sw (sp+4),ra assert( the_directory->type == IMFS_DIRECTORY ); #endif the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 8002ef8: 28 2f 00 50 lw r15,(r1+80) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8002efc: 34 30 00 54 addi r16,r1,84 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 8002f00: b8 40 68 00 mv r13,r2 assert( the_directory->type == IMFS_DIRECTORY ); #endif the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 8002f04: 45 f0 00 17 be r15,r16,8002f60 8002f08: 78 0e 08 02 mvhi r14,0x802 8002f0c: 78 0c 08 02 mvhi r12,0x802 8002f10: 39 ce 33 5c ori r14,r14,0x335c 8002f14: 39 8c 51 78 ori r12,r12,0x5178 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 8002f18: 34 51 00 01 addi r17,r2,1 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 8002f1c: 48 0d 00 0a bg r0,r13,8002f44 <== NEVER TAKEN 8002f20: 34 0b 00 00 mvi r11,0 fprintf(stdout, "...." ); 8002f24: 29 83 00 00 lw r3,(r12+0) !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 8002f28: 35 6b 00 01 addi r11,r11,1 fprintf(stdout, "...." ); 8002f2c: b9 c0 08 00 mv r1,r14 8002f30: 28 64 00 08 lw r4,(r3+8) 8002f34: 34 02 00 01 mvi r2,1 8002f38: 34 03 00 04 mvi r3,4 8002f3c: f8 00 37 59 calli 8010ca0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 8002f40: 4d ab ff f9 bge r13,r11,8002f24 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 8002f44: b9 e0 08 00 mv r1,r15 8002f48: fb ff ff 89 calli 8002d6c if ( the_jnode->type == IMFS_DIRECTORY ) 8002f4c: 29 e3 00 4c lw r3,(r15+76) 8002f50: 34 01 00 01 mvi r1,1 8002f54: 44 61 00 0d be r3,r1,8002f88 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 8002f58: 29 ef 00 00 lw r15,(r15+0) assert( the_directory->type == IMFS_DIRECTORY ); #endif the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 8002f5c: 5d f0 ff f0 bne r15,r16,8002f1c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 8002f60: 2b 9d 00 04 lw ra,(sp+4) 8002f64: 2b 8b 00 20 lw r11,(sp+32) 8002f68: 2b 8c 00 1c lw r12,(sp+28) 8002f6c: 2b 8d 00 18 lw r13,(sp+24) 8002f70: 2b 8e 00 14 lw r14,(sp+20) 8002f74: 2b 8f 00 10 lw r15,(sp+16) 8002f78: 2b 90 00 0c lw r16,(sp+12) 8002f7c: 2b 91 00 08 lw r17,(sp+8) 8002f80: 37 9c 00 20 addi sp,sp,32 8002f84: c3 a0 00 00 ret for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 8002f88: b9 e0 08 00 mv r1,r15 8002f8c: ba 20 10 00 mv r2,r17 8002f90: fb ff ff d1 calli 8002ed4 8002f94: e3 ff ff f1 bi 8002f58 =============================================================================== 080075ac : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 80075ac: 37 9c ff 94 addi sp,sp,-108 80075b0: 5b 8b 00 44 sw (sp+68),r11 80075b4: 5b 8c 00 40 sw (sp+64),r12 80075b8: 5b 8d 00 3c sw (sp+60),r13 80075bc: 5b 8e 00 38 sw (sp+56),r14 80075c0: 5b 8f 00 34 sw (sp+52),r15 80075c4: 5b 90 00 30 sw (sp+48),r16 80075c8: 5b 91 00 2c sw (sp+44),r17 80075cc: 5b 92 00 28 sw (sp+40),r18 80075d0: 5b 93 00 24 sw (sp+36),r19 80075d4: 5b 94 00 20 sw (sp+32),r20 80075d8: 5b 95 00 1c sw (sp+28),r21 80075dc: 5b 96 00 18 sw (sp+24),r22 80075e0: 5b 97 00 14 sw (sp+20),r23 80075e4: 5b 98 00 10 sw (sp+16),r24 80075e8: 5b 99 00 0c sw (sp+12),r25 80075ec: 5b 9b 00 08 sw (sp+8),fp 80075f0: 5b 9d 00 04 sw (sp+4),ra /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 80075f4: 28 8c 00 00 lw r12,(r4+0) case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 80075f8: 78 12 08 01 mvhi r18,0x801 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 80075fc: b8 80 58 00 mv r11,r4 8007600: b8 20 98 00 mv r19,r1 8007604: b8 40 78 00 mv r15,r2 8007608: b8 60 c8 00 mv r25,r3 int i = 0; 800760c: 34 10 00 00 mvi r16,0 8007610: 37 94 00 48 addi r20,sp,72 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8007614: 34 15 00 01 mvi r21,1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8007618: 34 16 00 03 mvi r22,3 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 800761c: 34 17 00 04 mvi r23,4 result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; if ( result == -1 ) 8007620: 34 1b ff ff mvi fp,-1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8007624: 34 18 00 02 mvi r24,2 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8007628: 3a 52 31 1c ori r18,r18,0x311c * 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 ); 800762c: b6 70 08 00 add r1,r19,r16 8007630: b9 e0 10 00 mv r2,r15 8007634: ba 80 18 00 mv r3,r20 8007638: 37 84 00 6c addi r4,sp,108 800763c: f8 00 02 37 calli 8007f18 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 8007640: 29 6d 00 00 lw r13,(r11+0) * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 8007644: b8 20 70 00 mv r14,r1 pathnamelen -= len; 8007648: 2b 91 00 6c lw r17,(sp+108) i += len; if ( !pathloc->node_access ) 800764c: 45 a0 00 52 be r13,r0,8007794 <== NEVER TAKEN */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 8007650: c9 f1 78 00 sub r15,r15,r17 i += len; 8007654: b6 11 80 00 add r16,r16,r17 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8007658: 5c 20 00 10 bne r1,r0,8007698 * 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 ) { 800765c: 29 a2 00 4c lw r2,(r13+76) 8007660: 34 01 00 01 mvi r1,1 8007664: 44 41 00 6b be r2,r1,8007810 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8007668: b9 60 08 00 mv r1,r11 800766c: fb ff ff 85 calli 8007480 8007670: b8 20 68 00 mv r13,r1 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 8007674: bb 20 10 00 mv r2,r25 8007678: b9 60 08 00 mv r1,r11 800767c: fb ff ff a4 calli 800750c 8007680: 5c 20 00 2c bne r1,r0,8007730 rtems_set_errno_and_return_minus_one( EACCES ); 8007684: f8 00 11 08 calli 800baa4 <__errno> 8007688: 34 02 00 0d mvi r2,13 800768c: 58 22 00 00 sw (r1+0),r2 8007690: 34 0d ff ff mvi r13,-1 8007694: e0 00 00 27 bi 8007730 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8007698: 29 81 00 4c lw r1,(r12+76) 800769c: 44 35 00 39 be r1,r21,8007780 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 80076a0: b9 a0 60 00 mv r12,r13 switch( type ) { 80076a4: 45 d6 00 06 be r14,r22,80076bc 80076a8: 45 d7 00 1e be r14,r23,8007720 80076ac: 45 d8 00 11 be r14,r24,80076f0 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 80076b0: 7d ce 00 04 cmpnei r14,r14,4 80076b4: 5d c0 ff de bne r14,r0,800762c <== ALWAYS TAKEN 80076b8: e3 ff ff e9 bi 800765c <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 80076bc: 29 a1 00 4c lw r1,(r13+76) 80076c0: 44 36 00 3a be r1,r22,80077a8 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 80076c4: 44 37 00 5b be r1,r23,8007830 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 80076c8: 5c 35 00 62 bne r1,r21,8007850 /* * 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 ) { 80076cc: 29 8d 00 5c lw r13,(r12+92) 80076d0: 5d a0 00 65 bne r13,r0,8007864 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 80076d4: b9 80 08 00 mv r1,r12 80076d8: ba 80 10 00 mv r2,r20 80076dc: f8 00 01 dc calli 8007e4c 80076e0: b8 20 60 00 mv r12,r1 if ( !node ) 80076e4: 44 2d 00 2c be r1,r13,8007794 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 80076e8: 59 6c 00 00 sw (r11+0),r12 80076ec: e3 ff ff d0 bi 800762c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 80076f0: 2a 41 00 00 lw r1,(r18+0) 80076f4: 28 21 00 18 lw r1,(r1+24) 80076f8: 45 a1 ff cd be r13,r1,800762c /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 80076fc: 29 61 00 10 lw r1,(r11+16) /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 8007700: 28 22 00 1c lw r2,(r1+28) 8007704: 45 a2 00 30 be r13,r2,80077c4 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 8007708: 29 ac 00 08 lw r12,(r13+8) 800770c: 5d 80 ff f7 bne r12,r0,80076e8 rtems_set_errno_and_return_minus_one( ENOENT ); 8007710: f8 00 10 e5 calli 800baa4 <__errno> 8007714: 58 2e 00 00 sw (r1+0),r14 8007718: 34 0d ff ff mvi r13,-1 800771c: e0 00 00 05 bi 8007730 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 8007720: f8 00 10 e1 calli 800baa4 <__errno> 8007724: 34 02 00 5b mvi r2,91 8007728: 58 22 00 00 sw (r1+0),r2 800772c: 34 0d ff ff mvi r13,-1 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8007730: b9 a0 08 00 mv r1,r13 8007734: 2b 9d 00 04 lw ra,(sp+4) 8007738: 2b 8b 00 44 lw r11,(sp+68) 800773c: 2b 8c 00 40 lw r12,(sp+64) 8007740: 2b 8d 00 3c lw r13,(sp+60) 8007744: 2b 8e 00 38 lw r14,(sp+56) 8007748: 2b 8f 00 34 lw r15,(sp+52) 800774c: 2b 90 00 30 lw r16,(sp+48) 8007750: 2b 91 00 2c lw r17,(sp+44) 8007754: 2b 92 00 28 lw r18,(sp+40) 8007758: 2b 93 00 24 lw r19,(sp+36) 800775c: 2b 94 00 20 lw r20,(sp+32) 8007760: 2b 95 00 1c lw r21,(sp+28) 8007764: 2b 96 00 18 lw r22,(sp+24) 8007768: 2b 97 00 14 lw r23,(sp+20) 800776c: 2b 98 00 10 lw r24,(sp+16) 8007770: 2b 99 00 0c lw r25,(sp+12) 8007774: 2b 9b 00 08 lw fp,(sp+8) 8007778: 37 9c 00 6c addi sp,sp,108 800777c: c3 a0 00 00 ret /* * 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 ) ) 8007780: b9 60 08 00 mv r1,r11 8007784: 34 02 00 01 mvi r2,1 8007788: fb ff ff 61 calli 800750c 800778c: 5c 20 ff c5 bne r1,r0,80076a0 8007790: e3 ff ff bd bi 8007684 * 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 ); 8007794: f8 00 10 c4 calli 800baa4 <__errno> 8007798: 34 02 00 02 mvi r2,2 800779c: 58 22 00 00 sw (r1+0),r2 80077a0: 34 0d ff ff mvi r13,-1 80077a4: e3 ff ff e3 bi 8007730 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 80077a8: b9 60 08 00 mv r1,r11 80077ac: 34 02 00 00 mvi r2,0 80077b0: fb ff ff 62 calli 8007538 node = pathloc->node_access; 80077b4: 29 6c 00 00 lw r12,(r11+0) if ( !node ) 80077b8: 45 80 00 26 be r12,r0,8007850 <== NEVER TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 80077bc: 29 81 00 4c lw r1,(r12+76) 80077c0: e3 ff ff c2 bi 80076c8 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 80077c4: 28 22 00 14 lw r2,(r1+20) 80077c8: 28 26 00 0c lw r6,(r1+12) 80077cc: 28 24 00 10 lw r4,(r1+16) 80077d0: 28 23 00 18 lw r3,(r1+24) 80077d4: 28 27 00 08 lw r7,(r1+8) if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 80077d8: 28 45 00 00 lw r5,(r2+0) 80077dc: ca 11 08 00 sub r1,r16,r17 * * 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 ) { 80077e0: 59 64 00 08 sw (r11+8),r4 80077e4: 59 62 00 0c sw (r11+12),r2 80077e8: 59 63 00 10 sw (r11+16),r3 80077ec: 59 67 00 00 sw (r11+0),r7 80077f0: 59 66 00 04 sw (r11+4),r6 newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 80077f4: b6 61 08 00 add r1,r19,r1 80077f8: b5 f1 10 00 add r2,r15,r17 80077fc: bb 20 18 00 mv r3,r25 8007800: b9 60 20 00 mv r4,r11 8007804: d8 a0 00 00 call r5 8007808: b8 20 68 00 mv r13,r1 800780c: e3 ff ff c9 bi 8007730 * * 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 ) { 8007810: 29 a1 00 5c lw r1,(r13+92) 8007814: 44 20 ff 95 be r1,r0,8007668 8007818: 28 22 00 28 lw r2,(r1+40) 800781c: 28 26 00 20 lw r6,(r1+32) 8007820: 28 24 00 24 lw r4,(r1+36) 8007824: 28 23 00 2c lw r3,(r1+44) 8007828: 28 27 00 1c lw r7,(r1+28) 800782c: e3 ff ff eb bi 80077d8 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 8007830: b9 60 08 00 mv r1,r11 8007834: 34 02 00 00 mvi r2,0 8007838: f8 00 00 1f calli 80078b4 800783c: b8 20 68 00 mv r13,r1 node = pathloc->node_access; 8007840: 29 6c 00 00 lw r12,(r11+0) if ( result == -1 ) 8007844: 44 3b ff bb be r1,fp,8007730 <== NEVER TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 8007848: 29 81 00 4c lw r1,(r12+76) 800784c: e3 ff ff 9f bi 80076c8 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 8007850: f8 00 10 95 calli 800baa4 <__errno> 8007854: 34 02 00 14 mvi r2,20 8007858: 58 22 00 00 sw (r1+0),r2 800785c: 34 0d ff ff mvi r13,-1 8007860: e3 ff ff b4 bi 8007730 /* * 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 ) { 8007864: 29 a3 00 28 lw r3,(r13+40) newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8007868: 2b 82 00 6c lw r2,(sp+108) /* * 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 ) { 800786c: 29 a4 00 2c lw r4,(r13+44) 8007870: 29 a7 00 20 lw r7,(r13+32) 8007874: 29 a6 00 24 lw r6,(r13+36) 8007878: 29 a8 00 1c lw r8,(r13+28) newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 800787c: 28 65 00 00 lw r5,(r3+0) 8007880: ca 02 08 00 sub r1,r16,r2 /* * 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 ) { 8007884: 59 63 00 0c sw (r11+12),r3 8007888: 59 64 00 10 sw (r11+16),r4 800788c: 59 68 00 00 sw (r11+0),r8 8007890: 59 67 00 04 sw (r11+4),r7 8007894: 59 66 00 08 sw (r11+8),r6 newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8007898: b6 61 08 00 add r1,r19,r1 800789c: b5 e2 10 00 add r2,r15,r2 80078a0: bb 20 18 00 mv r3,r25 80078a4: b9 60 20 00 mv r4,r11 80078a8: d8 a0 00 00 call r5 80078ac: b8 20 68 00 mv r13,r1 80078b0: e3 ff ff a0 bi 8007730 =============================================================================== 08007a78 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8007a78: 37 9c ff 94 addi sp,sp,-108 8007a7c: 5b 8b 00 44 sw (sp+68),r11 8007a80: 5b 8c 00 40 sw (sp+64),r12 8007a84: 5b 8d 00 3c sw (sp+60),r13 8007a88: 5b 8e 00 38 sw (sp+56),r14 8007a8c: 5b 8f 00 34 sw (sp+52),r15 8007a90: 5b 90 00 30 sw (sp+48),r16 8007a94: 5b 91 00 2c sw (sp+44),r17 8007a98: 5b 92 00 28 sw (sp+40),r18 8007a9c: 5b 93 00 24 sw (sp+36),r19 8007aa0: 5b 94 00 20 sw (sp+32),r20 8007aa4: 5b 95 00 1c sw (sp+28),r21 8007aa8: 5b 96 00 18 sw (sp+24),r22 8007aac: 5b 97 00 14 sw (sp+20),r23 8007ab0: 5b 98 00 10 sw (sp+16),r24 8007ab4: 5b 99 00 0c sw (sp+12),r25 8007ab8: 5b 9b 00 08 sw (sp+8),fp 8007abc: 5b 9d 00 04 sw (sp+4),ra case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8007ac0: 78 12 08 01 mvhi r18,0x801 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8007ac4: b8 40 68 00 mv r13,r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8007ac8: 28 4b 00 00 lw r11,(r2+0) int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8007acc: b8 20 98 00 mv r19,r1 8007ad0: b8 60 c8 00 mv r25,r3 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8007ad4: f8 00 14 a0 calli 800cd54 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 8007ad8: 34 0f 00 00 mvi r15,0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8007adc: b8 20 70 00 mv r14,r1 8007ae0: 37 94 00 48 addi r20,sp,72 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8007ae4: 34 16 00 01 mvi r22,1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8007ae8: 34 15 00 02 mvi r21,2 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8007aec: 3a 52 31 1c ori r18,r18,0x311c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8007af0: 34 17 00 03 mvi r23,3 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 8007af4: 34 18 00 04 mvi r24,4 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) 8007af8: 34 1b ff ff mvi fp,-1 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 8007afc: b9 c0 10 00 mv r2,r14 8007b00: b6 6f 08 00 add r1,r19,r15 8007b04: ba 80 18 00 mv r3,r20 8007b08: 37 84 00 6c addi r4,sp,108 8007b0c: f8 00 01 03 calli 8007f18 pathlen -= len; 8007b10: 2b 91 00 6c lw r17,(sp+108) i += len; if ( !pathloc->node_access ) 8007b14: 29 b0 00 00 lw r16,(r13+0) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 8007b18: b8 20 60 00 mv r12,r1 pathlen -= len; 8007b1c: c9 d1 70 00 sub r14,r14,r17 i += len; if ( !pathloc->node_access ) 8007b20: 46 00 00 5b be r16,r0,8007c8c <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8007b24: 5c 20 00 19 bne r1,r0,8007b88 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 8007b28: f8 00 0f df calli 800baa4 <__errno> 8007b2c: 34 02 00 11 mvi r2,17 8007b30: 58 22 00 00 sw (r1+0),r2 8007b34: 34 0b ff ff mvi r11,-1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8007b38: b9 60 08 00 mv r1,r11 8007b3c: 2b 9d 00 04 lw ra,(sp+4) 8007b40: 2b 8b 00 44 lw r11,(sp+68) 8007b44: 2b 8c 00 40 lw r12,(sp+64) 8007b48: 2b 8d 00 3c lw r13,(sp+60) 8007b4c: 2b 8e 00 38 lw r14,(sp+56) 8007b50: 2b 8f 00 34 lw r15,(sp+52) 8007b54: 2b 90 00 30 lw r16,(sp+48) 8007b58: 2b 91 00 2c lw r17,(sp+44) 8007b5c: 2b 92 00 28 lw r18,(sp+40) 8007b60: 2b 93 00 24 lw r19,(sp+36) 8007b64: 2b 94 00 20 lw r20,(sp+32) 8007b68: 2b 95 00 1c lw r21,(sp+28) 8007b6c: 2b 96 00 18 lw r22,(sp+24) 8007b70: 2b 97 00 14 lw r23,(sp+20) 8007b74: 2b 98 00 10 lw r24,(sp+16) 8007b78: 2b 99 00 0c lw r25,(sp+12) 8007b7c: 2b 9b 00 08 lw fp,(sp+8) 8007b80: 37 9c 00 6c addi sp,sp,108 8007b84: c3 a0 00 00 ret /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8007b88: 29 61 00 4c lw r1,(r11+76) 8007b8c: 44 36 00 29 be r1,r22,8007c30 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 8007b90: b5 f1 78 00 add r15,r15,r17 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; 8007b94: ba 00 58 00 mv r11,r16 switch( type ) { 8007b98: 45 95 00 1a be r12,r21,8007c00 8007b9c: 55 95 00 03 bgu r12,r21,8007ba8 8007ba0: 5d 80 ff d7 bne r12,r0,8007afc <== ALWAYS TAKEN 8007ba4: e3 ff ff e1 bi 8007b28 <== NOT EXECUTED 8007ba8: 45 97 00 07 be r12,r23,8007bc4 8007bac: 5d 98 ff d4 bne r12,r24,8007afc <== NEVER TAKEN 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 ); 8007bb0: f8 00 0f bd calli 800baa4 <__errno> 8007bb4: 34 02 00 5b mvi r2,91 8007bb8: 58 22 00 00 sw (r1+0),r2 8007bbc: 34 0b ff ff mvi r11,-1 8007bc0: e3 ff ff de bi 8007b38 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 8007bc4: 2a 01 00 4c lw r1,(r16+76) 8007bc8: 44 37 00 48 be r1,r23,8007ce8 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 8007bcc: 44 38 00 47 be r1,r24,8007ce8 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 8007bd0: 45 60 00 59 be r11,r0,8007d34 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8007bd4: 29 61 00 4c lw r1,(r11+76) 8007bd8: 5c 36 00 57 bne r1,r22,8007d34 /* * 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 ) { 8007bdc: 29 6c 00 5c lw r12,(r11+92) 8007be0: 5d 80 00 5a bne r12,r0,8007d48 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8007be4: b9 60 08 00 mv r1,r11 8007be8: ba 80 10 00 mv r2,r20 8007bec: f8 00 00 98 calli 8007e4c 8007bf0: b8 20 58 00 mv r11,r1 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 8007bf4: 44 2c 00 18 be r1,r12,8007c54 done = true; else pathloc->node_access = node; 8007bf8: 59 ab 00 00 sw (r13+0),r11 8007bfc: e3 ff ff c0 bi 8007afc case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8007c00: 2a 41 00 00 lw r1,(r18+0) 8007c04: 28 21 00 18 lw r1,(r1+24) 8007c08: 46 01 ff bd be r16,r1,8007afc <== NEVER TAKEN /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 8007c0c: 29 a1 00 10 lw r1,(r13+16) 8007c10: 28 22 00 1c lw r2,(r1+28) 8007c14: 46 02 00 23 be r16,r2,8007ca0 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 8007c18: 2a 0b 00 08 lw r11,(r16+8) 8007c1c: 5d 60 ff f7 bne r11,r0,8007bf8 rtems_set_errno_and_return_minus_one( ENOENT ); 8007c20: f8 00 0f a1 calli 800baa4 <__errno> 8007c24: 58 2c 00 00 sw (r1+0),r12 8007c28: 34 0b ff ff mvi r11,-1 8007c2c: e3 ff ff c3 bi 8007b38 * 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 ) ) 8007c30: b9 a0 08 00 mv r1,r13 8007c34: 34 02 00 01 mvi r2,1 8007c38: fb ff fe 35 calli 800750c 8007c3c: 5c 20 ff d5 bne r1,r0,8007b90 /* * 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 ); 8007c40: f8 00 0f 99 calli 800baa4 <__errno> 8007c44: 34 02 00 0d mvi r2,13 8007c48: 58 22 00 00 sw (r1+0),r2 8007c4c: 34 0b ff ff mvi r11,-1 8007c50: e3 ff ff ba bi 8007b38 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 8007c54: 2b 81 00 6c lw r1,(sp+108) /* * 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++) { 8007c58: b6 6f 10 00 add r2,r19,r15 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 8007c5c: c9 e1 78 00 sub r15,r15,r1 8007c60: b6 6f 98 00 add r19,r19,r15 8007c64: 5b 33 00 00 sw (r25+0),r19 /* * 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++) { 8007c68: 40 41 00 00 lbu r1,(r2+0) 8007c6c: 44 2b 00 26 be r1,r11,8007d04 8007c70: b8 40 58 00 mv r11,r2 8007c74: e0 00 00 04 bi 8007c84 8007c78: 41 61 00 01 lbu r1,(r11+1) 8007c7c: 35 6b 00 01 addi r11,r11,1 8007c80: 44 20 00 21 be r1,r0,8007d04 if ( !IMFS_is_separator( path[ i ] ) ) 8007c84: fb ff ea 92 calli 80026cc 8007c88: 5c 20 ff fc bne r1,r0,8007c78 rtems_set_errno_and_return_minus_one( ENOENT ); 8007c8c: f8 00 0f 86 calli 800baa4 <__errno> 8007c90: 34 02 00 02 mvi r2,2 8007c94: 58 22 00 00 sw (r1+0),r2 8007c98: 34 0b ff ff mvi r11,-1 8007c9c: e3 ff ff a7 bi 8007b38 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 8007ca0: 28 22 00 14 lw r2,(r1+20) 8007ca4: 28 26 00 0c lw r6,(r1+12) 8007ca8: 28 25 00 10 lw r5,(r1+16) break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8007cac: 28 44 00 04 lw r4,(r2+4) /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 8007cb0: 28 23 00 18 lw r3,(r1+24) 8007cb4: 28 27 00 08 lw r7,(r1+8) break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8007cb8: c9 f1 08 00 sub r1,r15,r17 /* * 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 ) { 8007cbc: 59 a2 00 0c sw (r13+12),r2 8007cc0: 59 a3 00 10 sw (r13+16),r3 8007cc4: 59 a7 00 00 sw (r13+0),r7 8007cc8: 59 a6 00 04 sw (r13+4),r6 8007ccc: 59 a5 00 08 sw (r13+8),r5 newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8007cd0: b6 61 08 00 add r1,r19,r1 8007cd4: b9 a0 10 00 mv r2,r13 8007cd8: bb 20 18 00 mv r3,r25 8007cdc: d8 80 00 00 call r4 8007ce0: b8 20 58 00 mv r11,r1 8007ce4: e3 ff ff 95 bi 8007b38 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 8007ce8: b9 a0 08 00 mv r1,r13 8007cec: 34 02 00 00 mvi r2,0 8007cf0: fb ff ff 24 calli 8007980 8007cf4: b8 20 58 00 mv r11,r1 if ( result == -1 ) 8007cf8: 44 3b ff 90 be r1,fp,8007b38 <== NEVER TAKEN 8007cfc: 29 ab 00 00 lw r11,(r13+0) 8007d00: e3 ff ff b4 bi 8007bd0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 8007d04: b9 a0 08 00 mv r1,r13 8007d08: fb ff fd de calli 8007480 8007d0c: b8 20 58 00 mv r11,r1 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 8007d10: 29 a1 00 00 lw r1,(r13+0) 8007d14: 28 22 00 4c lw r2,(r1+76) 8007d18: 34 01 00 01 mvi r1,1 8007d1c: 5c 41 00 06 bne r2,r1,8007d34 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 8007d20: b9 a0 08 00 mv r1,r13 8007d24: 34 02 00 03 mvi r2,3 8007d28: fb ff fd f9 calli 800750c 8007d2c: 5c 20 ff 83 bne r1,r0,8007b38 8007d30: e3 ff ff c4 bi 8007c40 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 8007d34: f8 00 0f 5c calli 800baa4 <__errno> 8007d38: 34 02 00 14 mvi r2,20 8007d3c: 58 22 00 00 sw (r1+0),r2 8007d40: 34 0b ff ff mvi r11,-1 8007d44: e3 ff ff 7d bi 8007b38 /* * 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 ) { 8007d48: 29 82 00 28 lw r2,(r12+40) newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8007d4c: 2b 81 00 6c lw r1,(sp+108) /* * 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 ) { 8007d50: 29 86 00 20 lw r6,(r12+32) 8007d54: 29 85 00 24 lw r5,(r12+36) 8007d58: 29 83 00 2c lw r3,(r12+44) 8007d5c: 29 87 00 1c lw r7,(r12+28) newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8007d60: 28 44 00 04 lw r4,(r2+4) 8007d64: c9 e1 08 00 sub r1,r15,r1 8007d68: e3 ff ff d5 bi 8007cbc =============================================================================== 08007538 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8007538: 37 9c ff f4 addi sp,sp,-12 800753c: 5b 8b 00 08 sw (sp+8),r11 8007540: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode = node->node_access; 8007544: 28 23 00 00 lw r3,(r1+0) /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8007548: 34 04 00 03 mvi r4,3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 800754c: b8 20 58 00 mv r11,r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8007550: 28 65 00 4c lw r5,(r3+76) 8007554: 5c a4 00 14 bne r5,r4,80075a4 <== NEVER TAKEN /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 8007558: 28 63 00 50 lw r3,(r3+80) 800755c: 58 23 00 00 sw (r1+0),r3 IMFS_Set_handlers( node ); 8007560: 5b 82 00 0c sw (sp+12),r2 8007564: fb ff ff c7 calli 8007480 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 8007568: 2b 82 00 0c lw r2,(sp+12) 800756c: b9 60 08 00 mv r1,r11 8007570: fb ff ff e7 calli 800750c rtems_set_errno_and_return_minus_one( EACCES ); return result; 8007574: 34 02 00 00 mvi r2,0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 8007578: 44 20 00 06 be r1,r0,8007590 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 800757c: b8 40 08 00 mv r1,r2 8007580: 2b 9d 00 04 lw ra,(sp+4) 8007584: 2b 8b 00 08 lw r11,(sp+8) 8007588: 37 9c 00 0c addi sp,sp,12 800758c: c3 a0 00 00 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8007590: f8 00 11 45 calli 800baa4 <__errno> <== NOT EXECUTED 8007594: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 8007598: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800759c: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80075a0: e3 ff ff f7 bi 800757c <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 80075a4: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 80075a8: fb ff ef c9 calli 80034cc <== NOT EXECUTED =============================================================================== 08007980 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8007980: 37 9c ff dc addi sp,sp,-36 8007984: 5b 8b 00 24 sw (sp+36),r11 8007988: 5b 8c 00 20 sw (sp+32),r12 800798c: 5b 8d 00 1c sw (sp+28),r13 8007990: 5b 8e 00 18 sw (sp+24),r14 8007994: 5b 8f 00 14 sw (sp+20),r15 8007998: 5b 90 00 10 sw (sp+16),r16 800799c: 5b 91 00 0c sw (sp+12),r17 80079a0: 5b 92 00 08 sw (sp+8),r18 80079a4: 5b 9d 00 04 sw (sp+4),ra */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 80079a8: 78 0d 08 01 mvhi r13,0x801 80079ac: 39 ad 31 1c ori r13,r13,0x311c 80079b0: 29 a4 00 00 lw r4,(r13+0) int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 80079b4: b8 20 60 00 mv r12,r1 80079b8: b8 40 90 00 mv r18,r2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 80079bc: 34 0e 00 05 mvi r14,5 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 80079c0: 34 0f 00 03 mvi r15,3 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 80079c4: 34 11 00 04 mvi r17,4 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 80079c8: 34 10 00 01 mvi r16,1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 80079cc: 2c 83 00 30 lhu r3,(r4+48) { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 80079d0: 29 8b 00 00 lw r11,(r12+0) /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 80079d4: 34 63 00 01 addi r3,r3,1 80079d8: 20 63 ff ff andi r3,r3,0xffff 80079dc: 0c 83 00 30 sh (r4+48),r3 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 80079e0: 51 c3 00 07 bgeu r14,r3,80079fc rtems_filesystem_link_counts = 0; 80079e4: 0c 80 00 30 sh (r4+48),r0 rtems_set_errno_and_return_minus_one( ELOOP ); 80079e8: f8 00 10 2f calli 800baa4 <__errno> 80079ec: 34 02 00 5c mvi r2,92 80079f0: 58 22 00 00 sw (r1+0),r2 80079f4: 34 01 ff ff mvi r1,-1 80079f8: e0 00 00 08 bi 8007a18 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 80079fc: 29 63 00 4c lw r3,(r11+76) 8007a00: 44 6f 00 11 be r3,r15,8007a44 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 8007a04: 44 71 00 17 be r3,r17,8007a60 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 8007a08: 34 63 ff fd addi r3,r3,-3 8007a0c: 52 03 ff f0 bgeu r16,r3,80079cc 8007a10: 34 01 00 00 mvi r1,0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 8007a14: 0c 80 00 30 sh (r4+48),r0 return result; } 8007a18: 2b 9d 00 04 lw ra,(sp+4) 8007a1c: 2b 8b 00 24 lw r11,(sp+36) 8007a20: 2b 8c 00 20 lw r12,(sp+32) 8007a24: 2b 8d 00 1c lw r13,(sp+28) 8007a28: 2b 8e 00 18 lw r14,(sp+24) 8007a2c: 2b 8f 00 14 lw r15,(sp+20) 8007a30: 2b 90 00 10 lw r16,(sp+16) 8007a34: 2b 91 00 0c lw r17,(sp+12) 8007a38: 2b 92 00 08 lw r18,(sp+8) 8007a3c: 37 9c 00 24 addi sp,sp,36 8007a40: c3 a0 00 00 ret /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 8007a44: b9 80 08 00 mv r1,r12 8007a48: ba 40 10 00 mv r2,r18 8007a4c: fb ff fe bb calli 8007538 else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 8007a50: 5c 20 00 08 bne r1,r0,8007a70 <== NEVER TAKEN 8007a54: 29 63 00 4c lw r3,(r11+76) 8007a58: 29 a4 00 00 lw r4,(r13+0) 8007a5c: e3 ff ff eb bi 8007a08 if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 8007a60: b9 80 08 00 mv r1,r12 8007a64: ba 40 10 00 mv r2,r18 8007a68: fb ff ff 93 calli 80078b4 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 8007a6c: 44 20 ff fa be r1,r0,8007a54 8007a70: 29 a4 00 00 lw r4,(r13+0) 8007a74: e3 ff ff e8 bi 8007a14 =============================================================================== 080078b4 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 80078b4: 37 9c ff ec addi sp,sp,-20 80078b8: 5b 8b 00 10 sw (sp+16),r11 80078bc: 5b 8c 00 0c sw (sp+12),r12 80078c0: 5b 8d 00 08 sw (sp+8),r13 80078c4: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode = node->node_access; 80078c8: 28 2c 00 00 lw r12,(r1+0) int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 80078cc: b8 40 68 00 mv r13,r2 80078d0: b8 20 58 00 mv r11,r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 80078d4: 29 82 00 4c lw r2,(r12+76) 80078d8: 34 01 00 04 mvi r1,4 80078dc: 5c 41 00 27 bne r2,r1,8007978 <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 80078e0: 29 84 00 08 lw r4,(r12+8) 80078e4: 44 80 00 23 be r4,r0,8007970 <== NEVER TAKEN * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 80078e8: 29 81 00 50 lw r1,(r12+80) 80078ec: 37 82 00 14 addi r2,sp,20 80078f0: b9 60 18 00 mv r3,r11 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 80078f4: 59 64 00 00 sw (r11+0),r4 rtems_filesystem_get_sym_start_loc( 80078f8: f8 00 04 78 calli 8008ad8 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 80078fc: 29 81 00 50 lw r1,(r12+80) 8007900: 2b 8c 00 14 lw r12,(sp+20) 8007904: b4 2c 60 00 add r12,r1,r12 8007908: b9 80 08 00 mv r1,r12 800790c: f8 00 15 12 calli 800cd54 8007910: b8 20 10 00 mv r2,r1 8007914: b9 a0 18 00 mv r3,r13 8007918: b9 80 08 00 mv r1,r12 800791c: b9 60 20 00 mv r4,r11 8007920: fb ff ff 23 calli 80075ac 8007924: b8 20 60 00 mv r12,r1 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 8007928: b9 60 08 00 mv r1,r11 800792c: fb ff fe d5 calli 8007480 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 8007930: b9 60 08 00 mv r1,r11 8007934: b9 a0 10 00 mv r2,r13 8007938: fb ff fe f5 calli 800750c 800793c: 44 20 00 08 be r1,r0,800795c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8007940: b9 80 08 00 mv r1,r12 8007944: 2b 9d 00 04 lw ra,(sp+4) 8007948: 2b 8b 00 10 lw r11,(sp+16) 800794c: 2b 8c 00 0c lw r12,(sp+12) 8007950: 2b 8d 00 08 lw r13,(sp+8) 8007954: 37 9c 00 14 addi sp,sp,20 8007958: c3 a0 00 00 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 800795c: f8 00 10 52 calli 800baa4 <__errno> <== NOT EXECUTED 8007960: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 8007964: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007968: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 800796c: e3 ff ff f5 bi 8007940 <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 8007970: 78 01 ba d0 mvhi r1,0xbad0 <== NOT EXECUTED 8007974: fb ff ee d6 calli 80034cc <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 8007978: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 800797c: fb ff ee d4 calli 80034cc <== NOT EXECUTED =============================================================================== 08001854 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 8001854: 37 9c ff f0 addi sp,sp,-16 8001858: 5b 8b 00 10 sw (sp+16),r11 800185c: 5b 8c 00 0c sw (sp+12),r12 8001860: 5b 8d 00 08 sw (sp+8),r13 8001864: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode = iop->pathinfo.node_access; 8001868: 28 2d 00 1c lw r13,(r1+28) int err = pipe_release(&JNODE2PIPE(jnode), iop); 800186c: b8 20 10 00 mv r2,r1 } int IMFS_fifo_close( rtems_libio_t *iop ) { 8001870: b8 20 60 00 mv r12,r1 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_release(&JNODE2PIPE(jnode), iop); 8001874: 35 a1 00 50 addi r1,r13,80 8001878: f8 00 21 16 calli 8009cd0 800187c: b8 20 58 00 mv r11,r1 if (err == 0) { 8001880: 44 20 00 0d be r1,r0,80018b4 <== ALWAYS TAKEN iop->flags &= ~LIBIO_FLAGS_OPEN; IMFS_check_node_remove(jnode); } IMFS_FIFO_RETURN(err); 8001884: 4c 20 00 05 bge r1,r0,8001898 <== NOT EXECUTED 8001888: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 800188c: f8 00 2e cb calli 800d3b8 <__errno> <== NOT EXECUTED 8001890: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8001894: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED } 8001898: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800189c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80018a0: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 80018a4: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 80018a8: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 80018ac: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 80018b0: c3 a0 00 00 ret <== 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; 80018b4: 29 83 00 18 lw r3,(r12+24) 80018b8: 34 02 fe ff mvi r2,-257 IMFS_check_node_remove(jnode); 80018bc: b9 a0 08 00 mv r1,r13 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (err == 0) { iop->flags &= ~LIBIO_FLAGS_OPEN; 80018c0: a0 62 10 00 and r2,r3,r2 80018c4: 59 82 00 18 sw (r12+24),r2 IMFS_check_node_remove(jnode); 80018c8: f8 00 02 0f calli 8002104 } IMFS_FIFO_RETURN(err); } 80018cc: b9 60 08 00 mv r1,r11 80018d0: 2b 9d 00 04 lw ra,(sp+4) 80018d4: 2b 8b 00 10 lw r11,(sp+16) 80018d8: 2b 8c 00 0c lw r12,(sp+12) 80018dc: 2b 8d 00 08 lw r13,(sp+8) 80018e0: 37 9c 00 10 addi sp,sp,16 80018e4: c3 a0 00 00 ret =============================================================================== 08001678 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 8001678: 37 9c ff f8 addi sp,sp,-8 800167c: 5b 8b 00 08 sw (sp+8),r11 8001680: 5b 9d 00 04 sw (sp+4),ra 8001684: b8 20 28 00 mv r5,r1 off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 8001688: 28 21 00 1c lw r1,(r1+28) 800168c: b8 60 10 00 mv r2,r3 8001690: b8 80 18 00 mv r3,r4 8001694: 28 21 00 50 lw r1,(r1+80) 8001698: b8 a0 20 00 mv r4,r5 800169c: f8 00 23 e9 calli 800a640 80016a0: b8 20 58 00 mv r11,r1 IMFS_FIFO_RETURN(err); 80016a4: 4c 20 00 07 bge r1,r0,80016c0 <== NEVER TAKEN 80016a8: f8 00 2f 44 calli 800d3b8 <__errno> 80016ac: c8 0b 58 00 sub r11,r0,r11 80016b0: 58 2b 00 00 sw (r1+0),r11 80016b4: 34 02 ff ff mvi r2,-1 80016b8: 34 01 ff ff mvi r1,-1 80016bc: e0 00 00 04 bi 80016cc 80016c0: 34 02 00 1f mvi r2,31 <== NOT EXECUTED 80016c4: f8 00 68 5c calli 801b834 <__ashrsi3> <== NOT EXECUTED 80016c8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED } 80016cc: 2b 9d 00 04 lw ra,(sp+4) 80016d0: 2b 8b 00 08 lw r11,(sp+8) 80016d4: 37 9c 00 08 addi sp,sp,8 80016d8: c3 a0 00 00 ret =============================================================================== 08001778 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8001778: 37 9c ff ec addi sp,sp,-20 800177c: 5b 8b 00 0c sw (sp+12),r11 8001780: 5b 8c 00 08 sw (sp+8),r12 8001784: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode = iop->pathinfo.node_access; 8001788: 28 2c 00 1c lw r12,(r1+28) int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 800178c: b8 20 20 00 mv r4,r1 8001790: 29 81 00 50 lw r1,(r12+80) 8001794: f8 00 22 ff calli 800a390 8001798: b8 20 58 00 mv r11,r1 if (err > 0) { 800179c: 4c 01 00 0d bge r0,r1,80017d0 IMFS_mtime_ctime_update(jnode); 80017a0: 37 81 00 10 addi r1,sp,16 80017a4: 34 02 00 00 mvi r2,0 80017a8: f8 00 05 00 calli 8002ba8 80017ac: 2b 81 00 10 lw r1,(sp+16) 80017b0: 59 81 00 44 sw (r12+68),r1 80017b4: 59 81 00 48 sw (r12+72),r1 } IMFS_FIFO_RETURN(err); } 80017b8: b9 60 08 00 mv r1,r11 80017bc: 2b 9d 00 04 lw ra,(sp+4) 80017c0: 2b 8b 00 0c lw r11,(sp+12) 80017c4: 2b 8c 00 08 lw r12,(sp+8) 80017c8: 37 9c 00 14 addi sp,sp,20 80017cc: c3 a0 00 00 ret int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 80017d0: 44 20 ff fa be r1,r0,80017b8 <== NEVER TAKEN 80017d4: c8 0b 58 00 sub r11,r0,r11 80017d8: f8 00 2e f8 calli 800d3b8 <__errno> 80017dc: 58 2b 00 00 sw (r1+0),r11 80017e0: 34 0b ff ff mvi r11,-1 80017e4: e3 ff ff f5 bi 80017b8 =============================================================================== 08007e4c : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 8007e4c: 37 9c ff ec addi sp,sp,-20 8007e50: 5b 8b 00 14 sw (sp+20),r11 8007e54: 5b 8c 00 10 sw (sp+16),r12 8007e58: 5b 8d 00 0c sw (sp+12),r13 8007e5c: 5b 8e 00 08 sw (sp+8),r14 8007e60: 5b 9d 00 04 sw (sp+4),ra 8007e64: b8 40 60 00 mv r12,r2 8007e68: b8 20 58 00 mv r11,r1 #if defined(RTEMS_DEBUG) assert( directory ); assert( name ); #endif if ( !name ) 8007e6c: 5c 40 00 0a bne r2,r0,8007e94 <== ALWAYS TAKEN return 0; 8007e70: 34 0b 00 00 mvi r11,0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 8007e74: b9 60 08 00 mv r1,r11 8007e78: 2b 9d 00 04 lw ra,(sp+4) 8007e7c: 2b 8b 00 14 lw r11,(sp+20) 8007e80: 2b 8c 00 10 lw r12,(sp+16) 8007e84: 2b 8d 00 0c lw r13,(sp+12) 8007e88: 2b 8e 00 08 lw r14,(sp+8) 8007e8c: 37 9c 00 14 addi sp,sp,20 8007e90: c3 a0 00 00 ret assert( name ); #endif if ( !name ) return 0; if ( !directory ) 8007e94: 44 20 ff f8 be r1,r0,8007e74 <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 8007e98: b8 40 08 00 mv r1,r2 8007e9c: 78 02 08 01 mvhi r2,0x801 8007ea0: 38 42 24 30 ori r2,r2,0x2430 8007ea4: f8 00 13 35 calli 800cb78 8007ea8: 44 20 ff f3 be r1,r0,8007e74 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 8007eac: 78 02 08 01 mvhi r2,0x801 8007eb0: b9 80 08 00 mv r1,r12 8007eb4: 38 42 24 34 ori r2,r2,0x2434 8007eb8: f8 00 13 30 calli 800cb78 8007ebc: 5c 20 00 0a bne r1,r0,8007ee4 <== ALWAYS TAKEN return directory->Parent; 8007ec0: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 8007ec4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8007ec8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007ecc: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 8007ed0: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 8007ed4: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 8007ed8: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 8007edc: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8007ee0: c3 a0 00 00 ret <== NOT EXECUTED if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 8007ee4: 29 6d 00 50 lw r13,(r11+80) 8007ee8: 35 6e 00 54 addi r14,r11,84 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; 8007eec: 34 0b 00 00 mvi r11,0 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 8007ef0: 5d ae 00 04 bne r13,r14,8007f00 8007ef4: e3 ff ff e0 bi 8007e74 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 8007ef8: 29 ad 00 00 lw r13,(r13+0) if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 8007efc: 45 ae ff dd be r13,r14,8007e70 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 8007f00: 35 a2 00 0c addi r2,r13,12 8007f04: b9 80 08 00 mv r1,r12 8007f08: f8 00 13 1c calli 800cb78 8007f0c: 5c 20 ff fb bne r1,r0,8007ef8 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 8007f10: b9 a0 58 00 mv r11,r13 8007f14: e3 ff ff d8 bi 8007e74 =============================================================================== 08007d6c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 8007d6c: 37 9c ff d8 addi sp,sp,-40 8007d70: 5b 8b 00 14 sw (sp+20),r11 8007d74: 5b 8c 00 10 sw (sp+16),r12 8007d78: 5b 8d 00 0c sw (sp+12),r13 8007d7c: 5b 8e 00 08 sw (sp+8),r14 8007d80: 5b 9d 00 04 sw (sp+4),ra /* * 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; 8007d84: 28 2b 00 1c lw r11,(r1+28) loc = temp_mt_entry->mt_fs_root; 8007d88: 28 25 00 20 lw r5,(r1+32) 8007d8c: 28 24 00 24 lw r4,(r1+36) 8007d90: 28 23 00 28 lw r3,(r1+40) 8007d94: 28 22 00 2c lw r2,(r1+44) 8007d98: 5b 8b 00 18 sw (sp+24),r11 8007d9c: 5b 85 00 1c sw (sp+28),r5 8007da0: 5b 84 00 20 sw (sp+32),r4 8007da4: 5b 83 00 24 sw (sp+36),r3 8007da8: 5b 82 00 28 sw (sp+40),r2 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 8007dac: 58 20 00 1c sw (r1+28),r0 8007db0: 37 8d 00 18 addi r13,sp,24 do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { 8007db4: 34 0c 00 01 mvi r12,1 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 8007db8: b9 a0 08 00 mv r1,r13 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 8007dbc: 29 6e 00 08 lw r14,(r11+8) loc.node_access = (void *)jnode; 8007dc0: 5b 8b 00 18 sw (sp+24),r11 IMFS_Set_handlers( &loc ); 8007dc4: fb ff fd af calli 8007480 if ( jnode->type != IMFS_DIRECTORY ) { 8007dc8: 29 61 00 4c lw r1,(r11+76) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8007dcc: 35 63 00 54 addi r3,r11,84 8007dd0: 5c 2c 00 13 bne r1,r12,8007e1c result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 8007dd4: 29 61 00 50 lw r1,(r11+80) 8007dd8: 44 23 00 17 be r1,r3,8007e34 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 8007ddc: 45 60 00 08 be r11,r0,8007dfc if ( jnode->type == IMFS_DIRECTORY ) { 8007de0: 29 61 00 4c lw r1,(r11+76) 8007de4: 5c 2c ff f5 bne r1,r12,8007db8 <== NEVER TAKEN if ( jnode_has_children( jnode ) ) 8007de8: 29 61 00 50 lw r1,(r11+80) 8007dec: 35 62 00 54 addi r2,r11,84 8007df0: 44 22 ff f2 be r1,r2,8007db8 jnode = jnode_get_first_child( jnode ); 8007df4: b8 20 58 00 mv r11,r1 } } } while (jnode != NULL); 8007df8: 5c 20 ff f0 bne r1,r0,8007db8 <== ALWAYS TAKEN return 0; 8007dfc: 34 01 00 00 mvi r1,0 } 8007e00: 2b 9d 00 04 lw ra,(sp+4) 8007e04: 2b 8b 00 14 lw r11,(sp+20) 8007e08: 2b 8c 00 10 lw r12,(sp+16) 8007e0c: 2b 8d 00 0c lw r13,(sp+12) 8007e10: 2b 8e 00 08 lw r14,(sp+8) 8007e14: 37 9c 00 28 addi sp,sp,40 8007e18: c3 a0 00 00 ret next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 8007e1c: b9 a0 10 00 mv r2,r13 8007e20: 34 01 00 00 mvi r1,0 8007e24: fb ff e4 16 calli 8000e7c if (result != 0) 8007e28: 5c 20 00 07 bne r1,r0,8007e44 <== NEVER TAKEN jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; 8007e2c: b9 c0 58 00 mv r11,r14 8007e30: e3 ff ff eb bi 8007ddc result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 8007e34: 34 01 00 00 mvi r1,0 8007e38: b9 a0 10 00 mv r2,r13 8007e3c: fb ff e4 10 calli 8000e7c if (result != 0) 8007e40: 44 20 ff fb be r1,r0,8007e2c <== ALWAYS TAKEN return -1; 8007e44: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8007e48: e3 ff ff ee bi 8007e00 <== NOT EXECUTED =============================================================================== 08007f18 : const char *path, int pathlen, char *token, int *token_len ) { 8007f18: 37 9c ff e0 addi sp,sp,-32 8007f1c: 5b 8b 00 20 sw (sp+32),r11 8007f20: 5b 8c 00 1c sw (sp+28),r12 8007f24: 5b 8d 00 18 sw (sp+24),r13 8007f28: 5b 8e 00 14 sw (sp+20),r14 8007f2c: 5b 8f 00 10 sw (sp+16),r15 8007f30: 5b 90 00 0c sw (sp+12),r16 8007f34: 5b 91 00 08 sw (sp+8),r17 8007f38: 5b 9d 00 04 sw (sp+4),ra register int i = 0; 8007f3c: 34 0b 00 00 mvi r11,0 const char *path, int pathlen, char *token, int *token_len ) { 8007f40: b8 20 78 00 mv r15,r1 8007f44: b8 40 70 00 mv r14,r2 8007f48: b8 60 68 00 mv r13,r3 8007f4c: b8 80 88 00 mv r17,r4 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 8007f50: 40 2c 00 00 lbu r12,(r1+0) while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) 8007f54: 34 10 00 20 mvi r16,32 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 8007f58: e0 00 00 07 bi 8007f74 8007f5c: 44 a1 00 0b be r5,r1,8007f88 <== NEVER TAKEN token[i] = c; 8007f60: 30 cc 00 00 sb (r6+0),r12 if ( i == IMFS_NAME_MAX ) 8007f64: 45 70 00 32 be r11,r16,800802c return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 8007f68: 35 6b 00 01 addi r11,r11,1 #include #include "imfs.h" #include IMFS_token_types IMFS_get_token( 8007f6c: b5 eb 28 00 add r5,r15,r11 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 8007f70: 40 ac 00 00 lbu r12,(r5+0) /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 8007f74: b9 80 08 00 mv r1,r12 8007f78: fb ff e9 d5 calli 80026cc 8007f7c: e9 cb 28 00 cmpg r5,r14,r11 #include #include "imfs.h" #include IMFS_token_types IMFS_get_token( 8007f80: b5 ab 30 00 add r6,r13,r11 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 8007f84: 44 20 ff f6 be r1,r0,8007f5c /* * Copy a seperator into token. */ if ( i == 0 ) { 8007f88: 5d 60 00 14 bne r11,r0,8007fd8 token[i] = c; if ( (token[i] != '\0') && pathlen ) { 8007f8c: 7d 81 00 00 cmpnei r1,r12,0 8007f90: 7d ce 00 00 cmpnei r14,r14,0 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 8007f94: 31 ac 00 00 sb (r13+0),r12 if ( (token[i] != '\0') && pathlen ) { 8007f98: a0 2e 70 00 and r14,r1,r14 8007f9c: 45 cb 00 26 be r14,r11,8008034 i++; 8007fa0: 34 0b 00 01 mvi r11,1 type = IMFS_CURRENT_DIR; 8007fa4: 34 02 00 01 mvi r2,1 /* * Set token_len to the number of characters copied. */ *token_len = i; 8007fa8: 5a 2b 00 00 sw (r17+0),r11 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 8007fac: b8 40 08 00 mv r1,r2 8007fb0: 2b 9d 00 04 lw ra,(sp+4) 8007fb4: 2b 8b 00 20 lw r11,(sp+32) 8007fb8: 2b 8c 00 1c lw r12,(sp+28) 8007fbc: 2b 8d 00 18 lw r13,(sp+24) 8007fc0: 2b 8e 00 14 lw r14,(sp+20) 8007fc4: 2b 8f 00 10 lw r15,(sp+16) 8007fc8: 2b 90 00 0c lw r16,(sp+12) 8007fcc: 2b 91 00 08 lw r17,(sp+8) 8007fd0: 37 9c 00 20 addi sp,sp,32 8007fd4: c3 a0 00 00 ret i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 8007fd8: b5 ab 08 00 add r1,r13,r11 8007fdc: 40 22 ff ff lbu r2,(r1+-1) 8007fe0: 44 40 00 02 be r2,r0,8007fe8 <== NEVER TAKEN token[i] = '\0'; 8007fe4: 30 20 00 00 sb (r1+0),r0 * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 8007fe8: 78 02 08 01 mvhi r2,0x801 8007fec: 38 42 24 3c ori r2,r2,0x243c /* * Set token_len to the number of characters copied. */ *token_len = i; 8007ff0: 5a 2b 00 00 sw (r17+0),r11 * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 8007ff4: b9 a0 08 00 mv r1,r13 8007ff8: f8 00 12 e0 calli 800cb78 type = IMFS_UP_DIR; 8007ffc: 34 02 00 02 mvi r2,2 * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 8008000: 44 20 ff eb be r1,r0,8007fac type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 8008004: 78 02 08 01 mvhi r2,0x801 8008008: 38 42 24 38 ori r2,r2,0x2438 800800c: b9 a0 08 00 mv r1,r13 8008010: f8 00 12 da calli 800cb78 8008014: 64 21 00 00 cmpei r1,r1,0 8008018: 34 02 ff fe mvi r2,-2 800801c: c8 01 08 00 sub r1,r0,r1 8008020: a0 22 10 00 and r2,r1,r2 8008024: 34 42 00 03 addi r2,r2,3 8008028: e3 ff ff e1 bi 8007fac while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; 800802c: 34 02 00 04 mvi r2,4 8008030: e3 ff ff df bi 8007fac if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 8008034: 34 02 00 00 mvi r2,0 /* * Set token_len to the number of characters copied. */ *token_len = i; 8008038: 5a 2b 00 00 sw (r17+0),r11 800803c: e3 ff ff dc bi 8007fac =============================================================================== 0800091c : 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 ) { 800091c: 37 9c ff d8 addi sp,sp,-40 8000920: 5b 8b 00 28 sw (sp+40),r11 8000924: 5b 8c 00 24 sw (sp+36),r12 8000928: 5b 8d 00 20 sw (sp+32),r13 800092c: 5b 8e 00 1c sw (sp+28),r14 8000930: 5b 8f 00 18 sw (sp+24),r15 8000934: 5b 90 00 14 sw (sp+20),r16 8000938: 5b 91 00 10 sw (sp+16),r17 800093c: 5b 92 00 0c sw (sp+12),r18 8000940: 5b 93 00 08 sw (sp+8),r19 8000944: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 8000948: 78 06 08 01 mvhi r6,0x801 800094c: 38 c6 30 14 ori r6,r6,0x3014 8000950: 28 c7 00 00 lw r7,(r6+0) 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 ) { 8000954: b8 20 58 00 mv r11,r1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 8000958: 34 01 00 10 mvi r1,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 ) { 800095c: b8 40 70 00 mv r14,r2 8000960: b8 60 80 00 mv r16,r3 8000964: b8 80 68 00 mv r13,r4 8000968: b8 a0 78 00 mv r15,r5 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 800096c: 44 e1 00 08 be r7,r1,800098c 8000970: 34 06 00 05 mvi r6,5 8000974: 34 01 00 20 mvi r1,32 8000978: 34 c6 ff ff addi r6,r6,-1 800097c: 44 e1 00 04 be r7,r1,800098c 8000980: b4 21 08 00 add r1,r1,r1 8000984: 5c c0 ff fd bne r6,r0,8000978 <== ALWAYS TAKEN is_valid = true; } } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 8000988: 34 07 00 80 mvi r7,128 <== 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) 800098c: 78 01 08 01 mvhi r1,0x801 8000990: 38 21 36 1c ori r1,r1,0x361c 8000994: 58 27 00 00 sw (r1+0),r7 /* * 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(); 8000998: f8 00 1a aa calli 8007440 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; 800099c: 78 06 08 01 mvhi r6,0x801 80009a0: 38 c6 23 c0 ori r6,r6,0x23c0 80009a4: 28 c2 00 28 lw r2,(r6+40) /* * 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(); 80009a8: b8 20 60 00 mv r12,r1 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; 80009ac: 28 d3 00 00 lw r19,(r6+0) 80009b0: 28 c1 00 2c lw r1,(r6+44) 80009b4: 28 d2 00 04 lw r18,(r6+4) 80009b8: 28 d1 00 08 lw r17,(r6+8) 80009bc: 28 ca 00 0c lw r10,(r6+12) 80009c0: 28 c9 00 10 lw r9,(r6+16) 80009c4: 28 c8 00 14 lw r8,(r6+20) 80009c8: 28 c7 00 18 lw r7,(r6+24) 80009cc: 28 c5 00 1c lw r5,(r6+28) 80009d0: 28 c4 00 20 lw r4,(r6+32) 80009d4: 28 c3 00 24 lw r3,(r6+36) 80009d8: 59 62 00 60 sw (r11+96),r2 80009dc: 59 61 00 64 sw (r11+100),r1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 80009e0: 34 02 00 14 mvi r2,20 /* * 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(); 80009e4: 59 6c 00 1c sw (r11+28),r12 temp_mt_entry->mt_fs_root.handlers = directory_handlers; 80009e8: 59 6d 00 24 sw (r11+36),r13 temp_mt_entry->mt_fs_root.ops = op_table; 80009ec: 59 6e 00 28 sw (r11+40),r14 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 80009f0: 59 73 00 38 sw (r11+56),r19 80009f4: 59 72 00 3c sw (r11+60),r18 80009f8: 59 71 00 40 sw (r11+64),r17 80009fc: 59 6a 00 44 sw (r11+68),r10 8000a00: 59 69 00 48 sw (r11+72),r9 8000a04: 59 68 00 4c sw (r11+76),r8 8000a08: 59 67 00 50 sw (r11+80),r7 8000a0c: 59 65 00 54 sw (r11+84),r5 8000a10: 59 64 00 58 sw (r11+88),r4 8000a14: 59 63 00 5c sw (r11+92),r3 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 8000a18: 34 01 00 01 mvi r1,1 8000a1c: f8 00 02 1c calli 800128c 8000a20: b8 20 10 00 mv r2,r1 if ( !fs_info ) { 8000a24: 44 20 00 1b be r1,r0,8000a90 <== NEVER TAKEN /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 8000a28: 78 06 08 01 mvhi r6,0x801 8000a2c: 38 c6 36 20 ori r6,r6,0x3620 8000a30: 28 c3 00 00 lw r3,(r6+0) 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; 8000a34: 59 62 00 34 sw (r11+52),r2 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 8000a38: 34 01 00 01 mvi r1,1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 8000a3c: 58 43 00 00 sw (r2+0),r3 fs_info->ino_count = 1; 8000a40: 58 41 00 04 sw (r2+4),r1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 8000a44: 34 63 00 01 addi r3,r3,1 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 8000a48: 58 50 00 08 sw (r2+8),r16 fs_info->directory_handlers = directory_handlers; 8000a4c: 58 4d 00 0c sw (r2+12),r13 fs_info->fifo_handlers = fifo_handlers; 8000a50: 58 4f 00 10 sw (r2+16),r15 jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 8000a54: 59 81 00 38 sw (r12+56),r1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 8000a58: 58 c3 00 00 sw (r6+0),r3 fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; 8000a5c: 34 01 00 00 mvi r1,0 } 8000a60: 2b 9d 00 04 lw ra,(sp+4) 8000a64: 2b 8b 00 28 lw r11,(sp+40) 8000a68: 2b 8c 00 24 lw r12,(sp+36) 8000a6c: 2b 8d 00 20 lw r13,(sp+32) 8000a70: 2b 8e 00 1c lw r14,(sp+28) 8000a74: 2b 8f 00 18 lw r15,(sp+24) 8000a78: 2b 90 00 14 lw r16,(sp+20) 8000a7c: 2b 91 00 10 lw r17,(sp+16) 8000a80: 2b 92 00 0c lw r18,(sp+12) 8000a84: 2b 93 00 08 lw r19,(sp+8) 8000a88: 37 9c 00 28 addi sp,sp,40 8000a8c: c3 a0 00 00 ret /* * 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); 8000a90: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8000a94: f8 00 02 ae calli 800154c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8000a98: f8 00 2c 03 calli 800baa4 <__errno> <== NOT EXECUTED 8000a9c: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8000aa0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000aa4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000aa8: e3 ff ff ee bi 8000a60 <== NOT EXECUTED =============================================================================== 08000aac : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 8000aac: 37 9c ff a8 addi sp,sp,-88 8000ab0: 5b 8b 00 10 sw (sp+16),r11 8000ab4: 5b 8c 00 0c sw (sp+12),r12 8000ab8: 5b 8d 00 08 sw (sp+8),r13 8000abc: 5b 9d 00 04 sw (sp+4),ra int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 8000ac0: 28 25 00 00 lw r5,(r1+0) int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 8000ac4: b8 60 58 00 mv r11,r3 /* * 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 ) 8000ac8: 34 03 00 07 mvi r3,7 8000acc: 2c a4 00 34 lhu r4,(r5+52) int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 8000ad0: 5b 85 00 38 sw (sp+56),r5 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 8000ad4: b8 40 68 00 mv r13,r2 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 8000ad8: 50 64 00 06 bgeu r3,r4,8000af0 rtems_set_errno_and_return_minus_one( EMLINK ); 8000adc: f8 00 2b f2 calli 800baa4 <__errno> 8000ae0: 34 02 00 1f mvi r2,31 8000ae4: 58 22 00 00 sw (r1+0),r2 8000ae8: 34 01 ff ff mvi r1,-1 8000aec: e0 00 00 1b bi 8000b58 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 8000af0: b9 60 08 00 mv r1,r11 8000af4: f8 00 30 98 calli 800cd54 8000af8: 37 8c 00 14 addi r12,sp,20 8000afc: b8 20 10 00 mv r2,r1 8000b00: b9 80 18 00 mv r3,r12 8000b04: 37 84 00 58 addi r4,sp,88 8000b08: b9 60 08 00 mv r1,r11 8000b0c: f8 00 1d 03 calli 8007f18 * 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( 8000b10: b9 a0 08 00 mv r1,r13 8000b14: 34 02 00 03 mvi r2,3 8000b18: b9 80 18 00 mv r3,r12 8000b1c: 38 04 a1 ff mvu r4,0xa1ff 8000b20: 37 85 00 38 addi r5,sp,56 8000b24: f8 00 19 f5 calli 80072f8 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 8000b28: 44 20 00 12 be r1,r0,8000b70 <== NEVER TAKEN 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++; 8000b2c: 2b 83 00 38 lw r3,(sp+56) IMFS_update_ctime( info.hard_link.link_node ); 8000b30: 34 02 00 00 mvi r2,0 8000b34: 37 81 00 50 addi r1,sp,80 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++; 8000b38: 2c 64 00 34 lhu r4,(r3+52) 8000b3c: 34 84 00 01 addi r4,r4,1 8000b40: 0c 64 00 34 sh (r3+52),r4 IMFS_update_ctime( info.hard_link.link_node ); 8000b44: f8 00 02 b0 calli 8001604 8000b48: 2b 83 00 50 lw r3,(sp+80) 8000b4c: 2b 82 00 38 lw r2,(sp+56) return 0; 8000b50: 34 01 00 00 mvi r1,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 ); 8000b54: 58 43 00 48 sw (r2+72),r3 return 0; } 8000b58: 2b 9d 00 04 lw ra,(sp+4) 8000b5c: 2b 8b 00 10 lw r11,(sp+16) 8000b60: 2b 8c 00 0c lw r12,(sp+12) 8000b64: 2b 8d 00 08 lw r13,(sp+8) 8000b68: 37 9c 00 58 addi sp,sp,88 8000b6c: c3 a0 00 00 ret ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 8000b70: f8 00 2b cd calli 800baa4 <__errno> <== NOT EXECUTED 8000b74: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8000b78: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000b7c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000b80: e3 ff ff f6 bi 8000b58 <== NOT EXECUTED =============================================================================== 0800a45c : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 800a45c: 37 9c ff f4 addi sp,sp,-12 800a460: 5b 8b 00 0c sw (sp+12),r11 800a464: 5b 8c 00 08 sw (sp+8),r12 800a468: 5b 9d 00 04 sw (sp+4),ra #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 800a46c: 34 03 00 01 mvi r3,1 800a470: fb ff fe c3 calli 8009f7c if ( *block_entry_ptr ) 800a474: 28 2c 00 00 lw r12,(r1+0) #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 800a478: b8 20 58 00 mv r11,r1 if ( *block_entry_ptr ) return 0; 800a47c: 34 02 00 00 mvi r2,0 assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); if ( *block_entry_ptr ) 800a480: 45 80 00 07 be r12,r0,800a49c if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 800a484: b8 40 08 00 mv r1,r2 800a488: 2b 9d 00 04 lw ra,(sp+4) 800a48c: 2b 8b 00 0c lw r11,(sp+12) 800a490: 2b 8c 00 08 lw r12,(sp+8) 800a494: 37 9c 00 0c addi sp,sp,12 800a498: c3 a0 00 00 ret #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 800a49c: fb ff fe a8 calli 8009f3c if ( !memory ) return 1; 800a4a0: 34 02 00 01 mvi r2,1 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 800a4a4: 44 2c ff f8 be r1,r12,800a484 <== NEVER TAKEN return 1; *block_entry_ptr = memory; 800a4a8: 59 61 00 00 sw (r11+0),r1 return 0; 800a4ac: 34 02 00 00 mvi r2,0 800a4b0: e3 ff ff f5 bi 800a484 =============================================================================== 0800a73c : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 800a73c: 37 9c ff e0 addi sp,sp,-32 800a740: 5b 8b 00 20 sw (sp+32),r11 800a744: 5b 8c 00 1c sw (sp+28),r12 800a748: 5b 8d 00 18 sw (sp+24),r13 800a74c: 5b 8e 00 14 sw (sp+20),r14 800a750: 5b 8f 00 10 sw (sp+16),r15 800a754: 5b 90 00 0c sw (sp+12),r16 800a758: 5b 91 00 08 sw (sp+8),r17 800a75c: 5b 9d 00 04 sw (sp+4),ra #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 800a760: 78 03 08 01 mvhi r3,0x801 800a764: 38 63 36 1c ori r3,r3,0x361c 800a768: 28 6d 00 00 lw r13,(r3+0) MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 800a76c: b8 40 78 00 mv r15,r2 800a770: b8 20 60 00 mv r12,r1 #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 800a774: 01 ab 00 01 srui r11,r13,1 800a778: 01 6b 00 01 srui r11,r11,1 800a77c: b9 60 10 00 mv r2,r11 800a780: 35 61 00 01 addi r1,r11,1 800a784: f8 00 1a 05 calli 8010f98 <__mulsi3> 800a788: b9 60 10 00 mv r2,r11 800a78c: 34 21 00 01 addi r1,r1,1 800a790: f8 00 1a 02 calli 8010f98 <__mulsi3> 800a794: 34 21 ff ff addi r1,r1,-1 800a798: b9 a0 10 00 mv r2,r13 800a79c: f8 00 19 ff calli 8010f98 <__mulsi3> 800a7a0: 54 2f 00 06 bgu r1,r15,800a7b8 rtems_set_errno_and_return_minus_one( EINVAL ); 800a7a4: f8 00 04 c0 calli 800baa4 <__errno> 800a7a8: 34 02 00 16 mvi r2,22 800a7ac: 58 22 00 00 sw (r1+0),r2 800a7b0: 34 01 ff ff mvi r1,-1 800a7b4: e0 00 00 2e bi 800a86c if ( new_length <= the_jnode->info.file.size ) 800a7b8: b9 e0 08 00 mv r1,r15 800a7bc: 34 02 00 1f mvi r2,31 800a7c0: f8 00 19 a8 calli 8010e60 <__ashrsi3> 800a7c4: 29 8b 00 50 lw r11,(r12+80) 800a7c8: b8 20 80 00 mv r16,r1 800a7cc: 29 91 00 54 lw r17,(r12+84) 800a7d0: 48 2b 00 05 bg r1,r11,800a7e4 <== NEVER TAKEN 800a7d4: 5c 2b 00 02 bne r1,r11,800a7dc <== NEVER TAKEN 800a7d8: 55 f1 00 03 bgu r15,r17,800a7e4 return 0; 800a7dc: 34 01 00 00 mvi r1,0 800a7e0: e0 00 00 23 bi 800a86c /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 800a7e4: b9 a0 10 00 mv r2,r13 800a7e8: b9 e0 08 00 mv r1,r15 800a7ec: f8 00 19 f7 calli 8010fc8 <__divsi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 800a7f0: 34 02 00 1f mvi r2,31 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 800a7f4: b8 20 70 00 mv r14,r1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 800a7f8: b9 a0 08 00 mv r1,r13 800a7fc: f8 00 19 99 calli 8010e60 <__ashrsi3> 800a800: b8 20 18 00 mv r3,r1 800a804: b9 a0 20 00 mv r4,r13 800a808: b9 60 08 00 mv r1,r11 800a80c: ba 20 10 00 mv r2,r17 800a810: f8 00 13 a3 calli 800f69c <__divdi3> 800a814: b8 40 68 00 mv r13,r2 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 800a818: 54 4e 00 08 bgu r2,r14,800a838 <== NEVER TAKEN 800a81c: b8 40 58 00 mv r11,r2 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 800a820: b9 60 10 00 mv r2,r11 800a824: b9 80 08 00 mv r1,r12 800a828: fb ff ff 0d calli 800a45c 800a82c: 5c 20 00 0b bne r1,r0,800a858 <== NEVER TAKEN /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 800a830: 35 6b 00 01 addi r11,r11,1 800a834: 51 cb ff fb bgeu r14,r11,800a820 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 800a838: 59 90 00 50 sw (r12+80),r16 800a83c: 59 8f 00 54 sw (r12+84),r15 return 0; 800a840: 34 01 00 00 mvi r1,0 800a844: e0 00 00 0a bi 800a86c */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 800a848: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800a84c: b9 80 08 00 mv r1,r12 <== 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-- ) { 800a850: 35 6b ff ff addi r11,r11,-1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 800a854: fb ff ff ad calli 800a708 <== 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-- ) { 800a858: 51 6d ff fc bgeu r11,r13,800a848 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 800a85c: f8 00 04 92 calli 800baa4 <__errno> <== NOT EXECUTED 800a860: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 800a864: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800a868: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 800a86c: 2b 9d 00 04 lw ra,(sp+4) 800a870: 2b 8b 00 20 lw r11,(sp+32) 800a874: 2b 8c 00 1c lw r12,(sp+28) 800a878: 2b 8d 00 18 lw r13,(sp+24) 800a87c: 2b 8e 00 14 lw r14,(sp+20) 800a880: 2b 8f 00 10 lw r15,(sp+16) 800a884: 2b 90 00 0c lw r16,(sp+12) 800a888: 2b 91 00 08 lw r17,(sp+8) 800a88c: 37 9c 00 20 addi sp,sp,32 800a890: c3 a0 00 00 ret =============================================================================== 08009f7c : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 8009f7c: 37 9c ff dc addi sp,sp,-36 8009f80: 5b 8b 00 20 sw (sp+32),r11 8009f84: 5b 8c 00 1c sw (sp+28),r12 8009f88: 5b 8d 00 18 sw (sp+24),r13 8009f8c: 5b 8e 00 14 sw (sp+20),r14 8009f90: 5b 8f 00 10 sw (sp+16),r15 8009f94: 5b 90 00 0c sw (sp+12),r16 8009f98: 5b 91 00 08 sw (sp+8),r17 8009f9c: 5b 9d 00 04 sw (sp+4),ra /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 8009fa0: 78 04 08 01 mvhi r4,0x801 8009fa4: 38 84 36 1c ori r4,r4,0x361c 8009fa8: 28 8b 00 00 lw r11,(r4+0) #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 8009fac: b8 20 70 00 mv r14,r1 8009fb0: b8 40 60 00 mv r12,r2 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 8009fb4: 01 6b 00 01 srui r11,r11,1 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 8009fb8: b8 60 78 00 mv r15,r3 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 8009fbc: 01 6b 00 01 srui r11,r11,1 8009fc0: 35 61 ff ff addi r1,r11,-1 8009fc4: 54 41 00 08 bgu r2,r1,8009fe4 p = info->indirect; 8009fc8: 29 c2 00 58 lw r2,(r14+88) if ( malloc_it ) { 8009fcc: 44 60 00 2b be r3,r0,800a078 if ( !p ) { 8009fd0: 44 40 00 5f be r2,r0,800a14c } if ( !p ) return 0; return &info->indirect[ my_block ]; 8009fd4: b5 8c 60 00 add r12,r12,r12 8009fd8: b5 8c 60 00 add r12,r12,r12 8009fdc: b4 4c 68 00 add r13,r2,r12 8009fe0: e0 00 00 1b bi 800a04c /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 8009fe4: 35 61 00 01 addi r1,r11,1 8009fe8: b9 60 10 00 mv r2,r11 8009fec: f8 00 1b eb calli 8010f98 <__mulsi3> 8009ff0: b8 20 80 00 mv r16,r1 8009ff4: 34 21 ff ff addi r1,r1,-1 8009ff8: 55 81 00 23 bgu r12,r1,800a084 #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 8009ffc: c9 8b 60 00 sub r12,r12,r11 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 800a000: b9 60 10 00 mv r2,r11 800a004: b9 80 08 00 mv r1,r12 800a008: f8 00 1c 59 calli 801116c <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 800a00c: b9 60 10 00 mv r2,r11 fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 800a010: b8 20 80 00 mv r16,r1 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 800a014: b9 80 08 00 mv r1,r12 800a018: f8 00 1c 45 calli 801112c <__udivsi3> 800a01c: b8 20 10 00 mv r2,r1 p = info->doubly_indirect; 800a020: 29 c3 00 5c lw r3,(r14+92) if ( malloc_it ) { 800a024: 45 e0 00 3f be r15,r0,800a120 if ( !p ) { 800a028: 44 60 00 4f be r3,r0,800a164 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 800a02c: b4 42 10 00 add r2,r2,r2 800a030: b4 42 10 00 add r2,r2,r2 800a034: b4 62 10 00 add r2,r3,r2 800a038: 28 41 00 00 lw r1,(r2+0) if ( !p1 ) { 800a03c: 44 20 00 52 be r1,r0,800a184 if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 800a040: b6 10 68 00 add r13,r16,r16 800a044: b5 ad 68 00 add r13,r13,r13 800a048: b4 2d 68 00 add r13,r1,r13 /* * This means the requested block number is out of range. */ return 0; } 800a04c: b9 a0 08 00 mv r1,r13 800a050: 2b 9d 00 04 lw ra,(sp+4) 800a054: 2b 8b 00 20 lw r11,(sp+32) 800a058: 2b 8c 00 1c lw r12,(sp+28) 800a05c: 2b 8d 00 18 lw r13,(sp+24) 800a060: 2b 8e 00 14 lw r14,(sp+20) 800a064: 2b 8f 00 10 lw r15,(sp+16) 800a068: 2b 90 00 0c lw r16,(sp+12) 800a06c: 2b 91 00 08 lw r17,(sp+8) 800a070: 37 9c 00 24 addi sp,sp,36 800a074: c3 a0 00 00 ret } return &info->indirect[ my_block ]; } if ( !p ) return 0; 800a078: 34 0d 00 00 mvi r13,0 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 800a07c: 5c 4d ff d6 bne r2,r13,8009fd4 <== ALWAYS TAKEN 800a080: e3 ff ff f3 bi 800a04c <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 800a084: 36 01 00 01 addi r1,r16,1 800a088: b9 60 10 00 mv r2,r11 800a08c: f8 00 1b c3 calli 8010f98 <__mulsi3> 800a090: 34 21 ff ff addi r1,r1,-1 /* * This means the requested block number is out of range. */ return 0; 800a094: 34 0d 00 00 mvi r13,0 #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 800a098: 55 81 ff ed bgu r12,r1,800a04c <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 800a09c: c9 90 80 00 sub r16,r12,r16 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 800a0a0: b9 60 10 00 mv r2,r11 800a0a4: ba 00 08 00 mv r1,r16 800a0a8: f8 00 1c 31 calli 801116c <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 800a0ac: b9 60 10 00 mv r2,r11 */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 800a0b0: b8 20 60 00 mv r12,r1 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 800a0b4: ba 00 08 00 mv r1,r16 800a0b8: f8 00 1c 1d calli 801112c <__udivsi3> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 800a0bc: b9 60 10 00 mv r2,r11 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; 800a0c0: b8 20 88 00 mv r17,r1 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 800a0c4: f8 00 1c 1a calli 801112c <__udivsi3> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 800a0c8: b9 60 10 00 mv r2,r11 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; 800a0cc: b8 20 80 00 mv r16,r1 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 800a0d0: ba 20 08 00 mv r1,r17 800a0d4: f8 00 1c 26 calli 801116c <__umodsi3> 800a0d8: b8 20 58 00 mv r11,r1 p = info->triply_indirect; 800a0dc: 29 c4 00 60 lw r4,(r14+96) if ( malloc_it ) { 800a0e0: 45 e0 00 30 be r15,r0,800a1a0 if ( !p ) { 800a0e4: 44 80 00 3d be r4,r0,800a1d8 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 800a0e8: b6 10 18 00 add r3,r16,r16 800a0ec: b4 63 18 00 add r3,r3,r3 800a0f0: b4 83 70 00 add r14,r4,r3 800a0f4: 29 c1 00 00 lw r1,(r14+0) if ( !p1 ) { 800a0f8: 44 20 00 42 be r1,r0,800a200 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 800a0fc: b5 6b 10 00 add r2,r11,r11 800a100: b4 42 10 00 add r2,r2,r2 800a104: b4 22 58 00 add r11,r1,r2 800a108: 29 61 00 00 lw r1,(r11+0) if ( !p2 ) { 800a10c: 44 20 00 38 be r1,r0,800a1ec p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 800a110: b5 8c 68 00 add r13,r12,r12 800a114: b5 ad 68 00 add r13,r13,r13 800a118: b4 2d 68 00 add r13,r1,r13 800a11c: e3 ff ff cc bi 800a04c return (block_p *)&p1[ singly ]; } if ( !p ) return 0; 800a120: 34 0d 00 00 mvi r13,0 } return (block_p *)&p1[ singly ]; } if ( !p ) 800a124: 44 6d ff ca be r3,r13,800a04c <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; 800a128: b4 21 10 00 add r2,r1,r1 800a12c: b4 42 10 00 add r2,r2,r2 800a130: b4 62 10 00 add r2,r3,r2 800a134: 28 41 00 00 lw r1,(r2+0) if ( !p ) 800a138: 44 20 ff c5 be r1,r0,800a04c <== NEVER TAKEN #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 ]; 800a13c: b6 10 80 00 add r16,r16,r16 800a140: b6 10 80 00 add r16,r16,r16 800a144: b4 30 68 00 add r13,r1,r16 800a148: e3 ff ff c1 bi 800a04c p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 800a14c: fb ff ff 7c calli 8009f3c 800a150: b8 20 10 00 mv r2,r1 if ( !p ) return 0; 800a154: 34 0d 00 00 mvi r13,0 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 800a158: 44 20 ff bd be r1,r0,800a04c <== NEVER TAKEN return 0; info->indirect = p; 800a15c: 59 c1 00 58 sw (r14+88),r1 800a160: e3 ff ff 9d bi 8009fd4 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 800a164: 5b 81 00 24 sw (sp+36),r1 800a168: fb ff ff 75 calli 8009f3c 800a16c: b8 20 18 00 mv r3,r1 if ( !p ) return 0; 800a170: 34 0d 00 00 mvi r13,0 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 800a174: 2b 82 00 24 lw r2,(sp+36) 800a178: 44 20 ff b5 be r1,r0,800a04c <== NEVER TAKEN return 0; info->doubly_indirect = p; 800a17c: 59 c1 00 5c sw (r14+92),r1 800a180: e3 ff ff ab bi 800a02c } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 800a184: 5b 82 00 24 sw (sp+36),r2 800a188: fb ff ff 6d calli 8009f3c if ( !p1 ) return 0; 800a18c: 34 0d 00 00 mvi r13,0 } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) 800a190: 2b 82 00 24 lw r2,(sp+36) 800a194: 44 20 ff ae be r1,r0,800a04c <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; 800a198: 58 41 00 00 sw (r2+0),r1 800a19c: e3 ff ff a9 bi 800a040 p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 800a1a0: 44 8d ff ab be r4,r13,800a04c <== NEVER TAKEN #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 800a1a4: b6 10 80 00 add r16,r16,r16 800a1a8: b6 10 80 00 add r16,r16,r16 800a1ac: b4 90 20 00 add r4,r4,r16 800a1b0: 28 81 00 00 lw r1,(r4+0) if ( !p1 ) 800a1b4: 44 20 ff a6 be r1,r0,800a04c <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; 800a1b8: b5 6b 58 00 add r11,r11,r11 800a1bc: b5 6b 58 00 add r11,r11,r11 800a1c0: b4 2b 08 00 add r1,r1,r11 if ( !p ) return 0; return (block_p *)&p2[ singly ]; 800a1c4: 28 2d 00 00 lw r13,(r1+0) 800a1c8: b5 8c 60 00 add r12,r12,r12 800a1cc: b5 8c 60 00 add r12,r12,r12 800a1d0: b5 ac 68 00 add r13,r13,r12 800a1d4: e3 ff ff 9e bi 800a04c p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 800a1d8: fb ff ff 59 calli 8009f3c 800a1dc: b8 20 20 00 mv r4,r1 if ( !p ) 800a1e0: 44 20 ff 9b be r1,r0,800a04c <== NEVER TAKEN return 0; info->triply_indirect = p; 800a1e4: 59 c1 00 60 sw (r14+96),r1 800a1e8: e3 ff ff c0 bi 800a0e8 p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 800a1ec: fb ff ff 54 calli 8009f3c if ( !p2 ) return 0; 800a1f0: 34 0d 00 00 mvi r13,0 } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 800a1f4: 44 20 ff 96 be r1,r0,800a04c <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 800a1f8: 59 61 00 00 sw (r11+0),r1 800a1fc: e3 ff ff c5 bi 800a110 info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 800a200: fb ff ff 4f calli 8009f3c if ( !p1 ) return 0; 800a204: 34 0d 00 00 mvi r13,0 } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) 800a208: 44 20 ff 91 be r1,r0,800a04c <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; 800a20c: 59 c1 00 00 sw (r14+0),r1 800a210: e3 ff ff bb bi 800a0fc =============================================================================== 0800a214 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 800a214: 37 9c ff cc addi sp,sp,-52 800a218: 5b 8b 00 28 sw (sp+40),r11 800a21c: 5b 8c 00 24 sw (sp+36),r12 800a220: 5b 8d 00 20 sw (sp+32),r13 800a224: 5b 8e 00 1c sw (sp+28),r14 800a228: 5b 8f 00 18 sw (sp+24),r15 800a22c: 5b 90 00 14 sw (sp+20),r16 800a230: 5b 91 00 10 sw (sp+16),r17 800a234: 5b 92 00 0c sw (sp+12),r18 800a238: 5b 93 00 08 sw (sp+8),r19 800a23c: 5b 9d 00 04 sw (sp+4),ra 800a240: b8 60 90 00 mv r18,r3 800a244: b8 20 80 00 mv r16,r1 800a248: b8 40 68 00 mv r13,r2 /* * Error checks on arguments */ if ( !dest ) 800a24c: 44 60 00 73 be r3,r0,800a418 <== NEVER TAKEN /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 800a250: 44 80 00 72 be r4,r0,800a418 <== NEVER TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 800a254: 28 22 00 4c lw r2,(r1+76) 800a258: 34 01 00 06 mvi r1,6 800a25c: 44 41 00 57 be r2,r1,800a3b8 * 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 ) 800a260: 2a 01 00 50 lw r1,(r16+80) 800a264: 2a 0c 00 54 lw r12,(r16+84) /* * 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; 800a268: b4 8d 10 00 add r2,r4,r13 if ( last_byte > the_jnode->info.file.size ) 800a26c: 48 01 00 04 bg r0,r1,800a27c <== NEVER TAKEN 800a270: 44 01 00 67 be r0,r1,800a40c <== ALWAYS TAKEN 800a274: b8 80 60 00 mv r12,r4 <== NOT EXECUTED 800a278: e0 00 00 02 bi 800a280 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 800a27c: c9 8d 60 00 sub r12,r12,r13 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 800a280: 78 11 08 01 mvhi r17,0x801 800a284: 3a 31 36 1c ori r17,r17,0x361c 800a288: 2a 2b 00 00 lw r11,(r17+0) 800a28c: b9 a0 08 00 mv r1,r13 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 800a290: ba 40 70 00 mv r14,r18 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 800a294: b9 60 10 00 mv r2,r11 800a298: f8 00 1b 7c calli 8011088 <__modsi3> 800a29c: b8 20 98 00 mv r19,r1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 800a2a0: b9 60 10 00 mv r2,r11 800a2a4: b9 a0 08 00 mv r1,r13 800a2a8: f8 00 1b 48 calli 8010fc8 <__divsi3> 800a2ac: b8 20 68 00 mv r13,r1 last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 800a2b0: 34 0f 00 00 mvi r15,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; if ( start_offset ) { 800a2b4: 46 60 00 13 be r19,r0,800a300 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 ); 800a2b8: ba 00 08 00 mv r1,r16 800a2bc: b9 a0 10 00 mv r2,r13 800a2c0: 34 03 00 00 mvi r3,0 800a2c4: fb ff ff 2e calli 8009f7c if ( !block_ptr ) 800a2c8: 44 20 00 2f be r1,r0,800a384 <== NEVER TAKEN */ 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; 800a2cc: c9 73 58 00 sub r11,r11,r19 800a2d0: b9 80 78 00 mv r15,r12 800a2d4: 51 6c 00 02 bgeu r11,r12,800a2dc 800a2d8: b9 60 78 00 mv r15,r11 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 ); 800a2dc: 28 22 00 00 lw r2,(r1+0) 800a2e0: b9 e0 18 00 mv r3,r15 800a2e4: ba 40 08 00 mv r1,r18 800a2e8: b4 53 10 00 add r2,r2,r19 800a2ec: f8 00 08 a4 calli 800c57c dest += to_copy; block++; my_length -= to_copy; 800a2f0: 2a 2b 00 00 lw r11,(r17+0) 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; 800a2f4: b6 4f 70 00 add r14,r18,r15 block++; 800a2f8: 35 ad 00 01 addi r13,r13,1 my_length -= to_copy; 800a2fc: c9 8f 60 00 sub r12,r12,r15 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 800a300: 55 6c 00 11 bgu r11,r12,800a344 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 800a304: b9 a0 10 00 mv r2,r13 800a308: 34 03 00 00 mvi r3,0 800a30c: ba 00 08 00 mv r1,r16 800a310: fb ff ff 1b calli 8009f7c 800a314: b8 20 10 00 mv r2,r1 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 800a318: b9 60 18 00 mv r3,r11 800a31c: b9 c0 08 00 mv r1,r14 dest += to_copy; block++; my_length -= to_copy; 800a320: c9 8b 60 00 sub r12,r12,r11 */ 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 ) 800a324: 44 40 00 18 be r2,r0,800a384 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 800a328: 28 42 00 00 lw r2,(r2+0) dest += to_copy; 800a32c: b5 cb 70 00 add r14,r14,r11 block++; 800a330: 35 ad 00 01 addi r13,r13,1 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 ); 800a334: f8 00 08 92 calli 800c57c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 800a338: 2a 21 00 00 lw r1,(r17+0) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 800a33c: b5 eb 78 00 add r15,r15,r11 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 800a340: 51 81 ff f1 bgeu r12,r1,800a304 #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif if ( my_length ) { 800a344: 45 80 00 0b be r12,r0,800a370 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 800a348: ba 00 08 00 mv r1,r16 800a34c: b9 a0 10 00 mv r2,r13 800a350: 34 03 00 00 mvi r3,0 800a354: fb ff ff 0a calli 8009f7c if ( !block_ptr ) 800a358: 44 20 00 0b be r1,r0,800a384 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 800a35c: 28 22 00 00 lw r2,(r1+0) 800a360: b9 80 18 00 mv r3,r12 800a364: b9 c0 08 00 mv r1,r14 800a368: f8 00 08 85 calli 800c57c copied += my_length; 800a36c: b5 ec 78 00 add r15,r15,r12 } IMFS_update_atime( the_jnode ); 800a370: 37 81 00 30 addi r1,sp,48 800a374: 34 02 00 00 mvi r2,0 800a378: fb ff dc a3 calli 8001604 800a37c: 2b 81 00 30 lw r1,(sp+48) 800a380: 5a 01 00 40 sw (r16+64),r1 return copied; } 800a384: b9 e0 08 00 mv r1,r15 800a388: 2b 9d 00 04 lw ra,(sp+4) 800a38c: 2b 8b 00 28 lw r11,(sp+40) 800a390: 2b 8c 00 24 lw r12,(sp+36) 800a394: 2b 8d 00 20 lw r13,(sp+32) 800a398: 2b 8e 00 1c lw r14,(sp+28) 800a39c: 2b 8f 00 18 lw r15,(sp+24) 800a3a0: 2b 90 00 14 lw r16,(sp+20) 800a3a4: 2b 91 00 10 lw r17,(sp+16) 800a3a8: 2b 92 00 0c lw r18,(sp+12) 800a3ac: 2b 93 00 08 lw r19,(sp+8) 800a3b0: 37 9c 00 34 addi sp,sp,52 800a3b4: c3 a0 00 00 ret 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)) 800a3b8: 2a 0b 00 54 lw r11,(r16+84) 800a3bc: 2a 0c 00 50 lw r12,(r16+80) 800a3c0: 34 02 00 1f mvi r2,31 800a3c4: b9 a0 08 00 mv r1,r13 800a3c8: 5b 84 00 2c sw (sp+44),r4 800a3cc: c9 6d 78 00 sub r15,r11,r13 800a3d0: f8 00 1a a4 calli 8010e60 <__ashrsi3> 800a3d4: f5 eb 10 00 cmpgu r2,r15,r11 800a3d8: c9 81 08 00 sub r1,r12,r1 800a3dc: c8 22 08 00 sub r1,r1,r2 800a3e0: 2b 84 00 2c lw r4,(sp+44) * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 800a3e4: 2a 02 00 58 lw r2,(r16+88) if (my_length > (the_jnode->info.linearfile.size - start)) 800a3e8: 48 01 00 04 bg r0,r1,800a3f8 <== NEVER TAKEN 800a3ec: 5c 01 00 02 bne r0,r1,800a3f4 <== NEVER TAKEN 800a3f0: 54 8f 00 02 bgu r4,r15,800a3f8 <== ALWAYS TAKEN 800a3f4: b8 80 78 00 mv r15,r4 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 800a3f8: b4 4d 10 00 add r2,r2,r13 800a3fc: b9 e0 18 00 mv r3,r15 800a400: ba 40 08 00 mv r1,r18 800a404: f8 00 08 5e calli 800c57c 800a408: e3 ff ff da bi 800a370 * 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 ) 800a40c: 54 4c ff 9c bgu r2,r12,800a27c 800a410: b8 80 60 00 mv r12,r4 800a414: e3 ff ff 9b bi 800a280 * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 800a418: f8 00 05 a3 calli 800baa4 <__errno> <== NOT EXECUTED 800a41c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 800a420: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800a424: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED 800a428: e3 ff ff d7 bi 800a384 <== NOT EXECUTED =============================================================================== 0800a55c : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 800a55c: 37 9c ff dc addi sp,sp,-36 800a560: 5b 8b 00 24 sw (sp+36),r11 800a564: 5b 8c 00 20 sw (sp+32),r12 800a568: 5b 8d 00 1c sw (sp+28),r13 800a56c: 5b 8e 00 18 sw (sp+24),r14 800a570: 5b 8f 00 14 sw (sp+20),r15 800a574: 5b 90 00 10 sw (sp+16),r16 800a578: 5b 91 00 0c sw (sp+12),r17 800a57c: 5b 92 00 08 sw (sp+8),r18 800a580: 5b 9d 00 04 sw (sp+4),ra /* * 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; 800a584: 78 0c 08 01 mvhi r12,0x801 800a588: 39 8c 36 1c ori r12,r12,0x361c 800a58c: 29 8d 00 00 lw r13,(r12+0) */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 800a590: b8 20 78 00 mv r15,r1 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 800a594: 28 21 00 58 lw r1,(r1+88) /* * 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; 800a598: 01 ad 00 01 srui r13,r13,1 800a59c: 01 ad 00 01 srui r13,r13,1 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 800a5a0: 44 20 00 04 be r1,r0,800a5b0 memfile_free_blocks_in_table( &info->indirect, to_free ); 800a5a4: 35 e1 00 58 addi r1,r15,88 800a5a8: b9 a0 10 00 mv r2,r13 800a5ac: fb ff ff cd calli 800a4e0 } if ( info->doubly_indirect ) { 800a5b0: 29 e1 00 5c lw r1,(r15+92) 800a5b4: 44 20 00 19 be r1,r0,800a618 <== ALWAYS TAKEN for ( i=0 ; i <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 800a5d0: b4 42 10 00 add r2,r2,r2 <== NOT EXECUTED 800a5d4: b4 42 10 00 add r2,r2,r2 <== NOT EXECUTED 800a5d8: b4 22 08 00 add r1,r1,r2 <== NOT EXECUTED 800a5dc: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( 800a5e4: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 800a5e8: 44 60 00 02 be r3,r0,800a5f0 <== NOT EXECUTED memfile_free_blocks_in_table( 800a5ec: fb ff ff bd calli 800a4e0 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 800a604: 29 e1 00 5c lw r1,(r15+92) <== NOT EXECUTED 800a608: e3 ff ff f2 bi 800a5d0 <== 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 ); 800a60c: 35 e1 00 5c addi r1,r15,92 <== NOT EXECUTED 800a610: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 800a614: fb ff ff b3 calli 800a4e0 <== NOT EXECUTED } if ( info->triply_indirect ) { 800a618: 29 e1 00 60 lw r1,(r15+96) 800a61c: 44 20 00 27 be r1,r0,800a6b8 <== ALWAYS TAKEN for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 800a630: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 800a634: 34 10 00 04 mvi r16,4 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 800a638: 34 12 00 00 mvi r18,0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 800a63c: 34 11 00 00 mvi r17,0 <== NOT EXECUTED 800a640: 45 c0 00 1b be r14,r0,800a6ac <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 800a64c: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 800a650: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED if ( p[j] ) { 800a654: b4 63 18 00 add r3,r3,r3 <== NOT EXECUTED 800a658: b4 63 18 00 add r3,r3,r3 <== NOT EXECUTED 800a65c: b5 c3 08 00 add r1,r14,r3 <== NOT EXECUTED 800a660: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; jtriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 800a670: fb ff ff 9c calli 800a4e0 <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED 800a688: 29 e1 00 60 lw r1,(r15+96) <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 800a68c: b4 32 08 00 add r1,r1,r18 <== NOT EXECUTED 800a690: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 800a694: fb ff ff 93 calli 800a4e0 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 800a6ac: 35 e1 00 60 addi r1,r15,96 <== NOT EXECUTED 800a6b0: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 800a6b4: fb ff ff 8b calli 800a4e0 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 800a6b8: 34 01 00 00 mvi r1,0 800a6bc: 2b 9d 00 04 lw ra,(sp+4) 800a6c0: 2b 8b 00 24 lw r11,(sp+36) 800a6c4: 2b 8c 00 20 lw r12,(sp+32) 800a6c8: 2b 8d 00 1c lw r13,(sp+28) 800a6cc: 2b 8e 00 18 lw r14,(sp+24) 800a6d0: 2b 8f 00 14 lw r15,(sp+20) 800a6d4: 2b 90 00 10 lw r16,(sp+16) 800a6d8: 2b 91 00 0c lw r17,(sp+12) 800a6dc: 2b 92 00 08 lw r18,(sp+8) 800a6e0: 37 9c 00 24 addi sp,sp,36 800a6e4: c3 a0 00 00 ret } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 800a6e8: 29 e1 00 60 lw r1,(r15+96) <== NOT EXECUTED 800a6ec: 36 04 00 04 addi r4,r16,4 <== NOT EXECUTED 800a6f0: b4 30 18 00 add r3,r1,r16 <== NOT EXECUTED 800a6f4: 28 6e 00 00 lw r14,(r3+0) <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 800a6f8: 45 c0 ff ed be r14,r0,800a6ac <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 800a6fc: ba 00 90 00 mv r18,r16 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 800a700: b8 80 80 00 mv r16,r4 <== NOT EXECUTED 800a704: e3 ff ff d0 bi 800a644 <== NOT EXECUTED =============================================================================== 0800a708 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 800a708: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800a70c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 800a710: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 800a714: fb ff fe 1a calli 8009f7c <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( block_ptr ); #endif if ( block_ptr ) { 800a718: 44 20 00 05 be r1,r0,800a72c <== NOT EXECUTED ptr = *block_ptr; 800a71c: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED *block_ptr = 0; 800a720: 58 20 00 00 sw (r1+0),r0 <== NOT EXECUTED memfile_free_block( ptr ); 800a724: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 800a728: fb ff ff 63 calli 800a4b4 <== NOT EXECUTED } return 1; } 800a72c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 800a730: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a734: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800a738: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 0800a894 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 800a894: 37 9c ff cc addi sp,sp,-52 800a898: 5b 8b 00 2c sw (sp+44),r11 800a89c: 5b 8c 00 28 sw (sp+40),r12 800a8a0: 5b 8d 00 24 sw (sp+36),r13 800a8a4: 5b 8e 00 20 sw (sp+32),r14 800a8a8: 5b 8f 00 1c sw (sp+28),r15 800a8ac: 5b 90 00 18 sw (sp+24),r16 800a8b0: 5b 91 00 14 sw (sp+20),r17 800a8b4: 5b 92 00 10 sw (sp+16),r18 800a8b8: 5b 93 00 0c sw (sp+12),r19 800a8bc: 5b 94 00 08 sw (sp+8),r20 800a8c0: 5b 9d 00 04 sw (sp+4),ra 800a8c4: b8 60 98 00 mv r19,r3 800a8c8: b8 20 88 00 mv r17,r1 800a8cc: b8 40 60 00 mv r12,r2 800a8d0: b8 80 90 00 mv r18,r4 /* * Error check arguments */ if ( !source ) 800a8d4: 44 60 00 61 be r3,r0,800aa58 <== NEVER TAKEN /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 800a8d8: 44 80 00 60 be r4,r0,800aa58 <== NEVER TAKEN * 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 ) { 800a8dc: 28 21 00 50 lw r1,(r1+80) /* * 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; 800a8e0: b4 82 10 00 add r2,r4,r2 if ( last_byte > the_jnode->info.file.size ) { 800a8e4: 48 01 00 55 bg r0,r1,800aa38 <== NEVER TAKEN 800a8e8: 44 20 00 51 be r1,r0,800aa2c <== ALWAYS TAKEN /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 800a8ec: 78 10 08 01 mvhi r16,0x801 800a8f0: 3a 10 36 1c ori r16,r16,0x361c 800a8f4: 2a 0b 00 00 lw r11,(r16+0) 800a8f8: b9 80 08 00 mv r1,r12 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 800a8fc: ba 60 70 00 mv r14,r19 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 800a900: b9 60 10 00 mv r2,r11 800a904: f8 00 19 e1 calli 8011088 <__modsi3> 800a908: b8 20 a0 00 mv r20,r1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 800a90c: b9 60 10 00 mv r2,r11 800a910: b9 80 08 00 mv r1,r12 800a914: f8 00 19 ad calli 8010fc8 <__divsi3> 800a918: b8 20 68 00 mv r13,r1 if ( start_offset ) { 800a91c: ba 40 60 00 mv r12,r18 status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; 800a920: 34 0f 00 00 mvi r15,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; if ( start_offset ) { 800a924: 5e 80 00 30 bne r20,r0,800a9e4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 800a928: 55 6c 00 10 bgu r11,r12,800a968 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 800a92c: b9 a0 10 00 mv r2,r13 800a930: 34 03 00 00 mvi r3,0 800a934: ba 20 08 00 mv r1,r17 800a938: fb ff fd 91 calli 8009f7c 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 ); 800a93c: b9 c0 10 00 mv r2,r14 800a940: b9 60 18 00 mv r3,r11 src += to_copy; block++; my_length -= to_copy; 800a944: c9 8b 60 00 sub r12,r12,r11 */ 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 ) 800a948: 44 20 00 19 be r1,r0,800a9ac <== NEVER TAKEN 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 ); 800a94c: 28 21 00 00 lw r1,(r1+0) src += to_copy; 800a950: b5 cb 70 00 add r14,r14,r11 block++; 800a954: 35 ad 00 01 addi r13,r13,1 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 ); 800a958: f8 00 07 09 calli 800c57c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 800a95c: 2a 01 00 00 lw r1,(r16+0) * * 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( 800a960: b5 eb 78 00 add r15,r15,r11 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 800a964: 51 81 ff f2 bgeu r12,r1,800a92c #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif to_copy = my_length; if ( my_length ) { 800a968: 45 80 00 0b be r12,r0,800a994 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 800a96c: ba 20 08 00 mv r1,r17 800a970: b9 a0 10 00 mv r2,r13 800a974: 34 03 00 00 mvi r3,0 800a978: fb ff fd 81 calli 8009f7c if ( !block_ptr ) 800a97c: 44 20 00 0c be r1,r0,800a9ac <== NEVER TAKEN 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 ); 800a980: 28 21 00 00 lw r1,(r1+0) 800a984: b9 c0 10 00 mv r2,r14 800a988: b9 80 18 00 mv r3,r12 800a98c: f8 00 06 fc calli 800c57c my_length = 0; copied += to_copy; 800a990: b5 ec 78 00 add r15,r15,r12 } IMFS_mtime_ctime_update( the_jnode ); 800a994: 37 81 00 30 addi r1,sp,48 800a998: 34 02 00 00 mvi r2,0 800a99c: fb ff db 1a calli 8001604 800a9a0: 2b 81 00 30 lw r1,(sp+48) 800a9a4: 5a 21 00 44 sw (r17+68),r1 800a9a8: 5a 21 00 48 sw (r17+72),r1 return copied; } 800a9ac: b9 e0 08 00 mv r1,r15 800a9b0: 2b 9d 00 04 lw ra,(sp+4) 800a9b4: 2b 8b 00 2c lw r11,(sp+44) 800a9b8: 2b 8c 00 28 lw r12,(sp+40) 800a9bc: 2b 8d 00 24 lw r13,(sp+36) 800a9c0: 2b 8e 00 20 lw r14,(sp+32) 800a9c4: 2b 8f 00 1c lw r15,(sp+28) 800a9c8: 2b 90 00 18 lw r16,(sp+24) 800a9cc: 2b 91 00 14 lw r17,(sp+20) 800a9d0: 2b 92 00 10 lw r18,(sp+16) 800a9d4: 2b 93 00 0c lw r19,(sp+12) 800a9d8: 2b 94 00 08 lw r20,(sp+8) 800a9dc: 37 9c 00 34 addi sp,sp,52 800a9e0: c3 a0 00 00 ret 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 ); 800a9e4: ba 20 08 00 mv r1,r17 800a9e8: b9 a0 10 00 mv r2,r13 800a9ec: 34 03 00 00 mvi r3,0 800a9f0: fb ff fd 63 calli 8009f7c if ( !block_ptr ) 800a9f4: 44 20 ff ee be r1,r0,800a9ac <== NEVER TAKEN */ 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; 800a9f8: c9 74 78 00 sub r15,r11,r20 800a9fc: 52 4f 00 02 bgeu r18,r15,800aa04 800aa00: ba 40 78 00 mv r15,r18 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 800aa04: 28 21 00 00 lw r1,(r1+0) 800aa08: ba 60 10 00 mv r2,r19 800aa0c: b9 e0 18 00 mv r3,r15 800aa10: b4 34 08 00 add r1,r1,r20 800aa14: f8 00 06 da calli 800c57c src += to_copy; 800aa18: b6 6f 70 00 add r14,r19,r15 block++; my_length -= to_copy; copied += to_copy; 800aa1c: 2a 0b 00 00 lw r11,(r16+0) src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 800aa20: 35 ad 00 01 addi r13,r13,1 my_length -= to_copy; 800aa24: ca 4f 60 00 sub r12,r18,r15 800aa28: e3 ff ff c0 bi 800a928 * 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 ) { 800aa2c: 2a 21 00 54 lw r1,(r17+84) 800aa30: 54 41 00 02 bgu r2,r1,800aa38 <== ALWAYS TAKEN 800aa34: e3 ff ff ae bi 800a8ec <== NOT EXECUTED status = IMFS_memfile_extend( the_jnode, last_byte ); 800aa38: ba 20 08 00 mv r1,r17 800aa3c: fb ff ff 40 calli 800a73c if ( status ) 800aa40: 44 20 ff ab be r1,r0,800a8ec rtems_set_errno_and_return_minus_one( ENOSPC ); 800aa44: f8 00 04 18 calli 800baa4 <__errno> 800aa48: 34 02 00 1c mvi r2,28 800aa4c: 58 22 00 00 sw (r1+0),r2 800aa50: 34 0f ff ff mvi r15,-1 800aa54: e3 ff ff d6 bi 800a9ac * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 800aa58: f8 00 04 13 calli 800baa4 <__errno> <== NOT EXECUTED 800aa5c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 800aa60: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800aa64: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED 800aa68: e3 ff ff d1 bi 800a9ac <== NOT EXECUTED =============================================================================== 08000b84 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8000b84: 37 9c ff a4 addi sp,sp,-92 8000b88: 5b 8b 00 1c sw (sp+28),r11 8000b8c: 5b 8c 00 18 sw (sp+24),r12 8000b90: 5b 8d 00 14 sw (sp+20),r13 8000b94: 5b 8e 00 10 sw (sp+16),r14 8000b98: 5b 8f 00 0c sw (sp+12),r15 8000b9c: 5b 90 00 08 sw (sp+8),r16 8000ba0: 5b 9d 00 04 sw (sp+4),ra 8000ba4: b8 40 58 00 mv r11,r2 8000ba8: b8 20 68 00 mv r13,r1 8000bac: b8 60 80 00 mv r16,r3 8000bb0: b8 80 78 00 mv r15,r4 8000bb4: b8 a0 70 00 mv r14,r5 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 ); 8000bb8: 37 8c 00 20 addi r12,sp,32 8000bbc: f8 00 30 66 calli 800cd54 8000bc0: b8 20 10 00 mv r2,r1 8000bc4: b9 80 18 00 mv r3,r12 8000bc8: b9 a0 08 00 mv r1,r13 8000bcc: 37 84 00 5c addi r4,sp,92 8000bd0: f8 00 1c d2 calli 8007f18 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 8000bd4: 21 66 f0 00 andi r6,r11,0xf000 8000bd8: 34 02 40 00 mvi r2,16384 8000bdc: 44 c2 00 22 be r6,r2,8000c64 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 8000be0: 38 01 80 00 mvu r1,0x8000 8000be4: 44 c1 00 1e be r6,r1,8000c5c type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 8000be8: 64 c2 20 00 cmpei r2,r6,8192 8000bec: 64 c1 60 00 cmpei r1,r6,24576 8000bf0: b8 41 08 00 or r1,r2,r1 8000bf4: 5c 20 00 16 bne r1,r0,8000c4c type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 8000bf8: 34 01 10 00 mvi r1,4096 type = IMFS_FIFO; 8000bfc: 34 07 00 07 mvi r7,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)) 8000c00: 5c c1 00 1b bne r6,r1,8000c6c <== NEVER TAKEN * 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( 8000c04: b8 e0 10 00 mv r2,r7 8000c08: b9 c0 08 00 mv r1,r14 8000c0c: b9 80 18 00 mv r3,r12 8000c10: b9 60 20 00 mv r4,r11 8000c14: 37 85 00 44 addi r5,sp,68 8000c18: f8 00 19 b8 calli 80072f8 ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; 8000c1c: 34 02 00 00 mvi r2,0 new_name, mode, &info ); if ( !new_node ) 8000c20: 44 20 00 18 be r1,r0,8000c80 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 8000c24: b8 40 08 00 mv r1,r2 8000c28: 2b 9d 00 04 lw ra,(sp+4) 8000c2c: 2b 8b 00 1c lw r11,(sp+28) 8000c30: 2b 8c 00 18 lw r12,(sp+24) 8000c34: 2b 8d 00 14 lw r13,(sp+20) 8000c38: 2b 8e 00 10 lw r14,(sp+16) 8000c3c: 2b 8f 00 0c lw r15,(sp+12) 8000c40: 2b 90 00 08 lw r16,(sp+8) 8000c44: 37 9c 00 5c addi sp,sp,92 8000c48: c3 a0 00 00 ret type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 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 ); 8000c4c: 5b 90 00 44 sw (sp+68),r16 8000c50: 5b 8f 00 48 sw (sp+72),r15 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; 8000c54: 34 07 00 02 mvi r7,2 8000c58: e3 ff ff eb bi 8000c04 * 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; 8000c5c: 34 07 00 05 mvi r7,5 8000c60: e3 ff ff e9 bi 8000c04 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; 8000c64: 34 07 00 01 mvi r7,1 8000c68: e3 ff ff e7 bi 8000c04 rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 8000c6c: f8 00 2b 8e calli 800baa4 <__errno> <== NOT EXECUTED 8000c70: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8000c74: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000c78: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8000c7c: e3 ff ff ea bi 8000c24 <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 8000c80: f8 00 2b 89 calli 800baa4 <__errno> 8000c84: 34 02 00 0c mvi r2,12 8000c88: 58 22 00 00 sw (r1+0),r2 8000c8c: 34 02 ff ff mvi r2,-1 8000c90: e3 ff ff e5 bi 8000c24 =============================================================================== 08000c94 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 8000c94: 37 9c ff fc addi sp,sp,-4 8000c98: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 8000c9c: 28 22 00 08 lw r2,(r1+8) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 8000ca0: 34 03 00 01 mvi r3,1 8000ca4: 28 44 00 4c lw r4,(r2+76) 8000ca8: 5c 83 00 06 bne r4,r3,8000cc0 <== NEVER TAKEN /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 8000cac: 58 41 00 5c sw (r2+92),r1 return 0; 8000cb0: 34 01 00 00 mvi r1,0 } 8000cb4: 2b 9d 00 04 lw ra,(sp+4) 8000cb8: 37 9c 00 04 addi sp,sp,4 8000cbc: c3 a0 00 00 ret /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 8000cc0: f8 00 2b 79 calli 800baa4 <__errno> <== NOT EXECUTED 8000cc4: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 8000cc8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000ccc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000cd0: e3 ff ff f9 bi 8000cb4 <== NOT EXECUTED =============================================================================== 08002d6c : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 8002d6c: 37 9c ff f4 addi sp,sp,-12 8002d70: 5b 8b 00 0c sw (sp+12),r11 8002d74: 5b 8c 00 08 sw (sp+8),r12 8002d78: 5b 9d 00 04 sw (sp+4),ra #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); 8002d7c: 78 0b 08 02 mvhi r11,0x802 8002d80: 39 6b 51 78 ori r11,r11,0x5178 8002d84: 29 62 00 00 lw r2,(r11+0) */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 8002d88: b8 20 60 00 mv r12,r1 #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); 8002d8c: 34 21 00 0c addi r1,r1,12 8002d90: 28 42 00 08 lw r2,(r2+8) 8002d94: f8 00 34 9b calli 8010000 switch( the_jnode->type ) { 8002d98: 29 83 00 4c lw r3,(r12+76) 8002d9c: 34 01 00 07 mvi r1,7 8002da0: 54 61 00 36 bgu r3,r1,8002e78 <== NEVER TAKEN 8002da4: 78 02 08 02 mvhi r2,0x802 8002da8: b4 63 08 00 add r1,r3,r3 8002dac: 38 42 33 dc ori r2,r2,0x33dc 8002db0: b4 21 08 00 add r1,r1,r1 8002db4: b4 41 08 00 add r1,r2,r1 8002db8: 28 21 00 00 lw r1,(r1+0) 8002dbc: c0 20 00 00 b r1 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 8002dc0: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8002dc4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002dc8: 34 03 00 13 mvi r3,19 <== NOT EXECUTED 8002dcc: 28 44 00 08 lw r4,(r2+8) <== NOT EXECUTED 8002dd0: 38 21 33 24 ori r1,r1,0x3324 <== NOT EXECUTED 8002dd4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8002dd8: f8 00 37 b2 calli 8010ca0 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 8002ddc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8002de0: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8002de4: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8002de8: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8002dec: c3 a0 00 00 ret <== NOT EXECUTED case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 8002df0: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8002df4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002df8: 34 03 00 12 mvi r3,18 <== NOT EXECUTED 8002dfc: 28 44 00 08 lw r4,(r2+8) <== NOT EXECUTED 8002e00: 38 21 33 38 ori r1,r1,0x3338 <== NOT EXECUTED 8002e04: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8002e08: f8 00 37 a6 calli 8010ca0 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 8002e0c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8002e10: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8002e14: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8002e18: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8002e1c: c3 a0 00 00 ret <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 8002e20: 29 61 00 00 lw r1,(r11+0) 8002e24: 29 83 00 54 lw r3,(r12+84) 8002e28: 78 02 08 02 mvhi r2,0x802 8002e2c: 28 21 00 08 lw r1,(r1+8) 8002e30: 38 42 33 18 ori r2,r2,0x3318 8002e34: f8 00 34 08 calli 800fe54 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 8002e38: 78 01 08 02 mvhi r1,0x802 8002e3c: 38 21 2e ac ori r1,r1,0x2eac 8002e40: f8 00 3c 55 calli 8011f94 } 8002e44: 2b 9d 00 04 lw ra,(sp+4) 8002e48: 2b 8b 00 0c lw r11,(sp+12) 8002e4c: 2b 8c 00 08 lw r12,(sp+8) 8002e50: 37 9c 00 0c addi sp,sp,12 8002e54: c3 a0 00 00 ret 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)", 8002e58: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8002e5c: 29 83 00 54 lw r3,(r12+84) <== NOT EXECUTED 8002e60: 29 84 00 58 lw r4,(r12+88) <== NOT EXECUTED 8002e64: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8002e68: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8002e6c: 38 42 33 08 ori r2,r2,0x3308 <== NOT EXECUTED 8002e70: f8 00 33 f9 calli 800fe54 <== NOT EXECUTED (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 8002e74: e3 ff ff f1 bi 8002e38 <== NOT EXECUTED case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 8002e78: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8002e7c: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8002e80: 38 42 33 4c ori r2,r2,0x334c <== NOT EXECUTED 8002e84: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8002e88: f8 00 33 f3 calli 800fe54 <== NOT EXECUTED return; } puts(""); } 8002e8c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8002e90: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8002e94: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8002e98: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8002e9c: c3 a0 00 00 ret <== NOT EXECUTED #endif fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 8002ea0: 29 62 00 00 lw r2,(r11+0) 8002ea4: 34 01 00 2f mvi r1,47 8002ea8: 28 42 00 08 lw r2,(r2+8) 8002eac: f8 00 34 11 calli 800fef0 break; 8002eb0: e3 ff ff e2 bi 8002e38 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 8002eb4: 29 61 00 00 lw r1,(r11+0) 8002eb8: 29 83 00 50 lw r3,(r12+80) 8002ebc: 29 84 00 54 lw r4,(r12+84) 8002ec0: 28 21 00 08 lw r1,(r1+8) 8002ec4: 78 02 08 02 mvhi r2,0x802 8002ec8: 38 42 32 f4 ori r2,r2,0x32f4 8002ecc: f8 00 33 e2 calli 800fe54 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 8002ed0: e3 ff ff da bi 8002e38 =============================================================================== 08000ce0 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 8000ce0: 37 9c ff fc addi sp,sp,-4 8000ce4: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; int i; node = loc->node_access; 8000ce8: 28 25 00 00 lw r5,(r1+0) if ( node->type != IMFS_SYM_LINK ) 8000cec: 34 01 00 04 mvi r1,4 8000cf0: 28 a4 00 4c lw r4,(r5+76) 8000cf4: 5c 81 00 13 bne r4,r1,8000d40 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 8000cf8: 34 01 00 00 mvi r1,0 8000cfc: 44 60 00 0e be r3,r0,8000d34 <== NEVER TAKEN 8000d00: 28 a4 00 50 lw r4,(r5+80) 8000d04: 34 06 00 00 mvi r6,0 8000d08: 40 84 00 00 lbu r4,(r4+0) 8000d0c: 44 80 00 0a be r4,r0,8000d34 <== NEVER TAKEN buf[i] = node->info.sym_link.name[i]; 8000d10: b4 46 30 00 add r6,r2,r6 8000d14: 30 c4 00 00 sb (r6+0),r4 node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 8000d18: 34 21 00 01 addi r1,r1,1 8000d1c: b8 20 30 00 mv r6,r1 8000d20: 50 23 00 05 bgeu r1,r3,8000d34 8000d24: 28 a4 00 50 lw r4,(r5+80) 8000d28: b4 81 20 00 add r4,r4,r1 8000d2c: 40 84 00 00 lbu r4,(r4+0) 8000d30: 5c 80 ff f8 bne r4,r0,8000d10 buf[i] = node->info.sym_link.name[i]; return i; } 8000d34: 2b 9d 00 04 lw ra,(sp+4) 8000d38: 37 9c 00 04 addi sp,sp,4 8000d3c: c3 a0 00 00 ret int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 8000d40: f8 00 2b 59 calli 800baa4 <__errno> <== NOT EXECUTED 8000d44: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8000d48: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000d4c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000d50: e3 ff ff f9 bi 8000d34 <== NOT EXECUTED =============================================================================== 08000d54 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 8000d54: 37 9c ff ec addi sp,sp,-20 8000d58: 5b 8b 00 0c sw (sp+12),r11 8000d5c: 5b 8c 00 08 sw (sp+8),r12 8000d60: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 8000d64: 28 4b 00 00 lw r11,(r2+0) rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 8000d68: b8 60 60 00 mv r12,r3 IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 8000d6c: b8 80 10 00 mv r2,r4 8000d70: 35 61 00 0c addi r1,r11,12 8000d74: 34 03 00 20 mvi r3,32 8000d78: f8 00 30 26 calli 800ce10 if ( the_jnode->Parent != NULL ) 8000d7c: 29 61 00 08 lw r1,(r11+8) 8000d80: 44 20 00 03 be r1,r0,8000d8c <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8000d84: b9 60 08 00 mv r1,r11 8000d88: f8 00 0a e1 calli 800390c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 8000d8c: 29 83 00 00 lw r3,(r12+0) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 8000d90: b9 60 10 00 mv r2,r11 8000d94: 34 61 00 50 addi r1,r3,80 the_jnode->Parent = new_parent; 8000d98: 59 63 00 08 sw (r11+8),r3 8000d9c: f8 00 0a d0 calli 80038dc <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 8000da0: 37 81 00 10 addi r1,sp,16 8000da4: 34 02 00 00 mvi r2,0 8000da8: f8 00 02 17 calli 8001604 8000dac: 2b 82 00 10 lw r2,(sp+16) return 0; } 8000db0: 34 01 00 00 mvi r1,0 rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 8000db4: 59 62 00 48 sw (r11+72),r2 return 0; } 8000db8: 2b 9d 00 04 lw ra,(sp+4) 8000dbc: 2b 8b 00 0c lw r11,(sp+12) 8000dc0: 2b 8c 00 08 lw r12,(sp+8) 8000dc4: 37 9c 00 14 addi sp,sp,20 8000dc8: c3 a0 00 00 ret =============================================================================== 08008154 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8008154: 37 9c ff f8 addi sp,sp,-8 8008158: 5b 8b 00 08 sw (sp+8),r11 800815c: 5b 9d 00 04 sw (sp+4),ra IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 8008160: 28 23 00 00 lw r3,(r1+0) switch ( the_jnode->type ) { 8008164: 34 05 00 07 mvi r5,7 8008168: 28 64 00 4c lw r4,(r3+76) 800816c: 54 85 00 29 bgu r4,r5,8008210 <== NEVER TAKEN 8008170: 78 05 08 01 mvhi r5,0x801 8008174: b4 84 20 00 add r4,r4,r4 8008178: 38 a5 25 20 ori r5,r5,0x2520 800817c: b4 84 20 00 add r4,r4,r4 8008180: b4 a4 20 00 add r4,r5,r4 8008184: 28 84 00 00 lw r4,(r4+0) 8008188: c0 80 00 00 b r4 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 800818c: 58 40 00 20 sw (r2+32),r0 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 8008190: 28 21 00 10 lw r1,(r1+16) buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 8008194: 28 6a 00 30 lw r10,(r3+48) buf->st_nlink = the_jnode->st_nlink; 8008198: 2c 69 00 34 lhu r9,(r3+52) * 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 ); 800819c: 28 21 00 34 lw r1,(r1+52) buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 80081a0: 28 68 00 38 lw r8,(r3+56) buf->st_uid = the_jnode->st_uid; 80081a4: 2c 67 00 3c lhu r7,(r3+60) * 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 ); 80081a8: 28 2b 00 00 lw r11,(r1+0) 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; 80081ac: 2c 66 00 3e lhu r6,(r3+62) buf->st_atime = the_jnode->stat_atime; 80081b0: 28 65 00 40 lw r5,(r3+64) buf->st_mtime = the_jnode->stat_mtime; 80081b4: 28 64 00 44 lw r4,(r3+68) buf->st_ctime = the_jnode->stat_ctime; 80081b8: 28 63 00 48 lw r3,(r3+72) rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 80081bc: 38 01 ff fe mvu r1,0xfffe /* * 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 = 80081c0: 58 41 00 00 sw (r2+0),r1 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; 80081c4: 34 01 00 00 mvi r1,0 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 80081c8: 58 4b 00 04 sw (r2+4),r11 rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 80081cc: 58 4a 00 0c sw (r2+12),r10 buf->st_nlink = the_jnode->st_nlink; 80081d0: 0c 49 00 10 sh (r2+16),r9 buf->st_ino = the_jnode->st_ino; 80081d4: 58 48 00 08 sw (r2+8),r8 buf->st_uid = the_jnode->st_uid; 80081d8: 0c 47 00 12 sh (r2+18),r7 buf->st_gid = the_jnode->st_gid; 80081dc: 0c 46 00 14 sh (r2+20),r6 buf->st_atime = the_jnode->stat_atime; 80081e0: 58 45 00 24 sw (r2+36),r5 buf->st_mtime = the_jnode->stat_mtime; 80081e4: 58 44 00 2c sw (r2+44),r4 buf->st_ctime = the_jnode->stat_ctime; 80081e8: 58 43 00 34 sw (r2+52),r3 return 0; } 80081ec: 2b 9d 00 04 lw ra,(sp+4) 80081f0: 2b 8b 00 08 lw r11,(sp+8) 80081f4: 37 9c 00 08 addi sp,sp,8 80081f8: c3 a0 00 00 ret switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 80081fc: 28 65 00 54 lw r5,(r3+84) 8008200: 28 64 00 50 lw r4,(r3+80) 8008204: 58 45 00 1c sw (r2+28),r5 8008208: 58 44 00 18 sw (r2+24),r4 break; 800820c: e3 ff ff e1 bi 8008190 case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 8008210: f8 00 0e 25 calli 800baa4 <__errno> <== NOT EXECUTED 8008214: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8008218: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800821c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 8008220: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8008224: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8008228: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800822c: c3 a0 00 00 ret <== 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; 8008230: 28 64 00 54 lw r4,(r3+84) 8008234: 58 44 00 20 sw (r2+32),r4 break; 8008238: e3 ff ff d6 bi 8008190 =============================================================================== 08000dcc : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 8000dcc: 37 9c ff ac addi sp,sp,-84 8000dd0: 5b 8b 00 14 sw (sp+20),r11 8000dd4: 5b 8c 00 10 sw (sp+16),r12 8000dd8: 5b 8d 00 0c sw (sp+12),r13 8000ddc: 5b 8e 00 08 sw (sp+8),r14 8000de0: 5b 9d 00 04 sw (sp+4),ra 8000de4: b8 20 70 00 mv r14,r1 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 8000de8: b8 60 08 00 mv r1,r3 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 8000dec: b8 60 58 00 mv r11,r3 8000df0: b8 40 68 00 mv r13,r2 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 8000df4: 37 8c 00 18 addi r12,sp,24 8000df8: f8 00 2f d7 calli 800cd54 8000dfc: b8 20 10 00 mv r2,r1 8000e00: b9 80 18 00 mv r3,r12 8000e04: 37 84 00 54 addi r4,sp,84 8000e08: b9 60 08 00 mv r1,r11 8000e0c: f8 00 1c 43 calli 8007f18 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 8000e10: b9 a0 08 00 mv r1,r13 8000e14: f8 00 2f ad calli 800ccc8 8000e18: 5b 81 00 3c sw (sp+60),r1 if (info.sym_link.name == NULL) { 8000e1c: 44 20 00 13 be r1,r0,8000e68 <== NEVER TAKEN * 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( 8000e20: 34 02 00 04 mvi r2,4 8000e24: b9 c0 08 00 mv r1,r14 8000e28: b9 80 18 00 mv r3,r12 8000e2c: 38 04 a1 ff mvu r4,0xa1ff 8000e30: 37 85 00 3c addi r5,sp,60 8000e34: f8 00 19 31 calli 80072f8 if (new_node == NULL) { free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; 8000e38: 34 02 00 00 mvi r2,0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 8000e3c: 44 20 00 09 be r1,r0,8000e60 <== NEVER TAKEN free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 8000e40: b8 40 08 00 mv r1,r2 8000e44: 2b 9d 00 04 lw ra,(sp+4) 8000e48: 2b 8b 00 14 lw r11,(sp+20) 8000e4c: 2b 8c 00 10 lw r12,(sp+16) 8000e50: 2b 8d 00 0c lw r13,(sp+12) 8000e54: 2b 8e 00 08 lw r14,(sp+8) 8000e58: 37 9c 00 54 addi sp,sp,84 8000e5c: c3 a0 00 00 ret ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 8000e60: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8000e64: f8 00 01 ba calli 800154c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8000e68: f8 00 2b 0f calli 800baa4 <__errno> <== NOT EXECUTED 8000e6c: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8000e70: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000e74: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8000e78: e3 ff ff f2 bi 8000e40 <== NOT EXECUTED =============================================================================== 08000e7c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 8000e7c: 37 9c ff d0 addi sp,sp,-48 8000e80: 5b 8b 00 14 sw (sp+20),r11 8000e84: 5b 8c 00 10 sw (sp+16),r12 8000e88: 5b 8d 00 0c sw (sp+12),r13 8000e8c: 5b 8e 00 08 sw (sp+8),r14 8000e90: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 8000e94: 28 4c 00 00 lw r12,(r2+0) int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 8000e98: b8 40 58 00 mv r11,r2 8000e9c: b8 20 68 00 mv r13,r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 8000ea0: 29 82 00 4c lw r2,(r12+76) 8000ea4: 34 01 00 03 mvi r1,3 8000ea8: 44 41 00 0f be r2,r1,8000ee4 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 8000eac: 29 63 00 08 lw r3,(r11+8) 8000eb0: b9 60 10 00 mv r2,r11 8000eb4: b9 a0 08 00 mv r1,r13 8000eb8: 28 63 00 34 lw r3,(r3+52) 8000ebc: d8 60 00 00 call r3 8000ec0: b8 20 10 00 mv r2,r1 return result; } 8000ec4: b8 40 08 00 mv r1,r2 8000ec8: 2b 9d 00 04 lw ra,(sp+4) 8000ecc: 2b 8b 00 14 lw r11,(sp+20) 8000ed0: 2b 8c 00 10 lw r12,(sp+16) 8000ed4: 2b 8d 00 0c lw r13,(sp+12) 8000ed8: 2b 8e 00 08 lw r14,(sp+8) 8000edc: 37 9c 00 30 addi sp,sp,48 8000ee0: c3 a0 00 00 ret * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 8000ee4: 29 83 00 50 lw r3,(r12+80) 8000ee8: 44 60 00 22 be r3,r0,8000f70 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 8000eec: 29 64 00 0c lw r4,(r11+12) 8000ef0: 29 66 00 04 lw r6,(r11+4) 8000ef4: 29 65 00 08 lw r5,(r11+8) 8000ef8: 29 62 00 10 lw r2,(r11+16) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 8000efc: 37 8e 00 18 addi r14,sp,24 8000f00: b9 c0 08 00 mv r1,r14 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 8000f04: 5b 84 00 24 sw (sp+36),r4 the_link.node_access = node->info.hard_link.link_node; 8000f08: 5b 83 00 18 sw (sp+24),r3 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 8000f0c: 5b 86 00 1c sw (sp+28),r6 8000f10: 5b 85 00 20 sw (sp+32),r5 8000f14: 5b 82 00 28 sw (sp+40),r2 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 8000f18: f8 00 19 5a calli 8007480 /* * 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) 8000f1c: 29 83 00 50 lw r3,(r12+80) 8000f20: 34 01 00 01 mvi r1,1 8000f24: 2c 64 00 34 lhu r4,(r3+52) 8000f28: 44 81 00 0a be r4,r1,8000f50 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 8000f2c: 34 84 ff ff addi r4,r4,-1 IMFS_update_ctime( node->info.hard_link.link_node ); 8000f30: 34 02 00 00 mvi r2,0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 8000f34: 0c 64 00 34 sh (r3+52),r4 IMFS_update_ctime( node->info.hard_link.link_node ); 8000f38: 37 81 00 2c addi r1,sp,44 8000f3c: f8 00 01 b2 calli 8001604 8000f40: 29 81 00 50 lw r1,(r12+80) 8000f44: 2b 82 00 2c lw r2,(sp+44) 8000f48: 58 22 00 48 sw (r1+72),r2 8000f4c: e3 ff ff d8 bi 8000eac * 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 ); 8000f50: 2b 83 00 20 lw r3,(sp+32) 8000f54: b9 c0 10 00 mv r2,r14 8000f58: b9 a0 08 00 mv r1,r13 8000f5c: 28 63 00 34 lw r3,(r3+52) 8000f60: d8 60 00 00 call r3 if ( result != 0 ) return -1; 8000f64: 34 02 ff ff mvi r2,-1 */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) 8000f68: 44 20 ff d1 be r1,r0,8000eac 8000f6c: e3 ff ff d6 bi 8000ec4 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 8000f70: f8 00 2a cd calli 800baa4 <__errno> <== NOT EXECUTED 8000f74: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8000f78: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000f7c: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8000f80: e3 ff ff d1 bi 8000ec4 <== NOT EXECUTED =============================================================================== 08000f84 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 8000f84: 37 9c ff fc addi sp,sp,-4 8000f88: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 8000f8c: 28 21 00 08 lw r1,(r1+8) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 8000f90: 34 02 00 01 mvi r2,1 8000f94: 28 23 00 4c lw r3,(r1+76) 8000f98: 5c 62 00 08 bne r3,r2,8000fb8 <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 8000f9c: 28 22 00 5c lw r2,(r1+92) 8000fa0: 44 40 00 0b be r2,r0,8000fcc <== NEVER TAKEN /* * 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; 8000fa4: 58 20 00 5c sw (r1+92),r0 return 0; 8000fa8: 34 01 00 00 mvi r1,0 } 8000fac: 2b 9d 00 04 lw ra,(sp+4) 8000fb0: 37 9c 00 04 addi sp,sp,4 8000fb4: c3 a0 00 00 ret /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 8000fb8: f8 00 2a bb calli 800baa4 <__errno> <== NOT EXECUTED 8000fbc: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 8000fc0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000fc4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000fc8: e3 ff ff f9 bi 8000fac <== 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 */ 8000fcc: f8 00 2a b6 calli 800baa4 <__errno> <== NOT EXECUTED 8000fd0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8000fd4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000fd8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000fdc: e3 ff ff f4 bi 8000fac <== NOT EXECUTED =============================================================================== 08001840 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 8001840: 37 9c ff ec addi sp,sp,-20 8001844: 5b 8b 00 14 sw (sp+20),r11 8001848: 5b 8c 00 10 sw (sp+16),r12 800184c: 5b 8d 00 0c sw (sp+12),r13 8001850: 5b 8e 00 08 sw (sp+8),r14 8001854: 5b 9d 00 04 sw (sp+4),ra /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 8001858: 78 04 08 01 mvhi r4,0x801 800185c: 38 84 36 10 ori r4,r4,0x3610 8001860: 28 84 00 00 lw r4,(r4+0) void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 8001864: b8 20 68 00 mv r13,r1 8001868: b8 40 70 00 mv r14,r2 800186c: b8 60 58 00 mv r11,r3 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 8001870: 44 80 00 03 be r4,r0,800187c (*rtems_malloc_statistics_helpers->initialize)(); 8001874: 28 81 00 00 lw r1,(r4+0) 8001878: d8 20 00 00 call r1 } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 800187c: fb ff ff d2 calli 80017c4 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 8001880: 78 04 08 01 mvhi r4,0x801 8001884: 38 84 36 14 ori r4,r4,0x3614 8001888: 28 81 00 00 lw r1,(r4+0) 800188c: 44 20 00 07 be r1,r0,80018a8 heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 8001890: 28 23 00 00 lw r3,(r1+0) 8001894: b9 60 10 00 mv r2,r11 8001898: b9 a0 08 00 mv r1,r13 800189c: d8 60 00 00 call r3 80018a0: b8 20 68 00 mv r13,r1 heap_begin, sbrk_amount ); heap_size = (uintptr_t) sbrk_amount; 80018a4: b9 60 70 00 mv r14,r11 * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 80018a8: 78 0c 08 01 mvhi r12,0x801 80018ac: 39 8c 36 0c ori r12,r12,0x360c 80018b0: 41 82 00 00 lbu r2,(r12+0) 80018b4: 78 0b 08 01 mvhi r11,0x801 80018b8: 39 6b 30 1c ori r11,r11,0x301c 80018bc: 5c 40 00 0d bne r2,r0,80018f0 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 80018c0: 78 01 08 01 mvhi r1,0x801 80018c4: 38 21 30 c4 ori r1,r1,0x30c4 80018c8: 40 21 00 28 lbu r1,(r1+40) 80018cc: 5c 22 00 17 bne r1,r2,8001928 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 80018d0: 78 0b 08 01 mvhi r11,0x801 80018d4: 39 6b 30 1c ori r11,r11,0x301c 80018d8: 29 61 00 00 lw r1,(r11+0) 80018dc: b9 a0 10 00 mv r2,r13 80018e0: b9 c0 18 00 mv r3,r14 80018e4: 34 04 00 08 mvi r4,8 80018e8: f8 00 09 c8 calli 8004008 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 80018ec: 44 20 00 17 be r1,r0,8001948 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 80018f0: 78 0c 08 01 mvhi r12,0x801 80018f4: 39 8c 36 b8 ori r12,r12,0x36b8 80018f8: 29 61 00 00 lw r1,(r11+0) 80018fc: 29 8b 00 00 lw r11,(r12+0) 8001900: f8 00 0d 89 calli 8004f24 <_Protected_heap_Get_size> 8001904: b4 2b 08 00 add r1,r1,r11 8001908: 59 81 00 00 sw (r12+0),r1 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 800190c: 2b 9d 00 04 lw ra,(sp+4) 8001910: 2b 8b 00 14 lw r11,(sp+20) 8001914: 2b 8c 00 10 lw r12,(sp+16) 8001918: 2b 8d 00 0c lw r13,(sp+12) 800191c: 2b 8e 00 08 lw r14,(sp+8) 8001920: 37 9c 00 14 addi sp,sp,20 8001924: c3 a0 00 00 ret if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 8001928: b9 a0 08 00 mv r1,r13 800192c: b9 c0 18 00 mv r3,r14 8001930: f8 00 2b 5f calli 800c6ac * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 8001934: 41 81 00 00 lbu r1,(r12+0) 8001938: 78 0b 08 01 mvhi r11,0x801 800193c: 39 6b 30 1c ori r11,r11,0x301c 8001940: 44 20 ff e4 be r1,r0,80018d0 <== ALWAYS TAKEN 8001944: e3 ff ff eb bi 80018f0 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 8001948: 34 01 00 1a mvi r1,26 800194c: f8 00 06 e0 calli 80034cc =============================================================================== 080006cc : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 80006cc: 37 9c ff d8 addi sp,sp,-40 80006d0: 5b 8b 00 20 sw (sp+32),r11 80006d4: 5b 8c 00 1c sw (sp+28),r12 80006d8: 5b 8d 00 18 sw (sp+24),r13 80006dc: 5b 8e 00 14 sw (sp+20),r14 80006e0: 5b 8f 00 10 sw (sp+16),r15 80006e4: 5b 90 00 0c sw (sp+12),r16 80006e8: 5b 91 00 08 sw (sp+8),r17 80006ec: 5b 9d 00 04 sw (sp+4),ra /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 80006f0: 34 02 ff ff mvi r2,-1 80006f4: 44 22 00 31 be r1,r2,80007b8 current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } #endif low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 80006f8: 78 0b 08 01 mvhi r11,0x801 80006fc: 39 6b 36 c4 ori r11,r11,0x36c4 8000700: 29 6f 00 00 lw r15,(r11+0) 8000704: 35 ef ff f0 addi r15,r15,-16 if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 8000708: 44 20 00 32 be r1,r0,80007d0 <== NEVER TAKEN (*print_handler)( 800070c: 28 2e 00 08 lw r14,(r1+8) 8000710: 78 0d 08 01 mvhi r13,0x801 8000714: 39 ad 36 2c ori r13,r13,0x362c 8000718: 78 0c 08 01 mvhi r12,0x801 800071c: 29 b1 00 00 lw r17,(r13+0) 8000720: 37 83 00 24 addi r3,sp,36 8000724: 34 02 00 05 mvi r2,5 8000728: 39 8c 36 30 ori r12,r12,0x3630 800072c: b9 c0 08 00 mv r1,r14 8000730: 29 90 00 00 lw r16,(r12+0) 8000734: f8 00 09 5d calli 8002ca8 8000738: 78 02 08 01 mvhi r2,0x801 800073c: b8 20 20 00 mv r4,r1 8000740: 38 42 1c 90 ori r2,r2,0x1c90 8000744: ba 20 08 00 mv r1,r17 8000748: b9 c0 18 00 mv r3,r14 800074c: da 00 00 00 call r16 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 8000750: 29 64 00 00 lw r4,(r11+0) 8000754: 29 63 00 04 lw r3,(r11+4) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 8000758: 29 87 00 00 lw r7,(r12+0) 800075c: 29 a1 00 00 lw r1,(r13+0) print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 8000760: 34 84 ff ff addi r4,r4,-1 ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 8000764: 78 02 08 01 mvhi r2,0x801 8000768: 38 42 1c b0 ori r2,r2,0x1cb0 800076c: b4 64 20 00 add r4,r3,r4 8000770: 34 05 00 00 mvi r5,0 8000774: b9 e0 30 00 mv r6,r15 8000778: d8 e0 00 00 call r7 current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 800077c: 29 a1 00 00 lw r1,(r13+0) 8000780: 29 83 00 00 lw r3,(r12+0) 8000784: 78 02 08 01 mvhi r2,0x801 8000788: 38 42 1c d0 ori r2,r2,0x1cd0 800078c: d8 60 00 00 call r3 } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 8000790: 2b 9d 00 04 lw ra,(sp+4) 8000794: 2b 8b 00 20 lw r11,(sp+32) 8000798: 2b 8c 00 1c lw r12,(sp+28) 800079c: 2b 8d 00 18 lw r13,(sp+24) 80007a0: 2b 8e 00 14 lw r14,(sp+20) 80007a4: 2b 8f 00 10 lw r15,(sp+16) 80007a8: 2b 90 00 0c lw r16,(sp+12) 80007ac: 2b 91 00 08 lw r17,(sp+8) 80007b0: 37 9c 00 28 addi sp,sp,40 80007b4: c3 a0 00 00 ret /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) 80007b8: 78 0b 08 01 mvhi r11,0x801 80007bc: 39 6b 36 c4 ori r11,r11,0x36c4 80007c0: 29 61 00 04 lw r1,(r11+4) 80007c4: 44 20 ff f3 be r1,r0,8000790 <== ALWAYS TAKEN current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } #endif low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 80007c8: 29 6f 00 00 lw r15,(r11+0) <== NOT EXECUTED 80007cc: 35 ef ff f0 addi r15,r15,-16 <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 80007d0: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED 80007d4: 78 0d 08 01 mvhi r13,0x801 <== NOT EXECUTED 80007d8: 39 8c 36 30 ori r12,r12,0x3630 <== NOT EXECUTED 80007dc: 39 ad 36 2c ori r13,r13,0x362c <== NOT EXECUTED 80007e0: 29 84 00 00 lw r4,(r12+0) <== NOT EXECUTED 80007e4: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 80007e8: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 80007ec: 38 42 1c a0 ori r2,r2,0x1ca0 <== NOT EXECUTED 80007f0: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 80007f4: d8 80 00 00 call r4 <== NOT EXECUTED 80007f8: e3 ff ff d6 bi 8000750 <== NOT EXECUTED =============================================================================== 080007fc : Stack_check_Dope_stack(&Stack_check_Interrupt_stack); } #endif Stack_check_Initialized = 1; } 80007fc: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 080036f0 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 80036f0: 37 9c ff f4 addi sp,sp,-12 80036f4: 5b 8b 00 0c sw (sp+12),r11 80036f8: 5b 8c 00 08 sw (sp+8),r12 80036fc: 5b 9d 00 04 sw (sp+4),ra Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 8003700: 78 01 08 01 mvhi r1,0x801 8003704: 38 21 39 b0 ori r1,r1,0x39b0 8003708: 28 2b 00 00 lw r11,(r1+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800370c: 78 0c 08 01 mvhi r12,0x801 8003710: 39 8c 39 b4 ori r12,r12,0x39b4 8003714: 45 6c 00 05 be r11,r12,8003728 <_API_extensions_Run_postdriver+0x38><== NEVER TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 8003718: 29 61 00 08 lw r1,(r11+8) 800371c: d8 20 00 00 call r1 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 8003720: 29 6b 00 00 lw r11,(r11+0) void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 8003724: 5d 6c ff fd bne r11,r12,8003718 <_API_extensions_Run_postdriver+0x28><== NEVER TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 8003728: 2b 9d 00 04 lw ra,(sp+4) 800372c: 2b 8b 00 0c lw r11,(sp+12) 8003730: 2b 8c 00 08 lw r12,(sp+8) 8003734: 37 9c 00 0c addi sp,sp,12 8003738: c3 a0 00 00 ret =============================================================================== 0800373c <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 800373c: 37 9c ff f0 addi sp,sp,-16 8003740: 5b 8b 00 10 sw (sp+16),r11 8003744: 5b 8c 00 0c sw (sp+12),r12 8003748: 5b 8d 00 08 sw (sp+8),r13 800374c: 5b 9d 00 04 sw (sp+4),ra Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 8003750: 78 01 08 01 mvhi r1,0x801 8003754: 38 21 39 b0 ori r1,r1,0x39b0 8003758: 28 2b 00 00 lw r11,(r1+0) 800375c: 78 0c 08 01 mvhi r12,0x801 8003760: 39 8c 39 b4 ori r12,r12,0x39b4 8003764: 45 6c 00 08 be r11,r12,8003784 <_API_extensions_Run_postswitch+0x48><== NEVER TAKEN 8003768: 78 0d 08 01 mvhi r13,0x801 800376c: 39 ad 39 e8 ori r13,r13,0x39e8 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); 8003770: 29 62 00 0c lw r2,(r11+12) 8003774: 29 a1 00 0c lw r1,(r13+12) 8003778: d8 40 00 00 call r2 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 800377c: 29 6b 00 00 lw r11,(r11+0) void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 8003780: 5d 6c ff fc bne r11,r12,8003770 <_API_extensions_Run_postswitch+0x34><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 8003784: 2b 9d 00 04 lw ra,(sp+4) 8003788: 2b 8b 00 10 lw r11,(sp+16) 800378c: 2b 8c 00 0c lw r12,(sp+12) 8003790: 2b 8d 00 08 lw r13,(sp+8) 8003794: 37 9c 00 10 addi sp,sp,16 8003798: c3 a0 00 00 ret =============================================================================== 0801542c <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 801542c: 37 9c ff e4 addi sp,sp,-28 8015430: 5b 8b 00 1c sw (sp+28),r11 8015434: 5b 8c 00 18 sw (sp+24),r12 8015438: 5b 8d 00 14 sw (sp+20),r13 801543c: 5b 8e 00 10 sw (sp+16),r14 8015440: 5b 8f 00 0c sw (sp+12),r15 8015444: 5b 90 00 08 sw (sp+8),r16 8015448: 5b 9d 00 04 sw (sp+4),ra Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 801544c: 28 24 00 4c lw r4,(r1+76) Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 8015450: b8 20 68 00 mv r13,r1 8015454: b8 60 60 00 mv r12,r3 8015458: b8 40 78 00 mv r15,r2 801545c: b8 c0 80 00 mv r16,r6 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; 8015460: 34 01 00 01 mvi r1,1 { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 8015464: 54 64 00 06 bgu r3,r4,801547c <_CORE_message_queue_Broadcast+0x50><== NEVER TAKEN * 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 ) { 8015468: 29 a1 00 48 lw r1,(r13+72) 801546c: 34 0e 00 00 mvi r14,0 8015470: 44 20 00 11 be r1,r0,80154b4 <_CORE_message_queue_Broadcast+0x88> *count = 0; 8015474: 58 c0 00 00 sw (r6+0),r0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 8015478: 34 01 00 00 mvi r1,0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 801547c: 2b 9d 00 04 lw ra,(sp+4) 8015480: 2b 8b 00 1c lw r11,(sp+28) 8015484: 2b 8c 00 18 lw r12,(sp+24) 8015488: 2b 8d 00 14 lw r13,(sp+20) 801548c: 2b 8e 00 10 lw r14,(sp+16) 8015490: 2b 8f 00 0c lw r15,(sp+12) 8015494: 2b 90 00 08 lw r16,(sp+8) 8015498: 37 9c 00 1c addi sp,sp,28 801549c: c3 a0 00 00 ret const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 80154a0: 29 61 00 2c lw r1,(r11+44) */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 80154a4: 35 ce 00 01 addi r14,r14,1 80154a8: f8 00 26 df calli 801f024 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 80154ac: 29 61 00 28 lw r1,(r11+40) 80154b0: 58 2c 00 00 sw (r1+0),r12 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 80154b4: b9 a0 08 00 mv r1,r13 80154b8: f8 00 0c 48 calli 80185d8 <_Thread_queue_Dequeue> 80154bc: b8 20 58 00 mv r11,r1 80154c0: b9 e0 10 00 mv r2,r15 80154c4: b9 80 18 00 mv r3,r12 80154c8: 5c 20 ff f6 bne r1,r0,80154a0 <_CORE_message_queue_Broadcast+0x74> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 80154cc: 5a 0e 00 00 sw (r16+0),r14 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 80154d0: 34 01 00 00 mvi r1,0 80154d4: e3 ff ff ea bi 801547c <_CORE_message_queue_Broadcast+0x50> =============================================================================== 0800eda4 <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 800eda4: 37 9c ff e4 addi sp,sp,-28 800eda8: 5b 8b 00 1c sw (sp+28),r11 800edac: 5b 8c 00 18 sw (sp+24),r12 800edb0: 5b 8d 00 14 sw (sp+20),r13 800edb4: 5b 8e 00 10 sw (sp+16),r14 800edb8: 5b 8f 00 0c sw (sp+12),r15 800edbc: 5b 90 00 08 sw (sp+8),r16 800edc0: 5b 9d 00 04 sw (sp+4),ra 800edc4: b8 20 58 00 mv r11,r1 size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; 800edc8: 58 20 00 48 sw (r1+72),r0 the_message_queue->maximum_message_size = maximum_message_size; 800edcc: 58 24 00 4c sw (r1+76),r4 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 800edd0: 59 63 00 44 sw (r11+68),r3 /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 800edd4: 20 81 00 03 andi r1,r4,0x3 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 800edd8: b8 60 70 00 mv r14,r3 800eddc: b8 40 80 00 mv r16,r2 /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 800ede0: b8 80 60 00 mv r12,r4 800ede4: 44 20 00 06 be r1,r0,800edfc <_CORE_message_queue_Initialize+0x58> allocated_message_size += sizeof(uint32_t); 800ede8: 34 8c 00 04 addi r12,r4,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); 800edec: 34 01 ff fc mvi r1,-4 800edf0: a1 81 60 00 and r12,r12,r1 } if (allocated_message_size < maximum_message_size) return false; 800edf4: 34 0d 00 00 mvi r13,0 if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); allocated_message_size &= ~(sizeof(uint32_t) - 1); } if (allocated_message_size < maximum_message_size) 800edf8: 54 8c 00 1c bgu r4,r12,800ee68 <_CORE_message_queue_Initialize+0xc4><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 800edfc: 35 8f 00 10 addi r15,r12,16 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 800ee00: b9 e0 08 00 mv r1,r15 800ee04: b9 c0 10 00 mv r2,r14 800ee08: f8 00 58 cf calli 8025144 <__mulsi3> (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) return false; 800ee0c: 34 0d 00 00 mvi r13,0 * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 800ee10: 55 81 00 16 bgu r12,r1,800ee68 <_CORE_message_queue_Initialize+0xc4><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 800ee14: f8 00 0e 49 calli 8012738 <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 800ee18: 59 61 00 5c sw (r11+92),r1 _Workspace_Allocate( message_buffering_required ); 800ee1c: b8 20 18 00 mv r3,r1 if (the_message_queue->message_buffers == 0) 800ee20: 44 20 00 12 be r1,r0,800ee68 <_CORE_message_queue_Initialize+0xc4> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 800ee24: b8 60 10 00 mv r2,r3 800ee28: 35 61 00 60 addi r1,r11,96 800ee2c: b9 c0 18 00 mv r3,r14 800ee30: b9 e0 20 00 mv r4,r15 800ee34: f8 00 17 25 calli 8014ac8 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 800ee38: 2a 02 00 00 lw r2,(r16+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800ee3c: 35 63 00 54 addi r3,r11,84 the_message_queue->message_buffers, (size_t) maximum_pending_messages, allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); 800ee40: 35 61 00 50 addi r1,r11,80 _Thread_queue_Initialize( 800ee44: 64 42 00 01 cmpei r2,r2,1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 800ee48: 59 63 00 50 sw (r11+80),r3 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 800ee4c: 59 61 00 58 sw (r11+88),r1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 800ee50: 59 60 00 54 sw (r11+84),r0 800ee54: b9 60 08 00 mv r1,r11 800ee58: 34 03 00 80 mvi r3,128 800ee5c: 34 04 00 06 mvi r4,6 800ee60: f8 00 0a 5c calli 80117d0 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 800ee64: 34 0d 00 01 mvi r13,1 } 800ee68: b9 a0 08 00 mv r1,r13 800ee6c: 2b 9d 00 04 lw ra,(sp+4) 800ee70: 2b 8b 00 1c lw r11,(sp+28) 800ee74: 2b 8c 00 18 lw r12,(sp+24) 800ee78: 2b 8d 00 14 lw r13,(sp+20) 800ee7c: 2b 8e 00 10 lw r14,(sp+16) 800ee80: 2b 8f 00 0c lw r15,(sp+12) 800ee84: 2b 90 00 08 lw r16,(sp+8) 800ee88: 37 9c 00 1c addi sp,sp,28 800ee8c: c3 a0 00 00 ret =============================================================================== 08003ab0 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 8003ab0: 37 9c ff e4 addi sp,sp,-28 8003ab4: 5b 8b 00 18 sw (sp+24),r11 8003ab8: 5b 8c 00 14 sw (sp+20),r12 8003abc: 5b 8d 00 10 sw (sp+16),r13 8003ac0: 5b 8e 00 0c sw (sp+12),r14 8003ac4: 5b 8f 00 08 sw (sp+8),r15 8003ac8: 5b 9d 00 04 sw (sp+4),ra _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 8003acc: 78 0b 08 01 mvhi r11,0x801 8003ad0: 39 6b 38 1c ori r11,r11,0x381c 8003ad4: 29 66 00 00 lw r6,(r11+0) Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 8003ad8: 5b 85 00 1c sw (sp+28),r5 8003adc: b8 20 60 00 mv r12,r1 8003ae0: b8 40 78 00 mv r15,r2 8003ae4: b8 80 70 00 mv r14,r4 8003ae8: 20 6d 00 ff andi r13,r3,0xff _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 8003aec: 44 c0 00 02 be r6,r0,8003af4 <_CORE_mutex_Seize+0x44> 8003af0: 5d a0 00 15 bne r13,r0,8003b44 <_CORE_mutex_Seize+0x94> <== ALWAYS TAKEN 8003af4: b9 80 08 00 mv r1,r12 8003af8: 37 82 00 1c addi r2,sp,28 8003afc: f8 00 15 de calli 8009274 <_CORE_mutex_Seize_interrupt_trylock> 8003b00: 44 20 00 09 be r1,r0,8003b24 <_CORE_mutex_Seize+0x74> 8003b04: 5d a0 00 19 bne r13,r0,8003b68 <_CORE_mutex_Seize+0xb8> 8003b08: 2b 81 00 1c lw r1,(sp+28) 8003b0c: d0 01 00 00 wcsr IE,r1 8003b10: 78 01 08 01 mvhi r1,0x801 8003b14: 38 21 39 e8 ori r1,r1,0x39e8 8003b18: 28 21 00 0c lw r1,(r1+12) 8003b1c: 34 02 00 01 mvi r2,1 8003b20: 58 22 00 34 sw (r1+52),r2 } 8003b24: 2b 9d 00 04 lw ra,(sp+4) 8003b28: 2b 8b 00 18 lw r11,(sp+24) 8003b2c: 2b 8c 00 14 lw r12,(sp+20) 8003b30: 2b 8d 00 10 lw r13,(sp+16) 8003b34: 2b 8e 00 0c lw r14,(sp+12) 8003b38: 2b 8f 00 08 lw r15,(sp+8) 8003b3c: 37 9c 00 1c addi sp,sp,28 8003b40: c3 a0 00 00 ret bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 8003b44: 78 01 08 01 mvhi r1,0x801 8003b48: 38 21 39 9c ori r1,r1,0x399c 8003b4c: 28 21 00 00 lw r1,(r1+0) 8003b50: 34 02 00 01 mvi r2,1 8003b54: 50 41 ff e8 bgeu r2,r1,8003af4 <_CORE_mutex_Seize+0x44> 8003b58: 34 01 00 00 mvi r1,0 8003b5c: 34 02 00 00 mvi r2,0 8003b60: 34 03 00 12 mvi r3,18 8003b64: f8 00 02 34 calli 8004434 <_Internal_error_Occurred> 8003b68: 78 01 08 01 mvhi r1,0x801 8003b6c: 29 62 00 00 lw r2,(r11+0) 8003b70: 38 21 39 e8 ori r1,r1,0x39e8 8003b74: 28 21 00 0c lw r1,(r1+12) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8003b78: 34 03 00 01 mvi r3,1 8003b7c: 59 83 00 30 sw (r12+48),r3 8003b80: 34 42 00 01 addi r2,r2,1 8003b84: 58 2c 00 44 sw (r1+68),r12 8003b88: 58 2f 00 20 sw (r1+32),r15 8003b8c: 59 62 00 00 sw (r11+0),r2 8003b90: 2b 81 00 1c lw r1,(sp+28) 8003b94: d0 01 00 00 wcsr IE,r1 8003b98: b9 80 08 00 mv r1,r12 8003b9c: b9 c0 10 00 mv r2,r14 8003ba0: fb ff ff a3 calli 8003a2c <_CORE_mutex_Seize_interrupt_blocking> } 8003ba4: 2b 9d 00 04 lw ra,(sp+4) 8003ba8: 2b 8b 00 18 lw r11,(sp+24) 8003bac: 2b 8c 00 14 lw r12,(sp+20) 8003bb0: 2b 8d 00 10 lw r13,(sp+16) 8003bb4: 2b 8e 00 0c lw r14,(sp+12) 8003bb8: 2b 8f 00 08 lw r15,(sp+8) 8003bbc: 37 9c 00 1c addi sp,sp,28 8003bc0: c3 a0 00 00 ret =============================================================================== 08009274 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 8009274: 37 9c ff fc addi sp,sp,-4 8009278: 5b 9d 00 04 sw (sp+4),ra { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 800927c: 78 04 08 01 mvhi r4,0x801 8009280: 38 84 39 e8 ori r4,r4,0x39e8 8009284: 28 84 00 0c lw r4,(r4+12) 8009288: b8 20 18 00 mv r3,r1 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 800928c: 28 21 00 50 lw r1,(r1+80) Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 8009290: 58 80 00 34 sw (r4+52),r0 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 8009294: 44 20 00 12 be r1,r0,80092dc <_CORE_mutex_Seize_interrupt_trylock+0x68> the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 8009298: 28 86 00 08 lw r6,(r4+8) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 800929c: 28 61 00 48 lw r1,(r3+72) the_mutex->nest_count = 1; 80092a0: 34 05 00 01 mvi r5,1 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 80092a4: 58 66 00 60 sw (r3+96),r6 /* 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; 80092a8: 58 60 00 50 sw (r3+80),r0 the_mutex->holder = executing; 80092ac: 58 64 00 5c sw (r3+92),r4 the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 80092b0: 58 65 00 54 sw (r3+84),r5 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 80092b4: 34 06 00 02 mvi r6,2 80092b8: 44 26 00 15 be r1,r6,800930c <_CORE_mutex_Seize_interrupt_trylock+0x98> 80092bc: 34 06 00 03 mvi r6,3 80092c0: 44 26 00 17 be r1,r6,800931c <_CORE_mutex_Seize_interrupt_trylock+0xa8> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 80092c4: 28 41 00 00 lw r1,(r2+0) 80092c8: d0 01 00 00 wcsr IE,r1 return 0; 80092cc: 34 01 00 00 mvi r1,0 80092d0: 2b 9d 00 04 lw ra,(sp+4) 80092d4: 37 9c 00 04 addi sp,sp,4 80092d8: c3 a0 00 00 ret /* * 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 ) ) { 80092dc: 28 65 00 5c lw r5,(r3+92) /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 80092e0: 34 01 00 01 mvi r1,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 ) ) { 80092e4: 5c 85 ff fb bne r4,r5,80092d0 <_CORE_mutex_Seize_interrupt_trylock+0x5c> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 80092e8: 28 65 00 40 lw r5,(r3+64) 80092ec: 44 a0 00 30 be r5,r0,80093ac <_CORE_mutex_Seize_interrupt_trylock+0x138> 80092f0: 5c a1 ff f8 bne r5,r1,80092d0 <_CORE_mutex_Seize_interrupt_trylock+0x5c><== ALWAYS TAKEN 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; 80092f4: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 80092f8: 58 81 00 34 sw (r4+52),r1 <== NOT EXECUTED _ISR_Enable( *level_p ); 80092fc: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 8009300: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED return 0; 8009304: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8009308: e3 ff ff f2 bi 80092d0 <_CORE_mutex_Seize_interrupt_trylock+0x5c><== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 800930c: 28 81 00 1c lw r1,(r4+28) 8009310: 34 21 00 01 addi r1,r1,1 8009314: 58 81 00 1c sw (r4+28),r1 8009318: e3 ff ff eb bi 80092c4 <_CORE_mutex_Seize_interrupt_trylock+0x50> 800931c: 28 87 00 1c lw r7,(r4+28) */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 8009320: 28 66 00 4c lw r6,(r3+76) current = executing->current_priority; 8009324: 28 81 00 14 lw r1,(r4+20) _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 8009328: 34 e8 00 01 addi r8,r7,1 800932c: 58 88 00 1c sw (r4+28),r8 Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { 8009330: 44 c1 00 1b be r6,r1,800939c <_CORE_mutex_Seize_interrupt_trylock+0x128> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 8009334: 50 c1 00 0f bgeu r6,r1,8009370 <_CORE_mutex_Seize_interrupt_trylock+0xfc> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8009338: 78 01 08 01 mvhi r1,0x801 800933c: 38 21 38 1c ori r1,r1,0x381c 8009340: 28 24 00 00 lw r4,(r1+0) 8009344: 34 84 00 01 addi r4,r4,1 8009348: 58 24 00 00 sw (r1+0),r4 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 800934c: 28 41 00 00 lw r1,(r2+0) 8009350: d0 01 00 00 wcsr IE,r1 _Thread_Change_priority( 8009354: 28 61 00 5c lw r1,(r3+92) 8009358: 28 62 00 4c lw r2,(r3+76) 800935c: 34 03 00 00 mvi r3,0 8009360: fb ff ee f3 calli 8004f2c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 8009364: fb ff f0 72 calli 800552c <_Thread_Enable_dispatch> return 0; 8009368: 34 01 00 00 mvi r1,0 800936c: e3 ff ff d9 bi 80092d0 <_CORE_mutex_Seize_interrupt_trylock+0x5c> } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 8009370: 34 01 00 06 mvi r1,6 8009374: 58 81 00 34 sw (r4+52),r1 the_mutex->lock = CORE_MUTEX_UNLOCKED; 8009378: 58 65 00 50 sw (r3+80),r5 the_mutex->nest_count = 0; /* undo locking above */ 800937c: 58 60 00 54 sw (r3+84),r0 executing->resource_count--; /* undo locking above */ 8009380: 58 87 00 1c sw (r4+28),r7 _ISR_Enable( *level_p ); 8009384: 28 41 00 00 lw r1,(r2+0) 8009388: d0 01 00 00 wcsr IE,r1 return 0; 800938c: 34 01 00 00 mvi r1,0 8009390: 2b 9d 00 04 lw ra,(sp+4) 8009394: 37 9c 00 04 addi sp,sp,4 8009398: c3 a0 00 00 ret Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 800939c: 28 41 00 00 lw r1,(r2+0) 80093a0: d0 01 00 00 wcsr IE,r1 return 0; 80093a4: 34 01 00 00 mvi r1,0 80093a8: e3 ff ff ca bi 80092d0 <_CORE_mutex_Seize_interrupt_trylock+0x5c> * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 80093ac: 28 61 00 54 lw r1,(r3+84) 80093b0: 34 21 00 01 addi r1,r1,1 80093b4: 58 61 00 54 sw (r3+84),r1 _ISR_Enable( *level_p ); 80093b8: 28 41 00 00 lw r1,(r2+0) 80093bc: d0 01 00 00 wcsr IE,r1 return 0; 80093c0: 34 01 00 00 mvi r1,0 80093c4: e3 ff ff c3 bi 80092d0 <_CORE_mutex_Seize_interrupt_trylock+0x5c> =============================================================================== 08003d30 <_CORE_semaphore_Surrender>: CORE_semaphore_Status _CORE_semaphore_Surrender( CORE_semaphore_Control *the_semaphore, Objects_Id id, CORE_semaphore_API_mp_support_callout api_semaphore_mp_support ) { 8003d30: 37 9c ff f8 addi sp,sp,-8 8003d34: 5b 8b 00 08 sw (sp+8),r11 8003d38: 5b 9d 00 04 sw (sp+4),ra 8003d3c: b8 20 58 00 mv r11,r1 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 8003d40: f8 00 06 ff calli 800593c <_Thread_queue_Dequeue> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 8003d44: 34 02 00 00 mvi r2,0 if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 8003d48: 44 20 00 06 be r1,r0,8003d60 <_CORE_semaphore_Surrender+0x30> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 8003d4c: b8 40 08 00 mv r1,r2 8003d50: 2b 9d 00 04 lw ra,(sp+4) 8003d54: 2b 8b 00 08 lw r11,(sp+8) 8003d58: 37 9c 00 08 addi sp,sp,8 8003d5c: c3 a0 00 00 ret if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 8003d60: 90 00 08 00 rcsr r1,IE 8003d64: 34 02 ff fe mvi r2,-2 8003d68: a0 22 10 00 and r2,r1,r2 8003d6c: d0 02 00 00 wcsr IE,r2 if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 8003d70: 29 63 00 48 lw r3,(r11+72) 8003d74: 29 64 00 40 lw r4,(r11+64) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 8003d78: 34 02 00 04 mvi r2,4 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 8003d7c: 50 64 00 04 bgeu r3,r4,8003d8c <_CORE_semaphore_Surrender+0x5c><== NEVER TAKEN the_semaphore->count += 1; 8003d80: 34 63 00 01 addi r3,r3,1 8003d84: 59 63 00 48 sw (r11+72),r3 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 8003d88: 34 02 00 00 mvi r2,0 _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 8003d8c: d0 01 00 00 wcsr IE,r1 } return status; } 8003d90: b8 40 08 00 mv r1,r2 8003d94: 2b 9d 00 04 lw ra,(sp+4) 8003d98: 2b 8b 00 08 lw r11,(sp+8) 8003d9c: 37 9c 00 08 addi sp,sp,8 8003da0: c3 a0 00 00 ret =============================================================================== 080091e0 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 80091e0: 37 9c ff f4 addi sp,sp,-12 80091e4: 5b 8b 00 0c sw (sp+12),r11 80091e8: 5b 8c 00 08 sw (sp+8),r12 80091ec: 5b 9d 00 04 sw (sp+4),ra Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 80091f0: 58 20 00 04 sw (r1+4),r0 Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 80091f4: b8 20 58 00 mv r11,r1 80091f8: b8 40 60 00 mv r12,r2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 80091fc: b8 20 30 00 mv r6,r1 Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 8009200: b8 60 38 00 mv r7,r3 8009204: b8 40 28 00 mv r5,r2 while ( count-- ) { 8009208: 5c 60 00 04 bne r3,r0,8009218 <_Chain_Initialize+0x38> <== ALWAYS TAKEN 800920c: e0 00 00 0c bi 800923c <_Chain_Initialize+0x5c> <== NOT EXECUTED 8009210: b8 a0 30 00 mv r6,r5 current->next = next; next->previous = current; current = next; next = (Chain_Node *) 8009214: b9 00 28 00 mv r5,r8 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 8009218: 58 c5 00 00 sw (r6+0),r5 next->previous = current; 800921c: 58 a6 00 04 sw (r5+4),r6 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 8009220: 34 e7 ff ff addi r7,r7,-1 8009224: b4 a4 40 00 add r8,r5,r4 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 8009228: 5c e0 ff fa bne r7,r0,8009210 <_Chain_Initialize+0x30> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 800922c: 34 61 ff ff addi r1,r3,-1 8009230: b8 80 10 00 mv r2,r4 8009234: f8 00 1f 59 calli 8010f98 <__mulsi3> count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 8009238: b5 81 30 00 add r6,r12,r1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800923c: 35 61 00 04 addi r1,r11,4 next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 8009240: 58 c1 00 00 sw (r6+0),r1 the_chain->last = current; 8009244: 59 66 00 08 sw (r11+8),r6 } 8009248: 2b 9d 00 04 lw ra,(sp+4) 800924c: 2b 8b 00 0c lw r11,(sp+12) 8009250: 2b 8c 00 08 lw r12,(sp+8) 8009254: 37 9c 00 0c addi sp,sp,12 8009258: c3 a0 00 00 ret =============================================================================== 0800d2c0 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 800d2c0: 37 9c ff f4 addi sp,sp,-12 800d2c4: 5b 8b 00 0c sw (sp+12),r11 800d2c8: 5b 8c 00 08 sw (sp+8),r12 800d2cc: 5b 9d 00 04 sw (sp+4),ra rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 800d2d0: 78 05 08 01 mvhi r5,0x801 800d2d4: 38 a5 8a 68 ori r5,r5,0x8a68 800d2d8: 28 ab 00 0c lw r11,(r5+12) executing->Wait.return_code = RTEMS_SUCCESSFUL; 800d2dc: 59 60 00 34 sw (r11+52),r0 api = executing->API_Extensions[ THREAD_API_RTEMS ]; 800d2e0: 29 67 01 24 lw r7,(r11+292) _ISR_Disable( level ); 800d2e4: 90 00 30 00 rcsr r6,IE 800d2e8: 34 05 ff fe mvi r5,-2 800d2ec: a0 c5 28 00 and r5,r6,r5 800d2f0: d0 05 00 00 wcsr IE,r5 pending_events = api->pending_events; 800d2f4: 28 e8 00 00 lw r8,(r7+0) RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 800d2f8: a0 28 28 00 and r5,r1,r8 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 800d2fc: 44 a0 00 04 be r5,r0,800d30c <_Event_Seize+0x4c> 800d300: 44 25 00 29 be r1,r5,800d3a4 <_Event_Seize+0xe4> */ RTEMS_INLINE_ROUTINE bool _Options_Is_any ( rtems_option option_set ) { return (option_set & RTEMS_EVENT_ANY) ? true : false; 800d304: 20 49 00 02 andi r9,r2,0x2 (seized_events == event_in || _Options_Is_any( option_set )) ) { 800d308: 5d 20 00 27 bne r9,r0,800d3a4 <_Event_Seize+0xe4> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 800d30c: 20 47 00 01 andi r7,r2,0x1 _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 800d310: 5c e0 00 1c bne r7,r0,800d380 <_Event_Seize+0xc0> */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 800d314: 78 0c 08 01 mvhi r12,0x801 800d318: 39 8c 8b 94 ori r12,r12,0x8b94 * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; 800d31c: 59 61 00 24 sw (r11+36),r1 executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 800d320: 34 01 00 01 mvi r1,1 * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 800d324: 59 62 00 30 sw (r11+48),r2 executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; 800d328: 59 64 00 28 sw (r11+40),r4 _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 800d32c: 59 81 00 00 sw (r12+0),r1 _ISR_Enable( level ); 800d330: d0 06 00 00 wcsr IE,r6 if ( ticks ) { 800d334: 5c 60 00 2c bne r3,r0,800d3e4 <_Event_Seize+0x124> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 800d338: b9 60 08 00 mv r1,r11 800d33c: 34 02 01 00 mvi r2,256 800d340: fb ff e8 1a calli 80073a8 <_Thread_Set_state> _ISR_Disable( level ); 800d344: 90 00 18 00 rcsr r3,IE 800d348: 34 01 ff fe mvi r1,-2 800d34c: a0 61 08 00 and r1,r3,r1 800d350: d0 01 00 00 wcsr IE,r1 sync_state = _Event_Sync_state; 800d354: 29 81 00 00 lw r1,(r12+0) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 800d358: 34 02 00 01 mvi r2,1 _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 800d35c: 59 80 00 00 sw (r12+0),r0 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 800d360: 44 22 00 1b be r1,r2,800d3cc <_Event_Seize+0x10c> <== ALWAYS TAKEN * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 800d364: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800d368: f8 00 05 8f calli 800e9a4 <_Thread_blocking_operation_Cancel><== NOT EXECUTED } 800d36c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800d370: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 800d374: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 800d378: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 800d37c: c3 a0 00 00 ret <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 800d380: d0 06 00 00 wcsr IE,r6 executing->Wait.return_code = RTEMS_UNSATISFIED; 800d384: 34 01 00 0d mvi r1,13 800d388: 59 61 00 34 sw (r11+52),r1 *event_out = seized_events; 800d38c: 58 85 00 00 sw (r4+0),r5 * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 800d390: 2b 9d 00 04 lw ra,(sp+4) 800d394: 2b 8b 00 0c lw r11,(sp+12) 800d398: 2b 8c 00 08 lw r12,(sp+8) 800d39c: 37 9c 00 0c addi sp,sp,12 800d3a0: c3 a0 00 00 ret RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 800d3a4: a4 a0 08 00 not r1,r5 800d3a8: a0 28 40 00 and r8,r1,r8 pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 800d3ac: 58 e8 00 00 sw (r7+0),r8 _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 800d3b0: d0 06 00 00 wcsr IE,r6 *event_out = seized_events; 800d3b4: 58 85 00 00 sw (r4+0),r5 * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 800d3b8: 2b 9d 00 04 lw ra,(sp+4) 800d3bc: 2b 8b 00 0c lw r11,(sp+12) 800d3c0: 2b 8c 00 08 lw r12,(sp+8) 800d3c4: 37 9c 00 0c addi sp,sp,12 800d3c8: c3 a0 00 00 ret _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 800d3cc: d0 03 00 00 wcsr IE,r3 * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 800d3d0: 2b 9d 00 04 lw ra,(sp+4) 800d3d4: 2b 8b 00 0c lw r11,(sp+12) 800d3d8: 2b 8c 00 08 lw r12,(sp+8) 800d3dc: 37 9c 00 0c addi sp,sp,12 800d3e0: c3 a0 00 00 ret _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 800d3e4: 29 62 00 08 lw r2,(r11+8) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 800d3e8: 78 01 08 00 mvhi r1,0x800 800d3ec: 38 21 d5 f0 ori r1,r1,0xd5f0 800d3f0: 59 61 00 64 sw (r11+100),r1 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 800d3f4: 78 01 08 01 mvhi r1,0x801 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 800d3f8: 59 62 00 68 sw (r11+104),r2 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 800d3fc: 59 60 00 50 sw (r11+80),r0 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 800d400: 59 60 00 6c sw (r11+108),r0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 800d404: 59 63 00 54 sw (r11+84),r3 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 800d408: 38 21 89 60 ori r1,r1,0x8960 800d40c: 35 62 00 48 addi r2,r11,72 800d410: fb ff e9 ec calli 8007bc0 <_Watchdog_Insert> 800d414: e3 ff ff c9 bi 800d338 <_Event_Seize+0x78> =============================================================================== 0800d48c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 800d48c: 37 9c ff f8 addi sp,sp,-8 800d490: 5b 8b 00 08 sw (sp+8),r11 800d494: 5b 9d 00 04 sw (sp+4),ra rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 800d498: 28 25 01 24 lw r5,(r1+292) option_set = (rtems_option) the_thread->Wait.option; 800d49c: 28 28 00 30 lw r8,(r1+48) */ void _Event_Surrender( Thread_Control *the_thread ) { 800d4a0: b8 20 58 00 mv r11,r1 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 800d4a4: 90 00 08 00 rcsr r1,IE 800d4a8: 34 07 ff fe mvi r7,-2 800d4ac: a0 27 38 00 and r7,r1,r7 800d4b0: d0 07 00 00 wcsr IE,r7 pending_events = api->pending_events; 800d4b4: 28 a6 00 00 lw r6,(r5+0) event_condition = (rtems_event_set) the_thread->Wait.count; 800d4b8: 29 64 00 24 lw r4,(r11+36) RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 800d4bc: a0 86 10 00 and r2,r4,r6 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 800d4c0: 44 40 00 27 be r2,r0,800d55c <_Event_Surrender+0xd0> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 800d4c4: 78 03 08 01 mvhi r3,0x801 800d4c8: 38 63 8a 68 ori r3,r3,0x8a68 800d4cc: 28 69 00 08 lw r9,(r3+8) 800d4d0: 45 20 00 03 be r9,r0,800d4dc <_Event_Surrender+0x50> 800d4d4: 28 63 00 0c lw r3,(r3+12) 800d4d8: 45 63 00 31 be r11,r3,800d59c <_Event_Surrender+0x110> <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); 800d4dc: 29 63 00 10 lw r3,(r11+16) 800d4e0: 20 63 01 00 andi r3,r3,0x100 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 800d4e4: 44 60 00 19 be r3,r0,800d548 <_Event_Surrender+0xbc> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 800d4e8: 44 82 00 03 be r4,r2,800d4f4 <_Event_Surrender+0x68> */ RTEMS_INLINE_ROUTINE bool _Options_Is_any ( rtems_option option_set ) { return (option_set & RTEMS_EVENT_ANY) ? true : false; 800d4ec: 21 08 00 02 andi r8,r8,0x2 800d4f0: 45 00 00 16 be r8,r0,800d548 <_Event_Surrender+0xbc> <== NEVER TAKEN RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 800d4f4: a4 40 18 00 not r3,r2 api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 800d4f8: 29 64 00 28 lw r4,(r11+40) 800d4fc: a0 66 30 00 and r6,r3,r6 /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 800d500: 58 a6 00 00 sw (r5+0),r6 the_thread->Wait.count = 0; 800d504: 59 60 00 24 sw (r11+36),r0 *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 800d508: 58 82 00 00 sw (r4+0),r2 _ISR_Flash( level ); 800d50c: d0 01 00 00 wcsr IE,r1 800d510: d0 07 00 00 wcsr IE,r7 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 800d514: 29 63 00 50 lw r3,(r11+80) 800d518: 34 02 00 02 mvi r2,2 800d51c: 44 62 00 15 be r3,r2,800d570 <_Event_Surrender+0xe4> _ISR_Enable( level ); 800d520: d0 01 00 00 wcsr IE,r1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 800d524: 78 01 08 01 mvhi r1,0x801 800d528: 38 21 77 b4 ori r1,r1,0x77b4 800d52c: 28 22 00 00 lw r2,(r1+0) 800d530: b9 60 08 00 mv r1,r11 800d534: f8 00 05 34 calli 800ea04 <_Thread_Clear_state> } return; } } _ISR_Enable( level ); } 800d538: 2b 9d 00 04 lw ra,(sp+4) 800d53c: 2b 8b 00 08 lw r11,(sp+8) 800d540: 37 9c 00 08 addi sp,sp,8 800d544: c3 a0 00 00 ret _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 800d548: d0 01 00 00 wcsr IE,r1 } 800d54c: 2b 9d 00 04 lw ra,(sp+4) 800d550: 2b 8b 00 08 lw r11,(sp+8) 800d554: 37 9c 00 08 addi sp,sp,8 800d558: c3 a0 00 00 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 800d55c: d0 01 00 00 wcsr IE,r1 } return; } } _ISR_Enable( level ); } 800d560: 2b 9d 00 04 lw ra,(sp+4) 800d564: 2b 8b 00 08 lw r11,(sp+8) 800d568: 37 9c 00 08 addi sp,sp,8 800d56c: c3 a0 00 00 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 800d570: 34 02 00 03 mvi r2,3 800d574: 59 62 00 50 sw (r11+80),r2 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 800d578: d0 01 00 00 wcsr IE,r1 (void) _Watchdog_Remove( &the_thread->Timer ); 800d57c: 35 61 00 48 addi r1,r11,72 800d580: fb ff e9 f9 calli 8007d64 <_Watchdog_Remove> 800d584: 78 03 08 01 mvhi r3,0x801 800d588: 38 63 77 b4 ori r3,r3,0x77b4 800d58c: 28 62 00 00 lw r2,(r3+0) 800d590: b9 60 08 00 mv r1,r11 800d594: f8 00 05 1c calli 800ea04 <_Thread_Clear_state> 800d598: e3 ff ff ed bi 800d54c <_Event_Surrender+0xc0> * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 800d59c: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 800d5a0: 38 63 8b 94 ori r3,r3,0x8b94 <== NOT EXECUTED 800d5a4: 28 6a 00 00 lw r10,(r3+0) <== NOT EXECUTED /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && 800d5a8: 34 09 00 02 mvi r9,2 <== NOT EXECUTED 800d5ac: 45 49 00 04 be r10,r9,800d5bc <_Event_Surrender+0x130> <== NOT EXECUTED ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 800d5b0: 28 6a 00 00 lw r10,(r3+0) <== NOT EXECUTED * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 800d5b4: 34 09 00 01 mvi r9,1 <== NOT EXECUTED 800d5b8: 5d 49 ff c9 bne r10,r9,800d4dc <_Event_Surrender+0x50> <== NOT EXECUTED (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 800d5bc: 44 82 00 03 be r4,r2,800d5c8 <_Event_Surrender+0x13c> <== NOT EXECUTED 800d5c0: 21 08 00 02 andi r8,r8,0x2 <== NOT EXECUTED 800d5c4: 45 00 00 09 be r8,r0,800d5e8 <_Event_Surrender+0x15c> <== NOT EXECUTED 800d5c8: a4 40 20 00 not r4,r2 <== NOT EXECUTED 800d5cc: a0 86 30 00 and r6,r4,r6 <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 800d5d0: 29 64 00 28 lw r4,(r11+40) <== NOT EXECUTED if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 800d5d4: 58 a6 00 00 sw (r5+0),r6 <== NOT EXECUTED the_thread->Wait.count = 0; 800d5d8: 59 60 00 24 sw (r11+36),r0 <== NOT EXECUTED *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 800d5dc: 58 82 00 00 sw (r4+0),r2 <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 800d5e0: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 800d5e4: 58 62 00 00 sw (r3+0),r2 <== NOT EXECUTED } _ISR_Enable( level ); 800d5e8: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED return; 800d5ec: e3 ff ff d8 bi 800d54c <_Event_Surrender+0xc0> <== NOT EXECUTED =============================================================================== 0800d5f0 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 800d5f0: 37 9c ff f8 addi sp,sp,-8 800d5f4: 5b 9d 00 04 sw (sp+4),ra Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 800d5f8: 37 82 00 08 addi r2,sp,8 800d5fc: fb ff e4 b4 calli 80068cc <_Thread_Get> switch ( location ) { 800d600: 2b 82 00 08 lw r2,(sp+8) 800d604: 44 40 00 04 be r2,r0,800d614 <_Event_Timeout+0x24> <== ALWAYS TAKEN case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800d608: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800d60c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800d610: c3 a0 00 00 ret <== NOT EXECUTED * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 800d614: 90 00 18 00 rcsr r3,IE 800d618: 34 02 ff fe mvi r2,-2 800d61c: a0 62 10 00 and r2,r3,r2 800d620: d0 02 00 00 wcsr IE,r2 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 800d624: 78 02 08 01 mvhi r2,0x801 800d628: 38 42 8a 68 ori r2,r2,0x8a68 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 800d62c: 28 42 00 0c lw r2,(r2+12) _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 800d630: 58 20 00 24 sw (r1+36),r0 if ( _Thread_Is_executing( the_thread ) ) { 800d634: 44 22 00 10 be r1,r2,800d674 <_Event_Timeout+0x84> <== NEVER TAKEN if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 800d638: 34 02 00 06 mvi r2,6 800d63c: 58 22 00 34 sw (r1+52),r2 _ISR_Enable( level ); 800d640: d0 03 00 00 wcsr IE,r3 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 800d644: 78 03 08 01 mvhi r3,0x801 800d648: 38 63 77 b4 ori r3,r3,0x77b4 800d64c: 28 62 00 00 lw r2,(r3+0) 800d650: f8 00 04 ed calli 800ea04 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 800d654: 78 01 08 01 mvhi r1,0x801 800d658: 38 21 88 9c ori r1,r1,0x889c 800d65c: 28 22 00 00 lw r2,(r1+0) 800d660: 34 42 ff ff addi r2,r2,-1 800d664: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800d668: 2b 9d 00 04 lw ra,(sp+4) 800d66c: 37 9c 00 08 addi sp,sp,8 800d670: c3 a0 00 00 ret } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 800d674: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 800d678: 38 42 8b 94 ori r2,r2,0x8b94 <== NOT EXECUTED 800d67c: 28 45 00 00 lw r5,(r2+0) <== NOT EXECUTED 800d680: 34 04 00 01 mvi r4,1 <== NOT EXECUTED 800d684: 5c a4 ff ed bne r5,r4,800d638 <_Event_Timeout+0x48> <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 800d688: 34 04 00 02 mvi r4,2 <== NOT EXECUTED 800d68c: 58 44 00 00 sw (r2+0),r4 <== NOT EXECUTED 800d690: e3 ff ff ea bi 800d638 <_Event_Timeout+0x48> <== NOT EXECUTED =============================================================================== 08009474 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 8009474: 37 9c ff bc addi sp,sp,-68 8009478: 5b 8b 00 44 sw (sp+68),r11 800947c: 5b 8c 00 40 sw (sp+64),r12 8009480: 5b 8d 00 3c sw (sp+60),r13 8009484: 5b 8e 00 38 sw (sp+56),r14 8009488: 5b 8f 00 34 sw (sp+52),r15 800948c: 5b 90 00 30 sw (sp+48),r16 8009490: 5b 91 00 2c sw (sp+44),r17 8009494: 5b 92 00 28 sw (sp+40),r18 8009498: 5b 93 00 24 sw (sp+36),r19 800949c: 5b 94 00 20 sw (sp+32),r20 80094a0: 5b 95 00 1c sw (sp+28),r21 80094a4: 5b 96 00 18 sw (sp+24),r22 80094a8: 5b 97 00 14 sw (sp+20),r23 80094ac: 5b 98 00 10 sw (sp+16),r24 80094b0: 5b 99 00 0c sw (sp+12),r25 80094b4: 5b 9b 00 08 sw (sp+8),fp 80094b8: 5b 9d 00 04 sw (sp+4),ra 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 80094bc: 34 54 00 04 addi r20,r2,4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 80094c0: b8 20 78 00 mv r15,r1 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 80094c4: 28 2c 00 08 lw r12,(r1+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; 80094c8: 28 37 00 10 lw r23,(r1+16) Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 80094cc: b8 40 70 00 mv r14,r2 80094d0: b8 60 80 00 mv r16,r3 80094d4: b8 80 90 00 mv r18,r4 uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { /* Integer overflow occured */ return NULL; 80094d8: 34 01 00 00 mvi r1,0 - 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 ) { 80094dc: 54 54 00 57 bgu r2,r20,8009638 <_Heap_Allocate_aligned_with_boundary+0x1c4> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 80094e0: 5c 80 00 69 bne r4,r0,8009684 <_Heap_Allocate_aligned_with_boundary+0x210> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 80094e4: 34 01 00 00 mvi r1,0 80094e8: 45 ec 00 54 be r15,r12,8009638 <_Heap_Allocate_aligned_with_boundary+0x1c4> 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; 80094ec: 34 18 00 04 mvi r24,4 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 80094f0: 34 11 00 00 mvi r17,0 - 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; 80094f4: 34 1b ff fe mvi fp,-2 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 80094f8: 36 f9 00 07 addi r25,r23,7 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; 80094fc: cb 0e c0 00 sub r24,r24,r14 /* * 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 ) { 8009500: 29 81 00 04 lw r1,(r12+4) while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 8009504: 36 31 00 01 addi r17,r17,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 ) { 8009508: 52 81 00 3c bgeu r20,r1,80095f8 <_Heap_Allocate_aligned_with_boundary+0x184> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 800950c: 35 8b 00 08 addi r11,r12,8 if ( alignment == 0 ) { 8009510: 46 00 00 39 be r16,r0,80095f4 <_Heap_Allocate_aligned_with_boundary+0x180> - 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; 8009514: a0 3b 68 00 and r13,r1,fp if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 8009518: 29 f5 00 14 lw r21,(r15+20) 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; 800951c: b5 8d 68 00 add r13,r12,r13 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; 8009520: b7 0d 58 00 add r11,r24,r13 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; 8009524: cb 35 18 00 sub r3,r25,r21 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 8009528: b9 60 08 00 mv r1,r11 800952c: ba 00 10 00 mv r2,r16 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 8009530: b4 6d 68 00 add r13,r3,r13 8009534: f8 00 1f 0e calli 801116c <__umodsi3> 8009538: c9 61 58 00 sub r11,r11,r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 800953c: 35 96 00 08 addi r22,r12,8 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 ) { 8009540: 51 ab 00 05 bgeu r13,r11,8009554 <_Heap_Allocate_aligned_with_boundary+0xe0> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 8009544: b9 a0 08 00 mv r1,r13 8009548: ba 00 10 00 mv r2,r16 800954c: f8 00 1f 08 calli 801116c <__umodsi3> 8009550: c9 a1 58 00 sub r11,r13,r1 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 8009554: 46 40 00 1c be r18,r0,80095c4 <_Heap_Allocate_aligned_with_boundary+0x150> /* 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; 8009558: b5 6e 68 00 add r13,r11,r14 800955c: b9 a0 08 00 mv r1,r13 8009560: ba 40 10 00 mv r2,r18 8009564: f8 00 1f 02 calli 801116c <__umodsi3> 8009568: c9 a1 28 00 sub r5,r13,r1 /* 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 ) { 800956c: f4 ab 08 00 cmpgu r1,r5,r11 8009570: f5 a5 68 00 cmpgu r13,r13,r5 8009574: a0 2d 68 00 and r13,r1,r13 8009578: 45 a0 00 13 be r13,r0,80095c4 <_Heap_Allocate_aligned_with_boundary+0x150> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 800957c: b6 ce 98 00 add r19,r22,r14 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 8009580: 56 65 00 1e bgu r19,r5,80095f8 <_Heap_Allocate_aligned_with_boundary+0x184> 8009584: e0 00 00 02 bi 800958c <_Heap_Allocate_aligned_with_boundary+0x118> 8009588: 56 65 00 1c bgu r19,r5,80095f8 <_Heap_Allocate_aligned_with_boundary+0x184><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 800958c: c8 ae 58 00 sub r11,r5,r14 8009590: ba 00 10 00 mv r2,r16 8009594: b9 60 08 00 mv r1,r11 8009598: f8 00 1e f5 calli 801116c <__umodsi3> 800959c: c9 61 58 00 sub r11,r11,r1 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 80095a0: b5 6e 68 00 add r13,r11,r14 80095a4: b9 a0 08 00 mv r1,r13 80095a8: ba 40 10 00 mv r2,r18 80095ac: f8 00 1e f0 calli 801116c <__umodsi3> 80095b0: c9 a1 28 00 sub r5,r13,r1 /* 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 ) { 80095b4: f5 a5 68 00 cmpgu r13,r13,r5 80095b8: f4 ab 08 00 cmpgu r1,r5,r11 80095bc: a1 a1 68 00 and r13,r13,r1 80095c0: 5d a0 ff f2 bne r13,r0,8009588 <_Heap_Allocate_aligned_with_boundary+0x114> 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 ) { 80095c4: 56 cb 00 0d bgu r22,r11,80095f8 <_Heap_Allocate_aligned_with_boundary+0x184> 80095c8: 34 01 ff f8 mvi r1,-8 80095cc: c8 2c 68 00 sub r13,r1,r12 80095d0: ba e0 10 00 mv r2,r23 80095d4: b9 60 08 00 mv r1,r11 80095d8: f8 00 1e e5 calli 801116c <__umodsi3> uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 80095dc: b5 ab 68 00 add r13,r13,r11 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; 80095e0: c9 a1 08 00 sub r1,r13,r1 if ( free_size >= min_block_size || free_size == 0 ) { 80095e4: 64 22 00 00 cmpei r2,r1,0 80095e8: f0 35 a8 00 cmpgeu r21,r1,r21 80095ec: b8 55 08 00 or r1,r2,r21 80095f0: 44 20 00 02 be r1,r0,80095f8 <_Heap_Allocate_aligned_with_boundary+0x184> boundary ); } } if ( alloc_begin != 0 ) { 80095f4: 5d 60 00 05 bne r11,r0,8009608 <_Heap_Allocate_aligned_with_boundary+0x194><== ALWAYS TAKEN break; } block = block->next; 80095f8: 29 8c 00 08 lw r12,(r12+8) if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 80095fc: 5d ec ff c1 bne r15,r12,8009500 <_Heap_Allocate_aligned_with_boundary+0x8c> 8009600: 34 01 00 00 mvi r1,0 8009604: e0 00 00 0a bi 800962c <_Heap_Allocate_aligned_with_boundary+0x1b8> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 8009608: 29 e3 00 4c lw r3,(r15+76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 800960c: b9 e0 08 00 mv r1,r15 8009610: b9 80 10 00 mv r2,r12 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 8009614: b4 71 18 00 add r3,r3,r17 8009618: 59 e3 00 4c sw (r15+76),r3 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 800961c: b9 c0 20 00 mv r4,r14 8009620: b9 60 18 00 mv r3,r11 8009624: fb ff eb 28 calli 80042c4 <_Heap_Block_allocate> 8009628: b9 60 08 00 mv r1,r11 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 800962c: 29 e2 00 44 lw r2,(r15+68) 8009630: 50 51 00 02 bgeu r2,r17,8009638 <_Heap_Allocate_aligned_with_boundary+0x1c4> stats->max_search = search_count; 8009634: 59 f1 00 44 sw (r15+68),r17 } return (void *) alloc_begin; } 8009638: 2b 9d 00 04 lw ra,(sp+4) 800963c: 2b 8b 00 44 lw r11,(sp+68) 8009640: 2b 8c 00 40 lw r12,(sp+64) 8009644: 2b 8d 00 3c lw r13,(sp+60) 8009648: 2b 8e 00 38 lw r14,(sp+56) 800964c: 2b 8f 00 34 lw r15,(sp+52) 8009650: 2b 90 00 30 lw r16,(sp+48) 8009654: 2b 91 00 2c lw r17,(sp+44) 8009658: 2b 92 00 28 lw r18,(sp+40) 800965c: 2b 93 00 24 lw r19,(sp+36) 8009660: 2b 94 00 20 lw r20,(sp+32) 8009664: 2b 95 00 1c lw r21,(sp+28) 8009668: 2b 96 00 18 lw r22,(sp+24) 800966c: 2b 97 00 14 lw r23,(sp+20) 8009670: 2b 98 00 10 lw r24,(sp+16) 8009674: 2b 99 00 0c lw r25,(sp+12) 8009678: 2b 9b 00 08 lw fp,(sp+8) 800967c: 37 9c 00 44 addi sp,sp,68 8009680: c3 a0 00 00 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 8009684: 54 44 ff ed bgu r2,r4,8009638 <_Heap_Allocate_aligned_with_boundary+0x1c4> return NULL; } if ( alignment == 0 ) { 8009688: 5c 60 ff 97 bne r3,r0,80094e4 <_Heap_Allocate_aligned_with_boundary+0x70> alignment = page_size; 800968c: ba e0 80 00 mv r16,r23 8009690: e3 ff ff 95 bi 80094e4 <_Heap_Allocate_aligned_with_boundary+0x70> =============================================================================== 08009998 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 8009998: 37 9c ff b8 addi sp,sp,-72 800999c: 5b 8b 00 40 sw (sp+64),r11 80099a0: 5b 8c 00 3c sw (sp+60),r12 80099a4: 5b 8d 00 38 sw (sp+56),r13 80099a8: 5b 8e 00 34 sw (sp+52),r14 80099ac: 5b 8f 00 30 sw (sp+48),r15 80099b0: 5b 90 00 2c sw (sp+44),r16 80099b4: 5b 91 00 28 sw (sp+40),r17 80099b8: 5b 92 00 24 sw (sp+36),r18 80099bc: 5b 93 00 20 sw (sp+32),r19 80099c0: 5b 94 00 1c sw (sp+28),r20 80099c4: 5b 95 00 18 sw (sp+24),r21 80099c8: 5b 96 00 14 sw (sp+20),r22 80099cc: 5b 97 00 10 sw (sp+16),r23 80099d0: 5b 98 00 0c sw (sp+12),r24 80099d4: 5b 99 00 08 sw (sp+8),r25 80099d8: 5b 9d 00 04 sw (sp+4),ra Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 80099dc: 5b 80 00 48 sw (sp+72),r0 Heap_Block *extend_last_block = NULL; 80099e0: 5b 80 00 44 sw (sp+68),r0 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; 80099e4: b4 43 70 00 add r14,r2,r3 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 80099e8: b8 40 68 00 mv r13,r2 80099ec: b8 20 58 00 mv r11,r1 80099f0: b8 80 b8 00 mv r23,r4 Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 80099f4: 28 30 00 20 lw r16,(r1+32) Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; 80099f8: 28 32 00 10 lw r18,(r1+16) uintptr_t const min_block_size = heap->min_block_size; 80099fc: 28 25 00 14 lw r5,(r1+20) uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 8009a00: 28 38 00 30 lw r24,(r1+48) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { return false; 8009a04: 34 0c 00 00 mvi r12,0 uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 8009a08: 54 4e 00 76 bgu r2,r14,8009be0 <_Heap_Extend+0x248> return false; } extend_area_ok = _Heap_Get_first_and_last_block( 8009a0c: b8 40 08 00 mv r1,r2 8009a10: b8 a0 20 00 mv r4,r5 8009a14: b8 60 10 00 mv r2,r3 8009a18: 37 85 00 48 addi r5,sp,72 8009a1c: ba 40 18 00 mv r3,r18 8009a20: 37 86 00 44 addi r6,sp,68 8009a24: fb ff ea 5c calli 8004394 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 8009a28: 44 20 00 6e be r1,r0,8009be0 <_Heap_Extend+0x248> 8009a2c: ba 00 60 00 mv r12,r16 8009a30: 34 16 00 00 mvi r22,0 8009a34: 34 19 00 00 mvi r25,0 8009a38: 34 11 00 00 mvi r17,0 8009a3c: 34 14 00 00 mvi r20,0 } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 8009a40: 34 15 ff fe mvi r21,-2 8009a44: e0 00 00 0d bi 8009a78 <_Heap_Extend+0xe0> return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 8009a48: 55 ee 00 7b bgu r15,r14,8009c34 <_Heap_Extend+0x29c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 8009a4c: b9 e0 08 00 mv r1,r15 8009a50: ba 40 10 00 mv r2,r18 8009a54: 35 f3 ff f8 addi r19,r15,-8 8009a58: f8 00 1f 10 calli 8011698 <__umodsi3> uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 8009a5c: ca 61 08 00 sub r1,r19,r1 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 8009a60: 45 af 00 15 be r13,r15,8009ab4 <_Heap_Extend+0x11c> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 8009a64: 55 af 00 72 bgu r13,r15,8009c2c <_Heap_Extend+0x294> } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 8009a68: 28 2c 00 04 lw r12,(r1+4) 8009a6c: a2 ac 60 00 and r12,r21,r12 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8009a70: b4 2c 60 00 add r12,r1,r12 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 8009a74: 46 0c 00 16 be r16,r12,8009acc <_Heap_Extend+0x134> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 8009a78: b9 80 08 00 mv r1,r12 8009a7c: 45 90 00 70 be r12,r16,8009c3c <_Heap_Extend+0x2a4> uintptr_t const sub_area_end = start_block->prev_size; 8009a80: 29 8f 00 00 lw r15,(r12+0) Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 8009a84: f5 c1 30 00 cmpgu r6,r14,r1 8009a88: f5 ed 28 00 cmpgu r5,r15,r13 (uintptr_t) start_block : heap->area_begin; uintptr_t const sub_area_end = start_block->prev_size; Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 8009a8c: a0 c5 28 00 and r5,r6,r5 8009a90: 5c a0 00 75 bne r5,r0,8009c64 <_Heap_Extend+0x2cc> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 8009a94: 5c 2e ff ed bne r1,r14,8009a48 <_Heap_Extend+0xb0> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 8009a98: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8009a9c: ba 40 10 00 mv r2,r18 <== NOT EXECUTED 8009aa0: 35 f3 ff f8 addi r19,r15,-8 <== NOT EXECUTED 8009aa4: f8 00 1e fd calli 8011698 <__umodsi3> <== NOT EXECUTED 8009aa8: b9 80 a0 00 mv r20,r12 <== NOT EXECUTED uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 8009aac: ca 61 08 00 sub r1,r19,r1 <== NOT EXECUTED merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 8009ab0: 5d af ff ed bne r13,r15,8009a64 <_Heap_Extend+0xcc> <== NOT EXECUTED start_block->prev_size = extend_area_end; 8009ab4: 59 8e 00 00 sw (r12+0),r14 } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 8009ab8: 28 2c 00 04 lw r12,(r1+4) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 8009abc: b8 20 88 00 mv r17,r1 - 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; 8009ac0: a2 ac 60 00 and r12,r21,r12 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8009ac4: b4 2c 60 00 add r12,r1,r12 } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 8009ac8: 5e 0c ff ec bne r16,r12,8009a78 <_Heap_Extend+0xe0> <== NEVER TAKEN if ( extend_area_begin < heap->area_begin ) { 8009acc: 29 61 00 18 lw r1,(r11+24) 8009ad0: 51 a1 00 61 bgeu r13,r1,8009c54 <_Heap_Extend+0x2bc> heap->area_begin = extend_area_begin; 8009ad4: 59 6d 00 18 sw (r11+24),r13 } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 8009ad8: 2b 81 00 44 lw r1,(sp+68) 8009adc: 2b 82 00 48 lw r2,(sp+72) extend_first_block_size | HEAP_PREV_BLOCK_USED; extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 8009ae0: 29 65 00 20 lw r5,(r11+32) heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 8009ae4: c8 22 18 00 sub r3,r1,r2 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 8009ae8: 38 64 00 01 ori r4,r3,0x1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 8009aec: 58 4e 00 00 sw (r2+0),r14 extend_first_block->size_and_flag = 8009af0: 58 44 00 04 sw (r2+4),r4 extend_first_block_size | HEAP_PREV_BLOCK_USED; extend_last_block->prev_size = extend_first_block_size; 8009af4: 58 23 00 00 sw (r1+0),r3 extend_last_block->size_and_flag = 0; 8009af8: 58 20 00 04 sw (r1+4),r0 if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 8009afc: 50 45 00 52 bgeu r2,r5,8009c44 <_Heap_Extend+0x2ac> heap->first_block = extend_first_block; 8009b00: 59 62 00 20 sw (r11+32),r2 } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 8009b04: 46 80 00 6a be r20,r0,8009cac <_Heap_Extend+0x314> <== ALWAYS TAKEN Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 8009b08: 29 6c 00 10 lw r12,(r11+16) <== NOT EXECUTED uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 8009b0c: 35 ad 00 08 addi r13,r13,8 <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 8009b10: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8009b14: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8009b18: f8 00 1e e0 calli 8011698 <__umodsi3> <== NOT EXECUTED if ( remainder != 0 ) { 8009b1c: 44 20 00 03 be r1,r0,8009b28 <_Heap_Extend+0x190> <== NOT EXECUTED return value - remainder + alignment; 8009b20: b5 ac 68 00 add r13,r13,r12 <== NOT EXECUTED 8009b24: c9 a1 68 00 sub r13,r13,r1 <== NOT EXECUTED uintptr_t const new_first_block_begin = 8009b28: 35 a2 ff f8 addi r2,r13,-8 <== NOT EXECUTED uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 8009b2c: 2a 83 00 00 lw r3,(r20+0) <== NOT EXECUTED uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 8009b30: ca 82 08 00 sub r1,r20,r2 <== NOT EXECUTED first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 8009b34: 38 21 00 01 ori r1,r1,0x1 <== NOT EXECUTED 8009b38: 58 41 00 04 sw (r2+4),r1 <== NOT EXECUTED uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 8009b3c: 59 a3 ff f8 sw (r13+-8),r3 <== NOT EXECUTED new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Free_block( heap, new_first_block ); 8009b40: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8009b44: fb ff ff 88 calli 8009964 <_Heap_Free_block> <== NOT EXECUTED link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 8009b48: 46 20 00 49 be r17,r0,8009c6c <_Heap_Extend+0x2d4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 8009b4c: 29 62 00 10 lw r2,(r11+16) ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, 8009b50: 35 ce ff f8 addi r14,r14,-8 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 8009b54: c9 d1 70 00 sub r14,r14,r17 8009b58: b9 c0 08 00 mv r1,r14 8009b5c: f8 00 1e cf calli 8011698 <__umodsi3> ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 8009b60: 2a 22 00 04 lw r2,(r17+4) 8009b64: c9 c1 70 00 sub r14,r14,r1 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = 8009b68: b5 d1 08 00 add r1,r14,r17 (last_block->size_and_flag - last_block_new_size) 8009b6c: c8 4e 10 00 sub r2,r2,r14 | HEAP_PREV_BLOCK_USED; 8009b70: 38 42 00 01 ori r2,r2,0x1 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = 8009b74: 58 22 00 04 sw (r1+4),r2 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 8009b78: 2a 23 00 04 lw r3,(r17+4) (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 8009b7c: b9 60 08 00 mv r1,r11 8009b80: ba 20 10 00 mv r2,r17 8009b84: 20 63 00 01 andi r3,r3,0x1 block->size_and_flag = size | flag; 8009b88: b9 c3 70 00 or r14,r14,r3 8009b8c: 5a 2e 00 04 sw (r17+4),r14 8009b90: fb ff ff 75 calli 8009964 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 8009b94: 66 31 00 00 cmpei r17,r17,0 8009b98: 66 94 00 00 cmpei r20,r20,0 8009b9c: a2 34 88 00 and r17,r17,r20 8009ba0: 5e 20 00 3f bne r17,r0,8009c9c <_Heap_Extend+0x304> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 8009ba4: 29 61 00 24 lw r1,(r11+36) * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 8009ba8: 29 63 00 20 lw r3,(r11+32) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 8009bac: 29 65 00 30 lw r5,(r11+48) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 8009bb0: 28 22 00 04 lw r2,(r1+4) /* Statistics */ stats->size += extended_size; 8009bb4: 29 64 00 2c lw r4,(r11+44) * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 8009bb8: c8 61 18 00 sub r3,r3,r1 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 8009bbc: 20 42 00 01 andi r2,r2,0x1 block->size_and_flag = size | flag; 8009bc0: b8 62 10 00 or r2,r3,r2 _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 8009bc4: c8 b8 c0 00 sub r24,r5,r24 8009bc8: 58 22 00 04 sw (r1+4),r2 /* Statistics */ stats->size += extended_size; 8009bcc: b4 98 08 00 add r1,r4,r24 8009bd0: 59 61 00 2c sw (r11+44),r1 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 8009bd4: 34 0c 00 01 mvi r12,1 extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) 8009bd8: 46 e0 00 02 be r23,r0,8009be0 <_Heap_Extend+0x248> <== NEVER TAKEN *extended_size_ptr = extended_size; 8009bdc: 5a f8 00 00 sw (r23+0),r24 return true; } 8009be0: b9 80 08 00 mv r1,r12 8009be4: 2b 9d 00 04 lw ra,(sp+4) 8009be8: 2b 8b 00 40 lw r11,(sp+64) 8009bec: 2b 8c 00 3c lw r12,(sp+60) 8009bf0: 2b 8d 00 38 lw r13,(sp+56) 8009bf4: 2b 8e 00 34 lw r14,(sp+52) 8009bf8: 2b 8f 00 30 lw r15,(sp+48) 8009bfc: 2b 90 00 2c lw r16,(sp+44) 8009c00: 2b 91 00 28 lw r17,(sp+40) 8009c04: 2b 92 00 24 lw r18,(sp+36) 8009c08: 2b 93 00 20 lw r19,(sp+32) 8009c0c: 2b 94 00 1c lw r20,(sp+28) 8009c10: 2b 95 00 18 lw r21,(sp+24) 8009c14: 2b 96 00 14 lw r22,(sp+20) 8009c18: 2b 97 00 10 lw r23,(sp+16) 8009c1c: 2b 98 00 0c lw r24,(sp+12) 8009c20: 2b 99 00 08 lw r25,(sp+8) 8009c24: 37 9c 00 48 addi sp,sp,72 8009c28: c3 a0 00 00 ret RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 8009c2c: b8 20 b0 00 mv r22,r1 8009c30: e3 ff ff 8e bi 8009a68 <_Heap_Extend+0xd0> return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 8009c34: b9 80 c8 00 mv r25,r12 8009c38: e3 ff ff 85 bi 8009a4c <_Heap_Extend+0xb4> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 8009c3c: 29 61 00 18 lw r1,(r11+24) 8009c40: e3 ff ff 90 bi 8009a80 <_Heap_Extend+0xe8> extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 8009c44: 29 62 00 24 lw r2,(r11+36) 8009c48: 50 41 ff af bgeu r2,r1,8009b04 <_Heap_Extend+0x16c> heap->last_block = extend_last_block; 8009c4c: 59 61 00 24 sw (r11+36),r1 8009c50: e3 ff ff ad bi 8009b04 <_Heap_Extend+0x16c> start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 8009c54: 29 61 00 1c lw r1,(r11+28) 8009c58: 50 2e ff a0 bgeu r1,r14,8009ad8 <_Heap_Extend+0x140> heap->area_end = extend_area_end; 8009c5c: 59 6e 00 1c sw (r11+28),r14 8009c60: e3 ff ff 9e bi 8009ad8 <_Heap_Extend+0x140> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 8009c64: 34 0c 00 00 mvi r12,0 8009c68: e3 ff ff de bi 8009be0 <_Heap_Extend+0x248> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 8009c6c: 46 d1 ff ca be r22,r17,8009b94 <_Heap_Extend+0x1fc> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 8009c70: 2a c3 00 04 lw r3,(r22+4) ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 8009c74: 2b 82 00 48 lw r2,(sp+72) } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( 8009c78: 2b 81 00 44 lw r1,(sp+68) 8009c7c: 20 63 00 01 andi r3,r3,0x1 ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 8009c80: c8 56 10 00 sub r2,r2,r22 block->size_and_flag = size | flag; 8009c84: b8 43 10 00 or r2,r2,r3 8009c88: 5a c2 00 04 sw (r22+4),r2 last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 8009c8c: 28 22 00 04 lw r2,(r1+4) 8009c90: 38 42 00 01 ori r2,r2,0x1 8009c94: 58 22 00 04 sw (r1+4),r2 8009c98: e3 ff ff bf bi 8009b94 <_Heap_Extend+0x1fc> extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { _Heap_Free_block( heap, extend_first_block ); 8009c9c: 2b 82 00 48 lw r2,(sp+72) 8009ca0: b9 60 08 00 mv r1,r11 8009ca4: fb ff ff 30 calli 8009964 <_Heap_Free_block> 8009ca8: e3 ff ff bf bi 8009ba4 <_Heap_Extend+0x20c> heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 8009cac: 47 34 ff a7 be r25,r20,8009b48 <_Heap_Extend+0x1b0> { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 8009cb0: cb 21 c8 00 sub r25,r25,r1 8009cb4: 3b 39 00 01 ori r25,r25,0x1 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = 8009cb8: 58 39 00 04 sw (r1+4),r25 8009cbc: e3 ff ff a3 bi 8009b48 <_Heap_Extend+0x1b0> =============================================================================== 08009694 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 8009694: 37 9c ff f4 addi sp,sp,-12 8009698: 5b 8b 00 0c sw (sp+12),r11 800969c: 5b 8c 00 08 sw (sp+8),r12 80096a0: 5b 9d 00 04 sw (sp+4),ra 80096a4: b8 40 18 00 mv r3,r2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 80096a8: 28 22 00 10 lw r2,(r1+16) 80096ac: b8 20 58 00 mv r11,r1 80096b0: b8 60 08 00 mv r1,r3 80096b4: 34 6c ff f8 addi r12,r3,-8 80096b8: f8 00 1e ad calli 801116c <__umodsi3> 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 80096bc: 29 64 00 20 lw r4,(r11+32) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 80096c0: c9 81 10 00 sub r2,r12,r1 uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 80096c4: 34 01 00 00 mvi r1,0 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; 80096c8: 54 82 00 43 bgu r4,r2,80097d4 <_Heap_Free+0x140> 80096cc: 29 65 00 24 lw r5,(r11+36) 80096d0: 54 45 00 41 bgu r2,r5,80097d4 <_Heap_Free+0x140> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 80096d4: 28 48 00 04 lw r8,(r2+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; 80096d8: 34 07 ff fe mvi r7,-2 80096dc: a1 07 30 00 and r6,r8,r7 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 80096e0: b4 46 18 00 add r3,r2,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; 80096e4: 54 83 00 3c bgu r4,r3,80097d4 <_Heap_Free+0x140> <== NEVER TAKEN 80096e8: 54 65 00 3b bgu r3,r5,80097d4 <_Heap_Free+0x140> <== NEVER TAKEN 80096ec: 28 69 00 04 lw r9,(r3+4) 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; 80096f0: 21 2a 00 01 andi r10,r9,0x1 if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 80096f4: 45 40 00 38 be r10,r0,80097d4 <_Heap_Free+0x140> <== NEVER TAKEN - 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; 80096f8: a1 27 48 00 and r9,r9,r7 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 )); 80096fc: 34 07 00 00 mvi r7,0 8009700: 44 a3 00 05 be r5,r3,8009714 <_Heap_Free+0x80> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 8009704: b4 69 08 00 add r1,r3,r9 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; 8009708: 28 27 00 04 lw r7,(r1+4) 800970c: 20 e7 00 01 andi r7,r7,0x1 #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 8009710: 18 e7 00 01 xori r7,r7,0x1 8009714: 21 08 00 01 andi r8,r8,0x1 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 ) ) { 8009718: 5d 00 00 19 bne r8,r0,800977c <_Heap_Free+0xe8> uintptr_t const prev_size = block->prev_size; 800971c: 28 4a 00 00 lw r10,(r2+0) Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { _HAssert( false ); return( false ); 8009720: 34 01 00 00 mvi r1,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8009724: c8 4a 10 00 sub r2,r2,r10 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; 8009728: 54 82 00 2b bgu r4,r2,80097d4 <_Heap_Free+0x140> <== NEVER TAKEN 800972c: b9 00 08 00 mv r1,r8 8009730: 54 45 00 29 bgu r2,r5,80097d4 <_Heap_Free+0x140> <== NEVER TAKEN 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; 8009734: 28 44 00 04 lw r4,(r2+4) 8009738: 20 84 00 01 andi r4,r4,0x1 } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 800973c: 44 80 00 26 be r4,r0,80097d4 <_Heap_Free+0x140> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 8009740: 44 e0 00 3d be r7,r0,8009834 <_Heap_Free+0x1a0> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 8009744: 29 64 00 38 lw r4,(r11+56) --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 8009748: 28 61 00 08 lw r1,(r3+8) 800974c: 28 63 00 0c lw r3,(r3+12) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 8009750: b4 c9 48 00 add r9,r6,r9 8009754: b5 2a 50 00 add r10,r9,r10 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 8009758: 58 61 00 08 sw (r3+8),r1 next->prev = prev; 800975c: 58 23 00 0c sw (r1+12),r3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 8009760: 34 81 ff ff addi r1,r4,-1 8009764: 59 61 00 38 sw (r11+56),r1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 8009768: 39 43 00 01 ori r3,r10,0x1 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 800976c: b4 4a 08 00 add r1,r2,r10 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; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 8009770: 58 43 00 04 sw (r2+4),r3 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 8009774: 58 2a 00 00 sw (r1+0),r10 8009778: e0 00 00 0d bi 80097ac <_Heap_Free+0x118> 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 */ 800977c: 44 e0 00 1b be r7,r0,80097e8 <_Heap_Free+0x154> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 8009780: 28 64 00 08 lw r4,(r3+8) 8009784: 28 61 00 0c lw r1,(r3+12) 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; 8009788: b5 26 48 00 add r9,r9,r6 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 800978c: 58 44 00 08 sw (r2+8),r4 new_block->prev = prev; 8009790: 58 41 00 0c sw (r2+12),r1 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 8009794: 39 25 00 01 ori r5,r9,0x1 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 8009798: b4 49 18 00 add r3,r2,r9 next->prev = new_block; 800979c: 58 82 00 0c sw (r4+12),r2 prev->next = new_block; 80097a0: 58 22 00 08 sw (r1+8),r2 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; 80097a4: 58 45 00 04 sw (r2+4),r5 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 80097a8: 58 69 00 00 sw (r3+0),r9 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 80097ac: 29 62 00 40 lw r2,(r11+64) ++stats->frees; 80097b0: 29 61 00 50 lw r1,(r11+80) stats->free_size += block_size; 80097b4: 29 63 00 30 lw r3,(r11+48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 80097b8: 34 42 ff ff addi r2,r2,-1 ++stats->frees; 80097bc: 34 21 00 01 addi r1,r1,1 stats->free_size += block_size; 80097c0: b4 66 30 00 add r6,r3,r6 } } /* Statistics */ --stats->used_blocks; ++stats->frees; 80097c4: 59 61 00 50 sw (r11+80),r1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 80097c8: 59 62 00 40 sw (r11+64),r2 ++stats->frees; stats->free_size += block_size; 80097cc: 59 66 00 30 sw (r11+48),r6 return( true ); 80097d0: 34 01 00 01 mvi r1,1 } 80097d4: 2b 9d 00 04 lw ra,(sp+4) 80097d8: 2b 8b 00 0c lw r11,(sp+12) 80097dc: 2b 8c 00 08 lw r12,(sp+8) 80097e0: 37 9c 00 0c addi sp,sp,12 80097e4: c3 a0 00 00 ret 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; 80097e8: 38 c1 00 01 ori r1,r6,0x1 80097ec: 58 41 00 04 sw (r2+4),r1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 80097f0: 28 67 00 04 lw r7,(r3+4) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 80097f4: 29 61 00 38 lw r1,(r11+56) RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 80097f8: 29 64 00 08 lw r4,(r11+8) } 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; 80097fc: 34 05 ff fe mvi r5,-2 new_block->next = next; new_block->prev = block_before; 8009800: 58 4b 00 0c sw (r2+12),r11 8009804: a0 e5 28 00 and r5,r7,r5 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { 8009808: 29 67 00 3c lw r7,(r11+60) block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 800980c: 34 21 00 01 addi r1,r1,1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 8009810: 58 44 00 08 sw (r2+8),r4 new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 8009814: 58 82 00 0c sw (r4+12),r2 } 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; 8009818: 58 65 00 04 sw (r3+4),r5 next_block->prev_size = block_size; 800981c: 58 66 00 00 sw (r3+0),r6 { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 8009820: 59 62 00 08 sw (r11+8),r2 /* Statistics */ ++stats->free_blocks; 8009824: 59 61 00 38 sw (r11+56),r1 if ( stats->max_free_blocks < stats->free_blocks ) { 8009828: 50 e1 ff e1 bgeu r7,r1,80097ac <_Heap_Free+0x118> stats->max_free_blocks = stats->free_blocks; 800982c: 59 61 00 3c sw (r11+60),r1 8009830: e3 ff ff df bi 80097ac <_Heap_Free+0x118> 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; 8009834: b4 ca 50 00 add r10,r6,r10 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 8009838: 39 41 00 01 ori r1,r10,0x1 800983c: 58 41 00 04 sw (r2+4),r1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 8009840: 28 62 00 04 lw r2,(r3+4) 8009844: 34 01 ff fe mvi r1,-2 next_block->prev_size = size; 8009848: 58 6a 00 00 sw (r3+0),r10 _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; 800984c: a0 41 08 00 and r1,r2,r1 8009850: 58 61 00 04 sw (r3+4),r1 8009854: e3 ff ff d6 bi 80097ac <_Heap_Free+0x118> =============================================================================== 0800faf4 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 800faf4: 37 9c ff fc addi sp,sp,-4 800faf8: 5b 8b 00 04 sw (sp+4),r11 Heap_Block *the_block = the_heap->first_block; 800fafc: 28 26 00 20 lw r6,(r1+32) Heap_Block *const end = the_heap->last_block; 800fb00: 28 29 00 24 lw r9,(r1+36) memset(the_info, 0, sizeof(*the_info)); 800fb04: 58 40 00 00 sw (r2+0),r0 800fb08: 58 40 00 04 sw (r2+4),r0 800fb0c: 58 40 00 08 sw (r2+8),r0 800fb10: 58 40 00 0c sw (r2+12),r0 800fb14: 58 40 00 10 sw (r2+16),r0 800fb18: 58 40 00 14 sw (r2+20),r0 while ( the_block != end ) { 800fb1c: 44 c9 00 15 be r6,r9,800fb70 <_Heap_Get_information+0x7c> <== NEVER TAKEN 800fb20: 28 c5 00 04 lw r5,(r6+4) 800fb24: 34 0a ff fe mvi r10,-2 800fb28: a0 aa 18 00 and r3,r5,r10 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 800fb2c: b4 c3 20 00 add r4,r6,r3 if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 800fb30: 28 85 00 04 lw r5,(r4+4) Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; 800fb34: b8 40 08 00 mv r1,r2 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 800fb38: b8 80 30 00 mv r6,r4 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; 800fb3c: 20 a7 00 01 andi r7,r5,0x1 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 800fb40: 44 e0 00 02 be r7,r0,800fb48 <_Heap_Get_information+0x54> info = &the_info->Used; 800fb44: 34 41 00 0c addi r1,r2,12 else info = &the_info->Free; info->number++; 800fb48: 28 28 00 00 lw r8,(r1+0) info->total += the_size; 800fb4c: 28 27 00 08 lw r7,(r1+8) if ( info->largest < the_size ) 800fb50: 28 2b 00 04 lw r11,(r1+4) if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; 800fb54: 35 08 00 01 addi r8,r8,1 info->total += the_size; 800fb58: b4 e3 38 00 add r7,r7,r3 if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; 800fb5c: 58 28 00 00 sw (r1+0),r8 info->total += the_size; 800fb60: 58 27 00 08 sw (r1+8),r7 if ( info->largest < the_size ) 800fb64: 51 63 00 02 bgeu r11,r3,800fb6c <_Heap_Get_information+0x78> info->largest = the_size; 800fb68: 58 23 00 04 sw (r1+4),r3 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 800fb6c: 5d 24 ff ef bne r9,r4,800fb28 <_Heap_Get_information+0x34> if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 800fb70: 2b 8b 00 04 lw r11,(sp+4) 800fb74: 37 9c 00 04 addi sp,sp,4 800fb78: c3 a0 00 00 ret =============================================================================== 08011bb8 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 8011bb8: 37 9c ff f0 addi sp,sp,-16 8011bbc: 5b 8b 00 10 sw (sp+16),r11 8011bc0: 5b 8c 00 0c sw (sp+12),r12 8011bc4: 5b 8d 00 08 sw (sp+8),r13 8011bc8: 5b 9d 00 04 sw (sp+4),ra 8011bcc: b8 40 60 00 mv r12,r2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 8011bd0: 28 22 00 10 lw r2,(r1+16) 8011bd4: b8 20 58 00 mv r11,r1 8011bd8: b9 80 08 00 mv r1,r12 8011bdc: b8 60 68 00 mv r13,r3 8011be0: fb ff fd 63 calli 801116c <__umodsi3> 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 8011be4: 29 62 00 20 lw r2,(r11+32) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 8011be8: 35 84 ff f8 addi r4,r12,-8 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 8011bec: c8 81 20 00 sub r4,r4,r1 Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 8011bf0: 34 01 00 00 mvi r1,0 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; 8011bf4: 54 44 00 10 bgu r2,r4,8011c34 <_Heap_Size_of_alloc_area+0x7c> 8011bf8: 29 65 00 24 lw r5,(r11+36) 8011bfc: 54 85 00 0e bgu r4,r5,8011c34 <_Heap_Size_of_alloc_area+0x7c><== NEVER TAKEN - 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; 8011c00: 28 86 00 04 lw r6,(r4+4) 8011c04: 34 03 ff fe mvi r3,-2 8011c08: a0 66 18 00 and r3,r3,r6 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8011c0c: b4 83 20 00 add r4,r4,r3 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; 8011c10: 54 44 00 09 bgu r2,r4,8011c34 <_Heap_Size_of_alloc_area+0x7c><== NEVER TAKEN 8011c14: 54 85 00 08 bgu r4,r5,8011c34 <_Heap_Size_of_alloc_area+0x7c><== NEVER TAKEN 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; 8011c18: 28 82 00 04 lw r2,(r4+4) 8011c1c: 20 42 00 01 andi r2,r2,0x1 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 ) 8011c20: 44 40 00 05 be r2,r0,8011c34 <_Heap_Size_of_alloc_area+0x7c><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 8011c24: c8 8c 20 00 sub r4,r4,r12 8011c28: 34 84 00 04 addi r4,r4,4 8011c2c: 59 a4 00 00 sw (r13+0),r4 return true; 8011c30: 34 01 00 01 mvi r1,1 } 8011c34: 2b 9d 00 04 lw ra,(sp+4) 8011c38: 2b 8b 00 10 lw r11,(sp+16) 8011c3c: 2b 8c 00 0c lw r12,(sp+12) 8011c40: 2b 8d 00 08 lw r13,(sp+8) 8011c44: 37 9c 00 10 addi sp,sp,16 8011c48: c3 a0 00 00 ret =============================================================================== 08004e98 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 8004e98: 37 9c ff 9c addi sp,sp,-100 8004e9c: 5b 8b 00 50 sw (sp+80),r11 8004ea0: 5b 8c 00 4c sw (sp+76),r12 8004ea4: 5b 8d 00 48 sw (sp+72),r13 8004ea8: 5b 8e 00 44 sw (sp+68),r14 8004eac: 5b 8f 00 40 sw (sp+64),r15 8004eb0: 5b 90 00 3c sw (sp+60),r16 8004eb4: 5b 91 00 38 sw (sp+56),r17 8004eb8: 5b 92 00 34 sw (sp+52),r18 8004ebc: 5b 93 00 30 sw (sp+48),r19 8004ec0: 5b 94 00 2c sw (sp+44),r20 8004ec4: 5b 95 00 28 sw (sp+40),r21 8004ec8: 5b 96 00 24 sw (sp+36),r22 8004ecc: 5b 97 00 20 sw (sp+32),r23 8004ed0: 5b 98 00 1c sw (sp+28),r24 8004ed4: 5b 99 00 18 sw (sp+24),r25 8004ed8: 5b 9b 00 14 sw (sp+20),fp 8004edc: 5b 9d 00 10 sw (sp+16),ra 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; 8004ee0: 78 0f 08 00 mvhi r15,0x800 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 8004ee4: 20 63 00 ff andi r3,r3,0xff 8004ee8: b8 20 68 00 mv r13,r1 8004eec: b8 40 98 00 mv r19,r2 uintptr_t const page_size = heap->page_size; 8004ef0: 28 35 00 10 lw r21,(r1+16) uintptr_t const min_block_size = heap->min_block_size; 8004ef4: 28 36 00 14 lw r22,(r1+20) Heap_Block *const first_block = heap->first_block; 8004ef8: 28 34 00 20 lw r20,(r1+32) Heap_Block *const last_block = heap->last_block; 8004efc: 28 37 00 24 lw r23,(r1+36) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8004f00: 39 ef 4d f0 ori r15,r15,0x4df0 8004f04: 44 60 00 03 be r3,r0,8004f10 <_Heap_Walk+0x78> 8004f08: 78 0f 08 00 mvhi r15,0x800 8004f0c: 39 ef 4e 14 ori r15,r15,0x4e14 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8004f10: 78 03 08 01 mvhi r3,0x801 8004f14: 38 63 59 e4 ori r3,r3,0x59e4 8004f18: 28 69 00 00 lw r9,(r3+0) 8004f1c: 34 07 00 03 mvi r7,3 return true; 8004f20: 34 03 00 01 mvi r3,1 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() ) ) { 8004f24: 45 27 00 15 be r9,r7,8004f78 <_Heap_Walk+0xe0> block = next_block; } while ( block != first_block ); return true; } 8004f28: b8 60 08 00 mv r1,r3 8004f2c: 2b 9d 00 10 lw ra,(sp+16) 8004f30: 2b 8b 00 50 lw r11,(sp+80) 8004f34: 2b 8c 00 4c lw r12,(sp+76) 8004f38: 2b 8d 00 48 lw r13,(sp+72) 8004f3c: 2b 8e 00 44 lw r14,(sp+68) 8004f40: 2b 8f 00 40 lw r15,(sp+64) 8004f44: 2b 90 00 3c lw r16,(sp+60) 8004f48: 2b 91 00 38 lw r17,(sp+56) 8004f4c: 2b 92 00 34 lw r18,(sp+52) 8004f50: 2b 93 00 30 lw r19,(sp+48) 8004f54: 2b 94 00 2c lw r20,(sp+44) 8004f58: 2b 95 00 28 lw r21,(sp+40) 8004f5c: 2b 96 00 24 lw r22,(sp+36) 8004f60: 2b 97 00 20 lw r23,(sp+32) 8004f64: 2b 98 00 1c lw r24,(sp+28) 8004f68: 2b 99 00 18 lw r25,(sp+24) 8004f6c: 2b 9b 00 14 lw fp,(sp+20) 8004f70: 37 9c 00 64 addi sp,sp,100 8004f74: c3 a0 00 00 ret 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)( 8004f78: 29 a2 00 08 lw r2,(r13+8) 8004f7c: 29 a1 00 0c lw r1,(r13+12) 8004f80: 29 a6 00 18 lw r6,(r13+24) 8004f84: 29 a7 00 1c lw r7,(r13+28) 8004f88: 78 03 08 01 mvhi r3,0x801 8004f8c: 5b 82 00 08 sw (sp+8),r2 8004f90: 5b 81 00 0c sw (sp+12),r1 8004f94: 5b 97 00 04 sw (sp+4),r23 8004f98: ba 60 08 00 mv r1,r19 8004f9c: 34 02 00 00 mvi r2,0 8004fa0: 38 63 34 08 ori r3,r3,0x3408 8004fa4: ba a0 20 00 mv r4,r21 8004fa8: ba c0 28 00 mv r5,r22 8004fac: ba 80 40 00 mv r8,r20 8004fb0: d9 e0 00 00 call r15 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 8004fb4: 46 a0 00 26 be r21,r0,800504c <_Heap_Walk+0x1b4> <== NEVER TAKEN ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 8004fb8: 22 ab 00 07 andi r11,r21,0x7 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 8004fbc: 5d 60 00 2b bne r11,r0,8005068 <_Heap_Walk+0x1d0> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 8004fc0: ba c0 08 00 mv r1,r22 8004fc4: ba a0 10 00 mv r2,r21 8004fc8: fb ff ee 8a calli 80009f0 <__umodsi3> 8004fcc: b8 20 60 00 mv r12,r1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 8004fd0: 5c 2b 00 2e bne r1,r11,8005088 <_Heap_Walk+0x1f0> <== NEVER TAKEN 8004fd4: 36 81 00 08 addi r1,r20,8 8004fd8: ba a0 10 00 mv r2,r21 8004fdc: fb ff ee 85 calli 80009f0 <__umodsi3> 8004fe0: b8 20 18 00 mv r3,r1 ); return false; } if ( 8004fe4: 5c 2c 00 31 bne r1,r12,80050a8 <_Heap_Walk+0x210> <== NEVER TAKEN block = next_block; } while ( block != first_block ); return true; } 8004fe8: 2a 8c 00 04 lw r12,(r20+4) 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; 8004fec: 21 81 00 01 andi r1,r12,0x1 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 8004ff0: 44 23 00 fe be r1,r3,80053e8 <_Heap_Walk+0x550> <== NEVER TAKEN - 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; 8004ff4: 2a e2 00 04 lw r2,(r23+4) 8004ff8: 34 01 ff fe mvi r1,-2 8004ffc: a0 22 08 00 and r1,r1,r2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8005000: b6 e1 08 00 add r1,r23,r1 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; 8005004: 28 22 00 04 lw r2,(r1+4) 8005008: 20 42 00 01 andi r2,r2,0x1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 800500c: 44 43 00 09 be r2,r3,8005030 <_Heap_Walk+0x198> ); return false; } if ( 8005010: 46 81 00 2e be r20,r1,80050c8 <_Heap_Walk+0x230> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 8005014: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 8005018: 38 63 35 70 ori r3,r3,0x3570 <== NOT EXECUTED 800501c: ba 60 08 00 mv r1,r19 <== NOT EXECUTED 8005020: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8005024: d9 e0 00 00 call r15 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 8005028: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 800502c: e3 ff ff bf bi 8004f28 <_Heap_Walk+0x90> <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 8005030: 78 03 08 01 mvhi r3,0x801 8005034: 38 63 35 58 ori r3,r3,0x3558 8005038: ba 60 08 00 mv r1,r19 800503c: 34 02 00 01 mvi r2,1 8005040: d9 e0 00 00 call r15 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 8005044: 34 03 00 00 mvi r3,0 8005048: e3 ff ff b8 bi 8004f28 <_Heap_Walk+0x90> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 800504c: 78 03 08 01 mvhi r3,0x801 8005050: 38 63 34 9c ori r3,r3,0x349c 8005054: ba 60 08 00 mv r1,r19 8005058: 34 02 00 01 mvi r2,1 800505c: d9 e0 00 00 call r15 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 8005060: 34 03 00 00 mvi r3,0 8005064: e3 ff ff b1 bi 8004f28 <_Heap_Walk+0x90> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 8005068: 78 03 08 01 mvhi r3,0x801 800506c: 38 63 34 b0 ori r3,r3,0x34b0 8005070: ba 60 08 00 mv r1,r19 8005074: 34 02 00 01 mvi r2,1 8005078: ba a0 20 00 mv r4,r21 800507c: d9 e0 00 00 call r15 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 8005080: 34 03 00 00 mvi r3,0 8005084: e3 ff ff a9 bi 8004f28 <_Heap_Walk+0x90> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 8005088: 78 03 08 01 mvhi r3,0x801 800508c: 38 63 34 d0 ori r3,r3,0x34d0 8005090: ba 60 08 00 mv r1,r19 8005094: 34 02 00 01 mvi r2,1 8005098: ba c0 20 00 mv r4,r22 800509c: d9 e0 00 00 call r15 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 80050a0: 34 03 00 00 mvi r3,0 80050a4: e3 ff ff a1 bi 8004f28 <_Heap_Walk+0x90> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 80050a8: 78 03 08 01 mvhi r3,0x801 80050ac: 38 63 34 f4 ori r3,r3,0x34f4 80050b0: ba 60 08 00 mv r1,r19 80050b4: 34 02 00 01 mvi r2,1 80050b8: ba 80 20 00 mv r4,r20 80050bc: d9 e0 00 00 call r15 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 80050c0: 34 03 00 00 mvi r3,0 80050c4: e3 ff ff 99 bi 8004f28 <_Heap_Walk+0x90> block = next_block; } while ( block != first_block ); return true; } 80050c8: 29 ab 00 08 lw r11,(r13+8) int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 80050cc: 29 b2 00 10 lw r18,(r13+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 ) { 80050d0: 45 ab 00 2f be r13,r11,800518c <_Heap_Walk+0x2f4> block = next_block; } while ( block != first_block ); return true; } 80050d4: 29 ae 00 20 lw r14,(r13+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; 80050d8: 55 cb 00 dd bgu r14,r11,800544c <_Heap_Walk+0x5b4> <== NEVER TAKEN 80050dc: 29 b8 00 24 lw r24,(r13+36) 80050e0: 55 78 00 db bgu r11,r24,800544c <_Heap_Walk+0x5b4> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 80050e4: 35 61 00 08 addi r1,r11,8 80050e8: ba 40 10 00 mv r2,r18 80050ec: fb ff ee 41 calli 80009f0 <__umodsi3> ); return false; } if ( 80050f0: 5c 20 00 df bne r1,r0,800546c <_Heap_Walk+0x5d4> <== NEVER TAKEN - 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; 80050f4: 29 63 00 04 lw r3,(r11+4) 80050f8: 34 02 ff fe mvi r2,-2 ); return false; } if ( _Heap_Is_used( free_block ) ) { 80050fc: b9 60 80 00 mv r16,r11 8005100: a0 43 10 00 and r2,r2,r3 block = next_block; } while ( block != first_block ); return true; } 8005104: b5 62 10 00 add r2,r11,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; 8005108: 28 42 00 04 lw r2,(r2+4) ); return false; } if ( _Heap_Is_used( free_block ) ) { 800510c: b9 a0 18 00 mv r3,r13 - 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; 8005110: 34 11 ff fe mvi r17,-2 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; 8005114: 20 42 00 01 andi r2,r2,0x1 8005118: 44 41 00 12 be r2,r1,8005160 <_Heap_Walk+0x2c8> <== ALWAYS TAKEN 800511c: e0 00 00 dc bi 800548c <_Heap_Walk+0x5f4> <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; 8005120: 29 6b 00 08 lw r11,(r11+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 ) { 8005124: 45 ab 00 1b be r13,r11,8005190 <_Heap_Walk+0x2f8> 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; 8005128: 55 cb 00 c9 bgu r14,r11,800544c <_Heap_Walk+0x5b4> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 800512c: 35 61 00 08 addi r1,r11,8 8005130: ba 40 10 00 mv r2,r18 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; 8005134: 55 78 00 c6 bgu r11,r24,800544c <_Heap_Walk+0x5b4> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 8005138: fb ff ee 2e calli 80009f0 <__umodsi3> ); return false; } if ( 800513c: 5c 20 00 cc bne r1,r0,800546c <_Heap_Walk+0x5d4> - 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; 8005140: 29 64 00 04 lw r4,(r11+4) ); return false; } if ( _Heap_Is_used( free_block ) ) { 8005144: ba 00 18 00 mv r3,r16 8005148: b9 60 80 00 mv r16,r11 800514c: a2 24 20 00 and r4,r17,r4 block = next_block; } while ( block != first_block ); return true; } 8005150: b4 8b 20 00 add r4,r4,r11 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; 8005154: 28 84 00 04 lw r4,(r4+4) 8005158: 20 84 00 01 andi r4,r4,0x1 ); return false; } if ( _Heap_Is_used( free_block ) ) { 800515c: 5c 81 00 cc bne r4,r1,800548c <_Heap_Walk+0x5f4> ); return false; } if ( free_block->prev != prev_block ) { 8005160: 29 67 00 0c lw r7,(r11+12) 8005164: 44 e3 ff ef be r7,r3,8005120 <_Heap_Walk+0x288> (*printer)( 8005168: 78 03 08 01 mvhi r3,0x801 800516c: 38 63 36 0c ori r3,r3,0x360c 8005170: ba 60 08 00 mv r1,r19 8005174: 34 02 00 01 mvi r2,1 8005178: b9 60 20 00 mv r4,r11 800517c: b8 e0 28 00 mv r5,r7 8005180: d9 e0 00 00 call r15 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 8005184: 34 03 00 00 mvi r3,0 8005188: e3 ff ff 68 bi 8004f28 <_Heap_Walk+0x90> 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 ) { 800518c: 29 ae 00 20 lw r14,(r13+32) 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)( 8005190: 78 01 08 01 mvhi r1,0x801 8005194: 5b 81 00 54 sw (sp+84),r1 8005198: 78 01 08 01 mvhi r1,0x801 800519c: 5b 81 00 58 sw (sp+88),r1 80051a0: 78 01 08 01 mvhi r1,0x801 80051a4: 5b 81 00 5c sw (sp+92),r1 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 80051a8: 78 01 08 01 mvhi r1,0x801 80051ac: 5b 81 00 60 sw (sp+96),r1 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 80051b0: 78 01 08 01 mvhi r1,0x801 80051b4: 5b 81 00 64 sw (sp+100),r1 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)( 80051b8: 2b 81 00 54 lw r1,(sp+84) "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 80051bc: 78 1b 08 01 mvhi fp,0x801 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( 80051c0: 78 19 08 01 mvhi r25,0x801 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)( 80051c4: 38 21 33 d0 ori r1,r1,0x33d0 80051c8: 5b 81 00 54 sw (sp+84),r1 80051cc: 2b 81 00 58 lw r1,(sp+88) " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 80051d0: 78 18 08 01 mvhi r24,0x801 ); return false; } if ( _Heap_Is_used( free_block ) ) { 80051d4: ba 80 88 00 mv r17,r20 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)( 80051d8: 38 21 33 ec ori r1,r1,0x33ec 80051dc: 5b 81 00 58 sw (sp+88),r1 80051e0: 2b 81 00 5c lw r1,(sp+92) "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 80051e4: 3b 7b 37 bc ori fp,fp,0x37bc if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( 80051e8: 3b 39 37 a4 ori r25,r25,0x37a4 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)( 80051ec: 38 21 37 00 ori r1,r1,0x3700 80051f0: 5b 81 00 5c sw (sp+92),r1 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 80051f4: 2b 81 00 60 lw r1,(sp+96) 80051f8: 3b 18 37 70 ori r24,r24,0x3770 80051fc: 38 21 33 fc ori r1,r1,0x33fc 8005200: 5b 81 00 60 sw (sp+96),r1 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 8005204: 2b 81 00 64 lw r1,(sp+100) 8005208: 38 21 33 e0 ori r1,r1,0x33e0 800520c: 5b 81 00 64 sw (sp+100),r1 - 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; 8005210: 34 01 ff fe mvi r1,-2 8005214: a1 81 90 00 and r18,r12,r1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8005218: b6 51 80 00 add r16,r18,r17 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; 800521c: 55 d0 00 7a bgu r14,r16,8005404 <_Heap_Walk+0x56c> <== NEVER TAKEN 8005220: 29 a4 00 24 lw r4,(r13+36) 8005224: 56 04 00 78 bgu r16,r4,8005404 <_Heap_Walk+0x56c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 8005228: ba 40 08 00 mv r1,r18 800522c: ba a0 10 00 mv r2,r21 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; 8005230: fe 37 58 00 cmpne r11,r17,r23 8005234: fb ff ed ef calli 80009f0 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 8005238: 44 20 00 02 be r1,r0,8005240 <_Heap_Walk+0x3a8> 800523c: 5d 60 00 15 bne r11,r0,8005290 <_Heap_Walk+0x3f8> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 8005240: 52 56 00 02 bgeu r18,r22,8005248 <_Heap_Walk+0x3b0> 8005244: 5d 60 00 1c bne r11,r0,80052b4 <_Heap_Walk+0x41c> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 8005248: 56 11 00 02 bgu r16,r17,8005250 <_Heap_Walk+0x3b8> 800524c: 5d 60 00 77 bne r11,r0,8005428 <_Heap_Walk+0x590> 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; 8005250: 2a 06 00 04 lw r6,(r16+4) 8005254: 21 8c 00 01 andi r12,r12,0x1 8005258: 20 c6 00 01 andi r6,r6,0x1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 800525c: 44 c0 00 28 be r6,r0,80052fc <_Heap_Walk+0x464> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 8005260: 45 80 00 1f be r12,r0,80052dc <_Heap_Walk+0x444> (*printer)( 8005264: ba 60 08 00 mv r1,r19 8005268: 34 02 00 00 mvi r2,0 800526c: bb 20 18 00 mv r3,r25 8005270: ba 20 20 00 mv r4,r17 8005274: ba 40 28 00 mv r5,r18 8005278: d9 e0 00 00 call r15 block->prev_size ); } block = next_block; } while ( block != first_block ); 800527c: 46 90 00 43 be r20,r16,8005388 <_Heap_Walk+0x4f0> 8005280: 2a 0c 00 04 lw r12,(r16+4) 8005284: 29 ae 00 20 lw r14,(r13+32) 8005288: ba 00 88 00 mv r17,r16 800528c: e3 ff ff e1 bi 8005210 <_Heap_Walk+0x378> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 8005290: 78 03 08 01 mvhi r3,0x801 8005294: 38 63 36 70 ori r3,r3,0x3670 8005298: ba 60 08 00 mv r1,r19 800529c: 34 02 00 01 mvi r2,1 80052a0: ba 20 20 00 mv r4,r17 80052a4: ba 40 28 00 mv r5,r18 80052a8: d9 e0 00 00 call r15 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 80052ac: 34 03 00 00 mvi r3,0 80052b0: e3 ff ff 1e bi 8004f28 <_Heap_Walk+0x90> } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 80052b4: 78 03 08 01 mvhi r3,0x801 80052b8: 38 63 36 a0 ori r3,r3,0x36a0 80052bc: ba 60 08 00 mv r1,r19 80052c0: 34 02 00 01 mvi r2,1 80052c4: ba 20 20 00 mv r4,r17 80052c8: ba 40 28 00 mv r5,r18 80052cc: ba c0 30 00 mv r6,r22 80052d0: d9 e0 00 00 call r15 block, block_size, min_block_size ); return false; 80052d4: 34 03 00 00 mvi r3,0 80052d8: e3 ff ff 14 bi 8004f28 <_Heap_Walk+0x90> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 80052dc: 2a 26 00 00 lw r6,(r17+0) 80052e0: ba 20 20 00 mv r4,r17 80052e4: ba 60 08 00 mv r1,r19 80052e8: 34 02 00 00 mvi r2,0 80052ec: bb 60 18 00 mv r3,fp 80052f0: ba 40 28 00 mv r5,r18 80052f4: d9 e0 00 00 call r15 80052f8: e3 ff ff e1 bi 800527c <_Heap_Walk+0x3e4> 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 ? 80052fc: 2a 26 00 0c lw r6,(r17+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)( 8005300: 29 a4 00 08 lw r4,(r13+8) block = next_block; } while ( block != first_block ); return true; } 8005304: 29 a5 00 0c lw r5,(r13+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)( 8005308: 2b 87 00 54 lw r7,(sp+84) 800530c: 44 86 00 03 be r4,r6,8005318 <_Heap_Walk+0x480> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 8005310: bb 00 38 00 mv r7,r24 8005314: 45 a6 00 29 be r13,r6,80053b8 <_Heap_Walk+0x520> block->next, block->next == last_free_block ? 8005318: 2a 28 00 08 lw r8,(r17+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)( 800531c: 2b 84 00 58 lw r4,(sp+88) 8005320: 44 a8 00 03 be r5,r8,800532c <_Heap_Walk+0x494> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 8005324: bb 00 20 00 mv r4,r24 8005328: 45 a8 00 26 be r13,r8,80053c0 <_Heap_Walk+0x528> 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)( 800532c: 2b 83 00 5c lw r3,(sp+92) 8005330: 5b 84 00 04 sw (sp+4),r4 8005334: ba 60 08 00 mv r1,r19 8005338: 34 02 00 00 mvi r2,0 800533c: ba 20 20 00 mv r4,r17 8005340: ba 40 28 00 mv r5,r18 8005344: d9 e0 00 00 call r15 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 8005348: 2a 06 00 00 lw r6,(r16+0) 800534c: 5e 46 00 11 bne r18,r6,8005390 <_Heap_Walk+0x4f8> ); return false; } if ( !prev_used ) { 8005350: 45 80 00 1e be r12,r0,80053c8 <_Heap_Walk+0x530> block = next_block; } while ( block != first_block ); return true; } 8005354: 29 a5 00 08 lw r5,(r13+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 ) { 8005358: 45 a5 00 04 be r13,r5,8005368 <_Heap_Walk+0x4d0> <== NEVER TAKEN if ( free_block == block ) { 800535c: 46 25 ff c8 be r17,r5,800527c <_Heap_Walk+0x3e4> return true; } free_block = free_block->next; 8005360: 28 a5 00 08 lw r5,(r5+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 ) { 8005364: 5d a5 ff fe bne r13,r5,800535c <_Heap_Walk+0x4c4> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 8005368: 78 03 08 01 mvhi r3,0x801 800536c: 38 63 37 e4 ori r3,r3,0x37e4 8005370: ba 60 08 00 mv r1,r19 8005374: 34 02 00 01 mvi r2,1 8005378: ba 20 20 00 mv r4,r17 800537c: d9 e0 00 00 call r15 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 8005380: 34 03 00 00 mvi r3,0 8005384: e3 ff fe e9 bi 8004f28 <_Heap_Walk+0x90> } block = next_block; } while ( block != first_block ); return true; 8005388: 34 03 00 01 mvi r3,1 800538c: e3 ff fe e7 bi 8004f28 <_Heap_Walk+0x90> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 8005390: 78 03 08 01 mvhi r3,0x801 8005394: 38 63 37 38 ori r3,r3,0x3738 8005398: ba 60 08 00 mv r1,r19 800539c: 34 02 00 01 mvi r2,1 80053a0: ba 20 20 00 mv r4,r17 80053a4: ba 40 28 00 mv r5,r18 80053a8: ba 00 38 00 mv r7,r16 80053ac: d9 e0 00 00 call r15 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 80053b0: 34 03 00 00 mvi r3,0 80053b4: e3 ff fe dd bi 8004f28 <_Heap_Walk+0x90> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 80053b8: 2b 87 00 64 lw r7,(sp+100) 80053bc: e3 ff ff d7 bi 8005318 <_Heap_Walk+0x480> block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 80053c0: 2b 84 00 60 lw r4,(sp+96) 80053c4: e3 ff ff da bi 800532c <_Heap_Walk+0x494> return false; } if ( !prev_used ) { (*printer)( 80053c8: 78 03 08 01 mvhi r3,0x801 80053cc: 38 63 37 74 ori r3,r3,0x3774 80053d0: ba 60 08 00 mv r1,r19 80053d4: 34 02 00 01 mvi r2,1 80053d8: ba 20 20 00 mv r4,r17 80053dc: d9 e0 00 00 call r15 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 80053e0: 34 03 00 00 mvi r3,0 80053e4: e3 ff fe d1 bi 8004f28 <_Heap_Walk+0x90> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 80053e8: 78 03 08 01 mvhi r3,0x801 80053ec: 38 63 35 28 ori r3,r3,0x3528 80053f0: ba 60 08 00 mv r1,r19 80053f4: 34 02 00 01 mvi r2,1 80053f8: d9 e0 00 00 call r15 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 80053fc: 34 03 00 00 mvi r3,0 8005400: e3 ff fe ca bi 8004f28 <_Heap_Walk+0x90> 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)( 8005404: 78 03 08 01 mvhi r3,0x801 8005408: 38 63 36 40 ori r3,r3,0x3640 800540c: ba 60 08 00 mv r1,r19 8005410: 34 02 00 01 mvi r2,1 8005414: ba 20 20 00 mv r4,r17 8005418: ba 00 28 00 mv r5,r16 800541c: d9 e0 00 00 call r15 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 8005420: 34 03 00 00 mvi r3,0 8005424: e3 ff fe c1 bi 8004f28 <_Heap_Walk+0x90> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 8005428: 78 03 08 01 mvhi r3,0x801 800542c: 38 63 36 cc ori r3,r3,0x36cc 8005430: ba 60 08 00 mv r1,r19 8005434: 34 02 00 01 mvi r2,1 8005438: ba 20 20 00 mv r4,r17 800543c: ba 00 28 00 mv r5,r16 8005440: d9 e0 00 00 call r15 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 8005444: 34 03 00 00 mvi r3,0 8005448: e3 ff fe b8 bi 8004f28 <_Heap_Walk+0x90> 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)( 800544c: 78 03 08 01 mvhi r3,0x801 8005450: 38 63 35 a0 ori r3,r3,0x35a0 8005454: ba 60 08 00 mv r1,r19 8005458: 34 02 00 01 mvi r2,1 800545c: b9 60 20 00 mv r4,r11 8005460: d9 e0 00 00 call r15 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 8005464: 34 03 00 00 mvi r3,0 8005468: e3 ff fe b0 bi 8004f28 <_Heap_Walk+0x90> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 800546c: 78 03 08 01 mvhi r3,0x801 8005470: 38 63 35 c0 ori r3,r3,0x35c0 8005474: ba 60 08 00 mv r1,r19 8005478: 34 02 00 01 mvi r2,1 800547c: b9 60 20 00 mv r4,r11 8005480: d9 e0 00 00 call r15 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 8005484: 34 03 00 00 mvi r3,0 8005488: e3 ff fe a8 bi 8004f28 <_Heap_Walk+0x90> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 800548c: 78 03 08 01 mvhi r3,0x801 8005490: 38 63 35 f0 ori r3,r3,0x35f0 8005494: ba 60 08 00 mv r1,r19 8005498: 34 02 00 01 mvi r2,1 800549c: b9 60 20 00 mv r4,r11 80054a0: d9 e0 00 00 call r15 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 80054a4: 34 03 00 00 mvi r3,0 80054a8: e3 ff fe a0 bi 8004f28 <_Heap_Walk+0x90> =============================================================================== 08003604 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 8003604: 37 9c ff f4 addi sp,sp,-12 8003608: 5b 8b 00 0c sw (sp+12),r11 800360c: 5b 8c 00 08 sw (sp+8),r12 8003610: 5b 9d 00 04 sw (sp+4),ra rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 8003614: 78 0c 08 01 mvhi r12,0x801 8003618: 39 8c 3a 4c ori r12,r12,0x3a4c 800361c: 29 81 00 00 lw r1,(r12+0) 8003620: 44 20 00 09 be r1,r0,8003644 <_IO_Initialize_all_drivers+0x40><== NEVER TAKEN 8003624: 34 0b 00 00 mvi r11,0 (void) rtems_io_initialize( major, 0, NULL ); 8003628: b9 60 08 00 mv r1,r11 800362c: 34 02 00 00 mvi r2,0 8003630: 34 03 00 00 mvi r3,0 8003634: f8 00 16 d2 calli 800917c void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 8003638: 29 81 00 00 lw r1,(r12+0) 800363c: 35 6b 00 01 addi r11,r11,1 8003640: 54 2b ff fa bgu r1,r11,8003628 <_IO_Initialize_all_drivers+0x24> (void) rtems_io_initialize( major, 0, NULL ); } 8003644: 2b 9d 00 04 lw ra,(sp+4) 8003648: 2b 8b 00 0c lw r11,(sp+12) 800364c: 2b 8c 00 08 lw r12,(sp+8) 8003650: 37 9c 00 0c addi sp,sp,12 8003654: c3 a0 00 00 ret =============================================================================== 080034e4 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 80034e4: 37 9c ff e8 addi sp,sp,-24 80034e8: 5b 8b 00 18 sw (sp+24),r11 80034ec: 5b 8c 00 14 sw (sp+20),r12 80034f0: 5b 8d 00 10 sw (sp+16),r13 80034f4: 5b 8e 00 0c sw (sp+12),r14 80034f8: 5b 8f 00 08 sw (sp+8),r15 80034fc: 5b 9d 00 04 sw (sp+4),ra uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 8003500: 78 01 08 01 mvhi r1,0x801 8003504: 38 21 30 c4 ori r1,r1,0x30c4 drivers_in_table = Configuration.number_of_device_drivers; 8003508: 28 2b 00 30 lw r11,(r1+48) number_of_drivers = Configuration.maximum_drivers; 800350c: 28 2e 00 2c lw r14,(r1+44) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 8003510: 28 2d 00 34 lw r13,(r1+52) /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 8003514: 51 6e 00 2e bgeu r11,r14,80035cc <_IO_Manager_initialization+0xe8> * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) 8003518: b5 ce 60 00 add r12,r14,r14 800351c: b5 8e 60 00 add r12,r12,r14 8003520: b5 8c 60 00 add r12,r12,r12 8003524: b5 8c 60 00 add r12,r12,r12 8003528: b5 8c 60 00 add r12,r12,r12 * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( 800352c: b9 80 08 00 mv r1,r12 8003530: f8 00 0e 2d calli 8006de4 <_Workspace_Allocate_or_fatal_error> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 8003534: 78 04 08 01 mvhi r4,0x801 /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 8003538: 78 0f 08 01 mvhi r15,0x801 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 800353c: 38 84 3a 4c ori r4,r4,0x3a4c /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 8003540: 39 ef 3a 50 ori r15,r15,0x3a50 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 8003544: 34 02 00 00 mvi r2,0 8003548: b9 80 18 00 mv r3,r12 _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 800354c: 58 8e 00 00 sw (r4+0),r14 /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 8003550: 59 e1 00 00 sw (r15+0),r1 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 8003554: f8 00 24 56 calli 800c6ac _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 8003558: 45 60 00 15 be r11,r0,80035ac <_IO_Manager_initialization+0xc8><== NEVER TAKEN 800355c: 29 e5 00 00 lw r5,(r15+0) 8003560: 34 03 00 00 mvi r3,0 8003564: 34 04 00 00 mvi r4,0 * registration. The driver table is now allocated in the * workspace. * */ void _IO_Manager_initialization(void) 8003568: b5 a3 08 00 add r1,r13,r3 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 800356c: 28 26 00 00 lw r6,(r1+0) * registration. The driver table is now allocated in the * workspace. * */ void _IO_Manager_initialization(void) 8003570: b4 a3 10 00 add r2,r5,r3 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 8003574: 34 84 00 01 addi r4,r4,1 _IO_Driver_address_table[index] = driver_table[index]; 8003578: 58 46 00 00 sw (r2+0),r6 800357c: 28 26 00 04 lw r6,(r1+4) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 8003580: 34 63 00 18 addi r3,r3,24 _IO_Driver_address_table[index] = driver_table[index]; 8003584: 58 46 00 04 sw (r2+4),r6 8003588: 28 26 00 08 lw r6,(r1+8) 800358c: 58 46 00 08 sw (r2+8),r6 8003590: 28 26 00 0c lw r6,(r1+12) 8003594: 58 46 00 0c sw (r2+12),r6 8003598: 28 26 00 10 lw r6,(r1+16) 800359c: 58 46 00 10 sw (r2+16),r6 80035a0: 28 21 00 14 lw r1,(r1+20) 80035a4: 58 41 00 14 sw (r2+20),r1 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 80035a8: 55 64 ff f0 bgu r11,r4,8003568 <_IO_Manager_initialization+0x84> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 80035ac: 2b 9d 00 04 lw ra,(sp+4) 80035b0: 2b 8b 00 18 lw r11,(sp+24) 80035b4: 2b 8c 00 14 lw r12,(sp+20) 80035b8: 2b 8d 00 10 lw r13,(sp+16) 80035bc: 2b 8e 00 0c lw r14,(sp+12) 80035c0: 2b 8f 00 08 lw r15,(sp+8) 80035c4: 37 9c 00 18 addi sp,sp,24 80035c8: c3 a0 00 00 ret * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 80035cc: 78 02 08 01 mvhi r2,0x801 _IO_Number_of_drivers = number_of_drivers; 80035d0: 78 01 08 01 mvhi r1,0x801 * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 80035d4: 38 42 3a 50 ori r2,r2,0x3a50 _IO_Number_of_drivers = number_of_drivers; 80035d8: 38 21 3a 4c ori r1,r1,0x3a4c * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 80035dc: 58 4d 00 00 sw (r2+0),r13 _IO_Number_of_drivers = number_of_drivers; 80035e0: 58 2b 00 00 sw (r1+0),r11 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 80035e4: 2b 9d 00 04 lw ra,(sp+4) 80035e8: 2b 8b 00 18 lw r11,(sp+24) 80035ec: 2b 8c 00 14 lw r12,(sp+20) 80035f0: 2b 8d 00 10 lw r13,(sp+16) 80035f4: 2b 8e 00 0c lw r14,(sp+12) 80035f8: 2b 8f 00 08 lw r15,(sp+8) 80035fc: 37 9c 00 18 addi sp,sp,24 8003600: c3 a0 00 00 ret =============================================================================== 080044f8 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 80044f8: 37 9c ff ec addi sp,sp,-20 80044fc: 5b 8b 00 14 sw (sp+20),r11 8004500: 5b 8c 00 10 sw (sp+16),r12 8004504: 5b 8d 00 0c sw (sp+12),r13 8004508: 5b 8e 00 08 sw (sp+8),r14 800450c: 5b 9d 00 04 sw (sp+4),ra 8004510: b8 20 58 00 mv r11,r1 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 8004514: 28 21 00 18 lw r1,(r1+24) return NULL; 8004518: 34 0c 00 00 mvi r12,0 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 800451c: 5c 20 00 09 bne r1,r0,8004540 <_Objects_Allocate+0x48> <== ALWAYS TAKEN ); } #endif return the_object; } 8004520: b9 80 08 00 mv r1,r12 8004524: 2b 9d 00 04 lw ra,(sp+4) 8004528: 2b 8b 00 14 lw r11,(sp+20) 800452c: 2b 8c 00 10 lw r12,(sp+16) 8004530: 2b 8d 00 0c lw r13,(sp+12) 8004534: 2b 8e 00 08 lw r14,(sp+8) 8004538: 37 9c 00 14 addi sp,sp,20 800453c: c3 a0 00 00 ret /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 8004540: 35 6d 00 20 addi r13,r11,32 8004544: b9 a0 08 00 mv r1,r13 8004548: fb ff fc fb calli 8003934 <_Chain_Get> 800454c: b8 20 60 00 mv r12,r1 if ( information->auto_extend ) { 8004550: 41 61 00 12 lbu r1,(r11+18) /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 8004554: b9 80 70 00 mv r14,r12 if ( information->auto_extend ) { 8004558: 44 20 ff f2 be r1,r0,8004520 <_Objects_Allocate+0x28> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 800455c: 45 80 00 18 be r12,r0,80045bc <_Objects_Allocate+0xc4> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 8004560: 2d 83 00 0a lhu r3,(r12+10) 8004564: 2d 61 00 0a lhu r1,(r11+10) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 8004568: 2d 62 00 14 lhu r2,(r11+20) 800456c: c8 61 08 00 sub r1,r3,r1 8004570: f8 00 32 ef calli 801112c <__udivsi3> information->inactive_per_block[ block ]--; 8004574: 29 62 00 30 lw r2,(r11+48) 8004578: b4 21 08 00 add r1,r1,r1 800457c: b4 21 08 00 add r1,r1,r1 8004580: b4 41 08 00 add r1,r2,r1 8004584: 28 22 00 00 lw r2,(r1+0) information->inactive--; 8004588: 2d 63 00 2c lhu r3,(r11+44) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 800458c: 34 42 ff ff addi r2,r2,-1 8004590: 58 22 00 00 sw (r1+0),r2 information->inactive--; 8004594: 34 61 ff ff addi r1,r3,-1 8004598: 0d 61 00 2c sh (r11+44),r1 ); } #endif return the_object; } 800459c: b9 80 08 00 mv r1,r12 80045a0: 2b 9d 00 04 lw ra,(sp+4) 80045a4: 2b 8b 00 14 lw r11,(sp+20) 80045a8: 2b 8c 00 10 lw r12,(sp+16) 80045ac: 2b 8d 00 0c lw r13,(sp+12) 80045b0: 2b 8e 00 08 lw r14,(sp+8) 80045b4: 37 9c 00 14 addi sp,sp,20 80045b8: c3 a0 00 00 ret * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 80045bc: b9 60 08 00 mv r1,r11 80045c0: f8 00 00 06 calli 80045d8 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 80045c4: b9 a0 08 00 mv r1,r13 80045c8: fb ff fc db calli 8003934 <_Chain_Get> 80045cc: b8 20 60 00 mv r12,r1 } if ( the_object ) { 80045d0: 44 2e ff d4 be r1,r14,8004520 <_Objects_Allocate+0x28> 80045d4: e3 ff ff e3 bi 8004560 <_Objects_Allocate+0x68> =============================================================================== 080045d8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 80045d8: 37 9c ff c8 addi sp,sp,-56 80045dc: 5b 8b 00 2c sw (sp+44),r11 80045e0: 5b 8c 00 28 sw (sp+40),r12 80045e4: 5b 8d 00 24 sw (sp+36),r13 80045e8: 5b 8e 00 20 sw (sp+32),r14 80045ec: 5b 8f 00 1c sw (sp+28),r15 80045f0: 5b 90 00 18 sw (sp+24),r16 80045f4: 5b 91 00 14 sw (sp+20),r17 80045f8: 5b 92 00 10 sw (sp+16),r18 80045fc: 5b 93 00 0c sw (sp+12),r19 8004600: 5b 94 00 08 sw (sp+8),r20 8004604: 5b 9d 00 04 sw (sp+4),ra minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 8004608: 28 2c 00 34 lw r12,(r1+52) */ void _Objects_Extend_information( Objects_Information *information ) { 800460c: b8 20 58 00 mv r11,r1 /* * 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 ); 8004610: 2c 30 00 0a lhu r16,(r1+10) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 8004614: 45 80 00 aa be r12,r0,80048bc <_Objects_Extend_information+0x2e4> block_count = 0; else { block_count = information->maximum / information->allocation_size; 8004618: 2c 2f 00 14 lhu r15,(r1+20) 800461c: 2c 31 00 10 lhu r17,(r1+16) 8004620: b9 e0 10 00 mv r2,r15 8004624: ba 20 08 00 mv r1,r17 8004628: f8 00 32 c1 calli 801112c <__udivsi3> 800462c: 20 2e ff ff andi r14,r1,0xffff for ( ; block < block_count; block++ ) { 8004630: 45 c0 00 a9 be r14,r0,80048d4 <_Objects_Extend_information+0x2fc><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { 8004634: 29 81 00 00 lw r1,(r12+0) 8004638: 44 20 00 ac be r1,r0,80048e8 <_Objects_Extend_information+0x310><== NEVER TAKEN 800463c: b9 80 18 00 mv r3,r12 8004640: b9 e0 08 00 mv r1,r15 /* * 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 ); 8004644: ba 00 68 00 mv r13,r16 index_base = minimum_index; block = 0; 8004648: 34 0c 00 00 mvi r12,0 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 800464c: 35 8c 00 01 addi r12,r12,1 if ( information->object_blocks[ block ] == NULL ) { do_extend = false; break; } else index_base += information->allocation_size; 8004650: b5 af 68 00 add r13,r13,r15 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 8004654: 55 cc 00 81 bgu r14,r12,8004858 <_Objects_Extend_information+0x280> /* * 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; 8004658: 34 12 00 01 mvi r18,1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 800465c: b6 21 88 00 add r17,r17,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 ) { 8004660: 38 02 ff ff mvu r2,0xffff 8004664: 56 22 00 70 bgu r17,r2,8004824 <_Objects_Extend_information+0x24c> /* * 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; 8004668: 29 62 00 18 lw r2,(r11+24) 800466c: f8 00 32 4b calli 8010f98 <__mulsi3> if ( information->auto_extend ) { 8004670: 41 62 00 12 lbu r2,(r11+18) 8004674: 44 40 00 7e be r2,r0,800486c <_Objects_Extend_information+0x294> new_object_block = _Workspace_Allocate( block_size ); 8004678: f8 00 09 c7 calli 8006d94 <_Workspace_Allocate> 800467c: b8 20 78 00 mv r15,r1 if ( !new_object_block ) 8004680: 44 20 00 69 be r1,r0,8004824 <_Objects_Extend_information+0x24c> } /* * Do we need to grow the tables? */ if ( do_extend ) { 8004684: 46 40 00 41 be r18,r0,8004788 <_Objects_Extend_information+0x1b0> */ /* * Up the block count and maximum */ block_count++; 8004688: 35 c1 00 01 addi r1,r14,1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 800468c: b4 21 98 00 add r19,r1,r1 8004690: b6 61 08 00 add r1,r19,r1 ((maximum + minimum_index) * sizeof(Objects_Control *)); 8004694: b6 21 08 00 add r1,r17,r1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 8004698: b4 30 08 00 add r1,r1,r16 block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 800469c: b4 21 08 00 add r1,r1,r1 80046a0: b4 21 08 00 add r1,r1,r1 (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 80046a4: f8 00 09 bc calli 8006d94 <_Workspace_Allocate> 80046a8: b8 20 90 00 mv r18,r1 if ( !object_blocks ) { 80046ac: 44 20 00 94 be r1,r0,80048fc <_Objects_Extend_information+0x324> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 80046b0: 2d 62 00 10 lhu r2,(r11+16) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 80046b4: b6 73 a0 00 add r20,r19,r19 80046b8: b4 34 98 00 add r19,r1,r20 80046bc: b6 74 a0 00 add r20,r19,r20 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 80046c0: 54 50 00 6e bgu r2,r16,8004878 <_Objects_Extend_information+0x2a0> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 80046c4: ba 80 20 00 mv r4,r20 80046c8: 34 03 00 00 mvi r3,0 80046cc: 46 00 00 05 be r16,r0,80046e0 <_Objects_Extend_information+0x108><== NEVER TAKEN local_table[ index ] = NULL; 80046d0: 58 80 00 00 sw (r4+0),r0 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 80046d4: 34 63 00 01 addi r3,r3,1 80046d8: 34 84 00 04 addi r4,r4,4 80046dc: 56 03 ff fd bgu r16,r3,80046d0 <_Objects_Extend_information+0xf8><== NEVER TAKEN 80046e0: b5 ce 70 00 add r14,r14,r14 80046e4: b5 ce 70 00 add r14,r14,r14 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 80046e8: 2d 65 00 14 lhu r5,(r11+20) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 80046ec: b6 4e 08 00 add r1,r18,r14 80046f0: 58 20 00 00 sw (r1+0),r0 inactive_per_block[block_count] = 0; 80046f4: b6 6e 70 00 add r14,r19,r14 80046f8: 59 c0 00 00 sw (r14+0),r0 for ( index=index_base ; index < ( information->allocation_size + index_base ); 80046fc: b5 a5 28 00 add r5,r13,r5 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 8004700: 51 a5 00 09 bgeu r13,r5,8004724 <_Objects_Extend_information+0x14c><== NEVER TAKEN * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 8004704: b5 ad 20 00 add r4,r13,r13 8004708: b4 84 20 00 add r4,r4,r4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 800470c: b6 84 20 00 add r4,r20,r4 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 8004710: b9 a0 18 00 mv r3,r13 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 8004714: 58 80 00 00 sw (r4+0),r0 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 8004718: 34 63 00 01 addi r3,r3,1 800471c: 34 84 00 04 addi r4,r4,4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 8004720: 54 a3 ff fd bgu r5,r3,8004714 <_Objects_Extend_information+0x13c> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 8004724: 90 00 70 00 rcsr r14,IE 8004728: 34 01 ff fe mvi r1,-2 800472c: a1 c1 08 00 and r1,r14,r1 8004730: d0 01 00 00 wcsr IE,r1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 8004734: 29 61 00 00 lw r1,(r11+0) 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; 8004738: 22 31 ff ff andi r17,r17,0xffff 800473c: 0d 71 00 10 sh (r11+16),r17 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 8004740: 29 70 00 34 lw r16,(r11+52) information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 8004744: 59 73 00 30 sw (r11+48),r19 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 8004748: 59 72 00 34 sw (r11+52),r18 information->inactive_per_block = inactive_per_block; information->local_table = local_table; 800474c: 59 74 00 1c sw (r11+28),r20 8004750: 34 02 00 18 mvi r2,24 8004754: f8 00 31 9c calli 8010dc4 <__ashlsi3> 8004758: 78 12 00 01 mvhi r18,0x1 800475c: b8 32 90 00 or r18,r1,r18 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 8004760: 2d 61 00 04 lhu r1,(r11+4) 8004764: 34 02 00 1b mvi r2,27 8004768: f8 00 31 97 calli 8010dc4 <__ashlsi3> 800476c: ba 41 08 00 or r1,r18,r1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 8004770: b8 31 88 00 or r17,r1,r17 information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 8004774: 59 71 00 0c sw (r11+12),r17 information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 8004778: d0 0e 00 00 wcsr IE,r14 if ( old_tables ) 800477c: 46 00 00 03 be r16,r0,8004788 <_Objects_Extend_information+0x1b0> _Workspace_Free( old_tables ); 8004780: ba 00 08 00 mv r1,r16 8004784: f8 00 09 8f calli 8006dc0 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 8004788: 29 61 00 34 lw r1,(r11+52) 800478c: b5 8c 60 00 add r12,r12,r12 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 8004790: 2d 63 00 14 lhu r3,(r11+20) 8004794: 29 64 00 18 lw r4,(r11+24) } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 8004798: b5 8c 60 00 add r12,r12,r12 800479c: b4 2c 08 00 add r1,r1,r12 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 80047a0: 37 90 00 30 addi r16,sp,48 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 80047a4: 58 2f 00 00 sw (r1+0),r15 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 80047a8: b9 e0 10 00 mv r2,r15 80047ac: ba 00 08 00 mv r1,r16 80047b0: f8 00 12 8c calli 80091e0 <_Chain_Initialize> 80047b4: 78 12 00 01 mvhi r18,0x1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 80047b8: 35 71 00 20 addi r17,r11,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 ) { 80047bc: e0 00 00 0e bi 80047f4 <_Objects_Extend_information+0x21c> 80047c0: 29 61 00 00 lw r1,(r11+0) 80047c4: f8 00 31 80 calli 8010dc4 <__ashlsi3> 80047c8: b8 32 78 00 or r15,r1,r18 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 80047cc: 2d 61 00 04 lhu r1,(r11+4) 80047d0: 34 02 00 1b mvi r2,27 80047d4: f8 00 31 7c calli 8010dc4 <__ashlsi3> 80047d8: b9 e1 10 00 or r2,r15,r1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 80047dc: b8 4d 10 00 or r2,r2,r13 the_object->id = _Objects_Build_id( 80047e0: 59 c2 00 08 sw (r14+8),r2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 80047e4: ba 20 08 00 mv r1,r17 80047e8: b9 c0 10 00 mv r2,r14 80047ec: fb ff fc 3c calli 80038dc <_Chain_Append> index++; 80047f0: 35 ad 00 01 addi r13,r13,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 ) { 80047f4: ba 00 08 00 mv r1,r16 80047f8: fb ff fc 4f calli 8003934 <_Chain_Get> 80047fc: b8 20 70 00 mv r14,r1 8004800: 34 02 00 18 mvi r2,24 8004804: 5c 20 ff ef bne r1,r0,80047c0 <_Objects_Extend_information+0x1e8> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 8004808: 29 63 00 30 lw r3,(r11+48) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 800480c: 2d 62 00 2c lhu r2,(r11+44) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 8004810: 2d 61 00 14 lhu r1,(r11+20) 8004814: b4 6c 60 00 add r12,r3,r12 8004818: 59 81 00 00 sw (r12+0),r1 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 800481c: b4 22 08 00 add r1,r1,r2 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 8004820: 0d 61 00 2c sh (r11+44),r1 (Objects_Maximum)(information->inactive + information->allocation_size); } 8004824: 2b 9d 00 04 lw ra,(sp+4) 8004828: 2b 8b 00 2c lw r11,(sp+44) 800482c: 2b 8c 00 28 lw r12,(sp+40) 8004830: 2b 8d 00 24 lw r13,(sp+36) 8004834: 2b 8e 00 20 lw r14,(sp+32) 8004838: 2b 8f 00 1c lw r15,(sp+28) 800483c: 2b 90 00 18 lw r16,(sp+24) 8004840: 2b 91 00 14 lw r17,(sp+20) 8004844: 2b 92 00 10 lw r18,(sp+16) 8004848: 2b 93 00 0c lw r19,(sp+12) 800484c: 2b 94 00 08 lw r20,(sp+8) 8004850: 37 9c 00 38 addi sp,sp,56 8004854: c3 a0 00 00 ret block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 8004858: 28 62 00 04 lw r2,(r3+4) 800485c: 34 63 00 04 addi r3,r3,4 8004860: 5c 40 ff 7b bne r2,r0,800464c <_Objects_Extend_information+0x74> do_extend = false; 8004864: 34 12 00 00 mvi r18,0 8004868: e3 ff ff 7d bi 800465c <_Objects_Extend_information+0x84> if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 800486c: f8 00 09 5e calli 8006de4 <_Workspace_Allocate_or_fatal_error> 8004870: b8 20 78 00 mv r15,r1 8004874: e3 ff ff 84 bi 8004684 <_Objects_Extend_information+0xac> /* * 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, 8004878: 29 62 00 34 lw r2,(r11+52) information->object_blocks, block_count * sizeof(void*) ); 800487c: b5 ce 70 00 add r14,r14,r14 8004880: b5 ce 70 00 add r14,r14,r14 /* * 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, 8004884: b9 c0 18 00 mv r3,r14 8004888: f8 00 1f 3d calli 800c57c information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 800488c: 29 62 00 30 lw r2,(r11+48) 8004890: b9 c0 18 00 mv r3,r14 8004894: ba 60 08 00 mv r1,r19 8004898: f8 00 1f 39 calli 800c57c information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 800489c: 2d 63 00 10 lhu r3,(r11+16) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 80048a0: 29 62 00 1c lw r2,(r11+28) 80048a4: ba 80 08 00 mv r1,r20 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 80048a8: b6 03 18 00 add r3,r16,r3 80048ac: b4 63 18 00 add r3,r3,r3 80048b0: b4 63 18 00 add r3,r3,r3 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 80048b4: f8 00 1f 32 calli 800c57c 80048b8: e3 ff ff 8c bi 80046e8 <_Objects_Extend_information+0x110> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 80048bc: 2c 31 00 10 lhu r17,(r1+16) /* * 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 ); 80048c0: ba 00 68 00 mv r13,r16 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 80048c4: 2c 21 00 14 lhu r1,(r1+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; 80048c8: 34 12 00 01 mvi r18,1 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 80048cc: 34 0e 00 00 mvi r14,0 80048d0: e3 ff ff 63 bi 800465c <_Objects_Extend_information+0x84> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 80048d4: b9 e0 08 00 mv r1,r15 <== 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 ); 80048d8: ba 00 68 00 mv r13,r16 <== 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; 80048dc: 34 12 00 01 mvi r18,1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 80048e0: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 80048e4: e3 ff ff 5e bi 800465c <_Objects_Extend_information+0x84> <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 80048e8: b9 e0 08 00 mv r1,r15 <== 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 ); 80048ec: ba 00 68 00 mv r13,r16 <== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 80048f0: 34 12 00 00 mvi r18,0 <== NOT EXECUTED * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 80048f4: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 80048f8: e3 ff ff 59 bi 800465c <_Objects_Extend_information+0x84> <== 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 ); 80048fc: b9 e0 08 00 mv r1,r15 8004900: f8 00 09 30 calli 8006dc0 <_Workspace_Free> return; 8004904: e3 ff ff c8 bi 8004824 <_Objects_Extend_information+0x24c> =============================================================================== 080049f0 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 80049f0: 37 9c ff f0 addi sp,sp,-16 80049f4: 5b 8b 00 0c sw (sp+12),r11 80049f8: 5b 8c 00 08 sw (sp+8),r12 80049fc: 5b 9d 00 04 sw (sp+4),ra Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; 8004a00: 34 0b 00 00 mvi r11,0 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 8004a04: b8 20 60 00 mv r12,r1 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 8004a08: 5c 40 00 07 bne r2,r0,8004a24 <_Objects_Get_information+0x34> if ( info->maximum == 0 ) return NULL; #endif return info; } 8004a0c: b9 60 08 00 mv r1,r11 8004a10: 2b 9d 00 04 lw ra,(sp+4) 8004a14: 2b 8b 00 0c lw r11,(sp+12) 8004a18: 2b 8c 00 08 lw r12,(sp+8) 8004a1c: 37 9c 00 10 addi sp,sp,16 8004a20: c3 a0 00 00 ret /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 8004a24: 5b 82 00 10 sw (sp+16),r2 8004a28: f8 00 13 8c calli 8009858 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 8004a2c: 2b 82 00 10 lw r2,(sp+16) 8004a30: 44 20 ff f7 be r1,r0,8004a0c <_Objects_Get_information+0x1c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 8004a34: 54 41 ff f6 bgu r2,r1,8004a0c <_Objects_Get_information+0x1c> return NULL; if ( !_Objects_Information_table[ the_api ] ) 8004a38: 78 01 08 01 mvhi r1,0x801 8004a3c: b5 8c 60 00 add r12,r12,r12 8004a40: 38 21 37 b8 ori r1,r1,0x37b8 8004a44: b5 8c 60 00 add r12,r12,r12 8004a48: b4 2c 08 00 add r1,r1,r12 8004a4c: 28 21 00 00 lw r1,(r1+0) 8004a50: 44 20 ff ef be r1,r0,8004a0c <_Objects_Get_information+0x1c><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 8004a54: b4 42 10 00 add r2,r2,r2 8004a58: b4 42 10 00 add r2,r2,r2 8004a5c: b4 22 08 00 add r1,r1,r2 8004a60: 28 2b 00 00 lw r11,(r1+0) if ( !info ) 8004a64: 45 60 ff ea be r11,r0,8004a0c <_Objects_Get_information+0x1c><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 8004a68: 2d 61 00 10 lhu r1,(r11+16) return NULL; 8004a6c: 7c 21 00 00 cmpnei r1,r1,0 8004a70: c8 01 08 00 sub r1,r0,r1 8004a74: a1 61 58 00 and r11,r11,r1 8004a78: e3 ff ff e5 bi 8004a0c <_Objects_Get_information+0x1c> =============================================================================== 08006a44 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 8006a44: 37 9c ff dc addi sp,sp,-36 8006a48: 5b 8b 00 18 sw (sp+24),r11 8006a4c: 5b 8c 00 14 sw (sp+20),r12 8006a50: 5b 8d 00 10 sw (sp+16),r13 8006a54: 5b 8e 00 0c sw (sp+12),r14 8006a58: 5b 8f 00 08 sw (sp+8),r15 8006a5c: 5b 9d 00 04 sw (sp+4),ra 8006a60: b8 40 60 00 mv r12,r2 8006a64: b8 60 58 00 mv r11,r3 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 8006a68: 5c 40 00 0b bne r2,r0,8006a94 <_Objects_Get_name_as_string+0x50> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 8006a6c: 34 0b 00 00 mvi r11,0 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 8006a70: b9 60 08 00 mv r1,r11 8006a74: 2b 9d 00 04 lw ra,(sp+4) 8006a78: 2b 8b 00 18 lw r11,(sp+24) 8006a7c: 2b 8c 00 14 lw r12,(sp+20) 8006a80: 2b 8d 00 10 lw r13,(sp+16) 8006a84: 2b 8e 00 0c lw r14,(sp+12) 8006a88: 2b 8f 00 08 lw r15,(sp+8) 8006a8c: 37 9c 00 24 addi sp,sp,36 8006a90: c3 a0 00 00 ret Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 8006a94: 44 60 ff f7 be r3,r0,8006a70 <_Objects_Get_name_as_string+0x2c> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 8006a98: b8 20 68 00 mv r13,r1 8006a9c: 5c 20 00 05 bne r1,r0,8006ab0 <_Objects_Get_name_as_string+0x6c> 8006aa0: 78 01 08 02 mvhi r1,0x802 8006aa4: 38 21 88 30 ori r1,r1,0x8830 8006aa8: 28 21 00 0c lw r1,(r1+12) 8006aac: 28 2d 00 08 lw r13,(r1+8) information = _Objects_Get_information_id( tmpId ); 8006ab0: b9 a0 08 00 mv r1,r13 8006ab4: fb ff ff 93 calli 8006900 <_Objects_Get_information_id> if ( !information ) 8006ab8: 44 20 ff ed be r1,r0,8006a6c <_Objects_Get_name_as_string+0x28> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 8006abc: b9 a0 10 00 mv r2,r13 8006ac0: 37 83 00 24 addi r3,sp,36 8006ac4: f8 00 00 30 calli 8006b84 <_Objects_Get> switch ( location ) { 8006ac8: 2b 8f 00 24 lw r15,(sp+36) 8006acc: 5d e0 ff e8 bne r15,r0,8006a6c <_Objects_Get_name_as_string+0x28> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 8006ad0: 28 2e 00 0c lw r14,(r1+12) lname[ 0 ] = (u32_name >> 24) & 0xff; 8006ad4: 34 02 00 18 mvi r2,24 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 8006ad8: 35 8c ff ff addi r12,r12,-1 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 8006adc: b9 c0 08 00 mv r1,r14 8006ae0: fb ff e9 b3 calli 80011ac <__lshrsi3> 8006ae4: 20 2d 00 ff andi r13,r1,0xff lname[ 1 ] = (u32_name >> 16) & 0xff; 8006ae8: 34 02 00 10 mvi r2,16 8006aec: b9 c0 08 00 mv r1,r14 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 8006af0: 33 8d 00 1c sb (sp+28),r13 lname[ 1 ] = (u32_name >> 16) & 0xff; 8006af4: fb ff e9 ae calli 80011ac <__lshrsi3> lname[ 2 ] = (u32_name >> 8) & 0xff; 8006af8: 01 c3 00 01 srui r3,r14,1 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 8006afc: 33 81 00 1d sb (sp+29),r1 lname[ 2 ] = (u32_name >> 8) & 0xff; 8006b00: 00 63 00 01 srui r3,r3,1 lname[ 3 ] = (u32_name >> 0) & 0xff; 8006b04: 33 8e 00 1f sb (sp+31),r14 { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 8006b08: 00 63 00 01 srui r3,r3,1 lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 8006b0c: 33 80 00 20 sb (sp+32),r0 { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 8006b10: 00 63 00 01 srui r3,r3,1 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 8006b14: b9 60 10 00 mv r2,r11 { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 8006b18: 00 63 00 01 srui r3,r3,1 8006b1c: 00 63 00 01 srui r3,r3,1 8006b20: 00 63 00 01 srui r3,r3,1 8006b24: 00 63 00 01 srui r3,r3,1 8006b28: 33 83 00 1e sb (sp+30),r3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 8006b2c: 45 8f 00 13 be r12,r15,8006b78 <_Objects_Get_name_as_string+0x134><== NEVER TAKEN 8006b30: 45 a0 00 12 be r13,r0,8006b78 <_Objects_Get_name_as_string+0x134> 8006b34: 78 03 08 02 mvhi r3,0x802 8006b38: 34 01 00 00 mvi r1,0 8006b3c: 38 63 01 b8 ori r3,r3,0x1b8 * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( 8006b40: 37 86 00 1c addi r6,sp,28 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; 8006b44: 28 64 00 00 lw r4,(r3+0) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 8006b48: 34 21 00 01 addi r1,r1,1 * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( 8006b4c: b4 c1 28 00 add r5,r6,r1 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; 8006b50: b4 8d 20 00 add r4,r4,r13 8006b54: 40 84 00 01 lbu r4,(r4+1) 8006b58: 20 84 00 97 andi r4,r4,0x97 8006b5c: 5c 80 00 02 bne r4,r0,8006b64 <_Objects_Get_name_as_string+0x120> 8006b60: 34 0d 00 2a mvi r13,42 8006b64: 30 4d 00 00 sb (r2+0),r13 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 8006b68: 34 42 00 01 addi r2,r2,1 8006b6c: 50 2c 00 03 bgeu r1,r12,8006b78 <_Objects_Get_name_as_string+0x134> 8006b70: 40 ad 00 00 lbu r13,(r5+0) 8006b74: 5d a0 ff f4 bne r13,r0,8006b44 <_Objects_Get_name_as_string+0x100> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 8006b78: 30 40 00 00 sb (r2+0),r0 _Thread_Enable_dispatch(); 8006b7c: f8 00 02 41 calli 8007480 <_Thread_Enable_dispatch> return name; 8006b80: e3 ff ff bc bi 8006a70 <_Objects_Get_name_as_string+0x2c> =============================================================================== 080175d0 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 80175d0: 28 25 00 08 lw r5,(r1+8) if ( information->maximum >= index ) { 80175d4: 2c 24 00 10 lhu r4,(r1+16) /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 80175d8: c8 45 10 00 sub r2,r2,r5 80175dc: 34 42 00 01 addi r2,r2,1 if ( information->maximum >= index ) { 80175e0: 54 44 00 09 bgu r2,r4,8017604 <_Objects_Get_no_protection+0x34> if ( (the_object = information->local_table[ index ]) != NULL ) { 80175e4: 28 24 00 1c lw r4,(r1+28) 80175e8: b4 42 08 00 add r1,r2,r2 80175ec: b4 21 08 00 add r1,r1,r1 80175f0: b4 81 08 00 add r1,r4,r1 80175f4: 28 21 00 00 lw r1,(r1+0) 80175f8: 44 20 00 03 be r1,r0,8017604 <_Objects_Get_no_protection+0x34><== NEVER TAKEN *location = OBJECTS_LOCAL; 80175fc: 58 60 00 00 sw (r3+0),r0 return the_object; 8017600: c3 a0 00 00 ret /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 8017604: 34 01 00 01 mvi r1,1 8017608: 58 61 00 00 sw (r3+0),r1 return NULL; 801760c: 34 01 00 00 mvi r1,0 } 8017610: c3 a0 00 00 ret =============================================================================== 0800656c <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 800656c: 37 9c ff e8 addi sp,sp,-24 8006570: 5b 8b 00 14 sw (sp+20),r11 8006574: 5b 8c 00 10 sw (sp+16),r12 8006578: 5b 8d 00 0c sw (sp+12),r13 800657c: 5b 8e 00 08 sw (sp+8),r14 8006580: 5b 9d 00 04 sw (sp+4),ra /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 8006584: b8 20 58 00 mv r11,r1 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 8006588: b8 40 70 00 mv r14,r2 /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 800658c: 5c 20 00 05 bne r1,r0,80065a0 <_Objects_Id_to_name+0x34> 8006590: 78 01 08 01 mvhi r1,0x801 8006594: 38 21 fa 48 ori r1,r1,0xfa48 8006598: 28 21 00 0c lw r1,(r1+12) 800659c: 28 2b 00 08 lw r11,(r1+8) */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 80065a0: b9 60 08 00 mv r1,r11 80065a4: 34 02 00 18 mvi r2,24 80065a8: f8 00 53 6e calli 801b360 <__lshrsi3> 80065ac: 20 23 00 07 andi r3,r1,0x7 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 80065b0: 34 64 ff ff addi r4,r3,-1 80065b4: 34 01 00 02 mvi r1,2 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; 80065b8: 34 0c 00 03 mvi r12,3 80065bc: 54 81 00 18 bgu r4,r1,800661c <_Objects_Id_to_name+0xb0> if ( !_Objects_Information_table[ the_api ] ) 80065c0: 78 04 08 01 mvhi r4,0x801 80065c4: b4 63 18 00 add r3,r3,r3 80065c8: 38 84 f8 18 ori r4,r4,0xf818 80065cc: b4 63 18 00 add r3,r3,r3 80065d0: b4 83 18 00 add r3,r4,r3 80065d4: 28 6d 00 00 lw r13,(r3+0) 80065d8: 45 a0 00 11 be r13,r0,800661c <_Objects_Id_to_name+0xb0> <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 80065dc: b9 60 08 00 mv r1,r11 80065e0: 34 02 00 1b mvi r2,27 80065e4: f8 00 53 5f calli 801b360 <__lshrsi3> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 80065e8: b4 21 18 00 add r3,r1,r1 80065ec: b4 63 18 00 add r3,r3,r3 80065f0: b5 a3 18 00 add r3,r13,r3 80065f4: 28 61 00 00 lw r1,(r3+0) if ( !information ) 80065f8: 44 20 00 09 be r1,r0,800661c <_Objects_Id_to_name+0xb0> <== NEVER TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 80065fc: b9 60 10 00 mv r2,r11 8006600: 37 83 00 18 addi r3,sp,24 8006604: fb ff ff b4 calli 80064d4 <_Objects_Get> if ( !the_object ) 8006608: 44 20 00 05 be r1,r0,800661c <_Objects_Id_to_name+0xb0> return OBJECTS_INVALID_ID; *name = the_object->name; 800660c: 28 21 00 0c lw r1,(r1+12) _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 8006610: 34 0c 00 00 mvi r12,0 the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; 8006614: 59 c1 00 00 sw (r14+0),r1 _Thread_Enable_dispatch(); 8006618: f8 00 02 86 calli 8007030 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 800661c: b9 80 08 00 mv r1,r12 8006620: 2b 9d 00 04 lw ra,(sp+4) 8006624: 2b 8b 00 14 lw r11,(sp+20) 8006628: 2b 8c 00 10 lw r12,(sp+16) 800662c: 2b 8d 00 0c lw r13,(sp+12) 8006630: 2b 8e 00 08 lw r14,(sp+8) 8006634: 37 9c 00 18 addi sp,sp,24 8006638: c3 a0 00 00 ret =============================================================================== 08004b80 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 8004b80: 37 9c ff e8 addi sp,sp,-24 8004b84: 5b 8b 00 18 sw (sp+24),r11 8004b88: 5b 8c 00 14 sw (sp+20),r12 8004b8c: 5b 8d 00 10 sw (sp+16),r13 8004b90: 5b 8e 00 0c sw (sp+12),r14 8004b94: 5b 8f 00 08 sw (sp+8),r15 8004b98: 5b 9d 00 04 sw (sp+4),ra 8004b9c: b8 40 68 00 mv r13,r2 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 8004ba0: b5 ad 30 00 add r6,r13,r13 8004ba4: 78 02 08 01 mvhi r2,0x801 8004ba8: 38 42 37 b8 ori r2,r2,0x37b8 8004bac: b4 c6 30 00 add r6,r6,r6 8004bb0: b4 46 30 00 add r6,r2,r6 8004bb4: 28 c2 00 00 lw r2,(r6+0) 8004bb8: b4 63 30 00 add r6,r3,r3 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 8004bbc: b8 20 58 00 mv r11,r1 8004bc0: 20 a5 ff ff andi r5,r5,0xffff information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 8004bc4: b4 c6 30 00 add r6,r6,r6 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 8004bc8: 58 2d 00 00 sw (r1+0),r13 information->the_class = the_class; 8004bcc: 0d 63 00 04 sh (r11+4),r3 information->size = size; 8004bd0: 58 25 00 18 sw (r1+24),r5 information->local_table = 0; 8004bd4: 58 20 00 1c sw (r1+28),r0 information->inactive_per_block = 0; 8004bd8: 58 20 00 30 sw (r1+48),r0 information->object_blocks = 0; 8004bdc: 58 20 00 34 sw (r1+52),r0 information->inactive = 0; 8004be0: 0c 20 00 2c sh (r1+44),r0 /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 8004be4: 0c 20 00 10 sh (r1+16),r0 /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 8004be8: b4 46 30 00 add r6,r2,r6 8004bec: 58 c1 00 00 sw (r6+0),r1 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 8004bf0: 34 02 00 1f mvi r2,31 8004bf4: b8 80 08 00 mv r1,r4 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 8004bf8: b8 60 60 00 mv r12,r3 8004bfc: b8 80 70 00 mv r14,r4 8004c00: b8 e0 78 00 mv r15,r7 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 8004c04: f8 00 30 be calli 8010efc <__lshrsi3> maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 8004c08: 78 03 08 01 mvhi r3,0x801 8004c0c: 38 63 23 6c ori r3,r3,0x236c /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 8004c10: 20 22 00 ff andi r2,r1,0xff maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 8004c14: 28 61 00 00 lw r1,(r3+0) _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 8004c18: 31 62 00 12 sb (r11+18),r2 (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 8004c1c: a1 c1 70 00 and r14,r14,r1 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 8004c20: 44 40 00 02 be r2,r0,8004c28 <_Objects_Initialize_information+0xa8> 8004c24: 45 c0 00 29 be r14,r0,8004cc8 <_Objects_Initialize_information+0x148><== NEVER TAKEN information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 8004c28: 78 01 08 01 mvhi r1,0x801 8004c2c: 38 21 36 28 ori r1,r1,0x3628 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 8004c30: 34 02 00 18 mvi r2,24 8004c34: 59 61 00 1c sw (r11+28),r1 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 8004c38: 0d 6e 00 14 sh (r11+20),r14 8004c3c: b9 a0 08 00 mv r1,r13 8004c40: f8 00 30 61 calli 8010dc4 <__ashlsi3> 8004c44: 78 0d 00 01 mvhi r13,0x1 8004c48: b8 2d 68 00 or r13,r1,r13 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 8004c4c: 34 02 00 1b mvi r2,27 8004c50: b9 80 08 00 mv r1,r12 8004c54: f8 00 30 5c calli 8010dc4 <__ashlsi3> information->local_table = &null_local_table; /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 8004c58: 7d c2 00 00 cmpnei r2,r14,0 8004c5c: b9 a1 08 00 or r1,r13,r1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 8004c60: b8 22 08 00 or r1,r1,r2 information->minimum_id = 8004c64: 59 61 00 08 sw (r11+8),r1 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 8004c68: 21 e1 00 03 andi r1,r15,0x3 8004c6c: b9 e0 38 00 mv r7,r15 8004c70: 5c 20 00 12 bne r1,r0,8004cb8 <_Objects_Initialize_information+0x138><== NEVER TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8004c74: 35 62 00 24 addi r2,r11,36 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; _Chain_Initialize_empty( &information->Inactive ); 8004c78: 35 61 00 20 addi r1,r11,32 if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 8004c7c: 0d 67 00 38 sh (r11+56),r7 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8004c80: 59 62 00 20 sw (r11+32),r2 the_chain->permanent_null = NULL; 8004c84: 59 60 00 24 sw (r11+36),r0 the_chain->last = _Chain_Head(the_chain); 8004c88: 59 61 00 28 sw (r11+40),r1 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 8004c8c: 45 c0 00 03 be r14,r0,8004c98 <_Objects_Initialize_information+0x118> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 8004c90: b9 60 08 00 mv r1,r11 8004c94: fb ff fe 51 calli 80045d8 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 8004c98: 2b 9d 00 04 lw ra,(sp+4) 8004c9c: 2b 8b 00 18 lw r11,(sp+24) 8004ca0: 2b 8c 00 14 lw r12,(sp+20) 8004ca4: 2b 8d 00 10 lw r13,(sp+16) 8004ca8: 2b 8e 00 0c lw r14,(sp+12) 8004cac: 2b 8f 00 08 lw r15,(sp+8) 8004cb0: 37 9c 00 18 addi sp,sp,24 8004cb4: c3 a0 00 00 ret * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 8004cb8: 35 e7 00 04 addi r7,r15,4 <== NOT EXECUTED 8004cbc: 34 01 ff fc mvi r1,-4 <== NOT EXECUTED 8004cc0: a0 e1 38 00 and r7,r7,r1 <== NOT EXECUTED 8004cc4: e3 ff ff ec bi 8004c74 <_Objects_Initialize_information+0xf4><== NOT EXECUTED /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 8004cc8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004ccc: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8004cd0: 34 03 00 13 mvi r3,19 <== NOT EXECUTED 8004cd4: fb ff fd d8 calli 8004434 <_Internal_error_Occurred> <== NOT EXECUTED =============================================================================== 08004d54 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 8004d54: 37 9c ff ec addi sp,sp,-20 8004d58: 5b 8b 00 14 sw (sp+20),r11 8004d5c: 5b 8c 00 10 sw (sp+16),r12 8004d60: 5b 8d 00 0c sw (sp+12),r13 8004d64: 5b 8e 00 08 sw (sp+8),r14 8004d68: 5b 9d 00 04 sw (sp+4),ra /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 8004d6c: 2c 2c 00 0a lhu r12,(r1+10) block_count = (information->maximum - index_base) / 8004d70: 2c 2d 00 14 lhu r13,(r1+20) */ void _Objects_Shrink_information( Objects_Information *information ) { 8004d74: b8 20 70 00 mv r14,r1 /* * 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) / 8004d78: 2c 21 00 10 lhu r1,(r1+16) 8004d7c: b9 a0 10 00 mv r2,r13 8004d80: c8 2c 08 00 sub r1,r1,r12 8004d84: f8 00 30 ea calli 801112c <__udivsi3> information->allocation_size; for ( block = 0; block < block_count; block++ ) { 8004d88: 44 20 00 09 be r1,r0,8004dac <_Objects_Shrink_information+0x58><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 8004d8c: 29 c5 00 30 lw r5,(r14+48) 8004d90: 34 0b 00 04 mvi r11,4 8004d94: 34 03 00 00 mvi r3,0 8004d98: 28 a2 00 00 lw r2,(r5+0) 8004d9c: 45 a2 00 11 be r13,r2,8004de0 <_Objects_Shrink_information+0x8c><== NEVER TAKEN index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 8004da0: 34 63 00 01 addi r3,r3,1 * the_block - the block to remove * * Output parameters: NONE */ void _Objects_Shrink_information( 8004da4: b4 ab 10 00 add r2,r5,r11 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 8004da8: 54 23 00 08 bgu r1,r3,8004dc8 <_Objects_Shrink_information+0x74> return; } index_base += information->allocation_size; } } 8004dac: 2b 9d 00 04 lw ra,(sp+4) 8004db0: 2b 8b 00 14 lw r11,(sp+20) 8004db4: 2b 8c 00 10 lw r12,(sp+16) 8004db8: 2b 8d 00 0c lw r13,(sp+12) 8004dbc: 2b 8e 00 08 lw r14,(sp+8) 8004dc0: 37 9c 00 14 addi sp,sp,20 8004dc4: c3 a0 00 00 ret 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 ] == 8004dc8: 28 42 00 00 lw r2,(r2+0) information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 8004dcc: 35 64 00 04 addi r4,r11,4 8004dd0: b5 8d 60 00 add r12,r12,r13 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 ] == 8004dd4: 45 a2 00 04 be r13,r2,8004de4 <_Objects_Shrink_information+0x90> 8004dd8: b8 80 58 00 mv r11,r4 8004ddc: e3 ff ff f1 bi 8004da0 <_Objects_Shrink_information+0x4c> 8004de0: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 8004de4: 29 c1 00 20 lw r1,(r14+32) do { index = _Objects_Get_index( the_object->id ); 8004de8: 2c 22 00 0a lhu r2,(r1+10) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 8004dec: 28 2d 00 00 lw r13,(r1+0) if ((index >= index_base) && 8004df0: 55 82 00 05 bgu r12,r2,8004e04 <_Objects_Shrink_information+0xb0> (index < (index_base + information->allocation_size))) { 8004df4: 2d c3 00 14 lhu r3,(r14+20) 8004df8: b5 83 18 00 add r3,r12,r3 /* * 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) && 8004dfc: 50 43 00 02 bgeu r2,r3,8004e04 <_Objects_Shrink_information+0xb0> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 8004e00: fb ff fa c3 calli 800390c <_Chain_Extract> } } while ( the_object ); 8004e04: 45 a0 00 03 be r13,r0,8004e10 <_Objects_Shrink_information+0xbc> 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; 8004e08: b9 a0 08 00 mv r1,r13 8004e0c: e3 ff ff f7 bi 8004de8 <_Objects_Shrink_information+0x94> while ( the_object ); /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 8004e10: 29 c1 00 34 lw r1,(r14+52) 8004e14: b4 2b 08 00 add r1,r1,r11 8004e18: 28 21 00 00 lw r1,(r1+0) 8004e1c: f8 00 07 e9 calli 8006dc0 <_Workspace_Free> information->object_blocks[ block ] = NULL; 8004e20: 29 c2 00 34 lw r2,(r14+52) information->inactive_per_block[ block ] = 0; 8004e24: 29 c4 00 30 lw r4,(r14+48) information->inactive -= information->allocation_size; 8004e28: 2d c3 00 2c lhu r3,(r14+44) 8004e2c: 2d c1 00 14 lhu r1,(r14+20) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 8004e30: b4 4b 10 00 add r2,r2,r11 8004e34: 58 40 00 00 sw (r2+0),r0 information->inactive_per_block[ block ] = 0; 8004e38: b4 8b 58 00 add r11,r4,r11 8004e3c: 59 60 00 00 sw (r11+0),r0 information->inactive -= information->allocation_size; 8004e40: c8 61 08 00 sub r1,r3,r1 8004e44: 0d c1 00 2c sh (r14+44),r1 return; } index_base += information->allocation_size; } } 8004e48: 2b 9d 00 04 lw ra,(sp+4) 8004e4c: 2b 8b 00 14 lw r11,(sp+20) 8004e50: 2b 8c 00 10 lw r12,(sp+16) 8004e54: 2b 8d 00 0c lw r13,(sp+12) 8004e58: 2b 8e 00 08 lw r14,(sp+8) 8004e5c: 37 9c 00 14 addi sp,sp,20 8004e60: c3 a0 00 00 ret =============================================================================== 0800321c <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 800321c: 37 9c ff e8 addi sp,sp,-24 8003220: 5b 8b 00 14 sw (sp+20),r11 8003224: 5b 8c 00 10 sw (sp+16),r12 8003228: 5b 8d 00 0c sw (sp+12),r13 800322c: 5b 8e 00 08 sw (sp+8),r14 8003230: 5b 9d 00 04 sw (sp+4),ra rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 8003234: 78 01 08 01 mvhi r1,0x801 8003238: 38 21 30 8c ori r1,r1,0x308c 800323c: 28 2b 00 2c lw r11,(r1+44) maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 8003240: 28 2e 00 28 lw r14,(r1+40) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 8003244: 45 60 00 15 be r11,r0,8003298 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 8003248: 45 c0 00 14 be r14,r0,8003298 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c><== NEVER TAKEN 800324c: 34 0c 00 00 mvi r12,0 return_value = rtems_task_create( 8003250: 29 61 00 00 lw r1,(r11+0) 8003254: 29 62 00 08 lw r2,(r11+8) 8003258: 29 63 00 04 lw r3,(r11+4) 800325c: 29 64 00 14 lw r4,(r11+20) 8003260: 29 65 00 0c lw r5,(r11+12) 8003264: 37 86 00 18 addi r6,sp,24 8003268: fb ff ff 52 calli 8002fb0 800326c: b8 20 68 00 mv r13,r1 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 8003270: 5c 20 00 11 bne r1,r0,80032b4 <_RTEMS_tasks_Initialize_user_tasks_body+0x98><== NEVER TAKEN _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 8003274: 29 63 00 18 lw r3,(r11+24) 8003278: 2b 81 00 18 lw r1,(sp+24) 800327c: 29 62 00 10 lw r2,(r11+16) 8003280: f8 00 00 14 calli 80032d0 8003284: b8 20 18 00 mv r3,r1 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 8003288: 5c 2d 00 0f bne r1,r13,80032c4 <_RTEMS_tasks_Initialize_user_tasks_body+0xa8><== NEVER TAKEN return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 800328c: 35 8c 00 01 addi r12,r12,1 8003290: 35 6b 00 1c addi r11,r11,28 8003294: 55 cc ff ef bgu r14,r12,8003250 <_RTEMS_tasks_Initialize_user_tasks_body+0x34><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 8003298: 2b 9d 00 04 lw ra,(sp+4) 800329c: 2b 8b 00 14 lw r11,(sp+20) 80032a0: 2b 8c 00 10 lw r12,(sp+16) 80032a4: 2b 8d 00 0c lw r13,(sp+12) 80032a8: 2b 8e 00 08 lw r14,(sp+8) 80032ac: 37 9c 00 18 addi sp,sp,24 80032b0: c3 a0 00 00 ret user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 80032b4: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 80032b8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80032bc: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 80032c0: f8 00 04 5d calli 8004434 <_Internal_error_Occurred> <== NOT EXECUTED id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 80032c4: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 80032c8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80032cc: f8 00 04 5a calli 8004434 <_Internal_error_Occurred> <== NOT EXECUTED =============================================================================== 08008ee0 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 8008ee0: 37 9c ff f0 addi sp,sp,-16 8008ee4: 5b 8b 00 0c sw (sp+12),r11 8008ee8: 5b 8c 00 08 sw (sp+8),r12 8008eec: 5b 9d 00 04 sw (sp+4),ra RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 8008ef0: 28 2b 01 24 lw r11,(r1+292) if ( !api ) 8008ef4: 45 60 00 1a be r11,r0,8008f5c <_RTEMS_tasks_Post_switch_extension+0x7c><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 8008ef8: 90 00 10 00 rcsr r2,IE 8008efc: 34 01 ff fe mvi r1,-2 8008f00: a0 41 08 00 and r1,r2,r1 8008f04: d0 01 00 00 wcsr IE,r1 signal_set = asr->signals_posted; 8008f08: 29 6c 00 14 lw r12,(r11+20) asr->signals_posted = 0; 8008f0c: 59 60 00 14 sw (r11+20),r0 _ISR_Enable( level ); 8008f10: d0 02 00 00 wcsr IE,r2 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 8008f14: 45 80 00 12 be r12,r0,8008f5c <_RTEMS_tasks_Post_switch_extension+0x7c> return; asr->nest_level += 1; 8008f18: 29 64 00 1c lw r4,(r11+28) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 8008f1c: 29 61 00 10 lw r1,(r11+16) 8008f20: 37 83 00 10 addi r3,sp,16 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 8008f24: 34 84 00 01 addi r4,r4,1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 8008f28: 38 02 ff ff mvu r2,0xffff if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 8008f2c: 59 64 00 1c sw (r11+28),r4 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 8008f30: f8 00 09 7c calli 800b520 (*asr->handler)( signal_set ); 8008f34: 29 62 00 0c lw r2,(r11+12) 8008f38: b9 80 08 00 mv r1,r12 8008f3c: d8 40 00 00 call r2 asr->nest_level -= 1; 8008f40: 29 63 00 1c lw r3,(r11+28) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 8008f44: 2b 81 00 10 lw r1,(sp+16) 8008f48: 38 02 ff ff mvu r2,0xffff asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 8008f4c: 34 63 ff ff addi r3,r3,-1 8008f50: 59 63 00 1c sw (r11+28),r3 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 8008f54: 37 83 00 10 addi r3,sp,16 8008f58: f8 00 09 72 calli 800b520 } 8008f5c: 2b 9d 00 04 lw ra,(sp+4) 8008f60: 2b 8b 00 0c lw r11,(sp+12) 8008f64: 2b 8c 00 08 lw r12,(sp+8) 8008f68: 37 9c 00 10 addi sp,sp,16 8008f6c: c3 a0 00 00 ret =============================================================================== 08008e6c <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; 8008e6c: 28 21 01 30 lw r1,(r1+304) while (tvp) { 8008e70: 44 20 00 08 be r1,r0,8008e90 <_RTEMS_tasks_Switch_extension+0x24> tvp->tval = *tvp->ptr; 8008e74: 28 23 00 04 lw r3,(r1+4) *tvp->ptr = tvp->gval; 8008e78: 28 24 00 08 lw r4,(r1+8) * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; 8008e7c: 28 65 00 00 lw r5,(r3+0) 8008e80: 58 25 00 0c sw (r1+12),r5 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; 8008e84: 28 21 00 00 lw r1,(r1+0) */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; 8008e88: 58 64 00 00 sw (r3+0),r4 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 8008e8c: 5c 20 ff fa bne r1,r0,8008e74 <_RTEMS_tasks_Switch_extension+0x8><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 8008e90: 28 41 01 30 lw r1,(r2+304) while (tvp) { 8008e94: 44 20 00 08 be r1,r0,8008eb4 <_RTEMS_tasks_Switch_extension+0x48> tvp->gval = *tvp->ptr; 8008e98: 28 22 00 04 lw r2,(r1+4) *tvp->ptr = tvp->tval; 8008e9c: 28 23 00 0c lw r3,(r1+12) tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; 8008ea0: 28 44 00 00 lw r4,(r2+0) 8008ea4: 58 24 00 08 sw (r1+8),r4 *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; 8008ea8: 28 21 00 00 lw r1,(r1+0) } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; 8008eac: 58 43 00 00 sw (r2+0),r3 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 8008eb0: 5c 20 ff fa bne r1,r0,8008e98 <_RTEMS_tasks_Switch_extension+0x2c><== NEVER TAKEN 8008eb4: c3 a0 00 00 ret =============================================================================== 080048fc <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 80048fc: 37 9c ff f4 addi sp,sp,-12 8004900: 5b 8b 00 08 sw (sp+8),r11 8004904: 5b 9d 00 04 sw (sp+4),ra 8004908: b8 20 10 00 mv r2,r1 800490c: 78 01 08 01 mvhi r1,0x801 8004910: 38 21 f8 18 ori r1,r1,0xf818 8004914: 37 83 00 0c addi r3,sp,12 8004918: f8 00 09 11 calli 8006d5c <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 800491c: 2b 82 00 0c lw r2,(sp+12) 8004920: b8 20 58 00 mv r11,r1 8004924: 44 40 00 05 be r2,r0,8004938 <_Rate_monotonic_Timeout+0x3c><== ALWAYS TAKEN case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 8004928: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800492c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8004930: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8004934: c3 a0 00 00 ret <== NOT EXECUTED */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; 8004938: 28 21 00 40 lw r1,(r1+64) */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); 800493c: 28 23 00 10 lw r3,(r1+16) 8004940: 20 63 40 00 andi r3,r3,0x4000 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 8004944: 44 62 00 04 be r3,r2,8004954 <_Rate_monotonic_Timeout+0x58> 8004948: 28 23 00 20 lw r3,(r1+32) 800494c: 29 62 00 08 lw r2,(r11+8) 8004950: 44 62 00 1a be r3,r2,80049b8 <_Rate_monotonic_Timeout+0xbc> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 8004954: 29 62 00 38 lw r2,(r11+56) 8004958: 34 01 00 01 mvi r1,1 800495c: 44 41 00 0c be r2,r1,800498c <_Rate_monotonic_Timeout+0x90><== NEVER TAKEN _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 8004960: 34 01 00 04 mvi r1,4 8004964: 59 61 00 38 sw (r11+56),r1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 8004968: 78 01 08 01 mvhi r1,0x801 800496c: 38 21 f9 44 ori r1,r1,0xf944 8004970: 28 22 00 00 lw r2,(r1+0) 8004974: 34 42 ff ff addi r2,r2,-1 8004978: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800497c: 2b 9d 00 04 lw ra,(sp+4) 8004980: 2b 8b 00 08 lw r11,(sp+8) 8004984: 37 9c 00 0c addi sp,sp,12 8004988: c3 a0 00 00 ret _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 800498c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 8004990: b9 60 08 00 mv r1,r11 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 8004994: 59 62 00 38 sw (r11+56),r2 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 8004998: fb ff fe 00 calli 8004198 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 800499c: 29 62 00 3c lw r2,(r11+60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80049a0: 78 01 08 01 mvhi r1,0x801 80049a4: 38 21 fa 08 ori r1,r1,0xfa08 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 80049a8: 59 62 00 1c sw (r11+28),r2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80049ac: 35 62 00 10 addi r2,r11,16 80049b0: f8 00 11 d0 calli 80090f0 <_Watchdog_Insert> 80049b4: e3 ff ff ed bi 8004968 <_Rate_monotonic_Timeout+0x6c> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 80049b8: 78 03 08 01 mvhi r3,0x801 80049bc: 38 63 d6 a4 ori r3,r3,0xd6a4 80049c0: 28 62 00 00 lw r2,(r3+0) 80049c4: f8 00 0a 99 calli 8007428 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 80049c8: b9 60 08 00 mv r1,r11 80049cc: e3 ff ff f3 bi 8004998 <_Rate_monotonic_Timeout+0x9c> =============================================================================== 08004244 <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 8004244: 37 9c ff e0 addi sp,sp,-32 8004248: 5b 8b 00 10 sw (sp+16),r11 800424c: 5b 8c 00 0c sw (sp+12),r12 8004250: 5b 8d 00 08 sw (sp+8),r13 8004254: 5b 9d 00 04 sw (sp+4),ra 8004258: b8 20 58 00 mv r11,r1 /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 800425c: 28 21 00 54 lw r1,(r1+84) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 8004260: 29 62 00 38 lw r2,(r11+56) /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 8004264: 34 21 00 01 addi r1,r1,1 8004268: 59 61 00 54 sw (r11+84),r1 if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 800426c: 34 01 00 04 mvi r1,4 8004270: 44 41 00 36 be r2,r1,8004348 <_Rate_monotonic_Update_statistics+0x104> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 8004274: 37 8c 00 14 addi r12,sp,20 8004278: 37 8d 00 1c addi r13,sp,28 stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 800427c: b9 60 08 00 mv r1,r11 8004280: b9 80 10 00 mv r2,r12 8004284: b9 a0 18 00 mv r3,r13 8004288: fb ff ff 8a calli 80040b0 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 800428c: 5c 20 00 07 bne r1,r0,80042a8 <_Rate_monotonic_Update_statistics+0x64><== ALWAYS TAKEN stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 8004290: 2b 9d 00 04 lw ra,(sp+4) 8004294: 2b 8b 00 10 lw r11,(sp+16) 8004298: 2b 8c 00 0c lw r12,(sp+12) 800429c: 2b 8d 00 08 lw r13,(sp+8) 80042a0: 37 9c 00 20 addi sp,sp,32 80042a4: c3 a0 00 00 ret /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 80042a8: b9 a0 10 00 mv r2,r13 80042ac: 35 61 00 6c addi r1,r11,108 80042b0: f8 00 11 92 calli 80088f8 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 80042b4: b9 a0 08 00 mv r1,r13 80042b8: 35 62 00 5c addi r2,r11,92 80042bc: f8 00 12 7b calli 8008ca8 <_Timespec_Less_than> 80042c0: 44 20 00 05 be r1,r0,80042d4 <_Rate_monotonic_Update_statistics+0x90> stats->min_cpu_time = executed; 80042c4: 2b 81 00 1c lw r1,(sp+28) 80042c8: 59 61 00 5c sw (r11+92),r1 80042cc: 2b 81 00 20 lw r1,(sp+32) 80042d0: 59 61 00 60 sw (r11+96),r1 if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 80042d4: b9 a0 08 00 mv r1,r13 80042d8: 35 62 00 64 addi r2,r11,100 80042dc: f8 00 12 68 calli 8008c7c <_Timespec_Greater_than> 80042e0: 44 20 00 05 be r1,r0,80042f4 <_Rate_monotonic_Update_statistics+0xb0> stats->max_cpu_time = executed; 80042e4: 2b 81 00 1c lw r1,(sp+28) 80042e8: 59 61 00 64 sw (r11+100),r1 80042ec: 2b 81 00 20 lw r1,(sp+32) 80042f0: 59 61 00 68 sw (r11+104),r1 /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 80042f4: b9 80 10 00 mv r2,r12 80042f8: 35 61 00 84 addi r1,r11,132 80042fc: f8 00 11 7f calli 80088f8 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 8004300: b9 80 08 00 mv r1,r12 8004304: 35 62 00 74 addi r2,r11,116 8004308: f8 00 12 68 calli 8008ca8 <_Timespec_Less_than> 800430c: 5c 20 00 13 bne r1,r0,8004358 <_Rate_monotonic_Update_statistics+0x114> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 8004310: b9 80 08 00 mv r1,r12 8004314: 35 62 00 7c addi r2,r11,124 8004318: f8 00 12 59 calli 8008c7c <_Timespec_Greater_than> 800431c: 44 20 ff dd be r1,r0,8004290 <_Rate_monotonic_Update_statistics+0x4c> stats->max_wall_time = since_last_period; 8004320: 2b 81 00 14 lw r1,(sp+20) 8004324: 59 61 00 7c sw (r11+124),r1 8004328: 2b 81 00 18 lw r1,(sp+24) 800432c: 59 61 00 80 sw (r11+128),r1 stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 8004330: 2b 9d 00 04 lw ra,(sp+4) 8004334: 2b 8b 00 10 lw r11,(sp+16) 8004338: 2b 8c 00 0c lw r12,(sp+12) 800433c: 2b 8d 00 08 lw r13,(sp+8) 8004340: 37 9c 00 20 addi sp,sp,32 8004344: c3 a0 00 00 ret */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 8004348: 29 61 00 58 lw r1,(r11+88) 800434c: 34 21 00 01 addi r1,r1,1 8004350: 59 61 00 58 sw (r11+88),r1 8004354: e3 ff ff c8 bi 8004274 <_Rate_monotonic_Update_statistics+0x30> */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; 8004358: 2b 81 00 14 lw r1,(sp+20) 800435c: 59 61 00 74 sw (r11+116),r1 8004360: 2b 81 00 18 lw r1,(sp+24) 8004364: 59 61 00 78 sw (r11+120),r1 8004368: e3 ff ff ea bi 8004310 <_Rate_monotonic_Update_statistics+0xcc> =============================================================================== 08003da4 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 8003da4: 37 9c ff e4 addi sp,sp,-28 8003da8: 5b 8b 00 0c sw (sp+12),r11 8003dac: 5b 8c 00 08 sw (sp+8),r12 8003db0: 5b 9d 00 04 sw (sp+4),ra 8003db4: b8 20 58 00 mv r11,r1 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); 8003db8: 90 00 60 00 rcsr r12,IE 8003dbc: 34 01 ff fe mvi r1,-2 8003dc0: a1 81 08 00 and r1,r12,r1 8003dc4: d0 01 00 00 wcsr IE,r1 now = _TOD_Now; 8003dc8: 78 02 08 01 mvhi r2,0x801 8003dcc: 38 42 38 a4 ori r2,r2,0x38a4 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8003dd0: 78 03 08 01 mvhi r3,0x801 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 8003dd4: 28 44 00 00 lw r4,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8003dd8: 38 63 39 a0 ori r3,r3,0x39a0 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 8003ddc: 28 42 00 04 lw r2,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8003de0: 28 61 00 00 lw r1,(r3+0) /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 8003de4: 5b 84 00 10 sw (sp+16),r4 8003de8: 5b 82 00 14 sw (sp+20),r2 long nanoseconds; /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; 8003dec: 34 03 00 00 mvi r3,0 _ISR_Disable( level ); now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 8003df0: 44 20 00 03 be r1,r0,8003dfc <_TOD_Get+0x58> <== ALWAYS TAKEN nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 8003df4: d8 20 00 00 call r1 <== NOT EXECUTED 8003df8: b8 20 18 00 mv r3,r1 <== NOT EXECUTED _ISR_Enable( level ); 8003dfc: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); 8003e00: 37 82 00 18 addi r2,sp,24 8003e04: 37 81 00 10 addi r1,sp,16 now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 8003e08: 5b 80 00 18 sw (sp+24),r0 8003e0c: 5b 83 00 1c sw (sp+28),r3 _Timestamp_Add_to( &now, &offset ); 8003e10: f8 00 09 b0 calli 80064d0 <_Timespec_Add_to> _Timestamp_To_timespec( &now, time ); 8003e14: 2b 81 00 14 lw r1,(sp+20) 8003e18: 2b 82 00 10 lw r2,(sp+16) 8003e1c: 59 61 00 04 sw (r11+4),r1 8003e20: 59 62 00 00 sw (r11+0),r2 } 8003e24: 2b 9d 00 04 lw ra,(sp+4) 8003e28: 2b 8b 00 0c lw r11,(sp+12) 8003e2c: 2b 8c 00 08 lw r12,(sp+8) 8003e30: 37 9c 00 1c addi sp,sp,28 8003e34: c3 a0 00 00 ret =============================================================================== 080093e0 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { 80093e0: 37 9c ff e4 addi sp,sp,-28 80093e4: 5b 8b 00 0c sw (sp+12),r11 80093e8: 5b 8c 00 08 sw (sp+8),r12 80093ec: 5b 9d 00 04 sw (sp+4),ra 80093f0: b8 20 58 00 mv r11,r1 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); 80093f4: 90 00 60 00 rcsr r12,IE 80093f8: 34 01 ff fe mvi r1,-2 80093fc: a1 81 08 00 and r1,r12,r1 8009400: d0 01 00 00 wcsr IE,r1 up = _TOD_Uptime; 8009404: 78 02 08 01 mvhi r2,0x801 8009408: 38 42 38 98 ori r2,r2,0x3898 if ( _Watchdog_Nanoseconds_since_tick_handler ) 800940c: 78 03 08 01 mvhi r3,0x801 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 8009410: 28 44 00 00 lw r4,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8009414: 38 63 39 a0 ori r3,r3,0x39a0 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 8009418: 28 42 00 04 lw r2,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 800941c: 28 61 00 00 lw r1,(r3+0) /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 8009420: 5b 84 00 10 sw (sp+16),r4 8009424: 5b 82 00 14 sw (sp+20),r2 long nanoseconds; /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; 8009428: 34 03 00 00 mvi r3,0 _ISR_Disable( level ); up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) 800942c: 44 20 00 03 be r1,r0,8009438 <_TOD_Get_uptime+0x58> <== ALWAYS TAKEN nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 8009430: d8 20 00 00 call r1 <== NOT EXECUTED 8009434: b8 20 18 00 mv r3,r1 <== NOT EXECUTED _ISR_Enable( level ); 8009438: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); 800943c: 37 82 00 18 addi r2,sp,24 8009440: 37 81 00 10 addi r1,sp,16 up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 8009444: 5b 80 00 18 sw (sp+24),r0 8009448: 5b 83 00 1c sw (sp+28),r3 _Timestamp_Add_to( &up, &offset ); 800944c: fb ff f4 21 calli 80064d0 <_Timespec_Add_to> *uptime = up; 8009450: 2b 81 00 14 lw r1,(sp+20) 8009454: 2b 82 00 10 lw r2,(sp+16) 8009458: 59 61 00 04 sw (r11+4),r1 800945c: 59 62 00 00 sw (r11+0),r2 } 8009460: 2b 9d 00 04 lw ra,(sp+4) 8009464: 2b 8b 00 0c lw r11,(sp+12) 8009468: 2b 8c 00 08 lw r12,(sp+8) 800946c: 37 9c 00 1c addi sp,sp,28 8009470: c3 a0 00 00 ret =============================================================================== 08003e74 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 8003e74: 37 9c ff ec addi sp,sp,-20 8003e78: 5b 8b 00 0c sw (sp+12),r11 8003e7c: 5b 8c 00 08 sw (sp+8),r12 8003e80: 5b 9d 00 04 sw (sp+4),ra Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 8003e84: 78 01 08 01 mvhi r1,0x801 8003e88: 38 21 30 c4 ori r1,r1,0x30c4 8003e8c: 28 21 00 0c lw r1,(r1+12) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 8003e90: 78 03 08 01 mvhi r3,0x801 8003e94: 38 63 39 54 ori r3,r3,0x3954 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 8003e98: b4 21 08 00 add r1,r1,r1 8003e9c: b4 21 08 00 add r1,r1,r1 8003ea0: b4 21 08 00 add r1,r1,r1 8003ea4: b4 21 10 00 add r2,r1,r1 8003ea8: b4 42 10 00 add r2,r2,r2 8003eac: b4 22 08 00 add r1,r1,r2 8003eb0: b4 21 10 00 add r2,r1,r1 8003eb4: b4 42 10 00 add r2,r2,r2 8003eb8: b4 22 08 00 add r1,r1,r2 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 8003ebc: 28 65 00 00 lw r5,(r3+0) { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 8003ec0: b4 21 20 00 add r4,r1,r1 8003ec4: b4 84 20 00 add r4,r4,r4 8003ec8: b4 24 20 00 add r4,r1,r4 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 8003ecc: 37 8b 00 10 addi r11,sp,16 /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 8003ed0: 34 a5 00 01 addi r5,r5,1 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 8003ed4: 78 01 08 01 mvhi r1,0x801 8003ed8: b9 60 10 00 mv r2,r11 /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 8003edc: 58 65 00 00 sw (r3+0),r5 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 8003ee0: 38 21 38 98 ori r1,r1,0x3898 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 8003ee4: 5b 84 00 14 sw (sp+20),r4 8003ee8: 5b 80 00 10 sw (sp+16),r0 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 8003eec: f8 00 09 79 calli 80064d0 <_Timespec_Add_to> /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 8003ef0: 78 01 08 01 mvhi r1,0x801 8003ef4: b9 60 10 00 mv r2,r11 8003ef8: 38 21 38 a4 ori r1,r1,0x38a4 8003efc: f8 00 09 75 calli 80064d0 <_Timespec_Add_to> 8003f00: b8 20 58 00 mv r11,r1 while ( seconds ) { 8003f04: 44 20 00 07 be r1,r0,8003f20 <_TOD_Tickle_ticks+0xac> 8003f08: 78 0c 08 01 mvhi r12,0x801 8003f0c: 39 8c 38 d4 ori r12,r12,0x38d4 _Watchdog_Tickle_seconds(); seconds--; 8003f10: 35 6b ff ff addi r11,r11,-1 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 8003f14: b9 80 08 00 mv r1,r12 8003f18: f8 00 0b 45 calli 8006c2c <_Watchdog_Tickle> _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); while ( seconds ) { 8003f1c: 5d 60 ff fd bne r11,r0,8003f10 <_TOD_Tickle_ticks+0x9c> <== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 8003f20: 2b 9d 00 04 lw ra,(sp+4) 8003f24: 2b 8b 00 0c lw r11,(sp+12) 8003f28: 2b 8c 00 08 lw r12,(sp+8) 8003f2c: 37 9c 00 14 addi sp,sp,20 8003f30: c3 a0 00 00 ret =============================================================================== 080044d0 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 80044d0: 37 9c ff f4 addi sp,sp,-12 80044d4: 5b 8b 00 0c sw (sp+12),r11 80044d8: 5b 8c 00 08 sw (sp+8),r12 80044dc: 5b 9d 00 04 sw (sp+4),ra uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 80044e0: 78 02 08 02 mvhi r2,0x802 80044e4: 38 42 00 c4 ori r2,r2,0xc4 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 80044e8: b8 20 58 00 mv r11,r1 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 80044ec: 28 42 00 0c lw r2,(r2+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; 80044f0: 34 0c 00 00 mvi r12,0 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) || 80044f4: 44 20 00 22 be r1,r0,800457c <_TOD_Validate+0xac> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 80044f8: 78 03 08 01 mvhi r3,0x801 80044fc: 38 63 d8 08 ori r3,r3,0xd808 8004500: 28 61 00 00 lw r1,(r3+0) 8004504: f8 00 60 7a calli 801c6ec <__udivsi3> rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 8004508: 29 62 00 18 lw r2,(r11+24) 800450c: 50 41 00 1c bgeu r2,r1,800457c <_TOD_Validate+0xac> (the_tod->ticks >= ticks_per_second) || 8004510: 29 62 00 14 lw r2,(r11+20) 8004514: 34 01 00 3b mvi r1,59 8004518: 54 41 00 19 bgu r2,r1,800457c <_TOD_Validate+0xac> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 800451c: 29 62 00 10 lw r2,(r11+16) 8004520: 54 41 00 17 bgu r2,r1,800457c <_TOD_Validate+0xac> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 8004524: 29 62 00 0c lw r2,(r11+12) 8004528: 34 01 00 17 mvi r1,23 800452c: 54 41 00 14 bgu r2,r1,800457c <_TOD_Validate+0xac> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 8004530: 29 61 00 04 lw r1,(r11+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) || 8004534: 44 20 00 12 be r1,r0,800457c <_TOD_Validate+0xac> <== NEVER TAKEN (the_tod->month == 0) || 8004538: 34 02 00 0c mvi r2,12 800453c: 54 22 00 10 bgu r1,r2,800457c <_TOD_Validate+0xac> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 8004540: 29 62 00 00 lw r2,(r11+0) (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) || 8004544: 34 03 07 c3 mvi r3,1987 8004548: 50 62 00 0d bgeu r3,r2,800457c <_TOD_Validate+0xac> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 800454c: 29 63 00 08 lw r3,(r11+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) || 8004550: 44 60 00 0b be r3,r0,800457c <_TOD_Validate+0xac> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 8004554: 20 42 00 03 andi r2,r2,0x3 8004558: 5c 40 00 02 bne r2,r0,8004560 <_TOD_Validate+0x90> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 800455c: 34 21 00 0d addi r1,r1,13 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 8004560: 78 02 08 01 mvhi r2,0x801 8004564: b4 21 08 00 add r1,r1,r1 8004568: 38 42 e0 b8 ori r2,r2,0xe0b8 800456c: b4 21 08 00 add r1,r1,r1 8004570: b4 41 08 00 add r1,r2,r1 8004574: 28 2c 00 00 lw r12,(r1+0) * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 8004578: f1 83 60 00 cmpgeu r12,r12,r3 if ( the_tod->day > days_in_month ) return false; return true; } 800457c: b9 80 08 00 mv r1,r12 8004580: 2b 9d 00 04 lw ra,(sp+4) 8004584: 2b 8b 00 0c lw r11,(sp+12) 8004588: 2b 8c 00 08 lw r12,(sp+8) 800458c: 37 9c 00 0c addi sp,sp,12 8004590: c3 a0 00 00 ret =============================================================================== 08004f2c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 8004f2c: 37 9c ff ec addi sp,sp,-20 8004f30: 5b 8b 00 14 sw (sp+20),r11 8004f34: 5b 8c 00 10 sw (sp+16),r12 8004f38: 5b 8d 00 0c sw (sp+12),r13 8004f3c: 5b 8e 00 08 sw (sp+8),r14 8004f40: 5b 9d 00 04 sw (sp+4),ra 8004f44: b8 20 58 00 mv r11,r1 */ /* * Save original state */ original_state = the_thread->current_state; 8004f48: 28 2d 00 10 lw r13,(r1+16) void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 8004f4c: b8 40 60 00 mv r12,r2 8004f50: 20 6e 00 ff andi r14,r3,0xff /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 8004f54: f8 00 04 a7 calli 80061f0 <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 8004f58: 29 61 00 14 lw r1,(r11+20) 8004f5c: 44 2c 00 04 be r1,r12,8004f6c <_Thread_Change_priority+0x40> _Thread_Set_priority( the_thread, new_priority ); 8004f60: b9 60 08 00 mv r1,r11 8004f64: b9 80 10 00 mv r2,r12 8004f68: f8 00 04 09 calli 8005f8c <_Thread_Set_priority> _ISR_Disable( level ); 8004f6c: 90 00 20 00 rcsr r4,IE 8004f70: 34 02 ff fe mvi r2,-2 8004f74: a0 82 10 00 and r2,r4,r2 8004f78: d0 02 00 00 wcsr IE,r2 /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 8004f7c: 29 61 00 10 lw r1,(r11+16) if ( state != STATES_TRANSIENT ) { 8004f80: 34 05 00 04 mvi r5,4 8004f84: 44 25 00 23 be r1,r5,8005010 <_Thread_Change_priority+0xe4> */ RTEMS_INLINE_ROUTINE bool _States_Is_transient ( States_Control the_states ) { return (the_states & STATES_TRANSIENT); 8004f88: 21 ad 00 04 andi r13,r13,0x4 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 8004f8c: 45 a0 00 0e be r13,r0,8004fc4 <_Thread_Change_priority+0x98><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 8004f90: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 8004f94: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 8004f98: 38 63 23 70 ori r3,r3,0x2370 <== NOT EXECUTED 8004f9c: 28 62 00 00 lw r2,(r3+0) <== NOT EXECUTED 8004fa0: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 8004fa4: 5c 20 00 11 bne r1,r0,8004fe8 <_Thread_Change_priority+0xbc><== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 8004fa8: 2b 9d 00 04 lw ra,(sp+4) 8004fac: 2b 8b 00 14 lw r11,(sp+20) 8004fb0: 2b 8c 00 10 lw r12,(sp+16) 8004fb4: 2b 8d 00 0c lw r13,(sp+12) 8004fb8: 2b 8e 00 08 lw r14,(sp+8) 8004fbc: 37 9c 00 14 addi sp,sp,20 8004fc0: c3 a0 00 00 ret RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 8004fc4: 34 02 ff fb mvi r2,-5 8004fc8: a0 22 10 00 and r2,r1,r2 */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 8004fcc: 59 62 00 10 sw (r11+16),r2 _ISR_Enable( level ); 8004fd0: d0 04 00 00 wcsr IE,r4 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 8004fd4: 78 03 08 01 mvhi r3,0x801 8004fd8: 38 63 23 70 ori r3,r3,0x2370 8004fdc: 28 62 00 00 lw r2,(r3+0) 8004fe0: a0 22 08 00 and r1,r1,r2 if ( _States_Is_waiting_on_thread_queue( state ) ) { 8004fe4: 44 20 ff f1 be r1,r0,8004fa8 <_Thread_Change_priority+0x7c> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 8004fe8: 29 61 00 44 lw r1,(r11+68) 8004fec: b9 60 10 00 mv r2,r11 8004ff0: f8 00 03 aa calli 8005e98 <_Thread_queue_Requeue> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 8004ff4: 2b 9d 00 04 lw ra,(sp+4) 8004ff8: 2b 8b 00 14 lw r11,(sp+20) 8004ffc: 2b 8c 00 10 lw r12,(sp+16) 8005000: 2b 8d 00 0c lw r13,(sp+12) 8005004: 2b 8e 00 08 lw r14,(sp+8) 8005008: 37 9c 00 14 addi sp,sp,20 800500c: c3 a0 00 00 ret 8005010: 78 01 08 01 mvhi r1,0x801 */ RTEMS_INLINE_ROUTINE bool _States_Is_transient ( States_Control the_states ) { return (the_states & STATES_TRANSIENT); 8005014: 21 ad 00 04 andi r13,r13,0x4 8005018: 38 21 38 bc ori r1,r1,0x38bc } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 800501c: 5d a0 00 13 bne r13,r0,8005068 <_Thread_Change_priority+0x13c><== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8005020: 29 63 00 90 lw r3,(r11+144) 8005024: 2d 65 00 96 lhu r5,(r11+150) * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 8005028: 59 60 00 10 sw (r11+16),r0 800502c: 2c 66 00 00 lhu r6,(r3+0) 8005030: b8 c5 28 00 or r5,r6,r5 8005034: 0c 65 00 00 sh (r3+0),r5 _Priority_Major_bit_map |= the_priority_map->ready_major; 8005038: 2c 23 00 00 lhu r3,(r1+0) 800503c: 2d 65 00 94 lhu r5,(r11+148) 8005040: b8 a3 18 00 or r3,r5,r3 8005044: 20 63 ff ff andi r3,r3,0xffff 8005048: 0c 23 00 00 sh (r1+0),r3 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 800504c: 45 cd 00 52 be r14,r13,8005194 <_Thread_Change_priority+0x268> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 8005050: 29 63 00 8c lw r3,(r11+140) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 8005054: 28 65 00 00 lw r5,(r3+0) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 8005058: 59 63 00 04 sw (r11+4),r3 before_node = after_node->next; after_node->next = the_node; 800505c: 58 6b 00 00 sw (r3+0),r11 the_node->next = before_node; 8005060: 59 65 00 00 sw (r11+0),r5 before_node->previous = the_node; 8005064: 58 ab 00 04 sw (r5+4),r11 _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 8005068: d0 04 00 00 wcsr IE,r4 800506c: d0 02 00 00 wcsr IE,r2 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 8005070: 2c 22 00 00 lhu r2,(r1+0) */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 8005074: 78 01 08 01 mvhi r1,0x801 8005078: 38 21 37 b0 ori r1,r1,0x37b0 800507c: 28 26 00 00 lw r6,(r1+0) 8005080: 20 42 ff ff andi r2,r2,0xffff 8005084: 34 01 00 ff mvi r1,255 8005088: 54 41 00 07 bgu r2,r1,80050a4 <_Thread_Change_priority+0x178> 800508c: 78 03 08 01 mvhi r3,0x801 8005090: 38 63 22 08 ori r3,r3,0x2208 8005094: b4 62 10 00 add r2,r3,r2 8005098: 40 42 00 00 lbu r2,(r2+0) 800509c: 34 42 00 08 addi r2,r2,8 80050a0: e0 00 00 0d bi 80050d4 <_Thread_Change_priority+0x1a8> 80050a4: 00 42 00 01 srui r2,r2,1 80050a8: 78 03 08 01 mvhi r3,0x801 80050ac: 00 42 00 01 srui r2,r2,1 80050b0: 38 63 22 08 ori r3,r3,0x2208 80050b4: 00 42 00 01 srui r2,r2,1 80050b8: 00 42 00 01 srui r2,r2,1 80050bc: 00 42 00 01 srui r2,r2,1 80050c0: 00 42 00 01 srui r2,r2,1 80050c4: 00 42 00 01 srui r2,r2,1 80050c8: 00 42 00 01 srui r2,r2,1 80050cc: b4 62 10 00 add r2,r3,r2 80050d0: 40 42 00 00 lbu r2,(r2+0) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 80050d4: 78 05 08 01 mvhi r5,0x801 80050d8: 38 a5 39 30 ori r5,r5,0x3930 80050dc: b4 42 10 00 add r2,r2,r2 80050e0: b4 a2 28 00 add r5,r5,r2 80050e4: 2c a1 00 00 lhu r1,(r5+0) 80050e8: 34 05 00 ff mvi r5,255 80050ec: 54 25 00 1f bgu r1,r5,8005168 <_Thread_Change_priority+0x23c> 80050f0: b4 61 08 00 add r1,r3,r1 80050f4: 40 23 00 00 lbu r3,(r1+0) 80050f8: 34 63 00 08 addi r3,r3,8 return (_Priority_Bits_index( major ) << 4) + 80050fc: b4 42 08 00 add r1,r2,r2 8005100: b4 21 08 00 add r1,r1,r1 8005104: b4 21 08 00 add r1,r1,r1 8005108: b4 61 08 00 add r1,r3,r1 800510c: b4 21 10 00 add r2,r1,r1 8005110: b4 41 08 00 add r1,r2,r1 8005114: b4 21 08 00 add r1,r1,r1 8005118: b4 21 08 00 add r1,r1,r1 800511c: b4 c1 08 00 add r1,r6,r1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 8005120: 78 02 08 01 mvhi r2,0x801 8005124: 38 42 39 e8 ori r2,r2,0x39e8 8005128: 28 21 00 00 lw r1,(r1+0) * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 800512c: 28 43 00 0c lw r3,(r2+12) * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 8005130: 58 41 00 10 sw (r2+16),r1 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 8005134: 44 23 00 05 be r1,r3,8005148 <_Thread_Change_priority+0x21c> 8005138: 40 61 00 74 lbu r1,(r3+116) 800513c: 44 20 00 03 be r1,r0,8005148 <_Thread_Change_priority+0x21c> _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; 8005140: 34 01 00 01 mvi r1,1 8005144: 30 41 00 18 sb (r2+24),r1 _ISR_Enable( level ); 8005148: d0 04 00 00 wcsr IE,r4 } 800514c: 2b 9d 00 04 lw ra,(sp+4) 8005150: 2b 8b 00 14 lw r11,(sp+20) 8005154: 2b 8c 00 10 lw r12,(sp+16) 8005158: 2b 8d 00 0c lw r13,(sp+12) 800515c: 2b 8e 00 08 lw r14,(sp+8) 8005160: 37 9c 00 14 addi sp,sp,20 8005164: c3 a0 00 00 ret { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 8005168: 00 21 00 01 srui r1,r1,1 800516c: 00 21 00 01 srui r1,r1,1 8005170: 00 21 00 01 srui r1,r1,1 8005174: 00 21 00 01 srui r1,r1,1 8005178: 00 21 00 01 srui r1,r1,1 800517c: 00 21 00 01 srui r1,r1,1 8005180: 00 21 00 01 srui r1,r1,1 8005184: 00 21 00 01 srui r1,r1,1 8005188: b4 61 08 00 add r1,r3,r1 800518c: 40 23 00 00 lbu r3,(r1+0) 8005190: e3 ff ff db bi 80050fc <_Thread_Change_priority+0x1d0> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 8005194: 29 63 00 8c lw r3,(r11+140) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 8005198: 28 65 00 08 lw r5,(r3+8) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800519c: 34 66 00 04 addi r6,r3,4 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 80051a0: 59 66 00 00 sw (r11+0),r6 old_last_node = the_chain->last; the_chain->last = the_node; 80051a4: 58 6b 00 08 sw (r3+8),r11 old_last_node->next = the_node; 80051a8: 58 ab 00 00 sw (r5+0),r11 the_node->previous = old_last_node; 80051ac: 59 65 00 04 sw (r11+4),r5 80051b0: e3 ff ff ae bi 8005068 <_Thread_Change_priority+0x13c> =============================================================================== 0800991c <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 800991c: 90 00 18 00 rcsr r3,IE 8009920: 34 05 ff fe mvi r5,-2 8009924: a0 65 28 00 and r5,r3,r5 8009928: d0 05 00 00 wcsr IE,r5 current_state = the_thread->current_state; 800992c: 28 24 00 10 lw r4,(r1+16) if ( current_state & state ) { 8009930: a0 44 30 00 and r6,r2,r4 8009934: 44 c0 00 26 be r6,r0,80099cc <_Thread_Clear_state+0xb0> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 8009938: a4 40 10 00 not r2,r2 800993c: a0 44 20 00 and r4,r2,r4 current_state = the_thread->current_state = _States_Clear( state, current_state ); 8009940: 58 24 00 10 sw (r1+16),r4 if ( _States_Is_ready( current_state ) ) { 8009944: 5c 80 00 22 bne r4,r0,80099cc <_Thread_Clear_state+0xb0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8009948: 28 26 00 90 lw r6,(r1+144) 800994c: 2c 27 00 96 lhu r7,(r1+150) _Priority_Major_bit_map |= the_priority_map->ready_major; 8009950: 78 02 08 01 mvhi r2,0x801 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8009954: 2c c8 00 00 lhu r8,(r6+0) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 8009958: 28 24 00 8c lw r4,(r1+140) _Priority_Major_bit_map |= the_priority_map->ready_major; 800995c: 38 42 38 bc ori r2,r2,0x38bc RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8009960: b9 07 38 00 or r7,r8,r7 8009964: 0c c7 00 00 sh (r6+0),r7 _Priority_Major_bit_map |= the_priority_map->ready_major; 8009968: 2c 48 00 00 lhu r8,(r2+0) 800996c: 2c 29 00 94 lhu r9,(r1+148) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 8009970: 28 86 00 08 lw r6,(r4+8) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8009974: 34 87 00 04 addi r7,r4,4 8009978: b9 28 40 00 or r8,r9,r8 800997c: 21 08 ff ff andi r8,r8,0xffff 8009980: 0c 48 00 00 sh (r2+0),r8 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8009984: 58 27 00 00 sw (r1+0),r7 old_last_node = the_chain->last; the_chain->last = the_node; 8009988: 58 81 00 08 sw (r4+8),r1 old_last_node->next = the_node; 800998c: 58 c1 00 00 sw (r6+0),r1 the_node->previous = old_last_node; 8009990: 58 26 00 04 sw (r1+4),r6 _ISR_Flash( level ); 8009994: d0 03 00 00 wcsr IE,r3 8009998: d0 05 00 00 wcsr IE,r5 * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 800999c: 78 02 08 01 mvhi r2,0x801 80099a0: 38 42 39 e8 ori r2,r2,0x39e8 80099a4: 28 45 00 10 lw r5,(r2+16) 80099a8: 28 24 00 14 lw r4,(r1+20) 80099ac: 28 a5 00 14 lw r5,(r5+20) 80099b0: 50 85 00 07 bgeu r4,r5,80099cc <_Thread_Clear_state+0xb0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 80099b4: 28 45 00 0c lw r5,(r2+12) * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 80099b8: 58 41 00 10 sw (r2+16),r1 if ( _Thread_Executing->is_preemptible || 80099bc: 40 a1 00 74 lbu r1,(r5+116) 80099c0: 44 20 00 05 be r1,r0,80099d4 <_Thread_Clear_state+0xb8> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 80099c4: 34 01 00 01 mvi r1,1 80099c8: 30 41 00 18 sb (r2+24),r1 } } } _ISR_Enable( level ); 80099cc: d0 03 00 00 wcsr IE,r3 } 80099d0: c3 a0 00 00 ret * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 80099d4: 44 81 ff fc be r4,r1,80099c4 <_Thread_Clear_state+0xa8> <== NEVER TAKEN 80099d8: e3 ff ff fd bi 80099cc <_Thread_Clear_state+0xb0> =============================================================================== 0800c4ac <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 800c4ac: 37 9c ff f8 addi sp,sp,-8 800c4b0: 5b 9d 00 04 sw (sp+4),ra Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 800c4b4: 37 82 00 08 addi r2,sp,8 800c4b8: f8 00 00 8a calli 800c6e0 <_Thread_Get> switch ( location ) { 800c4bc: 2b 82 00 08 lw r2,(sp+8) 800c4c0: 5c 40 00 0a bne r2,r0,800c4e8 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 800c4c4: 78 03 08 02 mvhi r3,0x802 800c4c8: 38 63 5f 88 ori r3,r3,0x5f88 800c4cc: 28 62 00 00 lw r2,(r3+0) 800c4d0: fb ff ff 57 calli 800c22c <_Thread_Clear_state> 800c4d4: 78 01 08 02 mvhi r1,0x802 800c4d8: 38 21 89 9c ori r1,r1,0x899c 800c4dc: 28 22 00 00 lw r2,(r1+0) 800c4e0: 34 42 ff ff addi r2,r2,-1 800c4e4: 58 22 00 00 sw (r1+0),r2 | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 800c4e8: 2b 9d 00 04 lw ra,(sp+4) 800c4ec: 37 9c 00 08 addi sp,sp,8 800c4f0: c3 a0 00 00 ret =============================================================================== 08005374 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 8005374: 37 9c ff bc addi sp,sp,-68 8005378: 5b 8b 00 34 sw (sp+52),r11 800537c: 5b 8c 00 30 sw (sp+48),r12 8005380: 5b 8d 00 2c sw (sp+44),r13 8005384: 5b 8e 00 28 sw (sp+40),r14 8005388: 5b 8f 00 24 sw (sp+36),r15 800538c: 5b 90 00 20 sw (sp+32),r16 8005390: 5b 91 00 1c sw (sp+28),r17 8005394: 5b 92 00 18 sw (sp+24),r18 8005398: 5b 93 00 14 sw (sp+20),r19 800539c: 5b 94 00 10 sw (sp+16),r20 80053a0: 5b 95 00 0c sw (sp+12),r21 80053a4: 5b 96 00 08 sw (sp+8),r22 80053a8: 5b 9d 00 04 sw (sp+4),ra Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 80053ac: 78 01 08 01 mvhi r1,0x801 80053b0: 38 21 39 e8 ori r1,r1,0x39e8 80053b4: 28 2c 00 0c lw r12,(r1+12) _ISR_Disable( level ); 80053b8: 90 00 08 00 rcsr r1,IE 80053bc: 34 02 ff fe mvi r2,-2 80053c0: a0 22 10 00 and r2,r1,r2 80053c4: d0 02 00 00 wcsr IE,r2 while ( _Context_Switch_necessary == true ) { 80053c8: 78 0e 08 01 mvhi r14,0x801 80053cc: 39 ce 39 e8 ori r14,r14,0x39e8 80053d0: 41 c2 00 18 lbu r2,(r14+24) 80053d4: 78 10 08 01 mvhi r16,0x801 Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 80053d8: b8 20 20 00 mv r4,r1 while ( _Context_Switch_necessary == true ) { 80053dc: 20 42 00 ff andi r2,r2,0xff 80053e0: 3a 10 38 1c ori r16,r16,0x381c 80053e4: 44 40 00 40 be r2,r0,80054e4 <_Thread_Dispatch+0x170> heir = _Thread_Heir; 80053e8: 29 cb 00 10 lw r11,(r14+16) _Thread_Dispatch_disable_level = 1; 80053ec: 34 02 00 01 mvi r2,1 80053f0: 5a 02 00 00 sw (r16+0),r2 _Context_Switch_necessary = false; 80053f4: 31 c0 00 18 sb (r14+24),r0 _Thread_Executing = heir; 80053f8: 59 cb 00 0c sw (r14+12),r11 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 80053fc: 45 8b 00 3a be r12,r11,80054e4 <_Thread_Dispatch+0x170> 8005400: 78 0f 08 01 mvhi r15,0x801 8005404: 78 14 08 01 mvhi r20,0x801 #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 8005408: 78 15 08 01 mvhi r21,0x801 800540c: 37 92 00 40 addi r18,sp,64 8005410: 39 ef 38 cc ori r15,r15,0x38cc 8005414: 37 91 00 38 addi r17,sp,56 8005418: 3a 94 38 a0 ori r20,r20,0x38a0 */ #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 800541c: 34 13 00 01 mvi r19,1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 8005420: 3a b5 37 b4 ori r21,r21,0x37b4 #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 8005424: 34 16 ff fe mvi r22,-2 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 8005428: b9 c0 68 00 mv r13,r14 800542c: e0 00 00 29 bi 80054d0 <_Thread_Dispatch+0x15c> rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 8005430: d0 01 00 00 wcsr IE,r1 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 8005434: ba 40 08 00 mv r1,r18 8005438: f8 00 0f ea calli 80093e0 <_TOD_Get_uptime> _Timestamp_Subtract( 800543c: ba 20 18 00 mv r3,r17 8005440: b9 e0 08 00 mv r1,r15 8005444: ba 40 10 00 mv r2,r18 8005448: f8 00 04 39 calli 800652c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 800544c: ba 20 10 00 mv r2,r17 8005450: 35 81 00 84 addi r1,r12,132 8005454: f8 00 04 1f calli 80064d0 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 8005458: 2b 83 00 40 lw r3,(sp+64) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 800545c: 2a 84 00 00 lw r4,(r20+0) executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 8005460: b9 80 08 00 mv r1,r12 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 8005464: 59 e3 00 00 sw (r15+0),r3 8005468: 2b 83 00 44 lw r3,(sp+68) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 800546c: b9 60 10 00 mv r2,r11 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 8005470: 59 e3 00 04 sw (r15+4),r3 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 8005474: 44 80 00 05 be r4,r0,8005488 <_Thread_Dispatch+0x114> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 8005478: 28 83 00 00 lw r3,(r4+0) 800547c: 59 83 01 20 sw (r12+288),r3 *_Thread_libc_reent = heir->libc_reent; 8005480: 29 63 01 20 lw r3,(r11+288) 8005484: 58 83 00 00 sw (r4+0),r3 } _User_extensions_Thread_switch( executing, heir ); 8005488: f8 00 05 30 calli 8006948 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 800548c: 35 81 00 cc addi r1,r12,204 8005490: 35 62 00 cc addi r2,r11,204 8005494: f8 00 06 63 calli 8006e20 <_CPU_Context_switch> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 8005498: 29 cc 00 0c lw r12,(r14+12) _ISR_Disable( level ); 800549c: 90 00 20 00 rcsr r4,IE 80054a0: a0 96 08 00 and r1,r4,r22 80054a4: d0 01 00 00 wcsr IE,r1 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 80054a8: 41 a2 00 18 lbu r2,(r13+24) 80054ac: b9 a0 70 00 mv r14,r13 #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 80054b0: b8 80 08 00 mv r1,r4 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 80054b4: 20 42 00 ff andi r2,r2,0xff 80054b8: 44 40 00 0b be r2,r0,80054e4 <_Thread_Dispatch+0x170> <== ALWAYS TAKEN heir = _Thread_Heir; 80054bc: 29 ab 00 10 lw r11,(r13+16) <== NOT EXECUTED _Thread_Dispatch_disable_level = 1; 80054c0: 5a 13 00 00 sw (r16+0),r19 <== NOT EXECUTED _Context_Switch_necessary = false; 80054c4: 31 a0 00 18 sb (r13+24),r0 <== NOT EXECUTED _Thread_Executing = heir; 80054c8: 59 ab 00 0c sw (r13+12),r11 <== NOT EXECUTED /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 80054cc: 45 6c 00 06 be r11,r12,80054e4 <_Thread_Dispatch+0x170> <== NOT EXECUTED */ #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 80054d0: 29 62 00 7c lw r2,(r11+124) 80054d4: 5c 53 ff d7 bne r2,r19,8005430 <_Thread_Dispatch+0xbc> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 80054d8: 2a a2 00 00 lw r2,(r21+0) 80054dc: 59 62 00 78 sw (r11+120),r2 80054e0: e3 ff ff d4 bi 8005430 <_Thread_Dispatch+0xbc> _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 80054e4: 5a 00 00 00 sw (r16+0),r0 _ISR_Enable( level ); 80054e8: d0 04 00 00 wcsr IE,r4 _API_extensions_Run_postswitch(); 80054ec: fb ff f8 94 calli 800373c <_API_extensions_Run_postswitch> } 80054f0: 2b 9d 00 04 lw ra,(sp+4) 80054f4: 2b 8b 00 34 lw r11,(sp+52) 80054f8: 2b 8c 00 30 lw r12,(sp+48) 80054fc: 2b 8d 00 2c lw r13,(sp+44) 8005500: 2b 8e 00 28 lw r14,(sp+40) 8005504: 2b 8f 00 24 lw r15,(sp+36) 8005508: 2b 90 00 20 lw r16,(sp+32) 800550c: 2b 91 00 1c lw r17,(sp+28) 8005510: 2b 92 00 18 lw r18,(sp+24) 8005514: 2b 93 00 14 lw r19,(sp+20) 8005518: 2b 94 00 10 lw r20,(sp+16) 800551c: 2b 95 00 0c lw r21,(sp+12) 8005520: 2b 96 00 08 lw r22,(sp+8) 8005524: 37 9c 00 44 addi sp,sp,68 8005528: c3 a0 00 00 ret =============================================================================== 08005560 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 8005560: 37 9c ff f0 addi sp,sp,-16 8005564: 5b 8b 00 10 sw (sp+16),r11 8005568: 5b 8c 00 0c sw (sp+12),r12 800556c: 5b 8d 00 08 sw (sp+8),r13 8005570: 5b 9d 00 04 sw (sp+4),ra 8005574: b8 20 58 00 mv r11,r1 8005578: b8 40 60 00 mv r12,r2 uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 800557c: 44 20 00 28 be r1,r0,800561c <_Thread_Get+0xbc> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 8005580: 34 02 00 18 mvi r2,24 8005584: f8 00 2e 5e calli 8010efc <__lshrsi3> 8005588: 20 2d 00 07 andi r13,r1,0x7 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 800558c: 35 a1 ff ff addi r1,r13,-1 8005590: 34 02 00 02 mvi r2,2 8005594: 50 41 00 0a bgeu r2,r1,80055bc <_Thread_Get+0x5c> goto done; } the_api = _Objects_Get_API( id ); if ( !_Objects_Is_api_valid( the_api ) ) { *location = OBJECTS_ERROR; 8005598: 34 01 00 01 mvi r1,1 800559c: 59 81 00 00 sw (r12+0),r1 { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; 80055a0: 34 01 00 00 mvi r1,0 tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 80055a4: 2b 9d 00 04 lw ra,(sp+4) 80055a8: 2b 8b 00 10 lw r11,(sp+16) 80055ac: 2b 8c 00 0c lw r12,(sp+12) 80055b0: 2b 8d 00 08 lw r13,(sp+8) 80055b4: 37 9c 00 10 addi sp,sp,16 80055b8: c3 a0 00 00 ret */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 80055bc: b9 60 08 00 mv r1,r11 80055c0: 34 02 00 1b mvi r2,27 80055c4: f8 00 2e 4e calli 8010efc <__lshrsi3> 80055c8: b8 20 20 00 mv r4,r1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 80055cc: 34 01 00 01 mvi r1,1 80055d0: 5c 81 00 22 bne r4,r1,8005658 <_Thread_Get+0xf8> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 80055d4: 78 03 08 01 mvhi r3,0x801 80055d8: b5 ad 10 00 add r2,r13,r13 80055dc: 38 63 37 b8 ori r3,r3,0x37b8 80055e0: b4 42 10 00 add r2,r2,r2 80055e4: b4 62 10 00 add r2,r3,r2 80055e8: 28 41 00 00 lw r1,(r2+0) if ( !api_information ) { 80055ec: 44 20 00 23 be r1,r0,8005678 <_Thread_Get+0x118> <== NEVER TAKEN *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 80055f0: 28 21 00 04 lw r1,(r1+4) if ( !information ) { 80055f4: 44 20 00 21 be r1,r0,8005678 <_Thread_Get+0x118> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 80055f8: b9 60 10 00 mv r2,r11 80055fc: b9 80 18 00 mv r3,r12 8005600: fb ff fd 3a calli 8004ae8 <_Objects_Get> done: return tp; } 8005604: 2b 9d 00 04 lw ra,(sp+4) 8005608: 2b 8b 00 10 lw r11,(sp+16) 800560c: 2b 8c 00 0c lw r12,(sp+12) 8005610: 2b 8d 00 08 lw r13,(sp+8) 8005614: 37 9c 00 10 addi sp,sp,16 8005618: c3 a0 00 00 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 800561c: 78 01 08 01 mvhi r1,0x801 8005620: 38 21 38 1c ori r1,r1,0x381c 8005624: 28 22 00 00 lw r2,(r1+0) 8005628: 34 42 00 01 addi r2,r2,1 800562c: 58 22 00 00 sw (r1+0),r2 Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 8005630: 78 01 08 01 mvhi r1,0x801 8005634: 38 21 39 e8 ori r1,r1,0x39e8 8005638: 28 21 00 0c lw r1,(r1+12) Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 800563c: 59 80 00 00 sw (r12+0),r0 tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 8005640: 2b 9d 00 04 lw ra,(sp+4) 8005644: 2b 8b 00 10 lw r11,(sp+16) 8005648: 2b 8c 00 0c lw r12,(sp+12) 800564c: 2b 8d 00 08 lw r13,(sp+8) 8005650: 37 9c 00 10 addi sp,sp,16 8005654: c3 a0 00 00 ret goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; 8005658: 59 81 00 00 sw (r12+0),r1 { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; 800565c: 34 01 00 00 mvi r1,0 tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 8005660: 2b 9d 00 04 lw ra,(sp+4) 8005664: 2b 8b 00 10 lw r11,(sp+16) 8005668: 2b 8c 00 0c lw r12,(sp+12) 800566c: 2b 8d 00 08 lw r13,(sp+8) 8005670: 37 9c 00 10 addi sp,sp,16 8005674: c3 a0 00 00 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 8005678: 59 84 00 00 sw (r12+0),r4 goto done; 800567c: e3 ff ff e2 bi 8005604 <_Thread_Get+0xa4> =============================================================================== 0800b8e8 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 800b8e8: 37 9c ff f4 addi sp,sp,-12 800b8ec: 5b 8b 00 0c sw (sp+12),r11 800b8f0: 5b 8c 00 08 sw (sp+8),r12 800b8f4: 5b 9d 00 04 sw (sp+4),ra #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 800b8f8: 78 01 08 01 mvhi r1,0x801 800b8fc: 38 21 39 e8 ori r1,r1,0x39e8 800b900: 28 2b 00 0c lw r11,(r1+12) /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 800b904: 29 61 00 b8 lw r1,(r11+184) _ISR_Set_level(level); 800b908: 64 21 00 00 cmpei r1,r1,0 800b90c: d0 01 00 00 wcsr IE,r1 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 800b910: 78 02 08 01 mvhi r2,0x801 800b914: 38 42 36 30 ori r2,r2,0x3630 800b918: 40 4c 00 00 lbu r12,(r2+0) doneConstructors = 1; 800b91c: 34 03 00 01 mvi r3,1 /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 800b920: b9 60 08 00 mv r1,r11 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 800b924: 30 43 00 00 sb (r2+0),r3 /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 800b928: fb ff eb 5c calli 8006698 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 800b92c: fb ff e7 00 calli 800552c <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 800b930: 45 80 00 09 be r12,r0,800b954 <_Thread_Handler+0x6c> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 800b934: 29 61 00 a0 lw r1,(r11+160) 800b938: 44 20 00 0a be r1,r0,800b960 <_Thread_Handler+0x78> <== ALWAYS TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 800b93c: b9 60 08 00 mv r1,r11 800b940: fb ff eb 6e calli 80066f8 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 800b944: 34 01 00 00 mvi r1,0 800b948: 34 02 00 01 mvi r2,1 800b94c: 34 03 00 05 mvi r3,5 800b950: fb ff e2 b9 calli 8004434 <_Internal_error_Occurred> * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 800b954: fb ff d1 ab calli 8000000 } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 800b958: 29 61 00 a0 lw r1,(r11+160) 800b95c: 5c 20 ff f8 bne r1,r0,800b93c <_Thread_Handler+0x54> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 800b960: 29 62 00 9c lw r2,(r11+156) 800b964: 29 61 00 a8 lw r1,(r11+168) 800b968: d8 40 00 00 call r2 INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 800b96c: 59 61 00 28 sw (r11+40),r1 800b970: e3 ff ff f3 bi 800b93c <_Thread_Handler+0x54> =============================================================================== 08005680 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 8005680: 37 9c ff e0 addi sp,sp,-32 8005684: 5b 8b 00 20 sw (sp+32),r11 8005688: 5b 8c 00 1c sw (sp+28),r12 800568c: 5b 8d 00 18 sw (sp+24),r13 8005690: 5b 8e 00 14 sw (sp+20),r14 8005694: 5b 8f 00 10 sw (sp+16),r15 8005698: 5b 90 00 0c sw (sp+12),r16 800569c: 5b 91 00 08 sw (sp+8),r17 80056a0: 5b 9d 00 04 sw (sp+4),ra /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 80056a4: 58 40 01 24 sw (r2+292),r0 80056a8: 58 40 01 28 sw (r2+296),r0 extensions_area = NULL; the_thread->libc_reent = NULL; 80056ac: 58 40 01 20 sw (r2+288),r0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 80056b0: b8 40 58 00 mv r11,r2 80056b4: b8 20 78 00 mv r15,r1 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 80056b8: b8 40 08 00 mv r1,r2 80056bc: b8 80 10 00 mv r2,r4 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 80056c0: b8 80 60 00 mv r12,r4 80056c4: b8 c0 68 00 mv r13,r6 80056c8: b9 00 88 00 mv r17,r8 80056cc: 20 f0 00 ff andi r16,r7,0xff /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 80056d0: f8 00 02 eb calli 800627c <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 80056d4: f5 81 60 00 cmpgu r12,r12,r1 80056d8: 64 22 00 00 cmpei r2,r1,0 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 80056dc: b8 20 18 00 mv r3,r1 if ( !actual_stack_size || actual_stack_size < stack_size ) 80056e0: b9 82 60 00 or r12,r12,r2 return false; /* stack allocation failed */ 80056e4: 34 05 00 00 mvi r5,0 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) 80056e8: 5d 80 00 3a bne r12,r0,80057d0 <_Thread_Initialize+0x150> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 80056ec: 78 0e 08 01 mvhi r14,0x801 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 80056f0: 29 61 00 c8 lw r1,(r11+200) 80056f4: 39 ce 38 ac ori r14,r14,0x38ac 80056f8: 29 c2 00 00 lw r2,(r14+0) 80056fc: 59 61 00 c4 sw (r11+196),r1 the_stack->size = size; 8005700: 59 63 00 c0 sw (r11+192),r3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 8005704: 59 60 00 50 sw (r11+80),r0 the_watchdog->routine = routine; 8005708: 59 60 00 64 sw (r11+100),r0 the_watchdog->id = id; 800570c: 59 60 00 68 sw (r11+104),r0 the_watchdog->user_data = user_data; 8005710: 59 60 00 6c sw (r11+108),r0 8005714: 5c 4c 00 3a bne r2,r12,80057fc <_Thread_Initialize+0x17c> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 8005718: 59 60 01 2c sw (r11+300),r0 * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 800571c: 34 0c 00 00 mvi r12,0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 8005720: 2b 83 00 24 lw r3,(sp+36) the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 8005724: b9 60 08 00 mv r1,r11 8005728: b9 a0 10 00 mv r2,r13 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 800572c: 59 63 00 b4 sw (r11+180),r3 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 8005730: 2b 83 00 28 lw r3,(sp+40) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 8005734: 31 70 00 ac sb (r11+172),r16 the_thread->Start.budget_algorithm = budget_algorithm; 8005738: 59 71 00 b0 sw (r11+176),r17 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 800573c: 59 63 00 b8 sw (r11+184),r3 the_thread->current_state = STATES_DORMANT; 8005740: 34 03 00 01 mvi r3,1 8005744: 59 63 00 10 sw (r11+16),r3 the_thread->Wait.queue = NULL; 8005748: 59 60 00 44 sw (r11+68),r0 the_thread->resource_count = 0; 800574c: 59 60 00 1c sw (r11+28),r0 the_thread->real_priority = priority; 8005750: 59 6d 00 18 sw (r11+24),r13 the_thread->Start.initial_priority = priority; 8005754: 59 6d 00 bc sw (r11+188),r13 _Thread_Set_priority( the_thread, priority ); 8005758: f8 00 02 0d calli 8005f8c <_Thread_Set_priority> Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 800575c: 2d 62 00 0a lhu r2,(r11+10) _Thread_Stack_Free( the_thread ); return false; } 8005760: 29 e3 00 1c lw r3,(r15+28) /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 8005764: 59 60 00 84 sw (r11+132),r0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 8005768: b4 42 08 00 add r1,r2,r2 800576c: b4 21 08 00 add r1,r1,r1 8005770: b4 61 08 00 add r1,r3,r1 8005774: 59 60 00 88 sw (r11+136),r0 8005778: 58 2b 00 00 sw (r1+0),r11 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 800577c: 2b 81 00 2c lw r1,(sp+44) 8005780: 59 61 00 0c sw (r11+12),r1 * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 8005784: b9 60 08 00 mv r1,r11 8005788: f8 00 04 10 calli 80067c8 <_User_extensions_Thread_create> if ( extension_status ) return true; 800578c: 34 05 00 01 mvi r5,1 * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) 8005790: 5c 20 00 10 bne r1,r0,80057d0 <_Thread_Initialize+0x150> return true; failed: if ( the_thread->libc_reent ) 8005794: 29 61 01 20 lw r1,(r11+288) 8005798: 44 20 00 02 be r1,r0,80057a0 <_Thread_Initialize+0x120> _Workspace_Free( the_thread->libc_reent ); 800579c: f8 00 05 89 calli 8006dc0 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 80057a0: 29 61 01 24 lw r1,(r11+292) 80057a4: 44 20 00 02 be r1,r0,80057ac <_Thread_Initialize+0x12c> _Workspace_Free( the_thread->API_Extensions[i] ); 80057a8: f8 00 05 86 calli 8006dc0 <_Workspace_Free> failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 80057ac: 29 61 01 28 lw r1,(r11+296) 80057b0: 44 20 00 02 be r1,r0,80057b8 <_Thread_Initialize+0x138> <== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 80057b4: f8 00 05 83 calli 8006dc0 <_Workspace_Free> <== NOT EXECUTED if ( extensions_area ) 80057b8: 45 80 00 03 be r12,r0,80057c4 <_Thread_Initialize+0x144> (void) _Workspace_Free( extensions_area ); 80057bc: b9 80 08 00 mv r1,r12 80057c0: f8 00 05 80 calli 8006dc0 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 80057c4: b9 60 08 00 mv r1,r11 80057c8: f8 00 02 cc calli 80062f8 <_Thread_Stack_Free> return false; 80057cc: 34 05 00 00 mvi r5,0 } 80057d0: b8 a0 08 00 mv r1,r5 80057d4: 2b 9d 00 04 lw ra,(sp+4) 80057d8: 2b 8b 00 20 lw r11,(sp+32) 80057dc: 2b 8c 00 1c lw r12,(sp+28) 80057e0: 2b 8d 00 18 lw r13,(sp+24) 80057e4: 2b 8e 00 14 lw r14,(sp+20) 80057e8: 2b 8f 00 10 lw r15,(sp+16) 80057ec: 2b 90 00 0c lw r16,(sp+12) 80057f0: 2b 91 00 08 lw r17,(sp+8) 80057f4: 37 9c 00 20 addi sp,sp,32 80057f8: c3 a0 00 00 ret /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 80057fc: 34 42 00 01 addi r2,r2,1 (_Thread_Maximum_extensions + 1) * sizeof( void * ) 8005800: b4 42 10 00 add r2,r2,r2 8005804: b4 42 10 00 add r2,r2,r2 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 8005808: b8 40 08 00 mv r1,r2 800580c: f8 00 05 62 calli 8006d94 <_Workspace_Allocate> 8005810: b8 20 60 00 mv r12,r1 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 8005814: 44 20 ff e0 be r1,r0,8005794 <_Thread_Initialize+0x114> goto failed; } the_thread->extensions = (void **) extensions_area; 8005818: 29 c5 00 00 lw r5,(r14+0) 800581c: 59 61 01 2c sw (r11+300),r1 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 8005820: 34 03 00 00 mvi r3,0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 8005824: 34 04 00 00 mvi r4,0 * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 8005828: b4 63 18 00 add r3,r3,r3 800582c: b4 63 18 00 add r3,r3,r3 8005830: b5 83 18 00 add r3,r12,r3 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 8005834: 34 84 00 01 addi r4,r4,1 the_thread->extensions[i] = NULL; 8005838: 58 60 00 00 sw (r3+0),r0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 800583c: b8 80 18 00 mv r3,r4 8005840: 50 a4 ff fa bgeu r5,r4,8005828 <_Thread_Initialize+0x1a8> 8005844: e3 ff ff b7 bi 8005720 <_Thread_Initialize+0xa0> =============================================================================== 08006ee0 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 8006ee0: 37 9c ff ec addi sp,sp,-20 8006ee4: 5b 8b 00 0c sw (sp+12),r11 8006ee8: 5b 8c 00 08 sw (sp+8),r12 8006eec: 5b 9d 00 04 sw (sp+4),ra */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); 8006ef0: 28 24 00 10 lw r4,(r1+16) 8006ef4: b8 20 58 00 mv r11,r1 _Thread_Restart_self(); return true; } return false; 8006ef8: 34 0c 00 00 mvi r12,0 8006efc: 20 84 00 01 andi r4,r4,0x1 Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 8006f00: 44 80 00 07 be r4,r0,8006f1c <_Thread_Restart+0x3c> return true; } return false; } 8006f04: b9 80 08 00 mv r1,r12 8006f08: 2b 9d 00 04 lw ra,(sp+4) 8006f0c: 2b 8b 00 0c lw r11,(sp+12) 8006f10: 2b 8c 00 08 lw r12,(sp+8) 8006f14: 37 9c 00 14 addi sp,sp,20 8006f18: c3 a0 00 00 ret Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 8006f1c: 5b 82 00 14 sw (sp+20),r2 8006f20: 5b 83 00 10 sw (sp+16),r3 8006f24: f8 00 00 ac calli 80071d4 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 8006f28: 2b 82 00 14 lw r2,(sp+20) 8006f2c: 2b 83 00 10 lw r3,(sp+16) 8006f30: b9 60 08 00 mv r1,r11 _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 8006f34: 34 0c 00 01 mvi r12,1 { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 8006f38: f8 00 10 30 calli 800aff8 <_Thread_Reset> _Thread_Load_environment( the_thread ); 8006f3c: b9 60 08 00 mv r1,r11 8006f40: f8 00 0e fb calli 800ab2c <_Thread_Load_environment> _Thread_Ready( the_thread ); 8006f44: b9 60 08 00 mv r1,r11 8006f48: f8 00 0f cd calli 800ae7c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 8006f4c: b9 60 08 00 mv r1,r11 8006f50: f8 00 02 5a calli 80078b8 <_User_extensions_Thread_restart> RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 8006f54: 78 01 08 01 mvhi r1,0x801 8006f58: 38 21 ea 48 ori r1,r1,0xea48 if ( _Thread_Is_executing ( the_thread ) ) 8006f5c: 28 21 00 0c lw r1,(r1+12) 8006f60: 5d 61 ff e9 bne r11,r1,8006f04 <_Thread_Restart+0x24> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 8006f64: 35 61 00 cc addi r1,r11,204 8006f68: f8 00 03 f9 calli 8007f4c <_CPU_Context_restore> 8006f6c: e3 ff ff e6 bi 8006f04 <_Thread_Restart+0x24> <== NOT EXECUTED =============================================================================== 0800a64c <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 800a64c: 90 00 10 00 rcsr r2,IE 800a650: 34 04 ff fe mvi r4,-2 800a654: a0 44 20 00 and r4,r2,r4 800a658: d0 04 00 00 wcsr IE,r4 current_state = the_thread->current_state; 800a65c: 28 23 00 10 lw r3,(r1+16) if ( current_state & STATES_SUSPENDED ) { 800a660: 20 65 00 02 andi r5,r3,0x2 800a664: 44 a0 00 26 be r5,r0,800a6fc <_Thread_Resume+0xb0> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 800a668: 34 05 ff fd mvi r5,-3 800a66c: a0 65 18 00 and r3,r3,r5 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 800a670: 58 23 00 10 sw (r1+16),r3 if ( _States_Is_ready( current_state ) ) { 800a674: 5c 60 00 22 bne r3,r0,800a6fc <_Thread_Resume+0xb0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 800a678: 28 26 00 90 lw r6,(r1+144) 800a67c: 2c 27 00 96 lhu r7,(r1+150) _Priority_Major_bit_map |= the_priority_map->ready_major; 800a680: 78 03 08 01 mvhi r3,0x801 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 800a684: 2c c8 00 00 lhu r8,(r6+0) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 800a688: 28 25 00 8c lw r5,(r1+140) _Priority_Major_bit_map |= the_priority_map->ready_major; 800a68c: 38 63 89 8c ori r3,r3,0x898c RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 800a690: b9 07 38 00 or r7,r8,r7 800a694: 0c c7 00 00 sh (r6+0),r7 _Priority_Major_bit_map |= the_priority_map->ready_major; 800a698: 2c 68 00 00 lhu r8,(r3+0) 800a69c: 2c 29 00 94 lhu r9,(r1+148) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 800a6a0: 28 a6 00 08 lw r6,(r5+8) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800a6a4: 34 a7 00 04 addi r7,r5,4 800a6a8: b9 28 40 00 or r8,r9,r8 800a6ac: 21 08 ff ff andi r8,r8,0xffff 800a6b0: 0c 68 00 00 sh (r3+0),r8 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 800a6b4: 58 27 00 00 sw (r1+0),r7 old_last_node = the_chain->last; the_chain->last = the_node; 800a6b8: 58 a1 00 08 sw (r5+8),r1 old_last_node->next = the_node; 800a6bc: 58 c1 00 00 sw (r6+0),r1 the_node->previous = old_last_node; 800a6c0: 58 26 00 04 sw (r1+4),r6 _ISR_Flash( level ); 800a6c4: d0 02 00 00 wcsr IE,r2 800a6c8: d0 04 00 00 wcsr IE,r4 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 800a6cc: 78 03 08 01 mvhi r3,0x801 800a6d0: 38 63 8a b8 ori r3,r3,0x8ab8 800a6d4: 28 65 00 10 lw r5,(r3+16) 800a6d8: 28 24 00 14 lw r4,(r1+20) 800a6dc: 28 a5 00 14 lw r5,(r5+20) 800a6e0: 50 85 00 07 bgeu r4,r5,800a6fc <_Thread_Resume+0xb0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 800a6e4: 28 65 00 0c lw r5,(r3+12) _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 800a6e8: 58 61 00 10 sw (r3+16),r1 if ( _Thread_Executing->is_preemptible || 800a6ec: 40 a1 00 74 lbu r1,(r5+116) 800a6f0: 44 20 00 05 be r1,r0,800a704 <_Thread_Resume+0xb8> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 800a6f4: 34 01 00 01 mvi r1,1 800a6f8: 30 61 00 18 sb (r3+24),r1 } } } _ISR_Enable( level ); 800a6fc: d0 02 00 00 wcsr IE,r2 } 800a700: c3 a0 00 00 ret _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 800a704: 44 81 ff fc be r4,r1,800a6f4 <_Thread_Resume+0xa8> <== NEVER TAKEN 800a708: e3 ff ff fd bi 800a6fc <_Thread_Resume+0xb0> =============================================================================== 08006448 <_Thread_Yield_processor>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 8006448: 78 02 08 01 mvhi r2,0x801 800644c: 38 42 39 e8 ori r2,r2,0x39e8 8006450: 28 41 00 0c lw r1,(r2+12) ready = executing->ready; 8006454: 28 23 00 8c lw r3,(r1+140) _ISR_Disable( level ); 8006458: 90 00 20 00 rcsr r4,IE 800645c: 34 06 ff fe mvi r6,-2 8006460: a0 86 30 00 and r6,r4,r6 8006464: d0 06 00 00 wcsr IE,r6 } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 8006468: 28 65 00 08 lw r5,(r3+8) Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { 800646c: 28 67 00 00 lw r7,(r3+0) 8006470: 44 e5 00 15 be r7,r5,80064c4 <_Thread_Yield_processor+0x7c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 8006474: 28 27 00 00 lw r7,(r1+0) previous = the_node->previous; 8006478: 28 29 00 04 lw r9,(r1+4) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800647c: 34 68 00 04 addi r8,r3,4 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 8006480: 59 27 00 00 sw (r9+0),r7 Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 8006484: 58 e9 00 04 sw (r7+4),r9 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8006488: 58 28 00 00 sw (r1+0),r8 old_last_node = the_chain->last; the_chain->last = the_node; 800648c: 58 61 00 08 sw (r3+8),r1 old_last_node->next = the_node; 8006490: 58 a1 00 00 sw (r5+0),r1 the_node->previous = old_last_node; 8006494: 58 25 00 04 sw (r1+4),r5 _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 8006498: d0 04 00 00 wcsr IE,r4 800649c: d0 06 00 00 wcsr IE,r6 if ( _Thread_Is_heir( executing ) ) 80064a0: 28 45 00 10 lw r5,(r2+16) 80064a4: 44 25 00 05 be r1,r5,80064b8 <_Thread_Yield_processor+0x70><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 80064a8: 34 01 00 01 mvi r1,1 80064ac: 30 41 00 18 sb (r2+24),r1 _ISR_Enable( level ); 80064b0: d0 04 00 00 wcsr IE,r4 } 80064b4: c3 a0 00 00 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 80064b8: 28 61 00 00 lw r1,(r3+0) 80064bc: 58 41 00 10 sw (r2+16),r1 80064c0: e3 ff ff fa bi 80064a8 <_Thread_Yield_processor+0x60> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 80064c4: 28 43 00 10 lw r3,(r2+16) 80064c8: 5c 23 ff f8 bne r1,r3,80064a8 <_Thread_Yield_processor+0x60><== NEVER TAKEN 80064cc: e3 ff ff f9 bi 80064b0 <_Thread_Yield_processor+0x68> =============================================================================== 080098bc <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 80098bc: 37 9c ff f8 addi sp,sp,-8 80098c0: 5b 8b 00 08 sw (sp+8),r11 80098c4: 5b 9d 00 04 sw (sp+4),ra 80098c8: b8 40 58 00 mv r11,r2 /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 80098cc: 28 42 00 50 lw r2,(r2+80) #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 80098d0: 59 60 00 44 sw (r11+68),r0 /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 80098d4: 34 01 00 02 mvi r1,2 80098d8: 44 41 00 0b be r2,r1,8009904 <_Thread_blocking_operation_Cancel+0x48><== NEVER TAKEN _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 80098dc: d0 03 00 00 wcsr IE,r3 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 80098e0: 78 01 08 01 mvhi r1,0x801 80098e4: 38 21 23 78 ori r1,r1,0x2378 80098e8: 28 22 00 00 lw r2,(r1+0) 80098ec: b9 60 08 00 mv r1,r11 80098f0: f8 00 00 0b calli 800991c <_Thread_Clear_state> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 80098f4: 2b 9d 00 04 lw ra,(sp+4) 80098f8: 2b 8b 00 08 lw r11,(sp+8) 80098fc: 37 9c 00 08 addi sp,sp,8 8009900: c3 a0 00 00 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 8009904: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 8009908: 59 61 00 50 sw (r11+80),r1 <== NOT EXECUTED * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 800990c: d0 03 00 00 wcsr IE,r3 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 8009910: 35 61 00 48 addi r1,r11,72 <== NOT EXECUTED 8009914: fb ff f4 91 calli 8006b58 <_Watchdog_Remove> <== NOT EXECUTED 8009918: e3 ff ff f2 bi 80098e0 <_Thread_blocking_operation_Cancel+0x24><== NOT EXECUTED =============================================================================== 08005be0 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 8005be0: 37 9c ff f0 addi sp,sp,-16 8005be4: 5b 8b 00 10 sw (sp+16),r11 8005be8: 5b 8c 00 0c sw (sp+12),r12 8005bec: 5b 8d 00 08 sw (sp+8),r13 8005bf0: 5b 8e 00 04 sw (sp+4),r14 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 8005bf4: 28 45 00 14 lw r5,(r2+20) 8005bf8: 34 47 00 3c addi r7,r2,60 Chain_Node *previous_node; Chain_Node *search_node; Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); 8005bfc: 34 46 00 38 addi r6,r2,56 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 8005c00: 00 a4 00 01 srui r4,r5,1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8005c04: 58 47 00 38 sw (r2+56),r7 8005c08: 00 84 00 01 srui r4,r4,1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 8005c0c: 58 46 00 40 sw (r2+64),r6 8005c10: 00 84 00 01 srui r4,r4,1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 8005c14: 58 40 00 3c sw (r2+60),r0 8005c18: 00 84 00 01 srui r4,r4,1 RTEMS_INLINE_ROUTINE bool _Thread_queue_Is_reverse_search ( Priority_Control the_priority ) { return ( the_priority & TASK_QUEUE_DATA_REVERSE_SEARCH_MASK ); 8005c1c: 20 a6 00 20 andi r6,r5,0x20 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 8005c20: 00 84 00 01 srui r4,r4,1 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; 8005c24: 28 27 00 38 lw r7,(r1+56) 8005c28: 00 84 00 01 srui r4,r4,1 if ( _Thread_queue_Is_reverse_search( priority ) ) 8005c2c: 5c c0 00 19 bne r6,r0,8005c90 <_Thread_queue_Enqueue_priority+0xb0> 8005c30: b4 84 50 00 add r10,r4,r4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 8005c34: b5 44 20 00 add r4,r10,r4 8005c38: b4 84 20 00 add r4,r4,r4 8005c3c: b4 84 20 00 add r4,r4,r4 8005c40: b4 24 60 00 add r12,r1,r4 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 8005c44: 34 0d ff fe mvi r13,-2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8005c48: 35 8b 00 04 addi r11,r12,4 8005c4c: 90 00 40 00 rcsr r8,IE 8005c50: a1 0d 50 00 and r10,r8,r13 8005c54: d0 0a 00 00 wcsr IE,r10 search_thread = (Thread_Control *) header->first; 8005c58: 29 84 00 00 lw r4,(r12+0) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 8005c5c: 5c 8b 00 04 bne r4,r11,8005c6c <_Thread_queue_Enqueue_priority+0x8c> 8005c60: e0 00 00 28 bi 8005d00 <_Thread_queue_Enqueue_priority+0x120> if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 8005c64: 28 84 00 00 lw r4,(r4+0) 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 ) ) { 8005c68: 44 8b 00 27 be r4,r11,8005d04 <_Thread_queue_Enqueue_priority+0x124> search_priority = search_thread->current_priority; 8005c6c: 28 86 00 14 lw r6,(r4+20) if ( priority <= search_priority ) 8005c70: 50 c5 00 25 bgeu r6,r5,8005d04 <_Thread_queue_Enqueue_priority+0x124> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 8005c74: d0 08 00 00 wcsr IE,r8 8005c78: d0 0a 00 00 wcsr IE,r10 RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 8005c7c: 28 89 00 10 lw r9,(r4+16) 8005c80: a0 e9 48 00 and r9,r7,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8005c84: 5d 20 ff f8 bne r9,r0,8005c64 <_Thread_queue_Enqueue_priority+0x84><== ALWAYS TAKEN _ISR_Enable( level ); 8005c88: d0 08 00 00 wcsr IE,r8 <== NOT EXECUTED goto restart_forward_search; 8005c8c: e3 ff ff f0 bi 8005c4c <_Thread_queue_Enqueue_priority+0x6c><== NOT EXECUTED _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 ]; 8005c90: b4 84 50 00 add r10,r4,r4 8005c94: b5 44 50 00 add r10,r10,r4 8005c98: b5 4a 50 00 add r10,r10,r10 8005c9c: b5 4a 50 00 add r10,r10,r10 8005ca0: b4 2a 50 00 add r10,r1,r10 8005ca4: 78 0c 08 01 mvhi r12,0x801 8005ca8: 39 8c 30 c0 ori r12,r12,0x30c0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 8005cac: 34 0e ff fe mvi r14,-2 search_thread = (Thread_Control *) header->last; 8005cb0: b9 40 68 00 mv r13,r10 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 8005cb4: 41 86 00 00 lbu r6,(r12+0) 8005cb8: 34 c6 00 01 addi r6,r6,1 _ISR_Disable( level ); 8005cbc: 90 00 40 00 rcsr r8,IE 8005cc0: a1 0e 58 00 and r11,r8,r14 8005cc4: d0 0b 00 00 wcsr IE,r11 search_thread = (Thread_Control *) header->last; 8005cc8: 29 a4 00 08 lw r4,(r13+8) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 8005ccc: 5c 8a 00 04 bne r4,r10,8005cdc <_Thread_queue_Enqueue_priority+0xfc> 8005cd0: e0 00 00 19 bi 8005d34 <_Thread_queue_Enqueue_priority+0x154> if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 8005cd4: 28 84 00 04 lw r4,(r4+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 ) ) { 8005cd8: 44 8a 00 17 be r4,r10,8005d34 <_Thread_queue_Enqueue_priority+0x154> search_priority = search_thread->current_priority; 8005cdc: 28 86 00 14 lw r6,(r4+20) if ( priority >= search_priority ) 8005ce0: 50 a6 00 15 bgeu r5,r6,8005d34 <_Thread_queue_Enqueue_priority+0x154> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 8005ce4: d0 08 00 00 wcsr IE,r8 8005ce8: d0 0b 00 00 wcsr IE,r11 8005cec: 28 89 00 10 lw r9,(r4+16) 8005cf0: a0 e9 48 00 and r9,r7,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8005cf4: 5d 20 ff f8 bne r9,r0,8005cd4 <_Thread_queue_Enqueue_priority+0xf4><== ALWAYS TAKEN _ISR_Enable( level ); 8005cf8: d0 08 00 00 wcsr IE,r8 <== NOT EXECUTED goto restart_reverse_search; 8005cfc: e3 ff ff ee bi 8005cb4 <_Thread_queue_Enqueue_priority+0xd4><== NOT EXECUTED if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 8005d00: 34 06 ff ff mvi r6,-1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8005d04: 28 27 00 30 lw r7,(r1+48) 8005d08: 34 0a 00 01 mvi r10,1 8005d0c: b9 00 48 00 mv r9,r8 8005d10: 44 ea 00 1d be r7,r10,8005d84 <_Thread_queue_Enqueue_priority+0x1a4> * 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; 8005d14: 58 69 00 00 sw (r3+0),r9 return the_thread_queue->sync_state; } 8005d18: b8 e0 08 00 mv r1,r7 8005d1c: 2b 8b 00 10 lw r11,(sp+16) 8005d20: 2b 8c 00 0c lw r12,(sp+12) 8005d24: 2b 8d 00 08 lw r13,(sp+8) 8005d28: 2b 8e 00 04 lw r14,(sp+4) 8005d2c: 37 9c 00 10 addi sp,sp,16 8005d30: c3 a0 00 00 ret } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 8005d34: 28 27 00 30 lw r7,(r1+48) 8005d38: 34 0a 00 01 mvi r10,1 8005d3c: b9 00 48 00 mv r9,r8 8005d40: 5c ea ff f5 bne r7,r10,8005d14 <_Thread_queue_Enqueue_priority+0x134><== NEVER TAKEN THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8005d44: 58 20 00 30 sw (r1+48),r0 if ( priority == search_priority ) 8005d48: 44 a6 00 1f be r5,r6,8005dc4 <_Thread_queue_Enqueue_priority+0x1e4> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 8005d4c: 28 83 00 00 lw r3,(r4+0) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 8005d50: 58 44 00 04 sw (r2+4),r4 search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 8005d54: 58 43 00 00 sw (r2+0),r3 the_node->previous = search_node; search_node->next = the_node; 8005d58: 58 82 00 00 sw (r4+0),r2 next_node->previous = the_node; 8005d5c: 58 62 00 04 sw (r3+4),r2 the_thread->Wait.queue = the_thread_queue; 8005d60: 58 41 00 44 sw (r2+68),r1 _ISR_Enable( level ); 8005d64: d0 08 00 00 wcsr IE,r8 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 8005d68: b8 e0 08 00 mv r1,r7 8005d6c: 2b 8b 00 10 lw r11,(sp+16) 8005d70: 2b 8c 00 0c lw r12,(sp+12) 8005d74: 2b 8d 00 08 lw r13,(sp+8) 8005d78: 2b 8e 00 04 lw r14,(sp+4) 8005d7c: 37 9c 00 10 addi sp,sp,16 8005d80: c3 a0 00 00 ret if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8005d84: 58 20 00 30 sw (r1+48),r0 if ( priority == search_priority ) 8005d88: 44 a6 00 0f be r5,r6,8005dc4 <_Thread_queue_Enqueue_priority+0x1e4> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 8005d8c: 28 83 00 04 lw r3,(r4+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8005d90: 58 44 00 00 sw (r2+0),r4 the_node->previous = previous_node; 8005d94: 58 43 00 04 sw (r2+4),r3 previous_node->next = the_node; 8005d98: 58 62 00 00 sw (r3+0),r2 search_node->previous = the_node; 8005d9c: 58 82 00 04 sw (r4+4),r2 the_thread->Wait.queue = the_thread_queue; 8005da0: 58 41 00 44 sw (r2+68),r1 _ISR_Enable( level ); 8005da4: d0 08 00 00 wcsr IE,r8 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 8005da8: b8 e0 08 00 mv r1,r7 8005dac: 2b 8b 00 10 lw r11,(sp+16) 8005db0: 2b 8c 00 0c lw r12,(sp+12) 8005db4: 2b 8d 00 08 lw r13,(sp+8) 8005db8: 2b 8e 00 04 lw r14,(sp+4) 8005dbc: 37 9c 00 10 addi sp,sp,16 8005dc0: c3 a0 00 00 ret 8005dc4: 34 84 00 3c addi r4,r4,60 _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; 8005dc8: 28 83 00 04 lw r3,(r4+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8005dcc: 58 44 00 00 sw (r2+0),r4 the_node->previous = previous_node; 8005dd0: 58 43 00 04 sw (r2+4),r3 previous_node->next = the_node; 8005dd4: 58 62 00 00 sw (r3+0),r2 search_node->previous = the_node; 8005dd8: 58 82 00 04 sw (r4+4),r2 the_thread->Wait.queue = the_thread_queue; 8005ddc: 58 41 00 44 sw (r2+68),r1 _ISR_Enable( level ); 8005de0: d0 08 00 00 wcsr IE,r8 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8005de4: 34 07 00 01 mvi r7,1 8005de8: e3 ff ff cc bi 8005d18 <_Thread_queue_Enqueue_priority+0x138> =============================================================================== 08009b7c <_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 ) { 8009b7c: 37 9c ff f8 addi sp,sp,-8 8009b80: 5b 8b 00 08 sw (sp+8),r11 8009b84: 5b 9d 00 04 sw (sp+4),ra 8009b88: b8 40 58 00 mv r11,r2 8009b8c: 20 63 00 ff andi r3,r3,0xff Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 8009b90: 90 00 10 00 rcsr r2,IE 8009b94: 34 01 ff fe mvi r1,-2 8009b98: a0 41 08 00 and r1,r2,r1 8009b9c: d0 01 00 00 wcsr IE,r1 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 8009ba0: 78 05 08 01 mvhi r5,0x801 8009ba4: 38 a5 23 70 ori r5,r5,0x2370 8009ba8: 29 64 00 10 lw r4,(r11+16) 8009bac: 28 a1 00 00 lw r1,(r5+0) 8009bb0: a0 81 08 00 and r1,r4,r1 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 8009bb4: 44 20 00 26 be r1,r0,8009c4c <_Thread_queue_Extract_priority_helper+0xd0> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 8009bb8: 29 61 00 38 lw r1,(r11+56) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8009bbc: 35 64 00 3c addi r4,r11,60 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 8009bc0: 29 65 00 00 lw r5,(r11+0) previous_node = the_node->previous; 8009bc4: 29 66 00 04 lw r6,(r11+4) if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 8009bc8: 44 24 00 26 be r1,r4,8009c60 <_Thread_queue_Extract_priority_helper+0xe4> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 8009bcc: 29 64 00 40 lw r4,(r11+64) new_second_node = new_first_node->next; 8009bd0: 28 27 00 00 lw r7,(r1+0) previous_node->next = new_first_node; next_node->previous = new_first_node; 8009bd4: 58 a1 00 04 sw (r5+4),r1 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; 8009bd8: 58 c1 00 00 sw (r6+0),r1 next_node->previous = new_first_node; new_first_node->next = next_node; 8009bdc: 58 25 00 00 sw (r1+0),r5 new_first_node->previous = previous_node; 8009be0: 58 26 00 04 sw (r1+4),r6 if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 8009be4: 44 81 00 07 be r4,r1,8009c00 <_Thread_queue_Extract_priority_helper+0x84> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 8009be8: 34 25 00 38 addi r5,r1,56 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 = 8009bec: 58 e5 00 04 sw (r7+4),r5 _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 8009bf0: 58 27 00 38 sw (r1+56),r7 new_first_thread->Wait.Block2n.last = last_node; 8009bf4: 58 24 00 40 sw (r1+64),r4 8009bf8: 34 21 00 3c addi r1,r1,60 last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 8009bfc: 58 81 00 00 sw (r4+0),r1 /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 8009c00: 5c 60 00 0e bne r3,r0,8009c38 <_Thread_queue_Extract_priority_helper+0xbc> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 8009c04: 29 63 00 50 lw r3,(r11+80) 8009c08: 34 01 00 02 mvi r1,2 8009c0c: 44 61 00 19 be r3,r1,8009c70 <_Thread_queue_Extract_priority_helper+0xf4><== NEVER TAKEN _ISR_Enable( level ); 8009c10: d0 02 00 00 wcsr IE,r2 8009c14: 78 01 08 01 mvhi r1,0x801 8009c18: 38 21 23 78 ori r1,r1,0x2378 8009c1c: 28 22 00 00 lw r2,(r1+0) 8009c20: b9 60 08 00 mv r1,r11 8009c24: fb ff ff 3e calli 800991c <_Thread_Clear_state> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 8009c28: 2b 9d 00 04 lw ra,(sp+4) 8009c2c: 2b 8b 00 08 lw r11,(sp+8) 8009c30: 37 9c 00 08 addi sp,sp,8 8009c34: c3 a0 00 00 ret /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 8009c38: d0 02 00 00 wcsr IE,r2 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 8009c3c: 2b 9d 00 04 lw ra,(sp+4) 8009c40: 2b 8b 00 08 lw r11,(sp+8) 8009c44: 37 9c 00 08 addi sp,sp,8 8009c48: c3 a0 00 00 ret Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 8009c4c: d0 02 00 00 wcsr IE,r2 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 8009c50: 2b 9d 00 04 lw ra,(sp+4) 8009c54: 2b 8b 00 08 lw r11,(sp+8) 8009c58: 37 9c 00 08 addi sp,sp,8 8009c5c: c3 a0 00 00 ret new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 8009c60: 58 c5 00 00 sw (r6+0),r5 next_node->previous = previous_node; 8009c64: 58 a6 00 04 sw (r5+4),r6 /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 8009c68: 44 60 ff e7 be r3,r0,8009c04 <_Thread_queue_Extract_priority_helper+0x88> 8009c6c: e3 ff ff f3 bi 8009c38 <_Thread_queue_Extract_priority_helper+0xbc> 8009c70: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 8009c74: 59 61 00 50 sw (r11+80),r1 <== NOT EXECUTED if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 8009c78: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 8009c7c: 35 61 00 48 addi r1,r11,72 <== NOT EXECUTED 8009c80: fb ff f3 b6 calli 8006b58 <_Watchdog_Remove> <== NOT EXECUTED 8009c84: e3 ff ff e4 bi 8009c14 <_Thread_queue_Extract_priority_helper+0x98><== NOT EXECUTED =============================================================================== 08009cc8 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 8009cc8: 37 9c ff fc addi sp,sp,-4 8009ccc: 5b 9d 00 04 sw (sp+4),ra Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 8009cd0: 28 23 00 44 lw r3,(r1+68) #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 8009cd4: b8 20 20 00 mv r4,r1 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 8009cd8: 28 62 00 30 lw r2,(r3+48) 8009cdc: 44 40 00 05 be r2,r0,8009cf0 <_Thread_queue_Process_timeout+0x28> RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 8009ce0: 78 01 08 01 mvhi r1,0x801 8009ce4: 38 21 39 e8 ori r1,r1,0x39e8 8009ce8: 28 21 00 0c lw r1,(r1+12) 8009cec: 44 81 00 09 be r4,r1,8009d10 <_Thread_queue_Process_timeout+0x48> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 8009cf0: 28 65 00 3c lw r5,(r3+60) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 8009cf4: b8 60 08 00 mv r1,r3 8009cf8: b8 80 10 00 mv r2,r4 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 8009cfc: 58 85 00 34 sw (r4+52),r5 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 8009d00: fb ff ff 91 calli 8009b44 <_Thread_queue_Extract> } } 8009d04: 2b 9d 00 04 lw ra,(sp+4) 8009d08: 37 9c 00 04 addi sp,sp,4 8009d0c: c3 a0 00 00 ret * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 8009d10: 34 01 00 03 mvi r1,3 8009d14: 44 41 ff fc be r2,r1,8009d04 <_Thread_queue_Process_timeout+0x3c><== ALWAYS TAKEN the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 8009d18: 28 61 00 3c lw r1,(r3+60) <== NOT EXECUTED 8009d1c: 58 81 00 34 sw (r4+52),r1 <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 8009d20: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8009d24: 58 61 00 30 sw (r3+48),r1 <== NOT EXECUTED 8009d28: e3 ff ff f7 bi 8009d04 <_Thread_queue_Process_timeout+0x3c><== NOT EXECUTED =============================================================================== 08005e98 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 8005e98: 37 9c ff ec addi sp,sp,-20 8005e9c: 5b 8b 00 10 sw (sp+16),r11 8005ea0: 5b 8c 00 0c sw (sp+12),r12 8005ea4: 5b 8d 00 08 sw (sp+8),r13 8005ea8: 5b 9d 00 04 sw (sp+4),ra 8005eac: b8 20 58 00 mv r11,r1 8005eb0: b8 40 60 00 mv r12,r2 /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 8005eb4: 44 20 00 04 be r1,r0,8005ec4 <_Thread_queue_Requeue+0x2c> <== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 8005eb8: 28 22 00 34 lw r2,(r1+52) 8005ebc: 34 01 00 01 mvi r1,1 8005ec0: 44 41 00 07 be r2,r1,8005edc <_Thread_queue_Requeue+0x44> <== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 8005ec4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8005ec8: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8005ecc: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8005ed0: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8005ed4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8005ed8: c3 a0 00 00 ret <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 8005edc: 90 00 68 00 rcsr r13,IE 8005ee0: 34 01 ff fe mvi r1,-2 8005ee4: a1 a1 08 00 and r1,r13,r1 8005ee8: d0 01 00 00 wcsr IE,r1 8005eec: 78 03 08 01 mvhi r3,0x801 8005ef0: 38 63 23 70 ori r3,r3,0x2370 8005ef4: 29 82 00 10 lw r2,(r12+16) 8005ef8: 28 61 00 00 lw r1,(r3+0) 8005efc: a0 41 08 00 and r1,r2,r1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 8005f00: 5c 20 00 08 bne r1,r0,8005f20 <_Thread_queue_Requeue+0x88> <== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 8005f04: d0 0d 00 00 wcsr IE,r13 <== NOT EXECUTED } } 8005f08: 2b 9d 00 04 lw ra,(sp+4) 8005f0c: 2b 8b 00 10 lw r11,(sp+16) 8005f10: 2b 8c 00 0c lw r12,(sp+12) 8005f14: 2b 8d 00 08 lw r13,(sp+8) 8005f18: 37 9c 00 14 addi sp,sp,20 8005f1c: c3 a0 00 00 ret RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8005f20: 34 01 00 01 mvi r1,1 8005f24: 59 61 00 30 sw (r11+48),r1 ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 8005f28: b9 80 10 00 mv r2,r12 8005f2c: b9 60 08 00 mv r1,r11 8005f30: 34 03 00 01 mvi r3,1 8005f34: f8 00 0f 12 calli 8009b7c <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 8005f38: b9 60 08 00 mv r1,r11 8005f3c: b9 80 10 00 mv r2,r12 8005f40: 37 83 00 14 addi r3,sp,20 8005f44: fb ff ff 27 calli 8005be0 <_Thread_queue_Enqueue_priority> } _ISR_Enable( level ); 8005f48: d0 0d 00 00 wcsr IE,r13 8005f4c: e3 ff ff ef bi 8005f08 <_Thread_queue_Requeue+0x70> =============================================================================== 08005f50 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 8005f50: 37 9c ff f8 addi sp,sp,-8 8005f54: 5b 9d 00 04 sw (sp+4),ra Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 8005f58: 37 82 00 08 addi r2,sp,8 8005f5c: fb ff fd 81 calli 8005560 <_Thread_Get> switch ( location ) { 8005f60: 2b 82 00 08 lw r2,(sp+8) 8005f64: 5c 40 00 07 bne r2,r0,8005f80 <_Thread_queue_Timeout+0x30> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 8005f68: f8 00 0f 58 calli 8009cc8 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 8005f6c: 78 01 08 01 mvhi r1,0x801 8005f70: 38 21 38 1c ori r1,r1,0x381c 8005f74: 28 22 00 00 lw r2,(r1+0) 8005f78: 34 42 ff ff addi r2,r2,-1 8005f7c: 58 22 00 00 sw (r1+0),r2 _Thread_Unnest_dispatch(); break; } } 8005f80: 2b 9d 00 04 lw ra,(sp+4) 8005f84: 37 9c 00 08 addi sp,sp,8 8005f88: c3 a0 00 00 ret =============================================================================== 080145b0 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 80145b0: 37 9c ff a4 addi sp,sp,-92 80145b4: 5b 8b 00 44 sw (sp+68),r11 80145b8: 5b 8c 00 40 sw (sp+64),r12 80145bc: 5b 8d 00 3c sw (sp+60),r13 80145c0: 5b 8e 00 38 sw (sp+56),r14 80145c4: 5b 8f 00 34 sw (sp+52),r15 80145c8: 5b 90 00 30 sw (sp+48),r16 80145cc: 5b 91 00 2c sw (sp+44),r17 80145d0: 5b 92 00 28 sw (sp+40),r18 80145d4: 5b 93 00 24 sw (sp+36),r19 80145d8: 5b 94 00 20 sw (sp+32),r20 80145dc: 5b 95 00 1c sw (sp+28),r21 80145e0: 5b 96 00 18 sw (sp+24),r22 80145e4: 5b 97 00 14 sw (sp+20),r23 80145e8: 5b 98 00 10 sw (sp+16),r24 80145ec: 5b 99 00 0c sw (sp+12),r25 80145f0: 5b 9b 00 08 sw (sp+8),fp 80145f4: 5b 9d 00 04 sw (sp+4),ra 80145f8: 78 13 08 03 mvhi r19,0x803 80145fc: 37 96 00 54 addi r22,sp,84 8014600: 37 95 00 58 addi r21,sp,88 8014604: 37 8e 00 48 addi r14,sp,72 8014608: 37 94 00 4c addi r20,sp,76 801460c: 78 12 08 03 mvhi r18,0x803 8014610: 78 17 08 03 mvhi r23,0x803 8014614: b8 20 58 00 mv r11,r1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8014618: 5b 95 00 54 sw (sp+84),r21 the_chain->permanent_null = NULL; 801461c: 5b 80 00 58 sw (sp+88),r0 the_chain->last = _Chain_Head(the_chain); 8014620: 5b 96 00 5c sw (sp+92),r22 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8014624: 5b 94 00 48 sw (sp+72),r20 the_chain->permanent_null = NULL; 8014628: 5b 80 00 4c sw (sp+76),r0 the_chain->last = _Chain_Head(the_chain); 801462c: 5b 8e 00 50 sw (sp+80),r14 8014630: 3a 73 ed 64 ori r19,r19,0xed64 8014634: 34 30 00 30 addi r16,r1,48 8014638: 3a 52 ec b4 ori r18,r18,0xecb4 801463c: 34 2f 00 68 addi r15,r1,104 8014640: 3a f7 ec 2c ori r23,r23,0xec2c 8014644: 34 3b 00 08 addi fp,r1,8 8014648: 34 39 00 40 addi r25,r1,64 Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 801464c: 34 0d 00 03 mvi r13,3 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 8014650: 34 11 ff fe mvi r17,-2 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 8014654: 34 18 00 01 mvi r24,1 { /* * 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; 8014658: 59 76 00 78 sw (r11+120),r22 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 801465c: 2a 62 00 00 lw r2,(r19+0) /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 8014660: 29 63 00 3c lw r3,(r11+60) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014664: ba 00 08 00 mv r1,r16 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 8014668: 59 62 00 3c sw (r11+60),r2 _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 801466c: c8 43 10 00 sub r2,r2,r3 8014670: b9 c0 18 00 mv r3,r14 8014674: f8 00 15 3a calli 8019b5c <_Watchdog_Adjust_to_chain> Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 8014678: 29 64 00 74 lw r4,(r11+116) static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 801467c: 2a 4c 00 00 lw r12,(r18+0) /* * 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 ) { 8014680: 50 8c 00 1c bgeu r4,r12,80146f0 <_Timer_server_Body+0x140> /* * 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 ); 8014684: b9 e0 08 00 mv r1,r15 8014688: c9 84 10 00 sub r2,r12,r4 801468c: b9 c0 18 00 mv r3,r14 8014690: f8 00 15 33 calli 8019b5c <_Watchdog_Adjust_to_chain> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 8014694: 59 6c 00 74 sw (r11+116),r12 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 8014698: 34 0c 00 01 mvi r12,1 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 801469c: 29 61 00 78 lw r1,(r11+120) 80146a0: f8 00 03 34 calli 8015370 <_Chain_Get> 80146a4: b8 20 10 00 mv r2,r1 if ( timer == NULL ) { 80146a8: 44 20 00 0b be r1,r0,80146d4 <_Timer_server_Body+0x124> <== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 80146ac: 28 24 00 38 lw r4,(r1+56) <== NOT EXECUTED 80146b0: 44 8c 00 16 be r4,r12,8014708 <_Timer_server_Body+0x158> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 80146b4: 5c 8d ff fa bne r4,r13,801469c <_Timer_server_Body+0xec> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 80146b8: 34 42 00 10 addi r2,r2,16 <== NOT EXECUTED 80146bc: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 80146c0: f8 00 15 4d calli 8019bf4 <_Watchdog_Insert> <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 80146c4: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED 80146c8: f8 00 03 2a calli 8015370 <_Chain_Get> <== NOT EXECUTED 80146cc: b8 20 10 00 mv r2,r1 <== NOT EXECUTED if ( timer == NULL ) { 80146d0: 5c 20 ff f7 bne r1,r0,80146ac <_Timer_server_Body+0xfc> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 80146d4: 90 00 10 00 rcsr r2,IE 80146d8: a0 51 18 00 and r3,r2,r17 80146dc: d0 03 00 00 wcsr IE,r3 if ( _Chain_Is_empty( insert_chain ) ) { 80146e0: 2b 83 00 54 lw r3,(sp+84) 80146e4: 46 a3 00 0d be r21,r3,8014718 <_Timer_server_Body+0x168> <== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 80146e8: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED 80146ec: e3 ff ff dc bi 801465c <_Timer_server_Body+0xac> <== NOT EXECUTED * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 80146f0: 51 84 ff e9 bgeu r12,r4,8014694 <_Timer_server_Body+0xe4> /* * 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 ); 80146f4: b9 e0 08 00 mv r1,r15 80146f8: 34 02 00 01 mvi r2,1 80146fc: c8 8c 18 00 sub r3,r4,r12 8014700: f8 00 14 d9 calli 8019a64 <_Watchdog_Adjust> 8014704: e3 ff ff e4 bi 8014694 <_Timer_server_Body+0xe4> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 8014708: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 801470c: 34 42 00 10 addi r2,r2,16 <== NOT EXECUTED 8014710: f8 00 15 39 calli 8019bf4 <_Watchdog_Insert> <== NOT EXECUTED 8014714: e3 ff ff e2 bi 801469c <_Timer_server_Body+0xec> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 8014718: 59 60 00 78 sw (r11+120),r0 _ISR_Enable( level ); 801471c: d0 02 00 00 wcsr IE,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 ) ) { 8014720: 2b 82 00 48 lw r2,(sp+72) 8014724: 5e 82 00 0b bne r20,r2,8014750 <_Timer_server_Body+0x1a0> 8014728: e0 00 00 11 bi 801476c <_Timer_server_Body+0x1bc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 801472c: 28 43 00 00 lw r3,(r2+0) the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 8014730: 58 6e 00 04 sw (r3+4),r14 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 8014734: 5b 83 00 48 sw (sp+72),r3 * 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; 8014738: 58 40 00 08 sw (r2+8),r0 _ISR_Enable( level ); 801473c: d0 04 00 00 wcsr IE,r4 /* * 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 ); 8014740: 28 43 00 1c lw r3,(r2+28) 8014744: 28 41 00 20 lw r1,(r2+32) 8014748: 28 42 00 24 lw r2,(r2+36) 801474c: d8 60 00 00 call r3 /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 8014750: 90 00 20 00 rcsr r4,IE 8014754: a0 91 10 00 and r2,r4,r17 8014758: d0 02 00 00 wcsr IE,r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 801475c: 2b 82 00 48 lw r2,(sp+72) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 8014760: 5e 82 ff f3 bne r20,r2,801472c <_Timer_server_Body+0x17c> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 8014764: d0 04 00 00 wcsr IE,r4 8014768: e3 ff ff bc bi 8014658 <_Timer_server_Body+0xa8> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 801476c: 31 60 00 7c sb (r11+124),r0 8014770: 2a e1 00 00 lw r1,(r23+0) 8014774: 34 21 00 01 addi r1,r1,1 8014778: 5a e1 00 00 sw (r23+0),r1 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 801477c: 29 61 00 00 lw r1,(r11+0) 8014780: 34 02 00 08 mvi r2,8 8014784: f8 00 11 b9 calli 8018e68 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 8014788: b9 60 08 00 mv r1,r11 801478c: fb ff ff 47 calli 80144a8 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 8014790: b9 60 08 00 mv r1,r11 8014794: fb ff ff 66 calli 801452c <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 8014798: f8 00 0e 8c calli 80181c8 <_Thread_Enable_dispatch> static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 801479c: bb 60 08 00 mv r1,fp _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 80147a0: 31 78 00 7c sb (r11+124),r24 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 80147a4: f8 00 15 7d calli 8019d98 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 80147a8: bb 20 08 00 mv r1,r25 80147ac: f8 00 15 7b calli 8019d98 <_Watchdog_Remove> 80147b0: e3 ff ff aa bi 8014658 <_Timer_server_Body+0xa8> =============================================================================== 080147b4 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 80147b4: 37 9c ff f8 addi sp,sp,-8 80147b8: 5b 8b 00 08 sw (sp+8),r11 80147bc: 5b 9d 00 04 sw (sp+4),ra 80147c0: b8 20 58 00 mv r11,r1 if ( ts->insert_chain == NULL ) { 80147c4: 28 21 00 78 lw r1,(r1+120) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 80147c8: b8 40 18 00 mv r3,r2 if ( ts->insert_chain == NULL ) { 80147cc: 44 20 00 07 be r1,r0,80147e8 <_Timer_server_Schedule_operation_method+0x34><== ALWAYS TAKEN * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 80147d0: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED 80147d4: f8 00 02 d1 calli 8015318 <_Chain_Append> <== NOT EXECUTED } } 80147d8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80147dc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 80147e0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 80147e4: c3 a0 00 00 ret <== NOT EXECUTED 80147e8: 78 01 08 03 mvhi r1,0x803 80147ec: 38 21 ec 2c ori r1,r1,0xec2c 80147f0: 28 22 00 00 lw r2,(r1+0) 80147f4: 34 42 00 01 addi r2,r2,1 80147f8: 58 22 00 00 sw (r1+0),r2 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 80147fc: 28 61 00 38 lw r1,(r3+56) 8014800: 34 02 00 01 mvi r2,1 8014804: 44 22 00 28 be r1,r2,80148a4 <_Timer_server_Schedule_operation_method+0xf0> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 8014808: 34 02 00 03 mvi r2,3 801480c: 44 22 00 06 be r1,r2,8014824 <_Timer_server_Schedule_operation_method+0x70><== ALWAYS TAKEN if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 8014810: f8 00 0e 6e calli 80181c8 <_Thread_Enable_dispatch> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 8014814: 2b 9d 00 04 lw ra,(sp+4) 8014818: 2b 8b 00 08 lw r11,(sp+8) 801481c: 37 9c 00 08 addi sp,sp,8 8014820: c3 a0 00 00 ret } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 8014824: 90 00 38 00 rcsr r7,IE 8014828: 34 01 ff fe mvi r1,-2 801482c: a0 e1 08 00 and r1,r7,r1 8014830: d0 01 00 00 wcsr IE,r1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 8014834: 29 62 00 68 lw r2,(r11+104) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 8014838: 78 01 08 03 mvhi r1,0x803 last_snapshot = ts->TOD_watchdogs.last_snapshot; 801483c: 29 64 00 74 lw r4,(r11+116) /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 8014840: 38 21 ec b4 ori r1,r1,0xecb4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8014844: 35 65 00 6c addi r5,r11,108 8014848: 28 21 00 00 lw r1,(r1+0) last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 801484c: 44 45 00 0a be r2,r5,8014874 <_Timer_server_Schedule_operation_method+0xc0> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 8014850: 28 46 00 10 lw r6,(r2+16) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 8014854: b4 c4 28 00 add r5,r6,r4 delta_interval += delta; 8014858: c8 a1 28 00 sub r5,r5,r1 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { 801485c: 50 81 00 05 bgeu r4,r1,8014870 <_Timer_server_Schedule_operation_method+0xbc> /* * We advanced in time. */ delta = snapshot - last_snapshot; 8014860: c8 24 20 00 sub r4,r1,r4 if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 8014864: 34 05 00 00 mvi r5,0 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { 8014868: 50 86 00 02 bgeu r4,r6,8014870 <_Timer_server_Schedule_operation_method+0xbc><== NEVER TAKEN delta_interval -= delta; 801486c: c8 c4 28 00 sub r5,r6,r4 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 8014870: 58 45 00 10 sw (r2+16),r5 } ts->TOD_watchdogs.last_snapshot = snapshot; 8014874: 59 61 00 74 sw (r11+116),r1 _ISR_Enable( level ); 8014878: d0 07 00 00 wcsr IE,r7 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 801487c: 35 61 00 68 addi r1,r11,104 8014880: 34 62 00 10 addi r2,r3,16 8014884: f8 00 14 dc calli 8019bf4 <_Watchdog_Insert> if ( !ts->active ) { 8014888: 41 61 00 7c lbu r1,(r11+124) 801488c: 20 21 00 ff andi r1,r1,0xff 8014890: 5c 20 ff e0 bne r1,r0,8014810 <_Timer_server_Schedule_operation_method+0x5c><== NEVER TAKEN _Timer_server_Reset_tod_system_watchdog( ts ); 8014894: b9 60 08 00 mv r1,r11 8014898: fb ff ff 25 calli 801452c <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); 801489c: f8 00 0e 4b calli 80181c8 <_Thread_Enable_dispatch> 80148a0: e3 ff ff dd bi 8014814 <_Timer_server_Schedule_operation_method+0x60> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 80148a4: 90 00 20 00 rcsr r4,IE 80148a8: 34 01 ff fe mvi r1,-2 80148ac: a0 81 08 00 and r1,r4,r1 80148b0: d0 01 00 00 wcsr IE,r1 snapshot = _Watchdog_Ticks_since_boot; 80148b4: 78 01 08 03 mvhi r1,0x803 80148b8: 38 21 ed 64 ori r1,r1,0xed64 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 80148bc: 29 62 00 30 lw r2,(r11+48) 80148c0: 28 21 00 00 lw r1,(r1+0) last_snapshot = ts->Interval_watchdogs.last_snapshot; 80148c4: 29 66 00 3c lw r6,(r11+60) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 80148c8: 35 65 00 34 addi r5,r11,52 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 80148cc: 44 45 00 07 be r2,r5,80148e8 <_Timer_server_Schedule_operation_method+0x134> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 80148d0: 28 47 00 10 lw r7,(r2+16) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 80148d4: c8 26 30 00 sub r6,r1,r6 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 80148d8: 34 05 00 00 mvi r5,0 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 80148dc: 50 c7 00 02 bgeu r6,r7,80148e4 <_Timer_server_Schedule_operation_method+0x130> delta_interval -= delta; 80148e0: c8 e6 28 00 sub r5,r7,r6 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 80148e4: 58 45 00 10 sw (r2+16),r5 } ts->Interval_watchdogs.last_snapshot = snapshot; 80148e8: 59 61 00 3c sw (r11+60),r1 _ISR_Enable( level ); 80148ec: d0 04 00 00 wcsr IE,r4 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 80148f0: 35 61 00 30 addi r1,r11,48 80148f4: 34 62 00 10 addi r2,r3,16 80148f8: f8 00 14 bf calli 8019bf4 <_Watchdog_Insert> if ( !ts->active ) { 80148fc: 41 61 00 7c lbu r1,(r11+124) 8014900: 20 21 00 ff andi r1,r1,0xff 8014904: 5c 20 ff c3 bne r1,r0,8014810 <_Timer_server_Schedule_operation_method+0x5c> _Timer_server_Reset_interval_system_watchdog( ts ); 8014908: b9 60 08 00 mv r1,r11 801490c: fb ff fe e7 calli 80144a8 <_Timer_server_Reset_interval_system_watchdog> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 8014910: f8 00 0e 2e calli 80181c8 <_Thread_Enable_dispatch> 8014914: e3 ff ff c0 bi 8014814 <_Timer_server_Schedule_operation_method+0x60> =============================================================================== 080064d0 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 80064d0: b8 20 20 00 mv r4,r1 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 80064d4: 28 83 00 00 lw r3,(r4+0) uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 80064d8: 28 41 00 00 lw r1,(r2+0) /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 80064dc: 28 86 00 04 lw r6,(r4+4) 80064e0: 28 42 00 04 lw r2,(r2+4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 80064e4: 78 07 08 01 mvhi r7,0x801 80064e8: 38 e7 23 7c ori r7,r7,0x237c 80064ec: 28 e5 00 00 lw r5,(r7+0) ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 80064f0: b4 61 18 00 add r3,r3,r1 time->tv_nsec += add->tv_nsec; 80064f4: b4 46 10 00 add r2,r2,r6 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 80064f8: 58 83 00 00 sw (r4+0),r3 time->tv_nsec += add->tv_nsec; 80064fc: 58 82 00 04 sw (r4+4),r2 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 8006500: 50 a2 00 0a bgeu r5,r2,8006528 <_Timespec_Add_to+0x58> time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 8006504: 78 07 08 01 mvhi r7,0x801 8006508: 38 e7 23 80 ori r7,r7,0x2380 800650c: 28 e6 00 00 lw r6,(r7+0) 8006510: b4 46 10 00 add r2,r2,r6 * * This routines adds two timespecs. The second argument is added * to the first. */ uint32_t _Timespec_Add_to( 8006514: 34 63 00 01 addi r3,r3,1 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; seconds++; 8006518: 34 21 00 01 addi r1,r1,1 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 800651c: 54 45 ff fd bgu r2,r5,8006510 <_Timespec_Add_to+0x40> <== NEVER TAKEN 8006520: 58 82 00 04 sw (r4+4),r2 8006524: 58 83 00 00 sw (r4+0),r3 time->tv_sec++; seconds++; } return seconds; } 8006528: c3 a0 00 00 ret =============================================================================== 08008c7c <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 8008c7c: 28 24 00 00 lw r4,(r1+0) 8008c80: 28 45 00 00 lw r5,(r2+0) bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 8008c84: b8 20 18 00 mv r3,r1 if ( lhs->tv_sec > rhs->tv_sec ) return true; 8008c88: 34 01 00 01 mvi r1,1 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 8008c8c: 48 85 00 06 bg r4,r5,8008ca4 <_Timespec_Greater_than+0x28> return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; 8008c90: 34 01 00 00 mvi r1,0 ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) 8008c94: 48 a4 00 04 bg r5,r4,8008ca4 <_Timespec_Greater_than+0x28> <== NEVER TAKEN #include #include #include bool _Timespec_Greater_than( 8008c98: 28 63 00 04 lw r3,(r3+4) 8008c9c: 28 41 00 04 lw r1,(r2+4) 8008ca0: e8 61 08 00 cmpg r1,r3,r1 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 8008ca4: c3 a0 00 00 ret =============================================================================== 08006750 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 8006750: 37 9c ff e8 addi sp,sp,-24 8006754: 5b 8b 00 18 sw (sp+24),r11 8006758: 5b 8c 00 14 sw (sp+20),r12 800675c: 5b 8d 00 10 sw (sp+16),r13 8006760: 5b 8e 00 0c sw (sp+12),r14 8006764: 5b 8f 00 08 sw (sp+8),r15 8006768: 5b 9d 00 04 sw (sp+4),ra Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 800676c: 78 0c 08 01 mvhi r12,0x801 8006770: 39 8c 39 a4 ori r12,r12,0x39a4 8006774: 29 8b 00 08 lw r11,(r12+8) void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 8006778: b8 20 78 00 mv r15,r1 800677c: b8 60 70 00 mv r14,r3 8006780: 20 4d 00 ff andi r13,r2,0xff Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 8006784: 45 6c 00 09 be r11,r12,80067a8 <_User_extensions_Fatal+0x58><== NEVER TAKEN !_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 ) 8006788: 29 64 00 30 lw r4,(r11+48) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 800678c: b9 e0 08 00 mv r1,r15 8006790: b9 a0 10 00 mv r2,r13 8006794: b9 c0 18 00 mv r3,r14 !_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 ) 8006798: 44 80 00 02 be r4,r0,80067a0 <_User_extensions_Fatal+0x50> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 800679c: d8 80 00 00 call r4 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 ) { 80067a0: 29 6b 00 04 lw r11,(r11+4) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 80067a4: 5d 6c ff f9 bne r11,r12,8006788 <_User_extensions_Fatal+0x38> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 80067a8: 2b 9d 00 04 lw ra,(sp+4) 80067ac: 2b 8b 00 18 lw r11,(sp+24) 80067b0: 2b 8c 00 14 lw r12,(sp+20) 80067b4: 2b 8d 00 10 lw r13,(sp+16) 80067b8: 2b 8e 00 0c lw r14,(sp+12) 80067bc: 2b 8f 00 08 lw r15,(sp+8) 80067c0: 37 9c 00 18 addi sp,sp,24 80067c4: c3 a0 00 00 ret =============================================================================== 08006584 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 8006584: 37 9c ff ec addi sp,sp,-20 8006588: 5b 8b 00 14 sw (sp+20),r11 800658c: 5b 8c 00 10 sw (sp+16),r12 8006590: 5b 8d 00 0c sw (sp+12),r13 8006594: 5b 8e 00 08 sw (sp+8),r14 8006598: 5b 9d 00 04 sw (sp+4),ra User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 800659c: 78 03 08 01 mvhi r3,0x801 80065a0: 38 63 30 c4 ori r3,r3,0x30c4 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 80065a4: 78 02 08 01 mvhi r2,0x801 80065a8: 78 05 08 01 mvhi r5,0x801 80065ac: 78 01 08 01 mvhi r1,0x801 80065b0: 78 04 08 01 mvhi r4,0x801 initial_extensions = Configuration.User_extension_table; 80065b4: 28 6b 00 3c lw r11,(r3+60) 80065b8: 38 42 39 a4 ori r2,r2,0x39a4 80065bc: 38 21 38 20 ori r1,r1,0x3820 80065c0: 38 a5 39 a8 ori r5,r5,0x39a8 80065c4: 38 84 38 24 ori r4,r4,0x3824 80065c8: 58 45 00 00 sw (r2+0),r5 the_chain->permanent_null = NULL; 80065cc: 58 40 00 04 sw (r2+4),r0 the_chain->last = _Chain_Head(the_chain); 80065d0: 58 42 00 08 sw (r2+8),r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 80065d4: 58 24 00 00 sw (r1+0),r4 the_chain->permanent_null = NULL; 80065d8: 58 20 00 04 sw (r1+4),r0 the_chain->last = _Chain_Head(the_chain); 80065dc: 58 21 00 08 sw (r1+8),r1 User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 80065e0: 28 6e 00 38 lw r14,(r3+56) initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 80065e4: 45 60 00 26 be r11,r0,800667c <_User_extensions_Handler_initialization+0xf8><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 80065e8: b5 ce 68 00 add r13,r14,r14 80065ec: b5 ae 68 00 add r13,r13,r14 80065f0: b5 ad 68 00 add r13,r13,r13 80065f4: b5 ad 68 00 add r13,r13,r13 80065f8: b5 ae 68 00 add r13,r13,r14 80065fc: b5 ad 68 00 add r13,r13,r13 8006600: b5 ad 68 00 add r13,r13,r13 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 8006604: b9 a0 08 00 mv r1,r13 8006608: f8 00 01 f7 calli 8006de4 <_Workspace_Allocate_or_fatal_error> number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 800660c: 34 02 00 00 mvi r2,0 8006610: b9 a0 18 00 mv r3,r13 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 8006614: b8 20 60 00 mv r12,r1 number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 8006618: f8 00 18 25 calli 800c6ac extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 800661c: 45 c0 00 18 be r14,r0,800667c <_User_extensions_Handler_initialization+0xf8><== NEVER TAKEN 8006620: 34 0d 00 00 mvi r13,0 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 8006624: 29 62 00 00 lw r2,(r11+0) _User_extensions_Add_set( extension ); 8006628: b9 80 08 00 mv r1,r12 800662c: 35 ad 00 01 addi r13,r13,1 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 8006630: 59 82 00 14 sw (r12+20),r2 8006634: 29 62 00 04 lw r2,(r11+4) 8006638: 59 82 00 18 sw (r12+24),r2 800663c: 29 62 00 08 lw r2,(r11+8) 8006640: 59 82 00 1c sw (r12+28),r2 8006644: 29 62 00 0c lw r2,(r11+12) 8006648: 59 82 00 20 sw (r12+32),r2 800664c: 29 62 00 10 lw r2,(r11+16) 8006650: 59 82 00 24 sw (r12+36),r2 8006654: 29 62 00 14 lw r2,(r11+20) 8006658: 59 82 00 28 sw (r12+40),r2 800665c: 29 62 00 18 lw r2,(r11+24) 8006660: 59 82 00 2c sw (r12+44),r2 8006664: 29 62 00 1c lw r2,(r11+28) 8006668: 35 6b 00 20 addi r11,r11,32 800666c: 59 82 00 30 sw (r12+48),r2 _User_extensions_Add_set( extension ); 8006670: f8 00 0e 0e calli 8009ea8 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 8006674: 35 8c 00 34 addi r12,r12,52 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 8006678: 55 cd ff eb bgu r14,r13,8006624 <_User_extensions_Handler_initialization+0xa0> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 800667c: 2b 9d 00 04 lw ra,(sp+4) 8006680: 2b 8b 00 14 lw r11,(sp+20) 8006684: 2b 8c 00 10 lw r12,(sp+16) 8006688: 2b 8d 00 0c lw r13,(sp+12) 800668c: 2b 8e 00 08 lw r14,(sp+8) 8006690: 37 9c 00 14 addi sp,sp,20 8006694: c3 a0 00 00 ret =============================================================================== 08006698 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 8006698: 37 9c ff f0 addi sp,sp,-16 800669c: 5b 8b 00 10 sw (sp+16),r11 80066a0: 5b 8c 00 0c sw (sp+12),r12 80066a4: 5b 8d 00 08 sw (sp+8),r13 80066a8: 5b 9d 00 04 sw (sp+4),ra Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 80066ac: 78 02 08 01 mvhi r2,0x801 80066b0: 38 42 39 a4 ori r2,r2,0x39a4 80066b4: 28 4b 00 00 lw r11,(r2+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 80066b8: 78 0c 08 01 mvhi r12,0x801 80066bc: 39 8c 39 a8 ori r12,r12,0x39a8 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 80066c0: b8 20 68 00 mv r13,r1 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 80066c4: 45 6c 00 07 be r11,r12,80066e0 <_User_extensions_Thread_begin+0x48><== NEVER TAKEN !_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_begin != NULL ) 80066c8: 29 62 00 28 lw r2,(r11+40) (*the_extension->Callouts.thread_begin)( executing ); 80066cc: b9 a0 08 00 mv r1,r13 !_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_begin != NULL ) 80066d0: 44 40 00 02 be r2,r0,80066d8 <_User_extensions_Thread_begin+0x40> (*the_extension->Callouts.thread_begin)( executing ); 80066d4: d8 40 00 00 call r2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 80066d8: 29 6b 00 00 lw r11,(r11+0) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 80066dc: 5d 6c ff fb bne r11,r12,80066c8 <_User_extensions_Thread_begin+0x30> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 80066e0: 2b 9d 00 04 lw ra,(sp+4) 80066e4: 2b 8b 00 10 lw r11,(sp+16) 80066e8: 2b 8c 00 0c lw r12,(sp+12) 80066ec: 2b 8d 00 08 lw r13,(sp+8) 80066f0: 37 9c 00 10 addi sp,sp,16 80066f4: c3 a0 00 00 ret =============================================================================== 080067c8 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 80067c8: 37 9c ff ec addi sp,sp,-20 80067cc: 5b 8b 00 14 sw (sp+20),r11 80067d0: 5b 8c 00 10 sw (sp+16),r12 80067d4: 5b 8d 00 0c sw (sp+12),r13 80067d8: 5b 8e 00 08 sw (sp+8),r14 80067dc: 5b 9d 00 04 sw (sp+4),ra Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 80067e0: 78 02 08 01 mvhi r2,0x801 80067e4: 38 42 39 a4 ori r2,r2,0x39a4 80067e8: 28 4b 00 00 lw r11,(r2+0) 80067ec: 78 0c 08 01 mvhi r12,0x801 80067f0: 39 8c 39 a8 ori r12,r12,0x39a8 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 80067f4: b8 20 70 00 mv r14,r1 if ( !status ) return false; } } return true; 80067f8: 34 01 00 01 mvi r1,1 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 80067fc: 45 6c 00 0c be r11,r12,800682c <_User_extensions_Thread_create+0x64><== NEVER TAKEN 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)( 8006800: 78 0d 08 01 mvhi r13,0x801 8006804: 39 ad 39 e8 ori r13,r13,0x39e8 !_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 ) { 8006808: 29 63 00 14 lw r3,(r11+20) status = (*the_extension->Callouts.thread_create)( 800680c: b9 c0 10 00 mv r2,r14 !_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 ) { 8006810: 44 60 00 04 be r3,r0,8006820 <_User_extensions_Thread_create+0x58> status = (*the_extension->Callouts.thread_create)( 8006814: 29 a1 00 0c lw r1,(r13+12) 8006818: d8 60 00 00 call r3 _Thread_Executing, the_thread ); if ( !status ) 800681c: 44 20 00 0b be r1,r0,8006848 <_User_extensions_Thread_create+0x80> 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 ) { 8006820: 29 6b 00 00 lw r11,(r11+0) { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 8006824: 5d 6c ff f9 bne r11,r12,8006808 <_User_extensions_Thread_create+0x40> if ( !status ) return false; } } return true; 8006828: 34 01 00 01 mvi r1,1 } 800682c: 2b 9d 00 04 lw ra,(sp+4) 8006830: 2b 8b 00 14 lw r11,(sp+20) 8006834: 2b 8c 00 10 lw r12,(sp+16) 8006838: 2b 8d 00 0c lw r13,(sp+12) 800683c: 2b 8e 00 08 lw r14,(sp+8) 8006840: 37 9c 00 14 addi sp,sp,20 8006844: c3 a0 00 00 ret status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 8006848: 34 01 00 00 mvi r1,0 } } return true; } 800684c: 2b 9d 00 04 lw ra,(sp+4) 8006850: 2b 8b 00 14 lw r11,(sp+20) 8006854: 2b 8c 00 10 lw r12,(sp+16) 8006858: 2b 8d 00 0c lw r13,(sp+12) 800685c: 2b 8e 00 08 lw r14,(sp+8) 8006860: 37 9c 00 14 addi sp,sp,20 8006864: c3 a0 00 00 ret =============================================================================== 08006868 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 8006868: 37 9c ff ec addi sp,sp,-20 800686c: 5b 8b 00 14 sw (sp+20),r11 8006870: 5b 8c 00 10 sw (sp+16),r12 8006874: 5b 8d 00 0c sw (sp+12),r13 8006878: 5b 8e 00 08 sw (sp+8),r14 800687c: 5b 9d 00 04 sw (sp+4),ra Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 8006880: 78 0d 08 01 mvhi r13,0x801 8006884: 39 ad 39 a4 ori r13,r13,0x39a4 8006888: 29 ab 00 08 lw r11,(r13+8) #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 800688c: b8 20 70 00 mv r14,r1 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 8006890: 45 6d 00 0a be r11,r13,80068b8 <_User_extensions_Thread_delete+0x50><== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) (*the_extension->Callouts.thread_delete)( 8006894: 78 0c 08 01 mvhi r12,0x801 8006898: 39 8c 39 e8 ori r12,r12,0x39e8 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 800689c: 29 63 00 20 lw r3,(r11+32) (*the_extension->Callouts.thread_delete)( 80068a0: b9 c0 10 00 mv r2,r14 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 80068a4: 44 60 00 03 be r3,r0,80068b0 <_User_extensions_Thread_delete+0x48> (*the_extension->Callouts.thread_delete)( 80068a8: 29 81 00 0c lw r1,(r12+12) 80068ac: d8 60 00 00 call 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 ) { 80068b0: 29 6b 00 04 lw r11,(r11+4) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 80068b4: 5d 6d ff fa bne r11,r13,800689c <_User_extensions_Thread_delete+0x34> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 80068b8: 2b 9d 00 04 lw ra,(sp+4) 80068bc: 2b 8b 00 14 lw r11,(sp+20) 80068c0: 2b 8c 00 10 lw r12,(sp+16) 80068c4: 2b 8d 00 0c lw r13,(sp+12) 80068c8: 2b 8e 00 08 lw r14,(sp+8) 80068cc: 37 9c 00 14 addi sp,sp,20 80068d0: c3 a0 00 00 ret =============================================================================== 080066f8 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 80066f8: 37 9c ff f0 addi sp,sp,-16 80066fc: 5b 8b 00 10 sw (sp+16),r11 8006700: 5b 8c 00 0c sw (sp+12),r12 8006704: 5b 8d 00 08 sw (sp+8),r13 8006708: 5b 9d 00 04 sw (sp+4),ra Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 800670c: 78 0c 08 01 mvhi r12,0x801 8006710: 39 8c 39 a4 ori r12,r12,0x39a4 8006714: 29 8b 00 08 lw r11,(r12+8) } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 8006718: b8 20 68 00 mv r13,r1 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 800671c: 45 6c 00 07 be r11,r12,8006738 <_User_extensions_Thread_exitted+0x40><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 8006720: 29 62 00 2c lw r2,(r11+44) (*the_extension->Callouts.thread_exitted)( executing ); 8006724: b9 a0 08 00 mv r1,r13 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 8006728: 44 40 00 02 be r2,r0,8006730 <_User_extensions_Thread_exitted+0x38> (*the_extension->Callouts.thread_exitted)( executing ); 800672c: d8 40 00 00 call r2 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 ) { 8006730: 29 6b 00 04 lw r11,(r11+4) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 8006734: 5d 6c ff fb bne r11,r12,8006720 <_User_extensions_Thread_exitted+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 8006738: 2b 9d 00 04 lw ra,(sp+4) 800673c: 2b 8b 00 10 lw r11,(sp+16) 8006740: 2b 8c 00 0c lw r12,(sp+12) 8006744: 2b 8d 00 08 lw r13,(sp+8) 8006748: 37 9c 00 10 addi sp,sp,16 800674c: c3 a0 00 00 ret =============================================================================== 080078b8 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 80078b8: 37 9c ff ec addi sp,sp,-20 80078bc: 5b 8b 00 14 sw (sp+20),r11 80078c0: 5b 8c 00 10 sw (sp+16),r12 80078c4: 5b 8d 00 0c sw (sp+12),r13 80078c8: 5b 8e 00 08 sw (sp+8),r14 80078cc: 5b 9d 00 04 sw (sp+4),ra Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 80078d0: 78 02 08 01 mvhi r2,0x801 80078d4: 38 42 ea 04 ori r2,r2,0xea04 80078d8: 28 4b 00 00 lw r11,(r2+0) 80078dc: 78 0c 08 01 mvhi r12,0x801 80078e0: 39 8c ea 08 ori r12,r12,0xea08 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 80078e4: b8 20 70 00 mv r14,r1 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 80078e8: 45 6c 00 0a be r11,r12,8007910 <_User_extensions_Thread_restart+0x58><== NEVER TAKEN the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) (*the_extension->Callouts.thread_restart)( 80078ec: 78 0d 08 01 mvhi r13,0x801 80078f0: 39 ad ea 48 ori r13,r13,0xea48 !_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_restart != NULL ) 80078f4: 29 63 00 1c lw r3,(r11+28) (*the_extension->Callouts.thread_restart)( 80078f8: b9 c0 10 00 mv r2,r14 !_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_restart != NULL ) 80078fc: 44 60 00 03 be r3,r0,8007908 <_User_extensions_Thread_restart+0x50> (*the_extension->Callouts.thread_restart)( 8007900: 29 a1 00 0c lw r1,(r13+12) 8007904: d8 60 00 00 call r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 8007908: 29 6b 00 00 lw r11,(r11+0) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 800790c: 5d 6c ff fa bne r11,r12,80078f4 <_User_extensions_Thread_restart+0x3c> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 8007910: 2b 9d 00 04 lw ra,(sp+4) 8007914: 2b 8b 00 14 lw r11,(sp+20) 8007918: 2b 8c 00 10 lw r12,(sp+16) 800791c: 2b 8d 00 0c lw r13,(sp+12) 8007920: 2b 8e 00 08 lw r14,(sp+8) 8007924: 37 9c 00 14 addi sp,sp,20 8007928: c3 a0 00 00 ret =============================================================================== 080068d4 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 80068d4: 37 9c ff ec addi sp,sp,-20 80068d8: 5b 8b 00 14 sw (sp+20),r11 80068dc: 5b 8c 00 10 sw (sp+16),r12 80068e0: 5b 8d 00 0c sw (sp+12),r13 80068e4: 5b 8e 00 08 sw (sp+8),r14 80068e8: 5b 9d 00 04 sw (sp+4),ra Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 80068ec: 78 02 08 01 mvhi r2,0x801 80068f0: 38 42 39 a4 ori r2,r2,0x39a4 80068f4: 28 4b 00 00 lw r11,(r2+0) 80068f8: 78 0c 08 01 mvhi r12,0x801 80068fc: 39 8c 39 a8 ori r12,r12,0x39a8 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 8006900: b8 20 70 00 mv r14,r1 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 8006904: 45 6c 00 0a be r11,r12,800692c <_User_extensions_Thread_start+0x58><== NEVER TAKEN the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) (*the_extension->Callouts.thread_start)( 8006908: 78 0d 08 01 mvhi r13,0x801 800690c: 39 ad 39 e8 ori r13,r13,0x39e8 !_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_start != NULL ) 8006910: 29 63 00 18 lw r3,(r11+24) (*the_extension->Callouts.thread_start)( 8006914: b9 c0 10 00 mv r2,r14 !_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_start != NULL ) 8006918: 44 60 00 03 be r3,r0,8006924 <_User_extensions_Thread_start+0x50> (*the_extension->Callouts.thread_start)( 800691c: 29 a1 00 0c lw r1,(r13+12) 8006920: d8 60 00 00 call r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 8006924: 29 6b 00 00 lw r11,(r11+0) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 8006928: 5d 6c ff fa bne r11,r12,8006910 <_User_extensions_Thread_start+0x3c> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 800692c: 2b 9d 00 04 lw ra,(sp+4) 8006930: 2b 8b 00 14 lw r11,(sp+20) 8006934: 2b 8c 00 10 lw r12,(sp+16) 8006938: 2b 8d 00 0c lw r13,(sp+12) 800693c: 2b 8e 00 08 lw r14,(sp+8) 8006940: 37 9c 00 14 addi sp,sp,20 8006944: c3 a0 00 00 ret =============================================================================== 08006948 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 8006948: 37 9c ff ec addi sp,sp,-20 800694c: 5b 8b 00 14 sw (sp+20),r11 8006950: 5b 8c 00 10 sw (sp+16),r12 8006954: 5b 8d 00 0c sw (sp+12),r13 8006958: 5b 8e 00 08 sw (sp+8),r14 800695c: 5b 9d 00 04 sw (sp+4),ra Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 8006960: 78 03 08 01 mvhi r3,0x801 8006964: 38 63 38 20 ori r3,r3,0x3820 8006968: 28 6b 00 00 lw r11,(r3+0) 800696c: 78 0c 08 01 mvhi r12,0x801 8006970: 39 8c 38 24 ori r12,r12,0x3824 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 8006974: b8 20 70 00 mv r14,r1 8006978: b8 40 68 00 mv r13,r2 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 800697c: 45 6c 00 07 be r11,r12,8006998 <_User_extensions_Thread_switch+0x50><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 8006980: 29 63 00 08 lw r3,(r11+8) 8006984: b9 c0 08 00 mv r1,r14 8006988: b9 a0 10 00 mv r2,r13 800698c: d8 60 00 00 call r3 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 8006990: 29 6b 00 00 lw r11,(r11+0) ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 8006994: 5d 6c ff fb bne r11,r12,8006980 <_User_extensions_Thread_switch+0x38> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 8006998: 2b 9d 00 04 lw ra,(sp+4) 800699c: 2b 8b 00 14 lw r11,(sp+20) 80069a0: 2b 8c 00 10 lw r12,(sp+16) 80069a4: 2b 8d 00 0c lw r13,(sp+12) 80069a8: 2b 8e 00 08 lw r14,(sp+8) 80069ac: 37 9c 00 14 addi sp,sp,20 80069b0: c3 a0 00 00 ret =============================================================================== 0800923c <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 800923c: 37 9c ff e4 addi sp,sp,-28 8009240: 5b 8b 00 1c sw (sp+28),r11 8009244: 5b 8c 00 18 sw (sp+24),r12 8009248: 5b 8d 00 14 sw (sp+20),r13 800924c: 5b 8e 00 10 sw (sp+16),r14 8009250: 5b 8f 00 0c sw (sp+12),r15 8009254: 5b 90 00 08 sw (sp+8),r16 8009258: 5b 9d 00 04 sw (sp+4),ra 800925c: b8 20 60 00 mv r12,r1 8009260: b8 60 58 00 mv r11,r3 ISR_Level level; _ISR_Disable( level ); 8009264: 90 00 18 00 rcsr r3,IE 8009268: 34 01 ff fe mvi r1,-2 800926c: a0 61 08 00 and r1,r3,r1 8009270: d0 01 00 00 wcsr IE,r1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 8009274: 29 81 00 00 lw r1,(r12+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8009278: 35 8e 00 04 addi r14,r12,4 800927c: b8 60 20 00 mv r4,r3 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 8009280: 44 2e 00 04 be r1,r14,8009290 <_Watchdog_Adjust+0x54> switch ( direction ) { 8009284: 44 40 00 11 be r2,r0,80092c8 <_Watchdog_Adjust+0x8c> 8009288: 34 03 00 01 mvi r3,1 800928c: 44 43 00 0b be r2,r3,80092b8 <_Watchdog_Adjust+0x7c> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 8009290: d0 04 00 00 wcsr IE,r4 } 8009294: 2b 9d 00 04 lw ra,(sp+4) 8009298: 2b 8b 00 1c lw r11,(sp+28) 800929c: 2b 8c 00 18 lw r12,(sp+24) 80092a0: 2b 8d 00 14 lw r13,(sp+20) 80092a4: 2b 8e 00 10 lw r14,(sp+16) 80092a8: 2b 8f 00 0c lw r15,(sp+12) 80092ac: 2b 90 00 08 lw r16,(sp+8) 80092b0: 37 9c 00 1c addi sp,sp,28 80092b4: c3 a0 00 00 ret * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 80092b8: 28 22 00 10 lw r2,(r1+16) 80092bc: b4 4b 58 00 add r11,r2,r11 80092c0: 58 2b 00 10 sw (r1+16),r11 break; 80092c4: e3 ff ff f3 bi 8009290 <_Watchdog_Adjust+0x54> case WATCHDOG_FORWARD: while ( units ) { 80092c8: b8 60 20 00 mv r4,r3 80092cc: 45 62 ff f1 be r11,r2,8009290 <_Watchdog_Adjust+0x54> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 80092d0: 28 2d 00 10 lw r13,(r1+16) 80092d4: 55 ab 00 13 bgu r13,r11,8009320 <_Watchdog_Adjust+0xe4> <== NEVER TAKEN _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 80092d8: 34 10 00 01 mvi r16,1 _ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level ); 80092dc: 34 0f ff fe mvi r15,-2 if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 80092e0: 58 30 00 10 sw (r1+16),r16 _ISR_Enable( level ); 80092e4: d0 03 00 00 wcsr IE,r3 _Watchdog_Tickle( header ); 80092e8: b9 80 08 00 mv r1,r12 80092ec: f8 00 00 b0 calli 80095ac <_Watchdog_Tickle> _ISR_Disable( level ); 80092f0: 90 00 10 00 rcsr r2,IE 80092f4: a0 4f 08 00 and r1,r2,r15 80092f8: d0 01 00 00 wcsr IE,r1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 80092fc: 29 84 00 00 lw r4,(r12+0) while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 8009300: c9 6d 58 00 sub r11,r11,r13 _ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level ); 8009304: b8 40 18 00 mv r3,r2 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 8009308: b8 80 08 00 mv r1,r4 if ( _Chain_Is_empty( header ) ) 800930c: 45 c4 00 08 be r14,r4,800932c <_Watchdog_Adjust+0xf0> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 8009310: 45 60 00 07 be r11,r0,800932c <_Watchdog_Adjust+0xf0> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 8009314: 28 2d 00 10 lw r13,(r1+16) 8009318: 51 6d ff f2 bgeu r11,r13,80092e0 <_Watchdog_Adjust+0xa4> _ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level ); 800931c: b8 40 20 00 mv r4,r2 _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; 8009320: c9 ab 58 00 sub r11,r13,r11 8009324: 58 2b 00 10 sw (r1+16),r11 break; 8009328: e3 ff ff da bi 8009290 <_Watchdog_Adjust+0x54> _ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level ); 800932c: b8 40 20 00 mv r4,r2 8009330: e3 ff ff d8 bi 8009290 <_Watchdog_Adjust+0x54> =============================================================================== 080069b4 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 80069b4: 37 9c ff f8 addi sp,sp,-8 80069b8: 5b 8b 00 08 sw (sp+8),r11 80069bc: 5b 8c 00 04 sw (sp+4),r12 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 80069c0: 78 03 08 01 mvhi r3,0x801 80069c4: 38 63 39 e8 ori r3,r3,0x39e8 80069c8: 28 69 00 08 lw r9,(r3+8) _ISR_Disable( level ); 80069cc: 90 00 30 00 rcsr r6,IE 80069d0: 34 08 ff fe mvi r8,-2 80069d4: a0 c8 40 00 and r8,r6,r8 80069d8: d0 08 00 00 wcsr IE,r8 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 80069dc: 28 43 00 08 lw r3,(r2+8) 80069e0: 5c 60 00 3f bne r3,r0,8006adc <_Watchdog_Insert+0x128> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 80069e4: 78 0c 08 01 mvhi r12,0x801 80069e8: 39 8c 39 50 ori r12,r12,0x3950 80069ec: 29 83 00 00 lw r3,(r12+0) 80069f0: 78 07 08 01 mvhi r7,0x801 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 80069f4: 34 04 00 01 mvi r4,1 _Watchdog_Sync_count++; 80069f8: 34 63 00 01 addi r3,r3,1 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 80069fc: 58 44 00 08 sw (r2+8),r4 _Watchdog_Sync_count++; 8006a00: 59 83 00 00 sw (r12+0),r3 8006a04: 38 e7 38 c4 ori r7,r7,0x38c4 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 8006a08: 34 0a 00 01 mvi r10,1 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 8006a0c: 28 44 00 0c lw r4,(r2+12) * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 8006a10: 28 23 00 00 lw r3,(r1+0) ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 8006a14: 44 80 00 14 be r4,r0,8006a64 <_Watchdog_Insert+0xb0> 8006a18: 28 65 00 00 lw r5,(r3+0) 8006a1c: 44 a0 00 12 be r5,r0,8006a64 <_Watchdog_Insert+0xb0> break; if ( delta_interval < after->delta_interval ) { 8006a20: 28 65 00 10 lw r5,(r3+16) 8006a24: 54 a4 00 0e bgu r5,r4,8006a5c <_Watchdog_Insert+0xa8> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 8006a28: d0 06 00 00 wcsr IE,r6 8006a2c: d0 08 00 00 wcsr IE,r8 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 8006a30: 28 4b 00 08 lw r11,(r2+8) 8006a34: 5d 6a 00 19 bne r11,r10,8006a98 <_Watchdog_Insert+0xe4> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 8006a38: 28 eb 00 00 lw r11,(r7+0) 8006a3c: 55 69 00 2d bgu r11,r9,8006af0 <_Watchdog_Insert+0x13c> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 8006a40: c8 85 20 00 sub r4,r4,r5 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 8006a44: 28 63 00 00 lw r3,(r3+0) */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 8006a48: 44 80 00 07 be r4,r0,8006a64 <_Watchdog_Insert+0xb0> 8006a4c: 28 65 00 00 lw r5,(r3+0) 8006a50: 44 a0 00 05 be r5,r0,8006a64 <_Watchdog_Insert+0xb0> break; if ( delta_interval < after->delta_interval ) { 8006a54: 28 65 00 10 lw r5,(r3+16) 8006a58: 50 85 00 19 bgeu r4,r5,8006abc <_Watchdog_Insert+0x108> after->delta_interval -= delta_interval; 8006a5c: c8 a4 28 00 sub r5,r5,r4 8006a60: 58 65 00 10 sw (r3+16),r5 _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 8006a64: 28 63 00 04 lw r3,(r3+4) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 8006a68: 78 01 08 01 mvhi r1,0x801 8006a6c: 38 21 39 54 ori r1,r1,0x3954 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 8006a70: 28 65 00 00 lw r5,(r3+0) 8006a74: 28 28 00 00 lw r8,(r1+0) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 8006a78: 34 01 00 02 mvi r1,2 8006a7c: 58 41 00 08 sw (r2+8),r1 } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 8006a80: 58 44 00 10 sw (r2+16),r4 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 8006a84: 58 43 00 04 sw (r2+4),r3 before_node = after_node->next; after_node->next = the_node; 8006a88: 58 62 00 00 sw (r3+0),r2 the_node->next = before_node; before_node->previous = the_node; 8006a8c: 58 a2 00 04 sw (r5+4),r2 Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 8006a90: 58 45 00 00 sw (r2+0),r5 _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 8006a94: 58 48 00 14 sw (r2+20),r8 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 8006a98: 58 e9 00 00 sw (r7+0),r9 _Watchdog_Sync_count--; 8006a9c: 29 81 00 00 lw r1,(r12+0) 8006aa0: 34 21 ff ff addi r1,r1,-1 8006aa4: 59 81 00 00 sw (r12+0),r1 _ISR_Enable( level ); 8006aa8: d0 06 00 00 wcsr IE,r6 } 8006aac: 2b 8b 00 08 lw r11,(sp+8) 8006ab0: 2b 8c 00 04 lw r12,(sp+4) 8006ab4: 37 9c 00 08 addi sp,sp,8 8006ab8: c3 a0 00 00 ret * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 8006abc: d0 06 00 00 wcsr IE,r6 8006ac0: d0 08 00 00 wcsr IE,r8 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 8006ac4: 28 4b 00 08 lw r11,(r2+8) if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 8006ac8: c8 85 20 00 sub r4,r4,r5 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 8006acc: 5d 6a ff f3 bne r11,r10,8006a98 <_Watchdog_Insert+0xe4> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 8006ad0: 28 e5 00 00 lw r5,(r7+0) 8006ad4: 54 a9 00 07 bgu r5,r9,8006af0 <_Watchdog_Insert+0x13c> <== NEVER TAKEN 8006ad8: e3 ff ff db bi 8006a44 <_Watchdog_Insert+0x90> * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 8006adc: d0 06 00 00 wcsr IE,r6 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 8006ae0: 2b 8b 00 08 lw r11,(sp+8) 8006ae4: 2b 8c 00 04 lw r12,(sp+4) 8006ae8: 37 9c 00 08 addi sp,sp,8 8006aec: c3 a0 00 00 ret if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 8006af0: 58 e9 00 00 sw (r7+0),r9 goto restart; 8006af4: e3 ff ff c6 bi 8006a0c <_Watchdog_Insert+0x58> =============================================================================== 08006b58 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 8006b58: 90 00 20 00 rcsr r4,IE 8006b5c: 34 02 ff fe mvi r2,-2 8006b60: a0 82 10 00 and r2,r4,r2 8006b64: d0 02 00 00 wcsr IE,r2 previous_state = the_watchdog->state; 8006b68: 28 22 00 08 lw r2,(r1+8) switch ( previous_state ) { 8006b6c: 34 03 00 01 mvi r3,1 8006b70: 44 43 00 27 be r2,r3,8006c0c <_Watchdog_Remove+0xb4> <== NEVER TAKEN 8006b74: 5c 40 00 08 bne r2,r0,8006b94 <_Watchdog_Remove+0x3c> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 8006b78: 78 03 08 01 mvhi r3,0x801 8006b7c: 38 63 39 54 ori r3,r3,0x3954 8006b80: 28 63 00 00 lw r3,(r3+0) 8006b84: 58 23 00 18 sw (r1+24),r3 _ISR_Enable( level ); 8006b88: d0 04 00 00 wcsr IE,r4 return( previous_state ); } 8006b8c: b8 40 08 00 mv r1,r2 8006b90: c3 a0 00 00 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 8006b94: 34 03 00 03 mvi r3,3 8006b98: 54 43 ff f8 bgu r2,r3,8006b78 <_Watchdog_Remove+0x20> <== NEVER TAKEN } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 8006b9c: 28 23 00 00 lw r3,(r1+0) break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 8006ba0: 58 20 00 08 sw (r1+8),r0 next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 8006ba4: 28 65 00 00 lw r5,(r3+0) 8006ba8: 44 a0 00 05 be r5,r0,8006bbc <_Watchdog_Remove+0x64> next_watchdog->delta_interval += the_watchdog->delta_interval; 8006bac: 28 66 00 10 lw r6,(r3+16) 8006bb0: 28 25 00 10 lw r5,(r1+16) 8006bb4: b4 c5 28 00 add r5,r6,r5 8006bb8: 58 65 00 10 sw (r3+16),r5 if ( _Watchdog_Sync_count ) 8006bbc: 78 05 08 01 mvhi r5,0x801 8006bc0: 38 a5 39 50 ori r5,r5,0x3950 8006bc4: 28 a5 00 00 lw r5,(r5+0) 8006bc8: 44 a0 00 07 be r5,r0,8006be4 <_Watchdog_Remove+0x8c> _Watchdog_Sync_level = _ISR_Nest_level; 8006bcc: 78 05 08 01 mvhi r5,0x801 8006bd0: 38 a5 39 e8 ori r5,r5,0x39e8 8006bd4: 28 a6 00 08 lw r6,(r5+8) 8006bd8: 78 05 08 01 mvhi r5,0x801 8006bdc: 38 a5 38 c4 ori r5,r5,0x38c4 8006be0: 58 a6 00 00 sw (r5+0),r6 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 8006be4: 28 25 00 04 lw r5,(r1+4) next->previous = previous; 8006be8: 58 65 00 04 sw (r3+4),r5 previous->next = next; 8006bec: 58 a3 00 00 sw (r5+0),r3 _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 8006bf0: 78 03 08 01 mvhi r3,0x801 8006bf4: 38 63 39 54 ori r3,r3,0x3954 8006bf8: 28 63 00 00 lw r3,(r3+0) 8006bfc: 58 23 00 18 sw (r1+24),r3 _ISR_Enable( level ); 8006c00: d0 04 00 00 wcsr IE,r4 return( previous_state ); } 8006c04: b8 40 08 00 mv r1,r2 8006c08: c3 a0 00 00 ret _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 8006c0c: 78 03 08 01 mvhi r3,0x801 8006c10: 38 63 39 54 ori r3,r3,0x3954 8006c14: 28 63 00 00 lw r3,(r3+0) /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 8006c18: 58 20 00 08 sw (r1+8),r0 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 8006c1c: 58 23 00 18 sw (r1+24),r3 _ISR_Enable( level ); 8006c20: d0 04 00 00 wcsr IE,r4 return( previous_state ); } 8006c24: b8 40 08 00 mv r1,r2 8006c28: c3 a0 00 00 ret =============================================================================== 08008960 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 8008960: 37 9c ff ec addi sp,sp,-20 8008964: 5b 8b 00 14 sw (sp+20),r11 8008968: 5b 8c 00 10 sw (sp+16),r12 800896c: 5b 8d 00 0c sw (sp+12),r13 8008970: 5b 8e 00 08 sw (sp+8),r14 8008974: 5b 9d 00 04 sw (sp+4),ra 8008978: b8 20 70 00 mv r14,r1 800897c: b8 40 60 00 mv r12,r2 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 8008980: 90 00 68 00 rcsr r13,IE 8008984: 34 01 ff fe mvi r1,-2 8008988: a1 a1 08 00 and r1,r13,r1 800898c: d0 01 00 00 wcsr IE,r1 printk( "Watchdog Chain: %s %p\n", name, header ); 8008990: 78 01 08 01 mvhi r1,0x801 8008994: b9 80 18 00 mv r3,r12 8008998: 38 21 d8 78 ori r1,r1,0xd878 800899c: b9 c0 10 00 mv r2,r14 80089a0: fb ff eb 13 calli 80035ec */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 80089a4: 29 8b 00 00 lw r11,(r12+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 80089a8: 35 8c 00 04 addi r12,r12,4 if ( !_Chain_Is_empty( header ) ) { 80089ac: 45 6c 00 12 be r11,r12,80089f4 <_Watchdog_Report_chain+0x94> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 80089b0: b9 60 10 00 mv r2,r11 80089b4: 34 01 00 00 mvi r1,0 80089b8: f8 00 00 13 calli 8008a04 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 80089bc: 29 6b 00 00 lw r11,(r11+0) Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 80089c0: 5d 6c ff fc bne r11,r12,80089b0 <_Watchdog_Report_chain+0x50><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 80089c4: 78 01 08 01 mvhi r1,0x801 80089c8: 38 21 d8 90 ori r1,r1,0xd890 80089cc: b9 c0 10 00 mv r2,r14 80089d0: fb ff eb 07 calli 80035ec } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 80089d4: d0 0d 00 00 wcsr IE,r13 } 80089d8: 2b 9d 00 04 lw ra,(sp+4) 80089dc: 2b 8b 00 14 lw r11,(sp+20) 80089e0: 2b 8c 00 10 lw r12,(sp+16) 80089e4: 2b 8d 00 0c lw r13,(sp+12) 80089e8: 2b 8e 00 08 lw r14,(sp+8) 80089ec: 37 9c 00 14 addi sp,sp,20 80089f0: c3 a0 00 00 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 80089f4: 78 01 08 01 mvhi r1,0x801 80089f8: 38 21 d8 a0 ori r1,r1,0xd8a0 80089fc: fb ff ea fc calli 80035ec 8008a00: e3 ff ff f5 bi 80089d4 <_Watchdog_Report_chain+0x74> =============================================================================== 08006c2c <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 8006c2c: 37 9c ff e4 addi sp,sp,-28 8006c30: 5b 8b 00 1c sw (sp+28),r11 8006c34: 5b 8c 00 18 sw (sp+24),r12 8006c38: 5b 8d 00 14 sw (sp+20),r13 8006c3c: 5b 8e 00 10 sw (sp+16),r14 8006c40: 5b 8f 00 0c sw (sp+12),r15 8006c44: 5b 90 00 08 sw (sp+8),r16 8006c48: 5b 9d 00 04 sw (sp+4),ra 8006c4c: b8 20 60 00 mv r12,r1 * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 8006c50: 90 00 68 00 rcsr r13,IE 8006c54: 34 01 ff fe mvi r1,-2 8006c58: a1 a1 08 00 and r1,r13,r1 8006c5c: d0 01 00 00 wcsr IE,r1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 8006c60: 29 8b 00 00 lw r11,(r12+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8006c64: 35 8e 00 04 addi r14,r12,4 8006c68: b9 a0 10 00 mv r2,r13 if ( _Chain_Is_empty( header ) ) 8006c6c: 45 6e 00 1e be r11,r14,8006ce4 <_Watchdog_Tickle+0xb8> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 8006c70: 29 61 00 10 lw r1,(r11+16) 8006c74: 5c 20 00 26 bne r1,r0,8006d0c <_Watchdog_Tickle+0xe0> do { watchdog_state = _Watchdog_Remove( the_watchdog ); _ISR_Enable( level ); switch( watchdog_state ) { 8006c78: 34 10 00 02 mvi r16,2 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 8006c7c: 34 0f ff fe mvi r15,-2 8006c80: e0 00 00 0a bi 8006ca8 <_Watchdog_Tickle+0x7c> 8006c84: 90 00 10 00 rcsr r2,IE <== NOT EXECUTED 8006c88: a0 4f 08 00 and r1,r2,r15 <== NOT EXECUTED 8006c8c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 8006c90: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 8006c94: b8 40 68 00 mv r13,r2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 8006c98: b8 20 58 00 mv r11,r1 <== NOT EXECUTED the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8006c9c: 44 2e 00 12 be r1,r14,8006ce4 <_Watchdog_Tickle+0xb8> <== NOT EXECUTED } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 8006ca0: 28 21 00 10 lw r1,(r1+16) 8006ca4: 5c 20 00 10 bne r1,r0,8006ce4 <_Watchdog_Tickle+0xb8> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 8006ca8: b9 60 08 00 mv r1,r11 8006cac: fb ff ff ab calli 8006b58 <_Watchdog_Remove> _ISR_Enable( level ); 8006cb0: d0 0d 00 00 wcsr IE,r13 switch( watchdog_state ) { 8006cb4: 5c 30 ff f4 bne r1,r16,8006c84 <_Watchdog_Tickle+0x58> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 8006cb8: 29 63 00 1c lw r3,(r11+28) 8006cbc: 29 61 00 20 lw r1,(r11+32) 8006cc0: 29 62 00 24 lw r2,(r11+36) 8006cc4: d8 60 00 00 call r3 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 8006cc8: 90 00 10 00 rcsr r2,IE 8006ccc: a0 4f 08 00 and r1,r2,r15 8006cd0: d0 01 00 00 wcsr IE,r1 } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 8006cd4: 29 81 00 00 lw r1,(r12+0) case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 8006cd8: b8 40 68 00 mv r13,r2 8006cdc: b8 20 58 00 mv r11,r1 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8006ce0: 5c 2e ff f0 bne r1,r14,8006ca0 <_Watchdog_Tickle+0x74> leave: _ISR_Enable(level); 8006ce4: d0 02 00 00 wcsr IE,r2 } 8006ce8: 2b 9d 00 04 lw ra,(sp+4) 8006cec: 2b 8b 00 1c lw r11,(sp+28) 8006cf0: 2b 8c 00 18 lw r12,(sp+24) 8006cf4: 2b 8d 00 14 lw r13,(sp+20) 8006cf8: 2b 8e 00 10 lw r14,(sp+16) 8006cfc: 2b 8f 00 0c lw r15,(sp+12) 8006d00: 2b 90 00 08 lw r16,(sp+8) 8006d04: 37 9c 00 1c addi sp,sp,28 8006d08: c3 a0 00 00 ret * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { the_watchdog->delta_interval--; 8006d0c: 34 21 ff ff addi r1,r1,-1 8006d10: 59 61 00 10 sw (r11+16),r1 if ( the_watchdog->delta_interval != 0 ) 8006d14: 44 20 ff d9 be r1,r0,8006c78 <_Watchdog_Tickle+0x4c> 8006d18: e3 ff ff f3 bi 8006ce4 <_Watchdog_Tickle+0xb8> =============================================================================== 080247f8 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 80247f8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80247fc: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 08011584 <_exit>: extern void FINI_SYMBOL( void ); #endif void EXIT_SYMBOL(int status) { 8011584: 37 9c ff f8 addi sp,sp,-8 8011588: 5b 9d 00 04 sw (sp+4),ra /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 801158c: 5b 81 00 08 sw (sp+8),r1 8011590: f8 00 02 6c calli 8011f40 <__start_set_sysctl_set> * 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(); 8011594: fb ff ff d7 calli 80114f0 rtems_shutdown_executive(status); 8011598: 2b 81 00 08 lw r1,(sp+8) 801159c: f8 00 00 5b calli 8011708 80115a0: e0 00 00 00 bi 80115a0 <_exit+0x1c> <== NOT EXECUTED =============================================================================== 0800169c <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 800169c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80016a0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return gettimeofday( tp, tzp ); 80016a4: fb ff ff d8 calli 8001604 <== NOT EXECUTED } 80016a8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80016ac: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 80016b0: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 080056f0 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 80056f0: 37 9c ff a0 addi sp,sp,-96 80056f4: 5b 8b 00 1c sw (sp+28),r11 80056f8: 5b 8c 00 18 sw (sp+24),r12 80056fc: 5b 8d 00 14 sw (sp+20),r13 8005700: 5b 8e 00 10 sw (sp+16),r14 8005704: 5b 8f 00 0c sw (sp+12),r15 8005708: 5b 90 00 08 sw (sp+8),r16 800570c: 5b 9d 00 04 sw (sp+4),ra /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 8005710: b8 40 08 00 mv r1,r2 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 8005714: b8 40 60 00 mv r12,r2 8005718: b8 60 70 00 mv r14,r3 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 800571c: fb ff f9 ac calli 8003dcc if ( old_parent_pathlen == 0 ) 8005720: 5c 20 00 62 bne r1,r0,80058a8 <_rename_r+0x1b8> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 8005724: 37 8d 00 34 addi r13,sp,52 8005728: b9 80 08 00 mv r1,r12 800572c: 37 82 00 60 addi r2,sp,96 8005730: b9 a0 18 00 mv r3,r13 8005734: f8 00 01 09 calli 8005b58 8005738: 34 0b 00 00 mvi r11,0 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; 800573c: 34 10 00 00 mvi r16,0 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 8005740: 2b 82 00 34 lw r2,(sp+52) name = old + old_parent_pathlen; 8005744: b5 8b 58 00 add r11,r12,r11 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8005748: b9 60 08 00 mv r1,r11 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 800574c: 5b 82 00 48 sw (sp+72),r2 8005750: 2b 82 00 38 lw r2,(sp+56) name = old + old_parent_pathlen; 8005754: 5b 8b 00 5c sw (sp+92),r11 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8005758: 37 8c 00 48 addi r12,sp,72 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 800575c: 5b 82 00 4c sw (sp+76),r2 8005760: 2b 82 00 3c lw r2,(sp+60) 8005764: 5b 82 00 50 sw (sp+80),r2 8005768: 2b 82 00 40 lw r2,(sp+64) 800576c: 5b 82 00 54 sw (sp+84),r2 8005770: 2b 82 00 44 lw r2,(sp+68) 8005774: 5b 82 00 58 sw (sp+88),r2 name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8005778: f8 00 34 b1 calli 8012a3c 800577c: b8 20 10 00 mv r2,r1 8005780: b9 60 08 00 mv r1,r11 8005784: fb ff f9 a7 calli 8003e20 8005788: b5 61 58 00 add r11,r11,r1 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 800578c: b9 60 08 00 mv r1,r11 * 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 ) ); 8005790: 5b 8b 00 5c sw (sp+92),r11 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8005794: f8 00 34 aa calli 8012a3c 8005798: b8 20 10 00 mv r2,r1 800579c: 34 03 00 00 mvi r3,0 80057a0: b9 60 08 00 mv r1,r11 80057a4: b9 80 20 00 mv r4,r12 80057a8: 34 05 00 00 mvi r5,0 80057ac: fb ff f9 32 calli 8003c74 80057b0: b8 20 78 00 mv r15,r1 0, &old_loc, false ); if ( result != 0 ) { 80057b4: 5c 20 00 38 bne r1,r0,8005894 <_rename_r+0x1a4> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 80057b8: 37 8b 00 20 addi r11,sp,32 80057bc: b9 c0 08 00 mv r1,r14 80057c0: 37 82 00 60 addi r2,sp,96 80057c4: b9 60 18 00 mv r3,r11 80057c8: f8 00 00 e4 calli 8005b58 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 80057cc: 2b 81 00 2c lw r1,(sp+44) 80057d0: b9 60 10 00 mv r2,r11 80057d4: 37 83 00 5c addi r3,sp,92 80057d8: 28 24 00 04 lw r4,(r1+4) 80057dc: 2b 81 00 60 lw r1,(sp+96) 80057e0: b5 c1 08 00 add r1,r14,r1 80057e4: d8 80 00 00 call r4 80057e8: b8 20 70 00 mv r14,r1 if ( result != 0 ) { 80057ec: 5c 2f 00 3b bne r1,r15,80058d8 <_rename_r+0x1e8> /* * 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 ) { 80057f0: 2b 81 00 30 lw r1,(sp+48) 80057f4: 2b 82 00 44 lw r2,(sp+68) 80057f8: 5c 41 00 1b bne r2,r1,8005864 <_rename_r+0x174> 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 ); 80057fc: 2b 82 00 2c lw r2,(sp+44) 8005800: 2b 84 00 5c lw r4,(sp+92) 8005804: b9 a0 08 00 mv r1,r13 8005808: 28 45 00 40 lw r5,(r2+64) 800580c: b9 60 18 00 mv r3,r11 8005810: b9 80 10 00 mv r2,r12 8005814: d8 a0 00 00 call r5 8005818: b8 20 78 00 mv r15,r1 rtems_filesystem_freenode( &new_parent_loc ); 800581c: b9 60 08 00 mv r1,r11 8005820: fb ff f9 9e calli 8003e98 if ( free_old_parentloc ) 8005824: 5e 0e 00 0d bne r16,r14,8005858 <_rename_r+0x168> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 8005828: b9 80 08 00 mv r1,r12 800582c: fb ff f9 9b calli 8003e98 return result; } 8005830: b9 e0 08 00 mv r1,r15 8005834: 2b 9d 00 04 lw ra,(sp+4) 8005838: 2b 8b 00 1c lw r11,(sp+28) 800583c: 2b 8c 00 18 lw r12,(sp+24) 8005840: 2b 8d 00 14 lw r13,(sp+20) 8005844: 2b 8e 00 10 lw r14,(sp+16) 8005848: 2b 8f 00 0c lw r15,(sp+12) 800584c: 2b 90 00 08 lw r16,(sp+8) 8005850: 37 9c 00 60 addi sp,sp,96 8005854: c3 a0 00 00 ret 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 ); 8005858: b9 a0 08 00 mv r1,r13 800585c: fb ff f9 8f calli 8003e98 8005860: e3 ff ff f2 bi 8005828 <_rename_r+0x138> * 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 ); 8005864: b9 60 08 00 mv r1,r11 8005868: fb ff f9 8c calli 8003e98 if ( free_old_parentloc ) 800586c: 46 0e 00 03 be r16,r14,8005878 <_rename_r+0x188> rtems_filesystem_freenode( &old_parent_loc ); 8005870: b9 a0 08 00 mv r1,r13 8005874: fb ff f9 89 calli 8003e98 rtems_filesystem_freenode( &old_loc ); 8005878: b9 80 08 00 mv r1,r12 800587c: fb ff f9 87 calli 8003e98 rtems_set_errno_and_return_minus_one( EXDEV ); 8005880: f8 00 26 67 calli 800f21c <__errno> 8005884: 34 02 00 12 mvi r2,18 8005888: 58 22 00 00 sw (r1+0),r2 800588c: 34 0f ff ff mvi r15,-1 8005890: e3 ff ff e8 bi 8005830 <_rename_r+0x140> result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); return -1; 8005894: 34 0f ff ff mvi r15,-1 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 ) 8005898: 46 00 ff e6 be r16,r0,8005830 <_rename_r+0x140> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 800589c: b9 a0 08 00 mv r1,r13 80058a0: fb ff f9 7e calli 8003e98 80058a4: e3 ff ff e3 bi 8005830 <_rename_r+0x140> 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, 80058a8: b8 20 58 00 mv r11,r1 80058ac: 37 8d 00 34 addi r13,sp,52 80058b0: b9 80 08 00 mv r1,r12 80058b4: b9 60 10 00 mv r2,r11 80058b8: 34 03 00 02 mvi r3,2 80058bc: b9 a0 20 00 mv r4,r13 80058c0: 34 05 00 00 mvi r5,0 80058c4: fb ff f9 1b calli 8003d30 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) return -1; 80058c8: 34 0f ff ff mvi r15,-1 else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 80058cc: 5c 20 ff d9 bne r1,r0,8005830 <_rename_r+0x140> <== NEVER TAKEN return -1; free_old_parentloc = true; 80058d0: 34 10 00 01 mvi r16,1 80058d4: e3 ff ff 9b bi 8005740 <_rename_r+0x50> 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 ); 80058d8: b9 60 08 00 mv r1,r11 80058dc: fb ff f9 6f calli 8003e98 if ( free_old_parentloc ) 80058e0: 46 00 00 03 be r16,r0,80058ec <_rename_r+0x1fc> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 80058e4: b9 a0 08 00 mv r1,r13 80058e8: fb ff f9 6c calli 8003e98 rtems_filesystem_freenode( &old_loc ); 80058ec: b9 80 08 00 mv r1,r12 80058f0: fb ff f9 6a calli 8003e98 return -1; 80058f4: 34 0f ff ff mvi r15,-1 80058f8: e3 ff ff ce bi 8005830 <_rename_r+0x140> =============================================================================== 08002b50 : #include speed_t cfgetispeed( const struct termios *tp ) { 8002b50: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8002b54: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD; 8002b58: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8002b5c: 34 02 00 10 mvi r2,16 <== NOT EXECUTED 8002b60: f8 00 6c de calli 801ded8 <__lshrsi3> <== NOT EXECUTED } 8002b64: 20 21 10 0f andi r1,r1,0x100f <== NOT EXECUTED 8002b68: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8002b6c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8002b70: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 08002b74 : speed_t cfgetospeed( const struct termios *tp ) { return tp->c_cflag & CBAUD; 8002b74: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED } 8002b78: 20 21 10 0f andi r1,r1,0x100f <== NOT EXECUTED 8002b7c: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 08002b80 : int cfsetispeed( struct termios *tp, speed_t speed ) { 8002b80: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8002b84: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8002b88: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if ( speed & ~CBAUD ) 8002b8c: 34 03 ef f0 mvi r3,-4112 <== NOT EXECUTED 8002b90: a0 43 18 00 and r3,r2,r3 <== NOT EXECUTED int cfsetispeed( struct termios *tp, speed_t speed ) { 8002b94: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if ( speed & ~CBAUD ) 8002b98: 5c 60 00 11 bne r3,r0,8002bdc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); 8002b9c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8002ba0: 34 02 00 10 mvi r2,16 <== NOT EXECUTED 8002ba4: f8 00 6c 7f calli 801dda0 <__ashlsi3> <== NOT EXECUTED 8002ba8: 78 05 08 01 mvhi r5,0x801 <== NOT EXECUTED 8002bac: 38 a5 f8 28 ori r5,r5,0xf828 <== NOT EXECUTED 8002bb0: 29 64 00 08 lw r4,(r11+8) <== NOT EXECUTED 8002bb4: 28 a3 00 00 lw r3,(r5+0) <== NOT EXECUTED return 0; 8002bb8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); 8002bbc: a0 83 18 00 and r3,r4,r3 <== NOT EXECUTED 8002bc0: b8 23 08 00 or r1,r1,r3 <== NOT EXECUTED 8002bc4: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED return 0; } 8002bc8: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8002bcc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8002bd0: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8002bd4: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8002bd8: c3 a0 00 00 ret <== NOT EXECUTED struct termios *tp, speed_t speed ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); 8002bdc: f8 00 36 06 calli 80103f4 <__errno> <== NOT EXECUTED 8002be0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8002be4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002be8: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8002bec: e3 ff ff f7 bi 8002bc8 <== NOT EXECUTED =============================================================================== 08002bf0 : int cfsetospeed( struct termios *tp, speed_t speed ) { 8002bf0: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8002bf4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if ( speed & ~CBAUD ) 8002bf8: 34 04 ef f0 mvi r4,-4112 <== NOT EXECUTED 8002bfc: a0 44 18 00 and r3,r2,r4 <== NOT EXECUTED 8002c00: 5c 60 00 0a bne r3,r0,8002c28 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; 8002c04: 28 25 00 08 lw r5,(r1+8) <== NOT EXECUTED return 0; 8002c08: 34 03 00 00 mvi r3,0 <== NOT EXECUTED ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; 8002c0c: a0 85 20 00 and r4,r4,r5 <== NOT EXECUTED 8002c10: b8 44 10 00 or r2,r2,r4 <== NOT EXECUTED 8002c14: 58 22 00 08 sw (r1+8),r2 <== NOT EXECUTED return 0; } 8002c18: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 8002c1c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8002c20: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8002c24: c3 a0 00 00 ret <== NOT EXECUTED struct termios *tp, speed_t speed ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); 8002c28: f8 00 35 f3 calli 80103f4 <__errno> <== NOT EXECUTED 8002c2c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8002c30: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002c34: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8002c38: e3 ff ff f8 bi 8002c18 <== NOT EXECUTED =============================================================================== 080013ac : #include int chroot( const char *pathname ) { 80013ac: 37 9c ff dc addi sp,sp,-36 80013b0: 5b 8b 00 10 sw (sp+16),r11 80013b4: 5b 8c 00 0c sw (sp+12),r12 80013b8: 5b 8d 00 08 sw (sp+8),r13 80013bc: 5b 9d 00 04 sw (sp+4),ra 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) { 80013c0: 78 0b 08 01 mvhi r11,0x801 80013c4: 39 6b 31 04 ori r11,r11,0x3104 80013c8: 29 6d 00 00 lw r13,(r11+0) 80013cc: 78 02 08 01 mvhi r2,0x801 80013d0: 38 42 36 d8 ori r2,r2,0x36d8 #include int chroot( const char *pathname ) { 80013d4: b8 20 60 00 mv r12,r1 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) { 80013d8: 45 a2 00 22 be r13,r2,8001460 <== ALWAYS TAKEN 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); 80013dc: b9 80 08 00 mv r1,r12 80013e0: f8 00 1d 6f calli 800899c 80013e4: b8 20 60 00 mv r12,r1 if (result) { 80013e8: 5c 20 00 26 bne r1,r0,8001480 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 80013ec: 78 01 08 01 mvhi r1,0x801 80013f0: 38 21 22 f8 ori r1,r1,0x22f8 80013f4: 34 02 00 01 mvi r2,1 80013f8: 34 03 00 00 mvi r3,0 80013fc: 37 84 00 14 addi r4,sp,20 8001400: 34 05 00 00 mvi r5,0 8001404: f8 00 00 85 calli 8001618 8001408: 5c 2c 00 1e bne r1,r12,8001480 <== NEVER TAKEN /* 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); 800140c: 29 61 00 00 lw r1,(r11+0) 8001410: 34 21 00 18 addi r1,r1,24 8001414: f8 00 00 db calli 8001780 rtems_filesystem_root = loc; 8001418: 29 61 00 00 lw r1,(r11+0) 800141c: 2b 82 00 14 lw r2,(sp+20) 8001420: 58 22 00 18 sw (r1+24),r2 8001424: 2b 82 00 18 lw r2,(sp+24) 8001428: 58 22 00 1c sw (r1+28),r2 800142c: 2b 82 00 1c lw r2,(sp+28) 8001430: 58 22 00 20 sw (r1+32),r2 8001434: 2b 82 00 20 lw r2,(sp+32) 8001438: 58 22 00 24 sw (r1+36),r2 800143c: 2b 82 00 24 lw r2,(sp+36) 8001440: 58 22 00 28 sw (r1+40),r2 return 0; 8001444: 34 01 00 00 mvi r1,0 } 8001448: 2b 9d 00 04 lw ra,(sp+4) 800144c: 2b 8b 00 10 lw r11,(sp+16) 8001450: 2b 8c 00 0c lw r12,(sp+12) 8001454: 2b 8d 00 08 lw r13,(sp+8) 8001458: 37 9c 00 24 addi sp,sp,36 800145c: c3 a0 00 00 ret 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*/ 8001460: f8 00 05 e9 calli 8002c04 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 8001464: 29 61 00 00 lw r1,(r11+0) 8001468: 5c 2d ff dd bne r1,r13,80013dc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 800146c: f8 00 2a 6f calli 800be28 <__errno> <== NOT EXECUTED 8001470: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8001474: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8001478: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800147c: e3 ff ff f3 bi 8001448 <== 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 ); 8001480: f8 00 2a 6a calli 800be28 <__errno> <== NOT EXECUTED 8001484: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8001488: f8 00 2a 68 calli 800be28 <__errno> <== NOT EXECUTED 800148c: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8001490: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8001494: 59 62 00 00 sw (r11+0),r2 <== NOT EXECUTED 8001498: e3 ff ff ec bi 8001448 <== NOT EXECUTED =============================================================================== 0800690c : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 800690c: 37 9c ff dc addi sp,sp,-36 8006910: 5b 8b 00 24 sw (sp+36),r11 8006914: 5b 8c 00 20 sw (sp+32),r12 8006918: 5b 8d 00 1c sw (sp+28),r13 800691c: 5b 8e 00 18 sw (sp+24),r14 8006920: 5b 8f 00 14 sw (sp+20),r15 8006924: 5b 90 00 10 sw (sp+16),r16 8006928: 5b 91 00 0c sw (sp+12),r17 800692c: 5b 92 00 08 sw (sp+8),r18 8006930: 5b 9d 00 04 sw (sp+4),ra 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; 8006934: 28 90 00 00 lw r16,(r4+0) const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8006938: b8 80 78 00 mv r15,r4 800693c: b8 20 90 00 mv r18,r1 8006940: b8 40 70 00 mv r14,r2 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) 8006944: 46 00 00 37 be r16,r0,8006a20 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8006948: 78 02 08 01 mvhi r2,0x801 800694c: 38 42 00 14 ori r2,r2,0x14 8006950: 28 51 00 00 lw r17,(r2+0) 8006954: 34 05 00 00 mvi r5,0 8006958: 34 0b 00 00 mvi r11,0 800695c: 46 20 00 14 be r17,r0,80069ac <== NEVER TAKEN if (!device_name_table[i].device_name) 8006960: b4 a5 28 00 add r5,r5,r5 8006964: b4 a5 28 00 add r5,r5,r5 8006968: b4 a5 30 00 add r6,r5,r5 800696c: b4 c6 30 00 add r6,r6,r6 8006970: b4 a6 28 00 add r5,r5,r6 8006974: b6 05 68 00 add r13,r16,r5 8006978: 29 ac 00 00 lw r12,(r13+0) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 800697c: ba 40 08 00 mv r1,r18 8006980: b9 c0 18 00 mv r3,r14 8006984: b9 80 10 00 mv r2,r12 /* 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++) { 8006988: 35 6b 00 01 addi r11,r11,1 if (!device_name_table[i].device_name) 800698c: 45 80 00 06 be r12,r0,80069a4 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8006990: f8 00 0e ac calli 800a440 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 8006994: b5 8e 60 00 add r12,r12,r14 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8006998: 5c 20 00 03 bne r1,r0,80069a4 <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 800699c: 41 82 00 00 lbu r2,(r12+0) 80069a0: 44 41 00 08 be r2,r1,80069c0 <== ALWAYS TAKEN /* 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++) { 80069a4: b9 60 28 00 mv r5,r11 80069a8: 56 2b ff ee bgu r17,r11,8006960 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 80069ac: f8 00 0a 2d calli 8009260 <__errno> 80069b0: 34 02 00 02 mvi r2,2 80069b4: 58 22 00 00 sw (r1+0),r2 80069b8: 34 01 ff ff mvi r1,-1 80069bc: e0 00 00 0e bi 80069f4 /* 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; 80069c0: 78 01 08 01 mvhi r1,0x801 80069c4: 38 21 01 9c ori r1,r1,0x19c 80069c8: 28 23 00 00 lw r3,(r1+0) 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; 80069cc: 78 02 08 01 mvhi r2,0x801 pathloc->ops = &devFS_ops; 80069d0: 78 01 08 01 mvhi r1,0x801 pathloc->mt_entry = rtems_filesystem_root.mt_entry; 80069d4: 28 63 00 28 lw r3,(r3+40) continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 80069d8: 38 21 01 10 ori r1,r1,0x110 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; 80069dc: 38 42 01 58 ori r2,r2,0x158 pathloc->ops = &devFS_ops; 80069e0: 59 e1 00 0c sw (r15+12),r1 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 80069e4: 59 ed 00 00 sw (r15+0),r13 pathloc->handlers = &devFS_file_handlers; 80069e8: 59 e2 00 08 sw (r15+8),r2 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 80069ec: 59 e3 00 10 sw (r15+16),r3 return 0; 80069f0: 34 01 00 00 mvi r1,0 } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 80069f4: 2b 9d 00 04 lw ra,(sp+4) 80069f8: 2b 8b 00 24 lw r11,(sp+36) 80069fc: 2b 8c 00 20 lw r12,(sp+32) 8006a00: 2b 8d 00 1c lw r13,(sp+28) 8006a04: 2b 8e 00 18 lw r14,(sp+24) 8006a08: 2b 8f 00 14 lw r15,(sp+20) 8006a0c: 2b 90 00 10 lw r16,(sp+16) 8006a10: 2b 91 00 0c lw r17,(sp+12) 8006a14: 2b 92 00 08 lw r18,(sp+8) 8006a18: 37 9c 00 24 addi sp,sp,36 8006a1c: c3 a0 00 00 ret } /* 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 ); 8006a20: f8 00 0a 10 calli 8009260 <__errno> <== NOT EXECUTED 8006a24: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8006a28: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8006a2c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8006a30: e3 ff ff f1 bi 80069f4 <== NOT EXECUTED =============================================================================== 080009c8 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 80009c8: 37 9c ff f0 addi sp,sp,-16 80009cc: 5b 8b 00 10 sw (sp+16),r11 80009d0: 5b 8c 00 0c sw (sp+12),r12 80009d4: 5b 8d 00 08 sw (sp+8),r13 80009d8: 5b 9d 00 04 sw (sp+4),ra rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) 80009dc: 78 0b 08 01 mvhi r11,0x801 80009e0: 39 6b 00 14 ori r11,r11,0x14 80009e4: 29 62 00 00 lw r2,(r11+0) int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 80009e8: b8 20 60 00 mv r12,r1 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) 80009ec: b4 42 10 00 add r2,r2,r2 80009f0: b4 42 10 00 add r2,r2,r2 80009f4: b4 42 18 00 add r3,r2,r2 80009f8: b4 63 18 00 add r3,r3,r3 ) { rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 80009fc: b4 43 08 00 add r1,r2,r3 8000a00: f8 00 16 33 calli 80062cc <_Workspace_Allocate> 8000a04: b8 20 68 00 mv r13,r1 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 8000a08: 44 20 00 17 be r1,r0,8000a64 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); memset( device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) 8000a0c: 29 63 00 00 lw r3,(r11+0) /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 8000a10: 34 02 00 00 mvi r2,0 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) 8000a14: b4 63 18 00 add r3,r3,r3 8000a18: b4 63 18 00 add r3,r3,r3 8000a1c: b4 63 20 00 add r4,r3,r3 8000a20: b4 84 20 00 add r4,r4,r4 /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 8000a24: b4 64 18 00 add r3,r3,r4 8000a28: f8 00 25 10 calli 8009e68 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; 8000a2c: 78 03 08 01 mvhi r3,0x801 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 8000a30: 78 02 08 01 mvhi r2,0x801 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; 8000a34: 38 63 01 58 ori r3,r3,0x158 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 8000a38: 38 42 01 10 ori r2,r2,0x110 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; 8000a3c: 59 83 00 24 sw (r12+36),r3 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 8000a40: 59 82 00 28 sw (r12+40),r2 /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 8000a44: 59 8d 00 1c sw (r12+28),r13 return 0; 8000a48: 34 01 00 00 mvi r1,0 } 8000a4c: 2b 9d 00 04 lw ra,(sp+4) 8000a50: 2b 8b 00 10 lw r11,(sp+16) 8000a54: 2b 8c 00 0c lw r12,(sp+12) 8000a58: 2b 8d 00 08 lw r13,(sp+8) 8000a5c: 37 9c 00 10 addi sp,sp,16 8000a60: c3 a0 00 00 ret 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 ); 8000a64: f8 00 21 ff calli 8009260 <__errno> <== NOT EXECUTED 8000a68: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8000a6c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000a70: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000a74: e3 ff ff f6 bi 8000a4c <== NOT EXECUTED =============================================================================== 08000cfc : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8000cfc: 37 9c ff ec addi sp,sp,-20 8000d00: 5b 9d 00 04 sw (sp+4),ra rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; 8000d04: 28 25 00 1c lw r5,(r1+28) int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8000d08: b8 20 20 00 mv r4,r1 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.command = command; 8000d0c: 5b 82 00 0c sw (sp+12),r2 args.buffer = buffer; status = rtems_io_control( 8000d10: 28 a1 00 08 lw r1,(r5+8) 8000d14: 28 a2 00 0c lw r2,(r5+12) np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.command = command; args.buffer = buffer; 8000d18: 5b 83 00 10 sw (sp+16),r3 status = rtems_io_control( 8000d1c: 37 83 00 08 addi r3,sp,8 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; 8000d20: 5b 84 00 08 sw (sp+8),r4 args.command = command; args.buffer = buffer; status = rtems_io_control( 8000d24: f8 00 08 19 calli 8002d88 np->major, np->minor, (void *) &args ); if ( status ) 8000d28: 5c 20 00 05 bne r1,r0,8000d3c <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 8000d2c: 2b 81 00 14 lw r1,(sp+20) } 8000d30: 2b 9d 00 04 lw ra,(sp+4) 8000d34: 37 9c 00 14 addi sp,sp,20 8000d38: c3 a0 00 00 ret np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 8000d3c: f8 00 17 41 calli 8006a40 <== NOT EXECUTED return args.ioctl_return; } 8000d40: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000d44: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8000d48: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 08000a78 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 8000a78: 37 9c ff dc addi sp,sp,-36 8000a7c: 5b 8b 00 24 sw (sp+36),r11 8000a80: 5b 8c 00 20 sw (sp+32),r12 8000a84: 5b 8d 00 1c sw (sp+28),r13 8000a88: 5b 8e 00 18 sw (sp+24),r14 8000a8c: 5b 8f 00 14 sw (sp+20),r15 8000a90: 5b 90 00 10 sw (sp+16),r16 8000a94: 5b 91 00 0c sw (sp+12),r17 8000a98: 5b 92 00 08 sw (sp+8),r18 8000a9c: 5b 9d 00 04 sw (sp+4),ra * 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') && 8000aa0: 40 26 00 00 lbu r6,(r1+0) const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 8000aa4: b8 20 60 00 mv r12,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') && 8000aa8: 34 01 00 64 mvi r1,100 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 8000aac: b8 40 80 00 mv r16,r2 8000ab0: b8 60 90 00 mv r18,r3 8000ab4: b8 80 88 00 mv r17,r4 * 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') && 8000ab8: 44 c1 00 45 be r6,r1,8000bcc <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 8000abc: 22 01 f0 00 andi r1,r16,0xf000 8000ac0: 7c 22 20 00 cmpnei r2,r1,8192 8000ac4: 7c 21 60 00 cmpnei r1,r1,24576 8000ac8: a0 41 08 00 and r1,r2,r1 8000acc: 5c 20 00 4a bne r1,r0,8000bf4 <== NEVER TAKEN 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; 8000ad0: 28 ad 00 00 lw r13,(r5+0) if (!device_name_table) 8000ad4: 45 a1 00 52 be r13,r1,8000c1c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 8000ad8: 78 01 08 01 mvhi r1,0x801 8000adc: 38 21 00 14 ori r1,r1,0x14 8000ae0: 28 2e 00 00 lw r14,(r1+0) 8000ae4: 34 05 00 00 mvi r5,0 8000ae8: 34 0f ff ff mvi r15,-1 8000aec: 34 0b 00 00 mvi r11,0 8000af0: 45 c0 00 46 be r14,r0,8000c08 <== NEVER TAKEN if (device_name_table[i].device_name == NULL) 8000af4: b4 a5 28 00 add r5,r5,r5 8000af8: b4 a5 28 00 add r5,r5,r5 8000afc: b4 a5 30 00 add r6,r5,r5 8000b00: b4 c6 30 00 add r6,r6,r6 8000b04: b4 a6 28 00 add r5,r5,r6 8000b08: b5 a5 28 00 add r5,r13,r5 8000b0c: 28 a5 00 00 lw r5,(r5+0) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 8000b10: b9 80 08 00 mv r1,r12 8000b14: b8 a0 10 00 mv r2,r5 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) 8000b18: 44 a0 00 26 be r5,r0,8000bb0 <== ALWAYS TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 8000b1c: f8 00 25 c6 calli 800a234 <== NOT EXECUTED 8000b20: 44 20 00 26 be r1,r0,8000bb8 <== 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++){ 8000b24: 35 6b 00 01 addi r11,r11,1 8000b28: b9 60 28 00 mv r5,r11 8000b2c: 55 cb ff f2 bgu r14,r11,8000af4 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 8000b30: 34 01 ff ff mvi r1,-1 8000b34: 45 e1 00 35 be r15,r1,8000c08 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 8000b38: 90 00 58 00 rcsr r11,IE 8000b3c: 34 01 ff fe mvi r1,-2 8000b40: a1 61 08 00 and r1,r11,r1 8000b44: d0 01 00 00 wcsr IE,r1 device_name_table[slot].device_name = (char *)path; 8000b48: b5 ef 78 00 add r15,r15,r15 8000b4c: b5 ef 78 00 add r15,r15,r15 8000b50: b5 ef 08 00 add r1,r15,r15 8000b54: b4 21 08 00 add r1,r1,r1 8000b58: b5 e1 78 00 add r15,r15,r1 8000b5c: b5 af 68 00 add r13,r13,r15 8000b60: 59 ac 00 00 sw (r13+0),r12 device_name_table[slot].device_name_length = strlen(path); 8000b64: b9 80 08 00 mv r1,r12 8000b68: f8 00 26 07 calli 800a384 8000b6c: 59 a1 00 04 sw (r13+4),r1 device_name_table[slot].major = major; 8000b70: 59 b2 00 08 sw (r13+8),r18 device_name_table[slot].minor = minor; 8000b74: 59 b1 00 0c sw (r13+12),r17 device_name_table[slot].mode = mode; 8000b78: 59 b0 00 10 sw (r13+16),r16 _ISR_Enable(level); 8000b7c: d0 0b 00 00 wcsr IE,r11 return 0; 8000b80: 34 01 00 00 mvi r1,0 } 8000b84: 2b 9d 00 04 lw ra,(sp+4) 8000b88: 2b 8b 00 24 lw r11,(sp+36) 8000b8c: 2b 8c 00 20 lw r12,(sp+32) 8000b90: 2b 8d 00 1c lw r13,(sp+28) 8000b94: 2b 8e 00 18 lw r14,(sp+24) 8000b98: 2b 8f 00 14 lw r15,(sp+20) 8000b9c: 2b 90 00 10 lw r16,(sp+16) 8000ba0: 2b 91 00 0c lw r17,(sp+12) 8000ba4: 2b 92 00 08 lw r18,(sp+8) 8000ba8: 37 9c 00 24 addi sp,sp,36 8000bac: c3 a0 00 00 ret 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) 8000bb0: b9 60 78 00 mv r15,r11 8000bb4: e3 ff ff dc bi 8000b24 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 8000bb8: f8 00 21 aa calli 8009260 <__errno> <== NOT EXECUTED 8000bbc: 34 02 00 11 mvi r2,17 <== NOT EXECUTED 8000bc0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000bc4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000bc8: e3 ff ff ef bi 8000b84 <== 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') && 8000bcc: 41 82 00 01 lbu r2,(r12+1) 8000bd0: 34 01 00 65 mvi r1,101 8000bd4: 5c 41 ff ba bne r2,r1,8000abc <== NEVER TAKEN 8000bd8: 41 82 00 02 lbu r2,(r12+2) 8000bdc: 34 01 00 76 mvi r1,118 8000be0: 5c 41 ff b7 bne r2,r1,8000abc <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 8000be4: 41 82 00 03 lbu r2,(r12+3) return 0; 8000be8: 34 01 00 00 mvi r1,0 * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && (path[2] == 'v') && (path[3] == '\0')) 8000bec: 5c 40 ff b4 bne r2,r0,8000abc 8000bf0: e3 ff ff e5 bi 8000b84 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 ); 8000bf4: f8 00 21 9b calli 8009260 <__errno> <== NOT EXECUTED 8000bf8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8000bfc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000c00: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000c04: e3 ff ff e0 bi 8000b84 <== 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 ); 8000c08: f8 00 21 96 calli 8009260 <__errno> <== NOT EXECUTED 8000c0c: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8000c10: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000c14: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000c18: e3 ff ff db bi 8000b84 <== 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 ); 8000c1c: f8 00 21 91 calli 8009260 <__errno> <== NOT EXECUTED 8000c20: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000c24: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000c28: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000c2c: e3 ff ff d6 bi 8000b84 <== NOT EXECUTED =============================================================================== 08000d8c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8000d8c: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8000d90: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 8000d94: 28 26 00 14 lw r6,(r1+20) <== NOT EXECUTED ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8000d98: b8 20 20 00 mv r4,r1 <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 8000d9c: 28 21 00 10 lw r1,(r1+16) <== 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; 8000da0: 28 85 00 1c lw r5,(r4+28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 8000da4: 5b 86 00 14 sw (sp+20),r6 <== NOT EXECUTED 8000da8: 5b 81 00 10 sw (sp+16),r1 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 8000dac: 28 a1 00 08 lw r1,(r5+8) <== NOT EXECUTED np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 8000db0: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED args.count = count; args.flags = iop->flags; 8000db4: 28 86 00 18 lw r6,(r4+24) <== NOT EXECUTED args.bytes_moved = 0; status = rtems_io_read( 8000db8: 28 a2 00 0c lw r2,(r5+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; 8000dbc: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 8000dc0: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; 8000dc4: 5b 84 00 08 sw (sp+8),r4 <== NOT EXECUTED args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 8000dc8: 5b 86 00 20 sw (sp+32),r6 <== NOT EXECUTED args.bytes_moved = 0; 8000dcc: 5b 80 00 24 sw (sp+36),r0 <== NOT EXECUTED status = rtems_io_read( 8000dd0: f8 00 08 7d calli 8002fc4 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 8000dd4: 5c 20 00 05 bne r1,r0,8000de8 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 8000dd8: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED } 8000ddc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000de0: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8000de4: c3 a0 00 00 ret <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 8000de8: f8 00 17 16 calli 8006a40 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 8000dec: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000df0: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8000df4: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 08000df8 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8000df8: 37 9c ff fc addi sp,sp,-4 8000dfc: 5b 9d 00 04 sw (sp+4),ra rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 8000e00: 28 21 00 00 lw r1,(r1+0) if (!the_dev) 8000e04: 44 20 00 0b be r1,r0,8000e30 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 8000e08: 28 24 00 0c lw r4,(r1+12) rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 8000e0c: 28 23 00 08 lw r3,(r1+8) buf->st_mode = the_dev->mode; 8000e10: 28 21 00 10 lw r1,(r1+16) the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 8000e14: 58 44 00 1c sw (r2+28),r4 8000e18: 58 43 00 18 sw (r2+24),r3 buf->st_mode = the_dev->mode; 8000e1c: 58 41 00 0c sw (r2+12),r1 return 0; 8000e20: 34 01 00 00 mvi r1,0 } 8000e24: 2b 9d 00 04 lw ra,(sp+4) 8000e28: 37 9c 00 04 addi sp,sp,4 8000e2c: c3 a0 00 00 ret { 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 ); 8000e30: f8 00 21 0c calli 8009260 <__errno> <== NOT EXECUTED 8000e34: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000e38: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000e3c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000e40: e3 ff ff f9 bi 8000e24 <== NOT EXECUTED =============================================================================== 08000e44 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8000e44: 37 9c ff dc addi sp,sp,-36 8000e48: 5b 9d 00 04 sw (sp+4),ra rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 8000e4c: 28 26 00 14 lw r6,(r1+20) ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8000e50: b8 20 20 00 mv r4,r1 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 8000e54: 28 21 00 10 lw r1,(r1+16) { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; 8000e58: 28 85 00 1c lw r5,(r4+28) args.iop = iop; args.offset = iop->offset; 8000e5c: 5b 86 00 14 sw (sp+20),r6 8000e60: 5b 81 00 10 sw (sp+16),r1 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 8000e64: 28 a1 00 08 lw r1,(r5+8) np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 8000e68: 5b 82 00 18 sw (sp+24),r2 args.count = count; args.flags = iop->flags; 8000e6c: 28 86 00 18 lw r6,(r4+24) args.bytes_moved = 0; status = rtems_io_write( 8000e70: 28 a2 00 0c lw r2,(r5+12) np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 8000e74: 5b 83 00 1c sw (sp+28),r3 args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 8000e78: 37 83 00 08 addi r3,sp,8 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; 8000e7c: 5b 84 00 08 sw (sp+8),r4 args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 8000e80: 5b 86 00 20 sw (sp+32),r6 args.bytes_moved = 0; 8000e84: 5b 80 00 24 sw (sp+36),r0 status = rtems_io_write( 8000e88: f8 00 08 68 calli 8003028 np->major, np->minor, (void *) &args ); if ( status ) 8000e8c: 5c 20 00 05 bne r1,r0,8000ea0 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 8000e90: 2b 81 00 24 lw r1,(sp+36) } 8000e94: 2b 9d 00 04 lw ra,(sp+4) 8000e98: 37 9c 00 24 addi sp,sp,36 8000e9c: c3 a0 00 00 ret np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 8000ea0: f8 00 16 e8 calli 8006a40 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 8000ea4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000ea8: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8000eac: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 0800af48 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 800af48: 37 9c ff ec addi sp,sp,-20 800af4c: 5b 9d 00 04 sw (sp+4),ra args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->pathinfo.node_access; 800af50: 28 25 00 1c lw r5,(r1+28) int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 800af54: b8 20 20 00 mv r4,r1 rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 800af58: 5b 82 00 0c sw (sp+12),r2 args.buffer = buffer; the_jnode = iop->pathinfo.node_access; status = rtems_io_control( 800af5c: 28 a1 00 50 lw r1,(r5+80) 800af60: 28 a2 00 54 lw r2,(r5+84) rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; 800af64: 5b 83 00 10 sw (sp+16),r3 the_jnode = iop->pathinfo.node_access; status = rtems_io_control( 800af68: 37 83 00 08 addi r3,sp,8 { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 800af6c: 5b 84 00 08 sw (sp+8),r4 args.command = command; args.buffer = buffer; the_jnode = iop->pathinfo.node_access; status = rtems_io_control( 800af70: f8 00 01 fa calli 800b758 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 800af74: 5c 20 00 05 bne r1,r0,800af88 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 800af78: 2b 81 00 14 lw r1,(sp+20) } 800af7c: 2b 9d 00 04 lw ra,(sp+4) 800af80: 37 9c 00 14 addi sp,sp,20 800af84: c3 a0 00 00 ret the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 800af88: f8 00 02 a6 calli 800ba20 <== NOT EXECUTED return args.ioctl_return; } 800af8c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800af90: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800af94: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 0800ae70 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 800ae70: 37 9c ff dc addi sp,sp,-36 800ae74: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 800ae78: 28 26 00 14 lw r6,(r1+20) ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 800ae7c: b8 20 20 00 mv r4,r1 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 800ae80: 28 21 00 10 lw r1,(r1+16) { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 800ae84: 28 85 00 1c lw r5,(r4+28) args.iop = iop; args.offset = iop->offset; 800ae88: 5b 86 00 14 sw (sp+20),r6 800ae8c: 5b 81 00 10 sw (sp+16),r1 args.buffer = buffer; 800ae90: 5b 82 00 18 sw (sp+24),r2 args.count = count; args.flags = iop->flags; 800ae94: 28 86 00 18 lw r6,(r4+24) args.bytes_moved = 0; status = rtems_io_read( 800ae98: 28 a1 00 50 lw r1,(r5+80) 800ae9c: 28 a2 00 54 lw r2,(r5+84) the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 800aea0: 5b 83 00 1c sw (sp+28),r3 args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 800aea4: 37 83 00 08 addi r3,sp,8 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; 800aea8: 5b 84 00 08 sw (sp+8),r4 args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 800aeac: 5b 86 00 20 sw (sp+32),r6 args.bytes_moved = 0; 800aeb0: 5b 80 00 24 sw (sp+36),r0 status = rtems_io_read( 800aeb4: f8 00 02 5b calli 800b820 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 800aeb8: 5c 20 00 05 bne r1,r0,800aecc <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 800aebc: 2b 81 00 24 lw r1,(sp+36) } 800aec0: 2b 9d 00 04 lw ra,(sp+4) 800aec4: 37 9c 00 24 addi sp,sp,36 800aec8: c3 a0 00 00 ret the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 800aecc: f8 00 02 d5 calli 800ba20 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 800aed0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800aed4: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 800aed8: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 0800aedc : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 800aedc: 37 9c ff dc addi sp,sp,-36 800aee0: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 800aee4: 28 26 00 14 lw r6,(r1+20) ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 800aee8: b8 20 20 00 mv r4,r1 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 800aeec: 28 21 00 10 lw r1,(r1+16) { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 800aef0: 28 85 00 1c lw r5,(r4+28) args.iop = iop; args.offset = iop->offset; 800aef4: 5b 86 00 14 sw (sp+20),r6 800aef8: 5b 81 00 10 sw (sp+16),r1 args.buffer = (void *) buffer; 800aefc: 5b 82 00 18 sw (sp+24),r2 args.count = count; args.flags = iop->flags; 800af00: 28 86 00 18 lw r6,(r4+24) args.bytes_moved = 0; status = rtems_io_write( 800af04: 28 a1 00 50 lw r1,(r5+80) 800af08: 28 a2 00 54 lw r2,(r5+84) the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 800af0c: 5b 83 00 1c sw (sp+28),r3 args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 800af10: 37 83 00 08 addi r3,sp,8 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; 800af14: 5b 84 00 08 sw (sp+8),r4 args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 800af18: 5b 86 00 20 sw (sp+32),r6 args.bytes_moved = 0; 800af1c: 5b 80 00 24 sw (sp+36),r0 status = rtems_io_write( 800af20: f8 00 02 59 calli 800b884 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 800af24: 5c 20 00 05 bne r1,r0,800af38 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 800af28: 2b 81 00 24 lw r1,(sp+36) } 800af2c: 2b 9d 00 04 lw ra,(sp+4) 800af30: 37 9c 00 24 addi sp,sp,36 800af34: c3 a0 00 00 ret the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 800af38: f8 00 02 ba calli 800ba20 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 800af3c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800af40: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 800af44: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 08004c1c : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 8004c1c: 37 9c ff f0 addi sp,sp,-16 8004c20: 5b 8b 00 10 sw (sp+16),r11 8004c24: 5b 8c 00 0c sw (sp+12),r12 8004c28: 5b 8d 00 08 sw (sp+8),r13 8004c2c: 5b 9d 00 04 sw (sp+4),ra 8004c30: b8 20 58 00 mv r11,r1 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 8004c34: 28 21 00 b4 lw r1,(r1+180) 8004c38: 44 20 00 18 be r1,r0,8004c98 rtems_interrupt_disable (level); 8004c3c: 90 00 08 00 rcsr r1,IE 8004c40: 34 02 ff fe mvi r2,-2 8004c44: a0 22 10 00 and r2,r1,r2 8004c48: d0 02 00 00 wcsr IE,r2 while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 8004c4c: 29 63 00 84 lw r3,(r11+132) 8004c50: 29 62 00 80 lw r2,(r11+128) 8004c54: 44 62 00 10 be r3,r2,8004c94 <== ALWAYS TAKEN tty->rawOutBufState = rob_wait; 8004c58: 34 0c 00 02 mvi r12,2 <== NOT EXECUTED 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); rtems_interrupt_disable (level); 8004c5c: 34 0d ff fe mvi r13,-2 <== NOT EXECUTED rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 8004c60: 59 6c 00 94 sw (r11+148),r12 <== NOT EXECUTED rtems_interrupt_enable (level); 8004c64: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED sc = rtems_semaphore_obtain( 8004c68: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8004c6c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004c70: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8004c74: f8 00 0a f1 calli 8007838 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 8004c78: 5c 20 00 0e bne r1,r0,8004cb0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 8004c7c: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8004c80: a0 2d 10 00 and r2,r1,r13 <== NOT EXECUTED 8004c84: d0 02 00 00 wcsr IE,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) { 8004c88: 29 63 00 84 lw r3,(r11+132) <== NOT EXECUTED 8004c8c: 29 62 00 80 lw r2,(r11+128) <== NOT EXECUTED 8004c90: 5c 62 ff f4 bne r3,r2,8004c60 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 8004c94: d0 01 00 00 wcsr IE,r1 } } 8004c98: 2b 9d 00 04 lw ra,(sp+4) 8004c9c: 2b 8b 00 10 lw r11,(sp+16) 8004ca0: 2b 8c 00 0c lw r12,(sp+12) 8004ca4: 2b 8d 00 08 lw r13,(sp+8) 8004ca8: 37 9c 00 10 addi sp,sp,16 8004cac: c3 a0 00 00 ret 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); 8004cb0: f8 00 0c da calli 8008018 <== NOT EXECUTED =============================================================================== 08001d5c : int dup2( int fildes, int fildes2 ) { 8001d5c: 37 9c ff a4 addi sp,sp,-92 8001d60: 5b 8b 00 14 sw (sp+20),r11 8001d64: 5b 8c 00 10 sw (sp+16),r12 8001d68: 5b 8d 00 0c sw (sp+12),r13 8001d6c: 5b 8e 00 08 sw (sp+8),r14 8001d70: 5b 9d 00 04 sw (sp+4),ra /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 8001d74: 37 8c 00 18 addi r12,sp,24 int dup2( int fildes, int fildes2 ) { 8001d78: b8 40 68 00 mv r13,r2 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 8001d7c: b9 80 10 00 mv r2,r12 if ( status == -1 ) return -1; 8001d80: 34 0b ff ff mvi r11,-1 int dup2( int fildes, int fildes2 ) { 8001d84: b8 20 70 00 mv r14,r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 8001d88: f8 00 01 da calli 80024f0 if ( status == -1 ) 8001d8c: 5c 2b 00 09 bne r1,r11,8001db0 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); } 8001d90: b9 60 08 00 mv r1,r11 8001d94: 2b 9d 00 04 lw ra,(sp+4) 8001d98: 2b 8b 00 14 lw r11,(sp+20) 8001d9c: 2b 8c 00 10 lw r12,(sp+16) 8001da0: 2b 8d 00 0c lw r13,(sp+12) 8001da4: 2b 8e 00 08 lw r14,(sp+8) 8001da8: 37 9c 00 5c addi sp,sp,92 8001dac: c3 a0 00 00 ret /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 8001db0: b9 a0 08 00 mv r1,r13 8001db4: b9 80 10 00 mv r2,r12 8001db8: f8 00 01 ce calli 80024f0 if ( status == -1 ) 8001dbc: 44 2b ff f5 be r1,r11,8001d90 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 8001dc0: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8001dc4: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8001dc8: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8001dcc: f8 00 00 94 calli 800201c <== NOT EXECUTED 8001dd0: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8001dd4: e3 ff ff ef bi 8001d90 <== NOT EXECUTED =============================================================================== 08005aa8 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 8005aa8: 37 9c ff f4 addi sp,sp,-12 8005aac: 5b 8b 00 08 sw (sp+8),r11 8005ab0: 5b 9d 00 04 sw (sp+4),ra 8005ab4: b8 40 58 00 mv r11,r2 if ((tty->termios.c_lflag & ECHOCTL) && 8005ab8: 28 42 00 3c lw r2,(r2+60) 8005abc: 20 42 02 00 andi r2,r2,0x200 8005ac0: 44 40 00 0b be r2,r0,8005aec <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 8005ac4: 78 02 08 02 mvhi r2,0x802 8005ac8: 38 42 22 cc ori r2,r2,0x22cc 8005acc: 28 42 00 00 lw r2,(r2+0) 8005ad0: 7c 23 00 09 cmpnei r3,r1,9 8005ad4: b4 41 10 00 add r2,r2,r1 8005ad8: 40 42 00 01 lbu r2,(r2+1) 8005adc: 20 42 00 20 andi r2,r2,0x20 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 8005ae0: 7c 42 00 00 cmpnei r2,r2,0 iscntrl(c) && (c != '\t') && (c != '\n')) { 8005ae4: a0 43 10 00 and r2,r2,r3 8005ae8: 5c 40 00 07 bne r2,r0,8005b04 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 8005aec: b9 60 10 00 mv r2,r11 8005af0: fb ff ff 8c calli 8005920 } } 8005af4: 2b 9d 00 04 lw ra,(sp+4) 8005af8: 2b 8b 00 08 lw r11,(sp+8) 8005afc: 37 9c 00 0c addi sp,sp,12 8005b00: c3 a0 00 00 ret */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 8005b04: 34 02 00 0a mvi r2,10 8005b08: 44 22 ff f9 be r1,r2,8005aec char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 8005b0c: 18 24 00 40 xori r4,r1,0x40 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 8005b10: 34 05 00 5e mvi r5,94 echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 8005b14: 37 81 00 0c addi r1,sp,12 8005b18: 34 02 00 02 mvi r2,2 8005b1c: b9 60 18 00 mv r3,r11 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 8005b20: 33 85 00 0c sb (sp+12),r5 echobuf[1] = c ^ 0x40; 8005b24: 33 84 00 0d sb (sp+13),r4 rtems_termios_puts (echobuf, 2, tty); 8005b28: fb ff ff 25 calli 80057bc tty->column += 2; 8005b2c: 29 61 00 28 lw r1,(r11+40) 8005b30: 34 21 00 02 addi r1,r1,2 8005b34: 59 61 00 28 sw (r11+40),r1 } else { oproc (c, tty); } } 8005b38: 2b 9d 00 04 lw ra,(sp+4) 8005b3c: 2b 8b 00 08 lw r11,(sp+8) 8005b40: 37 9c 00 0c addi sp,sp,12 8005b44: c3 a0 00 00 ret =============================================================================== 08002974 : void endgrent(void) { 8002974: 37 9c ff fc addi sp,sp,-4 8002978: 5b 9d 00 04 sw (sp+4),ra if (group_fp != NULL) 800297c: 78 01 08 01 mvhi r1,0x801 8002980: 38 21 56 38 ori r1,r1,0x5638 8002984: 28 21 00 00 lw r1,(r1+0) 8002988: 44 20 00 02 be r1,r0,8002990 <== NEVER TAKEN fclose(group_fp); 800298c: f8 00 28 e8 calli 800cd2c } 8002990: 2b 9d 00 04 lw ra,(sp+4) 8002994: 37 9c 00 04 addi sp,sp,4 8002998: c3 a0 00 00 ret =============================================================================== 0800279c : void endpwent(void) { 800279c: 37 9c ff fc addi sp,sp,-4 80027a0: 5b 9d 00 04 sw (sp+4),ra if (passwd_fp != NULL) 80027a4: 78 01 08 01 mvhi r1,0x801 80027a8: 38 21 57 14 ori r1,r1,0x5714 80027ac: 28 21 00 00 lw r1,(r1+0) 80027b0: 44 20 00 02 be r1,r0,80027b8 <== NEVER TAKEN fclose(passwd_fp); 80027b4: f8 00 29 5e calli 800cd2c } 80027b8: 2b 9d 00 04 lw ra,(sp+4) 80027bc: 37 9c 00 04 addi sp,sp,4 80027c0: c3 a0 00 00 ret =============================================================================== 08005b48 : * 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) { 8005b48: 37 9c ff e0 addi sp,sp,-32 8005b4c: 5b 8b 00 20 sw (sp+32),r11 8005b50: 5b 8c 00 1c sw (sp+28),r12 8005b54: 5b 8d 00 18 sw (sp+24),r13 8005b58: 5b 8e 00 14 sw (sp+20),r14 8005b5c: 5b 8f 00 10 sw (sp+16),r15 8005b60: 5b 90 00 0c sw (sp+12),r16 8005b64: 5b 91 00 08 sw (sp+8),r17 8005b68: 5b 9d 00 04 sw (sp+4),ra if (tty->ccount == 0) 8005b6c: 28 24 00 20 lw r4,(r1+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) { 8005b70: b8 20 58 00 mv r11,r1 8005b74: b8 40 68 00 mv r13,r2 if (tty->ccount == 0) 8005b78: 44 80 00 27 be r4,r0,8005c14 return; if (lineFlag) { 8005b7c: 5c 40 00 30 bne r2,r0,8005c3c echo ('\n', tty); return; } } while (tty->ccount) { 8005b80: 28 25 00 3c lw r5,(r1+60) 8005b84: 20 a2 00 08 andi r2,r5,0x8 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 8005b88: 78 0f 08 02 mvhi r15,0x802 8005b8c: 78 11 08 01 mvhi r17,0x801 8005b90: 78 0e 08 01 mvhi r14,0x801 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); } else if (c == '\t') { 8005b94: 34 10 00 09 mvi r16,9 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 8005b98: 39 ef 22 cc ori r15,r15,0x22cc 8005b9c: 3a 31 fe 34 ori r17,r17,0xfe34 8005ba0: 39 ce fe 30 ori r14,r14,0xfe30 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 8005ba4: 29 67 00 1c lw r7,(r11+28) 8005ba8: 34 84 ff ff addi r4,r4,-1 8005bac: 59 64 00 20 sw (r11+32),r4 8005bb0: b4 e4 18 00 add r3,r7,r4 8005bb4: 40 63 00 00 lbu r3,(r3+0) if (tty->termios.c_lflag & ECHO) { 8005bb8: 44 40 00 0e be r2,r0,8005bf0 <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 8005bbc: 5d a0 00 03 bne r13,r0,8005bc8 8005bc0: 20 a1 00 10 andi r1,r5,0x10 8005bc4: 44 2d 00 11 be r1,r13,8005c08 <== NEVER TAKEN echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 8005bc8: 44 70 00 45 be r3,r16,8005cdc rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 8005bcc: 29 e2 00 00 lw r2,(r15+0) 8005bd0: 34 6c 00 01 addi r12,r3,1 8005bd4: ba 20 08 00 mv r1,r17 8005bd8: b4 4c 10 00 add r2,r2,r12 8005bdc: 40 42 00 00 lbu r2,(r2+0) 8005be0: 20 42 00 20 andi r2,r2,0x20 8005be4: 44 40 00 36 be r2,r0,8005cbc <== ALWAYS TAKEN 8005be8: 20 a5 02 00 andi r5,r5,0x200 <== NOT EXECUTED 8005bec: 5c a0 00 24 bne r5,r0,8005c7c <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 8005bf0: 45 a0 00 09 be r13,r0,8005c14 echo ('\n', tty); return; } } while (tty->ccount) { 8005bf4: 29 64 00 20 lw r4,(r11+32) 8005bf8: 44 80 00 07 be r4,r0,8005c14 } 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); 8005bfc: 29 65 00 3c lw r5,(r11+60) 8005c00: 20 a2 00 08 andi r2,r5,0x8 8005c04: e3 ff ff e8 bi 8005ba4 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); 8005c08: 41 61 00 43 lbu r1,(r11+67) <== NOT EXECUTED 8005c0c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8005c10: fb ff ff a6 calli 8005aa8 <== NOT EXECUTED } } if (!lineFlag) break; } } 8005c14: 2b 9d 00 04 lw ra,(sp+4) 8005c18: 2b 8b 00 20 lw r11,(sp+32) 8005c1c: 2b 8c 00 1c lw r12,(sp+28) 8005c20: 2b 8d 00 18 lw r13,(sp+24) 8005c24: 2b 8e 00 14 lw r14,(sp+20) 8005c28: 2b 8f 00 10 lw r15,(sp+16) 8005c2c: 2b 90 00 0c lw r16,(sp+12) 8005c30: 2b 91 00 08 lw r17,(sp+8) 8005c34: 37 9c 00 20 addi sp,sp,32 8005c38: c3 a0 00 00 ret erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 8005c3c: 28 25 00 3c lw r5,(r1+60) 8005c40: 20 a2 00 08 andi r2,r5,0x8 8005c44: 44 40 00 48 be r2,r0,8005d64 <== NEVER TAKEN tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 8005c48: 20 ac 00 10 andi r12,r5,0x10 8005c4c: 5d 80 ff cf bne r12,r0,8005b88 <== ALWAYS TAKEN tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 8005c50: 40 21 00 44 lbu r1,(r1+68) <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 8005c54: 59 60 00 20 sw (r11+32),r0 <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 8005c58: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8005c5c: fb ff ff 93 calli 8005aa8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 8005c60: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 8005c64: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8005c68: 44 2c ff eb be r1,r12,8005c14 <== NOT EXECUTED echo ('\n', tty); 8005c6c: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 8005c70: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8005c74: fb ff ff 8d calli 8005aa8 <== NOT EXECUTED 8005c78: e3 ff ff e7 bi 8005c14 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 8005c7c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8005c80: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8005c84: fb ff fe ce calli 80057bc <== NOT EXECUTED if (tty->column) 8005c88: 29 62 00 28 lw r2,(r11+40) <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 8005c8c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED if (tty->column) 8005c90: 44 40 00 03 be r2,r0,8005c9c <== NOT EXECUTED tty->column--; 8005c94: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED 8005c98: 59 62 00 28 sw (r11+40),r2 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 8005c9c: 29 e2 00 00 lw r2,(r15+0) <== NOT EXECUTED 8005ca0: b4 4c 60 00 add r12,r2,r12 <== NOT EXECUTED 8005ca4: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED 8005ca8: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED 8005cac: 44 40 00 04 be r2,r0,8005cbc <== NOT EXECUTED 8005cb0: 29 62 00 3c lw r2,(r11+60) <== NOT EXECUTED 8005cb4: 20 42 02 00 andi r2,r2,0x200 <== NOT EXECUTED 8005cb8: 44 40 ff ce be r2,r0,8005bf0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 8005cbc: 34 02 00 03 mvi r2,3 8005cc0: b9 60 18 00 mv r3,r11 8005cc4: fb ff fe be calli 80057bc if (tty->column) 8005cc8: 29 61 00 28 lw r1,(r11+40) 8005ccc: 44 20 ff c9 be r1,r0,8005bf0 <== NEVER TAKEN tty->column--; 8005cd0: 34 21 ff ff addi r1,r1,-1 8005cd4: 59 61 00 28 sw (r11+40),r1 8005cd8: e3 ff ff c6 bi 8005bf0 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; 8005cdc: 29 6c 00 2c lw r12,(r11+44) int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 8005ce0: 44 80 00 0f be r4,r0,8005d1c c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 8005ce4: 29 e1 00 00 lw r1,(r15+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; int i = 0; 8005ce8: 34 03 00 00 mvi r3,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) 8005cec: 20 a5 02 00 andi r5,r5,0x200 * Erase a character or line * 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) 8005cf0: b4 e3 10 00 add r2,r7,r3 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 8005cf4: 40 46 00 00 lbu r6,(r2+0) 8005cf8: 34 63 00 01 addi r3,r3,1 if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 8005cfc: b4 26 10 00 add r2,r1,r6 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 8005d00: 44 d0 00 15 be r6,r16,8005d54 col = (col | 7) + 1; } else if (iscntrl (c)) { 8005d04: 40 42 00 01 lbu r2,(r2+1) 8005d08: 20 42 00 20 andi r2,r2,0x20 8005d0c: 44 40 00 0f be r2,r0,8005d48 <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) 8005d10: 44 a0 00 02 be r5,r0,8005d18 <== NOT EXECUTED col += 2; 8005d14: 35 8c 00 02 addi r12,r12,2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 8005d18: 5c 83 ff f6 bne r4,r3,8005cf0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 8005d1c: 29 61 00 28 lw r1,(r11+40) 8005d20: 4d 81 ff b4 bge r12,r1,8005bf0 <== NEVER TAKEN rtems_termios_puts ("\b", 1, tty); 8005d24: b9 60 18 00 mv r3,r11 8005d28: b9 c0 08 00 mv r1,r14 8005d2c: 34 02 00 01 mvi r2,1 8005d30: fb ff fe a3 calli 80057bc tty->column--; 8005d34: 29 63 00 28 lw r3,(r11+40) 8005d38: 34 63 ff ff addi r3,r3,-1 8005d3c: 59 63 00 28 sw (r11+40),r3 } /* * Back up over the tab */ while (tty->column > col) { 8005d40: 48 6c ff f9 bg r3,r12,8005d24 8005d44: e3 ff ff ab bi 8005bf0 col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 8005d48: 35 8c 00 01 addi r12,r12,1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 8005d4c: 5c 83 ff e9 bne r4,r3,8005cf0 8005d50: e3 ff ff f3 bi 8005d1c c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 8005d54: 39 8c 00 07 ori r12,r12,0x7 8005d58: 35 8c 00 01 addi r12,r12,1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 8005d5c: 5c 83 ff e5 bne r4,r3,8005cf0 <== ALWAYS TAKEN 8005d60: e3 ff ff ef bi 8005d1c <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 8005d64: 58 20 00 20 sw (r1+32),r0 <== NOT EXECUTED return; 8005d68: e3 ff ff ab bi 8005c14 <== NOT EXECUTED =============================================================================== 0800201c : int fcntl( int fd, int cmd, ... ) { 800201c: 37 9c ff d0 addi sp,sp,-48 8002020: 5b 8b 00 10 sw (sp+16),r11 8002024: 5b 8c 00 0c sw (sp+12),r12 8002028: 5b 8d 00 08 sw (sp+8),r13 800202c: 5b 9d 00 04 sw (sp+4),ra int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 8002030: 78 09 08 01 mvhi r9,0x801 8002034: 39 29 50 10 ori r9,r9,0x5010 8002038: 29 29 00 00 lw r9,(r9+0) int fcntl( int fd, int cmd, ... ) { 800203c: 5b 85 00 24 sw (sp+36),r5 8002040: 5b 82 00 18 sw (sp+24),r2 8002044: 5b 83 00 1c sw (sp+28),r3 8002048: 5b 84 00 20 sw (sp+32),r4 800204c: 5b 86 00 28 sw (sp+40),r6 8002050: 5b 87 00 2c sw (sp+44),r7 8002054: 5b 88 00 30 sw (sp+48),r8 int ret; va_list ap; va_start( ap, cmd ); 8002058: 37 85 00 1c addi r5,sp,28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 800205c: 55 21 00 06 bgu r9,r1,8002074 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 8002060: f8 00 2b 02 calli 800cc68 <__errno> 8002064: 34 02 00 09 mvi r2,9 8002068: 58 22 00 00 sw (r1+0),r2 800206c: 34 0c ff ff mvi r12,-1 8002070: e0 00 00 1b bi 80020dc int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8002074: b4 21 18 00 add r3,r1,r1 8002078: 78 0c 08 01 mvhi r12,0x801 800207c: b4 63 18 00 add r3,r3,r3 8002080: 39 8c 56 a0 ori r12,r12,0x56a0 8002084: b4 63 18 00 add r3,r3,r3 8002088: 29 86 00 00 lw r6,(r12+0) 800208c: b4 63 18 00 add r3,r3,r3 8002090: b4 63 18 00 add r3,r3,r3 8002094: b4 63 18 00 add r3,r3,r3 8002098: b4 c3 58 00 add r11,r6,r3 rtems_libio_check_is_open(iop); 800209c: 29 61 00 18 lw r1,(r11+24) 80020a0: 20 23 01 00 andi r3,r1,0x100 80020a4: 44 60 ff ef be r3,r0,8002060 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 80020a8: 34 03 00 09 mvi r3,9 80020ac: 54 43 00 58 bgu r2,r3,800220c 80020b0: 78 04 08 01 mvhi r4,0x801 80020b4: b4 42 18 00 add r3,r2,r2 80020b8: 38 84 3d 70 ori r4,r4,0x3d70 80020bc: b4 63 18 00 add r3,r3,r3 80020c0: b4 83 18 00 add r3,r4,r3 80020c4: 28 63 00 00 lw r3,(r3+0) 80020c8: c0 60 00 00 b r3 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 80020cc: f8 00 2a e7 calli 800cc68 <__errno> 80020d0: 34 02 00 86 mvi r2,134 80020d4: 58 22 00 00 sw (r1+0),r2 if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; ret = -1; 80020d8: 34 0c ff ff mvi r12,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 80020dc: b9 80 08 00 mv r1,r12 80020e0: 2b 9d 00 04 lw ra,(sp+4) 80020e4: 2b 8b 00 10 lw r11,(sp+16) 80020e8: 2b 8c 00 0c lw r12,(sp+12) 80020ec: 2b 8d 00 08 lw r13,(sp+8) 80020f0: 37 9c 00 30 addi sp,sp,48 80020f4: c3 a0 00 00 ret 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 ) ); 80020f8: 28 a1 00 00 lw r1,(r5+0) 80020fc: 5b 82 00 14 sw (sp+20),r2 rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 8002100: 34 0c 00 00 mvi r12,0 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 ) ); 8002104: f8 00 01 bd calli 80027f8 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 8002108: 29 64 00 18 lw r4,(r11+24) 800210c: 34 03 fd fe mvi r3,-514 8002110: 20 21 02 01 andi r1,r1,0x201 8002114: a0 64 18 00 and r3,r3,r4 8002118: 2b 82 00 14 lw r2,(sp+20) 800211c: b8 23 08 00 or r1,r1,r3 8002120: 59 61 00 18 sw (r11+24),r1 * 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 ); 8002124: 29 63 00 24 lw r3,(r11+36) 8002128: b8 40 08 00 mv r1,r2 800212c: b9 60 10 00 mv r2,r11 8002130: 28 63 00 30 lw r3,(r3+48) 8002134: d8 60 00 00 call r3 8002138: b8 20 58 00 mv r11,r1 if (err) { 800213c: 44 20 ff e8 be r1,r0,80020dc <== ALWAYS TAKEN errno = err; 8002140: f8 00 2a ca calli 800cc68 <__errno> <== NOT EXECUTED 8002144: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8002148: e3 ff ff e4 bi 80020d8 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 800214c: 5b 82 00 14 sw (sp+20),r2 8002150: f8 00 01 c0 calli 8002850 8002154: b8 20 60 00 mv r12,r1 8002158: 2b 82 00 14 lw r2,(sp+20) /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 800215c: 48 0c ff e0 bg r0,r12,80020dc <== NEVER TAKEN 8002160: e3 ff ff f1 bi 8002124 * 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 ) ) 8002164: 28 a3 00 00 lw r3,(r5+0) 8002168: 44 60 00 2d be r3,r0,800221c <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 800216c: 38 21 08 00 ori r1,r1,0x800 8002170: 59 61 00 18 sw (r11+24),r1 rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 8002174: 34 0c 00 00 mvi r12,0 8002178: e3 ff ff eb bi 8002124 diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 800217c: 20 2c 08 00 andi r12,r1,0x800 8002180: 7d 8c 00 00 cmpnei r12,r12,0 8002184: e3 ff ff e8 bi 8002124 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 8002188: 28 ad 00 00 lw r13,(r5+0) if ( fd2 ) 800218c: 45 a0 00 29 be r13,r0,8002230 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 8002190: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 8002194: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8002198: 51 a9 00 09 bgeu r13,r9,80021bc <== NOT EXECUTED 800219c: b5 ad 18 00 add r3,r13,r13 <== NOT EXECUTED 80021a0: b4 63 18 00 add r3,r3,r3 <== NOT EXECUTED 80021a4: b4 63 18 00 add r3,r3,r3 <== NOT EXECUTED 80021a8: b4 63 18 00 add r3,r3,r3 <== NOT EXECUTED 80021ac: b4 63 18 00 add r3,r3,r3 <== NOT EXECUTED 80021b0: b4 63 18 00 add r3,r3,r3 <== NOT EXECUTED 80021b4: b4 c3 18 00 add r3,r6,r3 <== NOT EXECUTED 80021b8: b8 60 60 00 mv r12,r3 <== NOT EXECUTED break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 80021bc: 29 64 00 1c lw r4,(r11+28) ret = (int) (diop - rtems_libio_iops); 80021c0: c9 86 60 00 sub r12,r12,r6 80021c4: 15 8c 00 01 sri r12,r12,1 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 80021c8: 58 64 00 1c sw (r3+28),r4 80021cc: 29 64 00 20 lw r4,(r11+32) ret = -1; break; } } diop->flags = iop->flags; 80021d0: 58 61 00 18 sw (r3+24),r1 diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 80021d4: 15 8c 00 01 sri r12,r12,1 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 80021d8: 58 64 00 20 sw (r3+32),r4 80021dc: 29 61 00 24 lw r1,(r11+36) ret = (int) (diop - rtems_libio_iops); 80021e0: 15 8c 00 01 sri r12,r12,1 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 80021e4: 58 61 00 24 sw (r3+36),r1 80021e8: 29 61 00 28 lw r1,(r11+40) ret = (int) (diop - rtems_libio_iops); 80021ec: 15 8c 00 01 sri r12,r12,1 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 80021f0: 58 61 00 28 sw (r3+40),r1 80021f4: 29 61 00 2c lw r1,(r11+44) ret = (int) (diop - rtems_libio_iops); 80021f8: 15 8c 00 01 sri r12,r12,1 80021fc: 15 8c 00 01 sri r12,r12,1 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 8002200: 58 61 00 2c sw (r3+44),r1 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 8002204: 48 0c ff b6 bg r0,r12,80020dc <== NEVER TAKEN 8002208: e3 ff ff c7 bi 8002124 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 800220c: f8 00 2a 97 calli 800cc68 <__errno> 8002210: 34 02 00 16 mvi r2,22 8002214: 58 22 00 00 sw (r1+0),r2 8002218: e3 ff ff b0 bi 80020d8 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 800221c: 34 03 f7 ff mvi r3,-2049 <== NOT EXECUTED 8002220: a0 23 08 00 and r1,r1,r3 <== NOT EXECUTED 8002224: 59 61 00 18 sw (r11+24),r1 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 8002228: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 800222c: e3 ff ff be bi 8002124 <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 8002230: 5b 82 00 14 sw (sp+20),r2 8002234: f8 00 01 9c calli 80028a4 8002238: b8 20 18 00 mv r3,r1 if ( diop == 0 ) { 800223c: 2b 82 00 14 lw r2,(sp+20) 8002240: 44 2d ff a6 be r1,r13,80020d8 <== NEVER TAKEN 8002244: 29 86 00 00 lw r6,(r12+0) 8002248: 29 61 00 18 lw r1,(r11+24) 800224c: b8 60 60 00 mv r12,r3 8002250: e3 ff ff db bi 80021bc =============================================================================== 08009dfc : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 8009dfc: 37 9c ff e0 addi sp,sp,-32 8009e00: 5b 8b 00 1c sw (sp+28),r11 8009e04: 5b 8c 00 18 sw (sp+24),r12 8009e08: 5b 8d 00 14 sw (sp+20),r13 8009e0c: 5b 8e 00 10 sw (sp+16),r14 8009e10: 5b 8f 00 0c sw (sp+12),r15 8009e14: 5b 90 00 08 sw (sp+8),r16 8009e18: 5b 9d 00 04 sw (sp+4),ra 8009e1c: b8 20 68 00 mv r13,r1 8009e20: b8 40 70 00 mv r14,r2 ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); 8009e24: fb ff ff 6b calli 8009bd0 8009e28: b8 20 60 00 mv r12,r1 if (err) 8009e2c: 5c 20 00 1a bne r1,r0,8009e94 return err; pipe = *pipep; 8009e30: 29 ab 00 00 lw r11,(r13+0) if (pipe == NULL) { 8009e34: 45 61 00 22 be r11,r1,8009ebc err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 8009e38: 29 61 00 28 lw r1,(r11+40) 8009e3c: 34 02 00 00 mvi r2,0 8009e40: 34 03 00 00 mvi r3,0 8009e44: fb ff ea d3 calli 8004990 8009e48: 7c 21 00 00 cmpnei r1,r1,0 err = -EINTR; if (*pipep == NULL) { 8009e4c: 29 a2 00 00 lw r2,(r13+0) err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 8009e50: c8 01 78 00 sub r15,r0,r1 8009e54: 34 03 ff fc mvi r3,-4 8009e58: a1 e3 78 00 and r15,r15,r3 err = -EINTR; if (*pipep == NULL) { 8009e5c: 44 40 00 a7 be r2,r0,800a0f8 else *pipep = pipe; } out: pipe_unlock(); 8009e60: fb ff ff 8e calli 8009c98 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 8009e64: 5d e0 00 d1 bne r15,r0,800a1a8 <== NEVER TAKEN return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 8009e68: 29 c1 00 18 lw r1,(r14+24) 8009e6c: 34 02 00 04 mvi r2,4 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 8009e70: 29 ab 00 00 lw r11,(r13+0) switch (LIBIO_ACCMODE(iop)) { 8009e74: 20 21 00 06 andi r1,r1,0x6 8009e78: 44 22 00 83 be r1,r2,800a084 8009e7c: 34 02 00 06 mvi r2,6 8009e80: 44 22 00 6f be r1,r2,800a03c 8009e84: 34 02 00 02 mvi r2,2 8009e88: 44 22 00 4c be r1,r2,8009fb8 <== ALWAYS TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 8009e8c: 29 61 00 28 lw r1,(r11+40) 8009e90: fb ff eb 1c calli 8004b00 return 0; out_error: pipe_release(pipep, iop); return err; } 8009e94: b9 80 08 00 mv r1,r12 8009e98: 2b 9d 00 04 lw ra,(sp+4) 8009e9c: 2b 8b 00 1c lw r11,(sp+28) 8009ea0: 2b 8c 00 18 lw r12,(sp+24) 8009ea4: 2b 8d 00 14 lw r13,(sp+20) 8009ea8: 2b 8e 00 10 lw r14,(sp+16) 8009eac: 2b 8f 00 0c lw r15,(sp+12) 8009eb0: 2b 90 00 08 lw r16,(sp+8) 8009eb4: 37 9c 00 20 addi sp,sp,32 8009eb8: c3 a0 00 00 ret { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 8009ebc: 34 01 00 34 mvi r1,52 8009ec0: fb ff e4 e5 calli 8003254 8009ec4: b8 20 58 00 mv r11,r1 8009ec8: b8 20 80 00 mv r16,r1 if (pipe == NULL) 8009ecc: 44 20 00 b4 be r1,r0,800a19c return err; memset(pipe, 0, sizeof(pipe_control_t)); 8009ed0: 58 20 00 00 sw (r1+0),r0 8009ed4: 58 20 00 08 sw (r1+8),r0 8009ed8: 58 20 00 0c sw (r1+12),r0 8009edc: 58 20 00 10 sw (r1+16),r0 8009ee0: 58 20 00 14 sw (r1+20),r0 8009ee4: 58 20 00 18 sw (r1+24),r0 8009ee8: 58 20 00 1c sw (r1+28),r0 8009eec: 58 20 00 20 sw (r1+32),r0 8009ef0: 58 20 00 24 sw (r1+36),r0 8009ef4: 58 20 00 28 sw (r1+40),r0 8009ef8: 58 20 00 2c sw (r1+44),r0 8009efc: 58 20 00 30 sw (r1+48),r0 pipe->Size = PIPE_BUF; 8009f00: 34 01 02 00 mvi r1,512 8009f04: 59 61 00 04 sw (r11+4),r1 pipe->Buffer = malloc(pipe->Size); 8009f08: fb ff e4 d3 calli 8003254 8009f0c: 59 61 00 00 sw (r11+0),r1 if (! pipe->Buffer) 8009f10: 44 20 00 a1 be r1,r0,800a194 <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 8009f14: 78 0f 08 01 mvhi r15,0x801 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 8009f18: 78 05 08 01 mvhi r5,0x801 rtems_build_name ('P', 'I', 'r', c), 8009f1c: 39 ef e1 20 ori r15,r15,0xe120 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 8009f20: 38 a5 d1 1c ori r5,r5,0xd11c rtems_build_name ('P', 'I', 'r', c), 8009f24: 41 e4 00 00 lbu r4,(r15+0) if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 8009f28: 28 a1 00 00 lw r1,(r5+0) 8009f2c: 34 02 00 00 mvi r2,0 8009f30: 34 03 00 00 mvi r3,0 8009f34: b8 81 08 00 or r1,r4,r1 8009f38: 35 64 00 2c addi r4,r11,44 8009f3c: f8 00 05 89 calli 800b560 8009f40: 5c 20 00 93 bne r1,r0,800a18c rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 8009f44: 78 05 08 01 mvhi r5,0x801 8009f48: 38 a5 d1 20 ori r5,r5,0xd120 rtems_build_name ('P', 'I', 'w', c), 8009f4c: 41 e4 00 00 lbu r4,(r15+0) 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( 8009f50: 28 a1 00 00 lw r1,(r5+0) 8009f54: 34 02 00 00 mvi r2,0 8009f58: 34 03 00 00 mvi r3,0 8009f5c: b8 81 08 00 or r1,r4,r1 8009f60: 35 64 00 30 addi r4,r11,48 8009f64: f8 00 05 7f calli 800b560 8009f68: 5c 20 00 87 bne r1,r0,800a184 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 8009f6c: 78 05 08 01 mvhi r5,0x801 8009f70: 38 a5 d1 24 ori r5,r5,0xd124 rtems_build_name ('P', 'I', 's', c), 1, 8009f74: 41 e4 00 00 lbu r4,(r15+0) 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( 8009f78: 28 a1 00 00 lw r1,(r5+0) 8009f7c: 34 02 00 01 mvi r2,1 8009f80: 34 03 00 10 mvi r3,16 8009f84: b8 81 08 00 or r1,r4,r1 8009f88: 35 65 00 28 addi r5,r11,40 8009f8c: 34 04 00 00 mvi r4,0 8009f90: fb ff e9 c5 calli 80046a4 8009f94: 5c 20 00 7a bne r1,r0,800a17c #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 8009f98: 41 e1 00 00 lbu r1,(r15+0) 8009f9c: 34 22 00 01 addi r2,r1,1 8009fa0: 31 e2 00 00 sb (r15+0),r2 8009fa4: 34 02 00 7a mvi r2,122 8009fa8: 5c 22 ff a4 bne r1,r2,8009e38 c = 'a'; 8009fac: 34 01 00 61 mvi r1,97 8009fb0: 31 e1 00 00 sb (r15+0),r1 8009fb4: e3 ff ff a1 bi 8009e38 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 8009fb8: 29 63 00 20 lw r3,(r11+32) if (pipe->Readers ++ == 0) 8009fbc: 29 61 00 10 lw r1,(r11+16) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 8009fc0: 34 63 00 01 addi r3,r3,1 if (pipe->Readers ++ == 0) 8009fc4: 34 22 00 01 addi r2,r1,1 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 8009fc8: 59 63 00 20 sw (r11+32),r3 if (pipe->Readers ++ == 0) 8009fcc: 59 62 00 10 sw (r11+16),r2 8009fd0: 44 20 00 5b be r1,r0,800a13c <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 8009fd4: 29 61 00 14 lw r1,(r11+20) 8009fd8: 5c 20 ff ad bne r1,r0,8009e8c /* Not an error */ if (LIBIO_NODELAY(iop)) 8009fdc: 29 c2 00 18 lw r2,(r14+24) 8009fe0: 20 42 00 01 andi r2,r2,0x1 8009fe4: 5c 41 ff aa bne r2,r1,8009e8c break; prevCounter = pipe->writerCounter; 8009fe8: 29 70 00 24 lw r16,(r11+36) 8009fec: e0 00 00 06 bi 800a004 /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 8009ff0: 29 61 00 28 lw r1,(r11+40) 8009ff4: fb ff ea 67 calli 8004990 8009ff8: 5c 2f 00 0c bne r1,r15,800a028 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); 8009ffc: 29 61 00 24 lw r1,(r11+36) 800a000: 5c 30 ff a3 bne r1,r16,8009e8c <== ALWAYS TAKEN prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 800a004: 29 61 00 28 lw r1,(r11+40) 800a008: fb ff ea be calli 8004b00 if (! PIPE_READWAIT(pipe)) 800a00c: 29 61 00 2c lw r1,(r11+44) 800a010: 34 02 00 00 mvi r2,0 800a014: f8 00 05 eb calli 800b7c0 800a018: b8 20 78 00 mv r15,r1 goto out_error; if (! PIPE_LOCK(pipe)) 800a01c: 34 02 00 00 mvi r2,0 800a020: 34 03 00 00 mvi r3,0 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 800a024: 44 20 ff f3 be r1,r0,8009ff0 <== ALWAYS TAKEN goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 800a028: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 800a02c: b9 a0 08 00 mv r1,r13 800a030: b9 c0 10 00 mv r2,r14 800a034: fb ff ff 27 calli 8009cd0 return err; 800a038: e3 ff ff 97 bi 8009e94 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 800a03c: 29 63 00 20 lw r3,(r11+32) if (pipe->Readers ++ == 0) 800a040: 29 61 00 10 lw r1,(r11+16) } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 800a044: 34 63 00 01 addi r3,r3,1 if (pipe->Readers ++ == 0) 800a048: 34 22 00 01 addi r2,r1,1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 800a04c: 59 63 00 20 sw (r11+32),r3 if (pipe->Readers ++ == 0) 800a050: 59 62 00 10 sw (r11+16),r2 800a054: 44 20 00 3e be r1,r0,800a14c <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 800a058: 29 63 00 24 lw r3,(r11+36) if (pipe->Writers ++ == 0) 800a05c: 29 61 00 14 lw r1,(r11+20) case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 800a060: 34 63 00 01 addi r3,r3,1 if (pipe->Writers ++ == 0) 800a064: 34 22 00 01 addi r2,r1,1 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 800a068: 59 63 00 24 sw (r11+36),r3 if (pipe->Writers ++ == 0) 800a06c: 59 62 00 14 sw (r11+20),r2 800a070: 5c 20 ff 87 bne r1,r0,8009e8c <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 800a074: 29 61 00 2c lw r1,(r11+44) 800a078: 37 82 00 20 addi r2,sp,32 800a07c: f8 00 05 b0 calli 800b73c 800a080: e3 ff ff 83 bi 8009e8c } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 800a084: 29 63 00 24 lw r3,(r11+36) if (pipe->Writers ++ == 0) 800a088: 29 61 00 14 lw r1,(r11+20) } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 800a08c: 34 63 00 01 addi r3,r3,1 if (pipe->Writers ++ == 0) 800a090: 34 22 00 01 addi r2,r1,1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 800a094: 59 63 00 24 sw (r11+36),r3 if (pipe->Writers ++ == 0) 800a098: 59 62 00 14 sw (r11+20),r2 800a09c: 44 20 00 30 be r1,r0,800a15c <== ALWAYS TAKEN PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 800a0a0: 29 61 00 10 lw r1,(r11+16) 800a0a4: 5c 20 ff 7a bne r1,r0,8009e8c 800a0a8: 29 c2 00 18 lw r2,(r14+24) 800a0ac: 20 42 00 01 andi r2,r2,0x1 800a0b0: 5c 41 00 2f bne r2,r1,800a16c err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 800a0b4: 29 70 00 20 lw r16,(r11+32) 800a0b8: e0 00 00 06 bi 800a0d0 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 800a0bc: 29 61 00 28 lw r1,(r11+40) 800a0c0: fb ff ea 34 calli 8004990 800a0c4: 5c 2f ff d9 bne r1,r15,800a028 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 800a0c8: 29 61 00 20 lw r1,(r11+32) 800a0cc: 5c 30 ff 70 bne r1,r16,8009e8c <== ALWAYS TAKEN if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 800a0d0: 29 61 00 28 lw r1,(r11+40) 800a0d4: fb ff ea 8b calli 8004b00 if (! PIPE_WRITEWAIT(pipe)) 800a0d8: 29 61 00 30 lw r1,(r11+48) 800a0dc: 34 02 00 00 mvi r2,0 800a0e0: f8 00 05 b8 calli 800b7c0 800a0e4: b8 20 78 00 mv r15,r1 goto out_error; if (! PIPE_LOCK(pipe)) 800a0e8: 34 02 00 00 mvi r2,0 800a0ec: 34 03 00 00 mvi r3,0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 800a0f0: 44 20 ff f3 be r1,r0,800a0bc <== ALWAYS TAKEN 800a0f4: e3 ff ff cd bi 800a028 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 800a0f8: 5d e2 00 04 bne r15,r2,800a108 <== NEVER TAKEN pipe_free(pipe); else *pipep = pipe; 800a0fc: 59 ab 00 00 sw (r13+0),r11 } out: pipe_unlock(); 800a100: fb ff fe e6 calli 8009c98 800a104: e3 ff ff 59 bi 8009e68 /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 800a108: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe); 800a10c: b9 e0 60 00 mv r12,r15 <== NOT EXECUTED /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 800a110: f8 00 05 57 calli 800b66c <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 800a114: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a118: f8 00 05 55 calli 800b66c <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 800a11c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a120: fb ff e9 e5 calli 80048b4 <== NOT EXECUTED free(pipe->Buffer); 800a124: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 800a128: fb ff e2 72 calli 8002af0 <== NOT EXECUTED free(pipe); 800a12c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800a130: fb ff e2 70 calli 8002af0 <== NOT EXECUTED else *pipep = pipe; } out: pipe_unlock(); 800a134: fb ff fe d9 calli 8009c98 <== NOT EXECUTED 800a138: e3 ff ff 57 bi 8009e94 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 800a13c: 29 61 00 30 lw r1,(r11+48) 800a140: 37 82 00 20 addi r2,sp,32 800a144: f8 00 05 7e calli 800b73c 800a148: e3 ff ff a3 bi 8009fd4 break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 800a14c: 29 61 00 30 lw r1,(r11+48) 800a150: 37 82 00 20 addi r2,sp,32 800a154: f8 00 05 7a calli 800b73c 800a158: e3 ff ff c0 bi 800a058 case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 800a15c: 29 61 00 2c lw r1,(r11+44) 800a160: 37 82 00 20 addi r2,sp,32 800a164: f8 00 05 76 calli 800b73c 800a168: e3 ff ff ce bi 800a0a0 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 800a16c: 29 61 00 28 lw r1,(r11+40) err = -ENXIO; 800a170: 34 0c ff fa mvi r12,-6 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 800a174: fb ff ea 63 calli 8004b00 err = -ENXIO; goto out_error; 800a178: e3 ff ff ad bi 800a02c if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 800a17c: 29 61 00 30 lw r1,(r11+48) 800a180: f8 00 05 3b calli 800b66c err_wbar: rtems_barrier_delete(pipe->readBarrier); 800a184: 2a 01 00 2c lw r1,(r16+44) 800a188: f8 00 05 39 calli 800b66c err_rbar: free(pipe->Buffer); 800a18c: 2a 01 00 00 lw r1,(r16+0) 800a190: fb ff e2 58 calli 8002af0 err_buf: free(pipe); 800a194: ba 00 08 00 mv r1,r16 800a198: fb ff e2 56 calli 8002af0 { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe); 800a19c: 34 0c ff f4 mvi r12,-12 else *pipep = pipe; } out: pipe_unlock(); 800a1a0: fb ff fe be calli 8009c98 800a1a4: e3 ff ff 3c bi 8009e94 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 800a1a8: b9 e0 60 00 mv r12,r15 <== NOT EXECUTED 800a1ac: e3 ff ff 3a bi 8009e94 <== NOT EXECUTED =============================================================================== 0800230c : long fpathconf( int fd, int name ) { 800230c: 37 9c ff fc addi sp,sp,-4 8002310: 5b 9d 00 04 sw (sp+4),ra long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 8002314: 78 03 08 01 mvhi r3,0x801 8002318: 38 63 50 10 ori r3,r3,0x5010 800231c: 28 63 00 00 lw r3,(r3+0) 8002320: 54 61 00 06 bgu r3,r1,8002338 iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 8002324: f8 00 2a 51 calli 800cc68 <__errno> 8002328: 34 02 00 09 mvi r2,9 800232c: 58 22 00 00 sw (r1+0),r2 8002330: 34 01 ff ff mvi r1,-1 8002334: e0 00 00 1b bi 80023a0 long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); 8002338: b4 21 08 00 add r1,r1,r1 800233c: 78 03 08 01 mvhi r3,0x801 8002340: b4 21 08 00 add r1,r1,r1 8002344: 38 63 56 a0 ori r3,r3,0x56a0 8002348: b4 21 08 00 add r1,r1,r1 800234c: 28 63 00 00 lw r3,(r3+0) 8002350: b4 21 08 00 add r1,r1,r1 8002354: b4 21 08 00 add r1,r1,r1 8002358: b4 21 08 00 add r1,r1,r1 800235c: b4 61 08 00 add r1,r3,r1 rtems_libio_check_is_open(iop); 8002360: 28 23 00 18 lw r3,(r1+24) 8002364: 20 64 01 00 andi r4,r3,0x100 8002368: 44 80 ff ef be r4,r0,8002324 <== NEVER TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 800236c: 20 63 00 02 andi r3,r3,0x2 8002370: 44 60 00 25 be r3,r0,8002404 <== NEVER TAKEN * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 8002374: 34 03 00 0b mvi r3,11 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 8002378: 28 21 00 2c lw r1,(r1+44) switch ( name ) { 800237c: 54 43 00 22 bgu r2,r3,8002404 8002380: 78 03 08 01 mvhi r3,0x801 8002384: b4 42 10 00 add r2,r2,r2 8002388: 38 63 3d 98 ori r3,r3,0x3d98 800238c: b4 42 10 00 add r2,r2,r2 8002390: b4 62 10 00 add r2,r3,r2 8002394: 28 42 00 00 lw r2,(r2+0) 8002398: c0 40 00 00 b r2 break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 800239c: 28 21 00 5c lw r1,(r1+92) rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 80023a0: 2b 9d 00 04 lw ra,(sp+4) 80023a4: 37 9c 00 04 addi sp,sp,4 80023a8: c3 a0 00 00 ret break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 80023ac: 28 21 00 50 lw r1,(r1+80) break; 80023b0: e3 ff ff fc bi 80023a0 break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 80023b4: 28 21 00 64 lw r1,(r1+100) break; 80023b8: e3 ff ff fa bi 80023a0 break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 80023bc: 28 21 00 58 lw r1,(r1+88) break; 80023c0: e3 ff ff f8 bi 80023a0 break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 80023c4: 28 21 00 54 lw r1,(r1+84) break; 80023c8: e3 ff ff f6 bi 80023a0 break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 80023cc: 28 21 00 4c lw r1,(r1+76) break; 80023d0: e3 ff ff f4 bi 80023a0 break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 80023d4: 28 21 00 48 lw r1,(r1+72) break; 80023d8: e3 ff ff f2 bi 80023a0 break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 80023dc: 28 21 00 44 lw r1,(r1+68) break; 80023e0: e3 ff ff f0 bi 80023a0 break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 80023e4: 28 21 00 40 lw r1,(r1+64) break; 80023e8: e3 ff ff ee bi 80023a0 switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 80023ec: 28 21 00 3c lw r1,(r1+60) break; 80023f0: e3 ff ff ec bi 80023a0 the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 80023f4: 28 21 00 38 lw r1,(r1+56) break; 80023f8: e3 ff ff ea bi 80023a0 break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 80023fc: 28 21 00 60 lw r1,(r1+96) break; 8002400: e3 ff ff e8 bi 80023a0 default: rtems_set_errno_and_return_minus_one( EINVAL ); 8002404: f8 00 2a 19 calli 800cc68 <__errno> 8002408: 34 02 00 16 mvi r2,22 800240c: 58 22 00 00 sw (r1+0),r2 8002410: 34 01 ff ff mvi r1,-1 8002414: e3 ff ff e3 bi 80023a0 =============================================================================== 0800154c : #include void free( void *ptr ) { 800154c: 37 9c ff f4 addi sp,sp,-12 8001550: 5b 8b 00 0c sw (sp+12),r11 8001554: 5b 8c 00 08 sw (sp+8),r12 8001558: 5b 9d 00 04 sw (sp+4),ra MSBUMP(free_calls, 1); 800155c: 78 03 08 01 mvhi r3,0x801 8001560: 38 63 36 b8 ori r3,r3,0x36b8 8001564: 28 62 00 0c lw r2,(r3+12) #include void free( void *ptr ) { 8001568: b8 20 58 00 mv r11,r1 MSBUMP(free_calls, 1); 800156c: 34 41 00 01 addi r1,r2,1 8001570: 58 61 00 0c sw (r3+12),r1 if ( !ptr ) 8001574: 45 60 00 1a be r11,r0,80015dc #endif /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 8001578: 78 01 08 01 mvhi r1,0x801 800157c: 38 21 39 9c ori r1,r1,0x399c 8001580: 28 22 00 00 lw r2,(r1+0) 8001584: 34 01 00 03 mvi r1,3 8001588: 44 41 00 1a be r2,r1,80015f0 <== ALWAYS TAKEN } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 800158c: 78 01 08 01 mvhi r1,0x801 8001590: 38 21 36 10 ori r1,r1,0x3610 8001594: 28 21 00 00 lw r1,(r1+0) 8001598: 44 20 00 04 be r1,r0,80015a8 (*rtems_malloc_statistics_helpers->at_free)(ptr); 800159c: 28 22 00 08 lw r2,(r1+8) 80015a0: b9 60 08 00 mv r1,r11 80015a4: d8 40 00 00 call r2 if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 80015a8: 78 0c 08 01 mvhi r12,0x801 80015ac: 39 8c 30 1c ori r12,r12,0x301c 80015b0: 29 81 00 00 lw r1,(r12+0) 80015b4: b9 60 10 00 mv r2,r11 80015b8: f8 00 0e 45 calli 8004ecc <_Protected_heap_Free> 80015bc: 5c 20 00 08 bne r1,r0,80015dc printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 80015c0: 29 82 00 00 lw r2,(r12+0) */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 80015c4: 78 01 08 01 mvhi r1,0x801 80015c8: 38 21 21 4c ori r1,r1,0x214c 80015cc: 28 43 00 18 lw r3,(r2+24) 80015d0: 28 44 00 1c lw r4,(r2+28) 80015d4: b9 60 10 00 mv r2,r11 80015d8: f8 00 03 fe calli 80025d0 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 80015dc: 2b 9d 00 04 lw ra,(sp+4) 80015e0: 2b 8b 00 0c lw r11,(sp+12) 80015e4: 2b 8c 00 08 lw r12,(sp+8) 80015e8: 37 9c 00 0c addi sp,sp,12 80015ec: c3 a0 00 00 ret /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { 80015f0: f8 00 00 6b calli 800179c #endif /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 80015f4: 5c 20 ff e6 bne r1,r0,800158c !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 80015f8: b9 60 08 00 mv r1,r11 80015fc: f8 00 00 88 calli 800181c return; 8001600: e3 ff ff f7 bi 80015dc =============================================================================== 08002bc0 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 8002bc0: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8002bc4: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8002bc8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 8002bcc: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 8002bd0: 38 42 36 d8 ori r2,r2,0x36d8 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 8002bd4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 8002bd8: 44 22 00 07 be r1,r2,8002bf4 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 8002bdc: 34 21 00 04 addi r1,r1,4 <== NOT EXECUTED 8002be0: fb ff fa e8 calli 8001780 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 8002be4: 35 61 00 18 addi r1,r11,24 <== NOT EXECUTED 8002be8: fb ff fa e6 calli 8001780 <== NOT EXECUTED free(env); 8002bec: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8002bf0: fb ff fa ec calli 80017a0 <== NOT EXECUTED } } 8002bf4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8002bf8: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8002bfc: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8002c00: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 08012b24 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 8012b24: 37 9c ff dc addi sp,sp,-36 8012b28: 5b 8b 00 10 sw (sp+16),r11 8012b2c: 5b 8c 00 0c sw (sp+12),r12 8012b30: 5b 8d 00 08 sw (sp+8),r13 8012b34: 5b 9d 00 04 sw (sp+4),ra rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 8012b38: 78 04 08 01 mvhi r4,0x801 8012b3c: 38 84 60 10 ori r4,r4,0x6010 8012b40: 28 84 00 00 lw r4,(r4+0) int getdents( int dd_fd, char *dd_buf, int dd_len ) { 8012b44: b8 40 68 00 mv r13,r2 8012b48: b8 60 60 00 mv r12,r3 rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 8012b4c: 34 0b 00 00 mvi r11,0 8012b50: 50 24 00 0b bgeu r1,r4,8012b7c <== NEVER TAKEN 8012b54: b4 21 08 00 add r1,r1,r1 8012b58: 78 04 08 01 mvhi r4,0x801 8012b5c: b4 21 08 00 add r1,r1,r1 8012b60: 38 84 67 bc ori r4,r4,0x67bc 8012b64: b4 21 08 00 add r1,r1,r1 8012b68: b4 21 08 00 add r1,r1,r1 8012b6c: 28 8b 00 00 lw r11,(r4+0) 8012b70: b4 21 08 00 add r1,r1,r1 8012b74: b4 21 08 00 add r1,r1,r1 8012b78: b5 61 58 00 add r11,r11,r1 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 8012b7c: 29 61 00 28 lw r1,(r11+40) 8012b80: 29 66 00 1c lw r6,(r11+28) 8012b84: 29 65 00 20 lw r5,(r11+32) 8012b88: 29 63 00 24 lw r3,(r11+36) 8012b8c: 29 62 00 2c lw r2,(r11+44) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 8012b90: 28 24 00 10 lw r4,(r1+16) iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 8012b94: 5b 81 00 20 sw (sp+32),r1 8012b98: 5b 86 00 14 sw (sp+20),r6 8012b9c: 5b 85 00 18 sw (sp+24),r5 8012ba0: 5b 83 00 1c sw (sp+28),r3 8012ba4: 5b 82 00 24 sw (sp+36),r2 if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 8012ba8: 37 81 00 14 addi r1,sp,20 8012bac: d8 80 00 00 call r4 8012bb0: 34 04 00 01 mvi r4,1 8012bb4: 5c 24 00 0d bne r1,r4,8012be8 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); 8012bb8: 29 63 00 24 lw r3,(r11+36) 8012bbc: b9 60 08 00 mv r1,r11 8012bc0: b9 a0 10 00 mv r2,r13 8012bc4: 28 64 00 08 lw r4,(r3+8) 8012bc8: b9 80 18 00 mv r3,r12 8012bcc: d8 80 00 00 call r4 } 8012bd0: 2b 9d 00 04 lw ra,(sp+4) 8012bd4: 2b 8b 00 10 lw r11,(sp+16) 8012bd8: 2b 8c 00 0c lw r12,(sp+12) 8012bdc: 2b 8d 00 08 lw r13,(sp+8) 8012be0: 37 9c 00 24 addi sp,sp,36 8012be4: c3 a0 00 00 ret /* * Make sure we are working on a directory */ loc = iop->pathinfo; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 8012be8: fb ff e6 eb calli 800c794 <__errno> 8012bec: 34 02 00 14 mvi r2,20 8012bf0: 58 22 00 00 sw (r1+0),r2 8012bf4: 34 01 ff ff mvi r1,-1 8012bf8: e3 ff ff f6 bi 8012bd0 =============================================================================== 08001604 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 8001604: 37 9c ff ec addi sp,sp,-20 8001608: 5b 8b 00 0c sw (sp+12),r11 800160c: 5b 8c 00 08 sw (sp+8),r12 8001610: 5b 9d 00 04 sw (sp+4),ra 8001614: b8 20 58 00 mv r11,r1 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 8001618: 44 20 00 14 be r1,r0,8001668 <== NEVER TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 800161c: 90 00 60 00 rcsr r12,IE 8001620: 34 01 ff fe mvi r1,-2 8001624: a1 81 08 00 and r1,r12,r1 8001628: d0 01 00 00 wcsr IE,r1 _TOD_Get( &now ); 800162c: 37 81 00 10 addi r1,sp,16 8001630: f8 00 09 dd calli 8003da4 <_TOD_Get> _ISR_Enable(level); 8001634: d0 0c 00 00 wcsr IE,r12 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 8001638: 2b 83 00 10 lw r3,(sp+16) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 800163c: 2b 81 00 14 lw r1,(sp+20) 8001640: 34 02 03 e8 mvi r2,1000 time->tv_sec = now.tv_sec; 8001644: 59 63 00 00 sw (r11+0),r3 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 8001648: f8 00 3e 60 calli 8010fc8 <__divsi3> time->tv_sec = now.tv_sec; time->tv_usec = useconds; 800164c: 59 61 00 04 sw (r11+4),r1 * 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; 8001650: 34 01 00 00 mvi r1,0 } 8001654: 2b 9d 00 04 lw ra,(sp+4) 8001658: 2b 8b 00 0c lw r11,(sp+12) 800165c: 2b 8c 00 08 lw r12,(sp+8) 8001660: 37 9c 00 14 addi sp,sp,20 8001664: c3 a0 00 00 ret void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) rtems_set_errno_and_return_minus_one( EFAULT ); 8001668: f8 00 29 0f calli 800baa4 <__errno> <== NOT EXECUTED 800166c: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8001670: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8001674: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8001678: e3 ff ff f7 bi 8001654 <== NOT EXECUTED =============================================================================== 0800afac : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) 800afac: 28 23 00 1c lw r3,(r1+28) return -1; /* It wasn't a directory --> return error */ 800afb0: 34 02 ff ff mvi r2,-1 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) 800afb4: 28 64 00 4c lw r4,(r3+76) 800afb8: 34 03 00 01 mvi r3,1 800afbc: 5c 83 00 04 bne r4,r3,800afcc <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 800afc0: 58 20 00 10 sw (r1+16),r0 800afc4: 58 20 00 14 sw (r1+20),r0 return 0; 800afc8: 34 02 00 00 mvi r2,0 } 800afcc: b8 40 08 00 mv r1,r2 800afd0: c3 a0 00 00 ret =============================================================================== 0800afd4 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 800afd4: 37 9c fe c0 addi sp,sp,-320 800afd8: 5b 8b 00 34 sw (sp+52),r11 800afdc: 5b 8c 00 30 sw (sp+48),r12 800afe0: 5b 8d 00 2c sw (sp+44),r13 800afe4: 5b 8e 00 28 sw (sp+40),r14 800afe8: 5b 8f 00 24 sw (sp+36),r15 800afec: 5b 90 00 20 sw (sp+32),r16 800aff0: 5b 91 00 1c sw (sp+28),r17 800aff4: 5b 92 00 18 sw (sp+24),r18 800aff8: 5b 93 00 14 sw (sp+20),r19 800affc: 5b 94 00 10 sw (sp+16),r20 800b000: 5b 95 00 0c sw (sp+12),r21 800b004: 5b 96 00 08 sw (sp+8),r22 800b008: 5b 9d 00 04 sw (sp+4),ra int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; 800b00c: 28 31 00 1c lw r17,(r1+28) ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 800b010: b8 20 68 00 mv r13,r1 800b014: b8 40 98 00 mv r19,r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 800b018: 2a 2c 00 50 lw r12,(r17+80) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800b01c: 36 31 00 54 addi r17,r17,84 the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) return 0; 800b020: 34 0e 00 00 mvi r14,0 struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 800b024: 45 91 00 15 be r12,r17,800b078 bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 800b028: b8 60 08 00 mv r1,r3 800b02c: 34 02 01 0c mvi r2,268 800b030: f8 00 18 3f calli 801112c <__udivsi3> 800b034: b4 21 20 00 add r4,r1,r1 800b038: b4 84 20 00 add r4,r4,r4 800b03c: b4 84 18 00 add r3,r4,r4 800b040: b4 63 18 00 add r3,r3,r3 800b044: b4 63 18 00 add r3,r3,r3 800b048: b4 63 18 00 add r3,r3,r3 800b04c: b4 83 78 00 add r15,r4,r3 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 800b050: 29 b0 00 14 lw r16,(r13+20) /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 800b054: c9 e1 78 00 sub r15,r15,r1 800b058: b5 ef 78 00 add r15,r15,r15 800b05c: b5 ef 78 00 add r15,r15,r15 800b060: b5 f0 78 00 add r15,r15,r16 /* The directory was not empty so try to move to the desired entry in chain*/ for ( 800b064: 34 0b 00 00 mvi r11,0 } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 800b068: 34 16 01 0c mvi r22,268 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 800b06c: 37 95 00 38 addi r21,sp,56 800b070: 37 94 00 44 addi r20,sp,68 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 800b074: 49 e0 00 12 bg r15,r0,800b0bc <== ALWAYS TAKEN the_node = the_node->next; } /* Success */ return bytes_transferred; } 800b078: b9 c0 08 00 mv r1,r14 800b07c: 2b 9d 00 04 lw ra,(sp+4) 800b080: 2b 8b 00 34 lw r11,(sp+52) 800b084: 2b 8c 00 30 lw r12,(sp+48) 800b088: 2b 8d 00 2c lw r13,(sp+44) 800b08c: 2b 8e 00 28 lw r14,(sp+40) 800b090: 2b 8f 00 24 lw r15,(sp+36) 800b094: 2b 90 00 20 lw r16,(sp+32) 800b098: 2b 91 00 1c lw r17,(sp+28) 800b09c: 2b 92 00 18 lw r18,(sp+24) 800b0a0: 2b 93 00 14 lw r19,(sp+20) 800b0a4: 2b 94 00 10 lw r20,(sp+16) 800b0a8: 2b 95 00 0c lw r21,(sp+12) 800b0ac: 2b 96 00 08 lw r22,(sp+8) 800b0b0: 37 9c 01 40 addi sp,sp,320 800b0b4: c3 a0 00 00 ret for ( current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 800b0b8: 45 91 ff f0 be r12,r17,800b078 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 800b0bc: 4a 0b 00 18 bg r16,r11,800b11c /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 800b0c0: 29 82 00 38 lw r2,(r12+56) tmp_dirent.d_namlen = strlen( the_jnode->name ); 800b0c4: 35 92 00 0c addi r18,r12,12 800b0c8: ba 40 08 00 mv r1,r18 if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 800b0cc: 5b 82 00 38 sw (sp+56),r2 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 800b0d0: 5b 8b 00 3c sw (sp+60),r11 tmp_dirent.d_reclen = sizeof( struct dirent ); 800b0d4: 0f 96 00 40 sh (sp+64),r22 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 800b0d8: f8 00 07 1f calli 800cd54 800b0dc: 0f 81 00 42 sh (sp+66),r1 strcpy( tmp_dirent.d_name, the_jnode->name ); 800b0e0: ba 40 10 00 mv r2,r18 800b0e4: ba 80 08 00 mv r1,r20 800b0e8: f8 00 06 d4 calli 800cc38 memcpy( 800b0ec: b6 6e 08 00 add r1,r19,r14 800b0f0: 34 03 01 0c mvi r3,268 800b0f4: ba a0 10 00 mv r2,r21 800b0f8: f8 00 05 21 calli 800c57c buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 800b0fc: 29 a4 00 14 lw r4,(r13+20) 800b100: 29 a1 00 10 lw r1,(r13+16) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 800b104: 35 ce 01 0c addi r14,r14,268 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 800b108: 34 83 01 0c addi r3,r4,268 800b10c: f4 83 20 00 cmpgu r4,r4,r3 800b110: 59 a3 00 14 sw (r13+20),r3 800b114: b4 81 18 00 add r3,r4,r1 800b118: 59 a3 00 10 sw (r13+16),r3 * to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read( 800b11c: 35 6b 01 0c addi r11,r11,268 ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 800b120: 29 8c 00 00 lw r12,(r12+0) /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 800b124: 49 eb ff e5 bg r15,r11,800b0b8 800b128: e3 ff ff d4 bi 800b078 =============================================================================== 0800b2d8 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 800b2d8: 37 9c ff f8 addi sp,sp,-8 800b2dc: 5b 8b 00 08 sw (sp+8),r11 800b2e0: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 800b2e4: 28 4b 00 00 lw r11,(r2+0) /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) 800b2e8: 29 63 00 50 lw r3,(r11+80) 800b2ec: 35 61 00 54 addi r1,r11,84 800b2f0: 5c 61 00 17 bne r3,r1,800b34c /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 800b2f4: 28 41 00 10 lw r1,(r2+16) 800b2f8: 28 21 00 1c lw r1,(r1+28) 800b2fc: 45 61 00 0c be r11,r1,800b32c /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 800b300: 29 61 00 5c lw r1,(r11+92) 800b304: 5c 20 00 0a bne r1,r0,800b32c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); 800b308: b9 60 08 00 mv r1,r11 800b30c: fb ff f3 4d calli 8008040 IMFS_check_node_remove( the_jnode ); 800b310: b9 60 08 00 mv r1,r11 800b314: fb ff f3 5f calli 8008090 return 0; 800b318: 34 01 00 00 mvi r1,0 } 800b31c: 2b 9d 00 04 lw ra,(sp+4) 800b320: 2b 8b 00 08 lw r11,(sp+8) 800b324: 37 9c 00 08 addi sp,sp,8 800b328: c3 a0 00 00 ret /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 800b32c: f8 00 01 de calli 800baa4 <__errno> 800b330: 34 02 00 10 mvi r2,16 800b334: 58 22 00 00 sw (r1+0),r2 800b338: 34 01 ff ff mvi r1,-1 IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 800b33c: 2b 9d 00 04 lw ra,(sp+4) 800b340: 2b 8b 00 08 lw r11,(sp+8) 800b344: 37 9c 00 08 addi sp,sp,8 800b348: c3 a0 00 00 ret /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 800b34c: f8 00 01 d6 calli 800baa4 <__errno> 800b350: 34 02 00 5a mvi r2,90 800b354: 58 22 00 00 sw (r1+0),r2 800b358: 34 01 ff ff mvi r1,-1 800b35c: e3 ff ff f0 bi 800b31c =============================================================================== 080022d0 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 80022d0: 37 9c ff ec addi sp,sp,-20 80022d4: 5b 8b 00 14 sw (sp+20),r11 80022d8: 5b 8c 00 10 sw (sp+16),r12 80022dc: 5b 8d 00 0c sw (sp+12),r13 80022e0: 5b 8e 00 08 sw (sp+8),r14 80022e4: 5b 9d 00 04 sw (sp+4),ra FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 80022e8: 78 03 08 01 mvhi r3,0x801 80022ec: 38 63 57 fc ori r3,r3,0x57fc 80022f0: 40 6d 00 00 lbu r13,(r3+0) 80022f4: 45 a0 00 08 be r13,r0,8002314 fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 80022f8: 2b 9d 00 04 lw ra,(sp+4) 80022fc: 2b 8b 00 14 lw r11,(sp+20) 8002300: 2b 8c 00 10 lw r12,(sp+16) 8002304: 2b 8d 00 0c lw r13,(sp+12) 8002308: 2b 8e 00 08 lw r14,(sp+8) 800230c: 37 9c 00 14 addi sp,sp,20 8002310: c3 a0 00 00 ret FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 8002314: 34 04 00 01 mvi r4,1 mkdir("/etc", 0777); 8002318: 78 01 08 01 mvhi r1,0x801 800231c: 34 02 01 ff mvi r2,511 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 8002320: 30 64 00 00 sb (r3+0),r4 mkdir("/etc", 0777); 8002324: 38 21 3d e8 ori r1,r1,0x3de8 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 8002328: 78 0c 08 01 mvhi r12,0x801 800232c: 78 0b 08 01 mvhi r11,0x801 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 8002330: f8 00 02 bb calli 8002e1c /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 8002334: 39 8c 3d f0 ori r12,r12,0x3df0 8002338: 39 6b 3d fc ori r11,r11,0x3dfc 800233c: b9 80 08 00 mv r1,r12 8002340: b9 60 10 00 mv r2,r11 8002344: f8 00 2c a9 calli 800d5e8 8002348: b8 20 70 00 mv r14,r1 800234c: 44 2d 00 20 be r1,r13,80023cc } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 8002350: f8 00 2a 77 calli 800cd2c } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 8002354: 78 0c 08 01 mvhi r12,0x801 8002358: 39 8c 3e 6c ori r12,r12,0x3e6c 800235c: b9 60 10 00 mv r2,r11 8002360: b9 80 08 00 mv r1,r12 8002364: f8 00 2c a1 calli 800d5e8 8002368: b8 20 58 00 mv r11,r1 800236c: 44 20 00 09 be r1,r0,8002390 } else if ((fp = fopen("/etc/group", "w")) != NULL) { fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 8002370: f8 00 2a 6f calli 800cd2c } } 8002374: 2b 9d 00 04 lw ra,(sp+4) 8002378: 2b 8b 00 14 lw r11,(sp+20) 800237c: 2b 8c 00 10 lw r12,(sp+16) 8002380: 2b 8d 00 0c lw r13,(sp+12) 8002384: 2b 8e 00 08 lw r14,(sp+8) 8002388: 37 9c 00 14 addi sp,sp,20 800238c: c3 a0 00 00 ret * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 8002390: 78 02 08 01 mvhi r2,0x801 8002394: b9 80 08 00 mv r1,r12 8002398: 38 42 3e 00 ori r2,r2,0x3e00 800239c: f8 00 2c 93 calli 800d5e8 80023a0: b8 20 60 00 mv r12,r1 80023a4: 44 2b ff d5 be r1,r11,80022f8 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 80023a8: 78 01 08 01 mvhi r1,0x801 80023ac: 34 02 00 01 mvi r2,1 80023b0: 34 03 00 2a mvi r3,42 80023b4: b9 80 20 00 mv r4,r12 80023b8: 38 21 3e 78 ori r1,r1,0x3e78 80023bc: f8 00 2e 74 calli 800dd8c "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 80023c0: b9 80 08 00 mv r1,r12 80023c4: f8 00 2a 5a calli 800cd2c 80023c8: e3 ff ff eb bi 8002374 * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 80023cc: 78 02 08 01 mvhi r2,0x801 80023d0: b9 80 08 00 mv r1,r12 80023d4: 38 42 3e 00 ori r2,r2,0x3e00 80023d8: f8 00 2c 84 calli 800d5e8 80023dc: b8 20 60 00 mv r12,r1 80023e0: 44 2e ff dd be r1,r14,8002354 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 80023e4: 78 01 08 01 mvhi r1,0x801 80023e8: 38 21 3e 04 ori r1,r1,0x3e04 80023ec: 34 02 00 01 mvi r2,1 80023f0: 34 03 00 66 mvi r3,102 80023f4: b9 80 20 00 mv r4,r12 80023f8: f8 00 2e 65 calli 800dd8c "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 80023fc: b9 80 08 00 mv r1,r12 8002400: e3 ff ff d4 bi 8002350 =============================================================================== 08005d6c : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 8005d6c: 37 9c ff f4 addi sp,sp,-12 8005d70: 5b 8b 00 0c sw (sp+12),r11 8005d74: 5b 8c 00 08 sw (sp+8),r12 8005d78: 5b 9d 00 04 sw (sp+4),ra 8005d7c: b8 40 60 00 mv r12,r2 if (tty->termios.c_iflag & ISTRIP) 8005d80: 28 42 00 30 lw r2,(r2+48) /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 8005d84: b8 20 58 00 mv r11,r1 if (tty->termios.c_iflag & ISTRIP) 8005d88: 20 41 00 20 andi r1,r2,0x20 8005d8c: 44 20 00 02 be r1,r0,8005d94 <== ALWAYS TAKEN c &= 0x7f; 8005d90: 21 6b 00 7f andi r11,r11,0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 8005d94: 20 41 02 00 andi r1,r2,0x200 8005d98: 44 20 00 0b be r1,r0,8005dc4 c = tolower (c); 8005d9c: 78 01 08 02 mvhi r1,0x802 8005da0: 38 21 22 cc ori r1,r1,0x22cc 8005da4: 28 23 00 00 lw r3,(r1+0) 8005da8: b9 60 08 00 mv r1,r11 8005dac: b4 6b 58 00 add r11,r3,r11 8005db0: 41 64 00 01 lbu r4,(r11+1) 8005db4: 34 03 00 01 mvi r3,1 8005db8: 20 84 00 03 andi r4,r4,0x3 8005dbc: 44 83 00 40 be r4,r3,8005ebc 8005dc0: 20 2b 00 ff andi r11,r1,0xff if (c == '\r') { 8005dc4: 34 01 00 0d mvi r1,13 8005dc8: 45 61 00 19 be r11,r1,8005e2c 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)) { 8005dcc: 34 01 00 0a mvi r1,10 8005dd0: 45 61 00 37 be r11,r1,8005eac c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 8005dd4: 5d 60 00 1c bne r11,r0,8005e44 <== ALWAYS TAKEN } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 8005dd8: 78 01 08 02 mvhi r1,0x802 8005ddc: 38 21 22 40 ori r1,r1,0x2240 8005de0: 28 23 00 00 lw r3,(r1+0) 8005de4: 29 82 00 20 lw r2,(r12+32) if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 8005de8: 34 01 00 00 mvi r1,0 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 8005dec: 34 63 ff ff addi r3,r3,-1 8005df0: 4c 43 00 0a bge r2,r3,8005e18 <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 8005df4: 29 81 00 3c lw r1,(r12+60) 8005df8: 20 21 00 08 andi r1,r1,0x8 8005dfc: 5c 20 00 32 bne r1,r0,8005ec4 <== ALWAYS TAKEN echo (c, tty); tty->cbuf[tty->ccount++] = c; 8005e00: 29 84 00 1c lw r4,(r12+28) 8005e04: 34 43 00 01 addi r3,r2,1 } return 0; 8005e08: 34 01 00 00 mvi r1,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; 8005e0c: b4 82 10 00 add r2,r4,r2 8005e10: 30 4b 00 00 sb (r2+0),r11 8005e14: 59 83 00 20 sw (r12+32),r3 } return 0; } 8005e18: 2b 9d 00 04 lw ra,(sp+4) 8005e1c: 2b 8b 00 0c lw r11,(sp+12) 8005e20: 2b 8c 00 08 lw r12,(sp+8) 8005e24: 37 9c 00 0c addi sp,sp,12 8005e28: c3 a0 00 00 ret if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 8005e2c: 20 43 00 80 andi r3,r2,0x80 return 0; 8005e30: 34 01 00 00 mvi r1,0 if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 8005e34: 5c 60 ff f9 bne r3,r0,8005e18 <== NEVER TAKEN return 0; if (tty->termios.c_iflag & ICRNL) 8005e38: 20 42 01 00 andi r2,r2,0x100 8005e3c: 44 43 00 02 be r2,r3,8005e44 <== NEVER TAKEN c = '\n'; 8005e40: 34 0b 00 0a mvi r11,10 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 8005e44: 29 82 00 3c lw r2,(r12+60) 8005e48: 20 41 00 02 andi r1,r2,0x2 8005e4c: 44 20 ff e3 be r1,r0,8005dd8 <== NEVER TAKEN if (c == tty->termios.c_cc[VERASE]) { 8005e50: 41 81 00 43 lbu r1,(r12+67) 8005e54: 44 2b 00 37 be r1,r11,8005f30 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 8005e58: 41 81 00 44 lbu r1,(r12+68) 8005e5c: 44 2b 00 23 be r1,r11,8005ee8 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 8005e60: 41 83 00 45 lbu r3,(r12+69) return 1; 8005e64: 34 01 00 01 mvi r1,1 } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 8005e68: 44 6b ff ec be r3,r11,8005e18 <== NEVER TAKEN return 1; } else if (c == '\n') { 8005e6c: 34 01 00 0a mvi r1,10 8005e70: 45 61 00 23 be r11,r1,8005efc 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]) || 8005e74: 41 81 00 4c lbu r1,(r12+76) 8005e78: 44 2b 00 03 be r1,r11,8005e84 <== NEVER TAKEN 8005e7c: 41 81 00 51 lbu r1,(r12+81) 8005e80: 5c 2b ff d6 bne r1,r11,8005dd8 <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 8005e84: 20 42 00 08 andi r2,r2,0x8 <== NOT EXECUTED 8005e88: 5c 40 00 14 bne r2,r0,8005ed8 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 8005e8c: 29 83 00 20 lw r3,(r12+32) <== NOT EXECUTED 8005e90: 29 84 00 1c lw r4,(r12+28) <== NOT EXECUTED return 1; 8005e94: 34 01 00 01 mvi r1,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; 8005e98: 34 62 00 01 addi r2,r3,1 <== NOT EXECUTED 8005e9c: b4 83 18 00 add r3,r4,r3 <== NOT EXECUTED 8005ea0: 30 6b 00 00 sb (r3+0),r11 <== NOT EXECUTED 8005ea4: 59 82 00 20 sw (r12+32),r2 <== NOT EXECUTED return 1; 8005ea8: e3 ff ff dc bi 8005e18 <== NOT EXECUTED if (c == '\r') { 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)) { 8005eac: 20 42 00 40 andi r2,r2,0x40 8005eb0: 44 40 ff e5 be r2,r0,8005e44 <== ALWAYS TAKEN c = '\r'; 8005eb4: 34 0b 00 0d mvi r11,13 <== NOT EXECUTED 8005eb8: e3 ff ff e3 bi 8005e44 <== NOT EXECUTED { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 8005ebc: 34 21 00 20 addi r1,r1,32 8005ec0: e3 ff ff c0 bi 8005dc0 /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 8005ec4: b9 80 10 00 mv r2,r12 8005ec8: b9 60 08 00 mv r1,r11 8005ecc: fb ff fe f7 calli 8005aa8 8005ed0: 29 82 00 20 lw r2,(r12+32) 8005ed4: e3 ff ff cb bi 8005e00 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); 8005ed8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005edc: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8005ee0: fb ff fe f2 calli 8005aa8 <== NOT EXECUTED 8005ee4: e3 ff ff ea bi 8005e8c <== 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); 8005ee8: b9 80 08 00 mv r1,r12 8005eec: 34 02 00 01 mvi r2,1 8005ef0: fb ff ff 16 calli 8005b48 return 0; 8005ef4: 34 01 00 00 mvi r1,0 8005ef8: e3 ff ff c8 bi 8005e18 } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 8005efc: 20 42 00 48 andi r2,r2,0x48 8005f00: 44 40 00 03 be r2,r0,8005f0c <== NEVER TAKEN echo (c, tty); 8005f04: b9 80 10 00 mv r2,r12 8005f08: fb ff fe e8 calli 8005aa8 tty->cbuf[tty->ccount++] = c; 8005f0c: 29 82 00 20 lw r2,(r12+32) 8005f10: 29 83 00 1c lw r3,(r12+28) 8005f14: 34 41 00 01 addi r1,r2,1 8005f18: b4 62 10 00 add r2,r3,r2 8005f1c: 34 03 00 0a mvi r3,10 8005f20: 30 43 00 00 sb (r2+0),r3 8005f24: 59 81 00 20 sw (r12+32),r1 return 1; 8005f28: 34 01 00 01 mvi r1,1 8005f2c: e3 ff ff bb bi 8005e18 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 8005f30: b9 80 08 00 mv r1,r12 8005f34: 34 02 00 00 mvi r2,0 8005f38: fb ff ff 04 calli 8005b48 return 0; 8005f3c: 34 01 00 00 mvi r1,0 8005f40: e3 ff ff b6 bi 8005e18 =============================================================================== 080247e8 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 80247e8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80247ec: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 080114f0 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 80114f0: 37 9c ff f4 addi sp,sp,-12 80114f4: 5b 8b 00 0c sw (sp+12),r11 80114f8: 5b 8c 00 08 sw (sp+8),r12 80114fc: 5b 9d 00 04 sw (sp+4),ra /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 8011500: 78 01 08 01 mvhi r1,0x801 8011504: 38 21 39 9c ori r1,r1,0x399c 8011508: 28 22 00 00 lw r2,(r1+0) 801150c: 34 01 00 03 mvi r1,3 8011510: 44 41 00 06 be r2,r1,8011528 <== ALWAYS TAKEN */ fclose (stdin); fclose (stdout); fclose (stderr); } 8011514: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8011518: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 801151c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8011520: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8011524: c3 a0 00 00 ret <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 8011528: 78 0b 08 01 mvhi r11,0x801 801152c: 78 01 08 01 mvhi r1,0x801 8011530: 39 6b 31 70 ori r11,r11,0x3170 8011534: 38 21 26 68 ori r1,r1,0x2668 8011538: 29 62 00 00 lw r2,(r11+0) 801153c: 28 2c 00 00 lw r12,(r1+0) 8011540: 44 4c 00 04 be r2,r12,8011550 _wrapup_reent(_global_impure_ptr); 8011544: b9 80 08 00 mv r1,r12 8011548: f8 00 02 24 calli 8011dd8 <_wrapup_reent> /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = _global_impure_ptr; 801154c: 59 6c 00 00 sw (r11+0),r12 * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 8011550: 29 81 00 04 lw r1,(r12+4) 8011554: fb ff e9 b4 calli 800bc24 fclose (stdout); 8011558: 29 61 00 00 lw r1,(r11+0) 801155c: 28 21 00 08 lw r1,(r1+8) 8011560: fb ff e9 b1 calli 800bc24 fclose (stderr); 8011564: 29 61 00 00 lw r1,(r11+0) 8011568: 28 21 00 0c lw r1,(r1+12) 801156c: fb ff e9 ae calli 800bc24 } 8011570: 2b 9d 00 04 lw ra,(sp+4) 8011574: 2b 8b 00 0c lw r11,(sp+12) 8011578: 2b 8c 00 08 lw r12,(sp+8) 801157c: 37 9c 00 0c addi sp,sp,12 8011580: c3 a0 00 00 ret =============================================================================== 08001950 : #include "malloc_p.h" void *malloc( size_t size ) { 8001950: 37 9c ff f4 addi sp,sp,-12 8001954: 5b 8b 00 0c sw (sp+12),r11 8001958: 5b 8c 00 08 sw (sp+8),r12 800195c: 5b 9d 00 04 sw (sp+4),ra void *return_this; MSBUMP(malloc_calls, 1); 8001960: 78 03 08 01 mvhi r3,0x801 8001964: 38 63 36 b8 ori r3,r3,0x36b8 8001968: 28 62 00 04 lw r2,(r3+4) #include "malloc_p.h" void *malloc( size_t size ) { 800196c: b8 20 60 00 mv r12,r1 /* * Validate the parameters */ if ( !size ) return (void *) 0; 8001970: 34 0b 00 00 mvi r11,0 size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 8001974: 34 41 00 01 addi r1,r2,1 8001978: 58 61 00 04 sw (r3+4),r1 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 800197c: fb ff ff 9a calli 80017e4 /* * Validate the parameters */ if ( !size ) 8001980: 45 80 00 1d be r12,r0,80019f4 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 8001984: 78 01 08 01 mvhi r1,0x801 8001988: 38 21 39 9c ori r1,r1,0x399c 800198c: 28 22 00 00 lw r2,(r1+0) 8001990: 34 01 00 03 mvi r1,3 8001994: 44 41 00 28 be r2,r1,8001a34 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 8001998: 78 01 08 01 mvhi r1,0x801 800199c: 38 21 30 1c ori r1,r1,0x301c 80019a0: 28 21 00 00 lw r1,(r1+0) 80019a4: b9 80 10 00 mv r2,r12 80019a8: 34 03 00 00 mvi r3,0 80019ac: 34 04 00 00 mvi r4,0 80019b0: f8 00 0d 2d calli 8004e64 <_Protected_heap_Allocate_aligned_with_boundary> 80019b4: b8 20 58 00 mv r11,r1 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 80019b8: 44 20 00 15 be r1,r0,8001a0c } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 80019bc: 78 01 08 01 mvhi r1,0x801 80019c0: 38 21 36 18 ori r1,r1,0x3618 80019c4: 28 23 00 00 lw r3,(r1+0) 80019c8: 44 60 00 04 be r3,r0,80019d8 (*rtems_malloc_dirty_helper)( return_this, size ); 80019cc: b9 60 08 00 mv r1,r11 80019d0: b9 80 10 00 mv r2,r12 80019d4: d8 60 00 00 call r3 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 80019d8: 78 01 08 01 mvhi r1,0x801 80019dc: 38 21 36 10 ori r1,r1,0x3610 80019e0: 28 21 00 00 lw r1,(r1+0) 80019e4: 44 20 00 04 be r1,r0,80019f4 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 80019e8: 28 22 00 04 lw r2,(r1+4) 80019ec: b9 60 08 00 mv r1,r11 80019f0: d8 40 00 00 call r2 return return_this; } 80019f4: b9 60 08 00 mv r1,r11 80019f8: 2b 9d 00 04 lw ra,(sp+4) 80019fc: 2b 8b 00 0c lw r11,(sp+12) 8001a00: 2b 8c 00 08 lw r12,(sp+8) 8001a04: 37 9c 00 0c addi sp,sp,12 8001a08: c3 a0 00 00 ret */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 8001a0c: 78 01 08 01 mvhi r1,0x801 8001a10: 38 21 36 14 ori r1,r1,0x3614 8001a14: 28 21 00 00 lw r1,(r1+0) 8001a18: 44 2b 00 0a be r1,r11,8001a40 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 8001a1c: 28 22 00 04 lw r2,(r1+4) 8001a20: b9 80 08 00 mv r1,r12 8001a24: d8 40 00 00 call r2 if ( !return_this ) { 8001a28: 44 20 00 06 be r1,r0,8001a40 8001a2c: b8 20 58 00 mv r11,r1 8001a30: e3 ff ff e3 bi 80019bc /* * 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() ) 8001a34: fb ff ff 5a calli 800179c return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 8001a38: 5c 20 ff d8 bne r1,r0,8001998 <== ALWAYS TAKEN 8001a3c: e3 ff ff ee bi 80019f4 <== NOT EXECUTED if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; 8001a40: f8 00 28 19 calli 800baa4 <__errno> 8001a44: 34 02 00 0c mvi r2,12 8001a48: 58 22 00 00 sw (r1+0),r2 return (void *) 0; 8001a4c: e3 ff ff ea bi 80019f4 =============================================================================== 08001e9c : } void *malloc_sbrk_extend_and_allocate( size_t size ) { 8001e9c: 37 9c ff ec addi sp,sp,-20 8001ea0: 5b 8b 00 14 sw (sp+20),r11 8001ea4: 5b 8c 00 10 sw (sp+16),r12 8001ea8: 5b 8d 00 0c sw (sp+12),r13 8001eac: 5b 8e 00 08 sw (sp+8),r14 8001eb0: 5b 9d 00 04 sw (sp+4),ra * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; 8001eb4: 78 02 08 01 mvhi r2,0x801 8001eb8: 38 42 47 d8 ori r2,r2,0x47d8 8001ebc: 28 4b 00 00 lw r11,(r2+0) } void *malloc_sbrk_extend_and_allocate( size_t size ) { 8001ec0: b8 20 68 00 mv r13,r1 */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; 8001ec4: 34 0c 00 00 mvi r12,0 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) 8001ec8: 5d 60 00 09 bne r11,r0,8001eec <== ALWAYS TAKEN MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 8001ecc: b9 80 08 00 mv r1,r12 8001ed0: 2b 9d 00 04 lw ra,(sp+4) 8001ed4: 2b 8b 00 14 lw r11,(sp+20) 8001ed8: 2b 8c 00 10 lw r12,(sp+16) 8001edc: 2b 8d 00 0c lw r13,(sp+12) 8001ee0: 2b 8e 00 08 lw r14,(sp+8) 8001ee4: 37 9c 00 14 addi sp,sp,20 8001ee8: c3 a0 00 00 ret sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 8001eec: b9 60 10 00 mv r2,r11 8001ef0: b4 2b 08 00 add r1,r1,r11 8001ef4: f8 00 3d d9 calli 8011658 <__udivsi3> 8001ef8: b9 60 10 00 mv r2,r11 8001efc: f8 00 3d 72 calli 80114c4 <__mulsi3> 8001f00: b8 20 70 00 mv r14,r1 starting_address = (void *) sbrk(the_size); 8001f04: fb ff f9 9d calli 8000578 8001f08: b8 20 10 00 mv r2,r1 if ( starting_address == (void*) -1 ) 8001f0c: 34 01 ff ff mvi r1,-1 8001f10: 44 41 ff ef be r2,r1,8001ecc return (void *) 0; if ( !_Protected_heap_Extend( 8001f14: 78 0b 08 01 mvhi r11,0x801 8001f18: 39 6b 40 1c ori r11,r11,0x401c 8001f1c: 29 61 00 00 lw r1,(r11+0) 8001f20: b9 c0 18 00 mv r3,r14 8001f24: f8 00 0c e3 calli 80052b0 <_Protected_heap_Extend> 8001f28: 44 20 00 0d be r1,r0,8001f5c sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); 8001f2c: 78 05 08 01 mvhi r5,0x801 8001f30: 38 a5 47 a8 ori r5,r5,0x47a8 8001f34: 28 a3 00 00 lw r3,(r5+0) 8001f38: 29 61 00 00 lw r1,(r11+0) 8001f3c: b9 a0 10 00 mv r2,r13 8001f40: b5 c3 70 00 add r14,r14,r3 8001f44: 34 04 00 00 mvi r4,0 8001f48: 34 03 00 00 mvi r3,0 8001f4c: 58 ae 00 00 sw (r5+0),r14 8001f50: f8 00 0c be calli 8005248 <_Protected_heap_Allocate_aligned_with_boundary> 8001f54: b8 20 60 00 mv r12,r1 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; 8001f58: e3 ff ff dd bi 8001ecc if ( starting_address == (void*) -1 ) return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 8001f5c: c8 0e 08 00 sub r1,r0,r14 8001f60: fb ff f9 86 calli 8000578 errno = ENOMEM; 8001f64: f8 00 28 5b calli 800c0d0 <__errno> 8001f68: 34 02 00 0c mvi r2,12 8001f6c: 58 22 00 00 sw (r1+0),r2 return (void *) 0; 8001f70: e3 ff ff d7 bi 8001ecc =============================================================================== 08009f3c : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 8009f3c: 37 9c ff fc addi sp,sp,-4 8009f40: 5b 9d 00 04 sw (sp+4),ra void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 8009f44: 78 01 08 01 mvhi r1,0x801 8009f48: 38 21 36 1c ori r1,r1,0x361c 8009f4c: 28 22 00 00 lw r2,(r1+0) 8009f50: 34 01 00 01 mvi r1,1 8009f54: fb ff dc ce calli 800128c if ( memory ) 8009f58: 44 20 00 06 be r1,r0,8009f70 <== NEVER TAKEN memfile_blocks_allocated++; 8009f5c: 78 02 08 01 mvhi r2,0x801 8009f60: 38 42 36 2c ori r2,r2,0x362c 8009f64: 28 43 00 00 lw r3,(r2+0) 8009f68: 34 63 00 01 addi r3,r3,1 8009f6c: 58 43 00 00 sw (r2+0),r3 return memory; } 8009f70: 2b 9d 00 04 lw ra,(sp+4) 8009f74: 37 9c 00 04 addi sp,sp,4 8009f78: c3 a0 00 00 ret =============================================================================== 0800a4e0 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 800a4e0: 37 9c ff ec addi sp,sp,-20 800a4e4: 5b 8b 00 14 sw (sp+20),r11 800a4e8: 5b 8c 00 10 sw (sp+16),r12 800a4ec: 5b 8d 00 0c sw (sp+12),r13 800a4f0: 5b 8e 00 08 sw (sp+8),r14 800a4f4: 5b 9d 00 04 sw (sp+4),ra 800a4f8: b8 20 70 00 mv r14,r1 800a4fc: b8 40 68 00 mv r13,r2 */ #if defined(RTEMS_DEBUG) assert( block_table ); #endif if ( !block_table ) 800a500: 44 20 00 10 be r1,r0,800a540 <== NEVER TAKEN /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 800a504: 28 21 00 00 lw r1,(r1+0) for ( i=0 ; i<== NEVER TAKEN 800a50c: b8 20 58 00 mv r11,r1 800a510: 34 0c 00 00 mvi r12,0 if ( b[i] ) { 800a514: 29 63 00 00 lw r3,(r11+0) * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); 800a524: fb ff ff e4 calli 800a4b4 b[i] = 0; 800a528: 59 60 00 00 sw (r11+0),r0 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 800a534: 29 c1 00 00 lw r1,(r14+0) /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 800a538: fb ff ff df calli 800a4b4 *block_table = 0; 800a53c: 59 c0 00 00 sw (r14+0),r0 } 800a540: 2b 9d 00 04 lw ra,(sp+4) 800a544: 2b 8b 00 14 lw r11,(sp+20) 800a548: 2b 8c 00 10 lw r12,(sp+16) 800a54c: 2b 8d 00 0c lw r13,(sp+12) 800a550: 2b 8e 00 08 lw r14,(sp+8) 800a554: 37 9c 00 14 addi sp,sp,20 800a558: c3 a0 00 00 ret =============================================================================== 0800ab80 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 800ab80: 37 9c ff f0 addi sp,sp,-16 800ab84: 5b 8b 00 08 sw (sp+8),r11 800ab88: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 800ab8c: 28 2b 00 1c lw r11,(r1+28) * 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 ) 800ab90: 29 64 00 50 lw r4,(r11+80) 800ab94: 48 44 00 13 bg r2,r4,800abe0 <== NEVER TAKEN 800ab98: 44 82 00 0f be r4,r2,800abd4 <== ALWAYS TAKEN * 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; 800ab9c: 59 62 00 50 sw (r11+80),r2 800aba0: 59 63 00 54 sw (r11+84),r3 iop->size = the_jnode->info.file.size; 800aba4: 58 22 00 08 sw (r1+8),r2 800aba8: 58 23 00 0c sw (r1+12),r3 IMFS_update_atime( the_jnode ); 800abac: 34 02 00 00 mvi r2,0 800abb0: 37 81 00 0c addi r1,sp,12 800abb4: fb ff da 94 calli 8001604 800abb8: 2b 82 00 0c lw r2,(sp+12) return 0; 800abbc: 34 01 00 00 mvi r1,0 */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); 800abc0: 59 62 00 40 sw (r11+64),r2 return 0; } 800abc4: 2b 9d 00 04 lw ra,(sp+4) 800abc8: 2b 8b 00 08 lw r11,(sp+8) 800abcc: 37 9c 00 10 addi sp,sp,16 800abd0: c3 a0 00 00 ret * 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 ) 800abd4: 29 64 00 54 lw r4,(r11+84) 800abd8: 54 64 00 02 bgu r3,r4,800abe0 <== NEVER TAKEN 800abdc: e3 ff ff f0 bi 800ab9c return IMFS_memfile_extend( the_jnode, length ); 800abe0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800abe4: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 800abe8: fb ff fe d5 calli 800a73c <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 800abec: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800abf0: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 800abf4: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 800abf8: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 0800abfc : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 800abfc: 37 9c ff f4 addi sp,sp,-12 800ac00: 5b 8b 00 0c sw (sp+12),r11 800ac04: 5b 8c 00 08 sw (sp+8),r12 800ac08: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 800ac0c: 28 2c 00 1c lw r12,(r1+28) rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 800ac10: b8 20 58 00 mv r11,r1 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { 800ac14: 34 01 00 06 mvi r1,6 800ac18: 29 82 00 4c lw r2,(r12+76) 800ac1c: 44 41 00 10 be r2,r1,800ac5c 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 )) 800ac20: 29 62 00 14 lw r2,(r11+20) 800ac24: b9 80 08 00 mv r1,r12 800ac28: fb ff fe c5 calli 800a73c 800ac2c: 5c 20 00 1d bne r1,r0,800aca0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 800ac30: 29 83 00 50 lw r3,(r12+80) 800ac34: 29 61 00 10 lw r1,(r11+16) 800ac38: 29 62 00 14 lw r2,(r11+20) 800ac3c: 59 63 00 08 sw (r11+8),r3 800ac40: 29 83 00 54 lw r3,(r12+84) 800ac44: 59 63 00 0c sw (r11+12),r3 } return iop->offset; } 800ac48: 2b 9d 00 04 lw ra,(sp+4) 800ac4c: 2b 8b 00 0c lw r11,(sp+12) 800ac50: 2b 8c 00 08 lw r12,(sp+8) 800ac54: 37 9c 00 0c addi sp,sp,12 800ac58: c3 a0 00 00 ret 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) 800ac5c: 29 61 00 10 lw r1,(r11+16) 800ac60: 29 83 00 50 lw r3,(r12+80) 800ac64: 29 62 00 14 lw r2,(r11+20) 800ac68: 29 84 00 54 lw r4,(r12+84) 800ac6c: 48 23 00 04 bg r1,r3,800ac7c <== NEVER TAKEN 800ac70: 5c 23 ff f6 bne r1,r3,800ac48 <== NEVER TAKEN 800ac74: 54 44 00 02 bgu r2,r4,800ac7c <== NEVER TAKEN 800ac78: e3 ff ff f4 bi 800ac48 iop->offset = the_jnode->info.linearfile.size; 800ac7c: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 800ac80: b8 80 10 00 mv r2,r4 <== NOT EXECUTED 800ac84: 59 63 00 10 sw (r11+16),r3 <== NOT EXECUTED 800ac88: 59 64 00 14 sw (r11+20),r4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 800ac8c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800ac90: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 800ac94: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 800ac98: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 800ac9c: c3 a0 00 00 ret <== 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 ); 800aca0: f8 00 03 81 calli 800baa4 <__errno> <== NOT EXECUTED 800aca4: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 800aca8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800acac: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800acb0: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 800acb4: e3 ff ff e5 bi 800ac48 <== NOT EXECUTED =============================================================================== 0800aac0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 800aac0: 37 9c ff f4 addi sp,sp,-12 800aac4: 5b 8b 00 0c sw (sp+12),r11 800aac8: 5b 8c 00 08 sw (sp+8),r12 800aacc: 5b 9d 00 04 sw (sp+4),ra 800aad0: b8 20 60 00 mv r12,r1 the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 800aad4: 28 21 00 18 lw r1,(r1+24) uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 800aad8: 29 8b 00 1c lw r11,(r12+28) /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 800aadc: 20 22 02 04 andi r2,r1,0x204 800aae0: 44 40 00 04 be r2,r0,800aaf0 && (the_jnode->type == IMFS_LINEAR_FILE)) { 800aae4: 29 63 00 4c lw r3,(r11+76) 800aae8: 34 02 00 06 mvi r2,6 800aaec: 44 62 00 13 be r3,r2,800ab38 <== NEVER TAKEN 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) 800aaf0: 20 21 02 00 andi r1,r1,0x200 800aaf4: 5c 20 00 0c bne r1,r0,800ab24 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 800aaf8: 29 61 00 50 lw r1,(r11+80) return 0; 800aafc: 34 02 00 00 mvi r2,0 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 800ab00: 59 81 00 08 sw (r12+8),r1 800ab04: 29 61 00 54 lw r1,(r11+84) 800ab08: 59 81 00 0c sw (r12+12),r1 return 0; } 800ab0c: b8 40 08 00 mv r1,r2 800ab10: 2b 9d 00 04 lw ra,(sp+4) 800ab14: 2b 8b 00 0c lw r11,(sp+12) 800ab18: 2b 8c 00 08 lw r12,(sp+8) 800ab1c: 37 9c 00 0c addi sp,sp,12 800ab20: c3 a0 00 00 ret 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; 800ab24: 29 61 00 50 lw r1,(r11+80) 800ab28: 59 81 00 10 sw (r12+16),r1 800ab2c: 29 61 00 54 lw r1,(r11+84) 800ab30: 59 81 00 14 sw (r12+20),r1 800ab34: e3 ff ff f1 bi 800aaf8 /* * 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; 800ab38: 29 64 00 54 lw r4,(r11+84) <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 800ab3c: 34 02 00 05 mvi r2,5 <== 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; 800ab40: 29 63 00 58 lw r3,(r11+88) <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 800ab44: 59 62 00 4c sw (r11+76),r2 <== NOT EXECUTED the_jnode->info.file.size = 0; 800ab48: 59 60 00 50 sw (r11+80),r0 <== NOT EXECUTED 800ab4c: 59 60 00 54 sw (r11+84),r0 <== NOT EXECUTED the_jnode->info.file.indirect = 0; 800ab50: 59 60 00 58 sw (r11+88),r0 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 800ab54: 59 60 00 5c sw (r11+92),r0 <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 800ab58: 59 60 00 60 sw (r11+96),r0 <== NOT EXECUTED if ((count != 0) 800ab5c: 44 80 ff e5 be r4,r0,800aaf0 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 800ab60: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800ab64: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800ab68: fb ff ff 4b calli 800a894 <== NOT EXECUTED 800ab6c: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED return -1; 800ab70: 34 02 ff ff mvi r2,-1 <== 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) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 800ab74: 44 23 ff e6 be r1,r3,800ab0c <== NOT EXECUTED 800ab78: 29 81 00 18 lw r1,(r12+24) <== NOT EXECUTED 800ab7c: e3 ff ff dd bi 800aaf0 <== NOT EXECUTED =============================================================================== 08001a74 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 8001a74: 37 9c ff cc addi sp,sp,-52 8001a78: 5b 8b 00 14 sw (sp+20),r11 8001a7c: 5b 8c 00 10 sw (sp+16),r12 8001a80: 5b 8d 00 0c sw (sp+12),r13 8001a84: 5b 8e 00 08 sw (sp+8),r14 8001a88: 5b 9d 00 04 sw (sp+4),ra 8001a8c: b8 40 68 00 mv r13,r2 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) ) ) 8001a90: 20 42 f0 00 andi r2,r2,0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 8001a94: b8 20 58 00 mv r11,r1 8001a98: b8 60 70 00 mv r14,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) ) ) 8001a9c: 5c 40 00 0d bne r2,r0,8001ad0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 8001aa0: f8 00 28 01 calli 800baa4 <__errno> <== NOT EXECUTED 8001aa4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8001aa8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8001aac: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 8001ab0: b9 60 08 00 mv r1,r11 8001ab4: 2b 9d 00 04 lw ra,(sp+4) 8001ab8: 2b 8b 00 14 lw r11,(sp+20) 8001abc: 2b 8c 00 10 lw r12,(sp+16) 8001ac0: 2b 8d 00 0c lw r13,(sp+12) 8001ac4: 2b 8e 00 08 lw r14,(sp+8) 8001ac8: 37 9c 00 34 addi sp,sp,52 8001acc: c3 a0 00 00 ret 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 ); 8001ad0: 37 8c 00 1c addi r12,sp,28 8001ad4: 37 82 00 34 addi r2,sp,52 8001ad8: b9 80 18 00 mv r3,r12 8001adc: 5b 84 00 18 sw (sp+24),r4 8001ae0: f8 00 02 cb calli 800260c result = (*temp_loc.ops->evalformake_h)( 8001ae4: 2b 81 00 28 lw r1,(sp+40) 8001ae8: b9 80 10 00 mv r2,r12 8001aec: 37 83 00 30 addi r3,sp,48 8001af0: 28 25 00 04 lw r5,(r1+4) 8001af4: 2b 81 00 34 lw r1,(sp+52) 8001af8: b5 61 08 00 add r1,r11,r1 8001afc: d8 a0 00 00 call r5 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) return -1; 8001b00: 34 0b ff ff mvi r11,-1 result = (*temp_loc.ops->evalformake_h)( &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 8001b04: 2b 84 00 18 lw r4,(sp+24) 8001b08: 5c 20 ff ea bne r1,r0,8001ab0 return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 8001b0c: 2b 83 00 28 lw r3,(sp+40) 8001b10: 2b 81 00 30 lw r1,(sp+48) 8001b14: b9 a0 10 00 mv r2,r13 8001b18: 28 66 00 14 lw r6,(r3+20) 8001b1c: b9 80 28 00 mv r5,r12 8001b20: b9 c0 18 00 mv r3,r14 8001b24: d8 c0 00 00 call r6 8001b28: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &temp_loc ); 8001b2c: b9 80 08 00 mv r1,r12 8001b30: fb ff fe 7f calli 800152c return result; } 8001b34: b9 60 08 00 mv r1,r11 8001b38: 2b 9d 00 04 lw ra,(sp+4) 8001b3c: 2b 8b 00 14 lw r11,(sp+20) 8001b40: 2b 8c 00 10 lw r12,(sp+16) 8001b44: 2b 8d 00 0c lw r13,(sp+12) 8001b48: 2b 8e 00 08 lw r14,(sp+8) 8001b4c: 37 9c 00 34 addi sp,sp,52 8001b50: c3 a0 00 00 ret =============================================================================== 08001c0c : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 8001c0c: 37 9c ff b4 addi sp,sp,-76 8001c10: 5b 8b 00 38 sw (sp+56),r11 8001c14: 5b 8c 00 34 sw (sp+52),r12 8001c18: 5b 8d 00 30 sw (sp+48),r13 8001c1c: 5b 8e 00 2c sw (sp+44),r14 8001c20: 5b 8f 00 28 sw (sp+40),r15 8001c24: 5b 90 00 24 sw (sp+36),r16 8001c28: 5b 91 00 20 sw (sp+32),r17 8001c2c: 5b 92 00 1c sw (sp+28),r18 8001c30: 5b 93 00 18 sw (sp+24),r19 8001c34: 5b 94 00 14 sw (sp+20),r20 8001c38: 5b 95 00 10 sw (sp+16),r21 8001c3c: 5b 96 00 0c sw (sp+12),r22 8001c40: 5b 97 00 08 sw (sp+8),r23 8001c44: 5b 9d 00 04 sw (sp+4),ra 8001c48: b8 20 68 00 mv r13,r1 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 8001c4c: 34 01 00 01 mvi r1,1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 8001c50: b8 80 a0 00 mv r20,r4 8001c54: b8 40 70 00 mv r14,r2 8001c58: b8 60 80 00 mv r16,r3 8001c5c: b8 a0 b8 00 mv r23,r5 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 8001c60: 50 24 00 15 bgeu r1,r4,8001cb4 /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 8001c64: f8 00 27 90 calli 800baa4 <__errno> 8001c68: 34 02 00 16 mvi r2,22 8001c6c: 58 22 00 00 sw (r1+0),r2 8001c70: 34 01 ff ff mvi r1,-1 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 8001c74: 2b 9d 00 04 lw ra,(sp+4) 8001c78: 2b 8b 00 38 lw r11,(sp+56) 8001c7c: 2b 8c 00 34 lw r12,(sp+52) 8001c80: 2b 8d 00 30 lw r13,(sp+48) 8001c84: 2b 8e 00 2c lw r14,(sp+44) 8001c88: 2b 8f 00 28 lw r15,(sp+40) 8001c8c: 2b 90 00 24 lw r16,(sp+36) 8001c90: 2b 91 00 20 lw r17,(sp+32) 8001c94: 2b 92 00 1c lw r18,(sp+28) 8001c98: 2b 93 00 18 lw r19,(sp+24) 8001c9c: 2b 94 00 14 lw r20,(sp+20) 8001ca0: 2b 95 00 10 lw r21,(sp+16) 8001ca4: 2b 96 00 0c lw r22,(sp+12) 8001ca8: 2b 97 00 08 lw r23,(sp+8) 8001cac: 37 9c 00 4c addi sp,sp,76 8001cb0: c3 a0 00 00 ret rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 8001cb4: b8 60 08 00 mv r1,r3 8001cb8: f8 00 1a fd calli 80088ac 8001cbc: b8 20 a8 00 mv r21,r1 if ( !mount_h ) 8001cc0: 44 20 ff e9 be r1,r0,8001c64 { 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; 8001cc4: 7d d1 00 00 cmpnei r17,r14,0 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 8001cc8: 78 0c 08 01 mvhi r12,0x801 8001ccc: 34 13 00 01 mvi r19,1 8001cd0: 39 8c 21 34 ori r12,r12,0x2134 8001cd4: 46 20 00 05 be r17,r0,8001ce8 * 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( 8001cd8: b9 c0 08 00 mv r1,r14 8001cdc: f8 00 2c 1e calli 800cd54 8001ce0: b8 20 98 00 mv r19,r1 8001ce4: b9 c0 60 00 mv r12,r14 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; 8001ce8: ba 00 08 00 mv r1,r16 8001cec: f8 00 2c 1a calli 800cd54 8001cf0: 34 36 00 01 addi r22,r1,1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 8001cf4: 34 12 00 00 mvi r18,0 8001cf8: 45 a0 00 04 be r13,r0,8001d08 8001cfc: b9 a0 08 00 mv r1,r13 8001d00: f8 00 2c 15 calli 800cd54 8001d04: 34 32 00 01 addi r18,r1,1 size_t target_length = strlen( target ); size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; 8001d08: 36 63 00 75 addi r3,r19,117 8001d0c: b4 76 18 00 add r3,r3,r22 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 8001d10: 34 01 00 01 mvi r1,1 8001d14: b4 72 10 00 add r2,r3,r18 8001d18: fb ff fd 5d calli 800128c 8001d1c: b8 20 58 00 mv r11,r1 if ( mt_entry != NULL ) { 8001d20: 44 20 00 73 be r1,r0,8001eec <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 8001d24: 34 2f 00 74 addi r15,r1,116 strcpy( str, filesystemtype ); 8001d28: b9 e0 08 00 mv r1,r15 8001d2c: ba 00 10 00 mv r2,r16 8001d30: f8 00 2b c2 calli 800cc38 mt_entry->type = str; 8001d34: 59 6f 00 6c sw (r11+108),r15 str += filesystemtype_size; 8001d38: b5 f6 78 00 add r15,r15,r22 if ( source_or_null != NULL ) { 8001d3c: 45 a0 00 06 be r13,r0,8001d54 strcpy( str, source_or_null ); 8001d40: b9 e0 08 00 mv r1,r15 8001d44: b9 a0 10 00 mv r2,r13 8001d48: f8 00 2b bc calli 800cc38 mt_entry->dev = str; 8001d4c: 59 6f 00 70 sw (r11+112),r15 str += source_size; 8001d50: b5 f2 78 00 add r15,r15,r18 } strcpy( str, target ); 8001d54: b9 80 10 00 mv r2,r12 8001d58: b9 e0 08 00 mv r1,r15 8001d5c: f8 00 2b b7 calli 800cc38 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; 8001d60: 34 02 00 05 mvi r2,5 8001d64: 34 01 00 ff mvi r1,255 8001d68: 59 62 00 38 sw (r11+56),r2 8001d6c: 34 02 00 80 mvi r2,128 8001d70: 34 0d 00 01 mvi r13,1 8001d74: 59 62 00 3c sw (r11+60),r2 8001d78: 59 61 00 44 sw (r11+68),r1 8001d7c: 34 02 00 07 mvi r2,7 8001d80: 59 61 00 48 sw (r11+72),r1 8001d84: 34 01 04 00 mvi r1,1024 mt_entry->dev = str; str += source_size; } strcpy( str, target ); mt_entry->target = str; 8001d88: 59 6f 00 68 sw (r11+104),r15 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 8001d8c: 59 6b 00 2c sw (r11+44),r11 mt_entry->options = options; 8001d90: 59 74 00 30 sw (r11+48),r20 mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 8001d94: 59 62 00 40 sw (r11+64),r2 8001d98: 59 61 00 4c sw (r11+76),r1 8001d9c: 59 60 00 50 sw (r11+80),r0 8001da0: 59 60 00 54 sw (r11+84),r0 8001da4: 59 6d 00 58 sw (r11+88),r13 8001da8: 59 60 00 5c sw (r11+92),r0 8001dac: 59 60 00 60 sw (r11+96),r0 8001db0: 59 60 00 64 sw (r11+100),r0 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 8001db4: 5e 20 00 28 bne r17,r0,8001e54 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 8001db8: 78 03 08 01 mvhi r3,0x801 8001dbc: 38 63 31 10 ori r3,r3,0x3110 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 8001dc0: 28 61 00 00 lw r1,(r3+0) 8001dc4: 78 03 08 01 mvhi r3,0x801 8001dc8: 38 63 31 14 ori r3,r3,0x3114 ) { 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; 8001dcc: 34 0c 00 00 mvi r12,0 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 8001dd0: 5c 23 00 4c bne r1,r3,8001f00 <== NEVER TAKEN * 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 ) ) { 8001dd4: b9 60 08 00 mv r1,r11 8001dd8: ba e0 10 00 mv r2,r23 8001ddc: da a0 00 00 call r21 8001de0: 5c 20 00 4f bne r1,r0,8001f1c <== NEVER TAKEN 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 ); 8001de4: 78 0c 08 01 mvhi r12,0x801 8001de8: 39 8c 36 a8 ori r12,r12,0x36a8 8001dec: 29 81 00 00 lw r1,(r12+0) 8001df0: 34 03 00 00 mvi r3,0 8001df4: 34 02 00 00 mvi r2,0 8001df8: f8 00 03 d9 calli 8002d5c 8001dfc: 78 01 08 01 mvhi r1,0x801 8001e00: 38 21 31 10 ori r1,r1,0x3110 8001e04: b9 60 10 00 mv r2,r11 8001e08: f8 00 06 b5 calli 80038dc <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 8001e0c: 29 81 00 00 lw r1,(r12+0) 8001e10: f8 00 04 2f calli 8002ecc rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 8001e14: 34 01 00 00 mvi r1,0 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 8001e18: 5e 21 ff 97 bne r17,r1,8001c74 rtems_filesystem_root = mt_entry->mt_fs_root; 8001e1c: 78 02 08 01 mvhi r2,0x801 8001e20: 38 42 31 1c ori r2,r2,0x311c 8001e24: 28 42 00 00 lw r2,(r2+0) 8001e28: 29 67 00 1c lw r7,(r11+28) 8001e2c: 29 66 00 20 lw r6,(r11+32) 8001e30: 29 65 00 24 lw r5,(r11+36) 8001e34: 29 64 00 28 lw r4,(r11+40) 8001e38: 29 63 00 2c lw r3,(r11+44) 8001e3c: 58 47 00 18 sw (r2+24),r7 8001e40: 58 46 00 1c sw (r2+28),r6 8001e44: 58 45 00 20 sw (r2+32),r5 8001e48: 58 44 00 24 sw (r2+36),r4 8001e4c: 58 43 00 28 sw (r2+40),r3 8001e50: e3 ff ff 89 bi 8001c74 * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 8001e54: 37 8c 00 3c addi r12,sp,60 8001e58: ba 60 10 00 mv r2,r19 8001e5c: b9 c0 08 00 mv r1,r14 8001e60: 34 03 00 07 mvi r3,7 8001e64: b9 80 20 00 mv r4,r12 8001e68: 34 05 00 01 mvi r5,1 8001e6c: fb ff fd 56 calli 80013c4 8001e70: 34 02 ff ff mvi r2,-1 8001e74: 44 22 00 26 be r1,r2,8001f0c <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 8001e78: 2b 82 00 48 lw r2,(sp+72) 8001e7c: b9 80 08 00 mv r1,r12 8001e80: 28 42 00 10 lw r2,(r2+16) 8001e84: d8 40 00 00 call r2 8001e88: 5c 2d 00 2e bne r1,r13,8001f40 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 8001e8c: 2b 82 00 3c lw r2,(sp+60) 8001e90: 78 01 08 00 mvhi r1,0x800 8001e94: 38 21 1b 54 ori r1,r1,0x1b54 8001e98: fb ff ff 32 calli 8001b60 8001e9c: b8 20 68 00 mv r13,r1 8001ea0: 5c 20 00 2c bne r1,r0,8001f50 * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 8001ea4: 2b 81 00 48 lw r1,(sp+72) * 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; 8001ea8: 2b 83 00 3c lw r3,(sp+60) /* * 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 ) ) { 8001eac: 28 22 00 20 lw r2,(r1+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; 8001eb0: 59 63 00 08 sw (r11+8),r3 mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 8001eb4: 59 61 00 14 sw (r11+20),r1 * 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; 8001eb8: 2b 83 00 44 lw r3,(sp+68) mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 8001ebc: 2b 81 00 4c lw r1,(sp+76) * 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; 8001ec0: 59 63 00 10 sw (r11+16),r3 mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 8001ec4: 59 61 00 18 sw (r11+24),r1 /* * 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 ) ) { 8001ec8: b9 60 08 00 mv r1,r11 8001ecc: d8 40 00 00 call r2 8001ed0: 44 2d ff c1 be r1,r13,8001dd4 <== ALWAYS TAKEN return 0; cleanup_and_bail: free( mt_entry ); 8001ed4: b9 60 08 00 mv r1,r11 8001ed8: fb ff fd 9d calli 800154c if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 8001edc: b9 80 08 00 mv r1,r12 8001ee0: fb ff fd 93 calli 800152c return -1; 8001ee4: 34 01 ff ff mvi r1,-1 8001ee8: e3 ff ff 63 bi 8001c74 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 8001eec: f8 00 26 ee calli 800baa4 <__errno> <== NOT EXECUTED 8001ef0: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8001ef4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8001ef8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8001efc: e3 ff ff 5e bi 8001c74 <== NOT EXECUTED } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 8001f00: f8 00 26 e9 calli 800baa4 <__errno> <== NOT EXECUTED 8001f04: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8001f08: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 8001f0c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001f10: fb ff fd 8f calli 800154c <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; 8001f14: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8001f18: e3 ff ff 57 bi 8001c74 <== NOT EXECUTED if ( (*mount_h)( mt_entry, data ) ) { /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 8001f1c: 2b 82 00 48 lw r2,(sp+72) <== NOT EXECUTED 8001f20: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001f24: 28 42 00 28 lw r2,(r2+40) <== NOT EXECUTED 8001f28: d8 40 00 00 call r2 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 8001f2c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001f30: fb ff fd 87 calli 800154c <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; 8001f34: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED cleanup_and_bail: free( mt_entry ); if ( loc_to_free ) 8001f38: 45 80 ff 4f be r12,r0,8001c74 <== NOT EXECUTED 8001f3c: e3 ff ff e8 bi 8001edc <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 8001f40: f8 00 26 d9 calli 800baa4 <__errno> 8001f44: 34 02 00 14 mvi r2,20 8001f48: 58 22 00 00 sw (r1+0),r2 goto cleanup_and_bail; 8001f4c: e3 ff ff e2 bi 8001ed4 /* * 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; 8001f50: f8 00 26 d5 calli 800baa4 <__errno> 8001f54: 34 02 00 10 mvi r2,16 8001f58: 58 22 00 00 sw (r1+0),r2 goto cleanup_and_bail; 8001f5c: e3 ff ff de bi 8001ed4 =============================================================================== 0800225c : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 800225c: 37 9c ff e8 addi sp,sp,-24 8002260: 5b 8b 00 18 sw (sp+24),r11 8002264: 5b 8c 00 14 sw (sp+20),r12 8002268: 5b 8d 00 10 sw (sp+16),r13 800226c: 5b 8e 00 0c sw (sp+12),r14 8002270: 5b 8f 00 08 sw (sp+8),r15 8002274: 5b 9d 00 04 sw (sp+4),ra 8002278: b8 40 58 00 mv r11,r2 800227c: b8 20 78 00 mv r15,r1 8002280: b8 60 70 00 mv r14,r3 8002284: b8 80 68 00 mv r13,r4 8002288: b8 a0 60 00 mv r12,r5 int rv = -1; if (target != NULL) { 800228c: 44 40 00 1b be r2,r0,80022f8 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 8002290: b8 40 08 00 mv r1,r2 8002294: 34 02 01 ff mvi r2,511 8002298: f8 00 02 cb calli 8002dc4 if (rv == 0) { 800229c: 44 20 00 09 be r1,r0,80022c0 <== ALWAYS TAKEN } else { errno = EINVAL; } return rv; } 80022a0: 2b 9d 00 04 lw ra,(sp+4) 80022a4: 2b 8b 00 18 lw r11,(sp+24) 80022a8: 2b 8c 00 14 lw r12,(sp+20) 80022ac: 2b 8d 00 10 lw r13,(sp+16) 80022b0: 2b 8e 00 0c lw r14,(sp+12) 80022b4: 2b 8f 00 08 lw r15,(sp+8) 80022b8: 37 9c 00 18 addi sp,sp,24 80022bc: c3 a0 00 00 ret int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 80022c0: b9 e0 08 00 mv r1,r15 80022c4: b9 60 10 00 mv r2,r11 80022c8: b9 c0 18 00 mv r3,r14 80022cc: b9 a0 20 00 mv r4,r13 80022d0: b9 80 28 00 mv r5,r12 80022d4: f8 00 00 3c calli 80023c4 } else { errno = EINVAL; } return rv; } 80022d8: 2b 9d 00 04 lw ra,(sp+4) 80022dc: 2b 8b 00 18 lw r11,(sp+24) 80022e0: 2b 8c 00 14 lw r12,(sp+20) 80022e4: 2b 8d 00 10 lw r13,(sp+16) 80022e8: 2b 8e 00 0c lw r14,(sp+12) 80022ec: 2b 8f 00 08 lw r15,(sp+8) 80022f0: 37 9c 00 18 addi sp,sp,24 80022f4: c3 a0 00 00 ret options, data ); } } else { errno = EINVAL; 80022f8: f8 00 26 3b calli 800bbe4 <__errno> 80022fc: 34 02 00 16 mvi r2,22 8002300: 58 22 00 00 sw (r1+0),r2 const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 8002304: 34 01 ff ff mvi r1,-1 8002308: e3 ff ff e6 bi 80022a0 =============================================================================== 080021cc : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 80021cc: 37 9c ff f0 addi sp,sp,-16 80021d0: 5b 8b 00 10 sw (sp+16),r11 80021d4: 5b 8c 00 0c sw (sp+12),r12 80021d8: 5b 8d 00 08 sw (sp+8),r13 80021dc: 5b 9d 00 04 sw (sp+4),ra 80021e0: b8 20 68 00 mv r13,r1 80021e4: b8 40 58 00 mv r11,r2 /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 80021e8: 44 22 00 1e be r1,r2,8002260 ptr = _REENT; } else { ptr = deleted_task->libc_reent; 80021ec: 28 4c 01 20 lw r12,(r2+288) } if (ptr && ptr != _global_impure_ptr) { 80021f0: 45 80 00 0b be r12,r0,800221c <== NEVER TAKEN 80021f4: 78 02 08 01 mvhi r2,0x801 80021f8: 38 42 26 68 ori r2,r2,0x2668 80021fc: 28 41 00 00 lw r1,(r2+0) 8002200: 45 81 00 07 be r12,r1,800221c _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 8002204: 78 02 08 00 mvhi r2,0x800 8002208: b9 80 08 00 mv r1,r12 800220c: 38 42 1f 64 ori r2,r2,0x1f64 8002210: f8 00 28 73 calli 800c3dc <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 8002214: b9 80 08 00 mv r1,r12 8002218: f8 00 12 ea calli 8006dc0 <_Workspace_Free> #endif } deleted_task->libc_reent = NULL; 800221c: 59 60 01 20 sw (r11+288),r0 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 8002220: 45 ab 00 07 be r13,r11,800223c _REENT = 0; } } 8002224: 2b 9d 00 04 lw ra,(sp+4) 8002228: 2b 8b 00 10 lw r11,(sp+16) 800222c: 2b 8c 00 0c lw r12,(sp+12) 8002230: 2b 8d 00 08 lw r13,(sp+8) 8002234: 37 9c 00 10 addi sp,sp,16 8002238: c3 a0 00 00 ret /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; 800223c: 78 01 08 01 mvhi r1,0x801 8002240: 38 21 31 70 ori r1,r1,0x3170 8002244: 58 20 00 00 sw (r1+0),r0 } } 8002248: 2b 9d 00 04 lw ra,(sp+4) 800224c: 2b 8b 00 10 lw r11,(sp+16) 8002250: 2b 8c 00 0c lw r12,(sp+12) 8002254: 2b 8d 00 08 lw r13,(sp+8) 8002258: 37 9c 00 10 addi sp,sp,16 800225c: c3 a0 00 00 ret /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; 8002260: 78 01 08 01 mvhi r1,0x801 8002264: 38 21 31 70 ori r1,r1,0x3170 8002268: 28 2c 00 00 lw r12,(r1+0) 800226c: e3 ff ff e1 bi 80021f0 =============================================================================== 08001f64 : */ int newlib_free_buffers( FILE *fp ) { 8001f64: 37 9c ff f8 addi sp,sp,-8 8001f68: 5b 8b 00 08 sw (sp+8),r11 8001f6c: 5b 9d 00 04 sw (sp+4),ra 8001f70: b8 20 58 00 mv r11,r1 switch ( fileno(fp) ) { 8001f74: f8 00 27 e1 calli 800bef8 8001f78: 34 02 00 02 mvi r2,2 8001f7c: 54 22 00 09 bgu r1,r2,8001fa0 <== NEVER TAKEN case 0: case 1: case 2: if (fp->_flags & __SMBF) { 8001f80: 2d 61 00 0c lhu r1,(r11+12) 8001f84: 20 21 00 80 andi r1,r1,0x80 8001f88: 5c 20 00 0d bne r1,r0,8001fbc <== NEVER TAKEN break; default: fclose(fp); } return 0; } 8001f8c: 34 01 00 00 mvi r1,0 8001f90: 2b 9d 00 04 lw ra,(sp+4) 8001f94: 2b 8b 00 08 lw r11,(sp+8) 8001f98: 37 9c 00 08 addi sp,sp,8 8001f9c: c3 a0 00 00 ret fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 8001fa0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001fa4: f8 00 27 20 calli 800bc24 <== NOT EXECUTED } return 0; } 8001fa8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8001fac: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8001fb0: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8001fb4: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8001fb8: c3 a0 00 00 ret <== NOT EXECUTED switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); 8001fbc: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8001fc0: fb ff fd 63 calli 800154c <== NOT EXECUTED fp->_flags &= ~__SMBF; 8001fc4: 2d 61 00 0c lhu r1,(r11+12) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 8001fc8: 59 60 00 00 sw (r11+0),r0 <== NOT EXECUTED 8001fcc: 59 60 00 10 sw (r11+16),r0 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 8001fd0: 20 21 ff 7f andi r1,r1,0xff7f <== NOT EXECUTED 8001fd4: 0d 61 00 0c sh (r11+12),r1 <== NOT EXECUTED break; default: fclose(fp); } return 0; } 8001fd8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8001fdc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8001fe0: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8001fe4: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8001fe8: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 080017f0 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 80017f0: 37 9c ff f4 addi sp,sp,-12 80017f4: 5b 8b 00 0c sw (sp+12),r11 80017f8: 5b 8c 00 08 sw (sp+8),r12 80017fc: 5b 9d 00 04 sw (sp+4),ra rtems_device_driver status; if ( !initialized ) { 8001800: 78 04 08 01 mvhi r4,0x801 8001804: 38 84 e6 a4 ori r4,r4,0xe6a4 8001808: 40 8b 00 00 lbu r11,(r4+0) rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 800180c: b8 20 60 00 mv r12,r1 rtems_device_driver status; if ( !initialized ) { 8001810: 45 60 00 07 be r11,r0,800182c NULL_major = major; } return RTEMS_SUCCESSFUL; } 8001814: 34 01 00 00 mvi r1,0 8001818: 2b 9d 00 04 lw ra,(sp+4) 800181c: 2b 8b 00 0c lw r11,(sp+12) 8001820: 2b 8c 00 08 lw r12,(sp+8) 8001824: 37 9c 00 0c addi sp,sp,12 8001828: c3 a0 00 00 ret rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 800182c: 78 01 08 01 mvhi r1,0x801 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 8001830: 34 05 00 01 mvi r5,1 status = rtems_io_register_name( 8001834: 38 21 be d0 ori r1,r1,0xbed0 8001838: b9 80 10 00 mv r2,r12 800183c: 34 03 00 00 mvi r3,0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 8001840: 30 85 00 00 sb (r4+0),r5 status = rtems_io_register_name( 8001844: f8 00 01 e6 calli 8001fdc "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 8001848: 5c 2b 00 0a bne r1,r11,8001870 <== NEVER TAKEN rtems_fatal_error_occurred(status); NULL_major = major; 800184c: 78 03 08 01 mvhi r3,0x801 8001850: 38 63 e7 2c ori r3,r3,0xe72c } return RTEMS_SUCCESSFUL; } 8001854: 34 01 00 00 mvi r1,0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); NULL_major = major; 8001858: 58 6c 00 00 sw (r3+0),r12 } return RTEMS_SUCCESSFUL; } 800185c: 2b 9d 00 04 lw ra,(sp+4) 8001860: 2b 8b 00 0c lw r11,(sp+12) 8001864: 2b 8c 00 08 lw r12,(sp+8) 8001868: 37 9c 00 0c addi sp,sp,12 800186c: c3 a0 00 00 ret major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 8001870: f8 00 0b 54 calli 80045c0 <== NOT EXECUTED =============================================================================== 0800188c : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 800188c: 44 60 00 03 be r3,r0,8001898 <== ALWAYS TAKEN rw_args->bytes_moved = rw_args->count; 8001890: 28 61 00 14 lw r1,(r3+20) <== NOT EXECUTED 8001894: 58 61 00 1c sw (r3+28),r1 <== NOT EXECUTED return NULL_SUCCESSFUL; } 8001898: 34 01 00 00 mvi r1,0 800189c: c3 a0 00 00 ret =============================================================================== 080022fc : int open( const char *pathname, int flags, ... ) { 80022fc: 37 9c ff ac addi sp,sp,-84 8002300: 5b 8b 00 24 sw (sp+36),r11 8002304: 5b 8c 00 20 sw (sp+32),r12 8002308: 5b 8d 00 1c sw (sp+28),r13 800230c: 5b 8e 00 18 sw (sp+24),r14 8002310: 5b 8f 00 14 sw (sp+20),r15 8002314: 5b 90 00 10 sw (sp+16),r16 8002318: 5b 91 00 0c sw (sp+12),r17 800231c: 5b 92 00 08 sw (sp+8),r18 8002320: 5b 9d 00 04 sw (sp+4),ra /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 8002324: 34 49 00 01 addi r9,r2,1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; 8002328: 21 2c 00 01 andi r12,r9,0x1 800232c: b5 8c 60 00 add r12,r12,r12 int open( const char *pathname, int flags, ... ) { 8002330: 5b 82 00 3c sw (sp+60),r2 8002334: 5b 83 00 40 sw (sp+64),r3 8002338: 5b 84 00 44 sw (sp+68),r4 800233c: 5b 85 00 48 sw (sp+72),r5 8002340: 5b 86 00 4c sw (sp+76),r6 8002344: 5b 87 00 50 sw (sp+80),r7 8002348: 5b 88 00 54 sw (sp+84),r8 */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 800234c: 21 29 00 02 andi r9,r9,0x2 int open( const char *pathname, int flags, ... ) { 8002350: b8 40 68 00 mv r13,r2 8002354: b8 20 70 00 mv r14,r1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; 8002358: b5 8c 60 00 add r12,r12,r12 if ( ( status & _FWRITE ) == _FWRITE ) 800235c: 45 20 00 02 be r9,r0,8002364 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 8002360: 39 8c 00 02 ori r12,r12,0x2 va_start(ap, flags); mode = va_arg( ap, int ); 8002364: 2b 91 00 40 lw r17,(sp+64) * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 8002368: f8 00 18 57 calli 80084c4 800236c: b8 20 58 00 mv r11,r1 if ( iop == 0 ) { 8002370: 44 20 00 3c be r1,r0,8002460 } /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 8002374: b9 c0 08 00 mv r1,r14 8002378: f8 00 2a 77 calli 800cd54 800237c: 37 8f 00 28 addi r15,sp,40 8002380: b8 20 10 00 mv r2,r1 8002384: b9 80 18 00 mv r3,r12 8002388: b9 c0 08 00 mv r1,r14 800238c: b9 e0 20 00 mv r4,r15 8002390: 34 05 00 01 mvi r5,1 8002394: fb ff fc 0c calli 80013c4 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 8002398: 34 02 ff ff mvi r2,-1 800239c: 44 22 00 46 be r1,r2,80024b4 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 80023a0: 21 a2 0a 00 andi r2,r13,0xa00 80023a4: 34 01 0a 00 mvi r1,2560 80023a8: 44 41 00 33 be r2,r1,8002474 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); 80023ac: b9 a0 08 00 mv r1,r13 80023b0: 29 6c 00 18 lw r12,(r11+24) 80023b4: f8 00 18 19 calli 8008418 iop->pathinfo = loc; 80023b8: 2b 82 00 30 lw r2,(sp+48) /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); 80023bc: b8 2c 08 00 or r1,r1,r12 iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); 80023c0: b9 a0 18 00 mv r3,r13 80023c4: 28 45 00 00 lw r5,(r2+0) /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); 80023c8: 59 61 00 18 sw (r11+24),r1 iop->pathinfo = loc; 80023cc: 2b 81 00 28 lw r1,(sp+40) 80023d0: 59 62 00 24 sw (r11+36),r2 rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); 80023d4: ba 20 20 00 mv r4,r17 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 80023d8: 59 61 00 1c sw (r11+28),r1 80023dc: 2b 81 00 2c lw r1,(sp+44) rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); 80023e0: b9 c0 10 00 mv r2,r14 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 80023e4: 59 61 00 20 sw (r11+32),r1 80023e8: 2b 81 00 34 lw r1,(sp+52) 80023ec: 59 61 00 28 sw (r11+40),r1 80023f0: 2b 81 00 38 lw r1,(sp+56) 80023f4: 59 61 00 2c sw (r11+44),r1 rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); 80023f8: b9 60 08 00 mv r1,r11 80023fc: d8 a0 00 00 call r5 if ( rc ) { 8002400: 5c 20 00 26 bne r1,r0,8002498 8002404: 78 0c 08 01 mvhi r12,0x801 } /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 8002408: 21 ad 04 00 andi r13,r13,0x400 800240c: 39 8c 36 a0 ori r12,r12,0x36a0 8002410: 5d a1 00 31 bne r13,r1,80024d4 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 8002414: 29 81 00 00 lw r1,(r12+0) 8002418: c9 61 08 00 sub r1,r11,r1 800241c: 14 21 00 01 sri r1,r1,1 8002420: 14 21 00 01 sri r1,r1,1 8002424: 14 21 00 01 sri r1,r1,1 8002428: 14 21 00 01 sri r1,r1,1 800242c: 14 21 00 01 sri r1,r1,1 8002430: 14 21 00 01 sri r1,r1,1 } 8002434: 2b 9d 00 04 lw ra,(sp+4) 8002438: 2b 8b 00 24 lw r11,(sp+36) 800243c: 2b 8c 00 20 lw r12,(sp+32) 8002440: 2b 8d 00 1c lw r13,(sp+28) 8002444: 2b 8e 00 18 lw r14,(sp+24) 8002448: 2b 8f 00 14 lw r15,(sp+20) 800244c: 2b 90 00 10 lw r16,(sp+16) 8002450: 2b 91 00 0c lw r17,(sp+12) 8002454: 2b 92 00 08 lw r18,(sp+8) 8002458: 37 9c 00 54 addi sp,sp,84 800245c: c3 a0 00 00 ret */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { rc = ENFILE; 8002460: 34 10 00 17 mvi r16,23 if ( rc ) { if ( iop ) rtems_libio_free( iop ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); 8002464: f8 00 25 90 calli 800baa4 <__errno> 8002468: 58 30 00 00 sw (r1+0),r16 800246c: 34 01 ff ff mvi r1,-1 8002470: e3 ff ff f1 bi 8002434 } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { /* We were trying to create a file that already exists */ rc = EEXIST; loc_to_free = &loc; 8002474: b9 e0 90 00 mv r18,r15 goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { /* We were trying to create a file that already exists */ rc = EEXIST; 8002478: 34 10 00 11 mvi r16,17 */ done: va_end(ap); if ( rc ) { if ( iop ) 800247c: 45 60 00 03 be r11,r0,8002488 rtems_libio_free( iop ); 8002480: b9 60 08 00 mv r1,r11 8002484: f8 00 18 4b calli 80085b0 if ( loc_to_free ) 8002488: 46 40 ff f7 be r18,r0,8002464 rtems_filesystem_freenode( loc_to_free ); 800248c: ba 40 08 00 mv r1,r18 8002490: fb ff fc 27 calli 800152c 8002494: e3 ff ff f4 bi 8002464 iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 8002498: f8 00 25 83 calli 800baa4 <__errno> 800249c: 28 30 00 00 lw r16,(r1+0) rc = EEXIST; loc_to_free = &loc; goto done; } loc_to_free = &loc; 80024a0: b9 e0 90 00 mv r18,r15 80024a4: 78 0c 08 01 mvhi r12,0x801 80024a8: 39 8c 36 a0 ori r12,r12,0x36a0 * Single exit and clean up path. */ done: va_end(ap); if ( rc ) { 80024ac: 46 00 ff da be r16,r0,8002414 <== NEVER TAKEN 80024b0: e3 ff ff f3 bi 800247c */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 80024b4: f8 00 25 7c calli 800baa4 <__errno> 80024b8: 28 22 00 00 lw r2,(r1+0) 80024bc: 34 01 00 02 mvi r1,2 80024c0: 44 41 00 20 be r2,r1,8002540 rc = errno; 80024c4: f8 00 25 78 calli 800baa4 <__errno> 80024c8: 28 30 00 00 lw r16,(r1+0) int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL; 80024cc: 34 12 00 00 mvi r18,0 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { rc = errno; goto done; 80024d0: e3 ff ff f5 bi 80024a4 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 80024d4: 29 81 00 00 lw r1,(r12+0) 80024d8: 34 02 00 00 mvi r2,0 80024dc: c9 61 08 00 sub r1,r11,r1 80024e0: 14 21 00 01 sri r1,r1,1 80024e4: 14 21 00 01 sri r1,r1,1 80024e8: 14 21 00 01 sri r1,r1,1 80024ec: 14 21 00 01 sri r1,r1,1 80024f0: 14 21 00 01 sri r1,r1,1 80024f4: 14 21 00 01 sri r1,r1,1 80024f8: f8 00 17 81 calli 80082fc 80024fc: b8 20 80 00 mv r16,r1 if ( rc ) { 8002500: 44 20 ff c5 be r1,r0,8002414 if(errno) rc = errno; 8002504: f8 00 25 68 calli 800baa4 <__errno> 8002508: 28 21 00 00 lw r1,(r1+0) 800250c: 5c 20 00 1a bne r1,r0,8002574 <== ALWAYS TAKEN close( iop - rtems_libio_iops ); 8002510: 29 81 00 00 lw r1,(r12+0) /* those are released by close(): */ iop = 0; loc_to_free = NULL; 8002514: 34 12 00 00 mvi r18,0 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; close( iop - rtems_libio_iops ); 8002518: c9 61 08 00 sub r1,r11,r1 800251c: 14 21 00 01 sri r1,r1,1 /* those are released by close(): */ iop = 0; 8002520: 34 0b 00 00 mvi r11,0 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; close( iop - rtems_libio_iops ); 8002524: 14 21 00 01 sri r1,r1,1 8002528: 14 21 00 01 sri r1,r1,1 800252c: 14 21 00 01 sri r1,r1,1 8002530: 14 21 00 01 sri r1,r1,1 8002534: 14 21 00 01 sri r1,r1,1 8002538: f8 00 17 41 calli 800823c 800253c: e3 ff ff da bi 80024a4 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 8002540: 21 a1 02 00 andi r1,r13,0x200 int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL; 8002544: 34 12 00 00 mvi r18,0 goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { rc = ENOENT; 8002548: 34 10 00 02 mvi r16,2 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 800254c: 44 20 ff cc be r1,r0,800247c rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 8002550: b9 c0 08 00 mv r1,r14 8002554: 3a 22 80 00 ori r2,r17,0x8000 8002558: 34 03 00 00 mvi r3,0 800255c: 34 04 00 00 mvi r4,0 8002560: fb ff fd 45 calli 8001a74 if ( rc ) { 8002564: 44 20 00 07 be r1,r0,8002580 <== ALWAYS TAKEN rc = errno; 8002568: f8 00 25 4f calli 800baa4 <__errno> <== NOT EXECUTED 800256c: 28 30 00 00 lw r16,(r1+0) <== NOT EXECUTED goto done; 8002570: e3 ff ff cd bi 80024a4 <== NOT EXECUTED * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 8002574: f8 00 25 4c calli 800baa4 <__errno> 8002578: 28 30 00 00 lw r16,(r1+0) 800257c: e3 ff ff e5 bi 8002510 /* * After we do the mknod(), we have to evaluate the path to get the * "loc" structure needed to actually have the file itself open. * So we created it, and then we need to have "look it up." */ status = rtems_filesystem_evaluate_path( 8002580: b9 c0 08 00 mv r1,r14 8002584: f8 00 29 f4 calli 800cd54 8002588: b8 20 10 00 mv r2,r1 800258c: 34 03 00 00 mvi r3,0 8002590: b9 c0 08 00 mv r1,r14 8002594: b9 e0 20 00 mv r4,r15 8002598: 34 05 00 01 mvi r5,1 800259c: fb ff fb 8a calli 80013c4 pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ rc = EACCES; 80025a0: 34 10 00 0d mvi r16,13 * "loc" structure needed to actually have the file itself open. * So we created it, and then we need to have "look it up." */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ 80025a4: 5e 41 ff b6 bne r18,r1,800247c <== NEVER TAKEN 80025a8: e3 ff ff 81 bi 80023ac =============================================================================== 08002270 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 8002270: 37 9c ff f4 addi sp,sp,-12 8002274: 5b 8b 00 0c sw (sp+12),r11 8002278: 5b 8c 00 08 sw (sp+8),r12 800227c: 5b 9d 00 04 sw (sp+4),ra int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 8002280: 78 0b 08 01 mvhi r11,0x801 8002284: 39 6b 20 c4 ori r11,r11,0x20c4 8002288: b9 60 08 00 mv r1,r11 800228c: 34 02 00 00 mvi r2,0 8002290: 34 03 00 00 mvi r3,0 8002294: f8 00 00 1a calli 80022fc 8002298: 34 0c ff ff mvi r12,-1 800229c: 44 2c 00 0b be r1,r12,80022c8 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 80022a0: b9 60 08 00 mv r1,r11 80022a4: 34 02 00 01 mvi r2,1 80022a8: 34 03 00 00 mvi r3,0 80022ac: f8 00 00 14 calli 80022fc 80022b0: 44 2c 00 0b be r1,r12,80022dc <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 80022b4: b9 60 08 00 mv r1,r11 80022b8: 34 02 00 01 mvi r2,1 80022bc: 34 03 00 00 mvi r3,0 80022c0: f8 00 00 0f calli 80022fc 80022c4: 44 2c 00 0a be r1,r12,80022ec rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ } 80022c8: 2b 9d 00 04 lw ra,(sp+4) 80022cc: 2b 8b 00 0c lw r11,(sp+12) 80022d0: 2b 8c 00 08 lw r12,(sp+8) 80022d4: 37 9c 00 0c addi sp,sp,12 80022d8: c3 a0 00 00 ret /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 80022dc: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 80022e0: 38 42 21 bc ori r2,r2,0x21bc <== NOT EXECUTED 80022e4: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 80022e8: f8 00 04 79 calli 80034cc <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 80022ec: 78 02 08 01 mvhi r2,0x801 80022f0: 38 42 21 c0 ori r2,r2,0x21c0 80022f4: 28 41 00 00 lw r1,(r2+0) 80022f8: f8 00 04 75 calli 80034cc =============================================================================== 08005920 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 8005920: 37 9c ff f4 addi sp,sp,-12 8005924: 5b 8b 00 08 sw (sp+8),r11 8005928: 5b 9d 00 04 sw (sp+4),ra 800592c: b8 40 58 00 mv r11,r2 int i; if (tty->termios.c_oflag & OPOST) { 8005930: 28 42 00 34 lw r2,(r2+52) /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 8005934: 33 81 00 0c sb (sp+12),r1 int i; if (tty->termios.c_oflag & OPOST) { 8005938: 20 41 00 01 andi r1,r2,0x1 800593c: 44 20 00 0b be r1,r0,8005968 <== NEVER TAKEN switch (c) { 8005940: 43 81 00 0c lbu r1,(sp+12) 8005944: 34 03 00 09 mvi r3,9 8005948: 44 23 00 39 be r1,r3,8005a2c 800594c: 54 23 00 0f bgu r1,r3,8005988 <== ALWAYS TAKEN 8005950: 34 03 00 08 mvi r3,8 <== NOT EXECUTED 8005954: 5c 23 00 11 bne r1,r3,8005998 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 8005958: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800595c: 4c 01 00 03 bge r0,r1,8005968 <== NOT EXECUTED tty->column--; 8005960: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8005964: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 8005968: 37 81 00 0c addi r1,sp,12 800596c: 34 02 00 01 mvi r2,1 8005970: b9 60 18 00 mv r3,r11 8005974: fb ff ff 92 calli 80057bc } 8005978: 2b 9d 00 04 lw ra,(sp+4) 800597c: 2b 8b 00 08 lw r11,(sp+8) 8005980: 37 9c 00 0c addi sp,sp,12 8005984: c3 a0 00 00 ret oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 8005988: 34 03 00 0a mvi r3,10 800598c: 44 23 00 10 be r1,r3,80059cc 8005990: 34 03 00 0d mvi r3,13 8005994: 44 23 00 1a be r1,r3,80059fc <== NEVER TAKEN if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 8005998: 20 42 00 02 andi r2,r2,0x2 800599c: 5c 40 00 2e bne r2,r0,8005a54 <== NEVER TAKEN 80059a0: 78 02 08 02 mvhi r2,0x802 80059a4: 38 42 22 cc ori r2,r2,0x22cc 80059a8: 28 42 00 00 lw r2,(r2+0) c = toupper(c); if (!iscntrl(c)) 80059ac: b4 41 08 00 add r1,r2,r1 80059b0: 40 21 00 01 lbu r1,(r1+1) 80059b4: 20 21 00 20 andi r1,r1,0x20 80059b8: 5c 20 ff ec bne r1,r0,8005968 <== NEVER TAKEN tty->column++; 80059bc: 29 61 00 28 lw r1,(r11+40) 80059c0: 34 21 00 01 addi r1,r1,1 80059c4: 59 61 00 28 sw (r11+40),r1 80059c8: e3 ff ff e8 bi 8005968 int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 80059cc: 20 41 00 20 andi r1,r2,0x20 80059d0: 44 20 00 02 be r1,r0,80059d8 <== ALWAYS TAKEN tty->column = 0; 80059d4: 59 60 00 28 sw (r11+40),r0 <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 80059d8: 20 42 00 04 andi r2,r2,0x4 80059dc: 44 40 ff e3 be r2,r0,8005968 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); 80059e0: 78 01 08 01 mvhi r1,0x801 80059e4: 38 21 fe 20 ori r1,r1,0xfe20 80059e8: 34 02 00 01 mvi r2,1 80059ec: b9 60 18 00 mv r3,r11 80059f0: fb ff ff 73 calli 80057bc tty->column = 0; 80059f4: 59 60 00 28 sw (r11+40),r0 80059f8: e3 ff ff dc bi 8005968 } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 80059fc: 20 41 00 10 andi r1,r2,0x10 <== NOT EXECUTED 8005a00: 44 20 00 03 be r1,r0,8005a0c <== NOT EXECUTED 8005a04: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8005a08: 44 20 ff dc be r1,r0,8005978 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 8005a0c: 20 41 00 08 andi r1,r2,0x8 <== NOT EXECUTED 8005a10: 44 20 00 05 be r1,r0,8005a24 <== NOT EXECUTED c = '\n'; 8005a14: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 8005a18: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 8005a1c: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED 8005a20: 44 40 ff d2 be r2,r0,8005968 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 8005a24: 59 60 00 28 sw (r11+40),r0 <== NOT EXECUTED break; 8005a28: e3 ff ff d0 bi 8005968 <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 8005a2c: 29 61 00 28 lw r1,(r11+40) 8005a30: 34 03 00 08 mvi r3,8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 8005a34: 20 44 18 00 andi r4,r2,0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 8005a38: 20 22 00 07 andi r2,r1,0x7 8005a3c: c8 62 10 00 sub r2,r3,r2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 8005a40: 34 03 18 00 mvi r3,6144 8005a44: 44 83 00 12 be r4,r3,8005a8c <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 8005a48: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 8005a4c: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED break; 8005a50: e3 ff ff c6 bi 8005968 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 8005a54: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8005a58: 38 42 22 cc ori r2,r2,0x22cc <== NOT EXECUTED 8005a5c: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8005a60: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8005a64: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 8005a68: 40 24 00 01 lbu r4,(r1+1) <== NOT EXECUTED 8005a6c: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8005a70: 20 84 00 03 andi r4,r4,0x3 <== NOT EXECUTED 8005a74: 44 81 00 04 be r4,r1,8005a84 <== NOT EXECUTED 8005a78: 20 61 00 ff andi r1,r3,0xff <== NOT EXECUTED 8005a7c: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED 8005a80: e3 ff ff cb bi 80059ac <== NOT EXECUTED 8005a84: 34 63 ff e0 addi r3,r3,-32 <== NOT EXECUTED 8005a88: e3 ff ff fc bi 8005a78 <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 8005a8c: b4 41 08 00 add r1,r2,r1 8005a90: 59 61 00 28 sw (r11+40),r1 rtems_termios_puts ( " ", i, tty); 8005a94: 78 01 08 01 mvhi r1,0x801 8005a98: 38 21 fe 24 ori r1,r1,0xfe24 8005a9c: b9 60 18 00 mv r3,r11 8005aa0: fb ff ff 47 calli 80057bc return; 8005aa4: e3 ff ff b5 bi 8005978 =============================================================================== 08009690 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 8009690: 37 9c ff d8 addi sp,sp,-40 8009694: 5b 8b 00 18 sw (sp+24),r11 8009698: 5b 8c 00 14 sw (sp+20),r12 800969c: 5b 8d 00 10 sw (sp+16),r13 80096a0: 5b 8e 00 0c sw (sp+12),r14 80096a4: 5b 8f 00 08 sw (sp+8),r15 80096a8: 5b 9d 00 04 sw (sp+4),ra 80096ac: b8 20 68 00 mv r13,r1 rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) 80096b0: 78 01 08 01 mvhi r1,0x801 80096b4: 34 02 01 ff mvi r2,511 80096b8: 38 21 d0 fc ori r1,r1,0xd0fc 80096bc: f8 00 06 f1 calli 800b280 80096c0: b8 20 70 00 mv r14,r1 return -1; 80096c4: 34 0c ff ff mvi r12,-1 ) { rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) 80096c8: 44 20 00 0a be r1,r0,80096f0 <== ALWAYS TAKEN unlink(fifopath); } if(err != 0) rtems_set_errno_and_return_minus_one(err); return 0; } 80096cc: b9 80 08 00 mv r1,r12 80096d0: 2b 9d 00 04 lw ra,(sp+4) 80096d4: 2b 8b 00 18 lw r11,(sp+24) 80096d8: 2b 8c 00 14 lw r12,(sp+20) 80096dc: 2b 8d 00 10 lw r13,(sp+16) 80096e0: 2b 8e 00 0c lw r14,(sp+12) 80096e4: 2b 8f 00 08 lw r15,(sp+8) 80096e8: 37 9c 00 28 addi sp,sp,40 80096ec: c3 a0 00 00 ret if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 80096f0: 78 07 08 01 mvhi r7,0x801 80096f4: 38 e7 d1 0c ori r7,r7,0xd10c 80096f8: 28 e6 00 00 lw r6,(r7+0) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 80096fc: 78 04 08 01 mvhi r4,0x801 8009700: 38 84 e6 50 ori r4,r4,0xe650 if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 8009704: 78 07 08 01 mvhi r7,0x801 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 8009708: 2c 83 00 00 lhu r3,(r4+0) if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 800970c: 38 e7 d1 10 ori r7,r7,0xd110 8009710: 5b 86 00 1c sw (sp+28),r6 8009714: 28 e6 00 00 lw r6,(r7+0) 8009718: 37 8b 00 1c addi r11,sp,28 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800971c: 34 65 00 01 addi r5,r3,1 8009720: 78 02 08 01 mvhi r2,0x801 8009724: 38 42 d1 04 ori r2,r2,0xd104 if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 8009728: 59 66 00 04 sw (r11+4),r6 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800972c: 0c 85 00 00 sh (r4+0),r5 if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 8009730: 34 06 66 6f mvi r6,26223 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 8009734: 37 81 00 26 addi r1,sp,38 if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 8009738: 0d 66 00 08 sh (r11+8),r6 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800973c: f8 00 12 a0 calli 800e1bc /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 8009740: b9 60 08 00 mv r1,r11 8009744: 34 02 01 80 mvi r2,384 8009748: f8 00 05 ed calli 800aefc 800974c: b8 20 78 00 mv r15,r1 8009750: 5c 2e 00 31 bne r1,r14,8009814 return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); 8009754: 34 02 40 00 mvi r2,16384 8009758: b9 60 08 00 mv r1,r11 800975c: fb ff e9 29 calli 8003c00 8009760: 59 a1 00 00 sw (r13+0),r1 8009764: b8 20 10 00 mv r2,r1 if (filsdes[0] < 0) { 8009768: 4c 2f 00 06 bge r1,r15,8009780 err = errno; 800976c: f8 00 0f 13 calli 800d3b8 <__errno> 8009770: 28 2e 00 00 lw r14,(r1+0) /* Delete file at errors, or else if pipe is successfully created the file node will be deleted after it is closed by all. */ unlink(fifopath); 8009774: b9 60 08 00 mv r1,r11 8009778: fb ff ea 4d calli 80040ac 800977c: e0 00 00 20 bi 80097fc } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 8009780: 78 01 08 01 mvhi r1,0x801 8009784: 38 21 e0 10 ori r1,r1,0xe010 8009788: 28 21 00 00 lw r1,(r1+0) 800978c: 34 03 00 00 mvi r3,0 8009790: 50 41 00 0b bgeu r2,r1,80097bc <== NEVER TAKEN 8009794: b4 42 10 00 add r2,r2,r2 8009798: 78 01 08 01 mvhi r1,0x801 800979c: b4 42 10 00 add r2,r2,r2 80097a0: 38 21 e6 c8 ori r1,r1,0xe6c8 80097a4: b4 42 10 00 add r2,r2,r2 80097a8: b4 42 10 00 add r2,r2,r2 80097ac: 28 23 00 00 lw r3,(r1+0) 80097b0: b4 42 10 00 add r2,r2,r2 80097b4: b4 42 10 00 add r2,r2,r2 80097b8: b4 62 18 00 add r3,r3,r2 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 80097bc: 28 64 00 18 lw r4,(r3+24) 80097c0: 34 02 ff fe mvi r2,-2 filsdes[1] = open(fifopath, O_WRONLY); 80097c4: b9 60 08 00 mv r1,r11 unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 80097c8: a0 82 10 00 and r2,r4,r2 80097cc: 58 62 00 18 sw (r3+24),r2 filsdes[1] = open(fifopath, O_WRONLY); 80097d0: 34 02 00 01 mvi r2,1 80097d4: fb ff e9 0b calli 8003c00 80097d8: 59 a1 00 04 sw (r13+4),r1 int pipe_create( int filsdes[2] ) { rtems_libio_t *iop; int err = 0; 80097dc: 34 0e 00 00 mvi r14,0 iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { 80097e0: 4c 20 00 05 bge r1,r0,80097f4 err = errno; 80097e4: f8 00 0e f5 calli 800d3b8 <__errno> 80097e8: 28 2e 00 00 lw r14,(r1+0) close(filsdes[0]); 80097ec: 29 a1 00 00 lw r1,(r13+0) 80097f0: fb ff e3 ff calli 80027ec } unlink(fifopath); 80097f4: b9 60 08 00 mv r1,r11 80097f8: fb ff ea 2d calli 80040ac } if(err != 0) rtems_set_errno_and_return_minus_one(err); return 0; 80097fc: 34 0c 00 00 mvi r12,0 err = errno; close(filsdes[0]); } unlink(fifopath); } if(err != 0) 8009800: 45 c0 ff b3 be r14,r0,80096cc rtems_set_errno_and_return_minus_one(err); 8009804: f8 00 0e ed calli 800d3b8 <__errno> 8009808: 58 2e 00 00 sw (r1+0),r14 800980c: 34 0c ff ff mvi r12,-1 8009810: e3 ff ff af bi 80096cc memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){ 8009814: f8 00 0e e9 calli 800d3b8 <__errno> 8009818: e3 ff ff ad bi 80096cc =============================================================================== 0800a5c4 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 800a5c4: 37 9c ff f4 addi sp,sp,-12 800a5c8: 5b 8b 00 0c sw (sp+12),r11 800a5cc: 5b 8c 00 08 sw (sp+8),r12 800a5d0: 5b 9d 00 04 sw (sp+4),ra 800a5d4: b8 60 60 00 mv r12,r3 if (cmd == FIONREAD) { 800a5d8: 78 03 08 01 mvhi r3,0x801 800a5dc: 38 63 d1 28 ori r3,r3,0xd128 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 800a5e0: b8 20 58 00 mv r11,r1 if (cmd == FIONREAD) { 800a5e4: 28 61 00 00 lw r1,(r3+0) *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; 800a5e8: 34 04 ff ea mvi r4,-22 uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { 800a5ec: 44 41 00 07 be r2,r1,800a608 PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 800a5f0: b8 80 08 00 mv r1,r4 800a5f4: 2b 9d 00 04 lw ra,(sp+4) 800a5f8: 2b 8b 00 0c lw r11,(sp+12) 800a5fc: 2b 8c 00 08 lw r12,(sp+8) 800a600: 37 9c 00 0c addi sp,sp,12 800a604: c3 a0 00 00 ret rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; 800a608: 34 04 ff f2 mvi r4,-14 void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 800a60c: 45 80 ff f9 be r12,r0,800a5f0 return -EFAULT; if (! PIPE_LOCK(pipe)) 800a610: 29 61 00 28 lw r1,(r11+40) 800a614: 34 02 00 00 mvi r2,0 800a618: 34 03 00 00 mvi r3,0 800a61c: fb ff e8 dd calli 8004990 return -EINTR; 800a620: 34 04 ff fc mvi r4,-4 { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) 800a624: 5c 20 ff f3 bne r1,r0,800a5f0 <== NEVER TAKEN return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 800a628: 29 62 00 0c lw r2,(r11+12) PIPE_UNLOCK(pipe); 800a62c: 29 61 00 28 lw r1,(r11+40) if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 800a630: 59 82 00 00 sw (r12+0),r2 PIPE_UNLOCK(pipe); 800a634: fb ff e9 33 calli 8004b00 return 0; 800a638: 34 04 00 00 mvi r4,0 800a63c: e3 ff ff ed bi 800a5f0 =============================================================================== 08009bd0 : free(pipe->Buffer); free(pipe); } static rtems_status_code pipe_lock(void) { 8009bd0: 37 9c ff f0 addi sp,sp,-16 8009bd4: 5b 8b 00 10 sw (sp+16),r11 8009bd8: 5b 8c 00 0c sw (sp+12),r12 8009bdc: 5b 8d 00 08 sw (sp+8),r13 8009be0: 5b 9d 00 04 sw (sp+4),ra rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 8009be4: 78 0b 08 01 mvhi r11,0x801 8009be8: 39 6b e6 54 ori r11,r11,0xe654 8009bec: 29 6c 00 00 lw r12,(r11+0) 8009bf0: 45 80 00 0f be r12,r0,8009c2c rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8009bf4: b9 80 08 00 mv r1,r12 8009bf8: 34 02 00 00 mvi r2,0 8009bfc: 34 03 00 00 mvi r3,0 8009c00: fb ff eb 64 calli 8004990 } if (sc == RTEMS_SUCCESSFUL) { return 0; } else { return -ENOMEM; 8009c04: 64 21 00 00 cmpei r1,r1,0 8009c08: c8 01 08 00 sub r1,r0,r1 8009c0c: 20 21 00 0c andi r1,r1,0xc 8009c10: 34 21 ff f4 addi r1,r1,-12 } } 8009c14: 2b 9d 00 04 lw ra,(sp+4) 8009c18: 2b 8b 00 10 lw r11,(sp+16) 8009c1c: 2b 8c 00 0c lw r12,(sp+12) 8009c20: 2b 8d 00 08 lw r13,(sp+8) 8009c24: 37 9c 00 10 addi sp,sp,16 8009c28: c3 a0 00 00 ret 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 ); 8009c2c: 78 0d 08 01 mvhi r13,0x801 8009c30: 39 ad e6 d0 ori r13,r13,0xe6d0 8009c34: 29 a1 00 00 lw r1,(r13+0) 8009c38: 34 02 00 00 mvi r2,0 8009c3c: 34 03 00 00 mvi r3,0 8009c40: fb ff eb 54 calli 8004990 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 8009c44: 29 61 00 00 lw r1,(r11+0) 8009c48: 44 2c 00 05 be r1,r12,8009c5c <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 8009c4c: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 8009c50: fb ff eb ac calli 8004b00 <== NOT EXECUTED 8009c54: 29 6c 00 00 lw r12,(r11+0) <== NOT EXECUTED 8009c58: e3 ff ff e7 bi 8009bf4 <== NOT EXECUTED sc = rtems_semaphore_create( 8009c5c: 78 02 08 01 mvhi r2,0x801 8009c60: 38 42 d1 14 ori r2,r2,0xd114 8009c64: 28 41 00 00 lw r1,(r2+0) 8009c68: 34 03 00 54 mvi r3,84 8009c6c: 34 02 00 01 mvi r2,1 8009c70: 34 04 00 00 mvi r4,0 8009c74: b9 60 28 00 mv r5,r11 8009c78: fb ff ea 8b calli 80046a4 8009c7c: b8 20 60 00 mv r12,r1 8009c80: 29 a1 00 00 lw r1,(r13+0) 8009c84: fb ff eb 9f calli 8004b00 } if (sc == RTEMS_SUCCESSFUL) { return 0; } else { return -ENOMEM; 8009c88: 34 01 ff f4 mvi r1,-12 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 8009c8c: 5d 80 ff e2 bne r12,r0,8009c14 8009c90: 29 6c 00 00 lw r12,(r11+0) 8009c94: e3 ff ff d8 bi 8009bf4 =============================================================================== 0800a1b0 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 800a1b0: 37 9c ff d4 addi sp,sp,-44 800a1b4: 5b 8b 00 28 sw (sp+40),r11 800a1b8: 5b 8c 00 24 sw (sp+36),r12 800a1bc: 5b 8d 00 20 sw (sp+32),r13 800a1c0: 5b 8e 00 1c sw (sp+28),r14 800a1c4: 5b 8f 00 18 sw (sp+24),r15 800a1c8: 5b 90 00 14 sw (sp+20),r16 800a1cc: 5b 91 00 10 sw (sp+16),r17 800a1d0: 5b 92 00 0c sw (sp+12),r18 800a1d4: 5b 93 00 08 sw (sp+8),r19 800a1d8: 5b 9d 00 04 sw (sp+4),ra 800a1dc: b8 20 58 00 mv r11,r1 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800a1e0: 28 21 00 28 lw r1,(r1+40) pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 800a1e4: b8 40 88 00 mv r17,r2 800a1e8: b8 60 80 00 mv r16,r3 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800a1ec: 34 02 00 00 mvi r2,0 800a1f0: 34 03 00 00 mvi r3,0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 800a1f4: b8 80 70 00 mv r14,r4 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800a1f8: fb ff e9 e6 calli 8004990 return -EINTR; 800a1fc: 34 0d ff fc mvi r13,-4 rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800a200: 5c 20 00 23 bne r1,r0,800a28c <== NEVER TAKEN return -EINTR; while (read < count) { 800a204: 34 0d 00 00 mvi r13,0 800a208: 34 12 00 00 mvi r18,0 } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 800a20c: 34 0f ff fc mvi r15,-4 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 800a210: 46 0d 00 42 be r16,r13,800a318 <== NEVER TAKEN while (PIPE_EMPTY(pipe)) { 800a214: 29 65 00 0c lw r5,(r11+12) 800a218: 5c a0 00 42 bne r5,r0,800a320 /* Not an error */ if (pipe->Writers == 0) 800a21c: 29 64 00 14 lw r4,(r11+20) 800a220: 44 85 00 3e be r4,r5,800a318 goto out_locked; if (LIBIO_NODELAY(iop)) { 800a224: 29 cc 00 18 lw r12,(r14+24) 800a228: 21 8c 00 01 andi r12,r12,0x1 800a22c: 5d 80 00 50 bne r12,r0,800a36c ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 800a230: 29 64 00 18 lw r4,(r11+24) PIPE_UNLOCK(pipe); 800a234: 29 61 00 28 lw r1,(r11+40) ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 800a238: 34 84 00 01 addi r4,r4,1 800a23c: 59 64 00 18 sw (r11+24),r4 PIPE_UNLOCK(pipe); 800a240: fb ff ea 30 calli 8004b00 if (! PIPE_READWAIT(pipe)) 800a244: 29 61 00 2c lw r1,(r11+44) 800a248: 34 02 00 00 mvi r2,0 800a24c: f8 00 05 5d calli 800b7c0 800a250: fc 2c 60 00 cmpne r12,r1,r12 ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a254: 29 61 00 28 lw r1,(r11+40) } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 800a258: c8 0c 60 00 sub r12,r0,r12 ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a25c: 34 02 00 00 mvi r2,0 800a260: 34 03 00 00 mvi r3,0 } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 800a264: a1 8f 60 00 and r12,r12,r15 ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a268: fb ff e9 ca calli 8004990 800a26c: 5c 20 00 42 bne r1,r0,800a374 <== NEVER TAKEN /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 800a270: 29 64 00 18 lw r4,(r11+24) 800a274: 34 84 ff ff addi r4,r4,-1 800a278: 59 64 00 18 sw (r11+24),r4 if (ret != 0) 800a27c: 45 81 ff e6 be r12,r1,800a214 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 800a280: 29 61 00 28 lw r1,(r11+40) 800a284: fb ff ea 1f calli 8004b00 out_nolock: if (read > 0) 800a288: 4c 0d 00 0e bge r0,r13,800a2c0 return read; return ret; } 800a28c: b9 a0 08 00 mv r1,r13 800a290: 2b 9d 00 04 lw ra,(sp+4) 800a294: 2b 8b 00 28 lw r11,(sp+40) 800a298: 2b 8c 00 24 lw r12,(sp+36) 800a29c: 2b 8d 00 20 lw r13,(sp+32) 800a2a0: 2b 8e 00 1c lw r14,(sp+28) 800a2a4: 2b 8f 00 18 lw r15,(sp+24) 800a2a8: 2b 90 00 14 lw r16,(sp+20) 800a2ac: 2b 91 00 10 lw r17,(sp+16) 800a2b0: 2b 92 00 0c lw r18,(sp+12) 800a2b4: 2b 93 00 08 lw r19,(sp+8) 800a2b8: 37 9c 00 2c addi sp,sp,44 800a2bc: c3 a0 00 00 ret PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; 800a2c0: b9 80 68 00 mv r13,r12 800a2c4: e3 ff ff f2 bi 800a28c if (chunk > chunk1) { 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); 800a2c8: 29 64 00 00 lw r4,(r11+0) 800a2cc: b6 32 08 00 add r1,r17,r18 800a2d0: b9 80 18 00 mv r3,r12 800a2d4: b4 82 10 00 add r2,r4,r2 800a2d8: f8 00 0e ee calli 800de90 pipe->Start += chunk; 800a2dc: 29 61 00 08 lw r1,(r11+8) pipe->Start %= pipe->Size; 800a2e0: 29 62 00 04 lw r2,(r11+4) 800a2e4: b5 81 08 00 add r1,r12,r1 800a2e8: f8 00 46 16 calli 801bb40 <__umodsi3> pipe->Length -= chunk; 800a2ec: 29 62 00 0c lw r2,(r11+12) } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 800a2f0: 59 61 00 08 sw (r11+8),r1 pipe->Length -= chunk; 800a2f4: c8 4c 08 00 sub r1,r2,r12 800a2f8: 59 61 00 0c sw (r11+12),r1 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 800a2fc: 5c 20 00 02 bne r1,r0,800a304 pipe->Start = 0; 800a300: 59 60 00 08 sw (r11+8),r0 if (pipe->waitingWriters > 0) 800a304: 29 61 00 1c lw r1,(r11+28) 800a308: 5c 20 00 1e bne r1,r0,800a380 PIPE_WAKEUPWRITERS(pipe); read += chunk; 800a30c: b5 ac 68 00 add r13,r13,r12 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 800a310: b9 a0 90 00 mv r18,r13 800a314: 56 0d ff c0 bgu r16,r13,800a214 <== NEVER TAKEN while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 800a318: 34 0c 00 00 mvi r12,0 800a31c: e3 ff ff d9 bi 800a280 if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 800a320: ca 12 08 00 sub r1,r16,r18 800a324: b8 a0 60 00 mv r12,r5 800a328: 50 25 00 02 bgeu r1,r5,800a330 800a32c: b8 20 60 00 mv r12,r1 chunk1 = pipe->Size - pipe->Start; 800a330: 29 62 00 08 lw r2,(r11+8) 800a334: 29 73 00 04 lw r19,(r11+4) 800a338: ca 62 98 00 sub r19,r19,r2 if (chunk > chunk1) { 800a33c: 4e 6c ff e3 bge r19,r12,800a2c8 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 800a340: 29 64 00 00 lw r4,(r11+0) 800a344: ba 60 18 00 mv r3,r19 800a348: b6 32 08 00 add r1,r17,r18 800a34c: b4 82 10 00 add r2,r4,r2 800a350: f8 00 0e d0 calli 800de90 memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 800a354: 29 62 00 00 lw r2,(r11+0) 800a358: b6 53 08 00 add r1,r18,r19 800a35c: b6 21 08 00 add r1,r17,r1 800a360: c9 93 18 00 sub r3,r12,r19 800a364: f8 00 0e cb calli 800de90 800a368: e3 ff ff dd bi 800a2dc /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 800a36c: 34 0c ff f5 mvi r12,-11 800a370: e3 ff ff c4 bi 800a280 PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; 800a374: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 800a378: 4c 0d ff d2 bge r0,r13,800a2c0 <== NOT EXECUTED 800a37c: e3 ff ff c4 bi 800a28c <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 800a380: 29 61 00 30 lw r1,(r11+48) 800a384: 37 82 00 2c addi r2,sp,44 800a388: f8 00 04 ed calli 800b73c 800a38c: e3 ff ff e0 bi 800a30c =============================================================================== 08009cd0 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 8009cd0: 37 9c ff e8 addi sp,sp,-24 8009cd4: 5b 8b 00 14 sw (sp+20),r11 8009cd8: 5b 8c 00 10 sw (sp+16),r12 8009cdc: 5b 8d 00 0c sw (sp+12),r13 8009ce0: 5b 8e 00 08 sw (sp+8),r14 8009ce4: 5b 9d 00 04 sw (sp+4),ra 8009ce8: b8 20 68 00 mv r13,r1 8009cec: b8 40 70 00 mv r14,r2 pipe_control_t *pipe = *pipep; 8009cf0: 28 2b 00 00 lw r11,(r1+0) uint32_t mode; if (pipe_lock()) 8009cf4: fb ff ff b7 calli 8009bd0 8009cf8: b8 20 60 00 mv r12,r1 8009cfc: 5c 20 00 3c bne r1,r0,8009dec <== NEVER TAKEN /* WARN pipe not freed and pipep not set to NULL! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); if (!PIPE_LOCK(pipe)) 8009d00: 29 61 00 28 lw r1,(r11+40) 8009d04: 34 03 00 00 mvi r3,0 8009d08: 34 02 00 00 mvi r2,0 8009d0c: fb ff eb 21 calli 8004990 8009d10: b8 20 18 00 mv r3,r1 8009d14: 5c 2c 00 36 bne r1,r12,8009dec <== NEVER TAKEN /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); mode = LIBIO_ACCMODE(iop); 8009d18: 29 cc 00 18 lw r12,(r14+24) if (mode & LIBIO_FLAGS_READ) 8009d1c: 21 81 00 02 andi r1,r12,0x2 if (!PIPE_LOCK(pipe)) /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); mode = LIBIO_ACCMODE(iop); 8009d20: 21 8c 00 06 andi r12,r12,0x6 if (mode & LIBIO_FLAGS_READ) 8009d24: 44 23 00 04 be r1,r3,8009d34 pipe->Readers --; 8009d28: 29 61 00 10 lw r1,(r11+16) 8009d2c: 34 21 ff ff addi r1,r1,-1 8009d30: 59 61 00 10 sw (r11+16),r1 if (mode & LIBIO_FLAGS_WRITE) 8009d34: 21 81 00 04 andi r1,r12,0x4 8009d38: 44 20 00 04 be r1,r0,8009d48 pipe->Writers --; 8009d3c: 29 61 00 14 lw r1,(r11+20) 8009d40: 34 21 ff ff addi r1,r1,-1 8009d44: 59 61 00 14 sw (r11+20),r1 PIPE_UNLOCK(pipe); 8009d48: 29 61 00 28 lw r1,(r11+40) 8009d4c: fb ff eb 6d calli 8004b00 if (pipe->Readers == 0 && pipe->Writers == 0) { 8009d50: 29 62 00 10 lw r2,(r11+16) 8009d54: 44 40 00 12 be r2,r0,8009d9c *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) 8009d58: 29 61 00 14 lw r1,(r11+20) 8009d5c: 7d 8c 00 02 cmpnei r12,r12,2 8009d60: 64 21 00 00 cmpei r1,r1,0 8009d64: a0 2c 60 00 and r12,r1,r12 8009d68: 45 80 00 04 be r12,r0,8009d78 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 8009d6c: 29 61 00 2c lw r1,(r11+44) 8009d70: 37 82 00 18 addi r2,sp,24 8009d74: f8 00 06 72 calli 800b73c pipe_unlock(); 8009d78: fb ff ff c8 calli 8009c98 if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 8009d7c: 34 01 00 00 mvi r1,0 8009d80: 2b 9d 00 04 lw ra,(sp+4) 8009d84: 2b 8b 00 14 lw r11,(sp+20) 8009d88: 2b 8c 00 10 lw r12,(sp+16) 8009d8c: 2b 8d 00 0c lw r13,(sp+12) 8009d90: 2b 8e 00 08 lw r14,(sp+8) 8009d94: 37 9c 00 18 addi sp,sp,24 8009d98: c3 a0 00 00 ret if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 8009d9c: 29 61 00 14 lw r1,(r11+20) 8009da0: 44 22 00 07 be r1,r2,8009dbc delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 8009da4: 7d 8c 00 04 cmpnei r12,r12,4 8009da8: 45 80 ff f4 be r12,r0,8009d78 <== NEVER TAKEN /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 8009dac: 29 61 00 30 lw r1,(r11+48) 8009db0: 37 82 00 18 addi r2,sp,24 8009db4: f8 00 06 62 calli 800b73c 8009db8: e3 ff ff f0 bi 8009d78 /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 8009dbc: 29 61 00 2c lw r1,(r11+44) 8009dc0: f8 00 06 2b calli 800b66c rtems_barrier_delete(pipe->writeBarrier); 8009dc4: 29 61 00 30 lw r1,(r11+48) 8009dc8: f8 00 06 29 calli 800b66c rtems_semaphore_delete(pipe->Semaphore); 8009dcc: 29 61 00 28 lw r1,(r11+40) 8009dd0: fb ff ea b9 calli 80048b4 free(pipe->Buffer); 8009dd4: 29 61 00 00 lw r1,(r11+0) 8009dd8: fb ff e3 46 calli 8002af0 free(pipe); 8009ddc: b9 60 08 00 mv r1,r11 8009de0: fb ff e3 44 calli 8002af0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 8009de4: 59 a0 00 00 sw (r13+0),r0 8009de8: e3 ff ff e4 bi 8009d78 rtems_fatal_error_occurred(0xdeadbeef); if (!PIPE_LOCK(pipe)) /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); 8009dec: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 8009df0: 38 42 d1 18 ori r2,r2,0xd118 <== NOT EXECUTED 8009df4: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 8009df8: fb ff ec 27 calli 8004e94 <== NOT EXECUTED =============================================================================== 08009c98 : return -ENOMEM; } } static void pipe_unlock(void) { 8009c98: 37 9c ff fc addi sp,sp,-4 8009c9c: 5b 9d 00 04 sw (sp+4),ra rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 8009ca0: 78 01 08 01 mvhi r1,0x801 8009ca4: 38 21 e6 54 ori r1,r1,0xe654 8009ca8: 28 21 00 00 lw r1,(r1+0) 8009cac: fb ff eb 95 calli 8004b00 if (sc != RTEMS_SUCCESSFUL) { 8009cb0: 5c 20 00 04 bne r1,r0,8009cc0 <== NEVER TAKEN /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); } } 8009cb4: 2b 9d 00 04 lw ra,(sp+4) 8009cb8: 37 9c 00 04 addi sp,sp,4 8009cbc: c3 a0 00 00 ret rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) { /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); 8009cc0: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 8009cc4: 38 42 d1 18 ori r2,r2,0xd118 <== NOT EXECUTED 8009cc8: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 8009ccc: fb ff ec 72 calli 8004e94 <== NOT EXECUTED =============================================================================== 0800a390 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 800a390: 37 9c ff d4 addi sp,sp,-44 800a394: 5b 8b 00 24 sw (sp+36),r11 800a398: 5b 8c 00 20 sw (sp+32),r12 800a39c: 5b 8d 00 1c sw (sp+28),r13 800a3a0: 5b 8e 00 18 sw (sp+24),r14 800a3a4: 5b 8f 00 14 sw (sp+20),r15 800a3a8: 5b 90 00 10 sw (sp+16),r16 800a3ac: 5b 91 00 0c sw (sp+12),r17 800a3b0: 5b 92 00 08 sw (sp+8),r18 800a3b4: 5b 9d 00 04 sw (sp+4),ra int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; 800a3b8: 34 0b 00 00 mvi r11,0 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 800a3bc: b8 60 68 00 mv r13,r3 800a3c0: b8 20 60 00 mv r12,r1 800a3c4: b8 40 70 00 mv r14,r2 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 800a3c8: 5c 60 00 0d bne r3,r0,800a3fc <== ALWAYS TAKEN #endif if (written > 0) return written; return ret; } 800a3cc: b9 60 08 00 mv r1,r11 800a3d0: 2b 9d 00 04 lw ra,(sp+4) 800a3d4: 2b 8b 00 24 lw r11,(sp+36) 800a3d8: 2b 8c 00 20 lw r12,(sp+32) 800a3dc: 2b 8d 00 1c lw r13,(sp+28) 800a3e0: 2b 8e 00 18 lw r14,(sp+24) 800a3e4: 2b 8f 00 14 lw r15,(sp+20) 800a3e8: 2b 90 00 10 lw r16,(sp+16) 800a3ec: 2b 91 00 0c lw r17,(sp+12) 800a3f0: 2b 92 00 08 lw r18,(sp+8) 800a3f4: 37 9c 00 2c addi sp,sp,44 800a3f8: c3 a0 00 00 ret /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 800a3fc: 28 21 00 28 lw r1,(r1+40) 800a400: 34 02 00 00 mvi r2,0 800a404: 34 03 00 00 mvi r3,0 800a408: 5b 84 00 28 sw (sp+40),r4 800a40c: fb ff e9 61 calli 8004990 return -EINTR; 800a410: 34 0b ff fc mvi r11,-4 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 800a414: 2b 84 00 28 lw r4,(sp+40) 800a418: 5c 20 ff ed bne r1,r0,800a3cc <== NEVER TAKEN return -EINTR; if (pipe->Readers == 0) { 800a41c: 29 82 00 10 lw r2,(r12+16) 800a420: 44 41 00 53 be r2,r1,800a56c ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 800a424: 29 8f 00 04 lw r15,(r12+4) 800a428: 34 10 00 01 mvi r16,1 800a42c: 55 af 00 02 bgu r13,r15,800a434 <== NEVER TAKEN 800a430: b9 a0 80 00 mv r16,r13 800a434: 34 12 00 00 mvi r18,0 800a438: 34 0b 00 00 mvi r11,0 } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 800a43c: 34 11 ff fc mvi r17,-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) { 800a440: 29 81 00 0c lw r1,(r12+12) 800a444: c9 e1 18 00 sub r3,r15,r1 800a448: 56 03 00 23 bgu r16,r3,800a4d4 ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 800a44c: c9 b2 10 00 sub r2,r13,r18 800a450: b8 60 80 00 mv r16,r3 800a454: 50 43 00 02 bgeu r2,r3,800a45c 800a458: b8 40 80 00 mv r16,r2 chunk1 = pipe->Size - PIPE_WSTART(pipe); 800a45c: 29 83 00 08 lw r3,(r12+8) 800a460: b9 e0 10 00 mv r2,r15 800a464: 5b 84 00 28 sw (sp+40),r4 800a468: b4 23 08 00 add r1,r1,r3 800a46c: f8 00 45 b5 calli 801bb40 <__umodsi3> 800a470: c9 e1 78 00 sub r15,r15,r1 if (chunk > chunk1) { 800a474: 2b 84 00 28 lw r4,(sp+40) 800a478: 4d f0 00 45 bge r15,r16,800a58c memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 800a47c: 29 85 00 00 lw r5,(r12+0) 800a480: b5 d2 10 00 add r2,r14,r18 800a484: b9 e0 18 00 mv r3,r15 800a488: b4 a1 08 00 add r1,r5,r1 800a48c: f8 00 0e 81 calli 800de90 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 800a490: 29 81 00 00 lw r1,(r12+0) 800a494: b5 f2 10 00 add r2,r15,r18 800a498: b5 c2 10 00 add r2,r14,r2 800a49c: ca 0f 18 00 sub r3,r16,r15 800a4a0: f8 00 0e 7c calli 800de90 800a4a4: 2b 84 00 28 lw r4,(sp+40) } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 800a4a8: 29 81 00 0c lw r1,(r12+12) if (pipe->waitingReaders > 0) 800a4ac: 29 82 00 18 lw r2,(r12+24) memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 800a4b0: b4 30 08 00 add r1,r1,r16 800a4b4: 59 81 00 0c sw (r12+12),r1 if (pipe->waitingReaders > 0) 800a4b8: 5c 40 00 3d bne r2,r0,800a5ac PIPE_WAKEUPREADERS(pipe); written += chunk; 800a4bc: b5 70 58 00 add r11,r11,r16 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 800a4c0: b9 60 90 00 mv r18,r11 800a4c4: 51 6d 00 21 bgeu r11,r13,800a548 <== ALWAYS TAKEN 800a4c8: 29 8f 00 04 lw r15,(r12+4) <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); written += chunk; /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; 800a4cc: 34 10 00 01 mvi r16,1 <== NOT EXECUTED 800a4d0: e3 ff ff dc bi 800a440 <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 800a4d4: 28 8f 00 18 lw r15,(r4+24) 800a4d8: 21 ef 00 01 andi r15,r15,0x1 800a4dc: 5d e0 00 2a bne r15,r0,800a584 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 800a4e0: 29 83 00 1c lw r3,(r12+28) PIPE_UNLOCK(pipe); 800a4e4: 29 81 00 28 lw r1,(r12+40) ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 800a4e8: 34 63 00 01 addi r3,r3,1 800a4ec: 59 83 00 1c sw (r12+28),r3 PIPE_UNLOCK(pipe); 800a4f0: 5b 84 00 28 sw (sp+40),r4 800a4f4: fb ff e9 83 calli 8004b00 if (! PIPE_WRITEWAIT(pipe)) 800a4f8: 29 81 00 30 lw r1,(r12+48) 800a4fc: 34 02 00 00 mvi r2,0 800a500: f8 00 04 b0 calli 800b7c0 800a504: fc 2f 78 00 cmpne r15,r1,r15 ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a508: 29 81 00 28 lw r1,(r12+40) 800a50c: 34 02 00 00 mvi r2,0 800a510: 34 03 00 00 mvi r3,0 } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 800a514: c8 0f 78 00 sub r15,r0,r15 ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a518: fb ff e9 1e calli 8004990 } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 800a51c: a1 f1 78 00 and r15,r15,r17 ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a520: 2b 84 00 28 lw r4,(sp+40) 800a524: 5c 20 00 15 bne r1,r0,800a578 <== NEVER TAKEN /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 800a528: 29 83 00 1c lw r3,(r12+28) 800a52c: 34 63 ff ff addi r3,r3,-1 800a530: 59 83 00 1c sw (r12+28),r3 if (ret != 0) 800a534: 5d e1 00 06 bne r15,r1,800a54c <== NEVER TAKEN goto out_locked; if (pipe->Readers == 0) { 800a538: 29 81 00 10 lw r1,(r12+16) 800a53c: 44 2f 00 0a be r1,r15,800a564 <== NEVER TAKEN 800a540: 29 8f 00 04 lw r15,(r12+4) 800a544: e3 ff ff bf bi 800a440 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 800a548: 34 0f 00 00 mvi r15,0 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 800a54c: 29 81 00 28 lw r1,(r12+40) 800a550: fb ff e9 6c calli 8004b00 /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 800a554: 4c 0b 00 02 bge r0,r11,800a55c 800a558: e3 ff ff 9d bi 800a3cc return written; return ret; 800a55c: b9 e0 58 00 mv r11,r15 800a560: e3 ff ff 9b bi 800a3cc pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; 800a564: 34 0f ff e0 mvi r15,-32 <== NOT EXECUTED 800a568: e3 ff ff f9 bi 800a54c <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; if (pipe->Readers == 0) { ret = -EPIPE; 800a56c: 34 0f ff e0 mvi r15,-32 const void *buffer, size_t count, rtems_libio_t *iop ) { int chunk, chunk1, written = 0, ret = 0; 800a570: 34 0b 00 00 mvi r11,0 800a574: e3 ff ff f6 bi 800a54c PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; 800a578: 34 0f ff fc mvi r15,-4 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 800a57c: 4c 0b ff f8 bge r0,r11,800a55c <== NOT EXECUTED 800a580: e3 ff ff 93 bi 800a3cc <== NOT EXECUTED chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 800a584: 34 0f ff f5 mvi r15,-11 800a588: e3 ff ff f1 bi 800a54c 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); 800a58c: 29 85 00 00 lw r5,(r12+0) 800a590: b5 d2 10 00 add r2,r14,r18 800a594: ba 00 18 00 mv r3,r16 800a598: b4 a1 08 00 add r1,r5,r1 800a59c: 5b 84 00 28 sw (sp+40),r4 800a5a0: f8 00 0e 3c calli 800de90 800a5a4: 2b 84 00 28 lw r4,(sp+40) 800a5a8: e3 ff ff c0 bi 800a4a8 pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 800a5ac: 29 81 00 2c lw r1,(r12+44) 800a5b0: 37 82 00 2c addi r2,sp,44 800a5b4: 5b 84 00 28 sw (sp+40),r4 800a5b8: f8 00 04 61 calli 800b73c 800a5bc: 2b 84 00 28 lw r4,(sp+40) 800a5c0: e3 ff ff bf bi 800a4bc =============================================================================== 080115a4 : ssize_t read( int fd, void *buffer, size_t count ) { 80115a4: 37 9c ff f4 addi sp,sp,-12 80115a8: 5b 8b 00 0c sw (sp+12),r11 80115ac: 5b 8c 00 08 sw (sp+8),r12 80115b0: 5b 9d 00 04 sw (sp+4),ra ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 80115b4: 78 04 08 01 mvhi r4,0x801 80115b8: 38 84 30 10 ori r4,r4,0x3010 80115bc: 28 84 00 00 lw r4,(r4+0) 80115c0: 54 81 00 0b bgu r4,r1,80115ec <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 80115c4: fb ff e9 38 calli 800baa4 <__errno> 80115c8: 34 02 00 09 mvi r2,9 80115cc: 58 22 00 00 sw (r1+0),r2 80115d0: 34 0b ff ff mvi r11,-1 if ( rc > 0 ) iop->offset += rc; return rc; } 80115d4: b9 60 08 00 mv r1,r11 80115d8: 2b 9d 00 04 lw ra,(sp+4) 80115dc: 2b 8b 00 0c lw r11,(sp+12) 80115e0: 2b 8c 00 08 lw r12,(sp+8) 80115e4: 37 9c 00 0c addi sp,sp,12 80115e8: c3 a0 00 00 ret { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 80115ec: b4 21 08 00 add r1,r1,r1 80115f0: 78 04 08 01 mvhi r4,0x801 80115f4: b4 21 08 00 add r1,r1,r1 80115f8: 38 84 36 a0 ori r4,r4,0x36a0 80115fc: b4 21 08 00 add r1,r1,r1 8011600: 28 8c 00 00 lw r12,(r4+0) 8011604: b4 21 08 00 add r1,r1,r1 8011608: b4 21 08 00 add r1,r1,r1 801160c: b4 21 08 00 add r1,r1,r1 8011610: b5 81 60 00 add r12,r12,r1 rtems_libio_check_is_open( iop ); 8011614: 29 81 00 18 lw r1,(r12+24) 8011618: 20 24 01 00 andi r4,r1,0x100 801161c: 44 80 ff ea be r4,r0,80115c4 rtems_libio_check_buffer( buffer ); 8011620: 44 40 00 1b be r2,r0,801168c <== NEVER TAKEN rtems_libio_check_count( count ); 8011624: 34 0b 00 00 mvi r11,0 8011628: 44 60 ff eb be r3,r0,80115d4 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 801162c: 20 21 00 02 andi r1,r1,0x2 8011630: 44 20 00 17 be r1,r0,801168c <== NEVER TAKEN return 0; /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); 8011634: 29 84 00 24 lw r4,(r12+36) 8011638: b9 80 08 00 mv r1,r12 801163c: 28 84 00 08 lw r4,(r4+8) 8011640: d8 80 00 00 call r4 8011644: b8 20 58 00 mv r11,r1 if ( rc > 0 ) 8011648: 4c 01 ff e3 bge r0,r1,80115d4 iop->offset += rc; 801164c: 34 02 00 1f mvi r2,31 8011650: fb ff fe 04 calli 8010e60 <__ashrsi3> 8011654: 29 82 00 14 lw r2,(r12+20) 8011658: 29 84 00 10 lw r4,(r12+16) 801165c: b5 62 10 00 add r2,r11,r2 8011660: f5 62 18 00 cmpgu r3,r11,r2 8011664: b4 24 08 00 add r1,r1,r4 8011668: b4 61 08 00 add r1,r3,r1 801166c: 59 81 00 10 sw (r12+16),r1 return rc; } 8011670: b9 60 08 00 mv r1,r11 * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); if ( rc > 0 ) iop->offset += rc; 8011674: 59 82 00 14 sw (r12+20),r2 return rc; } 8011678: 2b 9d 00 04 lw ra,(sp+4) 801167c: 2b 8b 00 0c lw r11,(sp+12) 8011680: 2b 8c 00 08 lw r12,(sp+8) 8011684: 37 9c 00 0c addi sp,sp,12 8011688: c3 a0 00 00 ret 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 ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 801168c: fb ff e9 06 calli 800baa4 <__errno> <== NOT EXECUTED 8011690: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8011694: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8011698: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 801169c: e3 ff ff ce bi 80115d4 <== NOT EXECUTED =============================================================================== 080051c8 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 80051c8: 37 9c ff d8 addi sp,sp,-40 80051cc: 5b 8b 00 14 sw (sp+20),r11 80051d0: 5b 8c 00 10 sw (sp+16),r12 80051d4: 5b 8d 00 0c sw (sp+12),r13 80051d8: 5b 8e 00 08 sw (sp+8),r14 80051dc: 5b 9d 00 04 sw (sp+4),ra 80051e0: b8 40 68 00 mv r13,r2 80051e4: b8 20 60 00 mv r12,r1 80051e8: b8 60 70 00 mv r14,r3 rtems_filesystem_location_info_t loc; int result; if (!buf) 80051ec: 44 40 00 2b be r2,r0,8005298 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 80051f0: f8 00 2f a8 calli 8011090 80051f4: b8 20 20 00 mv r4,r1 80051f8: 37 8b 00 18 addi r11,sp,24 80051fc: b9 80 08 00 mv r1,r12 8005200: b8 80 10 00 mv r2,r4 8005204: 34 03 00 00 mvi r3,0 8005208: b9 60 20 00 mv r4,r11 800520c: 34 05 00 00 mvi r5,0 8005210: fb ff fa 8e calli 8003c48 0, &loc, false ); if ( result != 0 ) return -1; 8005214: 34 0c ff ff mvi r12,-1 if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0, &loc, false ); if ( result != 0 ) 8005218: 44 20 00 09 be r1,r0,800523c <== ALWAYS TAKEN result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 800521c: b9 80 08 00 mv r1,r12 8005220: 2b 9d 00 04 lw ra,(sp+4) 8005224: 2b 8b 00 14 lw r11,(sp+20) 8005228: 2b 8c 00 10 lw r12,(sp+16) 800522c: 2b 8d 00 0c lw r13,(sp+12) 8005230: 2b 8e 00 08 lw r14,(sp+8) 8005234: 37 9c 00 28 addi sp,sp,40 8005238: c3 a0 00 00 ret 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 ){ 800523c: 2b 82 00 24 lw r2,(sp+36) 8005240: b9 60 08 00 mv r1,r11 8005244: 28 42 00 10 lw r2,(r2+16) 8005248: d8 40 00 00 call r2 800524c: 34 02 00 04 mvi r2,4 8005250: 5c 22 00 1e bne r1,r2,80052c8 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 8005254: 2b 83 00 24 lw r3,(sp+36) 8005258: b9 a0 10 00 mv r2,r13 800525c: b9 60 08 00 mv r1,r11 8005260: 28 64 00 3c lw r4,(r3+60) 8005264: b9 c0 18 00 mv r3,r14 8005268: d8 80 00 00 call r4 800526c: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &loc ); 8005270: b9 60 08 00 mv r1,r11 8005274: fb ff fa cf calli 8003db0 return result; } 8005278: b9 80 08 00 mv r1,r12 800527c: 2b 9d 00 04 lw ra,(sp+4) 8005280: 2b 8b 00 14 lw r11,(sp+20) 8005284: 2b 8c 00 10 lw r12,(sp+16) 8005288: 2b 8d 00 0c lw r13,(sp+12) 800528c: 2b 8e 00 08 lw r14,(sp+8) 8005290: 37 9c 00 28 addi sp,sp,40 8005294: c3 a0 00 00 ret { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 8005298: f8 00 27 df calli 800f214 <__errno> <== NOT EXECUTED 800529c: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 80052a0: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 80052a4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 80052a8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80052ac: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80052b0: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 80052b4: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 80052b8: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 80052bc: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 80052c0: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 80052c4: c3 a0 00 00 ret <== 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 ); 80052c8: b9 60 08 00 mv r1,r11 80052cc: fb ff fa b9 calli 8003db0 rtems_set_errno_and_return_minus_one( EINVAL ); 80052d0: f8 00 27 d1 calli 800f214 <__errno> 80052d4: 34 02 00 16 mvi r2,22 80052d8: 58 22 00 00 sw (r1+0),r2 80052dc: e3 ff ff d0 bi 800521c =============================================================================== 08003a84 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 8003a84: 37 9c ff e4 addi sp,sp,-28 8003a88: 5b 8b 00 1c sw (sp+28),r11 8003a8c: 5b 8c 00 18 sw (sp+24),r12 8003a90: 5b 8d 00 14 sw (sp+20),r13 8003a94: 5b 8e 00 10 sw (sp+16),r14 8003a98: 5b 8f 00 0c sw (sp+12),r15 8003a9c: 5b 90 00 08 sw (sp+8),r16 8003aa0: 5b 9d 00 04 sw (sp+4),ra int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 8003aa4: 78 04 08 01 mvhi r4,0x801 8003aa8: 38 84 50 10 ori r4,r4,0x5010 8003aac: 28 84 00 00 lw r4,(r4+0) ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 8003ab0: b8 60 60 00 mv r12,r3 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 8003ab4: 54 81 00 06 bgu r4,r1,8003acc iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 8003ab8: f8 00 24 1a calli 800cb20 <__errno> 8003abc: 34 02 00 09 mvi r2,9 8003ac0: 58 22 00 00 sw (r1+0),r2 8003ac4: 34 0f ff ff mvi r15,-1 8003ac8: e0 00 00 16 bi 8003b20 int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8003acc: b4 21 08 00 add r1,r1,r1 8003ad0: 78 03 08 01 mvhi r3,0x801 8003ad4: b4 21 08 00 add r1,r1,r1 8003ad8: 38 63 56 a0 ori r3,r3,0x56a0 8003adc: b4 21 08 00 add r1,r1,r1 8003ae0: 28 6b 00 00 lw r11,(r3+0) 8003ae4: b4 21 08 00 add r1,r1,r1 8003ae8: b4 21 08 00 add r1,r1,r1 8003aec: b4 21 08 00 add r1,r1,r1 8003af0: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open( iop ); 8003af4: 29 61 00 18 lw r1,(r11+24) 8003af8: 20 23 01 00 andi r3,r1,0x100 8003afc: 44 60 ff ef be r3,r0,8003ab8 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 8003b00: 20 21 00 02 andi r1,r1,0x2 8003b04: 44 20 00 03 be r1,r0,8003b10 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 8003b08: 44 40 00 02 be r2,r0,8003b10 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 8003b0c: 49 80 00 0f bg r12,r0,8003b48 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 8003b10: f8 00 24 04 calli 800cb20 <__errno> 8003b14: 34 02 00 16 mvi r2,22 8003b18: 58 22 00 00 sw (r1+0),r2 8003b1c: 34 0f ff ff mvi r15,-1 if (bytes != iov[ v ].iov_len) break; } return total; } 8003b20: b9 e0 08 00 mv r1,r15 8003b24: 2b 9d 00 04 lw ra,(sp+4) 8003b28: 2b 8b 00 1c lw r11,(sp+28) 8003b2c: 2b 8c 00 18 lw r12,(sp+24) 8003b30: 2b 8d 00 14 lw r13,(sp+20) 8003b34: 2b 8e 00 10 lw r14,(sp+16) 8003b38: 2b 8f 00 0c lw r15,(sp+12) 8003b3c: 2b 90 00 08 lw r16,(sp+8) 8003b40: 37 9c 00 1c addi sp,sp,28 8003b44: c3 a0 00 00 ret rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 8003b48: 34 01 04 00 mvi r1,1024 8003b4c: 4c 2c 00 02 bge r1,r12,8003b54 <== ALWAYS TAKEN 8003b50: e3 ff ff f0 bi 8003b10 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 8003b54: b8 40 70 00 mv r14,r2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 8003b58: b8 40 20 00 mv r4,r2 8003b5c: 34 07 00 01 mvi r7,1 8003b60: 34 05 00 00 mvi r5,0 8003b64: 34 06 00 00 mvi r6,0 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 8003b68: 28 81 00 00 lw r1,(r4+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++ ) { 8003b6c: 34 a5 00 01 addi r5,r5,1 ssize_t old; if ( !iov[v].iov_base ) 8003b70: 44 20 ff e8 be r1,r0,8003b10 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 8003b74: 28 81 00 04 lw r1,(r4+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++ ) { 8003b78: 34 84 00 08 addi r4,r4,8 total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; 8003b7c: 64 23 00 00 cmpei r3,r1,0 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 8003b80: b4 c1 08 00 add r1,r6,r1 if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; 8003b84: c8 03 18 00 sub r3,r0,r3 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 8003b88: 4c 26 00 02 bge r1,r6,8003b90 8003b8c: e3 ff ff e1 bi 8003b10 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; 8003b90: a0 e3 38 00 and r7,r7,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++ ) { 8003b94: 49 85 00 1e bg r12,r5,8003c0c * 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 ) { return 0; 8003b98: 34 0f 00 00 mvi r15,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 ) { 8003b9c: 5c e0 ff e1 bne r7,r0,8003b20 8003ba0: 34 10 00 00 mvi r16,0 /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->pathinfo.handlers->read_h)( 8003ba4: 29 61 00 24 lw r1,(r11+36) 8003ba8: 29 c2 00 00 lw r2,(r14+0) 8003bac: 29 c3 00 04 lw r3,(r14+4) 8003bb0: 28 24 00 08 lw r4,(r1+8) 8003bb4: b9 60 08 00 mv r1,r11 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003bb8: 36 10 00 01 addi r16,r16,1 bytes = (*iop->pathinfo.handlers->read_h)( 8003bbc: d8 80 00 00 call r4 8003bc0: b8 20 68 00 mv r13,r1 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 8003bc4: 34 02 00 1f mvi r2,31 iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 8003bc8: 48 01 00 13 bg r0,r1,8003c14 <== NEVER TAKEN return -1; if ( bytes > 0 ) { 8003bcc: 44 20 00 0b be r1,r0,8003bf8 <== NEVER TAKEN iop->offset += bytes; 8003bd0: f8 00 39 72 calli 8012198 <__ashrsi3> 8003bd4: 29 62 00 14 lw r2,(r11+20) 8003bd8: 29 64 00 10 lw r4,(r11+16) total += bytes; 8003bdc: b5 ed 78 00 add r15,r15,r13 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 8003be0: b5 a2 10 00 add r2,r13,r2 8003be4: f5 a2 18 00 cmpgu r3,r13,r2 8003be8: b4 24 08 00 add r1,r1,r4 8003bec: b4 61 08 00 add r1,r3,r1 8003bf0: 59 61 00 10 sw (r11+16),r1 8003bf4: 59 62 00 14 sw (r11+20),r2 total += bytes; } if (bytes != iov[ v ].iov_len) 8003bf8: 29 c1 00 04 lw r1,(r14+4) } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003bfc: 35 ce 00 08 addi r14,r14,8 if ( bytes > 0 ) { iop->offset += bytes; total += bytes; } if (bytes != iov[ v ].iov_len) 8003c00: 5d a1 ff c8 bne r13,r1,8003b20 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003c04: 49 90 ff e8 bg r12,r16,8003ba4 8003c08: e3 ff ff c6 bi 8003b20 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 8003c0c: b8 20 30 00 mv r6,r1 8003c10: e3 ff ff d6 bi 8003b68 iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; 8003c14: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED 8003c18: e3 ff ff c2 bi 8003b20 <== NOT EXECUTED =============================================================================== 08011740 : void *realloc( void *ptr, size_t size ) { 8011740: 37 9c ff e4 addi sp,sp,-28 8011744: 5b 8b 00 18 sw (sp+24),r11 8011748: 5b 8c 00 14 sw (sp+20),r12 801174c: 5b 8d 00 10 sw (sp+16),r13 8011750: 5b 8e 00 0c sw (sp+12),r14 8011754: 5b 8f 00 08 sw (sp+8),r15 8011758: 5b 9d 00 04 sw (sp+4),ra uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 801175c: 78 0c 08 01 mvhi r12,0x801 8011760: 39 8c 36 b8 ori r12,r12,0x36b8 8011764: 29 84 00 10 lw r4,(r12+16) /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 8011768: 78 03 08 01 mvhi r3,0x801 801176c: 38 63 39 9c ori r3,r3,0x399c 8011770: 28 63 00 00 lw r3,(r3+0) ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 8011774: 34 84 00 01 addi r4,r4,1 void *realloc( void *ptr, size_t size ) { 8011778: b8 20 58 00 mv r11,r1 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 801177c: 59 84 00 10 sw (r12+16),r4 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 8011780: 34 01 00 03 mvi r1,3 void *realloc( void *ptr, size_t size ) { 8011784: b8 40 70 00 mv r14,r2 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 8011788: 44 61 00 22 be r3,r1,8011810 <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 801178c: 45 60 00 2d be r11,r0,8011840 return malloc( size ); if ( !size ) { 8011790: 45 c0 00 17 be r14,r0,80117ec <== NEVER TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 8011794: 78 0d 08 01 mvhi r13,0x801 8011798: 39 ad 30 1c ori r13,r13,0x301c 801179c: 29 a1 00 00 lw r1,(r13+0) 80117a0: b9 60 10 00 mv r2,r11 80117a4: 37 83 00 1c addi r3,sp,28 80117a8: f8 00 00 7b calli 8011994 <_Protected_heap_Get_block_size> 80117ac: 44 20 00 14 be r1,r0,80117fc } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 80117b0: 29 a1 00 00 lw r1,(r13+0) 80117b4: b9 60 10 00 mv r2,r11 80117b8: b9 c0 18 00 mv r3,r14 80117bc: f8 00 00 8e calli 80119f4 <_Protected_heap_Resize_block> 80117c0: b8 20 68 00 mv r13,r1 80117c4: 44 20 00 23 be r1,r0,8011850 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 80117c8: b9 60 08 00 mv r1,r11 80117cc: 2b 9d 00 04 lw ra,(sp+4) 80117d0: 2b 8b 00 18 lw r11,(sp+24) 80117d4: 2b 8c 00 14 lw r12,(sp+20) 80117d8: 2b 8d 00 10 lw r13,(sp+16) 80117dc: 2b 8e 00 0c lw r14,(sp+12) 80117e0: 2b 8f 00 08 lw r15,(sp+8) 80117e4: 37 9c 00 1c addi sp,sp,28 80117e8: c3 a0 00 00 ret */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 80117ec: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80117f0: fb ff bf 57 calli 800154c <== NOT EXECUTED return (void *) 0; 80117f4: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 80117f8: e3 ff ff f4 bi 80117c8 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 80117fc: fb ff e8 aa calli 800baa4 <__errno> 8011800: 34 02 00 16 mvi r2,22 8011804: 58 22 00 00 sw (r1+0),r2 return (void *) 0; 8011808: 34 0b 00 00 mvi r11,0 801180c: e3 ff ff ef bi 80117c8 /* * 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) 8011810: 78 01 08 01 mvhi r1,0x801 8011814: 38 21 38 1c ori r1,r1,0x381c 8011818: 28 21 00 00 lw r1,(r1+0) 801181c: 44 20 00 03 be r1,r0,8011828 <== ALWAYS TAKEN new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 8011820: 34 0b 00 00 mvi r11,0 8011824: e3 ff ff e9 bi 80117c8 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 8011828: 78 02 08 01 mvhi r2,0x801 801182c: 38 42 39 e8 ori r2,r2,0x39e8 8011830: 28 42 00 08 lw r2,(r2+8) 8011834: 44 41 ff d6 be r2,r1,801178c <== ALWAYS TAKEN new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 8011838: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 801183c: e3 ff ff e3 bi 80117c8 <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 8011840: b9 c0 08 00 mv r1,r14 8011844: fb ff c0 43 calli 8001950 8011848: b8 20 58 00 mv r11,r1 801184c: e3 ff ff df bi 80117c8 * 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 ); 8011850: b9 c0 08 00 mv r1,r14 8011854: fb ff c0 3f calli 8001950 8011858: b8 20 78 00 mv r15,r1 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 801185c: 29 81 00 04 lw r1,(r12+4) 8011860: 34 21 ff ff addi r1,r1,-1 8011864: 59 81 00 04 sw (r12+4),r1 if ( !new_area ) { 8011868: 45 ed ff ee be r15,r13,8011820 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 801186c: 2b 81 00 1c lw r1,(sp+28) 8011870: b9 c0 18 00 mv r3,r14 8011874: 50 2e 00 02 bgeu r1,r14,801187c <== NEVER TAKEN 8011878: b8 20 18 00 mv r3,r1 801187c: b9 60 10 00 mv r2,r11 8011880: b9 e0 08 00 mv r1,r15 8011884: fb ff eb 3e calli 800c57c free( ptr ); 8011888: b9 60 08 00 mv r1,r11 801188c: fb ff bf 30 calli 800154c return new_area; 8011890: b9 e0 58 00 mv r11,r15 8011894: e3 ff ff cd bi 80117c8 =============================================================================== 08003a5c : #include int rmdir( const char *pathname ) { 8003a5c: 37 9c ff bc addi sp,sp,-68 8003a60: 5b 8b 00 18 sw (sp+24),r11 8003a64: 5b 8c 00 14 sw (sp+20),r12 8003a68: 5b 8d 00 10 sw (sp+16),r13 8003a6c: 5b 8e 00 0c sw (sp+12),r14 8003a70: 5b 8f 00 08 sw (sp+8),r15 8003a74: 5b 9d 00 04 sw (sp+4),ra 8003a78: b8 20 68 00 mv r13,r1 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 8003a7c: fb ff f9 fa calli 8002264 if ( parentpathlen == 0 ) 8003a80: 5c 20 00 4a bne r1,r0,8003ba8 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 8003a84: 37 8c 00 30 addi r12,sp,48 8003a88: b9 a0 08 00 mv r1,r13 8003a8c: 37 82 00 44 addi r2,sp,68 8003a90: b9 80 18 00 mv r3,r12 8003a94: f8 00 00 51 calli 8003bd8 8003a98: 34 0b 00 00 mvi r11,0 const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 8003a9c: 34 0f 00 00 mvi r15,0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 8003aa0: 2b 82 00 30 lw r2,(sp+48) name = pathname + parentpathlen; 8003aa4: b5 ab 58 00 add r11,r13,r11 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8003aa8: b9 60 08 00 mv r1,r11 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 8003aac: 5b 82 00 1c sw (sp+28),r2 8003ab0: 2b 82 00 34 lw r2,(sp+52) 8003ab4: 5b 82 00 20 sw (sp+32),r2 8003ab8: 2b 82 00 38 lw r2,(sp+56) 8003abc: 5b 82 00 24 sw (sp+36),r2 8003ac0: 2b 82 00 3c lw r2,(sp+60) 8003ac4: 5b 82 00 28 sw (sp+40),r2 8003ac8: 2b 82 00 40 lw r2,(sp+64) 8003acc: 5b 82 00 2c sw (sp+44),r2 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8003ad0: f8 00 28 6f calli 800dc8c 8003ad4: b8 20 10 00 mv r2,r1 8003ad8: b9 60 08 00 mv r1,r11 8003adc: fb ff f9 f7 calli 80022b8 8003ae0: b5 61 68 00 add r13,r11,r1 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8003ae4: b9 a0 08 00 mv r1,r13 8003ae8: f8 00 28 69 calli 800dc8c 8003aec: 37 8b 00 1c addi r11,sp,28 8003af0: b8 20 10 00 mv r2,r1 8003af4: 34 03 00 00 mvi r3,0 8003af8: b9 a0 08 00 mv r1,r13 8003afc: b9 60 20 00 mv r4,r11 8003b00: 34 05 00 00 mvi r5,0 8003b04: fb ff f9 82 calli 800210c 0, &loc, false ); if ( result != 0 ) { 8003b08: 5c 20 00 19 bne r1,r0,8003b6c } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 8003b0c: 2b 82 00 28 lw r2,(sp+40) 8003b10: b9 60 08 00 mv r1,r11 8003b14: 28 42 00 10 lw r2,(r2+16) 8003b18: d8 40 00 00 call r2 8003b1c: 34 02 00 01 mvi r2,1 8003b20: 5c 22 00 18 bne r1,r2,8003b80 /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 8003b24: 2b 83 00 24 lw r3,(sp+36) 8003b28: b9 80 08 00 mv r1,r12 8003b2c: b9 60 10 00 mv r2,r11 8003b30: 28 63 00 34 lw r3,(r3+52) 8003b34: d8 60 00 00 call r3 8003b38: b8 20 70 00 mv r14,r1 rtems_filesystem_freenode( &loc ); 8003b3c: b9 60 08 00 mv r1,r11 8003b40: fb ff fa b7 calli 800261c if ( free_parentloc ) 8003b44: 5d e0 00 0c bne r15,r0,8003b74 rtems_filesystem_freenode( &parentloc ); return result; } 8003b48: b9 c0 08 00 mv r1,r14 8003b4c: 2b 9d 00 04 lw ra,(sp+4) 8003b50: 2b 8b 00 18 lw r11,(sp+24) 8003b54: 2b 8c 00 14 lw r12,(sp+20) 8003b58: 2b 8d 00 10 lw r13,(sp+16) 8003b5c: 2b 8e 00 0c lw r14,(sp+12) 8003b60: 2b 8f 00 08 lw r15,(sp+8) 8003b64: 37 9c 00 44 addi sp,sp,68 8003b68: c3 a0 00 00 ret result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; 8003b6c: 34 0e ff ff mvi r14,-1 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 ) 8003b70: 45 e0 ff f6 be r15,r0,8003b48 <== ALWAYS TAKEN result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 8003b74: b9 80 08 00 mv r1,r12 8003b78: fb ff fa a9 calli 800261c 8003b7c: e3 ff ff f3 bi 8003b48 /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 8003b80: b9 60 08 00 mv r1,r11 8003b84: fb ff fa a6 calli 800261c if ( free_parentloc ) 8003b88: 45 e0 00 03 be r15,r0,8003b94 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 8003b8c: b9 80 08 00 mv r1,r12 8003b90: fb ff fa a3 calli 800261c rtems_set_errno_and_return_minus_one( ENOTDIR ); 8003b94: f8 00 23 d2 calli 800cadc <__errno> 8003b98: 34 02 00 14 mvi r2,20 8003b9c: 58 22 00 00 sw (r1+0),r2 8003ba0: 34 0e ff ff mvi r14,-1 8003ba4: e3 ff ff e9 bi 8003b48 parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 8003ba8: b8 20 58 00 mv r11,r1 8003bac: 37 8c 00 30 addi r12,sp,48 8003bb0: b9 a0 08 00 mv r1,r13 8003bb4: b9 60 10 00 mv r2,r11 8003bb8: 34 03 00 02 mvi r3,2 8003bbc: b9 80 20 00 mv r4,r12 8003bc0: 34 05 00 00 mvi r5,0 8003bc4: fb ff f9 81 calli 80021c8 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) return -1; 8003bc8: 34 0e ff ff mvi r14,-1 else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 8003bcc: 5c 20 ff df bne r1,r0,8003b48 <== NEVER TAKEN return -1; free_parentloc = true; 8003bd0: 34 0f 00 01 mvi r15,1 8003bd4: e3 ff ff b3 bi 8003aa0 =============================================================================== 0800b3c0 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 800b3c0: 37 9c ff e8 addi sp,sp,-24 800b3c4: 5b 8b 00 18 sw (sp+24),r11 800b3c8: 5b 8c 00 14 sw (sp+20),r12 800b3cc: 5b 8d 00 10 sw (sp+16),r13 800b3d0: 5b 8e 00 0c sw (sp+12),r14 800b3d4: 5b 8f 00 08 sw (sp+8),r15 800b3d8: 5b 9d 00 04 sw (sp+4),ra 800b3dc: 34 0c 00 20 mvi r12,32 800b3e0: b8 20 78 00 mv r15,r1 800b3e4: b8 40 68 00 mv r13,r2 uint32_t b; uint32_t local_value = 0; 800b3e8: 34 0e 00 00 mvi r14,0 for (b = 1; b; b <<= 1) { 800b3ec: 34 0b 00 01 mvi r11,1 800b3f0: e0 00 00 03 bi 800b3fc 800b3f4: b5 6b 58 00 add r11,r11,r11 800b3f8: 45 80 00 0a be r12,r0,800b420 if (b & remote_value) 800b3fc: a1 6d 18 00 and r3,r11,r13 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 800b400: 35 8c ff ff addi r12,r12,-1 if (b & remote_value) 800b404: 44 60 ff fc be r3,r0,800b3f4 local_value |= rtems_assoc_local_by_remote(ap, b); 800b408: b9 60 10 00 mv r2,r11 800b40c: b9 e0 08 00 mv r1,r15 800b410: f8 00 00 0d calli 800b444 800b414: b9 c1 70 00 or r14,r14,r1 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 800b418: b5 6b 58 00 add r11,r11,r11 800b41c: 5d 80 ff f8 bne r12,r0,800b3fc <== ALWAYS TAKEN if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 800b420: b9 c0 08 00 mv r1,r14 800b424: 2b 9d 00 04 lw ra,(sp+4) 800b428: 2b 8b 00 18 lw r11,(sp+24) 800b42c: 2b 8c 00 14 lw r12,(sp+20) 800b430: 2b 8d 00 10 lw r13,(sp+16) 800b434: 2b 8e 00 0c lw r14,(sp+12) 800b438: 2b 8f 00 08 lw r15,(sp+8) 800b43c: 37 9c 00 18 addi sp,sp,24 800b440: c3 a0 00 00 ret =============================================================================== 0800f440 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 800f440: 37 9c ff f4 addi sp,sp,-12 800f444: 5b 8b 00 0c sw (sp+12),r11 800f448: 5b 8c 00 08 sw (sp+8),r12 800f44c: 5b 9d 00 04 sw (sp+4),ra 800f450: b8 20 58 00 mv r11,r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800f454: 28 21 00 00 lw r1,(r1+0) const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 800f458: b8 40 60 00 mv r12,r2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800f45c: 44 20 00 1f be r1,r0,800f4d8 <== NEVER TAKEN 800f460: 78 02 08 02 mvhi r2,0x802 800f464: 38 42 61 50 ori r2,r2,0x6150 800f468: f8 00 13 11 calli 80140ac const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; 800f46c: 34 02 00 00 mvi r2,0 if (rtems_assoc_is_default(ap)) 800f470: 5c 20 00 0b bne r1,r0,800f49c default_ap = ap++; for ( ; ap->name; ap++) 800f474: 29 63 00 0c lw r3,(r11+12) ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 800f478: 35 61 00 0c addi r1,r11,12 for ( ; ap->name; ap++) 800f47c: 44 62 00 0a be r3,r2,800f4a4 <== NEVER TAKEN 800f480: b9 60 10 00 mv r2,r11 800f484: b8 20 58 00 mv r11,r1 if (ap->local_value == local_value) 800f488: 29 61 00 04 lw r1,(r11+4) 800f48c: 44 2c 00 06 be r1,r12,800f4a4 <== NEVER TAKEN const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800f490: 35 6b 00 0c addi r11,r11,12 800f494: 29 61 00 00 lw r1,(r11+0) 800f498: 44 20 00 09 be r1,r0,800f4bc if (ap->local_value == local_value) 800f49c: 29 61 00 04 lw r1,(r11+4) 800f4a0: 5c 2c ff fc bne r1,r12,800f490 return ap; return default_ap; } 800f4a4: b9 60 08 00 mv r1,r11 800f4a8: 2b 9d 00 04 lw ra,(sp+4) 800f4ac: 2b 8b 00 0c lw r11,(sp+12) 800f4b0: 2b 8c 00 08 lw r12,(sp+8) 800f4b4: 37 9c 00 0c addi sp,sp,12 800f4b8: c3 a0 00 00 ret const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800f4bc: b8 40 58 00 mv r11,r2 if (ap->local_value == local_value) return ap; return default_ap; } 800f4c0: b9 60 08 00 mv r1,r11 800f4c4: 2b 9d 00 04 lw ra,(sp+4) 800f4c8: 2b 8b 00 0c lw r11,(sp+12) 800f4cc: 2b 8c 00 08 lw r12,(sp+8) 800f4d0: 37 9c 00 0c addi sp,sp,12 800f4d4: c3 a0 00 00 ret const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; 800f4d8: 34 0b 00 00 mvi r11,0 for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 800f4dc: b9 60 08 00 mv r1,r11 800f4e0: 2b 9d 00 04 lw ra,(sp+4) 800f4e4: 2b 8b 00 0c lw r11,(sp+12) 800f4e8: 2b 8c 00 08 lw r12,(sp+8) 800f4ec: 37 9c 00 0c addi sp,sp,12 800f4f0: c3 a0 00 00 ret =============================================================================== 08002094 : const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { 8002094: 37 9c ff ec addi sp,sp,-20 8002098: 5b 8b 00 14 sw (sp+20),r11 800209c: 5b 8c 00 10 sw (sp+16),r12 80020a0: 5b 8d 00 0c sw (sp+12),r13 80020a4: 5b 8e 00 08 sw (sp+8),r14 80020a8: 5b 9d 00 04 sw (sp+4),ra const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 80020ac: 28 2b 00 00 lw r11,(r1+0) const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { 80020b0: b8 20 60 00 mv r12,r1 80020b4: b8 40 68 00 mv r13,r2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 80020b8: 45 60 00 28 be r11,r0,8002158 80020bc: 78 02 08 01 mvhi r2,0x801 80020c0: b9 60 08 00 mv r1,r11 80020c4: 38 42 33 70 ori r2,r2,0x3370 80020c8: f8 00 2d f0 calli 800d888 const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { const rtems_assoc_t *default_ap = 0; 80020cc: 34 0e 00 00 mvi r14,0 if (rtems_assoc_is_default(ap)) 80020d0: 5c 20 00 0d bne r1,r0,8002104 default_ap = ap++; for ( ; ap->name; ap++) 80020d4: 29 8b 00 0c lw r11,(r12+12) ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 80020d8: 35 81 00 0c addi r1,r12,12 for ( ; ap->name; ap++) 80020dc: 45 6e 00 0e be r11,r14,8002114 <== NEVER TAKEN 80020e0: b9 80 70 00 mv r14,r12 if (strcmp(ap->name, name) == 0) 80020e4: b9 a0 10 00 mv r2,r13 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 80020e8: b8 20 60 00 mv r12,r1 if (strcmp(ap->name, name) == 0) 80020ec: b9 60 08 00 mv r1,r11 80020f0: f8 00 2d e6 calli 800d888 80020f4: 44 20 00 08 be r1,r0,8002114 <== NEVER TAKEN const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 80020f8: 35 8c 00 0c addi r12,r12,12 80020fc: 29 8b 00 00 lw r11,(r12+0) 8002100: 45 60 00 0d be r11,r0,8002134 if (strcmp(ap->name, name) == 0) 8002104: b9 60 08 00 mv r1,r11 8002108: b9 a0 10 00 mv r2,r13 800210c: f8 00 2d df calli 800d888 8002110: 5c 20 ff fa bne r1,r0,80020f8 return ap; return default_ap; } 8002114: b9 80 08 00 mv r1,r12 8002118: 2b 9d 00 04 lw ra,(sp+4) 800211c: 2b 8b 00 14 lw r11,(sp+20) 8002120: 2b 8c 00 10 lw r12,(sp+16) 8002124: 2b 8d 00 0c lw r13,(sp+12) 8002128: 2b 8e 00 08 lw r14,(sp+8) 800212c: 37 9c 00 14 addi sp,sp,20 8002130: c3 a0 00 00 ret const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 8002134: b9 c0 60 00 mv r12,r14 if (strcmp(ap->name, name) == 0) return ap; return default_ap; } 8002138: b9 80 08 00 mv r1,r12 800213c: 2b 9d 00 04 lw ra,(sp+4) 8002140: 2b 8b 00 14 lw r11,(sp+20) 8002144: 2b 8c 00 10 lw r12,(sp+16) 8002148: 2b 8d 00 0c lw r13,(sp+12) 800214c: 2b 8e 00 08 lw r14,(sp+8) 8002150: 37 9c 00 14 addi sp,sp,20 8002154: c3 a0 00 00 ret const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { const rtems_assoc_t *default_ap = 0; 8002158: 34 0c 00 00 mvi r12,0 for ( ; ap->name; ap++) if (strcmp(ap->name, name) == 0) return ap; return default_ap; } 800215c: b9 80 08 00 mv r1,r12 8002160: 2b 9d 00 04 lw ra,(sp+4) 8002164: 2b 8b 00 14 lw r11,(sp+20) 8002168: 2b 8c 00 10 lw r12,(sp+16) 800216c: 2b 8d 00 0c lw r13,(sp+12) 8002170: 2b 8e 00 08 lw r14,(sp+8) 8002174: 37 9c 00 14 addi sp,sp,20 8002178: c3 a0 00 00 ret =============================================================================== 0800b46c : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 800b46c: 37 9c ff f4 addi sp,sp,-12 800b470: 5b 8b 00 0c sw (sp+12),r11 800b474: 5b 8c 00 08 sw (sp+8),r12 800b478: 5b 9d 00 04 sw (sp+4),ra 800b47c: b8 20 58 00 mv r11,r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800b480: 28 21 00 00 lw r1,(r1+0) const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 800b484: b8 40 60 00 mv r12,r2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800b488: 44 20 00 1f be r1,r0,800b504 800b48c: 78 02 08 01 mvhi r2,0x801 800b490: 38 42 25 e8 ori r2,r2,0x25e8 800b494: f8 00 05 b9 calli 800cb78 const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; 800b498: 34 02 00 00 mvi r2,0 if (rtems_assoc_is_default(ap)) 800b49c: 5c 20 00 0b bne r1,r0,800b4c8 default_ap = ap++; for ( ; ap->name; ap++) 800b4a0: 29 63 00 0c lw r3,(r11+12) ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 800b4a4: 35 61 00 0c addi r1,r11,12 for ( ; ap->name; ap++) 800b4a8: 44 62 00 0a be r3,r2,800b4d0 <== NEVER TAKEN 800b4ac: b9 60 10 00 mv r2,r11 800b4b0: b8 20 58 00 mv r11,r1 if (ap->remote_value == remote_value) 800b4b4: 29 61 00 08 lw r1,(r11+8) 800b4b8: 44 2c 00 06 be r1,r12,800b4d0 <== NEVER TAKEN const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800b4bc: 35 6b 00 0c addi r11,r11,12 800b4c0: 29 61 00 00 lw r1,(r11+0) 800b4c4: 44 20 00 09 be r1,r0,800b4e8 if (ap->remote_value == remote_value) 800b4c8: 29 61 00 08 lw r1,(r11+8) 800b4cc: 5c 2c ff fc bne r1,r12,800b4bc return ap; return default_ap; } 800b4d0: b9 60 08 00 mv r1,r11 800b4d4: 2b 9d 00 04 lw ra,(sp+4) 800b4d8: 2b 8b 00 0c lw r11,(sp+12) 800b4dc: 2b 8c 00 08 lw r12,(sp+8) 800b4e0: 37 9c 00 0c addi sp,sp,12 800b4e4: c3 a0 00 00 ret const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800b4e8: b8 40 58 00 mv r11,r2 if (ap->remote_value == remote_value) return ap; return default_ap; } 800b4ec: b9 60 08 00 mv r1,r11 800b4f0: 2b 9d 00 04 lw ra,(sp+4) 800b4f4: 2b 8b 00 0c lw r11,(sp+12) 800b4f8: 2b 8c 00 08 lw r12,(sp+8) 800b4fc: 37 9c 00 0c addi sp,sp,12 800b500: c3 a0 00 00 ret const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; 800b504: 34 0b 00 00 mvi r11,0 for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 800b508: b9 60 08 00 mv r1,r11 800b50c: 2b 9d 00 04 lw ra,(sp+4) 800b510: 2b 8b 00 0c lw r11,(sp+12) 800b514: 2b 8c 00 08 lw r12,(sp+8) 800b518: 37 9c 00 0c addi sp,sp,12 800b51c: c3 a0 00 00 ret =============================================================================== 08002230 : uint32_t rtems_assoc_remote_by_local_bitfield( const rtems_assoc_t *ap, uint32_t local_value ) { 8002230: 37 9c ff e8 addi sp,sp,-24 8002234: 5b 8b 00 18 sw (sp+24),r11 8002238: 5b 8c 00 14 sw (sp+20),r12 800223c: 5b 8d 00 10 sw (sp+16),r13 8002240: 5b 8e 00 0c sw (sp+12),r14 8002244: 5b 8f 00 08 sw (sp+8),r15 8002248: 5b 9d 00 04 sw (sp+4),ra 800224c: 34 0c 00 20 mvi r12,32 8002250: b8 20 78 00 mv r15,r1 8002254: b8 40 68 00 mv r13,r2 uint32_t b; uint32_t remote_value = 0; 8002258: 34 0e 00 00 mvi r14,0 for (b = 1; b; b <<= 1) 800225c: 34 0b 00 01 mvi r11,1 8002260: e0 00 00 03 bi 800226c 8002264: b5 6b 58 00 add r11,r11,r11 8002268: 45 80 00 0a be r12,r0,8002290 if (b & local_value) 800226c: a1 6d 18 00 and r3,r11,r13 ) { uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) 8002270: 35 8c ff ff addi r12,r12,-1 if (b & local_value) 8002274: 44 60 ff fc be r3,r0,8002264 remote_value |= rtems_assoc_remote_by_local(ap, b); 8002278: b9 60 10 00 mv r2,r11 800227c: b9 e0 08 00 mv r1,r15 8002280: f8 00 00 0d calli 80022b4 8002284: b9 c1 70 00 or r14,r14,r1 ) { uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) 8002288: b5 6b 58 00 add r11,r11,r11 800228c: 5d 80 ff f8 bne r12,r0,800226c <== ALWAYS TAKEN if (b & local_value) remote_value |= rtems_assoc_remote_by_local(ap, b); return remote_value; } 8002290: b9 c0 08 00 mv r1,r14 8002294: 2b 9d 00 04 lw ra,(sp+4) 8002298: 2b 8b 00 18 lw r11,(sp+24) 800229c: 2b 8c 00 14 lw r12,(sp+20) 80022a0: 2b 8d 00 10 lw r13,(sp+16) 80022a4: 2b 8e 00 0c lw r14,(sp+12) 80022a8: 2b 8f 00 08 lw r15,(sp+8) 80022ac: 37 9c 00 18 addi sp,sp,24 80022b0: c3 a0 00 00 ret =============================================================================== 0800b560 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 800b560: 37 9c ff e0 addi sp,sp,-32 800b564: 5b 8b 00 18 sw (sp+24),r11 800b568: 5b 8c 00 14 sw (sp+20),r12 800b56c: 5b 8d 00 10 sw (sp+16),r13 800b570: 5b 8e 00 0c sw (sp+12),r14 800b574: 5b 8f 00 08 sw (sp+8),r15 800b578: 5b 9d 00 04 sw (sp+4),ra 800b57c: b8 20 68 00 mv r13,r1 800b580: b8 40 70 00 mv r14,r2 800b584: b8 80 78 00 mv r15,r4 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 800b588: 34 01 00 03 mvi r1,3 ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 800b58c: 45 a0 00 23 be r13,r0,800b618 <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 800b590: 34 01 00 09 mvi r1,9 CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 800b594: 44 80 00 21 be r4,r0,800b618 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_barrier_automatic( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_BARRIER_AUTOMATIC_RELEASE ) ? true : false; 800b598: 20 41 00 10 andi r1,r2,0x10 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 800b59c: 44 20 00 27 be r1,r0,800b638 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 800b5a0: 5b 80 00 1c sw (sp+28),r0 if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; 800b5a4: 34 01 00 0a mvi r1,10 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 800b5a8: 44 60 00 1c be r3,r0,800b618 <== NEVER TAKEN 800b5ac: 78 05 08 01 mvhi r5,0x801 800b5b0: 38 a5 e8 04 ori r5,r5,0xe804 800b5b4: 28 a1 00 00 lw r1,(r5+0) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 800b5b8: 5b 83 00 20 sw (sp+32),r3 800b5bc: 34 21 00 01 addi r1,r1,1 800b5c0: 58 a1 00 00 sw (r5+0),r1 * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 800b5c4: 78 0c 08 01 mvhi r12,0x801 800b5c8: 39 8c e9 f4 ori r12,r12,0xe9f4 800b5cc: b9 80 08 00 mv r1,r12 800b5d0: fb ff ea 4d calli 8005f04 <_Objects_Allocate> 800b5d4: b8 20 58 00 mv r11,r1 _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 800b5d8: 44 20 00 1b be r1,r0,800b644 return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 800b5dc: 34 21 00 14 addi r1,r1,20 800b5e0: 37 82 00 1c addi r2,sp,28 if ( !the_barrier ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 800b5e4: 59 6e 00 10 sw (r11+16),r14 _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 800b5e8: f8 00 03 01 calli 800c1ec <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 800b5ec: 29 61 00 08 lw r1,(r11+8) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 800b5f0: 29 83 00 1c lw r3,(r12+28) Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 800b5f4: 20 22 ff ff andi r2,r1,0xffff #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 800b5f8: b4 42 10 00 add r2,r2,r2 800b5fc: b4 42 10 00 add r2,r2,r2 800b600: b4 62 10 00 add r2,r3,r2 800b604: 58 4b 00 00 sw (r2+0),r11 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 800b608: 59 6d 00 0c sw (r11+12),r13 &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 800b60c: 59 e1 00 00 sw (r15+0),r1 _Thread_Enable_dispatch(); 800b610: fb ff ed d0 calli 8006d50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 800b614: 34 01 00 00 mvi r1,0 } 800b618: 2b 9d 00 04 lw ra,(sp+4) 800b61c: 2b 8b 00 18 lw r11,(sp+24) 800b620: 2b 8c 00 14 lw r12,(sp+20) 800b624: 2b 8d 00 10 lw r13,(sp+16) 800b628: 2b 8e 00 0c lw r14,(sp+12) 800b62c: 2b 8f 00 08 lw r15,(sp+8) 800b630: 37 9c 00 20 addi sp,sp,32 800b634: c3 a0 00 00 ret if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 800b638: 34 01 00 01 mvi r1,1 800b63c: 5b 81 00 1c sw (sp+28),r1 800b640: e3 ff ff db bi 800b5ac _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 800b644: fb ff ed c3 calli 8006d50 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 800b648: 34 01 00 05 mvi r1,5 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 800b64c: 2b 9d 00 04 lw ra,(sp+4) 800b650: 2b 8b 00 18 lw r11,(sp+24) 800b654: 2b 8c 00 14 lw r12,(sp+20) 800b658: 2b 8d 00 10 lw r13,(sp+16) 800b65c: 2b 8e 00 0c lw r14,(sp+12) 800b660: 2b 8f 00 08 lw r15,(sp+8) 800b664: 37 9c 00 20 addi sp,sp,32 800b668: c3 a0 00 00 ret =============================================================================== 08000cec : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 8000cec: 37 9c ff f4 addi sp,sp,-12 8000cf0: 5b 9d 00 04 sw (sp+4),ra const char *p; if ( !name ) 8000cf4: 5c 20 00 06 bne r1,r0,8000d0c value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); if ( !p ) return NULL; 8000cf8: 34 02 00 00 mvi r2,0 copy_string( p, value, length ); return value; } 8000cfc: b8 40 08 00 mv r1,r2 8000d00: 2b 9d 00 04 lw ra,(sp+4) 8000d04: 37 9c 00 0c addi sp,sp,12 8000d08: c3 a0 00 00 ret const char *p; if ( !name ) return NULL; if ( !value ) 8000d0c: 44 40 ff fc be r2,r0,8000cfc return NULL; if ( !length ) 8000d10: 44 60 ff fa be r3,r0,8000cf8 return NULL; value[0] = '\0'; 8000d14: 30 40 00 00 sb (r2+0),r0 p = rtems_bsp_cmdline_get_param_raw( name ); 8000d18: 5b 82 00 0c sw (sp+12),r2 8000d1c: 5b 83 00 08 sw (sp+8),r3 8000d20: f8 00 00 1e calli 8000d98 if ( !p ) 8000d24: 2b 82 00 0c lw r2,(sp+12) 8000d28: 2b 83 00 08 lw r3,(sp+8) 8000d2c: 44 20 ff f3 be r1,r0,8000cf8 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<== NEVER TAKEN 8000d38: 34 63 ff ff addi r3,r3,-1 8000d3c: 44 60 ff f0 be r3,r0,8000cfc <== NEVER TAKEN 8000d40: 34 07 00 00 mvi r7,0 8000d44: 34 04 00 00 mvi r4,0 8000d48: 34 06 00 00 mvi r6,0 if ( *p == '\"' ) { 8000d4c: 34 09 00 22 mvi r9,34 quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 8000d50: 34 0a 00 20 mvi r10,32 8000d54: 20 c8 00 01 andi r8,r6,0x1 int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 8000d5c: 5d 00 00 02 bne r8,r0,8000d64 8000d60: 44 aa ff e7 be r5,r10,8000cfc break; value[i++] = *p++; 8000d64: 34 84 00 01 addi r4,r4,1 8000d68: b4 47 38 00 add r7,r2,r7 8000d6c: 30 e5 00 00 sb (r7+0),r5 value[i] = '\0'; } } const char *rtems_bsp_cmdline_get_param( 8000d70: b4 44 28 00 add r5,r2,r4 if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) break; value[i++] = *p++; value[i] = '\0'; 8000d74: 30 a0 00 00 sb (r5+0),r0 } } const char *rtems_bsp_cmdline_get_param( 8000d78: b4 24 28 00 add r5,r1,r4 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 8000d88: 54 64 ff f3 bgu r3,r4,8000d54 <== ALWAYS TAKEN 8000d8c: e3 ff ff dc bi 8000cfc <== NOT EXECUTED if ( *p == '\"' ) { quotes++; 8000d90: 34 c6 00 01 addi r6,r6,1 8000d94: e3 ff ff f4 bi 8000d64 =============================================================================== 08000ddc : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 8000ddc: 37 9c ff f0 addi sp,sp,-16 8000de0: 5b 8b 00 10 sw (sp+16),r11 8000de4: 5b 8c 00 0c sw (sp+12),r12 8000de8: 5b 8d 00 08 sw (sp+8),r13 8000dec: 5b 9d 00 04 sw (sp+4),ra 8000df0: b8 20 68 00 mv r13,r1 8000df4: b8 40 58 00 mv r11,r2 const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 8000df8: fb ff ff bd calli 8000cec 8000dfc: b8 20 60 00 mv r12,r1 if ( !p ) 8000e00: 5c 20 00 09 bne r1,r0,8000e24 return NULL; rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; 8000e04: 34 0b 00 00 mvi r11,0 if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; } 8000e08: b9 60 08 00 mv r1,r11 8000e0c: 2b 9d 00 04 lw ra,(sp+4) 8000e10: 2b 8b 00 10 lw r11,(sp+16) 8000e14: 2b 8c 00 0c lw r12,(sp+12) 8000e18: 2b 8d 00 08 lw r13,(sp+8) 8000e1c: 37 9c 00 10 addi sp,sp,16 8000e20: c3 a0 00 00 ret p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 8000e24: b9 a0 08 00 mv r1,r13 8000e28: f8 00 2f 5e calli 800cba0 8000e2c: b5 81 08 00 add r1,r12,r1 if ( *rhs != '=' ) 8000e30: 40 23 00 00 lbu r3,(r1+0) 8000e34: 34 02 00 3d mvi r2,61 8000e38: 5c 62 ff f3 bne r3,r2,8000e04 <== NEVER TAKEN return NULL; rhs++; if ( *rhs == '\"' ) 8000e3c: 40 24 00 01 lbu r4,(r1+1) 8000e40: 34 02 00 22 mvi r2,34 rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; rhs++; 8000e44: 34 25 00 01 addi r5,r1,1 if ( *rhs == '\"' ) 8000e48: 44 82 00 17 be r4,r2,8000ea4 rhs++; for ( d=value ; *rhs ; ) 8000e4c: b9 60 18 00 mv r3,r11 8000e50: 44 80 00 06 be r4,r0,8000e68 *d++ = *rhs++; 8000e54: 30 64 00 00 sb (r3+0),r4 8000e58: 34 a5 00 01 addi r5,r5,1 return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 8000e5c: 40 a4 00 00 lbu r4,(r5+0) *d++ = *rhs++; 8000e60: 34 63 00 01 addi r3,r3,1 return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 8000e64: 5c 80 ff fc bne r4,r0,8000e54 *d++ = *rhs++; if ( *(d-1) == '\"' ) 8000e68: 40 62 ff ff lbu r2,(r3+-1) 8000e6c: 34 01 00 22 mvi r1,34 8000e70: 34 64 ff ff addi r4,r3,-1 8000e74: 44 41 00 09 be r2,r1,8000e98 d--; *d = '\0'; 8000e78: 30 60 00 00 sb (r3+0),r0 return value; } 8000e7c: b9 60 08 00 mv r1,r11 8000e80: 2b 9d 00 04 lw ra,(sp+4) 8000e84: 2b 8b 00 10 lw r11,(sp+16) 8000e88: 2b 8c 00 0c lw r12,(sp+12) 8000e8c: 2b 8d 00 08 lw r13,(sp+8) 8000e90: 37 9c 00 10 addi sp,sp,16 8000e94: c3 a0 00 00 ret rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) *d++ = *rhs++; if ( *(d-1) == '\"' ) 8000e98: b8 80 18 00 mv r3,r4 d--; *d = '\0'; 8000e9c: 30 60 00 00 sb (r3+0),r0 8000ea0: e3 ff ff f7 bi 8000e7c if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 8000ea4: 40 24 00 02 lbu r4,(r1+2) 8000ea8: 34 25 00 02 addi r5,r1,2 8000eac: e3 ff ff e8 bi 8000e4c =============================================================================== 080103f8 : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 80103f8: b8 20 18 00 mv r3,r1 if ( !routine ) return RTEMS_INVALID_ADDRESS; 80103fc: 34 01 00 09 mvi r1,9 */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) 8010400: 44 60 00 05 be r3,r0,8010414 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 8010404: 78 02 08 03 mvhi r2,0x803 <== NOT EXECUTED 8010408: 38 42 ed b0 ori r2,r2,0xedb0 <== NOT EXECUTED 801040c: 58 43 00 00 sw (r2+0),r3 <== NOT EXECUTED return RTEMS_SUCCESSFUL; 8010410: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 8010414: c3 a0 00 00 ret =============================================================================== 08001944 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 8001944: 37 9c ff 84 addi sp,sp,-124 8001948: 5b 8b 00 44 sw (sp+68),r11 800194c: 5b 8c 00 40 sw (sp+64),r12 8001950: 5b 8d 00 3c sw (sp+60),r13 8001954: 5b 8e 00 38 sw (sp+56),r14 8001958: 5b 8f 00 34 sw (sp+52),r15 800195c: 5b 90 00 30 sw (sp+48),r16 8001960: 5b 91 00 2c sw (sp+44),r17 8001964: 5b 92 00 28 sw (sp+40),r18 8001968: 5b 93 00 24 sw (sp+36),r19 800196c: 5b 94 00 20 sw (sp+32),r20 8001970: 5b 95 00 1c sw (sp+28),r21 8001974: 5b 96 00 18 sw (sp+24),r22 8001978: 5b 97 00 14 sw (sp+20),r23 800197c: 5b 98 00 10 sw (sp+16),r24 8001980: 5b 99 00 0c sw (sp+12),r25 8001984: 5b 9b 00 08 sw (sp+8),fp 8001988: 5b 9d 00 04 sw (sp+4),ra 800198c: b8 40 78 00 mv r15,r2 8001990: b8 20 80 00 mv r16,r1 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 8001994: 44 40 00 59 be r2,r0,8001af8 <== NEVER TAKEN * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 8001998: 37 9b 00 70 addi fp,sp,112 800199c: bb 60 08 00 mv r1,fp 80019a0: f8 00 10 84 calli 8005bb0 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 80019a4: 37 97 00 68 addi r23,sp,104 80019a8: 78 01 08 02 mvhi r1,0x802 80019ac: 38 21 88 54 ori r1,r1,0x8854 80019b0: bb 60 10 00 mv r2,fp 80019b4: ba e0 18 00 mv r3,r23 80019b8: f8 00 1d 07 calli 8008dd4 <_Timespec_Subtract> } } } #endif (*print)( 80019bc: 78 02 08 01 mvhi r2,0x801 80019c0: ba 00 08 00 mv r1,r16 80019c4: 38 42 d8 50 ori r2,r2,0xd850 80019c8: 78 16 08 02 mvhi r22,0x802 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 80019cc: 78 15 08 01 mvhi r21,0x801 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 80019d0: 78 11 08 02 mvhi r17,0x802 /* * Print the information */ (*print)( context, 80019d4: 78 14 08 01 mvhi r20,0x801 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 80019d8: 78 19 08 02 mvhi r25,0x802 } } } #endif (*print)( 80019dc: d9 e0 00 00 call r15 80019e0: 3a d6 85 c4 ori r22,r22,0x85c4 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 80019e4: 37 93 00 48 addi r19,sp,72 (*print)( 80019e8: 3a b5 d9 c4 ori r21,r21,0xd9c4 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 80019ec: 3a 31 88 30 ori r17,r17,0x8830 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 80019f0: 37 98 00 78 addi r24,sp,120 /* * Print the information */ (*print)( context, 80019f4: 3a 94 d9 d8 ori r20,r20,0xd9d8 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 80019f8: 3b 39 86 d4 ori r25,r25,0x86d4 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 80019fc: 2a c4 00 00 lw r4,(r22+0) 8001a00: 44 80 00 30 be r4,r0,8001ac0 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 8001a04: 28 8e 00 04 lw r14,(r4+4) if ( information ) { 8001a08: 45 c0 00 2e be r14,r0,8001ac0 <== NEVER TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { 8001a0c: 2d c5 00 10 lhu r5,(r14+16) 8001a10: 44 a0 00 2c be r5,r0,8001ac0 <== NEVER TAKEN 8001a14: 34 0d 00 04 mvi r13,4 8001a18: 34 0c 00 01 mvi r12,1 the_thread = (Thread_Control *)information->local_table[ i ]; 8001a1c: 29 c6 00 1c lw r6,(r14+28) if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 8001a20: ba 60 18 00 mv r3,r19 8001a24: 34 02 00 0d mvi r2,13 if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 8001a28: b4 cd 30 00 add r6,r6,r13 8001a2c: 28 cb 00 00 lw r11,(r6+0) api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 8001a30: 35 8c 00 01 addi r12,r12,1 8001a34: 37 92 00 60 addi r18,sp,96 8001a38: 35 ad 00 04 addi r13,r13,4 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 8001a3c: 45 60 00 20 be r11,r0,8001abc <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 8001a40: 29 61 00 08 lw r1,(r11+8) 8001a44: f8 00 0a e5 calli 80045d8 (*print)( 8001a48: 29 63 00 08 lw r3,(r11+8) 8001a4c: ba 60 20 00 mv r4,r19 8001a50: ba 00 08 00 mv r1,r16 8001a54: ba a0 10 00 mv r2,r21 8001a58: d9 e0 00 00 call r15 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 8001a5c: 2a 25 00 0c lw r5,(r17+12) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 8001a60: 29 67 00 84 lw r7,(r11+132) 8001a64: 29 64 00 88 lw r4,(r11+136) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 8001a68: 28 a6 00 08 lw r6,(r5+8) 8001a6c: 29 65 00 08 lw r5,(r11+8) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 8001a70: 5b 87 00 60 sw (sp+96),r7 8001a74: 5b 84 00 64 sw (sp+100),r4 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 8001a78: 44 c5 00 33 be r6,r5,8001b44 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 8001a7c: 37 83 00 7c addi r3,sp,124 8001a80: bb 00 20 00 mv r4,r24 8001a84: ba 40 08 00 mv r1,r18 8001a88: ba e0 10 00 mv r2,r23 8001a8c: f8 00 1b 0b calli 80086b8 <_Timespec_Divide> /* * Print the information */ (*print)( context, 8001a90: 2b 81 00 64 lw r1,(sp+100) 8001a94: 34 02 03 e8 mvi r2,1000 8001a98: f8 00 6b 15 calli 801c6ec <__udivsi3> 8001a9c: 2b 85 00 7c lw r5,(sp+124) 8001aa0: 2b 83 00 60 lw r3,(sp+96) 8001aa4: 2b 86 00 78 lw r6,(sp+120) 8001aa8: b8 20 20 00 mv r4,r1 8001aac: ba 80 10 00 mv r2,r20 8001ab0: ba 00 08 00 mv r1,r16 8001ab4: d9 e0 00 00 call r15 8001ab8: 2d c5 00 10 lhu r5,(r14+16) api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 8001abc: 50 ac ff d8 bgeu r5,r12,8001a1c " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 8001ac0: 78 01 08 02 mvhi r1,0x802 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 8001ac4: 36 d6 00 04 addi r22,r22,4 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 8001ac8: 38 21 85 d0 ori r1,r1,0x85d0 8001acc: 5e c1 ff cc bne r22,r1,80019fc } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 8001ad0: 2b 81 00 6c lw r1,(sp+108) 8001ad4: 34 02 03 e8 mvi r2,1000 8001ad8: 78 0b 08 01 mvhi r11,0x801 8001adc: f8 00 6b 04 calli 801c6ec <__udivsi3> 8001ae0: 2b 83 00 68 lw r3,(sp+104) 8001ae4: 39 6b d9 f0 ori r11,r11,0xd9f0 8001ae8: b8 20 20 00 mv r4,r1 8001aec: b9 60 10 00 mv r2,r11 8001af0: ba 00 08 00 mv r1,r16 8001af4: d9 e0 00 00 call r15 "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 8001af8: 2b 9d 00 04 lw ra,(sp+4) 8001afc: 2b 8b 00 44 lw r11,(sp+68) 8001b00: 2b 8c 00 40 lw r12,(sp+64) 8001b04: 2b 8d 00 3c lw r13,(sp+60) 8001b08: 2b 8e 00 38 lw r14,(sp+56) 8001b0c: 2b 8f 00 34 lw r15,(sp+52) 8001b10: 2b 90 00 30 lw r16,(sp+48) 8001b14: 2b 91 00 2c lw r17,(sp+44) 8001b18: 2b 92 00 28 lw r18,(sp+40) 8001b1c: 2b 93 00 24 lw r19,(sp+36) 8001b20: 2b 94 00 20 lw r20,(sp+32) 8001b24: 2b 95 00 1c lw r21,(sp+28) 8001b28: 2b 96 00 18 lw r22,(sp+24) 8001b2c: 2b 97 00 14 lw r23,(sp+20) 8001b30: 2b 98 00 10 lw r24,(sp+16) 8001b34: 2b 99 00 0c lw r25,(sp+12) 8001b38: 2b 9b 00 08 lw fp,(sp+8) 8001b3c: 37 9c 00 7c addi sp,sp,124 8001b40: c3 a0 00 00 ret * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 8001b44: bb 20 08 00 mv r1,r25 8001b48: bb 60 10 00 mv r2,fp 8001b4c: 37 83 00 58 addi r3,sp,88 8001b50: f8 00 1c a1 calli 8008dd4 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 8001b54: ba 40 08 00 mv r1,r18 8001b58: 37 82 00 58 addi r2,sp,88 8001b5c: f8 00 1a c0 calli 800865c <_Timespec_Add_to> 8001b60: e3 ff ff c7 bi 8001a7c =============================================================================== 0800ba20 : [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { 800ba20: 37 9c ff f8 addi sp,sp,-8 800ba24: 5b 8b 00 08 sw (sp+8),r11 800ba28: 5b 9d 00 04 sw (sp+4),ra if (sc == RTEMS_SUCCESSFUL) { return 0; 800ba2c: 34 02 00 00 mvi r2,0 [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { 800ba30: 5c 20 00 06 bne r1,r0,800ba48 <== NEVER TAKEN errno = eno; return -1; } } 800ba34: b8 40 08 00 mv r1,r2 800ba38: 2b 9d 00 04 lw ra,(sp+4) 800ba3c: 2b 8b 00 08 lw r11,(sp+8) 800ba40: 37 9c 00 08 addi sp,sp,8 800ba44: c3 a0 00 00 ret if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { 800ba48: 34 02 00 1c mvi r2,28 <== NOT EXECUTED int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; 800ba4c: 34 0b 00 16 mvi r11,22 <== NOT EXECUTED if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { 800ba50: 54 22 00 07 bgu r1,r2,800ba6c <== NOT EXECUTED eno = status_code_to_errno [sc]; 800ba54: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 800ba58: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED 800ba5c: 38 42 25 f4 ori r2,r2,0x25f4 <== NOT EXECUTED 800ba60: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED 800ba64: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 800ba68: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED } errno = eno; 800ba6c: f8 00 00 0e calli 800baa4 <__errno> <== NOT EXECUTED 800ba70: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED return -1; 800ba74: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 800ba78: e3 ff ff ef bi 800ba34 <== NOT EXECUTED =============================================================================== 08001460 : } int rtems_filesystem_dirname( const char *pathname ) { 8001460: 37 9c ff f4 addi sp,sp,-12 8001464: 5b 8b 00 0c sw (sp+12),r11 8001468: 5b 8c 00 08 sw (sp+8),r12 800146c: 5b 9d 00 04 sw (sp+4),ra 8001470: b8 20 60 00 mv r12,r1 int len = strlen( pathname ); 8001474: f8 00 2e 38 calli 800cd54 8001478: b8 20 58 00 mv r11,r1 while ( len ) { 800147c: 5c 20 00 03 bne r1,r0,8001488 <== ALWAYS TAKEN 8001480: e0 00 00 07 bi 800149c <== NOT EXECUTED 8001484: 45 61 00 06 be r11,r1,800149c len--; 8001488: 35 6b ff ff addi r11,r11,-1 flags, pathloc, follow_link ); } int rtems_filesystem_dirname( 800148c: b5 8b 10 00 add r2,r12,r11 { int len = strlen( pathname ); while ( len ) { len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 8001490: 40 41 00 00 lbu r1,(r2+0) 8001494: f8 00 04 8e calli 80026cc 8001498: 44 20 ff fb be r1,r0,8001484 break; } return len; } 800149c: b9 60 08 00 mv r1,r11 80014a0: 2b 9d 00 04 lw ra,(sp+4) 80014a4: 2b 8b 00 0c lw r11,(sp+12) 80014a8: 2b 8c 00 08 lw r12,(sp+8) 80014ac: 37 9c 00 0c addi sp,sp,12 80014b0: c3 a0 00 00 ret =============================================================================== 080013c4 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 80013c4: 37 9c ff e4 addi sp,sp,-28 80013c8: 5b 8b 00 10 sw (sp+16),r11 80013cc: 5b 8c 00 0c sw (sp+12),r12 80013d0: 5b 8d 00 08 sw (sp+8),r13 80013d4: 5b 9d 00 04 sw (sp+4),ra int i = 0; 80013d8: 5b 80 00 1c sw (sp+28),r0 size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 80013dc: b8 20 58 00 mv r11,r1 80013e0: b8 40 68 00 mv r13,r2 80013e4: b8 60 60 00 mv r12,r3 /* * Verify Input parameters. */ if ( !pathname ) 80013e8: 44 20 00 19 be r1,r0,800144c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 80013ec: 44 80 00 13 be r4,r0,8001438 <== NEVER TAKEN /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 80013f0: b8 80 18 00 mv r3,r4 80013f4: 37 82 00 1c addi r2,sp,28 80013f8: 5b 84 00 18 sw (sp+24),r4 80013fc: 5b 85 00 14 sw (sp+20),r5 8001400: f8 00 04 83 calli 800260c /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 8001404: 2b 86 00 1c lw r6,(sp+28) 8001408: 2b 84 00 18 lw r4,(sp+24) 800140c: 2b 85 00 14 lw r5,(sp+20) 8001410: b9 80 18 00 mv r3,r12 8001414: b5 66 08 00 add r1,r11,r6 8001418: c9 a6 10 00 sub r2,r13,r6 800141c: fb ff ff bb calli 8001308 pathnamelen - i, flags, pathloc, follow_link ); } 8001420: 2b 9d 00 04 lw ra,(sp+4) 8001424: 2b 8b 00 10 lw r11,(sp+16) 8001428: 2b 8c 00 0c lw r12,(sp+12) 800142c: 2b 8d 00 08 lw r13,(sp+8) 8001430: 37 9c 00 1c addi sp,sp,28 8001434: c3 a0 00 00 ret if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 8001438: f8 00 29 9b calli 800baa4 <__errno> <== NOT EXECUTED 800143c: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8001440: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8001444: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8001448: e3 ff ff f6 bi 8001420 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 800144c: f8 00 29 96 calli 800baa4 <__errno> <== NOT EXECUTED 8001450: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8001454: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8001458: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800145c: e3 ff ff f1 bi 8001420 <== NOT EXECUTED =============================================================================== 08001308 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 8001308: 37 9c ff f0 addi sp,sp,-16 800130c: 5b 8b 00 10 sw (sp+16),r11 8001310: 5b 8c 00 0c sw (sp+12),r12 8001314: 5b 8d 00 08 sw (sp+8),r13 8001318: 5b 9d 00 04 sw (sp+4),ra 800131c: b8 60 68 00 mv r13,r3 8001320: b8 80 58 00 mv r11,r4 8001324: b8 a0 60 00 mv r12,r5 /* * Verify Input parameters. */ if ( !pathname ) 8001328: 44 20 00 22 be r1,r0,80013b0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 800132c: 44 80 00 1c be r4,r0,800139c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 8001330: 28 85 00 0c lw r5,(r4+12) /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 8001334: 7d 8c 00 00 cmpnei r12,r12,0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 8001338: 28 a6 00 00 lw r6,(r5+0) 800133c: d8 c0 00 00 call r6 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 8001340: 64 24 00 00 cmpei r4,r1,0 8001344: a0 8c 60 00 and r12,r4,r12 8001348: 5d 80 00 07 bne r12,r0,8001364 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 800134c: 2b 9d 00 04 lw ra,(sp+4) 8001350: 2b 8b 00 10 lw r11,(sp+16) 8001354: 2b 8c 00 0c lw r12,(sp+12) 8001358: 2b 8d 00 08 lw r13,(sp+8) 800135c: 37 9c 00 10 addi sp,sp,16 8001360: c3 a0 00 00 ret * not. */ if ( (result == 0) && follow_link ) { type = (*pathloc->ops->node_type_h)( pathloc ); 8001364: 29 62 00 0c lw r2,(r11+12) 8001368: b9 60 08 00 mv r1,r11 800136c: 28 42 00 10 lw r2,(r2+16) 8001370: d8 40 00 00 call r2 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 8001374: 34 22 ff fd addi r2,r1,-3 8001378: 34 03 00 01 mvi r3,1 800137c: 34 01 00 00 mvi r1,0 8001380: 54 43 ff f3 bgu r2,r3,800134c * 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 ); 8001384: 29 63 00 0c lw r3,(r11+12) 8001388: b9 60 08 00 mv r1,r11 800138c: b9 a0 10 00 mv r2,r13 8001390: 28 63 00 34 lw r3,(r3+52) 8001394: d8 60 00 00 call r3 8001398: e3 ff ff ed bi 800134c if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 800139c: f8 00 29 c2 calli 800baa4 <__errno> <== NOT EXECUTED 80013a0: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 80013a4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80013a8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80013ac: e3 ff ff e8 bi 800134c <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 80013b0: f8 00 29 bd calli 800baa4 <__errno> <== NOT EXECUTED 80013b4: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 80013b8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80013bc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80013c0: e3 ff ff e3 bi 800134c <== NOT EXECUTED =============================================================================== 080088ac : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 80088ac: 37 9c ff f4 addi sp,sp,-12 80088b0: 5b 9d 00 04 sw (sp+4),ra find_arg fa = { 80088b4: 5b 81 00 08 sw (sp+8),r1 80088b8: 5b 80 00 0c sw (sp+12),r0 .type = type, .mount_h = NULL }; if ( type != NULL ) { 80088bc: 34 02 00 00 mvi r2,0 80088c0: 44 20 00 06 be r1,r0,80088d8 <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 80088c4: 78 01 08 00 mvhi r1,0x800 80088c8: 37 82 00 08 addi r2,sp,8 80088cc: 38 21 87 78 ori r1,r1,0x8778 80088d0: fb ff ff be calli 80087c8 80088d4: 2b 82 00 0c lw r2,(sp+12) } return fa.mount_h; } 80088d8: b8 40 08 00 mv r1,r2 80088dc: 2b 9d 00 04 lw ra,(sp+4) 80088e0: 37 9c 00 0c addi sp,sp,12 80088e4: c3 a0 00 00 ret =============================================================================== 08001130 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 8001130: 37 9c ff dc addi sp,sp,-36 8001134: 5b 8b 00 10 sw (sp+16),r11 8001138: 5b 8c 00 0c sw (sp+12),r12 800113c: 5b 8d 00 08 sw (sp+8),r13 8001140: 5b 9d 00 04 sw (sp+4),ra /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 8001144: 78 0b 08 01 mvhi r11,0x801 8001148: 39 6b 31 1c ori r11,r11,0x311c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 800114c: 78 01 08 01 mvhi r1,0x801 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 8001150: 29 63 00 00 lw r3,(r11+0) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 8001154: 38 21 1f e0 ori r1,r1,0x1fe0 8001158: 28 21 00 00 lw r1,(r1+0) /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 800115c: 34 02 00 12 mvi r2,18 8001160: 58 62 00 2c sw (r3+44),r2 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 8001164: 44 20 00 3e be r1,r0,800125c <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 8001168: 78 01 08 01 mvhi r1,0x801 800116c: 38 21 30 18 ori r1,r1,0x3018 8001170: 28 24 00 00 lw r4,(r1+0) status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 8001174: 34 05 00 00 mvi r5,0 8001178: 28 82 00 0c lw r2,(r4+12) 800117c: 28 81 00 08 lw r1,(r4+8) 8001180: 28 83 00 00 lw r3,(r4+0) 8001184: 28 84 00 04 lw r4,(r4+4) 8001188: f8 00 02 a1 calli 8001c0c if ( status == -1 ) 800118c: 34 02 ff ff mvi r2,-1 8001190: 44 22 00 3b be r1,r2,800127c <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 8001194: 29 61 00 00 lw r1,(r11+0) * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8001198: 78 0c 08 01 mvhi r12,0x801 800119c: 39 8c 21 34 ori r12,r12,0x2134 80011a0: 37 8d 00 14 addi r13,sp,20 80011a4: 34 02 00 01 mvi r2,1 80011a8: 34 03 00 00 mvi r3,0 80011ac: b9 a0 20 00 mv r4,r13 80011b0: 34 05 00 00 mvi r5,0 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; 80011b4: 0c 20 00 30 sh (r1+48),r0 * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 80011b8: b9 80 08 00 mv r1,r12 80011bc: f8 00 00 82 calli 80013c4 rtems_filesystem_root = loc; 80011c0: 29 61 00 00 lw r1,(r11+0) 80011c4: 2b 83 00 14 lw r3,(sp+20) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 80011c8: 34 02 00 01 mvi r2,1 80011cc: b9 a0 20 00 mv r4,r13 * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 80011d0: 58 23 00 18 sw (r1+24),r3 80011d4: 2b 83 00 18 lw r3,(sp+24) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 80011d8: 34 05 00 00 mvi r5,0 * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 80011dc: 58 23 00 1c sw (r1+28),r3 80011e0: 2b 83 00 1c lw r3,(sp+28) 80011e4: 58 23 00 20 sw (r1+32),r3 80011e8: 2b 83 00 20 lw r3,(sp+32) 80011ec: 58 23 00 24 sw (r1+36),r3 80011f0: 2b 83 00 24 lw r3,(sp+36) 80011f4: 58 23 00 28 sw (r1+40),r3 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 80011f8: b9 80 08 00 mv r1,r12 80011fc: 34 03 00 00 mvi r3,0 8001200: f8 00 00 71 calli 80013c4 rtems_filesystem_current = loc; 8001204: 29 61 00 00 lw r1,(r11+0) 8001208: 2b 82 00 14 lw r2,(sp+20) 800120c: 58 22 00 04 sw (r1+4),r2 8001210: 2b 82 00 18 lw r2,(sp+24) 8001214: 58 22 00 08 sw (r1+8),r2 8001218: 2b 82 00 1c lw r2,(sp+28) 800121c: 58 22 00 0c sw (r1+12),r2 8001220: 2b 82 00 20 lw r2,(sp+32) 8001224: 58 22 00 10 sw (r1+16),r2 8001228: 2b 82 00 24 lw r2,(sp+36) 800122c: 58 22 00 14 sw (r1+20),r2 * * 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); 8001230: 78 01 08 01 mvhi r1,0x801 8001234: 38 21 21 38 ori r1,r1,0x2138 8001238: 34 02 01 ff mvi r2,511 800123c: f8 00 02 05 calli 8001a50 if ( status != 0 ) 8001240: 5c 20 00 0b bne r1,r0,800126c <== NEVER TAKEN * 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. */ } 8001244: 2b 9d 00 04 lw ra,(sp+4) 8001248: 2b 8b 00 10 lw r11,(sp+16) 800124c: 2b 8c 00 0c lw r12,(sp+12) 8001250: 2b 8d 00 08 lw r13,(sp+8) 8001254: 37 9c 00 24 addi sp,sp,36 8001258: c3 a0 00 00 ret /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 800125c: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 8001260: 38 42 21 40 ori r2,r2,0x2140 <== NOT EXECUTED 8001264: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 8001268: f8 00 08 99 calli 80034cc <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 800126c: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 8001270: 38 42 21 48 ori r2,r2,0x2148 <== NOT EXECUTED 8001274: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 8001278: f8 00 08 95 calli 80034cc <== 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 ); 800127c: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 8001280: 38 42 21 44 ori r2,r2,0x2144 <== NOT EXECUTED 8001284: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 8001288: f8 00 08 91 calli 80034cc <== NOT EXECUTED =============================================================================== 080087c8 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 80087c8: 37 9c ff e4 addi sp,sp,-28 80087cc: 5b 8b 00 1c sw (sp+28),r11 80087d0: 5b 8c 00 18 sw (sp+24),r12 80087d4: 5b 8d 00 14 sw (sp+20),r13 80087d8: 5b 8e 00 10 sw (sp+16),r14 80087dc: 5b 8f 00 0c sw (sp+12),r15 80087e0: 5b 90 00 08 sw (sp+8),r16 80087e4: 5b 9d 00 04 sw (sp+4),ra const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 80087e8: 78 0c 08 01 mvhi r12,0x801 80087ec: 39 8c 1f c0 ori r12,r12,0x1fc0 80087f0: 29 83 00 00 lw r3,(r12+0) bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 80087f4: b8 20 68 00 mv r13,r1 80087f8: b8 40 70 00 mv r14,r2 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 80087fc: 5c 60 00 03 bne r3,r0,8008808 <== ALWAYS TAKEN 8008800: e0 00 00 0a bi 8008828 <== NOT EXECUTED 8008804: 5c 20 00 20 bne r1,r0,8008884 <== NOT EXECUTED stop = (*routine)( table_entry, routine_arg ); 8008808: b9 80 08 00 mv r1,r12 800880c: b9 c0 10 00 mv r2,r14 8008810: d9 a0 00 00 call r13 ++table_entry; 8008814: 35 8c 00 08 addi r12,r12,8 { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 8008818: 29 83 00 00 lw r3,(r12+0) stop = (*routine)( table_entry, routine_arg ); 800881c: b8 20 58 00 mv r11,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 ) { 8008820: 5c 60 ff f9 bne r3,r0,8008804 <== NEVER TAKEN stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 8008824: 5c 23 00 18 bne r1,r3,8008884 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 ); 8008828: 78 10 08 01 mvhi r16,0x801 800882c: 3a 10 36 a8 ori r16,r16,0x36a8 8008830: 2a 01 00 00 lw r1,(r16+0) 8008834: 34 02 00 00 mvi r2,0 8008838: 34 03 00 00 mvi r3,0 800883c: fb ff e9 48 calli 8002d5c } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 8008840: 78 01 08 01 mvhi r1,0x801 8008844: 38 21 31 20 ori r1,r1,0x3120 8008848: 28 2c 00 00 lw r12,(r1+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800884c: 78 0f 08 01 mvhi r15,0x801 8008850: 39 ef 31 24 ori r15,r15,0x3124 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 8008854: 34 0b 00 00 mvi r11,0 8008858: 5d 8f 00 03 bne r12,r15,8008864 800885c: e0 00 00 08 bi 800887c node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; 8008860: 5c 20 00 07 bne r1,r0,800887c <== NEVER TAKEN node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 8008864: 35 81 00 08 addi r1,r12,8 8008868: b9 c0 10 00 mv r2,r14 800886c: d9 a0 00 00 call r13 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 8008870: 29 8c 00 00 lw r12,(r12+0) !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 ); 8008874: b8 20 58 00 mv r11,r1 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 8008878: 5d 8f ff fa bne r12,r15,8008860 <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 800887c: 2a 01 00 00 lw r1,(r16+0) 8008880: fb ff e9 93 calli 8002ecc } rtems_libio_unlock(); } return stop; } 8008884: b9 60 08 00 mv r1,r11 8008888: 2b 9d 00 04 lw ra,(sp+4) 800888c: 2b 8b 00 1c lw r11,(sp+28) 8008890: 2b 8c 00 18 lw r12,(sp+24) 8008894: 2b 8d 00 14 lw r13,(sp+20) 8008898: 2b 8e 00 10 lw r14,(sp+16) 800889c: 2b 8f 00 0c lw r15,(sp+12) 80088a0: 2b 90 00 08 lw r16,(sp+8) 80088a4: 37 9c 00 1c addi sp,sp,28 80088a8: c3 a0 00 00 ret =============================================================================== 08001b60 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 8001b60: 37 9c ff e4 addi sp,sp,-28 8001b64: 5b 8b 00 1c sw (sp+28),r11 8001b68: 5b 8c 00 18 sw (sp+24),r12 8001b6c: 5b 8d 00 14 sw (sp+20),r13 8001b70: 5b 8e 00 10 sw (sp+16),r14 8001b74: 5b 8f 00 0c sw (sp+12),r15 8001b78: 5b 90 00 08 sw (sp+8),r16 8001b7c: 5b 9d 00 04 sw (sp+4),ra 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 ); 8001b80: 78 10 08 01 mvhi r16,0x801 8001b84: 3a 10 36 a8 ori r16,r16,0x36a8 8001b88: b8 20 78 00 mv r15,r1 8001b8c: 2a 01 00 00 lw r1,(r16+0) 8001b90: b8 40 70 00 mv r14,r2 8001b94: 34 03 00 00 mvi r3,0 8001b98: 34 02 00 00 mvi r2,0 8001b9c: f8 00 04 70 calli 8002d5c stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 8001ba0: 78 01 08 01 mvhi r1,0x801 8001ba4: 38 21 31 10 ori r1,r1,0x3110 8001ba8: 28 2b 00 00 lw r11,(r1+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8001bac: 78 0d 08 01 mvhi r13,0x801 8001bb0: 39 ad 31 14 ori r13,r13,0x3114 rtems_per_filesystem_mount_routine routine, void *routine_arg ) { rtems_chain_node *node = NULL; bool stop = false; 8001bb4: 34 0c 00 00 mvi r12,0 rtems_libio_lock(); for ( 8001bb8: 5d 6d 00 03 bne r11,r13,8001bc4 <== ALWAYS TAKEN 8001bbc: e0 00 00 08 bi 8001bdc <== NOT EXECUTED node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; 8001bc0: 5c 20 00 07 bne r1,r0,8001bdc <== NEVER TAKEN 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 ); 8001bc4: b9 60 08 00 mv r1,r11 8001bc8: b9 c0 10 00 mv r2,r14 8001bcc: d9 e0 00 00 call r15 } rtems_libio_unlock(); return stop; } 8001bd0: 29 6b 00 00 lw r11,(r11+0) 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 ); 8001bd4: b8 20 60 00 mv r12,r1 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 8001bd8: 5d 6d ff fa bne r11,r13,8001bc0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 8001bdc: 2a 01 00 00 lw r1,(r16+0) 8001be0: f8 00 04 bb calli 8002ecc stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 8001be4: b9 80 08 00 mv r1,r12 8001be8: 2b 9d 00 04 lw ra,(sp+4) 8001bec: 2b 8b 00 1c lw r11,(sp+28) 8001bf0: 2b 8c 00 18 lw r12,(sp+24) 8001bf4: 2b 8d 00 14 lw r13,(sp+20) 8001bf8: 2b 8e 00 10 lw r14,(sp+16) 8001bfc: 2b 8f 00 0c lw r15,(sp+12) 8001c00: 2b 90 00 08 lw r16,(sp+8) 8001c04: 37 9c 00 1c addi sp,sp,28 8001c08: c3 a0 00 00 ret =============================================================================== 080014b4 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 80014b4: 37 9c ff f0 addi sp,sp,-16 80014b8: 5b 8b 00 10 sw (sp+16),r11 80014bc: 5b 8c 00 0c sw (sp+12),r12 80014c0: 5b 8d 00 08 sw (sp+8),r13 80014c4: 5b 9d 00 04 sw (sp+4),ra 80014c8: b8 20 68 00 mv r13,r1 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 80014cc: 40 21 00 00 lbu r1,(r1+0) 80014d0: 7c 43 00 00 cmpnei r3,r2,0 int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 80014d4: b8 40 60 00 mv r12,r2 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 80014d8: 7c 22 00 00 cmpnei r2,r1,0 80014dc: 34 0b 00 00 mvi r11,0 80014e0: a0 62 10 00 and r2,r3,r2 80014e4: 5c 40 00 09 bne r2,r0,8001508 <== ALWAYS TAKEN 80014e8: e0 00 00 0a bi 8001510 <== NOT EXECUTED { pathname++; pathnamelen--; stripped++; 80014ec: 35 6b 00 01 addi r11,r11,1 } return len; } int rtems_filesystem_prefix_separators( 80014f0: b5 ab 18 00 add r3,r13,r11 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 80014f4: 40 61 00 00 lbu r1,(r3+0) 80014f8: fd 8b 20 00 cmpne r4,r12,r11 80014fc: 7c 23 00 00 cmpnei r3,r1,0 8001500: a0 83 18 00 and r3,r4,r3 8001504: 44 60 00 03 be r3,r0,8001510 <== NEVER TAKEN 8001508: f8 00 04 71 calli 80026cc 800150c: 5c 20 ff f8 bne r1,r0,80014ec pathname++; pathnamelen--; stripped++; } return stripped; } 8001510: b9 60 08 00 mv r1,r11 8001514: 2b 9d 00 04 lw ra,(sp+4) 8001518: 2b 8b 00 10 lw r11,(sp+16) 800151c: 2b 8c 00 0c lw r12,(sp+12) 8001520: 2b 8d 00 08 lw r13,(sp+8) 8001524: 37 9c 00 10 addi sp,sp,16 8001528: c3 a0 00 00 ret =============================================================================== 080089ec : int rtems_filesystem_unregister( const char *type ) { 80089ec: 37 9c ff ec addi sp,sp,-20 80089f0: 5b 8b 00 14 sw (sp+20),r11 80089f4: 5b 8c 00 10 sw (sp+16),r12 80089f8: 5b 8d 00 0c sw (sp+12),r13 80089fc: 5b 8e 00 08 sw (sp+8),r14 8008a00: 5b 9d 00 04 sw (sp+4),ra 8008a04: b8 20 68 00 mv r13,r1 rtems_chain_node *node = NULL; if ( type == NULL ) { 8008a08: 44 20 00 2f be r1,r0,8008ac4 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 ); 8008a0c: 78 0e 08 01 mvhi r14,0x801 8008a10: 39 ce 36 a8 ori r14,r14,0x36a8 8008a14: 29 c1 00 00 lw r1,(r14+0) 8008a18: 34 02 00 00 mvi r2,0 8008a1c: 34 03 00 00 mvi r3,0 8008a20: fb ff e8 cf calli 8002d5c } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 8008a24: 78 01 08 01 mvhi r1,0x801 8008a28: 38 21 31 20 ori r1,r1,0x3120 8008a2c: 28 2b 00 00 lw r11,(r1+0) 8008a30: 78 0c 08 01 mvhi r12,0x801 8008a34: 39 8c 31 24 ori r12,r12,0x3124 if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 8008a38: 5d 6c 00 04 bne r11,r12,8008a48 8008a3c: e0 00 00 15 bi 8008a90 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 8008a40: 29 6b 00 00 lw r11,(r11+0) if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 8008a44: 45 6c 00 13 be r11,r12,8008a90 <== ALWAYS TAKEN !rtems_chain_is_tail( &filesystem_chain, node ); node = rtems_chain_next( node ) ) { filesystem_node *fsn = (filesystem_node *) node; if ( strcmp( fsn->entry.type, type ) == 0 ) { 8008a48: 29 61 00 08 lw r1,(r11+8) 8008a4c: b9 a0 10 00 mv r2,r13 8008a50: f8 00 10 4a calli 800cb78 8008a54: 5c 20 ff fb bne r1,r0,8008a40 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8008a58: b9 60 08 00 mv r1,r11 8008a5c: fb ff eb ac calli 800390c <_Chain_Extract> rtems_chain_extract( node ); free( fsn ); 8008a60: b9 60 08 00 mv r1,r11 8008a64: fb ff e2 ba calli 800154c } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 8008a68: 29 c1 00 00 lw r1,(r14+0) 8008a6c: fb ff e9 18 calli 8002ecc rtems_libio_unlock(); return 0; 8008a70: 34 01 00 00 mvi r1,0 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 8008a74: 2b 9d 00 04 lw ra,(sp+4) 8008a78: 2b 8b 00 14 lw r11,(sp+20) 8008a7c: 2b 8c 00 10 lw r12,(sp+16) 8008a80: 2b 8d 00 0c lw r13,(sp+12) 8008a84: 2b 8e 00 08 lw r14,(sp+8) 8008a88: 37 9c 00 14 addi sp,sp,20 8008a8c: c3 a0 00 00 ret 8008a90: 29 c1 00 00 lw r1,(r14+0) 8008a94: fb ff e9 0e calli 8002ecc return 0; } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); 8008a98: f8 00 0c 03 calli 800baa4 <__errno> 8008a9c: 34 02 00 02 mvi r2,2 8008aa0: 58 22 00 00 sw (r1+0),r2 8008aa4: 34 01 ff ff mvi r1,-1 } 8008aa8: 2b 9d 00 04 lw ra,(sp+4) 8008aac: 2b 8b 00 14 lw r11,(sp+20) 8008ab0: 2b 8c 00 10 lw r12,(sp+16) 8008ab4: 2b 8d 00 0c lw r13,(sp+12) 8008ab8: 2b 8e 00 08 lw r14,(sp+8) 8008abc: 37 9c 00 14 addi sp,sp,20 8008ac0: c3 a0 00 00 ret ) { rtems_chain_node *node = NULL; if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); 8008ac4: f8 00 0b f8 calli 800baa4 <__errno> 8008ac8: 34 02 00 16 mvi r2,22 8008acc: 58 22 00 00 sw (r1+0),r2 8008ad0: 34 01 ff ff mvi r1,-1 8008ad4: e3 ff ff f5 bi 8008aa8 =============================================================================== 08001fdc : void *rtems_gxx_getspecific(__gthread_key_t key) { 8001fdc: 37 9c ff f4 addi sp,sp,-12 8001fe0: 5b 8b 00 08 sw (sp+8),r11 8001fe4: 5b 9d 00 04 sw (sp+4),ra 8001fe8: b8 20 58 00 mv r11,r1 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 ); 8001fec: b8 20 10 00 mv r2,r1 8001ff0: 37 83 00 0c addi r3,sp,12 8001ff4: 34 01 00 00 mvi r1,0 } void *rtems_gxx_getspecific(__gthread_key_t key) { rtems_status_code status; void *p= 0; 8001ff8: 5b 80 00 0c sw (sp+12),r0 /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p ); 8001ffc: f8 00 08 2e calli 80040b4 if ( status == RTEMS_SUCCESSFUL ) { 8002000: 5c 20 00 06 bne r1,r0,8002018 <== NEVER TAKEN /* We do not have to do this, but what the heck ! */ p= key->val; 8002004: 29 61 00 00 lw r1,(r11+0) p, rtems_task_self() ); #endif return p; } 8002008: 2b 9d 00 04 lw ra,(sp+4) 800200c: 2b 8b 00 08 lw r11,(sp+8) 8002010: 37 9c 00 0c addi sp,sp,12 8002014: c3 a0 00 00 ret 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 ); 8002018: 29 63 00 04 lw r3,(r11+4) <== NOT EXECUTED 800201c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8002020: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8002024: f8 00 07 b5 calli 8003ef8 <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) { 8002028: 5c 20 00 07 bne r1,r0,8002044 <== NOT EXECUTED rtems_panic ("rtems_gxx_getspecific"); } key->val = (void *)0; 800202c: 2b 81 00 0c lw r1,(sp+12) <== NOT EXECUTED 8002030: 59 60 00 00 sw (r11+0),r0 <== NOT EXECUTED p, rtems_task_self() ); #endif return p; } 8002034: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8002038: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 800203c: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8002040: c3 a0 00 00 ret <== 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"); 8002044: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8002048: 38 21 b7 94 ori r1,r1,0xb794 <== NOT EXECUTED 800204c: f8 00 1c 2d calli 8009100 <== NOT EXECUTED =============================================================================== 08001f9c : int rtems_gxx_key_delete (__gthread_key_t key) { 8001f9c: 37 9c ff f8 addi sp,sp,-8 8001fa0: 5b 8b 00 08 sw (sp+8),r11 8001fa4: 5b 9d 00 04 sw (sp+4),ra 8001fa8: b8 20 58 00 mv r11,r1 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: delete key=%x\n", key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_delete( RTEMS_SELF, (void **)key ); 8001fac: b8 20 10 00 mv r2,r1 8001fb0: 34 01 00 00 mvi r1,0 8001fb4: f8 00 08 10 calli 8003ff4 if ( status == RTEMS_SUCCESSFUL ) { 8001fb8: 5c 20 00 04 bne r1,r0,8001fc8 <== NEVER TAKEN /* Hmm - hopefully all tasks using this key have gone away... */ if ( key ) free( (void *)key ); 8001fbc: 45 61 00 03 be r11,r1,8001fc8 <== NEVER TAKEN 8001fc0: b9 60 08 00 mv r1,r11 8001fc4: fb ff ff 53 calli 8001d10 return 0; } return 0; } 8001fc8: 34 01 00 00 mvi r1,0 8001fcc: 2b 9d 00 04 lw ra,(sp+4) 8001fd0: 2b 8b 00 08 lw r11,(sp+8) 8001fd4: 37 9c 00 08 addi sp,sp,8 8001fd8: c3 a0 00 00 ret =============================================================================== 08001f90 : { #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr ); #endif key->val = 0; 8001f90: 58 20 00 00 sw (r1+0),r0 <== NOT EXECUTED return 0; } 8001f94: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8001f98: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 08002110 : int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex) { 8002110: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8002114: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: destroy mutex=%X\n", *mutex ); #endif status = rtems_semaphore_delete(*(rtems_id *)mutex); 8002118: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 800211c: f8 00 05 dc calli 800388c <== NOT EXECUTED if ( status == RTEMS_SUCCESSFUL ) return 0; 8002120: 7c 21 00 00 cmpnei r1,r1,0 <== NOT EXECUTED return -1; } 8002124: c8 01 08 00 sub r1,r0,r1 <== NOT EXECUTED 8002128: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800212c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8002130: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 080020a0 : /* * MUTEX support */ void rtems_gxx_mutex_init (__gthread_mutex_t *mutex) { 80020a0: 37 9c ff fc addi sp,sp,-4 80020a4: 5b 9d 00 04 sw (sp+4),ra #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: mutex init =%X\n", *mutex ); #endif status = rtems_semaphore_create( 80020a8: 78 02 08 01 mvhi r2,0x801 80020ac: 38 42 b7 c4 ori r2,r2,0xb7c4 /* * MUTEX support */ void rtems_gxx_mutex_init (__gthread_mutex_t *mutex) { 80020b0: b8 20 28 00 mv r5,r1 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: mutex init =%X\n", *mutex ); #endif status = rtems_semaphore_create( 80020b4: 28 41 00 00 lw r1,(r2+0) 80020b8: 34 03 00 54 mvi r3,84 80020bc: 34 02 00 01 mvi r2,1 80020c0: 34 04 00 00 mvi r4,0 80020c4: f8 00 05 6e calli 800367c RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE| RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL, 0, (rtems_id *)mutex ); if ( status != RTEMS_SUCCESSFUL ) { 80020c8: 5c 20 00 04 bne r1,r0,80020d8 <== NEVER TAKEN rtems_panic ("rtems_gxx_mutex_init"); } #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: mutex init complete =%X\n", *mutex ); #endif } 80020cc: 2b 9d 00 04 lw ra,(sp+4) 80020d0: 37 9c 00 04 addi sp,sp,4 80020d4: c3 a0 00 00 ret "gxx_wrappers: mutex init failed %s (%d)\n", rtems_status_text(status), status ); #endif rtems_panic ("rtems_gxx_mutex_init"); 80020d8: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 80020dc: 38 21 b7 ac ori r1,r1,0xb7ac <== NOT EXECUTED 80020e0: f8 00 1c 08 calli 8009100 <== NOT EXECUTED =============================================================================== 08001e78 : 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)) { 8001e78: 37 9c ff ec addi sp,sp,-20 8001e7c: 5b 8b 00 10 sw (sp+16),r11 8001e80: 5b 8c 00 0c sw (sp+12),r12 8001e84: 5b 8d 00 08 sw (sp+8),r13 8001e88: 5b 9d 00 04 sw (sp+4),ra #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { 8001e8c: 28 2c 00 00 lw r12,(r1+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)) { 8001e90: b8 20 58 00 mv r11,r1 8001e94: b8 40 68 00 mv r13,r2 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { 8001e98: 45 80 00 08 be r12,r0,8001eb8 rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); if ( o == 0 ) (*func)(); } return 0; } 8001e9c: 34 01 00 00 mvi r1,0 8001ea0: 2b 9d 00 04 lw ra,(sp+4) 8001ea4: 2b 8b 00 10 lw r11,(sp+16) 8001ea8: 2b 8c 00 0c lw r12,(sp+12) 8001eac: 2b 8d 00 08 lw r13,(sp+8) 8001eb0: 37 9c 00 14 addi sp,sp,20 8001eb4: c3 a0 00 00 ret if ( *(volatile __gthread_once_t *)once == 0 ) { rtems_mode saveMode; __gthread_once_t o; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 8001eb8: 34 01 01 00 mvi r1,256 8001ebc: 34 02 01 00 mvi r2,256 8001ec0: 37 83 00 14 addi r3,sp,20 8001ec4: f8 00 07 6b calli 8003c70 if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { 8001ec8: 29 61 00 00 lw r1,(r11+0) 8001ecc: 5c 2c 00 0f bne r1,r12,8001f08 <== NEVER TAKEN *(volatile __gthread_once_t *)once = 1; } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 8001ed0: 2b 81 00 14 lw r1,(sp+20) rtems_mode saveMode; __gthread_once_t o; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { *(volatile __gthread_once_t *)once = 1; 8001ed4: 34 04 00 01 mvi r4,1 } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 8001ed8: 34 02 01 00 mvi r2,256 8001edc: 37 83 00 14 addi r3,sp,20 rtems_mode saveMode; __gthread_once_t o; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { *(volatile __gthread_once_t *)once = 1; 8001ee0: 59 64 00 00 sw (r11+0),r4 } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 8001ee4: f8 00 07 63 calli 8003c70 if ( o == 0 ) (*func)(); 8001ee8: d9 a0 00 00 call r13 } return 0; } 8001eec: 34 01 00 00 mvi r1,0 8001ef0: 2b 9d 00 04 lw ra,(sp+4) 8001ef4: 2b 8b 00 10 lw r11,(sp+16) 8001ef8: 2b 8c 00 0c lw r12,(sp+12) 8001efc: 2b 8d 00 08 lw r13,(sp+8) 8001f00: 37 9c 00 14 addi sp,sp,20 8001f04: c3 a0 00 00 ret 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); 8001f08: 2b 81 00 14 lw r1,(sp+20) <== NOT EXECUTED 8001f0c: 34 02 01 00 mvi r2,256 <== NOT EXECUTED 8001f10: 37 83 00 14 addi r3,sp,20 <== NOT EXECUTED 8001f14: f8 00 07 57 calli 8003c70 <== NOT EXECUTED if ( o == 0 ) (*func)(); } return 0; } 8001f18: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8001f1c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8001f20: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8001f24: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8001f28: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8001f2c: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8001f30: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 08002050 : #endif return p; } int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { 8002050: 37 9c ff f4 addi sp,sp,-12 8002054: 5b 8b 00 0c sw (sp+12),r11 8002058: 5b 8c 00 08 sw (sp+8),r12 800205c: 5b 9d 00 04 sw (sp+4),ra rtems_task_self() ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); 8002060: 28 23 00 04 lw r3,(r1+4) #endif return p; } int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { 8002064: b8 20 58 00 mv r11,r1 8002068: b8 40 60 00 mv r12,r2 rtems_task_self() ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); 800206c: 34 01 00 00 mvi r1,0 8002070: b9 60 10 00 mv r2,r11 8002074: f8 00 07 a1 calli 8003ef8 if ( status == RTEMS_SUCCESSFUL ) { /* now let's set the proper value */ key->val = (void *)ptr; return 0; } return -1; 8002078: 34 03 ff ff mvi r3,-1 ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); if ( status == RTEMS_SUCCESSFUL ) { 800207c: 5c 20 00 03 bne r1,r0,8002088 <== NEVER TAKEN /* now let's set the proper value */ key->val = (void *)ptr; 8002080: 59 6c 00 00 sw (r11+0),r12 return 0; 8002084: 34 03 00 00 mvi r3,0 } return -1; } 8002088: b8 60 08 00 mv r1,r3 800208c: 2b 9d 00 04 lw ra,(sp+4) 8002090: 2b 8b 00 0c lw r11,(sp+12) 8002094: 2b 8c 00 08 lw r12,(sp+8) 8002098: 37 9c 00 0c addi sp,sp,12 800209c: c3 a0 00 00 ret =============================================================================== 08007170 : void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { 8007170: 37 9c ff f0 addi sp,sp,-16 8007174: 5b 8b 00 10 sw (sp+16),r11 8007178: 5b 8c 00 0c sw (sp+12),r12 800717c: 5b 8d 00 08 sw (sp+8),r13 8007180: 5b 9d 00 04 sw (sp+4),ra if ( 8007184: 78 04 08 02 mvhi r4,0x802 8007188: 38 84 52 bc ori r4,r4,0x52bc 800718c: 28 86 00 00 lw r6,(r4+0) 8007190: 34 05 00 03 mvi r5,3 void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { 8007194: b8 20 68 00 mv r13,r1 8007198: b8 40 60 00 mv r12,r2 800719c: b8 60 58 00 mv r11,r3 if ( 80071a0: 44 c5 00 11 be r6,r5,80071e4 <== ALWAYS TAKEN && !malloc_is_system_state_OK() ) { return NULL; } malloc_deferred_frees_process(); 80071a4: fb ff fa bb calli 8005c90 /* FIXME: Statistics, boundary checks */ return _Protected_heap_Allocate_aligned_with_boundary( 80071a8: 78 05 08 02 mvhi r5,0x802 80071ac: 38 a5 40 1c ori r5,r5,0x401c 80071b0: 28 a1 00 00 lw r1,(r5+0) 80071b4: b9 a0 10 00 mv r2,r13 80071b8: b9 80 18 00 mv r3,r12 80071bc: b9 60 20 00 mv r4,r11 80071c0: f8 00 0e ac calli 800ac70 <_Protected_heap_Allocate_aligned_with_boundary> 80071c4: b8 20 28 00 mv r5,r1 RTEMS_Malloc_Heap, size, alignment, boundary ); } 80071c8: b8 a0 08 00 mv r1,r5 80071cc: 2b 9d 00 04 lw ra,(sp+4) 80071d0: 2b 8b 00 10 lw r11,(sp+16) 80071d4: 2b 8c 00 0c lw r12,(sp+12) 80071d8: 2b 8d 00 08 lw r13,(sp+8) 80071dc: 37 9c 00 10 addi sp,sp,16 80071e0: c3 a0 00 00 ret uintptr_t boundary ) { if ( _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() 80071e4: fb ff fa 99 calli 8005c48 ) { return NULL; 80071e8: 34 05 00 00 mvi r5,0 uintptr_t boundary ) { if ( _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() 80071ec: 5c 20 ff ee bne r1,r0,80071a4 80071f0: e3 ff ff f6 bi 80071c8 =============================================================================== 0800b820 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 800b820: 37 9c ff fc addi sp,sp,-4 800b824: 5b 9d 00 04 sw (sp+4),ra rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 800b828: 78 04 08 01 mvhi r4,0x801 800b82c: 38 84 3a 4c ori r4,r4,0x3a4c 800b830: 28 86 00 00 lw r6,(r4+0) return RTEMS_INVALID_NUMBER; 800b834: 34 05 00 0a mvi r5,10 void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 800b838: 50 26 00 0f bgeu r1,r6,800b874 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 800b83c: 78 05 08 01 mvhi r5,0x801 800b840: b4 21 30 00 add r6,r1,r1 800b844: 38 a5 3a 50 ori r5,r5,0x3a50 800b848: b4 c1 20 00 add r4,r6,r1 800b84c: 28 a5 00 00 lw r5,(r5+0) 800b850: b4 84 20 00 add r4,r4,r4 800b854: b4 84 20 00 add r4,r4,r4 800b858: b4 84 20 00 add r4,r4,r4 800b85c: b4 a4 20 00 add r4,r5,r4 800b860: 28 84 00 0c lw r4,(r4+12) return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 800b864: 34 05 00 00 mvi r5,0 800b868: 44 80 00 03 be r4,r0,800b874 800b86c: d8 80 00 00 call r4 800b870: b8 20 28 00 mv r5,r1 } 800b874: b8 a0 08 00 mv r1,r5 800b878: 2b 9d 00 04 lw ra,(sp+4) 800b87c: 37 9c 00 04 addi sp,sp,4 800b880: c3 a0 00 00 ret =============================================================================== 080049d8 : 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 ) { 80049d8: 37 9c ff f8 addi sp,sp,-8 80049dc: 5b 8b 00 08 sw (sp+8),r11 80049e0: 5b 9d 00 04 sw (sp+4),ra rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 80049e4: 78 04 08 01 mvhi r4,0x801 80049e8: 38 84 8a 68 ori r4,r4,0x8a68 80049ec: 28 85 00 08 lw r5,(r4+8) 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; 80049f0: 78 04 08 01 mvhi r4,0x801 80049f4: 38 84 8b 0c ori r4,r4,0x8b0c 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 ) { 80049f8: b8 20 58 00 mv r11,r1 rtems_device_major_number major_limit = _IO_Number_of_drivers; 80049fc: 28 86 00 00 lw r6,(r4+0) if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 8004a00: 34 01 00 12 mvi r1,18 rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 8004a04: 5c a0 00 33 bne r5,r0,8004ad0 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; 8004a08: 34 01 00 09 mvi r1,9 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 8004a0c: 44 65 00 31 be r3,r5,8004ad0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 8004a10: 58 66 00 00 sw (r3+0),r6 if ( driver_table == NULL ) 8004a14: 44 40 00 2f be r2,r0,8004ad0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004a18: 28 45 00 00 lw r5,(r2+0) 8004a1c: 44 a0 00 42 be r5,r0,8004b24 if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 8004a20: 34 01 00 0a mvi r1,10 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 8004a24: 51 66 00 2b bgeu r11,r6,8004ad0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8004a28: 78 01 08 01 mvhi r1,0x801 8004a2c: 38 21 88 9c ori r1,r1,0x889c 8004a30: 28 25 00 00 lw r5,(r1+0) 8004a34: 34 a5 00 01 addi r5,r5,1 8004a38: 58 25 00 00 sw (r1+0),r5 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 8004a3c: 5d 60 00 29 bne r11,r0,8004ae0 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 8004a40: 28 85 00 00 lw r5,(r4+0) rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 8004a44: 44 ab 00 3e be r5,r11,8004b3c <== NEVER TAKEN 8004a48: 78 06 08 01 mvhi r6,0x801 8004a4c: 38 c6 8b 10 ori r6,r6,0x8b10 8004a50: 28 c1 00 00 lw r1,(r6+0) static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004a54: 28 24 00 00 lw r4,(r1+0) 8004a58: 44 80 00 36 be r4,r0,8004b30 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 8004a5c: 35 6b 00 01 addi r11,r11,1 8004a60: 34 21 00 18 addi r1,r1,24 8004a64: 54 ab ff fc bgu r5,r11,8004a54 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 8004a68: 58 6b 00 00 sw (r3+0),r11 if ( m != n ) 8004a6c: 44 ab 00 35 be r5,r11,8004b40 8004a70: b5 6b 08 00 add r1,r11,r11 8004a74: b4 2b 08 00 add r1,r1,r11 8004a78: b4 21 08 00 add r1,r1,r1 8004a7c: b4 21 08 00 add r1,r1,r1 8004a80: b4 21 08 00 add r1,r1,r1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 8004a84: 28 c3 00 00 lw r3,(r6+0) 8004a88: 28 44 00 00 lw r4,(r2+0) 8004a8c: b4 61 08 00 add r1,r3,r1 8004a90: 58 24 00 00 sw (r1+0),r4 8004a94: 28 43 00 04 lw r3,(r2+4) 8004a98: 58 23 00 04 sw (r1+4),r3 8004a9c: 28 43 00 08 lw r3,(r2+8) 8004aa0: 58 23 00 08 sw (r1+8),r3 8004aa4: 28 43 00 0c lw r3,(r2+12) 8004aa8: 58 23 00 0c sw (r1+12),r3 8004aac: 28 43 00 10 lw r3,(r2+16) 8004ab0: 58 23 00 10 sw (r1+16),r3 8004ab4: 28 42 00 14 lw r2,(r2+20) 8004ab8: 58 22 00 14 sw (r1+20),r2 _Thread_Enable_dispatch(); 8004abc: f8 00 07 77 calli 8006898 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 8004ac0: b9 60 08 00 mv r1,r11 8004ac4: 34 02 00 00 mvi r2,0 8004ac8: 34 03 00 00 mvi r3,0 8004acc: f8 00 25 31 calli 800df90 } 8004ad0: 2b 9d 00 04 lw ra,(sp+4) 8004ad4: 2b 8b 00 08 lw r11,(sp+8) 8004ad8: 37 9c 00 08 addi sp,sp,8 8004adc: c3 a0 00 00 ret _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 8004ae0: b5 6b 08 00 add r1,r11,r11 8004ae4: 78 06 08 01 mvhi r6,0x801 8004ae8: b4 2b 08 00 add r1,r1,r11 8004aec: 38 c6 8b 10 ori r6,r6,0x8b10 8004af0: b4 21 08 00 add r1,r1,r1 8004af4: 28 c5 00 00 lw r5,(r6+0) 8004af8: b4 21 08 00 add r1,r1,r1 8004afc: b4 21 08 00 add r1,r1,r1 8004b00: b4 a1 28 00 add r5,r5,r1 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004b04: 28 a4 00 00 lw r4,(r5+0) 8004b08: 44 80 00 11 be r4,r0,8004b4c 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(); 8004b0c: f8 00 07 63 calli 8006898 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 8004b10: 34 01 00 0c mvi r1,12 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 8004b14: 2b 9d 00 04 lw ra,(sp+4) 8004b18: 2b 8b 00 08 lw r11,(sp+8) 8004b1c: 37 9c 00 08 addi sp,sp,8 8004b20: c3 a0 00 00 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004b24: 28 47 00 04 lw r7,(r2+4) 8004b28: 5c e5 ff be bne r7,r5,8004a20 8004b2c: e3 ff ff e9 bi 8004ad0 8004b30: 28 27 00 04 lw r7,(r1+4) 8004b34: 5c e4 ff ca bne r7,r4,8004a5c 8004b38: e3 ff ff cc bi 8004a68 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 8004b3c: 58 60 00 00 sw (r3+0),r0 <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 8004b40: f8 00 07 56 calli 8006898 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 8004b44: 34 01 00 05 mvi r1,5 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; 8004b48: e3 ff ff e2 bi 8004ad0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004b4c: 28 a5 00 04 lw r5,(r5+4) 8004b50: 5c a4 ff ef bne r5,r4,8004b0c <== ALWAYS TAKEN if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 8004b54: 58 6b 00 00 sw (r3+0),r11 8004b58: e3 ff ff cb bi 8004a84 =============================================================================== 080063a4 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 80063a4: 37 9c ff e4 addi sp,sp,-28 80063a8: 5b 8b 00 1c sw (sp+28),r11 80063ac: 5b 8c 00 18 sw (sp+24),r12 80063b0: 5b 8d 00 14 sw (sp+20),r13 80063b4: 5b 8e 00 10 sw (sp+16),r14 80063b8: 5b 8f 00 0c sw (sp+12),r15 80063bc: 5b 90 00 08 sw (sp+8),r16 80063c0: 5b 9d 00 04 sw (sp+4),ra 80063c4: b8 20 78 00 mv r15,r1 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 80063c8: 44 20 00 1a be r1,r0,8006430 <== NEVER TAKEN #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 80063cc: 78 01 08 02 mvhi r1,0x802 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 80063d0: 78 0e 08 02 mvhi r14,0x802 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 80063d4: 38 21 85 c0 ori r1,r1,0x85c0 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 80063d8: 39 ce 85 c4 ori r14,r14,0x85c4 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 80063dc: 34 30 00 10 addi r16,r1,16 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 80063e0: 29 c1 00 00 lw r1,(r14+0) 80063e4: 44 20 00 11 be r1,r0,8006428 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 80063e8: 28 2d 00 04 lw r13,(r1+4) if ( !information ) 80063ec: 45 a0 00 0f be r13,r0,8006428 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 80063f0: 2d a3 00 10 lhu r3,(r13+16) 80063f4: 44 60 00 0d be r3,r0,8006428 <== NEVER TAKEN 80063f8: 34 0c 00 04 mvi r12,4 80063fc: 34 0b 00 01 mvi r11,1 the_thread = (Thread_Control *)information->local_table[ i ]; 8006400: 29 a2 00 1c lw r2,(r13+28) information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 8006404: 35 6b 00 01 addi r11,r11,1 the_thread = (Thread_Control *)information->local_table[ i ]; 8006408: b4 4c 10 00 add r2,r2,r12 800640c: 28 42 00 00 lw r2,(r2+0) information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 8006410: 35 8c 00 04 addi r12,r12,4 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; (*routine)(the_thread); 8006414: b8 40 08 00 mv r1,r2 continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 8006418: 44 40 00 03 be r2,r0,8006424 continue; (*routine)(the_thread); 800641c: d9 e0 00 00 call r15 8006420: 2d a3 00 10 lhu r3,(r13+16) information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 8006424: 50 6b ff f7 bgeu r3,r11,8006400 8006428: 35 ce 00 04 addi r14,r14,4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 800642c: 5d d0 ff ed bne r14,r16,80063e0 (*routine)(the_thread); } } } 8006430: 2b 9d 00 04 lw ra,(sp+4) 8006434: 2b 8b 00 1c lw r11,(sp+28) 8006438: 2b 8c 00 18 lw r12,(sp+24) 800643c: 2b 8d 00 14 lw r13,(sp+20) 8006440: 2b 8e 00 10 lw r14,(sp+16) 8006444: 2b 8f 00 0c lw r15,(sp+12) 8006448: 2b 90 00 08 lw r16,(sp+8) 800644c: 37 9c 00 1c addi sp,sp,28 8006450: c3 a0 00 00 ret =============================================================================== 080085b0 : */ void rtems_libio_free( rtems_libio_t *iop ) { 80085b0: 37 9c ff f4 addi sp,sp,-12 80085b4: 5b 8b 00 0c sw (sp+12),r11 80085b8: 5b 8c 00 08 sw (sp+8),r12 80085bc: 5b 9d 00 04 sw (sp+4),ra 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 ); 80085c0: 78 0c 08 01 mvhi r12,0x801 80085c4: 39 8c 36 a8 ori r12,r12,0x36a8 80085c8: b8 20 58 00 mv r11,r1 80085cc: 29 81 00 00 lw r1,(r12+0) 80085d0: 34 02 00 00 mvi r2,0 80085d4: 34 03 00 00 mvi r3,0 80085d8: fb ff e9 e1 calli 8002d5c rtems_libio_lock(); if (iop->sem) 80085dc: 29 61 00 30 lw r1,(r11+48) 80085e0: 44 20 00 02 be r1,r0,80085e8 <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 80085e4: f8 00 01 d7 calli 8008d40 iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 80085e8: 78 02 08 01 mvhi r2,0x801 rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 80085ec: 29 65 00 18 lw r5,(r11+24) iop->data1 = rtems_libio_iop_freelist; 80085f0: 38 42 36 a4 ori r2,r2,0x36a4 80085f4: 28 44 00 00 lw r4,(r2+0) } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 80085f8: 29 81 00 00 lw r1,(r12+0) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 80085fc: 34 03 fe ff mvi r3,-257 8008600: a0 a3 18 00 and r3,r5,r3 8008604: 59 63 00 18 sw (r11+24),r3 iop->data1 = rtems_libio_iop_freelist; 8008608: 59 64 00 38 sw (r11+56),r4 rtems_libio_iop_freelist = iop; 800860c: 58 4b 00 00 sw (r2+0),r11 8008610: fb ff ea 2f calli 8002ecc rtems_libio_unlock(); } 8008614: 2b 9d 00 04 lw ra,(sp+4) 8008618: 2b 8b 00 0c lw r11,(sp+12) 800861c: 2b 8c 00 08 lw r12,(sp+8) 8008620: 37 9c 00 0c addi sp,sp,12 8008624: c3 a0 00 00 ret =============================================================================== 080016b4 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 80016b4: 37 9c ff f8 addi sp,sp,-8 80016b8: 5b 8b 00 08 sw (sp+8),r11 80016bc: 5b 9d 00 04 sw (sp+4),ra rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 80016c0: 78 01 08 01 mvhi r1,0x801 80016c4: 38 21 30 10 ori r1,r1,0x3010 80016c8: 28 2b 00 00 lw r11,(r1+0) 80016cc: 45 60 00 1d be r11,r0,8001740 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 80016d0: 34 02 00 40 mvi r2,64 80016d4: b9 60 08 00 mv r1,r11 80016d8: fb ff fe ed calli 800128c 80016dc: 78 02 08 01 mvhi r2,0x801 80016e0: 38 42 36 a0 ori r2,r2,0x36a0 80016e4: 58 41 00 00 sw (r2+0),r1 80016e8: b8 20 18 00 mv r3,r1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 80016ec: 44 20 00 2a be r1,r0,8001794 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 80016f0: 78 02 08 01 mvhi r2,0x801 80016f4: 38 42 36 a4 ori r2,r2,0x36a4 80016f8: 58 41 00 00 sw (r2+0),r1 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 80016fc: 34 02 00 01 mvi r2,1 8001700: 50 4b 00 0f bgeu r2,r11,800173c <== NEVER TAKEN * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) 8001704: 34 22 00 40 addi r2,r1,64 8001708: 34 03 00 01 mvi r3,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; 800170c: 58 42 ff f8 sw (r2+-8),r2 8001710: 34 63 00 01 addi r3,r3,1 8001714: 34 42 00 40 addi r2,r2,64 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++) 8001718: 5c 6b ff fd bne r3,r11,800170c * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) 800171c: 34 63 ff ff addi r3,r3,-1 8001720: b4 63 18 00 add r3,r3,r3 8001724: b4 63 18 00 add r3,r3,r3 8001728: b4 63 18 00 add r3,r3,r3 800172c: b4 63 18 00 add r3,r3,r3 8001730: b4 63 18 00 add r3,r3,r3 8001734: b4 63 18 00 add r3,r3,r3 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++) 8001738: b4 23 18 00 add r3,r1,r3 iop->data1 = iop + 1; iop->data1 = NULL; 800173c: 58 60 00 38 sw (r3+56),r0 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 8001740: 78 02 08 01 mvhi r2,0x801 8001744: 38 42 21 84 ori r2,r2,0x2184 8001748: 28 41 00 00 lw r1,(r2+0) 800174c: 78 05 08 01 mvhi r5,0x801 8001750: 34 03 00 54 mvi r3,84 8001754: 34 02 00 01 mvi r2,1 8001758: 34 04 00 00 mvi r4,0 800175c: 38 a5 36 a8 ori r5,r5,0x36a8 8001760: f8 00 04 fb calli 8002b4c 8001764: b8 20 18 00 mv r3,r1 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 8001768: 5c 20 00 0a bne r1,r0,8001790 <== NEVER TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 800176c: 78 02 08 01 mvhi r2,0x801 8001770: 38 42 30 0c ori r2,r2,0x300c 8001774: 28 41 00 00 lw r1,(r2+0) 8001778: 44 23 00 02 be r1,r3,8001780 <== NEVER TAKEN (* rtems_fs_init_helper)(); 800177c: d8 20 00 00 call r1 } 8001780: 2b 9d 00 04 lw ra,(sp+4) 8001784: 2b 8b 00 08 lw r11,(sp+8) 8001788: 37 9c 00 08 addi sp,sp,8 800178c: c3 a0 00 00 ret RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 8001790: f8 00 07 4f calli 80034cc <== 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); 8001794: 34 01 00 1a mvi r1,26 8001798: f8 00 07 4d calli 80034cc =============================================================================== 080086d0 : */ int rtems_libio_is_file_open( void *node_access ) { 80086d0: 37 9c ff f0 addi sp,sp,-16 80086d4: 5b 8b 00 10 sw (sp+16),r11 80086d8: 5b 8c 00 0c sw (sp+12),r12 80086dc: 5b 8d 00 08 sw (sp+8),r13 80086e0: 5b 9d 00 04 sw (sp+4),ra 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 ); 80086e4: 78 0c 08 01 mvhi r12,0x801 80086e8: 39 8c 36 a8 ori r12,r12,0x36a8 80086ec: b8 20 58 00 mv r11,r1 80086f0: 29 81 00 00 lw r1,(r12+0) 80086f4: 34 02 00 00 mvi r2,0 80086f8: 34 03 00 00 mvi r3,0 80086fc: fb ff e9 98 calli 8002d5c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 8008700: 78 01 08 01 mvhi r1,0x801 8008704: 38 21 30 10 ori r1,r1,0x3010 8008708: 28 25 00 00 lw r5,(r1+0) 800870c: 78 01 08 01 mvhi r1,0x801 8008710: 38 21 36 a0 ori r1,r1,0x36a0 8008714: 28 22 00 00 lw r2,(r1+0) int rtems_libio_is_file_open( void *node_access ) { rtems_libio_t *iop; int result=0; 8008718: 34 0d 00 00 mvi r13,0 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 800871c: 44 a0 00 0c be r5,r0,800874c <== NEVER TAKEN 8008720: 34 03 00 00 mvi r3,0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 8008724: 28 44 00 18 lw r4,(r2+24) /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 8008728: 34 63 00 01 addi r3,r3,1 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 800872c: 20 84 01 00 andi r4,r4,0x100 8008730: 44 80 00 03 be r4,r0,800873c /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 8008734: 28 41 00 1c lw r1,(r2+28) 8008738: 44 2b 00 0e be r1,r11,8008770 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 800873c: 50 65 00 03 bgeu r3,r5,8008748 8008740: 34 42 00 40 addi r2,r2,64 8008744: e3 ff ff f8 bi 8008724 int rtems_libio_is_file_open( void *node_access ) { rtems_libio_t *iop; int result=0; 8008748: 34 0d 00 00 mvi r13,0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 800874c: 29 81 00 00 lw r1,(r12+0) 8008750: fb ff e9 df calli 8002ecc } rtems_libio_unlock(); return result; } 8008754: b9 a0 08 00 mv r1,r13 8008758: 2b 9d 00 04 lw ra,(sp+4) 800875c: 2b 8b 00 10 lw r11,(sp+16) 8008760: 2b 8c 00 0c lw r12,(sp+12) 8008764: 2b 8d 00 08 lw r13,(sp+8) 8008768: 37 9c 00 10 addi sp,sp,16 800876c: c3 a0 00 00 ret * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { result = 1; 8008770: 34 0d 00 01 mvi r13,1 8008774: e3 ff ff f6 bi 800874c =============================================================================== 08008628 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 8008628: 37 9c ff f0 addi sp,sp,-16 800862c: 5b 8b 00 10 sw (sp+16),r11 8008630: 5b 8c 00 0c sw (sp+12),r12 8008634: 5b 8d 00 08 sw (sp+8),r13 8008638: 5b 9d 00 04 sw (sp+4),ra 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 ); 800863c: 78 0c 08 01 mvhi r12,0x801 8008640: 39 8c 36 a8 ori r12,r12,0x36a8 8008644: b8 20 58 00 mv r11,r1 8008648: 29 81 00 00 lw r1,(r12+0) 800864c: 34 02 00 00 mvi r2,0 8008650: 34 03 00 00 mvi r3,0 8008654: fb ff e9 c2 calli 8002d5c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 8008658: 78 01 08 01 mvhi r1,0x801 800865c: 38 21 30 10 ori r1,r1,0x3010 8008660: 28 25 00 00 lw r5,(r1+0) 8008664: 78 01 08 01 mvhi r1,0x801 8008668: 38 21 36 a0 ori r1,r1,0x36a0 800866c: 28 22 00 00 lw r2,(r1+0) int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { rtems_libio_t *iop; int result = 0; 8008670: 34 0d 00 00 mvi r13,0 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 8008674: 44 a0 00 0c be r5,r0,80086a4 <== NEVER TAKEN 8008678: 34 03 00 00 mvi r3,0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 800867c: 28 44 00 18 lw r4,(r2+24) /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 8008680: 34 63 00 01 addi r3,r3,1 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 8008684: 20 84 01 00 andi r4,r4,0x100 8008688: 44 80 00 03 be r4,r0,8008694 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 800868c: 28 41 00 2c lw r1,(r2+44) 8008690: 44 2b 00 0e be r1,r11,80086c8 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 8008694: 50 65 00 03 bgeu r3,r5,80086a0 8008698: 34 42 00 40 addi r2,r2,64 800869c: e3 ff ff f8 bi 800867c int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { rtems_libio_t *iop; int result = 0; 80086a0: 34 0d 00 00 mvi r13,0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 80086a4: 29 81 00 00 lw r1,(r12+0) 80086a8: fb ff ea 09 calli 8002ecc } rtems_libio_unlock(); return result; } 80086ac: b9 a0 08 00 mv r1,r13 80086b0: 2b 9d 00 04 lw ra,(sp+4) 80086b4: 2b 8b 00 10 lw r11,(sp+16) 80086b8: 2b 8c 00 0c lw r12,(sp+12) 80086bc: 2b 8d 00 08 lw r13,(sp+8) 80086c0: 37 9c 00 10 addi sp,sp,16 80086c4: c3 a0 00 00 ret * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { result = 1; 80086c8: 34 0d 00 01 mvi r13,1 80086cc: e3 ff ff f6 bi 80086a4 =============================================================================== 08002c04 : rtems_status_code rtems_libio_set_private_env(void) { 8002c04: 37 9c ff cc addi sp,sp,-52 8002c08: 5b 8b 00 1c sw (sp+28),r11 8002c0c: 5b 8c 00 18 sw (sp+24),r12 8002c10: 5b 8d 00 14 sw (sp+20),r13 8002c14: 5b 8e 00 10 sw (sp+16),r14 8002c18: 5b 8f 00 0c sw (sp+12),r15 8002c1c: 5b 90 00 08 sw (sp+8),r16 8002c20: 5b 9d 00 04 sw (sp+4),ra rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 8002c24: 34 01 00 00 mvi r1,0 8002c28: 34 02 00 00 mvi r2,0 8002c2c: 37 83 00 34 addi r3,sp,52 8002c30: f8 00 03 5a calli 8003998 8002c34: b8 20 70 00 mv r14,r1 if (sc != RTEMS_SUCCESSFUL) return sc; 8002c38: 5c 20 00 52 bne r1,r0,8002d80 <== NEVER TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 8002c3c: 78 0d 08 01 mvhi r13,0x801 8002c40: 39 ad 31 04 ori r13,r13,0x3104 8002c44: 29 ac 00 00 lw r12,(r13+0) 8002c48: 78 0b 08 01 mvhi r11,0x801 8002c4c: 39 6b 36 d8 ori r11,r11,0x36d8 8002c50: 45 8b 00 56 be r12,r11,8002da8 return sc; } rtems_current_user_env = tmp; } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 8002c54: 29 61 00 00 lw r1,(r11+0) * 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); 8002c58: 78 0f 08 01 mvhi r15,0x801 8002c5c: 39 ef 22 e0 ori r15,r15,0x22e0 return sc; } rtems_current_user_env = tmp; } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 8002c60: 59 81 00 00 sw (r12+0),r1 8002c64: 29 61 00 04 lw r1,(r11+4) * 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); 8002c68: 37 90 00 20 addi r16,sp,32 8002c6c: 34 02 00 01 mvi r2,1 return sc; } rtems_current_user_env = tmp; } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 8002c70: 59 81 00 04 sw (r12+4),r1 8002c74: 29 61 00 08 lw r1,(r11+8) * 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); 8002c78: 34 03 00 00 mvi r3,0 8002c7c: ba 00 20 00 mv r4,r16 return sc; } rtems_current_user_env = tmp; } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 8002c80: 59 81 00 08 sw (r12+8),r1 8002c84: 29 66 00 0c lw r6,(r11+12) * 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); 8002c88: 34 05 00 00 mvi r5,0 8002c8c: b9 e0 08 00 mv r1,r15 return sc; } rtems_current_user_env = tmp; } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 8002c90: 59 86 00 0c sw (r12+12),r6 8002c94: 29 66 00 10 lw r6,(r11+16) 8002c98: 59 86 00 10 sw (r12+16),r6 8002c9c: 29 66 00 14 lw r6,(r11+20) 8002ca0: 59 86 00 14 sw (r12+20),r6 8002ca4: 29 66 00 18 lw r6,(r11+24) 8002ca8: 59 86 00 18 sw (r12+24),r6 8002cac: 29 66 00 1c lw r6,(r11+28) 8002cb0: 59 86 00 1c sw (r12+28),r6 8002cb4: 29 66 00 20 lw r6,(r11+32) 8002cb8: 59 86 00 20 sw (r12+32),r6 8002cbc: 29 66 00 24 lw r6,(r11+36) 8002cc0: 59 86 00 24 sw (r12+36),r6 8002cc4: 29 66 00 28 lw r6,(r11+40) 8002cc8: 59 86 00 28 sw (r12+40),r6 8002ccc: 29 66 00 2c lw r6,(r11+44) 8002cd0: 59 86 00 2c sw (r12+44),r6 8002cd4: 29 66 00 30 lw r6,(r11+48) 8002cd8: 59 86 00 30 sw (r12+48),r6 8002cdc: 29 66 00 34 lw r6,(r11+52) 8002ce0: 59 86 00 34 sw (r12+52),r6 8002ce4: 29 66 00 38 lw r6,(r11+56) 8002ce8: 59 86 00 38 sw (r12+56),r6 8002cec: 29 66 00 3c lw r6,(r11+60) 8002cf0: 59 86 00 3c sw (r12+60),r6 8002cf4: 29 66 00 40 lw r6,(r11+64) 8002cf8: 59 86 00 40 sw (r12+64),r6 8002cfc: 29 66 00 44 lw r6,(r11+68) 8002d00: 59 86 00 44 sw (r12+68),r6 rtems_current_user_env->task_id=task_id; /* mark the local values*/ 8002d04: 2b 86 00 34 lw r6,(sp+52) 8002d08: 59 86 00 00 sw (r12+0),r6 * 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); 8002d0c: fb ff fa 43 calli 8001618 rtems_filesystem_root = loc; 8002d10: 29 a1 00 00 lw r1,(r13+0) 8002d14: 2b 82 00 20 lw r2,(sp+32) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8002d18: 34 03 00 00 mvi r3,0 8002d1c: ba 00 20 00 mv r4,r16 * 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; 8002d20: 58 22 00 18 sw (r1+24),r2 8002d24: 2b 82 00 24 lw r2,(sp+36) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8002d28: 34 05 00 00 mvi r5,0 * 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; 8002d2c: 58 22 00 1c sw (r1+28),r2 8002d30: 2b 82 00 28 lw r2,(sp+40) 8002d34: 58 22 00 20 sw (r1+32),r2 8002d38: 2b 82 00 2c lw r2,(sp+44) 8002d3c: 58 22 00 24 sw (r1+36),r2 8002d40: 2b 82 00 30 lw r2,(sp+48) 8002d44: 58 22 00 28 sw (r1+40),r2 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8002d48: 34 02 00 01 mvi r2,1 8002d4c: b9 e0 08 00 mv r1,r15 8002d50: fb ff fa 32 calli 8001618 rtems_filesystem_current = loc; 8002d54: 29 a1 00 00 lw r1,(r13+0) 8002d58: 2b 82 00 20 lw r2,(sp+32) 8002d5c: 58 22 00 04 sw (r1+4),r2 8002d60: 2b 82 00 24 lw r2,(sp+36) 8002d64: 58 22 00 08 sw (r1+8),r2 8002d68: 2b 82 00 28 lw r2,(sp+40) 8002d6c: 58 22 00 0c sw (r1+12),r2 8002d70: 2b 82 00 2c lw r2,(sp+44) 8002d74: 58 22 00 10 sw (r1+16),r2 8002d78: 2b 82 00 30 lw r2,(sp+48) 8002d7c: 58 22 00 14 sw (r1+20),r2 return RTEMS_SUCCESSFUL; } 8002d80: b9 c0 08 00 mv r1,r14 8002d84: 2b 9d 00 04 lw ra,(sp+4) 8002d88: 2b 8b 00 1c lw r11,(sp+28) 8002d8c: 2b 8c 00 18 lw r12,(sp+24) 8002d90: 2b 8d 00 14 lw r13,(sp+20) 8002d94: 2b 8e 00 10 lw r14,(sp+16) 8002d98: 2b 8f 00 0c lw r15,(sp+12) 8002d9c: 2b 90 00 08 lw r16,(sp+8) 8002da0: 37 9c 00 34 addi sp,sp,52 8002da4: c3 a0 00 00 ret 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)); 8002da8: 34 01 00 48 mvi r1,72 8002dac: fb ff fc 56 calli 8001f04 8002db0: b8 20 60 00 mv r12,r1 if (!tmp) 8002db4: 44 20 00 0a be r1,r0,8002ddc <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add( 8002db8: 78 03 08 00 mvhi r3,0x800 8002dbc: 34 01 00 00 mvi r1,0 8002dc0: b9 a0 10 00 mv r2,r13 8002dc4: 38 63 2b c0 ori r3,r3,0x2bc0 8002dc8: f8 00 03 6c calli 8003b78 8002dcc: b8 20 78 00 mv r15,r1 RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) { 8002dd0: 5c 20 00 05 bne r1,r0,8002de4 <== NEVER TAKEN * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 8002dd4: 59 ac 00 00 sw (r13+0),r12 8002dd8: e3 ff ff 9f bi 8002c54 /* 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) return RTEMS_NO_MEMORY; 8002ddc: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED 8002de0: e3 ff ff e8 bi 8002d80 <== NOT EXECUTED ); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 8002de4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8002de8: fb ff fa 6e calli 80017a0 <== NOT EXECUTED return sc; 8002dec: b9 e0 70 00 mv r14,r15 <== NOT EXECUTED 8002df0: e3 ff ff e4 bi 8002d80 <== NOT EXECUTED =============================================================================== 08002df4 : * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 8002df4: 37 9c ff e4 addi sp,sp,-28 <== NOT EXECUTED 8002df8: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8002dfc: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8002e00: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8002e04: 5b 9d 00 04 sw (sp+4),ra <== 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); 8002e08: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8002e0c: 37 83 00 18 addi r3,sp,24 <== NOT EXECUTED * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 8002e10: b8 20 68 00 mv r13,r1 <== 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); 8002e14: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8002e18: f8 00 02 e0 calli 8003998 <== NOT EXECUTED 8002e1c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 8002e20: 5c 20 00 17 bne r1,r0,8002e7c <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 8002e24: 78 0b 08 01 mvhi r11,0x801 <== NOT EXECUTED 8002e28: 39 6b 31 04 ori r11,r11,0x3104 <== NOT EXECUTED 8002e2c: 29 6c 00 00 lw r12,(r11+0) <== NOT EXECUTED 8002e30: 2b 82 00 18 lw r2,(sp+24) <== NOT EXECUTED 8002e34: 29 83 00 00 lw r3,(r12+0) <== NOT EXECUTED 8002e38: 44 62 00 18 be r3,r2,8002e98 <== 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( 8002e3c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8002e40: 37 83 00 1c addi r3,sp,28 <== NOT EXECUTED 8002e44: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8002e48: f8 00 03 bb calli 8003d34 <== NOT EXECUTED 8002e4c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8002e50: b9 60 10 00 mv r2,r11 <== NOT EXECUTED task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 8002e54: 5c 20 00 07 bne r1,r0,8002e70 <== NOT EXECUTED goto bailout; } /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_add( 8002e58: 78 03 08 00 mvhi r3,0x800 <== NOT EXECUTED 8002e5c: 38 63 2b c0 ori r3,r3,0x2bc0 <== NOT EXECUTED 8002e60: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8002e64: f8 00 03 45 calli 8003b78 <== NOT EXECUTED 8002e68: b8 20 18 00 mv r3,r1 <== NOT EXECUTED RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) 8002e6c: 44 20 00 14 be r1,r0,8002ebc <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 8002e70: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8002e74: 38 21 36 d8 ori r1,r1,0x36d8 <== NOT EXECUTED 8002e78: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED return sc; } 8002e7c: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 8002e80: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8002e84: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8002e88: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8002e8c: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8002e90: 37 9c 00 1c addi sp,sp,28 <== NOT EXECUTED 8002e94: c3 a0 00 00 ret <== 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); 8002e98: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8002e9c: f8 00 03 76 calli 8003c74 <== NOT EXECUTED 8002ea0: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 8002ea4: 5c 20 ff f6 bne r1,r0,8002e7c <== NOT EXECUTED free_user_env(tmp); 8002ea8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8002eac: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 8002eb0: fb ff ff 44 calli 8002bc0 <== NOT EXECUTED 8002eb4: 2b 82 00 14 lw r2,(sp+20) <== NOT EXECUTED 8002eb8: e3 ff ff e8 bi 8002e58 <== 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; 8002ebc: 2b 81 00 1c lw r1,(sp+28) <== NOT EXECUTED 8002ec0: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; } 8002ec4: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 8002ec8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8002ecc: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8002ed0: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8002ed4: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8002ed8: 37 9c 00 1c addi sp,sp,28 <== NOT EXECUTED 8002edc: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 08008470 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 8008470: 20 24 00 06 andi r4,r1,0x6 8008474: 34 03 00 06 mvi r3,6 fcntl_flags |= O_RDWR; 8008478: 34 02 00 02 mvi r2,2 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 800847c: 44 83 00 04 be r4,r3,800848c <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 8008480: 20 23 00 02 andi r3,r1,0x2 fcntl_flags |= O_RDONLY; 8008484: 34 02 00 00 mvi r2,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) { 8008488: 44 60 00 0c be r3,r0,80084b8 <== NEVER TAKEN 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 ) { 800848c: 20 23 00 01 andi r3,r1,0x1 8008490: 44 60 00 02 be r3,r0,8008498 fcntl_flags |= O_NONBLOCK; 8008494: 38 42 40 00 ori r2,r2,0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 8008498: 20 23 02 00 andi r3,r1,0x200 800849c: 44 60 00 02 be r3,r0,80084a4 fcntl_flags |= O_APPEND; 80084a0: 38 42 00 08 ori r2,r2,0x8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 80084a4: 20 21 04 00 andi r1,r1,0x400 80084a8: 44 20 00 02 be r1,r0,80084b0 fcntl_flags |= O_CREAT; 80084ac: 38 42 02 00 ori r2,r2,0x200 } return fcntl_flags; } 80084b0: b8 40 08 00 mv r1,r2 80084b4: c3 a0 00 00 ret if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { 80084b8: 20 22 00 04 andi r2,r1,0x4 <== NOT EXECUTED ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 80084bc: 7c 42 00 00 cmpnei r2,r2,0 <== NOT EXECUTED 80084c0: e3 ff ff f3 bi 800848c <== NOT EXECUTED =============================================================================== 080061c0 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 80061c0: 37 9c ff f8 addi sp,sp,-8 80061c4: 5b 9d 00 04 sw (sp+4),ra uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 80061c8: 78 03 08 02 mvhi r3,0x802 80061cc: 38 63 40 1c ori r3,r3,0x401c * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 80061d0: b8 20 10 00 mv r2,r1 uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 80061d4: 28 61 00 00 lw r1,(r3+0) 80061d8: 37 83 00 08 addi r3,sp,8 80061dc: f8 00 12 ee calli 800ad94 <_Protected_heap_Get_block_size> 80061e0: 44 20 00 0b be r1,r0,800620c <== NEVER TAKEN MSBUMP(lifetime_freed, size); 80061e4: 78 01 08 02 mvhi r1,0x802 80061e8: 38 21 4f d8 ori r1,r1,0x4fd8 80061ec: 2b 83 00 08 lw r3,(sp+8) 80061f0: 28 22 00 2c lw r2,(r1+44) 80061f4: 28 24 00 28 lw r4,(r1+40) 80061f8: b4 62 10 00 add r2,r3,r2 80061fc: f4 62 18 00 cmpgu r3,r3,r2 8006200: 58 22 00 2c sw (r1+44),r2 8006204: b4 64 10 00 add r2,r3,r4 8006208: 58 22 00 28 sw (r1+40),r2 } } 800620c: 2b 9d 00 04 lw ra,(sp+4) 8006210: 37 9c 00 08 addi sp,sp,8 8006214: c3 a0 00 00 ret =============================================================================== 08006218 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 8006218: 37 9c ff f8 addi sp,sp,-8 800621c: 5b 9d 00 04 sw (sp+4),ra uintptr_t actual_size = 0; 8006220: 5b 80 00 08 sw (sp+8),r0 } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 8006224: b8 20 10 00 mv r2,r1 uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 8006228: 44 20 00 15 be r1,r0,800627c <== NEVER TAKEN return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 800622c: 78 03 08 02 mvhi r3,0x802 8006230: 38 63 40 1c ori r3,r3,0x401c 8006234: 28 61 00 00 lw r1,(r3+0) 8006238: 37 83 00 08 addi r3,sp,8 800623c: f8 00 12 d6 calli 800ad94 <_Protected_heap_Get_block_size> MSBUMP(lifetime_allocated, actual_size); 8006240: 78 01 08 02 mvhi r1,0x802 8006244: 38 21 4f d8 ori r1,r1,0x4fd8 8006248: 2b 83 00 08 lw r3,(sp+8) 800624c: 28 22 00 24 lw r2,(r1+36) 8006250: 28 26 00 20 lw r6,(r1+32) current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 8006254: 28 25 00 2c lw r5,(r1+44) if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 8006258: b4 62 10 00 add r2,r3,r2 800625c: f4 62 18 00 cmpgu r3,r3,r2 current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 8006260: 28 24 00 18 lw r4,(r1+24) if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 8006264: b4 66 18 00 add r3,r3,r6 8006268: 58 22 00 24 sw (r1+36),r2 800626c: 58 23 00 20 sw (r1+32),r3 current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 8006270: c8 45 10 00 sub r2,r2,r5 if (current_depth > s->max_depth) 8006274: 50 82 00 02 bgeu r4,r2,800627c s->max_depth = current_depth; 8006278: 58 22 00 18 sw (r1+24),r2 } 800627c: 2b 9d 00 04 lw ra,(sp+4) 8006280: 37 9c 00 08 addi sp,sp,8 8006284: c3 a0 00 00 ret =============================================================================== 0800d064 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 800d064: 37 9c ff ec addi sp,sp,-20 800d068: 5b 8b 00 14 sw (sp+20),r11 800d06c: 5b 8c 00 10 sw (sp+16),r12 800d070: 5b 8d 00 0c sw (sp+12),r13 800d074: 5b 8e 00 08 sw (sp+8),r14 800d078: 5b 9d 00 04 sw (sp+4),ra /* * Parameter error checks */ if ( !pointer ) return EINVAL; 800d07c: 34 0c 00 16 mvi r12,22 int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 800d080: b8 20 58 00 mv r11,r1 800d084: b8 40 68 00 mv r13,r2 800d088: b8 60 70 00 mv r14,r3 void *return_this; /* * Parameter error checks */ if ( !pointer ) 800d08c: 44 20 00 1b be r1,r0,800d0f8 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 800d090: 78 01 08 01 mvhi r1,0x801 800d094: 38 21 8a 1c ori r1,r1,0x8a1c 800d098: 28 22 00 00 lw r2,(r1+0) * Parameter error checks */ if ( !pointer ) return EINVAL; *pointer = NULL; 800d09c: 59 60 00 00 sw (r11+0),r0 /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 800d0a0: 34 01 00 03 mvi r1,3 800d0a4: 44 41 00 1d be r2,r1,800d118 <== ALWAYS TAKEN return EINVAL; /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 800d0a8: fb ff d6 81 calli 8002aac Heap_Control *heap, uintptr_t size, uintptr_t alignment ) { return 800d0ac: 78 01 08 01 mvhi r1,0x801 800d0b0: 38 21 80 1c ori r1,r1,0x801c 800d0b4: 28 21 00 00 lw r1,(r1+0) 800d0b8: b9 a0 18 00 mv r3,r13 800d0bc: b9 c0 10 00 mv r2,r14 800d0c0: 34 04 00 00 mvi r4,0 800d0c4: fb ff e4 44 calli 80061d4 <_Protected_heap_Allocate_aligned_with_boundary> 800d0c8: b8 20 68 00 mv r13,r1 RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) return ENOMEM; 800d0cc: 34 0c 00 0c mvi r12,12 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 800d0d0: 44 20 00 0a be r1,r0,800d0f8 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 800d0d4: 78 02 08 01 mvhi r2,0x801 800d0d8: 38 42 86 30 ori r2,r2,0x8630 800d0dc: 28 41 00 00 lw r1,(r2+0) 800d0e0: 44 20 00 04 be r1,r0,800d0f0 (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 800d0e4: 28 22 00 04 lw r2,(r1+4) 800d0e8: b9 60 08 00 mv r1,r11 800d0ec: d8 40 00 00 call r2 *pointer = return_this; 800d0f0: 59 6d 00 00 sw (r11+0),r13 return 0; 800d0f4: 34 0c 00 00 mvi r12,0 } 800d0f8: b9 80 08 00 mv r1,r12 800d0fc: 2b 9d 00 04 lw ra,(sp+4) 800d100: 2b 8b 00 14 lw r11,(sp+20) 800d104: 2b 8c 00 10 lw r12,(sp+16) 800d108: 2b 8d 00 0c lw r13,(sp+12) 800d10c: 2b 8e 00 08 lw r14,(sp+8) 800d110: 37 9c 00 14 addi sp,sp,20 800d114: c3 a0 00 00 ret /* * 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() ) 800d118: fb ff d6 53 calli 8002a64 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 800d11c: 5c 20 ff e3 bne r1,r0,800d0a8 <== ALWAYS TAKEN 800d120: e3 ff ff f6 bi 800d0f8 <== NOT EXECUTED =============================================================================== 0800b280 : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { 800b280: 37 9c ff 84 addi sp,sp,-124 800b284: 5b 8b 00 34 sw (sp+52),r11 800b288: 5b 8c 00 30 sw (sp+48),r12 800b28c: 5b 8d 00 2c sw (sp+44),r13 800b290: 5b 8e 00 28 sw (sp+40),r14 800b294: 5b 8f 00 24 sw (sp+36),r15 800b298: 5b 90 00 20 sw (sp+32),r16 800b29c: 5b 91 00 1c sw (sp+28),r17 800b2a0: 5b 92 00 18 sw (sp+24),r18 800b2a4: 5b 93 00 14 sw (sp+20),r19 800b2a8: 5b 94 00 10 sw (sp+16),r20 800b2ac: 5b 95 00 0c sw (sp+12),r21 800b2b0: 5b 96 00 08 sw (sp+8),r22 800b2b4: 5b 9d 00 04 sw (sp+4),ra 800b2b8: b8 40 88 00 mv r17,r2 int success = 0; char *dup_path = strdup(path); 800b2bc: f8 00 0c c8 calli 800e5dc 800b2c0: b8 20 68 00 mv r13,r1 if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); } return success != 0 ? 0 : -1; 800b2c4: 34 01 ff ff mvi r1,-1 rtems_mkdir(const char *path, mode_t mode) { int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { 800b2c8: 45 a0 00 31 be r13,r0,800b38c <== NEVER TAKEN char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 800b2cc: 41 a3 00 00 lbu r3,(r13+0) 800b2d0: 34 01 00 2f mvi r1,47 800b2d4: b9 a0 58 00 mv r11,r13 800b2d8: 44 61 00 4d be r3,r1,800b40c 800b2dc: 34 0e 00 00 mvi r14,0 800b2e0: 34 04 00 01 mvi r4,1 retval = 0; break; } } if (!last) *p = '/'; 800b2e4: 34 10 00 2f mvi r16,47 first = 0; } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { if (errno == EEXIST || errno == EISDIR) { 800b2e8: 34 13 00 11 mvi r19,17 if (stat(path, &sb) < 0) { 800b2ec: 37 94 00 38 addi r20,sp,56 retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { 800b2f0: 34 15 40 00 mvi r21,16384 first = 0; } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { if (errno == EEXIST || errno == EISDIR) { 800b2f4: 34 16 00 15 mvi r22,21 * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); 800b2f8: 34 12 ff 3f mvi r18,-193 if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') 800b2fc: 34 0f 00 2f mvi r15,47 oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') 800b300: 44 60 00 05 be r3,r0,800b314 <== NEVER TAKEN last = 1; else if (p[0] != '/') 800b304: 44 6f 00 3e be r3,r15,800b3fc p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { 800b308: 35 6b 00 01 addi r11,r11,1 800b30c: 41 63 00 00 lbu r3,(r11+0) if (p[0] == '\0') 800b310: 5c 60 ff fd bne r3,r0,800b304 last = 1; else if (p[0] != '/') continue; *p = '\0'; 800b314: 31 60 00 00 sb (r11+0),r0 800b318: 34 0c 00 01 mvi r12,1 if (!last && p[1] == '\0') last = 1; if (first) { 800b31c: 5c 80 00 32 bne r4,r0,800b3e4 (void)umask(numask); first = 0; } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 800b320: 34 02 01 ff mvi r2,511 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) 800b324: 5d 80 00 2c bne r12,r0,800b3d4 (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 800b328: b9 a0 08 00 mv r1,r13 800b32c: fb ff e0 0a calli 8003354 800b330: 4c 20 00 11 bge r1,r0,800b374 if (errno == EEXIST || errno == EISDIR) { 800b334: f8 00 08 21 calli 800d3b8 <__errno> 800b338: 28 21 00 00 lw r1,(r1+0) 800b33c: 44 33 00 04 be r1,r19,800b34c <== ALWAYS TAKEN 800b340: f8 00 08 1e calli 800d3b8 <__errno> <== NOT EXECUTED 800b344: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 800b348: 5c 36 00 45 bne r1,r22,800b45c <== NOT EXECUTED if (stat(path, &sb) < 0) { 800b34c: b9 a0 08 00 mv r1,r13 800b350: ba 80 10 00 mv r2,r20 800b354: f8 00 00 44 calli 800b464 800b358: 48 01 00 41 bg r0,r1,800b45c <== NEVER TAKEN retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { 800b35c: 2b 81 00 44 lw r1,(sp+68) 800b360: 20 21 f0 00 andi r1,r1,0xf000 800b364: 5c 35 00 2d bne r1,r21,800b418 else errno = ENOTDIR; retval = 0; break; } if (last) 800b368: 45 80 00 18 be r12,r0,800b3c8 retval = 2; 800b36c: 34 0b 00 02 mvi r11,2 800b370: e0 00 00 03 bi 800b37c } else { retval = 0; break; } } if (!last) 800b374: 45 80 00 15 be r12,r0,800b3c8 800b378: 34 0b 00 01 mvi r11,1 int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); 800b37c: b9 a0 08 00 mv r1,r13 800b380: fb ff dd dc calli 8002af0 } return success != 0 ? 0 : -1; 800b384: 34 01 00 00 mvi r1,0 800b388: 45 60 00 33 be r11,r0,800b454 <== NEVER TAKEN } 800b38c: 2b 9d 00 04 lw ra,(sp+4) 800b390: 2b 8b 00 34 lw r11,(sp+52) 800b394: 2b 8c 00 30 lw r12,(sp+48) 800b398: 2b 8d 00 2c lw r13,(sp+44) 800b39c: 2b 8e 00 28 lw r14,(sp+40) 800b3a0: 2b 8f 00 24 lw r15,(sp+36) 800b3a4: 2b 90 00 20 lw r16,(sp+32) 800b3a8: 2b 91 00 1c lw r17,(sp+28) 800b3ac: 2b 92 00 18 lw r18,(sp+24) 800b3b0: 2b 93 00 14 lw r19,(sp+20) 800b3b4: 2b 94 00 10 lw r20,(sp+16) 800b3b8: 2b 95 00 0c lw r21,(sp+12) 800b3bc: 2b 96 00 08 lw r22,(sp+8) 800b3c0: 37 9c 00 7c addi sp,sp,124 800b3c4: c3 a0 00 00 ret retval = 0; break; } } if (!last) *p = '/'; 800b3c8: 31 70 00 00 sb (r11+0),r16 800b3cc: 34 04 00 00 mvi r4,0 800b3d0: e3 ff ff ce bi 800b308 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) (void)umask(oumask); 800b3d4: b9 c0 08 00 mv r1,r14 800b3d8: f8 00 00 5b calli 800b544 if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 800b3dc: ba 20 10 00 mv r2,r17 800b3e0: e3 ff ff d2 bi 800b328 * mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); 800b3e4: 34 01 00 00 mvi r1,0 800b3e8: f8 00 00 57 calli 800b544 800b3ec: b8 20 70 00 mv r14,r1 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); 800b3f0: a0 32 08 00 and r1,r1,r18 800b3f4: f8 00 00 54 calli 800b544 800b3f8: e3 ff ff ca bi 800b320 if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; if (!last && p[1] == '\0') 800b3fc: 41 6c 00 01 lbu r12,(r11+1) for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; 800b400: 31 60 00 00 sb (r11+0),r0 if (!last && p[1] == '\0') 800b404: 65 8c 00 00 cmpei r12,r12,0 800b408: e3 ff ff c5 bi 800b31c p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; 800b40c: 41 a3 00 01 lbu r3,(r13+1) 800b410: 35 ab 00 01 addi r11,r13,1 800b414: e3 ff ff b2 bi 800b2dc if (errno == EEXIST || errno == EISDIR) { if (stat(path, &sb) < 0) { retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { if (last) 800b418: 45 80 00 08 be r12,r0,800b438 <== NEVER TAKEN errno = EEXIST; 800b41c: f8 00 07 e7 calli 800d3b8 <__errno> 800b420: 34 02 00 11 mvi r2,17 800b424: 58 22 00 00 sw (r1+0),r2 int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); 800b428: b9 a0 08 00 mv r1,r13 800b42c: fb ff dd b1 calli 8002af0 } return success != 0 ? 0 : -1; 800b430: 34 01 ff ff mvi r1,-1 800b434: e3 ff ff d6 bi 800b38c break; } else if (!S_ISDIR(sb.st_mode)) { if (last) errno = EEXIST; else errno = ENOTDIR; 800b438: f8 00 07 e0 calli 800d3b8 <__errno> <== NOT EXECUTED 800b43c: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 800b440: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED } if (!last) *p = '/'; } if (!first && !last) (void)umask(oumask); 800b444: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 800b448: f8 00 00 3f calli 800b544 <== NOT EXECUTED int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); 800b44c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800b450: fb ff dd a8 calli 8002af0 <== NOT EXECUTED } return success != 0 ? 0 : -1; 800b454: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800b458: e3 ff ff cd bi 800b38c <== NOT EXECUTED } } if (!last) *p = '/'; } if (!first && !last) 800b45c: 45 80 ff fa be r12,r0,800b444 <== NOT EXECUTED 800b460: e3 ff ff fb bi 800b44c <== NOT EXECUTED =============================================================================== 08004d74 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 8004d74: 37 9c ff f8 addi sp,sp,-8 8004d78: 5b 8b 00 08 sw (sp+8),r11 8004d7c: 5b 9d 00 04 sw (sp+4),ra 8004d80: b8 60 58 00 mv r11,r3 /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 8004d84: 34 03 00 09 mvi r3,9 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 8004d88: 45 60 00 1d be r11,r0,8004dfc return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 8004d8c: f8 00 07 aa calli 8006c34 <_Objects_Get_information> 8004d90: b8 20 10 00 mv r2,r1 if ( !obj_info ) return RTEMS_INVALID_NUMBER; 8004d94: 34 03 00 0a mvi r3,10 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 8004d98: 44 20 00 19 be r1,r0,8004dfc return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 8004d9c: 28 24 00 08 lw r4,(r1+8) info->maximum_id = obj_info->maximum_id; 8004da0: 28 23 00 0c lw r3,(r1+12) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 8004da4: 2c 46 00 10 lhu r6,(r2+16) /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; 8004da8: 40 21 00 12 lbu r1,(r1+18) return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 8004dac: 59 64 00 00 sw (r11+0),r4 info->maximum_id = obj_info->maximum_id; 8004db0: 59 63 00 04 sw (r11+4),r3 info->auto_extend = obj_info->auto_extend; 8004db4: 31 61 00 0c sb (r11+12),r1 info->maximum = obj_info->maximum; 8004db8: 59 66 00 08 sw (r11+8),r6 for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 8004dbc: 34 04 00 00 mvi r4,0 8004dc0: 44 c0 00 0d be r6,r0,8004df4 <== NEVER TAKEN 8004dc4: 28 43 00 1c lw r3,(r2+28) 8004dc8: 34 01 00 01 mvi r1,1 8004dcc: 34 02 00 01 mvi r2,1 if ( !obj_info->local_table[i] ) 8004dd0: b4 21 08 00 add r1,r1,r1 8004dd4: b4 21 08 00 add r1,r1,r1 8004dd8: b4 61 08 00 add r1,r3,r1 8004ddc: 28 25 00 00 lw r5,(r1+0) info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 8004de0: 34 42 00 01 addi r2,r2,1 8004de4: b8 40 08 00 mv r1,r2 if ( !obj_info->local_table[i] ) unallocated++; 8004de8: 64 a5 00 00 cmpei r5,r5,0 8004dec: b4 85 20 00 add r4,r4,r5 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 8004df0: 50 c2 ff f8 bgeu r6,r2,8004dd0 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 8004df4: 59 64 00 10 sw (r11+16),r4 return RTEMS_SUCCESSFUL; 8004df8: 34 03 00 00 mvi r3,0 } 8004dfc: b8 60 08 00 mv r1,r3 8004e00: 2b 9d 00 04 lw ra,(sp+4) 8004e04: 2b 8b 00 08 lw r11,(sp+8) 8004e08: 37 9c 00 08 addi sp,sp,8 8004e0c: c3 a0 00 00 ret =============================================================================== 080114b8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 80114b8: 37 9c ff d8 addi sp,sp,-40 80114bc: 5b 8b 00 18 sw (sp+24),r11 80114c0: 5b 8c 00 14 sw (sp+20),r12 80114c4: 5b 8d 00 10 sw (sp+16),r13 80114c8: 5b 8e 00 0c sw (sp+12),r14 80114cc: 5b 8f 00 08 sw (sp+8),r15 80114d0: 5b 9d 00 04 sw (sp+4),ra register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 80114d4: 34 07 00 03 mvi r7,3 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 80114d8: b8 20 60 00 mv r12,r1 80114dc: b8 40 58 00 mv r11,r2 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 80114e0: 44 20 00 3e be r1,r0,80115d8 return RTEMS_INVALID_NAME; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 80114e4: 34 07 00 09 mvi r7,9 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) 80114e8: 44 40 00 3c be r2,r0,80115d8 return RTEMS_INVALID_ADDRESS; if ( !id ) 80114ec: 44 c0 00 3b be r6,r0,80115d8 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 80114f0: 64 82 00 00 cmpei r2,r4,0 80114f4: 64 61 00 00 cmpei r1,r3,0 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 80114f8: 34 07 00 08 mvi r7,8 return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 80114fc: b8 41 08 00 or r1,r2,r1 8011500: 5c 20 00 36 bne r1,r0,80115d8 8011504: 54 83 00 35 bgu r4,r3,80115d8 */ RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned ( uint32_t buffer_size ) { return ((buffer_size % CPU_PARTITION_ALIGNMENT) == 0); 8011508: 20 81 00 07 andi r1,r4,0x7 801150c: 5c 20 00 33 bne r1,r0,80115d8 ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 8011510: 21 6f 00 07 andi r15,r11,0x7 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; 8011514: 34 07 00 09 mvi r7,9 if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 8011518: 5d e1 00 30 bne r15,r1,80115d8 801151c: 78 01 08 03 mvhi r1,0x803 8011520: 38 21 ec 2c ori r1,r1,0xec2c 8011524: 28 22 00 00 lw r2,(r1+0) 8011528: 34 42 00 01 addi r2,r2,1 801152c: 58 22 00 00 sw (r1+0),r2 * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 8011530: 78 0e 08 03 mvhi r14,0x803 8011534: 39 ce ea 80 ori r14,r14,0xea80 8011538: b9 c0 08 00 mv r1,r14 801153c: 5b 83 00 28 sw (sp+40),r3 8011540: 5b 84 00 20 sw (sp+32),r4 8011544: 5b 85 00 24 sw (sp+36),r5 8011548: 5b 86 00 1c sw (sp+28),r6 801154c: f8 00 16 99 calli 8016fb0 <_Objects_Allocate> 8011550: b8 20 68 00 mv r13,r1 _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 8011554: 2b 83 00 28 lw r3,(sp+40) 8011558: 2b 84 00 20 lw r4,(sp+32) 801155c: 2b 85 00 24 lw r5,(sp+36) 8011560: 2b 86 00 1c lw r6,(sp+28) 8011564: 44 2f 00 26 be r1,r15,80115fc #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 8011568: 58 25 00 1c sw (r1+28),r5 return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; 801156c: 58 23 00 14 sw (r1+20),r3 the_partition->buffer_size = buffer_size; 8011570: 58 24 00 18 sw (r1+24),r4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 8011574: 58 2b 00 10 sw (r1+16),r11 the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 8011578: 58 20 00 20 sw (r1+32),r0 _Chain_Initialize( &the_partition->Memory, starting_address, length / buffer_size, buffer_size ); 801157c: b8 80 10 00 mv r2,r4 the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 8011580: 34 2f 00 24 addi r15,r1,36 length / buffer_size, buffer_size ); 8011584: b8 60 08 00 mv r1,r3 8011588: 5b 86 00 1c sw (sp+28),r6 801158c: 5b 84 00 20 sw (sp+32),r4 8011590: f8 00 79 e2 calli 802fd18 <__udivsi3> the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 8011594: 2b 84 00 20 lw r4,(sp+32) length / buffer_size, buffer_size ); 8011598: b8 20 18 00 mv r3,r1 the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 801159c: b9 60 10 00 mv r2,r11 80115a0: b9 e0 08 00 mv r1,r15 80115a4: f8 00 0f 83 calli 80153b0 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 80115a8: 29 a2 00 08 lw r2,(r13+8) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 80115ac: 29 c3 00 1c lw r3,(r14+28) Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 80115b0: 20 41 ff ff andi r1,r2,0xffff #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 80115b4: b4 21 08 00 add r1,r1,r1 80115b8: b4 21 08 00 add r1,r1,r1 80115bc: b4 61 08 00 add r1,r3,r1 80115c0: 58 2d 00 00 sw (r1+0),r13 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 80115c4: 59 ac 00 0c sw (r13+12),r12 &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 80115c8: 2b 86 00 1c lw r6,(sp+28) 80115cc: 58 c2 00 00 sw (r6+0),r2 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 80115d0: f8 00 1a fe calli 80181c8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 80115d4: 34 07 00 00 mvi r7,0 } 80115d8: b8 e0 08 00 mv r1,r7 80115dc: 2b 9d 00 04 lw ra,(sp+4) 80115e0: 2b 8b 00 18 lw r11,(sp+24) 80115e4: 2b 8c 00 14 lw r12,(sp+20) 80115e8: 2b 8d 00 10 lw r13,(sp+16) 80115ec: 2b 8e 00 0c lw r14,(sp+12) 80115f0: 2b 8f 00 08 lw r15,(sp+8) 80115f4: 37 9c 00 28 addi sp,sp,40 80115f8: c3 a0 00 00 ret _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 80115fc: f8 00 1a f3 calli 80181c8 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 8011600: 34 07 00 05 mvi r7,5 8011604: e3 ff ff f5 bi 80115d8 =============================================================================== 08000fb0 : void rtems_print_buffer( const unsigned char *buffer, int length ) { 8000fb0: 37 9c ff 50 addi sp,sp,-176 8000fb4: 5b 8b 00 38 sw (sp+56),r11 8000fb8: 5b 8c 00 34 sw (sp+52),r12 8000fbc: 5b 8d 00 30 sw (sp+48),r13 8000fc0: 5b 8e 00 2c sw (sp+44),r14 8000fc4: 5b 8f 00 28 sw (sp+40),r15 8000fc8: 5b 90 00 24 sw (sp+36),r16 8000fcc: 5b 91 00 20 sw (sp+32),r17 8000fd0: 5b 92 00 1c sw (sp+28),r18 8000fd4: 5b 93 00 18 sw (sp+24),r19 8000fd8: 5b 94 00 14 sw (sp+20),r20 8000fdc: 5b 95 00 10 sw (sp+16),r21 8000fe0: 5b 96 00 0c sw (sp+12),r22 8000fe4: 5b 97 00 08 sw (sp+8),r23 8000fe8: 5b 9d 00 04 sw (sp+4),ra 8000fec: b8 40 a8 00 mv r21,r2 8000ff0: b8 20 b0 00 mv r22,r1 int i, mod, max; if ( !length ) return; 8000ff4: 44 40 00 41 be r2,r0,80010f8 mod = length % 16; 8000ff8: b8 40 08 00 mv r1,r2 8000ffc: 34 02 00 1f mvi r2,31 8001000: f8 00 70 40 calli 801d100 <__ashrsi3> 8001004: 9a a1 98 00 xor r19,r21,r1 8001008: ca 61 98 00 sub r19,r19,r1 800100c: 22 73 00 0f andi r19,r19,0xf 8001010: 9a 61 98 00 xor r19,r19,r1 8001014: ca 61 98 00 sub r19,r19,r1 max = length - mod; 8001018: ca b3 a8 00 sub r21,r21,r19 for ( i=0 ; i 8001020: 78 0f 08 01 mvhi r15,0x801 8001024: 78 0d 08 02 mvhi r13,0x802 8001028: 78 0e 08 01 mvhi r14,0x801 800102c: 34 12 00 00 mvi r18,0 8001030: 37 8b 00 3c addi r11,sp,60 8001034: 39 ef e4 24 ori r15,r15,0xe424 8001038: 39 ad 01 a0 ori r13,r13,0x1a0 800103c: 39 ce e4 2c ori r14,r14,0xe42c int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 8001078: b9 60 08 00 mv r1,r11 800107c: f8 00 3b ae calli 800ff34 8001080: b5 61 10 00 add r2,r11,r1 8001084: 30 54 00 00 sb (r2+0),r20 8001088: 30 40 00 01 sb (r2+1),r0 for( i=0 ; i 80010c0: b8 a0 20 00 mv r4,r5 80010c4: f8 00 3a 71 calli 800fa88 for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); 80010cc: b9 60 08 00 mv r1,r11 80010d0: f8 00 3b 99 calli 800ff34 80010d4: b5 61 10 00 add r2,r11,r1 mod = length % 16; max = length - mod; for ( i=0 ; i mod = length % 16; max = length - mod; for ( i=0 ; i Dump_Line( &buffer[ i ], 16 ); if ( mod ) 80010f4: 5e 60 00 11 bne r19,r0,8001138 Dump_Line( &buffer[ max ], mod ); } 80010f8: 2b 9d 00 04 lw ra,(sp+4) 80010fc: 2b 8b 00 38 lw r11,(sp+56) 8001100: 2b 8c 00 34 lw r12,(sp+52) 8001104: 2b 8d 00 30 lw r13,(sp+48) 8001108: 2b 8e 00 2c lw r14,(sp+44) 800110c: 2b 8f 00 28 lw r15,(sp+40) 8001110: 2b 90 00 24 lw r16,(sp+36) 8001114: 2b 91 00 20 lw r17,(sp+32) 8001118: 2b 92 00 1c lw r18,(sp+28) 800111c: 2b 93 00 18 lw r19,(sp+24) 8001120: 2b 94 00 14 lw r20,(sp+20) 8001124: 2b 95 00 10 lw r21,(sp+16) 8001128: 2b 96 00 0c lw r22,(sp+12) 800112c: 2b 97 00 08 lw r23,(sp+8) 8001130: 37 9c 00 b0 addi sp,sp,176 8001134: c3 a0 00 00 ret { int i; char line_buffer[120]; line_buffer[0] = '\0'; 8001138: 33 80 00 3c sb (sp+60),r0 for ( i=0 ; i <== ALWAYS TAKEN 8001144: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 8001148: 37 8b 00 3c addi r11,sp,60 <== NOT EXECUTED sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); 800114c: 34 0d 00 20 mvi r13,32 line_buffer[0] = '\0'; for( i=0 ; i 800115c: b5 61 08 00 add r1,r11,r1 8001160: 30 2d 00 00 sb (r1+0),r13 8001164: 30 2d 00 01 sb (r1+1),r13 8001168: 30 2d 00 02 sb (r1+2),r13 800116c: 30 20 00 03 sb (r1+3),r0 line_buffer[0] = '\0'; for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 8001178: b9 60 08 00 mv r1,r11 800117c: f8 00 3b 6e calli 800ff34 8001180: b5 61 08 00 add r1,r11,r1 8001184: 34 02 00 7c mvi r2,124 8001188: 30 22 00 00 sb (r1+0),r2 800118c: 30 20 00 01 sb (r1+1),r0 for( i=0 ; i <== ALWAYS TAKEN 8001194: 34 13 00 00 mvi r19,0 <== NOT EXECUTED sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); 8001198: 34 0d 00 20 mvi r13,32 strcat( line_buffer, "|" ); for( i=0 ; i 80011a8: b5 61 08 00 add r1,r11,r1 80011ac: 30 2d 00 00 sb (r1+0),r13 80011b0: 30 20 00 01 sb (r1+1),r0 strcat( line_buffer, "|" ); for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); 80011bc: b9 60 08 00 mv r1,r11 80011c0: f8 00 3b 5d calli 800ff34 80011c4: b5 61 08 00 add r1,r11,r1 80011c8: 34 02 00 7c mvi r2,124 80011cc: 30 22 00 00 sb (r1+0),r2 80011d0: 34 02 00 0a mvi r2,10 80011d4: 30 22 00 01 sb (r1+1),r2 80011d8: 30 20 00 02 sb (r1+2),r0 printk( line_buffer ); 80011dc: b9 60 08 00 mv r1,r11 80011e0: f8 00 08 71 calli 80033a4 80011e4: e3 ff ff c5 bi 80010f8 80011e8: 78 0f 08 01 mvhi r15,0x801 int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) 8001218: 34 01 00 0f mvi r1,15 800121c: ba 60 60 00 mv r12,r19 8001220: 4c 33 ff cb bge r1,r19,800114c <== ALWAYS TAKEN strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 8001224: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001228: f8 00 3b 43 calli 800ff34 <== NOT EXECUTED 800122c: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED 8001230: 34 02 00 7c mvi r2,124 <== NOT EXECUTED 8001234: 30 22 00 00 sb (r1+0),r2 <== NOT EXECUTED 8001238: 30 20 00 01 sb (r1+1),r0 <== NOT EXECUTED 800123c: 78 0d 08 02 mvhi r13,0x802 8001240: 78 0e 08 01 mvhi r14,0x801 for( i=0 ; i 8001280: b8 a0 20 00 mv r4,r5 8001284: f8 00 3a 01 calli 800fa88 for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) 800128c: 34 01 00 0f mvi r1,15 8001290: 4c 33 ff c2 bge r1,r19,8001198 <== ALWAYS TAKEN 8001294: e3 ff ff ca bi 80011bc <== NOT EXECUTED =============================================================================== 0800436c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 800436c: 37 9c ff e0 addi sp,sp,-32 8004370: 5b 8b 00 18 sw (sp+24),r11 8004374: 5b 8c 00 14 sw (sp+20),r12 8004378: 5b 8d 00 10 sw (sp+16),r13 800437c: 5b 8e 00 0c sw (sp+12),r14 8004380: 5b 8f 00 08 sw (sp+8),r15 8004384: 5b 9d 00 04 sw (sp+4),ra Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 8004388: 78 03 08 01 mvhi r3,0x801 800438c: b8 20 68 00 mv r13,r1 8004390: b8 60 08 00 mv r1,r3 8004394: b8 40 70 00 mv r14,r2 8004398: 38 21 f8 18 ori r1,r1,0xf818 800439c: b9 a0 10 00 mv r2,r13 80043a0: 37 83 00 20 addi r3,sp,32 80043a4: f8 00 0a 6e calli 8006d5c <_Objects_Get> 80043a8: b8 20 58 00 mv r11,r1 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 80043ac: 2b 81 00 20 lw r1,(sp+32) 80043b0: 44 20 00 0a be r1,r0,80043d8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 80043b4: 34 01 00 04 mvi r1,4 } 80043b8: 2b 9d 00 04 lw ra,(sp+4) 80043bc: 2b 8b 00 18 lw r11,(sp+24) 80043c0: 2b 8c 00 14 lw r12,(sp+20) 80043c4: 2b 8d 00 10 lw r13,(sp+16) 80043c8: 2b 8e 00 0c lw r14,(sp+12) 80043cc: 2b 8f 00 08 lw r15,(sp+8) 80043d0: 37 9c 00 20 addi sp,sp,32 80043d4: c3 a0 00 00 ret RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 80043d8: 78 0c 08 01 mvhi r12,0x801 80043dc: 39 8c fb 10 ori r12,r12,0xfb10 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 80043e0: 29 62 00 40 lw r2,(r11+64) 80043e4: 29 81 00 0c lw r1,(r12+12) 80043e8: 44 41 00 0b be r2,r1,8004414 _Thread_Enable_dispatch(); 80043ec: f8 00 0c fc calli 80077dc <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 80043f0: 34 01 00 17 mvi r1,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 80043f4: 2b 9d 00 04 lw ra,(sp+4) 80043f8: 2b 8b 00 18 lw r11,(sp+24) 80043fc: 2b 8c 00 14 lw r12,(sp+20) 8004400: 2b 8d 00 10 lw r13,(sp+16) 8004404: 2b 8e 00 0c lw r14,(sp+12) 8004408: 2b 8f 00 08 lw r15,(sp+8) 800440c: 37 9c 00 20 addi sp,sp,32 8004410: c3 a0 00 00 ret if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 8004414: 45 c0 00 31 be r14,r0,80044d8 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 8004418: 90 00 78 00 rcsr r15,IE 800441c: 34 01 ff fe mvi r1,-2 8004420: a1 e1 08 00 and r1,r15,r1 8004424: d0 01 00 00 wcsr IE,r1 switch ( the_period->state ) { 8004428: 29 61 00 38 lw r1,(r11+56) 800442c: 34 02 00 02 mvi r2,2 8004430: 44 22 00 35 be r1,r2,8004504 8004434: 34 02 00 04 mvi r2,4 8004438: 44 22 00 18 be r1,r2,8004498 800443c: 5c 20 ff de bne r1,r0,80043b4 <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 8004440: d0 0f 00 00 wcsr IE,r15 /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 8004444: b9 60 08 00 mv r1,r11 8004448: fb ff ff 54 calli 8004198 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 800444c: 78 03 08 00 mvhi r3,0x800 8004450: 38 63 48 fc ori r3,r3,0x48fc the_period->state = RATE_MONOTONIC_ACTIVE; 8004454: 34 04 00 02 mvi r4,2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8004458: 78 01 08 01 mvhi r1,0x801 800445c: 38 21 fa 08 ori r1,r1,0xfa08 8004460: 35 62 00 10 addi r2,r11,16 8004464: 59 64 00 38 sw (r11+56),r4 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 8004468: 59 63 00 2c sw (r11+44),r3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 800446c: 59 60 00 18 sw (r11+24),r0 the_watchdog->routine = routine; the_watchdog->id = id; 8004470: 59 6d 00 30 sw (r11+48),r13 the_watchdog->user_data = user_data; 8004474: 59 60 00 34 sw (r11+52),r0 _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 8004478: 59 6e 00 3c sw (r11+60),r14 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 800447c: 59 6e 00 1c sw (r11+28),r14 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8004480: f8 00 13 1c calli 80090f0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 8004484: 34 01 00 00 mvi r1,0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 8004488: 5b 81 00 1c sw (sp+28),r1 800448c: f8 00 0c d4 calli 80077dc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 8004490: 2b 81 00 1c lw r1,(sp+28) 8004494: e3 ff ff d8 bi 80043f4 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 8004498: b9 60 08 00 mv r1,r11 800449c: fb ff ff 6a calli 8004244 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 80044a0: d0 0f 00 00 wcsr IE,r15 the_period->state = RATE_MONOTONIC_ACTIVE; 80044a4: 34 03 00 02 mvi r3,2 80044a8: 78 01 08 01 mvhi r1,0x801 80044ac: 38 21 fa 08 ori r1,r1,0xfa08 80044b0: 35 62 00 10 addi r2,r11,16 80044b4: 59 63 00 38 sw (r11+56),r3 the_period->next_length = length; 80044b8: 59 6e 00 3c sw (r11+60),r14 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 80044bc: 59 6e 00 1c sw (r11+28),r14 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80044c0: f8 00 13 0c calli 80090f0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 80044c4: 34 01 00 06 mvi r1,6 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 80044c8: 5b 81 00 1c sw (sp+28),r1 80044cc: f8 00 0c c4 calli 80077dc <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 80044d0: 2b 81 00 1c lw r1,(sp+28) 80044d4: e3 ff ff c8 bi 80043f4 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 80044d8: 29 62 00 38 lw r2,(r11+56) 80044dc: 34 03 00 04 mvi r3,4 80044e0: 34 01 00 00 mvi r1,0 80044e4: 54 43 ff f9 bgu r2,r3,80044c8 <== NEVER TAKEN 80044e8: 78 01 08 01 mvhi r1,0x801 80044ec: b4 42 10 00 add r2,r2,r2 80044f0: 38 21 d5 38 ori r1,r1,0xd538 80044f4: b4 42 10 00 add r2,r2,r2 80044f8: b4 22 10 00 add r2,r1,r2 80044fc: 28 41 00 00 lw r1,(r2+0) 8004500: e3 ff ff f2 bi 80044c8 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 8004504: b9 60 08 00 mv r1,r11 8004508: fb ff ff 4f calli 8004244 <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 800450c: 34 01 00 01 mvi r1,1 8004510: 59 61 00 38 sw (r11+56),r1 the_period->next_length = length; 8004514: 59 6e 00 3c sw (r11+60),r14 _ISR_Enable( level ); 8004518: d0 0f 00 00 wcsr IE,r15 _Thread_Executing->Wait.id = the_period->Object.id; 800451c: 29 83 00 0c lw r3,(r12+12) 8004520: 29 64 00 08 lw r4,(r11+8) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8004524: 34 02 40 00 mvi r2,16384 8004528: b8 60 08 00 mv r1,r3 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; 800452c: 58 64 00 20 sw (r3+32),r4 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8004530: f8 00 0f 5f calli 80082ac <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 8004534: 90 00 08 00 rcsr r1,IE 8004538: 34 02 ff fe mvi r2,-2 800453c: a0 22 10 00 and r2,r1,r2 8004540: d0 02 00 00 wcsr IE,r2 local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 8004544: 34 03 00 02 mvi r3,2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 8004548: 29 62 00 38 lw r2,(r11+56) the_period->state = RATE_MONOTONIC_ACTIVE; 800454c: 59 63 00 38 sw (r11+56),r3 _ISR_Enable( level ); 8004550: d0 01 00 00 wcsr IE,r1 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 8004554: 34 01 00 03 mvi r1,3 8004558: 44 41 00 04 be r2,r1,8004568 <== NEVER TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 800455c: f8 00 0c a0 calli 80077dc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 8004560: 34 01 00 00 mvi r1,0 8004564: e3 ff ff a4 bi 80043f4 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8004568: 29 81 00 0c lw r1,(r12+12) <== NOT EXECUTED 800456c: 34 02 40 00 mvi r2,16384 <== NOT EXECUTED 8004570: f8 00 0b ae calli 8007428 <_Thread_Clear_state> <== NOT EXECUTED 8004574: e3 ff ff fa bi 800455c <== NOT EXECUTED =============================================================================== 08004578 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 8004578: 37 9c ff 5c addi sp,sp,-164 800457c: 5b 8b 00 44 sw (sp+68),r11 8004580: 5b 8c 00 40 sw (sp+64),r12 8004584: 5b 8d 00 3c sw (sp+60),r13 8004588: 5b 8e 00 38 sw (sp+56),r14 800458c: 5b 8f 00 34 sw (sp+52),r15 8004590: 5b 90 00 30 sw (sp+48),r16 8004594: 5b 91 00 2c sw (sp+44),r17 8004598: 5b 92 00 28 sw (sp+40),r18 800459c: 5b 93 00 24 sw (sp+36),r19 80045a0: 5b 94 00 20 sw (sp+32),r20 80045a4: 5b 95 00 1c sw (sp+28),r21 80045a8: 5b 96 00 18 sw (sp+24),r22 80045ac: 5b 97 00 14 sw (sp+20),r23 80045b0: 5b 98 00 10 sw (sp+16),r24 80045b4: 5b 99 00 0c sw (sp+12),r25 80045b8: 5b 9b 00 08 sw (sp+8),fp 80045bc: 5b 9d 00 04 sw (sp+4),ra 80045c0: b8 40 68 00 mv r13,r2 80045c4: b8 20 78 00 mv r15,r1 rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 80045c8: 44 40 00 2f be r2,r0,8004684 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 80045cc: 78 02 08 01 mvhi r2,0x801 80045d0: 38 42 d5 4c ori r2,r2,0xd54c 80045d4: d9 a0 00 00 call r13 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 80045d8: 78 02 08 01 mvhi r2,0x801 80045dc: 38 42 d5 6c ori r2,r2,0xd56c 80045e0: b9 e0 08 00 mv r1,r15 80045e4: d9 a0 00 00 call r13 (*print)( context, "--- Wall times are in seconds ---\n" ); 80045e8: 78 02 08 01 mvhi r2,0x801 80045ec: 38 42 d5 90 ori r2,r2,0xd590 80045f0: b9 e0 08 00 mv r1,r15 80045f4: d9 a0 00 00 call r13 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 80045f8: 78 02 08 01 mvhi r2,0x801 80045fc: 38 42 d5 b4 ori r2,r2,0xd5b4 8004600: b9 e0 08 00 mv r1,r15 8004604: d9 a0 00 00 call r13 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 8004608: 78 02 08 01 mvhi r2,0x801 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 800460c: 78 0c 08 01 mvhi r12,0x801 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 8004610: b9 e0 08 00 mv r1,r15 8004614: 38 42 d6 00 ori r2,r2,0xd600 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 8004618: 39 8c f8 18 ori r12,r12,0xf818 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 800461c: d9 a0 00 00 call r13 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 8004620: 29 81 00 0c lw r1,(r12+12) 8004624: 29 8b 00 08 lw r11,(r12+8) 8004628: 55 61 00 17 bgu r11,r1,8004684 <== NEVER TAKEN rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, 800462c: 78 12 08 01 mvhi r18,0x801 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 8004630: 78 15 08 01 mvhi r21,0x801 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 8004634: 78 14 08 01 mvhi r20,0x801 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 8004638: 78 11 08 01 mvhi r17,0x801 800463c: 37 90 00 48 addi r16,sp,72 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 8004640: 37 98 00 80 addi r24,sp,128 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 8004644: 37 93 00 a0 addi r19,sp,160 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 8004648: 3a 52 d6 4c ori r18,r18,0xd64c { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; 800464c: 37 97 00 60 addi r23,sp,96 _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 8004650: 37 96 00 98 addi r22,sp,152 (*print)( context, 8004654: 3a b5 d6 64 ori r21,r21,0xd664 { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; 8004658: 37 9b 00 78 addi fp,sp,120 _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 800465c: 3a 94 d6 84 ori r20,r20,0xd684 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 8004660: 3a 31 cb 90 ori r17,r17,0xcb90 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 8004664: b9 60 08 00 mv r1,r11 8004668: ba 00 10 00 mv r2,r16 800466c: f8 00 1b 9f calli 800b4e8 8004670: b8 20 70 00 mv r14,r1 if ( status != RTEMS_SUCCESSFUL ) 8004674: 44 20 00 17 be r1,r0,80046d0 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 8004678: 29 85 00 0c lw r5,(r12+12) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 800467c: 35 6b 00 01 addi r11,r11,1 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 8004680: 50 ab ff f9 bgeu r5,r11,8004664 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 8004684: 2b 9d 00 04 lw ra,(sp+4) 8004688: 2b 8b 00 44 lw r11,(sp+68) 800468c: 2b 8c 00 40 lw r12,(sp+64) 8004690: 2b 8d 00 3c lw r13,(sp+60) 8004694: 2b 8e 00 38 lw r14,(sp+56) 8004698: 2b 8f 00 34 lw r15,(sp+52) 800469c: 2b 90 00 30 lw r16,(sp+48) 80046a0: 2b 91 00 2c lw r17,(sp+44) 80046a4: 2b 92 00 28 lw r18,(sp+40) 80046a8: 2b 93 00 24 lw r19,(sp+36) 80046ac: 2b 94 00 20 lw r20,(sp+32) 80046b0: 2b 95 00 1c lw r21,(sp+28) 80046b4: 2b 96 00 18 lw r22,(sp+24) 80046b8: 2b 97 00 14 lw r23,(sp+20) 80046bc: 2b 98 00 10 lw r24,(sp+16) 80046c0: 2b 99 00 0c lw r25,(sp+12) 80046c4: 2b 9b 00 08 lw fp,(sp+8) 80046c8: 37 9c 00 a4 addi sp,sp,164 80046cc: c3 a0 00 00 ret status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 80046d0: bb 00 10 00 mv r2,r24 80046d4: b9 60 08 00 mv r1,r11 80046d8: f8 00 1b c4 calli 800b5e8 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 80046dc: 2b 81 00 80 lw r1,(sp+128) 80046e0: ba 60 18 00 mv r3,r19 80046e4: 34 02 00 05 mvi r2,5 80046e8: f8 00 00 ba calli 80049d0 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 80046ec: 2b 85 00 48 lw r5,(sp+72) 80046f0: 2b 86 00 4c lw r6,(sp+76) 80046f4: ba 40 10 00 mv r2,r18 80046f8: b9 60 18 00 mv r3,r11 80046fc: b9 e0 08 00 mv r1,r15 8004700: ba 60 20 00 mv r4,r19 8004704: d9 a0 00 00 call r13 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 8004708: 2b 85 00 48 lw r5,(sp+72) struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 800470c: ba c0 18 00 mv r3,r22 8004710: ba e0 08 00 mv r1,r23 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 8004714: ba 20 10 00 mv r2,r17 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 8004718: 5c ae 00 04 bne r5,r14,8004728 (*print)( context, "\n" ); 800471c: b9 e0 08 00 mv r1,r15 8004720: d9 a0 00 00 call r13 continue; 8004724: e3 ff ff d5 bi 8004678 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 8004728: b8 a0 10 00 mv r2,r5 800472c: f8 00 10 8a calli 8008954 <_Timespec_Divide_by_integer> (*print)( context, 8004730: 2b 81 00 54 lw r1,(sp+84) 8004734: 34 02 03 e8 mvi r2,1000 8004738: f8 00 5d 6e calli 801bcf0 <__divsi3> 800473c: b8 20 c8 00 mv r25,r1 8004740: 2b 81 00 5c lw r1,(sp+92) 8004744: 34 02 03 e8 mvi r2,1000 8004748: f8 00 5d 6a calli 801bcf0 <__divsi3> 800474c: b8 20 70 00 mv r14,r1 8004750: 2b 81 00 9c lw r1,(sp+156) 8004754: 34 02 03 e8 mvi r2,1000 8004758: f8 00 5d 66 calli 801bcf0 <__divsi3> 800475c: 2b 85 00 58 lw r5,(sp+88) 8004760: 2b 87 00 98 lw r7,(sp+152) 8004764: 2b 83 00 50 lw r3,(sp+80) 8004768: b8 20 40 00 mv r8,r1 800476c: bb 20 20 00 mv r4,r25 8004770: b9 c0 30 00 mv r6,r14 8004774: ba a0 10 00 mv r2,r21 8004778: b9 e0 08 00 mv r1,r15 800477c: d9 a0 00 00 call r13 struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 8004780: 2b 82 00 48 lw r2,(sp+72) 8004784: ba c0 18 00 mv r3,r22 8004788: bb 60 08 00 mv r1,fp 800478c: f8 00 10 72 calli 8008954 <_Timespec_Divide_by_integer> (*print)( context, 8004790: 2b 81 00 6c lw r1,(sp+108) 8004794: 34 02 03 e8 mvi r2,1000 8004798: f8 00 5d 56 calli 801bcf0 <__divsi3> 800479c: b8 20 c8 00 mv r25,r1 80047a0: 2b 81 00 74 lw r1,(sp+116) 80047a4: 34 02 03 e8 mvi r2,1000 80047a8: f8 00 5d 52 calli 801bcf0 <__divsi3> 80047ac: b8 20 70 00 mv r14,r1 80047b0: 2b 81 00 9c lw r1,(sp+156) 80047b4: 34 02 03 e8 mvi r2,1000 80047b8: f8 00 5d 4e calli 801bcf0 <__divsi3> 80047bc: 2b 83 00 68 lw r3,(sp+104) 80047c0: 2b 85 00 70 lw r5,(sp+112) 80047c4: 2b 87 00 98 lw r7,(sp+152) 80047c8: b8 20 40 00 mv r8,r1 80047cc: ba 80 10 00 mv r2,r20 80047d0: b9 e0 08 00 mv r1,r15 80047d4: bb 20 20 00 mv r4,r25 80047d8: b9 c0 30 00 mv r6,r14 80047dc: d9 a0 00 00 call r13 80047e0: e3 ff ff a6 bi 8004678 =============================================================================== 08004808 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 8004808: 37 9c ff f4 addi sp,sp,-12 800480c: 5b 8b 00 0c sw (sp+12),r11 8004810: 5b 8c 00 08 sw (sp+8),r12 8004814: 5b 9d 00 04 sw (sp+4),ra rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8004818: 78 01 08 01 mvhi r1,0x801 800481c: 38 21 f9 44 ori r1,r1,0xf944 8004820: 28 22 00 00 lw r2,(r1+0) 8004824: 34 42 00 01 addi r2,r2,1 8004828: 58 22 00 00 sw (r1+0),r2 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 800482c: 78 0c 08 01 mvhi r12,0x801 8004830: 39 8c f8 18 ori r12,r12,0xf818 8004834: 29 8b 00 08 lw r11,(r12+8) 8004838: 29 81 00 0c lw r1,(r12+12) 800483c: 55 61 00 06 bgu r11,r1,8004854 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 8004840: b9 60 08 00 mv r1,r11 8004844: f8 00 00 0a calli 800486c /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 8004848: 29 81 00 0c lw r1,(r12+12) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 800484c: 35 6b 00 01 addi r11,r11,1 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 8004850: 50 2b ff fc bgeu r1,r11,8004840 } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 8004854: f8 00 0b e2 calli 80077dc <_Thread_Enable_dispatch> } 8004858: 2b 9d 00 04 lw ra,(sp+4) 800485c: 2b 8b 00 0c lw r11,(sp+12) 8004860: 2b 8c 00 08 lw r12,(sp+8) 8004864: 37 9c 00 0c addi sp,sp,12 8004868: c3 a0 00 00 ret =============================================================================== 08002b4c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 8002b4c: 37 9c ff c4 addi sp,sp,-60 8002b50: 5b 8b 00 18 sw (sp+24),r11 8002b54: 5b 8c 00 14 sw (sp+20),r12 8002b58: 5b 8d 00 10 sw (sp+16),r13 8002b5c: 5b 8e 00 0c sw (sp+12),r14 8002b60: 5b 8f 00 08 sw (sp+8),r15 8002b64: 5b 9d 00 04 sw (sp+4),ra 8002b68: b8 20 60 00 mv r12,r1 8002b6c: b8 40 58 00 mv r11,r2 CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 8002b70: 34 01 00 03 mvi r1,3 register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 8002b74: 45 80 00 09 be r12,r0,8002b98 return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 8002b78: 34 01 00 09 mvi r1,9 CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 8002b7c: 44 a0 00 07 be r5,r0,8002b98 * id - semaphore id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_semaphore_create( 8002b80: 20 62 00 c0 andi r2,r3,0xc0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 8002b84: 44 40 00 45 be r2,r0,8002c98 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 8002b88: 20 67 00 30 andi r7,r3,0x30 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 8002b8c: 34 06 00 10 mvi r6,16 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; 8002b90: 34 01 00 0b mvi r1,11 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 8002b94: 44 e6 00 09 be r7,r6,8002bb8 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 8002b98: 2b 9d 00 04 lw ra,(sp+4) 8002b9c: 2b 8b 00 18 lw r11,(sp+24) 8002ba0: 2b 8c 00 14 lw r12,(sp+20) 8002ba4: 2b 8d 00 10 lw r13,(sp+16) 8002ba8: 2b 8e 00 0c lw r14,(sp+12) 8002bac: 2b 8f 00 08 lw r15,(sp+8) 8002bb0: 37 9c 00 3c addi sp,sp,60 8002bb4: c3 a0 00 00 ret */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_priority( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_PRIORITY ) ? true : false; 8002bb8: 20 66 00 04 andi r6,r3,0x4 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 8002bbc: 44 c0 ff f7 be r6,r0,8002b98 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 8002bc0: 34 06 00 c0 mvi r6,192 8002bc4: 34 0f 00 10 mvi r15,16 8002bc8: 44 46 ff f4 be r2,r6,8002b98 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 8002bcc: 34 02 00 01 mvi r2,1 return RTEMS_INVALID_NUMBER; 8002bd0: 34 01 00 0a mvi r1,10 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 8002bd4: 55 62 ff f1 bgu r11,r2,8002b98 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8002bd8: 78 01 08 01 mvhi r1,0x801 8002bdc: 38 21 38 1c ori r1,r1,0x381c 8002be0: 28 22 00 00 lw r2,(r1+0) 8002be4: 34 42 00 01 addi r2,r2,1 8002be8: 58 22 00 00 sw (r1+0),r2 * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 8002bec: 78 0e 08 01 mvhi r14,0x801 8002bf0: 39 ce 37 30 ori r14,r14,0x3730 8002bf4: b9 c0 08 00 mv r1,r14 8002bf8: 5b 83 00 24 sw (sp+36),r3 8002bfc: 5b 84 00 20 sw (sp+32),r4 8002c00: 5b 85 00 1c sw (sp+28),r5 8002c04: f8 00 06 3d calli 80044f8 <_Objects_Allocate> 8002c08: b8 20 68 00 mv r13,r1 _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 8002c0c: 2b 83 00 24 lw r3,(sp+36) 8002c10: 2b 84 00 20 lw r4,(sp+32) 8002c14: 2b 85 00 1c lw r5,(sp+28) 8002c18: 44 20 00 36 be r1,r0,8002cf0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 8002c1c: 58 23 00 10 sw (r1+16),r3 /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 8002c20: 45 e0 00 21 be r15,r0,8002ca4 8002c24: 20 61 00 04 andi r1,r3,0x4 } else { /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) 8002c28: 44 20 00 2e be r1,r0,8002ce0 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 8002c2c: 34 01 00 01 mvi r1,1 8002c30: 5b 81 00 30 sw (sp+48),r1 else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 8002c34: 34 01 00 10 mvi r1,16 8002c38: 45 e1 00 31 be r15,r1,8002cfc the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 8002c3c: 34 01 00 02 mvi r1,2 8002c40: 5b 81 00 28 sw (sp+40),r1 the_mutex_attr.only_owner_release = false; 8002c44: 33 80 00 2c sb (sp+44),r0 } mutex_status = _CORE_mutex_Initialize( 8002c48: 65 63 00 01 cmpei r3,r11,1 8002c4c: 37 82 00 28 addi r2,sp,40 8002c50: 35 a1 00 14 addi r1,r13,20 8002c54: 5b 85 00 1c sw (sp+28),r5 8002c58: f8 00 03 47 calli 8003974 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 8002c5c: 34 02 00 06 mvi r2,6 8002c60: 2b 85 00 1c lw r5,(sp+28) 8002c64: 44 22 00 32 be r1,r2,8002d2c <== NEVER TAKEN Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 8002c68: 29 a2 00 08 lw r2,(r13+8) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 8002c6c: 29 c3 00 1c lw r3,(r14+28) Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 8002c70: 20 41 ff ff andi r1,r2,0xffff #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 8002c74: b4 21 08 00 add r1,r1,r1 8002c78: b4 21 08 00 add r1,r1,r1 8002c7c: b4 61 08 00 add r1,r3,r1 8002c80: 58 2d 00 00 sw (r1+0),r13 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 8002c84: 59 ac 00 0c sw (r13+12),r12 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 8002c88: 58 a2 00 00 sw (r5+0),r2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 8002c8c: f8 00 0a 28 calli 800552c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 8002c90: 34 01 00 00 mvi r1,0 8002c94: e3 ff ff c1 bi 8002b98 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 8002c98: 20 6f 00 30 andi r15,r3,0x30 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 8002c9c: 5d e2 ff cc bne r15,r2,8002bcc 8002ca0: e3 ff ff ce bi 8002bd8 */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 8002ca4: 34 01 ff ff mvi r1,-1 8002ca8: 5b 81 00 38 sw (sp+56),r1 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_priority( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_PRIORITY ) ? true : false; 8002cac: 20 63 00 04 andi r3,r3,0x4 if ( _Attributes_Is_priority( attribute_set ) ) 8002cb0: 44 6f 00 0e be r3,r15,8002ce8 the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 8002cb4: 34 01 00 01 mvi r1,1 8002cb8: 5b 81 00 3c sw (sp+60),r1 * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 8002cbc: 35 a1 00 14 addi r1,r13,20 8002cc0: 37 82 00 38 addi r2,sp,56 8002cc4: b9 60 18 00 mv r3,r11 8002cc8: 5b 85 00 1c sw (sp+28),r5 the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 8002ccc: 5b 80 00 28 sw (sp+40),r0 the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 8002cd0: 5b 80 00 34 sw (sp+52),r0 _CORE_semaphore_Initialize( 8002cd4: f8 00 04 08 calli 8003cf4 <_CORE_semaphore_Initialize> 8002cd8: 2b 85 00 1c lw r5,(sp+28) 8002cdc: e3 ff ff e3 bi 8002c68 * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 8002ce0: 5b 80 00 30 sw (sp+48),r0 8002ce4: e3 ff ff d4 bi 8002c34 the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; else the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 8002ce8: 5b 80 00 3c sw (sp+60),r0 8002cec: e3 ff ff f4 bi 8002cbc _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 8002cf0: f8 00 0a 0f calli 800552c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 8002cf4: 34 01 00 05 mvi r1,5 8002cf8: e3 ff ff a8 bi 8002b98 if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 8002cfc: 2b 81 00 30 lw r1,(sp+48) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; 8002d00: 5b 84 00 34 sw (sp+52),r4 the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 8002d04: 5b 80 00 28 sw (sp+40),r0 the_mutex_attr.only_owner_release = false; 8002d08: 33 80 00 2c sb (sp+44),r0 if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 8002d0c: 34 02 00 01 mvi r2,1 8002d10: 5c 22 ff ce bne r1,r2,8002c48 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_inherit_priority( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_INHERIT_PRIORITY ) ? true : false; 8002d14: 20 62 00 40 andi r2,r3,0x40 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 8002d18: 44 40 00 0b be r2,r0,8002d44 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 8002d1c: 34 02 00 02 mvi r2,2 8002d20: 5b 82 00 30 sw (sp+48),r2 the_mutex_attr.only_owner_release = true; 8002d24: 33 81 00 2c sb (sp+44),r1 8002d28: e3 ff ff c8 bi 8002c48 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 8002d2c: b9 c0 08 00 mv r1,r14 8002d30: b9 a0 10 00 mv r2,r13 8002d34: f8 00 06 f5 calli 8004908 <_Objects_Free> (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 8002d38: f8 00 09 fd calli 800552c <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 8002d3c: 34 01 00 13 mvi r1,19 8002d40: e3 ff ff 96 bi 8002b98 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_priority_ceiling( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_PRIORITY_CEILING ) ? true : false; 8002d44: 20 63 00 80 andi r3,r3,0x80 if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 8002d48: 44 62 ff c0 be r3,r2,8002c48 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 8002d4c: 34 02 00 03 mvi r2,3 8002d50: 5b 82 00 30 sw (sp+48),r2 the_mutex_attr.only_owner_release = true; 8002d54: 33 81 00 2c sb (sp+44),r1 8002d58: e3 ff ff bc bi 8002c48 =============================================================================== 080130ac : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 80130ac: 37 9c ff f4 addi sp,sp,-12 80130b0: 5b 8b 00 08 sw (sp+8),r11 80130b4: 5b 9d 00 04 sw (sp+4),ra Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; 80130b8: 34 03 00 0a mvi r3,10 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 80130bc: b8 40 58 00 mv r11,r2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 80130c0: 5c 40 00 06 bne r2,r0,80130d8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 80130c4: b8 60 08 00 mv r1,r3 80130c8: 2b 9d 00 04 lw ra,(sp+4) 80130cc: 2b 8b 00 08 lw r11,(sp+8) 80130d0: 37 9c 00 0c addi sp,sp,12 80130d4: c3 a0 00 00 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 80130d8: 37 82 00 0c addi r2,sp,12 80130dc: f8 00 14 48 calli 80181fc <_Thread_Get> switch ( location ) { 80130e0: 2b 83 00 0c lw r3,(sp+12) 80130e4: 44 60 00 07 be r3,r0,8013100 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 80130e8: 34 03 00 04 mvi r3,4 } 80130ec: b8 60 08 00 mv r1,r3 80130f0: 2b 9d 00 04 lw ra,(sp+4) 80130f4: 2b 8b 00 08 lw r11,(sp+8) 80130f8: 37 9c 00 0c addi sp,sp,12 80130fc: c3 a0 00 00 ret the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 8013100: 28 22 01 24 lw r2,(r1+292) asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 8013104: 28 44 00 0c lw r4,(r2+12) 8013108: 44 83 00 23 be r4,r3,8013194 if ( asr->is_enabled ) { 801310c: 40 43 00 08 lbu r3,(r2+8) 8013110: 44 60 00 12 be r3,r0,8013158 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 8013114: 90 00 18 00 rcsr r3,IE 8013118: 34 04 ff fe mvi r4,-2 801311c: a0 64 20 00 and r4,r3,r4 8013120: d0 04 00 00 wcsr IE,r4 *signal_set |= signals; 8013124: 28 44 00 14 lw r4,(r2+20) 8013128: b8 8b 58 00 or r11,r4,r11 801312c: 58 4b 00 14 sw (r2+20),r11 _ISR_Enable( _level ); 8013130: d0 03 00 00 wcsr IE,r3 _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 8013134: 78 02 08 03 mvhi r2,0x803 8013138: 38 42 ee 00 ori r2,r2,0xee00 801313c: 28 43 00 08 lw r3,(r2+8) 8013140: 44 60 00 0e be r3,r0,8013178 8013144: 28 43 00 0c lw r3,(r2+12) 8013148: 5c 23 00 0c bne r1,r3,8013178 <== NEVER TAKEN _Context_Switch_necessary = true; 801314c: 34 01 00 01 mvi r1,1 8013150: 30 41 00 18 sb (r2+24),r1 8013154: e0 00 00 09 bi 8013178 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 8013158: 90 00 08 00 rcsr r1,IE 801315c: 34 03 ff fe mvi r3,-2 8013160: a0 23 18 00 and r3,r1,r3 8013164: d0 03 00 00 wcsr IE,r3 *signal_set |= signals; 8013168: 28 43 00 18 lw r3,(r2+24) 801316c: b8 6b 58 00 or r11,r3,r11 8013170: 58 4b 00 18 sw (r2+24),r11 _ISR_Enable( _level ); 8013174: d0 01 00 00 wcsr IE,r1 } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 8013178: f8 00 14 14 calli 80181c8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 801317c: 34 03 00 00 mvi r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8013180: b8 60 08 00 mv r1,r3 8013184: 2b 9d 00 04 lw ra,(sp+4) 8013188: 2b 8b 00 08 lw r11,(sp+8) 801318c: 37 9c 00 0c addi sp,sp,12 8013190: c3 a0 00 00 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 8013194: f8 00 14 0d calli 80181c8 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 8013198: 34 03 00 0b mvi r3,11 801319c: e3 ff ff ca bi 80130c4 =============================================================================== 0800082c : Thread_Control *the_thread ) { Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 800082c: 28 22 00 08 lw r2,(r1+8) 8000830: 44 40 00 0c be r2,r0,8000860 <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 8000834: 78 02 08 01 mvhi r2,0x801 8000838: 38 42 36 b4 ori r2,r2,0x36b4 800083c: 28 43 00 00 lw r3,(r2+0) 8000840: 28 21 00 c4 lw r1,(r1+196) 8000844: 58 23 00 08 sw (r1+8),r3 8000848: 28 43 00 04 lw r3,(r2+4) 800084c: 58 23 00 0c sw (r1+12),r3 8000850: 28 43 00 08 lw r3,(r2+8) 8000854: 58 23 00 10 sw (r1+16),r3 8000858: 28 42 00 0c lw r2,(r2+12) 800085c: 58 22 00 14 sw (r1+20),r2 8000860: c3 a0 00 00 ret =============================================================================== 08000800 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 8000800: 37 9c ff fc addi sp,sp,-4 8000804: 5b 9d 00 04 sw (sp+4),ra Stack_check_Initialize(); if (the_thread) 8000808: 44 40 00 05 be r2,r0,800081c <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 800080c: 28 41 00 c4 lw r1,(r2+196) 8000810: 28 43 00 c0 lw r3,(r2+192) 8000814: 34 02 00 a5 mvi r2,165 8000818: f8 00 2f 29 calli 800c4bc return true; } 800081c: 34 01 00 01 mvi r1,1 8000820: 2b 9d 00 04 lw ra,(sp+4) 8000824: 37 9c 00 04 addi sp,sp,4 8000828: c3 a0 00 00 ret =============================================================================== 080009a0 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 80009a0: 37 9c ff f8 addi sp,sp,-8 80009a4: 5b 9b 00 08 sw (sp+8),fp 80009a8: 34 1b 00 08 mvi fp,8 80009ac: b7 7c d8 00 add fp,fp,sp 80009b0: 5b 9d 00 04 sw (sp+4),ra Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 80009b4: 78 01 08 01 mvhi r1,0x801 80009b8: 38 21 39 d8 ori r1,r1,0x39d8 80009bc: 28 23 00 0c lw r3,(r1+12) ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 80009c0: 28 62 00 c4 lw r2,(r3+196) 80009c4: 54 5b 00 04 bgu r2,fp,80009d4 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 80009c8: 28 63 00 c0 lw r3,(r3+192) 80009cc: b4 43 10 00 add r2,r2,r3 80009d0: 50 5b 00 04 bgeu r2,fp,80009e0 <== ALWAYS TAKEN /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 80009d4: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 80009d8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80009dc: fb ff ff a2 calli 8000864 <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 80009e0: 34 01 00 00 mvi r1,0 80009e4: 2b 9d 00 04 lw ra,(sp+4) 80009e8: 2b 9b 00 08 lw fp,(sp+8) 80009ec: 37 9c 00 08 addi sp,sp,8 80009f0: c3 a0 00 00 ret =============================================================================== 080009f4 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 80009f4: 37 9c ff ec addi sp,sp,-20 80009f8: 5b 8b 00 14 sw (sp+20),r11 80009fc: 5b 8c 00 10 sw (sp+16),r12 8000a00: 5b 8d 00 0c sw (sp+12),r13 8000a04: 5b 8e 00 08 sw (sp+8),r14 8000a08: 5b 9d 00 04 sw (sp+4),ra 8000a0c: b8 40 58 00 mv r11,r2 8000a10: b8 20 70 00 mv r14,r1 if ( !print ) 8000a14: 44 40 00 15 be r2,r0,8000a68 <== NEVER TAKEN return; print_context = context; 8000a18: 78 0d 08 01 mvhi r13,0x801 print_handler = print; 8000a1c: 78 0c 08 01 mvhi r12,0x801 ) { if ( !print ) return; print_context = context; 8000a20: 39 ad 36 2c ori r13,r13,0x362c print_handler = print; 8000a24: 39 8c 36 30 ori r12,r12,0x3630 (*print)( context, "Stack usage by thread\n"); 8000a28: 78 02 08 01 mvhi r2,0x801 8000a2c: 38 42 1d bc ori r2,r2,0x1dbc ) { if ( !print ) return; print_context = context; 8000a30: 59 a1 00 00 sw (r13+0),r1 print_handler = print; 8000a34: 59 8b 00 00 sw (r12+0),r11 (*print)( context, "Stack usage by thread\n"); 8000a38: d9 60 00 00 call r11 (*print)( context, 8000a3c: 78 02 08 01 mvhi r2,0x801 8000a40: 38 42 1d d4 ori r2,r2,0x1dd4 8000a44: b9 c0 08 00 mv r1,r14 8000a48: d9 60 00 00 call r11 " 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 ); 8000a4c: 78 01 08 00 mvhi r1,0x800 8000a50: 38 21 06 cc ori r1,r1,0x6cc 8000a54: f8 00 0e 1e calli 80042cc #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 8000a58: 34 01 ff ff mvi r1,-1 8000a5c: fb ff ff 1c calli 80006cc #endif print_context = NULL; 8000a60: 59 a0 00 00 sw (r13+0),r0 print_handler = NULL; 8000a64: 59 80 00 00 sw (r12+0),r0 } 8000a68: 2b 9d 00 04 lw ra,(sp+4) 8000a6c: 2b 8b 00 14 lw r11,(sp+20) 8000a70: 2b 8c 00 10 lw r12,(sp+16) 8000a74: 2b 8d 00 0c lw r13,(sp+12) 8000a78: 2b 8e 00 08 lw r14,(sp+8) 8000a7c: 37 9c 00 14 addi sp,sp,20 8000a80: c3 a0 00 00 ret =============================================================================== 08000920 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 8000920: 37 9c ff f4 addi sp,sp,-12 8000924: 5b 9b 00 08 sw (sp+8),fp 8000928: 34 1b 00 0c mvi fp,12 800092c: b7 7c d8 00 add fp,fp,sp 8000930: 5b 8b 00 0c sw (sp+12),r11 8000934: 5b 9d 00 04 sw (sp+4),ra 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; 8000938: 28 22 00 c4 lw r2,(r1+196) */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 800093c: b8 20 58 00 mv r11,r1 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; 8000940: 34 41 00 08 addi r1,r2,8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 8000944: 54 5b 00 04 bgu r2,fp,8000954 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 8000948: 29 63 00 c0 lw r3,(r11+192) 800094c: b4 43 10 00 add r2,r2,r3 8000950: 50 5b 00 08 bgeu r2,fp,8000970 /* * 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, 8000954: 78 02 08 01 mvhi r2,0x801 8000958: 38 42 36 b4 ori r2,r2,0x36b4 800095c: 34 03 00 10 mvi r3,16 8000960: f8 00 2e 6a calli 800c308 8000964: 64 22 00 00 cmpei r2,r1,0 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 8000968: b9 60 08 00 mv r1,r11 800096c: fb ff ff be calli 8000864 /* * 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, 8000970: 78 02 08 01 mvhi r2,0x801 8000974: 38 42 36 b4 ori r2,r2,0x36b4 8000978: 34 03 00 10 mvi r3,16 800097c: f8 00 2e 63 calli 800c308 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 8000980: 5c 20 00 06 bne r1,r0,8000998 Stack_check_report_blown_task( running, pattern_ok ); } } 8000984: 2b 9d 00 04 lw ra,(sp+4) 8000988: 2b 8b 00 0c lw r11,(sp+12) 800098c: 2b 9b 00 08 lw fp,(sp+8) 8000990: 37 9c 00 0c addi sp,sp,12 8000994: c3 a0 00 00 ret sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 8000998: 34 02 00 00 mvi r2,0 800099c: e3 ff ff f3 bi 8000968 =============================================================================== 08008f6c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 8008f6c: 37 9c ff e4 addi sp,sp,-28 8008f70: 5b 8b 00 18 sw (sp+24),r11 8008f74: 5b 8c 00 14 sw (sp+20),r12 8008f78: 5b 8d 00 10 sw (sp+16),r13 8008f7c: 5b 8e 00 0c sw (sp+12),r14 8008f80: 5b 8f 00 08 sw (sp+8),r15 8008f84: 5b 9d 00 04 sw (sp+4),ra STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 8008f88: 34 04 00 09 mvi r4,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 8008f8c: b8 40 58 00 mv r11,r2 8008f90: b8 20 60 00 mv r12,r1 8008f94: b8 60 68 00 mv r13,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 8008f98: 44 40 00 1a be r2,r0,8009000 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 8008f9c: f8 00 0d 10 calli 800c3dc <__errno> 8008fa0: 58 20 00 00 sw (r1+0),r0 *n = 0; 8008fa4: 59 60 00 00 sw (r11+0),r0 8008fa8: 59 60 00 04 sw (r11+4),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 8008fac: b9 80 08 00 mv r1,r12 8008fb0: 37 82 00 1c addi r2,sp,28 8008fb4: f8 00 18 39 calli 800f098 8008fb8: b8 20 78 00 mv r15,r1 8008fbc: b8 40 70 00 mv r14,r2 #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 ) 8008fc0: 45 a0 00 1f be r13,r0,800903c <== NEVER TAKEN *endptr = end; 8008fc4: 2b 85 00 1c lw r5,(sp+28) 8008fc8: 59 a5 00 00 sw (r13+0),r5 /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 8008fcc: 34 04 00 0b mvi r4,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 8008fd0: 45 85 00 0c be r12,r5,8009000 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 8008fd4: 78 01 08 01 mvhi r1,0x801 8008fd8: 38 21 f1 00 ori r1,r1,0xf100 8008fdc: 28 23 00 00 lw r3,(r1+0) 8008fe0: b9 c0 10 00 mv r2,r14 8008fe4: b9 e0 08 00 mv r1,r15 8008fe8: 34 04 ff ff mvi r4,-1 8008fec: f8 00 45 84 calli 801a5fc <__gedf2> 8008ff0: 48 20 00 0d bg r1,r0,8009024 <== NEVER TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 8008ff4: 59 6f 00 00 sw (r11+0),r15 8008ff8: 59 6e 00 04 sw (r11+4),r14 #endif return RTEMS_SUCCESSFUL; 8008ffc: 34 04 00 00 mvi r4,0 } 8009000: b8 80 08 00 mv r1,r4 8009004: 2b 9d 00 04 lw ra,(sp+4) 8009008: 2b 8b 00 18 lw r11,(sp+24) 800900c: 2b 8c 00 14 lw r12,(sp+20) 8009010: 2b 8d 00 10 lw r13,(sp+16) 8009014: 2b 8e 00 0c lw r14,(sp+12) 8009018: 2b 8f 00 08 lw r15,(sp+8) 800901c: 37 9c 00 1c addi sp,sp,28 8009020: c3 a0 00 00 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 8009024: f8 00 0c ee calli 800c3dc <__errno> 8009028: 28 22 00 00 lw r2,(r1+0) 800902c: 34 01 00 22 mvi r1,34 return RTEMS_INVALID_NUMBER; 8009030: 34 04 00 0a mvi r4,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 8009034: 5c 41 ff f0 bne r2,r1,8008ff4 <== NEVER TAKEN 8009038: e3 ff ff f2 bi 8009000 #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 ) 800903c: 2b 85 00 1c lw r5,(sp+28) 8009040: e3 ff ff e3 bi 8008fcc =============================================================================== 08009044 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 8009044: 37 9c ff e8 addi sp,sp,-24 8009048: 5b 8b 00 14 sw (sp+20),r11 800904c: 5b 8c 00 10 sw (sp+16),r12 8009050: 5b 8d 00 0c sw (sp+12),r13 8009054: 5b 8e 00 08 sw (sp+8),r14 8009058: 5b 9d 00 04 sw (sp+4),ra STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 800905c: 34 04 00 09 mvi r4,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 8009060: b8 40 58 00 mv r11,r2 8009064: b8 20 60 00 mv r12,r1 8009068: b8 60 68 00 mv r13,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 800906c: 44 40 00 15 be r2,r0,80090c0 return RTEMS_INVALID_ADDRESS; errno = 0; 8009070: f8 00 0c db calli 800c3dc <__errno> 8009074: 58 20 00 00 sw (r1+0),r0 *n = 0; 8009078: 59 60 00 00 sw (r11+0),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 800907c: b9 80 08 00 mv r1,r12 8009080: 37 82 00 18 addi r2,sp,24 8009084: f8 00 18 11 calli 800f0c8 8009088: b8 20 70 00 mv r14,r1 #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 ) 800908c: 45 a0 00 1b be r13,r0,80090f8 *endptr = end; 8009090: 2b 82 00 18 lw r2,(sp+24) 8009094: 59 a2 00 00 sw (r13+0),r2 /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 8009098: 34 04 00 0b mvi r4,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 800909c: 45 82 00 09 be r12,r2,80090c0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 80090a0: 78 01 08 01 mvhi r1,0x801 80090a4: 38 21 f1 04 ori r1,r1,0xf104 80090a8: 28 22 00 00 lw r2,(r1+0) 80090ac: b9 c0 08 00 mv r1,r14 80090b0: f8 00 3f 5b calli 8018e1c <__gesf2> 80090b4: 48 20 00 0b bg r1,r0,80090e0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 80090b8: 59 6e 00 00 sw (r11+0),r14 #endif return RTEMS_SUCCESSFUL; 80090bc: 34 04 00 00 mvi r4,0 } 80090c0: b8 80 08 00 mv r1,r4 80090c4: 2b 9d 00 04 lw ra,(sp+4) 80090c8: 2b 8b 00 14 lw r11,(sp+20) 80090cc: 2b 8c 00 10 lw r12,(sp+16) 80090d0: 2b 8d 00 0c lw r13,(sp+12) 80090d4: 2b 8e 00 08 lw r14,(sp+8) 80090d8: 37 9c 00 18 addi sp,sp,24 80090dc: c3 a0 00 00 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 80090e0: f8 00 0c bf calli 800c3dc <__errno> 80090e4: 28 22 00 00 lw r2,(r1+0) 80090e8: 34 01 00 22 mvi r1,34 return RTEMS_INVALID_NUMBER; 80090ec: 34 04 00 0a mvi r4,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 80090f0: 5c 41 ff f2 bne r2,r1,80090b8 <== NEVER TAKEN 80090f4: e3 ff ff f3 bi 80090c0 #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 ) 80090f8: 2b 82 00 18 lw r2,(sp+24) 80090fc: e3 ff ff e7 bi 8009098 =============================================================================== 08009100 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 8009100: 37 9c ff e8 addi sp,sp,-24 8009104: 5b 8b 00 14 sw (sp+20),r11 8009108: 5b 8c 00 10 sw (sp+16),r12 800910c: 5b 8d 00 0c sw (sp+12),r13 8009110: 5b 8e 00 08 sw (sp+8),r14 8009114: 5b 9d 00 04 sw (sp+4),ra STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 8009118: 34 05 00 09 mvi r5,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 800911c: b8 40 58 00 mv r11,r2 8009120: b8 20 68 00 mv r13,r1 8009124: b8 60 70 00 mv r14,r3 8009128: b8 80 60 00 mv r12,r4 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 800912c: 44 40 00 14 be r2,r0,800917c return RTEMS_INVALID_ADDRESS; errno = 0; 8009130: f8 00 0c ab calli 800c3dc <__errno> 8009134: 58 20 00 00 sw (r1+0),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 8009138: b9 80 18 00 mv r3,r12 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 800913c: 59 60 00 00 sw (r11+0),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 8009140: b9 a0 08 00 mv r1,r13 8009144: 37 82 00 18 addi r2,sp,24 8009148: f8 00 18 93 calli 800f394 800914c: b8 20 60 00 mv r12,r1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 8009150: 45 c0 00 19 be r14,r0,80091b4 *endptr = end; 8009154: 2b 82 00 18 lw r2,(sp+24) 8009158: 59 c2 00 00 sw (r14+0),r2 /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 800915c: 34 05 00 0b mvi r5,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 8009160: 45 a2 00 07 be r13,r2,800917c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 8009164: 78 02 08 01 mvhi r2,0x801 8009168: 38 42 f0 e4 ori r2,r2,0xf0e4 800916c: 28 41 00 00 lw r1,(r2+0) 8009170: 45 81 00 0b be r12,r1,800919c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 8009174: 59 6c 00 00 sw (r11+0),r12 #endif return RTEMS_SUCCESSFUL; 8009178: 34 05 00 00 mvi r5,0 } 800917c: b8 a0 08 00 mv r1,r5 8009180: 2b 9d 00 04 lw ra,(sp+4) 8009184: 2b 8b 00 14 lw r11,(sp+20) 8009188: 2b 8c 00 10 lw r12,(sp+16) 800918c: 2b 8d 00 0c lw r13,(sp+12) 8009190: 2b 8e 00 08 lw r14,(sp+8) 8009194: 37 9c 00 18 addi sp,sp,24 8009198: c3 a0 00 00 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 800919c: f8 00 0c 90 calli 800c3dc <__errno> 80091a0: 28 22 00 00 lw r2,(r1+0) 80091a4: 34 01 00 22 mvi r1,34 return RTEMS_INVALID_NUMBER; 80091a8: 34 05 00 0a mvi r5,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 80091ac: 5c 41 ff f2 bne r2,r1,8009174 <== NEVER TAKEN 80091b0: e3 ff ff f3 bi 800917c #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 ) 80091b4: 2b 82 00 18 lw r2,(sp+24) 80091b8: e3 ff ff e9 bi 800915c =============================================================================== 080092a0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 80092a0: 37 9c ff e8 addi sp,sp,-24 80092a4: 5b 8b 00 14 sw (sp+20),r11 80092a8: 5b 8c 00 10 sw (sp+16),r12 80092ac: 5b 8d 00 0c sw (sp+12),r13 80092b0: 5b 8e 00 08 sw (sp+8),r14 80092b4: 5b 9d 00 04 sw (sp+4),ra STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 80092b8: 34 05 00 09 mvi r5,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 80092bc: b8 40 58 00 mv r11,r2 80092c0: b8 20 68 00 mv r13,r1 80092c4: b8 60 70 00 mv r14,r3 80092c8: b8 80 60 00 mv r12,r4 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 80092cc: 44 40 00 16 be r2,r0,8009324 return RTEMS_INVALID_ADDRESS; errno = 0; 80092d0: f8 00 0c 43 calli 800c3dc <__errno> 80092d4: 58 20 00 00 sw (r1+0),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 80092d8: b9 80 18 00 mv r3,r12 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 80092dc: 59 60 00 00 sw (r11+0),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 80092e0: b9 a0 08 00 mv r1,r13 80092e4: 37 82 00 18 addi r2,sp,24 80092e8: f8 00 18 2b calli 800f394 80092ec: b8 20 60 00 mv r12,r1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 80092f0: 45 c0 00 1b be r14,r0,800935c *endptr = end; 80092f4: 2b 82 00 18 lw r2,(sp+24) 80092f8: 59 c2 00 00 sw (r14+0),r2 /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 80092fc: 34 05 00 0b mvi r5,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 8009300: 45 a2 00 09 be r13,r2,8009324 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 8009304: 78 02 08 01 mvhi r2,0x801 8009308: 38 42 f0 e4 ori r2,r2,0xf0e4 800930c: 28 41 00 00 lw r1,(r2+0) 8009310: 45 81 00 0d be r12,r1,8009344 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 8009314: 78 01 80 00 mvhi r1,0x8000 8009318: 45 81 00 0b be r12,r1,8009344 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 800931c: 59 6c 00 00 sw (r11+0),r12 #endif return RTEMS_SUCCESSFUL; 8009320: 34 05 00 00 mvi r5,0 } 8009324: b8 a0 08 00 mv r1,r5 8009328: 2b 9d 00 04 lw ra,(sp+4) 800932c: 2b 8b 00 14 lw r11,(sp+20) 8009330: 2b 8c 00 10 lw r12,(sp+16) 8009334: 2b 8d 00 0c lw r13,(sp+12) 8009338: 2b 8e 00 08 lw r14,(sp+8) 800933c: 37 9c 00 18 addi sp,sp,24 8009340: c3 a0 00 00 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 8009344: f8 00 0c 26 calli 800c3dc <__errno> 8009348: 28 22 00 00 lw r2,(r1+0) 800934c: 34 01 00 22 mvi r1,34 return RTEMS_INVALID_NUMBER; 8009350: 34 05 00 0a mvi r5,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 8009354: 5c 41 ff f2 bne r2,r1,800931c <== NEVER TAKEN 8009358: e3 ff ff f3 bi 8009324 #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 ) 800935c: 2b 82 00 18 lw r2,(sp+24) 8009360: e3 ff ff e7 bi 80092fc =============================================================================== 080091bc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 80091bc: 37 9c ff e4 addi sp,sp,-28 80091c0: 5b 8b 00 14 sw (sp+20),r11 80091c4: 5b 8c 00 10 sw (sp+16),r12 80091c8: 5b 8d 00 0c sw (sp+12),r13 80091cc: 5b 8e 00 08 sw (sp+8),r14 80091d0: 5b 9d 00 04 sw (sp+4),ra STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 80091d4: 34 05 00 09 mvi r5,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 80091d8: b8 40 58 00 mv r11,r2 80091dc: b8 20 68 00 mv r13,r1 80091e0: b8 60 70 00 mv r14,r3 80091e4: b8 80 60 00 mv r12,r4 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 80091e8: 44 40 00 18 be r2,r0,8009248 return RTEMS_INVALID_ADDRESS; errno = 0; 80091ec: f8 00 0c 7c calli 800c3dc <__errno> 80091f0: 58 20 00 00 sw (r1+0),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 80091f4: b9 80 18 00 mv r3,r12 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 80091f8: 59 60 00 00 sw (r11+0),r0 80091fc: 59 60 00 04 sw (r11+4),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 8009200: b9 a0 08 00 mv r1,r13 8009204: 37 82 00 1c addi r2,sp,28 8009208: f8 00 18 71 calli 800f3cc 800920c: b8 20 60 00 mv r12,r1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 8009210: 45 c0 00 22 be r14,r0,8009298 *endptr = end; 8009214: 2b 84 00 1c lw r4,(sp+28) 8009218: 59 c4 00 00 sw (r14+0),r4 /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 800921c: 34 05 00 0b mvi r5,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 8009220: 45 a4 00 0a be r13,r4,8009248 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 8009224: 78 03 08 01 mvhi r3,0x801 8009228: 38 63 f0 e4 ori r3,r3,0xf0e4 800922c: 28 61 00 00 lw r1,(r3+0) 8009230: 45 81 00 17 be r12,r1,800928c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 8009234: 78 01 80 00 mvhi r1,0x8000 8009238: 45 81 00 0c be r12,r1,8009268 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 800923c: 59 6c 00 00 sw (r11+0),r12 8009240: 59 62 00 04 sw (r11+4),r2 #endif return RTEMS_SUCCESSFUL; 8009244: 34 05 00 00 mvi r5,0 } 8009248: b8 a0 08 00 mv r1,r5 800924c: 2b 9d 00 04 lw ra,(sp+4) 8009250: 2b 8b 00 14 lw r11,(sp+20) 8009254: 2b 8c 00 10 lw r12,(sp+16) 8009258: 2b 8d 00 0c lw r13,(sp+12) 800925c: 2b 8e 00 08 lw r14,(sp+8) 8009260: 37 9c 00 1c addi sp,sp,28 8009264: c3 a0 00 00 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 8009268: 5c 40 ff f5 bne r2,r0,800923c <== NEVER TAKEN 800926c: 5b 82 00 18 sw (sp+24),r2 8009270: f8 00 0c 5b calli 800c3dc <__errno> 8009274: 28 23 00 00 lw r3,(r1+0) 8009278: 34 01 00 22 mvi r1,34 return RTEMS_INVALID_NUMBER; 800927c: 34 05 00 0a mvi r5,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 8009280: 2b 82 00 18 lw r2,(sp+24) 8009284: 5c 61 ff ee bne r3,r1,800923c <== NEVER TAKEN 8009288: e3 ff ff f0 bi 8009248 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 800928c: 34 01 ff ff mvi r1,-1 8009290: 5c 41 ff e9 bne r2,r1,8009234 <== NEVER TAKEN 8009294: e3 ff ff f6 bi 800926c #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 ) 8009298: 2b 84 00 1c lw r4,(sp+28) 800929c: e3 ff ff e0 bi 800921c =============================================================================== 08009364 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 8009364: 37 9c ff e8 addi sp,sp,-24 8009368: 5b 8b 00 14 sw (sp+20),r11 800936c: 5b 8c 00 10 sw (sp+16),r12 8009370: 5b 8d 00 0c sw (sp+12),r13 8009374: 5b 8e 00 08 sw (sp+8),r14 8009378: 5b 9d 00 04 sw (sp+4),ra STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 800937c: 34 04 00 09 mvi r4,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 8009380: b8 40 58 00 mv r11,r2 8009384: b8 20 68 00 mv r13,r1 8009388: b8 60 70 00 mv r14,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 800938c: 44 40 00 12 be r2,r0,80093d4 return RTEMS_INVALID_ADDRESS; errno = 0; 8009390: f8 00 0c 13 calli 800c3dc <__errno> 8009394: 58 20 00 00 sw (r1+0),r0 *n = 0; 8009398: 59 60 00 00 sw (r11+0),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 800939c: b9 a0 08 00 mv r1,r13 80093a0: 37 82 00 18 addi r2,sp,24 80093a4: 34 03 00 10 mvi r3,16 80093a8: f8 00 19 74 calli 800f978 80093ac: b8 20 60 00 mv r12,r1 #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 ) 80093b0: 45 c0 00 17 be r14,r0,800940c *endptr = end; 80093b4: 2b 82 00 18 lw r2,(sp+24) 80093b8: 59 c2 00 00 sw (r14+0),r2 /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 80093bc: 34 04 00 0b mvi r4,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 80093c0: 45 a2 00 05 be r13,r2,80093d4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 80093c4: 34 01 ff ff mvi r1,-1 80093c8: 45 81 00 0b be r12,r1,80093f4 <== NEVER TAKEN if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; 80093cc: 59 6c 00 00 sw (r11+0),r12 #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 80093d0: 34 04 00 00 mvi r4,0 } 80093d4: b8 80 08 00 mv r1,r4 80093d8: 2b 9d 00 04 lw ra,(sp+4) 80093dc: 2b 8b 00 14 lw r11,(sp+20) 80093e0: 2b 8c 00 10 lw r12,(sp+16) 80093e4: 2b 8d 00 0c lw r13,(sp+12) 80093e8: 2b 8e 00 08 lw r14,(sp+8) 80093ec: 37 9c 00 18 addi sp,sp,24 80093f0: c3 a0 00 00 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 80093f4: f8 00 0b fa calli 800c3dc <__errno> <== NOT EXECUTED 80093f8: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 80093fc: 34 01 00 22 mvi r1,34 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; 8009400: 34 04 00 0a mvi r4,10 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 8009404: 5c 41 ff f2 bne r2,r1,80093cc <== NOT EXECUTED 8009408: e3 ff ff f3 bi 80093d4 <== NOT EXECUTED #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 ) 800940c: 2b 82 00 18 lw r2,(sp+24) 8009410: e3 ff ff eb bi 80093bc =============================================================================== 080094a4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 80094a4: 37 9c ff e8 addi sp,sp,-24 80094a8: 5b 8b 00 14 sw (sp+20),r11 80094ac: 5b 8c 00 10 sw (sp+16),r12 80094b0: 5b 8d 00 0c sw (sp+12),r13 80094b4: 5b 8e 00 08 sw (sp+8),r14 80094b8: 5b 9d 00 04 sw (sp+4),ra STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 80094bc: 34 05 00 09 mvi r5,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 80094c0: b8 40 58 00 mv r11,r2 80094c4: b8 20 68 00 mv r13,r1 80094c8: b8 60 70 00 mv r14,r3 80094cc: b8 80 60 00 mv r12,r4 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 80094d0: 44 40 00 12 be r2,r0,8009518 return RTEMS_INVALID_ADDRESS; errno = 0; 80094d4: f8 00 0b c2 calli 800c3dc <__errno> 80094d8: 58 20 00 00 sw (r1+0),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 80094dc: b9 80 18 00 mv r3,r12 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 80094e0: 59 60 00 00 sw (r11+0),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 80094e4: b9 a0 08 00 mv r1,r13 80094e8: 37 82 00 18 addi r2,sp,24 80094ec: f8 00 19 23 calli 800f978 80094f0: b8 20 60 00 mv r12,r1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 80094f4: 45 c0 00 17 be r14,r0,8009550 *endptr = end; 80094f8: 2b 82 00 18 lw r2,(sp+24) 80094fc: 59 c2 00 00 sw (r14+0),r2 /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 8009500: 34 05 00 0b mvi r5,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 8009504: 45 a2 00 05 be r13,r2,8009518 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 8009508: 34 01 ff ff mvi r1,-1 800950c: 45 81 00 0b be r12,r1,8009538 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 8009510: 59 6c 00 00 sw (r11+0),r12 #endif return RTEMS_SUCCESSFUL; 8009514: 34 05 00 00 mvi r5,0 } 8009518: b8 a0 08 00 mv r1,r5 800951c: 2b 9d 00 04 lw ra,(sp+4) 8009520: 2b 8b 00 14 lw r11,(sp+20) 8009524: 2b 8c 00 10 lw r12,(sp+16) 8009528: 2b 8d 00 0c lw r13,(sp+12) 800952c: 2b 8e 00 08 lw r14,(sp+8) 8009530: 37 9c 00 18 addi sp,sp,24 8009534: c3 a0 00 00 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 8009538: f8 00 0b a9 calli 800c3dc <__errno> 800953c: 28 22 00 00 lw r2,(r1+0) 8009540: 34 01 00 22 mvi r1,34 return RTEMS_INVALID_NUMBER; 8009544: 34 05 00 0a mvi r5,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 8009548: 5c 41 ff f2 bne r2,r1,8009510 <== NEVER TAKEN 800954c: e3 ff ff f3 bi 8009518 #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 ) 8009550: 2b 82 00 18 lw r2,(sp+24) 8009554: e3 ff ff eb bi 8009500 =============================================================================== 08009620 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 8009620: 37 9c ff e8 addi sp,sp,-24 8009624: 5b 8b 00 14 sw (sp+20),r11 8009628: 5b 8c 00 10 sw (sp+16),r12 800962c: 5b 8d 00 0c sw (sp+12),r13 8009630: 5b 8e 00 08 sw (sp+8),r14 8009634: 5b 9d 00 04 sw (sp+4),ra STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 8009638: 34 05 00 09 mvi r5,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 800963c: b8 40 58 00 mv r11,r2 8009640: b8 20 68 00 mv r13,r1 8009644: b8 60 70 00 mv r14,r3 8009648: b8 80 60 00 mv r12,r4 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 800964c: 44 40 00 12 be r2,r0,8009694 return RTEMS_INVALID_ADDRESS; errno = 0; 8009650: f8 00 0b 63 calli 800c3dc <__errno> 8009654: 58 20 00 00 sw (r1+0),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 8009658: b9 80 18 00 mv r3,r12 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 800965c: 59 60 00 00 sw (r11+0),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 8009660: b9 a0 08 00 mv r1,r13 8009664: 37 82 00 18 addi r2,sp,24 8009668: f8 00 18 c4 calli 800f978 800966c: b8 20 60 00 mv r12,r1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 8009670: 45 c0 00 17 be r14,r0,80096cc *endptr = end; 8009674: 2b 82 00 18 lw r2,(sp+24) 8009678: 59 c2 00 00 sw (r14+0),r2 /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 800967c: 34 05 00 0b mvi r5,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 8009680: 45 a2 00 05 be r13,r2,8009694 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 8009684: 34 01 ff ff mvi r1,-1 8009688: 45 81 00 0b be r12,r1,80096b4 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 800968c: 59 6c 00 00 sw (r11+0),r12 #endif return RTEMS_SUCCESSFUL; 8009690: 34 05 00 00 mvi r5,0 } 8009694: b8 a0 08 00 mv r1,r5 8009698: 2b 9d 00 04 lw ra,(sp+4) 800969c: 2b 8b 00 14 lw r11,(sp+20) 80096a0: 2b 8c 00 10 lw r12,(sp+16) 80096a4: 2b 8d 00 0c lw r13,(sp+12) 80096a8: 2b 8e 00 08 lw r14,(sp+8) 80096ac: 37 9c 00 18 addi sp,sp,24 80096b0: c3 a0 00 00 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 80096b4: f8 00 0b 4a calli 800c3dc <__errno> 80096b8: 28 22 00 00 lw r2,(r1+0) 80096bc: 34 01 00 22 mvi r1,34 return RTEMS_INVALID_NUMBER; 80096c0: 34 05 00 0a mvi r5,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 80096c4: 5c 41 ff f2 bne r2,r1,800968c <== NEVER TAKEN 80096c8: e3 ff ff f3 bi 8009694 #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 ) 80096cc: 2b 82 00 18 lw r2,(sp+24) 80096d0: e3 ff ff eb bi 800967c =============================================================================== 08009558 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 8009558: 37 9c ff e4 addi sp,sp,-28 800955c: 5b 8b 00 14 sw (sp+20),r11 8009560: 5b 8c 00 10 sw (sp+16),r12 8009564: 5b 8d 00 0c sw (sp+12),r13 8009568: 5b 8e 00 08 sw (sp+8),r14 800956c: 5b 9d 00 04 sw (sp+4),ra STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 8009570: 34 05 00 09 mvi r5,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 8009574: b8 40 58 00 mv r11,r2 8009578: b8 20 68 00 mv r13,r1 800957c: b8 60 70 00 mv r14,r3 8009580: b8 80 60 00 mv r12,r4 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 8009584: 44 40 00 14 be r2,r0,80095d4 return RTEMS_INVALID_ADDRESS; errno = 0; 8009588: f8 00 0b 95 calli 800c3dc <__errno> 800958c: 58 20 00 00 sw (r1+0),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 8009590: b9 80 18 00 mv r3,r12 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 8009594: 59 60 00 00 sw (r11+0),r0 8009598: 59 60 00 04 sw (r11+4),r0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 800959c: b9 a0 08 00 mv r1,r13 80095a0: 37 82 00 1c addi r2,sp,28 80095a4: f8 00 19 03 calli 800f9b0 80095a8: b8 20 60 00 mv r12,r1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 80095ac: 45 c0 00 1b be r14,r0,8009618 *endptr = end; 80095b0: 2b 84 00 1c lw r4,(sp+28) 80095b4: 59 c4 00 00 sw (r14+0),r4 /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 80095b8: 34 05 00 0b mvi r5,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 80095bc: 45 a4 00 06 be r13,r4,80095d4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 80095c0: 34 01 ff ff mvi r1,-1 80095c4: 45 81 00 0c be r12,r1,80095f4 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 80095c8: 59 6c 00 00 sw (r11+0),r12 80095cc: 59 62 00 04 sw (r11+4),r2 #endif return RTEMS_SUCCESSFUL; 80095d0: 34 05 00 00 mvi r5,0 } 80095d4: b8 a0 08 00 mv r1,r5 80095d8: 2b 9d 00 04 lw ra,(sp+4) 80095dc: 2b 8b 00 14 lw r11,(sp+20) 80095e0: 2b 8c 00 10 lw r12,(sp+16) 80095e4: 2b 8d 00 0c lw r13,(sp+12) 80095e8: 2b 8e 00 08 lw r14,(sp+8) 80095ec: 37 9c 00 1c addi sp,sp,28 80095f0: c3 a0 00 00 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 80095f4: 5c 4c ff f5 bne r2,r12,80095c8 <== NEVER TAKEN 80095f8: 5b 82 00 18 sw (sp+24),r2 80095fc: f8 00 0b 78 calli 800c3dc <__errno> 8009600: 28 23 00 00 lw r3,(r1+0) 8009604: 34 01 00 22 mvi r1,34 return RTEMS_INVALID_NUMBER; 8009608: 34 05 00 0a mvi r5,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 800960c: 2b 82 00 18 lw r2,(sp+24) 8009610: 5c 61 ff ee bne r3,r1,80095c8 <== NEVER TAKEN 8009614: e3 ff ff f0 bi 80095d4 #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 ) 8009618: 2b 84 00 1c lw r4,(sp+28) 800961c: e3 ff ff e7 bi 80095b8 =============================================================================== 08000c90 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 8000c90: 37 9c fe 2c addi sp,sp,-468 8000c94: 5b 8b 00 44 sw (sp+68),r11 8000c98: 5b 8c 00 40 sw (sp+64),r12 8000c9c: 5b 8d 00 3c sw (sp+60),r13 8000ca0: 5b 8e 00 38 sw (sp+56),r14 8000ca4: 5b 8f 00 34 sw (sp+52),r15 8000ca8: 5b 90 00 30 sw (sp+48),r16 8000cac: 5b 91 00 2c sw (sp+44),r17 8000cb0: 5b 92 00 28 sw (sp+40),r18 8000cb4: 5b 93 00 24 sw (sp+36),r19 8000cb8: 5b 94 00 20 sw (sp+32),r20 8000cbc: 5b 95 00 1c sw (sp+28),r21 8000cc0: 5b 96 00 18 sw (sp+24),r22 8000cc4: 5b 97 00 14 sw (sp+20),r23 8000cc8: 5b 98 00 10 sw (sp+16),r24 8000ccc: 5b 99 00 0c sw (sp+12),r25 8000cd0: 5b 9b 00 08 sw (sp+8),fp 8000cd4: 5b 9d 00 04 sw (sp+4),ra 8000cd8: b8 20 c8 00 mv r25,r1 8000cdc: b8 60 90 00 mv r18,r3 8000ce0: b8 40 88 00 mv r17,r2 int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 8000ce4: f8 00 3b e5 calli 800fc78 8000ce8: b8 20 10 00 mv r2,r1 8000cec: 34 03 00 00 mvi r3,0 8000cf0: bb 20 08 00 mv r1,r25 8000cf4: 37 84 01 c0 addi r4,sp,448 8000cf8: 34 05 00 00 mvi r5,0 8000cfc: f8 00 03 76 calli 8001ad4 8000d00: b8 20 b8 00 mv r23,r1 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 8000d04: 5c 20 00 4b bne r1,r0,8000e30 <== NEVER TAKEN return -1; if (root_loc.ops != &IMFS_ops 8000d08: 2b 81 01 cc lw r1,(sp+460) 8000d0c: 78 03 08 01 mvhi r3,0x801 8000d10: 38 63 f2 30 ori r3,r3,0xf230 8000d14: 34 0b 00 00 mvi r11,0 8000d18: 5c 23 00 42 bne r1,r3,8000e20 <== NEVER TAKEN /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) 8000d1c: 78 10 08 01 mvhi r16,0x801 8000d20: 3a 10 f2 78 ori r16,r16,0xf278 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 8000d24: 37 8e 01 48 addi r14,sp,328 * 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) { 8000d28: 34 14 00 35 mvi r20,53 * 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) { 8000d2c: 34 18 00 30 mvi r24,48 * - 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); 8000d30: 37 95 00 48 addi r21,sp,72 if (full_filename[strlen(full_filename)-1] != '/') 8000d34: 34 1b 00 2f mvi fp,47 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 8000d38: 35 6c 02 00 addi r12,r11,512 8000d3c: 55 92 00 3e bgu r12,r18,8000e34 <== NEVER TAKEN break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 8000d40: b6 2b 58 00 add r11,r17,r11 offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) 8000d44: 35 61 01 01 addi r1,r11,257 8000d48: ba 00 10 00 mv r2,r16 8000d4c: 34 03 00 07 mvi r3,7 8000d50: f8 00 3b f9 calli 800fd34 8000d54: 5c 20 00 38 bne r1,r0,8000e34 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 8000d58: 34 03 00 63 mvi r3,99 8000d5c: b9 60 10 00 mv r2,r11 8000d60: b9 c0 08 00 mv r1,r14 8000d64: f8 00 3c 41 calli 800fe68 filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 8000d68: 34 02 00 08 mvi r2,8 offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; 8000d6c: 33 80 01 ab sb (sp+427),r0 linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 8000d70: 35 61 00 64 addi r1,r11,100 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; 8000d74: 41 6d 00 9c lbu r13,(r11+156) file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 8000d78: f8 00 1a 92 calli 80077c0 <_rtems_octal2ulong> file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 8000d7c: 34 02 00 0c mvi r2,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); 8000d80: b8 20 b0 00 mv r22,r1 file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 8000d84: 35 61 00 7c addi r1,r11,124 8000d88: f8 00 1a 8e calli 80077c0 <_rtems_octal2ulong> 8000d8c: b8 20 98 00 mv r19,r1 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 8000d90: 34 02 00 08 mvi r2,8 8000d94: 35 61 00 94 addi r1,r11,148 8000d98: f8 00 1a 8a calli 80077c0 <_rtems_octal2ulong> 8000d9c: b8 20 78 00 mv r15,r1 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 8000da0: b9 60 08 00 mv r1,r11 8000da4: f8 00 1b d8 calli 8007d04 <_rtems_tar_header_checksum> 8000da8: 5c 2f 00 23 bne r1,r15,8000e34 <== NEVER TAKEN * 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) { 8000dac: 45 b4 00 36 be r13,r20,8000e84 * 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) { 8000db0: 45 b8 00 03 be r13,r24,8000dbc ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 8000db4: b9 80 58 00 mv r11,r12 8000db8: e3 ff ff e0 bi 8000d38 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 8000dbc: 2b 84 01 c0 lw r4,(sp+448) if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 8000dc0: b9 c0 08 00 mv r1,r14 8000dc4: 37 82 01 ac addi r2,sp,428 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 8000dc8: 5b 84 01 ac sw (sp+428),r4 8000dcc: 2b 84 01 c4 lw r4,(sp+452) if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 8000dd0: 37 83 01 d4 addi r3,sp,468 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 8000dd4: 5b 84 01 b0 sw (sp+432),r4 8000dd8: 2b 84 01 c8 lw r4,(sp+456) 8000ddc: 5b 84 01 b4 sw (sp+436),r4 8000de0: 2b 84 01 cc lw r4,(sp+460) 8000de4: 5b 84 01 b8 sw (sp+440),r4 8000de8: 2b 84 01 d0 lw r4,(sp+464) 8000dec: 5b 84 01 bc sw (sp+444),r4 if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 8000df0: f8 00 1e 3b calli 80086dc 8000df4: 44 20 00 38 be r1,r0,8000ed4 <== ALWAYS TAKEN ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; 8000df8: 34 03 fe 00 mvi r3,-512 <== NOT EXECUTED 8000dfc: 36 61 01 ff addi r1,r19,511 <== NOT EXECUTED 8000e00: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8000e04: a0 23 08 00 and r1,r1,r3 <== NOT EXECUTED 8000e08: f8 00 6b d4 calli 801bd58 <__lshrsi3> <== NOT EXECUTED offset += 512 * nblocks; 8000e0c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8000e10: f8 00 6b 84 calli 801bc20 <__ashlsi3> <== NOT EXECUTED 8000e14: b4 2c 60 00 add r12,r1,r12 <== NOT EXECUTED ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 8000e18: b9 80 58 00 mv r11,r12 8000e1c: e3 ff ff c7 bi 8000d38 8000e20: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 8000e24: 38 42 fa 98 ori r2,r2,0xfa98 <== NOT EXECUTED 8000e28: ba e0 58 00 mv r11,r23 <== NOT EXECUTED 8000e2c: 44 22 ff bc be r1,r2,8000d1c <== NOT EXECUTED return -1; 8000e30: 34 17 ff ff mvi r23,-1 <== NOT EXECUTED nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 8000e34: ba e0 08 00 mv r1,r23 8000e38: 2b 9d 00 04 lw ra,(sp+4) 8000e3c: 2b 8b 00 44 lw r11,(sp+68) 8000e40: 2b 8c 00 40 lw r12,(sp+64) 8000e44: 2b 8d 00 3c lw r13,(sp+60) 8000e48: 2b 8e 00 38 lw r14,(sp+56) 8000e4c: 2b 8f 00 34 lw r15,(sp+52) 8000e50: 2b 90 00 30 lw r16,(sp+48) 8000e54: 2b 91 00 2c lw r17,(sp+44) 8000e58: 2b 92 00 28 lw r18,(sp+40) 8000e5c: 2b 93 00 24 lw r19,(sp+36) 8000e60: 2b 94 00 20 lw r20,(sp+32) 8000e64: 2b 95 00 1c lw r21,(sp+28) 8000e68: 2b 96 00 18 lw r22,(sp+24) 8000e6c: 2b 97 00 14 lw r23,(sp+20) 8000e70: 2b 98 00 10 lw r24,(sp+16) 8000e74: 2b 99 00 0c lw r25,(sp+12) 8000e78: 2b 9b 00 08 lw fp,(sp+8) 8000e7c: 37 9c 01 d4 addi sp,sp,468 8000e80: c3 a0 00 00 ret * - 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); 8000e84: bb 20 10 00 mv r2,r25 8000e88: ba a0 08 00 mv r1,r21 8000e8c: f8 00 3a 47 calli 800f7a8 if (full_filename[strlen(full_filename)-1] != '/') 8000e90: ba a0 08 00 mv r1,r21 8000e94: f8 00 3b 79 calli 800fc78 8000e98: 37 82 00 47 addi r2,sp,71 8000e9c: b4 41 18 00 add r3,r2,r1 8000ea0: 40 63 00 00 lbu r3,(r3+0) 8000ea4: 44 7b 00 04 be r3,fp,8000eb4 <== ALWAYS TAKEN strcat(full_filename, "/"); 8000ea8: b6 a1 08 00 add r1,r21,r1 <== NOT EXECUTED 8000eac: 30 3b 00 00 sb (r1+0),fp <== NOT EXECUTED 8000eb0: 30 20 00 01 sb (r1+1),r0 <== NOT EXECUTED strcat(full_filename, filename); 8000eb4: b9 c0 10 00 mv r2,r14 8000eb8: ba a0 08 00 mv r1,r21 8000ebc: f8 00 39 e4 calli 800f64c mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 8000ec0: ba a0 08 00 mv r1,r21 8000ec4: 34 02 01 ff mvi r2,511 8000ec8: f8 00 05 e7 calli 8002664 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 8000ecc: b9 80 58 00 mv r11,r12 8000ed0: e3 ff ff 9a bi 8000d38 else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( 8000ed4: 2b 83 01 d4 lw r3,(sp+468) &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 8000ed8: 22 c4 01 ff andi r4,r22,0x1ff else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( 8000edc: 38 84 80 00 ori r4,r4,0x8000 8000ee0: 34 05 00 00 mvi r5,0 8000ee4: 34 02 00 06 mvi r2,6 8000ee8: 37 81 01 ac addi r1,sp,428 8000eec: f8 00 1c 1c calli 8007f5c 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]; 8000ef0: b6 2c 10 00 add r2,r17,r12 8000ef4: 58 22 00 58 sw (r1+88),r2 } nblocks = (((file_size) + 511) & ~511) / 512; 8000ef8: 34 03 fe 00 mvi r3,-512 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; 8000efc: 58 20 00 50 sw (r1+80),r0 8000f00: 58 33 00 54 sw (r1+84),r19 node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; 8000f04: 36 61 01 ff addi r1,r19,511 8000f08: 34 02 00 09 mvi r2,9 8000f0c: a0 23 08 00 and r1,r1,r3 8000f10: f8 00 6b 92 calli 801bd58 <__lshrsi3> offset += 512 * nblocks; 8000f14: 34 02 00 09 mvi r2,9 8000f18: f8 00 6b 42 calli 801bc20 <__ashlsi3> 8000f1c: b4 2c 60 00 add r12,r1,r12 8000f20: e3 ff ff be bi 8000e18 =============================================================================== 0800b520 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 800b520: 37 9c ff dc addi sp,sp,-36 800b524: 5b 8b 00 24 sw (sp+36),r11 800b528: 5b 8c 00 20 sw (sp+32),r12 800b52c: 5b 8d 00 1c sw (sp+28),r13 800b530: 5b 8e 00 18 sw (sp+24),r14 800b534: 5b 8f 00 14 sw (sp+20),r15 800b538: 5b 90 00 10 sw (sp+16),r16 800b53c: 5b 91 00 0c sw (sp+12),r17 800b540: 5b 92 00 08 sw (sp+8),r18 800b544: 5b 9d 00 04 sw (sp+4),ra 800b548: b8 40 70 00 mv r14,r2 800b54c: b8 60 88 00 mv r17,r3 800b550: b8 20 80 00 mv r16,r1 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 800b554: 34 02 00 09 mvi r2,9 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 800b558: 44 60 00 46 be r3,r0,800b670 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 800b55c: 78 0f 08 01 mvhi r15,0x801 800b560: 39 ef 39 e8 ori r15,r15,0x39e8 800b564: 29 eb 00 0c lw r11,(r15+12) api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 800b568: 41 6d 00 74 lbu r13,(r11+116) if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 800b56c: 29 61 00 7c lw r1,(r11+124) if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 800b570: 29 6c 01 24 lw r12,(r11+292) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 800b574: 65 ad 00 00 cmpei r13,r13,0 800b578: b5 ad 20 00 add r4,r13,r13 800b57c: b4 84 20 00 add r4,r4,r4 800b580: b4 84 20 00 add r4,r4,r4 800b584: b4 84 20 00 add r4,r4,r4 800b588: b4 84 20 00 add r4,r4,r4 800b58c: b4 84 20 00 add r4,r4,r4 800b590: b4 84 20 00 add r4,r4,r4 800b594: b4 84 68 00 add r13,r4,r4 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 800b598: 5c 20 00 42 bne r1,r0,800b6a0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 800b59c: 41 92 00 08 lbu r18,(r12+8) old_mode |= _ISR_Get_level(); 800b5a0: fb ff ee 85 calli 8006fb4 <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 800b5a4: 66 52 00 00 cmpei r18,r18,0 800b5a8: c8 12 90 00 sub r18,r0,r18 800b5ac: 22 52 04 00 andi r18,r18,0x400 800b5b0: ba 41 08 00 or r1,r18,r1 old_mode |= _ISR_Get_level(); 800b5b4: b8 2d 68 00 or r13,r1,r13 *previous_mode_set = old_mode; 800b5b8: 5a 2d 00 00 sw (r17+0),r13 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 800b5bc: 21 c1 01 00 andi r1,r14,0x100 800b5c0: 44 20 00 04 be r1,r0,800b5d0 */ RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt ( Modes_Control mode_set ) { return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT; 800b5c4: 22 01 01 00 andi r1,r16,0x100 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 800b5c8: 64 21 00 00 cmpei r1,r1,0 800b5cc: 31 61 00 74 sb (r11+116),r1 if ( mask & RTEMS_TIMESLICE_MASK ) { 800b5d0: 21 c1 02 00 andi r1,r14,0x200 800b5d4: 44 20 00 09 be r1,r0,800b5f8 */ RTEMS_INLINE_ROUTINE bool _Modes_Is_timeslice ( Modes_Control mode_set ) { return (mode_set & RTEMS_TIMESLICE_MASK) == RTEMS_TIMESLICE; 800b5d8: 22 01 02 00 andi r1,r16,0x200 if ( _Modes_Is_timeslice(mode_set) ) { 800b5dc: 44 20 00 42 be r1,r0,800b6e4 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 800b5e0: 78 01 08 01 mvhi r1,0x801 800b5e4: 38 21 37 b4 ori r1,r1,0x37b4 800b5e8: 28 22 00 00 lw r2,(r1+0) if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 800b5ec: 34 01 00 01 mvi r1,1 800b5f0: 59 61 00 7c sw (r11+124),r1 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 800b5f4: 59 62 00 78 sw (r11+120),r2 /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 800b5f8: 21 c1 00 01 andi r1,r14,0x1 800b5fc: 44 20 00 04 be r1,r0,800b60c */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 800b600: 22 01 00 01 andi r1,r16,0x1 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 800b604: 64 21 00 00 cmpei r1,r1,0 800b608: d0 01 00 00 wcsr IE,r1 */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 800b60c: 21 ce 04 00 andi r14,r14,0x400 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 800b610: 34 04 00 00 mvi r4,0 if ( mask & RTEMS_ASR_MASK ) { 800b614: 45 c0 00 11 be r14,r0,800b658 */ RTEMS_INLINE_ROUTINE bool _Modes_Is_asr_disabled ( Modes_Control mode_set ) { return (mode_set & RTEMS_ASR_MASK) == RTEMS_NO_ASR; 800b618: 22 10 04 00 andi r16,r16,0x400 is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 800b61c: 41 81 00 08 lbu r1,(r12+8) * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 800b620: 66 10 00 00 cmpei r16,r16,0 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 800b624: 44 30 00 0d be r1,r16,800b658 asr->is_enabled = is_asr_enabled; 800b628: 31 90 00 08 sb (r12+8),r16 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 800b62c: 90 00 08 00 rcsr r1,IE 800b630: 34 02 ff fe mvi r2,-2 800b634: a0 22 10 00 and r2,r1,r2 800b638: d0 02 00 00 wcsr IE,r2 _signals = information->signals_pending; 800b63c: 29 83 00 18 lw r3,(r12+24) information->signals_pending = information->signals_posted; 800b640: 29 82 00 14 lw r2,(r12+20) information->signals_posted = _signals; 800b644: 59 83 00 14 sw (r12+20),r3 rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; 800b648: 59 82 00 18 sw (r12+24),r2 information->signals_posted = _signals; _ISR_Enable( _level ); 800b64c: d0 01 00 00 wcsr IE,r1 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { 800b650: 29 84 00 14 lw r4,(r12+20) /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 800b654: 7c 84 00 00 cmpnei r4,r4,0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 800b658: 78 01 08 01 mvhi r1,0x801 800b65c: 38 21 39 9c ori r1,r1,0x399c 800b660: 28 23 00 00 lw r3,(r1+0) 800b664: 34 01 00 03 mvi r1,3 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; 800b668: 34 02 00 00 mvi r2,0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 800b66c: 44 61 00 0f be r3,r1,800b6a8 <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 800b670: b8 40 08 00 mv r1,r2 800b674: 2b 9d 00 04 lw ra,(sp+4) 800b678: 2b 8b 00 24 lw r11,(sp+36) 800b67c: 2b 8c 00 20 lw r12,(sp+32) 800b680: 2b 8d 00 1c lw r13,(sp+28) 800b684: 2b 8e 00 18 lw r14,(sp+24) 800b688: 2b 8f 00 14 lw r15,(sp+20) 800b68c: 2b 90 00 10 lw r16,(sp+16) 800b690: 2b 91 00 0c lw r17,(sp+12) 800b694: 2b 92 00 08 lw r18,(sp+8) 800b698: 37 9c 00 24 addi sp,sp,36 800b69c: c3 a0 00 00 ret old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 800b6a0: 39 ad 02 00 ori r13,r13,0x200 800b6a4: e3 ff ff be bi 800b59c */ RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 800b6a8: 29 e1 00 0c lw r1,(r15+12) if ( !_States_Is_ready( executing->current_state ) || 800b6ac: 28 22 00 10 lw r2,(r1+16) 800b6b0: 5c 40 00 08 bne r2,r0,800b6d0 <== NEVER TAKEN 800b6b4: 29 e2 00 10 lw r2,(r15+16) 800b6b8: 44 22 00 03 be r1,r2,800b6c4 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 800b6bc: 40 21 00 74 lbu r1,(r1+116) 800b6c0: 5c 20 00 04 bne r1,r0,800b6d0 <== ALWAYS TAKEN if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; 800b6c4: 34 02 00 00 mvi r2,0 } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 800b6c8: 5c 80 00 04 bne r4,r0,800b6d8 800b6cc: e3 ff ff e9 bi 800b670 _Context_Switch_necessary = true; 800b6d0: 34 01 00 01 mvi r1,1 800b6d4: 31 e1 00 18 sb (r15+24),r1 _Thread_Dispatch(); 800b6d8: fb ff e7 27 calli 8005374 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; 800b6dc: 34 02 00 00 mvi r2,0 800b6e0: e3 ff ff e4 bi 800b670 if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 800b6e4: 59 60 00 7c sw (r11+124),r0 /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 800b6e8: 21 c1 00 01 andi r1,r14,0x1 800b6ec: 44 20 ff c8 be r1,r0,800b60c 800b6f0: e3 ff ff c4 bi 800b600 =============================================================================== 08008c7c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 8008c7c: 37 9c ff f0 addi sp,sp,-16 8008c80: 5b 8b 00 0c sw (sp+12),r11 8008c84: 5b 8c 00 08 sw (sp+8),r12 8008c88: 5b 9d 00 04 sw (sp+4),ra 8008c8c: b8 40 58 00 mv r11,r2 8008c90: b8 60 60 00 mv r12,r3 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 8008c94: 44 40 00 06 be r2,r0,8008cac RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 8008c98: 78 02 08 01 mvhi r2,0x801 8008c9c: 38 42 90 c0 ori r2,r2,0x90c0 8008ca0: 40 42 00 00 lbu r2,(r2+0) !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; 8008ca4: 34 04 00 13 mvi r4,19 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 8008ca8: 55 62 00 08 bgu r11,r2,8008cc8 if ( !old_priority ) return RTEMS_INVALID_ADDRESS; 8008cac: 34 04 00 09 mvi r4,9 if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 8008cb0: 45 80 00 06 be r12,r0,8008cc8 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 8008cb4: 37 82 00 10 addi r2,sp,16 8008cb8: f8 00 09 ba calli 800b3a0 <_Thread_Get> switch ( location ) { 8008cbc: 2b 82 00 10 lw r2,(sp+16) case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 8008cc0: 34 04 00 04 mvi r4,4 if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 8008cc4: 44 40 00 07 be r2,r0,8008ce0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8008cc8: b8 80 08 00 mv r1,r4 8008ccc: 2b 9d 00 04 lw ra,(sp+4) 8008cd0: 2b 8b 00 0c lw r11,(sp+12) 8008cd4: 2b 8c 00 08 lw r12,(sp+8) 8008cd8: 37 9c 00 10 addi sp,sp,16 8008cdc: c3 a0 00 00 ret the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 8008ce0: 28 23 00 14 lw r3,(r1+20) 8008ce4: 59 83 00 00 sw (r12+0),r3 if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 8008ce8: 45 62 00 09 be r11,r2,8008d0c the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 8008cec: 28 22 00 1c lw r2,(r1+28) case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; if ( new_priority != RTEMS_CURRENT_PRIORITY ) { the_thread->real_priority = new_priority; 8008cf0: 58 2b 00 18 sw (r1+24),r11 if ( the_thread->resource_count == 0 || 8008cf4: 44 40 00 03 be r2,r0,8008d00 8008cf8: 28 22 00 14 lw r2,(r1+20) 8008cfc: 51 62 00 04 bgeu r11,r2,8008d0c <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 8008d00: b9 60 10 00 mv r2,r11 8008d04: 34 03 00 00 mvi r3,0 8008d08: f8 00 07 e9 calli 800acac <_Thread_Change_priority> } _Thread_Enable_dispatch(); 8008d0c: f8 00 09 98 calli 800b36c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 8008d10: 34 04 00 00 mvi r4,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8008d14: b8 80 08 00 mv r1,r4 8008d18: 2b 9d 00 04 lw ra,(sp+4) 8008d1c: 2b 8b 00 0c lw r11,(sp+12) 8008d20: 2b 8c 00 08 lw r12,(sp+8) 8008d24: 37 9c 00 10 addi sp,sp,16 8008d28: c3 a0 00 00 ret =============================================================================== 080032d0 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 80032d0: 37 9c ff ec addi sp,sp,-20 80032d4: 5b 8b 00 10 sw (sp+16),r11 80032d8: 5b 8c 00 0c sw (sp+12),r12 80032dc: 5b 8d 00 08 sw (sp+8),r13 80032e0: 5b 9d 00 04 sw (sp+4),ra register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; 80032e4: 34 04 00 09 mvi r4,9 rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 80032e8: b8 40 58 00 mv r11,r2 80032ec: b8 60 68 00 mv r13,r3 register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 80032f0: 44 40 00 06 be r2,r0,8003308 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 80032f4: 37 82 00 14 addi r2,sp,20 80032f8: f8 00 08 9a calli 8005560 <_Thread_Get> switch ( location ) { 80032fc: 2b 8c 00 14 lw r12,(sp+20) case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 8003300: 34 04 00 04 mvi r4,4 if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 8003304: 45 80 00 08 be r12,r0,8003324 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8003308: b8 80 08 00 mv r1,r4 800330c: 2b 9d 00 04 lw ra,(sp+4) 8003310: 2b 8b 00 10 lw r11,(sp+16) 8003314: 2b 8c 00 0c lw r12,(sp+12) 8003318: 2b 8d 00 08 lw r13,(sp+8) 800331c: 37 9c 00 14 addi sp,sp,20 8003320: c3 a0 00 00 ret the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( 8003324: 34 02 00 00 mvi r2,0 8003328: b9 60 18 00 mv r3,r11 800332c: 34 04 00 00 mvi r4,0 8003330: b9 a0 28 00 mv r5,r13 8003334: f8 00 0c 13 calli 8006380 <_Thread_Start> 8003338: 5c 2c 00 0a bne r1,r12,8003360 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 800333c: f8 00 08 7c calli 800552c <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 8003340: 34 04 00 0e mvi r4,14 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8003344: b8 80 08 00 mv r1,r4 8003348: 2b 9d 00 04 lw ra,(sp+4) 800334c: 2b 8b 00 10 lw r11,(sp+16) 8003350: 2b 8c 00 0c lw r12,(sp+12) 8003354: 2b 8d 00 08 lw r13,(sp+8) 8003358: 37 9c 00 14 addi sp,sp,20 800335c: c3 a0 00 00 ret switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 8003360: f8 00 08 73 calli 800552c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 8003364: 34 04 00 00 mvi r4,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8003368: b8 80 08 00 mv r1,r4 800336c: 2b 9d 00 04 lw ra,(sp+4) 8003370: 2b 8b 00 10 lw r11,(sp+16) 8003374: 2b 8c 00 0c lw r12,(sp+12) 8003378: 2b 8d 00 08 lw r13,(sp+8) 800337c: 37 9c 00 14 addi sp,sp,20 8003380: c3 a0 00 00 ret =============================================================================== 08003ef8 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 8003ef8: 37 9c ff ec addi sp,sp,-20 8003efc: 5b 8b 00 10 sw (sp+16),r11 8003f00: 5b 8c 00 0c sw (sp+12),r12 8003f04: 5b 8d 00 08 sw (sp+8),r13 8003f08: 5b 9d 00 04 sw (sp+4),ra 8003f0c: b8 40 58 00 mv r11,r2 8003f10: b8 60 68 00 mv r13,r3 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 8003f14: 34 02 00 09 mvi r2,9 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 8003f18: 45 60 00 07 be r11,r0,8003f34 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 8003f1c: 37 82 00 14 addi r2,sp,20 8003f20: f8 00 08 95 calli 8006174 <_Thread_Get> 8003f24: b8 20 60 00 mv r12,r1 switch (location) { 8003f28: 2b 81 00 14 lw r1,(sp+20) #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 8003f2c: 34 02 00 04 mvi r2,4 if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 8003f30: 44 20 00 08 be r1,r0,8003f50 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8003f34: b8 40 08 00 mv r1,r2 8003f38: 2b 9d 00 04 lw ra,(sp+4) 8003f3c: 2b 8b 00 10 lw r11,(sp+16) 8003f40: 2b 8c 00 0c lw r12,(sp+12) 8003f44: 2b 8d 00 08 lw r13,(sp+8) 8003f48: 37 9c 00 14 addi sp,sp,20 8003f4c: c3 a0 00 00 ret case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 8003f50: 29 84 01 30 lw r4,(r12+304) while (tvp) { 8003f54: 44 81 00 08 be r4,r1,8003f74 if (tvp->ptr == ptr) { 8003f58: 28 81 00 04 lw r1,(r4+4) 8003f5c: 5c 2b 00 04 bne r1,r11,8003f6c 8003f60: e0 00 00 18 bi 8003fc0 8003f64: 28 82 00 04 lw r2,(r4+4) 8003f68: 44 4b 00 16 be r2,r11,8003fc0 <== NEVER TAKEN tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 8003f6c: 28 84 00 00 lw r4,(r4+0) case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 8003f70: 5c 80 ff fd bne r4,r0,8003f64 /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); 8003f74: 34 01 00 14 mvi r1,20 8003f78: f8 00 0e 71 calli 800793c <_Workspace_Allocate> if (new == NULL) { 8003f7c: 44 20 00 1b be r1,r0,8003fe8 } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 8003f80: 29 82 01 30 lw r2,(r12+304) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 8003f84: 29 63 00 00 lw r3,(r11+0) new->ptr = ptr; 8003f88: 58 2b 00 04 sw (r1+4),r11 new->dtor = dtor; 8003f8c: 58 2d 00 10 sw (r1+16),r13 _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 8003f90: 58 23 00 08 sw (r1+8),r3 new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 8003f94: 58 22 00 00 sw (r1+0),r2 the_thread->task_variables = new; 8003f98: 59 81 01 30 sw (r12+304),r1 _Thread_Enable_dispatch(); 8003f9c: f8 00 08 69 calli 8006140 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 8003fa0: 34 02 00 00 mvi r2,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8003fa4: b8 40 08 00 mv r1,r2 8003fa8: 2b 9d 00 04 lw ra,(sp+4) 8003fac: 2b 8b 00 10 lw r11,(sp+16) 8003fb0: 2b 8c 00 0c lw r12,(sp+12) 8003fb4: 2b 8d 00 08 lw r13,(sp+8) 8003fb8: 37 9c 00 14 addi sp,sp,20 8003fbc: c3 a0 00 00 ret * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { tvp->dtor = dtor; 8003fc0: 58 8d 00 10 sw (r4+16),r13 _Thread_Enable_dispatch(); 8003fc4: f8 00 08 5f calli 8006140 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 8003fc8: 34 02 00 00 mvi r2,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8003fcc: b8 40 08 00 mv r1,r2 8003fd0: 2b 9d 00 04 lw ra,(sp+4) 8003fd4: 2b 8b 00 10 lw r11,(sp+16) 8003fd8: 2b 8c 00 0c lw r12,(sp+12) 8003fdc: 2b 8d 00 08 lw r13,(sp+8) 8003fe0: 37 9c 00 14 addi sp,sp,20 8003fe4: c3 a0 00 00 ret * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); 8003fe8: f8 00 08 56 calli 8006140 <_Thread_Enable_dispatch> return RTEMS_NO_MEMORY; 8003fec: 34 02 00 1a mvi r2,26 8003ff0: e3 ff ff d1 bi 8003f34 =============================================================================== 08003ff4 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 8003ff4: 37 9c ff f4 addi sp,sp,-12 8003ff8: 5b 8b 00 08 sw (sp+8),r11 8003ffc: 5b 9d 00 04 sw (sp+4),ra 8004000: b8 40 58 00 mv r11,r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 8004004: 34 02 00 09 mvi r2,9 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 8004008: 45 60 00 06 be r11,r0,8004020 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 800400c: 37 82 00 0c addi r2,sp,12 8004010: f8 00 08 59 calli 8006174 <_Thread_Get> switch (location) { 8004014: 2b 82 00 0c lw r2,(sp+12) 8004018: 44 40 00 07 be r2,r0,8004034 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 800401c: 34 02 00 04 mvi r2,4 } 8004020: b8 40 08 00 mv r1,r2 8004024: 2b 9d 00 04 lw ra,(sp+4) 8004028: 2b 8b 00 08 lw r11,(sp+8) 800402c: 37 9c 00 0c addi sp,sp,12 8004030: c3 a0 00 00 ret the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 8004034: 28 24 01 30 lw r4,(r1+304) while (tvp) { 8004038: 44 82 00 09 be r4,r2,800405c if (tvp->ptr == ptr) { 800403c: 28 82 00 04 lw r2,(r4+4) 8004040: 5c 4b 00 05 bne r2,r11,8004054 8004044: e0 00 00 18 bi 80040a4 8004048: 28 62 00 04 lw r2,(r3+4) 800404c: 44 4b 00 0b be r2,r11,8004078 8004050: b8 60 20 00 mv r4,r3 _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 8004054: 28 83 00 00 lw r3,(r4+0) the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 8004058: 5c 60 ff fc bne r3,r0,8004048 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 800405c: f8 00 08 39 calli 8006140 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 8004060: 34 02 00 09 mvi r2,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8004064: b8 40 08 00 mv r1,r2 8004068: 2b 9d 00 04 lw ra,(sp+4) 800406c: 2b 8b 00 08 lw r11,(sp+8) 8004070: 37 9c 00 0c addi sp,sp,12 8004074: c3 a0 00 00 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 8004078: 28 62 00 00 lw r2,(r3+0) 800407c: 58 82 00 00 sw (r4+0),r2 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 8004080: b8 60 10 00 mv r2,r3 8004084: f8 00 00 39 calli 8004168 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 8004088: f8 00 08 2e calli 8006140 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 800408c: 34 02 00 00 mvi r2,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8004090: b8 40 08 00 mv r1,r2 8004094: 2b 9d 00 04 lw ra,(sp+4) 8004098: 2b 8b 00 08 lw r11,(sp+8) 800409c: 37 9c 00 0c addi sp,sp,12 80040a0: c3 a0 00 00 ret while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 80040a4: 28 82 00 00 lw r2,(r4+0) 80040a8: b8 80 18 00 mv r3,r4 80040ac: 58 22 01 30 sw (r1+304),r2 80040b0: e3 ff ff f4 bi 8004080 =============================================================================== 080040b4 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 80040b4: 37 9c ff f0 addi sp,sp,-16 80040b8: 5b 8b 00 0c sw (sp+12),r11 80040bc: 5b 8c 00 08 sw (sp+8),r12 80040c0: 5b 9d 00 04 sw (sp+4),ra 80040c4: b8 40 58 00 mv r11,r2 80040c8: b8 60 60 00 mv r12,r3 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 80040cc: 34 02 00 09 mvi r2,9 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 80040d0: 45 60 00 07 be r11,r0,80040ec return RTEMS_INVALID_ADDRESS; if ( !result ) 80040d4: 44 60 00 06 be r3,r0,80040ec return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 80040d8: 37 82 00 10 addi r2,sp,16 80040dc: f8 00 08 26 calli 8006174 <_Thread_Get> switch (location) { 80040e0: 2b 82 00 10 lw r2,(sp+16) 80040e4: 44 40 00 08 be r2,r0,8004104 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 80040e8: 34 02 00 04 mvi r2,4 } 80040ec: b8 40 08 00 mv r1,r2 80040f0: 2b 9d 00 04 lw ra,(sp+4) 80040f4: 2b 8b 00 0c lw r11,(sp+12) 80040f8: 2b 8c 00 08 lw r12,(sp+8) 80040fc: 37 9c 00 10 addi sp,sp,16 8004100: c3 a0 00 00 ret case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 8004104: 28 21 01 30 lw r1,(r1+304) while (tvp) { 8004108: 5c 22 00 04 bne r1,r2,8004118 800410c: e0 00 00 0f bi 8004148 */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 8004110: 28 21 00 00 lw r1,(r1+0) case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 8004114: 44 20 00 0d be r1,r0,8004148 <== NEVER TAKEN if (tvp->ptr == ptr) { 8004118: 28 22 00 04 lw r2,(r1+4) 800411c: 5c 4b ff fd bne r2,r11,8004110 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 8004120: 28 21 00 0c lw r1,(r1+12) 8004124: 59 81 00 00 sw (r12+0),r1 _Thread_Enable_dispatch(); 8004128: f8 00 08 06 calli 8006140 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 800412c: 34 02 00 00 mvi r2,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8004130: b8 40 08 00 mv r1,r2 8004134: 2b 9d 00 04 lw ra,(sp+4) 8004138: 2b 8b 00 0c lw r11,(sp+12) 800413c: 2b 8c 00 08 lw r12,(sp+8) 8004140: 37 9c 00 10 addi sp,sp,16 8004144: c3 a0 00 00 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 8004148: f8 00 07 fe calli 8006140 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 800414c: 34 02 00 09 mvi r2,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8004150: b8 40 08 00 mv r1,r2 8004154: 2b 9d 00 04 lw ra,(sp+4) 8004158: 2b 8b 00 0c lw r11,(sp+12) 800415c: 2b 8c 00 08 lw r12,(sp+8) 8004160: 37 9c 00 10 addi sp,sp,16 8004164: c3 a0 00 00 ret =============================================================================== 08004848 : case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 8004848: 34 02 00 09 mvi r2,9 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 800484c: 44 22 00 0b be r1,r2,8004878 8004850: 48 22 00 0c bg r1,r2,8004880 case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 8004854: 34 02 00 04 mvi r2,4 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8004858: 44 22 00 08 be r1,r2,8004878 800485c: 48 22 00 22 bg r1,r2,80048e4 case B0: baud_index = 0; break; case B50: baud_index = 1; break; 8004860: 34 02 00 01 mvi r2,1 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8004864: 44 22 00 05 be r1,r2,8004878 8004868: 48 22 00 2a bg r1,r2,8004910 case B0: baud_index = 0; break; 800486c: 34 02 00 00 mvi r2,0 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8004870: 44 20 00 02 be r1,r0,8004878 case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; default: baud_index = -1; break; 8004874: 34 02 ff ff mvi r2,-1 } return baud_index; } 8004878: b8 40 08 00 mv r1,r2 800487c: c3 a0 00 00 ret case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; 8004880: 34 02 00 0e mvi r2,14 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8004884: 44 22 ff fd be r1,r2,8004878 8004888: 48 22 00 0c bg r1,r2,80048b8 case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 800488c: 34 02 00 0b mvi r2,11 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8004890: 44 22 ff fa be r1,r2,8004878 8004894: 34 03 00 0b mvi r3,11 case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; 8004898: 34 02 00 0a mvi r2,10 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 800489c: 48 61 ff f7 bg r3,r1,8004878 case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; 80048a0: 34 02 00 0c mvi r2,12 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80048a4: 44 22 ff f5 be r1,r2,8004878 case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; 80048a8: 34 02 00 0d mvi r2,13 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80048ac: 44 22 ff f3 be r1,r2,8004878 <== ALWAYS TAKEN case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; default: baud_index = -1; break; 80048b0: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80048b4: e3 ff ff f1 bi 8004878 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80048b8: 34 03 10 02 mvi r3,4098 case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 80048bc: 34 02 00 11 mvi r2,17 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80048c0: 44 23 ff ee be r1,r3,8004878 80048c4: 48 23 00 18 bg r1,r3,8004924 case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 80048c8: 34 02 00 0f mvi r2,15 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80048cc: 44 22 ff eb be r1,r2,8004878 80048d0: 34 03 10 01 mvi r3,4097 case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 80048d4: 34 02 00 10 mvi r2,16 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80048d8: 44 23 ff e8 be r1,r3,8004878 <== ALWAYS TAKEN case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; default: baud_index = -1; break; 80048dc: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80048e0: e3 ff ff e6 bi 8004878 <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; 80048e4: 34 02 00 06 mvi r2,6 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80048e8: 44 22 ff e4 be r1,r2,8004878 80048ec: 34 03 00 06 mvi r3,6 case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; 80048f0: 34 02 00 05 mvi r2,5 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80048f4: 48 61 ff e1 bg r3,r1,8004878 case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; 80048f8: 34 02 00 07 mvi r2,7 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80048fc: 44 22 ff df be r1,r2,8004878 case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; 8004900: 34 02 00 08 mvi r2,8 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8004904: 44 22 ff dd be r1,r2,8004878 <== ALWAYS TAKEN case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; default: baud_index = -1; break; 8004908: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 800490c: e3 ff ff db bi 8004878 <== NOT EXECUTED int baud_index; switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 8004910: 34 02 00 02 mvi r2,2 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8004914: 44 22 ff d9 be r1,r2,8004878 case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; 8004918: 34 02 00 03 mvi r2,3 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 800491c: 5c 22 ff d6 bne r1,r2,8004874 <== NEVER TAKEN 8004920: e3 ff ff d6 bi 8004878 8004924: 34 03 10 03 mvi r3,4099 case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 8004928: 34 02 00 12 mvi r2,18 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 800492c: 44 23 ff d3 be r1,r3,8004878 8004930: 34 03 10 04 mvi r3,4100 case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 8004934: 34 02 00 13 mvi r2,19 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8004938: 5c 23 ff cf bne r1,r3,8004874 <== NEVER TAKEN 800493c: e3 ff ff cf bi 8004878 =============================================================================== 08004940 : int termios_baud ) { int32_t baud; switch (termios_baud) { 8004940: 34 03 00 09 mvi r3,9 case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; 8004944: 34 02 04 b0 mvi r2,1200 int termios_baud ) { int32_t baud; switch (termios_baud) { 8004948: 44 23 00 0d be r1,r3,800497c 800494c: 48 23 00 0e bg r1,r3,8004984 8004950: 34 03 00 04 mvi r3,4 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; 8004954: 34 02 00 86 mvi r2,134 int termios_baud ) { int32_t baud; switch (termios_baud) { 8004958: 44 23 00 09 be r1,r3,800497c 800495c: 48 23 00 29 bg r1,r3,8004a00 8004960: 34 03 00 01 mvi r3,1 case B0: baud = 0; break; case B50: baud = 50; break; 8004964: 34 02 00 32 mvi r2,50 int termios_baud ) { int32_t baud; switch (termios_baud) { 8004968: 44 23 00 05 be r1,r3,800497c 800496c: 48 23 00 32 bg r1,r3,8004a34 case B0: baud = 0; break; 8004970: 34 02 00 00 mvi r2,0 int termios_baud ) { int32_t baud; switch (termios_baud) { 8004974: 44 20 00 02 be r1,r0,800497c case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; default: baud = -1; break; 8004978: 34 02 ff ff mvi r2,-1 } return baud; } 800497c: b8 40 08 00 mv r1,r2 8004980: c3 a0 00 00 ret int termios_baud ) { int32_t baud; switch (termios_baud) { 8004984: 34 03 00 0e mvi r3,14 case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; 8004988: 34 02 4b 00 mvi r2,19200 int termios_baud ) { int32_t baud; switch (termios_baud) { 800498c: 44 23 ff fc be r1,r3,800497c 8004990: 48 23 00 0e bg r1,r3,80049c8 8004994: 34 03 00 0b mvi r3,11 case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; 8004998: 34 02 09 60 mvi r2,2400 int termios_baud ) { int32_t baud; switch (termios_baud) { 800499c: 44 23 ff f8 be r1,r3,800497c case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; 80049a0: 34 02 07 08 mvi r2,1800 int termios_baud ) { int32_t baud; switch (termios_baud) { 80049a4: 48 61 ff f6 bg r3,r1,800497c 80049a8: 34 03 00 0c mvi r3,12 case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; 80049ac: 34 02 12 c0 mvi r2,4800 int termios_baud ) { int32_t baud; switch (termios_baud) { 80049b0: 44 23 ff f3 be r1,r3,800497c 80049b4: 34 03 00 0d mvi r3,13 case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; 80049b8: 34 02 25 80 mvi r2,9600 int termios_baud ) { int32_t baud; switch (termios_baud) { 80049bc: 44 23 ff f0 be r1,r3,800497c <== ALWAYS TAKEN case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; default: baud = -1; break; 80049c0: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80049c4: e3 ff ff ee bi 800497c <== NOT EXECUTED case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; 80049c8: 78 04 08 01 mvhi r4,0x801 80049cc: 38 84 f7 74 ori r4,r4,0xf774 int termios_baud ) { int32_t baud; switch (termios_baud) { 80049d0: 34 03 10 02 mvi r3,4098 case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; 80049d4: 28 82 00 00 lw r2,(r4+0) int termios_baud ) { int32_t baud; switch (termios_baud) { 80049d8: 44 23 ff e9 be r1,r3,800497c 80049dc: 48 23 00 1d bg r1,r3,8004a50 80049e0: 34 03 00 0f mvi r3,15 case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; 80049e4: 38 02 96 00 mvu r2,0x9600 int termios_baud ) { int32_t baud; switch (termios_baud) { 80049e8: 44 23 ff e5 be r1,r3,800497c 80049ec: 34 03 10 01 mvi r3,4097 case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; 80049f0: 34 42 4b 00 addi r2,r2,19200 int termios_baud ) { int32_t baud; switch (termios_baud) { 80049f4: 44 23 ff e2 be r1,r3,800497c <== ALWAYS TAKEN case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; default: baud = -1; break; 80049f8: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80049fc: e3 ff ff e0 bi 800497c <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 8004a00: 34 03 00 06 mvi r3,6 case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; 8004a04: 34 02 00 c8 mvi r2,200 int termios_baud ) { int32_t baud; switch (termios_baud) { 8004a08: 44 23 ff dd be r1,r3,800497c case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; 8004a0c: 34 02 00 96 mvi r2,150 int termios_baud ) { int32_t baud; switch (termios_baud) { 8004a10: 48 61 ff db bg r3,r1,800497c 8004a14: 34 03 00 07 mvi r3,7 case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; 8004a18: 34 02 01 2c mvi r2,300 int termios_baud ) { int32_t baud; switch (termios_baud) { 8004a1c: 44 23 ff d8 be r1,r3,800497c 8004a20: 34 03 00 08 mvi r3,8 case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; 8004a24: 34 02 02 58 mvi r2,600 int termios_baud ) { int32_t baud; switch (termios_baud) { 8004a28: 44 23 ff d5 be r1,r3,800497c <== ALWAYS TAKEN case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; default: baud = -1; break; 8004a2c: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8004a30: e3 ff ff d3 bi 800497c <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 8004a34: 34 03 00 02 mvi r3,2 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 8004a38: 34 02 00 4b mvi r2,75 int termios_baud ) { int32_t baud; switch (termios_baud) { 8004a3c: 44 23 ff d0 be r1,r3,800497c 8004a40: 34 03 00 03 mvi r3,3 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; 8004a44: 34 02 00 6e mvi r2,110 int termios_baud ) { int32_t baud; switch (termios_baud) { 8004a48: 5c 23 ff cc bne r1,r3,8004978 <== NEVER TAKEN 8004a4c: e3 ff ff cc bi 800497c case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; 8004a50: 78 03 08 01 mvhi r3,0x801 8004a54: 38 63 fd f0 ori r3,r3,0xfdf0 8004a58: 28 62 00 00 lw r2,(r3+0) int termios_baud ) { int32_t baud; switch (termios_baud) { 8004a5c: 34 03 10 03 mvi r3,4099 8004a60: 44 23 ff c7 be r1,r3,800497c case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 8004a64: 78 04 08 01 mvhi r4,0x801 8004a68: 38 84 fd f4 ori r4,r4,0xfdf4 int termios_baud ) { int32_t baud; switch (termios_baud) { 8004a6c: 34 03 10 04 mvi r3,4100 case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 8004a70: 28 82 00 00 lw r2,(r4+0) int termios_baud ) { int32_t baud; switch (termios_baud) { 8004a74: 5c 23 ff c1 bne r1,r3,8004978 <== NEVER TAKEN 8004a78: e3 ff ff c1 bi 800497c =============================================================================== 0800531c : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 800531c: 78 06 08 02 mvhi r6,0x802 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 8005320: 78 05 08 02 mvhi r5,0x802 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 8005324: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 8005328: 38 c6 22 40 ori r6,r6,0x2240 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 800532c: 38 a5 22 44 ori r5,r5,0x2244 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 8005330: 38 84 22 48 ori r4,r4,0x2248 <== NOT EXECUTED int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 8005334: 58 c1 00 00 sw (r6+0),r1 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 8005338: 58 a2 00 00 sw (r5+0),r2 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 800533c: 58 83 00 00 sw (r4+0),r3 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 8005340: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8005344: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 08005150 : } } rtems_status_code rtems_termios_close (void *arg) { 8005150: 37 9c ff ec addi sp,sp,-20 8005154: 5b 8b 00 14 sw (sp+20),r11 8005158: 5b 8c 00 10 sw (sp+16),r12 800515c: 5b 8d 00 0c sw (sp+12),r13 8005160: 5b 8e 00 08 sw (sp+8),r14 8005164: 5b 9d 00 04 sw (sp+4),ra rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain( 8005168: 78 0c 08 02 mvhi r12,0x802 800516c: 39 8c 29 50 ori r12,r12,0x2950 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8005170: 28 24 00 00 lw r4,(r1+0) } } rtems_status_code rtems_termios_close (void *arg) { 8005174: b8 20 70 00 mv r14,r1 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain( 8005178: 29 81 00 00 lw r1,(r12+0) 800517c: 34 02 00 00 mvi r2,0 8005180: 34 03 00 00 mvi r3,0 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8005184: 28 8b 00 38 lw r11,(r4+56) rtems_status_code sc; sc = rtems_semaphore_obtain( 8005188: f8 00 09 ac calli 8007838 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 800518c: 5c 20 00 63 bne r1,r0,8005318 <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 8005190: 29 64 00 08 lw r4,(r11+8) 8005194: 34 84 ff ff addi r4,r4,-1 8005198: 59 64 00 08 sw (r11+8),r4 800519c: 5c 81 00 31 bne r4,r1,8005260 <== NEVER TAKEN if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 80051a0: 29 62 00 cc lw r2,(r11+204) 80051a4: 78 05 08 02 mvhi r5,0x802 80051a8: 38 a5 27 84 ori r5,r5,0x2784 80051ac: b4 42 10 00 add r2,r2,r2 80051b0: b4 42 10 00 add r2,r2,r2 80051b4: b4 42 10 00 add r2,r2,r2 80051b8: b4 42 10 00 add r2,r2,r2 80051bc: b4 42 10 00 add r2,r2,r2 80051c0: b4 a2 10 00 add r2,r5,r2 80051c4: 28 4d 00 04 lw r13,(r2+4) 80051c8: 45 a4 00 41 be r13,r4,80052cc /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 80051cc: b9 60 08 00 mv r1,r11 80051d0: d9 a0 00 00 call r13 rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 80051d4: 29 62 00 b4 lw r2,(r11+180) 80051d8: 34 01 00 02 mvi r1,2 80051dc: 44 41 00 46 be r2,r1,80052f4 <== NEVER TAKEN 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) 80051e0: 29 64 00 9c lw r4,(r11+156) 80051e4: 44 80 00 05 be r4,r0,80051f8 <== ALWAYS TAKEN (*tty->device.lastClose)(tty->major, tty->minor, arg); 80051e8: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 80051ec: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED 80051f0: b9 c0 18 00 mv r3,r14 <== NOT EXECUTED 80051f4: d8 80 00 00 call r4 <== NOT EXECUTED if (tty->forw == NULL) { 80051f8: 29 61 00 00 lw r1,(r11+0) 80051fc: 44 20 00 2c be r1,r0,80052ac <== ALWAYS TAKEN rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 8005200: 29 62 00 04 lw r2,(r11+4) <== NOT EXECUTED 8005204: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED 8005208: 29 62 00 04 lw r2,(r11+4) <== NOT EXECUTED } if (tty->back == NULL) { 800520c: 44 40 00 22 be r2,r0,8005294 <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 8005210: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 8005214: 29 61 00 14 lw r1,(r11+20) 8005218: f8 00 09 51 calli 800775c rtems_semaphore_delete (tty->osem); 800521c: 29 61 00 18 lw r1,(r11+24) 8005220: f8 00 09 4f calli 800775c rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 8005224: 29 61 00 8c lw r1,(r11+140) 8005228: f8 00 09 4d calli 800775c if ((tty->device.pollRead == NULL) || 800522c: 29 61 00 a0 lw r1,(r11+160) 8005230: 44 20 00 16 be r1,r0,8005288 8005234: 29 62 00 b4 lw r2,(r11+180) 8005238: 34 01 00 02 mvi r1,2 800523c: 44 41 00 13 be r2,r1,8005288 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 8005240: 29 61 00 58 lw r1,(r11+88) 8005244: fb ff f7 eb calli 80031f0 free (tty->rawOutBuf.theBuf); 8005248: 29 61 00 7c lw r1,(r11+124) 800524c: fb ff f7 e9 calli 80031f0 free (tty->cbuf); 8005250: 29 61 00 1c lw r1,(r11+28) 8005254: fb ff f7 e7 calli 80031f0 free (tty); 8005258: b9 60 08 00 mv r1,r11 800525c: fb ff f7 e5 calli 80031f0 } rtems_semaphore_release (rtems_termios_ttyMutex); 8005260: 29 81 00 00 lw r1,(r12+0) 8005264: f8 00 09 d1 calli 80079a8 return RTEMS_SUCCESSFUL; } 8005268: 34 01 00 00 mvi r1,0 800526c: 2b 9d 00 04 lw ra,(sp+4) 8005270: 2b 8b 00 14 lw r11,(sp+20) 8005274: 2b 8c 00 10 lw r12,(sp+16) 8005278: 2b 8d 00 0c lw r13,(sp+12) 800527c: 2b 8e 00 08 lw r14,(sp+8) 8005280: 37 9c 00 14 addi sp,sp,20 8005284: c3 a0 00 00 ret 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); 8005288: 29 61 00 68 lw r1,(r11+104) 800528c: f8 00 09 34 calli 800775c 8005290: e3 ff ff ec bi 8005240 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 8005294: 78 02 08 02 mvhi r2,0x802 8005298: 38 42 29 58 ori r2,r2,0x2958 800529c: 58 41 00 00 sw (r2+0),r1 if ( rtems_termios_ttyHead != NULL ) { 80052a0: 44 20 ff dd be r1,r0,8005214 <== ALWAYS TAKEN rtems_termios_ttyHead->back = NULL; 80052a4: 58 20 00 04 sw (r1+4),r0 <== NOT EXECUTED 80052a8: e3 ff ff db bi 8005214 <== NOT EXECUTED 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; 80052ac: 29 62 00 04 lw r2,(r11+4) 80052b0: 78 03 08 02 mvhi r3,0x802 80052b4: 38 63 29 54 ori r3,r3,0x2954 80052b8: 58 62 00 00 sw (r3+0),r2 if ( rtems_termios_ttyTail != NULL ) { 80052bc: 44 41 ff f6 be r2,r1,8005294 <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; 80052c0: 58 40 00 00 sw (r2+0),r0 <== NOT EXECUTED 80052c4: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 80052c8: e3 ff ff d2 bi 8005210 <== 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); 80052cc: 29 61 00 18 lw r1,(r11+24) 80052d0: 34 02 00 00 mvi r2,0 80052d4: 34 03 00 00 mvi r3,0 80052d8: f8 00 09 58 calli 8007838 if (sc != RTEMS_SUCCESSFUL) { 80052dc: 5d a1 00 0f bne r13,r1,8005318 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 80052e0: b9 60 08 00 mv r1,r11 80052e4: fb ff fe 4e calli 8004c1c } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 80052e8: 29 62 00 b4 lw r2,(r11+180) 80052ec: 34 01 00 02 mvi r1,2 80052f0: 5c 41 ff bc bne r2,r1,80051e0 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 80052f4: 29 61 00 c4 lw r1,(r11+196) 80052f8: 34 02 00 01 mvi r2,1 80052fc: f8 00 07 e4 calli 800728c 8005300: b8 20 68 00 mv r13,r1 if (sc != RTEMS_SUCCESSFUL) 8005304: 5c 20 00 05 bne r1,r0,8005318 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 8005308: 29 61 00 c8 lw r1,(r11+200) 800530c: 34 02 00 01 mvi r2,1 8005310: f8 00 07 df calli 800728c if (sc != RTEMS_SUCCESSFUL) 8005314: 44 2d ff b3 be r1,r13,80051e0 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 8005318: f8 00 0b 40 calli 8008018 <== NOT EXECUTED =============================================================================== 08006b80 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 8006b80: 37 9c ff f8 addi sp,sp,-8 8006b84: 5b 8b 00 08 sw (sp+8),r11 8006b88: 5b 9d 00 04 sw (sp+4),ra rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 8006b8c: 28 25 00 90 lw r5,(r1+144) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8006b90: 28 24 00 b4 lw r4,(r1+180) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 8006b94: b4 a2 10 00 add r2,r5,r2 8006b98: 58 22 00 90 sw (r1+144),r2 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8006b9c: 34 02 00 02 mvi r2,2 8006ba0: 44 82 00 16 be r4,r2,8006bf8 if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 8006ba4: 28 23 00 cc lw r3,(r1+204) 8006ba8: 34 02 00 05 mvi r2,5 8006bac: 44 62 00 08 be r3,r2,8006bcc rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 8006bb0: fb ff ff 39 calli 8006894 8006bb4: b8 20 58 00 mv r11,r1 } 8006bb8: b9 60 08 00 mv r1,r11 8006bbc: 2b 9d 00 04 lw ra,(sp+4) 8006bc0: 2b 8b 00 08 lw r11,(sp+8) 8006bc4: 37 9c 00 08 addi sp,sp,8 8006bc8: c3 a0 00 00 ret if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8006bcc: 78 02 08 02 mvhi r2,0x802 8006bd0: 38 42 27 84 ori r2,r2,0x2784 8006bd4: 28 42 00 b4 lw r2,(r2+180) rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ 8006bd8: 34 0b 00 00 mvi r11,0 if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8006bdc: 44 40 ff f7 be r2,r0,8006bb8 <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 8006be0: d8 40 00 00 call r2 } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); } 8006be4: b9 60 08 00 mv r1,r11 8006be8: 2b 9d 00 04 lw ra,(sp+4) 8006bec: 2b 8b 00 08 lw r11,(sp+8) 8006bf0: 37 9c 00 08 addi sp,sp,8 8006bf4: c3 a0 00 00 ret if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 8006bf8: 28 21 00 c8 lw r1,(r1+200) if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ 8006bfc: 34 0b 00 00 mvi r11,0 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 8006c00: f8 00 01 a3 calli 800728c if (sc != RTEMS_SUCCESSFUL) 8006c04: 44 20 ff ed be r1,r0,8006bb8 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 8006c08: f8 00 05 04 calli 8008018 <== NOT EXECUTED =============================================================================== 080064a4 : * 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) { 80064a4: 37 9c ff bc addi sp,sp,-68 80064a8: 5b 8b 00 44 sw (sp+68),r11 80064ac: 5b 8c 00 40 sw (sp+64),r12 80064b0: 5b 8d 00 3c sw (sp+60),r13 80064b4: 5b 8e 00 38 sw (sp+56),r14 80064b8: 5b 8f 00 34 sw (sp+52),r15 80064bc: 5b 90 00 30 sw (sp+48),r16 80064c0: 5b 91 00 2c sw (sp+44),r17 80064c4: 5b 92 00 28 sw (sp+40),r18 80064c8: 5b 93 00 24 sw (sp+36),r19 80064cc: 5b 94 00 20 sw (sp+32),r20 80064d0: 5b 95 00 1c sw (sp+28),r21 80064d4: 5b 96 00 18 sw (sp+24),r22 80064d8: 5b 97 00 14 sw (sp+20),r23 80064dc: 5b 98 00 10 sw (sp+16),r24 80064e0: 5b 99 00 0c sw (sp+12),r25 80064e4: 5b 9b 00 08 sw (sp+8),fp 80064e8: 5b 9d 00 04 sw (sp+4),ra 80064ec: b8 20 58 00 mv r11,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) { 80064f0: 28 21 00 cc lw r1,(r1+204) 80064f4: 78 0e 08 02 mvhi r14,0x802 80064f8: 39 ce 27 84 ori r14,r14,0x2784 80064fc: b4 21 08 00 add r1,r1,r1 8006500: b4 21 08 00 add r1,r1,r1 8006504: b4 21 08 00 add r1,r1,r1 8006508: b4 21 08 00 add r1,r1,r1 800650c: b4 21 08 00 add r1,r1,r1 8006510: b5 c1 08 00 add r1,r14,r1 8006514: 28 24 00 10 lw r4,(r1+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) { 8006518: b8 40 68 00 mv r13,r2 800651c: b8 60 78 00 mv r15,r3 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) { 8006520: 44 80 00 30 be r4,r0,80065e0 while (len--) { 8006524: 44 60 00 11 be r3,r0,8006568 <== NEVER TAKEN 8006528: 34 0c 00 00 mvi r12,0 800652c: e0 00 00 09 bi 8006550 8006530: 29 64 00 cc lw r4,(r11+204) 8006534: b4 84 20 00 add r4,r4,r4 8006538: b4 84 20 00 add r4,r4,r4 800653c: b4 84 20 00 add r4,r4,r4 8006540: b4 84 20 00 add r4,r4,r4 8006544: b4 84 20 00 add r4,r4,r4 8006548: b5 c4 20 00 add r4,r14,r4 800654c: 28 84 00 10 lw r4,(r4+16) * NOTE: This routine runs in the context of the * 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) 8006550: b5 ac 08 00 add r1,r13,r12 rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 8006554: 40 21 00 00 lbu r1,(r1+0) 8006558: 35 8c 00 01 addi r12,r12,1 800655c: b9 60 10 00 mv r2,r11 8006560: d8 80 00 00 call r4 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--) { 8006564: 5d 8f ff f3 bne r12,r15,8006530 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 8006568: 29 61 00 e4 lw r1,(r11+228) (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; } return 0; 800656c: 34 10 00 00 mvi r16,0 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 8006570: 5c 20 00 08 bne r1,r0,8006590 <== NEVER TAKEN 8006574: 29 63 00 dc lw r3,(r11+220) 8006578: 44 70 00 06 be r3,r16,8006590 <== ALWAYS TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 800657c: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED 8006580: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED 8006584: d8 60 00 00 call r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 8006588: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 800658c: 59 61 00 e4 sw (r11+228),r1 <== NOT EXECUTED } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 8006590: ba 00 08 00 mv r1,r16 8006594: 2b 9d 00 04 lw ra,(sp+4) 8006598: 2b 8b 00 44 lw r11,(sp+68) 800659c: 2b 8c 00 40 lw r12,(sp+64) 80065a0: 2b 8d 00 3c lw r13,(sp+60) 80065a4: 2b 8e 00 38 lw r14,(sp+56) 80065a8: 2b 8f 00 34 lw r15,(sp+52) 80065ac: 2b 90 00 30 lw r16,(sp+48) 80065b0: 2b 91 00 2c lw r17,(sp+44) 80065b4: 2b 92 00 28 lw r18,(sp+40) 80065b8: 2b 93 00 24 lw r19,(sp+36) 80065bc: 2b 94 00 20 lw r20,(sp+32) 80065c0: 2b 95 00 1c lw r21,(sp+28) 80065c4: 2b 96 00 18 lw r22,(sp+24) 80065c8: 2b 97 00 14 lw r23,(sp+20) 80065cc: 2b 98 00 10 lw r24,(sp+16) 80065d0: 2b 99 00 0c lw r25,(sp+12) 80065d4: 2b 9b 00 08 lw fp,(sp+8) 80065d8: 37 9c 00 44 addi sp,sp,68 80065dc: c3 a0 00 00 ret 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) { 80065e0: 34 12 00 00 mvi r18,0 80065e4: 34 10 00 00 mvi r16,0 flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 80065e8: 34 14 00 20 mvi r20,32 /* disable interrupts */ rtems_interrupt_disable(level); 80065ec: 34 13 ff fe mvi r19,-2 tty->flow_ctrl &= ~FL_OSTOP; 80065f0: 34 15 ff df mvi r21,-33 /* * 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); 80065f4: 35 77 00 30 addi r23,r11,48 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; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 80065f8: 34 16 04 00 mvi r22,1024 /* 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) ) { 80065fc: 34 19 01 00 mvi r25,256 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, 8006600: 35 7b 00 4a addi fp,r11,74 flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 8006604: 34 18 ff ef mvi r24,-17 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 8006608: 45 e0 00 39 be r15,r0,80066ec <== NEVER TAKEN c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 800660c: 29 63 00 b8 lw r3,(r11+184) } return 0; } while (len--) { c = *buf++; 8006610: 41 ae 00 00 lbu r14,(r13+0) 8006614: 35 ad 00 01 addi r13,r13,1 /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 8006618: 20 63 02 00 andi r3,r3,0x200 800661c: 44 60 00 05 be r3,r0,8006630 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 8006620: 41 63 00 4a lbu r3,(r11+74) 8006624: 44 6e 00 53 be r3,r14,8006770 <== NEVER TAKEN /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 8006628: 41 63 00 49 lbu r3,(r11+73) 800662c: 44 6e 00 36 be r3,r14,8006704 <== NEVER TAKEN /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 8006630: 5e 40 00 39 bne r18,r0,8006714 <== NEVER TAKEN } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 8006634: 29 63 00 60 lw r3,(r11+96) 8006638: 29 62 00 64 lw r2,(r11+100) 800663c: 34 61 00 01 addi r1,r3,1 8006640: f8 00 5e c2 calli 801e148 <__umodsi3> 8006644: b8 20 60 00 mv r12,r1 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 8006648: 90 00 88 00 rcsr r17,IE 800664c: a2 33 18 00 and r3,r17,r19 8006650: d0 03 00 00 wcsr IE,r3 if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 8006654: 29 63 00 5c lw r3,(r11+92) 8006658: 29 64 00 64 lw r4,(r11+100) % tty->rawInBuf.Size) > tty->highwater) && 800665c: 29 62 00 64 lw r2,(r11+100) } } 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) 8006660: c8 83 18 00 sub r3,r4,r3 % tty->rawInBuf.Size) > tty->highwater) && 8006664: b4 61 08 00 add r1,r3,r1 8006668: f8 00 5e b8 calli 801e148 <__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) 800666c: 29 63 00 c0 lw r3,(r11+192) 8006670: 50 61 00 0d bgeu r3,r1,80066a4 <== ALWAYS TAKEN % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 8006674: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8006678: 20 63 00 01 andi r3,r3,0x1 <== 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) && 800667c: 5c 60 00 0a bne r3,r0,80066a4 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 8006680: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8006684: 38 63 00 01 ori r3,r3,0x1 <== NOT EXECUTED 8006688: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 800668c: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8006690: 20 63 04 02 andi r3,r3,0x402 <== NOT EXECUTED 8006694: 44 76 00 44 be r3,r22,80067a4 <== 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) ) { 8006698: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 800669c: 20 21 01 04 andi r1,r1,0x104 <== NOT EXECUTED 80066a0: 44 39 00 4f be r1,r25,80067dc <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 80066a4: d0 11 00 00 wcsr IE,r17 if (newTail == tty->rawInBuf.Head) { 80066a8: 29 63 00 5c lw r3,(r11+92) 80066ac: 44 6c 00 37 be r3,r12,8006788 <== NEVER TAKEN dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 80066b0: 29 63 00 58 lw r3,(r11+88) 80066b4: b4 6c 18 00 add r3,r3,r12 80066b8: 30 6e 00 00 sb (r3+0),r14 tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 80066bc: 29 63 00 e4 lw r3,(r11+228) if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 80066c0: 59 6c 00 60 sw (r11+96),r12 /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 80066c4: 5c 60 00 08 bne r3,r0,80066e4 <== NEVER TAKEN 80066c8: 29 64 00 dc lw r4,(r11+220) 80066cc: 44 83 00 06 be r4,r3,80066e4 <== ALWAYS TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 80066d0: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED 80066d4: ba e0 08 00 mv r1,r23 <== NOT EXECUTED 80066d8: d8 80 00 00 call r4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 80066dc: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 80066e0: 59 63 00 e4 sw (r11+228),r3 <== NOT EXECUTED 80066e4: 35 ef ff ff addi r15,r15,-1 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 80066e8: 5d e0 ff c9 bne r15,r0,800660c <== NEVER TAKEN } } } } tty->rawInBufDropped += dropped; 80066ec: 29 62 00 78 lw r2,(r11+120) rtems_semaphore_release (tty->rawInBuf.Semaphore); 80066f0: 29 61 00 68 lw r1,(r11+104) } } } } tty->rawInBufDropped += dropped; 80066f4: b4 50 10 00 add r2,r2,r16 80066f8: 59 62 00 78 sw (r11+120),r2 rtems_semaphore_release (tty->rawInBuf.Semaphore); 80066fc: f8 00 04 ab calli 80079a8 return dropped; 8006700: e3 ff ff a4 bi 8006590 flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 8006704: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8006708: a0 38 08 00 and r1,r1,r24 <== NOT EXECUTED 800670c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED 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--) { 8006710: 34 12 00 01 mvi r18,1 <== 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) { 8006714: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8006718: 20 63 00 30 andi r3,r3,0x30 <== NOT EXECUTED 800671c: 5c 74 ff f2 bne r3,r20,80066e4 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 8006720: 90 00 60 00 rcsr r12,IE <== NOT EXECUTED 8006724: a1 93 18 00 and r3,r12,r19 <== NOT EXECUTED 8006728: d0 03 00 00 wcsr IE,r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 800672c: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 8006730: 29 61 00 94 lw r1,(r11+148) <== 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; 8006734: a0 75 18 00 and r3,r3,r21 <== NOT EXECUTED 8006738: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 800673c: 5c 20 00 04 bne r1,r0,800674c <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 8006740: d0 0c 00 00 wcsr IE,r12 <== 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; 8006744: 35 ef ff ff addi r15,r15,-1 <== NOT EXECUTED 8006748: e3 ff ff e8 bi 80066e8 <== 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)( 800674c: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 8006750: 29 62 00 84 lw r2,(r11+132) <== 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)( 8006754: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8006758: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800675c: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 8006760: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8006764: d8 80 00 00 call r4 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 8006768: d0 0c 00 00 wcsr IE,r12 <== NOT EXECUTED 800676c: e3 ff ff f6 bi 8006744 <== 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]) { 8006770: 41 64 00 49 lbu r4,(r11+73) <== NOT EXECUTED 8006774: 44 83 00 08 be r4,r3,8006794 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 8006778: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 800677c: 38 21 00 10 ori r1,r1,0x10 <== NOT EXECUTED 8006780: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED 8006784: e3 ff ff e3 bi 8006710 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 8006788: 36 10 00 01 addi r16,r16,1 <== 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; 800678c: 35 ef ff ff addi r15,r15,-1 <== NOT EXECUTED 8006790: e3 ff ff d6 bi 80066e8 <== 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; 8006794: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8006798: 18 21 00 10 xori r1,r1,0x10 <== NOT EXECUTED 800679c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED 80067a0: e3 ff ff dc bi 8006710 <== 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) || 80067a4: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 80067a8: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 80067ac: 5c 20 00 03 bne r1,r0,80067b8 <== NOT EXECUTED 80067b0: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED 80067b4: 5c 41 ff bc bne r2,r1,80066a4 <== 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; 80067b8: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 80067bc: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 80067c0: 29 61 00 10 lw r1,(r11+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; 80067c4: 38 42 00 02 ori r2,r2,0x2 <== NOT EXECUTED 80067c8: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 80067cc: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 80067d0: bb 60 10 00 mv r2,fp <== NOT EXECUTED 80067d4: d8 80 00 00 call r4 <== NOT EXECUTED 80067d8: e3 ff ff b3 bi 80066a4 <== 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; 80067dc: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 80067e0: 29 62 00 ac lw r2,(r11+172) <== 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; 80067e4: 38 21 00 04 ori r1,r1,0x4 <== NOT EXECUTED 80067e8: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 80067ec: 44 40 ff ae be r2,r0,80066a4 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 80067f0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80067f4: d8 40 00 00 call r2 <== NOT EXECUTED 80067f8: e3 ff ff ab bi 80066a4 <== NOT EXECUTED =============================================================================== 08004a7c : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 8004a7c: 37 9c ff f8 addi sp,sp,-8 8004a80: 5b 8b 00 08 sw (sp+8),r11 8004a84: 5b 9d 00 04 sw (sp+4),ra rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 8004a88: 78 05 08 02 mvhi r5,0x802 8004a8c: 38 a5 29 50 ori r5,r5,0x2950 8004a90: 28 ab 00 00 lw r11,(r5+0) 8004a94: 45 60 00 05 be r11,r0,8004aa8 <== ALWAYS TAKEN RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 8004a98: 2b 9d 00 04 lw ra,(sp+4) 8004a9c: 2b 8b 00 08 lw r11,(sp+8) 8004aa0: 37 9c 00 08 addi sp,sp,8 8004aa4: c3 a0 00 00 ret /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 8004aa8: 78 02 08 01 mvhi r2,0x801 8004aac: 38 42 fd f8 ori r2,r2,0xfdf8 8004ab0: 28 41 00 00 lw r1,(r2+0) 8004ab4: 34 03 00 54 mvi r3,84 8004ab8: 34 02 00 01 mvi r2,1 8004abc: 34 04 00 00 mvi r4,0 8004ac0: f8 00 0a a3 calli 800754c rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 8004ac4: 44 2b ff f5 be r1,r11,8004a98 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 8004ac8: f8 00 0d 54 calli 8008018 <== NOT EXECUTED =============================================================================== 08005348 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 8005348: 37 9c ff e8 addi sp,sp,-24 800534c: 5b 8b 00 18 sw (sp+24),r11 8005350: 5b 8c 00 14 sw (sp+20),r12 8005354: 5b 8d 00 10 sw (sp+16),r13 8005358: 5b 8e 00 0c sw (sp+12),r14 800535c: 5b 8f 00 08 sw (sp+8),r15 8005360: 5b 9d 00 04 sw (sp+4),ra 8005364: b8 20 60 00 mv r12,r1 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8005368: 28 21 00 00 lw r1,(r1+0) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 800536c: 34 02 00 00 mvi r2,0 8005370: 34 03 00 00 mvi r3,0 rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8005374: 28 2b 00 38 lw r11,(r1+56) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 8005378: 59 80 00 0c sw (r12+12),r0 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; 800537c: 29 8e 00 08 lw r14,(r12+8) rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8005380: 29 61 00 18 lw r1,(r11+24) 8005384: f8 00 09 2d calli 8007838 8005388: b8 20 68 00 mv r13,r1 if (sc != RTEMS_SUCCESSFUL) { 800538c: 5c 20 00 21 bne r1,r0,8005410 <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 8005390: 29 81 00 04 lw r1,(r12+4) 8005394: 34 02 00 04 mvi r2,4 8005398: 44 22 00 18 be r1,r2,80053f8 <== NEVER TAKEN 800539c: 54 22 00 27 bgu r1,r2,8005438 80053a0: 34 02 00 02 mvi r2,2 80053a4: 44 22 00 31 be r1,r2,8005468 80053a8: 54 22 00 e3 bgu r1,r2,8005734 <== NEVER TAKEN 80053ac: 34 02 00 01 mvi r2,1 80053b0: 44 22 00 cd be r1,r2,80056e4 <== ALWAYS TAKEN default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 80053b4: 29 61 00 cc lw r1,(r11+204) 80053b8: 78 02 08 02 mvhi r2,0x802 80053bc: 38 42 27 84 ori r2,r2,0x2784 80053c0: b4 21 08 00 add r1,r1,r1 80053c4: b4 21 08 00 add r1,r1,r1 80053c8: b4 21 08 00 add r1,r1,r1 80053cc: b4 21 08 00 add r1,r1,r1 80053d0: b4 21 08 00 add r1,r1,r1 80053d4: b4 41 08 00 add r1,r2,r1 80053d8: 28 23 00 18 lw r3,(r1+24) sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; 80053dc: 34 0d 00 0a mvi r13,10 args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 80053e0: 44 60 00 0a be r3,r0,8005408 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 80053e4: b9 60 08 00 mv r1,r11 80053e8: b9 80 10 00 mv r2,r12 80053ec: d8 60 00 00 call r3 80053f0: b8 20 68 00 mv r13,r1 80053f4: e0 00 00 05 bi 8005408 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 80053f8: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 80053fc: 59 61 00 dc sw (r11+220),r1 <== NOT EXECUTED 8005400: 29 c1 00 04 lw r1,(r14+4) <== NOT EXECUTED 8005404: 59 61 00 e0 sw (r11+224),r1 <== NOT EXECUTED *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 8005408: 29 61 00 18 lw r1,(r11+24) 800540c: f8 00 09 67 calli 80079a8 args->ioctl_return = sc; return sc; } 8005410: b9 a0 08 00 mv r1,r13 } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; 8005414: 59 8d 00 0c sw (r12+12),r13 return sc; } 8005418: 2b 9d 00 04 lw ra,(sp+4) 800541c: 2b 8b 00 18 lw r11,(sp+24) 8005420: 2b 8c 00 14 lw r12,(sp+20) 8005424: 2b 8d 00 10 lw r13,(sp+16) 8005428: 2b 8e 00 0c lw r14,(sp+12) 800542c: 2b 8f 00 08 lw r15,(sp+8) 8005430: 37 9c 00 18 addi sp,sp,24 8005434: c3 a0 00 00 ret sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 8005438: 78 03 08 01 mvhi r3,0x801 800543c: 38 63 fe 14 ori r3,r3,0xfe14 8005440: 28 62 00 00 lw r2,(r3+0) 8005444: 44 22 00 71 be r1,r2,8005608 <== NEVER TAKEN 8005448: 54 22 00 7d bgu r1,r2,800563c 800544c: 34 02 00 05 mvi r2,5 8005450: 5c 22 ff d9 bne r1,r2,80053b4 <== ALWAYS TAKEN case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 8005454: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 8005458: 59 61 00 d4 sw (r11+212),r1 <== NOT EXECUTED 800545c: 29 c1 00 04 lw r1,(r14+4) <== NOT EXECUTED 8005460: 59 61 00 d8 sw (r11+216),r1 <== NOT EXECUTED break; 8005464: e3 ff ff e9 bi 8005408 <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 8005468: 29 81 00 08 lw r1,(r12+8) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 800546c: 29 63 00 b8 lw r3,(r11+184) case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 8005470: 28 22 00 00 lw r2,(r1+0) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 8005474: 20 63 02 00 andi r3,r3,0x200 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 8005478: 59 62 00 30 sw (r11+48),r2 800547c: 28 24 00 04 lw r4,(r1+4) 8005480: 59 64 00 34 sw (r11+52),r4 8005484: 28 24 00 08 lw r4,(r1+8) 8005488: 59 64 00 38 sw (r11+56),r4 800548c: 28 24 00 0c lw r4,(r1+12) 8005490: 59 64 00 3c sw (r11+60),r4 8005494: 28 24 00 10 lw r4,(r1+16) 8005498: 59 64 00 40 sw (r11+64),r4 800549c: 28 24 00 14 lw r4,(r1+20) 80054a0: 59 64 00 44 sw (r11+68),r4 80054a4: 28 24 00 18 lw r4,(r1+24) 80054a8: 59 64 00 48 sw (r11+72),r4 80054ac: 28 24 00 1c lw r4,(r1+28) 80054b0: 59 64 00 4c sw (r11+76),r4 80054b4: 28 21 00 20 lw r1,(r1+32) 80054b8: 59 61 00 50 sw (r11+80),r1 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 80054bc: 44 60 00 15 be r3,r0,8005510 !(tty->termios.c_iflag & IXON)) { 80054c0: 20 42 04 00 andi r2,r2,0x400 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 80054c4: 5c 40 00 13 bne r2,r0,8005510 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 80054c8: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 80054cc: 34 01 fd ef mvi r1,-529 <== NOT EXECUTED 80054d0: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 80054d4: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 80054d8: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 80054dc: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 80054e0: 44 20 00 0c be r1,r0,8005510 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 80054e4: 90 00 70 00 rcsr r14,IE <== NOT EXECUTED 80054e8: 34 01 ff fe mvi r1,-2 <== NOT EXECUTED 80054ec: a1 c1 08 00 and r1,r14,r1 <== NOT EXECUTED 80054f0: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 80054f4: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 80054f8: 34 01 ff df mvi r1,-33 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 80054fc: 29 63 00 94 lw r3,(r11+148) <== 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; 8005500: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8005504: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 8005508: 5c 60 00 90 bne r3,r0,8005748 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 800550c: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { 8005510: 29 61 00 b8 lw r1,(r11+184) 8005514: 20 21 04 00 andi r1,r1,0x400 8005518: 44 20 00 0c be r1,r0,8005548 <== ALWAYS TAKEN 800551c: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 8005520: 20 21 10 00 andi r1,r1,0x1000 <== NOT EXECUTED 8005524: 5c 20 00 09 bne r1,r0,8005548 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 8005528: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 800552c: 34 01 fb ff mvi r1,-1025 <== NOT EXECUTED 8005530: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8005534: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 8005538: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 800553c: 34 01 ff fd mvi r1,-3 <== NOT EXECUTED 8005540: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8005544: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 8005548: 29 61 00 b8 lw r1,(r11+184) 800554c: 20 21 01 00 andi r1,r1,0x100 8005550: 44 20 00 7c be r1,r0,8005740 <== ALWAYS TAKEN 8005554: 29 62 00 38 lw r2,(r11+56) <== NOT EXECUTED 8005558: 48 02 00 12 bg r0,r2,80055a0 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 800555c: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8005560: 34 01 fe ff mvi r1,-257 <== NOT EXECUTED 8005564: a0 61 08 00 and r1,r3,r1 <== NOT EXECUTED 8005568: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) { 800556c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8005570: 20 21 00 04 andi r1,r1,0x4 <== NOT EXECUTED 8005574: 44 20 00 06 be r1,r0,800558c <== NOT EXECUTED 8005578: 29 63 00 b0 lw r3,(r11+176) <== NOT EXECUTED 800557c: 44 60 00 04 be r3,r0,800558c <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 8005580: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8005584: d8 60 00 00 call r3 <== NOT EXECUTED 8005588: 29 62 00 38 lw r2,(r11+56) <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 800558c: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8005590: 34 01 ff fb mvi r1,-5 <== NOT EXECUTED 8005594: a0 61 08 00 and r1,r3,r1 <== NOT EXECUTED 8005598: 59 61 00 b8 sw (r11+184),r1 <== 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) { 800559c: 4c 40 00 04 bge r2,r0,80055ac <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDRTS; 80055a0: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 80055a4: 38 21 01 00 ori r1,r1,0x100 <== NOT EXECUTED 80055a8: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 80055ac: 29 61 00 30 lw r1,(r11+48) 80055b0: 20 22 10 00 andi r2,r1,0x1000 80055b4: 44 40 00 04 be r2,r0,80055c4 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXOF; 80055b8: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 80055bc: 38 42 04 00 ori r2,r2,0x400 <== NOT EXECUTED 80055c0: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 80055c4: 20 21 04 00 andi r1,r1,0x400 80055c8: 44 20 00 04 be r1,r0,80055d8 <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; 80055cc: 29 61 00 b8 lw r1,(r11+184) 80055d0: 38 21 02 00 ori r1,r1,0x200 80055d4: 59 61 00 b8 sw (r11+184),r1 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) { 80055d8: 29 6e 00 3c lw r14,(r11+60) 80055dc: 21 ce 00 02 andi r14,r14,0x2 80055e0: 45 c0 00 63 be r14,r0,800576c <== NEVER TAKEN tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 80055e4: 59 60 00 6c sw (r11+108),r0 tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 80055e8: 59 60 00 70 sw (r11+112),r0 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 80055ec: 59 60 00 74 sw (r11+116),r0 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 80055f0: 29 63 00 a8 lw r3,(r11+168) 80055f4: 44 60 ff 85 be r3,r0,8005408 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 80055f8: 29 61 00 10 lw r1,(r11+16) 80055fc: 35 62 00 30 addi r2,r11,48 8005600: d8 60 00 00 call r3 8005604: e3 ff ff 81 bi 8005408 case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 8005608: 29 62 00 60 lw r2,(r11+96) <== NOT EXECUTED 800560c: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 8005610: c8 41 08 00 sub r1,r2,r1 <== NOT EXECUTED if ( rawnc < 0 ) 8005614: 4c 20 00 03 bge r1,r0,8005620 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 8005618: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 800561c: b4 22 08 00 add r1,r1,r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 8005620: 29 64 00 20 lw r4,(r11+32) <== NOT EXECUTED 8005624: 29 62 00 24 lw r2,(r11+36) <== NOT EXECUTED 8005628: 29 83 00 08 lw r3,(r12+8) <== NOT EXECUTED 800562c: c8 82 10 00 sub r2,r4,r2 <== NOT EXECUTED 8005630: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 8005634: 58 61 00 00 sw (r3+0),r1 <== NOT EXECUTED } break; 8005638: e3 ff ff 74 bi 8005408 <== 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) { 800563c: 78 03 08 01 mvhi r3,0x801 8005640: 38 63 fe 18 ori r3,r3,0xfe18 8005644: 28 62 00 00 lw r2,(r3+0) 8005648: 44 22 00 23 be r1,r2,80056d4 800564c: 78 03 08 01 mvhi r3,0x801 8005650: 38 63 fe 1c ori r3,r3,0xfe1c 8005654: 28 62 00 00 lw r2,(r3+0) 8005658: 5c 22 ff 57 bne r1,r2,80053b4 <== NEVER TAKEN #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 800565c: 29 62 00 cc lw r2,(r11+204) 8005660: 78 0e 08 02 mvhi r14,0x802 8005664: 39 ce 27 84 ori r14,r14,0x2784 8005668: b4 42 10 00 add r2,r2,r2 800566c: b4 42 10 00 add r2,r2,r2 8005670: b4 42 10 00 add r2,r2,r2 8005674: b4 42 10 00 add r2,r2,r2 8005678: b4 42 10 00 add r2,r2,r2 800567c: b5 c2 10 00 add r2,r14,r2 8005680: 28 42 00 04 lw r2,(r2+4) 8005684: 44 40 00 04 be r2,r0,8005694 sc = rtems_termios_linesw[tty->t_line].l_close(tty); 8005688: b9 60 08 00 mv r1,r11 800568c: d8 40 00 00 call r2 8005690: b8 20 68 00 mv r13,r1 } tty->t_line=*(int*)(args->buffer); 8005694: 29 81 00 08 lw r1,(r12+8) 8005698: 28 22 00 00 lw r2,(r1+0) tty->t_sc = NULL; /* ensure that no more valid data */ 800569c: 59 60 00 d0 sw (r11+208),r0 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 80056a0: b4 42 08 00 add r1,r2,r2 80056a4: b4 21 08 00 add r1,r1,r1 80056a8: b4 21 08 00 add r1,r1,r1 80056ac: b4 21 08 00 add r1,r1,r1 80056b0: b4 21 08 00 add r1,r1,r1 80056b4: b5 c1 08 00 add r1,r14,r1 80056b8: 28 23 00 00 lw r3,(r1+0) * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 80056bc: 59 62 00 cc sw (r11+204),r2 tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 80056c0: 44 60 ff 52 be r3,r0,8005408 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_open(tty); 80056c4: b9 60 08 00 mv r1,r11 80056c8: d8 60 00 00 call r3 80056cc: b8 20 68 00 mv r13,r1 80056d0: e3 ff ff 4e bi 8005408 } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 80056d4: 29 81 00 08 lw r1,(r12+8) 80056d8: 29 62 00 cc lw r2,(r11+204) 80056dc: 58 22 00 00 sw (r1+0),r2 break; 80056e0: e3 ff ff 4a bi 8005408 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 80056e4: 29 62 00 30 lw r2,(r11+48) 80056e8: 29 81 00 08 lw r1,(r12+8) 80056ec: 58 22 00 00 sw (r1+0),r2 80056f0: 29 62 00 34 lw r2,(r11+52) 80056f4: 58 22 00 04 sw (r1+4),r2 80056f8: 29 62 00 38 lw r2,(r11+56) 80056fc: 58 22 00 08 sw (r1+8),r2 8005700: 29 62 00 3c lw r2,(r11+60) 8005704: 58 22 00 0c sw (r1+12),r2 8005708: 29 62 00 40 lw r2,(r11+64) 800570c: 58 22 00 10 sw (r1+16),r2 8005710: 29 62 00 44 lw r2,(r11+68) 8005714: 58 22 00 14 sw (r1+20),r2 8005718: 29 62 00 48 lw r2,(r11+72) 800571c: 58 22 00 18 sw (r1+24),r2 8005720: 29 62 00 4c lw r2,(r11+76) 8005724: 58 22 00 1c sw (r1+28),r2 8005728: 29 62 00 50 lw r2,(r11+80) 800572c: 58 22 00 20 sw (r1+32),r2 break; 8005730: e3 ff ff 36 bi 8005408 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 8005734: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005738: fb ff fd 39 calli 8004c1c <== NOT EXECUTED break; 800573c: e3 ff ff 33 bi 8005408 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 8005740: 29 62 00 38 lw r2,(r11+56) 8005744: e3 ff ff 96 bi 800559c 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)( 8005748: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 800574c: 29 62 00 84 lw r2,(r11+132) <== 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)( 8005750: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8005754: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8005758: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 800575c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8005760: d8 80 00 00 call r4 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 8005764: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED 8005768: e3 ff ff 6a bi 8005510 <== 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] * 800576c: 41 6f 00 46 lbu r15,(r11+70) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; 8005770: f8 00 06 28 calli 8007010 <== 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] * 8005774: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8005778: f8 00 61 ff calli 801df74 <__mulsi3> <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; 800577c: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 8005780: f8 00 62 62 calli 801e108 <__udivsi3> <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 8005784: 41 62 00 46 lbu r2,(r11+70) <== 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] * 8005788: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 800578c: 44 4e 00 07 be r2,r14,80057a8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 8005790: 41 62 00 47 lbu r2,(r11+71) <== 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; 8005794: 59 60 00 6c sw (r11+108),r0 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 8005798: 59 61 00 70 sw (r11+112),r1 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 800579c: 5c 40 ff 94 bne r2,r0,80055ec <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 80057a0: 59 61 00 74 sw (r11+116),r1 <== NOT EXECUTED 80057a4: e3 ff ff 93 bi 80055f0 <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 80057a8: 41 61 00 47 lbu r1,(r11+71) <== NOT EXECUTED 80057ac: 5c 22 ff 8e bne r1,r2,80055e4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 80057b0: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 80057b4: 59 61 00 6c sw (r11+108),r1 <== NOT EXECUTED 80057b8: e3 ff ff 8e bi 80055f0 <== NOT EXECUTED =============================================================================== 08004acc : int32_t baud ) { int termios_baud; switch (baud) { 8004acc: 34 03 04 b0 mvi r3,1200 case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; 8004ad0: 34 02 00 09 mvi r2,9 int32_t baud ) { int termios_baud; switch (baud) { 8004ad4: 44 23 00 0d be r1,r3,8004b08 8004ad8: 48 23 00 0e bg r1,r3,8004b10 8004adc: 34 03 00 86 mvi r3,134 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; 8004ae0: 34 02 00 04 mvi r2,4 int32_t baud ) { int termios_baud; switch (baud) { 8004ae4: 44 23 00 09 be r1,r3,8004b08 8004ae8: 48 23 00 25 bg r1,r3,8004b7c 8004aec: 34 03 00 32 mvi r3,50 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; 8004af0: 34 02 00 01 mvi r2,1 int32_t baud ) { int termios_baud; switch (baud) { 8004af4: 44 23 00 05 be r1,r3,8004b08 8004af8: 48 23 00 30 bg r1,r3,8004bb8 case 0: termios_baud = B0; break; 8004afc: 34 02 00 00 mvi r2,0 int32_t baud ) { int termios_baud; switch (baud) { 8004b00: 44 20 00 02 be r1,r0,8004b08 case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; 8004b04: 34 02 ff ff mvi r2,-1 } return termios_baud; } 8004b08: b8 40 08 00 mv r1,r2 8004b0c: c3 a0 00 00 ret int32_t baud ) { int termios_baud; switch (baud) { 8004b10: 34 03 4b 00 mvi r3,19200 case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; 8004b14: 34 02 00 0e mvi r2,14 int32_t baud ) { int termios_baud; switch (baud) { 8004b18: 44 23 ff fc be r1,r3,8004b08 8004b1c: 48 23 00 0a bg r1,r3,8004b44 8004b20: 34 03 09 60 mvi r3,2400 case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; 8004b24: 34 02 00 0b mvi r2,11 int32_t baud ) { int termios_baud; switch (baud) { 8004b28: 44 23 ff f8 be r1,r3,8004b08 8004b2c: 48 23 00 35 bg r1,r3,8004c00 8004b30: 34 03 07 08 mvi r3,1800 case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; 8004b34: 34 02 00 0a mvi r2,10 int32_t baud ) { int termios_baud; switch (baud) { 8004b38: 44 23 ff f4 be r1,r3,8004b08 <== ALWAYS TAKEN case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; 8004b3c: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8004b40: e3 ff ff f2 bi 8004b08 <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 8004b44: 78 02 08 01 mvhi r2,0x801 8004b48: 38 42 f7 74 ori r2,r2,0xf774 8004b4c: 28 43 00 00 lw r3,(r2+0) case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; 8004b50: 34 02 10 02 mvi r2,4098 int32_t baud ) { int termios_baud; switch (baud) { 8004b54: 44 23 ff ed be r1,r3,8004b08 8004b58: 48 23 00 1f bg r1,r3,8004bd4 8004b5c: 38 03 96 00 mvu r3,0x9600 case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; 8004b60: 34 02 00 0f mvi r2,15 int32_t baud ) { int termios_baud; switch (baud) { 8004b64: 44 23 ff e9 be r1,r3,8004b08 8004b68: 34 63 4b 00 addi r3,r3,19200 case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; 8004b6c: 34 02 10 01 mvi r2,4097 int32_t baud ) { int termios_baud; switch (baud) { 8004b70: 44 23 ff e6 be r1,r3,8004b08 <== ALWAYS TAKEN case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; 8004b74: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8004b78: e3 ff ff e4 bi 8004b08 <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 8004b7c: 34 03 00 c8 mvi r3,200 case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; 8004b80: 34 02 00 06 mvi r2,6 int32_t baud ) { int termios_baud; switch (baud) { 8004b84: 44 23 ff e1 be r1,r3,8004b08 8004b88: 48 23 00 05 bg r1,r3,8004b9c 8004b8c: 34 03 00 96 mvi r3,150 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; 8004b90: 34 02 00 05 mvi r2,5 int32_t baud ) { int termios_baud; switch (baud) { 8004b94: 5c 23 ff dc bne r1,r3,8004b04 <== NEVER TAKEN 8004b98: e3 ff ff dc bi 8004b08 8004b9c: 34 03 01 2c mvi r3,300 case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; 8004ba0: 34 02 00 07 mvi r2,7 int32_t baud ) { int termios_baud; switch (baud) { 8004ba4: 44 23 ff d9 be r1,r3,8004b08 8004ba8: 34 03 02 58 mvi r3,600 case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; 8004bac: 34 02 00 08 mvi r2,8 int32_t baud ) { int termios_baud; switch (baud) { 8004bb0: 5c 23 ff d5 bne r1,r3,8004b04 <== NEVER TAKEN 8004bb4: e3 ff ff d5 bi 8004b08 8004bb8: 34 03 00 4b mvi r3,75 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 8004bbc: 34 02 00 02 mvi r2,2 int32_t baud ) { int termios_baud; switch (baud) { 8004bc0: 44 23 ff d2 be r1,r3,8004b08 8004bc4: 34 03 00 6e mvi r3,110 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; 8004bc8: 34 02 00 03 mvi r2,3 int32_t baud ) { int termios_baud; switch (baud) { 8004bcc: 5c 23 ff ce bne r1,r3,8004b04 <== NEVER TAKEN 8004bd0: e3 ff ff ce bi 8004b08 8004bd4: 78 04 08 01 mvhi r4,0x801 8004bd8: 38 84 fd f0 ori r4,r4,0xfdf0 8004bdc: 28 83 00 00 lw r3,(r4+0) case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; 8004be0: 34 02 10 03 mvi r2,4099 int32_t baud ) { int termios_baud; switch (baud) { 8004be4: 44 23 ff c9 be r1,r3,8004b08 8004be8: 78 04 08 01 mvhi r4,0x801 8004bec: 38 84 fd f4 ori r4,r4,0xfdf4 8004bf0: 28 83 00 00 lw r3,(r4+0) case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 8004bf4: 34 02 10 04 mvi r2,4100 int32_t baud ) { int termios_baud; switch (baud) { 8004bf8: 5c 23 ff c3 bne r1,r3,8004b04 <== NEVER TAKEN 8004bfc: e3 ff ff c3 bi 8004b08 8004c00: 34 03 12 c0 mvi r3,4800 case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; 8004c04: 34 02 00 0c mvi r2,12 int32_t baud ) { int termios_baud; switch (baud) { 8004c08: 44 23 ff c0 be r1,r3,8004b08 8004c0c: 34 03 25 80 mvi r3,9600 case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; 8004c10: 34 02 00 0d mvi r2,13 int32_t baud ) { int termios_baud; switch (baud) { 8004c14: 5c 23 ff bc bne r1,r3,8004b04 <== NEVER TAKEN 8004c18: e3 ff ff bc bi 8004b08 =============================================================================== 08004cb4 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 8004cb4: 37 9c ff cc addi sp,sp,-52 8004cb8: 5b 8b 00 34 sw (sp+52),r11 8004cbc: 5b 8c 00 30 sw (sp+48),r12 8004cc0: 5b 8d 00 2c sw (sp+44),r13 8004cc4: 5b 8e 00 28 sw (sp+40),r14 8004cc8: 5b 8f 00 24 sw (sp+36),r15 8004ccc: 5b 90 00 20 sw (sp+32),r16 8004cd0: 5b 91 00 1c sw (sp+28),r17 8004cd4: 5b 92 00 18 sw (sp+24),r18 8004cd8: 5b 93 00 14 sw (sp+20),r19 8004cdc: 5b 94 00 10 sw (sp+16),r20 8004ce0: 5b 95 00 0c sw (sp+12),r21 8004ce4: 5b 96 00 08 sw (sp+8),r22 8004ce8: 5b 9d 00 04 sw (sp+4),ra struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 8004cec: 78 0d 08 02 mvhi r13,0x802 8004cf0: 39 ad 29 50 ori r13,r13,0x2950 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 8004cf4: b8 20 60 00 mv r12,r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 8004cf8: 29 a1 00 00 lw r1,(r13+0) rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 8004cfc: b8 40 78 00 mv r15,r2 8004d00: b8 60 98 00 mv r19,r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 8004d04: 34 02 00 00 mvi r2,0 8004d08: 34 03 00 00 mvi r3,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 8004d0c: b8 80 a0 00 mv r20,r4 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 8004d10: f8 00 0a ca calli 8007838 8004d14: b8 20 70 00 mv r14,r1 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 8004d18: 5c 20 00 1e bne r1,r0,8004d90 <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 8004d1c: 78 10 08 02 mvhi r16,0x802 8004d20: 3a 10 29 58 ori r16,r16,0x2958 8004d24: 2a 12 00 00 lw r18,(r16+0) 8004d28: 46 41 00 38 be r18,r1,8004e08 <== ALWAYS TAKEN 8004d2c: ba 40 58 00 mv r11,r18 <== NOT EXECUTED 8004d30: e0 00 00 03 bi 8004d3c <== NOT EXECUTED 8004d34: 29 6b 00 00 lw r11,(r11+0) <== NOT EXECUTED 8004d38: 45 60 00 34 be r11,r0,8004e08 <== NOT EXECUTED if ((tty->major == major) && (tty->minor == minor)) 8004d3c: 29 65 00 0c lw r5,(r11+12) <== NOT EXECUTED 8004d40: 5c ac ff fd bne r5,r12,8004d34 <== NOT EXECUTED 8004d44: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004d48: 5c 2f ff fb bne r1,r15,8004d34 <== NOT EXECUTED */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 8004d4c: 2a 61 00 00 lw r1,(r19+0) if (!tty->refcount++) { 8004d50: 29 62 00 08 lw r2,(r11+8) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 8004d54: 58 2b 00 38 sw (r1+56),r11 if (!tty->refcount++) { 8004d58: 34 41 00 01 addi r1,r2,1 8004d5c: 59 61 00 08 sw (r11+8),r1 8004d60: 5c 40 00 0a bne r2,r0,8004d88 <== NEVER TAKEN if (tty->device.firstOpen) 8004d64: 29 64 00 98 lw r4,(r11+152) 8004d68: 44 82 00 05 be r4,r2,8004d7c <== ALWAYS TAKEN (*tty->device.firstOpen)(major, minor, arg); 8004d6c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004d70: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8004d74: ba 60 18 00 mv r3,r19 <== NOT EXECUTED 8004d78: d8 80 00 00 call r4 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8004d7c: 29 62 00 b4 lw r2,(r11+180) 8004d80: 34 01 00 02 mvi r1,2 8004d84: 44 41 00 13 be r2,r1,8004dd0 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 8004d88: 29 a1 00 00 lw r1,(r13+0) 8004d8c: f8 00 0b 07 calli 80079a8 return RTEMS_SUCCESSFUL; } 8004d90: b9 c0 08 00 mv r1,r14 8004d94: 2b 9d 00 04 lw ra,(sp+4) 8004d98: 2b 8b 00 34 lw r11,(sp+52) 8004d9c: 2b 8c 00 30 lw r12,(sp+48) 8004da0: 2b 8d 00 2c lw r13,(sp+44) 8004da4: 2b 8e 00 28 lw r14,(sp+40) 8004da8: 2b 8f 00 24 lw r15,(sp+36) 8004dac: 2b 90 00 20 lw r16,(sp+32) 8004db0: 2b 91 00 1c lw r17,(sp+28) 8004db4: 2b 92 00 18 lw r18,(sp+24) 8004db8: 2b 93 00 14 lw r19,(sp+20) 8004dbc: 2b 94 00 10 lw r20,(sp+16) 8004dc0: 2b 95 00 0c lw r21,(sp+12) 8004dc4: 2b 96 00 08 lw r22,(sp+8) 8004dc8: 37 9c 00 34 addi sp,sp,52 8004dcc: c3 a0 00 00 ret /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start( 8004dd0: 29 61 00 c4 lw r1,(r11+196) 8004dd4: 78 02 08 00 mvhi r2,0x800 8004dd8: 38 42 67 fc ori r2,r2,0x67fc 8004ddc: b9 60 18 00 mv r3,r11 8004de0: f8 00 0b d5 calli 8007d34 8004de4: b8 20 60 00 mv r12,r1 tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 8004de8: 5c 20 00 bd bne r1,r0,80050dc <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_start( 8004dec: 29 61 00 c8 lw r1,(r11+200) 8004df0: 78 02 08 00 mvhi r2,0x800 8004df4: 38 42 6a fc ori r2,r2,0x6afc 8004df8: b9 60 18 00 mv r3,r11 8004dfc: f8 00 0b ce calli 8007d34 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 8004e00: 44 2c ff e2 be r1,r12,8004d88 <== ALWAYS TAKEN 8004e04: e0 00 00 b6 bi 80050dc <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 8004e08: 34 01 00 01 mvi r1,1 8004e0c: 34 02 00 e8 mvi r2,232 8004e10: fb ff f7 31 calli 8002ad4 8004e14: b8 20 88 00 mv r17,r1 8004e18: b8 20 58 00 mv r11,r1 if (tty == NULL) { 8004e1c: 44 20 00 a1 be r1,r0,80050a0 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 8004e20: 78 01 08 02 mvhi r1,0x802 8004e24: 38 21 22 44 ori r1,r1,0x2244 8004e28: 28 21 00 00 lw r1,(r1+0) 8004e2c: 5a 21 00 64 sw (r17+100),r1 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 8004e30: 2a 21 00 64 lw r1,(r17+100) 8004e34: fb ff fa c8 calli 8003954 8004e38: 5a 21 00 58 sw (r17+88),r1 8004e3c: b8 20 a8 00 mv r21,r1 if (tty->rawInBuf.theBuf == NULL) { 8004e40: 44 20 00 96 be r1,r0,8005098 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 8004e44: 78 01 08 02 mvhi r1,0x802 8004e48: 38 21 22 48 ori r1,r1,0x2248 8004e4c: 28 21 00 00 lw r1,(r1+0) 8004e50: 5a 21 00 88 sw (r17+136),r1 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 8004e54: 2a 21 00 88 lw r1,(r17+136) 8004e58: fb ff fa bf calli 8003954 8004e5c: 5a 21 00 7c sw (r17+124),r1 8004e60: b8 20 b0 00 mv r22,r1 if (tty->rawOutBuf.theBuf == NULL) { 8004e64: 44 20 00 8b be r1,r0,8005090 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 8004e68: 78 01 08 02 mvhi r1,0x802 8004e6c: 38 21 22 40 ori r1,r1,0x2240 8004e70: 28 21 00 00 lw r1,(r1+0) 8004e74: fb ff fa b8 calli 8003954 8004e78: 5a 21 00 1c sw (r17+28),r1 if (tty->cbuf == NULL) { 8004e7c: 44 20 00 83 be r1,r0,8005088 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 8004e80: 5a 20 00 d4 sw (r17+212),r0 tty->tty_snd.sw_arg = NULL; 8004e84: 5a 20 00 d8 sw (r17+216),r0 tty->tty_rcv.sw_pfn = NULL; 8004e88: 5a 20 00 dc sw (r17+220),r0 tty->tty_rcv.sw_arg = NULL; 8004e8c: 5a 20 00 e0 sw (r17+224),r0 tty->tty_rcvwakeup = 0; 8004e90: 5a 20 00 e4 sw (r17+228),r0 /* * link tty */ tty->forw = rtems_termios_ttyHead; 8004e94: 5a 32 00 00 sw (r17+0),r18 tty->back = NULL; 8004e98: 5a 20 00 04 sw (r17+4),r0 if (rtems_termios_ttyHead != NULL) 8004e9c: 46 40 00 02 be r18,r0,8004ea4 <== ALWAYS TAKEN rtems_termios_ttyHead->back = tty; 8004ea0: 5a 51 00 04 sw (r18+4),r17 <== NOT EXECUTED rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 8004ea4: 78 01 08 02 mvhi r1,0x802 8004ea8: 38 21 29 54 ori r1,r1,0x2954 8004eac: 28 22 00 00 lw r2,(r1+0) */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 8004eb0: 5a 11 00 00 sw (r16+0),r17 if (rtems_termios_ttyTail == NULL) 8004eb4: 44 40 00 a5 be r2,r0,8005148 <== ALWAYS TAKEN /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), 8004eb8: 78 10 08 02 mvhi r16,0x802 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 8004ebc: 78 05 08 01 mvhi r5,0x801 8004ec0: 38 a5 fd fc ori r5,r5,0xfdfc rtems_build_name ('T', 'R', 'i', c), 8004ec4: 3a 10 22 4c ori r16,r16,0x224c 8004ec8: 42 04 00 00 lbu r4,(r16+0) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 8004ecc: 28 a1 00 00 lw r1,(r5+0) 8004ed0: 34 02 00 01 mvi r2,1 8004ed4: 34 03 00 54 mvi r3,84 8004ed8: b8 81 08 00 or r1,r4,r1 8004edc: 36 25 00 14 addi r5,r17,20 8004ee0: 34 04 00 00 mvi r4,0 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 8004ee4: 5a 2f 00 10 sw (r17+16),r15 tty->major = major; 8004ee8: 5a 2c 00 0c sw (r17+12),r12 /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 8004eec: f8 00 09 98 calli 800754c 8004ef0: b8 20 a8 00 mv r21,r1 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) 8004ef4: 5c 20 00 7a bne r1,r0,80050dc <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 8004ef8: 78 05 08 01 mvhi r5,0x801 8004efc: 38 a5 fe 00 ori r5,r5,0xfe00 rtems_build_name ('T', 'R', 'o', c), 8004f00: 42 04 00 00 lbu r4,(r16+0) 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 ( 8004f04: 28 a1 00 00 lw r1,(r5+0) 8004f08: 34 02 00 01 mvi r2,1 8004f0c: 34 03 00 54 mvi r3,84 8004f10: b8 81 08 00 or r1,r4,r1 8004f14: 36 25 00 18 addi r5,r17,24 8004f18: 34 04 00 00 mvi r4,0 8004f1c: f8 00 09 8c calli 800754c 8004f20: b8 20 90 00 mv r18,r1 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) 8004f24: 5c 35 00 6e bne r1,r21,80050dc <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 8004f28: 78 05 08 01 mvhi r5,0x801 8004f2c: 38 a5 fe 04 ori r5,r5,0xfe04 rtems_build_name ('T', 'R', 'x', c), 8004f30: 42 04 00 00 lbu r4,(r16+0) 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 ( 8004f34: 28 a1 00 00 lw r1,(r5+0) 8004f38: 34 02 00 00 mvi r2,0 8004f3c: 34 03 00 20 mvi r3,32 8004f40: b8 81 08 00 or r1,r4,r1 8004f44: 36 25 00 8c addi r5,r17,140 8004f48: 34 04 00 00 mvi r4,0 8004f4c: f8 00 09 80 calli 800754c 8004f50: b8 20 a8 00 mv r21,r1 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 8004f54: 5c 32 00 62 bne r1,r18,80050dc <== NEVER TAKEN tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 8004f58: 2a 82 00 18 lw r2,(r20+24) 8004f5c: 2a 88 00 00 lw r8,(r20+0) 8004f60: 2a 87 00 04 lw r7,(r20+4) 8004f64: 2a 86 00 08 lw r6,(r20+8) 8004f68: 2a 85 00 0c lw r5,(r20+12) 8004f6c: 2a 84 00 10 lw r4,(r20+16) 8004f70: 2a 83 00 14 lw r3,(r20+20) 8004f74: 2a 81 00 1c lw r1,(r20+28) 8004f78: 5a 22 00 b0 sw (r17+176),r2 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; 8004f7c: 5a 20 00 94 sw (r17+148),r0 /* * Set callbacks */ tty->device = *callbacks; 8004f80: 5a 28 00 98 sw (r17+152),r8 8004f84: 5a 27 00 9c sw (r17+156),r7 8004f88: 5a 26 00 a0 sw (r17+160),r6 8004f8c: 5a 25 00 a4 sw (r17+164),r5 8004f90: 5a 24 00 a8 sw (r17+168),r4 8004f94: 5a 23 00 ac sw (r17+172),r3 8004f98: 5a 21 00 b4 sw (r17+180),r1 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8004f9c: 34 02 00 02 mvi r2,2 8004fa0: 44 22 00 50 be r1,r2,80050e0 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 8004fa4: 2a 21 00 a0 lw r1,(r17+160) 8004fa8: 44 20 00 42 be r1,r0,80050b0 8004fac: 2a 22 00 b4 lw r2,(r17+180) 8004fb0: 34 01 00 02 mvi r1,2 8004fb4: 44 41 00 3f be r2,r1,80050b0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 8004fb8: 34 05 25 02 mvi r5,9474 8004fbc: 5a 25 00 30 sw (r17+48),r5 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 8004fc0: 34 05 18 05 mvi r5,6149 8004fc4: 5a 25 00 34 sw (r17+52),r5 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 8004fc8: 34 05 08 bd mvi r5,2237 8004fcc: 5a 25 00 38 sw (r17+56),r5 tty->termios.c_lflag = 8004fd0: 34 a5 79 7e addi r5,r5,31102 8004fd4: 5a 25 00 3c sw (r17+60),r5 ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 8004fd8: 34 05 00 03 mvi r5,3 8004fdc: 32 25 00 41 sb (r17+65),r5 tty->termios.c_cc[VQUIT] = '\034'; 8004fe0: 34 05 00 1c mvi r5,28 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; 8004fe4: 5a 20 00 b8 sw (r17+184),r0 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'; 8004fe8: 32 25 00 42 sb (r17+66),r5 tty->termios.c_cc[VERASE] = '\177'; 8004fec: 34 05 00 7f mvi r5,127 /* 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; 8004ff0: 2a 24 00 64 lw r4,(r17+100) 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'; 8004ff4: 32 25 00 43 sb (r17+67),r5 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; 8004ff8: 2a 21 00 64 lw r1,(r17+100) 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'; 8004ffc: 34 05 00 15 mvi r5,21 8005000: 32 25 00 44 sb (r17+68),r5 tty->termios.c_cc[VEOF] = '\004'; 8005004: 34 05 00 04 mvi r5,4 8005008: 32 25 00 45 sb (r17+69),r5 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 800500c: 34 05 00 11 mvi r5,17 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; 8005010: b4 21 18 00 add r3,r1,r1 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'; 8005014: 32 25 00 49 sb (r17+73),r5 tty->termios.c_cc[VSTOP] = '\023'; 8005018: 34 05 00 13 mvi r5,19 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; 800501c: b4 61 08 00 add r1,r3,r1 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'; 8005020: 32 25 00 4a sb (r17+74),r5 tty->termios.c_cc[VSUSP] = '\032'; 8005024: 34 05 00 1a mvi r5,26 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 8005028: 42 02 00 00 lbu r2,(r16+0) 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; 800502c: 00 21 00 01 srui r1,r1,1 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 8005030: 32 25 00 4b sb (r17+75),r5 tty->termios.c_cc[VREPRINT] = '\022'; 8005034: 34 05 00 12 mvi r5,18 8005038: 32 25 00 4d sb (r17+77),r5 tty->termios.c_cc[VDISCARD] = '\017'; 800503c: 34 05 00 0f mvi r5,15 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; 8005040: 00 21 00 01 srui r1,r1,1 /* 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; 8005044: 00 84 00 01 srui r4,r4,1 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 8005048: 32 25 00 4e sb (r17+78),r5 tty->termios.c_cc[VWERASE] = '\027'; 800504c: 34 05 00 17 mvi r5,23 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 8005050: 34 43 00 01 addi r3,r2,1 tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 8005054: 32 25 00 4f sb (r17+79),r5 tty->termios.c_cc[VLNEXT] = '\026'; 8005058: 34 05 00 16 mvi r5,22 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 800505c: 5a 21 00 c0 sw (r17+192),r1 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'; 8005060: 32 20 00 4c sb (r17+76),r0 tty->termios.c_cc[VEOL2] = '\000'; 8005064: 32 20 00 51 sb (r17+81),r0 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'; 8005068: 32 25 00 50 sb (r17+80),r5 /* 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; 800506c: 5a 24 00 bc sw (r17+188),r4 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 8005070: 32 03 00 00 sb (r16+0),r3 8005074: 34 01 00 7a mvi r1,122 8005078: 5c 41 ff 35 bne r2,r1,8004d4c <== ALWAYS TAKEN c = 'a'; 800507c: 34 01 00 61 mvi r1,97 <== NOT EXECUTED 8005080: 32 01 00 00 sb (r16+0),r1 <== NOT EXECUTED 8005084: e3 ff ff 32 bi 8004d4c <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 8005088: ba c0 08 00 mv r1,r22 <== NOT EXECUTED 800508c: fb ff f8 59 calli 80031f0 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 8005090: ba a0 08 00 mv r1,r21 <== NOT EXECUTED 8005094: fb ff f8 57 calli 80031f0 <== NOT EXECUTED free(tty); 8005098: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 800509c: fb ff f8 55 calli 80031f0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 80050a0: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED return RTEMS_NO_MEMORY; 80050a4: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 80050a8: f8 00 0a 40 calli 80079a8 <== NOT EXECUTED return RTEMS_NO_MEMORY; 80050ac: e3 ff ff 39 bi 8004d90 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 80050b0: 78 05 08 01 mvhi r5,0x801 80050b4: 38 a5 fe 10 ori r5,r5,0xfe10 rtems_build_name ('T', 'R', 'r', c), 80050b8: 42 04 00 00 lbu r4,(r16+0) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 80050bc: 28 a1 00 00 lw r1,(r5+0) 80050c0: 34 02 00 00 mvi r2,0 80050c4: 34 03 00 24 mvi r3,36 80050c8: b8 81 08 00 or r1,r4,r1 80050cc: 36 25 00 68 addi r5,r17,104 80050d0: 34 04 00 00 mvi r4,0 80050d4: f8 00 09 1e calli 800754c rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 80050d8: 44 20 ff b8 be r1,r0,8004fb8 <== ALWAYS TAKEN 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); 80050dc: f8 00 0b cf calli 8008018 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 80050e0: 78 05 08 01 mvhi r5,0x801 80050e4: 38 a5 fe 08 ori r5,r5,0xfe08 rtems_build_name ('T', 'x', 'T', c), 80050e8: 42 04 00 00 lbu r4,(r16+0) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 80050ec: 28 a1 00 00 lw r1,(r5+0) 80050f0: 34 02 00 0a mvi r2,10 80050f4: 34 03 04 00 mvi r3,1024 80050f8: b8 81 08 00 or r1,r4,r1 80050fc: 34 05 00 00 mvi r5,0 8005100: 34 04 05 00 mvi r4,1280 8005104: 36 26 00 c8 addi r6,r17,200 8005108: f8 00 0a 61 calli 8007a8c 800510c: b8 20 90 00 mv r18,r1 TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 8005110: 5c 35 ff f3 bne r1,r21,80050dc <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 8005114: 78 05 08 01 mvhi r5,0x801 8005118: 38 a5 fe 0c ori r5,r5,0xfe0c rtems_build_name ('R', 'x', 'T', c), 800511c: 42 04 00 00 lbu r4,(r16+0) RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 8005120: 28 a1 00 00 lw r1,(r5+0) 8005124: 34 02 00 09 mvi r2,9 8005128: 34 03 04 00 mvi r3,1024 800512c: b8 81 08 00 or r1,r4,r1 8005130: 34 05 00 00 mvi r5,0 8005134: 34 04 05 00 mvi r4,1280 8005138: 36 26 00 c4 addi r6,r17,196 800513c: f8 00 0a 54 calli 8007a8c TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 8005140: 44 32 ff 99 be r1,r18,8004fa4 <== ALWAYS TAKEN 8005144: e3 ff ff e6 bi 80050dc <== NOT EXECUTED 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; 8005148: 58 31 00 00 sw (r1+0),r17 800514c: e3 ff ff 5b bi 8004eb8 =============================================================================== 080057bc : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 80057bc: 37 9c ff d8 addi sp,sp,-40 80057c0: 5b 8b 00 24 sw (sp+36),r11 80057c4: 5b 8c 00 20 sw (sp+32),r12 80057c8: 5b 8d 00 1c sw (sp+28),r13 80057cc: 5b 8e 00 18 sw (sp+24),r14 80057d0: 5b 8f 00 14 sw (sp+20),r15 80057d4: 5b 90 00 10 sw (sp+16),r16 80057d8: 5b 91 00 0c sw (sp+12),r17 80057dc: 5b 92 00 08 sw (sp+8),r18 80057e0: 5b 9d 00 04 sw (sp+4),ra const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 80057e4: 28 64 00 b4 lw r4,(r3+180) * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 80057e8: b8 60 58 00 mv r11,r3 80057ec: b8 40 88 00 mv r17,r2 80057f0: b8 20 18 00 mv r3,r1 const unsigned char *buf = _buf; 80057f4: b8 20 80 00 mv r16,r1 unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 80057f8: 44 80 00 39 be r4,r0,80058dc (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 80057fc: 29 6f 00 80 lw r15,(r11+128) while (len) { 8005800: 44 40 00 3c be r2,r0,80058f0 <== NEVER TAKEN * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); 8005804: 34 0d ff fe mvi r13,-2 while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 8005808: 34 0e 00 02 mvi r14,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; 800580c: 34 12 00 01 mvi r18,1 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 8005810: 29 62 00 88 lw r2,(r11+136) 8005814: 35 e1 00 01 addi r1,r15,1 8005818: f8 00 62 4c calli 801e148 <__umodsi3> 800581c: b8 20 78 00 mv r15,r1 rtems_interrupt_disable (level); 8005820: 90 00 20 00 rcsr r4,IE 8005824: a0 8d 08 00 and r1,r4,r13 8005828: d0 01 00 00 wcsr IE,r1 while (newHead == tty->rawOutBuf.Tail) { 800582c: 29 6c 00 84 lw r12,(r11+132) 8005830: 5d 8f 00 0d bne r12,r15,8005864 tty->rawOutBufState = rob_wait; 8005834: 59 6e 00 94 sw (r11+148),r14 rtems_interrupt_enable (level); 8005838: d0 04 00 00 wcsr IE,r4 sc = rtems_semaphore_obtain( 800583c: 29 61 00 8c lw r1,(r11+140) 8005840: 34 02 00 00 mvi r2,0 8005844: 34 03 00 00 mvi r3,0 8005848: f8 00 07 fc calli 8007838 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 800584c: 5c 20 00 34 bne r1,r0,800591c <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 8005850: 90 00 20 00 rcsr r4,IE 8005854: a0 8d 28 00 and r5,r4,r13 8005858: d0 05 00 00 wcsr IE,r5 * 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) { 800585c: 29 65 00 84 lw r5,(r11+132) 8005860: 44 ac ff f5 be r5,r12,8005834 <== NEVER TAKEN 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++; 8005864: 29 61 00 80 lw r1,(r11+128) 8005868: 29 63 00 7c lw r3,(r11+124) 800586c: 42 02 00 00 lbu r2,(r16+0) 8005870: b4 61 08 00 add r1,r3,r1 8005874: 30 22 00 00 sb (r1+0),r2 tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 8005878: 29 61 00 94 lw r1,(r11+148) if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; 800587c: 59 6f 00 80 sw (r11+128),r15 if (tty->rawOutBufState == rob_idle) { 8005880: 5c 20 00 08 bne r1,r0,80058a0 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 8005884: 29 62 00 b8 lw r2,(r11+184) 8005888: 20 42 00 10 andi r2,r2,0x10 800588c: 44 41 00 0a be r2,r1,80058b4 <== ALWAYS TAKEN (*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; 8005890: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8005894: 38 21 00 20 ori r1,r1,0x20 <== NOT EXECUTED 8005898: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 800589c: 59 72 00 94 sw (r11+148),r18 } rtems_interrupt_enable (level); 80058a0: d0 04 00 00 wcsr IE,r4 len--; 80058a4: 36 31 ff ff addi r17,r17,-1 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 80058a8: 46 20 00 12 be r17,r0,80058f0 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++; 80058ac: 36 10 00 01 addi r16,r16,1 80058b0: e3 ff ff d8 bi 8005810 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, 80058b4: 29 63 00 7c lw r3,(r11+124) (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 80058b8: 29 62 00 84 lw r2,(r11+132) 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, 80058bc: 29 65 00 a4 lw r5,(r11+164) 80058c0: 29 61 00 10 lw r1,(r11+16) 80058c4: b4 62 10 00 add r2,r3,r2 80058c8: 5b 84 00 28 sw (sp+40),r4 80058cc: 34 03 00 01 mvi r3,1 80058d0: d8 a0 00 00 call r5 80058d4: 2b 84 00 28 lw r4,(sp+40) 80058d8: e3 ff ff f1 bi 800589c 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); 80058dc: 29 64 00 a4 lw r4,(r11+164) 80058e0: 29 61 00 10 lw r1,(r11+16) 80058e4: b8 60 10 00 mv r2,r3 80058e8: ba 20 18 00 mv r3,r17 80058ec: d8 80 00 00 call r4 tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 80058f0: 2b 9d 00 04 lw ra,(sp+4) 80058f4: 2b 8b 00 24 lw r11,(sp+36) 80058f8: 2b 8c 00 20 lw r12,(sp+32) 80058fc: 2b 8d 00 1c lw r13,(sp+28) 8005900: 2b 8e 00 18 lw r14,(sp+24) 8005904: 2b 8f 00 14 lw r15,(sp+20) 8005908: 2b 90 00 10 lw r16,(sp+16) 800590c: 2b 91 00 0c lw r17,(sp+12) 8005910: 2b 92 00 08 lw r18,(sp+8) 8005914: 37 9c 00 28 addi sp,sp,40 8005918: c3 a0 00 00 ret 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); 800591c: f8 00 09 bf calli 8008018 <== NOT EXECUTED =============================================================================== 080060dc : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 80060dc: 37 9c ff cc addi sp,sp,-52 80060e0: 5b 8b 00 34 sw (sp+52),r11 80060e4: 5b 8c 00 30 sw (sp+48),r12 80060e8: 5b 8d 00 2c sw (sp+44),r13 80060ec: 5b 8e 00 28 sw (sp+40),r14 80060f0: 5b 8f 00 24 sw (sp+36),r15 80060f4: 5b 90 00 20 sw (sp+32),r16 80060f8: 5b 91 00 1c sw (sp+28),r17 80060fc: 5b 92 00 18 sw (sp+24),r18 8006100: 5b 93 00 14 sw (sp+20),r19 8006104: 5b 94 00 10 sw (sp+16),r20 8006108: 5b 95 00 0c sw (sp+12),r21 800610c: 5b 96 00 08 sw (sp+8),r22 8006110: 5b 9d 00 04 sw (sp+4),ra 8006114: b8 20 88 00 mv r17,r1 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8006118: 28 21 00 00 lw r1,(r1+0) uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 800611c: 34 02 00 00 mvi r2,0 8006120: 34 03 00 00 mvi r3,0 rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8006124: 28 2b 00 38 lw r11,(r1+56) uint32_t count = args->count; 8006128: 2a 2f 00 14 lw r15,(r17+20) char *buffer = args->buffer; 800612c: 2a 30 00 10 lw r16,(r17+16) rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8006130: 29 61 00 14 lw r1,(r11+20) 8006134: f8 00 05 c1 calli 8007838 8006138: b8 20 90 00 mv r18,r1 if (sc != RTEMS_SUCCESSFUL) 800613c: 5c 20 00 13 bne r1,r0,8006188 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 8006140: 29 63 00 cc lw r3,(r11+204) 8006144: 78 01 08 02 mvhi r1,0x802 8006148: 38 21 27 84 ori r1,r1,0x2784 800614c: b4 63 18 00 add r3,r3,r3 8006150: b4 63 18 00 add r3,r3,r3 8006154: b4 63 18 00 add r3,r3,r3 8006158: b4 63 18 00 add r3,r3,r3 800615c: b4 63 18 00 add r3,r3,r3 8006160: b4 23 18 00 add r3,r1,r3 8006164: 28 63 00 08 lw r3,(r3+8) 8006168: 44 72 00 18 be r3,r18,80061c8 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 800616c: b9 60 08 00 mv r1,r11 8006170: ba 20 10 00 mv r2,r17 8006174: d8 60 00 00 call r3 8006178: b8 20 90 00 mv r18,r1 tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 800617c: 29 61 00 14 lw r1,(r11+20) 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); tty->tty_rcvwakeup = 0; 8006180: 59 60 00 e4 sw (r11+228),r0 rtems_semaphore_release (tty->isem); 8006184: f8 00 06 09 calli 80079a8 } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 8006188: ba 40 08 00 mv r1,r18 800618c: 2b 9d 00 04 lw ra,(sp+4) 8006190: 2b 8b 00 34 lw r11,(sp+52) 8006194: 2b 8c 00 30 lw r12,(sp+48) 8006198: 2b 8d 00 2c lw r13,(sp+44) 800619c: 2b 8e 00 28 lw r14,(sp+40) 80061a0: 2b 8f 00 24 lw r15,(sp+36) 80061a4: 2b 90 00 20 lw r16,(sp+32) 80061a8: 2b 91 00 1c lw r17,(sp+28) 80061ac: 2b 92 00 18 lw r18,(sp+24) 80061b0: 2b 93 00 14 lw r19,(sp+20) 80061b4: 2b 94 00 10 lw r20,(sp+16) 80061b8: 2b 95 00 0c lw r21,(sp+12) 80061bc: 2b 96 00 08 lw r22,(sp+8) 80061c0: 37 9c 00 34 addi sp,sp,52 80061c4: c3 a0 00 00 ret tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 80061c8: 29 62 00 24 lw r2,(r11+36) 80061cc: 29 61 00 20 lw r1,(r11+32) 80061d0: 44 41 00 15 be r2,r1,8006224 <== ALWAYS TAKEN sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 80061d4: 45 e0 00 0d be r15,r0,8006208 <== NEVER TAKEN 80061d8: 29 63 00 24 lw r3,(r11+36) 80061dc: 29 61 00 20 lw r1,(r11+32) 80061e0: 4c 61 00 0a bge r3,r1,8006208 *buffer++ = tty->cbuf[tty->cindex++]; 80061e4: 29 62 00 1c lw r2,(r11+28) count--; 80061e8: 35 ef ff ff addi r15,r15,-1 if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 80061ec: b4 43 10 00 add r2,r2,r3 80061f0: 40 41 00 00 lbu r1,(r2+0) 80061f4: 34 63 00 01 addi r3,r3,1 80061f8: 32 01 00 00 sb (r16+0),r1 80061fc: 59 63 00 24 sw (r11+36),r3 8006200: 36 10 00 01 addi r16,r16,1 sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 8006204: 5d e0 ff f6 bne r15,r0,80061dc <== ALWAYS TAKEN *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 8006208: 2a 22 00 14 lw r2,(r17+20) tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 800620c: 29 61 00 14 lw r1,(r11+20) } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 8006210: c8 4f 78 00 sub r15,r2,r15 8006214: 5a 2f 00 1c sw (r17+28),r15 tty->tty_rcvwakeup = 0; 8006218: 59 60 00 e4 sw (r11+228),r0 rtems_semaphore_release (tty->isem); 800621c: f8 00 05 e3 calli 80079a8 return sc; 8006220: e3 ff ff da bi 8006188 return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 8006224: 29 61 00 28 lw r1,(r11+40) if (tty->device.pollRead != NULL && 8006228: 29 62 00 a0 lw r2,(r11+160) rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 800622c: 59 60 00 20 sw (r11+32),r0 8006230: 59 60 00 24 sw (r11+36),r0 tty->read_start_column = tty->column; 8006234: 59 61 00 2c sw (r11+44),r1 if (tty->device.pollRead != NULL && 8006238: 44 40 00 03 be r2,r0,8006244 800623c: 29 61 00 b4 lw r1,(r11+180) 8006240: 44 20 00 5d be r1,r0,80063b4 * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 8006244: 29 6e 00 74 lw r14,(r11+116) while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { 8006248: 78 0c 08 02 mvhi r12,0x802 static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; 800624c: 34 0d 00 01 mvi r13,1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { 8006250: 39 8c 22 40 ori r12,r12,0x2240 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; 8006254: 34 14 ff fe mvi r20,-2 /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 8006258: 34 13 02 02 mvi r19,514 || (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; 800625c: 34 15 ff fb mvi r21,-5 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)( 8006260: 35 76 00 49 addi r22,r11,73 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 8006264: 29 63 00 5c lw r3,(r11+92) 8006268: 29 61 00 60 lw r1,(r11+96) 800626c: 44 61 00 05 be r3,r1,8006280 (tty->ccount < (CBUFSIZE-1))) { 8006270: 29 81 00 00 lw r1,(r12+0) while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 8006274: 29 62 00 20 lw r2,(r11+32) (tty->ccount < (CBUFSIZE-1))) { 8006278: 34 21 ff ff addi r1,r1,-1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 800627c: 48 22 00 08 bg r1,r2,800629c <== ALWAYS TAKEN } /* * Wait for characters */ if ( wait ) { 8006280: 45 a0 ff d5 be r13,r0,80061d4 sc = rtems_semaphore_obtain( 8006284: 29 61 00 68 lw r1,(r11+104) 8006288: 29 62 00 6c lw r2,(r11+108) 800628c: b9 c0 18 00 mv r3,r14 8006290: f8 00 05 6a calli 8007838 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 8006294: 44 20 ff f4 be r1,r0,8006264 <== ALWAYS TAKEN 8006298: e3 ff ff cf bi 80061d4 <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 800629c: 29 63 00 5c lw r3,(r11+92) 80062a0: 29 62 00 64 lw r2,(r11+100) 80062a4: 34 61 00 01 addi r1,r3,1 80062a8: f8 00 5f a8 calli 801e148 <__umodsi3> c = tty->rawInBuf.theBuf[newHead]; 80062ac: 29 64 00 58 lw r4,(r11+88) 80062b0: b4 81 20 00 add r4,r4,r1 80062b4: 40 8e 00 00 lbu r14,(r4+0) tty->rawInBuf.Head = newHead; 80062b8: 59 61 00 5c sw (r11+92),r1 if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 80062bc: 29 64 00 60 lw r4,(r11+96) 80062c0: 29 65 00 64 lw r5,(r11+100) % tty->rawInBuf.Size) 80062c4: 29 62 00 64 lw r2,(r11+100) 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) 80062c8: b4 a4 20 00 add r4,r5,r4 % tty->rawInBuf.Size) 80062cc: c8 81 08 00 sub r1,r4,r1 80062d0: f8 00 5f 9e calli 801e148 <__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) 80062d4: 29 63 00 bc lw r3,(r11+188) 80062d8: 50 23 00 11 bgeu r1,r3,800631c <== NEVER TAKEN % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 80062dc: 29 63 00 b8 lw r3,(r11+184) 80062e0: a0 74 18 00 and r3,r3,r20 80062e4: 59 63 00 b8 sw (r11+184),r3 /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 80062e8: 29 63 00 b8 lw r3,(r11+184) 80062ec: 20 63 02 02 andi r3,r3,0x202 80062f0: 44 73 00 26 be r3,r19,8006388 <== NEVER TAKEN && ((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) { 80062f4: 29 63 00 b8 lw r3,(r11+184) 80062f8: 20 63 01 00 andi r3,r3,0x100 80062fc: 44 60 00 08 be r3,r0,800631c <== ALWAYS TAKEN tty->flow_ctrl &= ~FL_IRTSOFF; 8006300: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 8006304: 29 63 00 b0 lw r3,(r11+176) <== 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; 8006308: a0 35 08 00 and r1,r1,r21 <== NOT EXECUTED 800630c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 8006310: 44 60 00 03 be r3,r0,800631c <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 8006314: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8006318: d8 60 00 00 call r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 800631c: 29 63 00 3c lw r3,(r11+60) 8006320: 20 63 00 02 andi r3,r3,0x2 8006324: 44 60 00 10 be r3,r0,8006364 <== NEVER TAKEN if (siproc (c, tty)) 8006328: b9 c0 08 00 mv r1,r14 800632c: b9 60 10 00 mv r2,r11 8006330: fb ff ff 05 calli 8005f44 wait = 0; 8006334: 64 23 00 00 cmpei r3,r1,0 8006338: c8 03 18 00 sub r3,r0,r3 800633c: a1 a3 68 00 and r13,r13,r3 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 8006340: 29 65 00 5c lw r5,(r11+92) 8006344: 29 64 00 60 lw r4,(r11+96) } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 8006348: 29 6e 00 70 lw r14,(r11+112) while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 800634c: 44 a4 ff cd be r5,r4,8006280 (tty->ccount < (CBUFSIZE-1))) { 8006350: 29 84 00 00 lw r4,(r12+0) while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 8006354: 29 63 00 20 lw r3,(r11+32) (tty->ccount < (CBUFSIZE-1))) { 8006358: 34 84 ff ff addi r4,r4,-1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 800635c: 48 83 ff d0 bg r4,r3,800629c <== ALWAYS TAKEN 8006360: e3 ff ff c8 bi 8006280 <== NOT EXECUTED /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 8006364: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8006368: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800636c: fb ff fe f6 calli 8005f44 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 8006370: 41 63 00 47 lbu r3,(r11+71) <== NOT EXECUTED 8006374: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED wait = 0; 8006378: e8 61 18 00 cmpg r3,r3,r1 <== NOT EXECUTED 800637c: c8 03 18 00 sub r3,r0,r3 <== NOT EXECUTED 8006380: a1 a3 68 00 and r13,r13,r3 <== NOT EXECUTED 8006384: e3 ff ff ef bi 8006340 <== 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) 8006388: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED 800638c: 44 20 00 04 be r1,r0,800639c <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 8006390: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8006394: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8006398: 44 20 ff d7 be r1,r0,80062f4 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 800639c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 80063a0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80063a4: ba c0 10 00 mv r2,r22 <== NOT EXECUTED 80063a8: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 80063ac: d8 80 00 00 call r4 <== NOT EXECUTED 80063b0: e3 ff ff db bi 800631c <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 80063b4: 29 61 00 3c lw r1,(r11+60) 80063b8: 20 21 00 02 andi r1,r1,0x2 80063bc: 44 20 00 14 be r1,r0,800640c <== NEVER TAKEN for (;;) { n = (*tty->device.pollRead)(tty->minor); 80063c0: 29 61 00 10 lw r1,(r11+16) 80063c4: d8 40 00 00 call r2 80063c8: b8 20 18 00 mv r3,r1 if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 80063cc: b9 60 10 00 mv r2,r11 80063d0: 20 21 00 ff andi r1,r1,0xff int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { 80063d4: 4c 60 00 21 bge r3,r0,8006458 rtems_task_wake_after (1); 80063d8: 34 01 00 01 mvi r1,1 80063dc: f8 00 06 83 calli 8007de8 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 80063e0: 29 62 00 a0 lw r2,(r11+160) 80063e4: e3 ff ff f7 bi 80063c0 break; } } rtems_task_wake_after (1); } else { siproc (n, tty); 80063e8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80063ec: 20 21 00 ff andi r1,r1,0xff <== NOT EXECUTED 80063f0: fb ff fe d5 calli 8005f44 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 80063f4: 41 62 00 47 lbu r2,(r11+71) <== NOT EXECUTED 80063f8: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 80063fc: 4c 22 ff 76 bge r1,r2,80061d4 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 8006400: 44 40 00 05 be r2,r0,8006414 <== NOT EXECUTED 8006404: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED 8006408: 44 20 00 03 be r1,r0,8006414 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 800640c: f8 00 03 0d calli 8007040 <== NOT EXECUTED 8006410: b8 20 60 00 mv r12,r1 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 8006414: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 8006418: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800641c: d8 40 00 00 call r2 <== NOT EXECUTED if (n < 0) { 8006420: 4c 20 ff f2 bge r1,r0,80063e8 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 8006424: 41 62 00 47 lbu r2,(r11+71) <== NOT EXECUTED 8006428: 44 40 00 10 be r2,r0,8006468 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 800642c: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED 8006430: 44 20 00 03 be r1,r0,800643c <== NOT EXECUTED 8006434: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8006438: 5c 20 00 0e bne r1,r0,8006470 <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 800643c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8006440: f8 00 06 6a calli 8007de8 <== NOT EXECUTED } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); 8006444: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 8006448: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800644c: d8 40 00 00 call r2 <== NOT EXECUTED if (n < 0) { 8006450: 4c 20 ff e6 bge r1,r0,80063e8 <== NOT EXECUTED 8006454: e3 ff ff f4 bi 8006424 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 8006458: fb ff fe bb calli 8005f44 800645c: 5c 20 ff 5e bne r1,r0,80061d4 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 8006460: 29 62 00 a0 lw r2,(r11+160) 8006464: e3 ff ff d7 bi 80063c0 if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 8006468: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED 800646c: 44 22 ff 5a be r1,r2,80061d4 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 8006470: f8 00 02 f4 calli 8007040 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 8006474: 29 62 00 54 lw r2,(r11+84) <== NOT EXECUTED 8006478: c8 2c 08 00 sub r1,r1,r12 <== NOT EXECUTED 800647c: 54 22 ff 56 bgu r1,r2,80061d4 <== NOT EXECUTED 8006480: e3 ff ff ef bi 800643c <== NOT EXECUTED =============================================================================== 08006894 : * 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) { 8006894: 37 9c ff f0 addi sp,sp,-16 8006898: 5b 8b 00 10 sw (sp+16),r11 800689c: 5b 8c 00 0c sw (sp+12),r12 80068a0: 5b 8d 00 08 sw (sp+8),r13 80068a4: 5b 9d 00 04 sw (sp+4),ra int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 80068a8: 28 22 00 b8 lw r2,(r1+184) * 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) { 80068ac: b8 20 58 00 mv r11,r1 int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 80068b0: 34 01 04 01 mvi r1,1025 80068b4: 20 42 04 03 andi r2,r2,0x403 80068b8: 44 41 00 50 be r2,r1,80069f8 <== NEVER TAKEN tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 80068bc: 29 62 00 b8 lw r2,(r11+184) 80068c0: 34 01 00 02 mvi r1,2 80068c4: 20 42 00 03 andi r2,r2,0x3 80068c8: 44 41 00 64 be r2,r1,8006a58 <== NEVER TAKEN tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 80068cc: 29 63 00 80 lw r3,(r11+128) 80068d0: 29 62 00 84 lw r2,(r11+132) 80068d4: 44 62 00 1c be r3,r2,8006944 rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 80068d8: 90 00 10 00 rcsr r2,IE 80068dc: 34 01 ff fe mvi r1,-2 80068e0: a0 41 08 00 and r1,r2,r1 80068e4: d0 01 00 00 wcsr IE,r1 len = tty->t_dqlen; 80068e8: 29 63 00 90 lw r3,(r11+144) tty->t_dqlen = 0; 80068ec: 59 60 00 90 sw (r11+144),r0 rtems_interrupt_enable(level); 80068f0: d0 02 00 00 wcsr IE,r2 newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 80068f4: 29 61 00 84 lw r1,(r11+132) 80068f8: 29 62 00 88 lw r2,(r11+136) 80068fc: b4 61 08 00 add r1,r3,r1 8006900: f8 00 5e 12 calli 801e148 <__umodsi3> tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 8006904: 29 62 00 94 lw r2,(r11+148) rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 8006908: b8 20 60 00 mv r12,r1 tty->rawOutBuf.Tail = newTail; 800690c: 59 61 00 84 sw (r11+132),r1 if (tty->rawOutBufState == rob_wait) { 8006910: 34 01 00 02 mvi r1,2 8006914: 44 41 00 36 be r2,r1,80069ec * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 8006918: 29 61 00 80 lw r1,(r11+128) 800691c: 44 2c 00 14 be r1,r12,800696c 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)) 8006920: 29 62 00 b8 lw r2,(r11+184) 8006924: 34 01 02 10 mvi r1,528 8006928: 20 42 02 10 andi r2,r2,0x210 800692c: 44 41 00 64 be r2,r1,8006abc <== NEVER TAKEN nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 8006930: 29 61 00 80 lw r1,(r11+128) 8006934: 50 2c 00 1d bgeu r1,r12,80069a8 nToSend = tty->rawOutBuf.Size - newTail; 8006938: 29 6d 00 88 lw r13,(r11+136) 800693c: c9 ac 68 00 sub r13,r13,r12 8006940: e0 00 00 1c bi 80069b0 } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 8006944: 29 62 00 94 lw r2,(r11+148) /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 8006948: 34 0d 00 00 mvi r13,0 } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 800694c: 44 41 00 69 be r2,r1,8006af0 <== NEVER TAKEN tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 8006950: b9 a0 08 00 mv r1,r13 8006954: 2b 9d 00 04 lw ra,(sp+4) 8006958: 2b 8b 00 10 lw r11,(sp+16) 800695c: 2b 8c 00 0c lw r12,(sp+12) 8006960: 2b 8d 00 08 lw r13,(sp+8) 8006964: 37 9c 00 10 addi sp,sp,16 8006968: c3 a0 00 00 ret nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 800696c: 29 63 00 d4 lw r3,(r11+212) if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 8006970: 59 60 00 94 sw (r11+148),r0 nToSend = 0; 8006974: 34 0d 00 00 mvi r13,0 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 8006978: 44 60 00 04 be r3,r0,8006988 <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 800697c: 29 62 00 d8 lw r2,(r11+216) <== NOT EXECUTED 8006980: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED 8006984: d8 60 00 00 call r3 <== NOT EXECUTED } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 8006988: 59 6c 00 84 sw (r11+132),r12 } return nToSend; } 800698c: b9 a0 08 00 mv r1,r13 8006990: 2b 9d 00 04 lw ra,(sp+4) 8006994: 2b 8b 00 10 lw r11,(sp+16) 8006998: 2b 8c 00 0c lw r12,(sp+12) 800699c: 2b 8d 00 08 lw r13,(sp+8) 80069a0: 37 9c 00 10 addi sp,sp,16 80069a4: c3 a0 00 00 ret * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 80069a8: 29 6d 00 80 lw r13,(r11+128) 80069ac: c9 ac 68 00 sub r13,r13,r12 /* 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)) { 80069b0: 29 61 00 b8 lw r1,(r11+184) 80069b4: b9 a0 18 00 mv r3,r13 80069b8: 20 21 06 00 andi r1,r1,0x600 80069bc: 44 20 00 03 be r1,r0,80069c8 80069c0: 34 03 00 01 mvi r3,1 nToSend = 1; 80069c4: 34 0d 00 01 mvi r13,1 } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( 80069c8: 29 62 00 7c lw r2,(r11+124) 80069cc: 29 65 00 a4 lw r5,(r11+164) 80069d0: 29 61 00 10 lw r1,(r11+16) /* 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; } tty->rawOutBufState = rob_busy; /*apm*/ 80069d4: 34 04 00 01 mvi r4,1 80069d8: 59 64 00 94 sw (r11+148),r4 (*tty->device.write)( 80069dc: b4 4c 10 00 add r2,r2,r12 80069e0: d8 a0 00 00 call r5 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 80069e4: 59 6c 00 84 sw (r11+132),r12 80069e8: e3 ff ff e9 bi 800698c tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 80069ec: 29 61 00 8c lw r1,(r11+140) 80069f0: f8 00 03 ee calli 80079a8 80069f4: e3 ff ff c9 bi 8006918 /* 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); 80069f8: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 80069fc: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8006a00: 35 62 00 4a addi r2,r11,74 <== NOT EXECUTED 8006a04: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8006a08: d8 80 00 00 call r4 <== NOT EXECUTED rtems_interrupt_disable(level); 8006a0c: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8006a10: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8006a14: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8006a18: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED tty->t_dqlen--; 8006a1c: 29 63 00 90 lw r3,(r11+144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 8006a20: 29 62 00 b8 lw r2,(r11+184) <== 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--; 8006a24: 34 63 ff ff addi r3,r3,-1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 8006a28: 38 42 00 02 ori r2,r2,0x2 <== 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--; 8006a2c: 59 63 00 90 sw (r11+144),r3 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 8006a30: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED rtems_interrupt_enable(level); 8006a34: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED nToSend = 1; 8006a38: 34 0d 00 01 mvi r13,1 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 8006a3c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8006a40: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006a44: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8006a48: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8006a4c: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8006a50: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8006a54: c3 a0 00 00 ret <== 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); 8006a58: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8006a5c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8006a60: 35 62 00 49 addi r2,r11,73 <== NOT EXECUTED 8006a64: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8006a68: d8 80 00 00 call r4 <== NOT EXECUTED rtems_interrupt_disable(level); 8006a6c: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8006a70: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8006a74: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8006a78: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED tty->t_dqlen--; 8006a7c: 29 63 00 90 lw r3,(r11+144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 8006a80: 29 64 00 b8 lw r4,(r11+184) <== NOT EXECUTED 8006a84: 34 02 ff fd mvi r2,-3 <== 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--; 8006a88: 34 63 ff ff addi r3,r3,-1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 8006a8c: a0 82 10 00 and r2,r4,r2 <== 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--; 8006a90: 59 63 00 90 sw (r11+144),r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 8006a94: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED rtems_interrupt_enable(level); 8006a98: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED nToSend = 1; 8006a9c: 34 0d 00 01 mvi r13,1 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 8006aa0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8006aa4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006aa8: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8006aac: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8006ab0: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8006ab4: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8006ab8: c3 a0 00 00 ret <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ 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); 8006abc: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8006ac0: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8006ac4: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8006ac8: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 8006acc: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 8006ad0: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8006ad4: 59 63 00 94 sw (r11+148),r3 <== 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; 8006ad8: 38 42 00 20 ori r2,r2,0x20 <== NOT EXECUTED 8006adc: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 8006ae0: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED nToSend = 0; 8006ae4: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 8006ae8: 59 6c 00 84 sw (r11+132),r12 <== NOT EXECUTED 8006aec: e3 ff ff a8 bi 800698c <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 8006af0: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8006af4: f8 00 03 ad calli 80079a8 <== NOT EXECUTED 8006af8: e3 ff ff 96 bi 8006950 <== NOT EXECUTED =============================================================================== 080067fc : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 80067fc: 37 9c ff e4 addi sp,sp,-28 8006800: 5b 8b 00 14 sw (sp+20),r11 8006804: 5b 8c 00 10 sw (sp+16),r12 8006808: 5b 8d 00 0c sw (sp+12),r13 800680c: 5b 8e 00 08 sw (sp+8),r14 8006810: 5b 9d 00 04 sw (sp+4),ra /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { 8006814: 34 0c ff ff mvi r12,-1 /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 8006818: b8 20 58 00 mv r11,r1 800681c: 37 8d 00 18 addi r13,sp,24 8006820: 37 8e 00 1f addi r14,sp,31 8006824: e0 00 00 06 bi 800683c } /* * do something */ c = tty->device.pollRead(tty->minor); 8006828: 29 63 00 a0 lw r3,(r11+160) 800682c: 29 61 00 10 lw r1,(r11+16) 8006830: d8 60 00 00 call r3 8006834: b8 20 28 00 mv r5,r1 if (c != EOF) { 8006838: 5c 2c 00 11 bne r1,r12,800687c while (1) { /* * wait for rtems event */ rtems_event_receive( 800683c: b9 a0 20 00 mv r4,r13 8006840: 34 02 00 02 mvi r2,2 8006844: 34 03 00 00 mvi r3,0 8006848: 34 01 00 03 mvi r1,3 800684c: f8 00 02 1a calli 80070b4 (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) { 8006850: 2b 81 00 18 lw r1,(sp+24) 8006854: 20 21 00 01 andi r1,r1,0x1 8006858: 44 20 ff f4 be r1,r0,8006828 <== ALWAYS TAKEN tty->rxTaskId = 0; 800685c: 59 60 00 c4 sw (r11+196),r0 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 8006860: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8006864: f8 00 04 df calli 8007be0 <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); 8006868: 29 63 00 a0 lw r3,(r11+160) <== NOT EXECUTED 800686c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8006870: d8 60 00 00 call r3 <== NOT EXECUTED 8006874: b8 20 28 00 mv r5,r1 <== NOT EXECUTED if (c != EOF) { 8006878: 44 2c ff f1 be r1,r12,800683c <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 800687c: b9 60 08 00 mv r1,r11 8006880: b9 c0 10 00 mv r2,r14 8006884: 34 03 00 01 mvi r3,1 c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 8006888: 33 85 00 1f sb (sp+31),r5 rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 800688c: fb ff ff 06 calli 80064a4 8006890: e3 ff ff eb bi 800683c =============================================================================== 08006c0c : int rtems_termios_set_initial_baud( struct rtems_termios_tty *ttyp, int32_t baud ) { 8006c0c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8006c10: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8006c14: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8006c18: b8 20 58 00 mv r11,r1 <== NOT EXECUTED int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); 8006c1c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8006c20: fb ff f7 ab calli 8004acc <== NOT EXECUTED if ( cflags_baud == -1 ) return -1; 8006c24: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED ) { int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); if ( cflags_baud == -1 ) 8006c28: 44 22 00 07 be r1,r2,8006c44 <== NOT EXECUTED return -1; ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud; 8006c2c: 29 64 00 38 lw r4,(r11+56) <== NOT EXECUTED 8006c30: 34 03 ef f0 mvi r3,-4112 <== NOT EXECUTED return 0; 8006c34: 34 02 00 00 mvi r2,0 <== NOT EXECUTED cflags_baud = rtems_termios_number_to_baud(baud); if ( cflags_baud == -1 ) return -1; ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud; 8006c38: a0 64 18 00 and r3,r3,r4 <== NOT EXECUTED 8006c3c: b8 23 08 00 or r1,r1,r3 <== NOT EXECUTED 8006c40: 59 61 00 38 sw (r11+56),r1 <== NOT EXECUTED return 0; } 8006c44: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8006c48: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006c4c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8006c50: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006c54: c3 a0 00 00 ret <== NOT EXECUTED =============================================================================== 08006afc : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 8006afc: 37 9c ff f0 addi sp,sp,-16 8006b00: 5b 8b 00 0c sw (sp+12),r11 8006b04: 5b 8c 00 08 sw (sp+8),r12 8006b08: 5b 9d 00 04 sw (sp+4),ra 8006b0c: 78 0c 08 02 mvhi r12,0x802 8006b10: b8 20 58 00 mv r11,r1 8006b14: 39 8c 27 84 ori r12,r12,0x2784 8006b18: e0 00 00 0e bi 8006b50 } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8006b1c: 29 62 00 cc lw r2,(r11+204) rtems_termios_linesw[tty->t_line].l_start(tty); 8006b20: b9 60 08 00 mv r1,r11 } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8006b24: b4 42 10 00 add r2,r2,r2 8006b28: b4 42 10 00 add r2,r2,r2 8006b2c: b4 42 10 00 add r2,r2,r2 8006b30: b4 42 10 00 add r2,r2,r2 8006b34: b4 42 10 00 add r2,r2,r2 8006b38: b5 82 10 00 add r2,r12,r2 8006b3c: 28 42 00 14 lw r2,(r2+20) 8006b40: 44 40 00 02 be r2,r0,8006b48 <== ALWAYS TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 8006b44: d8 40 00 00 call r2 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 8006b48: b9 60 08 00 mv r1,r11 8006b4c: fb ff ff 52 calli 8006894 while (1) { /* * wait for rtems event */ rtems_event_receive( 8006b50: 34 02 00 02 mvi r2,2 8006b54: 34 03 00 00 mvi r3,0 8006b58: 37 84 00 10 addi r4,sp,16 8006b5c: 34 01 00 03 mvi r1,3 8006b60: f8 00 01 55 calli 80070b4 (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) { 8006b64: 2b 81 00 10 lw r1,(sp+16) 8006b68: 20 21 00 01 andi r1,r1,0x1 8006b6c: 44 20 ff ec be r1,r0,8006b1c <== ALWAYS TAKEN tty->txTaskId = 0; 8006b70: 59 60 00 c8 sw (r11+200),r0 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 8006b74: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8006b78: f8 00 04 1a calli 8007be0 <== NOT EXECUTED 8006b7c: e3 ff ff e8 bi 8006b1c <== NOT EXECUTED =============================================================================== 08005fcc : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 8005fcc: 37 9c ff e4 addi sp,sp,-28 8005fd0: 5b 8b 00 1c sw (sp+28),r11 8005fd4: 5b 8c 00 18 sw (sp+24),r12 8005fd8: 5b 8d 00 14 sw (sp+20),r13 8005fdc: 5b 8e 00 10 sw (sp+16),r14 8005fe0: 5b 8f 00 0c sw (sp+12),r15 8005fe4: 5b 90 00 08 sw (sp+8),r16 8005fe8: 5b 9d 00 04 sw (sp+4),ra 8005fec: b8 20 68 00 mv r13,r1 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8005ff0: 28 21 00 00 lw r1,(r1+0) rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8005ff4: 34 02 00 00 mvi r2,0 8005ff8: 34 03 00 00 mvi r3,0 rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8005ffc: 28 2b 00 38 lw r11,(r1+56) rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8006000: 29 61 00 18 lw r1,(r11+24) 8006004: f8 00 06 0d calli 8007838 8006008: b8 20 70 00 mv r14,r1 if (sc != RTEMS_SUCCESSFUL) 800600c: 5c 20 00 12 bne r1,r0,8006054 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 8006010: 29 64 00 cc lw r4,(r11+204) 8006014: 78 01 08 02 mvhi r1,0x802 8006018: 38 21 27 84 ori r1,r1,0x2784 800601c: b4 84 20 00 add r4,r4,r4 8006020: b4 84 20 00 add r4,r4,r4 8006024: b4 84 20 00 add r4,r4,r4 8006028: b4 84 20 00 add r4,r4,r4 800602c: b4 84 20 00 add r4,r4,r4 8006030: b4 24 20 00 add r4,r1,r4 8006034: 28 83 00 0c lw r3,(r4+12) 8006038: 44 6e 00 11 be r3,r14,800607c sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 800603c: b9 60 08 00 mv r1,r11 8006040: b9 a0 10 00 mv r2,r13 8006044: d8 60 00 00 call r3 8006048: b8 20 70 00 mv r14,r1 rtems_semaphore_release (tty->osem); 800604c: 29 61 00 18 lw r1,(r11+24) 8006050: f8 00 06 56 calli 80079a8 rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 8006054: b9 c0 08 00 mv r1,r14 8006058: 2b 9d 00 04 lw ra,(sp+4) 800605c: 2b 8b 00 1c lw r11,(sp+28) 8006060: 2b 8c 00 18 lw r12,(sp+24) 8006064: 2b 8d 00 14 lw r13,(sp+20) 8006068: 2b 8e 00 10 lw r14,(sp+16) 800606c: 2b 8f 00 0c lw r15,(sp+12) 8006070: 2b 90 00 08 lw r16,(sp+8) 8006074: 37 9c 00 1c addi sp,sp,28 8006078: c3 a0 00 00 ret if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 800607c: 29 61 00 34 lw r1,(r11+52) 8006080: 20 21 00 01 andi r1,r1,0x1 8006084: 44 20 00 11 be r1,r0,80060c8 <== NEVER TAKEN uint32_t count = args->count; 8006088: 29 af 00 14 lw r15,(r13+20) char *buffer = args->buffer; 800608c: 29 b0 00 10 lw r16,(r13+16) while (count--) 8006090: 34 01 00 00 mvi r1,0 8006094: 45 e0 00 09 be r15,r0,80060b8 <== NEVER TAKEN 8006098: 34 0c 00 00 mvi r12,0 } rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) 800609c: b6 0c 08 00 add r1,r16,r12 } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 80060a0: 40 21 00 00 lbu r1,(r1+0) 80060a4: 35 8c 00 01 addi r12,r12,1 80060a8: b9 60 10 00 mv r2,r11 80060ac: fb ff fe 1d calli 8005920 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 80060b0: 5d 8f ff fb bne r12,r15,800609c oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 80060b4: 29 a1 00 14 lw r1,(r13+20) 80060b8: 59 a1 00 1c sw (r13+28),r1 } rtems_semaphore_release (tty->osem); 80060bc: 29 61 00 18 lw r1,(r11+24) 80060c0: f8 00 06 3a calli 80079a8 return sc; 80060c4: e3 ff ff e4 bi 8006054 char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 80060c8: 29 a1 00 10 lw r1,(r13+16) <== NOT EXECUTED 80060cc: 29 a2 00 14 lw r2,(r13+20) <== NOT EXECUTED 80060d0: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80060d4: fb ff fd ba calli 80057bc <== NOT EXECUTED 80060d8: e3 ff ff f7 bi 80060b4 <== NOT EXECUTED =============================================================================== 08013d00 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 8013d00: 37 9c ff f8 addi sp,sp,-8 8013d04: 5b 9d 00 04 sw (sp+4),ra 8013d08: b8 20 10 00 mv r2,r1 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 8013d0c: 78 01 08 03 mvhi r1,0x803 8013d10: 38 21 ee 68 ori r1,r1,0xee68 8013d14: 37 83 00 08 addi r3,sp,8 8013d18: f8 00 0e 3f calli 8017614 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 8013d1c: 2b 82 00 08 lw r2,(sp+8) 8013d20: 44 40 00 05 be r2,r0,8013d34 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 8013d24: 34 01 00 04 mvi r1,4 } 8013d28: 2b 9d 00 04 lw ra,(sp+4) 8013d2c: 37 9c 00 08 addi sp,sp,8 8013d30: c3 a0 00 00 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 8013d34: 28 23 00 38 lw r3,(r1+56) 8013d38: 34 02 00 04 mvi r2,4 8013d3c: 44 62 00 03 be r3,r2,8013d48 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 8013d40: 34 21 00 10 addi r1,r1,16 8013d44: f8 00 18 15 calli 8019d98 <_Watchdog_Remove> _Thread_Enable_dispatch(); 8013d48: f8 00 11 20 calli 80181c8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 8013d4c: 34 01 00 00 mvi r1,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8013d50: 2b 9d 00 04 lw ra,(sp+4) 8013d54: 37 9c 00 08 addi sp,sp,8 8013d58: c3 a0 00 00 ret =============================================================================== 08013fac : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 8013fac: 37 9c ff d8 addi sp,sp,-40 8013fb0: 5b 8b 00 20 sw (sp+32),r11 8013fb4: 5b 8c 00 1c sw (sp+28),r12 8013fb8: 5b 8d 00 18 sw (sp+24),r13 8013fbc: 5b 8e 00 14 sw (sp+20),r14 8013fc0: 5b 8f 00 10 sw (sp+16),r15 8013fc4: 5b 90 00 0c sw (sp+12),r16 8013fc8: 5b 91 00 08 sw (sp+8),r17 8013fcc: 5b 9d 00 04 sw (sp+4),ra Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 8013fd0: 78 05 08 03 mvhi r5,0x803 8013fd4: 38 a5 ec 3c ori r5,r5,0xec3c 8013fd8: 40 a6 00 00 lbu r6,(r5+0) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 8013fdc: b8 20 68 00 mv r13,r1 8013fe0: b8 60 60 00 mv r12,r3 8013fe4: b8 80 70 00 mv r14,r4 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 8013fe8: 34 05 00 0b mvi r5,11 { Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 8013fec: 5c c0 00 0c bne r6,r0,801401c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8013ff0: b8 a0 08 00 mv r1,r5 8013ff4: 2b 9d 00 04 lw ra,(sp+4) 8013ff8: 2b 8b 00 20 lw r11,(sp+32) 8013ffc: 2b 8c 00 1c lw r12,(sp+28) 8014000: 2b 8d 00 18 lw r13,(sp+24) 8014004: 2b 8e 00 14 lw r14,(sp+20) 8014008: 2b 8f 00 10 lw r15,(sp+16) 801400c: 2b 90 00 0c lw r16,(sp+12) 8014010: 2b 91 00 08 lw r17,(sp+8) 8014014: 37 9c 00 28 addi sp,sp,40 8014018: c3 a0 00 00 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 801401c: b8 40 08 00 mv r1,r2 8014020: 5b 82 00 24 sw (sp+36),r2 8014024: fb ff f1 9b calli 8010690 <_TOD_Validate> return RTEMS_INVALID_CLOCK; 8014028: 34 05 00 14 mvi r5,20 rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 801402c: 2b 82 00 24 lw r2,(sp+36) 8014030: 44 20 ff f0 be r1,r0,8013ff0 <== NEVER TAKEN return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; 8014034: 34 05 00 09 mvi r5,9 return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 8014038: 45 80 ff ee be r12,r0,8013ff0 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) 801403c: 78 0b 08 03 mvhi r11,0x803 return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 8014040: b8 40 08 00 mv r1,r2 8014044: fb ff f1 3a calli 801052c <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 8014048: 39 6b ec b4 ori r11,r11,0xecb4 return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 801404c: b8 20 80 00 mv r16,r1 if ( seconds <= _TOD_Seconds_since_epoch() ) 8014050: 29 61 00 00 lw r1,(r11+0) return RTEMS_INVALID_CLOCK; 8014054: 34 05 00 14 mvi r5,20 if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) 8014058: 50 30 ff e6 bgeu r1,r16,8013ff0 <== NEVER TAKEN 801405c: 78 01 08 03 mvhi r1,0x803 8014060: 38 21 ee 68 ori r1,r1,0xee68 8014064: b9 a0 10 00 mv r2,r13 8014068: 37 83 00 28 addi r3,sp,40 801406c: f8 00 0d 6a calli 8017614 <_Objects_Get> 8014070: b8 20 78 00 mv r15,r1 return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 8014074: 2b 81 00 28 lw r1,(sp+40) #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 8014078: 34 05 00 04 mvi r5,4 seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 801407c: 5c 20 ff dd bne r1,r0,8013ff0 <== NEVER TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 8014080: 35 f1 00 10 addi r17,r15,16 8014084: ba 20 08 00 mv r1,r17 8014088: f8 00 17 44 calli 8019d98 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 801408c: 29 61 00 00 lw r1,(r11+0) the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY; 8014090: 34 03 00 02 mvi r3,2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 8014094: ba 20 10 00 mv r2,r17 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 8014098: ca 01 80 00 sub r16,r16,r1 801409c: 78 01 08 03 mvhi r1,0x803 80140a0: 38 21 ec e4 ori r1,r1,0xece4 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY; 80140a4: 59 e3 00 38 sw (r15+56),r3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 80140a8: 59 e0 00 18 sw (r15+24),r0 the_watchdog->routine = routine; 80140ac: 59 ec 00 2c sw (r15+44),r12 the_watchdog->id = id; 80140b0: 59 ed 00 30 sw (r15+48),r13 the_watchdog->user_data = user_data; 80140b4: 59 ee 00 34 sw (r15+52),r14 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 80140b8: 59 f0 00 1c sw (r15+28),r16 _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 80140bc: f8 00 16 ce calli 8019bf4 <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 80140c0: f8 00 10 42 calli 80181c8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 80140c4: 34 05 00 00 mvi r5,0 80140c8: e3 ff ff ca bi 8013ff0 =============================================================================== 0801437c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 801437c: 37 9c ff dc addi sp,sp,-36 8014380: 5b 8b 00 20 sw (sp+32),r11 8014384: 5b 8c 00 1c sw (sp+28),r12 8014388: 5b 8d 00 18 sw (sp+24),r13 801438c: 5b 8e 00 14 sw (sp+20),r14 8014390: 5b 8f 00 10 sw (sp+16),r15 8014394: 5b 90 00 0c sw (sp+12),r16 8014398: 5b 91 00 08 sw (sp+8),r17 801439c: 5b 9d 00 04 sw (sp+4),ra Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 80143a0: 78 05 08 03 mvhi r5,0x803 80143a4: 38 a5 ee a8 ori r5,r5,0xeea8 80143a8: 28 ac 00 00 lw r12,(r5+0) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 80143ac: b8 20 80 00 mv r16,r1 80143b0: b8 40 70 00 mv r14,r2 80143b4: b8 60 78 00 mv r15,r3 80143b8: b8 80 88 00 mv r17,r4 Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 80143bc: 34 0b 00 0e mvi r11,14 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 80143c0: 45 80 00 0c be r12,r0,80143f0 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 80143c4: 78 05 08 03 mvhi r5,0x803 80143c8: 38 a5 ec 3c ori r5,r5,0xec3c 80143cc: 40 a5 00 00 lbu r5,(r5+0) return RTEMS_NOT_DEFINED; 80143d0: 34 0b 00 0b mvi r11,11 Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 80143d4: 44 a0 00 07 be r5,r0,80143f0 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 80143d8: 34 0b 00 09 mvi r11,9 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 80143dc: 44 60 00 05 be r3,r0,80143f0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 80143e0: b8 40 08 00 mv r1,r2 80143e4: fb ff f0 ab calli 8010690 <_TOD_Validate> return RTEMS_INVALID_CLOCK; 80143e8: 34 0b 00 14 mvi r11,20 return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 80143ec: 5c 20 00 0c bne r1,r0,801441c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 80143f0: b9 60 08 00 mv r1,r11 80143f4: 2b 9d 00 04 lw ra,(sp+4) 80143f8: 2b 8b 00 20 lw r11,(sp+32) 80143fc: 2b 8c 00 1c lw r12,(sp+28) 8014400: 2b 8d 00 18 lw r13,(sp+24) 8014404: 2b 8e 00 14 lw r14,(sp+20) 8014408: 2b 8f 00 10 lw r15,(sp+16) 801440c: 2b 90 00 0c lw r16,(sp+12) 8014410: 2b 91 00 08 lw r17,(sp+8) 8014414: 37 9c 00 24 addi sp,sp,36 8014418: c3 a0 00 00 ret return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 801441c: b9 c0 08 00 mv r1,r14 if ( seconds <= _TOD_Seconds_since_epoch() ) 8014420: 78 0d 08 03 mvhi r13,0x803 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 8014424: fb ff f0 42 calli 801052c <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 8014428: 39 ad ec b4 ori r13,r13,0xecb4 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 801442c: b8 20 70 00 mv r14,r1 if ( seconds <= _TOD_Seconds_since_epoch() ) 8014430: 29 a1 00 00 lw r1,(r13+0) 8014434: 50 2e ff ef bgeu r1,r14,80143f0 8014438: 78 01 08 03 mvhi r1,0x803 801443c: 38 21 ee 68 ori r1,r1,0xee68 8014440: ba 00 10 00 mv r2,r16 8014444: 37 83 00 24 addi r3,sp,36 8014448: f8 00 0c 73 calli 8017614 <_Objects_Get> 801444c: b8 20 58 00 mv r11,r1 return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 8014450: 2b 81 00 24 lw r1,(sp+36) 8014454: 44 20 00 03 be r1,r0,8014460 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 8014458: 34 0b 00 04 mvi r11,4 801445c: e3 ff ff e5 bi 80143f0 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 8014460: 35 61 00 10 addi r1,r11,16 8014464: f8 00 16 4d calli 8019d98 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 8014468: 29 a1 00 00 lw r1,(r13+0) (*timer_server->schedule_operation)( timer_server, the_timer ); 801446c: 29 83 00 04 lw r3,(r12+4) the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 8014470: 34 04 00 03 mvi r4,3 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 8014474: c9 c1 70 00 sub r14,r14,r1 (*timer_server->schedule_operation)( timer_server, the_timer ); 8014478: b9 60 10 00 mv r2,r11 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 801447c: 59 64 00 38 sw (r11+56),r4 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 8014480: 59 6f 00 2c sw (r11+44),r15 the_watchdog->id = id; 8014484: 59 70 00 30 sw (r11+48),r16 the_watchdog->user_data = user_data; 8014488: 59 71 00 34 sw (r11+52),r17 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 801448c: 59 6e 00 1c sw (r11+28),r14 (*timer_server->schedule_operation)( timer_server, the_timer ); 8014490: b9 80 08 00 mv r1,r12 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 8014494: 59 60 00 18 sw (r11+24),r0 8014498: d8 60 00 00 call r3 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 801449c: 34 0b 00 00 mvi r11,0 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 80144a0: f8 00 0f 4a calli 80181c8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 80144a4: e3 ff ff d3 bi 80143f0 =============================================================================== 080070fc : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 80070fc: 37 9c ff e4 addi sp,sp,-28 8007100: 5b 8b 00 1c sw (sp+28),r11 8007104: 5b 8c 00 18 sw (sp+24),r12 8007108: 5b 8d 00 14 sw (sp+20),r13 800710c: 5b 8e 00 10 sw (sp+16),r14 8007110: 5b 8f 00 0c sw (sp+12),r15 8007114: 5b 90 00 08 sw (sp+8),r16 8007118: 5b 9d 00 04 sw (sp+4),ra 800711c: b8 20 68 00 mv r13,r1 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 8007120: 78 01 20 00 mvhi r1,0x2000 8007124: a1 a1 08 00 and r1,r13,r1 static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 8007128: b8 40 80 00 mv r16,r2 800712c: b8 60 78 00 mv r15,r3 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 8007130: 44 20 00 10 be r1,r0,8007170 if (rtems_panic_in_progress++) 8007134: 78 04 08 02 mvhi r4,0x802 8007138: 38 84 88 1c ori r4,r4,0x881c 800713c: 28 81 00 00 lw r1,(r4+0) 8007140: 34 25 00 01 addi r5,r1,1 8007144: 58 85 00 00 sw (r4+0),r5 8007148: 44 20 00 07 be r1,r0,8007164 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 800714c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8007150: 38 21 89 9c ori r1,r1,0x899c <== NOT EXECUTED 8007154: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8007158: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED 800715c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 8007160: 28 85 00 00 lw r5,(r4+0) <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 8007164: 34 01 00 02 mvi r1,2 return 0; 8007168: 34 0c 00 00 mvi r12,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) 800716c: 48 a1 00 2b bg r5,r1,8007218 <== NEVER TAKEN return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 8007170: 78 0b 08 02 mvhi r11,0x802 8007174: 39 6b 81 e8 ori r11,r11,0x81e8 8007178: 29 61 00 00 lw r1,(r11+0) rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { int local_errno = 0; 800717c: 34 0e 00 00 mvi r14,0 /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 8007180: 28 21 00 08 lw r1,(r1+8) 8007184: f8 00 2f 5e calli 8012efc status = error_flag & ~RTEMS_ERROR_MASK; 8007188: 78 03 08 02 mvhi r3,0x802 800718c: 38 63 5b ec ori r3,r3,0x5bec 8007190: 28 62 00 00 lw r2,(r3+0) if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 8007194: 78 01 40 00 mvhi r1,0x4000 8007198: a1 a1 08 00 and r1,r13,r1 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 800719c: a1 a2 68 00 and r13,r13,r2 if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 80071a0: 5c 20 00 34 bne r1,r0,8007270 #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 80071a4: 29 61 00 00 lw r1,(r11+0) 80071a8: ba 00 10 00 mv r2,r16 80071ac: b9 e0 18 00 mv r3,r15 80071b0: 28 21 00 0c lw r1,(r1+12) 80071b4: f8 00 46 18 calli 8018a14 80071b8: b8 20 60 00 mv r12,r1 if (status) 80071bc: 5d a0 00 21 bne r13,r0,8007240 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 80071c0: 45 c0 00 0d be r14,r0,80071f4 if ((local_errno > 0) && *strerror(local_errno)) 80071c4: 4c 0e 00 05 bge r0,r14,80071d8 80071c8: b9 c0 08 00 mv r1,r14 80071cc: f8 00 34 2f calli 8014288 80071d0: 40 21 00 00 lbu r1,(r1+0) 80071d4: 5c 20 00 2a bne r1,r0,800727c <== ALWAYS TAKEN chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 80071d8: 29 61 00 00 lw r1,(r11+0) 80071dc: 78 02 08 02 mvhi r2,0x802 80071e0: 38 42 58 c8 ori r2,r2,0x58c8 80071e4: 28 21 00 0c lw r1,(r1+12) 80071e8: b9 c0 18 00 mv r3,r14 80071ec: f8 00 30 7c calli 80133dc 80071f0: b5 81 60 00 add r12,r12,r1 } chars_written += fprintf(stderr, "\n"); 80071f4: 29 61 00 00 lw r1,(r11+0) 80071f8: 78 02 08 02 mvhi r2,0x802 80071fc: 38 42 50 18 ori r2,r2,0x5018 8007200: 28 21 00 0c lw r1,(r1+12) 8007204: f8 00 30 76 calli 80133dc (void) fflush(stderr); 8007208: 29 62 00 00 lw r2,(r11+0) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 800720c: b4 2c 60 00 add r12,r1,r12 (void) fflush(stderr); 8007210: 28 41 00 0c lw r1,(r2+12) 8007214: f8 00 2f 3a calli 8012efc return chars_written; } 8007218: b9 80 08 00 mv r1,r12 800721c: 2b 9d 00 04 lw ra,(sp+4) 8007220: 2b 8b 00 1c lw r11,(sp+28) 8007224: 2b 8c 00 18 lw r12,(sp+24) 8007228: 2b 8d 00 14 lw r13,(sp+20) 800722c: 2b 8e 00 10 lw r14,(sp+16) 8007230: 2b 8f 00 0c lw r15,(sp+12) 8007234: 2b 90 00 08 lw r16,(sp+8) 8007238: 37 9c 00 1c addi sp,sp,28 800723c: c3 a0 00 00 ret chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 8007240: 29 62 00 00 lw r2,(r11+0) 8007244: b9 a0 08 00 mv r1,r13 8007248: 28 4d 00 0c lw r13,(r2+12) 800724c: fb ff ff a3 calli 80070d8 8007250: 78 02 08 02 mvhi r2,0x802 8007254: b8 20 18 00 mv r3,r1 8007258: 38 42 58 a8 ori r2,r2,0x58a8 800725c: b9 a0 08 00 mv r1,r13 8007260: f8 00 30 5f calli 80133dc #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 8007264: b5 81 60 00 add r12,r12,r1 fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 8007268: 45 c0 ff e3 be r14,r0,80071f4 800726c: e3 ff ff d6 bi 80071c4 (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; 8007270: f8 00 2e 22 calli 8012af8 <__errno> 8007274: 28 2e 00 00 lw r14,(r1+0) 8007278: e3 ff ff cb bi 80071a4 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)); 800727c: 29 62 00 00 lw r2,(r11+0) 8007280: b9 c0 08 00 mv r1,r14 8007284: 28 4d 00 0c lw r13,(r2+12) 8007288: f8 00 34 00 calli 8014288 800728c: 78 02 08 02 mvhi r2,0x802 8007290: b8 20 18 00 mv r3,r1 8007294: 38 42 58 b8 ori r2,r2,0x58b8 8007298: b9 a0 08 00 mv r1,r13 800729c: f8 00 30 50 calli 80133dc 80072a0: b5 81 60 00 add r12,r12,r1 80072a4: e3 ff ff d4 bi 80071f4 =============================================================================== 08001d7c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 8001d7c: 37 9c ff d4 addi sp,sp,-44 8001d80: 5b 8b 00 2c sw (sp+44),r11 8001d84: 5b 8c 00 28 sw (sp+40),r12 8001d88: 5b 8d 00 24 sw (sp+36),r13 8001d8c: 5b 8e 00 20 sw (sp+32),r14 8001d90: 5b 8f 00 1c sw (sp+28),r15 8001d94: 5b 90 00 18 sw (sp+24),r16 8001d98: 5b 91 00 14 sw (sp+20),r17 8001d9c: 5b 92 00 10 sw (sp+16),r18 8001da0: 5b 93 00 0c sw (sp+12),r19 8001da4: 5b 94 00 08 sw (sp+8),r20 8001da8: 5b 9d 00 04 sw (sp+4),ra int c; unsigned int i = 0; unsigned int limit = INT_MAX; 8001dac: 78 03 08 01 mvhi r3,0x801 8001db0: 38 63 3d e4 ori r3,r3,0x3de4 8001db4: 28 70 00 00 lw r16,(r3+0) int sign = 0; int d; for (;;) { c = getc(fp); 8001db8: 78 13 08 01 mvhi r19,0x801 limit++; continue; } sign = 1; } if (!isdigit(c)) 8001dbc: 78 0e 08 01 mvhi r14,0x801 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 8001dc0: b8 20 58 00 mv r11,r1 8001dc4: b8 40 a0 00 mv r20,r2 int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; 8001dc8: 34 0f 00 00 mvi r15,0 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 8001dcc: 34 0d 00 00 mvi r13,0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8001dd0: 3a 73 51 78 ori r19,r19,0x5178 if (c == ':') 8001dd4: 34 11 00 3a mvi r17,58 limit++; continue; } sign = 1; } if (!isdigit(c)) 8001dd8: 39 ce 51 70 ori r14,r14,0x5170 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 8001ddc: 34 12 00 2d mvi r18,45 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8001de0: 29 63 00 04 lw r3,(r11+4) 8001de4: 34 63 ff ff addi r3,r3,-1 8001de8: 59 63 00 04 sw (r11+4),r3 8001dec: 4c 60 00 1a bge r3,r0,8001e54 <== ALWAYS TAKEN 8001df0: 2a 61 00 00 lw r1,(r19+0) <== NOT EXECUTED 8001df4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8001df8: f8 00 31 c2 calli 800e500 <__srget_r> <== NOT EXECUTED 8001dfc: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if (c == ':') 8001e00: 45 91 00 1a be r12,r17,8001e68 <== NOT EXECUTED break; if (sign == 0) { 8001e04: 5d e0 00 03 bne r15,r0,8001e10 if (c == '-') { sign = -1; limit++; continue; } sign = 1; 8001e08: 34 0f 00 01 mvi r15,1 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 8001e0c: 45 92 00 32 be r12,r18,8001ed4 limit++; continue; } sign = 1; } if (!isdigit(c)) 8001e10: 29 c1 00 00 lw r1,(r14+0) 8001e14: b4 2c 08 00 add r1,r1,r12 8001e18: 40 21 00 01 lbu r1,(r1+1) 8001e1c: 20 21 00 04 andi r1,r1,0x4 8001e20: 44 20 00 1f be r1,r0,8001e9c return 0; d = c - '0'; if ((i > (limit / 10)) 8001e24: ba 00 08 00 mv r1,r16 8001e28: 34 02 00 0a mvi r2,10 8001e2c: f8 00 43 75 calli 8012c00 <__udivsi3> 8001e30: 55 a1 00 1b bgu r13,r1,8001e9c <== NEVER TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 8001e34: 35 8c ff d0 addi r12,r12,-48 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 8001e38: 45 a1 00 14 be r13,r1,8001e88 <== NEVER TAKEN return 0; i = i * 10 + d; 8001e3c: b5 ad 68 00 add r13,r13,r13 8001e40: b5 ad 18 00 add r3,r13,r13 8001e44: b4 63 18 00 add r3,r3,r3 8001e48: b5 a3 68 00 add r13,r13,r3 8001e4c: b5 8d 68 00 add r13,r12,r13 8001e50: e3 ff ff e4 bi 8001de0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8001e54: 29 63 00 00 lw r3,(r11+0) 8001e58: 40 6c 00 00 lbu r12,(r3+0) 8001e5c: 34 61 00 01 addi r1,r3,1 8001e60: 59 61 00 00 sw (r11+0),r1 if (c == ':') 8001e64: 5d 91 ff e8 bne r12,r17,8001e04 || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) return 0; 8001e68: 34 01 00 00 mvi r1,0 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 8001e6c: 45 e0 00 0d be r15,r0,8001ea0 <== NEVER TAKEN return 0; *val = i * sign; 8001e70: b9 e0 08 00 mv r1,r15 8001e74: b9 a0 10 00 mv r2,r13 8001e78: f8 00 42 fd calli 8012a6c <__mulsi3> 8001e7c: 5a 81 00 00 sw (r20+0),r1 return 1; 8001e80: 34 01 00 01 mvi r1,1 8001e84: e0 00 00 07 bi 8001ea0 } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 8001e88: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8001e8c: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 8001e90: f8 00 43 6c calli 8012c40 <__umodsi3> <== NOT EXECUTED 8001e94: 55 81 00 02 bgu r12,r1,8001e9c <== NOT EXECUTED 8001e98: e3 ff ff e9 bi 8001e3c <== NOT EXECUTED return 0; 8001e9c: 34 01 00 00 mvi r1,0 } if (sign == 0) return 0; *val = i * sign; return 1; } 8001ea0: 2b 9d 00 04 lw ra,(sp+4) 8001ea4: 2b 8b 00 2c lw r11,(sp+44) 8001ea8: 2b 8c 00 28 lw r12,(sp+40) 8001eac: 2b 8d 00 24 lw r13,(sp+36) 8001eb0: 2b 8e 00 20 lw r14,(sp+32) 8001eb4: 2b 8f 00 1c lw r15,(sp+28) 8001eb8: 2b 90 00 18 lw r16,(sp+24) 8001ebc: 2b 91 00 14 lw r17,(sp+20) 8001ec0: 2b 92 00 10 lw r18,(sp+16) 8001ec4: 2b 93 00 0c lw r19,(sp+12) 8001ec8: 2b 94 00 08 lw r20,(sp+8) 8001ecc: 37 9c 00 2c addi sp,sp,44 8001ed0: c3 a0 00 00 ret if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 8001ed4: 36 10 00 01 addi r16,r16,1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 8001ed8: 34 0f ff ff mvi r15,-1 limit++; continue; 8001edc: e3 ff ff c1 bi 8001de0 =============================================================================== 08001ee0 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 8001ee0: 37 9c ff d8 addi sp,sp,-40 8001ee4: 5b 8b 00 28 sw (sp+40),r11 8001ee8: 5b 8c 00 24 sw (sp+36),r12 8001eec: 5b 8d 00 20 sw (sp+32),r13 8001ef0: 5b 8e 00 1c sw (sp+28),r14 8001ef4: 5b 8f 00 18 sw (sp+24),r15 8001ef8: 5b 90 00 14 sw (sp+20),r16 8001efc: 5b 91 00 10 sw (sp+16),r17 8001f00: 5b 92 00 0c sw (sp+12),r18 8001f04: 5b 93 00 08 sw (sp+8),r19 8001f08: 5b 9d 00 04 sw (sp+4),ra 8001f0c: b8 60 58 00 mv r11,r3 int c; *name = *bufp; 8001f10: 28 63 00 00 lw r3,(r3+0) for (;;) { c = getc(fp); 8001f14: 78 12 08 01 mvhi r18,0x801 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 8001f18: b8 20 60 00 mv r12,r1 8001f1c: b8 80 68 00 mv r13,r4 8001f20: b8 a0 98 00 mv r19,r5 int c; *name = *bufp; 8001f24: 58 43 00 00 sw (r2+0),r3 for (;;) { c = getc(fp); 8001f28: 3a 52 51 78 ori r18,r18,0x5178 if (c == ':') { 8001f2c: 34 0e 00 3a mvi r14,58 if (nlFlag) return 0; break; } if (c == '\n') { 8001f30: 34 0f 00 0a mvi r15,10 if (!nlFlag) return 0; break; } if (c == EOF) 8001f34: 34 10 ff ff mvi r16,-1 return 0; if (*nleft < 2) 8001f38: 34 11 00 01 mvi r17,1 { int c; *name = *bufp; for (;;) { c = getc(fp); 8001f3c: 29 81 00 04 lw r1,(r12+4) 8001f40: 34 21 ff ff addi r1,r1,-1 8001f44: 59 81 00 04 sw (r12+4),r1 8001f48: 4c 20 00 12 bge r1,r0,8001f90 8001f4c: 2a 41 00 00 lw r1,(r18+0) 8001f50: b9 80 10 00 mv r2,r12 8001f54: f8 00 31 6b calli 800e500 <__srget_r> if (c == ':') { 8001f58: 44 2e 00 13 be r1,r14,8001fa4 <== NEVER TAKEN if (nlFlag) return 0; break; } if (c == '\n') { 8001f5c: 44 2f 00 2b be r1,r15,8002008 if (!nlFlag) return 0; break; } if (c == EOF) 8001f60: 44 30 00 1d be r1,r16,8001fd4 return 0; if (*nleft < 2) 8001f64: 29 a2 00 00 lw r2,(r13+0) 8001f68: 52 22 00 1b bgeu r17,r2,8001fd4 <== NEVER TAKEN return 0; **bufp = c; 8001f6c: 29 62 00 00 lw r2,(r11+0) 8001f70: 30 41 00 00 sb (r2+0),r1 ++(*bufp); 8001f74: 29 62 00 00 lw r2,(r11+0) --(*nleft); 8001f78: 29 a1 00 00 lw r1,(r13+0) if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 8001f7c: 34 42 00 01 addi r2,r2,1 8001f80: 59 62 00 00 sw (r11+0),r2 --(*nleft); 8001f84: 34 21 ff ff addi r1,r1,-1 8001f88: 59 a1 00 00 sw (r13+0),r1 } 8001f8c: e3 ff ff ec bi 8001f3c { int c; *name = *bufp; for (;;) { c = getc(fp); 8001f90: 29 81 00 00 lw r1,(r12+0) 8001f94: 34 22 00 01 addi r2,r1,1 8001f98: 40 21 00 00 lbu r1,(r1+0) 8001f9c: 59 82 00 00 sw (r12+0),r2 if (c == ':') { 8001fa0: 5c 2e ff ef bne r1,r14,8001f5c if (nlFlag) return 0; 8001fa4: 34 01 00 00 mvi r1,0 *name = *bufp; for (;;) { c = getc(fp); if (c == ':') { if (nlFlag) 8001fa8: 5e 60 00 0c bne r19,r0,8001fd8 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 8001fac: 29 62 00 00 lw r2,(r11+0) ++(*bufp); --(*nleft); return 1; 8001fb0: 34 01 00 01 mvi r1,1 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 8001fb4: 30 40 00 00 sb (r2+0),r0 ++(*bufp); 8001fb8: 29 63 00 00 lw r3,(r11+0) --(*nleft); 8001fbc: 29 a2 00 00 lw r2,(r13+0) **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 8001fc0: 34 63 00 01 addi r3,r3,1 8001fc4: 59 63 00 00 sw (r11+0),r3 --(*nleft); 8001fc8: 34 42 ff ff addi r2,r2,-1 8001fcc: 59 a2 00 00 sw (r13+0),r2 return 1; 8001fd0: e0 00 00 02 bi 8001fd8 break; } if (c == EOF) return 0; if (*nleft < 2) return 0; 8001fd4: 34 01 00 00 mvi r1,0 } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 8001fd8: 2b 9d 00 04 lw ra,(sp+4) 8001fdc: 2b 8b 00 28 lw r11,(sp+40) 8001fe0: 2b 8c 00 24 lw r12,(sp+36) 8001fe4: 2b 8d 00 20 lw r13,(sp+32) 8001fe8: 2b 8e 00 1c lw r14,(sp+28) 8001fec: 2b 8f 00 18 lw r15,(sp+24) 8001ff0: 2b 90 00 14 lw r16,(sp+20) 8001ff4: 2b 91 00 10 lw r17,(sp+16) 8001ff8: 2b 92 00 0c lw r18,(sp+12) 8001ffc: 2b 93 00 08 lw r19,(sp+8) 8002000: 37 9c 00 28 addi sp,sp,40 8002004: c3 a0 00 00 ret return 0; break; } if (c == '\n') { if (!nlFlag) return 0; 8002008: 34 01 00 00 mvi r1,0 if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 800200c: 5e 60 ff e8 bne r19,r0,8001fac 8002010: e3 ff ff f2 bi 8001fd8 =============================================================================== 08002014 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 8002014: 37 9c ff d8 addi sp,sp,-40 8002018: 5b 8b 00 18 sw (sp+24),r11 800201c: 5b 8c 00 14 sw (sp+20),r12 8002020: 5b 8d 00 10 sw (sp+16),r13 8002024: 5b 8e 00 0c sw (sp+12),r14 8002028: 5b 8f 00 08 sw (sp+8),r15 800202c: 5b 9d 00 04 sw (sp+4),ra int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8002030: 37 8c 00 20 addi r12,sp,32 8002034: 37 8b 00 1c addi r11,sp,28 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 8002038: 5b 83 00 20 sw (sp+32),r3 800203c: 5b 84 00 1c sw (sp+28),r4 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8002040: b9 80 18 00 mv r3,r12 8002044: b9 60 20 00 mv r4,r11 8002048: 34 05 00 00 mvi r5,0 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 800204c: b8 20 70 00 mv r14,r1 8002050: b8 40 78 00 mv r15,r2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8002054: fb ff ff a3 calli 8001ee0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; 8002058: 34 0d 00 00 mvi r13,0 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 800205c: 5c 20 00 0a bne r1,r0,8002084 grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 8002060: b9 a0 08 00 mv r1,r13 8002064: 2b 9d 00 04 lw ra,(sp+4) 8002068: 2b 8b 00 18 lw r11,(sp+24) 800206c: 2b 8c 00 14 lw r12,(sp+20) 8002070: 2b 8d 00 10 lw r13,(sp+16) 8002074: 2b 8e 00 0c lw r14,(sp+12) 8002078: 2b 8f 00 08 lw r15,(sp+8) 800207c: 37 9c 00 28 addi sp,sp,40 8002080: c3 a0 00 00 ret int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 8002084: b9 c0 08 00 mv r1,r14 8002088: 35 e2 00 04 addi r2,r15,4 800208c: b9 80 18 00 mv r3,r12 8002090: b9 60 20 00 mv r4,r11 8002094: 34 05 00 00 mvi r5,0 8002098: fb ff ff 92 calli 8001ee0 800209c: 44 20 ff f1 be r1,r0,8002060 <== NEVER TAKEN || !scanInt(fp, &grgid) 80020a0: b9 c0 08 00 mv r1,r14 80020a4: 37 82 00 28 addi r2,sp,40 80020a8: fb ff ff 35 calli 8001d7c 80020ac: 44 20 ff ed be r1,r0,8002060 <== NEVER TAKEN || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 80020b0: b9 c0 08 00 mv r1,r14 80020b4: 37 82 00 24 addi r2,sp,36 80020b8: b9 80 18 00 mv r3,r12 80020bc: b9 60 20 00 mv r4,r11 80020c0: 34 05 00 01 mvi r5,1 80020c4: fb ff ff 87 calli 8001ee0 80020c8: 44 20 ff e6 be r1,r0,8002060 <== NEVER TAKEN return 0; grp->gr_gid = grgid; 80020cc: 2b 81 00 28 lw r1,(sp+40) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 80020d0: 2b 85 00 24 lw r5,(sp+36) 80020d4: 34 03 00 17 mvi r3,23 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; 80020d8: 0d e1 00 08 sh (r15+8),r1 /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 80020dc: 40 a1 00 00 lbu r1,(r5+0) 80020e0: 44 20 00 0c be r1,r0,8002110 <== NEVER TAKEN 80020e4: b8 a0 10 00 mv r2,r5 80020e8: 34 03 00 01 mvi r3,1 80020ec: 34 42 00 01 addi r2,r2,1 if(*cp == ',') memcount++; 80020f0: 64 24 00 2c cmpei r4,r1,44 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 80020f4: 40 41 00 00 lbu r1,(r2+0) if(*cp == ',') memcount++; 80020f8: b4 64 18 00 add r3,r3,r4 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 80020fc: 5c 20 ff fc bne r1,r0,80020ec 8002100: 34 63 00 01 addi r3,r3,1 8002104: b4 63 18 00 add r3,r3,r3 8002108: b4 63 18 00 add r3,r3,r3 800210c: 34 63 00 0f addi r3,r3,15 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 8002110: 2b 81 00 1c lw r1,(sp+28) return 0; 8002114: 34 0d 00 00 mvi r13,0 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 8002118: 54 61 ff d2 bgu r3,r1,8002060 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 800211c: 2b 84 00 20 lw r4,(sp+32) 8002120: 34 01 ff f0 mvi r1,-16 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 8002124: 34 03 00 04 mvi r3,4 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 8002128: 34 84 00 0f addi r4,r4,15 800212c: a0 81 20 00 and r4,r4,r1 8002130: 59 e4 00 0c sw (r15+12),r4 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 8002134: 58 85 00 00 sw (r4+0),r5 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 8002138: 2b 81 00 24 lw r1,(sp+36) 800213c: 40 22 00 00 lbu r2,(r1+0) 8002140: 44 40 00 0b be r2,r0,800216c <== NEVER TAKEN } /* * Extract a single group record from the database */ static int scangr( 8002144: 34 21 00 01 addi r1,r1,1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 8002148: 34 03 00 01 mvi r3,1 if(*cp == ',') { 800214c: 34 04 00 2c mvi r4,44 8002150: 44 44 00 0b be r2,r4,800217c /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 8002154: 40 22 00 00 lbu r2,(r1+0) 8002158: 34 21 00 01 addi r1,r1,1 800215c: 5c 40 ff fd bne r2,r0,8002150 8002160: 29 e4 00 0c lw r4,(r15+12) 8002164: b4 63 18 00 add r3,r3,r3 8002168: b4 63 18 00 add r3,r3,r3 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 800216c: b4 83 18 00 add r3,r4,r3 8002170: 58 60 00 00 sw (r3+0),r0 return 1; 8002174: 34 0d 00 01 mvi r13,1 8002178: e3 ff ff ba bi 8002060 * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 800217c: 30 20 ff ff sb (r1+-1),r0 grp->gr_mem[memcount++] = cp + 1; 8002180: 29 e5 00 0c lw r5,(r15+12) 8002184: b4 63 10 00 add r2,r3,r3 8002188: b4 42 10 00 add r2,r2,r2 800218c: b4 a2 10 00 add r2,r5,r2 8002190: 58 41 00 00 sw (r2+0),r1 8002194: 34 63 00 01 addi r3,r3,1 8002198: e3 ff ff ef bi 8002154 =============================================================================== 0800219c : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 800219c: 37 9c ff d8 addi sp,sp,-40 80021a0: 5b 8b 00 18 sw (sp+24),r11 80021a4: 5b 8c 00 14 sw (sp+20),r12 80021a8: 5b 8d 00 10 sw (sp+16),r13 80021ac: 5b 8e 00 0c sw (sp+12),r14 80021b0: 5b 8f 00 08 sw (sp+8),r15 80021b4: 5b 9d 00 04 sw (sp+4),ra int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 80021b8: 37 8c 00 20 addi r12,sp,32 80021bc: 37 8b 00 1c addi r11,sp,28 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 80021c0: 5b 83 00 20 sw (sp+32),r3 80021c4: 5b 84 00 1c sw (sp+28),r4 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 80021c8: b9 80 18 00 mv r3,r12 80021cc: b9 60 20 00 mv r4,r11 80021d0: 34 05 00 00 mvi r5,0 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 80021d4: b8 20 68 00 mv r13,r1 80021d8: b8 40 70 00 mv r14,r2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 80021dc: fb ff ff 41 calli 8001ee0 || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; 80021e0: 34 0f 00 00 mvi r15,0 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 80021e4: 5c 20 00 0a bne r1,r0,800220c || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } 80021e8: b9 e0 08 00 mv r1,r15 80021ec: 2b 9d 00 04 lw ra,(sp+4) 80021f0: 2b 8b 00 18 lw r11,(sp+24) 80021f4: 2b 8c 00 14 lw r12,(sp+20) 80021f8: 2b 8d 00 10 lw r13,(sp+16) 80021fc: 2b 8e 00 0c lw r14,(sp+12) 8002200: 2b 8f 00 08 lw r15,(sp+8) 8002204: 37 9c 00 28 addi sp,sp,40 8002208: c3 a0 00 00 ret ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 800220c: b9 a0 08 00 mv r1,r13 8002210: 35 c2 00 04 addi r2,r14,4 8002214: b9 80 18 00 mv r3,r12 8002218: b9 60 20 00 mv r4,r11 800221c: 34 05 00 00 mvi r5,0 8002220: fb ff ff 30 calli 8001ee0 8002224: 44 20 ff f1 be r1,r0,80021e8 <== NEVER TAKEN || !scanInt(fp, &pwuid) 8002228: b9 a0 08 00 mv r1,r13 800222c: 37 82 00 28 addi r2,sp,40 8002230: fb ff fe d3 calli 8001d7c 8002234: 44 20 ff ed be r1,r0,80021e8 <== NEVER TAKEN || !scanInt(fp, &pwgid) 8002238: b9 a0 08 00 mv r1,r13 800223c: 37 82 00 24 addi r2,sp,36 8002240: fb ff fe cf calli 8001d7c 8002244: 44 20 ff e9 be r1,r0,80021e8 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 8002248: b9 a0 08 00 mv r1,r13 800224c: 35 c2 00 0c addi r2,r14,12 8002250: b9 80 18 00 mv r3,r12 8002254: b9 60 20 00 mv r4,r11 8002258: 34 05 00 00 mvi r5,0 800225c: fb ff ff 21 calli 8001ee0 8002260: 44 20 ff e2 be r1,r0,80021e8 <== NEVER TAKEN || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 8002264: b9 a0 08 00 mv r1,r13 8002268: 35 c2 00 10 addi r2,r14,16 800226c: b9 80 18 00 mv r3,r12 8002270: b9 60 20 00 mv r4,r11 8002274: 34 05 00 00 mvi r5,0 8002278: fb ff ff 1a calli 8001ee0 800227c: 44 20 ff db be r1,r0,80021e8 <== NEVER TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 8002280: b9 a0 08 00 mv r1,r13 8002284: 35 c2 00 14 addi r2,r14,20 8002288: b9 80 18 00 mv r3,r12 800228c: b9 60 20 00 mv r4,r11 8002290: 34 05 00 00 mvi r5,0 8002294: fb ff ff 13 calli 8001ee0 8002298: 44 20 ff d4 be r1,r0,80021e8 <== NEVER TAKEN || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 800229c: b9 a0 08 00 mv r1,r13 80022a0: 35 c2 00 18 addi r2,r14,24 80022a4: b9 80 18 00 mv r3,r12 80022a8: b9 60 20 00 mv r4,r11 80022ac: 34 05 00 01 mvi r5,1 80022b0: fb ff ff 0c calli 8001ee0 80022b4: 44 20 ff cd be r1,r0,80021e8 return 0; pwd->pw_uid = pwuid; 80022b8: 2b 81 00 28 lw r1,(sp+40) pwd->pw_gid = pwgid; return 1; 80022bc: 34 0f 00 01 mvi r15,1 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 80022c0: 0d c1 00 08 sh (r14+8),r1 pwd->pw_gid = pwgid; 80022c4: 2b 81 00 24 lw r1,(sp+36) 80022c8: 0d c1 00 0a sh (r14+10),r1 return 1; 80022cc: e3 ff ff c7 bi 80021e8 =============================================================================== 08005f44 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 8005f44: 37 9c ff f4 addi sp,sp,-12 8005f48: 5b 8b 00 0c sw (sp+12),r11 8005f4c: 5b 8c 00 08 sw (sp+8),r12 8005f50: 5b 9d 00 04 sw (sp+4),ra int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 8005f54: 28 43 00 3c lw r3,(r2+60) /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 8005f58: b8 20 60 00 mv r12,r1 8005f5c: b8 40 58 00 mv r11,r2 int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 8005f60: 20 61 0e 78 andi r1,r3,0xe78 8005f64: 5c 20 00 0a bne r1,r0,8005f8c <== ALWAYS TAKEN rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 8005f68: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8005f6c: fb ff ff 80 calli 8005d6c <== NOT EXECUTED 8005f70: b8 20 60 00 mv r12,r1 <== NOT EXECUTED } return i; } 8005f74: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8005f78: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8005f7c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8005f80: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8005f84: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8005f88: c3 a0 00 00 ret <== 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); 8005f8c: 28 41 00 18 lw r1,(r2+24) 8005f90: 34 03 00 00 mvi r3,0 8005f94: 34 02 00 00 mvi r2,0 8005f98: f8 00 06 28 calli 8007838 i = iproc (c, tty); 8005f9c: b9 60 10 00 mv r2,r11 8005fa0: b9 80 08 00 mv r1,r12 8005fa4: fb ff ff 72 calli 8005d6c 8005fa8: b8 20 60 00 mv r12,r1 rtems_semaphore_release (tty->osem); 8005fac: 29 61 00 18 lw r1,(r11+24) 8005fb0: f8 00 06 7e calli 80079a8 } else { i = iproc (c, tty); } return i; } 8005fb4: b9 80 08 00 mv r1,r12 8005fb8: 2b 9d 00 04 lw ra,(sp+4) 8005fbc: 2b 8b 00 0c lw r11,(sp+12) 8005fc0: 2b 8c 00 08 lw r12,(sp+8) 8005fc4: 37 9c 00 0c addi sp,sp,12 8005fc8: c3 a0 00 00 ret =============================================================================== 0800553c : #include int statvfs (const char *path, struct statvfs *sb) { 800553c: 37 9c ff dc addi sp,sp,-36 8005540: 5b 8b 00 10 sw (sp+16),r11 8005544: 5b 8c 00 0c sw (sp+12),r12 8005548: 5b 8d 00 08 sw (sp+8),r13 800554c: 5b 9d 00 04 sw (sp+4),ra 8005550: b8 20 60 00 mv r12,r1 8005554: b8 40 58 00 mv r11,r2 * 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 ) ) 8005558: 37 8d 00 14 addi r13,sp,20 800555c: f8 00 2e cd calli 8011090 8005560: b8 20 10 00 mv r2,r1 8005564: 34 03 00 00 mvi r3,0 8005568: b9 80 08 00 mv r1,r12 800556c: b9 a0 20 00 mv r4,r13 8005570: 34 05 00 01 mvi r5,1 8005574: fb ff f9 b5 calli 8003c48 return -1; 8005578: 34 0c ff ff mvi r12,-1 * 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 ) ) 800557c: 5c 20 00 18 bne r1,r0,80055dc <== NEVER TAKEN return -1; mt_entry = loc.mt_entry; 8005580: 2b 81 00 24 lw r1,(sp+36) fs_mount_root = &mt_entry->mt_fs_root; memset (sb, 0, sizeof (struct statvfs)); 8005584: 59 60 00 00 sw (r11+0),r0 8005588: 59 60 00 04 sw (r11+4),r0 800558c: 59 60 00 08 sw (r11+8),r0 8005590: 59 60 00 0c sw (r11+12),r0 8005594: 59 60 00 10 sw (r11+16),r0 8005598: 59 60 00 14 sw (r11+20),r0 800559c: 59 60 00 18 sw (r11+24),r0 80055a0: 59 60 00 1c sw (r11+28),r0 80055a4: 59 60 00 20 sw (r11+32),r0 80055a8: 59 60 00 24 sw (r11+36),r0 80055ac: 59 60 00 28 sw (r11+40),r0 80055b0: 59 60 00 2c sw (r11+44),r0 80055b4: 59 60 00 30 sw (r11+48),r0 80055b8: 59 60 00 34 sw (r11+52),r0 result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 80055bc: 28 23 00 28 lw r3,(r1+40) 80055c0: b9 60 10 00 mv r2,r11 80055c4: 34 21 00 1c addi r1,r1,28 80055c8: 28 63 00 44 lw r3,(r3+68) 80055cc: d8 60 00 00 call r3 80055d0: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &loc ); 80055d4: b9 a0 08 00 mv r1,r13 80055d8: fb ff f9 f6 calli 8003db0 return result; } 80055dc: b9 80 08 00 mv r1,r12 80055e0: 2b 9d 00 04 lw ra,(sp+4) 80055e4: 2b 8b 00 10 lw r11,(sp+16) 80055e8: 2b 8c 00 0c lw r12,(sp+12) 80055ec: 2b 8d 00 08 lw r13,(sp+8) 80055f0: 37 9c 00 24 addi sp,sp,36 80055f4: c3 a0 00 00 ret =============================================================================== 08003d88 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 8003d88: 37 9c ff f4 addi sp,sp,-12 8003d8c: 5b 8b 00 0c sw (sp+12),r11 8003d90: 5b 8c 00 08 sw (sp+8),r12 8003d94: 5b 9d 00 04 sw (sp+4),ra /* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; 8003d98: 28 23 01 20 lw r3,(r1+288) if ( this_reent ) { 8003d9c: 44 60 00 0c be r3,r0,8003dcc <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 8003da0: 78 0b 08 01 mvhi r11,0x801 8003da4: 39 6b 59 a8 ori r11,r11,0x59a8 8003da8: 29 64 00 0c lw r4,(r11+12) _Thread_Executing->libc_reent = this_reent; _fwalk (t->libc_reent, sync_wrapper); 8003dac: 78 02 08 00 mvhi r2,0x800 8003db0: 38 42 3d e0 ori r2,r2,0x3de0 * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; if ( this_reent ) { current_reent = _Thread_Executing->libc_reent; 8003db4: 28 8c 01 20 lw r12,(r4+288) _Thread_Executing->libc_reent = this_reent; 8003db8: 58 83 01 20 sw (r4+288),r3 _fwalk (t->libc_reent, sync_wrapper); 8003dbc: 28 21 01 20 lw r1,(r1+288) 8003dc0: f8 00 27 a9 calli 800dc64 <_fwalk> _Thread_Executing->libc_reent = current_reent; 8003dc4: 29 61 00 0c lw r1,(r11+12) 8003dc8: 58 2c 01 20 sw (r1+288),r12 } } 8003dcc: 2b 9d 00 04 lw ra,(sp+4) 8003dd0: 2b 8b 00 0c lw r11,(sp+12) 8003dd4: 2b 8c 00 08 lw r12,(sp+8) 8003dd8: 37 9c 00 0c addi sp,sp,12 8003ddc: c3 a0 00 00 ret =============================================================================== 080047c4 : int tcsetattr( int fd, int opt, struct termios *tp ) { 80047c4: 37 9c ff f4 addi sp,sp,-12 80047c8: 5b 8b 00 0c sw (sp+12),r11 80047cc: 5b 8c 00 08 sw (sp+8),r12 80047d0: 5b 9d 00 04 sw (sp+4),ra 80047d4: b8 20 60 00 mv r12,r1 80047d8: b8 60 58 00 mv r11,r3 switch (opt) { 80047dc: 44 40 00 12 be r2,r0,8004824 80047e0: 34 03 00 01 mvi r3,1 80047e4: 44 43 00 0a be r2,r3,800480c default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 80047e8: f8 00 2f 03 calli 80103f4 <__errno> 80047ec: 34 02 00 86 mvi r2,134 80047f0: 58 22 00 00 sw (r1+0),r2 80047f4: 34 01 ff ff mvi r1,-1 * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 80047f8: 2b 9d 00 04 lw ra,(sp+4) 80047fc: 2b 8b 00 0c lw r11,(sp+12) 8004800: 2b 8c 00 08 lw r12,(sp+8) 8004804: 37 9c 00 0c addi sp,sp,12 8004808: c3 a0 00 00 ret switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 800480c: 34 02 00 03 mvi r2,3 8004810: 34 03 00 00 mvi r3,0 8004814: f8 00 23 00 calli 800d414 8004818: b8 20 10 00 mv r2,r1 return -1; 800481c: 34 01 ff ff mvi r1,-1 switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 8004820: 48 02 ff f6 bg r0,r2,80047f8 <== NEVER TAKEN return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 8004824: b9 80 08 00 mv r1,r12 8004828: 34 02 00 02 mvi r2,2 800482c: b9 60 18 00 mv r3,r11 8004830: f8 00 22 f9 calli 800d414 } } 8004834: 2b 9d 00 04 lw ra,(sp+4) 8004838: 2b 8b 00 0c lw r11,(sp+12) 800483c: 2b 8c 00 08 lw r12,(sp+8) 8004840: 37 9c 00 0c addi sp,sp,12 8004844: c3 a0 00 00 ret =============================================================================== 08003b0c : #include int unlink( const char *path ) { 8003b0c: 37 9c ff bc addi sp,sp,-68 8003b10: 5b 8b 00 18 sw (sp+24),r11 8003b14: 5b 8c 00 14 sw (sp+20),r12 8003b18: 5b 8d 00 10 sw (sp+16),r13 8003b1c: 5b 8e 00 0c sw (sp+12),r14 8003b20: 5b 8f 00 08 sw (sp+8),r15 8003b24: 5b 9d 00 04 sw (sp+4),ra 8003b28: b8 20 68 00 mv r13,r1 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 8003b2c: fb ff fa ff calli 8002728 if ( parentpathlen == 0 ) 8003b30: 5c 20 00 40 bne r1,r0,8003c30 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 8003b34: 37 8c 00 30 addi r12,sp,48 8003b38: b9 a0 08 00 mv r1,r13 8003b3c: 37 82 00 44 addi r2,sp,68 8003b40: b9 80 18 00 mv r3,r12 8003b44: fb ff ff ba calli 8003a2c 8003b48: 34 0b 00 00 mvi r11,0 const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 8003b4c: 34 0f 00 00 mvi r15,0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 8003b50: 2b 82 00 30 lw r2,(sp+48) name = path + parentpathlen; 8003b54: b5 ab 58 00 add r11,r13,r11 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8003b58: b9 60 08 00 mv r1,r11 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 8003b5c: 5b 82 00 1c sw (sp+28),r2 8003b60: 2b 82 00 34 lw r2,(sp+52) 8003b64: 5b 82 00 20 sw (sp+32),r2 8003b68: 2b 82 00 38 lw r2,(sp+56) 8003b6c: 5b 82 00 24 sw (sp+36),r2 8003b70: 2b 82 00 3c lw r2,(sp+60) 8003b74: 5b 82 00 28 sw (sp+40),r2 8003b78: 2b 82 00 40 lw r2,(sp+64) 8003b7c: 5b 82 00 2c sw (sp+44),r2 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8003b80: f8 00 38 49 calli 8011ca4 8003b84: b8 20 10 00 mv r2,r1 8003b88: b9 60 08 00 mv r1,r11 8003b8c: fb ff fa fc calli 800277c 8003b90: b5 61 68 00 add r13,r11,r1 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8003b94: b9 a0 08 00 mv r1,r13 8003b98: f8 00 38 43 calli 8011ca4 8003b9c: 37 8b 00 1c addi r11,sp,28 8003ba0: b8 20 10 00 mv r2,r1 8003ba4: 34 03 00 00 mvi r3,0 8003ba8: b9 a0 08 00 mv r1,r13 8003bac: b9 60 20 00 mv r4,r11 8003bb0: 34 05 00 00 mvi r5,0 8003bb4: fb ff fa 87 calli 80025d0 0, &loc, false ); if ( result != 0 ) { 8003bb8: 5c 20 00 19 bne r1,r0,8003c1c if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 8003bbc: 2b 82 00 28 lw r2,(sp+40) 8003bc0: b9 60 08 00 mv r1,r11 8003bc4: 28 42 00 10 lw r2,(r2+16) 8003bc8: d8 40 00 00 call r2 8003bcc: 34 02 00 01 mvi r2,1 8003bd0: 44 22 00 24 be r1,r2,8003c60 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 8003bd4: 2b 83 00 28 lw r3,(sp+40) 8003bd8: b9 80 08 00 mv r1,r12 8003bdc: b9 60 10 00 mv r2,r11 8003be0: 28 63 00 0c lw r3,(r3+12) 8003be4: d8 60 00 00 call r3 8003be8: b8 20 70 00 mv r14,r1 rtems_filesystem_freenode( &loc ); 8003bec: b9 60 08 00 mv r1,r11 8003bf0: fb ff fb 01 calli 80027f4 if ( free_parentloc ) 8003bf4: 5d e0 00 0c bne r15,r0,8003c24 rtems_filesystem_freenode( &parentloc ); return result; } 8003bf8: b9 c0 08 00 mv r1,r14 8003bfc: 2b 9d 00 04 lw ra,(sp+4) 8003c00: 2b 8b 00 18 lw r11,(sp+24) 8003c04: 2b 8c 00 14 lw r12,(sp+20) 8003c08: 2b 8d 00 10 lw r13,(sp+16) 8003c0c: 2b 8e 00 0c lw r14,(sp+12) 8003c10: 2b 8f 00 08 lw r15,(sp+8) 8003c14: 37 9c 00 44 addi sp,sp,68 8003c18: c3 a0 00 00 ret result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; 8003c1c: 34 0e ff ff mvi r14,-1 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 ) 8003c20: 45 e0 ff f6 be r15,r0,8003bf8 <== NEVER TAKEN result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 8003c24: b9 80 08 00 mv r1,r12 8003c28: fb ff fa f3 calli 80027f4 8003c2c: e3 ff ff f3 bi 8003bf8 parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 8003c30: b8 20 58 00 mv r11,r1 8003c34: 37 8c 00 30 addi r12,sp,48 8003c38: b9 a0 08 00 mv r1,r13 8003c3c: b9 60 10 00 mv r2,r11 8003c40: 34 03 00 02 mvi r3,2 8003c44: b9 80 20 00 mv r4,r12 8003c48: 34 05 00 00 mvi r5,0 8003c4c: fb ff fa 90 calli 800268c RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) return -1; 8003c50: 34 0e ff ff mvi r14,-1 else { result = rtems_filesystem_evaluate_path( path, parentpathlen, RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 8003c54: 5c 20 ff e9 bne r1,r0,8003bf8 <== NEVER TAKEN return -1; free_parentloc = true; 8003c58: 34 0f 00 01 mvi r15,1 8003c5c: e3 ff ff bd bi 8003b50 rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 8003c60: b9 60 08 00 mv r1,r11 8003c64: fb ff fa e4 calli 80027f4 if ( free_parentloc ) 8003c68: 45 e0 00 03 be r15,r0,8003c74 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 8003c6c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8003c70: fb ff fa e1 calli 80027f4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 8003c74: f8 00 33 a0 calli 8010af4 <__errno> 8003c78: 34 02 00 15 mvi r2,21 8003c7c: 58 22 00 00 sw (r1+0),r2 8003c80: 34 0e ff ff mvi r14,-1 8003c84: e3 ff ff dd bi 8003bf8 =============================================================================== 08003c40 : */ int unmount( const char *path ) { 8003c40: 37 9c ff dc addi sp,sp,-36 8003c44: 5b 8b 00 10 sw (sp+16),r11 8003c48: 5b 8c 00 0c sw (sp+12),r12 8003c4c: 5b 8d 00 08 sw (sp+8),r13 8003c50: 5b 9d 00 04 sw (sp+4),ra 8003c54: b8 20 58 00 mv r11,r1 * 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 ) ) 8003c58: 37 8c 00 14 addi r12,sp,20 8003c5c: f8 00 28 74 calli 800de2c 8003c60: b8 20 10 00 mv r2,r1 8003c64: 34 03 00 00 mvi r3,0 8003c68: b9 60 08 00 mv r1,r11 8003c6c: b9 80 20 00 mv r4,r12 8003c70: 34 05 00 01 mvi r5,1 8003c74: fb ff f9 a5 calli 8002308 8003c78: 5c 20 00 23 bne r1,r0,8003d04 return -1; mt_entry = loc.mt_entry; 8003c7c: 2b 8b 00 24 lw r11,(sp+36) /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ 8003c80: 2b 81 00 14 lw r1,(sp+20) 8003c84: 29 62 00 1c lw r2,(r11+28) 8003c88: 5c 41 00 27 bne r2,r1,8003d24 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 8003c8c: b9 80 08 00 mv r1,r12 8003c90: fb ff f9 f8 calli 8002470 * 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 ) 8003c94: 78 01 08 01 mvhi r1,0x801 8003c98: 38 21 61 a0 ori r1,r1,0x61a0 8003c9c: 28 21 00 00 lw r1,(r1+0) 8003ca0: 28 21 00 14 lw r1,(r1+20) 8003ca4: 44 2b 00 2d be r1,r11,8003d58 /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 8003ca8: 29 62 00 2c lw r2,(r11+44) 8003cac: 78 01 08 00 mvhi r1,0x800 8003cb0: 38 21 3c 34 ori r1,r1,0x3c34 8003cb4: fb ff fc a0 calli 8002f34 8003cb8: 5c 20 00 28 bne r1,r0,8003d58 * 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 ) 8003cbc: b9 60 08 00 mv r1,r11 8003cc0: fb ff fb 0c calli 80028f0 8003cc4: 34 02 00 01 mvi r2,1 8003cc8: 44 22 00 24 be r1,r2,8003d58 * 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 ) 8003ccc: 29 62 00 14 lw r2,(r11+20) 8003cd0: b9 60 08 00 mv r1,r11 return -1; 8003cd4: 34 0c ff ff mvi r12,-1 * 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 ) 8003cd8: 28 42 00 28 lw r2,(r2+40) 8003cdc: d8 40 00 00 call r2 8003ce0: b8 20 68 00 mv r13,r1 8003ce4: 44 20 00 28 be r1,r0,8003d84 <== ALWAYS TAKEN rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 8003ce8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8003cec: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003cf0: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8003cf4: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8003cf8: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8003cfc: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8003d00: c3 a0 00 00 ret <== NOT EXECUTED * 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 ) ) return -1; 8003d04: 34 0c ff ff mvi r12,-1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 8003d08: b9 80 08 00 mv r1,r12 8003d0c: 2b 9d 00 04 lw ra,(sp+4) 8003d10: 2b 8b 00 10 lw r11,(sp+16) 8003d14: 2b 8c 00 0c lw r12,(sp+12) 8003d18: 2b 8d 00 08 lw r13,(sp+8) 8003d1c: 37 9c 00 24 addi sp,sp,36 8003d20: c3 a0 00 00 ret /* * 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 ); 8003d24: b9 80 08 00 mv r1,r12 8003d28: fb ff f9 d2 calli 8002470 rtems_set_errno_and_return_minus_one( EACCES ); 8003d2c: f8 00 22 9a calli 800c794 <__errno> 8003d30: 34 02 00 0d mvi r2,13 8003d34: 34 0c ff ff mvi r12,-1 8003d38: 58 22 00 00 sw (r1+0),r2 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 8003d3c: b9 80 08 00 mv r1,r12 8003d40: 2b 9d 00 04 lw ra,(sp+4) 8003d44: 2b 8b 00 10 lw r11,(sp+16) 8003d48: 2b 8c 00 0c lw r12,(sp+12) 8003d4c: 2b 8d 00 08 lw r13,(sp+8) 8003d50: 37 9c 00 24 addi sp,sp,36 8003d54: c3 a0 00 00 ret * 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 ); 8003d58: f8 00 22 8f calli 800c794 <__errno> 8003d5c: 34 02 00 10 mvi r2,16 8003d60: 34 0c ff ff mvi r12,-1 8003d64: 58 22 00 00 sw (r1+0),r2 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 8003d68: b9 80 08 00 mv r1,r12 8003d6c: 2b 9d 00 04 lw ra,(sp+4) 8003d70: 2b 8b 00 10 lw r11,(sp+16) 8003d74: 2b 8c 00 0c lw r12,(sp+12) 8003d78: 2b 8d 00 08 lw r13,(sp+8) 8003d7c: 37 9c 00 24 addi sp,sp,36 8003d80: c3 a0 00 00 ret * 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){ 8003d84: 29 62 00 28 lw r2,(r11+40) 8003d88: b9 60 08 00 mv r1,r11 8003d8c: 28 42 00 2c lw r2,(r2+44) 8003d90: d8 40 00 00 call r2 8003d94: 5c 2d 00 17 bne r1,r13,8003df0 <== NEVER TAKEN 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 ); 8003d98: 78 0c 08 01 mvhi r12,0x801 8003d9c: 39 8c 67 c4 ori r12,r12,0x67c4 8003da0: 29 81 00 00 lw r1,(r12+0) 8003da4: 34 02 00 00 mvi r2,0 8003da8: 34 03 00 00 mvi r3,0 8003dac: f8 00 01 c1 calli 80044b0 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8003db0: b9 60 08 00 mv r1,r11 8003db4: f8 00 03 f3 calli 8004d80 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 8003db8: 29 81 00 00 lw r1,(r12+0) */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 8003dbc: 34 0c 00 00 mvi r12,0 8003dc0: f8 00 02 18 calli 8004620 /* * 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 ); 8003dc4: 35 61 00 08 addi r1,r11,8 8003dc8: fb ff f9 aa calli 8002470 free( mt_entry ); 8003dcc: b9 60 08 00 mv r1,r11 8003dd0: fb ff f9 b0 calli 8002490 return 0; } 8003dd4: b9 80 08 00 mv r1,r12 8003dd8: 2b 9d 00 04 lw ra,(sp+4) 8003ddc: 2b 8b 00 10 lw r11,(sp+16) 8003de0: 2b 8c 00 0c lw r12,(sp+12) 8003de4: 2b 8d 00 08 lw r13,(sp+8) 8003de8: 37 9c 00 24 addi sp,sp,36 8003dec: c3 a0 00 00 ret * 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 ) 8003df0: 29 62 00 14 lw r2,(r11+20) <== NOT EXECUTED 8003df4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8003df8: 28 42 00 20 lw r2,(r2+32) <== NOT EXECUTED 8003dfc: d8 40 00 00 call r2 <== NOT EXECUTED 8003e00: 44 20 ff ba be r1,r0,8003ce8 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 8003e04: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8003e08: f8 00 02 eb calli 80049b4 <== NOT EXECUTED =============================================================================== 08003e64 : int utime( const char *path, const struct utimbuf *times ) { 8003e64: 37 9c ff dc addi sp,sp,-36 8003e68: 5b 8b 00 10 sw (sp+16),r11 8003e6c: 5b 8c 00 0c sw (sp+12),r12 8003e70: 5b 8d 00 08 sw (sp+8),r13 8003e74: 5b 9d 00 04 sw (sp+4),ra 8003e78: b8 20 68 00 mv r13,r1 8003e7c: b8 40 60 00 mv r12,r2 rtems_filesystem_location_info_t temp_loc; int result; struct utimbuf now; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 8003e80: 37 8b 00 14 addi r11,sp,20 8003e84: f8 00 2b 6a calli 800ec2c 8003e88: b8 20 10 00 mv r2,r1 8003e8c: 34 03 00 00 mvi r3,0 8003e90: b9 a0 08 00 mv r1,r13 8003e94: b9 60 20 00 mv r4,r11 8003e98: 34 05 00 01 mvi r5,1 8003e9c: fb ff f8 06 calli 8001eb4 return -1; 8003ea0: 34 0d ff ff mvi r13,-1 { rtems_filesystem_location_info_t temp_loc; int result; struct utimbuf now; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 8003ea4: 5c 20 00 0b bne r1,r0,8003ed0 return -1; if ( times == NULL ) { 8003ea8: 45 81 00 11 be r12,r1,8003eec <== NEVER TAKEN 8003eac: 29 82 00 00 lw r2,(r12+0) 8003eb0: 29 83 00 04 lw r3,(r12+4) now.actime = now.modtime = time( NULL ); times = &now; } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 8003eb4: 2b 84 00 20 lw r4,(sp+32) 8003eb8: b9 60 08 00 mv r1,r11 8003ebc: 28 84 00 30 lw r4,(r4+48) 8003ec0: d8 80 00 00 call r4 8003ec4: b8 20 68 00 mv r13,r1 rtems_filesystem_freenode( &temp_loc ); 8003ec8: b9 60 08 00 mv r1,r11 8003ecc: fb ff f9 53 calli 8002418 return result; } 8003ed0: b9 a0 08 00 mv r1,r13 8003ed4: 2b 9d 00 04 lw ra,(sp+4) 8003ed8: 2b 8b 00 10 lw r11,(sp+16) 8003edc: 2b 8c 00 0c lw r12,(sp+12) 8003ee0: 2b 8d 00 08 lw r13,(sp+8) 8003ee4: 37 9c 00 24 addi sp,sp,36 8003ee8: c3 a0 00 00 ret if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( times == NULL ) { now.actime = now.modtime = time( NULL ); 8003eec: f8 00 2b b2 calli 800edb4