=============================================================================== ffc0df38 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { ffc0df38: 81 63 00 00 lwz r11,0(r3) ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; ffc0df3c: 81 23 00 10 lwz r9,16(r3) switch( node->type ) { ffc0df40: 80 0b 00 4c lwz r0,76(r11) ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; ffc0df44: 81 29 00 34 lwz r9,52(r9) switch( node->type ) { ffc0df48: 2b 80 00 07 cmplwi cr7,r0,7 ffc0df4c: 41 9d 00 28 bgt- cr7,ffc0df74 <== NEVER TAKEN ffc0df50: 3d 60 ff c2 lis r11,-62 ffc0df54: 39 6b f4 58 addi r11,r11,-2984 ffc0df58: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0df5c: 7c 0b 00 2e lwzx r0,r11,r0 ffc0df60: 7d 60 5a 14 add r11,r0,r11 ffc0df64: 7d 69 03 a6 mtctr r11 ffc0df68: 4e 80 04 20 bctr case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; ffc0df6c: 80 09 00 0c lwz r0,12(r9) ffc0df70: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0df74: 38 60 00 00 li r3,0 ffc0df78: 4e 80 00 20 blr break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; ffc0df7c: 80 09 00 08 lwz r0,8(r9) ffc0df80: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0df84: 38 60 00 00 li r3,0 ffc0df88: 4e 80 00 20 blr case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; ffc0df8c: 3d 20 ff c2 lis r9,-62 ffc0df90: 38 09 f4 f8 addi r0,r9,-2824 ffc0df94: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0df98: 38 60 00 00 li r3,0 ffc0df9c: 4e 80 00 20 blr break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; ffc0dfa0: 80 09 00 10 lwz r0,16(r9) ffc0dfa4: 90 03 00 08 stw r0,8(r3) break; } return 0; } ffc0dfa8: 38 60 00 00 li r3,0 ffc0dfac: 4e 80 00 20 blr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; ffc0dfb0: 3d 20 ff c2 lis r9,-62 ffc0dfb4: 38 09 f4 88 addi r0,r9,-2936 ffc0dfb8: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0dfbc: 38 60 00 00 li r3,0 ffc0dfc0: 4e 80 00 20 blr =============================================================================== ffc0dccc : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0dccc: 7d 80 00 26 mfcr r12 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ffc0dcd0: 7c 69 1b 79 mr. r9,r3 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0dcd4: 94 21 ff e0 stwu r1,-32(r1) ffc0dcd8: 7c 08 02 a6 mflr r0 ffc0dcdc: 93 61 00 0c stw r27,12(r1) /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; ffc0dce0: 3b 60 00 00 li r27,0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0dce4: 93 81 00 10 stw r28,16(r1) ffc0dce8: 7c fc 3b 78 mr r28,r7 ffc0dcec: 93 e1 00 1c stw r31,28(r1) ffc0dcf0: 7c 9f 23 78 mr r31,r4 ffc0dcf4: 90 01 00 24 stw r0,36(r1) ffc0dcf8: 93 a1 00 14 stw r29,20(r1) ffc0dcfc: 93 c1 00 18 stw r30,24(r1) ffc0dd00: 91 81 00 08 stw r12,8(r1) IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ffc0dd04: 41 82 00 a4 beq- ffc0dda8 <== NEVER TAKEN fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && ffc0dd08: 2e 04 00 07 cmpwi cr4,r4,7 */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; ffc0dd0c: 81 69 00 10 lwz r11,16(r9) * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; ffc0dd10: 83 a9 00 00 lwz r29,0(r9) fs_info = parent_loc->mt_entry->fs_info; ffc0dd14: 83 cb 00 34 lwz r30,52(r11) /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && ffc0dd18: 41 92 00 c0 beq- cr4,ffc0ddd8 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); ffc0dd1c: 3d 20 00 00 lis r9,0 ffc0dd20: 81 29 27 3c lwz r9,10044(r9) ffc0dd24: 7c a4 2b 78 mr r4,r5 ffc0dd28: 7f e3 fb 78 mr r3,r31 ffc0dd2c: 80 09 00 2c lwz r0,44(r9) ffc0dd30: 7c c5 00 78 andc r5,r6,r0 ffc0dd34: 4b ff fe f1 bl ffc0dc24 if ( !node ) ffc0dd38: 7c 7b 1b 79 mr. r27,r3 ffc0dd3c: 41 82 00 6c beq- ffc0dda8 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { ffc0dd40: 2f 9f 00 01 cmpwi cr7,r31,1 ffc0dd44: 41 9e 00 ac beq- cr7,ffc0ddf0 rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { ffc0dd48: 2f 9f 00 03 cmpwi cr7,r31,3 ffc0dd4c: 41 9e 00 34 beq- cr7,ffc0dd80 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { ffc0dd50: 2f 9f 00 04 cmpwi cr7,r31,4 ffc0dd54: 41 9e 00 2c beq- cr7,ffc0dd80 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { ffc0dd58: 2f 9f 00 02 cmpwi cr7,r31,2 ffc0dd5c: 41 9e 00 cc beq- cr7,ffc0de28 node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { ffc0dd60: 2f 9f 00 06 cmpwi cr7,r31,6 ffc0dd64: 41 9e 00 a8 beq- cr7,ffc0de0c node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { ffc0dd68: 2f 9f 00 05 cmpwi cr7,r31,5 ffc0dd6c: 41 9e 00 d0 beq- cr7,ffc0de3c node->info.file.size = 0; node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; } else if ( type == IMFS_FIFO ) { ffc0dd70: 40 b2 00 18 bne+ cr4,ffc0dd88 <== NEVER TAKEN node->info.fifo.pipe = NULL; ffc0dd74: 38 00 00 00 li r0,0 ffc0dd78: 90 1b 00 50 stw r0,80(r27) ffc0dd7c: 48 00 00 0c b ffc0dd88 if ( type == IMFS_DIRECTORY ) { rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; ffc0dd80: 80 1c 00 00 lwz r0,0(r28) ffc0dd84: 90 1b 00 50 stw r0,80(r27) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; ffc0dd88: 81 3e 00 04 lwz r9,4(r30) ffc0dd8c: 38 7d 00 50 addi r3,r29,80 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; ffc0dd90: 93 bb 00 08 stw r29,8(r27) ffc0dd94: 7f 64 db 78 mr r4,r27 node->st_ino = ++fs_info->ino_count; ffc0dd98: 38 09 00 01 addi r0,r9,1 ffc0dd9c: 90 1e 00 04 stw r0,4(r30) ffc0dda0: 90 1b 00 38 stw r0,56(r27) ffc0dda4: 4b ff c3 51 bl ffc0a0f4 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } ffc0dda8: 80 01 00 24 lwz r0,36(r1) ffc0ddac: 7f 63 db 78 mr r3,r27 ffc0ddb0: 81 81 00 08 lwz r12,8(r1) ffc0ddb4: 7c 08 03 a6 mtlr r0 ffc0ddb8: 83 61 00 0c lwz r27,12(r1) ffc0ddbc: 83 81 00 10 lwz r28,16(r1) ffc0ddc0: 7d 80 81 20 mtcrf 8,r12 ffc0ddc4: 83 a1 00 14 lwz r29,20(r1) ffc0ddc8: 83 c1 00 18 lwz r30,24(r1) ffc0ddcc: 83 e1 00 1c lwz r31,28(r1) ffc0ddd0: 38 21 00 20 addi r1,r1,32 ffc0ddd4: 4e 80 00 20 blr fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && ffc0ddd8: 81 3e 00 10 lwz r9,16(r30) ffc0dddc: 3d 60 ff c2 lis r11,-62 ffc0dde0: 38 0b f3 f0 addi r0,r11,-3088 ffc0dde4: 7f 89 00 00 cmpw cr7,r9,r0 ffc0dde8: 40 9e ff 34 bne+ cr7,ffc0dd1c ffc0ddec: 4b ff ff bc b ffc0dda8 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc0ddf0: 39 3b 00 54 addi r9,r27,84 ffc0ddf4: 38 1b 00 50 addi r0,r27,80 head->next = tail; ffc0ddf8: 91 3b 00 50 stw r9,80(r27) head->previous = NULL; ffc0ddfc: 39 20 00 00 li r9,0 ffc0de00: 91 3b 00 54 stw r9,84(r27) tail->previous = head; ffc0de04: 90 1b 00 58 stw r0,88(r27) ffc0de08: 4b ff ff 80 b ffc0dd88 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; ffc0de0c: 39 40 00 00 li r10,0 ffc0de10: 39 60 00 00 li r11,0 ffc0de14: 91 5b 00 50 stw r10,80(r27) node->info.linearfile.direct = 0; ffc0de18: 38 00 00 00 li r0,0 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; ffc0de1c: 91 7b 00 54 stw r11,84(r27) node->info.linearfile.direct = 0; ffc0de20: 90 1b 00 58 stw r0,88(r27) ffc0de24: 4b ff ff 64 b ffc0dd88 } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; ffc0de28: 81 3c 00 00 lwz r9,0(r28) node->info.device.minor = info->device.minor; ffc0de2c: 80 1c 00 04 lwz r0,4(r28) } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; ffc0de30: 91 3b 00 50 stw r9,80(r27) node->info.device.minor = info->device.minor; ffc0de34: 90 1b 00 54 stw r0,84(r27) ffc0de38: 4b ff ff 50 b ffc0dd88 } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; node->info.file.indirect = 0; ffc0de3c: 38 00 00 00 li r0,0 node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; ffc0de40: 39 40 00 00 li r10,0 node->info.file.indirect = 0; ffc0de44: 90 1b 00 58 stw r0,88(r27) node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; ffc0de48: 39 60 00 00 li r11,0 ffc0de4c: 91 5b 00 50 stw r10,80(r27) ffc0de50: 91 7b 00 54 stw r11,84(r27) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; ffc0de54: 90 1b 00 5c stw r0,92(r27) node->info.file.triply_indirect = 0; ffc0de58: 90 1b 00 60 stw r0,96(r27) ffc0de5c: 4b ff ff 2c b ffc0dd88 =============================================================================== ffc073e4 : */ void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { ffc073e4: 94 21 ff d0 stwu r1,-48(r1) ffc073e8: 7c 08 02 a6 mflr r0 ffc073ec: 7d 80 00 26 mfcr r12 ffc073f0: 2e 04 00 00 cmpwi cr4,r4,0 ffc073f4: 90 01 00 34 stw r0,52(r1) ffc073f8: 93 61 00 1c stw r27,28(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc073fc: 83 63 00 50 lwz r27,80(r3) ffc07400: 93 41 00 18 stw r26,24(r1) RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc07404: 3b 43 00 54 addi r26,r3,84 IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc07408: 7f 9b d0 00 cmpw cr7,r27,r26 */ void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { ffc0740c: 93 a1 00 24 stw r29,36(r1) ffc07410: 7c 9d 23 78 mr r29,r4 ffc07414: 93 01 00 10 stw r24,16(r1) ffc07418: 93 21 00 14 stw r25,20(r1) ffc0741c: 93 81 00 20 stw r28,32(r1) ffc07420: 93 c1 00 28 stw r30,40(r1) ffc07424: 93 e1 00 2c stw r31,44(r1) ffc07428: 91 81 00 0c stw r12,12(r1) IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc0742c: 41 9e 00 64 beq- cr7,ffc07490 ffc07430: 3f 80 ff c2 lis r28,-62 ffc07434: 3b 9c 75 e0 addi r28,r28,30176 ffc07438: 3f 20 00 00 lis r25,0 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 ); ffc0743c: 3b 04 00 01 addi r24,r4,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++ ) ffc07440: 41 90 00 30 blt- cr4,ffc07470 <== NEVER TAKEN ffc07444: 3b e0 00 00 li r31,0 ffc07448: 3b d9 27 94 addi r30,r25,10132 fprintf(stdout, "...." ); ffc0744c: 81 3e 00 00 lwz r9,0(r30) ffc07450: 7f 83 e3 78 mr r3,r28 ffc07454: 38 80 00 01 li r4,1 ffc07458: 80 c9 00 08 lwz r6,8(r9) ffc0745c: 38 a0 00 04 li r5,4 !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++ ) ffc07460: 3b ff 00 01 addi r31,r31,1 fprintf(stdout, "...." ); ffc07464: 48 01 1b 8d bl ffc18ff0 !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++ ) ffc07468: 7f 9d f8 00 cmpw cr7,r29,r31 ffc0746c: 40 9c ff e0 bge+ cr7,ffc0744c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); ffc07470: 7f 63 db 78 mr r3,r27 ffc07474: 4b ff fd e9 bl ffc0725c if ( the_jnode->type == IMFS_DIRECTORY ) ffc07478: 80 1b 00 4c lwz r0,76(r27) ffc0747c: 2f 80 00 01 cmpwi cr7,r0,1 ffc07480: 41 9e 00 48 beq- cr7,ffc074c8 the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { ffc07484: 83 7b 00 00 lwz r27,0(r27) IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc07488: 7f 9b d0 00 cmpw cr7,r27,r26 ffc0748c: 40 9e ff b4 bne+ cr7,ffc07440 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } ffc07490: 80 01 00 34 lwz r0,52(r1) ffc07494: 81 81 00 0c lwz r12,12(r1) ffc07498: 7c 08 03 a6 mtlr r0 ffc0749c: 83 01 00 10 lwz r24,16(r1) ffc074a0: 83 21 00 14 lwz r25,20(r1) ffc074a4: 7d 80 81 20 mtcrf 8,r12 ffc074a8: 83 41 00 18 lwz r26,24(r1) ffc074ac: 83 61 00 1c lwz r27,28(r1) ffc074b0: 83 81 00 20 lwz r28,32(r1) ffc074b4: 83 a1 00 24 lwz r29,36(r1) ffc074b8: 83 c1 00 28 lwz r30,40(r1) ffc074bc: 83 e1 00 2c lwz r31,44(r1) ffc074c0: 38 21 00 30 addi r1,r1,48 ffc074c4: 4e 80 00 20 blr 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 ); ffc074c8: 7f 63 db 78 mr r3,r27 ffc074cc: 7f 04 c3 78 mr r4,r24 ffc074d0: 4b ff ff 15 bl ffc073e4 ffc074d4: 4b ff ff b0 b ffc07484 =============================================================================== ffc0e080 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0e080: 94 21 ff a8 stwu r1,-88(r1) ffc0e084: 7c 08 02 a6 mflr r0 ffc0e088: 90 01 00 5c stw r0,92(r1) IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { ffc0e08c: 54 a0 00 39 rlwinm. r0,r5,0,0,28 size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; ffc0e090: 38 00 00 00 li r0,0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0e094: 93 81 00 48 stw r28,72(r1) ffc0e098: 7c bc 2b 78 mr r28,r5 ffc0e09c: 93 a1 00 4c stw r29,76(r1) ffc0e0a0: 7c 7d 1b 78 mr r29,r3 ffc0e0a4: 93 e1 00 54 stw r31,84(r1) ffc0e0a8: 7c df 33 78 mr r31,r6 ffc0e0ac: 93 41 00 40 stw r26,64(r1) ffc0e0b0: 93 61 00 44 stw r27,68(r1) ffc0e0b4: 93 c1 00 50 stw r30,80(r1) ffc0e0b8: 90 81 00 38 stw r4,56(r1) int i = 0; ffc0e0bc: 90 01 00 0c stw r0,12(r1) IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { ffc0e0c0: 40 82 03 28 bne- ffc0e3e8 <== NEVER TAKEN /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0e0c4: 83 c6 00 00 lwz r30,0(r6) ffc0e0c8: 38 60 00 00 li r3,0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0e0cc: 3f 60 00 00 lis r27,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 ); ffc0e0d0: 7c 7d 1a 14 add r3,r29,r3 ffc0e0d4: 38 a1 00 10 addi r5,r1,16 ffc0e0d8: 38 c1 00 08 addi r6,r1,8 ffc0e0dc: 48 00 0b 7d bl ffc0ec58 pathnamelen -= len; ffc0e0e0: 80 01 00 08 lwz r0,8(r1) * 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 ); ffc0e0e4: 7c 7a 1b 78 mr r26,r3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) ffc0e0e8: 80 7f 00 00 lwz r3,0(r31) */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; ffc0e0ec: 80 81 00 38 lwz r4,56(r1) i += len; if ( !pathloc->node_access ) ffc0e0f0: 2f 83 00 00 cmpwi cr7,r3,0 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; ffc0e0f4: 81 21 00 0c lwz r9,12(r1) */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; ffc0e0f8: 7c 80 20 50 subf r4,r0,r4 i += len; ffc0e0fc: 7c 09 02 14 add r0,r9,r0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; ffc0e100: 90 81 00 38 stw r4,56(r1) i += len; ffc0e104: 90 01 00 0c stw r0,12(r1) if ( !pathloc->node_access ) ffc0e108: 41 9e 02 cc beq- cr7,ffc0e3d4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) ffc0e10c: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0e110: 40 9e 00 44 bne- cr7,ffc0e154 * 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 ) { ffc0e114: 80 03 00 4c lwz r0,76(r3) ffc0e118: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e11c: 41 9e 01 a8 beq- cr7,ffc0e2c4 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0e120: 7f e3 fb 78 mr r3,r31 ffc0e124: 4b ff fe 15 bl ffc0df38 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0e128: 7f 84 e3 78 mr r4,r28 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0e12c: 7c 7e 1b 78 mr r30,r3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0e130: 7f e3 fb 78 mr r3,r31 ffc0e134: 4b ff fe 91 bl ffc0dfc4 ffc0e138: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e13c: 40 be 00 e4 bne+ cr7,ffc0e220 rtems_set_errno_and_return_minus_one( EACCES ); ffc0e140: 48 00 49 21 bl ffc12a60 <__errno> ffc0e144: 38 00 00 0d li r0,13 ffc0e148: 90 03 00 00 stw r0,0(r3) ffc0e14c: 3b c0 ff ff li r30,-1 ffc0e150: 48 00 00 d0 b ffc0e220 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) ffc0e154: 80 1e 00 4c lwz r0,76(r30) ffc0e158: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e15c: 41 9e 00 f0 beq- cr7,ffc0e24c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0e160: 2f 9a 00 03 cmpwi cr7,r26,3 ffc0e164: 41 9e 00 28 beq- cr7,ffc0e18c ffc0e168: 2f 9a 00 04 cmpwi cr7,r26,4 ffc0e16c: 41 9e 00 a4 beq- cr7,ffc0e210 ffc0e170: 2f 1a 00 02 cmpwi cr6,r26,2 ffc0e174: 41 9a 00 60 beq- cr6,ffc0e1d4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc0e178: 41 be ff 9c beq- cr7,ffc0e114 <== NEVER TAKEN ffc0e17c: 7c 7e 1b 78 mr r30,r3 ffc0e180: 80 81 00 38 lwz r4,56(r1) ffc0e184: 80 61 00 0c lwz r3,12(r1) ffc0e188: 4b ff ff 48 b ffc0e0d0 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { ffc0e18c: 80 03 00 4c lwz r0,76(r3) ffc0e190: 2f 80 00 03 cmpwi cr7,r0,3 ffc0e194: 41 9e 01 80 beq- cr7,ffc0e314 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { ffc0e198: 2f 80 00 04 cmpwi cr7,r0,4 ffc0e19c: 41 9e 02 14 beq- cr7,ffc0e3b0 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0e1a0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e1a4: 40 9e 02 58 bne- cr7,ffc0e3fc rtems_set_errno_and_return_minus_one( ENOTDIR ); /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); ffc0e1a8: 38 81 00 10 addi r4,r1,16 ffc0e1ac: 48 00 09 a9 bl ffc0eb54 if ( !node ) ffc0e1b0: 7c 7e 1b 79 mr. r30,r3 ffc0e1b4: 41 82 02 20 beq- ffc0e3d4 * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { ffc0e1b8: 80 1e 00 4c lwz r0,76(r30) ffc0e1bc: 80 81 00 38 lwz r4,56(r1) ffc0e1c0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e1c4: 41 9e 00 a4 beq- cr7,ffc0e268 } /* * Set the node access to the point we have found. */ pathloc->node_access = node; ffc0e1c8: 93 df 00 00 stw r30,0(r31) /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc0e1cc: 80 61 00 0c lwz r3,12(r1) ffc0e1d0: 4b ff ff 00 b ffc0e0d0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0e1d4: 81 3b 27 3c lwz r9,10044(r27) ffc0e1d8: 80 09 00 18 lwz r0,24(r9) ffc0e1dc: 7f 80 18 00 cmpw cr7,r0,r3 ffc0e1e0: 41 9e 01 24 beq- cr7,ffc0e304 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e1e4: 81 5f 00 10 lwz r10,16(r31) /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { ffc0e1e8: 80 0a 00 1c lwz r0,28(r10) ffc0e1ec: 7f 80 18 00 cmpw cr7,r0,r3 ffc0e1f0: 41 9e 01 3c beq- cr7,ffc0e32c pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) ffc0e1f4: 83 c3 00 08 lwz r30,8(r3) ffc0e1f8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e1fc: 41 9e 02 14 beq- cr7,ffc0e410 rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; pathloc->node_access = node; ffc0e200: 93 df 00 00 stw r30,0(r31) ffc0e204: 80 81 00 38 lwz r4,56(r1) /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc0e208: 80 61 00 0c lwz r3,12(r1) ffc0e20c: 4b ff fe c4 b ffc0e0d0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); ffc0e210: 48 00 48 51 bl ffc12a60 <__errno> ffc0e214: 38 00 00 5b li r0,91 ffc0e218: 90 03 00 00 stw r0,0(r3) ffc0e21c: 3b c0 ff ff li r30,-1 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e220: 80 01 00 5c lwz r0,92(r1) ffc0e224: 7f c3 f3 78 mr r3,r30 ffc0e228: 83 41 00 40 lwz r26,64(r1) ffc0e22c: 7c 08 03 a6 mtlr r0 ffc0e230: 83 61 00 44 lwz r27,68(r1) ffc0e234: 83 81 00 48 lwz r28,72(r1) ffc0e238: 83 a1 00 4c lwz r29,76(r1) ffc0e23c: 83 c1 00 50 lwz r30,80(r1) ffc0e240: 83 e1 00 54 lwz r31,84(r1) ffc0e244: 38 21 00 58 addi r1,r1,88 ffc0e248: 4e 80 00 20 blr /* * 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 ) ) ffc0e24c: 7f e3 fb 78 mr r3,r31 ffc0e250: 38 80 00 01 li r4,1 ffc0e254: 4b ff fd 71 bl ffc0dfc4 ffc0e258: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e25c: 41 be fe e4 beq- cr7,ffc0e140 ffc0e260: 80 7f 00 00 lwz r3,0(r31) ffc0e264: 4b ff fe fc b ffc0e160 * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { ffc0e268: 80 1e 00 5c lwz r0,92(r30) ffc0e26c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e270: 41 be ff 58 beq- cr7,ffc0e1c8 IMFS_skip_separator( pathname, &pathnamelen, &i); ffc0e274: 7f a3 eb 78 mr r3,r29 ffc0e278: 38 81 00 38 addi r4,r1,56 ffc0e27c: 38 a1 00 0c addi r5,r1,12 ffc0e280: 4b ff fc 31 bl ffc0deb0 if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { ffc0e284: 81 21 00 0c lwz r9,12(r1) ffc0e288: 7c 1d 48 ae lbzx r0,r29,r9 ffc0e28c: 7c 7d 4a 14 add r3,r29,r9 ffc0e290: 2f 80 00 2e cmpwi cr7,r0,46 ffc0e294: 40 9e 01 8c bne- cr7,ffc0e420 ffc0e298: 88 03 00 01 lbz r0,1(r3) ffc0e29c: 2f 80 00 2e cmpwi cr7,r0,46 ffc0e2a0: 40 9e 01 80 bne- cr7,ffc0e420 return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; ffc0e2a4: 80 81 00 38 lwz r4,56(r1) *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; ffc0e2a8: 39 29 00 02 addi r9,r9,2 pathnamelen -= 2; node = node->Parent; ffc0e2ac: 83 de 00 08 lwz r30,8(r30) return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; ffc0e2b0: 38 84 ff fe addi r4,r4,-2 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; ffc0e2b4: 91 21 00 0c stw r9,12(r1) pathnamelen -= 2; ffc0e2b8: 90 81 00 38 stw r4,56(r1) } /* * Set the node access to the point we have found. */ pathloc->node_access = node; ffc0e2bc: 93 df 00 00 stw r30,0(r31) ffc0e2c0: 4b ff ff 0c b ffc0e1cc * * 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 ) { ffc0e2c4: 81 43 00 5c lwz r10,92(r3) ffc0e2c8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0e2cc: 41 be fe 54 beq- cr7,ffc0e120 <== ALWAYS TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e2d0: 81 2a 00 20 lwz r9,32(r10) <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e2d4: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED * 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 ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e2d8: 80 0a 00 24 lwz r0,36(r10) <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e2dc: 7f e6 fb 78 mr r6,r31 <== NOT EXECUTED * 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 ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e2e0: 81 6a 00 28 lwz r11,40(r10) <== NOT EXECUTED ffc0e2e4: 81 0a 00 1c lwz r8,28(r10) <== NOT EXECUTED ffc0e2e8: 91 3f 00 04 stw r9,4(r31) <== NOT EXECUTED ffc0e2ec: 91 1f 00 00 stw r8,0(r31) <== NOT EXECUTED ffc0e2f0: 90 1f 00 08 stw r0,8(r31) <== NOT EXECUTED ffc0e2f4: 91 7f 00 0c stw r11,12(r31) <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e2f8: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED * 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 ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e2fc: 80 0a 00 2c lwz r0,44(r10) <== NOT EXECUTED ffc0e300: 48 00 00 5c b ffc0e35c <== NOT EXECUTED case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0e304: 7c 7e 1b 78 mr r30,r3 ffc0e308: 80 81 00 38 lwz r4,56(r1) /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc0e30c: 80 61 00 0c lwz r3,12(r1) ffc0e310: 4b ff fd c0 b ffc0e0d0 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); ffc0e314: 7f e3 fb 78 mr r3,r31 ffc0e318: 38 80 00 00 li r4,0 ffc0e31c: 4b ff fc fd bl ffc0e018 node = pathloc->node_access; ffc0e320: 80 7f 00 00 lwz r3,0(r31) ffc0e324: 80 03 00 4c lwz r0,76(r3) ffc0e328: 4b ff fe 78 b ffc0e1a0 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0e32c: 81 2a 00 0c lwz r9,12(r10) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc0e330: 7f 85 e3 78 mr r5,r28 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0e334: 80 0a 00 10 lwz r0,16(r10) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc0e338: 7f e6 fb 78 mr r6,r31 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0e33c: 81 6a 00 14 lwz r11,20(r10) ffc0e340: 81 0a 00 08 lwz r8,8(r10) ffc0e344: 91 3f 00 04 stw r9,4(r31) ffc0e348: 91 1f 00 00 stw r8,0(r31) ffc0e34c: 90 1f 00 08 stw r0,8(r31) ffc0e350: 91 7f 00 0c stw r11,12(r31) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc0e354: 81 21 00 08 lwz r9,8(r1) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0e358: 80 0a 00 18 lwz r0,24(r10) * 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 ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e35c: 90 1f 00 10 stw r0,16(r31) return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e360: 80 61 00 0c lwz r3,12(r1) ffc0e364: 80 0b 00 00 lwz r0,0(r11) ffc0e368: 80 81 00 38 lwz r4,56(r1) ffc0e36c: 7c 69 18 50 subf r3,r9,r3 ffc0e370: 7c 7d 1a 14 add r3,r29,r3 ffc0e374: 7c 09 03 a6 mtctr r0 ffc0e378: 7c 89 22 14 add r4,r9,r4 ffc0e37c: 4e 80 04 21 bctrl if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e380: 80 01 00 5c lwz r0,92(r1) */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e384: 7c 7e 1b 78 mr r30,r3 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e388: 83 41 00 40 lwz r26,64(r1) ffc0e38c: 7c 08 03 a6 mtlr r0 ffc0e390: 7f c3 f3 78 mr r3,r30 ffc0e394: 83 61 00 44 lwz r27,68(r1) ffc0e398: 83 81 00 48 lwz r28,72(r1) ffc0e39c: 83 a1 00 4c lwz r29,76(r1) ffc0e3a0: 83 c1 00 50 lwz r30,80(r1) ffc0e3a4: 83 e1 00 54 lwz r31,84(r1) ffc0e3a8: 38 21 00 58 addi r1,r1,88 ffc0e3ac: 4e 80 00 20 blr * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); ffc0e3b0: 7f e3 fb 78 mr r3,r31 ffc0e3b4: 38 80 00 00 li r4,0 ffc0e3b8: 48 00 00 b5 bl ffc0e46c /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) ffc0e3bc: 2f 83 ff ff cmpwi cr7,r3,-1 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); ffc0e3c0: 7c 7e 1b 78 mr r30,r3 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; ffc0e3c4: 80 7f 00 00 lwz r3,0(r31) if ( result == -1 ) ffc0e3c8: 41 be fe 58 beq- cr7,ffc0e220 <== NEVER TAKEN ffc0e3cc: 80 03 00 4c lwz r0,76(r3) ffc0e3d0: 4b ff fd d0 b ffc0e1a0 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); ffc0e3d4: 48 00 46 8d bl ffc12a60 <__errno> ffc0e3d8: 38 00 00 02 li r0,2 ffc0e3dc: 90 03 00 00 stw r0,0(r3) ffc0e3e0: 3b c0 ff ff li r30,-1 ffc0e3e4: 4b ff fe 3c b ffc0e220 char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); ffc0e3e8: 48 00 46 79 bl ffc12a60 <__errno> <== NOT EXECUTED ffc0e3ec: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc0e3f0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0e3f4: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc0e3f8: 4b ff fe 28 b ffc0e220 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0e3fc: 48 00 46 65 bl ffc12a60 <__errno> ffc0e400: 38 00 00 14 li r0,20 ffc0e404: 90 03 00 00 stw r0,0(r3) ffc0e408: 3b c0 ff ff li r30,-1 ffc0e40c: 4b ff fe 14 b ffc0e220 flags,pathloc); } } else { if ( !node->Parent ) rtems_set_errno_and_return_minus_one( ENOENT ); ffc0e410: 48 00 46 51 bl ffc12a60 <__errno> ffc0e414: 3b c0 ff ff li r30,-1 ffc0e418: 93 43 00 00 stw r26,0(r3) ffc0e41c: 4b ff fe 04 b ffc0e220 * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e420: 81 3e 00 5c lwz r9,92(r30) return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0e424: 7f 85 e3 78 mr r5,r28 ffc0e428: 7f e6 fb 78 mr r6,r31 ffc0e42c: 80 81 00 38 lwz r4,56(r1) * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e430: 81 69 00 28 lwz r11,40(r9) ffc0e434: 80 09 00 24 lwz r0,36(r9) ffc0e438: 81 09 00 1c lwz r8,28(r9) ffc0e43c: 81 49 00 20 lwz r10,32(r9) ffc0e440: 90 1f 00 08 stw r0,8(r31) ffc0e444: 91 1f 00 00 stw r8,0(r31) ffc0e448: 91 5f 00 04 stw r10,4(r31) ffc0e44c: 91 7f 00 0c stw r11,12(r31) return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0e450: 80 0b 00 00 lwz r0,0(r11) * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e454: 81 29 00 2c lwz r9,44(r9) return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0e458: 7c 09 03 a6 mtctr r0 * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e45c: 91 3f 00 10 stw r9,16(r31) return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0e460: 4e 80 04 21 bctrl ffc0e464: 7c 7e 1b 78 mr r30,r3 ffc0e468: 4b ff fd b8 b ffc0e220 =============================================================================== ffc0e638 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0e638: 94 21 ff a8 stwu r1,-88(r1) ffc0e63c: 7c 08 02 a6 mflr r0 ffc0e640: 7d 80 00 26 mfcr r12 ffc0e644: 90 01 00 5c stw r0,92(r1) int i = 0; ffc0e648: 38 00 00 00 li r0,0 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0e64c: 93 61 00 44 stw r27,68(r1) ffc0e650: 7c bb 2b 78 mr r27,r5 ffc0e654: 93 81 00 48 stw r28,72(r1) case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0e658: 3f 80 00 00 lis r28,0 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0e65c: 93 a1 00 4c stw r29,76(r1) ffc0e660: 7c 7d 1b 78 mr r29,r3 ffc0e664: 93 c1 00 50 stw r30,80(r1) ffc0e668: 93 e1 00 54 stw r31,84(r1) ffc0e66c: 7c 9f 23 78 mr r31,r4 int i = 0; ffc0e670: 90 01 00 10 stw r0,16(r1) /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0e674: 83 c4 00 00 lwz r30,0(r4) int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0e678: 93 41 00 40 stw r26,64(r1) ffc0e67c: 91 81 00 3c stw r12,60(r1) node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); ffc0e680: 48 00 5d 0d bl ffc1438c ffc0e684: 7c 64 1b 78 mr r4,r3 ffc0e688: 90 61 00 08 stw r3,8(r1) ffc0e68c: 38 00 00 00 li r0,0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc0e690: 7c 7d 02 14 add r3,r29,r0 ffc0e694: 38 a1 00 14 addi r5,r1,20 ffc0e698: 38 c1 00 0c addi r6,r1,12 ffc0e69c: 48 00 05 bd bl ffc0ec58 pathlen -= len; ffc0e6a0: 80 01 00 0c lwz r0,12(r1) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc0e6a4: 7c 7a 1b 78 mr r26,r3 pathlen -= len; i += len; if ( !pathloc->node_access ) ffc0e6a8: 80 7f 00 00 lwz r3,0(r31) */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0e6ac: 81 21 00 08 lwz r9,8(r1) i += len; if ( !pathloc->node_access ) ffc0e6b0: 2f 83 00 00 cmpwi cr7,r3,0 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; ffc0e6b4: 81 61 00 10 lwz r11,16(r1) */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0e6b8: 7d 20 48 50 subf r9,r0,r9 i += len; ffc0e6bc: 7c 0b 02 14 add r0,r11,r0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0e6c0: 91 21 00 08 stw r9,8(r1) i += len; ffc0e6c4: 90 01 00 10 stw r0,16(r1) if ( !pathloc->node_access ) ffc0e6c8: 41 9e 02 54 beq- cr7,ffc0e91c <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) ffc0e6cc: 2e 1a 00 00 cmpwi cr4,r26,0 ffc0e6d0: 40 92 00 48 bne- cr4,ffc0e718 pathloc->node_access = node; } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); ffc0e6d4: 48 00 43 8d bl ffc12a60 <__errno> ffc0e6d8: 38 00 00 11 li r0,17 ffc0e6dc: 90 03 00 00 stw r0,0(r3) ffc0e6e0: 3b c0 ff ff li r30,-1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e6e4: 80 01 00 5c lwz r0,92(r1) ffc0e6e8: 7f c3 f3 78 mr r3,r30 ffc0e6ec: 81 81 00 3c lwz r12,60(r1) ffc0e6f0: 7c 08 03 a6 mtlr r0 ffc0e6f4: 83 41 00 40 lwz r26,64(r1) ffc0e6f8: 83 61 00 44 lwz r27,68(r1) ffc0e6fc: 7d 80 81 20 mtcrf 8,r12 ffc0e700: 83 81 00 48 lwz r28,72(r1) ffc0e704: 83 a1 00 4c lwz r29,76(r1) ffc0e708: 83 c1 00 50 lwz r30,80(r1) ffc0e70c: 83 e1 00 54 lwz r31,84(r1) ffc0e710: 38 21 00 58 addi r1,r1,88 ffc0e714: 4e 80 00 20 blr /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) ffc0e718: 80 1e 00 4c lwz r0,76(r30) ffc0e71c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e720: 41 9e 01 1c beq- cr7,ffc0e83c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0e724: 2f 9a 00 02 cmpwi cr7,r26,2 ffc0e728: 41 9e 00 84 beq- cr7,ffc0e7ac ffc0e72c: 2b 9a 00 02 cmplwi cr7,r26,2 ffc0e730: 40 9d 00 24 ble- cr7,ffc0e754 ffc0e734: 2f 9a 00 03 cmpwi cr7,r26,3 ffc0e738: 41 9e 00 b0 beq- cr7,ffc0e7e8 ffc0e73c: 2f 9a 00 04 cmpwi cr7,r26,4 ffc0e740: 41 9e 00 28 beq- cr7,ffc0e768 <== ALWAYS TAKEN ffc0e744: 80 01 00 10 lwz r0,16(r1) <== NOT EXECUTED ffc0e748: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ffc0e74c: 80 81 00 08 lwz r4,8(r1) <== NOT EXECUTED ffc0e750: 4b ff ff 40 b ffc0e690 <== NOT EXECUTED ffc0e754: 41 b2 ff 80 beq- cr4,ffc0e6d4 <== NEVER TAKEN ffc0e758: 80 01 00 10 lwz r0,16(r1) ffc0e75c: 7c 7e 1b 78 mr r30,r3 ffc0e760: 80 81 00 08 lwz r4,8(r1) ffc0e764: 4b ff ff 2c b ffc0e690 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 ); ffc0e768: 48 00 42 f9 bl ffc12a60 <__errno> ffc0e76c: 38 00 00 5b li r0,91 ffc0e770: 90 03 00 00 stw r0,0(r3) ffc0e774: 3b c0 ff ff li r30,-1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e778: 7f c3 f3 78 mr r3,r30 ffc0e77c: 80 01 00 5c lwz r0,92(r1) ffc0e780: 81 81 00 3c lwz r12,60(r1) ffc0e784: 7c 08 03 a6 mtlr r0 ffc0e788: 83 41 00 40 lwz r26,64(r1) ffc0e78c: 83 61 00 44 lwz r27,68(r1) ffc0e790: 7d 80 81 20 mtcrf 8,r12 ffc0e794: 83 81 00 48 lwz r28,72(r1) ffc0e798: 83 a1 00 4c lwz r29,76(r1) ffc0e79c: 83 c1 00 50 lwz r30,80(r1) ffc0e7a0: 83 e1 00 54 lwz r31,84(r1) ffc0e7a4: 38 21 00 58 addi r1,r1,88 ffc0e7a8: 4e 80 00 20 blr case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0e7ac: 81 3c 27 3c lwz r9,10044(r28) ffc0e7b0: 83 c9 00 18 lwz r30,24(r9) ffc0e7b4: 7f 9e 18 00 cmpw cr7,r30,r3 ffc0e7b8: 41 9e 01 78 beq- cr7,ffc0e930 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e7bc: 81 7f 00 10 lwz r11,16(r31) /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { ffc0e7c0: 80 0b 00 1c lwz r0,28(r11) ffc0e7c4: 7f 83 00 00 cmpw cr7,r3,r0 ffc0e7c8: 41 9e 01 74 beq- cr7,ffc0e93c *pathloc = pathloc->mt_entry->mt_point_node; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) ffc0e7cc: 83 c3 00 08 lwz r30,8(r3) ffc0e7d0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e7d4: 41 9e 02 14 beq- cr7,ffc0e9e8 rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; ffc0e7d8: 93 df 00 00 stw r30,0(r31) ffc0e7dc: 80 01 00 10 lwz r0,16(r1) ffc0e7e0: 80 81 00 08 lwz r4,8(r1) break; ffc0e7e4: 4b ff fe ac b ffc0e690 case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { ffc0e7e8: 80 03 00 4c lwz r0,76(r3) ffc0e7ec: 2f 80 00 03 cmpwi cr7,r0,3 ffc0e7f0: 41 9e 00 68 beq- cr7,ffc0e858 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { ffc0e7f4: 2f 80 00 04 cmpwi cr7,r0,4 ffc0e7f8: 41 9e 00 60 beq- cr7,ffc0e858 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) ffc0e7fc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e800: 41 9e 01 d4 beq- cr7,ffc0e9d4 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0e804: 80 03 00 4c lwz r0,76(r3) ffc0e808: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e80c: 40 9e 01 c8 bne- cr7,ffc0e9d4 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); ffc0e810: 38 81 00 14 addi r4,r1,20 ffc0e814: 48 00 03 41 bl ffc0eb54 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) ffc0e818: 7c 7e 1b 79 mr. r30,r3 ffc0e81c: 41 82 00 b8 beq- ffc0e8d4 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { ffc0e820: 80 1e 00 4c lwz r0,76(r30) ffc0e824: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e828: 41 9e 00 50 beq- cr7,ffc0e878 ffc0e82c: 80 01 00 10 lwz r0,16(r1) ffc0e830: 80 81 00 08 lwz r4,8(r1) } i += 2; pathlen -= 2; node = node->Parent; } pathloc->node_access = node; ffc0e834: 93 df 00 00 stw r30,0(r31) ffc0e838: 4b ff fe 58 b ffc0e690 * 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 ) ) ffc0e83c: 7f e3 fb 78 mr r3,r31 ffc0e840: 38 80 00 01 li r4,1 ffc0e844: 4b ff f7 81 bl ffc0dfc4 ffc0e848: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e84c: 41 9e 01 74 beq- cr7,ffc0e9c0 ffc0e850: 80 7f 00 00 lwz r3,0(r31) ffc0e854: 4b ff fe d0 b ffc0e724 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); ffc0e858: 7f e3 fb 78 mr r3,r31 ffc0e85c: 38 80 00 00 li r4,0 ffc0e860: 4b ff fc c5 bl ffc0e524 if ( result == -1 ) ffc0e864: 2f 83 ff ff cmpwi cr7,r3,-1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); ffc0e868: 7c 7e 1b 78 mr r30,r3 if ( result == -1 ) ffc0e86c: 41 be fe 78 beq- cr7,ffc0e6e4 <== NEVER TAKEN ffc0e870: 80 7f 00 00 lwz r3,0(r31) ffc0e874: 4b ff ff 88 b ffc0e7fc */ if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { ffc0e878: 80 1e 00 5c lwz r0,92(r30) ffc0e87c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e880: 41 be ff ac beq- cr7,ffc0e82c IMFS_skip_separator( path, &pathlen, &i); ffc0e884: 7f a3 eb 78 mr r3,r29 ffc0e888: 38 81 00 08 addi r4,r1,8 ffc0e88c: 38 a1 00 10 addi r5,r1,16 ffc0e890: 4b ff f6 21 bl ffc0deb0 if ((path[i] != '.') || (path[i + 1] != '.')) { ffc0e894: 81 21 00 10 lwz r9,16(r1) ffc0e898: 7c 1d 48 ae lbzx r0,r29,r9 ffc0e89c: 7c 7d 4a 14 add r3,r29,r9 ffc0e8a0: 2f 80 00 2e cmpwi cr7,r0,46 ffc0e8a4: 40 9e 01 54 bne- cr7,ffc0e9f8 ffc0e8a8: 88 03 00 01 lbz r0,1(r3) ffc0e8ac: 2f 80 00 2e cmpwi cr7,r0,46 ffc0e8b0: 40 9e 01 48 bne- cr7,ffc0e9f8 <== NEVER TAKEN return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; pathlen -= 2; ffc0e8b4: 80 81 00 08 lwz r4,8(r1) *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; ffc0e8b8: 38 09 00 02 addi r0,r9,2 pathlen -= 2; node = node->Parent; ffc0e8bc: 83 de 00 08 lwz r30,8(r30) return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; pathlen -= 2; ffc0e8c0: 38 84 ff fe addi r4,r4,-2 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; ffc0e8c4: 90 01 00 10 stw r0,16(r1) pathlen -= 2; ffc0e8c8: 90 81 00 08 stw r4,8(r1) node = node->Parent; } pathloc->node_access = node; ffc0e8cc: 93 df 00 00 stw r30,0(r31) ffc0e8d0: 4b ff fd c0 b ffc0e690 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; ffc0e8d4: 80 01 00 10 lwz r0,16(r1) ffc0e8d8: 81 21 00 0c lwz r9,12(r1) ffc0e8dc: 7d 29 00 50 subf r9,r9,r0 ffc0e8e0: 7d 3d 4a 14 add r9,r29,r9 ffc0e8e4: 91 3b 00 00 stw r9,0(r27) /* * 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++) { ffc0e8e8: 7c 7d 00 ae lbzx r3,r29,r0 ffc0e8ec: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e8f0: 40 be 00 20 bne+ cr7,ffc0e910 ffc0e8f4: 48 00 00 9c b ffc0e990 ffc0e8f8: 81 21 00 10 lwz r9,16(r1) ffc0e8fc: 38 09 00 01 addi r0,r9,1 ffc0e900: 7c 7d 00 ae lbzx r3,r29,r0 ffc0e904: 90 01 00 10 stw r0,16(r1) ffc0e908: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e90c: 41 9e 00 84 beq- cr7,ffc0e990 if ( !IMFS_is_separator( path[ i ] ) ) ffc0e910: 4b ff 7b 45 bl ffc06454 ffc0e914: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e918: 40 9e ff e0 bne+ cr7,ffc0e8f8 rtems_set_errno_and_return_minus_one( ENOENT ); ffc0e91c: 48 00 41 45 bl ffc12a60 <__errno> ffc0e920: 38 00 00 02 li r0,2 ffc0e924: 90 03 00 00 stw r0,0(r3) ffc0e928: 3b c0 ff ff li r30,-1 ffc0e92c: 4b ff fd b8 b ffc0e6e4 /* * 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 ); ffc0e930: 80 01 00 10 lwz r0,16(r1) ffc0e934: 80 81 00 08 lwz r4,8(r1) ffc0e938: 4b ff fd 58 b ffc0e690 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0e93c: 81 2b 00 14 lwz r9,20(r11) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0e940: 7f e4 fb 78 mr r4,r31 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0e944: 80 0b 00 10 lwz r0,16(r11) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0e948: 7f 65 db 78 mr r5,r27 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0e94c: 81 0b 00 08 lwz r8,8(r11) ffc0e950: 81 4b 00 0c lwz r10,12(r11) ffc0e954: 91 1f 00 00 stw r8,0(r31) ffc0e958: 91 5f 00 04 stw r10,4(r31) ffc0e95c: 90 1f 00 08 stw r0,8(r31) ffc0e960: 91 3f 00 0c stw r9,12(r31) ffc0e964: 80 0b 00 18 lwz r0,24(r11) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0e968: 80 61 00 10 lwz r3,16(r1) ffc0e96c: 81 61 00 0c lwz r11,12(r1) if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0e970: 90 1f 00 10 stw r0,16(r31) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0e974: 7c 6b 18 50 subf r3,r11,r3 ffc0e978: 80 09 00 04 lwz r0,4(r9) ffc0e97c: 7c 7d 1a 14 add r3,r29,r3 ffc0e980: 7c 09 03 a6 mtctr r0 ffc0e984: 4e 80 04 21 bctrl ffc0e988: 7c 7e 1b 78 mr r30,r3 ffc0e98c: 4b ff fd 58 b ffc0e6e4 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0e990: 7f e3 fb 78 mr r3,r31 ffc0e994: 4b ff f5 a5 bl ffc0df38 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) ffc0e998: 81 3f 00 00 lwz r9,0(r31) /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0e99c: 7c 7e 1b 78 mr r30,r3 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) ffc0e9a0: 80 09 00 4c lwz r0,76(r9) ffc0e9a4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e9a8: 40 9e 00 2c bne- cr7,ffc0e9d4 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) ffc0e9ac: 7f e3 fb 78 mr r3,r31 ffc0e9b0: 38 80 00 03 li r4,3 ffc0e9b4: 4b ff f6 11 bl ffc0dfc4 ffc0e9b8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e9bc: 40 9e fd 28 bne+ cr7,ffc0e6e4 rtems_set_errno_and_return_minus_one( EACCES ); ffc0e9c0: 48 00 40 a1 bl ffc12a60 <__errno> ffc0e9c4: 38 00 00 0d li r0,13 ffc0e9c8: 90 03 00 00 stw r0,0(r3) ffc0e9cc: 3b c0 ff ff li r30,-1 ffc0e9d0: 4b ff fd 14 b ffc0e6e4 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0e9d4: 48 00 40 8d bl ffc12a60 <__errno> ffc0e9d8: 38 00 00 14 li r0,20 ffc0e9dc: 90 03 00 00 stw r0,0(r3) ffc0e9e0: 3b c0 ff ff li r30,-1 ffc0e9e4: 4b ff fd 00 b ffc0e6e4 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) rtems_set_errno_and_return_minus_one( ENOENT ); ffc0e9e8: 48 00 40 79 bl ffc12a60 <__errno> ffc0e9ec: 3b c0 ff ff li r30,-1 ffc0e9f0: 93 43 00 00 stw r26,0(r3) ffc0e9f4: 4b ff fc f0 b ffc0e6e4 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e9f8: 81 3e 00 5c lwz r9,92(r30) return (*pathloc->ops->evalformake_h)( &path[i], ffc0e9fc: 7f e4 fb 78 mr r4,r31 ffc0ea00: 7f 65 db 78 mr r5,r27 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0ea04: 81 69 00 28 lwz r11,40(r9) ffc0ea08: 80 09 00 24 lwz r0,36(r9) ffc0ea0c: 81 09 00 1c lwz r8,28(r9) ffc0ea10: 81 49 00 20 lwz r10,32(r9) ffc0ea14: 90 1f 00 08 stw r0,8(r31) ffc0ea18: 91 1f 00 00 stw r8,0(r31) ffc0ea1c: 91 5f 00 04 stw r10,4(r31) ffc0ea20: 91 7f 00 0c stw r11,12(r31) return (*pathloc->ops->evalformake_h)( &path[i], ffc0ea24: 80 0b 00 04 lwz r0,4(r11) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0ea28: 81 29 00 2c lwz r9,44(r9) return (*pathloc->ops->evalformake_h)( &path[i], ffc0ea2c: 7c 09 03 a6 mtctr r0 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0ea30: 91 3f 00 10 stw r9,16(r31) return (*pathloc->ops->evalformake_h)( &path[i], ffc0ea34: 4e 80 04 21 bctrl ffc0ea38: 7c 7e 1b 78 mr r30,r3 ffc0ea3c: 4b ff fc a8 b ffc0e6e4 =============================================================================== ffc0e524 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0e524: 94 21 ff e8 stwu r1,-24(r1) ffc0e528: 7c 08 02 a6 mflr r0 ffc0e52c: 93 a1 00 0c stw r29,12(r1) */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); ffc0e530: 3f a0 00 00 lis r29,0 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0e534: 93 81 00 08 stw r28,8(r1) ffc0e538: 7c 9c 23 78 mr r28,r4 ffc0e53c: 93 c1 00 10 stw r30,16(r1) ffc0e540: 7c 7e 1b 78 mr r30,r3 ffc0e544: 90 01 00 1c stw r0,28(r1) ffc0e548: 93 e1 00 14 stw r31,20(r1) */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); ffc0e54c: 81 3d 27 3c lwz r9,10044(r29) ffc0e550: 48 00 00 14 b ffc0e564 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) ffc0e554: 41 9a 00 90 beq- cr6,ffc0e5e4 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ffc0e558: 39 6b ff fd addi r11,r11,-3 ffc0e55c: 2b 8b 00 01 cmplwi cr7,r11,1 ffc0e560: 41 9d 00 58 bgt- cr7,ffc0e5b8 <== ALWAYS TAKEN /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0e564: a1 69 00 30 lhz r11,48(r9) { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; ffc0e568: 83 fe 00 00 lwz r31,0(r30) /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0e56c: 38 0b 00 01 addi r0,r11,1 ffc0e570: 54 00 04 3e clrlwi r0,r0,16 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { ffc0e574: 2b 80 00 05 cmplwi cr7,r0,5 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0e578: b0 09 00 30 sth r0,48(r9) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { ffc0e57c: 41 9d 00 84 bgt- cr7,ffc0e600 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) ffc0e580: 81 7f 00 4c lwz r11,76(r31) ffc0e584: 2f 8b 00 03 cmpwi cr7,r11,3 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) ffc0e588: 2f 0b 00 04 cmpwi cr6,r11,4 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) ffc0e58c: 40 9e ff c8 bne+ cr7,ffc0e554 result = IMFS_evaluate_hard_link( node, flags ); ffc0e590: 7f c3 f3 78 mr r3,r30 ffc0e594: 7f 84 e3 78 mr r4,r28 ffc0e598: 4b ff fa 81 bl ffc0e018 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 ) ) ); ffc0e59c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e5a0: 40 9e 00 58 bne- cr7,ffc0e5f8 ffc0e5a4: 81 7f 00 4c lwz r11,76(r31) ffc0e5a8: 81 3d 27 3c lwz r9,10044(r29) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ffc0e5ac: 39 6b ff fd addi r11,r11,-3 ffc0e5b0: 2b 8b 00 01 cmplwi cr7,r11,1 ffc0e5b4: 40 9d ff b0 ble+ cr7,ffc0e564 <== ALWAYS TAKEN ffc0e5b8: 38 60 00 00 li r3,0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; ffc0e5bc: 38 00 00 00 li r0,0 return result; } ffc0e5c0: 83 81 00 08 lwz r28,8(r1) /* * Clear link counter. */ rtems_filesystem_link_counts = 0; ffc0e5c4: b0 09 00 30 sth r0,48(r9) return result; } ffc0e5c8: 80 01 00 1c lwz r0,28(r1) ffc0e5cc: 83 a1 00 0c lwz r29,12(r1) ffc0e5d0: 7c 08 03 a6 mtlr r0 ffc0e5d4: 83 c1 00 10 lwz r30,16(r1) ffc0e5d8: 83 e1 00 14 lwz r31,20(r1) ffc0e5dc: 38 21 00 18 addi r1,r1,24 ffc0e5e0: 4e 80 00 20 blr 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 ); ffc0e5e4: 7f c3 f3 78 mr r3,r30 ffc0e5e8: 7f 84 e3 78 mr r4,r28 ffc0e5ec: 4b ff fe 81 bl ffc0e46c } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); ffc0e5f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e5f4: 41 9e ff b0 beq+ cr7,ffc0e5a4 ffc0e5f8: 81 3d 27 3c lwz r9,10044(r29) ffc0e5fc: 4b ff ff c0 b ffc0e5bc * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; ffc0e600: 38 00 00 00 li r0,0 ffc0e604: b0 09 00 30 sth r0,48(r9) rtems_set_errno_and_return_minus_one( ELOOP ); ffc0e608: 48 00 44 59 bl ffc12a60 <__errno> ffc0e60c: 38 00 00 5c li r0,92 ffc0e610: 90 03 00 00 stw r0,0(r3) ffc0e614: 38 60 ff ff li r3,-1 */ rtems_filesystem_link_counts = 0; return result; } ffc0e618: 80 01 00 1c lwz r0,28(r1) ffc0e61c: 83 81 00 08 lwz r28,8(r1) ffc0e620: 7c 08 03 a6 mtlr r0 ffc0e624: 83 a1 00 0c lwz r29,12(r1) ffc0e628: 83 c1 00 10 lwz r30,16(r1) ffc0e62c: 83 e1 00 14 lwz r31,20(r1) ffc0e630: 38 21 00 18 addi r1,r1,24 ffc0e634: 4e 80 00 20 blr =============================================================================== ffc0dfc4 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { ffc0dfc4: 7c 08 02 a6 mflr r0 ffc0dfc8: 94 21 ff f8 stwu r1,-8(r1) ffc0dfcc: 90 01 00 0c stw r0,12(r1) uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) ffc0dfd0: 54 80 00 39 rlwinm. r0,r4,0,0,28 ffc0dfd4: 40 82 00 30 bne- ffc0e004 <== NEVER TAKEN /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) ffc0dfd8: 81 23 00 00 lwz r9,0(r3) */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; ffc0dfdc: 54 84 30 32 rlwinm r4,r4,6,0,25 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) ffc0dfe0: 80 69 00 30 lwz r3,48(r9) ffc0dfe4: 7c 83 18 38 and r3,r4,r3 return 1; ffc0dfe8: 7c 83 1a 78 xor r3,r4,r3 ffc0dfec: 7c 63 00 34 cntlzw r3,r3 ffc0dff0: 54 63 d9 7e rlwinm r3,r3,27,5,31 return 0; } ffc0dff4: 80 01 00 0c lwz r0,12(r1) ffc0dff8: 38 21 00 08 addi r1,r1,8 ffc0dffc: 7c 08 03 a6 mtlr r0 ffc0e000: 4e 80 00 20 blr gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); ffc0e004: 48 00 4a 5d bl ffc12a60 <__errno> <== NOT EXECUTED ffc0e008: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0e00c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0e010: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0e014: 4b ff ff e0 b ffc0dff4 <== NOT EXECUTED =============================================================================== ffc05800 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc05800: 94 21 ff f0 stwu r1,-16(r1) ffc05804: 7c 08 02 a6 mflr r0 ffc05808: 7c 68 1b 78 mr r8,r3 ffc0580c: 90 01 00 14 stw r0,20(r1) ffc05810: 93 c1 00 08 stw r30,8(r1) ffc05814: 93 e1 00 0c stw r31,12(r1) off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); ffc05818: 81 23 00 1c lwz r9,28(r3) ffc0581c: 80 69 00 50 lwz r3,80(r9) ffc05820: 48 00 c5 7d bl ffc11d9c ffc05824: 7c 7e fe 70 srawi r30,r3,31 IMFS_FIFO_RETURN(err); ffc05828: 2f 9e 00 00 cmpwi cr7,r30,0 rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); ffc0582c: 7c 7f 1b 78 mr r31,r3 IMFS_FIFO_RETURN(err); ffc05830: 41 9c 00 24 blt- cr7,ffc05854 <== ALWAYS TAKEN } ffc05834: 80 01 00 14 lwz r0,20(r1) ffc05838: 7f c3 f3 78 mr r3,r30 ffc0583c: 7f e4 fb 78 mr r4,r31 ffc05840: 83 c1 00 08 lwz r30,8(r1) ffc05844: 7c 08 03 a6 mtlr r0 ffc05848: 83 e1 00 0c lwz r31,12(r1) ffc0584c: 38 21 00 10 addi r1,r1,16 ffc05850: 4e 80 00 20 blr rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); ffc05854: 48 00 ee 21 bl ffc14674 <__errno> ffc05858: 7c 1f 00 d0 neg r0,r31 ffc0585c: 90 03 00 00 stw r0,0(r3) ffc05860: 3b c0 ff ff li r30,-1 ffc05864: 3b e0 ff ff li r31,-1 ffc05868: 4b ff ff cc b ffc05834 =============================================================================== ffc0586c : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { ffc0586c: 94 21 ff e0 stwu r1,-32(r1) ffc05870: 7c 08 02 a6 mflr r0 ffc05874: 7c 66 1b 78 mr r6,r3 ffc05878: 90 01 00 24 stw r0,36(r1) ffc0587c: 93 c1 00 18 stw r30,24(r1) ffc05880: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *jnode = iop->pathinfo.node_access; ffc05884: 83 e3 00 1c lwz r31,28(r3) int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); ffc05888: 80 7f 00 50 lwz r3,80(r31) ffc0588c: 48 00 c2 19 bl ffc11aa4 if (err > 0) { ffc05890: 7c 7e 1b 79 mr. r30,r3 ffc05894: 40 81 00 38 ble- ffc058cc IMFS_mtime_ctime_update(jnode); ffc05898: 38 61 00 08 addi r3,r1,8 ffc0589c: 38 80 00 00 li r4,0 ffc058a0: 48 00 16 ad bl ffc06f4c ffc058a4: 80 01 00 08 lwz r0,8(r1) ffc058a8: 90 1f 00 44 stw r0,68(r31) ffc058ac: 90 1f 00 48 stw r0,72(r31) } IMFS_FIFO_RETURN(err); } ffc058b0: 80 01 00 24 lwz r0,36(r1) ffc058b4: 7f c3 f3 78 mr r3,r30 ffc058b8: 83 e1 00 1c lwz r31,28(r1) ffc058bc: 7c 08 03 a6 mtlr r0 ffc058c0: 83 c1 00 18 lwz r30,24(r1) ffc058c4: 38 21 00 20 addi r1,r1,32 ffc058c8: 4e 80 00 20 blr int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); ffc058cc: 41 82 ff e4 beq+ ffc058b0 <== NEVER TAKEN ffc058d0: 7f de 00 d0 neg r30,r30 ffc058d4: 48 00 ed a1 bl ffc14674 <__errno> ffc058d8: 93 c3 00 00 stw r30,0(r3) ffc058dc: 3b c0 ff ff li r30,-1 ffc058e0: 4b ff ff d0 b ffc058b0 =============================================================================== ffc0eb54 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0eb54: 94 21 ff e8 stwu r1,-24(r1) ffc0eb58: 7c 08 02 a6 mflr r0 ffc0eb5c: 93 e1 00 14 stw r31,20(r1) /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0eb60: 3f e0 ff c2 lis r31,-62 ffc0eb64: 3b ff f4 78 addi r31,r31,-2952 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0eb68: 93 c1 00 10 stw r30,16(r1) ffc0eb6c: 7c 9e 23 78 mr r30,r4 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0eb70: 7f e4 fb 78 mr r4,r31 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0eb74: 93 81 00 08 stw r28,8(r1) ffc0eb78: 7c 7c 1b 78 mr r28,r3 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0eb7c: 7f c3 f3 78 mr r3,r30 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0eb80: 90 01 00 1c stw r0,28(r1) ffc0eb84: 93 a1 00 0c stw r29,12(r1) /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0eb88: 48 00 52 29 bl ffc13db0 ffc0eb8c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0eb90: 41 9e 00 54 beq- cr7,ffc0ebe4 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) ffc0eb94: 7f c3 f3 78 mr r3,r30 ffc0eb98: 38 9f 00 04 addi r4,r31,4 ffc0eb9c: 48 00 52 15 bl ffc13db0 ffc0eba0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0eba4: 41 9e 00 64 beq- cr7,ffc0ec08 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0eba8: 83 fc 00 50 lwz r31,80(r28) RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc0ebac: 3b bc 00 54 addi r29,r28,84 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; ffc0ebb0: 3b 80 00 00 li r28,0 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc0ebb4: 7f 9f e8 00 cmpw cr7,r31,r29 ffc0ebb8: 40 be 00 14 bne+ cr7,ffc0ebcc ffc0ebbc: 48 00 00 28 b ffc0ebe4 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { ffc0ebc0: 83 ff 00 00 lwz r31,0(r31) if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc0ebc4: 7f 9f e8 00 cmpw cr7,r31,r29 ffc0ebc8: 41 9e 00 68 beq- cr7,ffc0ec30 !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 ) ) ffc0ebcc: 38 9f 00 0c addi r4,r31,12 ffc0ebd0: 7f c3 f3 78 mr r3,r30 ffc0ebd4: 48 00 51 dd bl ffc13db0 ffc0ebd8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ebdc: 40 9e ff e4 bne+ cr7,ffc0ebc0 ffc0ebe0: 7f fc fb 78 mr r28,r31 return the_jnode; } return 0; } ffc0ebe4: 80 01 00 1c lwz r0,28(r1) ffc0ebe8: 7f 83 e3 78 mr r3,r28 ffc0ebec: 83 a1 00 0c lwz r29,12(r1) ffc0ebf0: 7c 08 03 a6 mtlr r0 ffc0ebf4: 83 81 00 08 lwz r28,8(r1) ffc0ebf8: 83 c1 00 10 lwz r30,16(r1) ffc0ebfc: 83 e1 00 14 lwz r31,20(r1) ffc0ec00: 38 21 00 18 addi r1,r1,24 ffc0ec04: 4e 80 00 20 blr ffc0ec08: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) return directory->Parent; ffc0ec0c: 83 9c 00 08 lwz r28,8(r28) <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } ffc0ec10: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0ec14: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc0ec18: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0ec1c: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc0ec20: 83 81 00 08 lwz r28,8(r1) <== NOT EXECUTED ffc0ec24: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc0ec28: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc0ec2c: 4e 80 00 20 blr <== NOT EXECUTED ffc0ec30: 80 01 00 1c lwz r0,28(r1) if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; ffc0ec34: 3b 80 00 00 li r28,0 } ffc0ec38: 7f 83 e3 78 mr r3,r28 ffc0ec3c: 83 a1 00 0c lwz r29,12(r1) ffc0ec40: 7c 08 03 a6 mtlr r0 ffc0ec44: 83 81 00 08 lwz r28,8(r1) ffc0ec48: 83 c1 00 10 lwz r30,16(r1) ffc0ec4c: 83 e1 00 14 lwz r31,20(r1) ffc0ec50: 38 21 00 18 addi r1,r1,24 ffc0ec54: 4e 80 00 20 blr =============================================================================== ffc0ea40 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0ea40: 94 21 ff d0 stwu r1,-48(r1) ffc0ea44: 7c 08 02 a6 mflr r0 ffc0ea48: 90 01 00 34 stw r0,52(r1) * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; ffc0ea4c: 80 03 00 2c lwz r0,44(r3) ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0ea50: 93 c1 00 28 stw r30,40(r1) * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; ffc0ea54: 81 43 00 20 lwz r10,32(r3) /* * 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; ffc0ea58: 83 c3 00 1c lwz r30,28(r3) loc = temp_mt_entry->mt_fs_root; ffc0ea5c: 81 63 00 24 lwz r11,36(r3) ffc0ea60: 81 23 00 28 lwz r9,40(r3) ffc0ea64: 90 01 00 18 stw r0,24(r1) /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; ffc0ea68: 38 00 00 00 li r0,0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0ea6c: 93 e1 00 2c stw r31,44(r1) * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; ffc0ea70: 93 c1 00 08 stw r30,8(r1) ffc0ea74: 91 41 00 0c stw r10,12(r1) ffc0ea78: 91 61 00 10 stw r11,16(r1) ffc0ea7c: 91 21 00 14 stw r9,20(r1) /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; ffc0ea80: 90 03 00 1c stw r0,28(r3) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc0ea84: 38 61 00 08 addi r3,r1,8 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; ffc0ea88: 83 fe 00 08 lwz r31,8(r30) loc.node_access = (void *)jnode; ffc0ea8c: 93 c1 00 08 stw r30,8(r1) IMFS_Set_handlers( &loc ); ffc0ea90: 4b ff f4 a9 bl ffc0df38 if ( jnode->type != IMFS_DIRECTORY ) { ffc0ea94: 80 1e 00 4c lwz r0,76(r30) ffc0ea98: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ea9c: 40 9e 00 60 bne- cr7,ffc0eafc <== NEVER TAKEN result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { ffc0eaa0: 81 3e 00 50 lwz r9,80(r30) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0eaa4: 38 1e 00 54 addi r0,r30,84 ffc0eaa8: 7f 89 00 00 cmpw cr7,r9,r0 ffc0eaac: 41 9e 00 50 beq- cr7,ffc0eafc result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { ffc0eab0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0eab4: 41 9e 00 68 beq- cr7,ffc0eb1c <== NEVER TAKEN if ( jnode->type == IMFS_DIRECTORY ) { ffc0eab8: 80 1e 00 4c lwz r0,76(r30) ffc0eabc: 2f 80 00 01 cmpwi cr7,r0,1 ffc0eac0: 40 9e ff c4 bne+ cr7,ffc0ea84 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0eac4: 80 1e 00 50 lwz r0,80(r30) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0eac8: 39 3e 00 54 addi r9,r30,84 if ( jnode_has_children( jnode ) ) ffc0eacc: 7f 80 48 00 cmpw cr7,r0,r9 ffc0ead0: 41 be ff b4 beq- cr7,ffc0ea84 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); ffc0ead4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ead8: 41 9e 00 44 beq- cr7,ffc0eb1c <== NEVER TAKEN ffc0eadc: 7c 1e 03 78 mr r30,r0 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc0eae0: 38 61 00 08 addi r3,r1,8 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; ffc0eae4: 83 fe 00 08 lwz r31,8(r30) loc.node_access = (void *)jnode; ffc0eae8: 93 c1 00 08 stw r30,8(r1) IMFS_Set_handlers( &loc ); ffc0eaec: 4b ff f4 4d bl ffc0df38 if ( jnode->type != IMFS_DIRECTORY ) { ffc0eaf0: 80 1e 00 4c lwz r0,76(r30) ffc0eaf4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0eaf8: 41 be ff a8 beq- cr7,ffc0eaa0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); ffc0eafc: 38 60 00 00 li r3,0 ffc0eb00: 38 81 00 08 addi r4,r1,8 ffc0eb04: 4b ff 5b 8d bl ffc04690 if (result != 0) ffc0eb08: 2f 83 00 00 cmpwi cr7,r3,0 ffc0eb0c: 40 9e 00 2c bne- cr7,ffc0eb38 <== NEVER TAKEN return -1; jnode = next; ffc0eb10: 7f fe fb 78 mr r30,r31 } if ( jnode != NULL ) { ffc0eb14: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0eb18: 40 9e ff a0 bne+ cr7,ffc0eab8 } } } while (jnode != NULL); return 0; } ffc0eb1c: 80 01 00 34 lwz r0,52(r1) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; ffc0eb20: 38 60 00 00 li r3,0 } ffc0eb24: 83 c1 00 28 lwz r30,40(r1) ffc0eb28: 7c 08 03 a6 mtlr r0 ffc0eb2c: 83 e1 00 2c lwz r31,44(r1) ffc0eb30: 38 21 00 30 addi r1,r1,48 ffc0eb34: 4e 80 00 20 blr ffc0eb38: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; ffc0eb3c: 38 60 ff ff li r3,-1 <== NOT EXECUTED } } } while (jnode != NULL); return 0; } ffc0eb40: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc0eb44: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0eb48: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc0eb4c: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc0eb50: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0ec58 : const char *path, int pathlen, char *token, int *token_len ) { ffc0ec58: 94 21 ff e0 stwu r1,-32(r1) ffc0ec5c: 7c 08 02 a6 mflr r0 ffc0ec60: 93 41 00 08 stw r26,8(r1) ffc0ec64: 7c da 33 78 mr r26,r6 ffc0ec68: 93 81 00 10 stw r28,16(r1) register int i = 0; ffc0ec6c: 3b 80 00 00 li r28,0 const char *path, int pathlen, char *token, int *token_len ) { ffc0ec70: 93 a1 00 14 stw r29,20(r1) ffc0ec74: 7c 9d 23 78 mr r29,r4 ffc0ec78: 93 c1 00 18 stw r30,24(r1) ffc0ec7c: 7c be 2b 78 mr r30,r5 ffc0ec80: 93 e1 00 1c stw r31,28(r1) ffc0ec84: 7c 7f 1b 78 mr r31,r3 ffc0ec88: 90 01 00 24 stw r0,36(r1) ffc0ec8c: 93 61 00 0c stw r27,12(r1) register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; ffc0ec90: 8b 63 00 00 lbz r27,0(r3) while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { ffc0ec94: 48 00 00 08 b ffc0ec9c return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; ffc0ec98: 7f 7f e0 ae lbzx r27,r31,r28 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { ffc0ec9c: 7f 63 db 78 mr r3,r27 ffc0eca0: 4b ff 77 b5 bl ffc06454 ffc0eca4: 7f 1c e8 00 cmpw cr6,r28,r29 ffc0eca8: 2f 83 00 00 cmpwi cr7,r3,0 token[i] = c; if ( i == IMFS_NAME_MAX ) ffc0ecac: 2c 9c 00 20 cmpwi cr1,r28,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) ) { ffc0ecb0: 40 9e 00 40 bne- cr7,ffc0ecf0 ffc0ecb4: 40 98 00 3c bge- cr6,ffc0ecf0 <== NEVER TAKEN token[i] = c; ffc0ecb8: 7f 7e e1 ae stbx r27,r30,r28 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; ffc0ecbc: 3b 9c 00 01 addi r28,r28,1 c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) ffc0ecc0: 40 86 ff d8 bne+ cr1,ffc0ec98 return IMFS_INVALID_TOKEN; ffc0ecc4: 38 60 00 04 li r3,4 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } ffc0ecc8: 80 01 00 24 lwz r0,36(r1) ffc0eccc: 83 41 00 08 lwz r26,8(r1) ffc0ecd0: 7c 08 03 a6 mtlr r0 ffc0ecd4: 83 61 00 0c lwz r27,12(r1) ffc0ecd8: 83 81 00 10 lwz r28,16(r1) ffc0ecdc: 83 a1 00 14 lwz r29,20(r1) ffc0ece0: 83 c1 00 18 lwz r30,24(r1) ffc0ece4: 83 e1 00 1c lwz r31,28(r1) ffc0ece8: 38 21 00 20 addi r1,r1,32 ffc0ecec: 4e 80 00 20 blr /* * Copy a seperator into token. */ if ( i == 0 ) { ffc0ecf0: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0ecf4: 40 9e 00 28 bne- cr7,ffc0ed1c token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0ecf8: 2f 9b 00 00 cmpwi cr7,r27,0 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; ffc0ecfc: 9b 7e 00 00 stb r27,0(r30) if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; ffc0ed00: 38 60 00 00 li r3,0 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0ed04: 41 9e 00 10 beq- cr7,ffc0ed14 ffc0ed08: 2f 9d 00 00 cmpwi cr7,r29,0 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; ffc0ed0c: 7f 83 e3 78 mr r3,r28 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0ed10: 40 9e 00 8c bne- cr7,ffc0ed9c /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0ed14: 93 9a 00 00 stw r28,0(r26) ffc0ed18: 4b ff ff b0 b ffc0ecc8 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { ffc0ed1c: 7d 3e e2 14 add r9,r30,r28 ffc0ed20: 88 09 ff ff lbz r0,-1(r9) ffc0ed24: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ed28: 41 9e 00 0c beq- cr7,ffc0ed34 <== NEVER TAKEN token[i] = '\0'; ffc0ed2c: 38 00 00 00 li r0,0 ffc0ed30: 7c 1e e1 ae stbx r0,r30,r28 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0ed34: 93 9a 00 00 stw r28,0(r26) * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) ffc0ed38: 3c 80 ff c2 lis r4,-62 ffc0ed3c: 7f c3 f3 78 mr r3,r30 ffc0ed40: 38 84 f4 84 addi r4,r4,-2940 ffc0ed44: 48 00 50 6d bl ffc13db0 ffc0ed48: 2f 83 00 00 cmpwi cr7,r3,0 type = IMFS_UP_DIR; ffc0ed4c: 38 60 00 02 li r3,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 ) ffc0ed50: 41 be ff 78 beq- cr7,ffc0ecc8 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) ffc0ed54: 3c 80 ff c2 lis r4,-62 ffc0ed58: 7f c3 f3 78 mr r3,r30 ffc0ed5c: 38 84 f4 80 addi r4,r4,-2944 ffc0ed60: 48 00 50 51 bl ffc13db0 type = IMFS_CURRENT_DIR; } return type; } ffc0ed64: 80 01 00 24 lwz r0,36(r1) */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) ffc0ed68: 30 63 ff ff addic r3,r3,-1 ffc0ed6c: 7c 63 19 10 subfe r3,r3,r3 type = IMFS_CURRENT_DIR; } return type; } ffc0ed70: 83 41 00 08 lwz r26,8(r1) ffc0ed74: 7c 08 03 a6 mtlr r0 ffc0ed78: 83 61 00 0c lwz r27,12(r1) */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) ffc0ed7c: 54 63 00 3c rlwinm r3,r3,0,0,30 type = IMFS_CURRENT_DIR; } return type; } ffc0ed80: 83 81 00 10 lwz r28,16(r1) */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) ffc0ed84: 38 63 00 03 addi r3,r3,3 type = IMFS_CURRENT_DIR; } return type; } ffc0ed88: 83 a1 00 14 lwz r29,20(r1) ffc0ed8c: 83 c1 00 18 lwz r30,24(r1) ffc0ed90: 83 e1 00 1c lwz r31,28(r1) ffc0ed94: 38 21 00 20 addi r1,r1,32 ffc0ed98: 4e 80 00 20 blr if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; ffc0ed9c: 3b 80 00 01 li r28,1 type = IMFS_CURRENT_DIR; ffc0eda0: 38 60 00 01 li r3,1 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0eda4: 93 9a 00 00 stw r28,0(r26) ffc0eda8: 4b ff ff 20 b ffc0ecc8 =============================================================================== ffc041b0 : 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 ) { ffc041b0: 94 21 ff e0 stwu r1,-32(r1) ffc041b4: 7c 08 02 a6 mflr r0 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, ffc041b8: 3d 20 00 00 lis r9,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 ) { ffc041bc: 90 01 00 24 stw r0,36(r1) IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, ffc041c0: 80 09 26 f8 lwz r0,9976(r9) 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 ) { ffc041c4: 93 41 00 08 stw r26,8(r1) ffc041c8: 7c fa 3b 78 mr r26,r7 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { ffc041cc: 2f 80 00 10 cmpwi cr7,r0,16 const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { ffc041d0: 93 81 00 10 stw r28,16(r1) ffc041d4: 7c dc 33 78 mr r28,r6 ffc041d8: 93 a1 00 14 stw r29,20(r1) ffc041dc: 7c 9d 23 78 mr r29,r4 ffc041e0: 93 c1 00 18 stw r30,24(r1) ffc041e4: 7c be 2b 78 mr r30,r5 ffc041e8: 93 e1 00 1c stw r31,28(r1) ffc041ec: 7c 7f 1b 78 mr r31,r3 ffc041f0: 93 61 00 0c stw r27,12(r1) /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { ffc041f4: 41 9e 00 30 beq- cr7,ffc04224 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) ffc041f8: 2f 80 00 0f cmpwi cr7,r0,15 ffc041fc: 40 9d 00 24 ble- cr7,ffc04220 ffc04200: 39 60 00 05 li r11,5 ffc04204: 7d 69 03 a6 mtctr r11 ffc04208: 39 20 00 20 li r9,32 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { ffc0420c: 7f 80 48 00 cmpw cr7,r0,r9 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { ffc04210: 55 29 08 3c rlwinm r9,r9,1,0,30 if (bit_mask == requested_bytes_per_block) { ffc04214: 41 9e 00 10 beq- cr7,ffc04224 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) ffc04218: 41 9c 00 08 blt- cr7,ffc04220 <== NEVER TAKEN int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { ffc0421c: 42 00 ff f0 bdnz+ ffc0420c if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); ffc04220: 38 00 00 80 li r0,128 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ffc04224: 3d 20 00 00 lis r9,0 ffc04228: 90 09 27 a4 stw r0,10148(r9) /* * 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(); ffc0422c: 48 00 9c 35 bl ffc0de60 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; ffc04230: 3c 80 ff c2 lis r4,-62 /* * 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(); ffc04234: 90 7f 00 1c stw r3,28(r31) 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; ffc04238: 38 84 f4 28 addi r4,r4,-3032 ffc0423c: 38 a0 00 30 li r5,48 * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; ffc04240: 93 9f 00 24 stw r28,36(r31) /* * 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(); ffc04244: 7c 7b 1b 78 mr r27,r3 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; ffc04248: 38 7f 00 38 addi r3,r31,56 * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; ffc0424c: 93 bf 00 28 stw r29,40(r31) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; ffc04250: 48 00 f5 4d bl ffc1379c /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); ffc04254: 38 60 00 01 li r3,1 ffc04258: 38 80 00 14 li r4,20 ffc0425c: 48 00 08 a1 bl ffc04afc if ( !fs_info ) { ffc04260: 7c 69 1b 79 mr. r9,r3 ffc04264: 41 82 00 60 beq- ffc042c4 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc04268: 3d 60 00 00 lis r11,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; ffc0426c: 91 3f 00 34 stw r9,52(r31) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; ffc04270: 38 00 00 01 li r0,1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc04274: 81 4b 28 74 lwz r10,10356(r11) fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; ffc04278: 38 60 00 00 li r3,0 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; ffc0427c: 90 09 00 04 stw r0,4(r9) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc04280: 39 0a 00 01 addi r8,r10,1 ffc04284: 91 49 00 00 stw r10,0(r9) fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; ffc04288: 93 c9 00 08 stw r30,8(r9) fs_info->directory_handlers = directory_handlers; ffc0428c: 93 89 00 0c stw r28,12(r9) fs_info->fifo_handlers = fifo_handlers; ffc04290: 93 49 00 10 stw r26,16(r9) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc04294: 91 0b 28 74 stw r8,10356(r11) fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; ffc04298: 90 1b 00 38 stw r0,56(r27) return 0; } ffc0429c: 80 01 00 24 lwz r0,36(r1) ffc042a0: 83 41 00 08 lwz r26,8(r1) ffc042a4: 7c 08 03 a6 mtlr r0 ffc042a8: 83 61 00 0c lwz r27,12(r1) ffc042ac: 83 81 00 10 lwz r28,16(r1) ffc042b0: 83 a1 00 14 lwz r29,20(r1) ffc042b4: 83 c1 00 18 lwz r30,24(r1) ffc042b8: 83 e1 00 1c lwz r31,28(r1) ffc042bc: 38 21 00 20 addi r1,r1,32 ffc042c0: 4e 80 00 20 blr /* * 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); ffc042c4: 7f 63 db 78 mr r3,r27 ffc042c8: 48 00 0e 39 bl ffc05100 rtems_set_errno_and_return_minus_one(ENOMEM); ffc042cc: 48 00 e7 95 bl ffc12a60 <__errno> ffc042d0: 38 00 00 0c li r0,12 ffc042d4: 90 03 00 00 stw r0,0(r3) ffc042d8: 38 60 ff ff li r3,-1 ffc042dc: 4b ff ff c0 b ffc0429c =============================================================================== ffc11470 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc11470: 94 21 ff d8 stwu r1,-40(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11474: 3d 20 00 00 lis r9,0 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc11478: 7c 08 02 a6 mflr r0 ffc1147c: 93 a1 00 1c stw r29,28(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11480: 83 a9 27 a4 lwz r29,10148(r9) */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc11484: 90 01 00 2c stw r0,44(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11488: 57 a9 f0 be rlwinm r9,r29,30,2,31 ffc1148c: 39 69 00 01 addi r11,r9,1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc11490: 93 41 00 10 stw r26,16(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11494: 7d 6b 49 d6 mullw r11,r11,r9 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc11498: 93 81 00 18 stw r28,24(r1) ffc1149c: 7c da 33 78 mr r26,r6 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc114a0: 38 0b 00 01 addi r0,r11,1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc114a4: 93 e1 00 24 stw r31,36(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc114a8: 39 60 00 00 li r11,0 ffc114ac: 7f 8b 28 00 cmpw cr7,r11,r5 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc114b0: 93 01 00 08 stw r24,8(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc114b4: 7d 20 49 d6 mullw r9,r0,r9 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc114b8: 93 21 00 0c stw r25,12(r1) ffc114bc: 7c bc 2b 78 mr r28,r5 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc114c0: 39 29 ff ff addi r9,r9,-1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc114c4: 93 61 00 14 stw r27,20(r1) ffc114c8: 7c 7f 1b 78 mr r31,r3 ffc114cc: 93 c1 00 20 stw r30,32(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc114d0: 7d 29 e9 d6 mullw r9,r9,r29 ffc114d4: 40 9d 01 50 ble- cr7,ffc11624 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) ffc114d8: 83 7f 00 50 lwz r27,80(r31) ffc114dc: 83 3f 00 54 lwz r25,84(r31) ffc114e0: 7f 9c d8 00 cmpw cr7,r28,r27 ffc114e4: 40 9d 00 c4 ble- cr7,ffc115a8 <== ALWAYS TAKEN return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc114e8: 7f b8 fe 70 srawi r24,r29,31 ffc114ec: 7f 05 c3 78 mr r5,r24 ffc114f0: 7f a6 eb 78 mr r6,r29 ffc114f4: 7f 83 e3 78 mr r3,r28 ffc114f8: 7f 44 d3 78 mr r4,r26 ffc114fc: 48 00 ac 99 bl ffc1c194 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11500: 7f 63 db 78 mr r3,r27 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11504: 7c 9e 23 78 mr r30,r4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11508: 7f 05 c3 78 mr r5,r24 ffc1150c: 7f 24 cb 78 mr r4,r25 ffc11510: 7f a6 eb 78 mr r6,r29 ffc11514: 48 00 ac 81 bl ffc1c194 <__divdi3> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc11518: 7f 9e 20 40 cmplw cr7,r30,r4 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc1151c: 7c 9b 23 78 mr r27,r4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc11520: 41 9c 00 c8 blt- cr7,ffc115e8 <== NEVER TAKEN ffc11524: 7c 9d 23 78 mr r29,r4 ffc11528: 48 00 00 10 b ffc11538 ffc1152c: 3b bd 00 01 addi r29,r29,1 ffc11530: 7f 9e e8 40 cmplw cr7,r30,r29 ffc11534: 41 9c 00 b4 blt- cr7,ffc115e8 if ( IMFS_memfile_addblock( the_jnode, block ) ) { ffc11538: 7f a4 eb 78 mr r4,r29 ffc1153c: 7f e3 fb 78 mr r3,r31 ffc11540: 4b ff fc 2d bl ffc1116c ffc11544: 2f 83 00 00 cmpwi cr7,r3,0 ffc11548: 41 9e ff e4 beq+ cr7,ffc1152c ffc1154c: 48 00 00 14 b ffc11560 for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); ffc11550: 7f a4 eb 78 mr r4,r29 ffc11554: 7f e3 fb 78 mr r3,r31 /* * 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-- ) { ffc11558: 3b bd ff ff addi r29,r29,-1 IMFS_memfile_remove_block( the_jnode, block ); ffc1155c: 4b ff fe d9 bl ffc11434 /* * 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-- ) { ffc11560: 7f 9b e8 40 cmplw cr7,r27,r29 ffc11564: 40 9d ff ec ble+ cr7,ffc11550 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); ffc11568: 48 00 14 f9 bl ffc12a60 <__errno> ffc1156c: 38 00 00 1c li r0,28 ffc11570: 90 03 00 00 stw r0,0(r3) ffc11574: 38 60 ff ff li r3,-1 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } ffc11578: 80 01 00 2c lwz r0,44(r1) ffc1157c: 83 01 00 08 lwz r24,8(r1) ffc11580: 7c 08 03 a6 mtlr r0 ffc11584: 83 21 00 0c lwz r25,12(r1) ffc11588: 83 41 00 10 lwz r26,16(r1) ffc1158c: 83 61 00 14 lwz r27,20(r1) ffc11590: 83 81 00 18 lwz r28,24(r1) ffc11594: 83 a1 00 1c lwz r29,28(r1) ffc11598: 83 c1 00 20 lwz r30,32(r1) ffc1159c: 83 e1 00 24 lwz r31,36(r1) ffc115a0: 38 21 00 28 addi r1,r1,40 ffc115a4: 4e 80 00 20 blr rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) ffc115a8: 40 9e 00 0c bne- cr7,ffc115b4 <== NEVER TAKEN ffc115ac: 7f 9a c8 40 cmplw cr7,r26,r25 ffc115b0: 41 9d ff 38 bgt+ cr7,ffc114e8 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } ffc115b4: 80 01 00 2c lwz r0,44(r1) /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) return 0; ffc115b8: 38 60 00 00 li r3,0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } ffc115bc: 83 01 00 08 lwz r24,8(r1) ffc115c0: 7c 08 03 a6 mtlr r0 ffc115c4: 83 21 00 0c lwz r25,12(r1) ffc115c8: 83 41 00 10 lwz r26,16(r1) ffc115cc: 83 61 00 14 lwz r27,20(r1) ffc115d0: 83 81 00 18 lwz r28,24(r1) ffc115d4: 83 a1 00 1c lwz r29,28(r1) ffc115d8: 83 c1 00 20 lwz r30,32(r1) ffc115dc: 83 e1 00 24 lwz r31,36(r1) ffc115e0: 38 21 00 28 addi r1,r1,40 ffc115e4: 4e 80 00 20 blr } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc115e8: 93 9f 00 50 stw r28,80(r31) return 0; ffc115ec: 38 60 00 00 li r3,0 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc115f0: 93 5f 00 54 stw r26,84(r31) return 0; } ffc115f4: 80 01 00 2c lwz r0,44(r1) ffc115f8: 83 01 00 08 lwz r24,8(r1) ffc115fc: 7c 08 03 a6 mtlr r0 ffc11600: 83 21 00 0c lwz r25,12(r1) ffc11604: 83 41 00 10 lwz r26,16(r1) ffc11608: 83 61 00 14 lwz r27,20(r1) ffc1160c: 83 81 00 18 lwz r28,24(r1) ffc11610: 83 a1 00 1c lwz r29,28(r1) ffc11614: 83 c1 00 20 lwz r30,32(r1) ffc11618: 83 e1 00 24 lwz r31,36(r1) ffc1161c: 38 21 00 28 addi r1,r1,40 ffc11620: 4e 80 00 20 blr IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11624: 40 9e 00 0c bne- cr7,ffc11630 <== NEVER TAKEN ffc11628: 7f 89 30 40 cmplw cr7,r9,r6 ffc1162c: 41 9d fe ac bgt+ cr7,ffc114d8 rtems_set_errno_and_return_minus_one( EINVAL ); ffc11630: 48 00 14 31 bl ffc12a60 <__errno> ffc11634: 38 00 00 16 li r0,22 ffc11638: 90 03 00 00 stw r0,0(r3) ffc1163c: 38 60 ff ff li r3,-1 ffc11640: 4b ff ff 38 b ffc11578 =============================================================================== ffc10bac : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc10bac: 94 21 ff d8 stwu r1,-40(r1) ffc10bb0: 7c 08 02 a6 mflr r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc10bb4: 3d 20 00 00 lis r9,0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc10bb8: 90 01 00 2c stw r0,44(r1) my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc10bbc: 80 09 27 a4 lwz r0,10148(r9) #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc10bc0: 93 e1 00 24 stw r31,36(r1) ffc10bc4: 7c 7f 1b 78 mr r31,r3 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc10bc8: 54 09 f0 be rlwinm r9,r0,30,2,31 ffc10bcc: 38 09 ff ff addi r0,r9,-1 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc10bd0: 93 61 00 14 stw r27,20(r1) my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc10bd4: 7f 84 00 40 cmplw cr7,r4,r0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc10bd8: 93 81 00 18 stw r28,24(r1) ffc10bdc: 93 a1 00 1c stw r29,28(r1) ffc10be0: 93 c1 00 20 stw r30,32(r1) my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc10be4: 41 9d 00 4c bgt- cr7,ffc10c30 p = info->indirect; if ( malloc_it ) { ffc10be8: 2f 85 00 00 cmpwi cr7,r5,0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; ffc10bec: 80 63 00 58 lwz r3,88(r3) if ( malloc_it ) { ffc10bf0: 40 9e 01 5c bne- cr7,ffc10d4c info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) ffc10bf4: 2f 83 00 00 cmpwi cr7,r3,0 return 0; ffc10bf8: 3b c0 00 00 li r30,0 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) ffc10bfc: 41 9e 00 0c beq- cr7,ffc10c08 <== NEVER TAKEN return 0; return &info->indirect[ my_block ]; ffc10c00: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc10c04: 7f c3 22 14 add r30,r3,r4 /* * This means the requested block number is out of range. */ return 0; } ffc10c08: 80 01 00 2c lwz r0,44(r1) ffc10c0c: 7f c3 f3 78 mr r3,r30 ffc10c10: 83 61 00 14 lwz r27,20(r1) ffc10c14: 7c 08 03 a6 mtlr r0 ffc10c18: 83 81 00 18 lwz r28,24(r1) ffc10c1c: 83 a1 00 1c lwz r29,28(r1) ffc10c20: 83 c1 00 20 lwz r30,32(r1) ffc10c24: 83 e1 00 24 lwz r31,36(r1) ffc10c28: 38 21 00 28 addi r1,r1,40 ffc10c2c: 4e 80 00 20 blr /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { ffc10c30: 3b 69 00 01 addi r27,r9,1 ffc10c34: 7f 7b 49 d6 mullw r27,r27,r9 ffc10c38: 38 1b ff ff addi r0,r27,-1 ffc10c3c: 7f 84 00 40 cmplw cr7,r4,r0 ffc10c40: 40 9d 00 a4 ble- cr7,ffc10ce4 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc10c44: 39 7b 00 01 addi r11,r27,1 ffc10c48: 7d 6b 49 d6 mullw r11,r11,r9 } /* * This means the requested block number is out of range. */ return 0; ffc10c4c: 3b c0 00 00 li r30,0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc10c50: 38 0b ff ff addi r0,r11,-1 ffc10c54: 7f 84 00 40 cmplw cr7,r4,r0 ffc10c58: 41 bd ff b0 bgt- cr7,ffc10c08 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; ffc10c5c: 7c 9b 20 50 subf r4,r27,r4 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; ffc10c60: 81 43 00 60 lwz r10,96(r3) * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc10c64: 7d 64 4b 96 divwu r11,r4,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; ffc10c68: 7f ab 4b 96 divwu r29,r11,r9 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { ffc10c6c: 2f 85 00 00 cmpwi cr7,r5,0 * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc10c70: 7f 6b 49 d6 mullw r27,r11,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ffc10c74: 7d 3d 49 d6 mullw r9,r29,r9 * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc10c78: 7f 7b 20 50 subf r27,r27,r4 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ffc10c7c: 7f 89 58 50 subf r28,r9,r11 p = info->triply_indirect; if ( malloc_it ) { ffc10c80: 41 9e 01 40 beq- cr7,ffc10dc0 if ( !p ) { ffc10c84: 2f 8a 00 00 cmpwi cr7,r10,0 ffc10c88: 41 9e 01 f0 beq- cr7,ffc10e78 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; ffc10c8c: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc10c90: 7d 6a e8 2e lwzx r11,r10,r29 ffc10c94: 7f aa ea 14 add r29,r10,r29 if ( !p1 ) { ffc10c98: 2f 8b 00 00 cmpwi cr7,r11,0 ffc10c9c: 41 9e 01 c4 beq- cr7,ffc10e60 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; ffc10ca0: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc10ca4: 7c 6b e0 2e lwzx r3,r11,r28 ffc10ca8: 7f 8b e2 14 add r28,r11,r28 if ( !p2 ) { ffc10cac: 2f 83 00 00 cmpwi cr7,r3,0 ffc10cb0: 41 9e 01 80 beq- cr7,ffc10e30 /* * This means the requested block number is out of range. */ return 0; } ffc10cb4: 80 01 00 2c lwz r0,44(r1) p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; ffc10cb8: 57 7e 10 3a rlwinm r30,r27,2,0,29 ffc10cbc: 7f c3 f2 14 add r30,r3,r30 /* * This means the requested block number is out of range. */ return 0; } ffc10cc0: 83 61 00 14 lwz r27,20(r1) ffc10cc4: 7c 08 03 a6 mtlr r0 ffc10cc8: 7f c3 f3 78 mr r3,r30 ffc10ccc: 83 81 00 18 lwz r28,24(r1) ffc10cd0: 83 a1 00 1c lwz r29,28(r1) ffc10cd4: 83 c1 00 20 lwz r30,32(r1) ffc10cd8: 83 e1 00 24 lwz r31,36(r1) ffc10cdc: 38 21 00 28 addi r1,r1,40 ffc10ce0: 4e 80 00 20 blr /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; ffc10ce4: 7c 89 20 50 subf r4,r9,r4 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; ffc10ce8: 81 63 00 5c lwz r11,92(r3) */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc10cec: 7f a4 4b 96 divwu r29,r4,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc10cf0: 2f 85 00 00 cmpwi cr7,r5,0 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc10cf4: 7d 3d 49 d6 mullw r9,r29,r9 ffc10cf8: 7f 89 20 50 subf r28,r9,r4 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc10cfc: 41 9e 00 78 beq- cr7,ffc10d74 if ( !p ) { ffc10d00: 2f 8b 00 00 cmpwi cr7,r11,0 ffc10d04: 41 9e 01 44 beq- cr7,ffc10e48 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; ffc10d08: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc10d0c: 7c 6b e8 2e lwzx r3,r11,r29 ffc10d10: 7f ab ea 14 add r29,r11,r29 if ( !p1 ) { ffc10d14: 2f 83 00 00 cmpwi cr7,r3,0 ffc10d18: 41 9e 01 00 beq- cr7,ffc10e18 /* * This means the requested block number is out of range. */ return 0; } ffc10d1c: 80 01 00 2c lwz r0,44(r1) if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; ffc10d20: 57 9e 10 3a rlwinm r30,r28,2,0,29 ffc10d24: 7f c3 f2 14 add r30,r3,r30 /* * This means the requested block number is out of range. */ return 0; } ffc10d28: 83 61 00 14 lwz r27,20(r1) ffc10d2c: 7c 08 03 a6 mtlr r0 ffc10d30: 7f c3 f3 78 mr r3,r30 ffc10d34: 83 81 00 18 lwz r28,24(r1) ffc10d38: 83 a1 00 1c lwz r29,28(r1) ffc10d3c: 83 c1 00 20 lwz r30,32(r1) ffc10d40: 83 e1 00 24 lwz r31,36(r1) ffc10d44: 38 21 00 28 addi r1,r1,40 ffc10d48: 4e 80 00 20 blr if ( my_block <= LAST_INDIRECT ) { p = info->indirect; if ( malloc_it ) { if ( !p ) { ffc10d4c: 2f 83 00 00 cmpwi cr7,r3,0 ffc10d50: 40 9e fe b0 bne+ cr7,ffc10c00 p = memfile_alloc_block(); ffc10d54: 90 81 00 08 stw r4,8(r1) ffc10d58: 4b ff fe 11 bl ffc10b68 if ( !p ) ffc10d5c: 2c 03 00 00 cmpwi r3,0 return 0; ffc10d60: 3b c0 00 00 li r30,0 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) ffc10d64: 80 81 00 08 lwz r4,8(r1) ffc10d68: 41 a2 fe a0 beq- ffc10c08 <== NEVER TAKEN return 0; info->indirect = p; ffc10d6c: 90 7f 00 58 stw r3,88(r31) ffc10d70: 4b ff fe 90 b ffc10c00 } return (block_p *)&p1[ singly ]; } if ( !p ) ffc10d74: 2f 8b 00 00 cmpwi cr7,r11,0 return 0; ffc10d78: 3b c0 00 00 li r30,0 } return (block_p *)&p1[ singly ]; } if ( !p ) ffc10d7c: 41 be fe 8c beq- cr7,ffc10c08 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; ffc10d80: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc10d84: 7c 0b e8 2e lwzx r0,r11,r29 if ( !p ) ffc10d88: 2f 80 00 00 cmpwi cr7,r0,0 ffc10d8c: 41 be fe 7c beq- cr7,ffc10c08 <== NEVER TAKEN return 0; return (block_p *)&p[ singly ]; ffc10d90: 57 9e 10 3a rlwinm r30,r28,2,0,29 /* * This means the requested block number is out of range. */ return 0; } ffc10d94: 83 61 00 14 lwz r27,20(r1) p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; ffc10d98: 7f c0 f2 14 add r30,r0,r30 /* * This means the requested block number is out of range. */ return 0; } ffc10d9c: 80 01 00 2c lwz r0,44(r1) ffc10da0: 7f c3 f3 78 mr r3,r30 ffc10da4: 83 81 00 18 lwz r28,24(r1) ffc10da8: 7c 08 03 a6 mtlr r0 ffc10dac: 83 a1 00 1c lwz r29,28(r1) ffc10db0: 83 c1 00 20 lwz r30,32(r1) ffc10db4: 83 e1 00 24 lwz r31,36(r1) ffc10db8: 38 21 00 28 addi r1,r1,40 ffc10dbc: 4e 80 00 20 blr p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) ffc10dc0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc10dc4: 41 be fe 44 beq- cr7,ffc10c08 <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; ffc10dc8: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc10dcc: 7d 6a e8 2e lwzx r11,r10,r29 if ( !p1 ) ffc10dd0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc10dd4: 41 be fe 34 beq- cr7,ffc10c08 <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; ffc10dd8: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc10ddc: 7c 0b e0 2e lwzx r0,r11,r28 if ( !p2 ) ffc10de0: 2f 80 00 00 cmpwi cr7,r0,0 ffc10de4: 41 be fe 24 beq- cr7,ffc10c08 <== NEVER TAKEN return 0; return (block_p *)&p2[ singly ]; ffc10de8: 57 7e 10 3a rlwinm r30,r27,2,0,29 /* * This means the requested block number is out of range. */ return 0; } ffc10dec: 83 81 00 18 lwz r28,24(r1) p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; ffc10df0: 7f c0 f2 14 add r30,r0,r30 /* * This means the requested block number is out of range. */ return 0; } ffc10df4: 80 01 00 2c lwz r0,44(r1) ffc10df8: 7f c3 f3 78 mr r3,r30 ffc10dfc: 83 61 00 14 lwz r27,20(r1) ffc10e00: 7c 08 03 a6 mtlr r0 ffc10e04: 83 a1 00 1c lwz r29,28(r1) ffc10e08: 83 c1 00 20 lwz r30,32(r1) ffc10e0c: 83 e1 00 24 lwz r31,36(r1) ffc10e10: 38 21 00 28 addi r1,r1,40 ffc10e14: 4e 80 00 20 blr info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); ffc10e18: 4b ff fd 51 bl ffc10b68 if ( !p1 ) return 0; ffc10e1c: 3b c0 00 00 li r30,0 } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) ffc10e20: 2c 03 00 00 cmpwi r3,0 ffc10e24: 41 a2 fd e4 beq- ffc10c08 <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; ffc10e28: 90 7d 00 00 stw r3,0(r29) ffc10e2c: 4b ff fe f0 b ffc10d1c p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); ffc10e30: 4b ff fd 39 bl ffc10b68 if ( !p2 ) return 0; ffc10e34: 3b c0 00 00 li r30,0 } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) ffc10e38: 2c 03 00 00 cmpwi r3,0 ffc10e3c: 41 a2 fd cc beq- ffc10c08 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; ffc10e40: 90 7c 00 00 stw r3,0(r28) ffc10e44: 4b ff fe 70 b ffc10cb4 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc10e48: 4b ff fd 21 bl ffc10b68 if ( !p ) return 0; ffc10e4c: 3b c0 00 00 li r30,0 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) ffc10e50: 7c 6b 1b 79 mr. r11,r3 ffc10e54: 41 a2 fd b4 beq- ffc10c08 <== NEVER TAKEN return 0; info->doubly_indirect = p; ffc10e58: 91 7f 00 5c stw r11,92(r31) ffc10e5c: 4b ff fe ac b ffc10d08 info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); ffc10e60: 4b ff fd 09 bl ffc10b68 if ( !p1 ) return 0; ffc10e64: 3b c0 00 00 li r30,0 } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) ffc10e68: 7c 6b 1b 79 mr. r11,r3 ffc10e6c: 41 a2 fd 9c beq- ffc10c08 <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; ffc10e70: 91 7d 00 00 stw r11,0(r29) ffc10e74: 4b ff fe 2c b ffc10ca0 p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc10e78: 4b ff fc f1 bl ffc10b68 if ( !p ) ffc10e7c: 7c 6a 1b 79 mr. r10,r3 ffc10e80: 41 a2 fd 88 beq- ffc10c08 <== NEVER TAKEN return 0; info->triply_indirect = p; ffc10e84: 91 5f 00 60 stw r10,96(r31) ffc10e88: 4b ff fe 04 b ffc10c8c =============================================================================== ffc10e8c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc10e8c: 94 21 ff c0 stwu r1,-64(r1) ffc10e90: 7c 08 02 a6 mflr r0 ffc10e94: 90 01 00 44 stw r0,68(r1) * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { ffc10e98: 80 03 00 4c lwz r0,76(r3) IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc10e9c: 93 81 00 30 stw r28,48(r1) ffc10ea0: 7c fc 3b 78 mr r28,r7 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { ffc10ea4: 2f 80 00 06 cmpwi cr7,r0,6 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc10ea8: 93 a1 00 34 stw r29,52(r1) ffc10eac: 7c 7d 1b 78 mr r29,r3 ffc10eb0: 93 c1 00 38 stw r30,56(r1) ffc10eb4: 7c be 2b 78 mr r30,r5 ffc10eb8: 93 e1 00 3c stw r31,60(r1) ffc10ebc: 7c df 33 78 mr r31,r6 ffc10ec0: 92 e1 00 1c stw r23,28(r1) ffc10ec4: 93 01 00 20 stw r24,32(r1) ffc10ec8: 93 21 00 24 stw r25,36(r1) ffc10ecc: 93 41 00 28 stw r26,40(r1) ffc10ed0: 93 61 00 2c stw r27,44(r1) * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { ffc10ed4: 41 9e 01 d0 beq- cr7,ffc110a4 /* * 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 ) ffc10ed8: 80 03 00 50 lwz r0,80(r3) ffc10edc: 39 20 00 00 li r9,0 ffc10ee0: 83 43 00 54 lwz r26,84(r3) ffc10ee4: 7f 89 00 00 cmpw cr7,r9,r0 /* * 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; ffc10ee8: 7c c0 33 78 mr r0,r6 ffc10eec: 7d 28 32 14 add r9,r8,r6 if ( last_byte > the_jnode->info.file.size ) ffc10ef0: 40 9d 01 28 ble- cr7,ffc11018 <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; ffc10ef4: 7f 40 d0 50 subf r26,r0,r26 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10ef8: 3f 20 00 00 lis r25,0 ffc10efc: 83 79 27 a4 lwz r27,10148(r25) ffc10f00: 7f c3 f3 78 mr r3,r30 ffc10f04: 7f e4 fb 78 mr r4,r31 ffc10f08: 7f 78 fe 70 srawi r24,r27,31 ffc10f0c: 7f 05 c3 78 mr r5,r24 ffc10f10: 7f 66 db 78 mr r6,r27 ffc10f14: 48 00 b6 c1 bl ffc1c5d4 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10f18: 7f c3 f3 78 mr r3,r30 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10f1c: 7c 97 23 78 mr r23,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10f20: 7f 05 c3 78 mr r5,r24 ffc10f24: 7f e4 fb 78 mr r4,r31 ffc10f28: 7f 66 db 78 mr r6,r27 ffc10f2c: 48 00 b2 69 bl ffc1c194 <__divdi3> if ( start_offset ) { ffc10f30: 2f 97 00 00 cmpwi cr7,r23,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; ffc10f34: 7c 9e 23 78 mr r30,r4 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; ffc10f38: 7f 98 e3 78 mr r24,r28 */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; ffc10f3c: 3b e0 00 00 li r31,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 ) { ffc10f40: 41 9e 00 50 beq- cr7,ffc10f90 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 ); ffc10f44: 7f a3 eb 78 mr r3,r29 ffc10f48: 38 a0 00 00 li r5,0 ffc10f4c: 4b ff fc 61 bl ffc10bac if ( !block_ptr ) ffc10f50: 7c 69 1b 79 mr. r9,r3 return copied; ffc10f54: 38 60 00 00 li r3,0 if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) ffc10f58: 41 82 00 8c beq- ffc10fe4 <== NEVER TAKEN * 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 ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; ffc10f5c: 7f 77 d8 50 subf r27,r23,r27 ffc10f60: 7f 9a d8 40 cmplw cr7,r26,r27 ffc10f64: 7f 5f d3 78 mr r31,r26 ffc10f68: 41 9d 01 cc bgt- cr7,ffc11134 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 ); ffc10f6c: 80 89 00 00 lwz r4,0(r9) ffc10f70: 7f 83 e3 78 mr r3,r28 ffc10f74: 7f e5 fb 78 mr r5,r31 ffc10f78: 7c 84 ba 14 add r4,r4,r23 ffc10f7c: 48 00 28 21 bl ffc1379c dest += to_copy; block++; my_length -= to_copy; ffc10f80: 83 79 27 a4 lwz r27,10148(r25) 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; ffc10f84: 7f 1c fa 14 add r24,r28,r31 block++; ffc10f88: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; ffc10f8c: 7f 5f d0 50 subf r26,r31,r26 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc10f90: 7f 9a d8 40 cmplw cr7,r26,r27 ffc10f94: 40 bc 00 20 bge+ cr7,ffc10fb4 ffc10f98: 48 00 00 8c b ffc11024 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc10f9c: 80 89 00 00 lwz r4,0(r9) dest += to_copy; block++; my_length -= to_copy; copied += to_copy; ffc10fa0: 7f ff da 14 add r31,r31,r27 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 ); ffc10fa4: 48 00 27 f9 bl ffc1379c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc10fa8: 80 19 27 a4 lwz r0,10148(r25) ffc10fac: 7f 80 d0 40 cmplw cr7,r0,r26 ffc10fb0: 41 9d 00 74 bgt- cr7,ffc11024 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc10fb4: 7f c4 f3 78 mr r4,r30 ffc10fb8: 38 a0 00 00 li r5,0 ffc10fbc: 7f a3 eb 78 mr r3,r29 ffc10fc0: 4b ff fb ed bl ffc10bac if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; ffc10fc4: 7f 5b d0 50 subf r26,r27,r26 * Phase 2: all of zero of more blocks */ 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 ) ffc10fc8: 7c 69 1b 79 mr. r9,r3 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc10fcc: 7f 65 db 78 mr r5,r27 ffc10fd0: 7f 03 c3 78 mr r3,r24 dest += to_copy; block++; ffc10fd4: 3b de 00 01 addi r30,r30,1 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 ); dest += to_copy; ffc10fd8: 7f 18 da 14 add r24,r24,r27 * Phase 2: all of zero of more blocks */ 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 ) ffc10fdc: 40 82 ff c0 bne+ ffc10f9c <== ALWAYS TAKEN IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; ffc10fe0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } ffc10fe4: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc10fe8: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc10fec: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc10ff0: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc10ff4: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc10ff8: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc10ffc: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc11000: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc11004: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc11008: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc1100c: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc11010: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc11014: 4e 80 00 20 blr <== NOT EXECUTED /* * 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 ) ffc11018: 41 9e 01 0c beq- cr7,ffc11124 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc1101c: 7d 1a 43 78 mr r26,r8 <== NOT EXECUTED ffc11020: 4b ff fe d8 b ffc10ef8 <== NOT EXECUTED /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { ffc11024: 2f 9a 00 00 cmpwi cr7,r26,0 ffc11028: 41 9e 00 30 beq- cr7,ffc11058 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc1102c: 7f a3 eb 78 mr r3,r29 ffc11030: 7f c4 f3 78 mr r4,r30 ffc11034: 38 a0 00 00 li r5,0 ffc11038: 4b ff fb 75 bl ffc10bac if ( !block_ptr ) ffc1103c: 2c 03 00 00 cmpwi r3,0 ffc11040: 41 a2 ff a0 beq- ffc10fe0 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); ffc11044: 80 83 00 00 lwz r4,0(r3) ffc11048: 7f 45 d3 78 mr r5,r26 ffc1104c: 7f 03 c3 78 mr r3,r24 ffc11050: 48 00 27 4d bl ffc1379c copied += my_length; ffc11054: 7f ff d2 14 add r31,r31,r26 } IMFS_update_atime( the_jnode ); ffc11058: 38 61 00 08 addi r3,r1,8 ffc1105c: 38 80 00 00 li r4,0 ffc11060: 4b ff 41 69 bl ffc051c8 ffc11064: 80 01 00 08 lwz r0,8(r1) return copied; ffc11068: 7f e3 fb 78 mr r3,r31 } ffc1106c: 82 e1 00 1c lwz r23,28(r1) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); ffc11070: 90 1d 00 40 stw r0,64(r29) return copied; } ffc11074: 80 01 00 44 lwz r0,68(r1) ffc11078: 83 01 00 20 lwz r24,32(r1) ffc1107c: 7c 08 03 a6 mtlr r0 ffc11080: 83 21 00 24 lwz r25,36(r1) ffc11084: 83 41 00 28 lwz r26,40(r1) ffc11088: 83 61 00 2c lwz r27,44(r1) ffc1108c: 83 81 00 30 lwz r28,48(r1) ffc11090: 83 a1 00 34 lwz r29,52(r1) ffc11094: 83 c1 00 38 lwz r30,56(r1) ffc11098: 83 e1 00 3c lwz r31,60(r1) ffc1109c: 38 21 00 40 addi r1,r1,64 ffc110a0: 4e 80 00 20 blr 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)) ffc110a4: 81 43 00 50 lwz r10,80(r3) ffc110a8: 38 00 00 00 li r0,0 ffc110ac: 81 63 00 54 lwz r11,84(r3) my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; ffc110b0: 80 83 00 58 lwz r4,88(r3) if (my_length > (the_jnode->info.linearfile.size - start)) ffc110b4: 7c ff 58 10 subfc r7,r31,r11 ffc110b8: 7c de 51 10 subfe r6,r30,r10 ffc110bc: 7f 80 30 00 cmpw cr7,r0,r6 ffc110c0: 40 9d 00 7c ble- cr7,ffc1113c <== ALWAYS TAKEN my_length = the_jnode->info.linearfile.size - start; ffc110c4: 7f 5f 58 50 subf r26,r31,r11 memcpy(dest, &file_ptr[start], my_length); ffc110c8: 7c 84 fa 14 add r4,r4,r31 ffc110cc: 7f 45 d3 78 mr r5,r26 ffc110d0: 7f 83 e3 78 mr r3,r28 ffc110d4: 48 00 26 c9 bl ffc1379c IMFS_update_atime( the_jnode ); ffc110d8: 38 61 00 08 addi r3,r1,8 ffc110dc: 38 80 00 00 li r4,0 ffc110e0: 4b ff 40 e9 bl ffc051c8 ffc110e4: 80 01 00 08 lwz r0,8(r1) return my_length; ffc110e8: 7f 43 d3 78 mr r3,r26 } IMFS_update_atime( the_jnode ); return copied; } ffc110ec: 82 e1 00 1c lwz r23,28(r1) if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); IMFS_update_atime( the_jnode ); ffc110f0: 90 1d 00 40 stw r0,64(r29) } IMFS_update_atime( the_jnode ); return copied; } ffc110f4: 80 01 00 44 lwz r0,68(r1) ffc110f8: 83 01 00 20 lwz r24,32(r1) ffc110fc: 7c 08 03 a6 mtlr r0 ffc11100: 83 21 00 24 lwz r25,36(r1) ffc11104: 83 41 00 28 lwz r26,40(r1) ffc11108: 83 61 00 2c lwz r27,44(r1) ffc1110c: 83 81 00 30 lwz r28,48(r1) ffc11110: 83 a1 00 34 lwz r29,52(r1) ffc11114: 83 c1 00 38 lwz r30,56(r1) ffc11118: 83 e1 00 3c lwz r31,60(r1) ffc1111c: 38 21 00 40 addi r1,r1,64 ffc11120: 4e 80 00 20 blr /* * 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 ) ffc11124: 7f 89 d0 40 cmplw cr7,r9,r26 ffc11128: 41 bd fd cc bgt- cr7,ffc10ef4 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc1112c: 7d 1a 43 78 mr r26,r8 ffc11130: 4b ff fd c8 b ffc10ef8 * 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 ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; ffc11134: 7f 7f db 78 mr r31,r27 ffc11138: 4b ff fe 34 b ffc10f6c 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)) ffc1113c: 40 9e 00 0c bne- cr7,ffc11148 <== NEVER TAKEN ffc11140: 7f 88 38 40 cmplw cr7,r8,r7 ffc11144: 41 9d ff 80 bgt+ cr7,ffc110c4 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc11148: 7d 1a 43 78 mr r26,r8 <== NOT EXECUTED ffc1114c: 4b ff ff 7c b ffc110c8 <== NOT EXECUTED =============================================================================== ffc11288 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc11288: 94 21 ff d8 stwu r1,-40(r1) ffc1128c: 7c 08 02 a6 mflr r0 ffc11290: 90 01 00 2c stw r0,44(r1) * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc11294: 80 03 00 58 lwz r0,88(r3) * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc11298: 93 c1 00 20 stw r30,32(r1) /* * 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; ffc1129c: 3f c0 00 00 lis r30,0 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc112a0: 2f 80 00 00 cmpwi cr7,r0,0 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc112a4: 93 a1 00 1c stw r29,28(r1) /* * 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; ffc112a8: 83 be 27 a4 lwz r29,10148(r30) * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc112ac: 93 41 00 10 stw r26,16(r1) ffc112b0: 7c 7a 1b 78 mr r26,r3 /* * 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; ffc112b4: 57 bd f0 be rlwinm r29,r29,30,2,31 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc112b8: 93 21 00 0c stw r25,12(r1) ffc112bc: 93 61 00 14 stw r27,20(r1) ffc112c0: 93 81 00 18 stw r28,24(r1) ffc112c4: 93 e1 00 24 stw r31,36(r1) * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc112c8: 41 9e 00 10 beq- cr7,ffc112d8 memfile_free_blocks_in_table( &info->indirect, to_free ); ffc112cc: 38 63 00 58 addi r3,r3,88 ffc112d0: 7f a4 eb 78 mr r4,r29 ffc112d4: 4b ff ff 25 bl ffc111f8 } if ( info->doubly_indirect ) { ffc112d8: 81 3a 00 5c lwz r9,92(r26) ffc112dc: 2f 89 00 00 cmpwi cr7,r9,0 ffc112e0: 41 9e 00 68 beq- cr7,ffc11348 for ( i=0 ; i <== NEVER TAKEN ffc112f0: 3f 80 00 00 lis r28,0 ffc112f4: 38 60 00 00 li r3,0 ffc112f8: 3b e0 00 00 li r31,0 ffc112fc: 3b 9c 27 a4 addi r28,r28,10148 ffc11300: 48 00 00 08 b ffc11308 ffc11304: 81 3a 00 5c lwz r9,92(r26) if ( info->doubly_indirect[i] ) { ffc11308: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc1130c: 7c 09 18 2e lwzx r0,r9,r3 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( ffc11314: 7f a4 eb 78 mr r4,r29 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { ffc11318: 2f 80 00 00 cmpwi cr7,r0,0 ffc1131c: 7c 69 1a 14 add r3,r9,r3 ffc11320: 41 9e 00 08 beq- cr7,ffc11328 <== NEVER TAKEN memfile_free_blocks_in_table( ffc11324: 4b ff fe d5 bl ffc111f8 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i 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 ); ffc1133c: 38 7a 00 5c addi r3,r26,92 ffc11340: 7f a4 eb 78 mr r4,r29 ffc11344: 4b ff fe b5 bl ffc111f8 } if ( info->triply_indirect ) { ffc11348: 80 7a 00 60 lwz r3,96(r26) ffc1134c: 2f 83 00 00 cmpwi cr7,r3,0 ffc11350: 41 9e 00 b4 beq- cr7,ffc11404 for ( i=0 ; i <== NEVER TAKEN p = (block_p *) info->triply_indirect[i]; ffc11360: 83 c3 00 00 lwz r30,0(r3) if ( !p ) /* ensure we have a valid pointer */ ffc11364: 2f 9e 00 00 cmpwi cr7,r30,0 ffc11368: 41 9e 00 90 beq- cr7,ffc113f8 <== NEVER TAKEN ffc1136c: 3f 80 00 00 lis r28,0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc11370: 3b 20 00 00 li r25,0 if ( !p ) /* ensure we have a valid pointer */ ffc11374: 3b 60 00 00 li r27,0 ffc11378: 3b 9c 27 a4 addi r28,r28,10148 break; for ( j=0 ; j<== NEVER TAKEN ffc11384: 38 60 00 00 li r3,0 ffc11388: 3b e0 00 00 li r31,0 if ( p[j] ) { ffc1138c: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc11390: 7c 1e 18 2e lwzx r0,r30,r3 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<== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); ffc113a8: 4b ff fe 51 bl ffc111f8 if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j ffc113c0: 80 7a 00 60 lwz r3,96(r26) if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( ffc113c4: 7c 63 ca 14 add r3,r3,r25 ffc113c8: 7f a4 eb 78 mr r4,r29 ffc113cc: 4b ff fe 2d bl ffc111f8 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i p = (block_p *) info->triply_indirect[i]; ffc113e4: 80 7a 00 60 lwz r3,96(r26) * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( ffc113e8: 57 79 10 3a rlwinm r25,r27,2,0,29 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc113ec: 7f c3 c8 2e lwzx r30,r3,r25 if ( !p ) /* ensure we have a valid pointer */ ffc113f0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc113f4: 40 9e ff 88 bne+ cr7,ffc1137c <== ALWAYS TAKEN } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( ffc113f8: 38 7a 00 60 addi r3,r26,96 ffc113fc: 7f a4 eb 78 mr r4,r29 ffc11400: 4b ff fd f9 bl ffc111f8 (block_p **)&info->triply_indirect, to_free ); } return 0; } ffc11404: 80 01 00 2c lwz r0,44(r1) ffc11408: 38 60 00 00 li r3,0 ffc1140c: 83 21 00 0c lwz r25,12(r1) ffc11410: 7c 08 03 a6 mtlr r0 ffc11414: 83 41 00 10 lwz r26,16(r1) ffc11418: 83 61 00 14 lwz r27,20(r1) ffc1141c: 83 81 00 18 lwz r28,24(r1) ffc11420: 83 a1 00 1c lwz r29,28(r1) ffc11424: 83 c1 00 20 lwz r30,32(r1) ffc11428: 83 e1 00 24 lwz r31,36(r1) ffc1142c: 38 21 00 28 addi r1,r1,40 ffc11430: 4e 80 00 20 blr =============================================================================== ffc11644 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc11644: 94 21 ff c0 stwu r1,-64(r1) ffc11648: 7c 08 02 a6 mflr r0 ffc1164c: 92 e1 00 1c stw r23,28(r1) ffc11650: 7c f7 3b 78 mr r23,r7 ffc11654: 93 81 00 30 stw r28,48(r1) ffc11658: 7c bc 2b 78 mr r28,r5 ffc1165c: 93 a1 00 34 stw r29,52(r1) ffc11660: 7d 1d 43 78 mr r29,r8 ffc11664: 93 c1 00 38 stw r30,56(r1) ffc11668: 7c de 33 78 mr r30,r6 /* * 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 + my_length; ffc1166c: 7c c8 32 14 add r6,r8,r6 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc11670: 93 e1 00 3c stw r31,60(r1) ffc11674: 7c 7f 1b 78 mr r31,r3 ffc11678: 90 01 00 44 stw r0,68(r1) ffc1167c: 93 01 00 20 stw r24,32(r1) ffc11680: 93 21 00 24 stw r25,36(r1) ffc11684: 93 41 00 28 stw r26,40(r1) ffc11688: 93 61 00 2c stw r27,44(r1) * 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 + my_length; if ( last_byte > the_jnode->info.file.size ) { ffc1168c: 80 03 00 50 lwz r0,80(r3) ffc11690: 2f 80 00 00 cmpwi cr7,r0,0 ffc11694: 41 9c 01 b4 blt- cr7,ffc11848 <== NEVER TAKEN ffc11698: 41 9e 01 a4 beq- cr7,ffc1183c <== ALWAYS TAKEN */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc1169c: 3f 40 00 00 lis r26,0 ffc116a0: 83 7a 27 a4 lwz r27,10148(r26) ffc116a4: 7f 83 e3 78 mr r3,r28 ffc116a8: 7f c4 f3 78 mr r4,r30 ffc116ac: 7f 79 fe 70 srawi r25,r27,31 ffc116b0: 7f 25 cb 78 mr r5,r25 ffc116b4: 7f 66 db 78 mr r6,r27 ffc116b8: 48 00 af 1d bl ffc1c5d4 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc116bc: 7f 83 e3 78 mr r3,r28 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc116c0: 7c 98 23 78 mr r24,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc116c4: 7f 25 cb 78 mr r5,r25 ffc116c8: 7f c4 f3 78 mr r4,r30 ffc116cc: 7f 66 db 78 mr r6,r27 ffc116d0: 48 00 aa c5 bl ffc1c194 <__divdi3> if ( start_offset ) { ffc116d4: 2f 98 00 00 cmpwi cr7,r24,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; ffc116d8: 7c 9e 23 78 mr r30,r4 status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; ffc116dc: 3b 80 00 00 li r28,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 ) { ffc116e0: 40 9e 00 8c bne- cr7,ffc1176c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc116e4: 7f 9d d8 40 cmplw cr7,r29,r27 ffc116e8: 40 bc 00 20 bge+ cr7,ffc11708 ffc116ec: 48 00 00 cc b ffc117b8 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 ); ffc116f0: 80 63 00 00 lwz r3,0(r3) * IMFS_memfile_write * * 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( ffc116f4: 7f 9c da 14 add r28,r28,r27 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 ); ffc116f8: 48 00 20 a5 bl ffc1379c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc116fc: 80 1a 27 a4 lwz r0,10148(r26) ffc11700: 7f 80 e8 40 cmplw cr7,r0,r29 ffc11704: 41 9d 00 b4 bgt- cr7,ffc117b8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11708: 7f c4 f3 78 mr r4,r30 ffc1170c: 38 a0 00 00 li r5,0 ffc11710: 7f e3 fb 78 mr r3,r31 ffc11714: 4b ff f4 99 bl ffc10bac fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; ffc11718: 7f bb e8 50 subf r29,r27,r29 */ 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 ) ffc1171c: 2c 03 00 00 cmpwi r3,0 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); ffc11720: 7e e4 bb 78 mr r4,r23 ffc11724: 7f 65 db 78 mr r5,r27 src += to_copy; ffc11728: 7e f7 da 14 add r23,r23,r27 block++; ffc1172c: 3b de 00 01 addi r30,r30,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 ) ffc11730: 40 82 ff c0 bne+ ffc116f0 <== ALWAYS TAKEN } IMFS_mtime_ctime_update( the_jnode ); return copied; } ffc11734: 80 01 00 44 lwz r0,68(r1) ffc11738: 7f 83 e3 78 mr r3,r28 ffc1173c: 82 e1 00 1c lwz r23,28(r1) ffc11740: 7c 08 03 a6 mtlr r0 ffc11744: 83 01 00 20 lwz r24,32(r1) ffc11748: 83 21 00 24 lwz r25,36(r1) ffc1174c: 83 41 00 28 lwz r26,40(r1) ffc11750: 83 61 00 2c lwz r27,44(r1) ffc11754: 83 81 00 30 lwz r28,48(r1) ffc11758: 83 a1 00 34 lwz r29,52(r1) ffc1175c: 83 c1 00 38 lwz r30,56(r1) ffc11760: 83 e1 00 3c lwz r31,60(r1) ffc11764: 38 21 00 40 addi r1,r1,64 ffc11768: 4e 80 00 20 blr 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 ); ffc1176c: 7f e3 fb 78 mr r3,r31 ffc11770: 38 a0 00 00 li r5,0 ffc11774: 4b ff f4 39 bl ffc10bac if ( !block_ptr ) return copied; ffc11778: 3b 80 00 00 li r28,0 if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) ffc1177c: 2c 03 00 00 cmpwi r3,0 ffc11780: 41 a2 ff b4 beq- ffc11734 <== NEVER TAKEN * 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 ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; ffc11784: 7f 98 d8 50 subf r28,r24,r27 ffc11788: 7f 9c e8 40 cmplw cr7,r28,r29 ffc1178c: 41 9d 00 e4 bgt- cr7,ffc11870 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc11790: 80 63 00 00 lwz r3,0(r3) ffc11794: 7e e4 bb 78 mr r4,r23 ffc11798: 7f 85 e3 78 mr r5,r28 ffc1179c: 7c 63 c2 14 add r3,r3,r24 ffc117a0: 48 00 1f fd bl ffc1379c src += to_copy; ffc117a4: 7e f7 e2 14 add r23,r23,r28 block++; ffc117a8: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; copied += to_copy; ffc117ac: 83 7a 27 a4 lwz r27,10148(r26) ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; ffc117b0: 7f bc e8 50 subf r29,r28,r29 ffc117b4: 4b ff ff 30 b ffc116e4 * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { ffc117b8: 2f 9d 00 00 cmpwi cr7,r29,0 ffc117bc: 41 9e 00 30 beq- cr7,ffc117ec block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc117c0: 7f e3 fb 78 mr r3,r31 ffc117c4: 7f c4 f3 78 mr r4,r30 ffc117c8: 38 a0 00 00 li r5,0 ffc117cc: 4b ff f3 e1 bl ffc10bac if ( !block_ptr ) ffc117d0: 2c 03 00 00 cmpwi r3,0 ffc117d4: 41 a2 ff 60 beq- ffc11734 <== 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 ); ffc117d8: 80 63 00 00 lwz r3,0(r3) ffc117dc: 7e e4 bb 78 mr r4,r23 ffc117e0: 7f a5 eb 78 mr r5,r29 ffc117e4: 48 00 1f b9 bl ffc1379c my_length = 0; copied += to_copy; ffc117e8: 7f 9c ea 14 add r28,r28,r29 } IMFS_mtime_ctime_update( the_jnode ); ffc117ec: 38 61 00 08 addi r3,r1,8 ffc117f0: 38 80 00 00 li r4,0 ffc117f4: 4b ff 39 d5 bl ffc051c8 ffc117f8: 80 01 00 08 lwz r0,8(r1) return copied; } ffc117fc: 7f 83 e3 78 mr r3,r28 ffc11800: 82 e1 00 1c lwz r23,28(r1) memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); ffc11804: 90 1f 00 44 stw r0,68(r31) ffc11808: 90 1f 00 48 stw r0,72(r31) return copied; } ffc1180c: 80 01 00 44 lwz r0,68(r1) ffc11810: 83 01 00 20 lwz r24,32(r1) ffc11814: 7c 08 03 a6 mtlr r0 ffc11818: 83 21 00 24 lwz r25,36(r1) ffc1181c: 83 41 00 28 lwz r26,40(r1) ffc11820: 83 61 00 2c lwz r27,44(r1) ffc11824: 83 81 00 30 lwz r28,48(r1) ffc11828: 83 a1 00 34 lwz r29,52(r1) ffc1182c: 83 c1 00 38 lwz r30,56(r1) ffc11830: 83 e1 00 3c lwz r31,60(r1) ffc11834: 38 21 00 40 addi r1,r1,64 ffc11838: 4e 80 00 20 blr * 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 + my_length; if ( last_byte > the_jnode->info.file.size ) { ffc1183c: 80 03 00 54 lwz r0,84(r3) ffc11840: 7f 80 30 40 cmplw cr7,r0,r6 ffc11844: 40 9c fe 58 bge+ cr7,ffc1169c <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); ffc11848: 7f e3 fb 78 mr r3,r31 ffc1184c: 38 a0 00 00 li r5,0 ffc11850: 4b ff fc 21 bl ffc11470 if ( status ) ffc11854: 2f 83 00 00 cmpwi cr7,r3,0 ffc11858: 41 9e fe 44 beq+ cr7,ffc1169c rtems_set_errno_and_return_minus_one( ENOSPC ); ffc1185c: 48 00 12 05 bl ffc12a60 <__errno> ffc11860: 38 00 00 1c li r0,28 ffc11864: 90 03 00 00 stw r0,0(r3) ffc11868: 3b 80 ff ff li r28,-1 ffc1186c: 4b ff fe c8 b ffc11734 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc11870: 80 63 00 00 lwz r3,0(r3) * 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 ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; ffc11874: 7f bc eb 78 mr r28,r29 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc11878: 7e e4 bb 78 mr r4,r23 ffc1187c: 7c 63 c2 14 add r3,r3,r24 ffc11880: 7f 85 e3 78 mr r5,r28 ffc11884: 48 00 1f 19 bl ffc1379c src += to_copy; ffc11888: 7e f7 e2 14 add r23,r23,r28 block++; ffc1188c: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; copied += to_copy; ffc11890: 83 7a 27 a4 lwz r27,10148(r26) ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; ffc11894: 7f bc e8 50 subf r29,r28,r29 ffc11898: 4b ff fe 4c b ffc116e4 =============================================================================== ffc044b4 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc044b4: 7c 08 02 a6 mflr r0 ffc044b8: 94 21 ff f8 stwu r1,-8(r1) ffc044bc: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc044c0: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc044c4: 80 09 00 4c lwz r0,76(r9) ffc044c8: 2f 80 00 01 cmpwi cr7,r0,1 ffc044cc: 40 9e 00 1c bne- cr7,ffc044e8 <== 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; ffc044d0: 90 69 00 5c stw r3,92(r9) return 0; ffc044d4: 38 60 00 00 li r3,0 } ffc044d8: 80 01 00 0c lwz r0,12(r1) ffc044dc: 38 21 00 08 addi r1,r1,8 ffc044e0: 7c 08 03 a6 mtlr r0 ffc044e4: 4e 80 00 20 blr /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc044e8: 48 00 e5 79 bl ffc12a60 <__errno> <== NOT EXECUTED ffc044ec: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc044f0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc044f4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc044f8: 4b ff ff e0 b ffc044d8 <== NOT EXECUTED =============================================================================== ffc0725c : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc0725c: 94 21 ff f0 stwu r1,-16(r1) ffc07260: 7c 08 02 a6 mflr r0 ffc07264: 93 c1 00 08 stw r30,8(r1) IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc07268: 3f c0 00 00 lis r30,0 * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc0726c: 90 01 00 14 stw r0,20(r1) IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc07270: 81 3e 27 94 lwz r9,10132(r30) * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc07274: 93 e1 00 0c stw r31,12(r1) ffc07278: 7c 7f 1b 78 mr r31,r3 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc0727c: 38 63 00 0c addi r3,r3,12 ffc07280: 80 89 00 08 lwz r4,8(r9) ffc07284: 48 01 0f 4d bl ffc181d0 switch( the_jnode->type ) { ffc07288: 80 bf 00 4c lwz r5,76(r31) ffc0728c: 2b 85 00 07 cmplwi cr7,r5,7 ffc07290: 40 9d 00 34 ble- cr7,ffc072c4 <== ALWAYS TAKEN case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); ffc07294: 81 3e 27 94 lwz r9,10132(r30) <== NOT EXECUTED ffc07298: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc0729c: 38 84 75 d0 addi r4,r4,30160 <== NOT EXECUTED ffc072a0: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED ffc072a4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc072a8: 48 01 0d 25 bl ffc17fcc <== NOT EXECUTED return; } puts(""); } ffc072ac: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc072b0: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc072b4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc072b8: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc072bc: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc072c0: 4e 80 00 20 blr <== NOT EXECUTED ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { ffc072c4: 3d 20 ff c2 lis r9,-62 ffc072c8: 39 29 75 58 addi r9,r9,30040 ffc072cc: 54 a0 10 3a rlwinm r0,r5,2,0,29 ffc072d0: 7c 09 00 2e lwzx r0,r9,r0 ffc072d4: 7d 20 4a 14 add r9,r0,r9 ffc072d8: 7d 29 03 a6 mtctr r9 ffc072dc: 4e 80 04 20 bctr case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); ffc072e0: 81 3e 27 94 lwz r9,10132(r30) ffc072e4: 3c 60 ff c2 lis r3,-62 ffc072e8: 38 63 75 a8 addi r3,r3,30120 ffc072ec: 80 c9 00 08 lwz r6,8(r9) ffc072f0: 38 80 00 01 li r4,1 ffc072f4: 38 a0 00 13 li r5,19 ffc072f8: 48 01 1c f9 bl ffc18ff0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } ffc072fc: 80 01 00 14 lwz r0,20(r1) ffc07300: 83 c1 00 08 lwz r30,8(r1) ffc07304: 7c 08 03 a6 mtlr r0 ffc07308: 83 e1 00 0c lwz r31,12(r1) ffc0730c: 38 21 00 10 addi r1,r1,16 ffc07310: 4e 80 00 20 blr case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); ffc07314: 81 3e 27 94 lwz r9,10132(r30) ffc07318: 3c 60 ff c2 lis r3,-62 ffc0731c: 38 63 75 bc addi r3,r3,30140 ffc07320: 80 c9 00 08 lwz r6,8(r9) ffc07324: 38 80 00 01 li r4,1 ffc07328: 38 a0 00 12 li r5,18 ffc0732c: 48 01 1c c5 bl ffc18ff0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } ffc07330: 80 01 00 14 lwz r0,20(r1) ffc07334: 83 c1 00 08 lwz r30,8(r1) ffc07338: 7c 08 03 a6 mtlr r0 ffc0733c: 83 e1 00 0c lwz r31,12(r1) ffc07340: 38 21 00 10 addi r1,r1,16 ffc07344: 4e 80 00 20 blr the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", ffc07348: 81 3e 27 94 lwz r9,10132(r30) ffc0734c: 3c 80 ff c2 lis r4,-62 ffc07350: 80 bf 00 54 lwz r5,84(r31) ffc07354: 38 84 75 9c addi r4,r4,30108 ffc07358: 80 69 00 08 lwz r3,8(r9) ffc0735c: 4c c6 31 82 crclr 4*cr1+eq ffc07360: 48 01 0c 6d bl ffc17fcc default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); ffc07364: 3c 60 ff c2 lis r3,-62 ffc07368: 38 63 67 1c addi r3,r3,26396 ffc0736c: 48 01 2f 11 bl ffc1a27c } ffc07370: 80 01 00 14 lwz r0,20(r1) ffc07374: 83 c1 00 08 lwz r30,8(r1) ffc07378: 7c 08 03 a6 mtlr r0 ffc0737c: 83 e1 00 0c lwz r31,12(r1) ffc07380: 38 21 00 10 addi r1,r1,16 ffc07384: 4e 80 00 20 blr 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)", ffc07388: 81 3e 27 94 lwz r9,10132(r30) ffc0738c: 3c 80 ff c2 lis r4,-62 ffc07390: 80 bf 00 54 lwz r5,84(r31) ffc07394: 38 84 75 8c addi r4,r4,30092 ffc07398: 80 69 00 08 lwz r3,8(r9) ffc0739c: 80 df 00 58 lwz r6,88(r31) ffc073a0: 4c c6 31 82 crclr 4*cr1+eq ffc073a4: 48 01 0c 29 bl ffc17fcc (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; ffc073a8: 4b ff ff bc b ffc07364 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); ffc073ac: 81 3e 27 94 lwz r9,10132(r30) ffc073b0: 38 60 00 2f li r3,47 ffc073b4: 80 89 00 08 lwz r4,8(r9) ffc073b8: 48 01 0c fd bl ffc180b4 break; ffc073bc: 4b ff ff a8 b ffc07364 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", ffc073c0: 81 3e 27 94 lwz r9,10132(r30) ffc073c4: 3c 80 ff c2 lis r4,-62 ffc073c8: 80 bf 00 50 lwz r5,80(r31) ffc073cc: 38 84 75 78 addi r4,r4,30072 ffc073d0: 80 69 00 08 lwz r3,8(r9) ffc073d4: 80 df 00 54 lwz r6,84(r31) ffc073d8: 4c c6 31 82 crclr 4*cr1+eq ffc073dc: 48 01 0b f1 bl ffc17fcc the_jnode->info.device.major, the_jnode->info.device.minor ); break; ffc073e0: 4b ff ff 84 b ffc07364 =============================================================================== ffc04558 : 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 */ ) { ffc04558: 94 21 ff e0 stwu r1,-32(r1) ffc0455c: 7c 08 02 a6 mflr r0 ffc04560: 90 01 00 24 stw r0,36(r1) ffc04564: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; ffc04568: 83 e4 00 00 lwz r31,0(r4) strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); ffc0456c: 7c c4 33 78 mr r4,r6 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 */ ) { ffc04570: 93 c1 00 18 stw r30,24(r1) ffc04574: 7c be 2b 78 mr r30,r5 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 ); ffc04578: 38 7f 00 0c addi r3,r31,12 ffc0457c: 38 a0 00 20 li r5,32 ffc04580: 48 00 fe c9 bl ffc14448 if ( the_jnode->Parent != NULL ) ffc04584: 80 1f 00 08 lwz r0,8(r31) ffc04588: 2f 80 00 00 cmpwi cr7,r0,0 ffc0458c: 41 9e 00 0c beq- cr7,ffc04598 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc04590: 7f e3 fb 78 mr r3,r31 ffc04594: 48 00 5b 91 bl ffc0a124 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; ffc04598: 80 7e 00 00 lwz r3,0(r30) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); ffc0459c: 7f e4 fb 78 mr r4,r31 the_jnode->Parent = new_parent; ffc045a0: 90 7f 00 08 stw r3,8(r31) ffc045a4: 38 63 00 50 addi r3,r3,80 ffc045a8: 48 00 5b 4d bl ffc0a0f4 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); ffc045ac: 38 61 00 08 addi r3,r1,8 ffc045b0: 38 80 00 00 li r4,0 ffc045b4: 48 00 0c 15 bl ffc051c8 ffc045b8: 80 01 00 08 lwz r0,8(r1) return 0; } ffc045bc: 38 60 00 00 li r3,0 ffc045c0: 83 c1 00 18 lwz r30,24(r1) rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); ffc045c4: 90 1f 00 48 stw r0,72(r31) return 0; } ffc045c8: 80 01 00 24 lwz r0,36(r1) ffc045cc: 83 e1 00 1c lwz r31,28(r1) ffc045d0: 38 21 00 20 addi r1,r1,32 ffc045d4: 7c 08 03 a6 mtlr r0 ffc045d8: 4e 80 00 20 blr =============================================================================== ffc0deb0 : static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { ffc0deb0: 94 21 ff e8 stwu r1,-24(r1) ffc0deb4: 7c 08 02 a6 mflr r0 ffc0deb8: 93 a1 00 0c stw r29,12(r1) ffc0debc: 7c bd 2b 78 mr r29,r5 ffc0dec0: 93 c1 00 10 stw r30,16(r1) ffc0dec4: 7c 9e 23 78 mr r30,r4 ffc0dec8: 93 e1 00 14 stw r31,20(r1) ffc0decc: 7c 7f 1b 78 mr r31,r3 ffc0ded0: 90 01 00 1c stw r0,28(r1) while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ffc0ded4: 48 00 00 34 b ffc0df08 ffc0ded8: 81 3d 00 00 lwz r9,0(r29) ffc0dedc: 7c 1f 48 ae lbzx r0,r31,r9 ++(*index); ffc0dee0: 39 29 00 01 addi r9,r9,1 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ffc0dee4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dee8: 41 9e 00 34 beq- cr7,ffc0df1c ffc0deec: 80 1e 00 00 lwz r0,0(r30) ffc0def0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0def4: 41 9e 00 28 beq- cr7,ffc0df1c <== NEVER TAKEN ++(*index); ffc0def8: 91 3d 00 00 stw r9,0(r29) --(*len); ffc0defc: 81 3e 00 00 lwz r9,0(r30) ffc0df00: 38 09 ff ff addi r0,r9,-1 ffc0df04: 90 1e 00 00 stw r0,0(r30) const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ffc0df08: 80 1d 00 00 lwz r0,0(r29) ffc0df0c: 7c 7f 00 ae lbzx r3,r31,r0 ffc0df10: 4b ff 85 45 bl ffc06454 ffc0df14: 2f 83 00 00 cmpwi cr7,r3,0 ffc0df18: 40 9e ff c0 bne+ cr7,ffc0ded8 ++(*index); --(*len); } } ffc0df1c: 80 01 00 1c lwz r0,28(r1) ffc0df20: 83 a1 00 0c lwz r29,12(r1) ffc0df24: 7c 08 03 a6 mtlr r0 ffc0df28: 83 c1 00 10 lwz r30,16(r1) ffc0df2c: 83 e1 00 14 lwz r31,20(r1) ffc0df30: 38 21 00 18 addi r1,r1,24 ffc0df34: 4e 80 00 20 blr =============================================================================== ffc0eee8 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc0eee8: 94 21 ff f0 stwu r1,-16(r1) ffc0eeec: 7c 08 02 a6 mflr r0 ffc0eef0: 90 01 00 14 stw r0,20(r1) IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; ffc0eef4: 81 23 00 00 lwz r9,0(r3) int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc0eef8: 93 e1 00 0c stw r31,12(r1) IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { ffc0eefc: 80 09 00 4c lwz r0,76(r9) ffc0ef00: 2b 80 00 07 cmplwi cr7,r0,7 ffc0ef04: 40 9d 00 28 ble- cr7,ffc0ef2c <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0ef08: 48 00 3b 59 bl ffc12a60 <__errno> ffc0ef0c: 38 00 00 86 li r0,134 ffc0ef10: 90 03 00 00 stw r0,0(r3) ffc0ef14: 38 60 ff ff li r3,-1 buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } ffc0ef18: 80 01 00 14 lwz r0,20(r1) ffc0ef1c: 83 e1 00 0c lwz r31,12(r1) ffc0ef20: 38 21 00 10 addi r1,r1,16 ffc0ef24: 7c 08 03 a6 mtlr r0 ffc0ef28: 4e 80 00 20 blr IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { ffc0ef2c: 3d 60 ff c2 lis r11,-62 ffc0ef30: 39 6b f5 68 addi r11,r11,-2712 ffc0ef34: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0ef38: 7c 0b 00 2e lwzx r0,r11,r0 ffc0ef3c: 7d 60 5a 14 add r11,r0,r11 ffc0ef40: 7d 69 03 a6 mtctr r11 ffc0ef44: 4e 80 04 20 bctr case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; ffc0ef48: 39 40 00 00 li r10,0 ffc0ef4c: 39 60 00 00 li r11,0 ffc0ef50: 91 44 00 20 stw r10,32(r4) ffc0ef54: 91 64 00 24 stw r11,36(r4) /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; ffc0ef58: 81 63 00 10 lwz r11,16(r3) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; ffc0ef5c: 3c 60 00 00 lis r3,0 ffc0ef60: 80 03 26 f8 lwz r0,9976(r3) rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; ffc0ef64: 38 60 00 00 li r3,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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); ffc0ef68: 81 6b 00 34 lwz r11,52(r11) ffc0ef6c: 60 63 ff fe ori r3,r3,65534 buf->st_mode = the_jnode->st_mode; ffc0ef70: 81 89 00 30 lwz r12,48(r9) * 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 ); ffc0ef74: 83 eb 00 00 lwz r31,0(r11) buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; ffc0ef78: a0 a9 00 34 lhz r5,52(r9) buf->st_ino = the_jnode->st_ino; ffc0ef7c: 80 c9 00 38 lwz r6,56(r9) buf->st_uid = the_jnode->st_uid; ffc0ef80: a0 e9 00 3c lhz r7,60(r9) buf->st_gid = the_jnode->st_gid; ffc0ef84: a1 09 00 3e lhz r8,62(r9) buf->st_atime = the_jnode->stat_atime; ffc0ef88: 81 49 00 40 lwz r10,64(r9) buf->st_mtime = the_jnode->stat_mtime; ffc0ef8c: 81 69 00 44 lwz r11,68(r9) buf->st_ctime = the_jnode->stat_ctime; ffc0ef90: 81 29 00 48 lwz r9,72(r9) buf->st_blksize = imfs_rq_memfile_bytes_per_block; ffc0ef94: 90 04 00 40 stw r0,64(r4) return 0; } ffc0ef98: 80 01 00 14 lwz r0,20(r1) /* * 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 = ffc0ef9c: 90 64 00 00 stw r3,0(r4) buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; ffc0efa0: 38 60 00 00 li r3,0 } ffc0efa4: 7c 08 03 a6 mtlr r0 /* * 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 = ffc0efa8: 93 e4 00 04 stw r31,4(r4) rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; ffc0efac: 91 84 00 0c stw r12,12(r4) buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } ffc0efb0: 83 e1 00 0c lwz r31,12(r1) ffc0efb4: 38 21 00 10 addi r1,r1,16 fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; ffc0efb8: b0 a4 00 10 sth r5,16(r4) buf->st_ino = the_jnode->st_ino; ffc0efbc: 90 c4 00 08 stw r6,8(r4) buf->st_uid = the_jnode->st_uid; ffc0efc0: b0 e4 00 12 sth r7,18(r4) buf->st_gid = the_jnode->st_gid; ffc0efc4: b1 04 00 14 sth r8,20(r4) buf->st_atime = the_jnode->stat_atime; ffc0efc8: 91 44 00 28 stw r10,40(r4) buf->st_mtime = the_jnode->stat_mtime; ffc0efcc: 91 64 00 30 stw r11,48(r4) buf->st_ctime = the_jnode->stat_ctime; ffc0efd0: 91 24 00 38 stw r9,56(r4) buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } ffc0efd4: 4e 80 00 20 blr switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); ffc0efd8: 81 69 00 54 lwz r11,84(r9) ffc0efdc: 80 09 00 50 lwz r0,80(r9) ffc0efe0: 91 64 00 1c stw r11,28(r4) ffc0efe4: 90 04 00 18 stw r0,24(r4) break; ffc0efe8: 4b ff ff 70 b ffc0ef58 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; ffc0efec: 81 49 00 50 lwz r10,80(r9) ffc0eff0: 81 69 00 54 lwz r11,84(r9) ffc0eff4: 91 44 00 20 stw r10,32(r4) ffc0eff8: 91 64 00 24 stw r11,36(r4) break; ffc0effc: 4b ff ff 5c b ffc0ef58 =============================================================================== ffc04690 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { ffc04690: 94 21 ff c8 stwu r1,-56(r1) ffc04694: 7c 08 02 a6 mflr r0 ffc04698: 90 01 00 3c stw r0,60(r1) ffc0469c: 93 c1 00 30 stw r30,48(r1) IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; ffc046a0: 83 c4 00 00 lwz r30,0(r4) int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { ffc046a4: 93 a1 00 2c stw r29,44(r1) ffc046a8: 7c 7d 1b 78 mr r29,r3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { ffc046ac: 80 1e 00 4c lwz r0,76(r30) int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { ffc046b0: 93 e1 00 34 stw r31,52(r1) ffc046b4: 7c 9f 23 78 mr r31,r4 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { ffc046b8: 2f 80 00 03 cmpwi cr7,r0,3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { ffc046bc: 93 81 00 28 stw r28,40(r1) /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { ffc046c0: 41 9e 00 3c beq- cr7,ffc046fc /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); ffc046c4: 81 3f 00 08 lwz r9,8(r31) ffc046c8: 7f a3 eb 78 mr r3,r29 ffc046cc: 7f e4 fb 78 mr r4,r31 ffc046d0: 80 09 00 34 lwz r0,52(r9) ffc046d4: 7c 09 03 a6 mtctr r0 ffc046d8: 4e 80 04 21 bctrl return result; } ffc046dc: 80 01 00 3c lwz r0,60(r1) ffc046e0: 83 81 00 28 lwz r28,40(r1) ffc046e4: 7c 08 03 a6 mtlr r0 ffc046e8: 83 a1 00 2c lwz r29,44(r1) ffc046ec: 83 c1 00 30 lwz r30,48(r1) ffc046f0: 83 e1 00 34 lwz r31,52(r1) ffc046f4: 38 21 00 38 addi r1,r1,56 ffc046f8: 4e 80 00 20 blr * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) ffc046fc: 80 1e 00 50 lwz r0,80(r30) ffc04700: 2f 80 00 00 cmpwi cr7,r0,0 ffc04704: 41 9e 00 90 beq- cr7,ffc04794 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node; ffc04708: 7c 3c 0b 78 mr r28,r1 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; ffc0470c: 81 64 00 08 lwz r11,8(r4) the_link.node_access = node->info.hard_link.link_node; ffc04710: 94 1c 00 10 stwu r0,16(r28) if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; ffc04714: 81 24 00 0c lwz r9,12(r4) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); ffc04718: 7f 83 e3 78 mr r3,r28 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; ffc0471c: 81 44 00 04 lwz r10,4(r4) ffc04720: 80 04 00 10 lwz r0,16(r4) ffc04724: 91 61 00 18 stw r11,24(r1) ffc04728: 91 21 00 1c stw r9,28(r1) ffc0472c: 91 41 00 14 stw r10,20(r1) ffc04730: 90 01 00 20 stw r0,32(r1) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); ffc04734: 48 00 98 05 bl ffc0df38 /* * 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) ffc04738: 81 3e 00 50 lwz r9,80(r30) ffc0473c: a1 69 00 34 lhz r11,52(r9) ffc04740: 2f 8b 00 01 cmpwi cr7,r11,1 ffc04744: 41 9e 00 28 beq- cr7,ffc0476c if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; ffc04748: 39 6b ff ff addi r11,r11,-1 ffc0474c: b1 69 00 34 sth r11,52(r9) IMFS_update_ctime( node->info.hard_link.link_node ); ffc04750: 38 61 00 08 addi r3,r1,8 ffc04754: 38 80 00 00 li r4,0 ffc04758: 48 00 0a 71 bl ffc051c8 ffc0475c: 81 3e 00 50 lwz r9,80(r30) ffc04760: 80 01 00 08 lwz r0,8(r1) ffc04764: 90 09 00 48 stw r0,72(r9) ffc04768: 4b ff ff 5c b ffc046c4 * 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 ); ffc0476c: 81 21 00 18 lwz r9,24(r1) ffc04770: 7f a3 eb 78 mr r3,r29 ffc04774: 7f 84 e3 78 mr r4,r28 ffc04778: 80 09 00 34 lwz r0,52(r9) ffc0477c: 7c 09 03 a6 mtctr r0 ffc04780: 4e 80 04 21 bctrl if ( result != 0 ) ffc04784: 2f 83 00 00 cmpwi cr7,r3,0 return -1; ffc04788: 38 60 ff ff li r3,-1 */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) ffc0478c: 41 9e ff 38 beq+ cr7,ffc046c4 ffc04790: 4b ff ff 4c b ffc046dc */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc04794: 48 00 e2 cd bl ffc12a60 <__errno> <== NOT EXECUTED ffc04798: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc0479c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc047a0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc047a4: 4b ff ff 38 b ffc046dc <== NOT EXECUTED =============================================================================== ffc047a8 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc047a8: 7c 08 02 a6 mflr r0 ffc047ac: 94 21 ff f8 stwu r1,-8(r1) ffc047b0: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc047b4: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc047b8: 80 09 00 4c lwz r0,76(r9) ffc047bc: 2f 80 00 01 cmpwi cr7,r0,1 ffc047c0: 40 9e 00 2c bne- cr7,ffc047ec <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) ffc047c4: 80 09 00 5c lwz r0,92(r9) ffc047c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc047cc: 41 9e 00 34 beq- cr7,ffc04800 <== 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; ffc047d0: 38 00 00 00 li r0,0 ffc047d4: 90 09 00 5c stw r0,92(r9) return 0; ffc047d8: 38 60 00 00 li r3,0 } ffc047dc: 80 01 00 0c lwz r0,12(r1) ffc047e0: 38 21 00 08 addi r1,r1,8 ffc047e4: 7c 08 03 a6 mtlr r0 ffc047e8: 4e 80 00 20 blr /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc047ec: 48 00 e2 75 bl ffc12a60 <__errno> <== NOT EXECUTED ffc047f0: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc047f4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc047f8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc047fc: 4b ff ff e0 b ffc047dc <== 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 */ ffc04800: 48 00 e2 61 bl ffc12a60 <__errno> <== NOT EXECUTED ffc04804: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc04808: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0480c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04810: 4b ff ff cc b ffc047dc <== NOT EXECUTED =============================================================================== ffc05400 : ) { /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc05400: 3d 20 00 00 lis r9,0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc05404: 94 21 ff e8 stwu r1,-24(r1) ffc05408: 7c 08 02 a6 mflr r0 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc0540c: 81 29 27 68 lwz r9,10088(r9) void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc05410: 93 a1 00 0c stw r29,12(r1) ffc05414: 7c 9d 23 78 mr r29,r4 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc05418: 2f 89 00 00 cmpwi cr7,r9,0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc0541c: 93 c1 00 10 stw r30,16(r1) ffc05420: 7c 7e 1b 78 mr r30,r3 ffc05424: 93 e1 00 14 stw r31,20(r1) ffc05428: 7c bf 2b 78 mr r31,r5 ffc0542c: 90 01 00 1c stw r0,28(r1) ffc05430: 93 81 00 08 stw r28,8(r1) /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc05434: 41 9e 00 10 beq- cr7,ffc05444 (*rtems_malloc_statistics_helpers->initialize)(); ffc05438: 80 09 00 00 lwz r0,0(r9) ffc0543c: 7c 09 03 a6 mtctr r0 ffc05440: 4e 80 04 21 bctrl } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); ffc05444: 4b ff ff 2d bl ffc05370 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { ffc05448: 3d 20 00 00 lis r9,0 ffc0544c: 81 29 27 64 lwz r9,10084(r9) ffc05450: 2f 89 00 00 cmpwi cr7,r9,0 ffc05454: 41 9e 00 24 beq- cr7,ffc05478 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( ffc05458: 80 09 00 00 lwz r0,0(r9) ffc0545c: 7f c3 f3 78 mr r3,r30 ffc05460: 7f e4 fb 78 mr r4,r31 ffc05464: 7c 09 03 a6 mtctr r0 heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; ffc05468: 7f be ea 14 add r29,r30,r29 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( ffc0546c: 4e 80 04 21 bctrl heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; ffc05470: 7f a3 e8 50 subf r29,r3,r29 heap_begin = new_heap_begin; ffc05474: 7c 7e 1b 78 mr r30,r3 * 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 ( ffc05478: 3f 80 00 00 lis r28,0 ffc0547c: 88 1c 27 6c lbz r0,10092(r28) ffc05480: 3f e0 00 00 lis r31,0 ffc05484: 2f 80 00 00 cmpwi cr7,r0,0 ffc05488: 40 9e 00 34 bne- cr7,ffc054bc !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ffc0548c: 3d 20 00 00 lis r9,0 ffc05490: 88 09 20 2c lbz r0,8236(r9) ffc05494: 2f 80 00 00 cmpwi cr7,r0,0 ffc05498: 40 9e 00 5c bne- cr7,ffc054f4 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); ffc0549c: 3f e0 00 00 lis r31,0 ffc054a0: 80 7f 26 ec lwz r3,9964(r31) ffc054a4: 7f c4 f3 78 mr r4,r30 ffc054a8: 7f a5 eb 78 mr r5,r29 ffc054ac: 38 c0 00 08 li r6,8 ffc054b0: 48 00 54 dd bl ffc0a98c <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { ffc054b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc054b8: 41 9e 00 5c beq- cr7,ffc05514 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); ffc054bc: 80 7f 26 ec lwz r3,9964(r31) ffc054c0: 3f c0 00 00 lis r30,0 ffc054c4: 83 fe 2a e8 lwz r31,10984(r30) ffc054c8: 48 00 62 25 bl ffc0b6ec <_Protected_heap_Get_size> } ffc054cc: 80 01 00 1c lwz r0,28(r1) if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); ffc054d0: 7c 63 fa 14 add r3,r3,r31 } ffc054d4: 83 81 00 08 lwz r28,8(r1) ffc054d8: 7c 08 03 a6 mtlr r0 if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); ffc054dc: 90 7e 2a e8 stw r3,10984(r30) } ffc054e0: 83 a1 00 0c lwz r29,12(r1) ffc054e4: 83 c1 00 10 lwz r30,16(r1) ffc054e8: 83 e1 00 14 lwz r31,20(r1) ffc054ec: 38 21 00 18 addi r1,r1,24 ffc054f0: 4e 80 00 20 blr if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); ffc054f4: 7f c3 f3 78 mr r3,r30 ffc054f8: 38 80 00 00 li r4,0 ffc054fc: 7f a5 eb 78 mr r5,r29 ffc05500: 48 00 e3 81 bl ffc13880 * 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 ) { ffc05504: 88 1c 27 6c lbz r0,10092(r28) ffc05508: 2f 80 00 00 cmpwi cr7,r0,0 ffc0550c: 41 9e ff 90 beq+ cr7,ffc0549c <== ALWAYS TAKEN ffc05510: 4b ff ff ac b ffc054bc <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); ffc05514: 38 60 00 1a li r3,26 ffc05518: 48 00 47 89 bl ffc09ca0 =============================================================================== ffc03a5c : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03a5c: 94 21 ff c0 stwu r1,-64(r1) ffc03a60: 7c 08 02 a6 mflr r0 ffc03a64: 90 01 00 44 stw r0,68(r1) ffc03a68: 93 81 00 30 stw r28,48(r1) stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); ffc03a6c: 83 83 00 b4 lwz r28,180(r3) { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); ffc03a70: 80 e3 00 b8 lwz r7,184(r3) size = Stack_check_usable_stack_size(stack); ffc03a74: 3b 9c ff 80 addi r28,r28,-128 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03a78: 93 41 00 28 stw r26,40(r1) /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; ffc03a7c: 39 27 01 00 addi r9,r7,256 for (ebase = base + length; base < ebase; base++) ffc03a80: 57 8a 00 3a rlwinm r10,r28,0,0,29 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03a84: 93 61 00 2c stw r27,44(r1) * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) ffc03a88: 7d 49 52 14 add r10,r9,r10 ffc03a8c: 7f 89 50 40 cmplw cr7,r9,r10 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03a90: 93 a1 00 34 stw r29,52(r1) ffc03a94: 7c 7b 1b 78 mr r27,r3 ffc03a98: 92 e1 00 1c stw r23,28(r1) high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; ffc03a9c: 3b a0 00 00 li r29,0 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03aa0: 93 01 00 20 stw r24,32(r1) ffc03aa4: 93 21 00 24 stw r25,36(r1) ffc03aa8: 93 c1 00 38 stw r30,56(r1) ffc03aac: 93 e1 00 3c stw r31,60(r1) current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); ffc03ab0: 83 43 00 c4 lwz r26,196(r3) * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) ffc03ab4: 40 9c 00 38 bge- cr7,ffc03aec <== NEVER TAKEN if (*base != U32_PATTERN) ffc03ab8: 81 07 01 00 lwz r8,256(r7) * Try to print out how much stack was actually used by the task. */ static void *print_context; static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( ffc03abc: 7d 2b 4b 78 mr r11,r9 * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) ffc03ac0: 6d 00 5a 5a xoris r0,r8,23130 ffc03ac4: 2f 80 a5 a5 cmpwi cr7,r0,-23131 ffc03ac8: 41 9e 00 14 beq- cr7,ffc03adc <== ALWAYS TAKEN ffc03acc: 48 00 00 f8 b ffc03bc4 <== NOT EXECUTED ffc03ad0: 84 0b 00 04 lwzu r0,4(r11) ffc03ad4: 7f 80 40 00 cmpw cr7,r0,r8 ffc03ad8: 40 9e 00 ec bne- cr7,ffc03bc4 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) ffc03adc: 39 29 00 04 addi r9,r9,4 ffc03ae0: 7f 8a 48 40 cmplw cr7,r10,r9 ffc03ae4: 41 9d ff ec bgt+ cr7,ffc03ad0 <== ALWAYS TAKEN high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; ffc03ae8: 3b a0 00 00 li r29,0 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( ffc03aec: 3f c0 00 00 lis r30,0 ffc03af0: 82 fb 00 08 lwz r23,8(r27) ffc03af4: 3b fe 28 50 addi r31,r30,10320 ffc03af8: 83 3e 28 50 lwz r25,10320(r30) ffc03afc: 83 1f 00 04 lwz r24,4(r31) ffc03b00: 38 80 00 05 li r4,5 ffc03b04: 38 a1 00 08 addi r5,r1,8 ffc03b08: 7e e3 bb 78 mr r3,r23 ffc03b0c: 48 00 4f ed bl ffc08af8 ffc03b10: 3c 80 ff c2 lis r4,-62 ffc03b14: 7c 66 1b 78 mr r6,r3 ffc03b18: 7f 29 03 a6 mtctr r25 ffc03b1c: 38 84 8f a8 addi r4,r4,-28760 ffc03b20: 7e e5 bb 78 mr r5,r23 ffc03b24: 7f 03 c3 78 mr r3,r24 ffc03b28: 4c c6 31 82 crclr 4*cr1+eq ffc03b2c: 4e 80 04 21 bctrl (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc03b30: 80 db 00 b4 lwz r6,180(r27) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc03b34: 80 1e 28 50 lwz r0,10320(r30) ffc03b38: 3c 80 ff c2 lis r4,-62 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc03b3c: 80 bb 00 b8 lwz r5,184(r27) ffc03b40: 38 c6 ff ff addi r6,r6,-1 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc03b44: 7c 09 03 a6 mtctr r0 ffc03b48: 80 7f 00 04 lwz r3,4(r31) ffc03b4c: 38 84 8f b8 addi r4,r4,-28744 ffc03b50: 7c c5 32 14 add r6,r5,r6 ffc03b54: 7f 47 d3 78 mr r7,r26 ffc03b58: 7f 88 e3 78 mr r8,r28 ffc03b5c: 4c c6 31 82 crclr 4*cr1+eq ffc03b60: 4e 80 04 21 bctrl stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc03b64: 80 1f 00 08 lwz r0,8(r31) (*print_handler)( print_context, "Unavailable\n" ); ffc03b68: 80 7f 00 04 lwz r3,4(r31) stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc03b6c: 2f 80 00 00 cmpwi cr7,r0,0 (*print_handler)( print_context, "Unavailable\n" ); ffc03b70: 80 1e 28 50 lwz r0,10320(r30) stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc03b74: 41 9e 00 6c beq- cr7,ffc03be0 <== NEVER TAKEN (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); ffc03b78: 3c 80 ff c2 lis r4,-62 ffc03b7c: 7c 09 03 a6 mtctr r0 ffc03b80: 7f a5 eb 78 mr r5,r29 ffc03b84: 38 84 8f e8 addi r4,r4,-28696 ffc03b88: 4c c6 31 82 crclr 4*cr1+eq ffc03b8c: 4e 80 04 21 bctrl } } ffc03b90: 80 01 00 44 lwz r0,68(r1) ffc03b94: 82 e1 00 1c lwz r23,28(r1) ffc03b98: 7c 08 03 a6 mtlr r0 ffc03b9c: 83 01 00 20 lwz r24,32(r1) ffc03ba0: 83 21 00 24 lwz r25,36(r1) ffc03ba4: 83 41 00 28 lwz r26,40(r1) ffc03ba8: 83 61 00 2c lwz r27,44(r1) ffc03bac: 83 81 00 30 lwz r28,48(r1) ffc03bb0: 83 a1 00 34 lwz r29,52(r1) ffc03bb4: 83 c1 00 38 lwz r30,56(r1) ffc03bb8: 83 e1 00 3c lwz r31,60(r1) ffc03bbc: 38 21 00 40 addi r1,r1,64 ffc03bc0: 4e 80 00 20 blr low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) ffc03bc4: 2f 89 00 00 cmpwi cr7,r9,0 used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; ffc03bc8: 3b a0 00 00 li r29,0 low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) ffc03bcc: 41 be ff 20 beq- cr7,ffc03aec <== NEVER TAKEN { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); ffc03bd0: 3b a7 00 80 addi r29,r7,128 size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); ffc03bd4: 7f bd e2 14 add r29,r29,r28 ffc03bd8: 7f a9 e8 50 subf r29,r9,r29 ffc03bdc: 4b ff ff 10 b ffc03aec current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); ffc03be0: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03be4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03be8: 38 84 8f d8 addi r4,r4,-28712 <== NOT EXECUTED ffc03bec: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03bf0: 4e 80 04 21 bctrl <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } ffc03bf4: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc03bf8: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc03bfc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03c00: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc03c04: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc03c08: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc03c0c: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc03c10: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc03c14: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc03c18: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc03c1c: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc03c20: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc03c24: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03c28 : static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if ( Stack_check_Initialized ) ffc03c28: 3d 00 00 00 lis r8,0 <== NOT EXECUTED ffc03c2c: 39 08 28 50 addi r8,r8,10320 <== NOT EXECUTED ffc03c30: 80 08 00 08 lwz r0,8(r8) <== NOT EXECUTED ffc03c34: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc03c38: 4c 9e 00 20 bnelr cr7 <== NOT EXECUTED ffc03c3c: 38 00 00 20 li r0,32 <== NOT EXECUTED ffc03c40: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03c44: 3d 60 00 00 lis r11,0 <== NOT EXECUTED ffc03c48: 3d 40 ff c2 lis r10,-62 <== NOT EXECUTED ffc03c4c: 39 6b 2a c0 addi r11,r11,10944 <== NOT EXECUTED memset((_stack)->area, BYTE_PATTERN, (_stack)->size) /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) ffc03c50: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc03c54: 39 4a 8f 98 addi r10,r10,-28776 <== NOT EXECUTED /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; ffc03c58: 55 20 17 3a rlwinm r0,r9,2,28,29 <== NOT EXECUTED ffc03c5c: 7c 0a 00 2e lwzx r0,r10,r0 <== NOT EXECUTED /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { ffc03c60: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED p[i] = pattern[ i%4 ]; ffc03c64: 94 0b 00 04 stwu r0,4(r11) <== NOT EXECUTED /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { ffc03c68: 42 00 ff f0 bdnz+ ffc03c58 <== NOT EXECUTED (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); } #endif Stack_check_Initialized = 1; ffc03c6c: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc03c70: 90 08 00 08 stw r0,8(r8) <== NOT EXECUTED ffc03c74: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03d3c : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc03d3c: 94 21 ff c8 stwu r1,-56(r1) ffc03d40: 7c 08 02 a6 mflr r0 ffc03d44: 93 a1 00 2c stw r29,44(r1) ffc03d48: 7c 7d 1b 78 mr r29,r3 Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); ffc03d4c: 3c 60 ff c2 lis r3,-62 Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc03d50: 90 01 00 3c stw r0,60(r1) Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); ffc03d54: 38 63 8f f0 addi r3,r3,-28688 Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc03d58: 93 c1 00 30 stw r30,48(r1) ffc03d5c: 93 e1 00 34 stw r31,52(r1) ffc03d60: 7c 9f 23 78 mr r31,r4 Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); ffc03d64: 83 dd 00 b8 lwz r30,184(r29) char name[32]; printk("BLOWN STACK!!!\n"); ffc03d68: 4c c6 31 82 crclr 4*cr1+eq ffc03d6c: 48 00 20 31 bl ffc05d9c printk("task control block: 0x%08" PRIxPTR "\n", running); ffc03d70: 3c 60 ff c2 lis r3,-62 ffc03d74: 38 63 90 00 addi r3,r3,-28672 ffc03d78: 7f a4 eb 78 mr r4,r29 ffc03d7c: 4c c6 31 82 crclr 4*cr1+eq ffc03d80: 48 00 20 1d bl ffc05d9c printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); ffc03d84: 80 9d 00 08 lwz r4,8(r29) ffc03d88: 3c 60 ff c2 lis r3,-62 ffc03d8c: 38 63 90 20 addi r3,r3,-28640 ffc03d90: 4c c6 31 82 crclr 4*cr1+eq ffc03d94: 48 00 20 09 bl ffc05d9c printk( ffc03d98: 80 9d 00 0c lwz r4,12(r29) ffc03d9c: 3c 60 ff c2 lis r3,-62 ffc03da0: 38 63 90 34 addi r3,r3,-28620 ffc03da4: 4c c6 31 82 crclr 4*cr1+eq ffc03da8: 48 00 1f f5 bl ffc05d9c "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( ffc03dac: 80 7d 00 08 lwz r3,8(r29) ffc03db0: 38 a1 00 08 addi r5,r1,8 ffc03db4: 38 80 00 20 li r4,32 ffc03db8: 48 00 4d 41 bl ffc08af8 ffc03dbc: 7c 64 1b 78 mr r4,r3 ffc03dc0: 3c 60 ff c2 lis r3,-62 ffc03dc4: 38 63 90 48 addi r3,r3,-28600 ffc03dc8: 4c c6 31 82 crclr 4*cr1+eq ffc03dcc: 48 00 1f d1 bl ffc05d9c ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ffc03dd0: 80 bd 00 b8 lwz r5,184(r29) ffc03dd4: 80 9d 00 b4 lwz r4,180(r29) ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( ffc03dd8: 3c 60 ff c2 lis r3,-62 ffc03ddc: 38 63 90 60 addi r3,r3,-28576 ffc03de0: 7c c5 22 14 add r6,r5,r4 ffc03de4: 4c c6 31 82 crclr 4*cr1+eq ffc03de8: 48 00 1f b5 bl ffc05d9c "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { ffc03dec: 2f 9f 00 00 cmpwi cr7,r31,0 ffc03df0: 41 9e 00 0c beq- cr7,ffc03dfc <== ALWAYS TAKEN rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); ffc03df4: 38 60 00 81 li r3,129 ffc03df8: 48 00 59 11 bl ffc09708 (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( ffc03dfc: 3c 60 ff c2 lis r3,-62 ffc03e00: 38 63 90 94 addi r3,r3,-28524 ffc03e04: 38 80 00 80 li r4,128 ffc03e08: 38 be 00 08 addi r5,r30,8 ffc03e0c: 38 de 00 88 addi r6,r30,136 ffc03e10: 4c c6 31 82 crclr 4*cr1+eq ffc03e14: 48 00 1f 89 bl ffc05d9c ffc03e18: 4b ff ff dc b ffc03df4 =============================================================================== ffc09ed4 <_API_extensions_Run_postdriver>: /* * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09ed4: 94 21 ff f0 stwu r1,-16(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc09ed8: 3d 20 00 00 lis r9,0 ffc09edc: 7c 08 02 a6 mflr r0 ffc09ee0: 93 c1 00 08 stw r30,8(r1) ffc09ee4: 3b c9 2d 80 addi r30,r9,11648 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09ee8: 3b de 00 04 addi r30,r30,4 /* * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09eec: 93 e1 00 0c stw r31,12(r1) ffc09ef0: 83 e9 2d 80 lwz r31,11648(r9) ffc09ef4: 90 01 00 14 stw r0,20(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09ef8: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09efc: 41 9e 00 1c beq- cr7,ffc09f18 <_API_extensions_Run_postdriver+0x44><== 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)(); ffc09f00: 80 1f 00 08 lwz r0,8(r31) ffc09f04: 7c 09 03 a6 mtctr r0 ffc09f08: 4e 80 04 21 bctrl Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { ffc09f0c: 83 ff 00 00 lwz r31,0(r31) void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09f10: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09f14: 40 9e ff ec bne+ cr7,ffc09f00 <_API_extensions_Run_postdriver+0x2c><== NEVER TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } ffc09f18: 80 01 00 14 lwz r0,20(r1) ffc09f1c: 83 c1 00 08 lwz r30,8(r1) ffc09f20: 7c 08 03 a6 mtlr r0 ffc09f24: 83 e1 00 0c lwz r31,12(r1) ffc09f28: 38 21 00 10 addi r1,r1,16 ffc09f2c: 4e 80 00 20 blr =============================================================================== ffc09f30 <_API_extensions_Run_postswitch>: /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09f30: 94 21 ff e8 stwu r1,-24(r1) ffc09f34: 3d 20 00 00 lis r9,0 ffc09f38: 7c 08 02 a6 mflr r0 ffc09f3c: 93 c1 00 10 stw r30,16(r1) ffc09f40: 3b c9 2d 80 addi r30,r9,11648 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09f44: 3b de 00 04 addi r30,r30,4 /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09f48: 93 e1 00 14 stw r31,20(r1) ffc09f4c: 83 e9 2d 80 lwz r31,11648(r9) ffc09f50: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09f54: 7f 9f f0 00 cmpw cr7,r31,r30 /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09f58: 93 a1 00 0c stw r29,12(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09f5c: 41 9e 00 28 beq- cr7,ffc09f84 <_API_extensions_Run_postswitch+0x54><== NEVER TAKEN ffc09f60: 3f a0 00 00 lis r29,0 ffc09f64: 3b bd 2d b8 addi r29,r29,11704 !_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 ); ffc09f68: 80 1f 00 0c lwz r0,12(r31) ffc09f6c: 80 7d 00 0c lwz r3,12(r29) ffc09f70: 7c 09 03 a6 mtctr r0 ffc09f74: 4e 80 04 21 bctrl Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { ffc09f78: 83 ff 00 00 lwz r31,0(r31) void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09f7c: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09f80: 40 9e ff e8 bne+ cr7,ffc09f68 <_API_extensions_Run_postswitch+0x38><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09f84: 80 01 00 1c lwz r0,28(r1) ffc09f88: 83 a1 00 0c lwz r29,12(r1) ffc09f8c: 7c 08 03 a6 mtlr r0 ffc09f90: 83 c1 00 10 lwz r30,16(r1) ffc09f94: 83 e1 00 14 lwz r31,20(r1) ffc09f98: 38 21 00 18 addi r1,r1,24 ffc09f9c: 4e 80 00 20 blr =============================================================================== ffc14edc <_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 ) { ffc14edc: 94 21 ff e0 stwu r1,-32(r1) ffc14ee0: 7c 08 02 a6 mflr r0 ffc14ee4: 90 01 00 24 stw r0,36(r1) /* * 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)) { ffc14ee8: 70 c0 00 03 andi. r0,r6,3 { size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; ffc14eec: 38 00 00 00 li r0,0 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc14ef0: 93 81 00 10 stw r28,16(r1) /* * 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)) { ffc14ef4: 7c dc 33 78 mr r28,r6 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 ) { ffc14ef8: 93 a1 00 14 stw r29,20(r1) ffc14efc: 7c 9d 23 78 mr r29,r4 ffc14f00: 93 e1 00 1c stw r31,28(r1) ffc14f04: 7c 7f 1b 78 mr r31,r3 ffc14f08: 93 c1 00 18 stw r30,24(r1) size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; ffc14f0c: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; ffc14f10: 90 03 00 48 stw r0,72(r3) the_message_queue->maximum_message_size = maximum_message_size; ffc14f14: 90 c3 00 4c stw r6,76(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)) { ffc14f18: 41 82 00 3c beq- ffc14f54 <_CORE_message_queue_Initialize+0x78> allocated_message_size += sizeof(uint32_t); ffc14f1c: 3b 86 00 04 addi r28,r6,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); ffc14f20: 57 9c 00 3a rlwinm r28,r28,0,0,29 } if (allocated_message_size < maximum_message_size) ffc14f24: 7f 86 e0 40 cmplw cr7,r6,r28 return false; ffc14f28: 3b c0 00 00 li r30,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) ffc14f2c: 40 9d 00 28 ble- cr7,ffc14f54 <_CORE_message_queue_Initialize+0x78><== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14f30: 80 01 00 24 lwz r0,36(r1) ffc14f34: 7f c3 f3 78 mr r3,r30 ffc14f38: 83 81 00 10 lwz r28,16(r1) ffc14f3c: 7c 08 03 a6 mtlr r0 ffc14f40: 83 a1 00 14 lwz r29,20(r1) ffc14f44: 83 c1 00 18 lwz r30,24(r1) ffc14f48: 83 e1 00 1c lwz r31,28(r1) ffc14f4c: 38 21 00 20 addi r1,r1,32 ffc14f50: 4e 80 00 20 blr /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( ffc14f54: 3b 9c 00 10 addi r28,r28,16 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; ffc14f58: 7d 45 e0 16 mulhwu r10,r5,r28 ffc14f5c: 7d 65 e1 d6 mullw r11,r5,r28 if ( x > SIZE_MAX ) ffc14f60: 2f 8a 00 00 cmpwi cr7,r10,0 */ if ( !size_t_mult32_with_overflow( (size_t) maximum_pending_messages, allocated_message_size + sizeof(CORE_message_queue_Buffer_control), &message_buffering_required ) ) return false; ffc14f64: 3b c0 00 00 li r30,0 size_t *c ) { long long x = (long long)a*b; if ( x > SIZE_MAX ) ffc14f68: 41 bd ff c8 bgt- cr7,ffc14f30 <_CORE_message_queue_Initialize+0x54> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc14f6c: 7d 63 5b 78 mr r3,r11 ffc14f70: 90 a1 00 08 stw r5,8(r1) ffc14f74: 48 00 3b fd bl ffc18b70 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) ffc14f78: 2f 83 00 00 cmpwi cr7,r3,0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc14f7c: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); ffc14f80: 7c 64 1b 78 mr r4,r3 if (the_message_queue->message_buffers == 0) ffc14f84: 80 a1 00 08 lwz r5,8(r1) ffc14f88: 41 be ff a8 beq- cr7,ffc14f30 <_CORE_message_queue_Initialize+0x54> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc14f8c: 38 7f 00 60 addi r3,r31,96 ffc14f90: 7f 86 e3 78 mr r6,r28 ffc14f94: 48 00 61 e1 bl ffc1b174 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc14f98: 80 9d 00 00 lwz r4,0(r29) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc14f9c: 38 1f 00 50 addi r0,r31,80 head->next = tail; head->previous = NULL; ffc14fa0: 93 df 00 54 stw r30,84(r31) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc14fa4: 39 3f 00 54 addi r9,r31,84 ffc14fa8: 68 84 00 01 xori r4,r4,1 head->next = tail; head->previous = NULL; tail->previous = head; ffc14fac: 90 1f 00 58 stw r0,88(r31) ffc14fb0: 7c 84 00 34 cntlzw r4,r4 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc14fb4: 91 3f 00 50 stw r9,80(r31) ffc14fb8: 7f e3 fb 78 mr r3,r31 ffc14fbc: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc14fc0: 38 a0 00 80 li r5,128 ffc14fc4: 38 c0 00 06 li r6,6 ffc14fc8: 48 00 2e 1d bl ffc17de4 <_Thread_queue_Initialize> STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14fcc: 80 01 00 24 lwz r0,36(r1) THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; ffc14fd0: 3b c0 00 01 li r30,1 } ffc14fd4: 83 81 00 10 lwz r28,16(r1) ffc14fd8: 7c 08 03 a6 mtlr r0 ffc14fdc: 7f c3 f3 78 mr r3,r30 ffc14fe0: 83 a1 00 14 lwz r29,20(r1) ffc14fe4: 83 c1 00 18 lwz r30,24(r1) ffc14fe8: 83 e1 00 1c lwz r31,28(r1) ffc14fec: 38 21 00 20 addi r1,r1,32 ffc14ff0: 4e 80 00 20 blr =============================================================================== ffc0a624 <_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 ) { ffc0a624: 94 21 ff f0 stwu r1,-16(r1) ffc0a628: 7c 08 02 a6 mflr r0 ffc0a62c: 93 e1 00 0c stw r31,12(r1) ffc0a630: 7c 7f 1b 78 mr r31,r3 ffc0a634: 90 01 00 14 stw r0,20(r1) ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc0a638: 48 00 21 01 bl ffc0c738 <_Thread_queue_Dequeue> ffc0a63c: 2f 83 00 00 cmpwi cr7,r3,0 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0a640: 38 60 00 00 li r3,0 if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc0a644: 41 9e 00 18 beq- cr7,ffc0a65c <_CORE_semaphore_Surrender+0x38> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0a648: 80 01 00 14 lwz r0,20(r1) ffc0a64c: 83 e1 00 0c lwz r31,12(r1) ffc0a650: 38 21 00 10 addi r1,r1,16 ffc0a654: 7c 08 03 a6 mtlr r0 ffc0a658: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0a65c: 7c 00 00 a6 mfmsr r0 ffc0a660: 7d 30 42 a6 mfsprg r9,0 ffc0a664: 7c 09 48 78 andc r9,r0,r9 ffc0a668: 7d 20 01 24 mtmsr r9 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc0a66c: 81 3f 00 48 lwz r9,72(r31) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; ffc0a670: 38 60 00 04 li r3,4 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc0a674: 81 7f 00 40 lwz r11,64(r31) ffc0a678: 7f 89 58 40 cmplw cr7,r9,r11 ffc0a67c: 40 9c 00 10 bge- cr7,ffc0a68c <_CORE_semaphore_Surrender+0x68><== NEVER TAKEN the_semaphore->count += 1; ffc0a680: 39 29 00 01 addi r9,r9,1 ffc0a684: 91 3f 00 48 stw r9,72(r31) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0a688: 38 60 00 00 li r3,0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0a68c: 7c 00 01 24 mtmsr r0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0a690: 80 01 00 14 lwz r0,20(r1) ffc0a694: 83 e1 00 0c lwz r31,12(r1) ffc0a698: 38 21 00 10 addi r1,r1,16 ffc0a69c: 7c 08 03 a6 mtlr r0 ffc0a6a0: 4e 80 00 20 blr =============================================================================== ffc100e8 <_Chain_Initialize>: Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc100e8: 2c 05 00 00 cmpwi r5,0 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; ffc100ec: 38 00 00 00 li r0,0 size_t node_size ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc100f0: 39 43 00 04 addi r10,r3,4 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; ffc100f4: 90 03 00 04 stw r0,4(r3) ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; ffc100f8: 7c 69 1b 78 mr r9,r3 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc100fc: 41 82 00 38 beq- ffc10134 <_Chain_Initialize+0x4c> <== NEVER TAKEN ffc10100: 39 05 ff ff addi r8,r5,-1 ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; ffc10104: 7c a9 03 a6 mtctr r5 Chain_Node *next = starting_address; ffc10108: 7c 89 23 78 mr r9,r4 ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; ffc1010c: 7c 6b 1b 78 mr r11,r3 ffc10110: 48 00 00 0c b ffc1011c <_Chain_Initialize+0x34> Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10114: 7d 2b 4b 78 mr r11,r9 current->next = next; next->previous = current; current = next; next = (Chain_Node *) ffc10118: 7c 09 03 78 mr r9,r0 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; ffc1011c: 91 2b 00 00 stw r9,0(r11) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( ffc10120: 7c 09 32 14 add r0,r9,r6 head->previous = NULL; while ( count-- ) { current->next = next; next->previous = current; ffc10124: 91 69 00 04 stw r11,4(r9) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10128: 42 00 ff ec bdnz+ ffc10114 <_Chain_Initialize+0x2c> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( ffc1012c: 7c c6 41 d6 mullw r6,r6,r8 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10130: 7d 24 32 14 add r9,r4,r6 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; ffc10134: 91 49 00 00 stw r10,0(r9) tail->previous = current; ffc10138: 91 23 00 08 stw r9,8(r3) } ffc1013c: 4e 80 00 20 blr =============================================================================== ffc08e6c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { ffc08e6c: 94 21 ff f0 stwu r1,-16(r1) ffc08e70: 7c 08 02 a6 mflr r0 ffc08e74: 90 01 00 14 stw r0,20(r1) ffc08e78: 93 e1 00 0c stw r31,12(r1) ffc08e7c: 7c 7f 1b 78 mr r31,r3 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 ]; ffc08e80: 81 63 01 2c lwz r11,300(r3) option_set = (rtems_option) the_thread->Wait.option; ffc08e84: 80 c3 00 30 lwz r6,48(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc08e88: 7d 40 00 a6 mfmsr r10 ffc08e8c: 7c 10 42 a6 mfsprg r0,0 ffc08e90: 7d 40 00 78 andc r0,r10,r0 ffc08e94: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); pending_events = api->pending_events; ffc08e98: 81 2b 00 00 lwz r9,0(r11) event_condition = (rtems_event_set) the_thread->Wait.count; ffc08e9c: 80 03 00 24 lwz r0,36(r3) seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { ffc08ea0: 7c 08 48 39 and. r8,r0,r9 ffc08ea4: 41 82 00 e4 beq- ffc08f88 <_Event_Surrender+0x11c> /* * 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() && ffc08ea8: 3c e0 00 00 lis r7,0 ffc08eac: 38 e7 2d b8 addi r7,r7,11704 ffc08eb0: 80 a7 00 08 lwz r5,8(r7) ffc08eb4: 2f 85 00 00 cmpwi cr7,r5,0 ffc08eb8: 41 9e 00 10 beq- cr7,ffc08ec8 <_Event_Surrender+0x5c> ffc08ebc: 80 e7 00 0c lwz r7,12(r7) ffc08ec0: 7f 83 38 00 cmpw cr7,r3,r7 ffc08ec4: 41 9e 00 78 beq- cr7,ffc08f3c <_Event_Surrender+0xd0> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); ffc08ec8: 80 ff 00 10 lwz r7,16(r31) } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { ffc08ecc: 70 e5 01 00 andi. r5,r7,256 ffc08ed0: 41 82 00 b8 beq- ffc08f88 <_Event_Surrender+0x11c> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc08ed4: 7f 80 40 00 cmpw cr7,r0,r8 ffc08ed8: 41 9e 00 0c beq- cr7,ffc08ee4 <_Event_Surrender+0x78> ffc08edc: 70 c0 00 02 andi. r0,r6,2 ffc08ee0: 41 82 00 a8 beq- ffc08f88 <_Event_Surrender+0x11c> <== NEVER TAKEN 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; ffc08ee4: 80 ff 00 28 lwz r7,40(r31) 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) ); ffc08ee8: 7d 29 40 78 andc r9,r9,r8 * 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 ); the_thread->Wait.count = 0; ffc08eec: 38 00 00 00 li r0,0 /* * 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 ); ffc08ef0: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc08ef4: 90 1f 00 24 stw r0,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc08ef8: 91 07 00 00 stw r8,0(r7) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc08efc: 7c 00 00 a6 mfmsr r0 ffc08f00: 7d 40 01 24 mtmsr r10 ffc08f04: 7c 00 01 24 mtmsr r0 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc08f08: 80 1f 00 50 lwz r0,80(r31) ffc08f0c: 2f 80 00 02 cmpwi cr7,r0,2 ffc08f10: 41 9e 00 90 beq- cr7,ffc08fa0 <_Event_Surrender+0x134> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc08f14: 7d 40 01 24 mtmsr r10 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc08f18: 3c 80 10 03 lis r4,4099 ffc08f1c: 7f e3 fb 78 mr r3,r31 ffc08f20: 60 84 ff f8 ori r4,r4,65528 ffc08f24: 48 00 2f 91 bl ffc0beb4 <_Thread_Clear_state> } return; } } _ISR_Enable( level ); } ffc08f28: 80 01 00 14 lwz r0,20(r1) ffc08f2c: 83 e1 00 0c lwz r31,12(r1) ffc08f30: 38 21 00 10 addi r1,r1,16 ffc08f34: 7c 08 03 a6 mtlr r0 ffc08f38: 4e 80 00 20 blr * 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) || ffc08f3c: 3c e0 00 00 lis r7,0 ffc08f40: 80 a7 28 0c lwz r5,10252(r7) /* * 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 ) && ffc08f44: 2f 85 00 02 cmpwi cr7,r5,2 ffc08f48: 41 9e 00 10 beq- cr7,ffc08f58 <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { ffc08f4c: 80 a7 28 0c lwz r5,10252(r7) * 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) || ffc08f50: 2f 85 00 01 cmpwi cr7,r5,1 ffc08f54: 40 9e ff 74 bne+ cr7,ffc08ec8 <_Event_Surrender+0x5c> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { ffc08f58: 7f 80 40 00 cmpw cr7,r0,r8 ffc08f5c: 41 9e 00 0c beq- cr7,ffc08f68 <_Event_Surrender+0xfc> ffc08f60: 70 c0 00 02 andi. r0,r6,2 ffc08f64: 41 82 00 24 beq- ffc08f88 <_Event_Surrender+0x11c> <== NEVER TAKEN 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; ffc08f68: 80 df 00 28 lwz r6,40(r31) _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 ); the_thread->Wait.count = 0; ffc08f6c: 38 00 00 00 li r0,0 ffc08f70: 7d 29 40 78 andc r9,r9,r8 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 ); ffc08f74: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc08f78: 90 1f 00 24 stw r0,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc08f7c: 38 00 00 03 li r0,3 ((_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 ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc08f80: 91 06 00 00 stw r8,0(r6) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc08f84: 90 07 28 0c stw r0,10252(r7) ffc08f88: 7d 40 01 24 mtmsr r10 } return; } } _ISR_Enable( level ); } ffc08f8c: 80 01 00 14 lwz r0,20(r1) ffc08f90: 83 e1 00 0c lwz r31,12(r1) ffc08f94: 38 21 00 10 addi r1,r1,16 ffc08f98: 7c 08 03 a6 mtlr r0 ffc08f9c: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc08fa0: 38 00 00 03 li r0,3 ffc08fa4: 90 1f 00 50 stw r0,80(r31) ffc08fa8: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc08fac: 38 7f 00 48 addi r3,r31,72 ffc08fb0: 48 00 48 19 bl ffc0d7c8 <_Watchdog_Remove> ffc08fb4: 3c 80 10 03 lis r4,4099 ffc08fb8: 7f e3 fb 78 mr r3,r31 ffc08fbc: 60 84 ff f8 ori r4,r4,65528 ffc08fc0: 48 00 2e f5 bl ffc0beb4 <_Thread_Clear_state> ffc08fc4: 4b ff ff c8 b ffc08f8c <_Event_Surrender+0x120> =============================================================================== ffc08fc8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { ffc08fc8: 94 21 ff e8 stwu r1,-24(r1) ffc08fcc: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc08fd0: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *ignored ) { ffc08fd4: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc08fd8: 48 00 33 99 bl ffc0c370 <_Thread_Get> switch ( location ) { ffc08fdc: 80 01 00 08 lwz r0,8(r1) ffc08fe0: 2f 80 00 00 cmpwi cr7,r0,0 ffc08fe4: 40 9e 00 54 bne- cr7,ffc09038 <_Event_Timeout+0x70> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc08fe8: 7d 20 00 a6 mfmsr r9 ffc08fec: 7d 70 42 a6 mfsprg r11,0 ffc08ff0: 7d 2b 58 78 andc r11,r9,r11 ffc08ff4: 7d 60 01 24 mtmsr r11 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc08ff8: 3d 60 00 00 lis r11,0 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { ffc08ffc: 81 6b 2d c4 lwz r11,11716(r11) _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc09000: 90 03 00 24 stw r0,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc09004: 7f 83 58 00 cmpw cr7,r3,r11 ffc09008: 41 9e 00 40 beq- cr7,ffc09048 <_Event_Timeout+0x80> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; ffc0900c: 38 00 00 06 li r0,6 ffc09010: 90 03 00 34 stw r0,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc09014: 7d 20 01 24 mtmsr r9 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc09018: 3c 80 10 03 lis r4,4099 ffc0901c: 60 84 ff f8 ori r4,r4,65528 ffc09020: 48 00 2e 95 bl ffc0beb4 <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc09024: 3d 20 00 00 lis r9,0 ffc09028: 81 69 27 c8 lwz r11,10184(r9) ffc0902c: 38 0b ff ff addi r0,r11,-1 ffc09030: 90 09 27 c8 stw r0,10184(r9) return _Thread_Dispatch_disable_level; ffc09034: 80 09 27 c8 lwz r0,10184(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc09038: 80 01 00 1c lwz r0,28(r1) ffc0903c: 38 21 00 18 addi r1,r1,24 ffc09040: 7c 08 03 a6 mtlr r0 ffc09044: 4e 80 00 20 blr } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc09048: 3d 60 00 00 lis r11,0 ffc0904c: 80 0b 28 0c lwz r0,10252(r11) ffc09050: 2f 80 00 01 cmpwi cr7,r0,1 ffc09054: 40 9e ff b8 bne+ cr7,ffc0900c <_Event_Timeout+0x44> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc09058: 38 00 00 02 li r0,2 ffc0905c: 90 0b 28 0c stw r0,10252(r11) ffc09060: 4b ff ff ac b ffc0900c <_Event_Timeout+0x44> =============================================================================== ffc10314 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10314: 94 21 ff e0 stwu r1,-32(r1) ffc10318: 7c 08 02 a6 mflr r0 ffc1031c: 7d 80 00 26 mfcr r12 ffc10320: 7c 89 23 78 mr r9,r4 ffc10324: 90 01 00 24 stw r0,36(r1) Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE ffc10328: 38 04 00 04 addi r0,r4,4 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { ffc1032c: 7f 84 00 40 cmplw cr7,r4,r0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10330: 93 a1 00 14 stw r29,20(r1) ffc10334: 7c 7d 1b 78 mr r29,r3 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; ffc10338: 80 e3 00 10 lwz r7,16(r3) uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { /* Integer overflow occured */ return NULL; ffc1033c: 38 60 00 00 li r3,0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10340: 93 61 00 0c stw r27,12(r1) ffc10344: 93 81 00 10 stw r28,16(r1) ffc10348: 93 c1 00 18 stw r30,24(r1) ffc1034c: 93 e1 00 1c stw r31,28(r1) ffc10350: 91 81 00 08 stw r12,8(r1) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { ffc10354: 41 9d 00 7c bgt- cr7,ffc103d0 <_Heap_Allocate_aligned_with_boundary+0xbc> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { ffc10358: 2e 06 00 00 cmpwi cr4,r6,0 ffc1035c: 40 92 01 b8 bne- cr4,ffc10514 <_Heap_Allocate_aligned_with_boundary+0x200> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc10360: 80 9d 00 08 lwz r4,8(r29) do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc10364: 7f 9d 20 00 cmpw cr7,r29,r4 ffc10368: 41 9e 01 c4 beq- cr7,ffc1052c <_Heap_Allocate_aligned_with_boundary+0x218> * 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 ) { if ( alignment == 0 ) { ffc1036c: 2c 05 00 00 cmpwi r5,0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc10370: 3b c0 00 00 li r30,0 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size ffc10374: 3b 67 00 07 addi r27,r7,7 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; ffc10378: 23 89 00 04 subfic r28,r9,4 ffc1037c: 48 00 00 24 b ffc103a0 <_Heap_Allocate_aligned_with_boundary+0x8c> * 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 ) { if ( alignment == 0 ) { ffc10380: 40 82 00 7c bne- ffc103fc <_Heap_Allocate_aligned_with_boundary+0xe8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc10384: 3b e4 00 08 addi r31,r4,8 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc10388: 2f 9f 00 00 cmpwi cr7,r31,0 ); } } /* Statistics */ ++search_count; ffc1038c: 3b de 00 01 addi r30,r30,1 if ( alloc_begin != 0 ) { ffc10390: 40 9e 01 3c bne- cr7,ffc104cc <_Heap_Allocate_aligned_with_boundary+0x1b8> break; } block = block->next; ffc10394: 80 84 00 08 lwz r4,8(r4) do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc10398: 7f 9d 20 00 cmpw cr7,r29,r4 ffc1039c: 41 9e 00 20 beq- cr7,ffc103bc <_Heap_Allocate_aligned_with_boundary+0xa8> /* * 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 ) { ffc103a0: 81 64 00 04 lwz r11,4(r4) ffc103a4: 7f 80 58 40 cmplw cr7,r0,r11 ffc103a8: 41 bc ff d8 blt- cr7,ffc10380 <_Heap_Allocate_aligned_with_boundary+0x6c> if ( alloc_begin != 0 ) { break; } block = block->next; ffc103ac: 80 84 00 08 lwz r4,8(r4) ); } } /* Statistics */ ++search_count; ffc103b0: 3b de 00 01 addi r30,r30,1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc103b4: 7f 9d 20 00 cmpw cr7,r29,r4 ffc103b8: 40 9e ff e8 bne+ cr7,ffc103a0 <_Heap_Allocate_aligned_with_boundary+0x8c> ffc103bc: 3b e0 00 00 li r31,0 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { ffc103c0: 80 1d 00 44 lwz r0,68(r29) ffc103c4: 7f 80 f0 40 cmplw cr7,r0,r30 ffc103c8: 41 9c 01 38 blt- cr7,ffc10500 <_Heap_Allocate_aligned_with_boundary+0x1ec> stats->max_search = search_count; } return (void *) alloc_begin; ffc103cc: 7f e3 fb 78 mr r3,r31 } ffc103d0: 80 01 00 24 lwz r0,36(r1) ffc103d4: 81 81 00 08 lwz r12,8(r1) ffc103d8: 7c 08 03 a6 mtlr r0 ffc103dc: 83 61 00 0c lwz r27,12(r1) ffc103e0: 83 81 00 10 lwz r28,16(r1) ffc103e4: 7d 80 81 20 mtcrf 8,r12 ffc103e8: 83 a1 00 14 lwz r29,20(r1) ffc103ec: 83 c1 00 18 lwz r30,24(r1) ffc103f0: 83 e1 00 1c lwz r31,28(r1) ffc103f4: 38 21 00 20 addi r1,r1,32 ffc103f8: 4e 80 00 20 blr - 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; ffc103fc: 55 6b 00 3c rlwinm r11,r11,0,0,30 ffc10400: 80 7d 00 14 lwz r3,20(r29) 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; ffc10404: 7d 64 5a 14 add r11,r4,r11 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_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; ffc10408: 7f fc 5a 14 add r31,r28,r11 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1040c: 7f ff 2b 96 divwu r31,r31,r5 ffc10410: 7f ff 29 d6 mullw r31,r31,r5 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; ffc10414: 7d 43 d8 50 subf r10,r3,r27 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 ffc10418: 7d 6a 5a 14 add r11,r10,r11 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 ) { ffc1041c: 7f 8b f8 40 cmplw cr7,r11,r31 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc10420: 39 84 00 08 addi r12,r4,8 ffc10424: 40 9c 00 0c bge- cr7,ffc10430 <_Heap_Allocate_aligned_with_boundary+0x11c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10428: 7d 6b 2b 96 divwu r11,r11,r5 ffc1042c: 7f eb 29 d6 mullw r31,r11,r5 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc10430: 41 92 00 64 beq- cr4,ffc10494 <_Heap_Allocate_aligned_with_boundary+0x180> /* 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; ffc10434: 7d 5f 4a 14 add r10,r31,r9 ffc10438: 7d 6a 33 96 divwu r11,r10,r6 ffc1043c: 7d 6b 31 d6 mullw r11,r11,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc10440: 7f 9f 58 40 cmplw cr7,r31,r11 ffc10444: 40 9c 00 50 bge- cr7,ffc10494 <_Heap_Allocate_aligned_with_boundary+0x180> ffc10448: 7f 8a 58 40 cmplw cr7,r10,r11 ffc1044c: 40 9d 00 48 ble- cr7,ffc10494 <_Heap_Allocate_aligned_with_boundary+0x180> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; ffc10450: 7d 0c 4a 14 add r8,r12,r9 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { ffc10454: 7f 88 58 40 cmplw cr7,r8,r11 return 0; ffc10458: 3b e0 00 00 li r31,0 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 ) { if ( boundary_line < boundary_floor ) { ffc1045c: 40 bd 00 10 ble+ cr7,ffc1046c <_Heap_Allocate_aligned_with_boundary+0x158> ffc10460: 4b ff ff 28 b ffc10388 <_Heap_Allocate_aligned_with_boundary+0x74> /* 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 ) { ffc10464: 40 99 00 30 ble- cr6,ffc10494 <_Heap_Allocate_aligned_with_boundary+0x180> if ( boundary_line < boundary_floor ) { ffc10468: 41 85 00 a4 bgt- cr1,ffc1050c <_Heap_Allocate_aligned_with_boundary+0x1f8><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; ffc1046c: 7f e9 58 50 subf r31,r9,r11 ffc10470: 7f ff 2b 96 divwu r31,r31,r5 ffc10474: 7f ff 29 d6 mullw r31,r31,r5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; ffc10478: 7d 5f 4a 14 add r10,r31,r9 ffc1047c: 7d 6a 33 96 divwu r11,r10,r6 ffc10480: 7d 6b 31 d6 mullw r11,r11,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc10484: 7f 9f 58 40 cmplw cr7,r31,r11 ffc10488: 7f 0a 58 40 cmplw cr6,r10,r11 if ( boundary_line < boundary_floor ) { ffc1048c: 7c 88 58 40 cmplw cr1,r8,r11 /* 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 ) { ffc10490: 41 9c ff d4 blt+ cr7,ffc10464 <_Heap_Allocate_aligned_with_boundary+0x150> 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 ) { ffc10494: 7f 8c f8 40 cmplw cr7,r12,r31 ffc10498: 41 9d 00 74 bgt- cr7,ffc1050c <_Heap_Allocate_aligned_with_boundary+0x1f8> ffc1049c: 7d 7f 3b 96 divwu r11,r31,r7 ffc104a0: 7d 6b 39 d6 mullw r11,r11,r7 ffc104a4: 21 44 ff f8 subfic r10,r4,-8 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; ffc104a8: 7d 6a 5a 14 add r11,r10,r11 if ( free_size >= min_block_size || free_size == 0 ) { ffc104ac: 7f 83 58 40 cmplw cr7,r3,r11 ffc104b0: 40 bd fe d8 ble- cr7,ffc10388 <_Heap_Allocate_aligned_with_boundary+0x74> return alloc_begin; } } return 0; ffc104b4: 31 6b ff ff addic r11,r11,-1 ffc104b8: 7d 6b 59 10 subfe r11,r11,r11 ffc104bc: 7f ff 58 38 and r31,r31,r11 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc104c0: 2f 9f 00 00 cmpwi cr7,r31,0 ); } } /* Statistics */ ++search_count; ffc104c4: 3b de 00 01 addi r30,r30,1 if ( alloc_begin != 0 ) { ffc104c8: 41 9e fe cc beq+ cr7,ffc10394 <_Heap_Allocate_aligned_with_boundary+0x80> search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc104cc: 81 7d 00 48 lwz r11,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc104d0: 7f a3 eb 78 mr r3,r29 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc104d4: 80 1d 00 4c lwz r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc104d8: 7f e5 fb 78 mr r5,r31 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc104dc: 39 6b 00 01 addi r11,r11,1 stats->searches += search_count; ffc104e0: 7c 00 f2 14 add r0,r0,r30 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc104e4: 91 7d 00 48 stw r11,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc104e8: 7d 26 4b 78 mr r6,r9 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc104ec: 90 1d 00 4c stw r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc104f0: 4b ff a6 49 bl ffc0ab38 <_Heap_Block_allocate> boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { ffc104f4: 80 1d 00 44 lwz r0,68(r29) ffc104f8: 7f 80 f0 40 cmplw cr7,r0,r30 ffc104fc: 40 bc fe d0 bge- cr7,ffc103cc <_Heap_Allocate_aligned_with_boundary+0xb8> stats->max_search = search_count; ffc10500: 93 dd 00 44 stw r30,68(r29) } return (void *) alloc_begin; ffc10504: 7f e3 fb 78 mr r3,r31 ffc10508: 4b ff fe c8 b ffc103d0 <_Heap_Allocate_aligned_with_boundary+0xbc> if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; ffc1050c: 3b e0 00 00 li r31,0 ffc10510: 4b ff fe 78 b ffc10388 <_Heap_Allocate_aligned_with_boundary+0x74> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { ffc10514: 7f 84 30 40 cmplw cr7,r4,r6 ffc10518: 41 bd fe b8 bgt- cr7,ffc103d0 <_Heap_Allocate_aligned_with_boundary+0xbc> return NULL; } if ( alignment == 0 ) { ffc1051c: 2f 85 00 00 cmpwi cr7,r5,0 ffc10520: 40 be fe 40 bne- cr7,ffc10360 <_Heap_Allocate_aligned_with_boundary+0x4c> alignment = page_size; ffc10524: 7c e5 3b 78 mr r5,r7 ffc10528: 4b ff fe 38 b ffc10360 <_Heap_Allocate_aligned_with_boundary+0x4c> do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc1052c: 3b c0 00 00 li r30,0 ffc10530: 3b e0 00 00 li r31,0 ffc10534: 4b ff fe 8c b ffc103c0 <_Heap_Allocate_aligned_with_boundary+0xac> =============================================================================== ffc10114 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc10114: 94 21 ff c0 stwu r1,-64(r1) ffc10118: 7d 80 00 26 mfcr r12 ffc1011c: 7c 08 02 a6 mflr r0 ffc10120: 93 a1 00 34 stw r29,52(r1) Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; 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; ffc10124: 7f a4 2a 14 add r29,r4,r5 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 ) { ffc10128: 7f 84 e8 40 cmplw cr7,r4,r29 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc1012c: 90 01 00 44 stw r0,68(r1) ffc10130: 93 41 00 28 stw r26,40(r1) 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; ffc10134: 3b 40 00 00 li r26,0 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc10138: 93 c1 00 38 stw r30,56(r1) ffc1013c: 7c 7e 1b 78 mr r30,r3 ffc10140: 93 01 00 20 stw r24,32(r1) ffc10144: 93 21 00 24 stw r25,36(r1) ffc10148: 7c d9 33 78 mr r25,r6 ffc1014c: 93 61 00 2c stw r27,44(r1) ffc10150: 93 81 00 30 stw r28,48(r1) ffc10154: 93 e1 00 3c stw r31,60(r1) ffc10158: 7c 9f 23 78 mr r31,r4 Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; ffc1015c: 83 63 00 20 lwz r27,32(r3) 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; ffc10160: 38 60 00 00 li r3,0 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc10164: 92 e1 00 1c stw r23,28(r1) ffc10168: 91 81 00 18 stw r12,24(r1) 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; ffc1016c: 93 41 00 0c stw r26,12(r1) Heap_Block *extend_last_block = NULL; ffc10170: 93 41 00 08 stw r26,8(r1) uintptr_t const page_size = heap->page_size; ffc10174: 83 9e 00 10 lwz r28,16(r30) uintptr_t const min_block_size = heap->min_block_size; ffc10178: 80 de 00 14 lwz r6,20(r30) 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; ffc1017c: 83 1e 00 30 lwz r24,48(r30) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { ffc10180: 40 9d 00 40 ble- cr7,ffc101c0 <_Heap_Extend+0xac> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc10184: 80 01 00 44 lwz r0,68(r1) ffc10188: 81 81 00 18 lwz r12,24(r1) ffc1018c: 7c 08 03 a6 mtlr r0 ffc10190: 82 e1 00 1c lwz r23,28(r1) ffc10194: 83 01 00 20 lwz r24,32(r1) ffc10198: 7d 81 81 20 mtcrf 24,r12 ffc1019c: 83 21 00 24 lwz r25,36(r1) ffc101a0: 83 41 00 28 lwz r26,40(r1) ffc101a4: 83 61 00 2c lwz r27,44(r1) ffc101a8: 83 81 00 30 lwz r28,48(r1) ffc101ac: 83 a1 00 34 lwz r29,52(r1) ffc101b0: 83 c1 00 38 lwz r30,56(r1) ffc101b4: 83 e1 00 3c lwz r31,60(r1) ffc101b8: 38 21 00 40 addi r1,r1,64 ffc101bc: 4e 80 00 20 blr if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( ffc101c0: 7c 83 23 78 mr r3,r4 ffc101c4: 38 e1 00 0c addi r7,r1,12 ffc101c8: 7c a4 2b 78 mr r4,r5 ffc101cc: 39 01 00 08 addi r8,r1,8 ffc101d0: 7f 85 e3 78 mr r5,r28 ffc101d4: 4b ff a3 a1 bl ffc0a574 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc101d8: 2f 83 00 00 cmpwi cr7,r3,0 /* For simplicity we reject extend areas that are too small */ return false; ffc101dc: 7f 43 d3 78 mr r3,r26 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc101e0: 41 be ff a4 beq- cr7,ffc10184 <_Heap_Extend+0x70> ffc101e4: 7f 69 db 78 mr r9,r27 ffc101e8: 3a e0 00 00 li r23,0 ffc101ec: 38 00 00 00 li r0,0 ffc101f0: 39 00 00 00 li r8,0 ffc101f4: 48 00 00 44 b ffc10238 <_Heap_Extend+0x124> return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { ffc101f8: 7f 9d 58 40 cmplw cr7,r29,r11 ffc101fc: 40 9c 00 08 bge- cr7,ffc10204 <_Heap_Extend+0xf0> ffc10200: 7d 20 4b 78 mr r0,r9 ffc10204: 7d 4b e3 96 divwu r10,r11,r28 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc10208: 7f 8b f8 00 cmpw cr7,r11,r31 ffc1020c: 7d 4a e1 d6 mullw r10,r10,r28 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc10210: 39 4a ff f8 addi r10,r10,-8 ffc10214: 41 9e 00 64 beq- cr7,ffc10278 <_Heap_Extend+0x164> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { ffc10218: 7f 9f 58 40 cmplw cr7,r31,r11 ffc1021c: 40 9d 00 08 ble- cr7,ffc10224 <_Heap_Extend+0x110> 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 ) ffc10220: 7d 57 53 78 mr r23,r10 - 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; ffc10224: 81 2a 00 04 lwz r9,4(r10) ffc10228: 55 29 00 3c rlwinm r9,r9,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc1022c: 7d 29 52 14 add r9,r9,r10 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc10230: 7f 9b 48 00 cmpw cr7,r27,r9 ffc10234: 41 9e 00 60 beq- cr7,ffc10294 <_Heap_Extend+0x180> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc10238: 7f 89 d8 00 cmpw cr7,r9,r27 ffc1023c: 7d 2a 4b 78 mr r10,r9 ffc10240: 41 9e 01 b8 beq- cr7,ffc103f8 <_Heap_Extend+0x2e4> uintptr_t const sub_area_end = start_block->prev_size; ffc10244: 81 69 00 00 lwz r11,0(r9) Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( ffc10248: 7f 9f 58 40 cmplw cr7,r31,r11 ffc1024c: 40 9c 00 0c bge- cr7,ffc10258 <_Heap_Extend+0x144> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ffc10250: 7f 8a e8 40 cmplw cr7,r10,r29 ffc10254: 41 9c 02 28 blt- cr7,ffc1047c <_Heap_Extend+0x368> ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc10258: 7f 8a e8 00 cmpw cr7,r10,r29 ffc1025c: 40 9e ff 9c bne+ cr7,ffc101f8 <_Heap_Extend+0xe4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10260: 7d 4b e3 96 divwu r10,r11,r28 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 ) { ffc10264: 7f 8b f8 00 cmpw cr7,r11,r31 ffc10268: 7d 4a e1 d6 mullw r10,r10,r28 sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc1026c: 7d 28 4b 78 mr r8,r9 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc10270: 39 4a ff f8 addi r10,r10,-8 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 ) { ffc10274: 40 9e ff a4 bne+ cr7,ffc10218 <_Heap_Extend+0x104> <== ALWAYS TAKEN start_block->prev_size = extend_area_end; ffc10278: 93 a9 00 00 stw r29,0(r9) 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 ) ffc1027c: 7d 5a 53 78 mr r26,r10 - 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; ffc10280: 81 2a 00 04 lwz r9,4(r10) ffc10284: 55 29 00 3c rlwinm r9,r9,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc10288: 7d 29 52 14 add r9,r9,r10 } 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 ); ffc1028c: 7f 9b 48 00 cmpw cr7,r27,r9 ffc10290: 40 9e ff a8 bne+ cr7,ffc10238 <_Heap_Extend+0x124> <== NEVER TAKEN if ( extend_area_begin < heap->area_begin ) { ffc10294: 81 3e 00 18 lwz r9,24(r30) ffc10298: 7f 9f 48 40 cmplw cr7,r31,r9 ffc1029c: 41 9c 01 64 blt- cr7,ffc10400 <_Heap_Extend+0x2ec> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { ffc102a0: 81 3e 00 1c lwz r9,28(r30) ffc102a4: 7f 9d 48 40 cmplw cr7,r29,r9 ffc102a8: 40 9d 00 08 ble- cr7,ffc102b0 <_Heap_Extend+0x19c> heap->area_end = extend_area_end; ffc102ac: 93 be 00 1c stw r29,28(r30) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc102b0: 81 5e 00 20 lwz r10,32(r30) } 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; ffc102b4: 81 21 00 0c lwz r9,12(r1) ffc102b8: 81 61 00 08 lwz r11,8(r1) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc102bc: 7f 8a 48 40 cmplw cr7,r10,r9 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; ffc102c0: 93 a9 00 00 stw r29,0(r9) heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = ffc102c4: 7d 49 58 50 subf r10,r9,r11 (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; ffc102c8: 61 47 00 01 ori r7,r10,1 _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; ffc102cc: 91 4b 00 00 stw r10,0(r11) extend_last_block->size_and_flag = 0; ffc102d0: 39 40 00 00 li r10,0 extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = ffc102d4: 90 e9 00 04 stw r7,4(r9) extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; ffc102d8: 91 4b 00 04 stw r10,4(r11) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc102dc: 40 9d 01 58 ble- cr7,ffc10434 <_Heap_Extend+0x320> <== ALWAYS TAKEN heap->first_block = extend_first_block; ffc102e0: 91 3e 00 20 stw r9,32(r30) } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { ffc102e4: 2e 08 00 00 cmpwi cr4,r8,0 ffc102e8: 41 92 01 b0 beq- cr4,ffc10498 <_Heap_Extend+0x384> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; ffc102ec: 80 1e 00 10 lwz r0,16(r30) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); ffc102f0: 3b ff 00 08 addi r31,r31,8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; ffc102f4: 7d 3f 03 96 divwu r9,r31,r0 ffc102f8: 7d 29 01 d6 mullw r9,r9,r0 if ( remainder != 0 ) { ffc102fc: 7d 29 f8 51 subf. r9,r9,r31 ffc10300: 41 82 00 0c beq- ffc1030c <_Heap_Extend+0x1f8> <== NEVER TAKEN return value - remainder + alignment; ffc10304: 7f ff 02 14 add r31,r31,r0 ffc10308: 7f e9 f8 50 subf r31,r9,r31 uintptr_t const new_first_block_begin = ffc1030c: 38 9f ff f8 addi r4,r31,-8 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; ffc10310: 81 28 00 00 lwz r9,0(r8) 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 = ffc10314: 7c 04 40 50 subf r0,r4,r8 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; ffc10318: 60 00 00 01 ori r0,r0,1 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; ffc1031c: 91 3f ff f8 stw r9,-8(r31) new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Free_block( heap, new_first_block ); ffc10320: 7f c3 f3 78 mr r3,r30 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; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; ffc10324: 90 04 00 04 stw r0,4(r4) _Heap_Free_block( heap, new_first_block ); ffc10328: 4b ff fd b1 bl ffc100d8 <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { ffc1032c: 2d 9a 00 00 cmpwi cr3,r26,0 ffc10330: 41 8e 01 18 beq- cr3,ffc10448 <_Heap_Extend+0x334> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10334: 81 3e 00 10 lwz r9,16(r30) ) { 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, ffc10338: 38 1d ff f8 addi r0,r29,-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( ffc1033c: 7c 1a 00 50 subf r0,r26,r0 ); 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) ffc10340: 81 7a 00 04 lwz r11,4(r26) ffc10344: 7c 00 4b 96 divwu r0,r0,r9 ffc10348: 7c 00 49 d6 mullw r0,r0,r9 | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); ffc1034c: 7f c3 f3 78 mr r3,r30 ); 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) ffc10350: 7d 60 58 50 subf r11,r0,r11 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc10354: 7d 20 d2 14 add r9,r0,r26 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; ffc10358: 61 6b 00 01 ori r11,r11,1 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc1035c: 91 69 00 04 stw r11,4(r9) (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 ); ffc10360: 7f 44 d3 78 mr r4,r26 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; ffc10364: 81 3a 00 04 lwz r9,4(r26) ffc10368: 55 29 07 fe clrlwi r9,r9,31 block->size_and_flag = size | flag; ffc1036c: 7c 00 4b 78 or r0,r0,r9 ffc10370: 90 1a 00 04 stw r0,4(r26) ffc10374: 4b ff fd 65 bl ffc100d8 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc10378: 41 92 01 0c beq- cr4,ffc10484 <_Heap_Extend+0x370> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc1037c: 81 3e 00 24 lwz r9,36(r30) extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) ffc10380: 2f 99 00 00 cmpwi cr7,r25,0 * 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( ffc10384: 81 7e 00 20 lwz r11,32(r30) *extended_size_ptr = extended_size; return true; ffc10388: 38 60 00 01 li r3,1 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc1038c: 80 09 00 04 lwz r0,4(r9) * 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( ffc10390: 7d 69 58 50 subf r11,r9,r11 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; ffc10394: 54 00 07 fe clrlwi r0,r0,31 block->size_and_flag = size | flag; ffc10398: 7c 00 5b 78 or r0,r0,r11 ffc1039c: 90 09 00 04 stw r0,4(r9) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc103a0: 81 3e 00 30 lwz r9,48(r30) /* Statistics */ stats->size += extended_size; ffc103a4: 80 1e 00 2c lwz r0,44(r30) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc103a8: 7f 18 48 50 subf r24,r24,r9 /* Statistics */ stats->size += extended_size; ffc103ac: 7c 00 c2 14 add r0,r0,r24 ffc103b0: 90 1e 00 2c stw r0,44(r30) if ( extended_size_ptr != NULL ) ffc103b4: 41 be fd d0 beq- cr7,ffc10184 <_Heap_Extend+0x70> <== NEVER TAKEN *extended_size_ptr = extended_size; return true; } ffc103b8: 80 01 00 44 lwz r0,68(r1) ffc103bc: 81 81 00 18 lwz r12,24(r1) ffc103c0: 7c 08 03 a6 mtlr r0 /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; ffc103c4: 93 19 00 00 stw r24,0(r25) return true; } ffc103c8: 7d 81 81 20 mtcrf 24,r12 ffc103cc: 82 e1 00 1c lwz r23,28(r1) ffc103d0: 83 01 00 20 lwz r24,32(r1) ffc103d4: 83 21 00 24 lwz r25,36(r1) ffc103d8: 83 41 00 28 lwz r26,40(r1) ffc103dc: 83 61 00 2c lwz r27,44(r1) ffc103e0: 83 81 00 30 lwz r28,48(r1) ffc103e4: 83 a1 00 34 lwz r29,52(r1) ffc103e8: 83 c1 00 38 lwz r30,56(r1) ffc103ec: 83 e1 00 3c lwz r31,60(r1) ffc103f0: 38 21 00 40 addi r1,r1,64 ffc103f4: 4e 80 00 20 blr return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc103f8: 81 5e 00 18 lwz r10,24(r30) ffc103fc: 4b ff fe 48 b ffc10244 <_Heap_Extend+0x130> extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc10400: 81 5e 00 20 lwz r10,32(r30) } 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; ffc10404: 81 21 00 0c lwz r9,12(r1) ffc10408: 81 61 00 08 lwz r11,8(r1) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc1040c: 7f 8a 48 40 cmplw cr7,r10,r9 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; ffc10410: 93 fe 00 18 stw r31,24(r30) } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = ffc10414: 7d 49 58 50 subf r10,r9,r11 (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; ffc10418: 61 47 00 01 ori r7,r10,1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; ffc1041c: 93 a9 00 00 stw r29,0(r9) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; ffc10420: 91 4b 00 00 stw r10,0(r11) extend_last_block->size_and_flag = 0; ffc10424: 39 40 00 00 li r10,0 extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = ffc10428: 90 e9 00 04 stw r7,4(r9) extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; ffc1042c: 91 4b 00 04 stw r10,4(r11) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc10430: 41 bd fe b0 bgt- cr7,ffc102e0 <_Heap_Extend+0x1cc> <== ALWAYS TAKEN heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { ffc10434: 81 3e 00 24 lwz r9,36(r30) ffc10438: 7f 89 58 40 cmplw cr7,r9,r11 ffc1043c: 40 bc fe a8 bge- cr7,ffc102e4 <_Heap_Extend+0x1d0> heap->last_block = extend_last_block; ffc10440: 91 7e 00 24 stw r11,36(r30) ffc10444: 4b ff fe a0 b ffc102e4 <_Heap_Extend+0x1d0> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { ffc10448: 2f 97 00 00 cmpwi cr7,r23,0 ffc1044c: 41 be ff 2c beq- cr7,ffc10378 <_Heap_Extend+0x264> 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; ffc10450: 81 37 00 04 lwz r9,4(r23) ) { 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 ); ffc10454: 80 01 00 0c lwz r0,12(r1) ffc10458: 55 29 07 fe clrlwi r9,r9,31 ffc1045c: 7c 17 00 50 subf r0,r23,r0 block->size_and_flag = size | flag; ffc10460: 7d 20 03 78 or r0,r9,r0 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( ffc10464: 81 21 00 08 lwz r9,8(r1) ffc10468: 90 17 00 04 stw r0,4(r23) uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; ffc1046c: 80 09 00 04 lwz r0,4(r9) ffc10470: 60 00 00 01 ori r0,r0,1 ffc10474: 90 09 00 04 stw r0,4(r9) ffc10478: 4b ff ff 00 b ffc10378 <_Heap_Extend+0x264> _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; ffc1047c: 38 60 00 00 li r3,0 ffc10480: 4b ff fd 04 b ffc10184 <_Heap_Extend+0x70> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc10484: 40 8e fe f8 bne+ cr3,ffc1037c <_Heap_Extend+0x268> _Heap_Free_block( heap, extend_first_block ); ffc10488: 80 81 00 0c lwz r4,12(r1) ffc1048c: 7f c3 f3 78 mr r3,r30 ffc10490: 4b ff fc 49 bl ffc100d8 <_Heap_Free_block> ffc10494: 4b ff fe e8 b ffc1037c <_Heap_Extend+0x268> 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 ) { ffc10498: 2f 80 00 00 cmpwi cr7,r0,0 ffc1049c: 41 be fe 90 beq- cr7,ffc1032c <_Heap_Extend+0x218> { 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; ffc104a0: 7c 0b 00 50 subf r0,r11,r0 ffc104a4: 60 00 00 01 ori r0,r0,1 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = ffc104a8: 90 0b 00 04 stw r0,4(r11) ffc104ac: 4b ff fe 80 b ffc1032c <_Heap_Extend+0x218> =============================================================================== ffc10538 <_Heap_Free>: /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { ffc10538: 2c 04 00 00 cmpwi r4,0 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc1053c: 94 21 ff f0 stwu r1,-16(r1) ffc10540: 7c 69 1b 78 mr r9,r3 ffc10544: 93 e1 00 0c stw r31,12(r1) * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; ffc10548: 38 60 00 01 li r3,1 /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { ffc1054c: 41 82 01 44 beq- ffc10690 <_Heap_Free+0x158> ffc10550: 80 09 00 10 lwz r0,16(r9) alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; ffc10554: 38 60 00 00 li r3,0 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 ffc10558: 81 69 00 20 lwz r11,32(r9) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1055c: 7c 84 03 96 divwu r4,r4,r0 ffc10560: 7c 84 01 d6 mullw r4,r4,r0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc10564: 38 84 ff f8 addi r4,r4,-8 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; ffc10568: 7f 84 58 40 cmplw cr7,r4,r11 ffc1056c: 41 9c 01 24 blt- cr7,ffc10690 <_Heap_Free+0x158> ffc10570: 80 09 00 24 lwz r0,36(r9) ffc10574: 7f 84 00 40 cmplw cr7,r4,r0 ffc10578: 41 9d 01 18 bgt- cr7,ffc10690 <_Heap_Free+0x158> <== NEVER TAKEN --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc1057c: 81 04 00 04 lwz r8,4(r4) - 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; ffc10580: 55 07 00 3c rlwinm r7,r8,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc10584: 7d 47 22 14 add r10,r7,r4 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; ffc10588: 7f 8b 50 40 cmplw cr7,r11,r10 ffc1058c: 41 9d 01 04 bgt- cr7,ffc10690 <_Heap_Free+0x158> <== NEVER TAKEN ffc10590: 7f 80 50 40 cmplw cr7,r0,r10 ffc10594: 41 9c 00 fc blt- cr7,ffc10690 <_Heap_Free+0x158> <== NEVER TAKEN ffc10598: 80 ca 00 04 lwz r6,4(r10) return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { ffc1059c: 70 c5 00 01 andi. r5,r6,1 ffc105a0: 41 82 00 f0 beq- ffc10690 <_Heap_Free+0x158> return true; } 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 )); ffc105a4: 7f 80 50 00 cmpw cr7,r0,r10 - 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; ffc105a8: 54 c5 00 3c rlwinm r5,r6,0,0,30 ffc105ac: 38 c0 00 00 li r6,0 ffc105b0: 41 9e 00 18 beq- cr7,ffc105c8 <_Heap_Free+0x90> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc105b4: 7c ca 2a 14 add r6,r10,r5 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc105b8: 80 c6 00 04 lwz r6,4(r6) return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) ffc105bc: 70 c3 00 01 andi. r3,r6,1 ffc105c0: 7c c0 00 26 mfcr r6 ffc105c4: 54 c6 1f fe rlwinm r6,r6,3,31,31 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 ) ) { ffc105c8: 71 08 00 01 andi. r8,r8,1 ffc105cc: 40 82 00 6c bne- ffc10638 <_Heap_Free+0x100> uintptr_t const prev_size = block->prev_size; ffc105d0: 83 e4 00 00 lwz r31,0(r4) Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { _HAssert( false ); return( false ); ffc105d4: 38 60 00 00 li r3,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc105d8: 7d 9f 20 50 subf r12,r31,r4 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; ffc105dc: 7f 8b 60 40 cmplw cr7,r11,r12 ffc105e0: 41 9d 00 b0 bgt- cr7,ffc10690 <_Heap_Free+0x158> <== NEVER TAKEN ffc105e4: 7f 80 60 40 cmplw cr7,r0,r12 ffc105e8: 7d 03 43 78 mr r3,r8 ffc105ec: 41 9c 00 a4 blt- cr7,ffc10690 <_Heap_Free+0x158> <== 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; ffc105f0: 80 0c 00 04 lwz r0,4(r12) } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { ffc105f4: 70 0b 00 01 andi. r11,r0,1 ffc105f8: 41 82 00 98 beq- ffc10690 <_Heap_Free+0x158> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc105fc: 2f 86 00 00 cmpwi cr7,r6,0 ffc10600: 41 9e 00 e8 beq- cr7,ffc106e8 <_Heap_Free+0x1b0> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc10604: 81 09 00 38 lwz r8,56(r9) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc10608: 7f e7 fa 14 add r31,r7,r31 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc1060c: 81 6a 00 08 lwz r11,8(r10) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc10610: 7c bf 2a 14 add r5,r31,r5 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10614: 81 4a 00 0c lwz r10,12(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; ffc10618: 39 08 ff ff addi r8,r8,-1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc1061c: 60 a0 00 01 ori r0,r5,1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; ffc10620: 91 6a 00 08 stw r11,8(r10) next->prev = prev; ffc10624: 91 4b 00 0c stw r10,12(r11) } 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; ffc10628: 91 09 00 38 stw r8,56(r9) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc1062c: 90 0c 00 04 stw r0,4(r12) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; ffc10630: 7c a5 61 2e stwx r5,r5,r12 ffc10634: 48 00 00 34 b ffc10668 <_Heap_Free+0x130> 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 */ ffc10638: 2f 86 00 00 cmpwi cr7,r6,0 ffc1063c: 41 9e 00 60 beq- cr7,ffc1069c <_Heap_Free+0x164> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10640: 81 6a 00 08 lwz r11,8(r10) 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; ffc10644: 7c a5 3a 14 add r5,r5,r7 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10648: 81 4a 00 0c lwz r10,12(r10) 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; ffc1064c: 60 a0 00 01 ori r0,r5,1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc10650: 91 64 00 08 stw r11,8(r4) new_block->prev = prev; ffc10654: 91 44 00 0c stw r10,12(r4) next->prev = new_block; prev->next = new_block; ffc10658: 90 8a 00 08 stw r4,8(r10) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc1065c: 90 8b 00 0c stw r4,12(r11) ffc10660: 90 04 00 04 stw r0,4(r4) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc10664: 7c a5 21 2e stwx r5,r5,r4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc10668: 81 69 00 40 lwz r11,64(r9) ++stats->frees; stats->free_size += block_size; return( true ); ffc1066c: 38 60 00 01 li r3,1 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc10670: 81 09 00 50 lwz r8,80(r9) stats->free_size += block_size; ffc10674: 81 49 00 30 lwz r10,48(r9) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc10678: 39 6b ff ff addi r11,r11,-1 ++stats->frees; ffc1067c: 38 08 00 01 addi r0,r8,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc10680: 91 69 00 40 stw r11,64(r9) ++stats->frees; stats->free_size += block_size; ffc10684: 7c ea 3a 14 add r7,r10,r7 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc10688: 90 09 00 50 stw r0,80(r9) stats->free_size += block_size; ffc1068c: 90 e9 00 30 stw r7,48(r9) return( true ); } ffc10690: 83 e1 00 0c lwz r31,12(r1) ffc10694: 38 21 00 10 addi r1,r1,16 ffc10698: 4e 80 00 20 blr 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; ffc1069c: 81 09 00 38 lwz r8,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc106a0: 81 69 00 3c lwz r11,60(r9) 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; ffc106a4: 38 08 00 01 addi r0,r8,1 ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; ffc106a8: 91 24 00 0c stw r9,12(r4) 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; ffc106ac: 60 e8 00 01 ori r8,r7,1 ffc106b0: 91 04 00 04 stw r8,4(r4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { ffc106b4: 7f 80 58 40 cmplw cr7,r0,r11 } 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; ffc106b8: 81 0a 00 04 lwz r8,4(r10) RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc106bc: 81 69 00 08 lwz r11,8(r9) ffc106c0: 55 08 00 3c rlwinm r8,r8,0,0,30 next_block->prev_size = block_size; ffc106c4: 7c e7 21 2e stwx r7,r7,r4 new_block->next = next; ffc106c8: 91 64 00 08 stw r11,8(r4) } 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; ffc106cc: 91 0a 00 04 stw r8,4(r10) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; ffc106d0: 90 8b 00 0c stw r4,12(r11) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; ffc106d4: 90 89 00 08 stw r4,8(r9) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc106d8: 90 09 00 38 stw r0,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc106dc: 40 bd ff 8c ble- cr7,ffc10668 <_Heap_Free+0x130> stats->max_free_blocks = stats->free_blocks; ffc106e0: 90 09 00 3c stw r0,60(r9) ffc106e4: 4b ff ff 84 b ffc10668 <_Heap_Free+0x130> 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; ffc106e8: 7f e7 fa 14 add r31,r7,r31 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc106ec: 63 e0 00 01 ori r0,r31,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc106f0: 7f e7 21 2e stwx r31,r7,r4 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; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc106f4: 90 0c 00 04 stw r0,4(r12) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc106f8: 80 0a 00 04 lwz r0,4(r10) ffc106fc: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc10700: 90 0a 00 04 stw r0,4(r10) ffc10704: 4b ff ff 64 b ffc10668 <_Heap_Free+0x130> =============================================================================== ffc0b2dc <_Heap_Walk>: 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; ffc0b2dc: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc0b2e0: 94 21 ff 98 stwu r1,-104(r1) ffc0b2e4: 7c 08 02 a6 mflr r0 ffc0b2e8: 92 e1 00 44 stw r23,68(r1) ffc0b2ec: 90 01 00 6c stw r0,108(r1) ffc0b2f0: 93 01 00 48 stw r24,72(r1) ffc0b2f4: 93 21 00 4c stw r25,76(r1) ffc0b2f8: 7c 99 23 78 mr r25,r4 ffc0b2fc: 93 41 00 50 stw r26,80(r1) ffc0b300: 93 61 00 54 stw r27,84(r1) ffc0b304: 93 e1 00 64 stw r31,100(r1) ffc0b308: 7c 7f 1b 78 mr r31,r3 ffc0b30c: 91 c1 00 20 stw r14,32(r1) ffc0b310: 91 e1 00 24 stw r15,36(r1) ffc0b314: 92 01 00 28 stw r16,40(r1) ffc0b318: 92 21 00 2c stw r17,44(r1) ffc0b31c: 92 41 00 30 stw r18,48(r1) ffc0b320: 92 61 00 34 stw r19,52(r1) ffc0b324: 92 81 00 38 stw r20,56(r1) ffc0b328: 92 a1 00 3c stw r21,60(r1) ffc0b32c: 92 c1 00 40 stw r22,64(r1) ffc0b330: 93 81 00 58 stw r28,88(r1) ffc0b334: 93 a1 00 5c stw r29,92(r1) ffc0b338: 93 c1 00 60 stw r30,96(r1) uintptr_t const page_size = heap->page_size; ffc0b33c: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0b340: 83 03 00 14 lwz r24,20(r3) Heap_Block *const first_block = heap->first_block; ffc0b344: 83 43 00 20 lwz r26,32(r3) Heap_Block *const last_block = heap->last_block; ffc0b348: 82 e3 00 24 lwz r23,36(r3) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0b34c: 41 9e 00 7c beq- cr7,ffc0b3c8 <_Heap_Walk+0xec> ffc0b350: 3d 20 ff c1 lis r9,-63 ffc0b354: 39 29 b1 dc addi r9,r9,-20004 ffc0b358: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b35c: 3d 20 00 00 lis r9,0 return true; ffc0b360: 38 60 00 01 li 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() ) ) { ffc0b364: 80 09 27 e0 lwz r0,10208(r9) ffc0b368: 2f 80 00 03 cmpwi cr7,r0,3 ffc0b36c: 41 9e 00 7c beq- cr7,ffc0b3e8 <_Heap_Walk+0x10c> <== ALWAYS TAKEN block = next_block; } while ( block != first_block ); return true; } ffc0b370: 80 01 00 6c lwz r0,108(r1) ffc0b374: 81 c1 00 20 lwz r14,32(r1) ffc0b378: 7c 08 03 a6 mtlr r0 ffc0b37c: 81 e1 00 24 lwz r15,36(r1) ffc0b380: 82 01 00 28 lwz r16,40(r1) ffc0b384: 82 21 00 2c lwz r17,44(r1) ffc0b388: 82 41 00 30 lwz r18,48(r1) ffc0b38c: 82 61 00 34 lwz r19,52(r1) ffc0b390: 82 81 00 38 lwz r20,56(r1) ffc0b394: 82 a1 00 3c lwz r21,60(r1) ffc0b398: 82 c1 00 40 lwz r22,64(r1) ffc0b39c: 82 e1 00 44 lwz r23,68(r1) ffc0b3a0: 83 01 00 48 lwz r24,72(r1) ffc0b3a4: 83 21 00 4c lwz r25,76(r1) ffc0b3a8: 83 41 00 50 lwz r26,80(r1) ffc0b3ac: 83 61 00 54 lwz r27,84(r1) ffc0b3b0: 83 81 00 58 lwz r28,88(r1) ffc0b3b4: 83 a1 00 5c lwz r29,92(r1) ffc0b3b8: 83 c1 00 60 lwz r30,96(r1) ffc0b3bc: 83 e1 00 64 lwz r31,100(r1) ffc0b3c0: 38 21 00 68 addi r1,r1,104 ffc0b3c4: 4e 80 00 20 blr 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; ffc0b3c8: 3d 20 ff c1 lis r9,-63 ffc0b3cc: 39 29 b1 d8 addi r9,r9,-20008 ffc0b3d0: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b3d4: 3d 20 00 00 lis r9,0 return true; ffc0b3d8: 38 60 00 01 li 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() ) ) { ffc0b3dc: 80 09 27 e0 lwz r0,10208(r9) ffc0b3e0: 2f 80 00 03 cmpwi cr7,r0,3 ffc0b3e4: 40 9e ff 8c bne+ cr7,ffc0b370 <_Heap_Walk+0x94> 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)( ffc0b3e8: 80 1f 00 0c lwz r0,12(r31) ffc0b3ec: 3c a0 ff c2 lis r5,-62 ffc0b3f0: 81 1f 00 18 lwz r8,24(r31) ffc0b3f4: 7f 23 cb 78 mr r3,r25 ffc0b3f8: 81 3f 00 1c lwz r9,28(r31) ffc0b3fc: 38 80 00 00 li r4,0 ffc0b400: 81 7f 00 08 lwz r11,8(r31) ffc0b404: 38 a5 a6 4c addi r5,r5,-22964 ffc0b408: 90 01 00 10 stw r0,16(r1) ffc0b40c: 7f 66 db 78 mr r6,r27 ffc0b410: 7f 07 c3 78 mr r7,r24 ffc0b414: 80 01 00 18 lwz r0,24(r1) ffc0b418: 7f 4a d3 78 mr r10,r26 ffc0b41c: 92 e1 00 08 stw r23,8(r1) ffc0b420: 7c 09 03 a6 mtctr r0 ffc0b424: 91 61 00 0c stw r11,12(r1) ffc0b428: 4c c6 31 82 crclr 4*cr1+eq ffc0b42c: 4e 80 04 21 bctrl heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { ffc0b430: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0b434: 41 9e 00 ac beq- cr7,ffc0b4e0 <_Heap_Walk+0x204> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc0b438: 73 67 00 07 andi. r7,r27,7 ffc0b43c: 40 82 00 cc bne- ffc0b508 <_Heap_Walk+0x22c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b440: 7c 18 db 96 divwu r0,r24,r27 ffc0b444: 7c 00 d9 d6 mullw r0,r0,r27 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc0b448: 7f 98 00 00 cmpw cr7,r24,r0 ffc0b44c: 40 9e 00 e8 bne- cr7,ffc0b534 <_Heap_Walk+0x258> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0b450: 38 1a 00 08 addi r0,r26,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b454: 7d 20 db 96 divwu r9,r0,r27 ffc0b458: 7d 29 d9 d6 mullw r9,r9,r27 ); return false; } if ( ffc0b45c: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b460: 40 9e 01 00 bne- cr7,ffc0b560 <_Heap_Walk+0x284> block = next_block; } while ( block != first_block ); return true; } ffc0b464: 82 da 00 04 lwz r22,4(r26) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc0b468: 72 c7 00 01 andi. r7,r22,1 ffc0b46c: 41 82 01 20 beq- ffc0b58c <_Heap_Walk+0x2b0> - 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; ffc0b470: 81 37 00 04 lwz r9,4(r23) ffc0b474: 55 29 00 3c rlwinm r9,r9,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0b478: 7d 37 4a 14 add r9,r23,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; ffc0b47c: 80 09 00 04 lwz r0,4(r9) ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc0b480: 70 07 00 01 andi. r7,r0,1 ffc0b484: 41 82 00 34 beq- ffc0b4b8 <_Heap_Walk+0x1dc> ); return false; } if ( ffc0b488: 7f 9a 48 00 cmpw cr7,r26,r9 ffc0b48c: 41 9e 01 28 beq- cr7,ffc0b5b4 <_Heap_Walk+0x2d8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( ffc0b490: 80 01 00 18 lwz r0,24(r1) ffc0b494: 3c a0 ff c2 lis r5,-62 ffc0b498: 7f 23 cb 78 mr r3,r25 ffc0b49c: 38 80 00 01 li r4,1 ffc0b4a0: 7c 09 03 a6 mtctr r0 ffc0b4a4: 38 a5 a7 b4 addi r5,r5,-22604 ffc0b4a8: 4c c6 31 82 crclr 4*cr1+eq ffc0b4ac: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b4b0: 38 60 00 00 li r3,0 ffc0b4b4: 4b ff fe bc b ffc0b370 <_Heap_Walk+0x94> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( ffc0b4b8: 80 01 00 18 lwz r0,24(r1) ffc0b4bc: 3c a0 ff c2 lis r5,-62 ffc0b4c0: 7f 23 cb 78 mr r3,r25 ffc0b4c4: 38 80 00 01 li r4,1 ffc0b4c8: 7c 09 03 a6 mtctr r0 ffc0b4cc: 38 a5 a7 9c addi r5,r5,-22628 ffc0b4d0: 4c c6 31 82 crclr 4*cr1+eq ffc0b4d4: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b4d8: 38 60 00 00 li r3,0 ffc0b4dc: 4b ff fe 94 b ffc0b370 <_Heap_Walk+0x94> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); ffc0b4e0: 80 01 00 18 lwz r0,24(r1) ffc0b4e4: 3c a0 ff c2 lis r5,-62 ffc0b4e8: 7f 23 cb 78 mr r3,r25 ffc0b4ec: 38 80 00 01 li r4,1 ffc0b4f0: 7c 09 03 a6 mtctr r0 ffc0b4f4: 38 a5 a6 e0 addi r5,r5,-22816 ffc0b4f8: 4c c6 31 82 crclr 4*cr1+eq ffc0b4fc: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b500: 38 60 00 00 li r3,0 ffc0b504: 4b ff fe 6c b ffc0b370 <_Heap_Walk+0x94> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( ffc0b508: 80 01 00 18 lwz r0,24(r1) ffc0b50c: 3c a0 ff c2 lis r5,-62 ffc0b510: 7f 23 cb 78 mr r3,r25 ffc0b514: 38 80 00 01 li r4,1 ffc0b518: 7c 09 03 a6 mtctr r0 ffc0b51c: 38 a5 a6 f4 addi r5,r5,-22796 ffc0b520: 7f 66 db 78 mr r6,r27 ffc0b524: 4c c6 31 82 crclr 4*cr1+eq ffc0b528: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b52c: 38 60 00 00 li r3,0 ffc0b530: 4b ff fe 40 b ffc0b370 <_Heap_Walk+0x94> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( ffc0b534: 80 01 00 18 lwz r0,24(r1) ffc0b538: 3c a0 ff c2 lis r5,-62 ffc0b53c: 7f 23 cb 78 mr r3,r25 ffc0b540: 38 80 00 01 li r4,1 ffc0b544: 7c 09 03 a6 mtctr r0 ffc0b548: 38 a5 a7 14 addi r5,r5,-22764 ffc0b54c: 7f 06 c3 78 mr r6,r24 ffc0b550: 4c c6 31 82 crclr 4*cr1+eq ffc0b554: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b558: 38 60 00 00 li r3,0 ffc0b55c: 4b ff fe 14 b ffc0b370 <_Heap_Walk+0x94> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc0b560: 80 01 00 18 lwz r0,24(r1) ffc0b564: 3c a0 ff c2 lis r5,-62 ffc0b568: 7f 23 cb 78 mr r3,r25 ffc0b56c: 38 80 00 01 li r4,1 ffc0b570: 7c 09 03 a6 mtctr r0 ffc0b574: 38 a5 a7 38 addi r5,r5,-22728 ffc0b578: 7f 46 d3 78 mr r6,r26 ffc0b57c: 4c c6 31 82 crclr 4*cr1+eq ffc0b580: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b584: 38 60 00 00 li r3,0 ffc0b588: 4b ff fd e8 b ffc0b370 <_Heap_Walk+0x94> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0b58c: 80 01 00 18 lwz r0,24(r1) ffc0b590: 3c a0 ff c2 lis r5,-62 ffc0b594: 7f 23 cb 78 mr r3,r25 ffc0b598: 38 80 00 01 li r4,1 ffc0b59c: 7c 09 03 a6 mtctr r0 ffc0b5a0: 38 a5 a7 6c addi r5,r5,-22676 ffc0b5a4: 4c c6 31 82 crclr 4*cr1+eq ffc0b5a8: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b5ac: 38 60 00 00 li r3,0 ffc0b5b0: 4b ff fd c0 b ffc0b370 <_Heap_Walk+0x94> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0b5b4: 80 df 00 08 lwz r6,8(r31) int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; ffc0b5b8: 81 1f 00 10 lwz r8,16(r31) 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 ) { ffc0b5bc: 7f 9f 30 00 cmpw cr7,r31,r6 block = next_block; } while ( block != first_block ); return true; } ffc0b5c0: 80 1f 00 20 lwz r0,32(r31) 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 ) { ffc0b5c4: 41 9e 00 34 beq- cr7,ffc0b5f8 <_Heap_Walk+0x31c> 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; ffc0b5c8: 7f 80 30 40 cmplw cr7,r0,r6 ffc0b5cc: 40 9d 03 24 ble- cr7,ffc0b8f0 <_Heap_Walk+0x614> <== ALWAYS TAKEN if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( ffc0b5d0: 80 01 00 18 lwz r0,24(r1) ffc0b5d4: 3c a0 ff c2 lis r5,-62 ffc0b5d8: 7f 23 cb 78 mr r3,r25 ffc0b5dc: 38 80 00 01 li r4,1 ffc0b5e0: 7c 09 03 a6 mtctr r0 ffc0b5e4: 38 a5 a7 e4 addi r5,r5,-22556 ffc0b5e8: 4c c6 31 82 crclr 4*cr1+eq ffc0b5ec: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b5f0: 38 60 00 00 li r3,0 ffc0b5f4: 4b ff fd 7c b ffc0b370 <_Heap_Walk+0x94> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b5f8: 3e 60 ff c2 lis r19,-62 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc0b5fc: 3e 80 ff c2 lis r20,-62 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)( ffc0b600: 3e 40 ff c2 lis r18,-62 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b604: 7f 5d d3 78 mr r29,r26 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b608: 3a 73 aa 00 addi r19,r19,-22016 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc0b60c: 3a 94 a9 e8 addi r20,r20,-22040 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)( ffc0b610: 3a 52 a9 44 addi r18,r18,-22204 ffc0b614: 3e 20 ff c2 lis r17,-62 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0b618: 3e a0 ff c2 lis r21,-62 ffc0b61c: 3d e0 ff c2 lis r15,-62 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)( ffc0b620: 3e 00 ff c2 lis r16,-62 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0b624: 3d c0 ff c2 lis r14,-62 - 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; ffc0b628: 56 dc 00 3c rlwinm r28,r22,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0b62c: 7f dc ea 14 add r30,r28,r29 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; ffc0b630: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0b634: 40 9d 00 34 ble- cr7,ffc0b668 <_Heap_Walk+0x38c> <== ALWAYS TAKEN 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)( ffc0b638: 3c a0 ff c2 lis r5,-62 ffc0b63c: 7f 23 cb 78 mr r3,r25 ffc0b640: 38 80 00 01 li r4,1 ffc0b644: 38 a5 a8 84 addi r5,r5,-22396 return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0b648: 80 01 00 18 lwz r0,24(r1) ffc0b64c: 7f a6 eb 78 mr r6,r29 ffc0b650: 7f c7 f3 78 mr r7,r30 ffc0b654: 7c 09 03 a6 mtctr r0 ffc0b658: 4c c6 31 82 crclr 4*cr1+eq ffc0b65c: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0b660: 38 60 00 00 li r3,0 ffc0b664: 4b ff fd 0c b ffc0b370 <_Heap_Walk+0x94> ffc0b668: 80 1f 00 24 lwz r0,36(r31) ffc0b66c: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0b670: 41 bc ff c8 blt- cr7,ffc0b638 <_Heap_Walk+0x35c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b674: 7d 3c db 96 divwu r9,r28,r27 ffc0b678: 7d 29 d9 d6 mullw r9,r9,r27 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; ffc0b67c: 7f a0 ba 78 xor r0,r29,r23 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0b680: 7f 9c 48 00 cmpw cr7,r28,r9 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; ffc0b684: 7c 00 00 34 cntlzw r0,r0 ffc0b688: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0b68c: 68 00 00 01 xori r0,r0,1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0b690: 41 9e 00 0c beq- cr7,ffc0b69c <_Heap_Walk+0x3c0> ffc0b694: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b698: 40 9e 01 e0 bne- cr7,ffc0b878 <_Heap_Walk+0x59c> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { ffc0b69c: 7f 98 e0 40 cmplw cr7,r24,r28 ffc0b6a0: 40 9d 00 0c ble- cr7,ffc0b6ac <_Heap_Walk+0x3d0> ffc0b6a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b6a8: 40 9e 02 00 bne- cr7,ffc0b8a8 <_Heap_Walk+0x5cc> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { ffc0b6ac: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0b6b0: 41 9c 00 0c blt- cr7,ffc0b6bc <_Heap_Walk+0x3e0> ffc0b6b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b6b8: 40 9e 02 24 bne- cr7,ffc0b8dc <_Heap_Walk+0x600> 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; ffc0b6bc: 80 1e 00 04 lwz r0,4(r30) ffc0b6c0: 56 d6 07 fe clrlwi r22,r22,31 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0b6c4: 70 07 00 01 andi. r7,r0,1 ffc0b6c8: 41 82 00 74 beq- ffc0b73c <_Heap_Walk+0x460> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { ffc0b6cc: 2f 96 00 00 cmpwi cr7,r22,0 ffc0b6d0: 41 9e 00 40 beq- cr7,ffc0b710 <_Heap_Walk+0x434> (*printer)( ffc0b6d4: 80 01 00 18 lwz r0,24(r1) ffc0b6d8: 7f 23 cb 78 mr r3,r25 ffc0b6dc: 38 80 00 00 li r4,0 ffc0b6e0: 7e 85 a3 78 mr r5,r20 ffc0b6e4: 7c 09 03 a6 mtctr r0 ffc0b6e8: 7f a6 eb 78 mr r6,r29 ffc0b6ec: 7f 87 e3 78 mr r7,r28 ffc0b6f0: 4c c6 31 82 crclr 4*cr1+eq ffc0b6f4: 4e 80 04 21 bctrl block->prev_size ); } block = next_block; } while ( block != first_block ); ffc0b6f8: 7f 9a f0 00 cmpw cr7,r26,r30 ffc0b6fc: 41 9e 01 0c beq- cr7,ffc0b808 <_Heap_Walk+0x52c> ffc0b700: 82 de 00 04 lwz r22,4(r30) ffc0b704: 7f dd f3 78 mr r29,r30 ffc0b708: 80 1f 00 20 lwz r0,32(r31) ffc0b70c: 4b ff ff 1c b ffc0b628 <_Heap_Walk+0x34c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b710: 80 01 00 18 lwz r0,24(r1) ffc0b714: 7f a6 eb 78 mr r6,r29 ffc0b718: 7f 23 cb 78 mr r3,r25 ffc0b71c: 81 1d 00 00 lwz r8,0(r29) ffc0b720: 38 80 00 00 li r4,0 ffc0b724: 7c 09 03 a6 mtctr r0 ffc0b728: 7e 65 9b 78 mr r5,r19 ffc0b72c: 7f 87 e3 78 mr r7,r28 ffc0b730: 4c c6 31 82 crclr 4*cr1+eq ffc0b734: 4e 80 04 21 bctrl ffc0b738: 4b ff ff c0 b ffc0b6f8 <_Heap_Walk+0x41c> 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 ? ffc0b73c: 81 1d 00 0c lwz r8,12(r29) 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)( ffc0b740: 81 3f 00 08 lwz r9,8(r31) return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; ffc0b744: 80 1f 00 0c lwz r0,12(r31) ffc0b748: 7f 89 40 00 cmpw cr7,r9,r8 ffc0b74c: 41 9e 00 f8 beq- cr7,ffc0b844 <_Heap_Walk+0x568> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0b750: 7f 9f 40 00 cmpw cr7,r31,r8 ffc0b754: 41 9e 01 00 beq- cr7,ffc0b854 <_Heap_Walk+0x578> ffc0b758: 39 35 a9 b4 addi r9,r21,-22092 block->next, block->next == last_free_block ? ffc0b75c: 81 5d 00 08 lwz r10,8(r29) 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)( ffc0b760: 7f 80 50 00 cmpw cr7,r0,r10 ffc0b764: 41 9e 00 e8 beq- cr7,ffc0b84c <_Heap_Walk+0x570> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0b768: 7f 9f 50 00 cmpw cr7,r31,r10 ffc0b76c: 41 9e 00 f0 beq- cr7,ffc0b85c <_Heap_Walk+0x580> ffc0b770: 38 15 a9 b4 addi r0,r21,-22092 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)( ffc0b774: 90 01 00 08 stw r0,8(r1) ffc0b778: 7f 23 cb 78 mr r3,r25 ffc0b77c: 38 80 00 00 li r4,0 ffc0b780: 80 01 00 18 lwz r0,24(r1) ffc0b784: 7e 45 93 78 mr r5,r18 ffc0b788: 7f a6 eb 78 mr r6,r29 ffc0b78c: 7f 87 e3 78 mr r7,r28 ffc0b790: 7c 09 03 a6 mtctr r0 ffc0b794: 4c c6 31 82 crclr 4*cr1+eq ffc0b798: 4e 80 04 21 bctrl block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { ffc0b79c: 81 1e 00 00 lwz r8,0(r30) ffc0b7a0: 7f 9c 40 00 cmpw cr7,r28,r8 ffc0b7a4: 40 9e 00 6c bne- cr7,ffc0b810 <_Heap_Walk+0x534> ); return false; } if ( !prev_used ) { ffc0b7a8: 2f 96 00 00 cmpwi cr7,r22,0 ffc0b7ac: 41 9e 00 b8 beq- cr7,ffc0b864 <_Heap_Walk+0x588> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0b7b0: 81 3f 00 08 lwz r9,8(r31) ) { 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 ) { ffc0b7b4: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0b7b8: 41 9e 00 24 beq- cr7,ffc0b7dc <_Heap_Walk+0x500> <== NEVER TAKEN if ( free_block == block ) { ffc0b7bc: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0b7c0: 40 be 00 0c bne+ cr7,ffc0b7cc <_Heap_Walk+0x4f0> ffc0b7c4: 4b ff ff 34 b ffc0b6f8 <_Heap_Walk+0x41c> ffc0b7c8: 41 ba ff 30 beq- cr6,ffc0b6f8 <_Heap_Walk+0x41c> return true; } free_block = free_block->next; ffc0b7cc: 81 29 00 08 lwz r9,8(r9) ) { 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 ) { ffc0b7d0: 7f 9f 48 00 cmpw cr7,r31,r9 if ( free_block == block ) { ffc0b7d4: 7f 1d 48 00 cmpw cr6,r29,r9 ) { 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 ) { ffc0b7d8: 40 9e ff f0 bne+ cr7,ffc0b7c8 <_Heap_Walk+0x4ec> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0b7dc: 3c a0 ff c2 lis r5,-62 ffc0b7e0: 7f 23 cb 78 mr r3,r25 ffc0b7e4: 38 80 00 01 li r4,1 ffc0b7e8: 38 a5 aa 28 addi r5,r5,-21976 ffc0b7ec: 80 01 00 18 lwz r0,24(r1) ffc0b7f0: 7f a6 eb 78 mr r6,r29 ffc0b7f4: 7c 09 03 a6 mtctr r0 ffc0b7f8: 4c c6 31 82 crclr 4*cr1+eq ffc0b7fc: 4e 80 04 21 bctrl return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; ffc0b800: 38 60 00 00 li r3,0 ffc0b804: 4b ff fb 6c b ffc0b370 <_Heap_Walk+0x94> } block = next_block; } while ( block != first_block ); return true; ffc0b808: 38 60 00 01 li r3,1 ffc0b80c: 4b ff fb 64 b ffc0b370 <_Heap_Walk+0x94> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( ffc0b810: 80 01 00 18 lwz r0,24(r1) ffc0b814: 3c a0 ff c2 lis r5,-62 ffc0b818: 7f 23 cb 78 mr r3,r25 ffc0b81c: 38 80 00 01 li r4,1 ffc0b820: 7c 09 03 a6 mtctr r0 ffc0b824: 38 a5 a9 7c addi r5,r5,-22148 ffc0b828: 7f a6 eb 78 mr r6,r29 ffc0b82c: 7f 87 e3 78 mr r7,r28 ffc0b830: 7f c9 f3 78 mr r9,r30 ffc0b834: 4c c6 31 82 crclr 4*cr1+eq ffc0b838: 4e 80 04 21 bctrl return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; ffc0b83c: 38 60 00 00 li r3,0 ffc0b840: 4b ff fb 30 b ffc0b370 <_Heap_Walk+0x94> 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)( ffc0b844: 39 30 a6 14 addi r9,r16,-23020 ffc0b848: 4b ff ff 14 b ffc0b75c <_Heap_Walk+0x480> ffc0b84c: 38 11 a6 30 addi r0,r17,-22992 ffc0b850: 4b ff ff 24 b ffc0b774 <_Heap_Walk+0x498> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0b854: 39 2e a6 24 addi r9,r14,-23004 ffc0b858: 4b ff ff 04 b ffc0b75c <_Heap_Walk+0x480> block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0b85c: 38 0f a6 40 addi r0,r15,-22976 ffc0b860: 4b ff ff 14 b ffc0b774 <_Heap_Walk+0x498> return false; } if ( !prev_used ) { (*printer)( ffc0b864: 3c a0 ff c2 lis r5,-62 ffc0b868: 7f 23 cb 78 mr r3,r25 ffc0b86c: 38 80 00 01 li r4,1 ffc0b870: 38 a5 a9 b8 addi r5,r5,-22088 ffc0b874: 4b ff ff 78 b ffc0b7ec <_Heap_Walk+0x510> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( ffc0b878: 80 01 00 18 lwz r0,24(r1) ffc0b87c: 3c a0 ff c2 lis r5,-62 ffc0b880: 7f 23 cb 78 mr r3,r25 ffc0b884: 38 80 00 01 li r4,1 ffc0b888: 7c 09 03 a6 mtctr r0 ffc0b88c: 38 a5 a8 b4 addi r5,r5,-22348 ffc0b890: 7f a6 eb 78 mr r6,r29 ffc0b894: 7f 87 e3 78 mr r7,r28 ffc0b898: 4c c6 31 82 crclr 4*cr1+eq ffc0b89c: 4e 80 04 21 bctrl "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; ffc0b8a0: 38 60 00 00 li r3,0 ffc0b8a4: 4b ff fa cc b ffc0b370 <_Heap_Walk+0x94> } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( ffc0b8a8: 80 01 00 18 lwz r0,24(r1) ffc0b8ac: 3c a0 ff c2 lis r5,-62 ffc0b8b0: 7f 23 cb 78 mr r3,r25 ffc0b8b4: 38 80 00 01 li r4,1 ffc0b8b8: 7c 09 03 a6 mtctr r0 ffc0b8bc: 38 a5 a8 e4 addi r5,r5,-22300 ffc0b8c0: 7f a6 eb 78 mr r6,r29 ffc0b8c4: 7f 87 e3 78 mr r7,r28 ffc0b8c8: 7f 08 c3 78 mr r8,r24 ffc0b8cc: 4c c6 31 82 crclr 4*cr1+eq ffc0b8d0: 4e 80 04 21 bctrl block, block_size, min_block_size ); return false; ffc0b8d4: 38 60 00 00 li r3,0 ffc0b8d8: 4b ff fa 98 b ffc0b370 <_Heap_Walk+0x94> } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0b8dc: 3c a0 ff c2 lis r5,-62 ffc0b8e0: 7f 23 cb 78 mr r3,r25 ffc0b8e4: 38 80 00 01 li r4,1 ffc0b8e8: 38 a5 a9 10 addi r5,r5,-22256 ffc0b8ec: 4b ff fd 5c b ffc0b648 <_Heap_Walk+0x36c> 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; ffc0b8f0: 81 5f 00 24 lwz r10,36(r31) ffc0b8f4: 7f 86 50 40 cmplw cr7,r6,r10 ffc0b8f8: 41 bd fc d8 bgt- cr7,ffc0b5d0 <_Heap_Walk+0x2f4> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0b8fc: 39 26 00 08 addi r9,r6,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b900: 7d 69 43 96 divwu r11,r9,r8 ffc0b904: 7d 6b 41 d6 mullw r11,r11,r8 ); return false; } if ( ffc0b908: 7f 89 58 00 cmpw cr7,r9,r11 ffc0b90c: 40 9e 00 d4 bne- cr7,ffc0b9e0 <_Heap_Walk+0x704> <== 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; ffc0b910: 81 26 00 04 lwz r9,4(r6) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b914: 7f eb fb 78 mr r11,r31 ffc0b918: 7c c5 33 78 mr r5,r6 ffc0b91c: 55 29 00 3c rlwinm r9,r9,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0b920: 7d 26 4a 14 add r9,r6,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; ffc0b924: 81 29 00 04 lwz r9,4(r9) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b928: 71 27 00 01 andi. r7,r9,1 ffc0b92c: 41 a2 00 58 beq+ ffc0b984 <_Heap_Walk+0x6a8> <== ALWAYS TAKEN ffc0b930: 48 00 00 88 b ffc0b9b8 <_Heap_Walk+0x6dc> <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; ffc0b934: 80 c6 00 08 lwz r6,8(r6) 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 ) { ffc0b938: 7f 9f 30 00 cmpw cr7,r31,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; ffc0b93c: 7f 06 00 40 cmplw cr6,r6,r0 ffc0b940: 7c 86 50 40 cmplw cr1,r6,r10 ffc0b944: 41 be fc b4 beq- cr7,ffc0b5f8 <_Heap_Walk+0x31c> ffc0b948: 41 b8 fc 88 blt- cr6,ffc0b5d0 <_Heap_Walk+0x2f4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0b94c: 39 26 00 08 addi r9,r6,8 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; ffc0b950: 41 a5 fc 80 bgt- cr1,ffc0b5d0 <_Heap_Walk+0x2f4> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b954: 7c e9 43 96 divwu r7,r9,r8 ffc0b958: 7c e7 41 d6 mullw r7,r7,r8 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b95c: 7c ab 2b 78 mr r11,r5 ); return false; } if ( ffc0b960: 7f 89 38 00 cmpw cr7,r9,r7 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b964: 7c c5 33 78 mr r5,r6 ); return false; } if ( ffc0b968: 40 9e 00 78 bne- cr7,ffc0b9e0 <_Heap_Walk+0x704> - 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; ffc0b96c: 81 26 00 04 lwz r9,4(r6) ffc0b970: 55 29 00 3c rlwinm r9,r9,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0b974: 7d 26 4a 14 add r9,r6,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; ffc0b978: 81 29 00 04 lwz r9,4(r9) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b97c: 71 27 00 01 andi. r7,r9,1 ffc0b980: 40 82 00 38 bne- ffc0b9b8 <_Heap_Walk+0x6dc> ); return false; } if ( free_block->prev != prev_block ) { ffc0b984: 80 e6 00 0c lwz r7,12(r6) ffc0b988: 7f 87 58 00 cmpw cr7,r7,r11 ffc0b98c: 41 9e ff a8 beq+ cr7,ffc0b934 <_Heap_Walk+0x658> (*printer)( ffc0b990: 80 01 00 18 lwz r0,24(r1) ffc0b994: 3c a0 ff c2 lis r5,-62 ffc0b998: 7f 23 cb 78 mr r3,r25 ffc0b99c: 38 80 00 01 li r4,1 ffc0b9a0: 7c 09 03 a6 mtctr r0 ffc0b9a4: 38 a5 a8 50 addi r5,r5,-22448 ffc0b9a8: 4c c6 31 82 crclr 4*cr1+eq ffc0b9ac: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b9b0: 38 60 00 00 li r3,0 ffc0b9b4: 4b ff f9 bc b ffc0b370 <_Heap_Walk+0x94> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( ffc0b9b8: 80 01 00 18 lwz r0,24(r1) ffc0b9bc: 3c a0 ff c2 lis r5,-62 ffc0b9c0: 7f 23 cb 78 mr r3,r25 ffc0b9c4: 38 80 00 01 li r4,1 ffc0b9c8: 7c 09 03 a6 mtctr r0 ffc0b9cc: 38 a5 a8 34 addi r5,r5,-22476 ffc0b9d0: 4c c6 31 82 crclr 4*cr1+eq ffc0b9d4: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b9d8: 38 60 00 00 li r3,0 ffc0b9dc: 4b ff f9 94 b ffc0b370 <_Heap_Walk+0x94> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc0b9e0: 80 01 00 18 lwz r0,24(r1) ffc0b9e4: 3c a0 ff c2 lis r5,-62 ffc0b9e8: 7f 23 cb 78 mr r3,r25 ffc0b9ec: 38 80 00 01 li r4,1 ffc0b9f0: 7c 09 03 a6 mtctr r0 ffc0b9f4: 38 a5 a8 04 addi r5,r5,-22524 ffc0b9f8: 4c c6 31 82 crclr 4*cr1+eq ffc0b9fc: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0ba00: 38 60 00 00 li r3,0 ffc0ba04: 4b ff f9 6c b ffc0b370 <_Heap_Walk+0x94> =============================================================================== ffc0b1dc <_Heap_Walk_print>: static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b1dc: 94 21 ff 88 stwu r1,-120(r1) ffc0b1e0: 7c 08 02 a6 mflr r0 ffc0b1e4: 93 e1 00 74 stw r31,116(r1) ffc0b1e8: 90 01 00 7c stw r0,124(r1) ffc0b1ec: 7c 60 1b 78 mr r0,r3 ffc0b1f0: 90 c1 00 1c stw r6,28(r1) ffc0b1f4: 90 e1 00 20 stw r7,32(r1) ffc0b1f8: 91 01 00 24 stw r8,36(r1) ffc0b1fc: 91 21 00 28 stw r9,40(r1) ffc0b200: 91 41 00 2c stw r10,44(r1) ffc0b204: 40 86 00 24 bne- cr1,ffc0b228 <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN ffc0b208: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0b20c: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0b210: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0b214: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0b218: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0b21c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0b220: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0b224: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0b228: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b22c: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc0b230: 40 9e 00 58 bne- cr7,ffc0b288 <_Heap_Walk_print+0xac> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); ffc0b234: 3c 60 ff c2 lis r3,-62 ffc0b238: 7c 04 03 78 mr r4,r0 ffc0b23c: 38 63 a6 08 addi r3,r3,-23032 ffc0b240: 4c c6 31 82 crclr 4*cr1+eq ffc0b244: 4b ff b2 59 bl ffc0649c } va_start( ap, fmt ); ffc0b248: 38 00 00 03 li r0,3 ffc0b24c: 98 01 00 08 stb r0,8(r1) ffc0b250: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b254: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b258: 98 01 00 09 stb r0,9(r1) ffc0b25c: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b260: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b264: 90 01 00 0c stw r0,12(r1) ffc0b268: 38 01 00 10 addi r0,r1,16 ffc0b26c: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b270: 4b ff d5 b9 bl ffc08828 va_end( ap ); } ffc0b274: 80 01 00 7c lwz r0,124(r1) ffc0b278: 83 e1 00 74 lwz r31,116(r1) ffc0b27c: 38 21 00 78 addi r1,r1,120 ffc0b280: 7c 08 03 a6 mtlr r0 ffc0b284: 4e 80 00 20 blr static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); ffc0b288: 3c 60 ff c2 lis r3,-62 ffc0b28c: 7c 04 03 78 mr r4,r0 ffc0b290: 38 63 a5 fc addi r3,r3,-23044 ffc0b294: 4c c6 31 82 crclr 4*cr1+eq ffc0b298: 4b ff b2 05 bl ffc0649c } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b29c: 38 00 00 03 li r0,3 ffc0b2a0: 98 01 00 08 stb r0,8(r1) ffc0b2a4: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b2a8: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b2ac: 98 01 00 09 stb r0,9(r1) ffc0b2b0: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b2b4: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b2b8: 90 01 00 0c stw r0,12(r1) ffc0b2bc: 38 01 00 10 addi r0,r1,16 ffc0b2c0: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b2c4: 4b ff d5 65 bl ffc08828 va_end( ap ); } ffc0b2c8: 80 01 00 7c lwz r0,124(r1) ffc0b2cc: 83 e1 00 74 lwz r31,116(r1) ffc0b2d0: 38 21 00 78 addi r1,r1,120 ffc0b2d4: 7c 08 03 a6 mtlr r0 ffc0b2d8: 4e 80 00 20 blr =============================================================================== ffc09dcc <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09dcc: 94 21 ff f0 stwu r1,-16(r1) ffc09dd0: 7c 08 02 a6 mflr r0 ffc09dd4: 93 c1 00 08 stw r30,8(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09dd8: 3f c0 00 00 lis r30,0 * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09ddc: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09de0: 80 1e 28 10 lwz r0,10256(r30) * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09de4: 93 e1 00 0c stw r31,12(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09de8: 2f 80 00 00 cmpwi cr7,r0,0 ffc09dec: 41 9e 00 2c beq- cr7,ffc09e18 <_IO_Initialize_all_drivers+0x4c><== NEVER TAKEN ffc09df0: 3b e0 00 00 li r31,0 ffc09df4: 3b de 28 10 addi r30,r30,10256 (void) rtems_io_initialize( major, 0, NULL ); ffc09df8: 7f e3 fb 78 mr r3,r31 ffc09dfc: 38 80 00 00 li r4,0 ffc09e00: 38 a0 00 00 li r5,0 ffc09e04: 48 00 62 75 bl ffc10078 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09e08: 80 1e 00 00 lwz r0,0(r30) ffc09e0c: 3b ff 00 01 addi r31,r31,1 ffc09e10: 7f 80 f8 40 cmplw cr7,r0,r31 ffc09e14: 41 9d ff e4 bgt+ cr7,ffc09df8 <_IO_Initialize_all_drivers+0x2c> (void) rtems_io_initialize( major, 0, NULL ); } ffc09e18: 80 01 00 14 lwz r0,20(r1) ffc09e1c: 83 c1 00 08 lwz r30,8(r1) ffc09e20: 7c 08 03 a6 mtlr r0 ffc09e24: 83 e1 00 0c lwz r31,12(r1) ffc09e28: 38 21 00 10 addi r1,r1,16 ffc09e2c: 4e 80 00 20 blr =============================================================================== ffc09cbc <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { ffc09cbc: 94 21 ff e0 stwu r1,-32(r1) ffc09cc0: 7c 08 02 a6 mflr r0 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; ffc09cc4: 3d 20 00 00 lis r9,0 * workspace. * */ void _IO_Manager_initialization(void) { ffc09cc8: 90 01 00 24 stw r0,36(r1) 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; ffc09ccc: 39 29 20 04 addi r9,r9,8196 * workspace. * */ void _IO_Manager_initialization(void) { ffc09cd0: 93 a1 00 14 stw r29,20(r1) ffc09cd4: 93 c1 00 18 stw r30,24(r1) uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; number_of_drivers = Configuration.maximum_drivers; ffc09cd8: 83 a9 00 2c lwz r29,44(r9) rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; ffc09cdc: 83 c9 00 30 lwz r30,48(r9) * workspace. * */ void _IO_Manager_initialization(void) { ffc09ce0: 93 e1 00 1c stw r31,28(r1) /* * 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 ) ffc09ce4: 7f 9e e8 40 cmplw cr7,r30,r29 * workspace. * */ void _IO_Manager_initialization(void) { ffc09ce8: 93 61 00 0c stw r27,12(r1) ffc09cec: 93 81 00 10 stw r28,16(r1) 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; ffc09cf0: 83 e9 00 34 lwz r31,52(r9) /* * 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 ) ffc09cf4: 40 9c 00 a4 bge- cr7,ffc09d98 <_IO_Manager_initialization+0xdc> * 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 ) ffc09cf8: 1f 7d 00 18 mulli r27,r29,24 * 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( ffc09cfc: 7f 63 db 78 mr r3,r27 ffc09d00: 48 00 3d 55 bl ffc0da54 <_Workspace_Allocate_or_fatal_error> /* * 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 *) ffc09d04: 3f 80 00 00 lis r28,0 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; ffc09d08: 3d 20 00 00 lis r9,0 /* * 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 *) ffc09d0c: 90 7c 28 14 stw r3,10260(r28) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc09d10: 38 80 00 00 li r4,0 ffc09d14: 7f 65 db 78 mr r5,r27 _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; ffc09d18: 93 a9 28 10 stw r29,10256(r9) memset( ffc09d1c: 48 00 9b 65 bl ffc13880 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc09d20: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09d24: 41 9e 00 50 beq- cr7,ffc09d74 <_IO_Manager_initialization+0xb8><== NEVER TAKEN ffc09d28: 7f c9 03 a6 mtctr r30 ffc09d2c: 81 1c 28 14 lwz r8,10260(r28) ffc09d30: 39 40 00 00 li r10,0 _IO_Driver_address_table[index] = driver_table[index]; ffc09d34: 7f e9 fb 78 mr r9,r31 ffc09d38: 7c a9 50 6e lwzux r5,r9,r10 ffc09d3c: 7d 68 52 14 add r11,r8,r10 ffc09d40: 80 e9 00 08 lwz r7,8(r9) ffc09d44: 80 09 00 0c lwz r0,12(r9) ffc09d48: 80 c9 00 04 lwz r6,4(r9) ffc09d4c: 7c a8 51 2e stwx r5,r8,r10 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc09d50: 39 4a 00 18 addi r10,r10,24 _IO_Driver_address_table[index] = driver_table[index]; ffc09d54: 90 cb 00 04 stw r6,4(r11) ffc09d58: 90 eb 00 08 stw r7,8(r11) ffc09d5c: 90 0b 00 0c stw r0,12(r11) ffc09d60: 80 e9 00 10 lwz r7,16(r9) ffc09d64: 80 09 00 14 lwz r0,20(r9) ffc09d68: 90 eb 00 10 stw r7,16(r11) ffc09d6c: 90 0b 00 14 stw r0,20(r11) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc09d70: 42 00 ff c4 bdnz+ ffc09d34 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; } ffc09d74: 80 01 00 24 lwz r0,36(r1) ffc09d78: 83 61 00 0c lwz r27,12(r1) ffc09d7c: 7c 08 03 a6 mtlr r0 ffc09d80: 83 81 00 10 lwz r28,16(r1) ffc09d84: 83 a1 00 14 lwz r29,20(r1) ffc09d88: 83 c1 00 18 lwz r30,24(r1) ffc09d8c: 83 e1 00 1c lwz r31,28(r1) ffc09d90: 38 21 00 20 addi r1,r1,32 ffc09d94: 4e 80 00 20 blr ffc09d98: 80 01 00 24 lwz r0,36(r1) * 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; ffc09d9c: 3d 20 00 00 lis r9,0 ffc09da0: 93 e9 28 14 stw r31,10260(r9) _IO_Number_of_drivers = number_of_drivers; ffc09da4: 3d 20 00 00 lis r9,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]; } ffc09da8: 7c 08 03 a6 mtlr r0 * 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; _IO_Number_of_drivers = number_of_drivers; ffc09dac: 93 c9 28 10 stw r30,10256(r9) sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } ffc09db0: 83 61 00 0c lwz r27,12(r1) ffc09db4: 83 81 00 10 lwz r28,16(r1) ffc09db8: 83 a1 00 14 lwz r29,20(r1) ffc09dbc: 83 c1 00 18 lwz r30,24(r1) ffc09dc0: 83 e1 00 1c lwz r31,28(r1) ffc09dc4: 38 21 00 20 addi r1,r1,32 ffc09dc8: 4e 80 00 20 blr =============================================================================== ffc0aca4 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0aca4: 94 21 ff f0 stwu r1,-16(r1) ffc0aca8: 7c 08 02 a6 mflr r0 _Internal_errors_What_happened.the_source = the_source; ffc0acac: 3d 60 00 00 lis r11,0 ffc0acb0: 39 2b 2c d0 addi r9,r11,11472 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0acb4: 90 01 00 14 stw r0,20(r1) ffc0acb8: 93 e1 00 0c stw r31,12(r1) ffc0acbc: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc0acc0: 98 89 00 04 stb r4,4(r9) _Internal_errors_What_happened.the_error = the_error; ffc0acc4: 90 a9 00 08 stw r5,8(r9) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; ffc0acc8: 90 6b 2c d0 stw r3,11472(r11) _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); ffc0accc: 48 00 26 61 bl ffc0d32c <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc0acd0: 38 00 00 05 li r0,5 ffc0acd4: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc0acd8: 7f e3 fb 78 mr r3,r31 ffc0acdc: 90 09 28 04 stw r0,10244(r9) ffc0ace0: 4b ff 91 cd bl ffc03eac <_BSP_Fatal_error> ffc0ace4: 48 00 00 00 b ffc0ace4 <_Internal_error_Occurred+0x40><== NOT EXECUTED =============================================================================== ffc0acfc <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0acfc: 94 21 ff f0 stwu r1,-16(r1) ffc0ad00: 7c 08 02 a6 mflr r0 ffc0ad04: 90 01 00 14 stw r0,20(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 ) ffc0ad08: 80 03 00 18 lwz r0,24(r3) */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0ad0c: 93 e1 00 0c stw r31,12(r1) ffc0ad10: 7c 7f 1b 78 mr r31,r3 * 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 ) ffc0ad14: 2f 80 00 00 cmpwi cr7,r0,0 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0ad18: 93 c1 00 08 stw r30,8(r1) * 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 ) return NULL; ffc0ad1c: 38 60 00 00 li r3,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 ) ffc0ad20: 41 9e 00 58 beq- cr7,ffc0ad78 <_Objects_Allocate+0x7c> <== NEVER TAKEN /* * 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 ); ffc0ad24: 3b df 00 20 addi r30,r31,32 ffc0ad28: 7f c3 f3 78 mr r3,r30 ffc0ad2c: 4b ff f4 21 bl ffc0a14c <_Chain_Get> if ( information->auto_extend ) { ffc0ad30: 88 1f 00 12 lbz r0,18(r31) ffc0ad34: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ad38: 41 9e 00 40 beq- cr7,ffc0ad78 <_Objects_Allocate+0x7c> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc0ad3c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ad40: 41 9e 00 50 beq- cr7,ffc0ad90 <_Objects_Allocate+0x94> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0ad44: a1 63 00 0a lhz r11,10(r3) ffc0ad48: a0 1f 00 0a lhz r0,10(r31) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc0ad4c: a1 3f 00 14 lhz r9,20(r31) } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0ad50: 7c 00 58 50 subf r0,r0,r11 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; ffc0ad54: a1 7f 00 2c lhz r11,44(r31) if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc0ad58: 7c 00 4b 96 divwu r0,r0,r9 information->inactive_per_block[ block ]--; ffc0ad5c: 81 3f 00 30 lwz r9,48(r31) ffc0ad60: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0ad64: 7d 49 00 2e lwzx r10,r9,r0 information->inactive--; ffc0ad68: 39 6b ff ff addi r11,r11,-1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc0ad6c: 39 4a ff ff addi r10,r10,-1 ffc0ad70: 7d 49 01 2e stwx r10,r9,r0 information->inactive--; ffc0ad74: b1 7f 00 2c sth r11,44(r31) ); } #endif return the_object; } ffc0ad78: 80 01 00 14 lwz r0,20(r1) ffc0ad7c: 83 c1 00 08 lwz r30,8(r1) ffc0ad80: 7c 08 03 a6 mtlr r0 ffc0ad84: 83 e1 00 0c lwz r31,12(r1) ffc0ad88: 38 21 00 10 addi r1,r1,16 ffc0ad8c: 4e 80 00 20 blr * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); ffc0ad90: 7f e3 fb 78 mr r3,r31 ffc0ad94: 48 00 00 4d bl ffc0ade0 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc0ad98: 7f c3 f3 78 mr r3,r30 ffc0ad9c: 4b ff f3 b1 bl ffc0a14c <_Chain_Get> } if ( the_object ) { ffc0ada0: 2c 03 00 00 cmpwi r3,0 ffc0ada4: 41 82 ff d4 beq+ ffc0ad78 <_Objects_Allocate+0x7c> ffc0ada8: 4b ff ff 9c b ffc0ad44 <_Objects_Allocate+0x48> =============================================================================== ffc0ade0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc0ade0: 94 21 ff c0 stwu r1,-64(r1) ffc0ade4: 7c 08 02 a6 mflr r0 ffc0ade8: 90 01 00 44 stw r0,68(r1) minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0adec: 81 23 00 34 lwz r9,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc0adf0: 93 61 00 2c stw r27,44(r1) minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0adf4: 2f 89 00 00 cmpwi cr7,r9,0 */ void _Objects_Extend_information( Objects_Information *information ) { ffc0adf8: 93 81 00 30 stw r28,48(r1) ffc0adfc: 93 e1 00 3c stw r31,60(r1) ffc0ae00: 7c 7f 1b 78 mr r31,r3 ffc0ae04: 92 c1 00 18 stw r22,24(r1) ffc0ae08: 92 e1 00 1c stw r23,28(r1) ffc0ae0c: 93 01 00 20 stw r24,32(r1) ffc0ae10: 93 21 00 24 stw r25,36(r1) ffc0ae14: 93 41 00 28 stw r26,40(r1) ffc0ae18: 93 a1 00 34 stw r29,52(r1) ffc0ae1c: 93 c1 00 38 stw r30,56(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 ); ffc0ae20: a3 83 00 0a lhz r28,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0ae24: a3 63 00 10 lhz r27,16(r3) ffc0ae28: 41 9e 02 80 beq- cr7,ffc0b0a8 <_Objects_Extend_information+0x2c8> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc0ae2c: a1 63 00 14 lhz r11,20(r3) ffc0ae30: 7e db 5b 96 divwu r22,r27,r11 for ( ; block < block_count; block++ ) { ffc0ae34: 2f 96 00 00 cmpwi cr7,r22,0 ffc0ae38: 41 9e 02 88 beq- cr7,ffc0b0c0 <_Objects_Extend_information+0x2e0><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { ffc0ae3c: 80 09 00 00 lwz r0,0(r9) ffc0ae40: 7d 6a 5b 78 mr r10,r11 /* * 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 ); ffc0ae44: 7f 9e e3 78 mr r30,r28 index_base = minimum_index; block = 0; ffc0ae48: 7e c9 03 a6 mtctr r22 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0ae4c: 2f 80 00 00 cmpwi cr7,r0,0 * 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; ffc0ae50: 3b a0 00 00 li r29,0 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0ae54: 40 be 00 14 bne+ cr7,ffc0ae68 <_Objects_Extend_information+0x88><== ALWAYS TAKEN ffc0ae58: 48 00 02 7c b ffc0b0d4 <_Objects_Extend_information+0x2f4><== NOT EXECUTED ffc0ae5c: 84 09 00 04 lwzu r0,4(r9) ffc0ae60: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ae64: 41 9e 01 f4 beq- cr7,ffc0b058 <_Objects_Extend_information+0x278> do_extend = false; break; } else index_base += information->allocation_size; ffc0ae68: 7f de 5a 14 add r30,r30,r11 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0ae6c: 3b bd 00 01 addi r29,r29,1 ffc0ae70: 42 00 ff ec bdnz+ ffc0ae5c <_Objects_Extend_information+0x7c> /* * 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; ffc0ae74: 3b 20 00 01 li r25,1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc0ae78: 7f 7b 52 14 add r27,r27,r10 /* * 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 ) { ffc0ae7c: 2b 9b ff ff cmplwi cr7,r27,65535 ffc0ae80: 41 9d 01 a0 bgt- cr7,ffc0b020 <_Objects_Extend_information+0x240> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { ffc0ae84: 88 1f 00 12 lbz r0,18(r31) /* * 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; ffc0ae88: 80 7f 00 18 lwz r3,24(r31) if ( information->auto_extend ) { ffc0ae8c: 2f 80 00 00 cmpwi cr7,r0,0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc0ae90: 7c 6a 19 d6 mullw r3,r10,r3 if ( information->auto_extend ) { ffc0ae94: 41 9e 01 cc beq- cr7,ffc0b060 <_Objects_Extend_information+0x280> new_object_block = _Workspace_Allocate( block_size ); ffc0ae98: 48 00 2b 5d bl ffc0d9f4 <_Workspace_Allocate> if ( !new_object_block ) ffc0ae9c: 7c 7a 1b 79 mr. r26,r3 ffc0aea0: 41 82 01 80 beq- ffc0b020 <_Objects_Extend_information+0x240> } /* * Do we need to grow the tables? */ if ( do_extend ) { ffc0aea4: 2f 99 00 00 cmpwi cr7,r25,0 ffc0aea8: 41 9e 00 f4 beq- cr7,ffc0af9c <_Objects_Extend_information+0x1bc> */ /* * Up the block count and maximum */ block_count++; ffc0aeac: 3a f6 00 01 addi r23,r22,1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc0aeb0: 1c 77 00 03 mulli r3,r23,3 ((maximum + minimum_index) * sizeof(Objects_Control *)); ffc0aeb4: 7c 7b 1a 14 add r3,r27,r3 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc0aeb8: 7c 63 e2 14 add r3,r3,r28 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); ffc0aebc: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0aec0: 48 00 2b 35 bl ffc0d9f4 <_Workspace_Allocate> if ( !object_blocks ) { ffc0aec4: 7c 78 1b 79 mr. r24,r3 ffc0aec8: 41 82 02 18 beq- ffc0b0e0 <_Objects_Extend_information+0x300> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0aecc: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc0aed0: 56 f7 10 3a rlwinm r23,r23,2,0,29 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc0aed4: 7f 38 ba 14 add r25,r24,r23 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0aed8: 7f 9c 00 40 cmplw cr7,r28,r0 ffc0aedc: 7e f9 ba 14 add r23,r25,r23 ffc0aee0: 41 9c 01 8c blt- cr7,ffc0b06c <_Objects_Extend_information+0x28c> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0aee4: 2f 9c 00 00 cmpwi cr7,r28,0 local_table[ index ] = NULL; ffc0aee8: 7f 89 03 a6 mtctr r28 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0aeec: 39 37 ff fc addi r9,r23,-4 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc0aef0: 38 00 00 00 li r0,0 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0aef4: 41 9e 00 0c beq- cr7,ffc0af00 <_Objects_Extend_information+0x120><== NEVER TAKEN local_table[ index ] = NULL; ffc0aef8: 94 09 00 04 stwu r0,4(r9) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0aefc: 42 00 ff fc bdnz+ ffc0aef8 <_Objects_Extend_information+0x118> ffc0af00: 56 d6 10 3a rlwinm r22,r22,2,0,29 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0af04: a1 7f 00 14 lhz r11,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0af08: 38 00 00 00 li r0,0 ffc0af0c: 7c 18 b1 2e stwx r0,r24,r22 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0af10: 7d 7e 5a 14 add r11,r30,r11 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0af14: 7f 9e 58 40 cmplw cr7,r30,r11 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; ffc0af18: 7c 19 b1 2e stwx r0,r25,r22 for ( index=index_base ; ffc0af1c: 40 9c 00 30 bge- cr7,ffc0af4c <_Objects_Extend_information+0x16c><== NEVER TAKEN ffc0af20: 38 1e 00 01 addi r0,r30,1 ffc0af24: 7f 80 58 40 cmplw cr7,r0,r11 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc0af28: 57 c9 10 3a rlwinm r9,r30,2,0,29 ffc0af2c: 39 29 ff fc addi r9,r9,-4 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0af30: 7d 7e 58 50 subf r11,r30,r11 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0af34: 7d 29 ba 14 add r9,r9,r23 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0af38: 7d 69 03 a6 mtctr r11 ffc0af3c: 38 00 00 00 li r0,0 ffc0af40: 41 9d 01 ac bgt- cr7,ffc0b0ec <_Objects_Extend_information+0x30c><== NEVER TAKEN ffc0af44: 94 09 00 04 stwu r0,4(r9) * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0af48: 42 00 ff fc bdnz+ ffc0af44 <_Objects_Extend_information+0x164> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0af4c: 7c 00 00 a6 mfmsr r0 ffc0af50: 7d 30 42 a6 mfsprg r9,0 ffc0af54: 7c 09 48 78 andc r9,r0,r9 ffc0af58: 7d 20 01 24 mtmsr r9 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0af5c: 81 7f 00 00 lwz r11,0(r31) 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; ffc0af60: 57 7b 04 3e clrlwi r27,r27,16 information->maximum_id = _Objects_Build_id( ffc0af64: a1 3f 00 04 lhz r9,4(r31) ffc0af68: 55 6b c0 0e rlwinm r11,r11,24,0,7 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0af6c: 80 7f 00 34 lwz r3,52(r31) ffc0af70: 65 6b 00 01 oris r11,r11,1 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; ffc0af74: 93 3f 00 30 stw r25,48(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0af78: 55 29 d8 08 rlwinm r9,r9,27,0,4 ffc0af7c: 7d 69 4b 78 or r9,r11,r9 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; ffc0af80: 93 1f 00 34 stw r24,52(r31) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0af84: 7d 29 db 78 or r9,r9,r27 information->inactive_per_block = inactive_per_block; information->local_table = local_table; ffc0af88: 92 ff 00 1c stw r23,28(r31) information->maximum = (Objects_Maximum) maximum; ffc0af8c: b3 7f 00 10 sth r27,16(r31) information->maximum_id = _Objects_Build_id( ffc0af90: 91 3f 00 0c stw r9,12(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0af94: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); _Workspace_Free( old_tables ); ffc0af98: 48 00 2a 91 bl ffc0da28 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0af9c: 81 3f 00 34 lwz r9,52(r31) ffc0afa0: 57 bd 10 3a rlwinm r29,r29,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0afa4: a0 bf 00 14 lhz r5,20(r31) ffc0afa8: 38 61 00 08 addi r3,r1,8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0afac: 7f 49 e9 2e stwx r26,r9,r29 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0afb0: 3b 9f 00 20 addi r28,r31,32 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0afb4: 81 3f 00 34 lwz r9,52(r31) ffc0afb8: 80 df 00 18 lwz r6,24(r31) ffc0afbc: 7c 89 e8 2e lwzx r4,r9,r29 ffc0afc0: 48 00 51 29 bl ffc100e8 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0afc4: 48 00 00 2c b ffc0aff0 <_Objects_Extend_information+0x210> ffc0afc8: 81 7f 00 00 lwz r11,0(r31) the_object->id = _Objects_Build_id( ffc0afcc: a0 1f 00 04 lhz r0,4(r31) ffc0afd0: 55 6b c0 0e rlwinm r11,r11,24,0,7 ffc0afd4: 65 6b 00 01 oris r11,r11,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0afd8: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc0afdc: 7d 60 03 78 or r0,r11,r0 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0afe0: 7c 00 f3 78 or r0,r0,r30 ffc0afe4: 90 09 00 08 stw r0,8(r9) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc0afe8: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0afec: 4b ff f1 09 bl ffc0a0f4 <_Chain_Append> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0aff0: 38 61 00 08 addi r3,r1,8 ffc0aff4: 4b ff f1 59 bl ffc0a14c <_Chain_Get> ffc0aff8: 7c 69 1b 79 mr. r9,r3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0affc: 7f 83 e3 78 mr r3,r28 ffc0b000: 7d 24 4b 78 mr r4,r9 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0b004: 40 82 ff c4 bne+ ffc0afc8 <_Objects_Extend_information+0x1e8> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0b008: a1 3f 00 2c lhz r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b00c: a0 1f 00 14 lhz r0,20(r31) ffc0b010: 81 7f 00 30 lwz r11,48(r31) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0b014: 7d 20 4a 14 add r9,r0,r9 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b018: 7c 0b e9 2e stwx r0,r11,r29 information->inactive = ffc0b01c: b1 3f 00 2c sth r9,44(r31) (Objects_Maximum)(information->inactive + information->allocation_size); } ffc0b020: 80 01 00 44 lwz r0,68(r1) ffc0b024: 82 c1 00 18 lwz r22,24(r1) ffc0b028: 7c 08 03 a6 mtlr r0 ffc0b02c: 82 e1 00 1c lwz r23,28(r1) ffc0b030: 83 01 00 20 lwz r24,32(r1) ffc0b034: 83 21 00 24 lwz r25,36(r1) ffc0b038: 83 41 00 28 lwz r26,40(r1) ffc0b03c: 83 61 00 2c lwz r27,44(r1) ffc0b040: 83 81 00 30 lwz r28,48(r1) ffc0b044: 83 a1 00 34 lwz r29,52(r1) ffc0b048: 83 c1 00 38 lwz r30,56(r1) ffc0b04c: 83 e1 00 3c lwz r31,60(r1) ffc0b050: 38 21 00 40 addi r1,r1,64 ffc0b054: 4e 80 00 20 blr else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; ffc0b058: 3b 20 00 00 li r25,0 ffc0b05c: 4b ff fe 1c b ffc0ae78 <_Objects_Extend_information+0x98> 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 ); ffc0b060: 48 00 29 f5 bl ffc0da54 <_Workspace_Allocate_or_fatal_error> ffc0b064: 7c 7a 1b 78 mr r26,r3 ffc0b068: 4b ff fe 3c b ffc0aea4 <_Objects_Extend_information+0xc4> * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc0b06c: 56 d6 10 3a rlwinm r22,r22,2,0,29 /* * 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, ffc0b070: 80 9f 00 34 lwz r4,52(r31) ffc0b074: 7e c5 b3 78 mr r5,r22 ffc0b078: 48 00 87 25 bl ffc1379c information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc0b07c: 80 9f 00 30 lwz r4,48(r31) ffc0b080: 7e c5 b3 78 mr r5,r22 ffc0b084: 7f 23 cb 78 mr r3,r25 ffc0b088: 48 00 87 15 bl ffc1379c information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0b08c: a0 bf 00 10 lhz r5,16(r31) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0b090: 80 9f 00 1c lwz r4,28(r31) ffc0b094: 7e e3 bb 78 mr r3,r23 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0b098: 7c bc 2a 14 add r5,r28,r5 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0b09c: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0b0a0: 48 00 86 fd bl ffc1379c ffc0b0a4: 4b ff fe 60 b ffc0af04 <_Objects_Extend_information+0x124> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0b0a8: a1 43 00 14 lhz r10,20(r3) /* * 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 ); ffc0b0ac: 7f 9e e3 78 mr r30,r28 /* * 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; ffc0b0b0: 3b 20 00 01 li r25,1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b0b4: 3b a0 00 00 li r29,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; ffc0b0b8: 3a c0 00 00 li r22,0 ffc0b0bc: 4b ff fd bc b ffc0ae78 <_Objects_Extend_information+0x98> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0b0c0: 7d 6a 5b 78 mr r10,r11 <== 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 ); ffc0b0c4: 7f 9e e3 78 mr r30,r28 <== 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; ffc0b0c8: 3b 20 00 01 li r25,1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b0cc: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0b0d0: 4b ff fd a8 b ffc0ae78 <_Objects_Extend_information+0x98><== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; ffc0b0d4: 3b 20 00 00 li r25,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; ffc0b0d8: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0b0dc: 4b ff fd 9c b ffc0ae78 <_Objects_Extend_information+0x98><== 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 ); ffc0b0e0: 7f 43 d3 78 mr r3,r26 ffc0b0e4: 48 00 29 45 bl ffc0da28 <_Workspace_Free> return; ffc0b0e8: 4b ff ff 38 b ffc0b020 <_Objects_Extend_information+0x240> ffc0b0ec: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc0b0f0: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED ffc0b0f4: 4b ff fe 50 b ffc0af44 <_Objects_Extend_information+0x164><== NOT EXECUTED =============================================================================== ffc0b1e4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b1e4: 94 21 ff e8 stwu r1,-24(r1) ffc0b1e8: 7c 08 02 a6 mflr r0 ffc0b1ec: 93 c1 00 10 stw r30,16(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b1f0: 7c 9e 23 79 mr. r30,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b1f4: 93 a1 00 0c stw r29,12(r1) ffc0b1f8: 7c 7d 1b 78 mr r29,r3 ffc0b1fc: 93 e1 00 14 stw r31,20(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; ffc0b200: 3b e0 00 00 li r31,0 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b204: 90 01 00 1c stw r0,28(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b208: 41 82 00 4c beq- ffc0b254 <_Objects_Get_information+0x70> /* * 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 ); ffc0b20c: 48 00 54 fd bl ffc10708 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) ffc0b210: 2c 03 00 00 cmpwi r3,0 ffc0b214: 41 82 00 40 beq- ffc0b254 <_Objects_Get_information+0x70> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc0b218: 7f 83 f0 40 cmplw cr7,r3,r30 ffc0b21c: 41 9c 00 38 blt- cr7,ffc0b254 <_Objects_Get_information+0x70> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc0b220: 3d 20 00 00 lis r9,0 ffc0b224: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc0b228: 39 29 2b e0 addi r9,r9,11232 ffc0b22c: 7d 29 e8 2e lwzx r9,r9,r29 ffc0b230: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b234: 41 9e 00 20 beq- cr7,ffc0b254 <_Objects_Get_information+0x70><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc0b238: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0b23c: 7f e9 f0 2e lwzx r31,r9,r30 if ( !info ) ffc0b240: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0b244: 41 9e 00 10 beq- cr7,ffc0b254 <_Objects_Get_information+0x70><== 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 ) ffc0b248: a0 1f 00 10 lhz r0,16(r31) ffc0b24c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b250: 41 9e 00 24 beq- cr7,ffc0b274 <_Objects_Get_information+0x90> return NULL; #endif return info; } ffc0b254: 80 01 00 1c lwz r0,28(r1) ffc0b258: 7f e3 fb 78 mr r3,r31 ffc0b25c: 83 a1 00 0c lwz r29,12(r1) ffc0b260: 7c 08 03 a6 mtlr r0 ffc0b264: 83 c1 00 10 lwz r30,16(r1) ffc0b268: 83 e1 00 14 lwz r31,20(r1) ffc0b26c: 38 21 00 18 addi r1,r1,24 ffc0b270: 4e 80 00 20 blr * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; ffc0b274: 3b e0 00 00 li r31,0 ffc0b278: 4b ff ff dc b ffc0b254 <_Objects_Get_information+0x70> =============================================================================== ffc0ceb0 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0ceb0: 94 21 ff d8 stwu r1,-40(r1) ffc0ceb4: 7c 08 02 a6 mflr r0 ffc0ceb8: 93 c1 00 20 stw r30,32(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0cebc: 7c 9e 23 79 mr. r30,r4 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0cec0: 93 e1 00 24 stw r31,36(r1) ffc0cec4: 7c bf 2b 78 mr r31,r5 ffc0cec8: 90 01 00 2c stw r0,44(r1) ffc0cecc: 93 a1 00 1c stw r29,28(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0ced0: 41 82 00 f8 beq- ffc0cfc8 <_Objects_Get_name_as_string+0x118> return NULL; if ( name == NULL ) ffc0ced4: 2f 85 00 00 cmpwi cr7,r5,0 ffc0ced8: 41 9e 00 c0 beq- cr7,ffc0cf98 <_Objects_Get_name_as_string+0xe8> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0cedc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cee0: 7c 7d 1b 78 mr r29,r3 ffc0cee4: 41 9e 00 d4 beq- cr7,ffc0cfb8 <_Objects_Get_name_as_string+0x108> information = _Objects_Get_information_id( tmpId ); ffc0cee8: 7f a3 eb 78 mr r3,r29 ffc0ceec: 4b ff fe 91 bl ffc0cd7c <_Objects_Get_information_id> if ( !information ) ffc0cef0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cef4: 41 9e 00 d4 beq- cr7,ffc0cfc8 <_Objects_Get_name_as_string+0x118> return NULL; the_object = _Objects_Get( information, tmpId, &location ); ffc0cef8: 7f a4 eb 78 mr r4,r29 ffc0cefc: 38 a1 00 08 addi r5,r1,8 ffc0cf00: 48 00 00 ed bl ffc0cfec <_Objects_Get> switch ( location ) { ffc0cf04: 80 01 00 08 lwz r0,8(r1) ffc0cf08: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cf0c: 40 9e 00 bc bne- cr7,ffc0cfc8 <_Objects_Get_name_as_string+0x118> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cf10: 34 fe ff ff addic. r7,r30,-1 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; ffc0cf14: 81 63 00 0c lwz r11,12(r3) lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; ffc0cf18: 98 01 00 10 stb r0,16(r1) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cf1c: 7f e9 fb 78 mr r9,r31 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc0cf20: 55 60 46 3e rlwinm r0,r11,8,24,31 lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0cf24: 55 68 84 3e rlwinm r8,r11,16,16,31 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc0cf28: 98 01 00 0c stb r0,12(r1) lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0cf2c: 55 6a c2 3e rlwinm r10,r11,24,8,31 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cf30: 7c e9 03 a6 mtctr r7 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0cf34: 99 01 00 0d stb r8,13(r1) lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0cf38: 99 41 00 0e stb r10,14(r1) lname[ 3 ] = (u32_name >> 0) & 0xff; ffc0cf3c: 99 61 00 0f stb r11,15(r1) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cf40: 41 82 00 4c beq- ffc0cf8c <_Objects_Get_name_as_string+0xdc><== NEVER TAKEN ffc0cf44: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cf48: 41 9e 00 44 beq- cr7,ffc0cf8c <_Objects_Get_name_as_string+0xdc> ffc0cf4c: 3d 00 00 00 lis r8,0 lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; ffc0cf50: 39 41 00 0c addi r10,r1,12 ffc0cf54: 39 08 27 ac addi r8,r8,10156 ffc0cf58: 48 00 00 10 b ffc0cf68 <_Objects_Get_name_as_string+0xb8> } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cf5c: 8c 0a 00 01 lbzu r0,1(r10) ffc0cf60: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cf64: 41 9e 00 28 beq- cr7,ffc0cf8c <_Objects_Get_name_as_string+0xdc> *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc0cf68: 81 68 00 00 lwz r11,0(r8) ffc0cf6c: 7d 6b 02 14 add r11,r11,r0 ffc0cf70: 89 6b 00 01 lbz r11,1(r11) ffc0cf74: 71 67 00 97 andi. r7,r11,151 ffc0cf78: 40 82 00 08 bne- ffc0cf80 <_Objects_Get_name_as_string+0xd0> ffc0cf7c: 38 00 00 2a li r0,42 ffc0cf80: 98 09 00 00 stb r0,0(r9) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cf84: 39 29 00 01 addi r9,r9,1 ffc0cf88: 42 00 ff d4 bdnz+ ffc0cf5c <_Objects_Get_name_as_string+0xac> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; ffc0cf8c: 38 00 00 00 li r0,0 ffc0cf90: 98 09 00 00 stb r0,0(r9) _Thread_Enable_dispatch(); ffc0cf94: 48 00 10 a1 bl ffc0e034 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } ffc0cf98: 80 01 00 2c lwz r0,44(r1) ffc0cf9c: 7f e3 fb 78 mr r3,r31 ffc0cfa0: 83 a1 00 1c lwz r29,28(r1) ffc0cfa4: 7c 08 03 a6 mtlr r0 ffc0cfa8: 83 c1 00 20 lwz r30,32(r1) ffc0cfac: 83 e1 00 24 lwz r31,36(r1) ffc0cfb0: 38 21 00 28 addi r1,r1,40 ffc0cfb4: 4e 80 00 20 blr return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0cfb8: 3d 20 00 00 lis r9,0 ffc0cfbc: 81 29 32 24 lwz r9,12836(r9) ffc0cfc0: 83 a9 00 08 lwz r29,8(r9) ffc0cfc4: 4b ff ff 24 b ffc0cee8 <_Objects_Get_name_as_string+0x38> _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc0cfc8: 80 01 00 2c lwz r0,44(r1) #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; ffc0cfcc: 3b e0 00 00 li r31,0 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc0cfd0: 7f e3 fb 78 mr r3,r31 ffc0cfd4: 83 a1 00 1c lwz r29,28(r1) ffc0cfd8: 7c 08 03 a6 mtlr r0 ffc0cfdc: 83 c1 00 20 lwz r30,32(r1) ffc0cfe0: 83 e1 00 24 lwz r31,36(r1) ffc0cfe4: 38 21 00 28 addi r1,r1,40 ffc0cfe8: 4e 80 00 20 blr =============================================================================== ffc0ae2c <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc0ae2c: 94 21 ff e8 stwu r1,-24(r1) ffc0ae30: 7c 08 02 a6 mflr r0 ffc0ae34: 93 c1 00 10 stw r30,16(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc0ae38: 7c 7e 1b 79 mr. r30,r3 return NULL; ffc0ae3c: 38 60 00 00 li r3,0 Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc0ae40: 93 81 00 08 stw r28,8(r1) ffc0ae44: 7c dc 33 78 mr r28,r6 ffc0ae48: 93 e1 00 14 stw r31,20(r1) ffc0ae4c: 7c bf 2b 78 mr r31,r5 ffc0ae50: 90 01 00 1c stw r0,28(r1) ffc0ae54: 93 a1 00 0c stw r29,12(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc0ae58: 41 82 00 58 beq- ffc0aeb0 <_Objects_Get_next+0x84> return NULL; if ( !location_p ) ffc0ae5c: 2f 85 00 00 cmpwi cr7,r5,0 ffc0ae60: 41 9e 00 50 beq- cr7,ffc0aeb0 <_Objects_Get_next+0x84> return NULL; if ( !next_id_p ) ffc0ae64: 2f 86 00 00 cmpwi cr7,r6,0 ffc0ae68: 41 9e 00 48 beq- cr7,ffc0aeb0 <_Objects_Get_next+0x84> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc0ae6c: 54 80 04 3e clrlwi r0,r4,16 ffc0ae70: 2f 80 00 00 cmpwi cr7,r0,0 next_id = information->minimum_id; else next_id = id; ffc0ae74: 7c 9d 23 78 mr r29,r4 return NULL; if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc0ae78: 41 9e 00 58 beq- cr7,ffc0aed0 <_Objects_Get_next+0xa4> else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0ae7c: a1 3e 00 10 lhz r9,16(r30) ffc0ae80: 57 a0 04 3e clrlwi r0,r29,16 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0ae84: 7f a4 eb 78 mr r4,r29 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0ae88: 7f 89 00 40 cmplw cr7,r9,r0 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0ae8c: 7f c3 f3 78 mr r3,r30 ffc0ae90: 7f e5 fb 78 mr r5,r31 next_id++; ffc0ae94: 3b bd 00 01 addi r29,r29,1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0ae98: 41 9c 00 5c blt- cr7,ffc0aef4 <_Objects_Get_next+0xc8> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0ae9c: 48 00 00 8d bl ffc0af28 <_Objects_Get> next_id++; } while (*location_p != OBJECTS_LOCAL); ffc0aea0: 80 1f 00 00 lwz r0,0(r31) ffc0aea4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0aea8: 40 9e ff d4 bne+ cr7,ffc0ae7c <_Objects_Get_next+0x50> *next_id_p = next_id; ffc0aeac: 93 bc 00 00 stw r29,0(r28) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } ffc0aeb0: 80 01 00 1c lwz r0,28(r1) ffc0aeb4: 83 81 00 08 lwz r28,8(r1) ffc0aeb8: 7c 08 03 a6 mtlr r0 ffc0aebc: 83 a1 00 0c lwz r29,12(r1) ffc0aec0: 83 c1 00 10 lwz r30,16(r1) ffc0aec4: 83 e1 00 14 lwz r31,20(r1) ffc0aec8: 38 21 00 18 addi r1,r1,24 ffc0aecc: 4e 80 00 20 blr if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id; ffc0aed0: 83 be 00 08 lwz r29,8(r30) *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0aed4: 7f c3 f3 78 mr r3,r30 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0aed8: a1 3e 00 10 lhz r9,16(r30) *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0aedc: 7f e5 fb 78 mr r5,r31 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0aee0: 57 a0 04 3e clrlwi r0,r29,16 ffc0aee4: 7f 89 00 40 cmplw cr7,r9,r0 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0aee8: 7f a4 eb 78 mr r4,r29 next_id++; ffc0aeec: 3b bd 00 01 addi r29,r29,1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0aef0: 40 9c ff ac bge+ cr7,ffc0ae9c <_Objects_Get_next+0x70> <== ALWAYS TAKEN { *location_p = OBJECTS_ERROR; ffc0aef4: 38 00 00 01 li r0,1 return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } ffc0aef8: 83 a1 00 0c lwz r29,12(r1) do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; ffc0aefc: 90 1f 00 00 stw r0,0(r31) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc0af00: 38 00 ff ff li r0,-1 return 0; ffc0af04: 38 60 00 00 li r3,0 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc0af08: 90 1c 00 00 stw r0,0(r28) return 0; } ffc0af0c: 80 01 00 1c lwz r0,28(r1) ffc0af10: 83 81 00 08 lwz r28,8(r1) ffc0af14: 7c 08 03 a6 mtlr r0 ffc0af18: 83 c1 00 10 lwz r30,16(r1) ffc0af1c: 83 e1 00 14 lwz r31,20(r1) ffc0af20: 38 21 00 18 addi r1,r1,24 ffc0af24: 4e 80 00 20 blr =============================================================================== ffc0bdfc <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0bdfc: 94 21 ff e0 stwu r1,-32(r1) ffc0be00: 7c 08 02 a6 mflr r0 ffc0be04: 90 01 00 24 stw r0,36(r1) /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0be08: 7c 60 1b 79 mr. r0,r3 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0be0c: 93 c1 00 18 stw r30,24(r1) ffc0be10: 7c 9e 23 78 mr r30,r4 ffc0be14: 93 e1 00 1c stw r31,28(r1) /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0be18: 40 82 00 10 bne- ffc0be28 <_Objects_Id_to_name+0x2c> ffc0be1c: 3d 20 00 00 lis r9,0 ffc0be20: 81 29 2e 24 lwz r9,11812(r9) ffc0be24: 80 09 00 08 lwz r0,8(r9) */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc0be28: 54 09 47 7e rlwinm r9,r0,8,29,31 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc0be2c: 39 69 ff ff addi r11,r9,-1 ffc0be30: 2b 8b 00 02 cmplwi cr7,r11,2 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; ffc0be34: 3b e0 00 03 li r31,3 ffc0be38: 41 9d 00 50 bgt- cr7,ffc0be88 <_Objects_Id_to_name+0x8c> if ( !_Objects_Information_table[ the_api ] ) ffc0be3c: 3d 60 00 00 lis r11,0 ffc0be40: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0be44: 39 6b 2c 40 addi r11,r11,11328 ffc0be48: 7d 2b 48 2e lwzx r9,r11,r9 ffc0be4c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0be50: 41 9e 00 38 beq- cr7,ffc0be88 <_Objects_Id_to_name+0x8c> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc0be54: 54 0b 3e 7a rlwinm r11,r0,7,25,29 ffc0be58: 7c 69 58 2e lwzx r3,r9,r11 if ( !information ) ffc0be5c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0be60: 41 9e 00 28 beq- cr7,ffc0be88 <_Objects_Id_to_name+0x8c><== 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 ); ffc0be64: 7c 04 03 78 mr r4,r0 ffc0be68: 38 a1 00 08 addi r5,r1,8 ffc0be6c: 4b ff fe f1 bl ffc0bd5c <_Objects_Get> if ( !the_object ) ffc0be70: 2c 03 00 00 cmpwi r3,0 ffc0be74: 41 82 00 14 beq- ffc0be88 <_Objects_Id_to_name+0x8c> return OBJECTS_INVALID_ID; *name = the_object->name; ffc0be78: 80 03 00 0c lwz r0,12(r3) _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0be7c: 3b e0 00 00 li r31,0 the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; ffc0be80: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0be84: 48 00 0f c9 bl ffc0ce4c <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc0be88: 80 01 00 24 lwz r0,36(r1) ffc0be8c: 7f e3 fb 78 mr r3,r31 ffc0be90: 83 c1 00 18 lwz r30,24(r1) ffc0be94: 7c 08 03 a6 mtlr r0 ffc0be98: 83 e1 00 1c lwz r31,28(r1) ffc0be9c: 38 21 00 20 addi r1,r1,32 ffc0bea0: 4e 80 00 20 blr =============================================================================== ffc0b4fc <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b4fc: 94 21 ff e8 stwu r1,-24(r1) ffc0b500: 7c 08 02 a6 mflr r0 ffc0b504: 90 01 00 1c stw r0,28(r1) ffc0b508: 93 e1 00 14 stw r31,20(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) / ffc0b50c: a1 43 00 10 lhz r10,16(r3) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); ffc0b510: a3 e3 00 0a lhz r31,10(r3) block_count = (information->maximum - index_base) / ffc0b514: a0 03 00 14 lhz r0,20(r3) ffc0b518: 7d 5f 50 50 subf r10,r31,r10 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b51c: 93 81 00 08 stw r28,8(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) / ffc0b520: 7d 4a 03 96 divwu r10,r10,r0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b524: 93 a1 00 0c stw r29,12(r1) ffc0b528: 93 c1 00 10 stw r30,16(r1) index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0b52c: 2f 8a 00 00 cmpwi cr7,r10,0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b530: 7c 7c 1b 78 mr r28,r3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0b534: 41 9e 00 3c beq- cr7,ffc0b570 <_Objects_Shrink_information+0x74><== NEVER TAKEN if ( information->inactive_per_block[ block ] == ffc0b538: 81 63 00 30 lwz r11,48(r3) ffc0b53c: 81 2b 00 00 lwz r9,0(r11) ffc0b540: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b544: 41 9e 00 4c beq- cr7,ffc0b590 <_Objects_Shrink_information+0x94><== 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++ ) { ffc0b548: 39 20 00 00 li r9,0 ffc0b54c: 7d 49 03 a6 mtctr r10 ffc0b550: 48 00 00 18 b ffc0b568 <_Objects_Shrink_information+0x6c> if ( information->inactive_per_block[ block ] == ffc0b554: 85 4b 00 04 lwzu r10,4(r11) information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0b558: 7f ff 02 14 add r31,r31,r0 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 ] == ffc0b55c: 55 3d 10 3a rlwinm r29,r9,2,0,29 ffc0b560: 7f 80 50 00 cmpw cr7,r0,r10 ffc0b564: 41 9e 00 30 beq- cr7,ffc0b594 <_Objects_Shrink_information+0x98> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0b568: 39 29 00 01 addi r9,r9,1 ffc0b56c: 42 00 ff e8 bdnz+ ffc0b554 <_Objects_Shrink_information+0x58> return; } index_base += information->allocation_size; } } ffc0b570: 80 01 00 1c lwz r0,28(r1) ffc0b574: 83 81 00 08 lwz r28,8(r1) ffc0b578: 7c 08 03 a6 mtlr r0 ffc0b57c: 83 a1 00 0c lwz r29,12(r1) ffc0b580: 83 c1 00 10 lwz r30,16(r1) ffc0b584: 83 e1 00 14 lwz r31,20(r1) ffc0b588: 38 21 00 18 addi r1,r1,24 ffc0b58c: 4e 80 00 20 blr 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 ] == ffc0b590: 3b a0 00 00 li r29,0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0b594: 80 7c 00 20 lwz r3,32(r28) ffc0b598: 48 00 00 10 b ffc0b5a8 <_Objects_Shrink_information+0xac> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0b59c: 2f 9e 00 00 cmpwi cr7,r30,0 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; ffc0b5a0: 7f c3 f3 78 mr r3,r30 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0b5a4: 41 9e 00 34 beq- cr7,ffc0b5d8 <_Objects_Shrink_information+0xdc> * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); ffc0b5a8: a0 03 00 0a lhz r0,10(r3) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc0b5ac: 83 c3 00 00 lwz r30,0(r3) if ((index >= index_base) && ffc0b5b0: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0b5b4: 41 bc ff e8 blt- cr7,ffc0b59c <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { ffc0b5b8: a1 3c 00 14 lhz r9,20(r28) ffc0b5bc: 7d 3f 4a 14 add r9,r31,r9 /* * 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) && ffc0b5c0: 7f 80 48 40 cmplw cr7,r0,r9 ffc0b5c4: 40 9c ff d8 bge+ cr7,ffc0b59c <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); ffc0b5c8: 4b ff eb 5d bl ffc0a124 <_Chain_Extract> } } while ( the_object ); ffc0b5cc: 2f 9e 00 00 cmpwi cr7,r30,0 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; ffc0b5d0: 7f c3 f3 78 mr r3,r30 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0b5d4: 40 9e ff d4 bne+ cr7,ffc0b5a8 <_Objects_Shrink_information+0xac><== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc0b5d8: 81 3c 00 34 lwz r9,52(r28) ffc0b5dc: 7c 69 e8 2e lwzx r3,r9,r29 ffc0b5e0: 48 00 24 49 bl ffc0da28 <_Workspace_Free> information->object_blocks[ block ] = NULL; ffc0b5e4: 81 3c 00 34 lwz r9,52(r28) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0b5e8: a1 7c 00 2c lhz r11,44(r28) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0b5ec: 7f c9 e9 2e stwx r30,r9,r29 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0b5f0: a0 1c 00 14 lhz r0,20(r28) * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; ffc0b5f4: 81 3c 00 30 lwz r9,48(r28) information->inactive -= information->allocation_size; ffc0b5f8: 7c 00 58 50 subf r0,r0,r11 return; } index_base += information->allocation_size; } } ffc0b5fc: 83 e1 00 14 lwz r31,20(r1) * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; ffc0b600: 7f c9 e9 2e stwx r30,r9,r29 information->inactive -= information->allocation_size; ffc0b604: b0 1c 00 2c sth r0,44(r28) return; } index_base += information->allocation_size; } } ffc0b608: 80 01 00 1c lwz r0,28(r1) ffc0b60c: 83 81 00 08 lwz r28,8(r1) ffc0b610: 7c 08 03 a6 mtlr r0 ffc0b614: 83 a1 00 0c lwz r29,12(r1) ffc0b618: 83 c1 00 10 lwz r30,16(r1) ffc0b61c: 38 21 00 18 addi r1,r1,24 ffc0b620: 4e 80 00 20 blr =============================================================================== ffc0bcc0 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0bcc0: 94 21 ff e8 stwu r1,-24(r1) ffc0bcc4: 7c 08 02 a6 mflr r0 ffc0bcc8: 93 c1 00 10 stw r30,16(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if(!the_node) return; ffc0bccc: 7c 9e 23 79 mr. r30,r4 */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0bcd0: 93 81 00 08 stw r28,8(r1) ffc0bcd4: 7c 7c 1b 78 mr r28,r3 ffc0bcd8: 90 01 00 1c stw r0,28(r1) ffc0bcdc: 93 a1 00 0c stw r29,12(r1) ffc0bce0: 93 e1 00 14 stw r31,20(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if(!the_node) return; ffc0bce4: 41 82 01 2c beq- ffc0be10 <_RBTree_Extract_unprotected+0x150> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { ffc0bce8: 80 03 00 08 lwz r0,8(r3) ffc0bcec: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0bcf0: 41 9e 01 74 beq- cr7,ffc0be64 <_RBTree_Extract_unprotected+0x1a4> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { ffc0bcf4: 80 1c 00 0c lwz r0,12(r28) ffc0bcf8: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0bcfc: 41 9e 01 34 beq- cr7,ffc0be30 <_RBTree_Extract_unprotected+0x170> * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { ffc0bd00: 83 fe 00 04 lwz r31,4(r30) ffc0bd04: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0bd08: 41 9e 01 44 beq- cr7,ffc0be4c <_RBTree_Extract_unprotected+0x18c> ffc0bd0c: 80 1e 00 08 lwz r0,8(r30) ffc0bd10: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bd14: 40 be 00 0c bne+ cr7,ffc0bd20 <_RBTree_Extract_unprotected+0x60> ffc0bd18: 48 00 01 60 b ffc0be78 <_RBTree_Extract_unprotected+0x1b8> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; ffc0bd1c: 7c 1f 03 78 mr r31,r0 ffc0bd20: 80 1f 00 08 lwz r0,8(r31) ffc0bd24: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bd28: 40 9e ff f4 bne+ cr7,ffc0bd1c <_RBTree_Extract_unprotected+0x5c> * target's position (target is the right child of target->parent) * when target vacates it. if there is no child, then target->parent * should become NULL. This may cause the coloring to be violated. * For now we store the color of the node being deleted in victim_color. */ leaf = target->child[RBT_LEFT]; ffc0bd2c: 83 bf 00 04 lwz r29,4(r31) if(leaf) { ffc0bd30: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0bd34: 41 9e 01 b4 beq- cr7,ffc0bee8 <_RBTree_Extract_unprotected+0x228><== ALWAYS TAKEN leaf->parent = target->parent; ffc0bd38: 80 1f 00 00 lwz r0,0(r31) <== NOT EXECUTED ffc0bd3c: 90 1d 00 00 stw r0,0(r29) <== NOT EXECUTED } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; ffc0bd40: 81 7f 00 00 lwz r11,0(r31) target->parent->child[dir] = leaf; /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; ffc0bd44: 81 3e 00 00 lwz r9,0(r30) } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; ffc0bd48: 80 0b 00 04 lwz r0,4(r11) leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; ffc0bd4c: 81 5f 00 10 lwz r10,16(r31) dir = target != target->parent->child[0]; ffc0bd50: 7f e0 02 78 xor r0,r31,r0 ffc0bd54: 7c 00 00 34 cntlzw r0,r0 ffc0bd58: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0bd5c: 68 00 00 01 xori r0,r0,1 target->parent->child[dir] = leaf; ffc0bd60: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0bd64: 7d 6b 02 14 add r11,r11,r0 ffc0bd68: 93 ab 00 04 stw r29,4(r11) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; ffc0bd6c: 80 09 00 04 lwz r0,4(r9) ffc0bd70: 7f c0 02 78 xor r0,r30,r0 ffc0bd74: 7c 00 00 34 cntlzw r0,r0 ffc0bd78: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0bd7c: 68 00 00 01 xori r0,r0,1 the_node->parent->child[dir] = target; ffc0bd80: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0bd84: 7d 29 02 14 add r9,r9,r0 ffc0bd88: 93 e9 00 04 stw r31,4(r9) /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; ffc0bd8c: 80 1e 00 08 lwz r0,8(r30) ffc0bd90: 90 1f 00 08 stw r0,8(r31) if (the_node->child[RBT_RIGHT]) ffc0bd94: 81 3e 00 08 lwz r9,8(r30) ffc0bd98: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bd9c: 41 9e 00 08 beq- cr7,ffc0bda4 <_RBTree_Extract_unprotected+0xe4><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; ffc0bda0: 93 e9 00 00 stw r31,0(r9) target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; ffc0bda4: 80 1e 00 04 lwz r0,4(r30) ffc0bda8: 90 1f 00 04 stw r0,4(r31) if (the_node->child[RBT_LEFT]) ffc0bdac: 81 3e 00 04 lwz r9,4(r30) ffc0bdb0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bdb4: 41 9e 00 08 beq- cr7,ffc0bdbc <_RBTree_Extract_unprotected+0xfc> the_node->child[RBT_LEFT]->parent = target; ffc0bdb8: 93 e9 00 00 stw r31,0(r9) /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; ffc0bdbc: 81 3e 00 00 lwz r9,0(r30) target->color = the_node->color; ffc0bdc0: 80 1e 00 10 lwz r0,16(r30) /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; ffc0bdc4: 91 3f 00 00 stw r9,0(r31) target->color = the_node->color; ffc0bdc8: 90 1f 00 10 stw r0,16(r31) * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node and the child is red. Paint child black. * 3. Deleted a black node and its child is black. This requires some * care and rotations. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ ffc0bdcc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0bdd0: 40 9e 00 20 bne- cr7,ffc0bdf0 <_RBTree_Extract_unprotected+0x130> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0bdd4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0bdd8: 41 9e 00 18 beq- cr7,ffc0bdf0 <_RBTree_Extract_unprotected+0x130> ffc0bddc: 80 1d 00 10 lwz r0,16(r29) ffc0bde0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0bde4: 41 9e 00 cc beq- cr7,ffc0beb0 <_RBTree_Extract_unprotected+0x1f0><== ALWAYS TAKEN if (_RBTree_Is_red(leaf)) leaf->color = RBT_BLACK; /* case 2 */ else if(leaf) _RBTree_Extract_validate_unprotected(leaf); /* case 3 */ ffc0bde8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0bdec: 4b ff fb 9d bl ffc0b988 <_RBTree_Extract_validate_unprotected><== NOT EXECUTED /* Wipe the_node */ _RBTree_Set_off_rbtree(the_node); /* set root to black, if it exists */ if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK; ffc0bdf0: 81 3c 00 04 lwz r9,4(r28) */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; ffc0bdf4: 38 00 00 00 li r0,0 ffc0bdf8: 90 1e 00 08 stw r0,8(r30) ffc0bdfc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0be00: 90 1e 00 04 stw r0,4(r30) ffc0be04: 90 1e 00 00 stw r0,0(r30) ffc0be08: 41 9e 00 08 beq- cr7,ffc0be10 <_RBTree_Extract_unprotected+0x150> ffc0be0c: 90 09 00 10 stw r0,16(r9) } ffc0be10: 80 01 00 1c lwz r0,28(r1) ffc0be14: 83 81 00 08 lwz r28,8(r1) ffc0be18: 7c 08 03 a6 mtlr r0 ffc0be1c: 83 a1 00 0c lwz r29,12(r1) ffc0be20: 83 c1 00 10 lwz r30,16(r1) ffc0be24: 83 e1 00 14 lwz r31,20(r1) ffc0be28: 38 21 00 18 addi r1,r1,24 ffc0be2c: 4e 80 00 20 blr the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) ffc0be30: 80 1e 00 04 lwz r0,4(r30) ffc0be34: 2f 80 00 00 cmpwi cr7,r0,0 ffc0be38: 41 9e 00 98 beq- cr7,ffc0bed0 <_RBTree_Extract_unprotected+0x210> the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; ffc0be3c: 90 1c 00 0c stw r0,12(r28) * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { ffc0be40: 83 fe 00 04 lwz r31,4(r30) ffc0be44: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0be48: 40 9e fe c4 bne+ cr7,ffc0bd0c <_RBTree_Extract_unprotected+0x4c> * the_node's location in the tree. This may cause the coloring to be * violated. We will fix it later. * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; ffc0be4c: 83 be 00 08 lwz r29,8(r30) if( leaf ) { ffc0be50: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0be54: 40 be 00 28 bne+ cr7,ffc0be7c <_RBTree_Extract_unprotected+0x1bc> leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); ffc0be58: 7f c3 f3 78 mr r3,r30 ffc0be5c: 4b ff fb 2d bl ffc0b988 <_RBTree_Extract_validate_unprotected> ffc0be60: 48 00 00 24 b ffc0be84 <_RBTree_Extract_unprotected+0x1c4> if(!the_node) return; /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) ffc0be64: 80 1e 00 08 lwz r0,8(r30) ffc0be68: 2f 80 00 00 cmpwi cr7,r0,0 ffc0be6c: 41 9e 00 4c beq- cr7,ffc0beb8 <_RBTree_Extract_unprotected+0x1f8> the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; ffc0be70: 90 1c 00 08 stw r0,8(r28) ffc0be74: 4b ff fe 80 b ffc0bcf4 <_RBTree_Extract_unprotected+0x34> * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { ffc0be78: 7f fd fb 78 mr r29,r31 * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; ffc0be7c: 80 1e 00 00 lwz r0,0(r30) ffc0be80: 90 1d 00 00 stw r0,0(r29) _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; ffc0be84: 81 3e 00 00 lwz r9,0(r30) leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; ffc0be88: 81 5e 00 10 lwz r10,16(r30) /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; ffc0be8c: 80 09 00 04 lwz r0,4(r9) ffc0be90: 7f c0 02 78 xor r0,r30,r0 ffc0be94: 7c 00 00 34 cntlzw r0,r0 ffc0be98: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0be9c: 68 00 00 01 xori r0,r0,1 the_node->parent->child[dir] = leaf; ffc0bea0: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0bea4: 7d 29 02 14 add r9,r9,r0 ffc0bea8: 93 a9 00 04 stw r29,4(r9) ffc0beac: 4b ff ff 20 b ffc0bdcc <_RBTree_Extract_unprotected+0x10c> * 3. Deleted a black node and its child is black. This requires some * care and rotations. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ if (_RBTree_Is_red(leaf)) leaf->color = RBT_BLACK; /* case 2 */ ffc0beb0: 91 5d 00 10 stw r10,16(r29) ffc0beb4: 4b ff ff 3c b ffc0bdf0 <_RBTree_Extract_unprotected+0x130> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; ffc0beb8: 81 3e 00 00 lwz r9,0(r30) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc0bebc: 7f 83 48 00 cmpw cr7,r3,r9 /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; ffc0bec0: 91 23 00 08 stw r9,8(r3) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc0bec4: 40 9e fe 30 bne+ cr7,ffc0bcf4 <_RBTree_Extract_unprotected+0x34> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; ffc0bec8: 90 1c 00 08 stw r0,8(r28) ffc0becc: 4b ff fe 28 b ffc0bcf4 <_RBTree_Extract_unprotected+0x34> /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; ffc0bed0: 81 3e 00 00 lwz r9,0(r30) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc0bed4: 7f 9c 48 00 cmpw cr7,r28,r9 /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; ffc0bed8: 91 3c 00 0c stw r9,12(r28) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc0bedc: 40 9e fe 24 bne+ cr7,ffc0bd00 <_RBTree_Extract_unprotected+0x40> the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; ffc0bee0: 90 1c 00 0c stw r0,12(r28) ffc0bee4: 4b ff ff 5c b ffc0be40 <_RBTree_Extract_unprotected+0x180> leaf = target->child[RBT_LEFT]; if(leaf) { leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); ffc0bee8: 7f e3 fb 78 mr r3,r31 ffc0beec: 4b ff fa 9d bl ffc0b988 <_RBTree_Extract_validate_unprotected> ffc0bef0: 4b ff fe 50 b ffc0bd40 <_RBTree_Extract_unprotected+0x80> =============================================================================== ffc0b988 <_RBTree_Extract_validate_unprotected>: ) { RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; ffc0b988: 81 63 00 00 lwz r11,0(r3) if(!parent->parent) return; ffc0b98c: 80 0b 00 00 lwz r0,0(r11) ffc0b990: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b994: 4d 9e 00 20 beqlr cr7 { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) ffc0b998: 81 2b 00 04 lwz r9,4(r11) ffc0b99c: 2f 03 00 00 cmpwi cr6,r3,0 ffc0b9a0: 7f 83 48 00 cmpw cr7,r3,r9 ffc0b9a4: 41 9e 03 14 beq- cr7,ffc0bcb8 <_RBTree_Extract_validate_unprotected+0x330> /* sibling is black, see if both of its children are also black. */ if (sibling && !_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; ffc0b9a8: 38 a0 00 01 li r5,1 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0b9ac: 38 80 00 00 li r4,0 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0b9b0: 41 9a 00 10 beq- cr6,ffc0b9c0 <_RBTree_Extract_validate_unprotected+0x38><== NEVER TAKEN ffc0b9b4: 80 03 00 10 lwz r0,16(r3) ffc0b9b8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b9bc: 41 9e 01 44 beq- cr7,ffc0bb00 <_RBTree_Extract_validate_unprotected+0x178> if(!parent->parent) return; sibling = _RBTree_Sibling(the_node); /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { ffc0b9c0: 81 4b 00 00 lwz r10,0(r11) ffc0b9c4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b9c8: 41 9e 01 38 beq- cr7,ffc0bb00 <_RBTree_Extract_validate_unprotected+0x178> ffc0b9cc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b9d0: 41 be ff e0 beq- cr7,ffc0b9b0 <_RBTree_Extract_validate_unprotected+0x28><== NEVER TAKEN ffc0b9d4: 80 09 00 10 lwz r0,16(r9) ffc0b9d8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b9dc: 41 9e 00 78 beq- cr7,ffc0ba54 <_RBTree_Extract_validate_unprotected+0xcc> sibling = parent->child[!dir]; } /* sibling is black, see if both of its children are also black. */ if (sibling && !_RBTree_Is_red(sibling->child[RBT_RIGHT]) && ffc0b9e0: 81 49 00 08 lwz r10,8(r9) ffc0b9e4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b9e8: 41 9e 00 10 beq- cr7,ffc0b9f8 <_RBTree_Extract_validate_unprotected+0x70> ffc0b9ec: 80 0a 00 10 lwz r0,16(r10) ffc0b9f0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b9f4: 41 9e 01 5c beq- cr7,ffc0bb50 <_RBTree_Extract_validate_unprotected+0x1c8> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { ffc0b9f8: 81 49 00 04 lwz r10,4(r9) ffc0b9fc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ba00: 41 9e 00 10 beq- cr7,ffc0ba10 <_RBTree_Extract_validate_unprotected+0x88> ffc0ba04: 80 0a 00 10 lwz r0,16(r10) ffc0ba08: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ba0c: 41 9e 01 44 beq- cr7,ffc0bb50 <_RBTree_Extract_validate_unprotected+0x1c8> sibling->color = RBT_RED; ffc0ba10: 90 a9 00 10 stw r5,16(r9) ffc0ba14: 80 0b 00 10 lwz r0,16(r11) ffc0ba18: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ba1c: 41 9e 00 dc beq- cr7,ffc0baf8 <_RBTree_Extract_validate_unprotected+0x170> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; ffc0ba20: 81 4b 00 00 lwz r10,0(r11) RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0ba24: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ba28: 41 9e 00 f0 beq- cr7,ffc0bb18 <_RBTree_Extract_validate_unprotected+0x190><== NEVER TAKEN if(!(the_node->parent->parent)) return NULL; ffc0ba2c: 80 0a 00 00 lwz r0,0(r10) ffc0ba30: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ba34: 41 9e 00 f8 beq- cr7,ffc0bb2c <_RBTree_Extract_validate_unprotected+0x1a4> if(the_node == the_node->parent->child[RBT_LEFT]) ffc0ba38: 81 2a 00 04 lwz r9,4(r10) return the_node->parent->child[RBT_RIGHT]; ffc0ba3c: 7d 63 5b 78 mr r3,r11 { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) ffc0ba40: 7f 8b 48 00 cmpw cr7,r11,r9 ffc0ba44: 41 9e 00 fc beq- cr7,ffc0bb40 <_RBTree_Extract_validate_unprotected+0x1b8> ffc0ba48: 2f 0b 00 00 cmpwi cr6,r11,0 ffc0ba4c: 7d 4b 53 78 mr r11,r10 ffc0ba50: 4b ff ff 60 b ffc0b9b0 <_RBTree_Extract_validate_unprotected+0x28> * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; ffc0ba54: 81 0b 00 04 lwz r8,4(r11) * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; ffc0ba58: 90 0b 00 10 stw r0,16(r11) sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; ffc0ba5c: 7c 60 42 78 xor r0,r3,r8 ffc0ba60: 7c 00 00 34 cntlzw r0,r0 * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; ffc0ba64: 90 89 00 10 stw r4,16(r9) dir = the_node != parent->child[0]; ffc0ba68: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0ba6c: 68 00 00 01 xori r0,r0,1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc0ba70: 20 e0 00 01 subfic r7,r0,1 ffc0ba74: 54 e7 10 3a rlwinm r7,r7,2,0,29 ffc0ba78: 7c eb 3a 14 add r7,r11,r7 ffc0ba7c: 81 07 00 04 lwz r8,4(r7) ffc0ba80: 2f 88 00 00 cmpwi cr7,r8,0 ffc0ba84: 41 9e 00 58 beq- cr7,ffc0badc <_RBTree_Extract_validate_unprotected+0x154><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc0ba88: 54 09 10 3a rlwinm r9,r0,2,0,29 ffc0ba8c: 7c c8 4a 14 add r6,r8,r9 ffc0ba90: 81 86 00 04 lwz r12,4(r6) ffc0ba94: 91 87 00 04 stw r12,4(r7) if (c->child[dir]) ffc0ba98: 80 e6 00 04 lwz r7,4(r6) ffc0ba9c: 2f 87 00 00 cmpwi cr7,r7,0 ffc0baa0: 41 9e 00 0c beq- cr7,ffc0baac <_RBTree_Extract_validate_unprotected+0x124><== NEVER TAKEN c->child[dir]->parent = the_node; ffc0baa4: 91 67 00 00 stw r11,0(r7) ffc0baa8: 81 4b 00 00 lwz r10,0(r11) c->child[dir] = the_node; ffc0baac: 7d 28 4a 14 add r9,r8,r9 the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; ffc0bab0: 91 48 00 00 stw r10,0(r8) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0bab4: 91 69 00 04 stw r11,4(r9) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bab8: 81 2a 00 04 lwz r9,4(r10) c->parent = the_node->parent; the_node->parent = c; ffc0babc: 91 0b 00 00 stw r8,0(r11) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bac0: 7d 69 4a 78 xor r9,r11,r9 ffc0bac4: 7d 29 00 34 cntlzw r9,r9 ffc0bac8: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0bacc: 69 29 00 01 xori r9,r9,1 ffc0bad0: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0bad4: 7d 4a 4a 14 add r10,r10,r9 ffc0bad8: 91 0a 00 04 stw r8,4(r10) _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; ffc0badc: 68 00 00 01 xori r0,r0,1 ffc0bae0: 54 09 10 3a rlwinm r9,r0,2,0,29 ffc0bae4: 7d 2b 4a 14 add r9,r11,r9 ffc0bae8: 81 29 00 04 lwz r9,4(r9) } /* sibling is black, see if both of its children are also black. */ if (sibling && ffc0baec: 2f 89 00 00 cmpwi cr7,r9,0 ffc0baf0: 40 9e fe f0 bne+ cr7,ffc0b9e0 <_RBTree_Extract_validate_unprotected+0x58><== ALWAYS TAKEN ffc0baf4: 4b ff fe bc b ffc0b9b0 <_RBTree_Extract_validate_unprotected+0x28><== NOT EXECUTED !_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; ffc0baf8: 38 00 00 00 li r0,0 ffc0bafc: 90 0b 00 10 stw r0,16(r11) sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc0bb00: 81 23 00 00 lwz r9,0(r3) ffc0bb04: 80 09 00 00 lwz r0,0(r9) ffc0bb08: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bb0c: 4c be 00 20 bnelr+ cr7 ffc0bb10: 90 03 00 10 stw r0,16(r3) ffc0bb14: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0bb18: 7d 63 5b 78 mr r3,r11 <== NOT EXECUTED ffc0bb1c: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc0bb20: 39 60 00 00 li r11,0 <== NOT EXECUTED ffc0bb24: 2f 03 00 00 cmpwi cr6,r3,0 <== NOT EXECUTED ffc0bb28: 4b ff fe 88 b ffc0b9b0 <_RBTree_Extract_validate_unprotected+0x28><== NOT EXECUTED if(!(the_node->parent->parent)) return NULL; ffc0bb2c: 7d 63 5b 78 mr r3,r11 ffc0bb30: 39 20 00 00 li r9,0 ffc0bb34: 7d 4b 53 78 mr r11,r10 ffc0bb38: 2f 03 00 00 cmpwi cr6,r3,0 ffc0bb3c: 4b ff fe 74 b ffc0b9b0 <_RBTree_Extract_validate_unprotected+0x28> if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; ffc0bb40: 81 2a 00 08 lwz r9,8(r10) ffc0bb44: 7d 4b 53 78 mr r11,r10 ffc0bb48: 2f 03 00 00 cmpwi cr6,r3,0 ffc0bb4c: 4b ff fe 64 b ffc0b9b0 <_RBTree_Extract_validate_unprotected+0x28> * cases, either the_node is to the left or the right of the parent. * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; ffc0bb50: 80 0b 00 04 lwz r0,4(r11) ffc0bb54: 7c 60 02 78 xor r0,r3,r0 ffc0bb58: 7c 00 00 34 cntlzw r0,r0 ffc0bb5c: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0bb60: 68 00 00 01 xori r0,r0,1 if (!_RBTree_Is_red(sibling->child[!dir])) { ffc0bb64: 68 07 00 01 xori r7,r0,1 ffc0bb68: 54 e7 10 3a rlwinm r7,r7,2,0,29 ffc0bb6c: 7d 49 3a 14 add r10,r9,r7 ffc0bb70: 81 0a 00 04 lwz r8,4(r10) */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0bb74: 2f 88 00 00 cmpwi cr7,r8,0 ffc0bb78: 41 9e 00 10 beq- cr7,ffc0bb88 <_RBTree_Extract_validate_unprotected+0x200> ffc0bb7c: 81 48 00 10 lwz r10,16(r8) ffc0bb80: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0bb84: 41 9e 00 a0 beq- cr7,ffc0bc24 <_RBTree_Extract_validate_unprotected+0x29c> sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); ffc0bb88: 68 06 00 01 xori r6,r0,1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc0bb8c: 21 06 00 01 subfic r8,r6,1 ffc0bb90: 55 08 10 3a rlwinm r8,r8,2,0,29 ffc0bb94: 7d 09 42 14 add r8,r9,r8 ffc0bb98: 81 48 00 04 lwz r10,4(r8) * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; ffc0bb9c: 54 05 10 3a rlwinm r5,r0,2,0,29 ffc0bba0: 7c a9 2a 14 add r5,r9,r5 ffc0bba4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0bba8: 80 a5 00 04 lwz r5,4(r5) * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; ffc0bbac: 38 80 00 01 li r4,1 ffc0bbb0: 90 89 00 10 stw r4,16(r9) sibling->child[dir]->color = RBT_BLACK; ffc0bbb4: 38 80 00 00 li r4,0 ffc0bbb8: 90 85 00 10 stw r4,16(r5) ffc0bbbc: 41 9e 00 58 beq- cr7,ffc0bc14 <_RBTree_Extract_validate_unprotected+0x28c><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc0bbc0: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc0bbc4: 7c aa 32 14 add r5,r10,r6 ffc0bbc8: 80 85 00 04 lwz r4,4(r5) ffc0bbcc: 90 88 00 04 stw r4,4(r8) if (c->child[dir]) ffc0bbd0: 81 05 00 04 lwz r8,4(r5) ffc0bbd4: 2f 88 00 00 cmpwi cr7,r8,0 ffc0bbd8: 41 9e 00 08 beq- cr7,ffc0bbe0 <_RBTree_Extract_validate_unprotected+0x258> c->child[dir]->parent = the_node; ffc0bbdc: 91 28 00 00 stw r9,0(r8) c->child[dir] = the_node; ffc0bbe0: 7d 0a 32 14 add r8,r10,r6 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bbe4: 80 c9 00 00 lwz r6,0(r9) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0bbe8: 91 28 00 04 stw r9,4(r8) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bbec: 81 06 00 04 lwz r8,4(r6) c->parent = the_node->parent; ffc0bbf0: 90 ca 00 00 stw r6,0(r10) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bbf4: 7d 28 42 78 xor r8,r9,r8 ffc0bbf8: 7d 08 00 34 cntlzw r8,r8 c->parent = the_node->parent; the_node->parent = c; ffc0bbfc: 91 49 00 00 stw r10,0(r9) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bc00: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc0bc04: 69 08 00 01 xori r8,r8,1 ffc0bc08: 55 08 10 3a rlwinm r8,r8,2,0,29 ffc0bc0c: 7c c6 42 14 add r6,r6,r8 ffc0bc10: 91 46 00 04 stw r10,4(r6) _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; ffc0bc14: 7d 2b 3a 14 add r9,r11,r7 ffc0bc18: 81 29 00 04 lwz r9,4(r9) ffc0bc1c: 7c e9 3a 14 add r7,r9,r7 ffc0bc20: 81 07 00 04 lwz r8,4(r7) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc0bc24: 20 c0 00 01 subfic r6,r0,1 } sibling->color = parent->color; ffc0bc28: 80 ab 00 10 lwz r5,16(r11) ffc0bc2c: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc0bc30: 7c cb 32 14 add r6,r11,r6 ffc0bc34: 90 a9 00 10 stw r5,16(r9) parent->color = RBT_BLACK; ffc0bc38: 38 e0 00 00 li r7,0 ffc0bc3c: 81 46 00 04 lwz r10,4(r6) ffc0bc40: 90 eb 00 10 stw r7,16(r11) ffc0bc44: 2f 8a 00 00 cmpwi cr7,r10,0 sibling->child[!dir]->color = RBT_BLACK; ffc0bc48: 90 e8 00 10 stw r7,16(r8) ffc0bc4c: 41 be fe b4 beq- cr7,ffc0bb00 <_RBTree_Extract_validate_unprotected+0x178><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc0bc50: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0bc54: 7d 2a 02 14 add r9,r10,r0 ffc0bc58: 81 09 00 04 lwz r8,4(r9) ffc0bc5c: 91 06 00 04 stw r8,4(r6) if (c->child[dir]) ffc0bc60: 81 29 00 04 lwz r9,4(r9) ffc0bc64: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bc68: 41 9e 00 08 beq- cr7,ffc0bc70 <_RBTree_Extract_validate_unprotected+0x2e8> c->child[dir]->parent = the_node; ffc0bc6c: 91 69 00 00 stw r11,0(r9) c->child[dir] = the_node; ffc0bc70: 7d 0a 02 14 add r8,r10,r0 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bc74: 81 2b 00 00 lwz r9,0(r11) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0bc78: 91 68 00 04 stw r11,4(r8) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bc7c: 80 09 00 04 lwz r0,4(r9) c->parent = the_node->parent; ffc0bc80: 91 2a 00 00 stw r9,0(r10) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bc84: 7d 60 02 78 xor r0,r11,r0 ffc0bc88: 7c 00 00 34 cntlzw r0,r0 c->parent = the_node->parent; the_node->parent = c; ffc0bc8c: 91 4b 00 00 stw r10,0(r11) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bc90: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0bc94: 68 00 00 01 xori r0,r0,1 ffc0bc98: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0bc9c: 7d 29 02 14 add r9,r9,r0 ffc0bca0: 91 49 00 04 stw r10,4(r9) _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc0bca4: 81 23 00 00 lwz r9,0(r3) ffc0bca8: 80 09 00 00 lwz r0,0(r9) ffc0bcac: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bcb0: 4c be 00 20 bnelr+ cr7 ffc0bcb4: 4b ff fe 5c b ffc0bb10 <_RBTree_Extract_validate_unprotected+0x188><== NOT EXECUTED if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; ffc0bcb8: 81 2b 00 08 lwz r9,8(r11) ffc0bcbc: 4b ff fc ec b ffc0b9a8 <_RBTree_Extract_validate_unprotected+0x20> =============================================================================== ffc0bf78 <_RBTree_Find>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0bf78: 7d 20 00 a6 mfmsr r9 ffc0bf7c: 7c 10 42 a6 mfsprg r0,0 ffc0bf80: 7d 20 00 78 andc r0,r9,r0 ffc0bf84: 7c 00 01 24 mtmsr r0 return_node = NULL; _ISR_Disable( level ); return_node = _RBTree_Find_unprotected( the_rbtree, the_value ); _ISR_Enable( level ); return return_node; } ffc0bf88: 80 63 00 04 lwz r3,4(r3) RBTree_Control *the_rbtree, unsigned int the_value ) { RBTree_Node* iter_node = the_rbtree->root; while (iter_node) { ffc0bf8c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bf90: 40 be 00 28 bne+ cr7,ffc0bfb8 <_RBTree_Find+0x40> <== ALWAYS TAKEN ffc0bf94: 48 00 00 30 b ffc0bfc4 <_RBTree_Find+0x4c> <== NOT EXECUTED if (the_value == iter_node->value) return(iter_node); RBTree_Direction dir = the_value > iter_node->value; ffc0bf98: 7c 04 00 10 subfc r0,r4,r0 ffc0bf9c: 7c 00 01 10 subfe r0,r0,r0 ffc0bfa0: 7c 00 00 d0 neg r0,r0 iter_node = iter_node->child[dir]; ffc0bfa4: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0bfa8: 7c 63 02 14 add r3,r3,r0 ffc0bfac: 80 63 00 04 lwz r3,4(r3) RBTree_Control *the_rbtree, unsigned int the_value ) { RBTree_Node* iter_node = the_rbtree->root; while (iter_node) { ffc0bfb0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bfb4: 41 9e 00 10 beq- cr7,ffc0bfc4 <_RBTree_Find+0x4c> <== NEVER TAKEN if (the_value == iter_node->value) return(iter_node); ffc0bfb8: 80 03 00 0c lwz r0,12(r3) ffc0bfbc: 7f 84 00 00 cmpw cr7,r4,r0 ffc0bfc0: 40 9e ff d8 bne+ cr7,ffc0bf98 <_RBTree_Find+0x20> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0bfc4: 7d 20 01 24 mtmsr r9 ffc0bfc8: 4e 80 00 20 blr =============================================================================== ffc0bf30 <_RBTree_Find_header>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0bf30: 7d 60 00 a6 mfmsr r11 ffc0bf34: 7c 10 42 a6 mfsprg r0,0 ffc0bf38: 7d 60 00 78 andc r0,r11,r0 ffc0bf3c: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; ffc0bf40: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bf44: 39 20 00 00 li r9,0 ffc0bf48: 41 9e 00 24 beq- cr7,ffc0bf6c <_RBTree_Find_header+0x3c><== NEVER TAKEN if(!(the_node->parent)) return NULL; ffc0bf4c: 81 23 00 00 lwz r9,0(r3) ffc0bf50: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bf54: 40 be 00 0c bne+ cr7,ffc0bf60 <_RBTree_Find_header+0x30><== ALWAYS TAKEN ffc0bf58: 48 00 00 14 b ffc0bf6c <_RBTree_Find_header+0x3c> <== NOT EXECUTED while(the_node->parent) the_node = the_node->parent; ffc0bf5c: 7c 09 03 78 mr r9,r0 RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0bf60: 80 09 00 00 lwz r0,0(r9) while(the_node->parent) the_node = the_node->parent; ffc0bf64: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bf68: 40 9e ff f4 bne+ cr7,ffc0bf5c <_RBTree_Find_header+0x2c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0bf6c: 7d 60 01 24 mtmsr r11 return_header = NULL; _ISR_Disable( level ); return_header = _RBTree_Find_header_unprotected( the_node ); _ISR_Enable( level ); return return_header; } ffc0bf70: 7d 23 4b 78 mr r3,r9 ffc0bf74: 4e 80 00 20 blr =============================================================================== ffc0c1ec <_RBTree_Insert_unprotected>: RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { if(!the_node) return (RBTree_Node*)-1; ffc0c1ec: 2c 04 00 00 cmpwi r4,0 */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0c1f0: 94 21 ff f8 stwu r1,-8(r1) ffc0c1f4: 7c 08 02 a6 mflr r0 if(!the_node) return (RBTree_Node*)-1; ffc0c1f8: 39 20 ff ff li r9,-1 */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0c1fc: 90 01 00 0c stw r0,12(r1) if(!the_node) return (RBTree_Node*)-1; ffc0c200: 41 82 00 4c beq- ffc0c24c <_RBTree_Insert_unprotected+0x60><== NEVER TAKEN RBTree_Node *iter_node = the_rbtree->root; ffc0c204: 81 23 00 04 lwz r9,4(r3) if (!iter_node) { /* special case: first node inserted */ ffc0c208: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c20c: 41 9e 00 a4 beq- cr7,ffc0c2b0 <_RBTree_Insert_unprotected+0xc4> the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { the_rbtree->first[dir] = the_node; ffc0c210: 81 04 00 0c lwz r8,12(r4) ffc0c214: 48 00 00 14 b ffc0c228 <_RBTree_Insert_unprotected+0x3c> } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { if(the_node->value == iter_node->value) return(iter_node); RBTree_Direction dir = the_node->value > iter_node->value; if (!iter_node->child[dir]) { ffc0c218: 81 6a 00 04 lwz r11,4(r10) ffc0c21c: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0c220: 41 9e 00 40 beq- cr7,ffc0c260 <_RBTree_Insert_unprotected+0x74> ffc0c224: 7d 69 5b 78 mr r9,r11 the_node->parent = (RBTree_Node *) the_rbtree; the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { if(the_node->value == iter_node->value) return(iter_node); ffc0c228: 81 69 00 0c lwz r11,12(r9) ffc0c22c: 7f 88 58 00 cmpw cr7,r8,r11 RBTree_Direction dir = the_node->value > iter_node->value; ffc0c230: 7c 08 58 10 subfc r0,r8,r11 ffc0c234: 7c 00 01 10 subfe r0,r0,r0 ffc0c238: 7c 00 00 d0 neg r0,r0 if (!iter_node->child[dir]) { ffc0c23c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c240: 7d 49 02 14 add r10,r9,r0 ffc0c244: 38 ea 00 04 addi r7,r10,4 the_node->parent = (RBTree_Node *) the_rbtree; the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { if(the_node->value == iter_node->value) return(iter_node); ffc0c248: 40 9e ff d0 bne+ cr7,ffc0c218 <_RBTree_Insert_unprotected+0x2c> /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } ffc0c24c: 80 01 00 0c lwz r0,12(r1) ffc0c250: 7d 23 4b 78 mr r3,r9 ffc0c254: 38 21 00 08 addi r1,r1,8 ffc0c258: 7c 08 03 a6 mtlr r0 ffc0c25c: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; ffc0c260: 7c 63 02 14 add r3,r3,r0 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { ffc0c264: 80 03 00 08 lwz r0,8(r3) /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { if(the_node->value == iter_node->value) return(iter_node); RBTree_Direction dir = the_node->value > iter_node->value; if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; ffc0c268: 91 64 00 08 stw r11,8(r4) the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { ffc0c26c: 7f 89 00 00 cmpw cr7,r9,r0 while (iter_node) { if(the_node->value == iter_node->value) return(iter_node); RBTree_Direction dir = the_node->value > iter_node->value; if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; ffc0c270: 38 00 00 01 li r0,1 /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { if(the_node->value == iter_node->value) return(iter_node); RBTree_Direction dir = the_node->value > iter_node->value; if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; ffc0c274: 91 64 00 04 stw r11,4(r4) the_node->color = RBT_RED; ffc0c278: 90 04 00 10 stw r0,16(r4) iter_node->child[dir] = the_node; ffc0c27c: 90 87 00 00 stw r4,0(r7) the_node->parent = iter_node; ffc0c280: 91 24 00 00 stw r9,0(r4) /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { ffc0c284: 41 9e 00 24 beq- cr7,ffc0c2a8 <_RBTree_Insert_unprotected+0xbc> } } /* while(iter_node) */ /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); ffc0c288: 7c 83 23 78 mr r3,r4 ffc0c28c: 4b ff fd 99 bl ffc0c024 <_RBTree_Validate_insert_unprotected> } return (RBTree_Node*)0; } ffc0c290: 80 01 00 0c lwz r0,12(r1) } /* while(iter_node) */ /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; ffc0c294: 39 20 00 00 li r9,0 } ffc0c298: 7c 08 03 a6 mtlr r0 ffc0c29c: 7d 23 4b 78 mr r3,r9 ffc0c2a0: 38 21 00 08 addi r1,r1,8 ffc0c2a4: 4e 80 00 20 blr the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { the_rbtree->first[dir] = the_node; ffc0c2a8: 90 83 00 08 stw r4,8(r3) ffc0c2ac: 4b ff ff dc b ffc0c288 <_RBTree_Insert_unprotected+0x9c> if(!the_node) return (RBTree_Node*)-1; RBTree_Node *iter_node = the_rbtree->root; if (!iter_node) { /* special case: first node inserted */ the_node->color = RBT_BLACK; ffc0c2b0: 91 24 00 10 stw r9,16(r4) the_rbtree->root = the_node; ffc0c2b4: 90 83 00 04 stw r4,4(r3) the_rbtree->first[0] = the_rbtree->first[1] = the_node; ffc0c2b8: 90 83 00 0c stw r4,12(r3) ffc0c2bc: 90 83 00 08 stw r4,8(r3) the_node->parent = (RBTree_Node *) the_rbtree; ffc0c2c0: 90 64 00 00 stw r3,0(r4) the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; ffc0c2c4: 91 24 00 08 stw r9,8(r4) ffc0c2c8: 91 24 00 04 stw r9,4(r4) ffc0c2cc: 4b ff ff 80 b ffc0c24c <_RBTree_Insert_unprotected+0x60> =============================================================================== ffc0c024 <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { ffc0c024: 94 21 ff f0 stwu r1,-16(r1) /* ensure node is on the same branch direction as parent */ if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; ffc0c028: 38 a0 00 00 li r5,0 g->color = RBT_RED; ffc0c02c: 39 80 00 01 li r12,1 * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { ffc0c030: 93 e1 00 0c stw r31,12(r1) ISR_Level level; _ISR_Disable( level ); _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } ffc0c034: 81 23 00 00 lwz r9,0(r3) */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; ffc0c038: 81 69 00 00 lwz r11,0(r9) ffc0c03c: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0c040: 7d 68 5b 78 mr r8,r11 ffc0c044: 41 9e 01 70 beq- cr7,ffc0c1b4 <_RBTree_Validate_insert_unprotected+0x190> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0c048: 80 09 00 10 lwz r0,16(r9) ffc0c04c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c050: 41 9e 00 10 beq- cr7,ffc0c060 <_RBTree_Validate_insert_unprotected+0x3c> /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; } ffc0c054: 83 e1 00 0c lwz r31,12(r1) ffc0c058: 38 21 00 10 addi r1,r1,16 ffc0c05c: 4e 80 00 20 blr ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(!(the_node->parent->parent->parent)) return NULL; ffc0c060: 80 0b 00 00 lwz r0,0(r11) ffc0c064: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c068: 80 0b 00 04 lwz r0,4(r11) ffc0c06c: 41 9e 00 24 beq- cr7,ffc0c090 <_RBTree_Validate_insert_unprotected+0x6c><== NEVER TAKEN { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) ffc0c070: 7f 89 00 00 cmpw cr7,r9,r0 ffc0c074: 7c 0a 03 78 mr r10,r0 ffc0c078: 41 9e 01 6c beq- cr7,ffc0c1e4 <_RBTree_Validate_insert_unprotected+0x1c0> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0c07c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c080: 41 9e 00 10 beq- cr7,ffc0c090 <_RBTree_Validate_insert_unprotected+0x6c> ffc0c084: 80 ea 00 10 lwz r7,16(r10) ffc0c088: 2f 87 00 01 cmpwi cr7,r7,1 ffc0c08c: 41 9e 01 38 beq- cr7,ffc0c1c4 <_RBTree_Validate_insert_unprotected+0x1a0> the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; ffc0c090: 81 49 00 04 lwz r10,4(r9) RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0c094: 7d 20 02 78 xor r0,r9,r0 ffc0c098: 7c 00 00 34 cntlzw r0,r0 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; ffc0c09c: 7c 6a 52 78 xor r10,r3,r10 ffc0c0a0: 7d 4a 00 34 cntlzw r10,r10 ffc0c0a4: 55 4a d9 7e rlwinm r10,r10,27,5,31 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0c0a8: 54 00 d9 7e rlwinm r0,r0,27,5,31 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; ffc0c0ac: 69 4a 00 01 xori r10,r10,1 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0c0b0: 68 00 00 01 xori r0,r0,1 /* ensure node is on the same branch direction as parent */ if (dir != pdir) { ffc0c0b4: 7f 8a 00 00 cmpw cr7,r10,r0 ffc0c0b8: 41 9e 01 20 beq- cr7,ffc0c1d8 <_RBTree_Validate_insert_unprotected+0x1b4> RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc0c0bc: 20 c0 00 01 subfic r6,r0,1 ffc0c0c0: 54 ca 10 3a rlwinm r10,r6,2,0,29 ffc0c0c4: 7d 49 52 14 add r10,r9,r10 ffc0c0c8: 80 ea 00 04 lwz r7,4(r10) ffc0c0cc: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c0d0: 2f 87 00 00 cmpwi cr7,r7,0 ffc0c0d4: 41 9e 00 54 beq- cr7,ffc0c128 <_RBTree_Validate_insert_unprotected+0x104><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc0c0d8: 7c 87 02 14 add r4,r7,r0 ffc0c0dc: 83 e4 00 04 lwz r31,4(r4) ffc0c0e0: 93 ea 00 04 stw r31,4(r10) if (c->child[dir]) ffc0c0e4: 81 44 00 04 lwz r10,4(r4) ffc0c0e8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c0ec: 41 9e 00 0c beq- cr7,ffc0c0f8 <_RBTree_Validate_insert_unprotected+0xd4> c->child[dir]->parent = the_node; ffc0c0f0: 91 2a 00 00 stw r9,0(r10) ffc0c0f4: 81 69 00 00 lwz r11,0(r9) c->child[dir] = the_node; ffc0c0f8: 7d 47 02 14 add r10,r7,r0 the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; ffc0c0fc: 91 67 00 00 stw r11,0(r7) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0c100: 91 2a 00 04 stw r9,4(r10) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c104: 81 4b 00 04 lwz r10,4(r11) c->parent = the_node->parent; the_node->parent = c; ffc0c108: 90 e9 00 00 stw r7,0(r9) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c10c: 7d 2a 52 78 xor r10,r9,r10 ffc0c110: 7d 4a 00 34 cntlzw r10,r10 ffc0c114: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc0c118: 69 4a 00 01 xori r10,r10,1 ffc0c11c: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc0c120: 7d 6b 52 14 add r11,r11,r10 ffc0c124: 90 eb 00 04 stw r7,4(r11) _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; ffc0c128: 7c 63 02 14 add r3,r3,r0 ffc0c12c: 80 63 00 04 lwz r3,4(r3) ffc0c130: 81 23 00 00 lwz r9,0(r3) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc0c134: 7d 48 02 14 add r10,r8,r0 } the_node->parent->color = RBT_BLACK; ffc0c138: 90 a9 00 10 stw r5,16(r9) ffc0c13c: 81 6a 00 04 lwz r11,4(r10) g->color = RBT_RED; ffc0c140: 91 88 00 10 stw r12,16(r8) ffc0c144: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0c148: 41 be fe ec beq- cr7,ffc0c034 <_RBTree_Validate_insert_unprotected+0x10><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc0c14c: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc0c150: 7d 2b 32 14 add r9,r11,r6 ffc0c154: 80 09 00 04 lwz r0,4(r9) ffc0c158: 90 0a 00 04 stw r0,4(r10) if (c->child[dir]) ffc0c15c: 81 29 00 04 lwz r9,4(r9) ffc0c160: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c164: 41 9e 00 08 beq- cr7,ffc0c16c <_RBTree_Validate_insert_unprotected+0x148> c->child[dir]->parent = the_node; ffc0c168: 91 09 00 00 stw r8,0(r9) c->child[dir] = the_node; ffc0c16c: 7c cb 32 14 add r6,r11,r6 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c170: 81 28 00 00 lwz r9,0(r8) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0c174: 91 06 00 04 stw r8,4(r6) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c178: 80 09 00 04 lwz r0,4(r9) c->parent = the_node->parent; ffc0c17c: 91 2b 00 00 stw r9,0(r11) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c180: 7d 00 02 78 xor r0,r8,r0 ffc0c184: 7c 00 00 34 cntlzw r0,r0 c->parent = the_node->parent; the_node->parent = c; ffc0c188: 91 68 00 00 stw r11,0(r8) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c18c: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0c190: 68 00 00 01 xori r0,r0,1 ffc0c194: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c198: 7d 29 02 14 add r9,r9,r0 ffc0c19c: 91 69 00 04 stw r11,4(r9) ISR_Level level; _ISR_Disable( level ); _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } ffc0c1a0: 81 23 00 00 lwz r9,0(r3) */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; ffc0c1a4: 81 69 00 00 lwz r11,0(r9) ffc0c1a8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0c1ac: 7d 68 5b 78 mr r8,r11 ffc0c1b0: 40 9e fe 98 bne+ cr7,ffc0c048 <_RBTree_Validate_insert_unprotected+0x24><== ALWAYS TAKEN /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; } ffc0c1b4: 83 e1 00 0c lwz r31,12(r1) ffc0c1b8: 38 21 00 10 addi r1,r1,16 /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc0c1bc: 91 63 00 10 stw r11,16(r3) } ffc0c1c0: 4e 80 00 20 blr u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; ffc0c1c4: 90 a9 00 10 stw r5,16(r9) u->color = RBT_BLACK; g->color = RBT_RED; ffc0c1c8: 7d 63 5b 78 mr r3,r11 g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; ffc0c1cc: 90 aa 00 10 stw r5,16(r10) g->color = RBT_RED; ffc0c1d0: 90 eb 00 10 stw r7,16(r11) ffc0c1d4: 4b ff fe 60 b ffc0c034 <_RBTree_Validate_insert_unprotected+0x10> } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { ffc0c1d8: 20 ca 00 01 subfic r6,r10,1 ffc0c1dc: 55 40 10 3a rlwinm r0,r10,2,0,29 ffc0c1e0: 4b ff ff 54 b ffc0c134 <_RBTree_Validate_insert_unprotected+0x110> if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; ffc0c1e4: 81 4b 00 08 lwz r10,8(r11) ffc0c1e8: 4b ff fe 94 b ffc0c07c <_RBTree_Validate_insert_unprotected+0x58> =============================================================================== ffc09848 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09848: 94 21 ff d8 stwu r1,-40(r1) ffc0984c: 7c 08 02 a6 mflr r0 rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc09850: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09854: 90 01 00 2c stw r0,44(r1) rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc09858: 39 29 20 44 addi r9,r9,8260 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc0985c: 93 e1 00 24 stw r31,36(r1) rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc09860: 83 e9 00 2c lwz r31,44(r9) * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09864: 93 a1 00 1c stw r29,28(r1) maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc09868: 2f 9f 00 00 cmpwi cr7,r31,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc0986c: 93 c1 00 20 stw r30,32(r1) /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; maximum = Configuration_RTEMS_API.number_of_initialization_tasks; ffc09870: 83 a9 00 28 lwz r29,40(r9) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc09874: 41 9e 00 5c beq- cr7,ffc098d0 <_RTEMS_tasks_Initialize_user_tasks_body+0x88> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc09878: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0987c: 41 9e 00 54 beq- cr7,ffc098d0 <_RTEMS_tasks_Initialize_user_tasks_body+0x88><== NEVER TAKEN ffc09880: 3b c0 00 00 li r30,0 return_value = rtems_task_create( ffc09884: 80 bf 00 04 lwz r5,4(r31) ffc09888: 39 01 00 08 addi r8,r1,8 ffc0988c: 80 7f 00 00 lwz r3,0(r31) ffc09890: 80 9f 00 08 lwz r4,8(r31) ffc09894: 80 df 00 14 lwz r6,20(r31) ffc09898: 80 ff 00 0c lwz r7,12(r31) ffc0989c: 4b ff fd 0d bl ffc095a8 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) ffc098a0: 7c 65 1b 79 mr. r5,r3 ffc098a4: 40 82 00 48 bne- ffc098ec <_RTEMS_tasks_Initialize_user_tasks_body+0xa4> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( ffc098a8: 80 bf 00 18 lwz r5,24(r31) ffc098ac: 80 61 00 08 lwz r3,8(r1) ffc098b0: 80 9f 00 10 lwz r4,16(r31) ffc098b4: 48 00 00 45 bl ffc098f8 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) ffc098b8: 7c 65 1b 79 mr. r5,r3 ffc098bc: 40 82 00 30 bne- ffc098ec <_RTEMS_tasks_Initialize_user_tasks_body+0xa4> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc098c0: 3b de 00 01 addi r30,r30,1 ffc098c4: 7f 9e e8 00 cmpw cr7,r30,r29 ffc098c8: 3b ff 00 1c addi r31,r31,28 ffc098cc: 40 9e ff b8 bne+ cr7,ffc09884 <_RTEMS_tasks_Initialize_user_tasks_body+0x3c><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } ffc098d0: 80 01 00 2c lwz r0,44(r1) ffc098d4: 83 a1 00 1c lwz r29,28(r1) ffc098d8: 7c 08 03 a6 mtlr r0 ffc098dc: 83 c1 00 20 lwz r30,32(r1) ffc098e0: 83 e1 00 24 lwz r31,36(r1) ffc098e4: 38 21 00 28 addi r1,r1,40 ffc098e8: 4e 80 00 20 blr 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 ); ffc098ec: 38 60 00 01 li r3,1 ffc098f0: 38 80 00 01 li r4,1 ffc098f4: 48 00 13 b1 bl ffc0aca4 <_Internal_error_Occurred> =============================================================================== ffc0fd88 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0fd88: 94 21 ff e0 stwu r1,-32(r1) ffc0fd8c: 7c 08 02 a6 mflr r0 ffc0fd90: 90 01 00 24 stw r0,36(r1) ffc0fd94: 93 e1 00 1c stw r31,28(r1) RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0fd98: 83 e3 01 2c lwz r31,300(r3) */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0fd9c: 93 c1 00 18 stw r30,24(r1) ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; if ( !api ) ffc0fda0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0fda4: 41 9e 00 7c beq- cr7,ffc0fe20 <_RTEMS_tasks_Post_switch_extension+0x98><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0fda8: 7c 00 00 a6 mfmsr r0 ffc0fdac: 7d 30 42 a6 mfsprg r9,0 ffc0fdb0: 7c 09 48 78 andc r9,r0,r9 ffc0fdb4: 7d 20 01 24 mtmsr r9 asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; asr->signals_posted = 0; ffc0fdb8: 39 20 00 00 li r9,0 */ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; ffc0fdbc: 83 df 00 14 lwz r30,20(r31) asr->signals_posted = 0; ffc0fdc0: 91 3f 00 14 stw r9,20(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0fdc4: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ ffc0fdc8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0fdcc: 41 be 00 54 beq+ cr7,ffc0fe20 <_RTEMS_tasks_Post_switch_extension+0x98> return; asr->nest_level += 1; ffc0fdd0: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0fdd4: 38 80 00 00 li r4,0 ffc0fdd8: 80 7f 00 10 lwz r3,16(r31) ffc0fddc: 60 84 ff ff ori r4,r4,65535 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc0fde0: 38 09 00 01 addi r0,r9,1 ffc0fde4: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0fde8: 38 a1 00 08 addi r5,r1,8 ffc0fdec: 48 00 26 45 bl ffc12430 (*asr->handler)( signal_set ); ffc0fdf0: 80 1f 00 0c lwz r0,12(r31) ffc0fdf4: 7f c3 f3 78 mr r3,r30 ffc0fdf8: 7c 09 03 a6 mtctr r0 ffc0fdfc: 4e 80 04 21 bctrl asr->nest_level -= 1; ffc0fe00: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0fe04: 38 80 00 00 li r4,0 ffc0fe08: 80 61 00 08 lwz r3,8(r1) asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; ffc0fe0c: 38 09 ff ff addi r0,r9,-1 ffc0fe10: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0fe14: 60 84 ff ff ori r4,r4,65535 ffc0fe18: 38 a1 00 08 addi r5,r1,8 ffc0fe1c: 48 00 26 15 bl ffc12430 } ffc0fe20: 80 01 00 24 lwz r0,36(r1) ffc0fe24: 83 c1 00 18 lwz r30,24(r1) ffc0fe28: 7c 08 03 a6 mtlr r0 ffc0fe2c: 83 e1 00 1c lwz r31,28(r1) ffc0fe30: 38 21 00 20 addi r1,r1,32 ffc0fe34: 4e 80 00 20 blr =============================================================================== ffc0fcf8 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; ffc0fcf8: 81 23 01 38 lwz r9,312(r3) while (tvp) { ffc0fcfc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fd00: 41 9e 00 24 beq- cr7,ffc0fd24 <_RTEMS_tasks_Switch_extension+0x2c> tvp->tval = *tvp->ptr; ffc0fd04: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->gval; ffc0fd08: 80 09 00 08 lwz r0,8(r9) * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; ffc0fd0c: 81 4b 00 00 lwz r10,0(r11) ffc0fd10: 91 49 00 0c stw r10,12(r9) *tvp->ptr = tvp->gval; ffc0fd14: 90 0b 00 00 stw r0,0(r11) tvp = (rtems_task_variable_t *)tvp->next; ffc0fd18: 81 29 00 00 lwz r9,0(r9) /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { ffc0fd1c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fd20: 40 9e ff e4 bne+ cr7,ffc0fd04 <_RTEMS_tasks_Switch_extension+0xc><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; ffc0fd24: 81 24 01 38 lwz r9,312(r4) while (tvp) { ffc0fd28: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fd2c: 4d 9e 00 20 beqlr cr7 tvp->gval = *tvp->ptr; ffc0fd30: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->tval; ffc0fd34: 80 09 00 0c lwz r0,12(r9) tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; ffc0fd38: 81 4b 00 00 lwz r10,0(r11) ffc0fd3c: 91 49 00 08 stw r10,8(r9) *tvp->ptr = tvp->tval; ffc0fd40: 90 0b 00 00 stw r0,0(r11) tvp = (rtems_task_variable_t *)tvp->next; ffc0fd44: 81 29 00 00 lwz r9,0(r9) *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { ffc0fd48: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fd4c: 40 9e ff e4 bne+ cr7,ffc0fd30 <_RTEMS_tasks_Switch_extension+0x38><== NEVER TAKEN ffc0fd50: 4e 80 00 20 blr =============================================================================== ffc0a7e4 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc0a7e4: 94 21 ff e0 stwu r1,-32(r1) ffc0a7e8: 7c 08 02 a6 mflr r0 ffc0a7ec: 7c 64 1b 78 mr r4,r3 ffc0a7f0: 3c 60 00 00 lis r3,0 ffc0a7f4: 90 01 00 24 stw r0,36(r1) ffc0a7f8: 38 63 2c 00 addi r3,r3,11264 ffc0a7fc: 38 a1 00 08 addi r5,r1,8 ffc0a800: 93 e1 00 1c stw r31,28(r1) ffc0a804: 48 00 27 45 bl ffc0cf48 <_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 ) { ffc0a808: 80 01 00 08 lwz r0,8(r1) ffc0a80c: 7c 7f 1b 78 mr r31,r3 ffc0a810: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a814: 40 9e 00 4c bne- cr7,ffc0a860 <_Rate_monotonic_Timeout+0x7c><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; ffc0a818: 80 63 00 40 lwz r3,64(r3) */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); ffc0a81c: 80 03 00 10 lwz r0,16(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc0a820: 70 09 40 00 andi. r9,r0,16384 ffc0a824: 41 82 00 14 beq- ffc0a838 <_Rate_monotonic_Timeout+0x54> ffc0a828: 81 23 00 20 lwz r9,32(r3) ffc0a82c: 80 1f 00 08 lwz r0,8(r31) ffc0a830: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a834: 41 9e 00 6c beq- cr7,ffc0a8a0 <_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 ) { ffc0a838: 80 1f 00 38 lwz r0,56(r31) ffc0a83c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0a840: 41 9e 00 34 beq- cr7,ffc0a874 <_Rate_monotonic_Timeout+0x90> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; ffc0a844: 38 00 00 04 li r0,4 ffc0a848: 90 1f 00 38 stw r0,56(r31) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc0a84c: 3d 20 00 00 lis r9,0 ffc0a850: 81 69 28 08 lwz r11,10248(r9) ffc0a854: 38 0b ff ff addi r0,r11,-1 ffc0a858: 90 09 28 08 stw r0,10248(r9) return _Thread_Dispatch_disable_level; ffc0a85c: 80 09 28 08 lwz r0,10248(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc0a860: 80 01 00 24 lwz r0,36(r1) ffc0a864: 83 e1 00 1c lwz r31,28(r1) ffc0a868: 38 21 00 20 addi r1,r1,32 ffc0a86c: 7c 08 03 a6 mtlr r0 ffc0a870: 4e 80 00 20 blr _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; ffc0a874: 38 00 00 03 li r0,3 ffc0a878: 90 1f 00 38 stw r0,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc0a87c: 7f e3 fb 78 mr r3,r31 ffc0a880: 4b ff f7 d1 bl ffc0a050 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a884: 80 1f 00 3c lwz r0,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a888: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a88c: 90 1f 00 1c stw r0,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a890: 38 63 2d c8 addi r3,r3,11720 ffc0a894: 38 9f 00 10 addi r4,r31,16 ffc0a898: 48 00 4a dd bl ffc0f374 <_Watchdog_Insert> ffc0a89c: 4b ff ff b0 b ffc0a84c <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0a8a0: 3c 80 10 03 lis r4,4099 ffc0a8a4: 60 84 ff f8 ori r4,r4,65528 ffc0a8a8: 48 00 32 69 bl ffc0db10 <_Thread_Clear_state> ffc0a8ac: 4b ff ff d0 b ffc0a87c <_Rate_monotonic_Timeout+0x98> =============================================================================== ffc0b754 <_Scheduler_priority_Block>: ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; ffc0b754: 81 63 00 8c lwz r11,140(r3) ready = sched_info->ready_chain; ffc0b758: 81 2b 00 00 lwz r9,0(r11) if ( _Chain_Has_only_one_node( ready ) ) { ffc0b75c: 81 49 00 00 lwz r10,0(r9) ffc0b760: 80 09 00 08 lwz r0,8(r9) ffc0b764: 7f 8a 00 00 cmpw cr7,r10,r0 ffc0b768: 41 9e 00 a4 beq- cr7,ffc0b80c <_Scheduler_priority_Block+0xb8> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0b76c: 81 63 00 00 lwz r11,0(r3) previous = the_node->previous; ffc0b770: 81 23 00 04 lwz r9,4(r3) next->previous = previous; ffc0b774: 91 2b 00 04 stw r9,4(r11) previous->next = next; ffc0b778: 91 69 00 00 stw r11,0(r9) RTEMS_INLINE_ROUTINE bool _Thread_Is_heir ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Heir ); ffc0b77c: 3d 20 00 00 lis r9,0 ffc0b780: 39 29 2d b8 addi r9,r9,11704 { _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) ffc0b784: 80 09 00 10 lwz r0,16(r9) ffc0b788: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b78c: 41 9e 00 1c beq- cr7,ffc0b7a8 <_Scheduler_priority_Block+0x54> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) ffc0b790: 80 09 00 0c lwz r0,12(r9) ffc0b794: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b798: 4c be 00 20 bnelr+ cr7 _Thread_Dispatch_necessary = true; ffc0b79c: 38 00 00 01 li r0,1 ffc0b7a0: 98 09 00 18 stb r0,24(r9) ffc0b7a4: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0b7a8: 3c a0 00 00 lis r5,0 * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( (Chain_Control *) _Scheduler.information ffc0b7ac: 3d 40 00 00 lis r10,0 ffc0b7b0: 81 65 28 08 lwz r11,10248(r5) ffc0b7b4: 81 4a 20 e0 lwz r10,8416(r10) ffc0b7b8: 7d 66 00 34 cntlzw r6,r11 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b7bc: 3c e0 00 00 lis r7,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0b7c0: 91 65 28 08 stw r11,10248(r5) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b7c4: 38 e7 2d e0 addi r7,r7,11744 ffc0b7c8: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0b7cc: 7c 07 40 2e lwzx r0,r7,r8 ffc0b7d0: 7c 0b 00 34 cntlzw r11,r0 return (_Priority_Bits_index( major ) << 4) + ffc0b7d4: 54 c6 20 36 rlwinm r6,r6,4,0,27 { 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 ); ffc0b7d8: 7c 07 41 2e stwx r0,r7,r8 return (_Priority_Bits_index( major ) << 4) + ffc0b7dc: 7d 66 5a 14 add r11,r6,r11 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0b7e0: 1d 6b 00 0c mulli r11,r11,12 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0b7e4: 7c 0a 58 2e lwzx r0,r10,r11 ffc0b7e8: 7d 0a 5a 14 add r8,r10,r11 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0b7ec: 39 68 00 04 addi r11,r8,4 ffc0b7f0: 7f 80 58 00 cmpw cr7,r0,r11 ffc0b7f4: 41 9e 00 60 beq- cr7,ffc0b854 <_Scheduler_priority_Block+0x100><== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0b7f8: 90 09 00 10 stw r0,16(r9) /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) ffc0b7fc: 80 09 00 0c lwz r0,12(r9) ffc0b800: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b804: 4c be 00 20 bnelr+ cr7 ffc0b808: 4b ff ff 94 b ffc0b79c <_Scheduler_priority_Block+0x48> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0b80c: 81 4b 00 04 lwz r10,4(r11) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc0b810: 39 09 00 04 addi r8,r9,4 ffc0b814: 80 0b 00 14 lwz r0,20(r11) ffc0b818: 80 ea 00 00 lwz r7,0(r10) head->next = tail; ffc0b81c: 91 09 00 00 stw r8,0(r9) head->previous = NULL; ffc0b820: 39 00 00 00 li r8,0 ffc0b824: 7c e0 00 38 and r0,r7,r0 if ( *the_priority_map->minor == 0 ) ffc0b828: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b82c: 91 09 00 04 stw r8,4(r9) tail->previous = head; ffc0b830: 91 29 00 08 stw r9,8(r9) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0b834: 90 0a 00 00 stw r0,0(r10) if ( *the_priority_map->minor == 0 ) ffc0b838: 40 be ff 44 bne- cr7,ffc0b77c <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; ffc0b83c: 3d 20 00 00 lis r9,0 ffc0b840: 80 0b 00 10 lwz r0,16(r11) ffc0b844: 81 49 28 08 lwz r10,10248(r9) ffc0b848: 7d 40 00 38 and r0,r10,r0 ffc0b84c: 90 09 28 08 stw r0,10248(r9) ffc0b850: 4b ff ff 2c b ffc0b77c <_Scheduler_priority_Block+0x28> Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0b854: 38 00 00 00 li r0,0 <== NOT EXECUTED * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0b858: 90 09 00 10 stw r0,16(r9) <== NOT EXECUTED ffc0b85c: 4b ff ff a0 b ffc0b7fc <_Scheduler_priority_Block+0xa8><== NOT EXECUTED =============================================================================== ffc0ba2c <_Scheduler_priority_Schedule>: RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0ba2c: 3c c0 00 00 lis r6,0 * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( (Chain_Control *) _Scheduler.information ffc0ba30: 3d 60 00 00 lis r11,0 ffc0ba34: 81 26 28 08 lwz r9,10248(r6) ffc0ba38: 81 6b 20 e0 lwz r11,8416(r11) ffc0ba3c: 7d 27 00 34 cntlzw r7,r9 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0ba40: 3d 00 00 00 lis r8,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0ba44: 91 26 28 08 stw r9,10248(r6) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0ba48: 39 08 2d e0 addi r8,r8,11744 ffc0ba4c: 54 ea 10 3a rlwinm r10,r7,2,0,29 ffc0ba50: 7c 08 50 2e lwzx r0,r8,r10 ffc0ba54: 7c 06 00 34 cntlzw r6,r0 return (_Priority_Bits_index( major ) << 4) + ffc0ba58: 54 e9 20 36 rlwinm r9,r7,4,0,27 { 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 ); ffc0ba5c: 7c 08 51 2e stwx r0,r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc0ba60: 7d 29 32 14 add r9,r9,r6 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0ba64: 1d 29 00 0c mulli r9,r9,12 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0ba68: 7c 0b 48 2e lwzx r0,r11,r9 ffc0ba6c: 7d 4b 4a 14 add r10,r11,r9 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0ba70: 39 2a 00 04 addi r9,r10,4 ffc0ba74: 7f 80 48 00 cmpw cr7,r0,r9 ffc0ba78: 41 9e 00 10 beq- cr7,ffc0ba88 <_Scheduler_priority_Schedule+0x5c><== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0ba7c: 3d 20 00 00 lis r9,0 ffc0ba80: 90 09 2d c8 stw r0,11720(r9) #include void _Scheduler_priority_Schedule(void) { _Scheduler_priority_Schedule_body(); } ffc0ba84: 4e 80 00 20 blr Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0ba88: 38 00 00 00 li r0,0 <== NOT EXECUTED * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0ba8c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0ba90: 90 09 2d c8 stw r0,11720(r9) <== NOT EXECUTED ffc0ba94: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0bc14 <_Scheduler_priority_Yield>: Scheduler_priority_Per_thread *sched_info; ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc0bc14: 3d 40 00 00 lis r10,0 ffc0bc18: 39 4a 2d b8 addi r10,r10,11704 ffc0bc1c: 81 2a 00 0c lwz r9,12(r10) sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info; ready = sched_info->ready_chain; ffc0bc20: 81 69 00 8c lwz r11,140(r9) ffc0bc24: 81 6b 00 00 lwz r11,0(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0bc28: 7c 00 00 a6 mfmsr r0 ffc0bc2c: 7d 10 42 a6 mfsprg r8,0 ffc0bc30: 7c 08 40 78 andc r8,r0,r8 ffc0bc34: 7d 00 01 24 mtmsr r8 _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { ffc0bc38: 80 eb 00 00 lwz r7,0(r11) ffc0bc3c: 81 0b 00 08 lwz r8,8(r11) ffc0bc40: 7f 87 40 00 cmpw cr7,r7,r8 ffc0bc44: 41 9e 00 60 beq- cr7,ffc0bca4 <_Scheduler_priority_Yield+0x90> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0bc48: 80 c9 00 00 lwz r6,0(r9) RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); ffc0bc4c: 38 ab 00 04 addi r5,r11,4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0bc50: 80 e9 00 04 lwz r7,4(r9) next->previous = previous; ffc0bc54: 90 e6 00 04 stw r7,4(r6) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; ffc0bc58: 81 0b 00 08 lwz r8,8(r11) Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; ffc0bc5c: 90 c7 00 00 stw r6,0(r7) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; ffc0bc60: 91 2b 00 08 stw r9,8(r11) ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; ffc0bc64: 90 a9 00 00 stw r5,0(r9) tail->previous = the_node; old_last->next = the_node; the_node->previous = old_last; ffc0bc68: 91 09 00 04 stw r8,4(r9) Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; old_last->next = the_node; ffc0bc6c: 91 28 00 00 stw r9,0(r8) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0bc70: 7d 00 00 a6 mfmsr r8 ffc0bc74: 7c 00 01 24 mtmsr r0 ffc0bc78: 7d 00 01 24 mtmsr r8 _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) ffc0bc7c: 81 0a 00 10 lwz r8,16(r10) ffc0bc80: 7f 89 40 00 cmpw cr7,r9,r8 ffc0bc84: 41 9e 00 14 beq- cr7,ffc0bc98 <_Scheduler_priority_Yield+0x84><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) _Chain_First( ready ); _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; ffc0bc88: 39 20 00 01 li r9,1 ffc0bc8c: 99 2a 00 18 stb r9,24(r10) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0bc90: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); } ffc0bc94: 4e 80 00 20 blr _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) _Chain_First( ready ); ffc0bc98: 81 2b 00 00 lwz r9,0(r11) ffc0bc9c: 91 2a 00 10 stw r9,16(r10) ffc0bca0: 4b ff ff e8 b ffc0bc88 <_Scheduler_priority_Yield+0x74> _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) ffc0bca4: 81 6a 00 10 lwz r11,16(r10) ffc0bca8: 7f 89 58 00 cmpw cr7,r9,r11 ffc0bcac: 40 9e ff dc bne+ cr7,ffc0bc88 <_Scheduler_priority_Yield+0x74> ffc0bcb0: 4b ff ff e0 b ffc0bc90 <_Scheduler_priority_Yield+0x7c> =============================================================================== ffc0c43c <_Scheduler_simple_Ready_queue_enqueue_first>: { Chain_Control *ready; Chain_Node *the_node; Thread_Control *current; ready = (Chain_Control *)_Scheduler.information; ffc0c43c: 3d 20 00 00 lis r9,0 */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { ffc0c440: 81 63 00 14 lwz r11,20(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0c444: 81 29 20 e0 lwz r9,8416(r9) ffc0c448: 81 29 00 00 lwz r9,0(r9) ffc0c44c: 80 09 00 14 lwz r0,20(r9) ffc0c450: 7f 80 58 40 cmplw cr7,r0,r11 ffc0c454: 40 9c 00 14 bge- cr7,ffc0c468 <_Scheduler_simple_Ready_queue_enqueue_first+0x2c> * Do NOT need to check for end of chain because there is always * at least one task on the ready chain -- the IDLE task. It can * never block, should never attempt to obtain a semaphore or mutex, * and thus will always be there. */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { ffc0c458: 81 29 00 00 lwz r9,0(r9) current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { ffc0c45c: 80 09 00 14 lwz r0,20(r9) ffc0c460: 7f 80 58 40 cmplw cr7,r0,r11 ffc0c464: 41 9c ff f4 blt+ cr7,ffc0c458 <_Scheduler_simple_Ready_queue_enqueue_first+0x1c><== NEVER TAKEN current = (Thread_Control *)current->Object.Node.previous; ffc0c468: 81 29 00 04 lwz r9,4(r9) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0c46c: 81 69 00 00 lwz r11,0(r9) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0c470: 91 23 00 04 stw r9,4(r3) before_node = after_node->next; after_node->next = the_node; ffc0c474: 90 69 00 00 stw r3,0(r9) the_node->next = before_node; before_node->previous = the_node; ffc0c478: 90 6b 00 04 stw r3,4(r11) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0c47c: 91 63 00 00 stw r11,0(r3) } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } ffc0c480: 4e 80 00 20 blr =============================================================================== ffc0a774 <_TOD_Tickle_ticks>: { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a774: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc0a778: 94 21 ff d8 stwu r1,-40(r1) ffc0a77c: 7c 08 02 a6 mflr r0 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc0a780: 3c 60 00 00 lis 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() ); ffc0a784: 81 69 20 10 lwz r11,8208(r9) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0a788: 3d 20 00 00 lis r9,0 ffc0a78c: 81 49 27 fc lwz r10,10236(r9) /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc0a790: 38 81 00 08 addi r4,r1,8 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a794: 1d 6b 03 e8 mulli r11,r11,1000 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc0a798: 90 01 00 2c stw r0,44(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc0a79c: 38 63 27 d0 addi r3,r3,10192 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a7a0: 91 61 00 0c stw r11,12(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0a7a4: 38 0a 00 01 addi r0,r10,1 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a7a8: 39 40 00 00 li r10,0 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0a7ac: 90 09 27 fc stw r0,10236(r9) { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a7b0: 91 41 00 08 stw r10,8(r1) * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc0a7b4: 93 e1 00 24 stw r31,36(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc0a7b8: 48 00 28 dd bl ffc0d094 <_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 ); ffc0a7bc: 3c 60 00 00 lis r3,0 ffc0a7c0: 38 63 27 e0 addi r3,r3,10208 ffc0a7c4: 38 81 00 08 addi r4,r1,8 ffc0a7c8: 48 00 28 cd bl ffc0d094 <_Timespec_Add_to> while ( seconds ) { ffc0a7cc: 7c 60 1b 79 mr. r0,r3 ffc0a7d0: 90 01 00 18 stw r0,24(r1) ffc0a7d4: 41 82 00 24 beq- ffc0a7f8 <_TOD_Tickle_ticks+0x84> ffc0a7d8: 3f e0 00 00 lis r31,0 ffc0a7dc: 3b ff 2c dc addi r31,r31,11484 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); ffc0a7e0: 7f e3 fb 78 mr r3,r31 ffc0a7e4: 48 00 30 b5 bl ffc0d898 <_Watchdog_Tickle> ffc0a7e8: 80 01 00 18 lwz r0,24(r1) ffc0a7ec: 35 20 ff ff addic. r9,r0,-1 ffc0a7f0: 91 21 00 18 stw r9,24(r1) ffc0a7f4: 40 82 ff ec bne+ ffc0a7e0 <_TOD_Tickle_ticks+0x6c> <== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } ffc0a7f8: 80 01 00 2c lwz r0,44(r1) ffc0a7fc: 83 e1 00 24 lwz r31,36(r1) ffc0a800: 38 21 00 28 addi r1,r1,40 ffc0a804: 7c 08 03 a6 mtlr r0 ffc0a808: 4e 80 00 20 blr =============================================================================== ffc0bd18 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc0bd18: 94 21 ff e8 stwu r1,-24(r1) ffc0bd1c: 7c 08 02 a6 mflr r0 ffc0bd20: 90 01 00 1c stw r0,28(r1) ffc0bd24: 93 e1 00 14 stw r31,20(r1) ffc0bd28: 7c 7f 1b 78 mr r31,r3 ffc0bd2c: 93 81 00 08 stw r28,8(r1) ffc0bd30: 7c bc 2b 78 mr r28,r5 ffc0bd34: 93 a1 00 0c stw r29,12(r1) ffc0bd38: 93 c1 00 10 stw r30,16(r1) ffc0bd3c: 7c 9e 23 78 mr r30,r4 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; ffc0bd40: 83 a3 00 10 lwz r29,16(r3) /* * 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 ); ffc0bd44: 48 00 11 2d bl ffc0ce70 <_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 ) ffc0bd48: 80 1f 00 14 lwz r0,20(r31) ffc0bd4c: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0bd50: 41 9e 00 10 beq- cr7,ffc0bd60 <_Thread_Change_priority+0x48> _Thread_Set_priority( the_thread, new_priority ); ffc0bd54: 7f e3 fb 78 mr r3,r31 ffc0bd58: 7f c4 f3 78 mr r4,r30 ffc0bd5c: 48 00 10 6d bl ffc0cdc8 <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0bd60: 7f c0 00 a6 mfmsr r30 ffc0bd64: 7c 10 42 a6 mfsprg r0,0 ffc0bd68: 7f c0 00 78 andc r0,r30,r0 ffc0bd6c: 7c 00 01 24 mtmsr r0 /* * 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; ffc0bd70: 80 1f 00 10 lwz r0,16(r31) if ( state != STATES_TRANSIENT ) { ffc0bd74: 2f 80 00 04 cmpwi cr7,r0,4 ffc0bd78: 41 9e 00 88 beq- cr7,ffc0be00 <_Thread_Change_priority+0xe8> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc0bd7c: 73 a9 00 04 andi. r9,r29,4 ffc0bd80: 41 82 00 38 beq- ffc0bdb8 <_Thread_Change_priority+0xa0><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0bd84: 7f c0 01 24 mtmsr r30 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); ffc0bd88: 3d 20 00 03 lis r9,3 <== NOT EXECUTED ffc0bd8c: 61 29 be e0 ori r9,r9,48864 <== NOT EXECUTED the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0bd90: 7c 0b 48 39 and. r11,r0,r9 <== NOT EXECUTED ffc0bd94: 40 82 00 40 bne- ffc0bdd4 <_Thread_Change_priority+0xbc><== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0bd98: 80 01 00 1c lwz r0,28(r1) ffc0bd9c: 83 81 00 08 lwz r28,8(r1) ffc0bda0: 7c 08 03 a6 mtlr r0 ffc0bda4: 83 a1 00 0c lwz r29,12(r1) ffc0bda8: 83 c1 00 10 lwz r30,16(r1) ffc0bdac: 83 e1 00 14 lwz r31,20(r1) ffc0bdb0: 38 21 00 18 addi r1,r1,24 ffc0bdb4: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc0bdb8: 54 09 07 b8 rlwinm r9,r0,0,30,28 */ 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 ); ffc0bdbc: 91 3f 00 10 stw r9,16(r31) ffc0bdc0: 7f c0 01 24 mtmsr r30 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); ffc0bdc4: 3d 20 00 03 lis r9,3 ffc0bdc8: 61 29 be e0 ori r9,r9,48864 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0bdcc: 7c 0b 48 39 and. r11,r0,r9 ffc0bdd0: 41 82 ff c8 beq+ ffc0bd98 <_Thread_Change_priority+0x80> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0bdd4: 80 7f 00 44 lwz r3,68(r31) ffc0bdd8: 7f e4 fb 78 mr r4,r31 ffc0bddc: 48 00 0e f1 bl ffc0cccc <_Thread_queue_Requeue> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0bde0: 80 01 00 1c lwz r0,28(r1) ffc0bde4: 83 81 00 08 lwz r28,8(r1) ffc0bde8: 7c 08 03 a6 mtlr r0 ffc0bdec: 83 a1 00 0c lwz r29,12(r1) ffc0bdf0: 83 c1 00 10 lwz r30,16(r1) ffc0bdf4: 83 e1 00 14 lwz r31,20(r1) ffc0bdf8: 38 21 00 18 addi r1,r1,24 ffc0bdfc: 4e 80 00 20 blr } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc0be00: 73 bd 00 04 andi. r29,r29,4 ffc0be04: 41 82 00 74 beq- ffc0be78 <_Thread_Change_priority+0x160><== ALWAYS TAKEN ffc0be08: 3f a0 00 00 lis r29,0 <== NOT EXECUTED ffc0be0c: 3b bd 20 e0 addi r29,r29,8416 <== NOT EXECUTED static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0be10: 7c 00 00 a6 mfmsr r0 ffc0be14: 7f c0 01 24 mtmsr r30 ffc0be18: 7c 00 01 24 mtmsr r0 * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); ffc0be1c: 80 1d 00 08 lwz r0,8(r29) ffc0be20: 7c 09 03 a6 mtctr r0 ffc0be24: 4e 80 04 21 bctrl * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); ffc0be28: 3d 20 00 00 lis r9,0 ffc0be2c: 39 29 2d b8 addi r9,r9,11704 ffc0be30: 81 69 00 0c lwz r11,12(r9) * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && ffc0be34: 80 09 00 10 lwz r0,16(r9) ffc0be38: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0be3c: 41 9e 00 18 beq- cr7,ffc0be54 <_Thread_Change_priority+0x13c> ffc0be40: 88 0b 00 74 lbz r0,116(r11) ffc0be44: 2f 80 00 00 cmpwi cr7,r0,0 ffc0be48: 41 9e 00 0c beq- cr7,ffc0be54 <_Thread_Change_priority+0x13c> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; ffc0be4c: 38 00 00 01 li r0,1 ffc0be50: 98 09 00 18 stb r0,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0be54: 7f c0 01 24 mtmsr r30 _ISR_Enable( level ); } ffc0be58: 80 01 00 1c lwz r0,28(r1) ffc0be5c: 83 81 00 08 lwz r28,8(r1) ffc0be60: 7c 08 03 a6 mtlr r0 ffc0be64: 83 a1 00 0c lwz r29,12(r1) ffc0be68: 83 c1 00 10 lwz r30,16(r1) ffc0be6c: 83 e1 00 14 lwz r31,20(r1) ffc0be70: 38 21 00 18 addi r1,r1,24 ffc0be74: 4e 80 00 20 blr * 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 ); if ( prepend_it ) ffc0be78: 2f 9c 00 00 cmpwi cr7,r28,0 * 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 ); ffc0be7c: 93 bf 00 10 stw r29,16(r31) */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); ffc0be80: 3f a0 00 00 lis r29,0 ffc0be84: 3b bd 20 e0 addi r29,r29,8416 if ( prepend_it ) ffc0be88: 41 9e 00 18 beq- cr7,ffc0bea0 <_Thread_Change_priority+0x188> ffc0be8c: 80 1d 00 28 lwz r0,40(r29) ffc0be90: 7f e3 fb 78 mr r3,r31 ffc0be94: 7c 09 03 a6 mtctr r0 ffc0be98: 4e 80 04 21 bctrl ffc0be9c: 4b ff ff 74 b ffc0be10 <_Thread_Change_priority+0xf8> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); ffc0bea0: 80 1d 00 24 lwz r0,36(r29) ffc0bea4: 7f e3 fb 78 mr r3,r31 ffc0bea8: 7c 09 03 a6 mtctr r0 ffc0beac: 4e 80 04 21 bctrl ffc0beb0: 4b ff ff 60 b ffc0be10 <_Thread_Change_priority+0xf8> =============================================================================== ffc0c12c <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c12c: 94 21 ff e8 stwu r1,-24(r1) ffc0c130: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c134: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c138: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c13c: 48 00 02 35 bl ffc0c370 <_Thread_Get> switch ( location ) { ffc0c140: 80 01 00 08 lwz r0,8(r1) ffc0c144: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c148: 40 9e 00 24 bne- cr7,ffc0c16c <_Thread_Delay_ended+0x40><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc0c14c: 3c 80 10 00 lis r4,4096 ffc0c150: 60 84 00 18 ori r4,r4,24 ffc0c154: 4b ff fd 61 bl ffc0beb4 <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc0c158: 3d 20 00 00 lis r9,0 ffc0c15c: 81 69 27 c8 lwz r11,10184(r9) ffc0c160: 38 0b ff ff addi r0,r11,-1 ffc0c164: 90 09 27 c8 stw r0,10184(r9) return _Thread_Dispatch_disable_level; ffc0c168: 80 09 27 c8 lwz r0,10184(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc0c16c: 80 01 00 1c lwz r0,28(r1) ffc0c170: 38 21 00 18 addi r1,r1,24 ffc0c174: 7c 08 03 a6 mtlr r0 ffc0c178: 4e 80 00 20 blr =============================================================================== ffc0c17c <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0c17c: 94 21 ff c8 stwu r1,-56(r1) ffc0c180: 7c 08 02 a6 mflr r0 ffc0c184: 93 21 00 1c stw r25,28(r1) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc0c188: 3f 20 00 00 lis r25,0 ffc0c18c: 81 39 27 c8 lwz r9,10184(r25) ffc0c190: 90 01 00 3c stw r0,60(r1) ffc0c194: 38 09 00 01 addi r0,r9,1 ffc0c198: 90 19 27 c8 stw r0,10184(r25) ffc0c19c: 93 01 00 18 stw r24,24(r1) return _Thread_Dispatch_disable_level; ffc0c1a0: 80 19 27 c8 lwz r0,10184(r25) ffc0c1a4: 93 41 00 20 stw r26,32(r1) ffc0c1a8: 93 61 00 24 stw r27,36(r1) ffc0c1ac: 93 81 00 28 stw r28,40(r1) ffc0c1b0: 93 a1 00 2c stw r29,44(r1) ffc0c1b4: 93 c1 00 30 stw r30,48(r1) ffc0c1b8: 93 e1 00 34 stw r31,52(r1) #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; ffc0c1bc: 3f a0 00 00 lis r29,0 ffc0c1c0: 3b bd 2d b8 addi r29,r29,11704 ffc0c1c4: 83 fd 00 0c lwz r31,12(r29) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c1c8: 7c 00 00 a6 mfmsr r0 ffc0c1cc: 7d 30 42 a6 mfsprg r9,0 ffc0c1d0: 7c 09 48 78 andc r9,r0,r9 ffc0c1d4: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0c1d8: 89 3d 00 18 lbz r9,24(r29) ffc0c1dc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c1e0: 41 9e 01 14 beq- cr7,ffc0c2f4 <_Thread_Dispatch+0x178> heir = _Thread_Heir; ffc0c1e4: 83 dd 00 10 lwz r30,16(r29) _Thread_Dispatch_necessary = false; ffc0c1e8: 39 20 00 00 li r9,0 ffc0c1ec: 99 3d 00 18 stb r9,24(r29) /* * 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 ) ffc0c1f0: 7f 9f f0 00 cmpw cr7,r31,r30 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; _Thread_Executing = heir; ffc0c1f4: 93 dd 00 0c stw r30,12(r29) /* * 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 ) ffc0c1f8: 41 9e 00 fc beq- cr7,ffc0c2f4 <_Thread_Dispatch+0x178> ffc0c1fc: 3f 80 00 00 lis r28,0 ffc0c200: 3b 7d 00 1c addi r27,r29,28 ffc0c204: 3b 9c 27 dc addi r28,r28,10204 #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; ffc0c208: 3f 00 00 00 lis r24,0 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; ffc0c20c: 3b 40 00 00 li r26,0 ffc0c210: 48 00 00 cc b ffc0c2dc <_Thread_Dispatch+0x160> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c214: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc0c218: 38 61 00 10 addi r3,r1,16 ffc0c21c: 48 00 40 61 bl ffc1027c <_TOD_Get_uptime> _Timestamp_Subtract( ffc0c220: 7f 63 db 78 mr r3,r27 ffc0c224: 38 81 00 10 addi r4,r1,16 ffc0c228: 38 a1 00 08 addi r5,r1,8 ffc0c22c: 48 00 0e c5 bl ffc0d0f0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); ffc0c230: 38 81 00 08 addi r4,r1,8 ffc0c234: 38 7f 00 84 addi r3,r31,132 ffc0c238: 48 00 0e 5d bl ffc0d094 <_Timespec_Add_to> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c23c: 81 3c 00 00 lwz r9,0(r28) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0c240: 81 41 00 10 lwz r10,16(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0c244: 7f e3 fb 78 mr r3,r31 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c248: 2f 89 00 00 cmpwi cr7,r9,0 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0c24c: 81 61 00 14 lwz r11,20(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0c250: 7f c4 f3 78 mr r4,r30 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0c254: 91 5d 00 1c stw r10,28(r29) ffc0c258: 91 7d 00 20 stw r11,32(r29) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c25c: 41 9e 00 14 beq- cr7,ffc0c270 <_Thread_Dispatch+0xf4> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc0c260: 80 09 00 00 lwz r0,0(r9) ffc0c264: 90 1f 01 28 stw r0,296(r31) *_Thread_libc_reent = heir->libc_reent; ffc0c268: 80 1e 01 28 lwz r0,296(r30) ffc0c26c: 90 09 00 00 stw r0,0(r9) } _User_extensions_Thread_switch( executing, heir ); ffc0c270: 48 00 13 15 bl ffc0d584 <_User_extensions_Thread_switch> * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0c274: 80 1f 01 24 lwz r0,292(r31) _Context_Save_fp( &executing->fp_context ); ffc0c278: 38 7f 01 24 addi r3,r31,292 * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0c27c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c280: 41 9e 00 08 beq- cr7,ffc0c288 <_Thread_Dispatch+0x10c> _Context_Save_fp( &executing->fp_context ); ffc0c284: 48 01 10 1d bl ffc1d2a0 <_CPU_Context_save_fp> #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc0c288: 38 7f 00 c4 addi r3,r31,196 ffc0c28c: 38 9e 00 c4 addi r4,r30,196 ffc0c290: 48 01 11 91 bl ffc1d420 <_CPU_Context_switch> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); _Thread_Allocated_fp = executing; } #else if ( executing->fp_context != NULL ) ffc0c294: 80 1f 01 24 lwz r0,292(r31) _Context_Restore_fp( &executing->fp_context ); ffc0c298: 38 7f 01 24 addi r3,r31,292 _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); _Thread_Allocated_fp = executing; } #else if ( executing->fp_context != NULL ) ffc0c29c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c2a0: 41 9e 00 08 beq- cr7,ffc0c2a8 <_Thread_Dispatch+0x12c> _Context_Restore_fp( &executing->fp_context ); ffc0c2a4: 48 01 10 bd bl ffc1d360 <_CPU_Context_restore_fp> #endif #endif executing = _Thread_Executing; ffc0c2a8: 83 fd 00 0c lwz r31,12(r29) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c2ac: 7c 00 00 a6 mfmsr r0 ffc0c2b0: 7d 30 42 a6 mfsprg r9,0 ffc0c2b4: 7c 09 48 78 andc r9,r0,r9 ffc0c2b8: 7d 20 01 24 mtmsr r9 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0c2bc: 89 3d 00 18 lbz r9,24(r29) ffc0c2c0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c2c4: 41 9e 00 30 beq- cr7,ffc0c2f4 <_Thread_Dispatch+0x178> heir = _Thread_Heir; ffc0c2c8: 83 dd 00 10 lwz r30,16(r29) _Thread_Dispatch_necessary = false; ffc0c2cc: 9b 5d 00 18 stb r26,24(r29) /* * 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 ) ffc0c2d0: 7f 9e f8 00 cmpw cr7,r30,r31 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; _Thread_Executing = heir; ffc0c2d4: 93 dd 00 0c stw r30,12(r29) /* * 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 ) ffc0c2d8: 41 9e 00 1c beq- cr7,ffc0c2f4 <_Thread_Dispatch+0x178> <== NEVER TAKEN */ #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 ) ffc0c2dc: 81 3e 00 7c lwz r9,124(r30) ffc0c2e0: 2f 89 00 01 cmpwi cr7,r9,1 ffc0c2e4: 40 9e ff 30 bne+ cr7,ffc0c214 <_Thread_Dispatch+0x98> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c2e8: 81 38 27 c4 lwz r9,10180(r24) ffc0c2ec: 91 3e 00 78 stw r9,120(r30) ffc0c2f0: 4b ff ff 24 b ffc0c214 <_Thread_Dispatch+0x98> * This routine sets thread dispatch level to the * value passed in. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value) { _Thread_Dispatch_disable_level = value; ffc0c2f4: 39 20 00 00 li r9,0 ffc0c2f8: 91 39 27 c8 stw r9,10184(r25) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c2fc: 7c 00 01 24 mtmsr r0 post_switch: _Thread_Dispatch_set_disable_level( 0 ); _ISR_Enable( level ); _API_extensions_Run_postswitch(); ffc0c300: 4b ff dc 31 bl ffc09f30 <_API_extensions_Run_postswitch> } ffc0c304: 80 01 00 3c lwz r0,60(r1) ffc0c308: 83 01 00 18 lwz r24,24(r1) ffc0c30c: 7c 08 03 a6 mtlr r0 ffc0c310: 83 21 00 1c lwz r25,28(r1) ffc0c314: 83 41 00 20 lwz r26,32(r1) ffc0c318: 83 61 00 24 lwz r27,36(r1) ffc0c31c: 83 81 00 28 lwz r28,40(r1) ffc0c320: 83 a1 00 2c lwz r29,44(r1) ffc0c324: 83 c1 00 30 lwz r30,48(r1) ffc0c328: 83 e1 00 34 lwz r31,52(r1) ffc0c32c: 38 21 00 38 addi r1,r1,56 ffc0c330: 4e 80 00 20 blr =============================================================================== ffc12890 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc12890: 94 21 ff f0 stwu r1,-16(r1) ffc12894: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc12898: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc1289c: 90 01 00 14 stw r0,20(r1) ffc128a0: 93 e1 00 0c stw r31,12(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc128a4: 83 e9 2d c4 lwz r31,11716(r9) * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc128a8: 93 c1 00 08 stw r30,8(r1) /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; ffc128ac: 81 3f 00 ac lwz r9,172(r31) } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc128b0: 38 00 00 00 li r0,0 ffc128b4: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc128b8: 71 2b 00 01 andi. r11,r9,1 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; __asm__ volatile ( ffc128bc: 7d 30 42 a6 mfsprg r9,0 ffc128c0: 40 82 00 54 bne- ffc12914 <_Thread_Handler+0x84> msr |= ppc_interrupt_get_disable_mask(); ffc128c4: 7d 20 03 78 or r0,r9,r0 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc128c8: 7c 00 01 24 mtmsr r0 _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc128cc: 3d 20 00 00 lis r9,0 ffc128d0: 8b c9 29 80 lbz r30,10624(r9) doneConstructors = 1; ffc128d4: 38 00 00 01 li r0,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 ); ffc128d8: 7f e3 fb 78 mr r3,r31 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; ffc128dc: 98 09 29 80 stb r0,10624(r9) /* * 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 ); ffc128e0: 4b ff a9 69 bl ffc0d248 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc128e4: 4b ff 9a 51 bl ffc0c334 <_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) */ { ffc128e8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc128ec: 41 9e 00 30 beq- cr7,ffc1291c <_Thread_Handler+0x8c> #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc128f0: 80 1f 00 94 lwz r0,148(r31) ffc128f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc128f8: 41 9e 00 2c beq- cr7,ffc12924 <_Thread_Handler+0x94> <== 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 ); ffc128fc: 7f e3 fb 78 mr r3,r31 ffc12900: 4b ff a9 bd bl ffc0d2bc <_User_extensions_Thread_exitted> _Internal_error_Occurred( ffc12904: 38 60 00 00 li r3,0 ffc12908: 38 80 00 01 li r4,1 ffc1290c: 38 a0 00 05 li r5,5 ffc12910: 4b ff 83 95 bl ffc0aca4 <_Internal_error_Occurred> _CPU_MSR_GET(msr); if (!(level & CPU_MODES_INTERRUPT_MASK)) { msr |= ppc_interrupt_get_disable_mask(); } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc12914: 7c 00 48 78 andc r0,r0,r9 ffc12918: 4b ff ff b0 b ffc128c8 <_Thread_Handler+0x38> * _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 (); ffc1291c: 48 00 b7 81 bl ffc1e09c <_init> ffc12920: 4b ff ff d0 b ffc128f0 <_Thread_Handler+0x60> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc12924: 80 1f 00 90 lwz r0,144(r31) ffc12928: 80 7f 00 9c lwz r3,156(r31) ffc1292c: 7c 09 03 a6 mtctr r0 ffc12930: 4e 80 04 21 bctrl } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = ffc12934: 90 7f 00 28 stw r3,40(r31) ffc12938: 4b ff ff c4 b ffc128fc <_Thread_Handler+0x6c> =============================================================================== ffc0c440 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0c440: 94 21 ff d0 stwu r1,-48(r1) ffc0c444: 7c 08 02 a6 mflr r0 ffc0c448: 93 c1 00 28 stw r30,40(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0c44c: 3b c0 00 00 li r30,0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0c450: 90 01 00 34 stw r0,52(r1) ffc0c454: 92 e1 00 0c stw r23,12(r1) ffc0c458: 93 01 00 10 stw r24,16(r1) ffc0c45c: 7d 58 53 78 mr r24,r10 ffc0c460: 93 21 00 14 stw r25,20(r1) ffc0c464: 7d 39 4b 78 mr r25,r9 ffc0c468: 93 41 00 18 stw r26,24(r1) ffc0c46c: 7d 1a 43 78 mr r26,r8 ffc0c470: 93 61 00 1c stw r27,28(r1) ffc0c474: 7c fb 3b 78 mr r27,r7 ffc0c478: 93 81 00 20 stw r28,32(r1) ffc0c47c: 7c 7c 1b 78 mr r28,r3 /* * 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 ); ffc0c480: 7c 83 23 78 mr r3,r4 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0c484: 93 a1 00 24 stw r29,36(r1) ffc0c488: 7c dd 33 78 mr r29,r6 ffc0c48c: 93 e1 00 2c stw r31,44(r1) ffc0c490: 7c 9f 23 78 mr r31,r4 ffc0c494: 81 61 00 40 lwz r11,64(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0c498: 93 c4 01 2c stw r30,300(r4) ffc0c49c: 93 c4 01 30 stw r30,304(r4) extensions_area = NULL; the_thread->libc_reent = NULL; ffc0c4a0: 93 c4 01 28 stw r30,296(r4) /* * 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 ); ffc0c4a4: 7c c4 33 78 mr r4,r6 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0c4a8: 82 eb 00 00 lwz r23,0(r11) /* * 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 ); ffc0c4ac: 48 00 0a 21 bl ffc0cecc <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0c4b0: 7c 60 1b 79 mr. r0,r3 return false; /* stack allocation failed */ ffc0c4b4: 38 60 00 00 li r3,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 ) ffc0c4b8: 41 82 01 20 beq- ffc0c5d8 <_Thread_Initialize+0x198> ffc0c4bc: 7f 9d 00 40 cmplw cr7,r29,r0 ffc0c4c0: 41 9d 01 18 bgt- cr7,ffc0c5d8 <_Thread_Initialize+0x198><== NEVER TAKEN /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0c4c4: 2f 9b 00 00 cmpwi cr7,r27,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0c4c8: 81 3f 00 c0 lwz r9,192(r31) the_stack->size = size; ffc0c4cc: 90 1f 00 b4 stw r0,180(r31) extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; ffc0c4d0: 3b a0 00 00 li r29,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0c4d4: 91 3f 00 b8 stw r9,184(r31) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0c4d8: 40 9e 01 34 bne- cr7,ffc0c60c <_Thread_Initialize+0x1cc> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c4dc: 3f c0 00 00 lis r30,0 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; ffc0c4e0: 93 bf 01 24 stw r29,292(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0c4e4: 38 00 00 00 li r0,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c4e8: 81 3e 27 e8 lwz r9,10216(r30) if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; ffc0c4ec: 93 bf 00 bc stw r29,188(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c4f0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c4f4: 90 1f 00 50 stw r0,80(r31) the_watchdog->routine = routine; ffc0c4f8: 90 1f 00 64 stw r0,100(r31) the_watchdog->id = id; ffc0c4fc: 90 1f 00 68 stw r0,104(r31) the_watchdog->user_data = user_data; ffc0c500: 90 1f 00 6c stw r0,108(r31) ffc0c504: 40 9e 01 24 bne- cr7,ffc0c628 <_Thread_Initialize+0x1e8> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c508: 91 3f 01 34 stw r9,308(r31) * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0c50c: 3b 60 00 00 li r27,0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0c510: 80 01 00 38 lwz r0,56(r1) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); ffc0c514: 3d 20 00 00 lis r9,0 } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0c518: 3b c0 00 00 li r30,0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0c51c: 9b 3f 00 a0 stb r25,160(r31) ffc0c520: 7f e3 fb 78 mr r3,r31 the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0c524: 90 1f 00 a8 stw r0,168(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0c528: 80 01 00 3c lwz r0,60(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; ffc0c52c: 93 1f 00 a4 stw r24,164(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0c530: 90 1f 00 ac stw r0,172(r31) the_thread->current_state = STATES_DORMANT; ffc0c534: 38 00 00 01 li r0,1 ffc0c538: 90 1f 00 10 stw r0,16(r31) ffc0c53c: 80 09 20 f8 lwz r0,8440(r9) the_thread->Wait.queue = NULL; ffc0c540: 93 df 00 44 stw r30,68(r31) ffc0c544: 7c 09 03 a6 mtctr r0 the_thread->resource_count = 0; ffc0c548: 93 df 00 1c stw r30,28(r31) the_thread->real_priority = priority; ffc0c54c: 93 5f 00 18 stw r26,24(r31) the_thread->Start.initial_priority = priority; ffc0c550: 93 5f 00 b0 stw r26,176(r31) ffc0c554: 4e 80 04 21 bctrl sched =_Scheduler_Allocate( the_thread ); if ( !sched ) ffc0c558: 7c 79 1b 79 mr. r25,r3 ffc0c55c: 41 82 00 40 beq- ffc0c59c <_Thread_Initialize+0x15c> goto failed; _Thread_Set_priority( the_thread, priority ); ffc0c560: 7f e3 fb 78 mr r3,r31 ffc0c564: 7f 44 d3 78 mr r4,r26 ffc0c568: 48 00 08 61 bl ffc0cdc8 <_Thread_Set_priority> Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( ffc0c56c: a0 1f 00 0a lhz r0,10(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0c570: 81 3c 00 1c lwz r9,28(r28) * 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 ); ffc0c574: 7f e3 fb 78 mr r3,r31 ffc0c578: 54 00 10 3a rlwinm r0,r0,2,0,29 /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); ffc0c57c: 93 df 00 84 stw r30,132(r31) ffc0c580: 93 df 00 88 stw r30,136(r31) ffc0c584: 7f e9 01 2e stwx r31,r9,r0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0c588: 92 ff 00 0c stw r23,12(r31) * 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 ); ffc0c58c: 48 00 0e 31 bl ffc0d3bc <_User_extensions_Thread_create> if ( extension_status ) ffc0c590: 2f 83 00 00 cmpwi cr7,r3,0 return true; ffc0c594: 38 60 00 01 li r3,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 ) ffc0c598: 40 9e 00 40 bne- cr7,ffc0c5d8 <_Thread_Initialize+0x198> return true; failed: _Workspace_Free( the_thread->libc_reent ); ffc0c59c: 80 7f 01 28 lwz r3,296(r31) ffc0c5a0: 48 00 14 89 bl ffc0da28 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); ffc0c5a4: 80 7f 01 2c lwz r3,300(r31) ffc0c5a8: 48 00 14 81 bl ffc0da28 <_Workspace_Free> ffc0c5ac: 80 7f 01 30 lwz r3,304(r31) ffc0c5b0: 48 00 14 79 bl ffc0da28 <_Workspace_Free> _Workspace_Free( extensions_area ); ffc0c5b4: 7f 63 db 78 mr r3,r27 ffc0c5b8: 48 00 14 71 bl ffc0da28 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); ffc0c5bc: 7f a3 eb 78 mr r3,r29 ffc0c5c0: 48 00 14 69 bl ffc0da28 <_Workspace_Free> #endif _Workspace_Free( sched ); ffc0c5c4: 7f 23 cb 78 mr r3,r25 ffc0c5c8: 48 00 14 61 bl ffc0da28 <_Workspace_Free> _Thread_Stack_Free( the_thread ); ffc0c5cc: 7f e3 fb 78 mr r3,r31 ffc0c5d0: 48 00 09 a5 bl ffc0cf74 <_Thread_Stack_Free> return false; ffc0c5d4: 38 60 00 00 li r3,0 } ffc0c5d8: 80 01 00 34 lwz r0,52(r1) ffc0c5dc: 82 e1 00 0c lwz r23,12(r1) ffc0c5e0: 7c 08 03 a6 mtlr r0 ffc0c5e4: 83 01 00 10 lwz r24,16(r1) ffc0c5e8: 83 21 00 14 lwz r25,20(r1) ffc0c5ec: 83 41 00 18 lwz r26,24(r1) ffc0c5f0: 83 61 00 1c lwz r27,28(r1) ffc0c5f4: 83 81 00 20 lwz r28,32(r1) ffc0c5f8: 83 a1 00 24 lwz r29,36(r1) ffc0c5fc: 83 c1 00 28 lwz r30,40(r1) ffc0c600: 83 e1 00 2c lwz r31,44(r1) ffc0c604: 38 21 00 30 addi r1,r1,48 ffc0c608: 4e 80 00 20 blr /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); ffc0c60c: 38 60 01 08 li r3,264 ffc0c610: 48 00 13 e5 bl ffc0d9f4 <_Workspace_Allocate> if ( !fp_area ) ffc0c614: 7c 7d 1b 79 mr. r29,r3 ffc0c618: 40 82 fe c4 bne+ ffc0c4dc <_Thread_Initialize+0x9c> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0c61c: 3b 60 00 00 li r27,0 size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; ffc0c620: 3b 20 00 00 li r25,0 ffc0c624: 4b ff ff 78 b ffc0c59c <_Thread_Initialize+0x15c> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( ffc0c628: 39 29 00 01 addi r9,r9,1 ffc0c62c: 55 23 10 3a rlwinm r3,r9,2,0,29 ffc0c630: 48 00 13 c5 bl ffc0d9f4 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0c634: 7c 7b 1b 79 mr. r27,r3 ffc0c638: 41 82 00 40 beq- ffc0c678 <_Thread_Initialize+0x238> goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c63c: 93 7f 01 34 stw r27,308(r31) ffc0c640: 7f 6b db 78 mr r11,r27 * 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++ ) ffc0c644: 38 00 00 00 li r0,0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c648: 81 1e 27 e8 lwz r8,10216(r30) ffc0c64c: 39 20 00 00 li r9,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; ffc0c650: 39 40 00 00 li r10,0 ffc0c654: 48 00 00 08 b ffc0c65c <_Thread_Initialize+0x21c> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c658: 81 7f 01 34 lwz r11,308(r31) * 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++ ) ffc0c65c: 39 29 00 01 addi r9,r9,1 ffc0c660: 7f 89 40 40 cmplw cr7,r9,r8 the_thread->extensions[i] = NULL; ffc0c664: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c668: 7d 4b 01 2e stwx r10,r11,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++ ) ffc0c66c: 7d 20 4b 78 mr r0,r9 ffc0c670: 40 9d ff e8 ble+ cr7,ffc0c658 <_Thread_Initialize+0x218> ffc0c674: 4b ff fe 9c b ffc0c510 <_Thread_Initialize+0xd0> size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; ffc0c678: 3b 20 00 00 li r25,0 ffc0c67c: 4b ff ff 20 b ffc0c59c <_Thread_Initialize+0x15c> =============================================================================== ffc0d894 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0d894: 94 21 ff e8 stwu r1,-24(r1) ffc0d898: 7c 08 02 a6 mflr r0 ffc0d89c: 90 01 00 1c stw r0,28(r1) */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); ffc0d8a0: 80 03 00 10 lwz r0,16(r3) ffc0d8a4: 93 e1 00 14 stw r31,20(r1) ffc0d8a8: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0d8ac: 70 09 00 01 andi. r9,r0,1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0d8b0: 93 c1 00 10 stw r30,16(r1) _Thread_Restart_self(); return true; } return false; ffc0d8b4: 38 00 00 00 li r0,0 Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0d8b8: 41 82 00 20 beq- ffc0d8d8 <_Thread_Restart+0x44> return true; } return false; } ffc0d8bc: 7c 03 03 78 mr r3,r0 ffc0d8c0: 80 01 00 1c lwz r0,28(r1) ffc0d8c4: 83 c1 00 10 lwz r30,16(r1) ffc0d8c8: 7c 08 03 a6 mtlr r0 ffc0d8cc: 83 e1 00 14 lwz r31,20(r1) ffc0d8d0: 38 21 00 18 addi r1,r1,24 ffc0d8d4: 4e 80 00 20 blr Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0d8d8: 90 81 00 08 stw r4,8(r1) RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0d8dc: 3f c0 00 00 lis r30,0 ffc0d8e0: 3b de 2d d8 addi r30,r30,11736 ffc0d8e4: 90 a1 00 0c stw r5,12(r1) ffc0d8e8: 48 00 01 05 bl ffc0d9ec <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0d8ec: 7f e3 fb 78 mr r3,r31 ffc0d8f0: 80 81 00 08 lwz r4,8(r1) ffc0d8f4: 80 a1 00 0c lwz r5,12(r1) ffc0d8f8: 48 00 3d cd bl ffc116c4 <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0d8fc: 7f e3 fb 78 mr r3,r31 ffc0d900: 48 00 3a 31 bl ffc11330 <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0d904: 7f e3 fb 78 mr r3,r31 ffc0d908: 48 00 3d 6d bl ffc11674 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); ffc0d90c: 7f e3 fb 78 mr r3,r31 ffc0d910: 48 00 07 69 bl ffc0e078 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) ffc0d914: 81 3e 00 0c lwz r9,12(r30) _Thread_Restart_self(); return true; ffc0d918: 38 00 00 01 li r0,1 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0d91c: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0d920: 40 9e ff 9c bne+ cr7,ffc0d8bc <_Thread_Restart+0x28> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) ffc0d924: 80 1f 01 24 lwz r0,292(r31) ffc0d928: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d92c: 41 9e 00 0c beq- cr7,ffc0d938 <_Thread_Restart+0xa4> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0d930: 38 7f 01 24 addi r3,r31,292 ffc0d934: 48 01 06 cd bl ffc1e000 <_CPU_Context_restore_fp> #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0d938: 80 7e 00 0c lwz r3,12(r30) ffc0d93c: 38 63 00 c4 addi r3,r3,196 ffc0d940: 48 01 08 81 bl ffc1e1c0 <_CPU_Context_restore> =============================================================================== ffc0cccc <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0cccc: 94 21 ff d8 stwu r1,-40(r1) ffc0ccd0: 7c 08 02 a6 mflr r0 ffc0ccd4: 93 e1 00 24 stw r31,36(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0ccd8: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0ccdc: 93 c1 00 20 stw r30,32(r1) ffc0cce0: 7c 9e 23 78 mr r30,r4 ffc0cce4: 90 01 00 2c stw r0,44(r1) ffc0cce8: 93 a1 00 1c stw r29,28(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0ccec: 41 82 00 10 beq- ffc0ccfc <_Thread_queue_Requeue+0x30> <== 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 ) { ffc0ccf0: 80 1f 00 34 lwz r0,52(r31) ffc0ccf4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ccf8: 41 9e 00 20 beq- cr7,ffc0cd18 <_Thread_queue_Requeue+0x4c><== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } ffc0ccfc: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0cd00: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0cd04: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0cd08: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0cd0c: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0cd10: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0cd14: 4e 80 00 20 blr <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0cd18: 7f a0 00 a6 mfmsr r29 ffc0cd1c: 7d 30 42 a6 mfsprg r9,0 ffc0cd20: 7f a9 48 78 andc r9,r29,r9 ffc0cd24: 7d 20 01 24 mtmsr r9 ffc0cd28: 3d 60 00 03 lis r11,3 ffc0cd2c: 81 24 00 10 lwz r9,16(r4) ffc0cd30: 61 6b be e0 ori r11,r11,48864 Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { ffc0cd34: 7d 6a 48 39 and. r10,r11,r9 ffc0cd38: 40 82 00 24 bne- ffc0cd5c <_Thread_queue_Requeue+0x90> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0cd3c: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } ffc0cd40: 80 01 00 2c lwz r0,44(r1) ffc0cd44: 83 a1 00 1c lwz r29,28(r1) ffc0cd48: 7c 08 03 a6 mtlr r0 ffc0cd4c: 83 c1 00 20 lwz r30,32(r1) ffc0cd50: 83 e1 00 24 lwz r31,36(r1) ffc0cd54: 38 21 00 28 addi r1,r1,40 ffc0cd58: 4e 80 00 20 blr 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; ffc0cd5c: 90 1f 00 30 stw r0,48(r31) 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 ); ffc0cd60: 38 a0 00 01 li r5,1 ffc0cd64: 48 00 3b a5 bl ffc10908 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0cd68: 7f e3 fb 78 mr r3,r31 ffc0cd6c: 7f c4 f3 78 mr r4,r30 ffc0cd70: 38 a1 00 08 addi r5,r1,8 ffc0cd74: 4b ff fc 81 bl ffc0c9f4 <_Thread_queue_Enqueue_priority> ffc0cd78: 7f a0 01 24 mtmsr r29 ffc0cd7c: 4b ff ff c4 b ffc0cd40 <_Thread_queue_Requeue+0x74> =============================================================================== ffc0cd80 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0cd80: 94 21 ff e8 stwu r1,-24(r1) ffc0cd84: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0cd88: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0cd8c: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0cd90: 4b ff f5 e1 bl ffc0c370 <_Thread_Get> switch ( location ) { ffc0cd94: 80 01 00 08 lwz r0,8(r1) ffc0cd98: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cd9c: 40 9e 00 1c bne- cr7,ffc0cdb8 <_Thread_queue_Timeout+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); ffc0cda0: 48 00 3c 69 bl ffc10a08 <_Thread_queue_Process_timeout> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc0cda4: 3d 20 00 00 lis r9,0 ffc0cda8: 81 69 27 c8 lwz r11,10184(r9) ffc0cdac: 38 0b ff ff addi r0,r11,-1 ffc0cdb0: 90 09 27 c8 stw r0,10184(r9) return _Thread_Dispatch_disable_level; ffc0cdb4: 80 09 27 c8 lwz r0,10184(r9) _Thread_Unnest_dispatch(); break; } } ffc0cdb8: 80 01 00 1c lwz r0,28(r1) ffc0cdbc: 38 21 00 18 addi r1,r1,24 ffc0cdc0: 7c 08 03 a6 mtlr r0 ffc0cdc4: 4e 80 00 20 blr =============================================================================== ffc1c394 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1c394: 94 21 ff 98 stwu r1,-104(r1) ffc1c398: 7c 08 02 a6 mflr r0 ffc1c39c: 92 a1 00 3c stw r21,60(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1c3a0: 3a a1 00 14 addi r21,r1,20 ffc1c3a4: 90 01 00 6c stw r0,108(r1) head->previous = NULL; ffc1c3a8: 38 00 00 00 li r0,0 ffc1c3ac: 92 e1 00 44 stw r23,68(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1c3b0: 3a e1 00 0c addi r23,r1,12 ffc1c3b4: 93 41 00 50 stw r26,80(r1) ffc1c3b8: 3b 41 00 18 addi r26,r1,24 ffc1c3bc: 93 81 00 58 stw r28,88(r1) head->previous = NULL; tail->previous = head; ffc1c3c0: 3b 81 00 08 addi r28,r1,8 ffc1c3c4: 92 81 00 38 stw r20,56(r1) ffc1c3c8: 3e 80 00 00 lis r20,0 ffc1c3cc: 3a 94 28 9c addi r20,r20,10396 ffc1c3d0: 93 01 00 48 stw r24,72(r1) ffc1c3d4: 3f 00 00 00 lis r24,0 ffc1c3d8: 3b 18 28 d0 addi r24,r24,10448 ffc1c3dc: 93 21 00 4c stw r25,76(r1) ffc1c3e0: 3f 20 00 00 lis r25,0 ffc1c3e4: 3b 39 28 b4 addi r25,r25,10420 ffc1c3e8: 93 c1 00 60 stw r30,96(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1c3ec: 93 41 00 14 stw r26,20(r1) head->previous = NULL; ffc1c3f0: 90 01 00 18 stw r0,24(r1) tail->previous = head; ffc1c3f4: 92 a1 00 1c stw r21,28(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1c3f8: 92 e1 00 08 stw r23,8(r1) head->previous = NULL; ffc1c3fc: 90 01 00 0c stw r0,12(r1) tail->previous = head; ffc1c400: 93 81 00 10 stw r28,16(r1) ffc1c404: 92 01 00 28 stw r16,40(r1) ffc1c408: 3a 03 00 08 addi r16,r3,8 ffc1c40c: 92 21 00 2c stw r17,44(r1) ffc1c410: 3a 23 00 40 addi r17,r3,64 ffc1c414: 92 41 00 30 stw r18,48(r1) * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; ffc1c418: 3a 40 00 00 li r18,0 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1c41c: 92 61 00 34 stw r19,52(r1) _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; ffc1c420: 3a 60 00 01 li r19,1 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1c424: 92 c1 00 40 stw r22,64(r1) * 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; ffc1c428: 3a c0 00 00 li r22,0 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1c42c: 93 61 00 54 stw r27,84(r1) ffc1c430: 3b 63 00 68 addi r27,r3,104 ffc1c434: 93 a1 00 5c stw r29,92(r1) ffc1c438: 3b a3 00 30 addi r29,r3,48 ffc1c43c: 93 e1 00 64 stw r31,100(r1) ffc1c440: 7c 7f 1b 78 mr r31,r3 { /* * 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; ffc1c444: 92 bf 00 78 stw r21,120(r31) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c448: 7f 85 e3 78 mr r5,r28 ffc1c44c: 7f a3 eb 78 mr r3,r29 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1c450: 80 18 00 00 lwz r0,0(r24) /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1c454: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; ffc1c458: 90 1f 00 3c stw r0,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c45c: 7c 84 00 50 subf r4,r4,r0 ffc1c460: 48 00 57 91 bl ffc21bf0 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1c464: 83 d9 00 00 lwz r30,0(r25) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1c468: 80 bf 00 74 lwz r5,116(r31) /* * 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 ) { ffc1c46c: 7f 9e 28 40 cmplw cr7,r30,r5 ffc1c470: 41 9d 00 98 bgt- cr7,ffc1c508 <_Timer_server_Body+0x174> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { ffc1c474: 41 9c 00 a8 blt- cr7,ffc1c51c <_Timer_server_Body+0x188> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; ffc1c478: 93 df 00 74 stw r30,116(r31) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1c47c: 80 7f 00 78 lwz r3,120(r31) ffc1c480: 48 00 0e 35 bl ffc1d2b4 <_Chain_Get> if ( timer == NULL ) { ffc1c484: 7c 64 1b 79 mr. r4,r3 ffc1c488: 41 82 00 34 beq- ffc1c4bc <_Timer_server_Body+0x128> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1c48c: 80 04 00 38 lwz r0,56(r4) ffc1c490: 2f 80 00 01 cmpwi cr7,r0,1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1c494: 2f 00 00 03 cmpwi cr6,r0,3 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1c498: 41 9e 00 98 beq- cr7,ffc1c530 <_Timer_server_Body+0x19c> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1c49c: 40 9a ff e0 bne+ cr6,ffc1c47c <_Timer_server_Body+0xe8> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1c4a0: 38 84 00 10 addi r4,r4,16 ffc1c4a4: 7f 63 db 78 mr r3,r27 ffc1c4a8: 48 00 58 01 bl ffc21ca8 <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1c4ac: 80 7f 00 78 lwz r3,120(r31) ffc1c4b0: 48 00 0e 05 bl ffc1d2b4 <_Chain_Get> if ( timer == NULL ) { ffc1c4b4: 7c 64 1b 79 mr. r4,r3 ffc1c4b8: 40 82 ff d4 bne+ ffc1c48c <_Timer_server_Body+0xf8> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1c4bc: 7d 20 00 a6 mfmsr r9 ffc1c4c0: 7c 10 42 a6 mfsprg r0,0 ffc1c4c4: 7d 20 00 78 andc r0,r9,r0 ffc1c4c8: 7c 00 01 24 mtmsr r0 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ffc1c4cc: 80 01 00 14 lwz r0,20(r1) ffc1c4d0: 7f 80 d0 00 cmpw cr7,r0,r26 ffc1c4d4: 41 9e 00 6c beq- cr7,ffc1c540 <_Timer_server_Body+0x1ac><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1c4d8: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1c4dc: 80 18 00 00 lwz r0,0(r24) <== NOT EXECUTED */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c4e0: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1c4e4: 80 9f 00 3c lwz r4,60(r31) <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c4e8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc1c4ec: 90 1f 00 3c stw r0,60(r31) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c4f0: 7c 84 00 50 subf r4,r4,r0 <== NOT EXECUTED ffc1c4f4: 48 00 56 fd bl ffc21bf0 <_Watchdog_Adjust_to_chain> <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1c4f8: 83 d9 00 00 lwz r30,0(r25) <== NOT EXECUTED Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1c4fc: 80 bf 00 74 lwz r5,116(r31) <== NOT EXECUTED /* * 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 ) { ffc1c500: 7f 9e 28 40 cmplw cr7,r30,r5 <== NOT EXECUTED ffc1c504: 40 9d ff 70 ble+ cr7,ffc1c474 <_Timer_server_Body+0xe0> <== NOT EXECUTED /* * 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 ); ffc1c508: 7c 85 f0 50 subf r4,r5,r30 ffc1c50c: 7f 63 db 78 mr r3,r27 ffc1c510: 7f 85 e3 78 mr r5,r28 ffc1c514: 48 00 56 dd bl ffc21bf0 <_Watchdog_Adjust_to_chain> ffc1c518: 4b ff ff 60 b ffc1c478 <_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 ); ffc1c51c: 7f 63 db 78 mr r3,r27 ffc1c520: 38 80 00 01 li r4,1 ffc1c524: 7c be 28 50 subf r5,r30,r5 ffc1c528: 48 00 55 ad bl ffc21ad4 <_Watchdog_Adjust> ffc1c52c: 4b ff ff 4c b ffc1c478 <_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 ); ffc1c530: 7f a3 eb 78 mr r3,r29 ffc1c534: 38 84 00 10 addi r4,r4,16 ffc1c538: 48 00 57 71 bl ffc21ca8 <_Watchdog_Insert> ffc1c53c: 4b ff ff 40 b ffc1c47c <_Timer_server_Body+0xe8> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; ffc1c540: 90 9f 00 78 stw r4,120(r31) ffc1c544: 7d 20 01 24 mtmsr r9 _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 ) ) { ffc1c548: 80 01 00 08 lwz r0,8(r1) ffc1c54c: 7f 80 b8 00 cmpw cr7,r0,r23 ffc1c550: 40 be 00 30 bne+ cr7,ffc1c580 <_Timer_server_Body+0x1ec> ffc1c554: 48 00 00 50 b ffc1c5a4 <_Timer_server_Body+0x210> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; ffc1c558: 81 69 00 00 lwz r11,0(r9) head->next = new_first; new_first->previous = head; ffc1c55c: 93 8b 00 04 stw r28,4(r11) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; ffc1c560: 91 61 00 08 stw r11,8(r1) * 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; ffc1c564: 92 c9 00 08 stw r22,8(r9) ffc1c568: 7c 00 01 24 mtmsr r0 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); ffc1c56c: 80 09 00 1c lwz r0,28(r9) ffc1c570: 80 69 00 20 lwz r3,32(r9) ffc1c574: 80 89 00 24 lwz r4,36(r9) ffc1c578: 7c 09 03 a6 mtctr r0 ffc1c57c: 4e 80 04 21 bctrl static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1c580: 7c 00 00 a6 mfmsr r0 ffc1c584: 7d 30 42 a6 mfsprg r9,0 ffc1c588: 7c 09 48 78 andc r9,r0,r9 ffc1c58c: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc1c590: 81 21 00 08 lwz r9,8(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) ffc1c594: 7f 89 b8 00 cmpw cr7,r9,r23 ffc1c598: 40 9e ff c0 bne+ cr7,ffc1c558 <_Timer_server_Body+0x1c4> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1c59c: 7c 00 01 24 mtmsr r0 ffc1c5a0: 4b ff fe a4 b ffc1c444 <_Timer_server_Body+0xb0> } } else { ts->active = false; ffc1c5a4: 9a 5f 00 7c stb r18,124(r31) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc1c5a8: 80 14 00 00 lwz r0,0(r20) ffc1c5ac: 30 00 00 01 addic r0,r0,1 ffc1c5b0: 90 14 00 00 stw r0,0(r20) return _Thread_Dispatch_disable_level; ffc1c5b4: 80 14 00 00 lwz r0,0(r20) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); ffc1c5b8: 80 7f 00 00 lwz r3,0(r31) ffc1c5bc: 38 80 00 08 li r4,8 ffc1c5c0: 48 00 4c 0d bl ffc211cc <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1c5c4: 7f e3 fb 78 mr r3,r31 ffc1c5c8: 4b ff fc a5 bl ffc1c26c <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1c5cc: 7f e3 fb 78 mr r3,r31 ffc1c5d0: 4b ff fd 31 bl ffc1c300 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); ffc1c5d4: 48 00 40 85 bl ffc20658 <_Thread_Enable_dispatch> ts->active = true; ffc1c5d8: 9a 7f 00 7c stb r19,124(r31) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc1c5dc: 7e 03 83 78 mr r3,r16 ffc1c5e0: 48 00 58 91 bl ffc21e70 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1c5e4: 7e 23 8b 78 mr r3,r17 ffc1c5e8: 48 00 58 89 bl ffc21e70 <_Watchdog_Remove> ffc1c5ec: 4b ff fe 58 b ffc1c444 <_Timer_server_Body+0xb0> =============================================================================== ffc1c5f0 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1c5f0: 94 21 ff f0 stwu r1,-16(r1) ffc1c5f4: 7c 08 02 a6 mflr r0 ffc1c5f8: 7c 89 23 78 mr r9,r4 ffc1c5fc: 90 01 00 14 stw r0,20(r1) if ( ts->insert_chain == NULL ) { ffc1c600: 80 03 00 78 lwz r0,120(r3) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1c604: 93 e1 00 0c stw r31,12(r1) ffc1c608: 7c 7f 1b 78 mr r31,r3 if ( ts->insert_chain == NULL ) { ffc1c60c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1c610: 41 9e 00 20 beq- cr7,ffc1c630 <_Timer_server_Schedule_operation_method+0x40> * 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 ); ffc1c614: 80 63 00 78 lwz r3,120(r3) ffc1c618: 48 00 0c 45 bl ffc1d25c <_Chain_Append> } } ffc1c61c: 80 01 00 14 lwz r0,20(r1) ffc1c620: 83 e1 00 0c lwz r31,12(r1) ffc1c624: 38 21 00 10 addi r1,r1,16 ffc1c628: 7c 08 03 a6 mtlr r0 ffc1c62c: 4e 80 00 20 blr * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc1c630: 3d 60 00 00 lis r11,0 ffc1c634: 81 4b 28 9c lwz r10,10396(r11) ffc1c638: 38 0a 00 01 addi r0,r10,1 ffc1c63c: 90 0b 28 9c stw r0,10396(r11) return _Thread_Dispatch_disable_level; ffc1c640: 80 0b 28 9c lwz r0,10396(r11) * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1c644: 80 04 00 38 lwz r0,56(r4) ffc1c648: 2f 80 00 01 cmpwi cr7,r0,1 ffc1c64c: 41 9e 00 ac beq- cr7,ffc1c6f8 <_Timer_server_Schedule_operation_method+0x108> _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 ) { ffc1c650: 2f 80 00 03 cmpwi cr7,r0,3 ffc1c654: 41 9e 00 1c beq- cr7,ffc1c670 <_Timer_server_Schedule_operation_method+0x80> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1c658: 48 00 40 01 bl ffc20658 <_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 ); } } ffc1c65c: 80 01 00 14 lwz r0,20(r1) ffc1c660: 83 e1 00 0c lwz r31,12(r1) ffc1c664: 38 21 00 10 addi r1,r1,16 ffc1c668: 7c 08 03 a6 mtlr r0 ffc1c66c: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1c670: 7c c0 00 a6 mfmsr r6 ffc1c674: 7c 10 42 a6 mfsprg r0,0 ffc1c678: 7c c0 00 78 andc r0,r6,r0 ffc1c67c: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc1c680: 81 63 00 68 lwz r11,104(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc1c684: 38 03 00 6c addi r0,r3,108 /* * 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(); ffc1c688: 3d 40 00 00 lis r10,0 last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1c68c: 7f 8b 00 00 cmpw cr7,r11,r0 /* * 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(); ffc1c690: 80 0a 28 b4 lwz r0,10420(r10) last_snapshot = ts->TOD_watchdogs.last_snapshot; ffc1c694: 81 43 00 74 lwz r10,116(r3) if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1c698: 41 9e 00 30 beq- cr7,ffc1c6c8 <_Timer_server_Schedule_operation_method+0xd8> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc1c69c: 7f 80 50 40 cmplw cr7,r0,r10 _ISR_Disable( level ); 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; ffc1c6a0: 80 eb 00 10 lwz r7,16(r11) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; ffc1c6a4: 7d 07 52 14 add r8,r7,r10 delta_interval += delta; ffc1c6a8: 7d 00 40 50 subf r8,r0,r8 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 ) { ffc1c6ac: 40 9d 00 18 ble- cr7,ffc1c6c4 <_Timer_server_Schedule_operation_method+0xd4> /* * We advanced in time. */ delta = snapshot - last_snapshot; ffc1c6b0: 7d 4a 00 50 subf r10,r10,r0 if (delta_interval > delta) { ffc1c6b4: 7f 87 50 40 cmplw cr7,r7,r10 delta_interval -= delta; } else { delta_interval = 0; ffc1c6b8: 39 00 00 00 li r8,0 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { ffc1c6bc: 40 9d 00 08 ble- cr7,ffc1c6c4 <_Timer_server_Schedule_operation_method+0xd4><== NEVER TAKEN delta_interval -= delta; ffc1c6c0: 7d 0a 38 50 subf r8,r10,r7 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; ffc1c6c4: 91 0b 00 10 stw r8,16(r11) } ts->TOD_watchdogs.last_snapshot = snapshot; ffc1c6c8: 90 1f 00 74 stw r0,116(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1c6cc: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1c6d0: 38 7f 00 68 addi r3,r31,104 ffc1c6d4: 38 89 00 10 addi r4,r9,16 ffc1c6d8: 48 00 55 d1 bl ffc21ca8 <_Watchdog_Insert> if ( !ts->active ) { ffc1c6dc: 88 1f 00 7c lbz r0,124(r31) ffc1c6e0: 2f 80 00 00 cmpwi cr7,r0,0 ffc1c6e4: 40 9e ff 74 bne+ cr7,ffc1c658 <_Timer_server_Schedule_operation_method+0x68> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1c6e8: 7f e3 fb 78 mr r3,r31 ffc1c6ec: 4b ff fc 15 bl ffc1c300 <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); ffc1c6f0: 48 00 3f 69 bl ffc20658 <_Thread_Enable_dispatch> ffc1c6f4: 4b ff ff 68 b ffc1c65c <_Timer_server_Schedule_operation_method+0x6c> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1c6f8: 7c c0 00 a6 mfmsr r6 ffc1c6fc: 7c 10 42 a6 mfsprg r0,0 ffc1c700: 7c c0 00 78 andc r0,r6,r0 ffc1c704: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc1c708: 81 63 00 30 lwz r11,48(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc1c70c: 38 03 00 34 addi r0,r3,52 /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; ffc1c710: 3d 40 00 00 lis r10,0 last_snapshot = ts->Interval_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1c714: 7f 8b 00 00 cmpw cr7,r11,r0 /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; ffc1c718: 80 0a 28 d0 lwz r0,10448(r10) last_snapshot = ts->Interval_watchdogs.last_snapshot; ffc1c71c: 81 03 00 3c lwz r8,60(r3) if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1c720: 41 9e 00 20 beq- cr7,ffc1c740 <_Timer_server_Schedule_operation_method+0x150> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; ffc1c724: 80 eb 00 10 lwz r7,16(r11) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; ffc1c728: 7d 08 00 50 subf r8,r8,r0 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; ffc1c72c: 39 40 00 00 li r10,0 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { ffc1c730: 7f 88 38 40 cmplw cr7,r8,r7 ffc1c734: 40 9c 00 08 bge- cr7,ffc1c73c <_Timer_server_Schedule_operation_method+0x14c> delta_interval -= delta; ffc1c738: 7d 48 38 50 subf r10,r8,r7 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; ffc1c73c: 91 4b 00 10 stw r10,16(r11) } ts->Interval_watchdogs.last_snapshot = snapshot; ffc1c740: 90 1f 00 3c stw r0,60(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1c744: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1c748: 38 7f 00 30 addi r3,r31,48 ffc1c74c: 38 89 00 10 addi r4,r9,16 ffc1c750: 48 00 55 59 bl ffc21ca8 <_Watchdog_Insert> if ( !ts->active ) { ffc1c754: 88 1f 00 7c lbz r0,124(r31) ffc1c758: 2f 80 00 00 cmpwi cr7,r0,0 ffc1c75c: 40 9e fe fc bne+ cr7,ffc1c658 <_Timer_server_Schedule_operation_method+0x68> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1c760: 7f e3 fb 78 mr r3,r31 ffc1c764: 4b ff fb 09 bl ffc1c26c <_Timer_server_Reset_interval_system_watchdog> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1c768: 48 00 3e f1 bl ffc20658 <_Thread_Enable_dispatch> ffc1c76c: 4b ff fe f0 b ffc1c65c <_Timer_server_Schedule_operation_method+0x6c> =============================================================================== ffc0d094 <_Timespec_Add_to>: { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0d094: 81 03 00 04 lwz r8,4(r3) uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { ffc0d098: 7c 69 1b 78 mr r9,r3 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0d09c: 80 04 00 04 lwz r0,4(r4) uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; ffc0d0a0: 80 64 00 00 lwz r3,0(r4) /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0d0a4: 7d 08 02 14 add r8,r8,r0 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0d0a8: 81 49 00 00 lwz r10,0(r9) time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0d0ac: 3c 00 3b 9a lis r0,15258 { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0d0b0: 91 09 00 04 stw r8,4(r9) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0d0b4: 60 00 c9 ff ori r0,r0,51711 ffc0d0b8: 7f 88 00 40 cmplw cr7,r8,r0 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0d0bc: 7d 4a 1a 14 add r10,r10,r3 time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0d0c0: 7d 0b 43 78 mr r11,r8 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0d0c4: 91 49 00 00 stw r10,0(r9) time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0d0c8: 4c 9d 00 20 blelr cr7 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ffc0d0cc: 3d 6b c4 65 addis r11,r11,-15259 ffc0d0d0: 39 6b 36 00 addi r11,r11,13824 /* 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 ) { ffc0d0d4: 7f 8b 00 40 cmplw cr7,r11,r0 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; ffc0d0d8: 39 4a 00 01 addi r10,r10,1 seconds++; ffc0d0dc: 38 63 00 01 addi r3,r3,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 ) { ffc0d0e0: 41 9d ff ec bgt+ cr7,ffc0d0cc <_Timespec_Add_to+0x38> <== NEVER TAKEN ffc0d0e4: 91 69 00 04 stw r11,4(r9) ffc0d0e8: 91 49 00 00 stw r10,0(r9) time->tv_sec++; seconds++; } return seconds; } ffc0d0ec: 4e 80 00 20 blr =============================================================================== ffc0ee28 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) ffc0ee28: 81 63 00 00 lwz r11,0(r3) bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { ffc0ee2c: 7c 69 1b 78 mr r9,r3 if ( lhs->tv_sec < rhs->tv_sec ) ffc0ee30: 80 04 00 00 lwz r0,0(r4) return true; ffc0ee34: 38 60 00 01 li r3,1 bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) ffc0ee38: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0ee3c: 4d 9c 00 20 bltlr cr7 return true; if ( lhs->tv_sec > rhs->tv_sec ) ffc0ee40: 41 9d 00 1c bgt- cr7,ffc0ee5c <_Timespec_Less_than+0x34><== NEVER TAKEN #include #include #include bool _Timespec_Less_than( ffc0ee44: 81 29 00 04 lwz r9,4(r9) ffc0ee48: 80 04 00 04 lwz r0,4(r4) ffc0ee4c: 7f 89 00 00 cmpw cr7,r9,r0 ffc0ee50: 7c 60 00 26 mfcr r3 ffc0ee54: 54 63 ef fe rlwinm r3,r3,29,31,31 ffc0ee58: 4e 80 00 20 blr { if ( lhs->tv_sec < rhs->tv_sec ) return true; if ( lhs->tv_sec > rhs->tv_sec ) return false; ffc0ee5c: 38 60 00 00 li r3,0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } ffc0ee60: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0d32c <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0d32c: 94 21 ff e0 stwu r1,-32(r1) ffc0d330: 7c 08 02 a6 mflr r0 ffc0d334: 93 c1 00 18 stw r30,24(r1) ffc0d338: 3f c0 00 00 lis r30,0 ffc0d33c: 3b de 2d 74 addi r30,r30,11636 ffc0d340: 93 e1 00 1c stw r31,28(r1) ffc0d344: 83 fe 00 08 lwz r31,8(r30) ffc0d348: 93 61 00 0c stw r27,12(r1) ffc0d34c: 7c 7b 1b 78 mr r27,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d350: 7f 9f f0 00 cmpw cr7,r31,r30 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0d354: 93 81 00 10 stw r28,16(r1) ffc0d358: 7c 9c 23 78 mr r28,r4 ffc0d35c: 93 a1 00 14 stw r29,20(r1) ffc0d360: 7c bd 2b 78 mr r29,r5 ffc0d364: 90 01 00 24 stw r0,36(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d368: 41 9e 00 30 beq- cr7,ffc0d398 <_User_extensions_Fatal+0x6c><== 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 ) ffc0d36c: 80 1f 00 30 lwz r0,48(r31) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d370: 7f 63 db 78 mr r3,r27 ffc0d374: 7f 84 e3 78 mr r4,r28 !_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 ) ffc0d378: 2f 80 00 00 cmpwi cr7,r0,0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d37c: 7f a5 eb 78 mr r5,r29 !_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 ) ffc0d380: 41 9e 00 0c beq- cr7,ffc0d38c <_User_extensions_Fatal+0x60> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d384: 7c 09 03 a6 mtctr r0 ffc0d388: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0d38c: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d390: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d394: 40 9e ff d8 bne+ cr7,ffc0d36c <_User_extensions_Fatal+0x40> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0d398: 80 01 00 24 lwz r0,36(r1) ffc0d39c: 83 61 00 0c lwz r27,12(r1) ffc0d3a0: 7c 08 03 a6 mtlr r0 ffc0d3a4: 83 81 00 10 lwz r28,16(r1) ffc0d3a8: 83 a1 00 14 lwz r29,20(r1) ffc0d3ac: 83 c1 00 18 lwz r30,24(r1) ffc0d3b0: 83 e1 00 1c lwz r31,28(r1) ffc0d3b4: 38 21 00 20 addi r1,r1,32 ffc0d3b8: 4e 80 00 20 blr =============================================================================== ffc0d13c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d13c: 94 21 ff e8 stwu r1,-24(r1) ffc0d140: 7c 08 02 a6 mflr r0 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; ffc0d144: 3c e0 00 00 lis r7,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d148: 90 01 00 1c stw r0,28(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; ffc0d14c: 38 e7 20 04 addi r7,r7,8196 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0d150: 3d 00 00 00 lis r8,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d154: 93 a1 00 0c stw r29,12(r1) ffc0d158: 3d 40 00 00 lis r10,0 ffc0d15c: 39 68 2d 74 addi r11,r8,11636 uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; initial_extensions = Configuration.User_extension_table; ffc0d160: 83 a7 00 3c lwz r29,60(r7) ffc0d164: 39 2a 2c 50 addi r9,r10,11344 head->previous = NULL; ffc0d168: 38 00 00 00 li r0,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d16c: 93 c1 00 10 stw r30,16(r1) initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0d170: 2f 9d 00 00 cmpwi cr7,r29,0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0d174: 38 ab 00 04 addi r5,r11,4 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d178: 93 81 00 08 stw r28,8(r1) ffc0d17c: 38 c9 00 04 addi r6,r9,4 ffc0d180: 93 e1 00 14 stw r31,20(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; ffc0d184: 83 c7 00 38 lwz r30,56(r7) ffc0d188: 90 a8 2d 74 stw r5,11636(r8) head->previous = NULL; ffc0d18c: 90 0b 00 04 stw r0,4(r11) tail->previous = head; ffc0d190: 91 6b 00 08 stw r11,8(r11) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0d194: 90 ca 2c 50 stw r6,11344(r10) head->previous = NULL; ffc0d198: 90 09 00 04 stw r0,4(r9) tail->previous = head; ffc0d19c: 91 29 00 08 stw r9,8(r9) initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0d1a0: 41 9e 00 88 beq- cr7,ffc0d228 <_User_extensions_Handler_initialization+0xec><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ffc0d1a4: 1f 9e 00 34 mulli r28,r30,52 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) ffc0d1a8: 7f 83 e3 78 mr r3,r28 ffc0d1ac: 48 00 08 a9 bl ffc0da54 <_Workspace_Allocate_or_fatal_error> _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0d1b0: 38 80 00 00 li r4,0 ffc0d1b4: 7f 85 e3 78 mr r5,r28 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) ffc0d1b8: 7c 7f 1b 78 mr r31,r3 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0d1bc: 48 00 66 c5 bl ffc13880 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0d1c0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0d1c4: 41 9e 00 64 beq- cr7,ffc0d228 <_User_extensions_Handler_initialization+0xec><== NEVER TAKEN ffc0d1c8: 3b 80 00 00 li r28,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; ffc0d1cc: 81 5d 00 00 lwz r10,0(r29) _User_extensions_Add_set( extension ); ffc0d1d0: 7f e3 fb 78 mr r3,r31 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0d1d4: 81 7d 00 04 lwz r11,4(r29) ffc0d1d8: 3b 9c 00 01 addi r28,r28,1 ffc0d1dc: 81 3d 00 08 lwz r9,8(r29) ffc0d1e0: 80 1d 00 0c lwz r0,12(r29) ffc0d1e4: 91 5f 00 14 stw r10,20(r31) ffc0d1e8: 91 7f 00 18 stw r11,24(r31) ffc0d1ec: 91 3f 00 1c stw r9,28(r31) ffc0d1f0: 90 1f 00 20 stw r0,32(r31) ffc0d1f4: 81 5d 00 10 lwz r10,16(r29) ffc0d1f8: 81 7d 00 14 lwz r11,20(r29) ffc0d1fc: 81 3d 00 18 lwz r9,24(r29) ffc0d200: 80 1d 00 1c lwz r0,28(r29) ffc0d204: 3b bd 00 20 addi r29,r29,32 ffc0d208: 91 5f 00 24 stw r10,36(r31) ffc0d20c: 91 7f 00 28 stw r11,40(r31) ffc0d210: 91 3f 00 2c stw r9,44(r31) ffc0d214: 90 1f 00 30 stw r0,48(r31) _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; ffc0d218: 3b ff 00 34 addi r31,r31,52 _User_extensions_Add_set( extension ); ffc0d21c: 48 00 38 a5 bl ffc10ac0 <_User_extensions_Add_set> extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0d220: 7f 9c f0 00 cmpw cr7,r28,r30 ffc0d224: 40 9e ff a8 bne+ cr7,ffc0d1cc <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } ffc0d228: 80 01 00 1c lwz r0,28(r1) ffc0d22c: 83 81 00 08 lwz r28,8(r1) ffc0d230: 7c 08 03 a6 mtlr r0 ffc0d234: 83 a1 00 0c lwz r29,12(r1) ffc0d238: 83 c1 00 10 lwz r30,16(r1) ffc0d23c: 83 e1 00 14 lwz r31,20(r1) ffc0d240: 38 21 00 18 addi r1,r1,24 ffc0d244: 4e 80 00 20 blr =============================================================================== ffc0d248 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0d248: 94 21 ff e8 stwu r1,-24(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0d24c: 3d 20 00 00 lis r9,0 ffc0d250: 7c 08 02 a6 mflr r0 ffc0d254: 93 c1 00 10 stw r30,16(r1) ffc0d258: 3b c9 2d 74 addi r30,r9,11636 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d25c: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0d260: 93 e1 00 14 stw r31,20(r1) ffc0d264: 83 e9 2d 74 lwz r31,11636(r9) ffc0d268: 93 a1 00 0c stw r29,12(r1) ffc0d26c: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d270: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0d274: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d278: 41 9e 00 28 beq- cr7,ffc0d2a0 <_User_extensions_Thread_begin+0x58><== 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 ) ffc0d27c: 80 1f 00 28 lwz r0,40(r31) (*the_extension->Callouts.thread_begin)( executing ); ffc0d280: 7f a3 eb 78 mr r3,r29 !_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 ) ffc0d284: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d288: 41 9e 00 0c beq- cr7,ffc0d294 <_User_extensions_Thread_begin+0x4c> (*the_extension->Callouts.thread_begin)( executing ); ffc0d28c: 7c 09 03 a6 mtctr r0 ffc0d290: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0d294: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d298: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d29c: 40 9e ff e0 bne+ cr7,ffc0d27c <_User_extensions_Thread_begin+0x34> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } ffc0d2a0: 80 01 00 1c lwz r0,28(r1) ffc0d2a4: 83 a1 00 0c lwz r29,12(r1) ffc0d2a8: 7c 08 03 a6 mtlr r0 ffc0d2ac: 83 c1 00 10 lwz r30,16(r1) ffc0d2b0: 83 e1 00 14 lwz r31,20(r1) ffc0d2b4: 38 21 00 18 addi r1,r1,24 ffc0d2b8: 4e 80 00 20 blr =============================================================================== ffc0d3bc <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d3bc: 94 21 ff e8 stwu r1,-24(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0d3c0: 3d 20 00 00 lis r9,0 ffc0d3c4: 7c 08 02 a6 mflr r0 ffc0d3c8: 93 c1 00 10 stw r30,16(r1) ffc0d3cc: 3b c9 2d 74 addi r30,r9,11636 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d3d0: 3b de 00 04 addi r30,r30,4 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d3d4: 93 e1 00 14 stw r31,20(r1) ffc0d3d8: 83 e9 2d 74 lwz r31,11636(r9) ffc0d3dc: 93 a1 00 0c stw r29,12(r1) ffc0d3e0: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d3e4: 7f 9f f0 00 cmpw cr7,r31,r30 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d3e8: 90 01 00 1c stw r0,28(r1) if ( !status ) return false; } } return true; ffc0d3ec: 38 60 00 01 li r3,1 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d3f0: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d3f4: 41 9e 00 40 beq- cr7,ffc0d434 <_User_extensions_Thread_create+0x78><== 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)( ffc0d3f8: 3f 80 00 00 lis r28,0 !_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 ) { ffc0d3fc: 80 1f 00 14 lwz r0,20(r31) status = (*the_extension->Callouts.thread_create)( ffc0d400: 39 3c 2d b8 addi r9,r28,11704 ffc0d404: 7f a4 eb 78 mr r4,r29 !_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 ) { ffc0d408: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d40c: 41 9e 00 18 beq- cr7,ffc0d424 <_User_extensions_Thread_create+0x68> status = (*the_extension->Callouts.thread_create)( ffc0d410: 80 69 00 0c lwz r3,12(r9) ffc0d414: 7c 09 03 a6 mtctr r0 ffc0d418: 4e 80 04 21 bctrl _Thread_Executing, the_thread ); if ( !status ) ffc0d41c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d420: 41 9e 00 34 beq- cr7,ffc0d454 <_User_extensions_Thread_create+0x98> User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0d424: 83 ff 00 00 lwz r31,0(r31) { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d428: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d42c: 40 9e ff d0 bne+ cr7,ffc0d3fc <_User_extensions_Thread_create+0x40> if ( !status ) return false; } } return true; ffc0d430: 38 60 00 01 li r3,1 } ffc0d434: 80 01 00 1c lwz r0,28(r1) ffc0d438: 83 81 00 08 lwz r28,8(r1) ffc0d43c: 7c 08 03 a6 mtlr r0 ffc0d440: 83 a1 00 0c lwz r29,12(r1) ffc0d444: 83 c1 00 10 lwz r30,16(r1) ffc0d448: 83 e1 00 14 lwz r31,20(r1) ffc0d44c: 38 21 00 18 addi r1,r1,24 ffc0d450: 4e 80 00 20 blr ffc0d454: 80 01 00 1c lwz r0,28(r1) status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; ffc0d458: 38 60 00 00 li r3,0 } } return true; } ffc0d45c: 83 81 00 08 lwz r28,8(r1) ffc0d460: 7c 08 03 a6 mtlr r0 ffc0d464: 83 a1 00 0c lwz r29,12(r1) ffc0d468: 83 c1 00 10 lwz r30,16(r1) ffc0d46c: 83 e1 00 14 lwz r31,20(r1) ffc0d470: 38 21 00 18 addi r1,r1,24 ffc0d474: 4e 80 00 20 blr =============================================================================== ffc0d478 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d478: 94 21 ff e8 stwu r1,-24(r1) ffc0d47c: 7c 08 02 a6 mflr r0 ffc0d480: 93 c1 00 10 stw r30,16(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; ffc0d484: 3f c0 00 00 lis r30,0 ffc0d488: 3b de 2d 74 addi r30,r30,11636 ffc0d48c: 93 e1 00 14 stw r31,20(r1) ffc0d490: 83 fe 00 08 lwz r31,8(r30) ffc0d494: 93 a1 00 0c stw r29,12(r1) ffc0d498: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d49c: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d4a0: 90 01 00 1c stw r0,28(r1) ffc0d4a4: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d4a8: 41 9e 00 34 beq- cr7,ffc0d4dc <_User_extensions_Thread_delete+0x64><== 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)( ffc0d4ac: 3f 80 00 00 lis r28,0 !_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 ) ffc0d4b0: 80 1f 00 20 lwz r0,32(r31) (*the_extension->Callouts.thread_delete)( ffc0d4b4: 39 3c 2d b8 addi r9,r28,11704 ffc0d4b8: 7f a4 eb 78 mr r4,r29 !_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 ) ffc0d4bc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d4c0: 41 9e 00 10 beq- cr7,ffc0d4d0 <_User_extensions_Thread_delete+0x58> (*the_extension->Callouts.thread_delete)( ffc0d4c4: 80 69 00 0c lwz r3,12(r9) ffc0d4c8: 7c 09 03 a6 mtctr r0 ffc0d4cc: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0d4d0: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d4d4: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d4d8: 40 9e ff d8 bne+ cr7,ffc0d4b0 <_User_extensions_Thread_delete+0x38> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } ffc0d4dc: 80 01 00 1c lwz r0,28(r1) ffc0d4e0: 83 81 00 08 lwz r28,8(r1) ffc0d4e4: 7c 08 03 a6 mtlr r0 ffc0d4e8: 83 a1 00 0c lwz r29,12(r1) ffc0d4ec: 83 c1 00 10 lwz r30,16(r1) ffc0d4f0: 83 e1 00 14 lwz r31,20(r1) ffc0d4f4: 38 21 00 18 addi r1,r1,24 ffc0d4f8: 4e 80 00 20 blr =============================================================================== ffc0d2bc <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0d2bc: 94 21 ff e8 stwu r1,-24(r1) ffc0d2c0: 7c 08 02 a6 mflr r0 ffc0d2c4: 93 c1 00 10 stw r30,16(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; ffc0d2c8: 3f c0 00 00 lis r30,0 ffc0d2cc: 3b de 2d 74 addi r30,r30,11636 ffc0d2d0: 93 e1 00 14 stw r31,20(r1) ffc0d2d4: 83 fe 00 08 lwz r31,8(r30) ffc0d2d8: 93 a1 00 0c stw r29,12(r1) ffc0d2dc: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d2e0: 7f 9f f0 00 cmpw cr7,r31,r30 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0d2e4: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d2e8: 41 9e 00 28 beq- cr7,ffc0d310 <_User_extensions_Thread_exitted+0x54><== 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 ) ffc0d2ec: 80 1f 00 2c lwz r0,44(r31) (*the_extension->Callouts.thread_exitted)( executing ); ffc0d2f0: 7f a3 eb 78 mr r3,r29 !_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 ) ffc0d2f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d2f8: 41 9e 00 0c beq- cr7,ffc0d304 <_User_extensions_Thread_exitted+0x48> (*the_extension->Callouts.thread_exitted)( executing ); ffc0d2fc: 7c 09 03 a6 mtctr r0 ffc0d300: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0d304: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d308: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d30c: 40 9e ff e0 bne+ cr7,ffc0d2ec <_User_extensions_Thread_exitted+0x30> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } ffc0d310: 80 01 00 1c lwz r0,28(r1) ffc0d314: 83 a1 00 0c lwz r29,12(r1) ffc0d318: 7c 08 03 a6 mtlr r0 ffc0d31c: 83 c1 00 10 lwz r30,16(r1) ffc0d320: 83 e1 00 14 lwz r31,20(r1) ffc0d324: 38 21 00 18 addi r1,r1,24 ffc0d328: 4e 80 00 20 blr =============================================================================== ffc0e078 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e078: 94 21 ff e8 stwu r1,-24(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0e07c: 3d 20 00 00 lis r9,0 ffc0e080: 7c 08 02 a6 mflr r0 ffc0e084: 93 c1 00 10 stw r30,16(r1) ffc0e088: 3b c9 2d 94 addi r30,r9,11668 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e08c: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e090: 93 e1 00 14 stw r31,20(r1) ffc0e094: 83 e9 2d 94 lwz r31,11668(r9) ffc0e098: 93 a1 00 0c stw r29,12(r1) ffc0e09c: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e0a0: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e0a4: 90 01 00 1c stw r0,28(r1) ffc0e0a8: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e0ac: 41 9e 00 34 beq- cr7,ffc0e0e0 <_User_extensions_Thread_restart+0x68><== 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)( ffc0e0b0: 3f 80 00 00 lis r28,0 !_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 ) ffc0e0b4: 80 1f 00 1c lwz r0,28(r31) (*the_extension->Callouts.thread_restart)( ffc0e0b8: 39 3c 2d d8 addi r9,r28,11736 ffc0e0bc: 7f a4 eb 78 mr r4,r29 !_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 ) ffc0e0c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e0c4: 41 9e 00 10 beq- cr7,ffc0e0d4 <_User_extensions_Thread_restart+0x5c> (*the_extension->Callouts.thread_restart)( ffc0e0c8: 80 69 00 0c lwz r3,12(r9) ffc0e0cc: 7c 09 03 a6 mtctr r0 ffc0e0d0: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0e0d4: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e0d8: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0e0dc: 40 9e ff d8 bne+ cr7,ffc0e0b4 <_User_extensions_Thread_restart+0x3c> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0e0e0: 80 01 00 1c lwz r0,28(r1) ffc0e0e4: 83 81 00 08 lwz r28,8(r1) ffc0e0e8: 7c 08 03 a6 mtlr r0 ffc0e0ec: 83 a1 00 0c lwz r29,12(r1) ffc0e0f0: 83 c1 00 10 lwz r30,16(r1) ffc0e0f4: 83 e1 00 14 lwz r31,20(r1) ffc0e0f8: 38 21 00 18 addi r1,r1,24 ffc0e0fc: 4e 80 00 20 blr =============================================================================== ffc0d4fc <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d4fc: 94 21 ff e8 stwu r1,-24(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0d500: 3d 20 00 00 lis r9,0 ffc0d504: 7c 08 02 a6 mflr r0 ffc0d508: 93 c1 00 10 stw r30,16(r1) ffc0d50c: 3b c9 2d 74 addi r30,r9,11636 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d510: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d514: 93 e1 00 14 stw r31,20(r1) ffc0d518: 83 e9 2d 74 lwz r31,11636(r9) ffc0d51c: 93 a1 00 0c stw r29,12(r1) ffc0d520: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d524: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d528: 90 01 00 1c stw r0,28(r1) ffc0d52c: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d530: 41 9e 00 34 beq- cr7,ffc0d564 <_User_extensions_Thread_start+0x68><== 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)( ffc0d534: 3f 80 00 00 lis r28,0 !_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 ) ffc0d538: 80 1f 00 18 lwz r0,24(r31) (*the_extension->Callouts.thread_start)( ffc0d53c: 39 3c 2d b8 addi r9,r28,11704 ffc0d540: 7f a4 eb 78 mr r4,r29 !_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 ) ffc0d544: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d548: 41 9e 00 10 beq- cr7,ffc0d558 <_User_extensions_Thread_start+0x5c> (*the_extension->Callouts.thread_start)( ffc0d54c: 80 69 00 0c lwz r3,12(r9) ffc0d550: 7c 09 03 a6 mtctr r0 ffc0d554: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0d558: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d55c: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d560: 40 9e ff d8 bne+ cr7,ffc0d538 <_User_extensions_Thread_start+0x3c> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0d564: 80 01 00 1c lwz r0,28(r1) ffc0d568: 83 81 00 08 lwz r28,8(r1) ffc0d56c: 7c 08 03 a6 mtlr r0 ffc0d570: 83 a1 00 0c lwz r29,12(r1) ffc0d574: 83 c1 00 10 lwz r30,16(r1) ffc0d578: 83 e1 00 14 lwz r31,20(r1) ffc0d57c: 38 21 00 18 addi r1,r1,24 ffc0d580: 4e 80 00 20 blr =============================================================================== ffc0d584 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d584: 94 21 ff e8 stwu r1,-24(r1) ffc0d588: 3d 20 00 00 lis r9,0 ffc0d58c: 7c 08 02 a6 mflr r0 ffc0d590: 93 c1 00 10 stw r30,16(r1) ffc0d594: 3b c9 2c 50 addi r30,r9,11344 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d598: 3b de 00 04 addi r30,r30,4 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d59c: 93 e1 00 14 stw r31,20(r1) ffc0d5a0: 83 e9 2c 50 lwz r31,11344(r9) ffc0d5a4: 93 81 00 08 stw r28,8(r1) ffc0d5a8: 7c 7c 1b 78 mr r28,r3 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d5ac: 7f 9f f0 00 cmpw cr7,r31,r30 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d5b0: 93 a1 00 0c stw r29,12(r1) ffc0d5b4: 7c 9d 23 78 mr r29,r4 ffc0d5b8: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d5bc: 41 9e 00 24 beq- cr7,ffc0d5e0 <_User_extensions_Thread_switch+0x5c><== 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 ); ffc0d5c0: 80 1f 00 08 lwz r0,8(r31) ffc0d5c4: 7f 83 e3 78 mr r3,r28 ffc0d5c8: 7f a4 eb 78 mr r4,r29 ffc0d5cc: 7c 09 03 a6 mtctr r0 ffc0d5d0: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { ffc0d5d4: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d5d8: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d5dc: 40 9e ff e4 bne+ cr7,ffc0d5c0 <_User_extensions_Thread_switch+0x3c> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0d5e0: 80 01 00 1c lwz r0,28(r1) ffc0d5e4: 83 81 00 08 lwz r28,8(r1) ffc0d5e8: 7c 08 03 a6 mtlr r0 ffc0d5ec: 83 a1 00 0c lwz r29,12(r1) ffc0d5f0: 83 c1 00 10 lwz r30,16(r1) ffc0d5f4: 83 e1 00 14 lwz r31,20(r1) ffc0d5f8: 38 21 00 18 addi r1,r1,24 ffc0d5fc: 4e 80 00 20 blr =============================================================================== ffc0f464 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0f464: 94 21 ff e0 stwu r1,-32(r1) ffc0f468: 7c 08 02 a6 mflr r0 ffc0f46c: 90 01 00 24 stw r0,36(r1) ffc0f470: 93 c1 00 18 stw r30,24(r1) ffc0f474: 7c be 2b 78 mr r30,r5 ffc0f478: 93 e1 00 1c stw r31,28(r1) ffc0f47c: 7c 7f 1b 78 mr r31,r3 ffc0f480: 93 61 00 0c stw r27,12(r1) ffc0f484: 93 81 00 10 stw r28,16(r1) ffc0f488: 93 a1 00 14 stw r29,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f48c: 7c 00 00 a6 mfmsr r0 ffc0f490: 7d 30 42 a6 mfsprg r9,0 ffc0f494: 7c 09 48 78 andc r9,r0,r9 ffc0f498: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0f49c: 81 23 00 00 lwz r9,0(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0f4a0: 3b 83 00 04 addi r28,r3,4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { ffc0f4a4: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0f4a8: 41 9e 00 68 beq- cr7,ffc0f510 <_Watchdog_Adjust+0xac> switch ( direction ) { ffc0f4ac: 2f 84 00 00 cmpwi cr7,r4,0 ffc0f4b0: 40 9e 00 88 bne- cr7,ffc0f538 <_Watchdog_Adjust+0xd4> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f4b4: 2f 85 00 00 cmpwi cr7,r5,0 ffc0f4b8: 41 9e 00 58 beq- cr7,ffc0f510 <_Watchdog_Adjust+0xac> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f4bc: 83 a9 00 10 lwz r29,16(r9) _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0f4c0: 3b 60 00 01 li r27,1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f4c4: 7f 85 e8 40 cmplw cr7,r5,r29 ffc0f4c8: 40 bc 00 18 bge+ cr7,ffc0f4e0 <_Watchdog_Adjust+0x7c> <== ALWAYS TAKEN ffc0f4cc: 48 00 00 a8 b ffc0f574 <_Watchdog_Adjust+0x110> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f4d0: 41 82 00 40 beq- ffc0f510 <_Watchdog_Adjust+0xac> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f4d4: 83 a9 00 10 lwz r29,16(r9) ffc0f4d8: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0f4dc: 41 9d 00 98 bgt- cr7,ffc0f574 <_Watchdog_Adjust+0x110> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0f4e0: 93 69 00 10 stw r27,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0f4e4: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0f4e8: 7f e3 fb 78 mr r3,r31 ffc0f4ec: 48 00 03 2d bl ffc0f818 <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f4f0: 7c 00 00 a6 mfmsr r0 ffc0f4f4: 7d 30 42 a6 mfsprg r9,0 ffc0f4f8: 7c 09 48 78 andc r9,r0,r9 ffc0f4fc: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0f500: 81 3f 00 00 lwz r9,0(r31) switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f504: 7f dd f0 51 subf. r30,r29,r30 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0f508: 7f 9c 48 00 cmpw cr7,r28,r9 ffc0f50c: 40 9e ff c4 bne+ cr7,ffc0f4d0 <_Watchdog_Adjust+0x6c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0f510: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0f514: 80 01 00 24 lwz r0,36(r1) ffc0f518: 83 61 00 0c lwz r27,12(r1) ffc0f51c: 7c 08 03 a6 mtlr r0 ffc0f520: 83 81 00 10 lwz r28,16(r1) ffc0f524: 83 a1 00 14 lwz r29,20(r1) ffc0f528: 83 c1 00 18 lwz r30,24(r1) ffc0f52c: 83 e1 00 1c lwz r31,28(r1) ffc0f530: 38 21 00 20 addi r1,r1,32 ffc0f534: 4e 80 00 20 blr * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0f538: 2f 84 00 01 cmpwi cr7,r4,1 ffc0f53c: 40 9e ff d4 bne+ cr7,ffc0f510 <_Watchdog_Adjust+0xac> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0f540: 81 69 00 10 lwz r11,16(r9) ffc0f544: 7f cb 2a 14 add r30,r11,r5 ffc0f548: 93 c9 00 10 stw r30,16(r9) ffc0f54c: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0f550: 80 01 00 24 lwz r0,36(r1) ffc0f554: 83 61 00 0c lwz r27,12(r1) ffc0f558: 7c 08 03 a6 mtlr r0 ffc0f55c: 83 81 00 10 lwz r28,16(r1) ffc0f560: 83 a1 00 14 lwz r29,20(r1) ffc0f564: 83 c1 00 18 lwz r30,24(r1) ffc0f568: 83 e1 00 1c lwz r31,28(r1) ffc0f56c: 38 21 00 20 addi r1,r1,32 ffc0f570: 4e 80 00 20 blr _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; ffc0f574: 7f de e8 50 subf r30,r30,r29 ffc0f578: 93 c9 00 10 stw r30,16(r9) break; ffc0f57c: 4b ff ff 94 b ffc0f510 <_Watchdog_Adjust+0xac> =============================================================================== ffc0d600 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; ffc0d600: 3d 20 00 00 lis r9,0 ffc0d604: 80 09 2d c0 lwz r0,11712(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d608: 7d 00 00 a6 mfmsr r8 ffc0d60c: 7d 30 42 a6 mfsprg r9,0 ffc0d610: 7d 09 48 78 andc r9,r8,r9 ffc0d614: 7d 20 01 24 mtmsr r9 /* * 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 ) { ffc0d618: 81 24 00 08 lwz r9,8(r4) ffc0d61c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d620: 40 9e 01 04 bne- cr7,ffc0d724 <_Watchdog_Insert+0x124> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; ffc0d624: 3c c0 00 00 lis r6,0 ffc0d628: 81 26 27 f8 lwz r9,10232(r6) if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; ffc0d62c: 39 60 00 01 li r11,1 ffc0d630: 91 64 00 08 stw r11,8(r4) ffc0d634: 3c a0 00 00 lis r5,0 _Watchdog_Sync_count++; ffc0d638: 39 29 00 01 addi r9,r9,1 ffc0d63c: 91 26 27 f8 stw r9,10232(r6) restart: delta_interval = the_watchdog->initial; ffc0d640: 81 24 00 0c lwz r9,12(r4) ffc0d644: 81 63 00 00 lwz r11,0(r3) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d648: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d64c: 41 9e 00 98 beq- cr7,ffc0d6e4 <_Watchdog_Insert+0xe4> ffc0d650: 81 4b 00 00 lwz r10,0(r11) ffc0d654: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d658: 41 9e 00 8c beq- cr7,ffc0d6e4 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0d65c: 81 4b 00 10 lwz r10,16(r11) ffc0d660: 7f 89 50 40 cmplw cr7,r9,r10 ffc0d664: 41 9c 00 c8 blt- cr7,ffc0d72c <_Watchdog_Insert+0x12c> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0d668: 7c e0 00 a6 mfmsr r7 ffc0d66c: 7d 00 01 24 mtmsr r8 ffc0d670: 7c e0 01 24 mtmsr r7 delta_interval -= after->delta_interval; _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d674: 80 e4 00 08 lwz r7,8(r4) ffc0d678: 2f 87 00 01 cmpwi cr7,r7,1 ffc0d67c: 40 9e 00 98 bne- cr7,ffc0d714 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d680: 81 85 27 f0 lwz r12,10224(r5) ffc0d684: 38 e5 27 f0 addi r7,r5,10224 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0d688: 7d 2a 48 50 subf r9,r10,r9 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d68c: 7f 80 60 40 cmplw cr7,r0,r12 ffc0d690: 40 bc 00 48 bge+ cr7,ffc0d6d8 <_Watchdog_Insert+0xd8> ffc0d694: 48 00 00 d4 b ffc0d768 <_Watchdog_Insert+0x168> for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d698: 81 4b 00 00 lwz r10,0(r11) ffc0d69c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d6a0: 41 9e 00 44 beq- cr7,ffc0d6e4 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0d6a4: 81 4b 00 10 lwz r10,16(r11) ffc0d6a8: 7f 8a 48 40 cmplw cr7,r10,r9 ffc0d6ac: 41 9d 00 80 bgt- cr7,ffc0d72c <_Watchdog_Insert+0x12c> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0d6b0: 7d 2a 48 50 subf r9,r10,r9 ffc0d6b4: 7d 40 00 a6 mfmsr r10 ffc0d6b8: 7d 00 01 24 mtmsr r8 ffc0d6bc: 7d 40 01 24 mtmsr r10 _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d6c0: 81 44 00 08 lwz r10,8(r4) ffc0d6c4: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0d6c8: 40 9e 00 4c bne- cr7,ffc0d714 <_Watchdog_Insert+0x114> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d6cc: 81 47 00 00 lwz r10,0(r7) ffc0d6d0: 7f 80 50 40 cmplw cr7,r0,r10 ffc0d6d4: 41 9c 00 94 blt- cr7,ffc0d768 <_Watchdog_Insert+0x168> <== NEVER TAKEN for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d6d8: 2f 89 00 00 cmpwi cr7,r9,0 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } ffc0d6dc: 81 6b 00 00 lwz r11,0(r11) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d6e0: 40 9e ff b8 bne+ cr7,ffc0d698 <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0d6e4: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d6e8: 3c e0 00 00 lis r7,0 ffc0d6ec: 80 e7 27 fc lwz r7,10236(r7) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; ffc0d6f0: 38 60 00 02 li r3,2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0d6f4: 81 4b 00 00 lwz r10,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0d6f8: 91 64 00 04 stw r11,4(r4) ffc0d6fc: 90 64 00 08 stw r3,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0d700: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0d704: 90 8b 00 00 stw r4,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0d708: 90 8a 00 04 stw r4,4(r10) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0d70c: 91 44 00 00 stw r10,0(r4) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d710: 90 e4 00 14 stw r7,20(r4) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; ffc0d714: 90 05 27 f0 stw r0,10224(r5) _Watchdog_Sync_count--; ffc0d718: 81 26 27 f8 lwz r9,10232(r6) ffc0d71c: 38 09 ff ff addi r0,r9,-1 ffc0d720: 90 06 27 f8 stw r0,10232(r6) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d724: 7d 00 01 24 mtmsr r8 ffc0d728: 4e 80 00 20 blr if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; ffc0d72c: 7d 49 50 50 subf r10,r9,r10 ffc0d730: 91 4b 00 10 stw r10,16(r11) the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d734: 3c e0 00 00 lis r7,0 ffc0d738: 38 60 00 02 li r3,2 _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0d73c: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d740: 80 e7 27 fc lwz r7,10236(r7) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0d744: 81 4b 00 00 lwz r10,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0d748: 91 64 00 04 stw r11,4(r4) ffc0d74c: 90 64 00 08 stw r3,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0d750: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0d754: 90 8b 00 00 stw r4,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0d758: 90 8a 00 04 stw r4,4(r10) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0d75c: 91 44 00 00 stw r10,0(r4) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d760: 90 e4 00 14 stw r7,20(r4) ffc0d764: 4b ff ff b0 b ffc0d714 <_Watchdog_Insert+0x114> 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; ffc0d768: 90 05 27 f0 stw r0,10224(r5) goto restart; ffc0d76c: 4b ff fe d4 b ffc0d640 <_Watchdog_Insert+0x40> =============================================================================== ffc0d7c8 <_Watchdog_Remove>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d7c8: 7d 20 00 a6 mfmsr r9 ffc0d7cc: 7c 10 42 a6 mfsprg r0,0 ffc0d7d0: 7d 20 00 78 andc r0,r9,r0 ffc0d7d4: 7c 00 01 24 mtmsr r0 ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; ffc0d7d8: 80 03 00 08 lwz r0,8(r3) switch ( previous_state ) { ffc0d7dc: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d7e0: 41 9e 00 98 beq- cr7,ffc0d878 <_Watchdog_Remove+0xb0> ffc0d7e4: 2b 80 00 01 cmplwi cr7,r0,1 ffc0d7e8: 40 9c 00 1c bge- cr7,ffc0d804 <_Watchdog_Remove+0x3c> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d7ec: 3d 60 00 00 lis r11,0 ffc0d7f0: 81 6b 27 fc lwz r11,10236(r11) ffc0d7f4: 91 63 00 18 stw r11,24(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d7f8: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d7fc: 7c 03 03 78 mr r3,r0 ffc0d800: 4e 80 00 20 blr Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { ffc0d804: 2b 80 00 03 cmplwi cr7,r0,3 ffc0d808: 41 bd ff e4 bgt- cr7,ffc0d7ec <_Watchdog_Remove+0x24> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0d80c: 39 60 00 00 li r11,0 ffc0d810: 91 63 00 08 stw r11,8(r3) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } ffc0d814: 81 63 00 00 lwz r11,0(r3) case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0d818: 81 4b 00 00 lwz r10,0(r11) ffc0d81c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d820: 41 9e 00 14 beq- cr7,ffc0d834 <_Watchdog_Remove+0x6c> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0d824: 81 0b 00 10 lwz r8,16(r11) ffc0d828: 81 43 00 10 lwz r10,16(r3) ffc0d82c: 7d 48 52 14 add r10,r8,r10 ffc0d830: 91 4b 00 10 stw r10,16(r11) if ( _Watchdog_Sync_count ) ffc0d834: 3d 40 00 00 lis r10,0 ffc0d838: 81 4a 27 f8 lwz r10,10232(r10) ffc0d83c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d840: 41 9e 00 14 beq- cr7,ffc0d854 <_Watchdog_Remove+0x8c> _Watchdog_Sync_level = _ISR_Nest_level; ffc0d844: 3d 40 00 00 lis r10,0 ffc0d848: 81 0a 2d c0 lwz r8,11712(r10) ffc0d84c: 3d 40 00 00 lis r10,0 ffc0d850: 91 0a 27 f0 stw r8,10224(r10) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0d854: 81 43 00 04 lwz r10,4(r3) next->previous = previous; ffc0d858: 91 4b 00 04 stw r10,4(r11) previous->next = next; ffc0d85c: 91 6a 00 00 stw r11,0(r10) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d860: 3d 60 00 00 lis r11,0 ffc0d864: 81 6b 27 fc lwz r11,10236(r11) ffc0d868: 91 63 00 18 stw r11,24(r3) ffc0d86c: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d870: 7c 03 03 78 mr r3,r0 ffc0d874: 4e 80 00 20 blr /* * 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; ffc0d878: 39 60 00 00 li r11,0 ffc0d87c: 91 63 00 08 stw r11,8(r3) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d880: 3d 60 00 00 lis r11,0 ffc0d884: 81 6b 27 fc lwz r11,10236(r11) ffc0d888: 91 63 00 18 stw r11,24(r3) ffc0d88c: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d890: 7c 03 03 78 mr r3,r0 ffc0d894: 4e 80 00 20 blr =============================================================================== ffc0ebbc <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0ebbc: 94 21 ff e8 stwu r1,-24(r1) ffc0ebc0: 7c 08 02 a6 mflr r0 ffc0ebc4: 93 c1 00 10 stw r30,16(r1) ffc0ebc8: 7c 7e 1b 78 mr r30,r3 ffc0ebcc: 93 e1 00 14 stw r31,20(r1) ffc0ebd0: 7c 9f 23 78 mr r31,r4 ffc0ebd4: 90 01 00 1c stw r0,28(r1) ffc0ebd8: 93 81 00 08 stw r28,8(r1) ffc0ebdc: 93 a1 00 0c stw r29,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0ebe0: 7f a0 00 a6 mfmsr r29 ffc0ebe4: 7c 10 42 a6 mfsprg r0,0 ffc0ebe8: 7f a0 00 78 andc r0,r29,r0 ffc0ebec: 7c 00 01 24 mtmsr r0 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0ebf0: 3c 60 ff c2 lis r3,-62 ffc0ebf4: 7f e5 fb 78 mr r5,r31 ffc0ebf8: 38 63 15 40 addi r3,r3,5440 ffc0ebfc: 7f c4 f3 78 mr r4,r30 ffc0ec00: 4c c6 31 82 crclr 4*cr1+eq ffc0ec04: 4b ff 81 69 bl ffc06d6c */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0ec08: 83 9f 00 00 lwz r28,0(r31) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0ec0c: 3b ff 00 04 addi r31,r31,4 if ( !_Chain_Is_empty( header ) ) { ffc0ec10: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0ec14: 41 9e 00 54 beq- cr7,ffc0ec68 <_Watchdog_Report_chain+0xac> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0ec18: 7f 84 e3 78 mr r4,r28 ffc0ec1c: 38 60 00 00 li r3,0 ffc0ec20: 48 00 00 5d bl ffc0ec7c <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) ffc0ec24: 83 9c 00 00 lwz r28,0(r28) Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; ffc0ec28: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0ec2c: 40 9e ff ec bne+ cr7,ffc0ec18 <_Watchdog_Report_chain+0x5c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0ec30: 3c 60 ff c2 lis r3,-62 ffc0ec34: 38 63 15 58 addi r3,r3,5464 ffc0ec38: 7f c4 f3 78 mr r4,r30 ffc0ec3c: 4c c6 31 82 crclr 4*cr1+eq ffc0ec40: 4b ff 81 2d bl ffc06d6c return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0ec44: 7f a0 01 24 mtmsr r29 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0ec48: 80 01 00 1c lwz r0,28(r1) ffc0ec4c: 83 81 00 08 lwz r28,8(r1) ffc0ec50: 7c 08 03 a6 mtlr r0 ffc0ec54: 83 a1 00 0c lwz r29,12(r1) ffc0ec58: 83 c1 00 10 lwz r30,16(r1) ffc0ec5c: 83 e1 00 14 lwz r31,20(r1) ffc0ec60: 38 21 00 18 addi r1,r1,24 ffc0ec64: 4e 80 00 20 blr _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); ffc0ec68: 3c 60 ff c2 lis r3,-62 ffc0ec6c: 38 63 15 68 addi r3,r3,5480 ffc0ec70: 4c c6 31 82 crclr 4*cr1+eq ffc0ec74: 4b ff 80 f9 bl ffc06d6c ffc0ec78: 4b ff ff cc b ffc0ec44 <_Watchdog_Report_chain+0x88> =============================================================================== ffc1d6e0 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } ffc1d6e0: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc1d6e4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05264 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); ffc05264: 4b ff ff 64 b ffc051c8 <== NOT EXECUTED =============================================================================== ffc0a300 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc0a300: 94 21 ff 90 stwu r1,-112(r1) ffc0a304: 7c 08 02 a6 mflr r0 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); ffc0a308: 7c 83 23 78 mr r3,r4 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc0a30c: 93 61 00 5c stw r27,92(r1) ffc0a310: 7c bb 2b 78 mr r27,r5 ffc0a314: 93 a1 00 64 stw r29,100(r1) ffc0a318: 93 c1 00 68 stw r30,104(r1) */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc0a31c: 3b c1 00 24 addi r30,r1,36 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc0a320: 93 e1 00 6c stw r31,108(r1) ffc0a324: 7c 9f 23 78 mr r31,r4 ffc0a328: 90 01 00 74 stw r0,116(r1) ffc0a32c: 93 41 00 58 stw r26,88(r1) ffc0a330: 93 81 00 60 stw r28,96(r1) /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); ffc0a334: 4b ff e2 61 bl ffc08594 if ( old_parent_pathlen == 0 ) ffc0a338: 7c 7d 1b 79 mr. r29,r3 rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc0a33c: 7f e3 fb 78 mr r3,r31 * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) ffc0a340: 40 82 00 c4 bne- ffc0a404 <_rename_r+0x104> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc0a344: 38 81 00 0c addi r4,r1,12 ffc0a348: 7f c5 f3 78 mr r5,r30 ffc0a34c: 48 00 04 a1 bl ffc0a7ec ffc0a350: 3b a0 00 00 li r29,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; ffc0a354: 3b 80 00 00 li r28,0 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; ffc0a358: 80 01 00 24 lwz r0,36(r1) name = old + old_parent_pathlen; ffc0a35c: 7f ff ea 14 add r31,r31,r29 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc0a360: 7f e3 fb 78 mr r3,r31 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; ffc0a364: 93 e1 00 08 stw r31,8(r1) /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; ffc0a368: 90 01 00 38 stw r0,56(r1) ffc0a36c: 80 01 00 28 lwz r0,40(r1) ffc0a370: 90 01 00 3c stw r0,60(r1) ffc0a374: 80 01 00 2c lwz r0,44(r1) ffc0a378: 90 01 00 40 stw r0,64(r1) ffc0a37c: 80 01 00 30 lwz r0,48(r1) ffc0a380: 90 01 00 44 stw r0,68(r1) ffc0a384: 80 01 00 34 lwz r0,52(r1) ffc0a388: 90 01 00 48 stw r0,72(r1) name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc0a38c: 48 01 0b ed bl ffc1af78 ffc0a390: 7c 64 1b 78 mr r4,r3 ffc0a394: 7f e3 fb 78 mr r3,r31 ffc0a398: 4b ff e2 5d bl ffc085f4 ffc0a39c: 7f ff 1a 14 add r31,r31,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc0a3a0: 7f e3 fb 78 mr r3,r31 * 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 ) ); ffc0a3a4: 93 e1 00 08 stw r31,8(r1) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc0a3a8: 48 01 0b d1 bl ffc1af78 ffc0a3ac: 38 a0 00 00 li r5,0 ffc0a3b0: 7c 64 1b 78 mr r4,r3 ffc0a3b4: 38 c1 00 38 addi r6,r1,56 ffc0a3b8: 7f e3 fb 78 mr r3,r31 ffc0a3bc: 38 e0 00 00 li r7,0 ffc0a3c0: 4b ff e0 ad bl ffc0846c 0, &old_loc, false ); if ( result != 0 ) { ffc0a3c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a3c8: 41 9e 00 98 beq- cr7,ffc0a460 <_rename_r+0x160> if ( free_old_parentloc ) ffc0a3cc: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_filesystem_freenode( &old_parent_loc ); return -1; ffc0a3d0: 3b 40 ff ff li r26,-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 ) ffc0a3d4: 40 9e 00 58 bne- cr7,ffc0a42c <_rename_r+0x12c> <== ALWAYS TAKEN if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } ffc0a3d8: 80 01 00 74 lwz r0,116(r1) ffc0a3dc: 7f 43 d3 78 mr r3,r26 ffc0a3e0: 83 61 00 5c lwz r27,92(r1) ffc0a3e4: 7c 08 03 a6 mtlr r0 ffc0a3e8: 83 41 00 58 lwz r26,88(r1) ffc0a3ec: 83 81 00 60 lwz r28,96(r1) ffc0a3f0: 83 a1 00 64 lwz r29,100(r1) ffc0a3f4: 83 c1 00 68 lwz r30,104(r1) ffc0a3f8: 83 e1 00 6c lwz r31,108(r1) ffc0a3fc: 38 21 00 70 addi r1,r1,112 ffc0a400: 4e 80 00 20 blr 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, ffc0a404: 7f a4 eb 78 mr r4,r29 ffc0a408: 38 a0 00 02 li r5,2 ffc0a40c: 7f c6 f3 78 mr r6,r30 ffc0a410: 38 e0 00 00 li r7,0 ffc0a414: 4b ff e1 05 bl ffc08518 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) return -1; ffc0a418: 3b 40 ff ff li r26,-1 else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) ffc0a41c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a420: 40 be ff b8 bne- cr7,ffc0a3d8 <_rename_r+0xd8> <== NEVER TAKEN return -1; free_old_parentloc = true; ffc0a424: 3b 80 00 01 li r28,1 ffc0a428: 4b ff ff 30 b ffc0a358 <_rename_r+0x58> 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 ); ffc0a42c: 7f c3 f3 78 mr r3,r30 ffc0a430: 4b ff e4 ed bl ffc0891c if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } ffc0a434: 80 01 00 74 lwz r0,116(r1) ffc0a438: 7f 43 d3 78 mr r3,r26 ffc0a43c: 83 61 00 5c lwz r27,92(r1) ffc0a440: 7c 08 03 a6 mtlr r0 ffc0a444: 83 41 00 58 lwz r26,88(r1) ffc0a448: 83 81 00 60 lwz r28,96(r1) ffc0a44c: 83 a1 00 64 lwz r29,100(r1) ffc0a450: 83 c1 00 68 lwz r30,104(r1) ffc0a454: 83 e1 00 6c lwz r31,108(r1) ffc0a458: 38 21 00 70 addi r1,r1,112 ffc0a45c: 4e 80 00 20 blr /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); ffc0a460: 7f 63 db 78 mr r3,r27 ffc0a464: 38 81 00 0c addi r4,r1,12 ffc0a468: 38 a1 00 10 addi r5,r1,16 ffc0a46c: 48 00 03 81 bl ffc0a7ec result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); ffc0a470: 81 21 00 1c lwz r9,28(r1) ffc0a474: 80 61 00 0c lwz r3,12(r1) ffc0a478: 38 81 00 10 addi r4,r1,16 ffc0a47c: 80 09 00 04 lwz r0,4(r9) ffc0a480: 38 a1 00 08 addi r5,r1,8 ffc0a484: 7c 7b 1a 14 add r3,r27,r3 ffc0a488: 7c 09 03 a6 mtctr r0 ffc0a48c: 4e 80 04 21 bctrl if ( result != 0 ) { ffc0a490: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a494: 40 9e 00 c0 bne- cr7,ffc0a554 <_rename_r+0x254> /* * 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 ) { ffc0a498: 80 01 00 20 lwz r0,32(r1) ffc0a49c: 81 21 00 34 lwz r9,52(r1) ffc0a4a0: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a4a4: 40 9e 00 78 bne- cr7,ffc0a51c <_rename_r+0x21c> 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 ); ffc0a4a8: 81 21 00 1c lwz r9,28(r1) ffc0a4ac: 38 81 00 38 addi r4,r1,56 ffc0a4b0: 38 a1 00 10 addi r5,r1,16 ffc0a4b4: 80 c1 00 08 lwz r6,8(r1) ffc0a4b8: 80 09 00 40 lwz r0,64(r9) ffc0a4bc: 7f c3 f3 78 mr r3,r30 ffc0a4c0: 7c 09 03 a6 mtctr r0 ffc0a4c4: 4e 80 04 21 bctrl ffc0a4c8: 7c 7a 1b 78 mr r26,r3 rtems_filesystem_freenode( &new_parent_loc ); ffc0a4cc: 38 61 00 10 addi r3,r1,16 ffc0a4d0: 4b ff e4 4d bl ffc0891c if ( free_old_parentloc ) ffc0a4d4: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0a4d8: 40 9e 00 38 bne- cr7,ffc0a510 <_rename_r+0x210> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); ffc0a4dc: 38 61 00 38 addi r3,r1,56 ffc0a4e0: 4b ff e4 3d bl ffc0891c return result; } ffc0a4e4: 80 01 00 74 lwz r0,116(r1) ffc0a4e8: 7f 43 d3 78 mr r3,r26 ffc0a4ec: 83 61 00 5c lwz r27,92(r1) ffc0a4f0: 7c 08 03 a6 mtlr r0 ffc0a4f4: 83 41 00 58 lwz r26,88(r1) ffc0a4f8: 83 81 00 60 lwz r28,96(r1) ffc0a4fc: 83 a1 00 64 lwz r29,100(r1) ffc0a500: 83 c1 00 68 lwz r30,104(r1) ffc0a504: 83 e1 00 6c lwz r31,108(r1) ffc0a508: 38 21 00 70 addi r1,r1,112 ffc0a50c: 4e 80 00 20 blr 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 ); ffc0a510: 7f c3 f3 78 mr r3,r30 ffc0a514: 4b ff e4 09 bl ffc0891c ffc0a518: 4b ff ff c4 b ffc0a4dc <_rename_r+0x1dc> * 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 ); ffc0a51c: 38 61 00 10 addi r3,r1,16 ffc0a520: 4b ff e3 fd bl ffc0891c if ( free_old_parentloc ) ffc0a524: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0a528: 40 9e 00 20 bne- cr7,ffc0a548 <_rename_r+0x248> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); ffc0a52c: 38 61 00 38 addi r3,r1,56 ffc0a530: 4b ff e3 ed bl ffc0891c rtems_set_errno_and_return_minus_one( EXDEV ); ffc0a534: 3b 40 ff ff li r26,-1 ffc0a538: 48 00 cd 1d bl ffc17254 <__errno> ffc0a53c: 38 00 00 12 li r0,18 ffc0a540: 90 03 00 00 stw r0,0(r3) ffc0a544: 4b ff fe 94 b ffc0a3d8 <_rename_r+0xd8> */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); ffc0a548: 7f c3 f3 78 mr r3,r30 ffc0a54c: 4b ff e3 d1 bl ffc0891c ffc0a550: 4b ff ff dc b ffc0a52c <_rename_r+0x22c> 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 ); ffc0a554: 38 61 00 10 addi r3,r1,16 ffc0a558: 4b ff e3 c5 bl ffc0891c if ( free_old_parentloc ) ffc0a55c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0a560: 41 be 00 0c beq+ cr7,ffc0a56c <_rename_r+0x26c> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); ffc0a564: 7f c3 f3 78 mr r3,r30 ffc0a568: 4b ff e3 b5 bl ffc0891c rtems_filesystem_freenode( &old_loc ); ffc0a56c: 38 61 00 38 addi r3,r1,56 ffc0a570: 4b ff e3 ad bl ffc0891c return -1; ffc0a574: 3b 40 ff ff li r26,-1 ffc0a578: 4b ff fe 60 b ffc0a3d8 <_rename_r+0xd8> =============================================================================== ffc0490c : #include int chroot( const char *pathname ) { ffc0490c: 94 21 ff c8 stwu r1,-56(r1) ffc04910: 7c 08 02 a6 mflr r0 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { ffc04914: 3d 20 00 00 lis r9,0 #include int chroot( const char *pathname ) { ffc04918: 93 e1 00 34 stw r31,52(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) { ffc0491c: 3f e0 00 00 lis r31,0 #include int chroot( const char *pathname ) { ffc04920: 93 c1 00 30 stw r30,48(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) { ffc04924: 83 df 26 f4 lwz r30,9972(r31) #include int chroot( const char *pathname ) { ffc04928: 90 01 00 3c stw r0,60(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) { ffc0492c: 38 09 2a d8 addi r0,r9,10968 ffc04930: 7f 9e 00 00 cmpw cr7,r30,r0 #include int chroot( const char *pathname ) { ffc04934: 93 a1 00 2c stw r29,44(r1) ffc04938: 7c 7d 1b 78 mr r29,r3 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) { ffc0493c: 41 9e 00 90 beq- cr7,ffc049cc 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); ffc04940: 7f a3 eb 78 mr r3,r29 ffc04944: 48 00 aa 3d bl ffc0f380 if (result) { ffc04948: 2f 83 00 00 cmpwi cr7,r3,0 ffc0494c: 40 9e 00 a4 bne- cr7,ffc049f0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { ffc04950: 3c 60 ff c2 lis r3,-62 ffc04954: 38 63 95 a8 addi r3,r3,-27224 ffc04958: 38 80 00 01 li r4,1 ffc0495c: 38 a0 00 00 li r5,0 ffc04960: 38 c1 00 08 addi r6,r1,8 ffc04964: 38 e0 00 00 li r7,0 ffc04968: 48 00 01 f1 bl ffc04b58 ffc0496c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04970: 40 9e 00 80 bne- cr7,ffc049f0 <== 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); ffc04974: 80 7f 26 f4 lwz r3,9972(r31) ffc04978: 38 63 00 18 addi r3,r3,24 ffc0497c: 48 00 03 39 bl ffc04cb4 rtems_filesystem_root = loc; ffc04980: 81 3f 26 f4 lwz r9,9972(r31) ffc04984: 80 01 00 08 lwz r0,8(r1) return 0; ffc04988: 38 60 00 00 li r3,0 if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; ffc0498c: 90 09 00 18 stw r0,24(r9) ffc04990: 80 01 00 0c lwz r0,12(r1) ffc04994: 90 09 00 1c stw r0,28(r9) ffc04998: 80 01 00 10 lwz r0,16(r1) ffc0499c: 90 09 00 20 stw r0,32(r9) ffc049a0: 80 01 00 14 lwz r0,20(r1) ffc049a4: 90 09 00 24 stw r0,36(r9) ffc049a8: 80 01 00 18 lwz r0,24(r1) ffc049ac: 90 09 00 28 stw r0,40(r9) return 0; } ffc049b0: 80 01 00 3c lwz r0,60(r1) ffc049b4: 83 a1 00 2c lwz r29,44(r1) ffc049b8: 7c 08 03 a6 mtlr r0 ffc049bc: 83 c1 00 30 lwz r30,48(r1) ffc049c0: 83 e1 00 34 lwz r31,52(r1) ffc049c4: 38 21 00 38 addi r1,r1,56 ffc049c8: 4e 80 00 20 blr 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*/ ffc049cc: 48 00 18 f9 bl ffc062c4 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ ffc049d0: 80 1f 26 f4 lwz r0,9972(r31) ffc049d4: 7f 80 f0 00 cmpw cr7,r0,r30 ffc049d8: 40 9e ff 68 bne+ cr7,ffc04940 rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc049dc: 48 00 de 55 bl ffc12830 <__errno> ffc049e0: 38 00 00 86 li r0,134 ffc049e4: 90 03 00 00 stw r0,0(r3) ffc049e8: 38 60 ff ff li r3,-1 ffc049ec: 4b ff ff c4 b ffc049b0 } /* 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 ); ffc049f0: 48 00 de 41 bl ffc12830 <__errno> ffc049f4: 7c 7f 1b 78 mr r31,r3 ffc049f8: 48 00 de 39 bl ffc12830 <__errno> ffc049fc: 80 03 00 00 lwz r0,0(r3) ffc04a00: 38 60 ff ff li r3,-1 ffc04a04: 90 1f 00 00 stw r0,0(r31) ffc04a08: 4b ff ff a8 b ffc049b0 =============================================================================== ffc0da64 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0da64: 94 21 ff d8 stwu r1,-40(r1) ffc0da68: 7c 08 02 a6 mflr r0 ffc0da6c: 90 01 00 2c stw r0,44(r1) int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) ffc0da70: 54 a0 00 39 rlwinm. r0,r5,0,0,28 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0da74: 93 01 00 08 stw r24,8(r1) ffc0da78: 7c d8 33 78 mr r24,r6 ffc0da7c: 93 c1 00 20 stw r30,32(r1) ffc0da80: 7c 7e 1b 78 mr r30,r3 ffc0da84: 93 e1 00 24 stw r31,36(r1) ffc0da88: 7c 9f 23 78 mr r31,r4 ffc0da8c: 93 21 00 0c stw r25,12(r1) ffc0da90: 93 41 00 10 stw r26,16(r1) ffc0da94: 93 61 00 14 stw r27,20(r1) ffc0da98: 93 81 00 18 stw r28,24(r1) ffc0da9c: 93 a1 00 1c stw r29,28(r1) int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) ffc0daa0: 40 82 01 0c bne- ffc0dbac <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; ffc0daa4: 83 66 00 00 lwz r27,0(r6) if (!device_name_table) ffc0daa8: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0daac: 41 9e 01 14 beq- cr7,ffc0dbc0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { ffc0dab0: 3d 20 00 00 lis r9,0 ffc0dab4: 83 49 27 38 lwz r26,10040(r9) ffc0dab8: 38 00 00 00 li r0,0 * handlers. */ extern rtems_filesystem_file_handlers_r devFS_file_handlers; int devFS_evaluate_path( ffc0dabc: 3b a0 00 00 li r29,0 /* 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++) { ffc0dac0: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0dac4: 41 9e 00 4c beq- cr7,ffc0db10 <== NEVER TAKEN if (!device_name_table[i].device_name) ffc0dac8: 1c 00 00 14 mulli r0,r0,20 ffc0dacc: 7f 9b 00 2e lwzx r28,r27,r0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0dad0: 7f c3 f3 78 mr r3,r30 ffc0dad4: 7f e5 fb 78 mr r5,r31 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) ffc0dad8: 2f 9c 00 00 cmpwi cr7,r28,0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0dadc: 7f 84 e3 78 mr r4,r28 /* 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++) { ffc0dae0: 3b bd 00 01 addi r29,r29,1 if (!device_name_table[i].device_name) ffc0dae4: 7f 3b 02 14 add r25,r27,r0 ffc0dae8: 41 9e 00 1c beq- cr7,ffc0db04 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0daec: 48 00 32 fd bl ffc10de8 ffc0daf0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0daf4: 40 9e 00 10 bne- cr7,ffc0db04 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') ffc0daf8: 7c 1c f8 ae lbzx r0,r28,r31 ffc0dafc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0db00: 41 9e 00 50 beq- cr7,ffc0db50 <== 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++) { ffc0db04: 7f 9d d0 00 cmpw cr7,r29,r26 ffc0db08: 7f a0 eb 78 mr r0,r29 ffc0db0c: 40 9e ff bc bne+ cr7,ffc0dac8 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); ffc0db10: 48 00 20 b5 bl ffc0fbc4 <__errno> ffc0db14: 38 00 00 02 li r0,2 ffc0db18: 90 03 00 00 stw r0,0(r3) ffc0db1c: 38 60 ff ff li r3,-1 } ffc0db20: 80 01 00 2c lwz r0,44(r1) ffc0db24: 83 01 00 08 lwz r24,8(r1) ffc0db28: 7c 08 03 a6 mtlr r0 ffc0db2c: 83 21 00 0c lwz r25,12(r1) ffc0db30: 83 41 00 10 lwz r26,16(r1) ffc0db34: 83 61 00 14 lwz r27,20(r1) ffc0db38: 83 81 00 18 lwz r28,24(r1) ffc0db3c: 83 a1 00 1c lwz r29,28(r1) ffc0db40: 83 c1 00 20 lwz r30,32(r1) ffc0db44: 83 e1 00 24 lwz r31,36(r1) ffc0db48: 38 21 00 28 addi r1,r1,40 ffc0db4c: 4e 80 00 20 blr /* 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; ffc0db50: 3d 20 00 00 lis r9,0 ffc0db54: 81 29 27 74 lwz r9,10100(r9) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; ffc0db58: 93 38 00 00 stw r25,0(r24) pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0db5c: 80 09 00 28 lwz r0,40(r9) 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; ffc0db60: 3d 20 00 00 lis r9,0 ffc0db64: 39 29 21 7c addi r9,r9,8572 ffc0db68: 91 38 00 08 stw r9,8(r24) pathloc->ops = &devFS_ops; ffc0db6c: 3d 20 00 00 lis r9,0 ffc0db70: 39 29 21 b4 addi r9,r9,8628 ffc0db74: 91 38 00 0c stw r9,12(r24) pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0db78: 90 18 00 10 stw r0,16(r24) return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0db7c: 80 01 00 2c lwz r0,44(r1) ffc0db80: 83 01 00 08 lwz r24,8(r1) ffc0db84: 7c 08 03 a6 mtlr r0 ffc0db88: 83 21 00 0c lwz r25,12(r1) ffc0db8c: 83 41 00 10 lwz r26,16(r1) ffc0db90: 83 61 00 14 lwz r27,20(r1) ffc0db94: 83 81 00 18 lwz r28,24(r1) ffc0db98: 83 a1 00 1c lwz r29,28(r1) ffc0db9c: 83 c1 00 20 lwz r30,32(r1) ffc0dba0: 83 e1 00 24 lwz r31,36(r1) ffc0dba4: 38 21 00 28 addi r1,r1,40 ffc0dba8: 4e 80 00 20 blr int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); ffc0dbac: 48 00 20 19 bl ffc0fbc4 <__errno> <== NOT EXECUTED ffc0dbb0: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0dbb4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0dbb8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0dbbc: 4b ff ff c0 b ffc0db7c <== NOT EXECUTED /* 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 ); ffc0dbc0: 48 00 20 05 bl ffc0fbc4 <__errno> ffc0dbc4: 38 00 00 0e li r0,14 ffc0dbc8: 90 03 00 00 stw r0,0(r3) ffc0dbcc: 38 60 ff ff li r3,-1 ffc0dbd0: 4b ff ff ac b ffc0db7c =============================================================================== ffc0475c : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { ffc0475c: 94 21 ff d8 stwu r1,-40(r1) ffc04760: 7c 08 02 a6 mflr r0 ffc04764: 93 81 00 18 stw r28,24(r1) ffc04768: 7c dc 33 78 mr r28,r6 ffc0476c: 93 a1 00 1c stw r29,28(r1) ffc04770: 7c bd 2b 78 mr r29,r5 ffc04774: 93 c1 00 20 stw r30,32(r1) ffc04778: 7c 9e 23 78 mr r30,r4 ffc0477c: 93 e1 00 24 stw r31,36(r1) ffc04780: 7c 7f 1b 78 mr r31,r3 ffc04784: 90 01 00 2c stw r0,44(r1) ffc04788: 93 01 00 08 stw r24,8(r1) ffc0478c: 93 21 00 0c stw r25,12(r1) ffc04790: 93 41 00 10 stw r26,16(r1) ffc04794: 93 61 00 14 stw r27,20(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') && ffc04798: 88 03 00 00 lbz r0,0(r3) ffc0479c: 2f 80 00 64 cmpwi cr7,r0,100 ffc047a0: 41 9e 01 40 beq- cr7,ffc048e0 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) ffc047a4: 57 c0 04 26 rlwinm r0,r30,0,16,19 ffc047a8: 2f 80 60 00 cmpwi cr7,r0,24576 ffc047ac: 41 9e 00 0c beq- cr7,ffc047b8 ffc047b0: 2f 80 20 00 cmpwi cr7,r0,8192 ffc047b4: 40 9e 01 58 bne- cr7,ffc0490c 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; ffc047b8: 83 47 00 00 lwz r26,0(r7) if (!device_name_table) ffc047bc: 2f 9a 00 00 cmpwi cr7,r26,0 ffc047c0: 41 9e 01 74 beq- cr7,ffc04934 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ ffc047c4: 3d 20 00 00 lis r9,0 ffc047c8: 83 29 27 38 lwz r25,10040(r9) ffc047cc: 2f 99 00 00 cmpwi cr7,r25,0 ffc047d0: 41 9e 01 50 beq- cr7,ffc04920 ffc047d4: 38 00 00 00 li r0,0 #include #include #include "devfs.h" int devFS_mknod( ffc047d8: 3b 00 ff ff li r24,-1 ffc047dc: 3b 60 00 00 li r27,0 ffc047e0: 48 00 00 20 b ffc04800 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc047e4: 48 00 c4 81 bl ffc10c64 ffc047e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc047ec: 41 9e 00 b4 beq- cr7,ffc048a0 /* 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++){ ffc047f0: 3b 7b 00 01 addi r27,r27,1 ffc047f4: 7f 9b c8 00 cmpw cr7,r27,r25 ffc047f8: 7f 60 db 78 mr r0,r27 ffc047fc: 41 9e 00 30 beq- cr7,ffc0482c if (device_name_table[i].device_name == NULL) ffc04800: 1c 00 00 14 mulli r0,r0,20 ffc04804: 7c 1a 00 2e lwzx r0,r26,r0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc04808: 7f e3 fb 78 mr r3,r31 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) ffc0480c: 2f 80 00 00 cmpwi cr7,r0,0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc04810: 7c 04 03 78 mr r4,r0 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) ffc04814: 40 9e ff d0 bne+ cr7,ffc047e4 ffc04818: 7f 78 db 78 mr r24,r27 /* 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++){ ffc0481c: 3b 7b 00 01 addi r27,r27,1 ffc04820: 7f 9b c8 00 cmpw cr7,r27,r25 ffc04824: 7f 60 db 78 mr r0,r27 ffc04828: 40 9e ff d8 bne+ cr7,ffc04800 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) ffc0482c: 2f 98 ff ff cmpwi cr7,r24,-1 ffc04830: 41 9e 00 f0 beq- cr7,ffc04920 <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc04834: 7f 60 00 a6 mfmsr r27 ffc04838: 7c 10 42 a6 mfsprg r0,0 ffc0483c: 7f 60 00 78 andc r0,r27,r0 ffc04840: 7c 00 01 24 mtmsr r0 rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; ffc04844: 1f 18 00 14 mulli r24,r24,20 ffc04848: 7f fa c1 2e stwx r31,r26,r24 device_name_table[slot].device_name_length = strlen(path); ffc0484c: 7f e3 fb 78 mr r3,r31 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; ffc04850: 7f 5a c2 14 add r26,r26,r24 device_name_table[slot].device_name_length = strlen(path); ffc04854: 48 00 c4 d9 bl ffc10d2c device_name_table[slot].major = major; ffc04858: 93 ba 00 08 stw r29,8(r26) if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); ffc0485c: 90 7a 00 04 stw r3,4(r26) device_name_table[slot].major = major; device_name_table[slot].minor = minor; ffc04860: 93 9a 00 0c stw r28,12(r26) device_name_table[slot].mode = mode; ffc04864: 93 da 00 10 stw r30,16(r26) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc04868: 7f 60 01 24 mtmsr r27 _ISR_Enable(level); return 0; ffc0486c: 38 60 00 00 li r3,0 } ffc04870: 80 01 00 2c lwz r0,44(r1) ffc04874: 83 01 00 08 lwz r24,8(r1) ffc04878: 7c 08 03 a6 mtlr r0 ffc0487c: 83 21 00 0c lwz r25,12(r1) ffc04880: 83 41 00 10 lwz r26,16(r1) ffc04884: 83 61 00 14 lwz r27,20(r1) ffc04888: 83 81 00 18 lwz r28,24(r1) ffc0488c: 83 a1 00 1c lwz r29,28(r1) ffc04890: 83 c1 00 20 lwz r30,32(r1) ffc04894: 83 e1 00 24 lwz r31,36(r1) ffc04898: 38 21 00 28 addi r1,r1,40 ffc0489c: 4e 80 00 20 blr for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); ffc048a0: 48 00 b3 25 bl ffc0fbc4 <__errno> ffc048a4: 38 00 00 11 li r0,17 ffc048a8: 90 03 00 00 stw r0,0(r3) ffc048ac: 38 60 ff ff li r3,-1 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } ffc048b0: 80 01 00 2c lwz r0,44(r1) ffc048b4: 83 01 00 08 lwz r24,8(r1) ffc048b8: 7c 08 03 a6 mtlr r0 ffc048bc: 83 21 00 0c lwz r25,12(r1) ffc048c0: 83 41 00 10 lwz r26,16(r1) ffc048c4: 83 61 00 14 lwz r27,20(r1) ffc048c8: 83 81 00 18 lwz r28,24(r1) ffc048cc: 83 a1 00 1c lwz r29,28(r1) ffc048d0: 83 c1 00 20 lwz r30,32(r1) ffc048d4: 83 e1 00 24 lwz r31,36(r1) ffc048d8: 38 21 00 28 addi r1,r1,40 ffc048dc: 4e 80 00 20 blr * 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') && ffc048e0: 88 03 00 01 lbz r0,1(r3) ffc048e4: 2f 80 00 65 cmpwi cr7,r0,101 ffc048e8: 40 9e fe bc bne+ cr7,ffc047a4 <== NEVER TAKEN ffc048ec: 88 03 00 02 lbz r0,2(r3) ffc048f0: 2f 80 00 76 cmpwi cr7,r0,118 ffc048f4: 40 9e fe b0 bne+ cr7,ffc047a4 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) ffc048f8: 88 03 00 03 lbz r0,3(r3) return 0; ffc048fc: 38 60 00 00 li r3,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')) ffc04900: 2f 80 00 00 cmpwi cr7,r0,0 ffc04904: 40 9e fe a0 bne+ cr7,ffc047a4 ffc04908: 4b ff ff 68 b ffc04870 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 ); ffc0490c: 48 00 b2 b9 bl ffc0fbc4 <__errno> ffc04910: 38 00 00 16 li r0,22 ffc04914: 90 03 00 00 stw r0,0(r3) ffc04918: 38 60 ff ff li r3,-1 ffc0491c: 4b ff ff 54 b ffc04870 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 ); ffc04920: 48 00 b2 a5 bl ffc0fbc4 <__errno> ffc04924: 38 00 00 0c li r0,12 ffc04928: 90 03 00 00 stw r0,0(r3) ffc0492c: 38 60 ff ff li r3,-1 ffc04930: 4b ff ff 40 b ffc04870 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 ); ffc04934: 48 00 b2 91 bl ffc0fbc4 <__errno> ffc04938: 38 00 00 0e li r0,14 ffc0493c: 90 03 00 00 stw r0,0(r3) ffc04940: 38 60 ff ff li r3,-1 ffc04944: 4b ff ff 2c b ffc04870 =============================================================================== ffc064cc : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) ffc064cc: 94 21 ff f0 stwu r1,-16(r1) ffc064d0: 7c 08 02 a6 mflr r0 ffc064d4: 90 01 00 14 stw r0,20(r1) ffc064d8: 93 e1 00 0c stw r31,12(r1) ffc064dc: 7c 7f 1b 78 mr r31,r3 ffc064e0: 93 c1 00 08 stw r30,8(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc064e4: 7c 00 00 a6 mfmsr r0 ffc064e8: 7d 30 42 a6 mfsprg r9,0 ffc064ec: 7c 09 48 78 andc r9,r0,r9 ffc064f0: 7d 20 01 24 mtmsr r9 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) { ffc064f4: 81 63 00 84 lwz r11,132(r3) ffc064f8: 81 23 00 80 lwz r9,128(r3) ffc064fc: 7f 8b 48 00 cmpw cr7,r11,r9 ffc06500: 41 9e 00 48 beq- cr7,ffc06548 <== ALWAYS TAKEN tty->rawOutBufState = rob_wait; ffc06504: 3b c0 00 02 li r30,2 <== NOT EXECUTED ffc06508: 93 df 00 94 stw r30,148(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0650c: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( ffc06510: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc06514: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc06518: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc0651c: 48 00 2e 21 bl ffc0933c <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc06520: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc06524: 40 9e 00 40 bne- cr7,ffc06564 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc06528: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc0652c: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc06530: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc06534: 7d 20 01 24 mtmsr r9 <== 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) { ffc06538: 81 7f 00 84 lwz r11,132(r31) <== NOT EXECUTED ffc0653c: 81 3f 00 80 lwz r9,128(r31) <== NOT EXECUTED ffc06540: 7f 8b 48 00 cmpw cr7,r11,r9 <== NOT EXECUTED ffc06544: 40 9e ff c4 bne+ cr7,ffc06508 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc06548: 7c 00 01 24 mtmsr r0 rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); } } ffc0654c: 80 01 00 14 lwz r0,20(r1) ffc06550: 83 c1 00 08 lwz r30,8(r1) ffc06554: 7c 08 03 a6 mtlr r0 ffc06558: 83 e1 00 0c lwz r31,12(r1) ffc0655c: 38 21 00 10 addi r1,r1,16 ffc06560: 4e 80 00 20 blr 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); ffc06564: 48 00 37 3d bl ffc09ca0 <== NOT EXECUTED =============================================================================== ffc073a0 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { ffc073a0: 94 21 ff e0 stwu r1,-32(r1) ffc073a4: 7c 08 02 a6 mflr r0 ffc073a8: 90 01 00 24 stw r0,36(r1) if ((tty->termios.c_lflag & ECHOCTL) && ffc073ac: 81 24 00 3c lwz r9,60(r4) /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { ffc073b0: 93 e1 00 1c stw r31,28(r1) ffc073b4: 7c 9f 23 78 mr r31,r4 if ((tty->termios.c_lflag & ECHOCTL) && ffc073b8: 71 20 02 00 andi. r0,r9,512 ffc073bc: 41 82 00 2c beq- ffc073e8 <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { ffc073c0: 3d 20 00 00 lis r9,0 ffc073c4: 81 29 27 44 lwz r9,10052(r9) ffc073c8: 7d 29 1a 14 add r9,r9,r3 ffc073cc: 88 09 00 01 lbz r0,1(r9) * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && ffc073d0: 70 09 00 20 andi. r9,r0,32 ffc073d4: 41 82 00 14 beq- ffc073e8 iscntrl(c) && (c != '\t') && (c != '\n')) { ffc073d8: 2f 83 00 09 cmpwi cr7,r3,9 ffc073dc: 41 9e 00 0c beq- cr7,ffc073e8 ffc073e0: 2f 83 00 0a cmpwi cr7,r3,10 ffc073e4: 40 9e 00 20 bne- cr7,ffc07404 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); ffc073e8: 7f e4 fb 78 mr r4,r31 ffc073ec: 4b ff fe 29 bl ffc07214 } } ffc073f0: 80 01 00 24 lwz r0,36(r1) ffc073f4: 83 e1 00 1c lwz r31,28(r1) ffc073f8: 38 21 00 20 addi r1,r1,32 ffc073fc: 7c 08 03 a6 mtlr r0 ffc07400: 4e 80 00 20 blr if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; ffc07404: 68 60 00 40 xori r0,r3,64 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; ffc07408: 39 20 00 5e li r9,94 echobuf[1] = c ^ 0x40; ffc0740c: 98 01 00 09 stb r0,9(r1) rtems_termios_puts (echobuf, 2, tty); ffc07410: 38 61 00 08 addi r3,r1,8 ffc07414: 7f e5 fb 78 mr r5,r31 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; ffc07418: 99 21 00 08 stb r9,8(r1) echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); ffc0741c: 38 80 00 02 li r4,2 ffc07420: 4b ff fc 45 bl ffc07064 tty->column += 2; ffc07424: 81 3f 00 28 lwz r9,40(r31) ffc07428: 38 09 00 02 addi r0,r9,2 ffc0742c: 90 1f 00 28 stw r0,40(r31) } else { oproc (c, tty); } } ffc07430: 80 01 00 24 lwz r0,36(r1) ffc07434: 83 e1 00 1c lwz r31,28(r1) ffc07438: 38 21 00 20 addi r1,r1,32 ffc0743c: 7c 08 03 a6 mtlr r0 ffc07440: 4e 80 00 20 blr =============================================================================== ffc060bc : void endgrent(void) { if (group_fp != NULL) ffc060bc: 3d 20 00 00 lis r9,0 fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc060c0: 94 21 ff f8 stwu r1,-8(r1) ffc060c4: 7c 08 02 a6 mflr r0 if (group_fp != NULL) ffc060c8: 80 69 2a 1c lwz r3,10780(r9) fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc060cc: 90 01 00 0c stw r0,12(r1) if (group_fp != NULL) ffc060d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc060d4: 41 9e 00 08 beq- cr7,ffc060dc <== NEVER TAKEN fclose(group_fp); ffc060d8: 48 00 d8 8d bl ffc13964 } ffc060dc: 80 01 00 0c lwz r0,12(r1) ffc060e0: 38 21 00 08 addi r1,r1,8 ffc060e4: 7c 08 03 a6 mtlr r0 ffc060e8: 4e 80 00 20 blr =============================================================================== ffc05ef0 : void endpwent(void) { if (passwd_fp != NULL) ffc05ef0: 3d 20 00 00 lis r9,0 fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc05ef4: 94 21 ff f8 stwu r1,-8(r1) ffc05ef8: 7c 08 02 a6 mflr r0 if (passwd_fp != NULL) ffc05efc: 80 69 29 40 lwz r3,10560(r9) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc05f00: 90 01 00 0c stw r0,12(r1) if (passwd_fp != NULL) ffc05f04: 2f 83 00 00 cmpwi cr7,r3,0 ffc05f08: 41 9e 00 08 beq- cr7,ffc05f10 <== NEVER TAKEN fclose(passwd_fp); ffc05f0c: 48 00 da 59 bl ffc13964 } ffc05f10: 80 01 00 0c lwz r0,12(r1) ffc05f14: 38 21 00 08 addi r1,r1,8 ffc05f18: 7c 08 03 a6 mtlr r0 ffc05f1c: 4e 80 00 20 blr =============================================================================== ffc07444 : * 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) { ffc07444: 94 21 ff d8 stwu r1,-40(r1) ffc07448: 7c 08 02 a6 mflr r0 ffc0744c: 7d 80 00 26 mfcr r12 ffc07450: 90 01 00 2c stw r0,44(r1) if (tty->ccount == 0) ffc07454: 81 23 00 20 lwz r9,32(r3) * 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) { ffc07458: 93 e1 00 24 stw r31,36(r1) ffc0745c: 7c 7f 1b 78 mr r31,r3 if (tty->ccount == 0) ffc07460: 2f 89 00 00 cmpwi cr7,r9,0 * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { ffc07464: 93 41 00 10 stw r26,16(r1) ffc07468: 93 61 00 14 stw r27,20(r1) ffc0746c: 93 81 00 18 stw r28,24(r1) ffc07470: 93 a1 00 1c stw r29,28(r1) ffc07474: 93 c1 00 20 stw r30,32(r1) ffc07478: 91 81 00 0c stw r12,12(r1) if (tty->ccount == 0) ffc0747c: 41 9e 00 9c beq- cr7,ffc07518 return; if (lineFlag) { ffc07480: 2e 04 00 00 cmpwi cr4,r4,0 if (!(tty->termios.c_lflag & ECHO)) { ffc07484: 80 03 00 3c lwz r0,60(r3) ffc07488: 54 0b 07 38 rlwinm r11,r0,0,28,28 static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { ffc0748c: 40 92 00 80 bne- cr4,ffc0750c tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc07490: 3f 60 ff c2 lis r27,-62 ffc07494: 3f a0 ff c2 lis r29,-62 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc07498: 3f 80 00 00 lis r28,0 rtems_termios_puts ("\b \b", 3, tty); ffc0749c: 3b 7b f3 4c addi r27,r27,-3252 ffc074a0: 3b bd f3 48 addi r29,r29,-3256 } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { ffc074a4: 2f 8b 00 00 cmpwi cr7,r11,0 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; ffc074a8: 81 5f 00 1c lwz r10,28(r31) ffc074ac: 39 29 ff ff addi r9,r9,-1 ffc074b0: 91 3f 00 20 stw r9,32(r31) ffc074b4: 7f ca 48 ae lbzx r30,r10,r9 if (tty->termios.c_lflag & ECHO) { ffc074b8: 41 9e 00 38 beq- cr7,ffc074f0 <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { ffc074bc: 40 92 00 0c bne- cr4,ffc074c8 ffc074c0: 70 0b 00 10 andi. r11,r0,16 ffc074c4: 41 82 01 e4 beq- ffc076a8 <== NEVER TAKEN echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { ffc074c8: 2f 9e 00 09 cmpwi cr7,r30,9 ffc074cc: 41 9e 00 e4 beq- cr7,ffc075b0 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc074d0: 81 3c 27 44 lwz r9,10052(r28) ffc074d4: 3b de 00 01 addi r30,r30,1 ffc074d8: 7f 7a db 78 mr r26,r27 ffc074dc: 7d 29 f0 ae lbzx r9,r9,r30 ffc074e0: 71 2b 00 20 andi. r11,r9,32 ffc074e4: 41 82 00 a4 beq- ffc07588 <== ALWAYS TAKEN ffc074e8: 70 09 02 00 andi. r9,r0,512 <== NOT EXECUTED ffc074ec: 40 82 00 5c bne- ffc07548 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) ffc074f0: 41 92 00 28 beq- cr4,ffc07518 echo ('\n', tty); return; } } while (tty->ccount) { ffc074f4: 81 3f 00 20 lwz r9,32(r31) ffc074f8: 2f 89 00 00 cmpwi cr7,r9,0 ffc074fc: 41 9e 00 1c beq- cr7,ffc07518 } 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); ffc07500: 80 1f 00 3c lwz r0,60(r31) ffc07504: 54 0b 07 38 rlwinm r11,r0,0,28,28 ffc07508: 4b ff ff 9c b ffc074a4 erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { ffc0750c: 70 0b 00 08 andi. r11,r0,8 ffc07510: 40 a2 01 3c bne+ ffc0764c <== ALWAYS TAKEN tty->ccount = 0; ffc07514: 91 63 00 20 stw r11,32(r3) <== NOT EXECUTED } } if (!lineFlag) break; } } ffc07518: 80 01 00 2c lwz r0,44(r1) ffc0751c: 81 81 00 0c lwz r12,12(r1) ffc07520: 7c 08 03 a6 mtlr r0 ffc07524: 83 41 00 10 lwz r26,16(r1) ffc07528: 83 61 00 14 lwz r27,20(r1) ffc0752c: 7d 80 81 20 mtcrf 8,r12 ffc07530: 83 81 00 18 lwz r28,24(r1) ffc07534: 83 a1 00 1c lwz r29,28(r1) ffc07538: 83 c1 00 20 lwz r30,32(r1) ffc0753c: 83 e1 00 24 lwz r31,36(r1) ffc07540: 38 21 00 28 addi r1,r1,40 ffc07544: 4e 80 00 20 blr tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc07548: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc0754c: 38 80 00 03 li r4,3 <== NOT EXECUTED ffc07550: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc07554: 4b ff fb 11 bl ffc07064 <== NOT EXECUTED if (tty->column) ffc07558: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED ffc0755c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc07560: 41 9e 00 0c beq- cr7,ffc0756c <== NOT EXECUTED tty->column--; ffc07564: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc07568: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { ffc0756c: 81 3c 27 44 lwz r9,10052(r28) <== NOT EXECUTED ffc07570: 7c 09 f0 ae lbzx r0,r9,r30 <== NOT EXECUTED ffc07574: 70 0b 00 20 andi. r11,r0,32 <== NOT EXECUTED ffc07578: 41 82 00 10 beq- ffc07588 <== NOT EXECUTED ffc0757c: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED ffc07580: 70 09 02 00 andi. r9,r0,512 <== NOT EXECUTED ffc07584: 41 a2 ff 6c beq- ffc074f0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); ffc07588: 7f 43 d3 78 mr r3,r26 ffc0758c: 38 80 00 03 li r4,3 ffc07590: 7f e5 fb 78 mr r5,r31 ffc07594: 4b ff fa d1 bl ffc07064 if (tty->column) ffc07598: 81 3f 00 28 lwz r9,40(r31) ffc0759c: 2f 89 00 00 cmpwi cr7,r9,0 ffc075a0: 41 be ff 50 beq- cr7,ffc074f0 <== NEVER TAKEN tty->column--; ffc075a4: 39 29 ff ff addi r9,r9,-1 ffc075a8: 91 3f 00 28 stw r9,40(r31) ffc075ac: 4b ff ff 44 b ffc074f0 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc075b0: 2f 89 00 00 cmpwi cr7,r9,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; ffc075b4: 83 df 00 2c lwz r30,44(r31) int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc075b8: 41 9e 00 44 beq- cr7,ffc075fc c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) ffc075bc: 7d 29 03 a6 mtctr r9 ffc075c0: 54 0b bf fe rlwinm r11,r0,23,31,31 */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { ffc075c4: 81 1c 27 44 lwz r8,10052(r28) if (tty->termios.c_lflag & ECHOCTL) ffc075c8: 2f 0b 00 00 cmpwi cr6,r11,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; ffc075cc: 39 60 00 00 li r11,0 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; ffc075d0: 7c 0a 58 ae lbzx r0,r10,r11 ffc075d4: 39 6b 00 01 addi r11,r11,1 if (c == '\t') { ffc075d8: 2f 80 00 09 cmpwi cr7,r0,9 col = (col | 7) + 1; } else if (iscntrl (c)) { ffc075dc: 7d 28 02 14 add r9,r8,r0 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { ffc075e0: 41 9e 00 5c beq- cr7,ffc0763c col = (col | 7) + 1; } else if (iscntrl (c)) { ffc075e4: 88 09 00 01 lbz r0,1(r9) ffc075e8: 70 09 00 20 andi. r9,r0,32 ffc075ec: 41 82 00 44 beq- ffc07630 <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) ffc075f0: 41 9a 00 08 beq- cr6,ffc075f8 <== NOT EXECUTED col += 2; ffc075f4: 3b de 00 02 addi r30,r30,2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc075f8: 42 00 ff d8 bdnz+ ffc075d0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { ffc075fc: 80 1f 00 28 lwz r0,40(r31) ffc07600: 7f 9e 00 00 cmpw cr7,r30,r0 ffc07604: 40 bc fe ec bge- cr7,ffc074f0 <== NEVER TAKEN rtems_termios_puts ("\b", 1, tty); ffc07608: 7f a3 eb 78 mr r3,r29 ffc0760c: 38 80 00 01 li r4,1 ffc07610: 7f e5 fb 78 mr r5,r31 ffc07614: 4b ff fa 51 bl ffc07064 tty->column--; ffc07618: 81 3f 00 28 lwz r9,40(r31) ffc0761c: 38 09 ff ff addi r0,r9,-1 } /* * Back up over the tab */ while (tty->column > col) { ffc07620: 7f 80 f0 00 cmpw cr7,r0,r30 rtems_termios_puts ("\b", 1, tty); tty->column--; ffc07624: 90 1f 00 28 stw r0,40(r31) } /* * Back up over the tab */ while (tty->column > col) { ffc07628: 41 9d ff e0 bgt+ cr7,ffc07608 ffc0762c: 4b ff fe c4 b ffc074f0 col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; ffc07630: 3b de 00 01 addi r30,r30,1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc07634: 42 00 ff 9c bdnz+ ffc075d0 ffc07638: 4b ff ff c4 b ffc075fc c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; ffc0763c: 63 de 00 07 ori r30,r30,7 ffc07640: 3b de 00 01 addi r30,r30,1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc07644: 42 00 ff 8c bdnz+ ffc075d0 ffc07648: 4b ff ff b4 b ffc075fc <== NOT EXECUTED if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { ffc0764c: 70 0a 00 10 andi. r10,r0,16 ffc07650: 40 82 fe 40 bne+ ffc07490 <== ALWAYS TAKEN tty->ccount = 0; ffc07654: 91 43 00 20 stw r10,32(r3) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); ffc07658: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED ffc0765c: 88 63 00 44 lbz r3,68(r3) <== NOT EXECUTED ffc07660: 4b ff fd 41 bl ffc073a0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) ffc07664: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED echo ('\n', tty); ffc07668: 38 60 00 0a li r3,10 <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) ffc0766c: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc07670: 41 82 fe a8 beq+ ffc07518 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc07674: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); ffc07678: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc0767c: 81 81 00 0c lwz r12,12(r1) <== NOT EXECUTED ffc07680: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc07684: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc07688: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc0768c: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc07690: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc07694: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc07698: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0769c: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc076a0: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); ffc076a4: 4b ff fc fc b ffc073a0 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc076a8: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); ffc076ac: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc076b0: 81 81 00 0c lwz r12,12(r1) <== NOT EXECUTED ffc076b4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); ffc076b8: 88 7f 00 43 lbz r3,67(r31) <== NOT EXECUTED } } if (!lineFlag) break; } } ffc076bc: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc076c0: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc076c4: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc076c8: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc076cc: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc076d0: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc076d4: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc076d8: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); ffc076dc: 4b ff fc c4 b ffc073a0 <== NOT EXECUTED =============================================================================== ffc05758 : int fcntl( int fd, int cmd, ... ) { ffc05758: 94 21 ff c8 stwu r1,-56(r1) ffc0575c: 7c 08 02 a6 mflr r0 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc05760: 3d 20 00 00 lis r9,0 int fcntl( int fd, int cmd, ... ) { ffc05764: 90 01 00 3c stw r0,60(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc05768: 80 09 26 dc lwz r0,9948(r9) ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc0576c: 39 20 00 02 li r9,2 ffc05770: 99 21 00 08 stb r9,8(r1) ffc05774: 39 21 00 40 addi r9,r1,64 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc05778: 7f 83 00 40 cmplw cr7,r3,r0 ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc0577c: 91 21 00 0c stw r9,12(r1) ffc05780: 39 21 00 10 addi r9,r1,16 int fcntl( int fd, int cmd, ... ) { ffc05784: 93 c1 00 30 stw r30,48(r1) ffc05788: 93 e1 00 34 stw r31,52(r1) ffc0578c: 90 a1 00 18 stw r5,24(r1) ffc05790: 90 c1 00 1c stw r6,28(r1) ffc05794: 90 e1 00 20 stw r7,32(r1) int ret; va_list ap; va_start( ap, cmd ); ffc05798: 91 21 00 10 stw r9,16(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc0579c: 40 9c 02 08 bge- cr7,ffc059a4 iop = rtems_libio_iop( fd ); ffc057a0: 3f e0 00 00 lis r31,0 ffc057a4: 81 7f 27 88 lwz r11,10120(r31) ffc057a8: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc057ac: 7f cb 1a 14 add r30,r11,r3 rtems_libio_check_is_open(iop); ffc057b0: 80 7e 00 18 lwz r3,24(r30) ffc057b4: 70 69 01 00 andi. r9,r3,256 ffc057b8: 41 82 01 ec beq- ffc059a4 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc057bc: 2b 84 00 09 cmplwi cr7,r4,9 ffc057c0: 40 9d 00 30 ble- cr7,ffc057f0 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; ffc057c4: 48 00 e0 85 bl ffc13848 <__errno> ffc057c8: 38 00 00 16 li r0,22 ffc057cc: 90 03 00 00 stw r0,0(r3) if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; ret = -1; ffc057d0: 3b e0 ff ff li r31,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc057d4: 80 01 00 3c lwz r0,60(r1) ffc057d8: 7f e3 fb 78 mr r3,r31 ffc057dc: 83 c1 00 30 lwz r30,48(r1) ffc057e0: 7c 08 03 a6 mtlr r0 ffc057e4: 83 e1 00 34 lwz r31,52(r1) ffc057e8: 38 21 00 38 addi r1,r1,56 ffc057ec: 4e 80 00 20 blr /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc057f0: 3d 20 ff c2 lis r9,-62 ffc057f4: 39 29 b2 64 addi r9,r9,-19868 ffc057f8: 54 8a 10 3a rlwinm r10,r4,2,0,29 ffc057fc: 7d 49 50 2e lwzx r10,r9,r10 ffc05800: 7d 2a 4a 14 add r9,r10,r9 ffc05804: 7d 29 03 a6 mtctr r9 ffc05808: 4e 80 04 20 bctr errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; ffc0580c: 48 00 e0 3d bl ffc13848 <__errno> ffc05810: 38 00 00 86 li r0,134 ffc05814: 90 03 00 00 stw r0,0(r3) ffc05818: 4b ff ff b8 b ffc057d0 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 ) ); ffc0581c: 89 21 00 08 lbz r9,8(r1) ffc05820: 2b 89 00 07 cmplwi cr7,r9,7 ffc05824: 40 9d 01 68 ble- cr7,ffc0598c <== ALWAYS TAKEN ffc05828: 81 61 00 0c lwz r11,12(r1) <== NOT EXECUTED ffc0582c: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED ffc05830: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc05834: 80 6b 00 00 lwz r3,0(r11) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; ffc05838: 3b e0 00 00 li r31,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 ) ); ffc0583c: 90 81 00 28 stw r4,40(r1) ffc05840: 48 00 06 c5 bl ffc05f04 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); ffc05844: 39 20 fd fe li r9,-514 ffc05848: 80 1e 00 18 lwz r0,24(r30) ffc0584c: 70 63 02 01 andi. r3,r3,513 ffc05850: 80 81 00 28 lwz r4,40(r1) ffc05854: 7d 20 00 38 and r0,r9,r0 ffc05858: 7c 60 03 78 or r0,r3,r0 ffc0585c: 90 1e 00 18 stw r0,24(r30) ffc05860: 48 00 00 1c b ffc0587c else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); ffc05864: 90 81 00 28 stw r4,40(r1) ffc05868: 48 00 06 fd bl ffc05f64 ffc0586c: 7c 7f 1b 78 mr r31,r3 ffc05870: 80 81 00 28 lwz r4,40(r1) /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { ffc05874: 2f 9f 00 00 cmpwi cr7,r31,0 ffc05878: 41 bc ff 5c blt- cr7,ffc057d4 <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); ffc0587c: 81 3e 00 24 lwz r9,36(r30) ffc05880: 7c 83 23 78 mr r3,r4 ffc05884: 7f c4 f3 78 mr r4,r30 ffc05888: 80 09 00 30 lwz r0,48(r9) ffc0588c: 7c 09 03 a6 mtctr r0 ffc05890: 4e 80 04 21 bctrl if (err) { ffc05894: 7c 7e 1b 79 mr. r30,r3 ffc05898: 41 82 ff 3c beq+ ffc057d4 <== ALWAYS TAKEN errno = err; ffc0589c: 48 00 df ad bl ffc13848 <__errno> <== NOT EXECUTED ffc058a0: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED ffc058a4: 4b ff ff 2c b ffc057d0 <== NOT EXECUTED * 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 ) ) ffc058a8: 89 21 00 08 lbz r9,8(r1) ffc058ac: 2b 89 00 07 cmplwi cr7,r9,7 ffc058b0: 41 9d 00 cc bgt- cr7,ffc0597c <== NEVER TAKEN ffc058b4: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc058b8: 81 61 00 10 lwz r11,16(r1) ffc058bc: 39 29 00 01 addi r9,r9,1 ffc058c0: 99 21 00 08 stb r9,8(r1) ffc058c4: 7d 6b 02 14 add r11,r11,r0 ffc058c8: 80 0b 00 00 lwz r0,0(r11) ffc058cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc058d0: 41 9e 00 e8 beq- cr7,ffc059b8 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; ffc058d4: 60 63 08 00 ori r3,r3,2048 ffc058d8: 90 7e 00 18 stw r3,24(r30) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; ffc058dc: 3b e0 00 00 li r31,0 ffc058e0: 4b ff ff 9c b ffc0587c 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); ffc058e4: 54 7f af fe rlwinm r31,r3,21,31,31 ffc058e8: 4b ff ff 94 b ffc0587c * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc058ec: 89 21 00 08 lbz r9,8(r1) ffc058f0: 2b 89 00 07 cmplwi cr7,r9,7 ffc058f4: 41 9d 00 78 bgt- cr7,ffc0596c <== NEVER TAKEN ffc058f8: 55 2a 10 3a rlwinm r10,r9,2,0,29 ffc058fc: 81 01 00 10 lwz r8,16(r1) ffc05900: 39 29 00 01 addi r9,r9,1 ffc05904: 99 21 00 08 stb r9,8(r1) ffc05908: 7d 48 52 14 add r10,r8,r10 ffc0590c: 81 4a 00 00 lwz r10,0(r10) if ( fd2 ) ffc05910: 2f 8a 00 00 cmpwi cr7,r10,0 ffc05914: 41 9e 00 b4 beq- cr7,ffc059c8 diop = rtems_libio_iop( fd2 ); ffc05918: 7f 80 50 40 cmplw cr7,r0,r10 ffc0591c: 3b e0 00 00 li r31,0 ffc05920: 39 20 00 00 li r9,0 ffc05924: 40 9d 00 10 ble- cr7,ffc05934 <== NEVER TAKEN ffc05928: 55 49 30 32 rlwinm r9,r10,6,0,25 ffc0592c: 7d 2b 4a 14 add r9,r11,r9 ffc05930: 7d 3f 4b 78 mr r31,r9 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc05934: 80 1e 00 28 lwz r0,40(r30) ret = (int) (diop - rtems_libio_iops); ffc05938: 7f eb f8 50 subf r31,r11,r31 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc0593c: 80 fe 00 1c lwz r7,28(r30) ret = (int) (diop - rtems_libio_iops); ffc05940: 7f ff 36 70 srawi r31,r31,6 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc05944: 81 1e 00 20 lwz r8,32(r30) ffc05948: 81 5e 00 24 lwz r10,36(r30) ffc0594c: 90 e9 00 1c stw r7,28(r9) ffc05950: 91 09 00 20 stw r8,32(r9) ffc05954: 91 49 00 24 stw r10,36(r9) ffc05958: 90 09 00 28 stw r0,40(r9) ffc0595c: 80 1e 00 2c lwz r0,44(r30) ret = -1; break; } } diop->flags = iop->flags; ffc05960: 90 69 00 18 stw r3,24(r9) diop->pathinfo = iop->pathinfo; ffc05964: 90 09 00 2c stw r0,44(r9) ffc05968: 4b ff ff 0c b ffc05874 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc0596c: 81 41 00 0c lwz r10,12(r1) <== NOT EXECUTED ffc05970: 39 2a 00 04 addi r9,r10,4 <== NOT EXECUTED ffc05974: 91 21 00 0c stw r9,12(r1) <== NOT EXECUTED ffc05978: 4b ff ff 94 b ffc0590c <== NOT EXECUTED * 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 ) ) ffc0597c: 81 61 00 0c lwz r11,12(r1) <== NOT EXECUTED ffc05980: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED ffc05984: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc05988: 4b ff ff 40 b ffc058c8 <== NOT EXECUTED 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 ) ); ffc0598c: 81 61 00 10 lwz r11,16(r1) ffc05990: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc05994: 39 29 00 01 addi r9,r9,1 ffc05998: 7d 6b 02 14 add r11,r11,r0 ffc0599c: 99 21 00 08 stb r9,8(r1) ffc059a0: 4b ff fe 94 b ffc05834 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); ffc059a4: 48 00 de a5 bl ffc13848 <__errno> ffc059a8: 38 00 00 09 li r0,9 ffc059ac: 90 03 00 00 stw r0,0(r3) ffc059b0: 3b e0 ff ff li r31,-1 ffc059b4: 4b ff fe 20 b ffc057d4 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; ffc059b8: 54 63 05 66 rlwinm r3,r3,0,21,19 ffc059bc: 90 7e 00 18 stw r3,24(r30) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; ffc059c0: 3b e0 00 00 li r31,0 ffc059c4: 4b ff fe b8 b ffc0587c fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); ffc059c8: 90 81 00 28 stw r4,40(r1) ffc059cc: 48 00 05 e9 bl ffc05fb4 if ( diop == 0 ) { ffc059d0: 7c 69 1b 79 mr. r9,r3 ffc059d4: 80 81 00 28 lwz r4,40(r1) ffc059d8: 41 a2 fd f8 beq- ffc057d0 <== NEVER TAKEN ffc059dc: 81 7f 27 88 lwz r11,10120(r31) ffc059e0: 7d 3f 4b 78 mr r31,r9 ffc059e4: 80 7e 00 18 lwz r3,24(r30) ffc059e8: 4b ff ff 4c b ffc05934 =============================================================================== ffc11450 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11450: 94 21 ff d0 stwu r1,-48(r1) ffc11454: 7c 08 02 a6 mflr r0 ffc11458: 93 e1 00 2c stw r31,44(r1) static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc1145c: 3f e0 00 00 lis r31,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11460: 90 01 00 34 stw r0,52(r1) static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc11464: 80 1f 29 60 lwz r0,10592(r31) */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11468: 93 61 00 1c stw r27,28(r1) static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc1146c: 3b 7f 29 60 addi r27,r31,10592 ffc11470: 2f 80 00 00 cmpwi cr7,r0,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11474: 93 81 00 20 stw r28,32(r1) ffc11478: 7c 9c 23 78 mr r28,r4 ffc1147c: 93 c1 00 28 stw r30,40(r1) ffc11480: 7c 7e 1b 78 mr r30,r3 ffc11484: 93 a1 00 24 stw r29,36(r1) static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc11488: 41 9e 00 c0 beq- cr7,ffc11548 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc1148c: 7c 03 03 78 mr r3,r0 ffc11490: 38 80 00 00 li r4,0 ffc11494: 38 a0 00 00 li r5,0 ffc11498: 4b ff a2 7d bl ffc0b714 } if (sc == RTEMS_SUCCESSFUL) { ffc1149c: 3b 60 ff f4 li r27,-12 ffc114a0: 2f 83 00 00 cmpwi cr7,r3,0 ffc114a4: 40 9e 00 7c bne- cr7,ffc11520 <== NEVER TAKEN err = pipe_lock(); if (err) return err; pipe = *pipep; ffc114a8: 83 be 00 00 lwz r29,0(r30) if (pipe == NULL) { ffc114ac: 2f 9d 00 00 cmpwi cr7,r29,0 ffc114b0: 41 9e 02 30 beq- cr7,ffc116e0 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc114b4: 80 7d 00 28 lwz r3,40(r29) ffc114b8: 38 80 00 00 li r4,0 ffc114bc: 38 a0 00 00 li r5,0 ffc114c0: 4b ff a2 55 bl ffc0b714 err = -EINTR; ffc114c4: 3b 60 ff fc li r27,-4 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc114c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc114cc: 40 9e 00 08 bne- cr7,ffc114d4 <== NEVER TAKEN ffc114d0: 3b 60 00 00 li r27,0 err = -EINTR; if (*pipep == NULL) { ffc114d4: 80 1e 00 00 lwz r0,0(r30) ffc114d8: 2f 80 00 00 cmpwi cr7,r0,0 ffc114dc: 41 9e 02 d0 beq- cr7,ffc117ac static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); ffc114e0: 80 7f 29 60 lwz r3,10592(r31) ffc114e4: 4b ff a3 bd bl ffc0b8a0 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) ffc114e8: 2f 9b 00 00 cmpwi cr7,r27,0 ffc114ec: 40 9e 00 34 bne- cr7,ffc11520 <== NEVER TAKEN return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { ffc114f0: 80 1c 00 18 lwz r0,24(r28) int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; ffc114f4: 83 fe 00 00 lwz r31,0(r30) switch (LIBIO_ACCMODE(iop)) { ffc114f8: 54 00 07 7c rlwinm r0,r0,0,29,30 ffc114fc: 2f 80 00 04 cmpwi cr7,r0,4 ffc11500: 41 9e 00 78 beq- cr7,ffc11578 ffc11504: 2f 80 00 06 cmpwi cr7,r0,6 ffc11508: 41 9e 01 88 beq- cr7,ffc11690 ffc1150c: 2f 80 00 02 cmpwi cr7,r0,2 ffc11510: 41 9e 00 fc beq- cr7,ffc1160c <== ALWAYS TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); ffc11514: 80 7f 00 28 lwz r3,40(r31) return 0; ffc11518: 3b 60 00 00 li r27,0 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); ffc1151c: 4b ff a3 85 bl ffc0b8a0 return 0; out_error: pipe_release(pipep, iop); return err; } ffc11520: 80 01 00 34 lwz r0,52(r1) ffc11524: 7f 63 db 78 mr r3,r27 ffc11528: 83 81 00 20 lwz r28,32(r1) ffc1152c: 7c 08 03 a6 mtlr r0 ffc11530: 83 61 00 1c lwz r27,28(r1) ffc11534: 83 a1 00 24 lwz r29,36(r1) ffc11538: 83 c1 00 28 lwz r30,40(r1) ffc1153c: 83 e1 00 2c lwz r31,44(r1) ffc11540: 38 21 00 30 addi r1,r1,48 ffc11544: 4e 80 00 20 blr 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 ); ffc11548: 3f a0 00 00 lis r29,0 ffc1154c: 80 7d 27 90 lwz r3,10128(r29) ffc11550: 38 80 00 00 li r4,0 ffc11554: 38 a0 00 00 li r5,0 ffc11558: 4b ff a1 bd bl ffc0b714 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { ffc1155c: 80 1f 29 60 lwz r0,10592(r31) ffc11560: 2f 80 00 00 cmpwi cr7,r0,0 ffc11564: 41 9e 02 60 beq- cr7,ffc117c4 <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc11568: 80 7d 27 90 lwz r3,10128(r29) <== NOT EXECUTED ffc1156c: 4b ff a3 35 bl ffc0b8a0 <== NOT EXECUTED ffc11570: 80 1f 29 60 lwz r0,10592(r31) <== NOT EXECUTED ffc11574: 4b ff ff 18 b ffc1148c <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc11578: 81 3f 00 14 lwz r9,20(r31) } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc1157c: 81 7f 00 24 lwz r11,36(r31) if (pipe->Writers ++ == 0) ffc11580: 2f 89 00 00 cmpwi cr7,r9,0 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc11584: 38 0b 00 01 addi r0,r11,1 if (pipe->Writers ++ == 0) ffc11588: 39 29 00 01 addi r9,r9,1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc1158c: 90 1f 00 24 stw r0,36(r31) if (pipe->Writers ++ == 0) ffc11590: 91 3f 00 14 stw r9,20(r31) ffc11594: 41 9e 02 8c beq- cr7,ffc11820 <== ALWAYS TAKEN PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { ffc11598: 80 1f 00 10 lwz r0,16(r31) ffc1159c: 2f 80 00 00 cmpwi cr7,r0,0 ffc115a0: 40 be ff 74 bne- cr7,ffc11514 ffc115a4: 80 1c 00 18 lwz r0,24(r28) ffc115a8: 70 09 00 01 andi. r9,r0,1 ffc115ac: 40 82 02 b8 bne- ffc11864 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; ffc115b0: 83 bf 00 20 lwz r29,32(r31) ffc115b4: 48 00 00 20 b ffc115d4 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) ffc115b8: 80 7f 00 28 lwz r3,40(r31) ffc115bc: 4b ff a1 59 bl ffc0b714 ffc115c0: 2f 83 00 00 cmpwi cr7,r3,0 ffc115c4: 40 9e 00 34 bne- cr7,ffc115f8 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); ffc115c8: 80 1f 00 20 lwz r0,32(r31) ffc115cc: 7f 80 e8 00 cmpw cr7,r0,r29 ffc115d0: 40 be ff 44 bne- cr7,ffc11514 <== ALWAYS TAKEN if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); ffc115d4: 80 7f 00 28 lwz r3,40(r31) ffc115d8: 4b ff a2 c9 bl ffc0b8a0 if (! PIPE_WRITEWAIT(pipe)) ffc115dc: 80 7f 00 30 lwz r3,48(r31) ffc115e0: 38 80 00 00 li r4,0 ffc115e4: 48 00 17 ad bl ffc12d90 goto out_error; if (! PIPE_LOCK(pipe)) ffc115e8: 38 80 00 00 li r4,0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc115ec: 2f 83 00 00 cmpwi cr7,r3,0 goto out_error; if (! PIPE_LOCK(pipe)) ffc115f0: 38 a0 00 00 li r5,0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc115f4: 41 9e ff c4 beq+ cr7,ffc115b8 <== ALWAYS TAKEN goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; ffc115f8: 3b 60 ff fc li r27,-4 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); ffc115fc: 7f c3 f3 78 mr r3,r30 ffc11600: 7f 84 e3 78 mr r4,r28 ffc11604: 4b ff fc f5 bl ffc112f8 return err; ffc11608: 4b ff ff 18 b ffc11520 pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc1160c: 81 3f 00 10 lwz r9,16(r31) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc11610: 81 7f 00 20 lwz r11,32(r31) if (pipe->Readers ++ == 0) ffc11614: 2f 89 00 00 cmpwi cr7,r9,0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc11618: 38 0b 00 01 addi r0,r11,1 if (pipe->Readers ++ == 0) ffc1161c: 39 29 00 01 addi r9,r9,1 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc11620: 90 1f 00 20 stw r0,32(r31) if (pipe->Readers ++ == 0) ffc11624: 91 3f 00 10 stw r9,16(r31) ffc11628: 41 9e 01 d8 beq- cr7,ffc11800 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { ffc1162c: 80 1f 00 14 lwz r0,20(r31) ffc11630: 2f 80 00 00 cmpwi cr7,r0,0 ffc11634: 40 be fe e0 bne- cr7,ffc11514 /* Not an error */ if (LIBIO_NODELAY(iop)) ffc11638: 80 1c 00 18 lwz r0,24(r28) ffc1163c: 70 09 00 01 andi. r9,r0,1 ffc11640: 40 a2 fe d4 bne- ffc11514 break; prevCounter = pipe->writerCounter; ffc11644: 83 bf 00 24 lwz r29,36(r31) ffc11648: 48 00 00 20 b ffc11668 /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) ffc1164c: 80 7f 00 28 lwz r3,40(r31) ffc11650: 4b ff a0 c5 bl ffc0b714 ffc11654: 2f 83 00 00 cmpwi cr7,r3,0 ffc11658: 40 be ff a0 bne- cr7,ffc115f8 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); ffc1165c: 80 1f 00 24 lwz r0,36(r31) ffc11660: 7f 80 e8 00 cmpw cr7,r0,r29 ffc11664: 40 be fe b0 bne- cr7,ffc11514 <== ALWAYS TAKEN prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); ffc11668: 80 7f 00 28 lwz r3,40(r31) ffc1166c: 4b ff a2 35 bl ffc0b8a0 if (! PIPE_READWAIT(pipe)) ffc11670: 80 7f 00 2c lwz r3,44(r31) ffc11674: 38 80 00 00 li r4,0 ffc11678: 48 00 17 19 bl ffc12d90 goto out_error; if (! PIPE_LOCK(pipe)) ffc1167c: 38 80 00 00 li r4,0 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ffc11680: 2f 83 00 00 cmpwi cr7,r3,0 goto out_error; if (! PIPE_LOCK(pipe)) ffc11684: 38 a0 00 00 li r5,0 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ffc11688: 41 9e ff c4 beq+ cr7,ffc1164c <== ALWAYS TAKEN ffc1168c: 4b ff ff 6c b ffc115f8 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc11690: 81 3f 00 10 lwz r9,16(r31) } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc11694: 81 7f 00 20 lwz r11,32(r31) if (pipe->Readers ++ == 0) ffc11698: 2f 89 00 00 cmpwi cr7,r9,0 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc1169c: 38 0b 00 01 addi r0,r11,1 if (pipe->Readers ++ == 0) ffc116a0: 39 29 00 01 addi r9,r9,1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc116a4: 90 1f 00 20 stw r0,32(r31) if (pipe->Readers ++ == 0) ffc116a8: 91 3f 00 10 stw r9,16(r31) ffc116ac: 41 9e 01 64 beq- cr7,ffc11810 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc116b0: 81 3f 00 14 lwz r9,20(r31) case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc116b4: 81 7f 00 24 lwz r11,36(r31) if (pipe->Writers ++ == 0) ffc116b8: 2f 89 00 00 cmpwi cr7,r9,0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc116bc: 38 0b 00 01 addi r0,r11,1 if (pipe->Writers ++ == 0) ffc116c0: 39 29 00 01 addi r9,r9,1 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc116c4: 90 1f 00 24 stw r0,36(r31) if (pipe->Writers ++ == 0) ffc116c8: 91 3f 00 14 stw r9,20(r31) ffc116cc: 40 9e fe 48 bne+ cr7,ffc11514 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); ffc116d0: 80 7f 00 2c lwz r3,44(r31) ffc116d4: 38 81 00 08 addi r4,r1,8 ffc116d8: 48 00 16 25 bl ffc12cfc ffc116dc: 4b ff fe 38 b ffc11514 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ffc116e0: 38 60 00 34 li r3,52 ffc116e4: 4b ff 61 55 bl ffc07838 if (pipe == NULL) ffc116e8: 7c 7d 1b 79 mr. r29,r3 ffc116ec: 41 82 01 a8 beq- ffc11894 return err; memset(pipe, 0, sizeof(pipe_control_t)); ffc116f0: 38 80 00 00 li r4,0 ffc116f4: 38 a0 00 34 li r5,52 ffc116f8: 48 00 47 b1 bl ffc15ea8 pipe->Size = PIPE_BUF; ffc116fc: 38 00 02 00 li r0,512 ffc11700: 90 1d 00 04 stw r0,4(r29) pipe->Buffer = malloc(pipe->Size); ffc11704: 38 60 02 00 li r3,512 ffc11708: 4b ff 61 31 bl ffc07838 if (! pipe->Buffer) ffc1170c: 2f 83 00 00 cmpwi cr7,r3,0 if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); ffc11710: 90 7d 00 00 stw r3,0(r29) if (! pipe->Buffer) ffc11714: 41 9e 01 78 beq- cr7,ffc1188c <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), ffc11718: 3f 60 00 00 lis r27,0 ffc1171c: 88 7b 21 b5 lbz r3,8629(r27) if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( ffc11720: 38 80 00 00 li r4,0 ffc11724: 38 a0 00 00 li r5,0 ffc11728: 64 63 50 49 oris r3,r3,20553 ffc1172c: 60 63 72 00 ori r3,r3,29184 ffc11730: 38 dd 00 2c addi r6,r29,44 ffc11734: 48 00 13 e9 bl ffc12b1c ffc11738: 2f 83 00 00 cmpwi cr7,r3,0 ffc1173c: 40 9e 01 48 bne- cr7,ffc11884 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), ffc11740: 88 7b 21 b5 lbz r3,8629(r27) 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( ffc11744: 38 80 00 00 li r4,0 ffc11748: 38 a0 00 00 li r5,0 ffc1174c: 64 63 50 49 oris r3,r3,20553 ffc11750: 60 63 77 00 ori r3,r3,30464 ffc11754: 38 dd 00 30 addi r6,r29,48 ffc11758: 48 00 13 c5 bl ffc12b1c ffc1175c: 2f 83 00 00 cmpwi cr7,r3,0 ffc11760: 40 9e 01 1c bne- cr7,ffc1187c rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( rtems_build_name ('P', 'I', 's', c), 1, ffc11764: 88 7b 21 b5 lbz r3,8629(r27) 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( ffc11768: 38 80 00 01 li r4,1 ffc1176c: 38 a0 00 10 li r5,16 ffc11770: 64 63 50 49 oris r3,r3,20553 ffc11774: 60 63 73 00 ori r3,r3,29440 ffc11778: 38 c0 00 00 li r6,0 ffc1177c: 38 fd 00 28 addi r7,r29,40 ffc11780: 4b ff 9c bd bl ffc0b43c ffc11784: 2f 83 00 00 cmpwi cr7,r3,0 ffc11788: 40 9e 00 ec bne- cr7,ffc11874 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') ffc1178c: 89 3b 21 b5 lbz r9,8629(r27) ffc11790: 2f 89 00 7a cmpwi cr7,r9,122 ffc11794: 39 29 00 01 addi r9,r9,1 ffc11798: 99 3b 21 b5 stb r9,8629(r27) ffc1179c: 40 9e fd 18 bne+ cr7,ffc114b4 c = 'a'; ffc117a0: 38 00 00 61 li r0,97 ffc117a4: 98 1b 21 b5 stb r0,8629(r27) ffc117a8: 4b ff fd 0c b ffc114b4 if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) ffc117ac: 2f 9b 00 00 cmpwi cr7,r27,0 ffc117b0: 40 9e 00 80 bne- cr7,ffc11830 <== NEVER TAKEN pipe_free(pipe); else *pipep = pipe; ffc117b4: 93 be 00 00 stw r29,0(r30) static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); ffc117b8: 80 7f 29 60 lwz r3,10592(r31) ffc117bc: 4b ff a0 e5 bl ffc0b8a0 ffc117c0: 4b ff fd 30 b ffc114f0 if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( ffc117c4: 3c 60 50 49 lis r3,20553 ffc117c8: 7f 67 db 78 mr r7,r27 ffc117cc: 38 80 00 01 li r4,1 ffc117d0: 38 a0 00 54 li r5,84 ffc117d4: 38 c0 00 00 li r6,0 ffc117d8: 60 63 50 45 ori r3,r3,20549 ffc117dc: 4b ff 9c 61 bl ffc0b43c ffc117e0: 7c 7b 1b 78 mr r27,r3 ffc117e4: 80 7d 27 90 lwz r3,10128(r29) ffc117e8: 4b ff a0 b9 bl ffc0b8a0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { ffc117ec: 2f 9b 00 00 cmpwi cr7,r27,0 ffc117f0: 3b 60 ff f4 li r27,-12 ffc117f4: 40 9e fd 2c bne+ cr7,ffc11520 ffc117f8: 80 1f 29 60 lwz r0,10592(r31) ffc117fc: 4b ff fc 90 b ffc1148c switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); ffc11800: 80 7f 00 30 lwz r3,48(r31) ffc11804: 38 81 00 08 addi r4,r1,8 ffc11808: 48 00 14 f5 bl ffc12cfc ffc1180c: 4b ff fe 20 b ffc1162c break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); ffc11810: 80 7f 00 30 lwz r3,48(r31) ffc11814: 38 81 00 08 addi r4,r1,8 ffc11818: 48 00 14 e5 bl ffc12cfc ffc1181c: 4b ff fe 94 b ffc116b0 case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); ffc11820: 80 7f 00 2c lwz r3,44(r31) ffc11824: 38 81 00 08 addi r4,r1,8 ffc11828: 48 00 14 d5 bl ffc12cfc ffc1182c: 4b ff fd 6c b ffc11598 /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); ffc11830: 80 7d 00 2c lwz r3,44(r29) <== NOT EXECUTED ffc11834: 48 00 13 fd bl ffc12c30 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); ffc11838: 80 7d 00 30 lwz r3,48(r29) <== NOT EXECUTED ffc1183c: 48 00 13 f5 bl ffc12c30 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); ffc11840: 80 7d 00 28 lwz r3,40(r29) <== NOT EXECUTED ffc11844: 4b ff 9d f5 bl ffc0b638 <== NOT EXECUTED free(pipe->Buffer); ffc11848: 80 7d 00 00 lwz r3,0(r29) <== NOT EXECUTED ffc1184c: 4b ff 56 39 bl ffc06e84 <== NOT EXECUTED free(pipe); ffc11850: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc11854: 4b ff 56 31 bl ffc06e84 <== NOT EXECUTED static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); ffc11858: 80 7f 29 60 lwz r3,10592(r31) ffc1185c: 4b ff a0 45 bl ffc0b8a0 ffc11860: 4b ff fc c0 b ffc11520 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); ffc11864: 80 7f 00 28 lwz r3,40(r31) err = -ENXIO; ffc11868: 3b 60 ff fa li r27,-6 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); ffc1186c: 4b ff a0 35 bl ffc0b8a0 err = -ENXIO; goto out_error; ffc11870: 4b ff fd 8c b ffc115fc if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); ffc11874: 80 7d 00 30 lwz r3,48(r29) ffc11878: 48 00 13 b9 bl ffc12c30 err_wbar: rtems_barrier_delete(pipe->readBarrier); ffc1187c: 80 7d 00 2c lwz r3,44(r29) ffc11880: 48 00 13 b1 bl ffc12c30 err_rbar: free(pipe->Buffer); ffc11884: 80 7d 00 00 lwz r3,0(r29) ffc11888: 4b ff 55 fd bl ffc06e84 err_buf: free(pipe); ffc1188c: 7f a3 eb 78 mr r3,r29 ffc11890: 4b ff 55 f5 bl ffc06e84 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { ffc11894: 3b 60 ff f4 li r27,-12 ffc11898: 4b ff ff c0 b ffc11858 =============================================================================== ffc05a74 : long fpathconf( int fd, int name ) { ffc05a74: 7c 08 02 a6 mflr r0 ffc05a78: 94 21 ff f8 stwu r1,-8(r1) long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); ffc05a7c: 3d 20 00 00 lis r9,0 long fpathconf( int fd, int name ) { ffc05a80: 90 01 00 0c stw r0,12(r1) long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); ffc05a84: 80 09 26 dc lwz r0,9948(r9) ffc05a88: 7f 83 00 40 cmplw cr7,r3,r0 ffc05a8c: 40 9c 00 c8 bge- cr7,ffc05b54 iop = rtems_libio_iop(fd); ffc05a90: 3d 20 00 00 lis r9,0 ffc05a94: 80 09 27 88 lwz r0,10120(r9) ffc05a98: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc05a9c: 7c 60 1a 14 add r3,r0,r3 rtems_libio_check_is_open(iop); ffc05aa0: 80 03 00 18 lwz r0,24(r3) ffc05aa4: 70 09 01 00 andi. r9,r0,256 ffc05aa8: 41 82 00 ac beq- ffc05b54 <== NEVER TAKEN * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { ffc05aac: 2b 84 00 0b cmplwi cr7,r4,11 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; ffc05ab0: 81 23 00 2c lwz r9,44(r3) switch ( name ) { ffc05ab4: 40 9d 00 24 ble- cr7,ffc05ad8 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc05ab8: 48 00 dd 91 bl ffc13848 <__errno> ffc05abc: 38 00 00 16 li r0,22 ffc05ac0: 90 03 00 00 stw r0,0(r3) ffc05ac4: 38 60 ff ff li r3,-1 break; } return return_value; } ffc05ac8: 80 01 00 0c lwz r0,12(r1) ffc05acc: 38 21 00 08 addi r1,r1,8 ffc05ad0: 7c 08 03 a6 mtlr r0 ffc05ad4: 4e 80 00 20 blr * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { ffc05ad8: 3d 60 ff c2 lis r11,-62 ffc05adc: 39 6b b2 8c addi r11,r11,-19828 ffc05ae0: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc05ae4: 7c 0b 20 2e lwzx r0,r11,r4 ffc05ae8: 7d 60 5a 14 add r11,r0,r11 ffc05aec: 7d 69 03 a6 mtctr r11 ffc05af0: 4e 80 04 20 bctr break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; ffc05af4: 80 69 00 5c lwz r3,92(r9) break; ffc05af8: 4b ff ff d0 b ffc05ac8 break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; ffc05afc: 80 69 00 50 lwz r3,80(r9) break; ffc05b00: 4b ff ff c8 b ffc05ac8 break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; ffc05b04: 80 69 00 64 lwz r3,100(r9) break; ffc05b08: 4b ff ff c0 b ffc05ac8 break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; ffc05b0c: 80 69 00 58 lwz r3,88(r9) break; ffc05b10: 4b ff ff b8 b ffc05ac8 break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; ffc05b14: 80 69 00 54 lwz r3,84(r9) break; ffc05b18: 4b ff ff b0 b ffc05ac8 break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; ffc05b1c: 80 69 00 4c lwz r3,76(r9) break; ffc05b20: 4b ff ff a8 b ffc05ac8 break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; ffc05b24: 80 69 00 48 lwz r3,72(r9) break; ffc05b28: 4b ff ff a0 b ffc05ac8 break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; ffc05b2c: 80 69 00 44 lwz r3,68(r9) break; ffc05b30: 4b ff ff 98 b ffc05ac8 break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; ffc05b34: 80 69 00 40 lwz r3,64(r9) break; ffc05b38: 4b ff ff 90 b ffc05ac8 switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; ffc05b3c: 80 69 00 3c lwz r3,60(r9) break; ffc05b40: 4b ff ff 88 b ffc05ac8 the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; ffc05b44: 80 69 00 38 lwz r3,56(r9) break; ffc05b48: 4b ff ff 80 b ffc05ac8 break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; ffc05b4c: 80 69 00 60 lwz r3,96(r9) break; ffc05b50: 4b ff ff 78 b ffc05ac8 rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); ffc05b54: 48 00 dc f5 bl ffc13848 <__errno> ffc05b58: 38 00 00 09 li r0,9 ffc05b5c: 90 03 00 00 stw r0,0(r3) ffc05b60: 38 60 ff ff li r3,-1 ffc05b64: 4b ff ff 64 b ffc05ac8 =============================================================================== ffc05100 : #include void free( void *ptr ) { ffc05100: 94 21 ff f0 stwu r1,-16(r1) ffc05104: 7c 08 02 a6 mflr r0 MSBUMP(free_calls, 1); ffc05108: 3d 20 00 00 lis r9,0 #include void free( void *ptr ) { ffc0510c: 90 01 00 14 stw r0,20(r1) MSBUMP(free_calls, 1); ffc05110: 39 29 2a e8 addi r9,r9,10984 #include void free( void *ptr ) { ffc05114: 93 e1 00 0c stw r31,12(r1) MSBUMP(free_calls, 1); if ( !ptr ) ffc05118: 7c 7f 1b 79 mr. r31,r3 void free( void *ptr ) { MSBUMP(free_calls, 1); ffc0511c: 81 69 00 0c lwz r11,12(r9) #include void free( void *ptr ) { ffc05120: 93 c1 00 08 stw r30,8(r1) MSBUMP(free_calls, 1); ffc05124: 38 0b 00 01 addi r0,r11,1 ffc05128: 90 09 00 0c stw r0,12(r9) if ( !ptr ) ffc0512c: 41 82 00 6c beq- ffc05198 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc05130: 3d 20 00 00 lis r9,0 ffc05134: 80 09 28 04 lwz r0,10244(r9) ffc05138: 2f 80 00 03 cmpwi cr7,r0,3 ffc0513c: 41 9e 00 74 beq- cr7,ffc051b0 <== ALWAYS TAKEN } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc05140: 3d 20 00 00 lis r9,0 ffc05144: 81 29 27 68 lwz r9,10088(r9) ffc05148: 2f 89 00 00 cmpwi cr7,r9,0 ffc0514c: 41 9e 00 14 beq- cr7,ffc05160 (*rtems_malloc_statistics_helpers->at_free)(ptr); ffc05150: 80 09 00 08 lwz r0,8(r9) ffc05154: 7f e3 fb 78 mr r3,r31 ffc05158: 7c 09 03 a6 mtctr r0 ffc0515c: 4e 80 04 21 bctrl if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { ffc05160: 3f c0 00 00 lis r30,0 ffc05164: 80 7e 26 ec lwz r3,9964(r30) ffc05168: 7f e4 fb 78 mr r4,r31 ffc0516c: 48 00 65 25 bl ffc0b690 <_Protected_heap_Free> ffc05170: 2f 83 00 00 cmpwi cr7,r3,0 ffc05174: 40 be 00 24 bne+ cr7,ffc05198 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, ffc05178: 81 3e 26 ec lwz r9,9964(r30) */ 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", ffc0517c: 3c 60 ff c2 lis r3,-62 ffc05180: 38 63 f2 cc addi r3,r3,-3380 ffc05184: 80 a9 00 18 lwz r5,24(r9) ffc05188: 7f e4 fb 78 mr r4,r31 ffc0518c: 80 c9 00 1c lwz r6,28(r9) ffc05190: 4c c6 31 82 crclr 4*cr1+eq ffc05194: 48 00 11 7d bl ffc06310 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } ffc05198: 80 01 00 14 lwz r0,20(r1) ffc0519c: 83 c1 00 08 lwz r30,8(r1) ffc051a0: 7c 08 03 a6 mtlr r0 ffc051a4: 83 e1 00 0c lwz r31,12(r1) ffc051a8: 38 21 00 10 addi r1,r1,16 ffc051ac: 4e 80 00 20 blr /* * 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() ) { ffc051b0: 48 00 01 99 bl ffc05348 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc051b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc051b8: 40 9e ff 88 bne+ cr7,ffc05140 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); ffc051bc: 7f e3 fb 78 mr r3,r31 ffc051c0: 48 00 02 15 bl ffc053d4 return; ffc051c4: 4b ff ff d4 b ffc05198 =============================================================================== ffc06274 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc06274: 94 21 ff f0 stwu r1,-16(r1) ffc06278: 7c 08 02 a6 mflr r0 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc0627c: 3d 20 00 00 lis r9,0 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc06280: 90 01 00 14 stw r0,20(r1) rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc06284: 38 09 2a d8 addi r0,r9,10968 ffc06288: 7f 83 00 00 cmpw cr7,r3,r0 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc0628c: 93 e1 00 0c stw r31,12(r1) ffc06290: 7c 7f 1b 78 mr r31,r3 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc06294: 41 9e 00 1c beq- cr7,ffc062b0 <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); ffc06298: 38 63 00 04 addi r3,r3,4 ffc0629c: 4b ff ea 19 bl ffc04cb4 rtems_filesystem_freenode( &env->root_directory); ffc062a0: 38 7f 00 18 addi r3,r31,24 ffc062a4: 4b ff ea 11 bl ffc04cb4 free(env); ffc062a8: 7f e3 fb 78 mr r3,r31 ffc062ac: 4b ff ea 35 bl ffc04ce0 } } ffc062b0: 80 01 00 14 lwz r0,20(r1) ffc062b4: 83 e1 00 0c lwz r31,12(r1) ffc062b8: 38 21 00 10 addi r1,r1,16 ffc062bc: 7c 08 03 a6 mtlr r0 ffc062c0: 4e 80 00 20 blr =============================================================================== ffc1933c : int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc1933c: 94 21 ff c8 stwu r1,-56(r1) ffc19340: 7c 08 02 a6 mflr r0 rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc19344: 3d 20 00 00 lis r9,0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc19348: 90 01 00 3c stw r0,60(r1) rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc1934c: 80 09 27 5c lwz r0,10076(r9) int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc19350: 93 a1 00 2c stw r29,44(r1) rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc19354: 3b a0 00 00 li r29,0 ffc19358: 7f 83 00 40 cmplw cr7,r3,r0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc1935c: 93 c1 00 30 stw r30,48(r1) ffc19360: 7c 9e 23 78 mr r30,r4 ffc19364: 93 e1 00 34 stw r31,52(r1) ffc19368: 7c bf 2b 78 mr r31,r5 rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc1936c: 40 9c 00 14 bge- cr7,ffc19380 <== NEVER TAKEN ffc19370: 3d 20 00 00 lis r9,0 ffc19374: 83 a9 28 14 lwz r29,10260(r9) ffc19378: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc1937c: 7f bd 1a 14 add r29,r29,r3 /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc19380: 81 3d 00 28 lwz r9,40(r29) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc19384: 38 61 00 08 addi r3,r1,8 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc19388: 80 1d 00 2c lwz r0,44(r29) ffc1938c: 81 1d 00 1c lwz r8,28(r29) ffc19390: 81 5d 00 20 lwz r10,32(r29) ffc19394: 81 7d 00 24 lwz r11,36(r29) ffc19398: 90 01 00 18 stw r0,24(r1) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc1939c: 80 09 00 10 lwz r0,16(r9) iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc193a0: 91 01 00 08 stw r8,8(r1) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc193a4: 7c 09 03 a6 mtctr r0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc193a8: 91 41 00 0c stw r10,12(r1) ffc193ac: 91 61 00 10 stw r11,16(r1) ffc193b0: 91 21 00 14 stw r9,20(r1) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc193b4: 4e 80 04 21 bctrl ffc193b8: 2f 83 00 01 cmpwi cr7,r3,1 ffc193bc: 40 9e 00 3c bne- cr7,ffc193f8 /* * 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 ); ffc193c0: 81 3d 00 24 lwz r9,36(r29) ffc193c4: 7f a3 eb 78 mr r3,r29 ffc193c8: 7f c4 f3 78 mr r4,r30 ffc193cc: 80 09 00 08 lwz r0,8(r9) ffc193d0: 7f e5 fb 78 mr r5,r31 ffc193d4: 7c 09 03 a6 mtctr r0 ffc193d8: 4e 80 04 21 bctrl } ffc193dc: 80 01 00 3c lwz r0,60(r1) ffc193e0: 83 a1 00 2c lwz r29,44(r1) ffc193e4: 7c 08 03 a6 mtlr r0 ffc193e8: 83 c1 00 30 lwz r30,48(r1) ffc193ec: 83 e1 00 34 lwz r31,52(r1) ffc193f0: 38 21 00 38 addi r1,r1,56 ffc193f4: 4e 80 00 20 blr /* * 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 ); ffc193f8: 4b ff 9d 55 bl ffc1314c <__errno> ffc193fc: 38 00 00 14 li r0,20 ffc19400: 90 03 00 00 stw r0,0(r3) ffc19404: 38 60 ff ff li r3,-1 ffc19408: 4b ff ff d4 b ffc193dc =============================================================================== ffc051c8 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc051c8: 94 21 ff e0 stwu r1,-32(r1) ffc051cc: 7c 08 02 a6 mflr r0 ffc051d0: 93 e1 00 1c stw r31,28(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) ffc051d4: 7c 7f 1b 79 mr. r31,r3 */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc051d8: 90 01 00 24 stw r0,36(r1) ffc051dc: 93 c1 00 18 stw r30,24(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) ffc051e0: 41 82 00 64 beq- ffc05244 <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc051e4: 7f c0 00 a6 mfmsr r30 ffc051e8: 7c 10 42 a6 mfsprg r0,0 ffc051ec: 7f c0 00 78 andc r0,r30,r0 ffc051f0: 7c 00 01 24 mtmsr r0 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); ffc051f4: 38 61 00 08 addi r3,r1,8 ffc051f8: 48 00 54 ad bl ffc0a6a4 <_TOD_Get> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc051fc: 7f c0 01 24 mtmsr r30 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; ffc05200: 3d 20 10 62 lis r9,4194 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; ffc05204: 80 01 00 0c lwz r0,12(r1) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; ffc05208: 61 29 4d d3 ori r9,r9,19923 ffc0520c: 7d 20 48 96 mulhw r9,r0,r9 ffc05210: 7c 00 fe 70 srawi r0,r0,31 ffc05214: 7d 29 36 70 srawi r9,r9,6 ffc05218: 7c 00 48 50 subf r0,r0,r9 time->tv_sec = now.tv_sec; ffc0521c: 81 21 00 08 lwz r9,8(r1) time->tv_usec = useconds; ffc05220: 90 1f 00 04 stw r0,4(r31) * 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; ffc05224: 38 60 00 00 li r3,0 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; ffc05228: 91 3f 00 00 stw r9,0(r31) } ffc0522c: 80 01 00 24 lwz r0,36(r1) ffc05230: 83 c1 00 18 lwz r30,24(r1) ffc05234: 7c 08 03 a6 mtlr r0 ffc05238: 83 e1 00 1c lwz r31,28(r1) ffc0523c: 38 21 00 20 addi r1,r1,32 ffc05240: 4e 80 00 20 blr void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) rtems_set_errno_and_return_minus_one( EFAULT ); ffc05244: 48 00 d8 1d bl ffc12a60 <__errno> <== NOT EXECUTED ffc05248: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc0524c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05250: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05254: 4b ff ff d8 b ffc0522c <== NOT EXECUTED =============================================================================== ffc11ea8 : 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 ) ffc11ea8: 81 23 00 1c lwz r9,28(r3) return -1; /* It wasn't a directory --> return error */ ffc11eac: 38 00 ff ff li r0,-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 ) ffc11eb0: 81 29 00 4c lwz r9,76(r9) ffc11eb4: 2f 89 00 01 cmpwi cr7,r9,1 ffc11eb8: 40 9e 00 18 bne- cr7,ffc11ed0 <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; ffc11ebc: 39 40 00 00 li r10,0 ffc11ec0: 39 60 00 00 li r11,0 ffc11ec4: 91 43 00 10 stw r10,16(r3) return 0; ffc11ec8: 38 00 00 00 li r0,0 the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; ffc11ecc: 91 63 00 14 stw r11,20(r3) return 0; } ffc11ed0: 7c 03 03 78 mr r3,r0 ffc11ed4: 4e 80 00 20 blr =============================================================================== ffc11ed8 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc11ed8: 94 21 fe b0 stwu r1,-336(r1) ffc11edc: 7c 08 02 a6 mflr r0 ffc11ee0: 90 01 01 54 stw r0,340(r1) ffc11ee4: 93 81 01 40 stw r28,320(r1) int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; ffc11ee8: 83 83 00 1c lwz r28,28(r3) ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc11eec: 93 c1 01 48 stw r30,328(r1) */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc11ef0: 83 dc 00 50 lwz r30,80(r28) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc11ef4: 3b 9c 00 54 addi r28,r28,84 ffc11ef8: 93 01 01 30 stw r24,304(r1) ffc11efc: 7c 98 23 78 mr r24,r4 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 ) ) ffc11f00: 7f 9e e0 00 cmpw cr7,r30,r28 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc11f04: 93 21 01 34 stw r25,308(r1) ffc11f08: 7c 79 1b 78 mr r25,r3 ffc11f0c: 93 41 01 38 stw r26,312(r1) 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; ffc11f10: 3b 40 00 00 li r26,0 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc11f14: 92 c1 01 28 stw r22,296(r1) ffc11f18: 92 e1 01 2c stw r23,300(r1) ffc11f1c: 93 61 01 3c stw r27,316(r1) ffc11f20: 93 a1 01 44 stw r29,324(r1) ffc11f24: 93 e1 01 4c stw r31,332(r1) 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 ) ) ffc11f28: 41 9e 00 c8 beq- cr7,ffc11ff0 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); ffc11f2c: 3f 60 0e a0 lis r27,3744 /* Move to the first of the desired directory entries */ the_node = rtems_chain_first( the_chain ); bytes_transferred = 0; first_entry = iop->offset; ffc11f30: 83 a3 00 14 lwz r29,20(r3) /* 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); ffc11f34: 54 a5 e8 fe rlwinm r5,r5,29,3,31 ffc11f38: 63 7b ea 0f ori r27,r27,59919 ffc11f3c: 7f 65 d8 16 mulhwu r27,r5,r27 ffc11f40: 57 7b f8 7e rlwinm r27,r27,31,1,31 ffc11f44: 1f 7b 01 18 mulli r27,r27,280 /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc11f48: 7f 7b ea 15 add. r27,r27,r29 ffc11f4c: 40 81 00 a4 ble- ffc11ff0 <== NEVER TAKEN current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ ffc11f50: 3b e0 00 00 li r31,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 ); ffc11f54: 3a e0 01 18 li r23,280 ffc11f58: 48 00 00 1c b ffc11f74 * 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( ffc11f5c: 3b ff 01 18 addi r31,r31,280 ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; ffc11f60: 83 de 00 00 lwz r30,0(r30) /* 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 ( ffc11f64: 7f 9b f8 00 cmpw cr7,r27,r31 current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ ffc11f68: 7f 1e e0 00 cmpw cr6,r30,r28 /* 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 ( ffc11f6c: 40 9d 00 84 ble- cr7,ffc11ff0 <== NEVER TAKEN current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ ffc11f70: 41 9a 00 80 beq- cr6,ffc11ff0 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { ffc11f74: 7f 9d f8 00 cmpw cr7,r29,r31 ffc11f78: 41 9d ff e4 bgt+ cr7,ffc11f5c /* 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; ffc11f7c: 80 1e 00 38 lwz r0,56(r30) tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc11f80: 3a de 00 0c addi r22,r30,12 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; ffc11f84: 7f e9 fe 70 srawi r9,r31,31 ffc11f88: 93 e1 00 14 stw r31,20(r1) tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc11f8c: 7e c3 b3 78 mr r3,r22 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; ffc11f90: 91 21 00 10 stw r9,16(r1) * 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( ffc11f94: 3b ff 01 18 addi r31,r31,280 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; ffc11f98: 90 01 00 08 stw r0,8(r1) } 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 ); ffc11f9c: b2 e1 00 18 sth r23,24(r1) the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc11fa0: 48 00 23 ed bl ffc1438c strcpy( tmp_dirent.d_name, the_jnode->name ); ffc11fa4: 7e c4 b3 78 mr r4,r22 /* 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; tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc11fa8: b0 61 00 1a sth r3,26(r1) strcpy( tmp_dirent.d_name, the_jnode->name ); ffc11fac: 38 61 00 1c addi r3,r1,28 ffc11fb0: 48 00 1e c9 bl ffc13e78 memcpy( ffc11fb4: 7c 78 d2 14 add r3,r24,r26 ffc11fb8: 38 81 00 08 addi r4,r1,8 ffc11fbc: 38 a0 01 18 li r5,280 ffc11fc0: 48 00 17 dd bl ffc1379c /* 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 ( ffc11fc4: 7f 9b f8 00 cmpw cr7,r27,r31 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); ffc11fc8: 81 59 00 10 lwz r10,16(r25) bytes_transferred = bytes_transferred + sizeof( struct dirent ); ffc11fcc: 3b 5a 01 18 addi r26,r26,280 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); ffc11fd0: 81 79 00 14 lwz r11,20(r25) bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; ffc11fd4: 83 de 00 00 lwz r30,0(r30) memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); ffc11fd8: 31 6b 01 18 addic r11,r11,280 ffc11fdc: 7d 4a 01 94 addze r10,r10 ffc11fe0: 91 59 00 10 stw r10,16(r25) for ( current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ ffc11fe4: 7f 1e e0 00 cmpw cr6,r30,r28 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); ffc11fe8: 91 79 00 14 stw r11,20(r25) /* 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 ( ffc11fec: 41 9d ff 84 bgt+ cr7,ffc11f70 <== NEVER TAKEN the_node = the_node->next; } /* Success */ return bytes_transferred; } ffc11ff0: 80 01 01 54 lwz r0,340(r1) ffc11ff4: 7f 43 d3 78 mr r3,r26 ffc11ff8: 82 c1 01 28 lwz r22,296(r1) ffc11ffc: 7c 08 03 a6 mtlr r0 ffc12000: 82 e1 01 2c lwz r23,300(r1) ffc12004: 83 01 01 30 lwz r24,304(r1) ffc12008: 83 21 01 34 lwz r25,308(r1) ffc1200c: 83 41 01 38 lwz r26,312(r1) ffc12010: 83 61 01 3c lwz r27,316(r1) ffc12014: 83 81 01 40 lwz r28,320(r1) ffc12018: 83 a1 01 44 lwz r29,324(r1) ffc1201c: 83 c1 01 48 lwz r30,328(r1) ffc12020: 83 e1 01 4c lwz r31,332(r1) ffc12024: 38 21 01 50 addi r1,r1,336 ffc12028: 4e 80 00 20 blr =============================================================================== ffc12198 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { ffc12198: 94 21 ff f0 stwu r1,-16(r1) ffc1219c: 7c 08 02 a6 mflr r0 ffc121a0: 93 e1 00 0c stw r31,12(r1) ffc121a4: 90 01 00 14 stw r0,20(r1) IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; ffc121a8: 83 e4 00 00 lwz r31,0(r4) /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) ffc121ac: 81 3f 00 50 lwz r9,80(r31) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc121b0: 38 1f 00 54 addi r0,r31,84 ffc121b4: 7f 89 00 00 cmpw cr7,r9,r0 ffc121b8: 40 9e 00 6c bne- cr7,ffc12224 static inline bool rtems_filesystem_is_root_location( const rtems_filesystem_location_info_t *loc ) { return loc->mt_entry->mt_fs_root.node_access == loc->node_access; ffc121bc: 81 24 00 10 lwz r9,16(r4) /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) ffc121c0: 80 09 00 1c lwz r0,28(r9) ffc121c4: 7f 9f 00 00 cmpw cr7,r31,r0 ffc121c8: 41 9e 00 38 beq- cr7,ffc12200 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) ffc121cc: 80 1f 00 5c lwz r0,92(r31) ffc121d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc121d4: 40 9e 00 2c bne- cr7,ffc12200 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); ffc121d8: 7f e3 fb 78 mr r3,r31 ffc121dc: 4b ff cb d1 bl ffc0edac IMFS_check_node_remove( the_jnode ); ffc121e0: 7f e3 fb 78 mr r3,r31 ffc121e4: 4b ff cc 29 bl ffc0ee0c return 0; ffc121e8: 38 60 00 00 li r3,0 } ffc121ec: 80 01 00 14 lwz r0,20(r1) ffc121f0: 83 e1 00 0c lwz r31,12(r1) ffc121f4: 38 21 00 10 addi r1,r1,16 ffc121f8: 7c 08 03 a6 mtlr r0 ffc121fc: 4e 80 00 20 blr /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); ffc12200: 48 00 08 61 bl ffc12a60 <__errno> ffc12204: 38 00 00 10 li r0,16 ffc12208: 90 03 00 00 stw r0,0(r3) ffc1220c: 38 60 ff ff li r3,-1 IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } ffc12210: 80 01 00 14 lwz r0,20(r1) ffc12214: 83 e1 00 0c lwz r31,12(r1) ffc12218: 38 21 00 10 addi r1,r1,16 ffc1221c: 7c 08 03 a6 mtlr r0 ffc12220: 4e 80 00 20 blr /* * 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 ); ffc12224: 48 00 08 3d bl ffc12a60 <__errno> ffc12228: 38 00 00 5a li r0,90 ffc1222c: 90 03 00 00 stw r0,0(r3) ffc12230: 38 60 ff ff li r3,-1 ffc12234: 4b ff ff b8 b ffc121ec =============================================================================== ffc05984 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05984: 94 21 ff f0 stwu r1,-16(r1) ffc05988: 7c 08 02 a6 mflr r0 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc0598c: 3d 20 00 00 lis r9,0 /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05990: 90 01 00 14 stw r0,20(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05994: 88 09 28 58 lbz r0,10328(r9) /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05998: 93 c1 00 08 stw r30,8(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc0599c: 2f 80 00 00 cmpwi cr7,r0,0 /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc059a0: 93 e1 00 0c stw r31,12(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc059a4: 41 9e 00 1c beq- cr7,ffc059c0 fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } ffc059a8: 80 01 00 14 lwz r0,20(r1) ffc059ac: 83 c1 00 08 lwz r30,8(r1) ffc059b0: 7c 08 03 a6 mtlr r0 ffc059b4: 83 e1 00 0c lwz r31,12(r1) ffc059b8: 38 21 00 10 addi r1,r1,16 ffc059bc: 4e 80 00 20 blr static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc059c0: 3c 60 ff c2 lis r3,-62 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc059c4: 3f c0 ff c2 lis r30,-62 ffc059c8: 3f e0 ff c2 lis r31,-62 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; ffc059cc: 38 00 00 01 li r0,1 mkdir("/etc", 0777); ffc059d0: 38 80 01 ff li r4,511 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; ffc059d4: 98 09 28 58 stb r0,10328(r9) mkdir("/etc", 0777); ffc059d8: 38 63 b2 88 addi r3,r3,-19832 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc059dc: 3b de b2 90 addi r30,r30,-19824 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc059e0: 48 00 0b ad bl ffc0658c /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc059e4: 3b ff b2 9c addi r31,r31,-19812 ffc059e8: 7f c3 f3 78 mr r3,r30 ffc059ec: 7f e4 fb 78 mr r4,r31 ffc059f0: 48 00 e9 1d bl ffc1430c ffc059f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc059f8: 41 9e 00 7c beq- cr7,ffc05a74 } 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); ffc059fc: 48 00 df 69 bl ffc13964 } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { ffc05a00: 3f c0 ff c2 lis r30,-62 ffc05a04: 3b de b3 0c addi r30,r30,-19700 ffc05a08: 7f c3 f3 78 mr r3,r30 ffc05a0c: 7f e4 fb 78 mr r4,r31 ffc05a10: 48 00 e8 fd bl ffc1430c ffc05a14: 2f 83 00 00 cmpwi cr7,r3,0 ffc05a18: 41 9e 00 20 beq- cr7,ffc05a38 } 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); ffc05a1c: 48 00 df 49 bl ffc13964 } } ffc05a20: 80 01 00 14 lwz r0,20(r1) ffc05a24: 83 c1 00 08 lwz r30,8(r1) ffc05a28: 7c 08 03 a6 mtlr r0 ffc05a2c: 83 e1 00 0c lwz r31,12(r1) ffc05a30: 38 21 00 10 addi r1,r1,16 ffc05a34: 4e 80 00 20 blr * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { ffc05a38: 3c 80 ff c2 lis r4,-62 ffc05a3c: 7f c3 f3 78 mr r3,r30 ffc05a40: 38 84 b2 a0 addi r4,r4,-19808 ffc05a44: 48 00 e8 c9 bl ffc1430c ffc05a48: 7c 7f 1b 79 mr. r31,r3 ffc05a4c: 41 a2 ff 5c beq- ffc059a8 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" ffc05a50: 3c 60 ff c2 lis r3,-62 ffc05a54: 38 80 00 01 li r4,1 ffc05a58: 38 a0 00 2a li r5,42 ffc05a5c: 7f e6 fb 78 mr r6,r31 ffc05a60: 38 63 b3 18 addi r3,r3,-19688 ffc05a64: 48 00 f1 65 bl ffc14bc8 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); ffc05a68: 7f e3 fb 78 mr r3,r31 ffc05a6c: 48 00 de f9 bl ffc13964 ffc05a70: 4b ff ff b0 b ffc05a20 * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { ffc05a74: 3c 80 ff c2 lis r4,-62 ffc05a78: 7f c3 f3 78 mr r3,r30 ffc05a7c: 38 84 b2 a0 addi r4,r4,-19808 ffc05a80: 48 00 e8 8d bl ffc1430c ffc05a84: 7c 7e 1b 79 mr. r30,r3 ffc05a88: 41 a2 ff 78 beq- ffc05a00 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" ffc05a8c: 3c 60 ff c2 lis r3,-62 ffc05a90: 38 63 b2 a4 addi r3,r3,-19804 ffc05a94: 38 80 00 01 li r4,1 ffc05a98: 38 a0 00 66 li r5,102 ffc05a9c: 7f c6 f3 78 mr r6,r30 ffc05aa0: 48 00 f1 29 bl ffc14bc8 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); ffc05aa4: 7f c3 f3 78 mr r3,r30 ffc05aa8: 4b ff ff 54 b ffc059fc =============================================================================== ffc076e0 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc076e0: 94 21 ff f0 stwu r1,-16(r1) ffc076e4: 7c 08 02 a6 mflr r0 ffc076e8: 90 01 00 14 stw r0,20(r1) if (tty->termios.c_iflag & ISTRIP) ffc076ec: 80 04 00 30 lwz r0,48(r4) /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc076f0: 93 c1 00 08 stw r30,8(r1) ffc076f4: 7c 9e 23 78 mr r30,r4 if (tty->termios.c_iflag & ISTRIP) ffc076f8: 70 09 00 20 andi. r9,r0,32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc076fc: 93 e1 00 0c stw r31,12(r1) ffc07700: 7c 7f 1b 78 mr r31,r3 if (tty->termios.c_iflag & ISTRIP) ffc07704: 41 82 00 08 beq- ffc0770c <== ALWAYS TAKEN c &= 0x7f; ffc07708: 54 7f 06 7e clrlwi r31,r3,25 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) ffc0770c: 70 0b 02 00 andi. r11,r0,512 ffc07710: 41 82 00 28 beq- ffc07738 c = tolower (c); ffc07714: 3d 20 00 00 lis r9,0 ffc07718: 81 69 27 44 lwz r11,10052(r9) ffc0771c: 7f e9 fb 78 mr r9,r31 ffc07720: 7f eb fa 14 add r31,r11,r31 ffc07724: 89 7f 00 01 lbz r11,1(r31) ffc07728: 55 6b 07 be clrlwi r11,r11,30 ffc0772c: 2f 8b 00 01 cmpwi cr7,r11,1 ffc07730: 41 9e 01 14 beq- cr7,ffc07844 ffc07734: 55 3f 06 3e clrlwi r31,r9,24 if (c == '\r') { ffc07738: 2f 9f 00 0d cmpwi cr7,r31,13 ffc0773c: 41 9e 00 68 beq- cr7,ffc077a4 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)) { ffc07740: 2f 9f 00 0a cmpwi cr7,r31,10 ffc07744: 41 9e 00 f0 beq- cr7,ffc07834 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { ffc07748: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0774c: 40 9e 00 70 bne- cr7,ffc077bc <== ALWAYS TAKEN } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { ffc07750: 3d 20 00 00 lis r9,0 ffc07754: 81 69 21 b0 lwz r11,8624(r9) if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; ffc07758: 38 60 00 00 li r3,0 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { ffc0775c: 81 3e 00 20 lwz r9,32(r30) ffc07760: 38 0b ff ff addi r0,r11,-1 ffc07764: 7f 89 00 00 cmpw cr7,r9,r0 ffc07768: 40 9c 00 24 bge- cr7,ffc0778c <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) ffc0776c: 80 1e 00 3c lwz r0,60(r30) ffc07770: 70 0b 00 08 andi. r11,r0,8 ffc07774: 40 82 00 d8 bne- ffc0784c <== ALWAYS TAKEN echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc07778: 81 7e 00 1c lwz r11,28(r30) ffc0777c: 38 09 00 01 addi r0,r9,1 } return 0; ffc07780: 38 60 00 00 li r3,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; ffc07784: 7f eb 49 ae stbx r31,r11,r9 ffc07788: 90 1e 00 20 stw r0,32(r30) } return 0; } ffc0778c: 80 01 00 14 lwz r0,20(r1) ffc07790: 83 c1 00 08 lwz r30,8(r1) ffc07794: 7c 08 03 a6 mtlr r0 ffc07798: 83 e1 00 0c lwz r31,12(r1) ffc0779c: 38 21 00 10 addi r1,r1,16 ffc077a0: 4e 80 00 20 blr if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) ffc077a4: 70 09 00 80 andi. r9,r0,128 return 0; ffc077a8: 38 60 00 00 li r3,0 if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) ffc077ac: 40 a2 ff e0 bne- ffc0778c <== NEVER TAKEN return 0; if (tty->termios.c_iflag & ICRNL) ffc077b0: 70 0b 01 00 andi. r11,r0,256 ffc077b4: 41 82 00 08 beq- ffc077bc <== NEVER TAKEN c = '\n'; ffc077b8: 3b e0 00 0a li r31,10 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { ffc077bc: 80 1e 00 3c lwz r0,60(r30) ffc077c0: 70 0b 00 02 andi. r11,r0,2 ffc077c4: 41 a2 ff 8c beq- ffc07750 if (c == tty->termios.c_cc[VERASE]) { ffc077c8: 89 3e 00 43 lbz r9,67(r30) ffc077cc: 7f 89 f8 00 cmpw cr7,r9,r31 ffc077d0: 41 9e 00 e8 beq- cr7,ffc078b8 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { ffc077d4: 89 3e 00 44 lbz r9,68(r30) ffc077d8: 7f 89 f8 00 cmpw cr7,r9,r31 ffc077dc: 41 9e 00 94 beq- cr7,ffc07870 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { ffc077e0: 89 3e 00 45 lbz r9,69(r30) return 1; ffc077e4: 38 60 00 01 li r3,1 } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { ffc077e8: 7f 89 f8 00 cmpw cr7,r9,r31 ffc077ec: 41 be ff a0 beq- cr7,ffc0778c <== NEVER TAKEN return 1; } else if (c == '\n') { ffc077f0: 2f 9f 00 0a cmpwi cr7,r31,10 ffc077f4: 41 9e 00 90 beq- cr7,ffc07884 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]) || ffc077f8: 89 3e 00 4c lbz r9,76(r30) ffc077fc: 7f 89 f8 00 cmpw cr7,r9,r31 ffc07800: 41 9e 00 10 beq- cr7,ffc07810 <== NEVER TAKEN ffc07804: 89 3e 00 51 lbz r9,81(r30) ffc07808: 7f 89 f8 00 cmpw cr7,r9,r31 ffc0780c: 40 9e ff 44 bne+ cr7,ffc07750 <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) ffc07810: 70 0b 00 08 andi. r11,r0,8 <== NOT EXECUTED ffc07814: 40 82 00 4c bne- ffc07860 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc07818: 81 3e 00 20 lwz r9,32(r30) <== NOT EXECUTED return 1; ffc0781c: 38 60 00 01 li r3,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; ffc07820: 81 7e 00 1c lwz r11,28(r30) <== NOT EXECUTED ffc07824: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED ffc07828: 7f eb 49 ae stbx r31,r11,r9 <== NOT EXECUTED ffc0782c: 90 1e 00 20 stw r0,32(r30) <== NOT EXECUTED return 1; ffc07830: 4b ff ff 5c b ffc0778c <== 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)) { ffc07834: 70 09 00 40 andi. r9,r0,64 ffc07838: 41 a2 ff 84 beq- ffc077bc <== ALWAYS TAKEN c = '\r'; ffc0783c: 3b e0 00 0d li r31,13 <== NOT EXECUTED ffc07840: 4b ff ff 7c b ffc077bc <== NOT EXECUTED { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); ffc07844: 39 29 00 20 addi r9,r9,32 ffc07848: 4b ff fe ec b ffc07734 /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); ffc0784c: 7f e3 fb 78 mr r3,r31 ffc07850: 7f c4 f3 78 mr r4,r30 ffc07854: 4b ff fb 4d bl ffc073a0 ffc07858: 81 3e 00 20 lwz r9,32(r30) ffc0785c: 4b ff ff 1c b ffc07778 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); ffc07860: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc07864: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc07868: 4b ff fb 39 bl ffc073a0 <== NOT EXECUTED ffc0786c: 4b ff ff ac b ffc07818 <== 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); ffc07870: 7f c3 f3 78 mr r3,r30 ffc07874: 38 80 00 01 li r4,1 ffc07878: 4b ff fb cd bl ffc07444 return 0; ffc0787c: 38 60 00 00 li r3,0 ffc07880: 4b ff ff 0c b ffc0778c } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) ffc07884: 70 09 00 48 andi. r9,r0,72 ffc07888: 41 a2 00 10 beq+ ffc07898 <== NEVER TAKEN echo (c, tty); ffc0788c: 38 60 00 0a li r3,10 ffc07890: 7f c4 f3 78 mr r4,r30 ffc07894: 4b ff fb 0d bl ffc073a0 tty->cbuf[tty->ccount++] = c; ffc07898: 81 3e 00 20 lwz r9,32(r30) ffc0789c: 39 40 00 0a li r10,10 ffc078a0: 81 7e 00 1c lwz r11,28(r30) return 1; ffc078a4: 38 60 00 01 li r3,1 else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc078a8: 38 09 00 01 addi r0,r9,1 ffc078ac: 7d 4b 49 ae stbx r10,r11,r9 ffc078b0: 90 1e 00 20 stw r0,32(r30) return 1; ffc078b4: 4b ff fe d8 b ffc0778c c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); ffc078b8: 7f c3 f3 78 mr r3,r30 ffc078bc: 38 80 00 00 li r4,0 ffc078c0: 4b ff fb 85 bl ffc07444 return 0; ffc078c4: 38 60 00 00 li r3,0 ffc078c8: 4b ff fe c4 b ffc0778c =============================================================================== ffc1d6d0 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } ffc1d6d0: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc1d6d4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05bd4 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc05bd4: 94 21 ff f0 stwu r1,-16(r1) ffc05bd8: 7c 08 02 a6 mflr r0 /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) ffc05bdc: 3d 20 00 00 lis r9,0 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc05be0: 90 01 00 14 stw r0,20(r1) /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) ffc05be4: 80 09 28 04 lwz r0,10244(r9) extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc05be8: 93 c1 00 08 stw r30,8(r1) /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) ffc05bec: 2f 80 00 03 cmpwi cr7,r0,3 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc05bf0: 93 e1 00 0c stw r31,12(r1) /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) ffc05bf4: 41 9e 00 1c beq- cr7,ffc05c10 <== ALWAYS TAKEN */ fclose (stdin); fclose (stdout); fclose (stderr); } ffc05bf8: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc05bfc: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc05c00: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05c04: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc05c08: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc05c0c: 4e 80 00 20 blr <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { ffc05c10: 3f e0 00 00 lis r31,0 ffc05c14: 3d 20 00 00 lis r9,0 ffc05c18: 80 1f 27 4c lwz r0,10060(r31) ffc05c1c: 83 c9 27 48 lwz r30,10056(r9) ffc05c20: 7f 80 f0 00 cmpw cr7,r0,r30 ffc05c24: 41 9e 00 10 beq- cr7,ffc05c34 _wrapup_reent(_global_impure_ptr); ffc05c28: 7f c3 f3 78 mr r3,r30 ffc05c2c: 48 00 df 49 bl ffc13b74 <_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; ffc05c30: 93 df 27 4c stw r30,10060(r31) * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); ffc05c34: 80 7e 00 04 lwz r3,4(r30) ffc05c38: 48 00 cf b5 bl ffc12bec fclose (stdout); ffc05c3c: 81 3f 27 4c lwz r9,10060(r31) ffc05c40: 80 69 00 08 lwz r3,8(r9) ffc05c44: 48 00 cf a9 bl ffc12bec fclose (stderr); ffc05c48: 81 3f 27 4c lwz r9,10060(r31) ffc05c4c: 80 69 00 0c lwz r3,12(r9) ffc05c50: 48 00 cf 9d bl ffc12bec } ffc05c54: 80 01 00 14 lwz r0,20(r1) ffc05c58: 83 c1 00 08 lwz r30,8(r1) ffc05c5c: 7c 08 03 a6 mtlr r0 ffc05c60: 83 e1 00 0c lwz r31,12(r1) ffc05c64: 38 21 00 10 addi r1,r1,16 ffc05c68: 4e 80 00 20 blr =============================================================================== ffc1d6e8 : off_t lseek( int fd, off_t offset, int whence ) { ffc1d6e8: 94 21 ff e8 stwu r1,-24(r1) ffc1d6ec: 7c 08 02 a6 mflr r0 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc1d6f0: 3d 20 00 00 lis r9,0 off_t lseek( int fd, off_t offset, int whence ) { ffc1d6f4: 90 01 00 1c stw r0,28(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc1d6f8: 80 09 26 fc lwz r0,9980(r9) off_t lseek( int fd, off_t offset, int whence ) { ffc1d6fc: 93 a1 00 0c stw r29,12(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc1d700: 7f 83 00 40 cmplw cr7,r3,r0 off_t lseek( int fd, off_t offset, int whence ) { ffc1d704: 93 c1 00 10 stw r30,16(r1) ffc1d708: 93 e1 00 14 stw r31,20(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc1d70c: 40 9c 01 24 bge- cr7,ffc1d830 iop = rtems_libio_iop( fd ); ffc1d710: 3d 20 00 00 lis r9,0 ffc1d714: 83 a9 27 ac lwz r29,10156(r9) ffc1d718: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc1d71c: 7f bd 1a 14 add r29,r29,r3 rtems_libio_check_is_open(iop); ffc1d720: 80 1d 00 18 lwz r0,24(r29) ffc1d724: 70 09 01 00 andi. r9,r0,256 ffc1d728: 41 82 01 08 beq- ffc1d830 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { ffc1d72c: 2f 87 00 01 cmpwi cr7,r7,1 /* * Now process the lseek(). */ old_offset = iop->offset; ffc1d730: 83 dd 00 10 lwz r30,16(r29) ffc1d734: 83 fd 00 14 lwz r31,20(r29) switch ( whence ) { ffc1d738: 41 9e 00 b4 beq- cr7,ffc1d7ec ffc1d73c: 2f 87 00 02 cmpwi cr7,r7,2 ffc1d740: 41 9e 00 4c beq- cr7,ffc1d78c ffc1d744: 2f 87 00 00 cmpwi cr7,r7,0 ffc1d748: 40 9e 00 b8 bne- cr7,ffc1d800 case SEEK_SET: iop->offset = offset; ffc1d74c: 90 bd 00 10 stw r5,16(r29) ffc1d750: 90 dd 00 14 stw r6,20(r29) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); ffc1d754: 81 3d 00 24 lwz r9,36(r29) ffc1d758: 7f a3 eb 78 mr r3,r29 ffc1d75c: 80 09 00 14 lwz r0,20(r9) ffc1d760: 7c 09 03 a6 mtctr r0 ffc1d764: 4e 80 04 21 bctrl if ( status == (off_t) -1 ) ffc1d768: 2f 83 ff ff cmpwi cr7,r3,-1 ffc1d76c: 41 9e 00 54 beq- cr7,ffc1d7c0 /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc1d770: 80 01 00 1c lwz r0,28(r1) ffc1d774: 83 a1 00 0c lwz r29,12(r1) ffc1d778: 7c 08 03 a6 mtlr r0 ffc1d77c: 83 c1 00 10 lwz r30,16(r1) ffc1d780: 83 e1 00 14 lwz r31,20(r1) ffc1d784: 38 21 00 18 addi r1,r1,24 ffc1d788: 4e 80 00 20 blr /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); ffc1d78c: 81 3d 00 24 lwz r9,36(r29) ffc1d790: 7f a3 eb 78 mr r3,r29 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; ffc1d794: 81 5d 00 08 lwz r10,8(r29) ffc1d798: 81 7d 00 0c lwz r11,12(r29) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); ffc1d79c: 80 09 00 14 lwz r0,20(r9) case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; ffc1d7a0: 7d 6b 30 14 addc r11,r11,r6 ffc1d7a4: 7d 4a 29 14 adde r10,r10,r5 ffc1d7a8: 91 5d 00 10 stw r10,16(r29) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); ffc1d7ac: 7c 09 03 a6 mtctr r0 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; ffc1d7b0: 91 7d 00 14 stw r11,20(r29) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); ffc1d7b4: 4e 80 04 21 bctrl if ( status == (off_t) -1 ) ffc1d7b8: 2f 83 ff ff cmpwi cr7,r3,-1 ffc1d7bc: 40 9e ff b4 bne+ cr7,ffc1d770 ffc1d7c0: 2f 84 ff ff cmpwi cr7,r4,-1 ffc1d7c4: 40 9e ff ac bne+ cr7,ffc1d770 <== NEVER TAKEN /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc1d7c8: 80 01 00 1c lwz r0,28(r1) * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset; ffc1d7cc: 93 dd 00 10 stw r30,16(r29) /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc1d7d0: 7c 08 03 a6 mtlr r0 * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset; ffc1d7d4: 93 fd 00 14 stw r31,20(r29) /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc1d7d8: 83 c1 00 10 lwz r30,16(r1) ffc1d7dc: 83 a1 00 0c lwz r29,12(r1) ffc1d7e0: 83 e1 00 14 lwz r31,20(r1) ffc1d7e4: 38 21 00 18 addi r1,r1,24 ffc1d7e8: 4e 80 00 20 blr case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; ffc1d7ec: 7d 7f 30 14 addc r11,r31,r6 ffc1d7f0: 7d 5e 29 14 adde r10,r30,r5 ffc1d7f4: 91 5d 00 10 stw r10,16(r29) ffc1d7f8: 91 7d 00 14 stw r11,20(r29) break; ffc1d7fc: 4b ff ff 58 b ffc1d754 case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc1d800: 4b ff 52 61 bl ffc12a60 <__errno> ffc1d804: 38 00 00 16 li r0,22 ffc1d808: 90 03 00 00 stw r0,0(r3) ffc1d80c: 38 80 ff ff li r4,-1 ffc1d810: 38 60 ff ff li r3,-1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc1d814: 80 01 00 1c lwz r0,28(r1) ffc1d818: 83 a1 00 0c lwz r29,12(r1) ffc1d81c: 7c 08 03 a6 mtlr r0 ffc1d820: 83 c1 00 10 lwz r30,16(r1) ffc1d824: 83 e1 00 14 lwz r31,20(r1) ffc1d828: 38 21 00 18 addi r1,r1,24 ffc1d82c: 4e 80 00 20 blr off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); ffc1d830: 4b ff 52 31 bl ffc12a60 <__errno> ffc1d834: 38 00 00 09 li r0,9 ffc1d838: 90 03 00 00 stw r0,0(r3) ffc1d83c: 38 80 ff ff li r4,-1 ffc1d840: 38 60 ff ff li r3,-1 ffc1d844: 4b ff ff 2c b ffc1d770 =============================================================================== ffc0551c : #include "malloc_p.h" void *malloc( size_t size ) { ffc0551c: 94 21 ff f0 stwu r1,-16(r1) ffc05520: 7c 08 02 a6 mflr r0 void *return_this; MSBUMP(malloc_calls, 1); ffc05524: 3d 20 00 00 lis r9,0 #include "malloc_p.h" void *malloc( size_t size ) { ffc05528: 90 01 00 14 stw r0,20(r1) void *return_this; MSBUMP(malloc_calls, 1); ffc0552c: 39 29 2a e8 addi r9,r9,10984 ffc05530: 81 69 00 04 lwz r11,4(r9) #include "malloc_p.h" void *malloc( size_t size ) { ffc05534: 93 c1 00 08 stw r30,8(r1) /* * Validate the parameters */ if ( !size ) return (void *) 0; ffc05538: 3b c0 00 00 li r30,0 size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); ffc0553c: 39 6b 00 01 addi r11,r11,1 #include "malloc_p.h" void *malloc( size_t size ) { ffc05540: 93 e1 00 0c stw r31,12(r1) ffc05544: 7c 7f 1b 78 mr r31,r3 void *return_this; MSBUMP(malloc_calls, 1); ffc05548: 91 69 00 04 stw r11,4(r9) /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); ffc0554c: 4b ff fe 45 bl ffc05390 /* * Validate the parameters */ if ( !size ) ffc05550: 2f 9f 00 00 cmpwi cr7,r31,0 ffc05554: 41 9e 00 74 beq- cr7,ffc055c8 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc05558: 3d 20 00 00 lis r9,0 ffc0555c: 80 09 28 04 lwz r0,10244(r9) ffc05560: 2f 80 00 03 cmpwi cr7,r0,3 ffc05564: 41 9e 00 80 beq- cr7,ffc055e4 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc05568: 3d 20 00 00 lis r9,0 ffc0556c: 80 69 26 ec lwz r3,9964(r9) ffc05570: 7f e4 fb 78 mr r4,r31 ffc05574: 38 a0 00 00 li r5,0 ffc05578: 38 c0 00 00 li r6,0 ffc0557c: 48 00 60 a9 bl ffc0b624 <_Protected_heap_Allocate_aligned_with_boundary> * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { ffc05580: 7c 7e 1b 79 mr. r30,r3 ffc05584: 41 82 00 8c beq- ffc05610 <== NEVER TAKEN } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) ffc05588: 3d 20 00 00 lis r9,0 ffc0558c: 80 09 27 60 lwz r0,10080(r9) ffc05590: 2f 80 00 00 cmpwi cr7,r0,0 ffc05594: 41 9e 00 14 beq- cr7,ffc055a8 (*rtems_malloc_dirty_helper)( return_this, size ); ffc05598: 7f c3 f3 78 mr r3,r30 ffc0559c: 7c 09 03 a6 mtctr r0 ffc055a0: 7f e4 fb 78 mr r4,r31 ffc055a4: 4e 80 04 21 bctrl /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc055a8: 3d 20 00 00 lis r9,0 ffc055ac: 81 29 27 68 lwz r9,10088(r9) ffc055b0: 2f 89 00 00 cmpwi cr7,r9,0 ffc055b4: 41 9e 00 14 beq- cr7,ffc055c8 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); ffc055b8: 80 09 00 04 lwz r0,4(r9) ffc055bc: 7f c3 f3 78 mr r3,r30 ffc055c0: 7c 09 03 a6 mtctr r0 ffc055c4: 4e 80 04 21 bctrl return return_this; } ffc055c8: 80 01 00 14 lwz r0,20(r1) ffc055cc: 7f c3 f3 78 mr r3,r30 ffc055d0: 83 e1 00 0c lwz r31,12(r1) ffc055d4: 7c 08 03 a6 mtlr r0 ffc055d8: 83 c1 00 08 lwz r30,8(r1) ffc055dc: 38 21 00 10 addi r1,r1,16 ffc055e0: 4e 80 00 20 blr /* * 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() ) ffc055e4: 4b ff fd 65 bl ffc05348 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc055e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc055ec: 41 be ff dc beq- cr7,ffc055c8 <== NEVER TAKEN ffc055f0: 3d 20 00 00 lis r9,0 ffc055f4: 80 69 26 ec lwz r3,9964(r9) ffc055f8: 7f e4 fb 78 mr r4,r31 ffc055fc: 38 a0 00 00 li r5,0 ffc05600: 38 c0 00 00 li r6,0 ffc05604: 48 00 60 21 bl ffc0b624 <_Protected_heap_Allocate_aligned_with_boundary> * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { ffc05608: 7c 7e 1b 79 mr. r30,r3 ffc0560c: 40 82 ff 7c bne+ ffc05588 if (rtems_malloc_sbrk_helpers) ffc05610: 3d 20 00 00 lis r9,0 ffc05614: 81 29 27 64 lwz r9,10084(r9) ffc05618: 2f 89 00 00 cmpwi cr7,r9,0 ffc0561c: 41 9e 00 24 beq- cr7,ffc05640 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); ffc05620: 80 09 00 04 lwz r0,4(r9) ffc05624: 7f e3 fb 78 mr r3,r31 ffc05628: 7c 09 03 a6 mtctr r0 ffc0562c: 4e 80 04 21 bctrl if ( !return_this ) { ffc05630: 2c 03 00 00 cmpwi r3,0 ffc05634: 41 82 00 0c beq- ffc05640 <== ALWAYS TAKEN ffc05638: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ffc0563c: 4b ff ff 4c b ffc05588 <== NOT EXECUTED errno = ENOMEM; ffc05640: 48 00 d4 21 bl ffc12a60 <__errno> ffc05644: 38 00 00 0c li r0,12 ffc05648: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc0564c: 4b ff ff 7c b ffc055c8 =============================================================================== ffc05270 : * 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; ffc05270: 3d 20 00 00 lis r9,0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc05274: 94 21 ff e8 stwu r1,-24(r1) ffc05278: 7c 08 02 a6 mflr r0 * 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; ffc0527c: 81 29 27 9c lwz r9,10140(r9) } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc05280: 93 a1 00 0c stw r29,12(r1) ffc05284: 7c 7d 1b 78 mr r29,r3 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) ffc05288: 2f 89 00 00 cmpwi cr7,r9,0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc0528c: 93 c1 00 10 stw r30,16(r1) */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; ffc05290: 3b c0 00 00 li r30,0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc05294: 90 01 00 1c stw r0,28(r1) ffc05298: 93 81 00 08 stw r28,8(r1) ffc0529c: 93 e1 00 14 stw r31,20(r1) * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) ffc052a0: 41 9e 00 64 beq- cr7,ffc05304 <== NEVER TAKEN return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); ffc052a4: 7f e3 4a 14 add r31,r3,r9 ffc052a8: 7f ff 4b 96 divwu r31,r31,r9 ffc052ac: 7f ff 49 d6 mullw r31,r31,r9 starting_address = (void *) sbrk(the_size); ffc052b0: 7f e3 fb 78 mr r3,r31 ffc052b4: 4b ff b1 31 bl ffc003e4 if ( starting_address == (void*) -1 ) ffc052b8: 2f 83 ff ff cmpwi cr7,r3,-1 if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); ffc052bc: 7c 64 1b 78 mr r4,r3 if ( starting_address == (void*) -1 ) ffc052c0: 41 9e 00 44 beq- cr7,ffc05304 return (void *) 0; if ( !_Protected_heap_Extend( ffc052c4: 3f 80 00 00 lis r28,0 ffc052c8: 80 7c 26 cc lwz r3,9932(r28) ffc052cc: 7f e5 fb 78 mr r5,r31 ffc052d0: 48 00 60 11 bl ffc0b2e0 <_Protected_heap_Extend> ffc052d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc052d8: 41 9e 00 50 beq- cr7,ffc05328 sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); ffc052dc: 3d 20 00 00 lis r9,0 ffc052e0: 80 7c 26 cc lwz r3,9932(r28) ffc052e4: 80 09 2c 28 lwz r0,11304(r9) ffc052e8: 7f a4 eb 78 mr r4,r29 ffc052ec: 38 a0 00 00 li r5,0 ffc052f0: 7c 1f 02 14 add r0,r31,r0 ffc052f4: 38 c0 00 00 li r6,0 ffc052f8: 90 09 2c 28 stw r0,11304(r9) ffc052fc: 48 00 5f 79 bl ffc0b274 <_Protected_heap_Allocate_aligned_with_boundary> ffc05300: 7c 7e 1b 78 mr r30,r3 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } ffc05304: 80 01 00 1c lwz r0,28(r1) ffc05308: 7f c3 f3 78 mr r3,r30 ffc0530c: 83 81 00 08 lwz r28,8(r1) ffc05310: 7c 08 03 a6 mtlr r0 ffc05314: 83 a1 00 0c lwz r29,12(r1) ffc05318: 83 c1 00 10 lwz r30,16(r1) ffc0531c: 83 e1 00 14 lwz r31,20(r1) ffc05320: 38 21 00 18 addi r1,r1,24 ffc05324: 4e 80 00 20 blr if ( starting_address == (void*) -1 ) return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); ffc05328: 7c 7f 00 d0 neg r3,r31 ffc0532c: 4b ff b0 b9 bl ffc003e4 errno = ENOMEM; ffc05330: 48 00 d6 81 bl ffc129b0 <__errno> ffc05334: 38 00 00 0c li r0,12 ffc05338: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc0533c: 4b ff ff c8 b ffc05304 =============================================================================== ffc05340 : * If the starting address is 0 then we are to attempt to * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { ffc05340: 2c 03 00 00 cmpwi r3,0 void *malloc_sbrk_initialize( void *starting_address, size_t length ) { ffc05344: 94 21 ff f8 stwu r1,-8(r1) ffc05348: 7c 08 02 a6 mflr r0 uintptr_t old_address; uintptr_t uaddress; RTEMS_Malloc_Sbrk_amount = length; ffc0534c: 3d 20 00 00 lis r9,0 ffc05350: 90 89 27 9c stw r4,10140(r9) void *malloc_sbrk_initialize( void *starting_address, size_t length ) { ffc05354: 90 01 00 0c stw r0,12(r1) * If the starting address is 0 then we are to attempt to * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { ffc05358: 41 82 00 14 beq- ffc0536c } starting_address = (void *)uaddress; } return starting_address; } ffc0535c: 80 01 00 0c lwz r0,12(r1) ffc05360: 38 21 00 08 addi r1,r1,8 ffc05364: 7c 08 03 a6 mtlr r0 ffc05368: 4e 80 00 20 blr * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { uaddress = (uintptr_t)sbrk(length); ffc0536c: 7c 83 23 78 mr r3,r4 ffc05370: 4b ff b0 75 bl ffc003e4 if (uaddress == (uintptr_t) -1) { ffc05374: 2f 83 ff ff cmpwi cr7,r3,-1 ffc05378: 41 9e 00 18 beq- cr7,ffc05390 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { ffc0537c: 70 60 00 07 andi. r0,r3,7 <== NOT EXECUTED ffc05380: 41 a2 ff dc beq- ffc0535c <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); ffc05384: 38 63 00 08 addi r3,r3,8 <== NOT EXECUTED ffc05388: 54 63 00 38 rlwinm r3,r3,0,0,28 <== NOT EXECUTED ffc0538c: 4b ff ff d0 b ffc0535c <== NOT EXECUTED if (!starting_address) { uaddress = (uintptr_t)sbrk(length); if (uaddress == (uintptr_t) -1) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); ffc05390: 38 60 00 1a li r3,26 ffc05394: 48 00 45 5d bl ffc098f0 =============================================================================== ffc111f8 : */ void memfile_free_blocks_in_table( block_p **block_table, int entries ) { ffc111f8: 94 21 ff e0 stwu r1,-32(r1) ffc111fc: 7c 08 02 a6 mflr r0 ffc11200: 93 a1 00 14 stw r29,20(r1) /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i<== NEVER TAKEN * memfile_free_blocks_in_table * * This is a support routine for IMFS_memfile_remove. It frees all the * blocks in one of the indirection tables. */ void memfile_free_blocks_in_table( ffc11228: 3b c3 ff fc addi r30,r3,-4 /* * 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] ); ffc11244: 4b ff ff 85 bl ffc111c8 b[i] = 0; ffc11248: 93 9e 00 00 stw r28,0(r30) /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i ffc11254: 80 7b 00 00 lwz r3,0(r27) /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); ffc11258: 4b ff ff 71 bl ffc111c8 *block_table = 0; ffc1125c: 38 00 00 00 li r0,0 ffc11260: 90 1b 00 00 stw r0,0(r27) } ffc11264: 80 01 00 24 lwz r0,36(r1) ffc11268: 83 61 00 0c lwz r27,12(r1) ffc1126c: 7c 08 03 a6 mtlr r0 ffc11270: 83 81 00 10 lwz r28,16(r1) ffc11274: 83 a1 00 14 lwz r29,20(r1) ffc11278: 83 c1 00 18 lwz r30,24(r1) ffc1127c: 83 e1 00 1c lwz r31,28(r1) ffc11280: 38 21 00 20 addi r1,r1,32 ffc11284: 4e 80 00 20 blr =============================================================================== ffc119d8 : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { ffc119d8: 94 21 ff e0 stwu r1,-32(r1) ffc119dc: 7c 08 02 a6 mflr r0 ffc119e0: 7c 69 1b 78 mr r9,r3 ffc119e4: 90 01 00 24 stw r0,36(r1) ffc119e8: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc119ec: 83 e3 00 1c lwz r31,28(r3) * 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 ) ffc119f0: 80 1f 00 50 lwz r0,80(r31) ffc119f4: 7f 80 28 00 cmpw cr7,r0,r5 ffc119f8: 41 9c 00 50 blt- cr7,ffc11a48 <== NEVER TAKEN ffc119fc: 41 9e 00 40 beq- cr7,ffc11a3c <== 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; ffc11a00: 90 bf 00 50 stw r5,80(r31) iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); ffc11a04: 38 61 00 08 addi r3,r1,8 ffc11a08: 38 80 00 00 li r4,0 /* * 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; ffc11a0c: 90 df 00 54 stw r6,84(r31) iop->size = the_jnode->info.file.size; ffc11a10: 90 a9 00 08 stw r5,8(r9) ffc11a14: 90 c9 00 0c stw r6,12(r9) IMFS_update_atime( the_jnode ); ffc11a18: 4b ff 37 b1 bl ffc051c8 ffc11a1c: 80 01 00 08 lwz r0,8(r1) return 0; ffc11a20: 38 60 00 00 li r3,0 * future use and just set the length. */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); ffc11a24: 90 1f 00 40 stw r0,64(r31) return 0; } ffc11a28: 80 01 00 24 lwz r0,36(r1) ffc11a2c: 83 e1 00 1c lwz r31,28(r1) ffc11a30: 38 21 00 20 addi r1,r1,32 ffc11a34: 7c 08 03 a6 mtlr r0 ffc11a38: 4e 80 00 20 blr * 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 ) ffc11a3c: 80 1f 00 54 lwz r0,84(r31) ffc11a40: 7f 80 30 40 cmplw cr7,r0,r6 ffc11a44: 40 9c ff bc bge+ cr7,ffc11a00 return IMFS_memfile_extend( the_jnode, length ); ffc11a48: 7f e3 fb 78 mr r3,r31 ffc11a4c: 4b ff fa 25 bl ffc11470 iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } ffc11a50: 80 01 00 24 lwz r0,36(r1) ffc11a54: 83 e1 00 1c lwz r31,28(r1) ffc11a58: 38 21 00 20 addi r1,r1,32 ffc11a5c: 7c 08 03 a6 mtlr r0 ffc11a60: 4e 80 00 20 blr =============================================================================== ffc11a64 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc11a64: 94 21 ff f0 stwu r1,-16(r1) ffc11a68: 7c 08 02 a6 mflr r0 ffc11a6c: 90 01 00 14 stw r0,20(r1) ffc11a70: 93 c1 00 08 stw r30,8(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc11a74: 83 c3 00 1c lwz r30,28(r3) rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc11a78: 93 e1 00 0c stw r31,12(r1) ffc11a7c: 7c 7f 1b 78 mr r31,r3 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { ffc11a80: 80 1e 00 4c lwz r0,76(r30) ffc11a84: 2f 80 00 06 cmpwi cr7,r0,6 ffc11a88: 41 9e 00 54 beq- cr7,ffc11adc 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 )) ffc11a8c: 80 a3 00 10 lwz r5,16(r3) ffc11a90: 80 c3 00 14 lwz r6,20(r3) ffc11a94: 7f c3 f3 78 mr r3,r30 ffc11a98: 4b ff f9 d9 bl ffc11470 ffc11a9c: 2f 83 00 00 cmpwi cr7,r3,0 ffc11aa0: 40 9e 00 90 bne- cr7,ffc11b30 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; ffc11aa4: 81 1e 00 50 lwz r8,80(r30) ffc11aa8: 81 3e 00 54 lwz r9,84(r30) ffc11aac: 81 5f 00 10 lwz r10,16(r31) ffc11ab0: 81 7f 00 14 lwz r11,20(r31) ffc11ab4: 91 1f 00 08 stw r8,8(r31) ffc11ab8: 91 3f 00 0c stw r9,12(r31) } return iop->offset; } ffc11abc: 80 01 00 14 lwz r0,20(r1) ffc11ac0: 7d 43 53 78 mr r3,r10 ffc11ac4: 7d 64 5b 78 mr r4,r11 ffc11ac8: 83 c1 00 08 lwz r30,8(r1) ffc11acc: 7c 08 03 a6 mtlr r0 ffc11ad0: 83 e1 00 0c lwz r31,12(r1) ffc11ad4: 38 21 00 10 addi r1,r1,16 ffc11ad8: 4e 80 00 20 blr 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) ffc11adc: 81 43 00 10 lwz r10,16(r3) ffc11ae0: 80 1e 00 50 lwz r0,80(r30) ffc11ae4: 81 63 00 14 lwz r11,20(r3) ffc11ae8: 7f 8a 00 00 cmpw cr7,r10,r0 ffc11aec: 81 3e 00 54 lwz r9,84(r30) ffc11af0: 41 9d 00 10 bgt- cr7,ffc11b00 <== NEVER TAKEN ffc11af4: 40 be ff c8 bne- cr7,ffc11abc <== NEVER TAKEN ffc11af8: 7f 8b 48 40 cmplw cr7,r11,r9 ffc11afc: 40 bd ff c0 ble- cr7,ffc11abc <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; ffc11b00: 7c 0a 03 78 mr r10,r0 <== NOT EXECUTED ffc11b04: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED ffc11b08: 7d 2b 4b 78 mr r11,r9 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } ffc11b0c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc11b10: 7d 43 53 78 mr r3,r10 <== NOT EXECUTED the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; ffc11b14: 91 3f 00 14 stw r9,20(r31) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } ffc11b18: 7d 64 5b 78 mr r4,r11 <== NOT EXECUTED ffc11b1c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc11b20: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc11b24: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc11b28: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc11b2c: 4e 80 00 20 blr <== 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 ); ffc11b30: 48 00 0f 31 bl ffc12a60 <__errno> ffc11b34: 38 00 00 1c li r0,28 ffc11b38: 90 03 00 00 stw r0,0(r3) ffc11b3c: 39 40 ff ff li r10,-1 ffc11b40: 39 60 ff ff li r11,-1 ffc11b44: 4b ff ff 78 b ffc11abc =============================================================================== ffc118f8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc118f8: 94 21 ff f0 stwu r1,-16(r1) ffc118fc: 7c 08 02 a6 mflr r0 ffc11900: 90 01 00 14 stw r0,20(r1) the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc11904: 80 03 00 18 lwz r0,24(r3) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc11908: 93 c1 00 08 stw r30,8(r1) the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc1190c: 70 09 02 04 andi. r9,r0,516 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc11910: 93 e1 00 0c stw r31,12(r1) ffc11914: 7c 7f 1b 78 mr r31,r3 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc11918: 83 c3 00 1c lwz r30,28(r3) /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc1191c: 41 82 00 10 beq- ffc1192c && (the_jnode->type == IMFS_LINEAR_FILE)) { ffc11920: 81 3e 00 4c lwz r9,76(r30) ffc11924: 2f 89 00 06 cmpwi cr7,r9,6 ffc11928: 41 9e 00 4c beq- cr7,ffc11974 <== NEVER TAKEN 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)) ffc1192c: 81 5e 00 50 lwz r10,80(r30) ffc11930: 81 7e 00 54 lwz r11,84(r30) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) ffc11934: 70 09 02 00 andi. r9,r0,512 ffc11938: 40 82 00 28 bne- ffc11960 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; ffc1193c: 91 5f 00 08 stw r10,8(r31) return 0; ffc11940: 38 60 00 00 li r3,0 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; ffc11944: 91 7f 00 0c stw r11,12(r31) return 0; } ffc11948: 80 01 00 14 lwz r0,20(r1) ffc1194c: 83 c1 00 08 lwz r30,8(r1) ffc11950: 7c 08 03 a6 mtlr r0 ffc11954: 83 e1 00 0c lwz r31,12(r1) ffc11958: 38 21 00 10 addi r1,r1,16 ffc1195c: 4e 80 00 20 blr 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; ffc11960: 91 5f 00 10 stw r10,16(r31) ffc11964: 91 7f 00 14 stw r11,20(r31) ffc11968: 81 5e 00 50 lwz r10,80(r30) ffc1196c: 81 7e 00 54 lwz r11,84(r30) ffc11970: 4b ff ff cc b ffc1193c /* * 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; ffc11974: 81 1e 00 54 lwz r8,84(r30) <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; ffc11978: 38 00 00 00 li r0,0 <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; ffc1197c: 39 20 00 05 li r9,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; ffc11980: 80 fe 00 58 lwz r7,88(r30) <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 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) ffc11984: 2f 88 00 00 cmpwi cr7,r8,0 <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; ffc11988: 91 3e 00 4c stw r9,76(r30) <== NOT EXECUTED the_jnode->info.file.size = 0; ffc1198c: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc11990: 39 60 00 00 li r11,0 <== NOT EXECUTED ffc11994: 91 5e 00 50 stw r10,80(r30) <== NOT EXECUTED ffc11998: 91 7e 00 54 stw r11,84(r30) <== NOT EXECUTED the_jnode->info.file.indirect = 0; ffc1199c: 90 1e 00 58 stw r0,88(r30) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; ffc119a0: 90 1e 00 5c stw r0,92(r30) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; ffc119a4: 90 1e 00 60 stw r0,96(r30) <== NOT EXECUTED if ((count != 0) ffc119a8: 40 9e 00 0c bne- cr7,ffc119b4 <== NOT EXECUTED ffc119ac: 80 03 00 18 lwz r0,24(r3) <== NOT EXECUTED ffc119b0: 4b ff ff 84 b ffc11934 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) ffc119b4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc119b8: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc119bc: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc119c0: 4b ff fc 85 bl ffc11644 <== NOT EXECUTED ffc119c4: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED return -1; ffc119c8: 38 60 ff ff li r3,-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)) ffc119cc: 41 be ff 7c beq- cr7,ffc11948 <== NOT EXECUTED ffc119d0: 80 1f 00 18 lwz r0,24(r31) <== NOT EXECUTED ffc119d4: 4b ff ff 58 b ffc1192c <== NOT EXECUTED =============================================================================== ffc0567c : int mknod( const char *pathname, mode_t mode, dev_t dev ) { ffc0567c: 94 21 ff c8 stwu r1,-56(r1) ffc05680: 7c 08 02 a6 mflr r0 ffc05684: 90 01 00 3c stw r0,60(r1) int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) ffc05688: 54 80 04 26 rlwinm r0,r4,0,16,19 ffc0568c: 2f 80 40 00 cmpwi cr7,r0,16384 int mknod( const char *pathname, mode_t mode, dev_t dev ) { ffc05690: 93 81 00 28 stw r28,40(r1) ffc05694: 7c bc 2b 78 mr r28,r5 ffc05698: 93 a1 00 2c stw r29,44(r1) ffc0569c: 7c dd 33 78 mr r29,r6 ffc056a0: 93 c1 00 30 stw r30,48(r1) ffc056a4: 7c 9e 23 78 mr r30,r4 ffc056a8: 93 e1 00 34 stw r31,52(r1) ffc056ac: 7c 7f 1b 78 mr r31,r3 int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) ffc056b0: 41 9e 00 44 beq- cr7,ffc056f4 ffc056b4: 2b 80 40 00 cmplwi cr7,r0,16384 ffc056b8: 40 9d 00 2c ble- cr7,ffc056e4 ffc056bc: 2f 80 60 00 cmpwi cr7,r0,24576 ffc056c0: 41 9e 00 34 beq- cr7,ffc056f4 ffc056c4: 6c 09 ff ff xoris r9,r0,65535 ffc056c8: 2f 89 80 00 cmpwi cr7,r9,-32768 ffc056cc: 41 9e 00 28 beq- cr7,ffc056f4 <== ALWAYS TAKEN case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc056d0: 48 00 d3 91 bl ffc12a60 <__errno> ffc056d4: 38 00 00 16 li r0,22 ffc056d8: 90 03 00 00 stw r0,0(r3) ffc056dc: 3b e0 ff ff li r31,-1 ffc056e0: 48 00 00 80 b ffc05760 int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) ffc056e4: 2f 80 10 00 cmpwi cr7,r0,4096 ffc056e8: 41 9e 00 0c beq- cr7,ffc056f4 ffc056ec: 2f 80 20 00 cmpwi cr7,r0,8192 ffc056f0: 40 9e ff e0 bne+ cr7,ffc056d0 break; default: rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); ffc056f4: 7f e3 fb 78 mr r3,r31 ffc056f8: 38 81 00 0c addi r4,r1,12 ffc056fc: 38 a1 00 10 addi r5,r1,16 ffc05700: 48 00 0c 95 bl ffc06394 result = (*temp_loc.ops->evalformake_h)( ffc05704: 81 21 00 1c lwz r9,28(r1) ffc05708: 80 61 00 0c lwz r3,12(r1) ffc0570c: 38 81 00 10 addi r4,r1,16 ffc05710: 80 09 00 04 lwz r0,4(r9) ffc05714: 38 a1 00 08 addi r5,r1,8 ffc05718: 7c 7f 1a 14 add r3,r31,r3 ffc0571c: 7c 09 03 a6 mtctr r0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) return -1; ffc05720: 3b e0 ff ff li r31,-1 rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); result = (*temp_loc.ops->evalformake_h)( ffc05724: 4e 80 04 21 bctrl &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) ffc05728: 2f 83 00 00 cmpwi cr7,r3,0 ffc0572c: 40 9e 00 34 bne- cr7,ffc05760 return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); ffc05730: 81 21 00 1c lwz r9,28(r1) ffc05734: 7f c4 f3 78 mr r4,r30 ffc05738: 80 61 00 08 lwz r3,8(r1) ffc0573c: 7f 85 e3 78 mr r5,r28 ffc05740: 80 09 00 14 lwz r0,20(r9) ffc05744: 7f a6 eb 78 mr r6,r29 ffc05748: 38 e1 00 10 addi r7,r1,16 ffc0574c: 7c 09 03 a6 mtctr r0 ffc05750: 4e 80 04 21 bctrl ffc05754: 7c 7f 1b 78 mr r31,r3 rtems_filesystem_freenode( &temp_loc ); ffc05758: 38 61 00 10 addi r3,r1,16 ffc0575c: 4b ff f9 79 bl ffc050d4 return result; } ffc05760: 80 01 00 3c lwz r0,60(r1) ffc05764: 7f e3 fb 78 mr r3,r31 ffc05768: 83 81 00 28 lwz r28,40(r1) ffc0576c: 7c 08 03 a6 mtlr r0 ffc05770: 83 a1 00 2c lwz r29,44(r1) ffc05774: 83 c1 00 30 lwz r30,48(r1) ffc05778: 83 e1 00 34 lwz r31,52(r1) ffc0577c: 38 21 00 38 addi r1,r1,56 ffc05780: 4e 80 00 20 blr =============================================================================== ffc05850 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc05850: 7d 80 00 26 mfcr r12 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && ffc05854: 2b 86 00 01 cmplwi cr7,r6,1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc05858: 94 21 ff a0 stwu r1,-96(r1) ffc0585c: 7c 08 02 a6 mflr r0 ffc05860: 93 01 00 40 stw r24,64(r1) ffc05864: 7c b8 2b 78 mr r24,r5 ffc05868: 93 41 00 48 stw r26,72(r1) ffc0586c: 7c da 33 78 mr r26,r6 ffc05870: 93 61 00 4c stw r27,76(r1) ffc05874: 7c 7b 1b 78 mr r27,r3 ffc05878: 93 81 00 50 stw r28,80(r1) ffc0587c: 7c 9c 23 78 mr r28,r4 ffc05880: 93 c1 00 58 stw r30,88(r1) ffc05884: 7c fe 3b 78 mr r30,r7 ffc05888: 90 01 00 64 stw r0,100(r1) ffc0588c: 92 61 00 2c stw r19,44(r1) ffc05890: 92 81 00 30 stw r20,48(r1) ffc05894: 92 a1 00 34 stw r21,52(r1) ffc05898: 92 c1 00 38 stw r22,56(r1) ffc0589c: 92 e1 00 3c stw r23,60(r1) ffc058a0: 93 21 00 44 stw r25,68(r1) ffc058a4: 93 a1 00 54 stw r29,84(r1) ffc058a8: 93 e1 00 5c stw r31,92(r1) ffc058ac: 91 81 00 28 stw r12,40(r1) /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && ffc058b0: 41 9d 02 38 bgt- cr7,ffc05ae8 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); ffc058b4: 7c a3 2b 78 mr r3,r5 ffc058b8: 48 00 9e fd bl ffc0f7b4 if ( !mount_h ) ffc058bc: 7c 7d 1b 79 mr. r29,r3 ffc058c0: 41 82 02 28 beq- ffc05ae8 { 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; ffc058c4: 7f 80 00 34 cntlzw r0,r28 ffc058c8: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc058cc: 68 00 00 01 xori r0,r0,1 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; ffc058d0: 2e 00 00 00 cmpwi cr4,r0,0 ffc058d4: 41 92 02 00 beq- cr4,ffc05ad4 * 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( ffc058d8: 7f 83 e3 78 mr r3,r28 ffc058dc: 48 00 ea b1 bl ffc1438c ffc058e0: 7f 93 e3 78 mr r19,r28 ffc058e4: 7c 74 1b 78 mr r20,r3 ffc058e8: 3a c3 00 01 addi r22,r3,1 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; ffc058ec: 7f 03 c3 78 mr r3,r24 ffc058f0: 48 00 ea 9d bl ffc1438c size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; ffc058f4: 2f 9b 00 00 cmpwi cr7,r27,0 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; ffc058f8: 7c 75 1b 78 mr r21,r3 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; ffc058fc: 3b 20 00 00 li r25,0 ffc05900: 41 9e 00 10 beq- cr7,ffc05910 ffc05904: 7f 63 db 78 mr r3,r27 ffc05908: 48 00 ea 85 bl ffc1438c ffc0590c: 3b 23 00 01 addi r25,r3,1 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; ffc05910: 7c 95 b2 14 add r4,r21,r22 ffc05914: 38 84 00 75 addi r4,r4,117 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); ffc05918: 38 60 00 01 li r3,1 ffc0591c: 7c 84 ca 14 add r4,r4,r25 ffc05920: 4b ff f1 dd bl ffc04afc if ( mt_entry != NULL ) { ffc05924: 7c 7f 1b 79 mr. r31,r3 ffc05928: 41 82 01 98 beq- ffc05ac0 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); ffc0592c: 3a ff 00 74 addi r23,r31,116 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; ffc05930: 3a b5 00 01 addi r21,r21,1 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); ffc05934: 7f 04 c3 78 mr r4,r24 ffc05938: 7e a5 ab 78 mr r5,r21 ffc0593c: 7e e3 bb 78 mr r3,r23 ffc05940: 48 00 de 5d bl ffc1379c mt_entry->type = str; str += filesystemtype_size; ffc05944: 7f 17 aa 14 add r24,r23,r21 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; ffc05948: 92 ff 00 6c stw r23,108(r31) str += filesystemtype_size; memcpy( str, source_or_null, source_size ); ffc0594c: 7f 25 cb 78 mr r5,r25 ffc05950: 7f 64 db 78 mr r4,r27 ffc05954: 7f 03 c3 78 mr r3,r24 ffc05958: 48 00 de 45 bl ffc1379c mt_entry->dev = str; str += source_size; ffc0595c: 7f 38 ca 14 add r25,r24,r25 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; ffc05960: 93 1f 00 70 stw r24,112(r31) str += source_size; memcpy( str, target, target_size ); ffc05964: 7e 64 9b 78 mr r4,r19 ffc05968: 7e c5 b3 78 mr r5,r22 ffc0596c: 7f 23 cb 78 mr r3,r25 ffc05970: 48 00 de 2d bl ffc1379c 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; ffc05974: 3c 80 ff c2 lis r4,-62 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; ffc05978: 93 3f 00 68 stw r25,104(r31) 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; ffc0597c: 38 7f 00 38 addi r3,r31,56 ffc05980: 38 84 f3 04 addi r4,r4,-3324 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; ffc05984: 93 ff 00 2c stw r31,44(r31) mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; ffc05988: 38 a0 00 30 li r5,48 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; ffc0598c: 93 5f 00 30 stw r26,48(r31) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; ffc05990: 48 00 de 0d bl ffc1379c /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { ffc05994: 40 92 00 80 bne- cr4,ffc05a14 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc05998: 3d 20 00 00 lis r9,0 ffc0599c: 39 69 21 9c addi r11,r9,8604 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { ffc059a0: 81 29 21 9c lwz r9,8604(r9) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc059a4: 38 0b 00 04 addi r0,r11,4 ffc059a8: 7f 89 00 00 cmpw cr7,r9,r0 ffc059ac: 41 9e 00 c0 beq- cr7,ffc05a6c <== ALWAYS TAKEN errno = EINVAL; ffc059b0: 48 00 d0 b1 bl ffc12a60 <__errno> <== NOT EXECUTED ffc059b4: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc059b8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); ffc059bc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc059c0: 4b ff f7 41 bl ffc05100 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; ffc059c4: 38 60 ff ff li r3,-1 <== NOT EXECUTED } ffc059c8: 80 01 00 64 lwz r0,100(r1) ffc059cc: 81 81 00 28 lwz r12,40(r1) ffc059d0: 7c 08 03 a6 mtlr r0 ffc059d4: 82 61 00 2c lwz r19,44(r1) ffc059d8: 82 81 00 30 lwz r20,48(r1) ffc059dc: 7d 80 81 20 mtcrf 8,r12 ffc059e0: 82 a1 00 34 lwz r21,52(r1) ffc059e4: 82 c1 00 38 lwz r22,56(r1) ffc059e8: 82 e1 00 3c lwz r23,60(r1) ffc059ec: 83 01 00 40 lwz r24,64(r1) ffc059f0: 83 21 00 44 lwz r25,68(r1) ffc059f4: 83 41 00 48 lwz r26,72(r1) ffc059f8: 83 61 00 4c lwz r27,76(r1) ffc059fc: 83 81 00 50 lwz r28,80(r1) ffc05a00: 83 a1 00 54 lwz r29,84(r1) ffc05a04: 83 c1 00 58 lwz r30,88(r1) ffc05a08: 83 e1 00 5c lwz r31,92(r1) ffc05a0c: 38 21 00 60 addi r1,r1,96 ffc05a10: 4e 80 00 20 blr * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( ffc05a14: 7f 83 e3 78 mr r3,r28 ffc05a18: 7e 84 a3 78 mr r4,r20 ffc05a1c: 38 a0 00 07 li r5,7 ffc05a20: 38 c1 00 08 addi r6,r1,8 ffc05a24: 38 e0 00 01 li r7,1 ffc05a28: 4b ff f5 51 bl ffc04f78 ffc05a2c: 2f 83 ff ff cmpwi cr7,r3,-1 ffc05a30: 41 be ff 8c beq- cr7,ffc059bc <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { ffc05a34: 81 21 00 14 lwz r9,20(r1) ffc05a38: 38 61 00 08 addi r3,r1,8 ffc05a3c: 80 09 00 10 lwz r0,16(r9) ffc05a40: 7c 09 03 a6 mtctr r0 ffc05a44: 4e 80 04 21 bctrl ffc05a48: 2f 83 00 01 cmpwi cr7,r3,1 ffc05a4c: 41 9e 01 20 beq- cr7,ffc05b6c errno = ENOTDIR; ffc05a50: 48 00 d0 11 bl ffc12a60 <__errno> ffc05a54: 38 00 00 14 li r0,20 ffc05a58: 90 03 00 00 stw r0,0(r3) return 0; cleanup_and_bail: free( mt_entry ); ffc05a5c: 7f e3 fb 78 mr r3,r31 ffc05a60: 4b ff f6 a1 bl ffc05100 ffc05a64: 3b 81 00 08 addi r28,r1,8 ffc05a68: 48 00 00 48 b ffc05ab0 ) { 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; ffc05a6c: 3b 80 00 00 li r28,0 * 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 ) ) { ffc05a70: 7f e3 fb 78 mr r3,r31 ffc05a74: 7f a9 03 a6 mtctr r29 ffc05a78: 7f c4 f3 78 mr r4,r30 ffc05a7c: 4e 80 04 21 bctrl ffc05a80: 2f 83 00 00 cmpwi cr7,r3,0 ffc05a84: 41 9e 00 78 beq- cr7,ffc05afc /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); ffc05a88: 81 21 00 14 lwz r9,20(r1) ffc05a8c: 7f e3 fb 78 mr r3,r31 ffc05a90: 80 09 00 28 lwz r0,40(r9) ffc05a94: 7c 09 03 a6 mtctr r0 ffc05a98: 4e 80 04 21 bctrl return 0; cleanup_and_bail: free( mt_entry ); ffc05a9c: 7f e3 fb 78 mr r3,r31 ffc05aa0: 4b ff f6 61 bl ffc05100 if ( loc_to_free ) ffc05aa4: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_filesystem_freenode( loc_to_free ); return -1; ffc05aa8: 38 60 ff ff li r3,-1 cleanup_and_bail: free( mt_entry ); if ( loc_to_free ) ffc05aac: 41 be ff 1c beq- cr7,ffc059c8 <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); ffc05ab0: 7f 83 e3 78 mr r3,r28 ffc05ab4: 4b ff f6 21 bl ffc050d4 return -1; ffc05ab8: 38 60 ff ff li r3,-1 ffc05abc: 4b ff ff 0c b ffc059c8 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); ffc05ac0: 48 00 cf a1 bl ffc12a60 <__errno> <== NOT EXECUTED ffc05ac4: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc05ac8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05acc: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05ad0: 4b ff fe f8 b ffc059c8 <== NOT EXECUTED const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; ffc05ad4: 3e 60 ff c2 lis r19,-62 ffc05ad8: 3a c0 00 02 li r22,2 ffc05adc: 3a 80 00 01 li r20,1 ffc05ae0: 3a 73 ee 14 addi r19,r19,-4588 ffc05ae4: 4b ff fe 08 b ffc058ec /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc05ae8: 48 00 cf 79 bl ffc12a60 <__errno> ffc05aec: 38 00 00 16 li r0,22 ffc05af0: 90 03 00 00 stw r0,0(r3) ffc05af4: 38 60 ff ff li r3,-1 ffc05af8: 4b ff fe d0 b ffc059c8 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 ); ffc05afc: 3f c0 00 00 lis r30,0 ffc05b00: 80 7e 27 b4 lwz r3,10164(r30) ffc05b04: 38 80 00 00 li r4,0 ffc05b08: 38 a0 00 00 li r5,0 ffc05b0c: 48 00 38 31 bl ffc0933c /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); ffc05b10: 3c 60 00 00 lis r3,0 ffc05b14: 38 63 21 9c addi r3,r3,8604 ffc05b18: 7f e4 fb 78 mr r4,r31 ffc05b1c: 48 00 45 d9 bl ffc0a0f4 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc05b20: 80 7e 27 b4 lwz r3,10164(r30) ffc05b24: 48 00 39 a5 bl ffc094c8 rtems_libio_unlock(); if ( !has_target ) ffc05b28: 40 92 00 3c bne- cr4,ffc05b64 rtems_filesystem_root = mt_entry->mt_fs_root; ffc05b2c: 3d 20 00 00 lis r9,0 ffc05b30: 80 ff 00 1c lwz r7,28(r31) ffc05b34: 81 29 27 3c lwz r9,10044(r9) return 0; ffc05b38: 38 60 00 00 li r3,0 rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; ffc05b3c: 81 1f 00 20 lwz r8,32(r31) ffc05b40: 81 5f 00 24 lwz r10,36(r31) ffc05b44: 81 7f 00 28 lwz r11,40(r31) ffc05b48: 80 1f 00 2c lwz r0,44(r31) ffc05b4c: 90 e9 00 18 stw r7,24(r9) ffc05b50: 91 09 00 1c stw r8,28(r9) ffc05b54: 91 49 00 20 stw r10,32(r9) ffc05b58: 91 69 00 24 stw r11,36(r9) ffc05b5c: 90 09 00 28 stw r0,40(r9) ffc05b60: 4b ff fe 68 b ffc059c8 return 0; ffc05b64: 38 60 00 00 li r3,0 ffc05b68: 4b ff fe 60 b ffc059c8 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { ffc05b6c: 80 81 00 08 lwz r4,8(r1) ffc05b70: 3c 60 ff c0 lis r3,-64 ffc05b74: 38 63 57 84 addi r3,r3,22404 ffc05b78: 4b ff fc 21 bl ffc05798 ffc05b7c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05b80: 41 9e 00 14 beq- cr7,ffc05b94 errno = EBUSY; ffc05b84: 48 00 ce dd bl ffc12a60 <__errno> ffc05b88: 38 00 00 10 li r0,16 ffc05b8c: 90 03 00 00 stw r0,0(r3) goto cleanup_and_bail; ffc05b90: 4b ff fe cc b ffc05a5c * 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; ffc05b94: 80 01 00 08 lwz r0,8(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 ) ) { ffc05b98: 7f e3 fb 78 mr r3,r31 * 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; ffc05b9c: 81 21 00 14 lwz r9,20(r1) if ( has_target ) { if ( rtems_filesystem_evaluate_path( target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) goto cleanup_and_bail; loc_to_free = &loc; ffc05ba0: 3b 81 00 08 addi r28,r1,8 * 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; ffc05ba4: 90 1f 00 08 stw r0,8(r31) mt_entry->mt_point_node.handlers = loc.handlers; ffc05ba8: 80 01 00 10 lwz r0,16(r1) mt_entry->mt_point_node.ops = loc.ops; ffc05bac: 91 3f 00 14 stw r9,20(r31) * 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; ffc05bb0: 90 1f 00 10 stw r0,16(r31) mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; ffc05bb4: 80 01 00 18 lwz r0,24(r1) ffc05bb8: 90 1f 00 18 stw r0,24(r31) /* * 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 ) ) { ffc05bbc: 80 09 00 20 lwz r0,32(r9) ffc05bc0: 7c 09 03 a6 mtctr r0 ffc05bc4: 4e 80 04 21 bctrl ffc05bc8: 2f 83 00 00 cmpwi cr7,r3,0 ffc05bcc: 41 be fe a4 beq- cr7,ffc05a70 <== ALWAYS TAKEN ffc05bd0: 4b ff fe 8c b ffc05a5c <== NOT EXECUTED =============================================================================== ffc056bc : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc056bc: 94 21 ff e0 stwu r1,-32(r1) ffc056c0: 7c 08 02 a6 mflr r0 ffc056c4: 93 e1 00 1c stw r31,28(r1) int rv = -1; if (target != NULL) { ffc056c8: 7c 9f 23 79 mr. r31,r4 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc056cc: 93 61 00 0c stw r27,12(r1) ffc056d0: 7c bb 2b 78 mr r27,r5 ffc056d4: 93 81 00 10 stw r28,16(r1) ffc056d8: 7c dc 33 78 mr r28,r6 ffc056dc: 93 a1 00 14 stw r29,20(r1) ffc056e0: 7c fd 3b 78 mr r29,r7 ffc056e4: 93 c1 00 18 stw r30,24(r1) ffc056e8: 7c 7e 1b 78 mr r30,r3 ffc056ec: 90 01 00 24 stw r0,36(r1) int rv = -1; if (target != NULL) { ffc056f0: 41 82 00 78 beq- ffc05768 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); ffc056f4: 7f e3 fb 78 mr r3,r31 ffc056f8: 38 80 01 ff li r4,511 ffc056fc: 48 00 0b d9 bl ffc062d4 if (rv == 0) { ffc05700: 2c 03 00 00 cmpwi r3,0 ffc05704: 41 82 00 28 beq- ffc0572c <== ALWAYS TAKEN } else { errno = EINVAL; } return rv; } ffc05708: 80 01 00 24 lwz r0,36(r1) ffc0570c: 83 61 00 0c lwz r27,12(r1) ffc05710: 7c 08 03 a6 mtlr r0 ffc05714: 83 81 00 10 lwz r28,16(r1) ffc05718: 83 a1 00 14 lwz r29,20(r1) ffc0571c: 83 c1 00 18 lwz r30,24(r1) ffc05720: 83 e1 00 1c lwz r31,28(r1) ffc05724: 38 21 00 20 addi r1,r1,32 ffc05728: 4e 80 00 20 blr int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( ffc0572c: 7f c3 f3 78 mr r3,r30 ffc05730: 7f e4 fb 78 mr r4,r31 ffc05734: 7f 65 db 78 mr r5,r27 ffc05738: 7f 86 e3 78 mr r6,r28 ffc0573c: 7f a7 eb 78 mr r7,r29 ffc05740: 48 00 01 09 bl ffc05848 } else { errno = EINVAL; } return rv; } ffc05744: 80 01 00 24 lwz r0,36(r1) ffc05748: 83 61 00 0c lwz r27,12(r1) ffc0574c: 7c 08 03 a6 mtlr r0 ffc05750: 83 81 00 10 lwz r28,16(r1) ffc05754: 83 a1 00 14 lwz r29,20(r1) ffc05758: 83 c1 00 18 lwz r30,24(r1) ffc0575c: 83 e1 00 1c lwz r31,28(r1) ffc05760: 38 21 00 20 addi r1,r1,32 ffc05764: 4e 80 00 20 blr options, data ); } } else { errno = EINVAL; ffc05768: 48 00 ce 91 bl ffc125f8 <__errno> ffc0576c: 38 00 00 16 li r0,22 ffc05770: 90 03 00 00 stw r0,0(r3) const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; ffc05774: 38 60 ff ff li r3,-1 ffc05778: 4b ff ff 90 b ffc05708 =============================================================================== ffc05ef8 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { ffc05ef8: 7d 80 00 26 mfcr r12 /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ffc05efc: 7e 03 20 00 cmpw cr4,r3,r4 void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { ffc05f00: 94 21 ff e8 stwu r1,-24(r1) ffc05f04: 7c 08 02 a6 mflr r0 ffc05f08: 93 c1 00 10 stw r30,16(r1) ffc05f0c: 7c 9e 23 78 mr r30,r4 ffc05f10: 90 01 00 1c stw r0,28(r1) ffc05f14: 93 e1 00 14 stw r31,20(r1) ffc05f18: 91 81 00 0c stw r12,12(r1) /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ffc05f1c: 41 92 00 8c beq- cr4,ffc05fa8 ptr = _REENT; } else { ptr = deleted_task->libc_reent; ffc05f20: 83 e4 01 28 lwz r31,296(r4) } if (ptr && ptr != _global_impure_ptr) { ffc05f24: 2f 9f 00 00 cmpwi cr7,r31,0 ffc05f28: 41 9e 00 2c beq- cr7,ffc05f54 <== NEVER TAKEN ffc05f2c: 3d 20 00 00 lis r9,0 ffc05f30: 80 09 27 48 lwz r0,10056(r9) ffc05f34: 7f 9f 00 00 cmpw cr7,r31,r0 ffc05f38: 41 9e 00 1c beq- cr7,ffc05f54 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); ffc05f3c: 3c 80 ff c0 lis r4,-64 ffc05f40: 7f e3 fb 78 mr r3,r31 ffc05f44: 38 84 5c 90 addi r4,r4,23696 ffc05f48: 48 00 d6 39 bl ffc13580 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); ffc05f4c: 7f e3 fb 78 mr r3,r31 ffc05f50: 48 00 7a d9 bl ffc0da28 <_Workspace_Free> #endif } deleted_task->libc_reent = NULL; ffc05f54: 38 00 00 00 li r0,0 ffc05f58: 90 1e 01 28 stw r0,296(r30) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { ffc05f5c: 41 92 00 24 beq- cr4,ffc05f80 _REENT = 0; } } ffc05f60: 80 01 00 1c lwz r0,28(r1) ffc05f64: 81 81 00 0c lwz r12,12(r1) ffc05f68: 7c 08 03 a6 mtlr r0 ffc05f6c: 83 c1 00 10 lwz r30,16(r1) ffc05f70: 83 e1 00 14 lwz r31,20(r1) ffc05f74: 7d 80 81 20 mtcrf 8,r12 ffc05f78: 38 21 00 18 addi r1,r1,24 ffc05f7c: 4e 80 00 20 blr /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; ffc05f80: 3d 20 00 00 lis r9,0 } } ffc05f84: 81 81 00 0c lwz r12,12(r1) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; ffc05f88: 90 09 27 4c stw r0,10060(r9) } } ffc05f8c: 7d 80 81 20 mtcrf 8,r12 ffc05f90: 80 01 00 1c lwz r0,28(r1) ffc05f94: 83 c1 00 10 lwz r30,16(r1) ffc05f98: 7c 08 03 a6 mtlr r0 ffc05f9c: 83 e1 00 14 lwz r31,20(r1) ffc05fa0: 38 21 00 18 addi r1,r1,24 ffc05fa4: 4e 80 00 20 blr /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; ffc05fa8: 3d 20 00 00 lis r9,0 ffc05fac: 83 e9 27 4c lwz r31,10060(r9) ffc05fb0: 4b ff ff 74 b ffc05f24 =============================================================================== ffc05c90 : */ int newlib_free_buffers( FILE *fp ) { ffc05c90: 94 21 ff f0 stwu r1,-16(r1) ffc05c94: 7c 08 02 a6 mflr r0 ffc05c98: 93 e1 00 0c stw r31,12(r1) ffc05c9c: 7c 7f 1b 78 mr r31,r3 ffc05ca0: 90 01 00 14 stw r0,20(r1) switch ( fileno(fp) ) { ffc05ca4: 48 00 d2 e1 bl ffc12f84 ffc05ca8: 2b 83 00 02 cmplwi cr7,r3,2 ffc05cac: 40 9d 00 24 ble- cr7,ffc05cd0 <== ALWAYS TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); ffc05cb0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05cb4: 48 00 cf 39 bl ffc12bec <== NOT EXECUTED } return 0; } ffc05cb8: 80 01 00 14 lwz r0,20(r1) ffc05cbc: 38 60 00 00 li r3,0 ffc05cc0: 83 e1 00 0c lwz r31,12(r1) ffc05cc4: 38 21 00 10 addi r1,r1,16 ffc05cc8: 7c 08 03 a6 mtlr r0 ffc05ccc: 4e 80 00 20 blr { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { ffc05cd0: a0 1f 00 0c lhz r0,12(r31) ffc05cd4: 70 09 00 80 andi. r9,r0,128 ffc05cd8: 41 82 ff e0 beq+ ffc05cb8 <== ALWAYS TAKEN free( fp->_bf._base ); ffc05cdc: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc05ce0: 4b ff f4 21 bl ffc05100 <== NOT EXECUTED fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; ffc05ce4: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc05ce8: 90 1f 00 00 stw r0,0(r31) <== NOT EXECUTED break; default: fclose(fp); } return 0; } ffc05cec: 38 60 00 00 li r3,0 <== NOT EXECUTED case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; ffc05cf0: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED break; default: fclose(fp); } return 0; } ffc05cf4: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; ffc05cf8: a1 3f 00 0c lhz r9,12(r31) <== NOT EXECUTED break; default: fclose(fp); } return 0; } ffc05cfc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; ffc05d00: 55 29 06 6e rlwinm r9,r9,0,25,23 <== NOT EXECUTED ffc05d04: b1 3f 00 0c sth r9,12(r31) <== NOT EXECUTED break; default: fclose(fp); } return 0; } ffc05d08: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc05d0c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc05d10: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0604c : int open( const char *pathname, int flags, ... ) { ffc0604c: 94 21 ff b0 stwu r1,-80(r1) ffc06050: 7c 08 02 a6 mflr r0 ffc06054: 7d 80 00 26 mfcr r12 ffc06058: 90 01 00 54 stw r0,84(r1) /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; ffc0605c: 38 04 00 01 addi r0,r4,1 if ( ( status & _FREAD ) == _FREAD ) ffc06060: 70 09 00 01 andi. r9,r0,1 int open( const char *pathname, int flags, ... ) { ffc06064: 93 61 00 3c stw r27,60(r1) int eval_flags; /* * Set the Evaluation flags */ eval_flags = 0; ffc06068: 3b 60 00 00 li r27,0 int open( const char *pathname, int flags, ... ) { ffc0606c: 93 a1 00 44 stw r29,68(r1) ffc06070: 7c 7d 1b 78 mr r29,r3 ffc06074: 93 c1 00 48 stw r30,72(r1) ffc06078: 7c 9e 23 78 mr r30,r4 ffc0607c: 93 41 00 38 stw r26,56(r1) ffc06080: 93 81 00 40 stw r28,64(r1) ffc06084: 93 e1 00 4c stw r31,76(r1) ffc06088: 91 81 00 34 stw r12,52(r1) ffc0608c: 90 a1 00 28 stw r5,40(r1) /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) ffc06090: 41 82 00 08 beq- ffc06098 eval_flags |= RTEMS_LIBIO_PERMS_READ; ffc06094: 3b 60 00 04 li r27,4 if ( ( status & _FWRITE ) == _FWRITE ) ffc06098: 70 09 00 02 andi. r9,r0,2 ffc0609c: 41 82 00 08 beq- ffc060a4 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; ffc060a0: 63 7b 00 02 ori r27,r27,2 va_start(ap, flags); ffc060a4: 38 01 00 58 addi r0,r1,88 mode = va_arg( ap, int ); ffc060a8: 83 81 00 28 lwz r28,40(r1) if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); ffc060ac: 39 21 00 20 addi r9,r1,32 ffc060b0: 90 01 00 0c stw r0,12(r1) mode = va_arg( ap, int ); ffc060b4: 38 00 00 03 li r0,3 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); ffc060b8: 91 21 00 10 stw r9,16(r1) mode = va_arg( ap, int ); ffc060bc: 98 01 00 08 stb r0,8(r1) * 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(); ffc060c0: 48 00 92 b1 bl ffc0f370 if ( iop == 0 ) { ffc060c4: 2e 03 00 00 cmpwi cr4,r3,0 ffc060c8: 7c 7f 1b 78 mr r31,r3 ffc060cc: 41 92 00 e0 beq- cr4,ffc061ac } /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( ffc060d0: 7f a3 eb 78 mr r3,r29 ffc060d4: 48 00 e2 b9 bl ffc1438c ffc060d8: 7f 65 db 78 mr r5,r27 ffc060dc: 7c 64 1b 78 mr r4,r3 ffc060e0: 38 c1 00 14 addi r6,r1,20 ffc060e4: 7f a3 eb 78 mr r3,r29 ffc060e8: 38 e0 00 01 li r7,1 ffc060ec: 4b ff ee 8d bl ffc04f78 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { ffc060f0: 2f 83 ff ff cmpwi cr7,r3,-1 ffc060f4: 41 9e 01 10 beq- cr7,ffc06204 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { ffc060f8: 73 c0 0a 00 andi. r0,r30,2560 ffc060fc: 2f 80 0a 00 cmpwi cr7,r0,2560 ffc06100: 41 9e 00 c0 beq- cr7,ffc061c0 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); ffc06104: 7f c3 f3 78 mr r3,r30 ffc06108: 83 7f 00 18 lwz r27,24(r31) ffc0610c: 48 00 91 b5 bl ffc0f2c0 iop->pathinfo = loc; ffc06110: 80 01 00 14 lwz r0,20(r1) ffc06114: 81 21 00 1c lwz r9,28(r1) /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); ffc06118: 7c 63 db 78 or r3,r3,r27 iop->pathinfo = loc; ffc0611c: 90 1f 00 1c stw r0,28(r31) rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); ffc06120: 7f a4 eb 78 mr r4,r29 ffc06124: 7f c5 f3 78 mr r5,r30 /* * 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; ffc06128: 80 01 00 18 lwz r0,24(r1) rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); ffc0612c: 7f 86 e3 78 mr r6,r28 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); ffc06130: 90 7f 00 18 stw r3,24(r31) iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); ffc06134: 7f e3 fb 78 mr r3,r31 /* * 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; ffc06138: 90 1f 00 20 stw r0,32(r31) ffc0613c: 80 01 00 20 lwz r0,32(r1) ffc06140: 91 3f 00 24 stw r9,36(r31) ffc06144: 90 1f 00 28 stw r0,40(r31) ffc06148: 80 01 00 24 lwz r0,36(r1) ffc0614c: 90 1f 00 2c stw r0,44(r31) rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); ffc06150: 80 09 00 00 lwz r0,0(r9) ffc06154: 7c 09 03 a6 mtctr r0 ffc06158: 4e 80 04 21 bctrl if ( rc ) { ffc0615c: 2f 83 00 00 cmpwi cr7,r3,0 ffc06160: 40 9e 00 88 bne- cr7,ffc061e8 } /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { ffc06164: 73 c0 04 00 andi. r0,r30,1024 ffc06168: 3f c0 00 00 lis r30,0 ffc0616c: 40 82 00 bc bne- ffc06228 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; ffc06170: 80 7e 27 ac lwz r3,10156(r30) ffc06174: 7f e3 f8 50 subf r31,r3,r31 ffc06178: 7f e3 36 70 srawi r3,r31,6 } ffc0617c: 80 01 00 54 lwz r0,84(r1) ffc06180: 81 81 00 34 lwz r12,52(r1) ffc06184: 7c 08 03 a6 mtlr r0 ffc06188: 83 41 00 38 lwz r26,56(r1) ffc0618c: 83 61 00 3c lwz r27,60(r1) ffc06190: 7d 80 81 20 mtcrf 8,r12 ffc06194: 83 81 00 40 lwz r28,64(r1) ffc06198: 83 a1 00 44 lwz r29,68(r1) ffc0619c: 83 c1 00 48 lwz r30,72(r1) ffc061a0: 83 e1 00 4c lwz r31,76(r1) ffc061a4: 38 21 00 50 addi r1,r1,80 ffc061a8: 4e 80 00 20 blr */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { rc = ENFILE; ffc061ac: 3b 40 00 17 li r26,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 ); ffc061b0: 48 00 c8 b1 bl ffc12a60 <__errno> ffc061b4: 93 43 00 00 stw r26,0(r3) ffc061b8: 38 60 ff ff li r3,-1 ffc061bc: 4b ff ff c0 b ffc0617c } } 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; ffc061c0: 3b 61 00 14 addi r27,r1,20 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; ffc061c4: 3b 40 00 11 li r26,17 */ done: va_end(ap); if ( rc ) { if ( iop ) ffc061c8: 41 92 00 0c beq- cr4,ffc061d4 rtems_libio_free( iop ); ffc061cc: 7f e3 fb 78 mr r3,r31 ffc061d0: 48 00 92 71 bl ffc0f440 if ( loc_to_free ) ffc061d4: 2f 9b 00 00 cmpwi cr7,r27,0 ffc061d8: 41 be ff d8 beq- cr7,ffc061b0 rtems_filesystem_freenode( loc_to_free ); ffc061dc: 7f 63 db 78 mr r3,r27 ffc061e0: 4b ff ee f5 bl ffc050d4 ffc061e4: 4b ff ff cc b ffc061b0 iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; ffc061e8: 48 00 c8 79 bl ffc12a60 <__errno> rc = EEXIST; loc_to_free = &loc; goto done; } loc_to_free = &loc; ffc061ec: 3b 61 00 14 addi r27,r1,20 iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; ffc061f0: 83 43 00 00 lwz r26,0(r3) ffc061f4: 2e 1a 00 00 cmpwi cr4,r26,0 * Single exit and clean up path. */ done: va_end(ap); if ( rc ) { ffc061f8: 40 92 00 fc bne- cr4,ffc062f4 <== ALWAYS TAKEN ffc061fc: 3f c0 00 00 lis r30,0 <== NOT EXECUTED ffc06200: 4b ff ff 70 b ffc06170 <== NOT EXECUTED */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { ffc06204: 48 00 c8 5d bl ffc12a60 <__errno> ffc06208: 80 03 00 00 lwz r0,0(r3) ffc0620c: 2f 80 00 02 cmpwi cr7,r0,2 ffc06210: 41 9e 00 68 beq- cr7,ffc06278 rc = errno; ffc06214: 48 00 c8 4d bl ffc12a60 <__errno> 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; ffc06218: 3b 60 00 00 li r27,0 status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { rc = errno; ffc0621c: 83 43 00 00 lwz r26,0(r3) ffc06220: 2e 1a 00 00 cmpwi cr4,r26,0 goto done; ffc06224: 4b ff ff d4 b ffc061f8 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); ffc06228: 80 7e 27 ac lwz r3,10156(r30) ffc0622c: 38 a0 00 00 li r5,0 ffc06230: 38 c0 00 00 li r6,0 ffc06234: 7c 63 f8 50 subf r3,r3,r31 ffc06238: 7c 63 36 70 srawi r3,r3,6 ffc0623c: 48 00 8f 7d bl ffc0f1b8 if ( rc ) { ffc06240: 2e 03 00 00 cmpwi cr4,r3,0 ffc06244: 7c 7a 1b 78 mr r26,r3 ffc06248: 41 92 ff 28 beq+ cr4,ffc06170 if(errno) rc = errno; ffc0624c: 48 00 c8 15 bl ffc12a60 <__errno> ffc06250: 80 03 00 00 lwz r0,0(r3) ffc06254: 2f 80 00 00 cmpwi cr7,r0,0 ffc06258: 40 9e 00 5c bne- cr7,ffc062b4 <== ALWAYS TAKEN close( iop - rtems_libio_iops ); ffc0625c: 80 7e 27 ac lwz r3,10156(r30) /* those are released by close(): */ iop = 0; loc_to_free = NULL; ffc06260: 3b 60 00 00 li r27,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 ); ffc06264: 7c 63 f8 50 subf r3,r3,r31 ffc06268: 7c 63 36 70 srawi r3,r3,6 ffc0626c: 48 00 8e ad bl ffc0f118 /* those are released by close(): */ iop = 0; ffc06270: 3b e0 00 00 li r31,0 ffc06274: 4b ff ff 84 b ffc061f8 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { ffc06278: 73 c0 02 00 andi. r0,r30,512 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; ffc0627c: 3b 60 00 00 li r27,0 goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { rc = ENOENT; ffc06280: 3b 40 00 02 li r26,2 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { ffc06284: 41 82 ff 44 beq+ ffc061c8 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); ffc06288: 7f a3 eb 78 mr r3,r29 ffc0628c: 63 84 80 00 ori r4,r28,32768 ffc06290: 38 a0 00 00 li r5,0 ffc06294: 38 c0 00 00 li r6,0 ffc06298: 4b ff f3 e5 bl ffc0567c if ( rc ) { ffc0629c: 2f 83 00 00 cmpwi cr7,r3,0 ffc062a0: 41 9e 00 24 beq- cr7,ffc062c4 <== ALWAYS TAKEN rc = errno; ffc062a4: 48 00 c7 bd bl ffc12a60 <__errno> <== NOT EXECUTED ffc062a8: 83 43 00 00 lwz r26,0(r3) <== NOT EXECUTED ffc062ac: 2e 1a 00 00 cmpwi cr4,r26,0 <== NOT EXECUTED goto done; ffc062b0: 4b ff ff 48 b ffc061f8 <== 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; ffc062b4: 48 00 c7 ad bl ffc12a60 <__errno> ffc062b8: 83 43 00 00 lwz r26,0(r3) ffc062bc: 2e 1a 00 00 cmpwi cr4,r26,0 ffc062c0: 4b ff ff 9c b ffc0625c /* * 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( ffc062c4: 7f a3 eb 78 mr r3,r29 ffc062c8: 48 00 e0 c5 bl ffc1438c ffc062cc: 38 a0 00 00 li r5,0 ffc062d0: 7c 64 1b 78 mr r4,r3 ffc062d4: 38 c1 00 14 addi r6,r1,20 ffc062d8: 7f a3 eb 78 mr r3,r29 ffc062dc: 38 e0 00 01 li r7,1 ffc062e0: 4b ff ec 99 bl ffc04f78 pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ rc = EACCES; ffc062e4: 3b 40 00 0d li r26,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 */ ffc062e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc062ec: 40 be fe dc bne- cr7,ffc061c8 <== NEVER TAKEN ffc062f0: 4b ff fe 14 b ffc06104 ffc062f4: 2e 1f 00 00 cmpwi cr4,r31,0 ffc062f8: 4b ff fe d0 b ffc061c8 =============================================================================== ffc07214 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { ffc07214: 94 21 ff e8 stwu r1,-24(r1) ffc07218: 7c 08 02 a6 mflr r0 ffc0721c: 90 01 00 1c stw r0,28(r1) int i; if (tty->termios.c_oflag & OPOST) { ffc07220: 80 04 00 34 lwz r0,52(r4) /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { ffc07224: 93 e1 00 14 stw r31,20(r1) ffc07228: 7c 9f 23 78 mr r31,r4 int i; if (tty->termios.c_oflag & OPOST) { ffc0722c: 70 09 00 01 andi. r9,r0,1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { ffc07230: 98 61 00 08 stb r3,8(r1) int i; if (tty->termios.c_oflag & OPOST) { ffc07234: 41 82 00 70 beq- ffc072a4 <== NEVER TAKEN switch (c) { ffc07238: 2f 83 00 09 cmpwi cr7,r3,9 ffc0723c: 41 9e 00 e4 beq- cr7,ffc07320 ffc07240: 2b 83 00 09 cmplwi cr7,r3,9 ffc07244: 40 9d 00 84 ble- cr7,ffc072c8 <== NEVER TAKEN ffc07248: 2f 83 00 0a cmpwi cr7,r3,10 ffc0724c: 41 9e 00 9c beq- cr7,ffc072e8 ffc07250: 2f 83 00 0d cmpwi cr7,r3,13 ffc07254: 41 9e 00 f0 beq- cr7,ffc07344 <== NEVER TAKEN if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) ffc07258: 70 09 00 02 andi. r9,r0,2 c = toupper(c); ffc0725c: 3d 20 00 00 lis r9,0 ffc07260: 80 09 27 44 lwz r0,10052(r9) if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) ffc07264: 41 82 00 24 beq- ffc07288 <== ALWAYS TAKEN c = toupper(c); ffc07268: 7c 69 1b 78 mr r9,r3 <== NOT EXECUTED ffc0726c: 7c 60 1a 14 add r3,r0,r3 <== NOT EXECUTED ffc07270: 89 63 00 01 lbz r11,1(r3) <== NOT EXECUTED ffc07274: 55 6b 07 be clrlwi r11,r11,30 <== NOT EXECUTED ffc07278: 2f 8b 00 02 cmpwi cr7,r11,2 <== NOT EXECUTED ffc0727c: 41 9e 01 00 beq- cr7,ffc0737c <== NOT EXECUTED ffc07280: 55 23 06 3e clrlwi r3,r9,24 <== NOT EXECUTED ffc07284: 98 61 00 08 stb r3,8(r1) <== NOT EXECUTED if (!iscntrl(c)) ffc07288: 7c 60 1a 14 add r3,r0,r3 ffc0728c: 88 03 00 01 lbz r0,1(r3) ffc07290: 70 09 00 20 andi. r9,r0,32 ffc07294: 40 82 00 10 bne- ffc072a4 <== NEVER TAKEN tty->column++; ffc07298: 81 3f 00 28 lwz r9,40(r31) ffc0729c: 38 09 00 01 addi r0,r9,1 ffc072a0: 90 1f 00 28 stw r0,40(r31) break; } } rtems_termios_puts (&c, 1, tty); ffc072a4: 38 61 00 08 addi r3,r1,8 ffc072a8: 38 80 00 01 li r4,1 ffc072ac: 7f e5 fb 78 mr r5,r31 ffc072b0: 4b ff fd b5 bl ffc07064 } ffc072b4: 80 01 00 1c lwz r0,28(r1) ffc072b8: 83 e1 00 14 lwz r31,20(r1) ffc072bc: 38 21 00 18 addi r1,r1,24 ffc072c0: 7c 08 03 a6 mtlr r0 ffc072c4: 4e 80 00 20 blr oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { ffc072c8: 2f 83 00 08 cmpwi cr7,r3,8 <== NOT EXECUTED ffc072cc: 40 9e ff 8c bne+ cr7,ffc07258 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) ffc072d0: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED ffc072d4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc072d8: 40 bd ff cc ble- cr7,ffc072a4 <== NOT EXECUTED tty->column--; ffc072dc: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc072e0: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED ffc072e4: 4b ff ff c0 b ffc072a4 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) ffc072e8: 70 09 00 20 andi. r9,r0,32 ffc072ec: 41 82 00 0c beq- ffc072f8 <== ALWAYS TAKEN tty->column = 0; ffc072f0: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc072f4: 91 24 00 28 stw r9,40(r4) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { ffc072f8: 70 09 00 04 andi. r9,r0,4 ffc072fc: 41 82 ff a8 beq+ ffc072a4 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); ffc07300: 3c 60 ff c2 lis r3,-62 ffc07304: 38 63 f3 38 addi r3,r3,-3272 ffc07308: 38 80 00 01 li r4,1 ffc0730c: 7f e5 fb 78 mr r5,r31 ffc07310: 4b ff fd 55 bl ffc07064 tty->column = 0; ffc07314: 38 00 00 00 li r0,0 ffc07318: 90 1f 00 28 stw r0,40(r31) ffc0731c: 4b ff ff 88 b ffc072a4 tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { ffc07320: 54 00 04 e8 rlwinm r0,r0,0,19,20 ffc07324: 2f 80 18 00 cmpwi cr7,r0,6144 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); ffc07328: 80 04 00 28 lwz r0,40(r4) ffc0732c: 54 04 07 7e clrlwi r4,r0,29 ffc07330: 20 84 00 08 subfic r4,r4,8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { ffc07334: 41 9e 00 50 beq- cr7,ffc07384 <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; ffc07338: 7c 80 22 14 add r4,r0,r4 <== NOT EXECUTED ffc0733c: 90 9f 00 28 stw r4,40(r31) <== NOT EXECUTED break; ffc07340: 4b ff ff 64 b ffc072a4 <== NOT EXECUTED tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) ffc07344: 70 09 00 10 andi. r9,r0,16 <== NOT EXECUTED ffc07348: 41 82 00 10 beq- ffc07358 <== NOT EXECUTED ffc0734c: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED ffc07350: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc07354: 41 be ff 60 beq- cr7,ffc072b4 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { ffc07358: 70 09 00 08 andi. r9,r0,8 <== NOT EXECUTED ffc0735c: 41 a2 ff 84 beq- ffc072e0 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) ffc07360: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) return; if (tty->termios.c_oflag & OCRNL) { c = '\n'; ffc07364: 38 00 00 0a li r0,10 <== NOT EXECUTED ffc07368: 98 01 00 08 stb r0,8(r1) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) ffc0736c: 41 a2 ff 38 beq- ffc072a4 <== NOT EXECUTED tty->column = 0; ffc07370: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc07374: 90 1f 00 28 stw r0,40(r31) <== NOT EXECUTED ffc07378: 4b ff ff 2c b ffc072a4 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); ffc0737c: 39 29 ff e0 addi r9,r9,-32 <== NOT EXECUTED ffc07380: 4b ff ff 00 b ffc07280 <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; ffc07384: 7c 00 22 14 add r0,r0,r4 ffc07388: 90 1f 00 28 stw r0,40(r31) rtems_termios_puts ( " ", i, tty); ffc0738c: 3c 60 ff c2 lis r3,-62 ffc07390: 38 63 f3 3c addi r3,r3,-3268 ffc07394: 7f e5 fb 78 mr r5,r31 ffc07398: 4b ff fc cd bl ffc07064 return; ffc0739c: 4b ff ff 18 b ffc072b4 =============================================================================== ffc10384 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc10384: 94 21 ff d8 stwu r1,-40(r1) ffc10388: 7c 08 02 a6 mflr r0 rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) ffc1038c: 38 80 01 ff li r4,511 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc10390: 93 c1 00 20 stw r30,32(r1) ffc10394: 7c 7e 1b 78 mr r30,r3 rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) ffc10398: 3c 60 ff c2 lis r3,-62 ffc1039c: 38 63 19 64 addi r3,r3,6500 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc103a0: 93 e1 00 24 stw r31,36(r1) rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; ffc103a4: 3b e0 ff ff li r31,-1 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc103a8: 90 01 00 2c stw r0,44(r1) ffc103ac: 93 a1 00 1c stw r29,28(r1) rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) ffc103b0: 48 00 1d 41 bl ffc120f0 ffc103b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc103b8: 40 9e 00 cc bne- cr7,ffc10484 <== NEVER TAKEN return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc103bc: 3d 20 00 00 lis r9,0 if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc103c0: 3d 40 ff c2 lis r10,-62 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc103c4: a0 a9 29 60 lhz r5,10592(r9) if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc103c8: 39 6a 19 6c addi r11,r10,6508 ffc103cc: 81 0a 19 6c lwz r8,6508(r10) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc103d0: 3c 80 ff c2 lis r4,-62 if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc103d4: 81 4b 00 04 lwz r10,4(r11) ffc103d8: a1 6b 00 08 lhz r11,8(r11) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc103dc: 38 05 00 01 addi r0,r5,1 ffc103e0: 38 84 19 78 addi r4,r4,6520 if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc103e4: 91 01 00 08 stw r8,8(r1) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc103e8: 38 61 00 12 addi r3,r1,18 if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc103ec: 91 41 00 0c stw r10,12(r1) ffc103f0: b1 61 00 10 sth r11,16(r1) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc103f4: b0 09 29 60 sth r0,10592(r9) ffc103f8: 4c c6 31 82 crclr 4*cr1+eq ffc103fc: 48 00 49 f9 bl ffc14df4 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { ffc10400: 38 61 00 08 addi r3,r1,8 ffc10404: 38 80 01 80 li r4,384 ffc10408: 48 00 18 f5 bl ffc11cfc ffc1040c: 2f 83 00 00 cmpwi cr7,r3,0 ffc10410: 40 9e 00 d0 bne- cr7,ffc104e0 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); ffc10414: 38 61 00 08 addi r3,r1,8 ffc10418: 38 80 40 00 li r4,16384 ffc1041c: 4c c6 31 82 crclr 4*cr1+eq ffc10420: 4b ff 72 45 bl ffc07664 if (filsdes[0] < 0) { ffc10424: 2f 83 00 00 cmpwi cr7,r3,0 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); ffc10428: 90 7e 00 00 stw r3,0(r30) if (filsdes[0] < 0) { ffc1042c: 41 9c 00 8c blt- cr7,ffc104b8 the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); ffc10430: 3d 20 00 00 lis r9,0 ffc10434: 80 09 26 dc lwz r0,9948(r9) ffc10438: 39 20 00 00 li r9,0 ffc1043c: 7f 83 00 40 cmplw cr7,r3,r0 ffc10440: 41 9c 00 64 blt- cr7,ffc104a4 <== ALWAYS TAKEN iop->flags &= ~LIBIO_FLAGS_NO_DELAY; ffc10444: 80 09 00 18 lwz r0,24(r9) filsdes[1] = open(fifopath, O_WRONLY); ffc10448: 38 61 00 08 addi r3,r1,8 ffc1044c: 38 80 00 01 li r4,1 unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; ffc10450: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc10454: 90 09 00 18 stw r0,24(r9) int pipe_create( int filsdes[2] ) { rtems_libio_t *iop; int err = 0; ffc10458: 3b a0 00 00 li r29,0 else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); ffc1045c: 4c c6 31 82 crclr 4*cr1+eq ffc10460: 4b ff 72 05 bl ffc07664 if (filsdes[1] < 0) { ffc10464: 2f 83 00 00 cmpwi cr7,r3,0 else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); ffc10468: 90 7e 00 04 stw r3,4(r30) if (filsdes[1] < 0) { ffc1046c: 41 9c 00 60 blt- cr7,ffc104cc err = errno; close(filsdes[0]); } unlink(fifopath); ffc10470: 38 61 00 08 addi r3,r1,8 ffc10474: 4b ff 99 15 bl ffc09d88 } if(err != 0) ffc10478: 2f 9d 00 00 cmpwi cr7,r29,0 rtems_set_errno_and_return_minus_one(err); return 0; ffc1047c: 3b e0 00 00 li r31,0 err = errno; close(filsdes[0]); } unlink(fifopath); } if(err != 0) ffc10480: 40 9e 00 68 bne- cr7,ffc104e8 rtems_set_errno_and_return_minus_one(err); return 0; } ffc10484: 80 01 00 2c lwz r0,44(r1) ffc10488: 7f e3 fb 78 mr r3,r31 ffc1048c: 83 a1 00 1c lwz r29,28(r1) ffc10490: 7c 08 03 a6 mtlr r0 ffc10494: 83 c1 00 20 lwz r30,32(r1) ffc10498: 83 e1 00 24 lwz r31,36(r1) ffc1049c: 38 21 00 28 addi r1,r1,40 ffc104a0: 4e 80 00 20 blr the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); ffc104a4: 3d 20 00 00 lis r9,0 ffc104a8: 81 29 27 88 lwz r9,10120(r9) ffc104ac: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc104b0: 7d 29 1a 14 add r9,r9,r3 ffc104b4: 4b ff ff 90 b ffc10444 } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; ffc104b8: 48 00 3a 69 bl ffc13f20 <__errno> ffc104bc: 83 a3 00 00 lwz r29,0(r3) /* 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); ffc104c0: 38 61 00 08 addi r3,r1,8 ffc104c4: 4b ff 98 c5 bl ffc09d88 ffc104c8: 4b ff ff b0 b ffc10478 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; ffc104cc: 48 00 3a 55 bl ffc13f20 <__errno> ffc104d0: 83 a3 00 00 lwz r29,0(r3) close(filsdes[0]); ffc104d4: 80 7e 00 00 lwz r3,0(r30) ffc104d8: 4b ff 5c 6d bl ffc06144 ffc104dc: 4b ff ff 94 b ffc10470 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){ ffc104e0: 48 00 3a 41 bl ffc13f20 <__errno> ffc104e4: 4b ff ff a0 b ffc10484 close(filsdes[0]); } unlink(fifopath); } if(err != 0) rtems_set_errno_and_return_minus_one(err); ffc104e8: 48 00 3a 39 bl ffc13f20 <__errno> ffc104ec: 3b e0 ff ff li r31,-1 ffc104f0: 93 a3 00 00 stw r29,0(r3) ffc104f4: 4b ff ff 90 b ffc10484 =============================================================================== ffc11d18 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { ffc11d18: 94 21 ff f0 stwu r1,-16(r1) ffc11d1c: 7c 08 02 a6 mflr r0 ffc11d20: 90 01 00 14 stw r0,20(r1) if (cmd == FIONREAD) { ffc11d24: 3c 00 40 04 lis r0,16388 ffc11d28: 60 00 66 7f ori r0,r0,26239 ffc11d2c: 7f 84 00 00 cmpw cr7,r4,r0 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { ffc11d30: 93 c1 00 08 stw r30,8(r1) ffc11d34: 7c be 2b 78 mr r30,r5 ffc11d38: 93 e1 00 0c stw r31,12(r1) ffc11d3c: 7c 7f 1b 78 mr r31,r3 *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; ffc11d40: 38 60 ff ea li r3,-22 uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { ffc11d44: 40 9e 00 40 bne- cr7,ffc11d84 if (buffer == NULL) ffc11d48: 2f 85 00 00 cmpwi cr7,r5,0 return -EFAULT; ffc11d4c: 38 60 ff f2 li r3,-14 void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) ffc11d50: 41 9e 00 34 beq- cr7,ffc11d84 return -EFAULT; if (! PIPE_LOCK(pipe)) ffc11d54: 80 7f 00 28 lwz r3,40(r31) ffc11d58: 38 80 00 00 li r4,0 ffc11d5c: 38 a0 00 00 li r5,0 ffc11d60: 4b ff 99 b5 bl ffc0b714 ffc11d64: 2f 83 00 00 cmpwi cr7,r3,0 return -EINTR; ffc11d68: 38 60 ff fc li r3,-4 { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) ffc11d6c: 40 9e 00 18 bne- cr7,ffc11d84 <== NEVER TAKEN return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; ffc11d70: 80 1f 00 0c lwz r0,12(r31) PIPE_UNLOCK(pipe); ffc11d74: 80 7f 00 28 lwz r3,40(r31) if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; ffc11d78: 90 1e 00 00 stw r0,0(r30) PIPE_UNLOCK(pipe); ffc11d7c: 4b ff 9b 25 bl ffc0b8a0 return 0; ffc11d80: 38 60 00 00 li r3,0 } return -EINVAL; } ffc11d84: 80 01 00 14 lwz r0,20(r1) ffc11d88: 83 c1 00 08 lwz r30,8(r1) ffc11d8c: 7c 08 03 a6 mtlr r0 ffc11d90: 83 e1 00 0c lwz r31,12(r1) ffc11d94: 38 21 00 10 addi r1,r1,16 ffc11d98: 4e 80 00 20 blr =============================================================================== ffc1189c : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc1189c: 94 21 ff c8 stwu r1,-56(r1) ffc118a0: 7c 08 02 a6 mflr r0 ffc118a4: 90 01 00 3c stw r0,60(r1) ffc118a8: 93 e1 00 34 stw r31,52(r1) ffc118ac: 7c 7f 1b 78 mr r31,r3 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc118b0: 80 63 00 28 lwz r3,40(r3) pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc118b4: 93 a1 00 2c stw r29,44(r1) ffc118b8: 7c 9d 23 78 mr r29,r4 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc118bc: 38 80 00 00 li r4,0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc118c0: 93 c1 00 30 stw r30,48(r1) ffc118c4: 7c be 2b 78 mr r30,r5 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc118c8: 38 a0 00 00 li r5,0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc118cc: 93 41 00 20 stw r26,32(r1) int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; ffc118d0: 3b 40 ff fc li r26,-4 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc118d4: 93 61 00 24 stw r27,36(r1) ffc118d8: 7c db 33 78 mr r27,r6 ffc118dc: 93 01 00 18 stw r24,24(r1) ffc118e0: 93 21 00 1c stw r25,28(r1) ffc118e4: 93 81 00 28 stw r28,40(r1) int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc118e8: 4b ff 9e 2d bl ffc0b714 ffc118ec: 2f 83 00 00 cmpwi cr7,r3,0 ffc118f0: 40 9e 00 a8 bne- cr7,ffc11998 <== NEVER TAKEN return -EINTR; while (read < count) { ffc118f4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc118f8: 3b 20 00 00 li r25,0 ffc118fc: 3b 40 00 00 li r26,0 ffc11900: 41 9e 01 68 beq- cr7,ffc11a68 <== NEVER TAKEN while (PIPE_EMPTY(pipe)) { ffc11904: 83 9f 00 0c lwz r28,12(r31) ffc11908: 2f 9c 00 00 cmpwi cr7,r28,0 ffc1190c: 40 9e 00 c0 bne- cr7,ffc119cc /* Not an error */ if (pipe->Writers == 0) ffc11910: 80 1f 00 14 lwz r0,20(r31) ffc11914: 2f 80 00 00 cmpwi cr7,r0,0 ffc11918: 41 9e 01 50 beq- cr7,ffc11a68 goto out_locked; if (LIBIO_NODELAY(iop)) { ffc1191c: 80 1b 00 18 lwz r0,24(r27) ffc11920: 70 09 00 01 andi. r9,r0,1 ffc11924: 40 82 01 4c bne- ffc11a70 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; ffc11928: 81 3f 00 18 lwz r9,24(r31) PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; ffc1192c: 3b 80 ff fc li r28,-4 goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); ffc11930: 80 7f 00 28 lwz r3,40(r31) ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; ffc11934: 38 09 00 01 addi r0,r9,1 ffc11938: 90 1f 00 18 stw r0,24(r31) PIPE_UNLOCK(pipe); ffc1193c: 4b ff 9f 65 bl ffc0b8a0 if (! PIPE_READWAIT(pipe)) ffc11940: 80 7f 00 2c lwz r3,44(r31) ffc11944: 38 80 00 00 li r4,0 ffc11948: 48 00 14 49 bl ffc12d90 ffc1194c: 2f 83 00 00 cmpwi cr7,r3,0 ffc11950: 40 9e 00 08 bne- cr7,ffc11958 <== NEVER TAKEN ffc11954: 3b 80 00 00 li r28,0 ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc11958: 80 7f 00 28 lwz r3,40(r31) ffc1195c: 38 80 00 00 li r4,0 ffc11960: 38 a0 00 00 li r5,0 ffc11964: 4b ff 9d b1 bl ffc0b714 ffc11968: 2f 83 00 00 cmpwi cr7,r3,0 ffc1196c: 40 9e 01 0c bne- cr7,ffc11a78 <== NEVER TAKEN /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) ffc11970: 2f 9c 00 00 cmpwi cr7,r28,0 if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; ffc11974: 81 3f 00 18 lwz r9,24(r31) ffc11978: 38 09 ff ff addi r0,r9,-1 ffc1197c: 90 1f 00 18 stw r0,24(r31) if (ret != 0) ffc11980: 41 9e ff 84 beq+ cr7,ffc11904 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); ffc11984: 80 7f 00 28 lwz r3,40(r31) ffc11988: 4b ff 9f 19 bl ffc0b8a0 out_nolock: if (read > 0) ffc1198c: 2f 9a 00 00 cmpwi cr7,r26,0 ffc11990: 41 bd 00 08 bgt+ cr7,ffc11998 return read; return ret; ffc11994: 7f 9a e3 78 mr r26,r28 } ffc11998: 80 01 00 3c lwz r0,60(r1) ffc1199c: 7f 43 d3 78 mr r3,r26 ffc119a0: 83 01 00 18 lwz r24,24(r1) ffc119a4: 7c 08 03 a6 mtlr r0 ffc119a8: 83 21 00 1c lwz r25,28(r1) ffc119ac: 83 41 00 20 lwz r26,32(r1) ffc119b0: 83 61 00 24 lwz r27,36(r1) ffc119b4: 83 81 00 28 lwz r28,40(r1) ffc119b8: 83 a1 00 2c lwz r29,44(r1) ffc119bc: 83 c1 00 30 lwz r30,48(r1) ffc119c0: 83 e1 00 34 lwz r31,52(r1) ffc119c4: 38 21 00 38 addi r1,r1,56 ffc119c8: 4e 80 00 20 blr if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); ffc119cc: 7c 19 f0 50 subf r0,r25,r30 ffc119d0: 7f 9c 00 40 cmplw cr7,r28,r0 ffc119d4: 40 9d 00 08 ble- cr7,ffc119dc ffc119d8: 7c 1c 03 78 mr r28,r0 chunk1 = pipe->Size - pipe->Start; ffc119dc: 80 1f 00 08 lwz r0,8(r31) ffc119e0: 83 1f 00 04 lwz r24,4(r31) if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); ffc119e4: 80 9f 00 00 lwz r4,0(r31) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; ffc119e8: 7f 00 c0 50 subf r24,r0,r24 if (chunk > chunk1) { ffc119ec: 7f 9c c0 00 cmpw cr7,r28,r24 ffc119f0: 40 9d 00 90 ble- cr7,ffc11a80 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); ffc119f4: 7f 05 c3 78 mr r5,r24 ffc119f8: 7c 84 02 14 add r4,r4,r0 ffc119fc: 7c 7d ca 14 add r3,r29,r25 ffc11a00: 48 00 42 91 bl ffc15c90 memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); ffc11a04: 7c 79 c2 14 add r3,r25,r24 ffc11a08: 80 9f 00 00 lwz r4,0(r31) ffc11a0c: 7c 7d 1a 14 add r3,r29,r3 ffc11a10: 7c b8 e0 50 subf r5,r24,r28 ffc11a14: 48 00 42 7d bl ffc15c90 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; ffc11a18: 81 3f 00 08 lwz r9,8(r31) pipe->Start %= pipe->Size; ffc11a1c: 81 7f 00 04 lwz r11,4(r31) memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; ffc11a20: 7d 3c 4a 14 add r9,r28,r9 pipe->Start %= pipe->Size; pipe->Length -= chunk; ffc11a24: 80 1f 00 0c lwz r0,12(r31) } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; ffc11a28: 7d 49 5b 96 divwu r10,r9,r11 pipe->Length -= chunk; ffc11a2c: 7c 1c 00 50 subf r0,r28,r0 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) ffc11a30: 2f 80 00 00 cmpwi cr7,r0,0 else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; pipe->Length -= chunk; ffc11a34: 90 1f 00 0c stw r0,12(r31) } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; ffc11a38: 7d 6a 59 d6 mullw r11,r10,r11 ffc11a3c: 7d 2b 48 50 subf r9,r11,r9 ffc11a40: 91 3f 00 08 stw r9,8(r31) pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) ffc11a44: 40 9e 00 08 bne- cr7,ffc11a4c pipe->Start = 0; ffc11a48: 90 1f 00 08 stw r0,8(r31) if (pipe->waitingWriters > 0) ffc11a4c: 80 1f 00 1c lwz r0,28(r31) ffc11a50: 2f 80 00 00 cmpwi cr7,r0,0 ffc11a54: 40 9e 00 40 bne- cr7,ffc11a94 PIPE_WAKEUPWRITERS(pipe); read += chunk; ffc11a58: 7f 5a e2 14 add r26,r26,r28 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { ffc11a5c: 7f 9a f0 40 cmplw cr7,r26,r30 ffc11a60: 7f 59 d3 78 mr r25,r26 ffc11a64: 41 9c fe a0 blt+ cr7,ffc11904 <== NEVER TAKEN while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) ffc11a68: 3b 80 00 00 li r28,0 ffc11a6c: 4b ff ff 18 b ffc11984 goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; ffc11a70: 3b 80 ff f5 li r28,-11 ffc11a74: 4b ff ff 10 b ffc11984 PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; ffc11a78: 3b 80 ff fc li r28,-4 <== NOT EXECUTED ffc11a7c: 4b ff ff 10 b ffc1198c <== NOT EXECUTED 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); ffc11a80: 7c 7d ca 14 add r3,r29,r25 ffc11a84: 7c 84 02 14 add r4,r4,r0 ffc11a88: 7f 85 e3 78 mr r5,r28 ffc11a8c: 48 00 42 05 bl ffc15c90 ffc11a90: 4b ff ff 88 b ffc11a18 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); ffc11a94: 80 7f 00 30 lwz r3,48(r31) ffc11a98: 38 81 00 08 addi r4,r1,8 ffc11a9c: 48 00 12 61 bl ffc12cfc ffc11aa0: 4b ff ff b8 b ffc11a58 =============================================================================== ffc112f8 : */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc112f8: 94 21 ff d8 stwu r1,-40(r1) ffc112fc: 7c 08 02 a6 mflr r0 ffc11300: 90 01 00 2c stw r0,44(r1) /* WARN pipe not released! */ if (!PIPE_LOCK(pipe)) rtems_fatal_error_occurred(0xdeadbeef); #endif mode = LIBIO_ACCMODE(iop); ffc11304: 80 04 00 18 lwz r0,24(r4) */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11308: 93 a1 00 1c stw r29,28(r1) ffc1130c: 7c 7d 1b 78 mr r29,r3 if (!PIPE_LOCK(pipe)) rtems_fatal_error_occurred(0xdeadbeef); #endif mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) ffc11310: 70 09 00 02 andi. r9,r0,2 */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11314: 93 c1 00 20 stw r30,32(r1) /* WARN pipe not released! */ if (!PIPE_LOCK(pipe)) rtems_fatal_error_occurred(0xdeadbeef); #endif mode = LIBIO_ACCMODE(iop); ffc11318: 54 1e 07 7c rlwinm r30,r0,0,29,30 */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc1131c: 93 e1 00 24 stw r31,36(r1) ffc11320: 93 81 00 18 stw r28,24(r1) pipe_control_t *pipe = *pipep; ffc11324: 83 e3 00 00 lwz r31,0(r3) if (!PIPE_LOCK(pipe)) rtems_fatal_error_occurred(0xdeadbeef); #endif mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) ffc11328: 41 82 00 10 beq- ffc11338 pipe->Readers --; ffc1132c: 81 3f 00 10 lwz r9,16(r31) ffc11330: 38 09 ff ff addi r0,r9,-1 ffc11334: 90 1f 00 10 stw r0,16(r31) if (mode & LIBIO_FLAGS_WRITE) ffc11338: 73 c0 00 04 andi. r0,r30,4 ffc1133c: 41 82 00 10 beq- ffc1134c pipe->Writers --; ffc11340: 81 3f 00 14 lwz r9,20(r31) ffc11344: 38 09 ff ff addi r0,r9,-1 ffc11348: 90 1f 00 14 stw r0,20(r31) PIPE_UNLOCK(pipe); ffc1134c: 80 7f 00 28 lwz r3,40(r31) ffc11350: 4b ff a5 51 bl ffc0b8a0 if (pipe->Readers == 0 && pipe->Writers == 0) { ffc11354: 80 1f 00 10 lwz r0,16(r31) ffc11358: 2f 80 00 00 cmpwi cr7,r0,0 ffc1135c: 41 9e 00 50 beq- cr7,ffc113ac *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) ffc11360: 80 1f 00 14 lwz r0,20(r31) ffc11364: 2f 80 00 00 cmpwi cr7,r0,0 ffc11368: 40 9e 00 18 bne- cr7,ffc11380 <== NEVER TAKEN ffc1136c: 2f 9e 00 02 cmpwi cr7,r30,2 ffc11370: 41 9e 00 10 beq- cr7,ffc11380 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); ffc11374: 80 7f 00 2c lwz r3,44(r31) ffc11378: 38 81 00 08 addi r4,r1,8 ffc1137c: 48 00 19 81 bl ffc12cfc static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); ffc11380: 3d 20 00 00 lis r9,0 ffc11384: 80 69 29 60 lwz r3,10592(r9) ffc11388: 4b ff a5 19 bl ffc0b8a0 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } ffc1138c: 80 01 00 2c lwz r0,44(r1) ffc11390: 83 81 00 18 lwz r28,24(r1) ffc11394: 7c 08 03 a6 mtlr r0 ffc11398: 83 a1 00 1c lwz r29,28(r1) ffc1139c: 83 c1 00 20 lwz r30,32(r1) ffc113a0: 83 e1 00 24 lwz r31,36(r1) ffc113a4: 38 21 00 28 addi r1,r1,40 ffc113a8: 4e 80 00 20 blr if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { ffc113ac: 83 9f 00 14 lwz r28,20(r31) ffc113b0: 2f 9c 00 00 cmpwi cr7,r28,0 ffc113b4: 41 9e 00 44 beq- cr7,ffc113f8 delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) ffc113b8: 2f 9e 00 04 cmpwi cr7,r30,4 ffc113bc: 41 9e ff c4 beq+ cr7,ffc11380 <== NEVER TAKEN /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); ffc113c0: 80 7f 00 30 lwz r3,48(r31) ffc113c4: 38 81 00 08 addi r4,r1,8 ffc113c8: 48 00 19 35 bl ffc12cfc static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); ffc113cc: 3d 20 00 00 lis r9,0 ffc113d0: 80 69 29 60 lwz r3,10592(r9) ffc113d4: 4b ff a4 cd bl ffc0b8a0 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } ffc113d8: 80 01 00 2c lwz r0,44(r1) ffc113dc: 83 81 00 18 lwz r28,24(r1) ffc113e0: 7c 08 03 a6 mtlr r0 ffc113e4: 83 a1 00 1c lwz r29,28(r1) ffc113e8: 83 c1 00 20 lwz r30,32(r1) ffc113ec: 83 e1 00 24 lwz r31,36(r1) ffc113f0: 38 21 00 28 addi r1,r1,40 ffc113f4: 4e 80 00 20 blr /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); ffc113f8: 80 7f 00 2c lwz r3,44(r31) ffc113fc: 48 00 18 35 bl ffc12c30 rtems_barrier_delete(pipe->writeBarrier); ffc11400: 80 7f 00 30 lwz r3,48(r31) ffc11404: 48 00 18 2d bl ffc12c30 rtems_semaphore_delete(pipe->Semaphore); ffc11408: 80 7f 00 28 lwz r3,40(r31) ffc1140c: 4b ff a2 2d bl ffc0b638 free(pipe->Buffer); ffc11410: 80 7f 00 00 lwz r3,0(r31) ffc11414: 4b ff 5a 71 bl ffc06e84 free(pipe); ffc11418: 7f e3 fb 78 mr r3,r31 ffc1141c: 4b ff 5a 69 bl ffc06e84 static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); ffc11420: 3d 20 00 00 lis r9,0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; ffc11424: 93 9d 00 00 stw r28,0(r29) static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); ffc11428: 80 69 29 60 lwz r3,10592(r9) ffc1142c: 4b ff a4 75 bl ffc0b8a0 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } ffc11430: 80 01 00 2c lwz r0,44(r1) ffc11434: 83 81 00 18 lwz r28,24(r1) ffc11438: 7c 08 03 a6 mtlr r0 ffc1143c: 83 a1 00 1c lwz r29,28(r1) ffc11440: 83 c1 00 20 lwz r30,32(r1) ffc11444: 83 e1 00 24 lwz r31,36(r1) ffc11448: 38 21 00 28 addi r1,r1,40 ffc1144c: 4e 80 00 20 blr =============================================================================== ffc11aa4 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc11aa4: 94 21 ff c8 stwu r1,-56(r1) ffc11aa8: 7c 08 02 a6 mflr r0 ffc11aac: 93 c1 00 30 stw r30,48(r1) int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) ffc11ab0: 7c be 2b 79 mr. r30,r5 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc11ab4: 93 41 00 20 stw r26,32(r1) ffc11ab8: 7c da 33 78 mr r26,r6 ffc11abc: 93 61 00 24 stw r27,36(r1) int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; ffc11ac0: 3b 60 00 00 li r27,0 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc11ac4: 93 a1 00 2c stw r29,44(r1) ffc11ac8: 7c 9d 23 78 mr r29,r4 ffc11acc: 93 e1 00 34 stw r31,52(r1) ffc11ad0: 7c 7f 1b 78 mr r31,r3 ffc11ad4: 90 01 00 3c stw r0,60(r1) ffc11ad8: 93 01 00 18 stw r24,24(r1) ffc11adc: 93 21 00 1c stw r25,28(r1) ffc11ae0: 93 81 00 28 stw r28,40(r1) int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) ffc11ae4: 40 82 00 38 bne- ffc11b1c <== ALWAYS TAKEN #endif if (written > 0) return written; return ret; } ffc11ae8: 80 01 00 3c lwz r0,60(r1) ffc11aec: 7f 63 db 78 mr r3,r27 ffc11af0: 83 01 00 18 lwz r24,24(r1) ffc11af4: 7c 08 03 a6 mtlr r0 ffc11af8: 83 21 00 1c lwz r25,28(r1) ffc11afc: 83 41 00 20 lwz r26,32(r1) ffc11b00: 83 61 00 24 lwz r27,36(r1) ffc11b04: 83 81 00 28 lwz r28,40(r1) ffc11b08: 83 a1 00 2c lwz r29,44(r1) ffc11b0c: 83 c1 00 30 lwz r30,48(r1) ffc11b10: 83 e1 00 34 lwz r31,52(r1) ffc11b14: 38 21 00 38 addi r1,r1,56 ffc11b18: 4e 80 00 20 blr /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) ffc11b1c: 80 63 00 28 lwz r3,40(r3) ffc11b20: 38 80 00 00 li r4,0 ffc11b24: 38 a0 00 00 li r5,0 ffc11b28: 4b ff 9b ed bl ffc0b714 return -EINTR; ffc11b2c: 3b 60 ff fc li r27,-4 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) ffc11b30: 2f 83 00 00 cmpwi cr7,r3,0 ffc11b34: 40 be ff b4 bne- cr7,ffc11ae8 <== NEVER TAKEN return -EINTR; if (pipe->Readers == 0) { ffc11b38: 80 1f 00 10 lwz r0,16(r31) ffc11b3c: 2f 80 00 00 cmpwi cr7,r0,0 ffc11b40: 41 9e 01 9c beq- cr7,ffc11cdc ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; ffc11b44: 81 3f 00 04 lwz r9,4(r31) ffc11b48: 3b 20 00 01 li r25,1 ffc11b4c: 7f 9e 48 40 cmplw cr7,r30,r9 ffc11b50: 40 9d 01 7c ble- cr7,ffc11ccc <== ALWAYS TAKEN ffc11b54: 3b 00 00 00 li r24,0 ffc11b58: 3b 60 00 00 li r27,0 while (written < count) { while (PIPE_SPACE(pipe) < chunk) { ffc11b5c: 80 1f 00 0c lwz r0,12(r31) ffc11b60: 7f 80 48 50 subf r28,r0,r9 ffc11b64: 7f 9c c8 40 cmplw cr7,r28,r25 ffc11b68: 40 9c 00 8c bge- cr7,ffc11bf4 if (LIBIO_NODELAY(iop)) { ffc11b6c: 80 1a 00 18 lwz r0,24(r26) ffc11b70: 70 09 00 01 andi. r9,r0,1 ffc11b74: 40 82 01 74 bne- ffc11ce8 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; ffc11b78: 81 3f 00 1c lwz r9,28(r31) PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; ffc11b7c: 3b 80 ff fc li r28,-4 goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); ffc11b80: 80 7f 00 28 lwz r3,40(r31) ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; ffc11b84: 38 09 00 01 addi r0,r9,1 ffc11b88: 90 1f 00 1c stw r0,28(r31) PIPE_UNLOCK(pipe); ffc11b8c: 4b ff 9d 15 bl ffc0b8a0 if (! PIPE_WRITEWAIT(pipe)) ffc11b90: 80 7f 00 30 lwz r3,48(r31) ffc11b94: 38 80 00 00 li r4,0 ffc11b98: 48 00 11 f9 bl ffc12d90 ffc11b9c: 2f 83 00 00 cmpwi cr7,r3,0 ffc11ba0: 40 9e 00 08 bne- cr7,ffc11ba8 <== NEVER TAKEN ffc11ba4: 3b 80 00 00 li r28,0 ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc11ba8: 80 7f 00 28 lwz r3,40(r31) ffc11bac: 38 80 00 00 li r4,0 ffc11bb0: 38 a0 00 00 li r5,0 ffc11bb4: 4b ff 9b 61 bl ffc0b714 ffc11bb8: 2f 83 00 00 cmpwi cr7,r3,0 ffc11bbc: 40 9e 01 34 bne- cr7,ffc11cf0 <== NEVER TAKEN /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; if (ret != 0) ffc11bc0: 2f 9c 00 00 cmpwi cr7,r28,0 if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; ffc11bc4: 81 3f 00 1c lwz r9,28(r31) ffc11bc8: 38 09 ff ff addi r0,r9,-1 ffc11bcc: 90 1f 00 1c stw r0,28(r31) if (ret != 0) ffc11bd0: 40 9e 00 b4 bne- cr7,ffc11c84 <== NEVER TAKEN goto out_locked; if (pipe->Readers == 0) { ffc11bd4: 80 1f 00 10 lwz r0,16(r31) ffc11bd8: 2f 80 00 00 cmpwi cr7,r0,0 ffc11bdc: 41 9e 00 f8 beq- cr7,ffc11cd4 <== NEVER TAKEN ffc11be0: 81 3f 00 04 lwz r9,4(r31) /* 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) { ffc11be4: 80 1f 00 0c lwz r0,12(r31) ffc11be8: 7f 80 48 50 subf r28,r0,r9 ffc11bec: 7f 9c c8 40 cmplw cr7,r28,r25 ffc11bf0: 41 9c ff 7c blt+ cr7,ffc11b6c <== NEVER TAKEN ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); ffc11bf4: 7d 78 f0 50 subf r11,r24,r30 ffc11bf8: 7f 9c 58 40 cmplw cr7,r28,r11 ffc11bfc: 40 9d 00 08 ble- cr7,ffc11c04 ffc11c00: 7d 7c 5b 78 mr r28,r11 chunk1 = pipe->Size - PIPE_WSTART(pipe); ffc11c04: 81 7f 00 08 lwz r11,8(r31) if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); ffc11c08: 7c 9d c2 14 add r4,r29,r24 ffc11c0c: 80 7f 00 00 lwz r3,0(r31) goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); ffc11c10: 7c 00 5a 14 add r0,r0,r11 ffc11c14: 7d 60 4b 96 divwu r11,r0,r9 ffc11c18: 7d 6b 49 d6 mullw r11,r11,r9 ffc11c1c: 7c 0b 00 50 subf r0,r11,r0 ffc11c20: 7f 20 48 50 subf r25,r0,r9 if (chunk > chunk1) { ffc11c24: 7f 9c c8 00 cmpw cr7,r28,r25 ffc11c28: 40 9d 00 d0 ble- cr7,ffc11cf8 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); ffc11c2c: 7f 25 cb 78 mr r5,r25 ffc11c30: 7c 63 02 14 add r3,r3,r0 ffc11c34: 48 00 40 5d bl ffc15c90 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); ffc11c38: 7c 99 c2 14 add r4,r25,r24 ffc11c3c: 80 7f 00 00 lwz r3,0(r31) ffc11c40: 7c 9d 22 14 add r4,r29,r4 ffc11c44: 7c b9 e0 50 subf r5,r25,r28 ffc11c48: 48 00 40 49 bl ffc15c90 } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) ffc11c4c: 81 3f 00 18 lwz r9,24(r31) memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; ffc11c50: 80 1f 00 0c lwz r0,12(r31) if (pipe->waitingReaders > 0) ffc11c54: 2f 89 00 00 cmpwi cr7,r9,0 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; ffc11c58: 7c 00 e2 14 add r0,r0,r28 ffc11c5c: 90 1f 00 0c stw r0,12(r31) if (pipe->waitingReaders > 0) ffc11c60: 40 9e 00 a8 bne- cr7,ffc11d08 PIPE_WAKEUPREADERS(pipe); written += chunk; ffc11c64: 7f 7b e2 14 add r27,r27,r28 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { ffc11c68: 7f 9e d8 40 cmplw cr7,r30,r27 ffc11c6c: 7f 78 db 78 mr r24,r27 ffc11c70: 40 9d 00 10 ble- cr7,ffc11c80 <== ALWAYS TAKEN ffc11c74: 81 3f 00 04 lwz r9,4(r31) <== 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; ffc11c78: 3b 20 00 01 li r25,1 <== NOT EXECUTED ffc11c7c: 4b ff fe e0 b ffc11b5c <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { ffc11c80: 3b 80 00 00 li r28,0 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); ffc11c84: 80 7f 00 28 lwz r3,40(r31) ffc11c88: 4b ff 9c 19 bl ffc0b8a0 /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) ffc11c8c: 2f 9b 00 00 cmpwi cr7,r27,0 ffc11c90: 41 9d fe 58 bgt+ cr7,ffc11ae8 return written; return ret; } ffc11c94: 80 01 00 3c lwz r0,60(r1) kill(getpid(), SIGPIPE); #endif if (written > 0) return written; return ret; ffc11c98: 7f 9b e3 78 mr r27,r28 } ffc11c9c: 7f 63 db 78 mr r3,r27 ffc11ca0: 83 01 00 18 lwz r24,24(r1) ffc11ca4: 7c 08 03 a6 mtlr r0 ffc11ca8: 83 21 00 1c lwz r25,28(r1) ffc11cac: 83 41 00 20 lwz r26,32(r1) ffc11cb0: 83 61 00 24 lwz r27,36(r1) ffc11cb4: 83 81 00 28 lwz r28,40(r1) ffc11cb8: 83 a1 00 2c lwz r29,44(r1) ffc11cbc: 83 c1 00 30 lwz r30,48(r1) ffc11cc0: 83 e1 00 34 lwz r31,52(r1) ffc11cc4: 38 21 00 38 addi r1,r1,56 ffc11cc8: 4e 80 00 20 blr ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; ffc11ccc: 7f d9 f3 78 mr r25,r30 ffc11cd0: 4b ff fe 84 b ffc11b54 pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; ffc11cd4: 3b 80 ff e0 li r28,-32 <== NOT EXECUTED ffc11cd8: 4b ff ff ac b ffc11c84 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; if (pipe->Readers == 0) { ret = -EPIPE; ffc11cdc: 3b 80 ff e0 li r28,-32 const void *buffer, size_t count, rtems_libio_t *iop ) { int chunk, chunk1, written = 0, ret = 0; ffc11ce0: 3b 60 00 00 li r27,0 ffc11ce4: 4b ff ff a0 b ffc11c84 chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; ffc11ce8: 3b 80 ff f5 li r28,-11 ffc11cec: 4b ff ff 98 b ffc11c84 PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; ffc11cf0: 3b 80 ff fc li r28,-4 <== NOT EXECUTED ffc11cf4: 4b ff ff 98 b ffc11c8c <== NOT EXECUTED 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); ffc11cf8: 7c 63 02 14 add r3,r3,r0 ffc11cfc: 7f 85 e3 78 mr r5,r28 ffc11d00: 48 00 3f 91 bl ffc15c90 ffc11d04: 4b ff ff 48 b ffc11c4c pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); ffc11d08: 80 7f 00 2c lwz r3,44(r31) ffc11d0c: 38 81 00 08 addi r4,r1,8 ffc11d10: 48 00 0f ed bl ffc12cfc ffc11d14: 4b ff ff 50 b ffc11c64 =============================================================================== ffc098c8 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { ffc098c8: 7c 08 02 a6 mflr r0 ffc098cc: 94 21 ff f8 stwu r1,-8(r1) /* * Update call statistics */ MSBUMP(memalign_calls, 1); ffc098d0: 3d 60 00 00 lis r11,0 ffc098d4: 39 6b 33 d0 addi r11,r11,13264 int posix_memalign( void **pointer, size_t alignment, size_t size ) { ffc098d8: 90 01 00 0c stw r0,12(r1) /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) ffc098dc: 38 04 ff ff addi r0,r4,-1 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); ffc098e0: 81 4b 00 08 lwz r10,8(r11) if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) ffc098e4: 7c 08 20 39 and. r8,r0,r4 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); ffc098e8: 38 0a 00 01 addi r0,r10,1 ffc098ec: 90 0b 00 08 stw r0,8(r11) if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) return EINVAL; ffc098f0: 38 00 00 16 li r0,22 /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) ffc098f4: 41 82 00 18 beq- ffc0990c <== ALWAYS TAKEN /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } ffc098f8: 7c 03 03 78 mr r3,r0 ffc098fc: 80 01 00 0c lwz r0,12(r1) ffc09900: 38 21 00 08 addi r1,r1,8 ffc09904: 7c 08 03 a6 mtlr r0 ffc09908: 4e 80 00 20 blr /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) ffc0990c: 2b 84 00 03 cmplwi cr7,r4,3 ffc09910: 40 9d ff e8 ble+ cr7,ffc098f8 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); ffc09914: 48 00 03 75 bl ffc09c88 ffc09918: 7c 60 1b 78 mr r0,r3 ffc0991c: 4b ff ff dc b ffc098f8 =============================================================================== ffc06310 : * printk * * Kernel printf function requiring minimal infrastructure. */ void printk(const char *fmt, ...) { ffc06310: 94 21 ff 88 stwu r1,-120(r1) ffc06314: 7c 08 02 a6 mflr r0 ffc06318: 90 81 00 1c stw r4,28(r1) ffc0631c: 90 01 00 7c stw r0,124(r1) ffc06320: 90 a1 00 20 stw r5,32(r1) ffc06324: 90 c1 00 24 stw r6,36(r1) ffc06328: 90 e1 00 28 stw r7,40(r1) ffc0632c: 91 01 00 2c stw r8,44(r1) ffc06330: 91 21 00 30 stw r9,48(r1) ffc06334: 91 41 00 34 stw r10,52(r1) ffc06338: 40 86 00 24 bne- cr1,ffc0635c <== ALWAYS TAKEN ffc0633c: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED ffc06340: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED ffc06344: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED ffc06348: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED ffc0634c: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED ffc06350: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED ffc06354: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED ffc06358: d9 01 00 70 stfd f8,112(r1) <== NOT EXECUTED va_list ap; /* points to each unnamed argument in turn */ va_start(ap, fmt); /* make ap point to 1st unnamed arg */ ffc0635c: 38 00 00 01 li r0,1 ffc06360: 98 01 00 08 stb r0,8(r1) ffc06364: 38 00 00 00 li r0,0 vprintk(fmt, ap); ffc06368: 38 81 00 08 addi r4,r1,8 */ void printk(const char *fmt, ...) { va_list ap; /* points to each unnamed argument in turn */ va_start(ap, fmt); /* make ap point to 1st unnamed arg */ ffc0636c: 98 01 00 09 stb r0,9(r1) ffc06370: 38 01 00 80 addi r0,r1,128 ffc06374: 90 01 00 0c stw r0,12(r1) ffc06378: 38 01 00 18 addi r0,r1,24 ffc0637c: 90 01 00 10 stw r0,16(r1) vprintk(fmt, ap); ffc06380: 48 00 23 1d bl ffc0869c va_end(ap); /* clean up when done */ } ffc06384: 80 01 00 7c lwz r0,124(r1) ffc06388: 38 21 00 78 addi r1,r1,120 ffc0638c: 7c 08 03 a6 mtlr r0 ffc06390: 4e 80 00 20 blr =============================================================================== ffc075d0 : int printk_plugin( void *ignored __attribute__((unused)), const char *format, ... ) { ffc075d0: 94 21 ff 90 stwu r1,-112(r1) ffc075d4: 7c 08 02 a6 mflr r0 ffc075d8: 90 a1 00 18 stw r5,24(r1) ffc075dc: 90 01 00 74 stw r0,116(r1) ffc075e0: 90 c1 00 1c stw r6,28(r1) ffc075e4: 90 e1 00 20 stw r7,32(r1) ffc075e8: 91 01 00 24 stw r8,36(r1) ffc075ec: 91 21 00 28 stw r9,40(r1) ffc075f0: 91 41 00 2c stw r10,44(r1) ffc075f4: 40 86 00 24 bne- cr1,ffc07618 <== ALWAYS TAKEN ffc075f8: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc075fc: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc07600: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc07604: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc07608: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0760c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc07610: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc07614: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list arg_pointer; va_start (arg_pointer, format); ffc07618: 38 00 00 02 li r0,2 ffc0761c: 98 01 00 08 stb r0,8(r1) ffc07620: 38 00 00 00 li r0,0 vprintk( format, arg_pointer ); ffc07624: 7c 83 23 78 mr r3,r4 ... ) { va_list arg_pointer; va_start (arg_pointer, format); ffc07628: 98 01 00 09 stb r0,9(r1) ffc0762c: 38 01 00 78 addi r0,r1,120 vprintk( format, arg_pointer ); ffc07630: 38 81 00 08 addi r4,r1,8 ... ) { va_list arg_pointer; va_start (arg_pointer, format); ffc07634: 90 01 00 0c stw r0,12(r1) ffc07638: 38 01 00 10 addi r0,r1,16 ffc0763c: 90 01 00 10 stw r0,16(r1) vprintk( format, arg_pointer ); ffc07640: 48 00 23 21 bl ffc09960 va_end(arg_pointer); /* clean up when done */ return 0; } ffc07644: 38 60 00 00 li r3,0 ffc07648: 80 01 00 74 lwz r0,116(r1) ffc0764c: 38 21 00 70 addi r1,r1,112 ffc07650: 7c 08 03 a6 mtlr r0 ffc07654: 4e 80 00 20 blr =============================================================================== ffc1d874 : ssize_t read( int fd, void *buffer, size_t count ) { ffc1d874: 94 21 ff f0 stwu r1,-16(r1) ffc1d878: 7c 08 02 a6 mflr r0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc1d87c: 3d 20 00 00 lis r9,0 ssize_t read( int fd, void *buffer, size_t count ) { ffc1d880: 90 01 00 14 stw r0,20(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc1d884: 80 09 26 fc lwz r0,9980(r9) ssize_t read( int fd, void *buffer, size_t count ) { ffc1d888: 93 e1 00 0c stw r31,12(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc1d88c: 7f 83 00 40 cmplw cr7,r3,r0 ffc1d890: 40 9c 00 8c bge- cr7,ffc1d91c <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc1d894: 3d 60 00 00 lis r11,0 ffc1d898: 83 eb 27 ac lwz r31,10156(r11) ffc1d89c: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc1d8a0: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open( iop ); ffc1d8a4: 81 7f 00 18 lwz r11,24(r31) ffc1d8a8: 71 6a 01 00 andi. r10,r11,256 ffc1d8ac: 41 82 00 70 beq- ffc1d91c rtems_libio_check_buffer( buffer ); ffc1d8b0: 2f 84 00 00 cmpwi cr7,r4,0 ffc1d8b4: 41 9e 00 7c beq- cr7,ffc1d930 <== NEVER TAKEN rtems_libio_check_count( count ); ffc1d8b8: 2f 85 00 00 cmpwi cr7,r5,0 ffc1d8bc: 38 60 00 00 li r3,0 ffc1d8c0: 41 9e 00 48 beq- cr7,ffc1d908 rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF ); ffc1d8c4: 71 60 00 02 andi. r0,r11,2 ffc1d8c8: 41 82 00 54 beq- ffc1d91c /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); ffc1d8cc: 81 3f 00 24 lwz r9,36(r31) ffc1d8d0: 7f e3 fb 78 mr r3,r31 ffc1d8d4: 80 09 00 08 lwz r0,8(r9) ffc1d8d8: 7c 09 03 a6 mtctr r0 ffc1d8dc: 4e 80 04 21 bctrl if ( rc > 0 ) ffc1d8e0: 2c 03 00 00 cmpwi r3,0 ffc1d8e4: 40 81 00 24 ble- ffc1d908 iop->offset += rc; ffc1d8e8: 81 1f 00 10 lwz r8,16(r31) ffc1d8ec: 7c 6b 1b 78 mr r11,r3 ffc1d8f0: 81 3f 00 14 lwz r9,20(r31) ffc1d8f4: 7c 6a fe 70 srawi r10,r3,31 ffc1d8f8: 7d 6b 48 14 addc r11,r11,r9 ffc1d8fc: 7d 4a 41 14 adde r10,r10,r8 ffc1d900: 91 5f 00 10 stw r10,16(r31) ffc1d904: 91 7f 00 14 stw r11,20(r31) return rc; } ffc1d908: 80 01 00 14 lwz r0,20(r1) ffc1d90c: 83 e1 00 0c lwz r31,12(r1) ffc1d910: 38 21 00 10 addi r1,r1,16 ffc1d914: 7c 08 03 a6 mtlr r0 ffc1d918: 4e 80 00 20 blr 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_with_error( iop, LIBIO_FLAGS_READ, EBADF ); ffc1d91c: 4b ff 51 45 bl ffc12a60 <__errno> ffc1d920: 38 00 00 09 li r0,9 ffc1d924: 90 03 00 00 stw r0,0(r3) ffc1d928: 38 60 ff ff li r3,-1 ffc1d92c: 4b ff ff dc b ffc1d908 rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); ffc1d930: 4b ff 51 31 bl ffc12a60 <__errno> <== NOT EXECUTED ffc1d934: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc1d938: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1d93c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc1d940: 4b ff ff c8 b ffc1d908 <== NOT EXECUTED =============================================================================== ffc08a40 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { ffc08a40: 94 21 ff c8 stwu r1,-56(r1) ffc08a44: 7c 08 02 a6 mflr r0 ffc08a48: 93 c1 00 30 stw r30,48(r1) rtems_filesystem_location_info_t loc; int result; if (!buf) ffc08a4c: 7c 9e 23 79 mr. r30,r4 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { ffc08a50: 93 a1 00 2c stw r29,44(r1) ffc08a54: 7c 7d 1b 78 mr r29,r3 ffc08a58: 93 e1 00 34 stw r31,52(r1) ffc08a5c: 7c bf 2b 78 mr r31,r5 ffc08a60: 90 01 00 3c stw r0,60(r1) rtems_filesystem_location_info_t loc; int result; if (!buf) ffc08a64: 41 82 00 a4 beq- ffc08b08 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), ffc08a68: 48 00 f1 c1 bl ffc17c28 ffc08a6c: 38 a0 00 00 li r5,0 ffc08a70: 7c 64 1b 78 mr r4,r3 ffc08a74: 38 c1 00 08 addi r6,r1,8 ffc08a78: 7f a3 eb 78 mr r3,r29 ffc08a7c: 38 e0 00 00 li r7,0 ffc08a80: 4b ff e9 7d bl ffc073fc 0, &loc, false ); if ( result != 0 ) return -1; ffc08a84: 3b a0 ff ff li r29,-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 ) ffc08a88: 2f 83 00 00 cmpwi cr7,r3,0 ffc08a8c: 40 9e 00 48 bne- cr7,ffc08ad4 <== NEVER TAKEN return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ ffc08a90: 81 21 00 14 lwz r9,20(r1) ffc08a94: 38 61 00 08 addi r3,r1,8 ffc08a98: 80 09 00 10 lwz r0,16(r9) ffc08a9c: 7c 09 03 a6 mtctr r0 ffc08aa0: 4e 80 04 21 bctrl ffc08aa4: 2f 83 00 04 cmpwi cr7,r3,4 rtems_filesystem_freenode( &loc ); ffc08aa8: 38 61 00 08 addi r3,r1,8 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 ){ ffc08aac: 40 9e 00 48 bne- cr7,ffc08af4 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); ffc08ab0: 81 21 00 14 lwz r9,20(r1) ffc08ab4: 7f c4 f3 78 mr r4,r30 ffc08ab8: 7f e5 fb 78 mr r5,r31 ffc08abc: 80 09 00 3c lwz r0,60(r9) ffc08ac0: 7c 09 03 a6 mtctr r0 ffc08ac4: 4e 80 04 21 bctrl ffc08ac8: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &loc ); ffc08acc: 38 61 00 08 addi r3,r1,8 ffc08ad0: 4b ff ea 89 bl ffc07558 return result; } ffc08ad4: 80 01 00 3c lwz r0,60(r1) ffc08ad8: 7f a3 eb 78 mr r3,r29 ffc08adc: 83 c1 00 30 lwz r30,48(r1) ffc08ae0: 7c 08 03 a6 mtlr r0 ffc08ae4: 83 a1 00 2c lwz r29,44(r1) ffc08ae8: 83 e1 00 34 lwz r31,52(r1) ffc08aec: 38 21 00 38 addi r1,r1,56 ffc08af0: 4e 80 00 20 blr 0, &loc, false ); if ( result != 0 ) return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); ffc08af4: 4b ff ea 65 bl ffc07558 rtems_set_errno_and_return_minus_one( EINVAL ); ffc08af8: 48 00 d1 81 bl ffc15c78 <__errno> ffc08afc: 38 00 00 16 li r0,22 ffc08b00: 90 03 00 00 stw r0,0(r3) ffc08b04: 4b ff ff d0 b ffc08ad4 { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); ffc08b08: 48 00 d1 71 bl ffc15c78 <__errno> ffc08b0c: 38 00 00 0e li r0,14 ffc08b10: 90 03 00 00 stw r0,0(r3) ffc08b14: 3b a0 ff ff li r29,-1 ffc08b18: 4b ff ff bc b ffc08ad4 =============================================================================== ffc07114 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc07114: 94 21 ff d8 stwu r1,-40(r1) ffc07118: 7c 08 02 a6 mflr r0 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc0711c: 3d 20 00 00 lis r9,0 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc07120: 90 01 00 2c stw r0,44(r1) int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc07124: 80 09 26 dc lwz r0,9948(r9) ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc07128: 93 a1 00 1c stw r29,28(r1) ffc0712c: 7c 9d 23 78 mr r29,r4 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc07130: 7f 83 00 40 cmplw cr7,r3,r0 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc07134: 93 01 00 08 stw r24,8(r1) ffc07138: 93 21 00 0c stw r25,12(r1) ffc0713c: 93 41 00 10 stw r26,16(r1) ffc07140: 93 61 00 14 stw r27,20(r1) ffc07144: 93 81 00 18 stw r28,24(r1) ffc07148: 93 c1 00 20 stw r30,32(r1) ffc0714c: 93 e1 00 24 stw r31,36(r1) int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc07150: 40 9c 01 60 bge- cr7,ffc072b0 iop = rtems_libio_iop( fd ); ffc07154: 3d 20 00 00 lis r9,0 ffc07158: 83 69 27 88 lwz r27,10120(r9) ffc0715c: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc07160: 7f 7b 1a 14 add r27,r27,r3 rtems_libio_check_is_open( iop ); ffc07164: 80 1b 00 18 lwz r0,24(r27) ffc07168: 70 09 01 00 andi. r9,r0,256 ffc0716c: 41 82 01 44 beq- ffc072b0 rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF ); ffc07170: 70 09 00 02 andi. r9,r0,2 ffc07174: 41 82 01 3c beq- ffc072b0 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) ffc07178: 2f 84 00 00 cmpwi cr7,r4,0 ffc0717c: 41 9e 00 f0 beq- cr7,ffc0726c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) ffc07180: 2f 85 00 00 cmpwi cr7,r5,0 ffc07184: 40 9d 00 e8 ble- cr7,ffc0726c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc07188: 2f 85 04 00 cmpwi cr7,r5,1024 ffc0718c: 41 9d 00 e0 bgt- cr7,ffc0726c <== NEVER TAKEN #include #include #include ssize_t readv( ffc07190: 54 b8 18 38 rlwinm r24,r5,3,0,28 ffc07194: 39 78 ff f8 addi r11,r24,-8 ffc07198: 55 6b e8 fe rlwinm r11,r11,29,3,31 ffc0719c: 39 6b 00 01 addi r11,r11,1 ffc071a0: 7d 69 03 a6 mtctr r11 ffc071a4: 39 20 00 00 li r9,0 ffc071a8: 39 00 00 01 li r8,1 ffc071ac: 38 00 00 00 li r0,0 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) ffc071b0: 7d 7d 48 2e lwzx r11,r29,r9 #include #include #include ssize_t readv( ffc071b4: 7d 5d 4a 14 add r10,r29,r9 old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) ffc071b8: 39 29 00 08 addi r9,r9,8 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) ffc071bc: 2f 8b 00 00 cmpwi cr7,r11,0 ffc071c0: 41 9e 00 ac beq- cr7,ffc0726c rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; ffc071c4: 81 4a 00 04 lwz r10,4(r10) ffc071c8: 7d 6a 02 14 add r11,r10,r0 if ( total < old ) ffc071cc: 7f 8b 00 00 cmpw cr7,r11,r0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; ffc071d0: 31 4a ff ff addic r10,r10,-1 ffc071d4: 7d 4a 51 10 subfe r10,r10,r10 ffc071d8: 7d 08 50 38 and r8,r8,r10 if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; ffc071dc: 7d 60 5b 78 mr r0,r11 if ( total < old ) ffc071e0: 41 9c 00 8c blt- cr7,ffc0726c * 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++ ) { ffc071e4: 42 00 ff cc bdnz+ ffc071b0 /* * 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 ) { ffc071e8: 2f 88 00 00 cmpwi cr7,r8,0 return 0; ffc071ec: 3b 20 00 00 li r25,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 ) { ffc071f0: 40 9e 00 8c bne- cr7,ffc0727c ffc071f4: 3b 80 00 00 li r28,0 ffc071f8: 48 00 00 3c b ffc07234 ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { ffc071fc: 41 82 00 28 beq- ffc07224 <== NEVER TAKEN iop->offset += bytes; ffc07200: 81 5b 00 10 lwz r10,16(r27) ffc07204: 7c 7f 1b 78 mr r31,r3 ffc07208: 81 7b 00 14 lwz r11,20(r27) ffc0720c: 7c 7e fe 70 srawi r30,r3,31 total += bytes; ffc07210: 7f 39 1a 14 add r25,r25,r3 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; ffc07214: 7d 6b f8 14 addc r11,r11,r31 ffc07218: 7d 4a f1 14 adde r10,r10,r30 ffc0721c: 91 5b 00 10 stw r10,16(r27) ffc07220: 91 7b 00 14 stw r11,20(r27) total += bytes; } if (bytes != iov[ v ].iov_len) ffc07224: 80 1a 00 04 lwz r0,4(r26) ffc07228: 7f 03 00 00 cmpw cr6,r3,r0 ffc0722c: 40 9a 00 50 bne- cr6,ffc0727c <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc07230: 41 9e 00 4c beq- cr7,ffc0727c bytes = (*iop->pathinfo.handlers->read_h)( ffc07234: 81 3b 00 24 lwz r9,36(r27) #include #include #include ssize_t readv( ffc07238: 7f 5d e2 14 add r26,r29,r28 /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->pathinfo.handlers->read_h)( ffc0723c: 7c 9d e0 2e lwzx r4,r29,r28 ffc07240: 7f 63 db 78 mr r3,r27 ffc07244: 80 09 00 08 lwz r0,8(r9) if ( bytes > 0 ) { iop->offset += bytes; total += bytes; } if (bytes != iov[ v ].iov_len) ffc07248: 3b 9c 00 08 addi r28,r28,8 /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->pathinfo.handlers->read_h)( ffc0724c: 80 ba 00 04 lwz r5,4(r26) ffc07250: 7c 09 03 a6 mtctr r0 ffc07254: 4e 80 04 21 bctrl } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc07258: 7f 9c c0 00 cmpw cr7,r28,r24 iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) ffc0725c: 2c 03 00 00 cmpwi r3,0 ffc07260: 40 80 ff 9c bge+ ffc071fc <== ALWAYS TAKEN return -1; ffc07264: 3b 20 ff ff li r25,-1 <== NOT EXECUTED ffc07268: 48 00 00 14 b ffc0727c <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc0726c: 48 00 c2 f5 bl ffc13560 <__errno> ffc07270: 38 00 00 16 li r0,22 ffc07274: 90 03 00 00 stw r0,0(r3) ffc07278: 3b 20 ff ff li r25,-1 if (bytes != iov[ v ].iov_len) break; } return total; } ffc0727c: 80 01 00 2c lwz r0,44(r1) ffc07280: 7f 23 cb 78 mr r3,r25 ffc07284: 83 01 00 08 lwz r24,8(r1) ffc07288: 7c 08 03 a6 mtlr r0 ffc0728c: 83 21 00 0c lwz r25,12(r1) ffc07290: 83 41 00 10 lwz r26,16(r1) ffc07294: 83 61 00 14 lwz r27,20(r1) ffc07298: 83 81 00 18 lwz r28,24(r1) ffc0729c: 83 a1 00 1c lwz r29,28(r1) ffc072a0: 83 c1 00 20 lwz r30,32(r1) ffc072a4: 83 e1 00 24 lwz r31,36(r1) ffc072a8: 38 21 00 28 addi r1,r1,40 ffc072ac: 4e 80 00 20 blr bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF ); ffc072b0: 48 00 c2 b1 bl ffc13560 <__errno> ffc072b4: 38 00 00 09 li r0,9 ffc072b8: 90 03 00 00 stw r0,0(r3) ffc072bc: 3b 20 ff ff li r25,-1 ffc072c0: 4b ff ff bc b ffc0727c =============================================================================== ffc1d9a8 : void *realloc( void *ptr, size_t size ) { ffc1d9a8: 94 21 ff d8 stwu r1,-40(r1) ffc1d9ac: 7c 08 02 a6 mflr r0 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { ffc1d9b0: 3d 20 00 00 lis r9,0 void *realloc( void *ptr, size_t size ) { ffc1d9b4: 90 01 00 2c stw r0,44(r1) /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { ffc1d9b8: 80 09 28 04 lwz r0,10244(r9) void *realloc( void *ptr, size_t size ) { ffc1d9bc: 93 c1 00 20 stw r30,32(r1) uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); ffc1d9c0: 3f c0 00 00 lis r30,0 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { ffc1d9c4: 2f 80 00 03 cmpwi cr7,r0,3 ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); ffc1d9c8: 3b de 2a e8 addi r30,r30,10984 void *realloc( void *ptr, size_t size ) { ffc1d9cc: 93 a1 00 1c stw r29,28(r1) ffc1d9d0: 7c 9d 23 78 mr r29,r4 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); ffc1d9d4: 81 3e 00 10 lwz r9,16(r30) void *realloc( void *ptr, size_t size ) { ffc1d9d8: 93 e1 00 24 stw r31,36(r1) ffc1d9dc: 7c 7f 1b 78 mr r31,r3 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); ffc1d9e0: 39 29 00 01 addi r9,r9,1 void *realloc( void *ptr, size_t size ) { ffc1d9e4: 93 81 00 18 stw r28,24(r1) uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); ffc1d9e8: 91 3e 00 10 stw r9,16(r30) /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { ffc1d9ec: 41 9e 00 d4 beq- cr7,ffc1dac0 <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) ffc1d9f0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc1d9f4: 41 9e 01 58 beq- cr7,ffc1db4c return malloc( size ); if ( !size ) { ffc1d9f8: 2f 9d 00 00 cmpwi cr7,r29,0 ffc1d9fc: 41 9e 01 2c beq- cr7,ffc1db28 <== NEVER TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { ffc1da00: 3f 80 00 00 lis r28,0 ffc1da04: 80 7c 26 ec lwz r3,9964(r28) ffc1da08: 7f e4 fb 78 mr r4,r31 ffc1da0c: 38 a1 00 08 addi r5,r1,8 ffc1da10: 48 00 02 1d bl ffc1dc2c <_Protected_heap_Get_block_size> ffc1da14: 2f 83 00 00 cmpwi cr7,r3,0 ffc1da18: 41 9e 01 20 beq- cr7,ffc1db38 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { ffc1da1c: 80 7c 26 ec lwz r3,9964(r28) ffc1da20: 7f e4 fb 78 mr r4,r31 ffc1da24: 7f a5 eb 78 mr r5,r29 ffc1da28: 48 00 02 69 bl ffc1dc90 <_Protected_heap_Resize_block> ffc1da2c: 2f 83 00 00 cmpwi cr7,r3,0 ffc1da30: 41 9e 00 28 beq- cr7,ffc1da58 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } ffc1da34: 80 01 00 2c lwz r0,44(r1) ffc1da38: 7f e3 fb 78 mr r3,r31 ffc1da3c: 83 81 00 18 lwz r28,24(r1) ffc1da40: 7c 08 03 a6 mtlr r0 ffc1da44: 83 a1 00 1c lwz r29,28(r1) ffc1da48: 83 c1 00 20 lwz r30,32(r1) ffc1da4c: 83 e1 00 24 lwz r31,36(r1) ffc1da50: 38 21 00 28 addi r1,r1,40 ffc1da54: 4e 80 00 20 blr * 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 ); ffc1da58: 7f a3 eb 78 mr r3,r29 ffc1da5c: 4b fe 7a c1 bl ffc0551c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc1da60: 81 3e 00 04 lwz r9,4(r30) if ( !new_area ) { ffc1da64: 7c 7c 1b 79 mr. r28,r3 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc1da68: 38 09 ff ff addi r0,r9,-1 ffc1da6c: 90 1e 00 04 stw r0,4(r30) if ( !new_area ) { ffc1da70: 41 82 00 70 beq- ffc1dae0 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); ffc1da74: 80 01 00 08 lwz r0,8(r1) ffc1da78: 7f a5 eb 78 mr r5,r29 ffc1da7c: 7f 9d 00 40 cmplw cr7,r29,r0 ffc1da80: 41 9d 00 88 bgt- cr7,ffc1db08 <== ALWAYS TAKEN ffc1da84: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc1da88: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc1da8c: 4b ff 5d 11 bl ffc1379c <== NOT EXECUTED free( ptr ); ffc1da90: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1da94: 4b fe 76 6d bl ffc05100 <== NOT EXECUTED return new_area; ffc1da98: 7f 9f e3 78 mr r31,r28 <== NOT EXECUTED } ffc1da9c: 80 01 00 2c lwz r0,44(r1) ffc1daa0: 7f e3 fb 78 mr r3,r31 ffc1daa4: 83 81 00 18 lwz r28,24(r1) ffc1daa8: 7c 08 03 a6 mtlr r0 ffc1daac: 83 a1 00 1c lwz r29,28(r1) ffc1dab0: 83 c1 00 20 lwz r30,32(r1) ffc1dab4: 83 e1 00 24 lwz r31,36(r1) ffc1dab8: 38 21 00 28 addi r1,r1,40 ffc1dabc: 4e 80 00 20 blr * This routine returns true if thread dispatch indicates * that we are in a critical section. */ RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void) { if ( _Thread_Dispatch_disable_level == 0 ) ffc1dac0: 3d 20 00 00 lis r9,0 ffc1dac4: 80 09 27 c8 lwz r0,10184(r9) ffc1dac8: 2f 80 00 00 cmpwi cr7,r0,0 ffc1dacc: 40 9e 00 14 bne- cr7,ffc1dae0 <== NEVER TAKEN if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_in_critical_section()) return (void *) 0; if (_ISR_Nest_level > 0) ffc1dad0: 3d 20 00 00 lis r9,0 ffc1dad4: 80 09 2d c0 lwz r0,11712(r9) ffc1dad8: 2f 80 00 00 cmpwi cr7,r0,0 ffc1dadc: 41 9e ff 14 beq+ cr7,ffc1d9f0 <== ALWAYS TAKEN memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } ffc1dae0: 80 01 00 2c lwz r0,44(r1) new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; ffc1dae4: 3b e0 00 00 li r31,0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } ffc1dae8: 7f e3 fb 78 mr r3,r31 ffc1daec: 83 81 00 18 lwz r28,24(r1) ffc1daf0: 7c 08 03 a6 mtlr r0 ffc1daf4: 83 a1 00 1c lwz r29,28(r1) ffc1daf8: 83 c1 00 20 lwz r30,32(r1) ffc1dafc: 83 e1 00 24 lwz r31,36(r1) ffc1db00: 38 21 00 28 addi r1,r1,40 ffc1db04: 4e 80 00 20 blr if ( !new_area ) { return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); ffc1db08: 7f e4 fb 78 mr r4,r31 ffc1db0c: 7c 05 03 78 mr r5,r0 ffc1db10: 7f 83 e3 78 mr r3,r28 ffc1db14: 4b ff 5c 89 bl ffc1379c free( ptr ); ffc1db18: 7f e3 fb 78 mr r3,r31 ffc1db1c: 4b fe 75 e5 bl ffc05100 return new_area; ffc1db20: 7f 9f e3 78 mr r31,r28 ffc1db24: 4b ff ff 78 b ffc1da9c */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); ffc1db28: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1db2c: 4b fe 75 d5 bl ffc05100 <== NOT EXECUTED return (void *) 0; ffc1db30: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc1db34: 4b ff ff 00 b ffc1da34 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; ffc1db38: 4b ff 4f 29 bl ffc12a60 <__errno> ffc1db3c: 38 00 00 16 li r0,22 ffc1db40: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc1db44: 3b e0 00 00 li r31,0 ffc1db48: 4b ff fe ec b ffc1da34 /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); ffc1db4c: 7f a3 eb 78 mr r3,r29 ffc1db50: 4b fe 79 cd bl ffc0551c ffc1db54: 7c 7f 1b 78 mr r31,r3 ffc1db58: 4b ff fe dc b ffc1da34 =============================================================================== ffc062dc : #include int rmdir( const char *pathname ) { ffc062dc: 94 21 ff b0 stwu r1,-80(r1) ffc062e0: 7c 08 02 a6 mflr r0 ffc062e4: 93 a1 00 44 stw r29,68(r1) ffc062e8: 93 c1 00 48 stw r30,72(r1) */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); ffc062ec: 3b c1 00 20 addi r30,r1,32 #include int rmdir( const char *pathname ) { ffc062f0: 93 e1 00 4c stw r31,76(r1) ffc062f4: 7c 7f 1b 78 mr r31,r3 ffc062f8: 90 01 00 54 stw r0,84(r1) ffc062fc: 93 61 00 3c stw r27,60(r1) ffc06300: 93 81 00 40 stw r28,64(r1) /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); ffc06304: 4b ff ec f1 bl ffc04ff4 if ( parentpathlen == 0 ) ffc06308: 7c 7d 1b 79 mr. r29,r3 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); ffc0630c: 7f e3 fb 78 mr r3,r31 * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) ffc06310: 40 82 00 b8 bne- ffc063c8 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); ffc06314: 38 81 00 08 addi r4,r1,8 ffc06318: 7f c5 f3 78 mr r5,r30 ffc0631c: 48 00 01 79 bl ffc06494 ffc06320: 3b a0 00 00 li r29,0 const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; ffc06324: 3b 80 00 00 li r28,0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc06328: 80 01 00 20 lwz r0,32(r1) name = pathname + parentpathlen; ffc0632c: 7f ff ea 14 add r31,r31,r29 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc06330: 7f e3 fb 78 mr r3,r31 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc06334: 90 01 00 0c stw r0,12(r1) ffc06338: 80 01 00 24 lwz r0,36(r1) ffc0633c: 90 01 00 10 stw r0,16(r1) ffc06340: 80 01 00 28 lwz r0,40(r1) ffc06344: 90 01 00 14 stw r0,20(r1) ffc06348: 80 01 00 2c lwz r0,44(r1) ffc0634c: 90 01 00 18 stw r0,24(r1) ffc06350: 80 01 00 30 lwz r0,48(r1) ffc06354: 90 01 00 1c stw r0,28(r1) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc06358: 48 00 dd 05 bl ffc1405c ffc0635c: 7c 64 1b 78 mr r4,r3 ffc06360: 7f e3 fb 78 mr r3,r31 ffc06364: 4b ff ec f1 bl ffc05054 ffc06368: 7f ff 1a 14 add r31,r31,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc0636c: 7f e3 fb 78 mr r3,r31 ffc06370: 48 00 dc ed bl ffc1405c ffc06374: 38 a0 00 00 li r5,0 ffc06378: 7c 64 1b 78 mr r4,r3 ffc0637c: 38 c1 00 0c addi r6,r1,12 ffc06380: 7f e3 fb 78 mr r3,r31 ffc06384: 38 e0 00 00 li r7,0 ffc06388: 4b ff eb 45 bl ffc04ecc 0, &loc, false ); if ( result != 0 ) { ffc0638c: 2f 83 00 00 cmpwi cr7,r3,0 ffc06390: 41 9e 00 60 beq- cr7,ffc063f0 if ( free_parentloc ) ffc06394: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_filesystem_freenode( &parentloc ); return -1; ffc06398: 3b 60 ff ff li r27,-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 ) ffc0639c: 40 9e 00 9c bne- cr7,ffc06438 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } ffc063a0: 80 01 00 54 lwz r0,84(r1) ffc063a4: 7f 63 db 78 mr r3,r27 ffc063a8: 83 81 00 40 lwz r28,64(r1) ffc063ac: 7c 08 03 a6 mtlr r0 ffc063b0: 83 61 00 3c lwz r27,60(r1) ffc063b4: 83 a1 00 44 lwz r29,68(r1) ffc063b8: 83 c1 00 48 lwz r30,72(r1) ffc063bc: 83 e1 00 4c lwz r31,76(r1) ffc063c0: 38 21 00 50 addi r1,r1,80 ffc063c4: 4e 80 00 20 blr parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, ffc063c8: 7f a4 eb 78 mr r4,r29 ffc063cc: 38 a0 00 02 li r5,2 ffc063d0: 7f c6 f3 78 mr r6,r30 ffc063d4: 38 e0 00 00 li r7,0 ffc063d8: 4b ff eb a1 bl ffc04f78 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) return -1; ffc063dc: 3b 60 ff ff li r27,-1 else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) ffc063e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc063e4: 40 be ff bc bne- cr7,ffc063a0 <== NEVER TAKEN return -1; free_parentloc = true; ffc063e8: 3b 80 00 01 li r28,1 ffc063ec: 4b ff ff 3c b ffc06328 } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { ffc063f0: 81 21 00 18 lwz r9,24(r1) ffc063f4: 38 61 00 0c addi r3,r1,12 ffc063f8: 80 09 00 10 lwz r0,16(r9) ffc063fc: 7c 09 03 a6 mtctr r0 ffc06400: 4e 80 04 21 bctrl ffc06404: 2f 83 00 01 cmpwi cr7,r3,1 ffc06408: 40 9e 00 60 bne- cr7,ffc06468 /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); ffc0640c: 81 21 00 14 lwz r9,20(r1) ffc06410: 38 81 00 0c addi r4,r1,12 ffc06414: 7f c3 f3 78 mr r3,r30 ffc06418: 80 09 00 34 lwz r0,52(r9) ffc0641c: 7c 09 03 a6 mtctr r0 ffc06420: 4e 80 04 21 bctrl ffc06424: 7c 7b 1b 78 mr r27,r3 rtems_filesystem_freenode( &loc ); ffc06428: 38 61 00 0c addi r3,r1,12 ffc0642c: 4b ff ec a9 bl ffc050d4 if ( free_parentloc ) ffc06430: 2f 9c 00 00 cmpwi cr7,r28,0 ffc06434: 41 9e ff 6c beq+ cr7,ffc063a0 rtems_filesystem_freenode( &parentloc ); ffc06438: 7f c3 f3 78 mr r3,r30 ffc0643c: 4b ff ec 99 bl ffc050d4 return result; } ffc06440: 80 01 00 54 lwz r0,84(r1) ffc06444: 7f 63 db 78 mr r3,r27 ffc06448: 83 81 00 40 lwz r28,64(r1) ffc0644c: 7c 08 03 a6 mtlr r0 ffc06450: 83 61 00 3c lwz r27,60(r1) ffc06454: 83 a1 00 44 lwz r29,68(r1) ffc06458: 83 c1 00 48 lwz r30,72(r1) ffc0645c: 83 e1 00 4c lwz r31,76(r1) ffc06460: 38 21 00 50 addi r1,r1,80 ffc06464: 4e 80 00 20 blr /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); ffc06468: 38 61 00 0c addi r3,r1,12 ffc0646c: 4b ff ec 69 bl ffc050d4 if ( free_parentloc ) ffc06470: 2f 9c 00 00 cmpwi cr7,r28,0 ffc06474: 41 be 00 0c beq+ cr7,ffc06480 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); ffc06478: 7f c3 f3 78 mr r3,r30 ffc0647c: 4b ff ec 59 bl ffc050d4 rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc06480: 48 00 ca 61 bl ffc12ee0 <__errno> ffc06484: 38 00 00 14 li r0,20 ffc06488: 90 03 00 00 stw r0,0(r3) ffc0648c: 3b 60 ff ff li r27,-1 ffc06490: 4b ff ff 10 b ffc063a0 =============================================================================== ffc12294 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc12294: 94 21 ff e0 stwu r1,-32(r1) ffc12298: 7c 08 02 a6 mflr r0 ffc1229c: 90 01 00 24 stw r0,36(r1) ffc122a0: 38 00 00 20 li r0,32 ffc122a4: 93 81 00 10 stw r28,16(r1) ffc122a8: 7c 7c 1b 78 mr r28,r3 ffc122ac: 93 a1 00 14 stw r29,20(r1) uint32_t b; uint32_t local_value = 0; ffc122b0: 3b a0 00 00 li r29,0 uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc122b4: 93 c1 00 18 stw r30,24(r1) ffc122b8: 7c 9e 23 78 mr r30,r4 ffc122bc: 93 e1 00 1c stw r31,28(r1) uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ffc122c0: 3b e0 00 01 li r31,1 uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc122c4: 90 01 00 08 stw r0,8(r1) ffc122c8: 48 00 00 18 b ffc122e0 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ffc122cc: 80 01 00 08 lwz r0,8(r1) ffc122d0: 57 ff 08 3c rlwinm r31,r31,1,0,30 ffc122d4: 35 20 ff ff addic. r9,r0,-1 ffc122d8: 91 21 00 08 stw r9,8(r1) ffc122dc: 41 82 00 30 beq- ffc1230c if (b & remote_value) ffc122e0: 7f e9 f0 39 and. r9,r31,r30 ffc122e4: 41 82 ff e8 beq+ ffc122cc local_value |= rtems_assoc_local_by_remote(ap, b); ffc122e8: 7f e4 fb 78 mr r4,r31 ffc122ec: 7f 83 e3 78 mr r3,r28 ffc122f0: 48 00 00 41 bl ffc12330 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ffc122f4: 80 01 00 08 lwz r0,8(r1) if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); ffc122f8: 7f bd 1b 78 or r29,r29,r3 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ffc122fc: 35 20 ff ff addic. r9,r0,-1 ffc12300: 57 ff 08 3c rlwinm r31,r31,1,0,30 ffc12304: 91 21 00 08 stw r9,8(r1) ffc12308: 40 82 ff d8 bne+ ffc122e0 <== ALWAYS TAKEN if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } ffc1230c: 80 01 00 24 lwz r0,36(r1) ffc12310: 7f a3 eb 78 mr r3,r29 ffc12314: 83 81 00 10 lwz r28,16(r1) ffc12318: 7c 08 03 a6 mtlr r0 ffc1231c: 83 a1 00 14 lwz r29,20(r1) ffc12320: 83 c1 00 18 lwz r30,24(r1) ffc12324: 83 e1 00 1c lwz r31,28(r1) ffc12328: 38 21 00 20 addi r1,r1,32 ffc1232c: 4e 80 00 20 blr =============================================================================== ffc0f054 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ffc0f054: 94 21 ff f0 stwu r1,-16(r1) ffc0f058: 7c 08 02 a6 mflr r0 ffc0f05c: 90 01 00 14 stw r0,20(r1) const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc0f060: 80 03 00 00 lwz r0,0(r3) const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ffc0f064: 93 c1 00 08 stw r30,8(r1) ffc0f068: 7c 7e 1b 78 mr r30,r3 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc0f06c: 2f 80 00 00 cmpwi cr7,r0,0 const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ffc0f070: 93 e1 00 0c stw r31,12(r1) const rtems_assoc_t *default_ap = 0; ffc0f074: 38 60 00 00 li r3,0 const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ffc0f078: 7c 9f 23 78 mr r31,r4 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc0f07c: 41 9e 00 68 beq- cr7,ffc0f0e4 ffc0f080: 3c 80 ff c2 lis r4,-62 ffc0f084: 7c 03 03 78 mr r3,r0 ffc0f088: 38 84 f5 88 addi r4,r4,-2680 ffc0f08c: 48 00 4d 25 bl ffc13db0 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; ffc0f090: 39 00 00 00 li r8,0 if (rtems_assoc_is_default(ap)) ffc0f094: 2f 83 00 00 cmpwi cr7,r3,0 ffc0f098: 41 9e 00 64 beq- cr7,ffc0f0fc default_ap = ap++; for ( ; ap->name; ap++) if (ap->local_value == local_value) ffc0f09c: 80 1e 00 04 lwz r0,4(r30) ffc0f0a0: 7f c3 f3 78 mr r3,r30 ffc0f0a4: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0f0a8: 41 9e 00 3c beq- cr7,ffc0f0e4 ffc0f0ac: 39 3e 00 0c addi r9,r30,12 ffc0f0b0: 7c 1e 00 d0 neg r0,r30 ffc0f0b4: 48 00 00 10 b ffc0f0c4 ffc0f0b8: 81 6a ff f8 lwz r11,-8(r10) ffc0f0bc: 7f 8b f8 00 cmpw cr7,r11,r31 ffc0f0c0: 41 9e 00 24 beq- cr7,ffc0f0e4 #include #include #include /* strcat, strcmp */ const rtems_assoc_t *rtems_assoc_ptr_by_local( ffc0f0c4: 7d 63 02 14 add r11,r3,r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc0f0c8: 7d 69 58 2e lwzx r11,r9,r11 ffc0f0cc: 38 63 00 0c addi r3,r3,12 #include #include #include /* strcat, strcmp */ const rtems_assoc_t *rtems_assoc_ptr_by_local( ffc0f0d0: 7d 43 02 14 add r10,r3,r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc0f0d4: 2f 8b 00 00 cmpwi cr7,r11,0 #include #include #include /* strcat, strcmp */ const rtems_assoc_t *rtems_assoc_ptr_by_local( ffc0f0d8: 7d 49 52 14 add r10,r9,r10 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc0f0dc: 40 9e ff dc bne+ cr7,ffc0f0b8 ffc0f0e0: 7d 03 43 78 mr r3,r8 if (ap->local_value == local_value) return ap; return default_ap; } ffc0f0e4: 80 01 00 14 lwz r0,20(r1) ffc0f0e8: 83 c1 00 08 lwz r30,8(r1) ffc0f0ec: 7c 08 03 a6 mtlr r0 ffc0f0f0: 83 e1 00 0c lwz r31,12(r1) ffc0f0f4: 38 21 00 10 addi r1,r1,16 ffc0f0f8: 4e 80 00 20 blr const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc0f0fc: 80 1e 00 0c lwz r0,12(r30) ffc0f100: 7f c3 f3 78 mr r3,r30 ffc0f104: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f108: 41 be ff dc beq- cr7,ffc0f0e4 <== NEVER TAKEN ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; ffc0f10c: 7f c8 f3 78 mr r8,r30 ffc0f110: 3b de 00 0c addi r30,r30,12 ffc0f114: 4b ff ff 88 b ffc0f09c =============================================================================== ffc05738 : const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { ffc05738: 94 21 ff e0 stwu r1,-32(r1) ffc0573c: 7c 08 02 a6 mflr r0 ffc05740: 90 01 00 24 stw r0,36(r1) ffc05744: 93 e1 00 1c stw r31,28(r1) const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc05748: 83 e3 00 00 lwz r31,0(r3) const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { ffc0574c: 93 81 00 10 stw r28,16(r1) ffc05750: 7c 9c 23 78 mr r28,r4 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc05754: 2f 9f 00 00 cmpwi cr7,r31,0 const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { ffc05758: 93 a1 00 14 stw r29,20(r1) ffc0575c: 7c 7d 1b 78 mr r29,r3 ffc05760: 93 c1 00 18 stw r30,24(r1) const rtems_assoc_t *default_ap = 0; ffc05764: 3b c0 00 00 li r30,0 const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { ffc05768: 93 41 00 08 stw r26,8(r1) ffc0576c: 93 61 00 0c stw r27,12(r1) const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc05770: 41 9e 00 5c beq- cr7,ffc057cc ffc05774: 3c 80 ff c2 lis r4,-62 ffc05778: 7f e3 fb 78 mr r3,r31 ffc0577c: 38 84 9c b0 addi r4,r4,-25424 ffc05780: 48 00 ec 51 bl ffc143d0 const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { const rtems_assoc_t *default_ap = 0; ffc05784: 3b 40 00 00 li r26,0 if (rtems_assoc_is_default(ap)) ffc05788: 2f 83 00 00 cmpwi cr7,r3,0 ffc0578c: 41 9e 00 6c beq- cr7,ffc057f8 const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { ffc05790: 7f a0 eb 78 mr r0,r29 #include #include /* strcat, strcmp */ const rtems_assoc_t *rtems_assoc_ptr_by_name( ffc05794: 3b 7d 00 0c addi r27,r29,12 ffc05798: 48 00 00 10 b ffc057a8 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc0579c: 83 e9 ff f4 lwz r31,-12(r9) ffc057a0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc057a4: 41 9e 00 70 beq- cr7,ffc05814 if (strcmp(ap->name, name) == 0) ffc057a8: 7f e3 fb 78 mr r3,r31 ffc057ac: 7f 84 e3 78 mr r4,r28 ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; ffc057b0: 7c 1e 03 78 mr r30,r0 for ( ; ap->name; ap++) if (strcmp(ap->name, name) == 0) ffc057b4: 48 00 ec 1d bl ffc143d0 ffc057b8: 2f 83 00 00 cmpwi cr7,r3,0 ffc057bc: 38 1e 00 0c addi r0,r30,12 #include #include /* strcat, strcmp */ const rtems_assoc_t *rtems_assoc_ptr_by_name( ffc057c0: 7d 3d 00 50 subf r9,r29,r0 ffc057c4: 7d 29 da 14 add r9,r9,r27 if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) if (strcmp(ap->name, name) == 0) ffc057c8: 40 9e ff d4 bne+ cr7,ffc0579c return ap; return default_ap; } ffc057cc: 80 01 00 24 lwz r0,36(r1) ffc057d0: 7f c3 f3 78 mr r3,r30 ffc057d4: 83 41 00 08 lwz r26,8(r1) ffc057d8: 7c 08 03 a6 mtlr r0 ffc057dc: 83 61 00 0c lwz r27,12(r1) ffc057e0: 83 81 00 10 lwz r28,16(r1) ffc057e4: 83 a1 00 14 lwz r29,20(r1) ffc057e8: 83 c1 00 18 lwz r30,24(r1) ffc057ec: 83 e1 00 1c lwz r31,28(r1) ffc057f0: 38 21 00 20 addi r1,r1,32 ffc057f4: 4e 80 00 20 blr const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc057f8: 83 fd 00 0c lwz r31,12(r29) ffc057fc: 7f be eb 78 mr r30,r29 ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; ffc05800: 7f ba eb 78 mr r26,r29 for ( ; ap->name; ap++) ffc05804: 2f 9f 00 00 cmpwi cr7,r31,0 ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; ffc05808: 3b bd 00 0c addi r29,r29,12 for ( ; ap->name; ap++) ffc0580c: 40 9e ff 84 bne+ cr7,ffc05790 <== ALWAYS TAKEN ffc05810: 4b ff ff bc b ffc057cc <== NOT EXECUTED if (strcmp(ap->name, name) == 0) return ap; return default_ap; } ffc05814: 80 01 00 24 lwz r0,36(r1) const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc05818: 7f 5e d3 78 mr r30,r26 if (strcmp(ap->name, name) == 0) return ap; return default_ap; } ffc0581c: 7f c3 f3 78 mr r3,r30 ffc05820: 83 41 00 08 lwz r26,8(r1) ffc05824: 7c 08 03 a6 mtlr r0 ffc05828: 83 61 00 0c lwz r27,12(r1) ffc0582c: 83 81 00 10 lwz r28,16(r1) ffc05830: 83 a1 00 14 lwz r29,20(r1) ffc05834: 83 c1 00 18 lwz r30,24(r1) ffc05838: 83 e1 00 1c lwz r31,28(r1) ffc0583c: 38 21 00 20 addi r1,r1,32 ffc05840: 4e 80 00 20 blr =============================================================================== ffc1236c : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc1236c: 94 21 ff f0 stwu r1,-16(r1) ffc12370: 7c 08 02 a6 mflr r0 ffc12374: 90 01 00 14 stw r0,20(r1) const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc12378: 80 03 00 00 lwz r0,0(r3) const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc1237c: 93 c1 00 08 stw r30,8(r1) ffc12380: 7c 7e 1b 78 mr r30,r3 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc12384: 2f 80 00 00 cmpwi cr7,r0,0 const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc12388: 93 e1 00 0c stw r31,12(r1) const rtems_assoc_t *default_ap = 0; ffc1238c: 38 60 00 00 li r3,0 const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc12390: 7c 9f 23 78 mr r31,r4 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc12394: 41 9e 00 68 beq- cr7,ffc123fc ffc12398: 3c 80 ff c2 lis r4,-62 ffc1239c: 7c 03 03 78 mr r3,r0 ffc123a0: 38 84 f5 88 addi r4,r4,-2680 ffc123a4: 48 00 1a 0d bl ffc13db0 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; ffc123a8: 39 00 00 00 li r8,0 if (rtems_assoc_is_default(ap)) ffc123ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc123b0: 41 9e 00 64 beq- cr7,ffc12414 default_ap = ap++; for ( ; ap->name; ap++) if (ap->remote_value == remote_value) ffc123b4: 80 1e 00 08 lwz r0,8(r30) ffc123b8: 7f c3 f3 78 mr r3,r30 ffc123bc: 7f 80 f8 00 cmpw cr7,r0,r31 ffc123c0: 41 9e 00 3c beq- cr7,ffc123fc ffc123c4: 39 3e 00 0c addi r9,r30,12 ffc123c8: 7c 1e 00 d0 neg r0,r30 ffc123cc: 48 00 00 10 b ffc123dc ffc123d0: 81 6a ff fc lwz r11,-4(r10) ffc123d4: 7f 8b f8 00 cmpw cr7,r11,r31 ffc123d8: 41 9e 00 24 beq- cr7,ffc123fc #include #include #include /* strcat, strcmp */ const rtems_assoc_t *rtems_assoc_ptr_by_remote( ffc123dc: 7d 63 02 14 add r11,r3,r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc123e0: 7d 69 58 2e lwzx r11,r9,r11 ffc123e4: 38 63 00 0c addi r3,r3,12 #include #include #include /* strcat, strcmp */ const rtems_assoc_t *rtems_assoc_ptr_by_remote( ffc123e8: 7d 43 02 14 add r10,r3,r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc123ec: 2f 8b 00 00 cmpwi cr7,r11,0 #include #include #include /* strcat, strcmp */ const rtems_assoc_t *rtems_assoc_ptr_by_remote( ffc123f0: 7d 49 52 14 add r10,r9,r10 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc123f4: 40 9e ff dc bne+ cr7,ffc123d0 ffc123f8: 7d 03 43 78 mr r3,r8 if (ap->remote_value == remote_value) return ap; return default_ap; } ffc123fc: 80 01 00 14 lwz r0,20(r1) ffc12400: 83 c1 00 08 lwz r30,8(r1) ffc12404: 7c 08 03 a6 mtlr r0 ffc12408: 83 e1 00 0c lwz r31,12(r1) ffc1240c: 38 21 00 10 addi r1,r1,16 ffc12410: 4e 80 00 20 blr const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc12414: 80 1e 00 0c lwz r0,12(r30) ffc12418: 7f c3 f3 78 mr r3,r30 ffc1241c: 2f 80 00 00 cmpwi cr7,r0,0 ffc12420: 41 be ff dc beq- cr7,ffc123fc <== NEVER TAKEN ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; ffc12424: 7f c8 f3 78 mr r8,r30 ffc12428: 3b de 00 0c addi r30,r30,12 ffc1242c: 4b ff ff 88 b ffc123b4 =============================================================================== ffc05908 : uint32_t rtems_assoc_remote_by_local_bitfield( const rtems_assoc_t *ap, uint32_t local_value ) { ffc05908: 94 21 ff e0 stwu r1,-32(r1) ffc0590c: 7c 08 02 a6 mflr r0 ffc05910: 90 01 00 24 stw r0,36(r1) ffc05914: 38 00 00 20 li r0,32 ffc05918: 93 81 00 10 stw r28,16(r1) ffc0591c: 7c 7c 1b 78 mr r28,r3 ffc05920: 93 a1 00 14 stw r29,20(r1) uint32_t b; uint32_t remote_value = 0; ffc05924: 3b a0 00 00 li r29,0 uint32_t rtems_assoc_remote_by_local_bitfield( const rtems_assoc_t *ap, uint32_t local_value ) { ffc05928: 93 c1 00 18 stw r30,24(r1) ffc0592c: 7c 9e 23 78 mr r30,r4 ffc05930: 93 e1 00 1c stw r31,28(r1) uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) ffc05934: 3b e0 00 01 li r31,1 uint32_t rtems_assoc_remote_by_local_bitfield( const rtems_assoc_t *ap, uint32_t local_value ) { ffc05938: 90 01 00 08 stw r0,8(r1) ffc0593c: 48 00 00 18 b ffc05954 uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) ffc05940: 80 01 00 08 lwz r0,8(r1) ffc05944: 57 ff 08 3c rlwinm r31,r31,1,0,30 ffc05948: 35 20 ff ff addic. r9,r0,-1 ffc0594c: 91 21 00 08 stw r9,8(r1) ffc05950: 41 82 00 30 beq- ffc05980 if (b & local_value) ffc05954: 7f e9 f0 39 and. r9,r31,r30 ffc05958: 41 82 ff e8 beq+ ffc05940 remote_value |= rtems_assoc_remote_by_local(ap, b); ffc0595c: 7f e4 fb 78 mr r4,r31 ffc05960: 7f 83 e3 78 mr r3,r28 ffc05964: 48 00 00 41 bl ffc059a4 ) { uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) ffc05968: 80 01 00 08 lwz r0,8(r1) if (b & local_value) remote_value |= rtems_assoc_remote_by_local(ap, b); ffc0596c: 7f bd 1b 78 or r29,r29,r3 ) { uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) ffc05970: 35 20 ff ff addic. r9,r0,-1 ffc05974: 57 ff 08 3c rlwinm r31,r31,1,0,30 ffc05978: 91 21 00 08 stw r9,8(r1) ffc0597c: 40 82 ff d8 bne+ ffc05954 <== ALWAYS TAKEN if (b & local_value) remote_value |= rtems_assoc_remote_by_local(ap, b); return remote_value; } ffc05980: 80 01 00 24 lwz r0,36(r1) ffc05984: 7f a3 eb 78 mr r3,r29 ffc05988: 83 81 00 10 lwz r28,16(r1) ffc0598c: 7c 08 03 a6 mtlr r0 ffc05990: 83 a1 00 14 lwz r29,20(r1) ffc05994: 83 c1 00 18 lwz r30,24(r1) ffc05998: 83 e1 00 1c lwz r31,28(r1) ffc0599c: 38 21 00 20 addi r1,r1,32 ffc059a0: 4e 80 00 20 blr =============================================================================== ffc04144 : size_t length ) { const char *p; if ( !name ) ffc04144: 2f 83 00 00 cmpwi cr7,r3,0 const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { ffc04148: 94 21 ff f0 stwu r1,-16(r1) ffc0414c: 7c 08 02 a6 mflr r0 ffc04150: 93 c1 00 08 stw r30,8(r1) ffc04154: 7c be 2b 78 mr r30,r5 ffc04158: 93 e1 00 0c stw r31,12(r1) ffc0415c: 7c 9f 23 78 mr r31,r4 ffc04160: 90 01 00 14 stw r0,20(r1) const char *p; if ( !name ) ffc04164: 41 9e 00 c8 beq- cr7,ffc0422c return NULL; if ( !value ) ffc04168: 2f 84 00 00 cmpwi cr7,r4,0 ffc0416c: 41 9e 00 a4 beq- cr7,ffc04210 return NULL; if ( !length ) ffc04170: 2f 85 00 00 cmpwi cr7,r5,0 ffc04174: 41 9e 00 b8 beq- cr7,ffc0422c return NULL; value[0] = '\0'; ffc04178: 38 00 00 00 li r0,0 ffc0417c: 98 04 00 00 stb r0,0(r4) p = rtems_bsp_cmdline_get_param_raw( name ); ffc04180: 48 00 00 cd bl ffc0424c if ( !p ) ffc04184: 2c 03 00 00 cmpwi r3,0 ffc04188: 41 82 00 a4 beq- ffc0422c int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<== NEVER TAKEN ffc04198: 34 fe ff ff addic. r7,r30,-1 ffc0419c: 7c e9 03 a6 mtctr r7 ffc041a0: 41 82 00 70 beq- ffc04210 <== NEVER TAKEN ffc041a4: 39 60 00 00 li r11,0 value[i] = '\0'; } } const char *rtems_bsp_cmdline_get_param( ffc041a8: 39 20 00 00 li r9,0 ffc041ac: 39 40 00 00 li r10,0 if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) break; value[i++] = *p++; value[i] = '\0'; ffc041b0: 39 00 00 00 li r8,0 ffc041b4: 48 00 00 30 b ffc041e4 quotes=0; for (i=0 ; *p && i ffc041c0: 41 9e 00 50 beq- cr7,ffc04210 break; value[i++] = *p++; ffc041c4: 39 29 00 01 addi r9,r9,1 ffc041c8: 7c 1f 59 ae stbx r0,r31,r11 value[i] = '\0'; ffc041cc: 7d 2b 4b 78 mr r11,r9 ffc041d0: 7d 1f 49 ae stbx r8,r31,r9 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i ffc041e0: 42 40 00 30 bdz- ffc04210 if ( *p == '\"' ) { ffc041e4: 2f 80 00 22 cmpwi cr7,r0,34 quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) ffc041e8: 71 47 00 01 andi. r7,r10,1 int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) break; value[i++] = *p++; ffc041f0: 39 29 00 01 addi r9,r9,1 ffc041f4: 7c 1f 59 ae stbx r0,r31,r11 const char *p = start; quotes=0; for (i=0 ; *p && i<== ALWAYS TAKEN return NULL; copy_string( p, value, length ); return value; } ffc04210: 80 01 00 14 lwz r0,20(r1) ffc04214: 7f e3 fb 78 mr r3,r31 ffc04218: 83 c1 00 08 lwz r30,8(r1) ffc0421c: 7c 08 03 a6 mtlr r0 ffc04220: 83 e1 00 0c lwz r31,12(r1) ffc04224: 38 21 00 10 addi r1,r1,16 ffc04228: 4e 80 00 20 blr ffc0422c: 80 01 00 14 lwz r0,20(r1) value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); if ( !p ) return NULL; ffc04230: 3b e0 00 00 li r31,0 copy_string( p, value, length ); return value; } ffc04234: 7f e3 fb 78 mr r3,r31 ffc04238: 83 c1 00 08 lwz r30,8(r1) ffc0423c: 7c 08 03 a6 mtlr r0 ffc04240: 83 e1 00 0c lwz r31,12(r1) ffc04244: 38 21 00 10 addi r1,r1,16 ffc04248: 4e 80 00 20 blr =============================================================================== ffc09da4 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { ffc09da4: 94 21 ff d0 stwu r1,-48(r1) ffc09da8: 7c 08 02 a6 mflr r0 ffc09dac: 93 e1 00 2c stw r31,44(r1) ffc09db0: 90 01 00 34 stw r0,52(r1) ffc09db4: 93 61 00 1c stw r27,28(r1) ffc09db8: 7c db 33 78 mr r27,r6 ffc09dbc: 93 81 00 20 stw r28,32(r1) ffc09dc0: 7c 7c 1b 78 mr r28,r3 ffc09dc4: 93 a1 00 24 stw r29,36(r1) ffc09dc8: 7c 9d 23 78 mr r29,r4 ffc09dcc: 93 c1 00 28 stw r30,40(r1) ffc09dd0: 7c be 2b 78 mr r30,r5 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); ffc09dd4: 7f 83 e3 78 mr r3,r28 ffc09dd8: 48 00 07 89 bl ffc0a560 <_Chain_Get> while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( ffc09ddc: 38 80 00 00 li r4,0 rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ffc09de0: 7c 7f 1b 79 mr. r31,r3 ) { rtems_event_set out; sc = rtems_event_receive( ffc09de4: 7f c5 f3 78 mr r5,r30 ffc09de8: 38 c1 00 08 addi r6,r1,8 ffc09dec: 7f a3 eb 78 mr r3,r29 rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ffc09df0: 40 82 00 38 bne- ffc09e28 ) { rtems_event_set out; sc = rtems_event_receive( ffc09df4: 4b ff ef f9 bl ffc08dec ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( ffc09df8: 2c 03 00 00 cmpwi r3,0 ffc09dfc: 41 82 ff d8 beq+ ffc09dd4 <== NEVER TAKEN } *node_ptr = node; return sc; } ffc09e00: 80 01 00 34 lwz r0,52(r1) timeout, &out ); } *node_ptr = node; ffc09e04: 93 fb 00 00 stw r31,0(r27) return sc; } ffc09e08: 7c 08 03 a6 mtlr r0 ffc09e0c: 83 61 00 1c lwz r27,28(r1) ffc09e10: 83 81 00 20 lwz r28,32(r1) ffc09e14: 83 a1 00 24 lwz r29,36(r1) ffc09e18: 83 c1 00 28 lwz r30,40(r1) ffc09e1c: 83 e1 00 2c lwz r31,44(r1) ffc09e20: 38 21 00 30 addi r1,r1,48 ffc09e24: 4e 80 00 20 blr ffc09e28: 80 01 00 34 lwz r0,52(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ffc09e2c: 38 60 00 00 li r3,0 timeout, &out ); } *node_ptr = node; ffc09e30: 93 fb 00 00 stw r31,0(r27) return sc; } ffc09e34: 7c 08 03 a6 mtlr r0 ffc09e38: 83 61 00 1c lwz r27,28(r1) ffc09e3c: 83 81 00 20 lwz r28,32(r1) ffc09e40: 83 a1 00 24 lwz r29,36(r1) ffc09e44: 83 c1 00 28 lwz r30,40(r1) ffc09e48: 83 e1 00 2c lwz r31,44(r1) ffc09e4c: 38 21 00 30 addi r1,r1,48 ffc09e50: 4e 80 00 20 blr =============================================================================== ffc050cc : */ void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc050cc: 94 21 ff 70 stwu r1,-144(r1) ffc050d0: 7c 08 02 a6 mflr r0 ffc050d4: 90 01 00 94 stw r0,148(r1) Timestamp_Control uptime, total, ran, uptime_at_last_reset; #else uint32_t total_units = 0; #endif if ( !print ) ffc050d8: 7c 80 23 79 mr. r0,r4 */ void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc050dc: 93 a1 00 84 stw r29,132(r1) ffc050e0: 7c 7d 1b 78 mr r29,r3 ffc050e4: 92 a1 00 64 stw r21,100(r1) ffc050e8: 92 c1 00 68 stw r22,104(r1) ffc050ec: 92 e1 00 6c stw r23,108(r1) ffc050f0: 93 01 00 70 stw r24,112(r1) ffc050f4: 93 21 00 74 stw r25,116(r1) ffc050f8: 93 41 00 78 stw r26,120(r1) ffc050fc: 93 61 00 7c stw r27,124(r1) ffc05100: 93 81 00 80 stw r28,128(r1) ffc05104: 93 c1 00 88 stw r30,136(r1) ffc05108: 93 e1 00 8c stw r31,140(r1) Timestamp_Control uptime, total, ran, uptime_at_last_reset; #else uint32_t total_units = 0; #endif if ( !print ) ffc0510c: 90 01 00 58 stw r0,88(r1) ffc05110: 41 82 01 e8 beq- ffc052f8 <== NEVER TAKEN * 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__ _Timestamp_Set_to_zero( &total ); uptime_at_last_reset = CPU_usage_Uptime_at_last_reset; ffc05114: 3d 20 00 00 lis r9,0 ffc05118: 39 29 28 94 addi r9,r9,10388 * 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__ _Timestamp_Set_to_zero( &total ); ffc0511c: 38 00 00 00 li r0,0 uptime_at_last_reset = CPU_usage_Uptime_at_last_reset; ffc05120: 81 49 00 00 lwz r10,0(r9) ffc05124: 81 69 00 04 lwz r11,4(r9) } } } #endif (*print)( ffc05128: 3c 80 ff c2 lis r4,-62 * 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__ _Timestamp_Set_to_zero( &total ); ffc0512c: 90 01 00 30 stw r0,48(r1) } } } #endif (*print)( ffc05130: 38 84 15 24 addi r4,r4,5412 ffc05134: 3f 00 00 00 lis r24,0 * 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__ _Timestamp_Set_to_zero( &total ); ffc05138: 90 01 00 34 stw r0,52(r1) } } } #endif (*print)( ffc0513c: 3b 18 30 00 addi r24,r24,12288 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( ffc05140: 3f 40 ff c2 lis r26,-62 } } } #endif (*print)( ffc05144: 80 01 00 58 lwz r0,88(r1) /* * Print the information */ (*print)( context, ffc05148: 3f 60 ff c2 lis r27,-62 * 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__ _Timestamp_Set_to_zero( &total ); uptime_at_last_reset = CPU_usage_Uptime_at_last_reset; ffc0514c: 91 41 00 20 stw r10,32(r1) /* * Print the information */ (*print)( context, ffc05150: 3f 80 10 62 lis r28,4194 } } } #endif (*print)( ffc05154: 7c 09 03 a6 mtctr r0 Thread_Control *the_thread, Timestamp_Control *time_of_context_switch ) { #ifndef RTEMS_SMP if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc05158: 3f 20 00 00 lis r25,0 * 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__ _Timestamp_Set_to_zero( &total ); uptime_at_last_reset = CPU_usage_Uptime_at_last_reset; ffc0515c: 91 61 00 24 stw r11,36(r1) #endif /* * rtems_cpu_usage_report */ void rtems_cpu_usage_report_with_plugin( ffc05160: 3a f8 00 0c addi r23,r24,12 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( ffc05164: 3b 5a 16 98 addi r26,r26,5784 /* * Print the information */ (*print)( context, ffc05168: 3b 7b 16 ac addi r27,r27,5804 ffc0516c: 63 9c 4d d3 ori r28,r28,19923 } } } #endif (*print)( ffc05170: 4c c6 31 82 crclr 4*cr1+eq ffc05174: 4e 80 04 21 bctrl "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) ffc05178: 85 38 00 04 lwzu r9,4(r24) ffc0517c: 2f 89 00 00 cmpwi cr7,r9,0 ffc05180: 41 9e 01 3c beq- cr7,ffc052bc continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; ffc05184: 83 c9 00 04 lwz r30,4(r9) if ( information ) { ffc05188: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0518c: 41 9e 01 30 beq- cr7,ffc052bc <== NEVER TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { ffc05190: a1 7e 00 10 lhz r11,16(r30) ffc05194: 71 60 ff ff andi. r0,r11,65535 ffc05198: 41 82 01 24 beq- ffc052bc <== NEVER TAKEN ffc0519c: 3b e0 00 01 li r31,1 ffc051a0: 48 00 00 70 b ffc05210 Timestamp_Control used; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( &last, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); } else { _TOD_Get_uptime( &uptime ); ffc051a4: 48 00 6f 35 bl ffc0c0d8 <_TOD_Get_uptime> } _Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total ); ffc051a8: 38 61 00 20 addi r3,r1,32 ffc051ac: 38 81 00 38 addi r4,r1,56 ffc051b0: 38 a1 00 30 addi r5,r1,48 ffc051b4: 48 00 9d 49 bl ffc0eefc <_Timespec_Subtract> _Timestamp_Divide( &ran, &total, &ival, &fval ); ffc051b8: 7e a3 ab 78 mr r3,r21 ffc051bc: 38 81 00 30 addi r4,r1,48 ffc051c0: 38 a1 00 0c addi r5,r1,12 ffc051c4: 38 c1 00 08 addi r6,r1,8 ffc051c8: 48 00 9c 29 bl ffc0edf0 <_Timespec_Divide> /* * Print the information */ (*print)( context, ffc051cc: 80 c1 00 2c lwz r6,44(r1) ffc051d0: 80 01 00 58 lwz r0,88(r1) ffc051d4: 7f a3 eb 78 mr r3,r29 ffc051d8: 7c c6 e0 16 mulhwu r6,r6,r28 ffc051dc: 80 a1 00 28 lwz r5,40(r1) ffc051e0: 80 e1 00 0c lwz r7,12(r1) ffc051e4: 7c 09 03 a6 mtctr r0 ffc051e8: 7f 64 db 78 mr r4,r27 ffc051ec: 81 01 00 08 lwz r8,8(r1) ffc051f0: 54 c6 d1 be rlwinm r6,r6,26,6,31 ffc051f4: 4c c6 31 82 crclr 4*cr1+eq ffc051f8: 4e 80 04 21 bctrl ffc051fc: a1 7e 00 10 lhz r11,16(r30) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { ffc05200: 3b ff 00 01 addi r31,r31,1 ffc05204: 55 60 04 3e clrlwi r0,r11,16 ffc05208: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0520c: 41 9c 00 b0 blt- cr7,ffc052bc the_thread = (Thread_Control *)information->local_table[ i ]; ffc05210: 81 3e 00 1c lwz r9,28(r30) ffc05214: 57 e0 10 3a rlwinm r0,r31,2,0,29 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc05218: 38 a1 00 40 addi r5,r1,64 #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; ffc0521c: 7e c9 00 2e lwzx r22,r9,r0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc05220: 38 80 00 0d li r4,13 ffc05224: 3a a1 00 28 addi r21,r1,40 information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) ffc05228: 2f 96 00 00 cmpwi cr7,r22,0 ffc0522c: 41 be ff d4 beq- cr7,ffc05200 <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc05230: 80 76 00 08 lwz r3,8(r22) ffc05234: 48 00 54 15 bl ffc0a648 (*print)( ffc05238: 80 01 00 58 lwz r0,88(r1) ffc0523c: 7f a3 eb 78 mr r3,r29 ffc05240: 80 b6 00 08 lwz r5,8(r22) ffc05244: 7c 09 03 a6 mtctr r0 ffc05248: 7f 44 d3 78 mr r4,r26 ffc0524c: 38 c1 00 40 addi r6,r1,64 ffc05250: 4c c6 31 82 crclr 4*cr1+eq ffc05254: 4e 80 04 21 bctrl Thread_Control *the_thread, Timestamp_Control *time_of_context_switch ) { #ifndef RTEMS_SMP if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc05258: 39 39 32 18 addi r9,r25,12824 ffc0525c: 81 69 00 0c lwz r11,12(r9) Timestamp_Control used; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( &last, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); } else { _TOD_Get_uptime( &uptime ); ffc05260: 38 61 00 38 addi r3,r1,56 Thread_Control *the_thread, Timestamp_Control *time_of_context_switch ) { #ifndef RTEMS_SMP if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc05264: 81 16 00 08 lwz r8,8(r22) ffc05268: 80 0b 00 08 lwz r0,8(r11) /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; ffc0526c: 81 56 00 84 lwz r10,132(r22) Thread_Control *the_thread, Timestamp_Control *time_of_context_switch ) { #ifndef RTEMS_SMP if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc05270: 7f 88 00 00 cmpw cr7,r8,r0 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; ffc05274: 81 76 00 88 lwz r11,136(r22) ffc05278: 91 41 00 28 stw r10,40(r1) ffc0527c: 91 61 00 2c stw r11,44(r1) Thread_Control *the_thread, Timestamp_Control *time_of_context_switch ) { #ifndef RTEMS_SMP if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc05280: 40 9e ff 24 bne+ cr7,ffc051a4 *time_of_context_switch = _Thread_Time_of_last_context_switch; ffc05284: 81 49 00 1c lwz r10,28(r9) ran = the_thread->cpu_time_used; if ( is_executing_on_a_core( the_thread, &last ) ) { Timestamp_Control used; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( &last, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); ffc05288: 3a a1 00 28 addi r21,r1,40 Timestamp_Control *time_of_context_switch ) { #ifndef RTEMS_SMP if ( _Thread_Executing->Object.id == the_thread->Object.id ) { *time_of_context_switch = _Thread_Time_of_last_context_switch; ffc0528c: 81 69 00 20 lwz r11,32(r9) ffc05290: 91 41 00 18 stw r10,24(r1) ffc05294: 91 61 00 1c stw r11,28(r1) * since the last context switch. */ ran = the_thread->cpu_time_used; if ( is_executing_on_a_core( the_thread, &last ) ) { Timestamp_Control used; _TOD_Get_uptime( &uptime ); ffc05298: 48 00 6e 41 bl ffc0c0d8 <_TOD_Get_uptime> _Timestamp_Subtract( &last, &uptime, &used ); ffc0529c: 38 61 00 18 addi r3,r1,24 ffc052a0: 38 81 00 38 addi r4,r1,56 ffc052a4: 38 a1 00 10 addi r5,r1,16 ffc052a8: 48 00 9c 55 bl ffc0eefc <_Timespec_Subtract> _Timestamp_Add_to( &ran, &used ); ffc052ac: 7e a3 ab 78 mr r3,r21 ffc052b0: 38 81 00 10 addi r4,r1,16 ffc052b4: 48 00 9a e1 bl ffc0ed94 <_Timespec_Add_to> ffc052b8: 4b ff fe f0 b ffc051a8 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc052bc: 7f 98 b8 00 cmpw cr7,r24,r23 ffc052c0: 40 9e fe b8 bne+ cr7,ffc05178 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( ffc052c4: 3c 00 10 62 lis r0,4194 ffc052c8: 80 c1 00 34 lwz r6,52(r1) ffc052cc: 60 00 4d d3 ori r0,r0,19923 ffc052d0: 80 a1 00 30 lwz r5,48(r1) ffc052d4: 7c c6 00 16 mulhwu r6,r6,r0 ffc052d8: 80 01 00 58 lwz r0,88(r1) ffc052dc: 3c 80 ff c2 lis r4,-62 ffc052e0: 7c 09 03 a6 mtctr r0 ffc052e4: 7f a3 eb 78 mr r3,r29 ffc052e8: 38 84 16 c4 addi r4,r4,5828 ffc052ec: 54 c6 d1 be rlwinm r6,r6,26,6,31 ffc052f0: 4c c6 31 82 crclr 4*cr1+eq ffc052f4: 4e 80 04 21 bctrl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } ffc052f8: 80 01 00 94 lwz r0,148(r1) ffc052fc: 82 a1 00 64 lwz r21,100(r1) ffc05300: 7c 08 03 a6 mtlr r0 ffc05304: 82 c1 00 68 lwz r22,104(r1) ffc05308: 82 e1 00 6c lwz r23,108(r1) ffc0530c: 83 01 00 70 lwz r24,112(r1) ffc05310: 83 21 00 74 lwz r25,116(r1) ffc05314: 83 41 00 78 lwz r26,120(r1) ffc05318: 83 61 00 7c lwz r27,124(r1) ffc0531c: 83 81 00 80 lwz r28,128(r1) ffc05320: 83 a1 00 84 lwz r29,132(r1) ffc05324: 83 c1 00 88 lwz r30,136(r1) ffc05328: 83 e1 00 8c lwz r31,140(r1) ffc0532c: 38 21 00 90 addi r1,r1,144 ffc05330: 4e 80 00 20 blr =============================================================================== ffc129e8 : [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { ffc129e8: 94 21 ff f0 stwu r1,-16(r1) ffc129ec: 7c 08 02 a6 mflr r0 ffc129f0: 90 01 00 14 stw r0,20(r1) if (sc == RTEMS_SUCCESSFUL) { ffc129f4: 7c 60 1b 79 mr. r0,r3 return 0; ffc129f8: 38 60 00 00 li r3,0 [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { ffc129fc: 93 e1 00 0c stw r31,12(r1) if (sc == RTEMS_SUCCESSFUL) { ffc12a00: 40 82 00 18 bne- ffc12a18 errno = eno; return -1; } } ffc12a04: 80 01 00 14 lwz r0,20(r1) ffc12a08: 83 e1 00 0c lwz r31,12(r1) ffc12a0c: 38 21 00 10 addi r1,r1,16 ffc12a10: 7c 08 03 a6 mtlr r0 ffc12a14: 4e 80 00 20 blr if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { ffc12a18: 2b 80 00 1c cmplwi cr7,r0,28 int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; ffc12a1c: 3b e0 00 16 li r31,22 if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { ffc12a20: 41 9d 00 14 bgt- cr7,ffc12a34 <== NEVER TAKEN eno = status_code_to_errno [sc]; ffc12a24: 3d 20 ff c2 lis r9,-62 ffc12a28: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc12a2c: 39 29 f6 38 addi r9,r9,-2504 ffc12a30: 7f e9 00 2e lwzx r31,r9,r0 } errno = eno; ffc12a34: 48 00 00 2d bl ffc12a60 <__errno> ffc12a38: 93 e3 00 00 stw r31,0(r3) return -1; ffc12a3c: 38 60 ff ff li r3,-1 ffc12a40: 4b ff ff c4 b ffc12a04 =============================================================================== ffc04d58 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { ffc04d58: 94 21 ff 88 stwu r1,-120(r1) ffc04d5c: 7c 08 02 a6 mflr r0 ffc04d60: 93 e1 00 74 stw r31,116(r1) ffc04d64: 7c 7f 1b 78 mr r31,r3 ffc04d68: 90 01 00 7c stw r0,124(r1) ffc04d6c: 90 a1 00 18 stw r5,24(r1) ffc04d70: 90 c1 00 1c stw r6,28(r1) ffc04d74: 90 e1 00 20 stw r7,32(r1) ffc04d78: 91 01 00 24 stw r8,36(r1) ffc04d7c: 91 21 00 28 stw r9,40(r1) ffc04d80: 91 41 00 2c stw r10,44(r1) ffc04d84: 40 86 00 24 bne- cr1,ffc04da8 <== ALWAYS TAKEN ffc04d88: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc04d8c: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc04d90: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc04d94: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc04d98: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc04d9c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc04da0: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc04da4: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); ffc04da8: 38 00 00 02 li r0,2 ffc04dac: 98 01 00 08 stb r0,8(r1) ffc04db0: 38 00 00 00 li r0,0 chars_written = rtems_verror(error_flag, printf_format, arglist); ffc04db4: 7f e3 fb 78 mr r3,r31 ) { va_list arglist; int chars_written; va_start(arglist, printf_format); ffc04db8: 98 01 00 09 stb r0,9(r1) ffc04dbc: 38 01 00 80 addi r0,r1,128 chars_written = rtems_verror(error_flag, printf_format, arglist); ffc04dc0: 38 a1 00 08 addi r5,r1,8 ) { va_list arglist; int chars_written; va_start(arglist, printf_format); ffc04dc4: 90 01 00 0c stw r0,12(r1) ffc04dc8: 38 01 00 10 addi r0,r1,16 ffc04dcc: 90 01 00 10 stw r0,16(r1) chars_written = rtems_verror(error_flag, printf_format, arglist); ffc04dd0: 4b ff fd d1 bl ffc04ba0 va_end(arglist); if (error_flag & RTEMS_ERROR_PANIC) { ffc04dd4: 77 e0 20 00 andis. r0,r31,8192 ffc04dd8: 40 82 00 20 bne- ffc04df8 rtems_error(0, "fatal error, exiting"); _exit(errno); } if (error_flag & RTEMS_ERROR_ABORT) { ffc04ddc: 77 e0 10 00 andis. r0,r31,4096 ffc04de0: 40 82 00 38 bne- ffc04e18 rtems_error(0, "fatal error, aborting"); abort(); } return chars_written; } ffc04de4: 80 01 00 7c lwz r0,124(r1) ffc04de8: 83 e1 00 74 lwz r31,116(r1) ffc04dec: 38 21 00 78 addi r1,r1,120 ffc04df0: 7c 08 03 a6 mtlr r0 ffc04df4: 4e 80 00 20 blr va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); va_end(arglist); if (error_flag & RTEMS_ERROR_PANIC) { rtems_error(0, "fatal error, exiting"); ffc04df8: 3c 80 ff c2 lis r4,-62 ffc04dfc: 38 84 ef bc addi r4,r4,-4164 ffc04e00: 38 60 00 00 li r3,0 ffc04e04: 4c c6 31 82 crclr 4*cr1+eq ffc04e08: 4b ff ff 51 bl ffc04d58 _exit(errno); ffc04e0c: 48 00 dc 55 bl ffc12a60 <__errno> ffc04e10: 80 63 00 00 lwz r3,0(r3) ffc04e14: 48 00 0e 59 bl ffc05c6c <_exit> } if (error_flag & RTEMS_ERROR_ABORT) { rtems_error(0, "fatal error, aborting"); ffc04e18: 3c 80 ff c2 lis r4,-62 ffc04e1c: 38 84 ef d4 addi r4,r4,-4140 ffc04e20: 38 60 00 00 li r3,0 ffc04e24: 4c c6 31 82 crclr 4*cr1+eq ffc04e28: 4b ff ff 31 bl ffc04d58 abort(); ffc04e2c: 48 00 dc 19 bl ffc12a44 =============================================================================== ffc04ff4 : int rtems_filesystem_dirname( const char *pathname ) { ffc04ff4: 94 21 ff f0 stwu r1,-16(r1) ffc04ff8: 7c 08 02 a6 mflr r0 ffc04ffc: 93 c1 00 08 stw r30,8(r1) ffc05000: 7c 7e 1b 78 mr r30,r3 ffc05004: 93 e1 00 0c stw r31,12(r1) ffc05008: 90 01 00 14 stw r0,20(r1) int len = strlen( pathname ); ffc0500c: 48 00 f3 81 bl ffc1438c while ( len ) { ffc05010: 7c 7f 1b 79 mr. r31,r3 ffc05014: 40 a2 00 0c bne+ ffc05020 <== ALWAYS TAKEN ffc05018: 48 00 00 20 b ffc05038 <== NOT EXECUTED ffc0501c: 41 9a 00 1c beq- cr6,ffc05038 len--; ffc05020: 3b ff ff ff addi r31,r31,-1 if ( rtems_filesystem_is_separator( pathname[len] ) ) ffc05024: 7c 7e f8 ae lbzx r3,r30,r31 ffc05028: 48 00 14 2d bl ffc06454 const char *pathname ) { int len = strlen( pathname ); while ( len ) { ffc0502c: 2f 1f 00 00 cmpwi cr6,r31,0 len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) ffc05030: 2f 83 00 00 cmpwi cr7,r3,0 ffc05034: 41 9e ff e8 beq+ cr7,ffc0501c break; } return len; } ffc05038: 80 01 00 14 lwz r0,20(r1) ffc0503c: 7f e3 fb 78 mr r3,r31 ffc05040: 83 c1 00 08 lwz r30,8(r1) ffc05044: 7c 08 03 a6 mtlr r0 ffc05048: 83 e1 00 0c lwz r31,12(r1) ffc0504c: 38 21 00 10 addi r1,r1,16 ffc05050: 4e 80 00 20 blr =============================================================================== ffc0f7b4 : find_arg fa = { .type = type, .mount_h = NULL }; if ( type != NULL ) { ffc0f7b4: 2f 83 00 00 cmpwi cr7,r3,0 rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { ffc0f7b8: 94 21 ff e8 stwu r1,-24(r1) ffc0f7bc: 7c 08 02 a6 mflr r0 find_arg fa = { ffc0f7c0: 90 61 00 08 stw r3,8(r1) .type = type, .mount_h = NULL }; if ( type != NULL ) { ffc0f7c4: 38 60 00 00 li r3,0 rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { ffc0f7c8: 90 01 00 1c stw r0,28(r1) find_arg fa = { ffc0f7cc: 38 00 00 00 li r0,0 ffc0f7d0: 90 01 00 0c stw r0,12(r1) .type = type, .mount_h = NULL }; if ( type != NULL ) { ffc0f7d4: 41 9e 00 18 beq- cr7,ffc0f7ec <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); ffc0f7d8: 3c 60 ff c1 lis r3,-63 ffc0f7dc: 38 63 f6 48 addi r3,r3,-2488 ffc0f7e0: 38 81 00 08 addi r4,r1,8 ffc0f7e4: 4b ff fe bd bl ffc0f6a0 ffc0f7e8: 80 61 00 0c lwz r3,12(r1) } return fa.mount_h; } ffc0f7ec: 80 01 00 1c lwz r0,28(r1) ffc0f7f0: 38 21 00 18 addi r1,r1,24 ffc0f7f4: 7c 08 03 a6 mtlr r0 ffc0f7f8: 4e 80 00 20 blr =============================================================================== ffc049b0 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc049b0: 94 21 ff d0 stwu r1,-48(r1) ffc049b4: 7c 08 02 a6 mflr r0 rtems_filesystem_umask = 022; /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) ffc049b8: 3d 20 00 00 lis r9,0 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc049bc: 90 01 00 34 stw r0,52(r1) rtems_filesystem_umask = 022; /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) ffc049c0: 80 09 26 f0 lwz r0,9968(r9) * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc049c4: 93 e1 00 2c stw r31,44(r1) /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; ffc049c8: 3f e0 00 00 lis r31,0 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) ffc049cc: 2f 80 00 00 cmpwi cr7,r0,0 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; ffc049d0: 81 3f 27 3c lwz r9,10044(r31) ffc049d4: 38 00 00 12 li r0,18 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc049d8: 93 c1 00 28 stw r30,40(r1) /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; ffc049dc: 90 09 00 2c stw r0,44(r9) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) ffc049e0: 41 9e 00 f8 beq- cr7,ffc04ad8 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; ffc049e4: 3d 20 00 00 lis r9,0 ffc049e8: 81 29 26 f4 lwz r9,9972(r9) status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); ffc049ec: 38 e0 00 00 li r7,0 ffc049f0: 80 69 00 08 lwz r3,8(r9) ffc049f4: 80 89 00 0c lwz r4,12(r9) ffc049f8: 80 a9 00 00 lwz r5,0(r9) ffc049fc: 80 c9 00 04 lwz r6,4(r9) ffc04a00: 48 00 0e 51 bl ffc05850 if ( status == -1 ) ffc04a04: 2f 83 ff ff cmpwi cr7,r3,-1 ffc04a08: 41 9e 00 e8 beq- cr7,ffc04af0 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; ffc04a0c: 81 3f 27 3c lwz r9,10044(r31) ffc04a10: 38 00 00 00 li r0,0 * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04a14: 3f c0 ff c2 lis r30,-62 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; ffc04a18: b0 09 00 30 sth r0,48(r9) * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04a1c: 3b de ee 14 addi r30,r30,-4588 ffc04a20: 38 80 00 01 li r4,1 ffc04a24: 38 a0 00 00 li r5,0 ffc04a28: 38 c1 00 08 addi r6,r1,8 ffc04a2c: 38 e0 00 00 li r7,0 ffc04a30: 7f c3 f3 78 mr r3,r30 ffc04a34: 48 00 05 45 bl ffc04f78 rtems_filesystem_root = loc; ffc04a38: 81 3f 27 3c lwz r9,10044(r31) ffc04a3c: 80 01 00 08 lwz r0,8(r1) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04a40: 38 80 00 01 li r4,1 ffc04a44: 38 a0 00 00 li r5,0 * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc04a48: 90 09 00 18 stw r0,24(r9) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04a4c: 38 c1 00 08 addi r6,r1,8 ffc04a50: 38 e0 00 00 li r7,0 * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc04a54: 80 01 00 0c lwz r0,12(r1) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04a58: 7f c3 f3 78 mr r3,r30 * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc04a5c: 90 09 00 1c stw r0,28(r9) ffc04a60: 80 01 00 10 lwz r0,16(r1) ffc04a64: 90 09 00 20 stw r0,32(r9) ffc04a68: 80 01 00 14 lwz r0,20(r1) ffc04a6c: 90 09 00 24 stw r0,36(r9) ffc04a70: 80 01 00 18 lwz r0,24(r1) ffc04a74: 90 09 00 28 stw r0,40(r9) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04a78: 48 00 05 01 bl ffc04f78 rtems_filesystem_current = loc; ffc04a7c: 81 3f 27 3c lwz r9,10044(r31) ffc04a80: 80 01 00 08 lwz r0,8(r1) * * 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); ffc04a84: 3c 60 ff c2 lis r3,-62 ffc04a88: 38 63 ee 18 addi r3,r3,-4584 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; ffc04a8c: 90 09 00 04 stw r0,4(r9) * * 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); ffc04a90: 38 80 01 ff li r4,511 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; ffc04a94: 80 01 00 0c lwz r0,12(r1) ffc04a98: 90 09 00 08 stw r0,8(r9) ffc04a9c: 80 01 00 10 lwz r0,16(r1) ffc04aa0: 90 09 00 0c stw r0,12(r9) ffc04aa4: 80 01 00 14 lwz r0,20(r1) ffc04aa8: 90 09 00 10 stw r0,16(r9) ffc04aac: 80 01 00 18 lwz r0,24(r1) ffc04ab0: 90 09 00 14 stw r0,20(r9) * * 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); ffc04ab4: 48 00 0b 9d bl ffc05650 if ( status != 0 ) ffc04ab8: 2f 83 00 00 cmpwi cr7,r3,0 ffc04abc: 40 9e 00 28 bne- cr7,ffc04ae4 <== 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. */ } ffc04ac0: 80 01 00 34 lwz r0,52(r1) ffc04ac4: 83 c1 00 28 lwz r30,40(r1) ffc04ac8: 7c 08 03 a6 mtlr r0 ffc04acc: 83 e1 00 2c lwz r31,44(r1) ffc04ad0: 38 21 00 30 addi r1,r1,48 ffc04ad4: 4e 80 00 20 blr /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); ffc04ad8: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc04adc: 60 63 00 01 ori r3,r3,1 <== NOT EXECUTED ffc04ae0: 48 00 51 c1 bl ffc09ca0 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); ffc04ae4: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc04ae8: 60 63 00 03 ori r3,r3,3 <== NOT EXECUTED ffc04aec: 48 00 51 b5 bl ffc09ca0 <== 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 ); ffc04af0: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc04af4: 60 63 00 02 ori r3,r3,2 <== NOT EXECUTED ffc04af8: 48 00 51 a9 bl ffc09ca0 <== NOT EXECUTED =============================================================================== ffc0f6a0 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { ffc0f6a0: 94 21 ff d8 stwu r1,-40(r1) ffc0f6a4: 7c 08 02 a6 mflr r0 ffc0f6a8: 93 a1 00 1c stw r29,28(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 ) { ffc0f6ac: 3f a0 ff c2 lis r29,-62 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { ffc0f6b0: 90 01 00 2c stw r0,44(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 ) { ffc0f6b4: 80 1d e1 08 lwz r0,-7928(r29) ffc0f6b8: 3b bd e1 08 addi r29,r29,-7928 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { ffc0f6bc: 93 e1 00 24 stw r31,36(r1) ffc0f6c0: 7c 9f 23 78 mr r31,r4 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { ffc0f6c4: 2f 80 00 00 cmpwi cr7,r0,0 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { ffc0f6c8: 93 61 00 14 stw r27,20(r1) ffc0f6cc: 93 81 00 18 stw r28,24(r1) ffc0f6d0: 93 c1 00 20 stw r30,32(r1) ffc0f6d4: 90 61 00 08 stw r3,8(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 ) { ffc0f6d8: 41 9e 00 4c beq- cr7,ffc0f724 <== NEVER TAKEN ffc0f6dc: 7f be eb 78 mr r30,r29 ffc0f6e0: 3b 9d 00 08 addi r28,r29,8 ffc0f6e4: 48 00 00 08 b ffc0f6ec ffc0f6e8: 40 9a 00 a4 bne- cr6,ffc0f78c stop = (*routine)( table_entry, routine_arg ); ffc0f6ec: 80 01 00 08 lwz r0,8(r1) ffc0f6f0: 7f c3 f3 78 mr r3,r30 ffc0f6f4: 7f e4 fb 78 mr r4,r31 ffc0f6f8: 7c 09 03 a6 mtctr r0 ffc0f6fc: 4e 80 04 21 bctrl rtems_filesystem_table_t entry; } filesystem_node; static RTEMS_CHAIN_DEFINE_EMPTY(filesystem_chain); bool rtems_filesystem_iterate( ffc0f700: 7c 1d f0 50 subf r0,r29,r30 { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { ffc0f704: 7c 1c 00 2e lwzx r0,r28,r0 stop = (*routine)( table_entry, routine_arg ); ffc0f708: 7c 7b 1b 78 mr r27,r3 { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { ffc0f70c: 2f 03 00 00 cmpwi cr6,r3,0 ffc0f710: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f714: 3b de 00 08 addi r30,r30,8 ffc0f718: 40 9e ff d0 bne+ cr7,ffc0f6e8 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { ffc0f71c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0f720: 40 9e 00 6c bne- cr7,ffc0f78c 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 ); ffc0f724: 3f c0 00 00 lis r30,0 ffc0f728: 80 7e 27 b4 lwz r3,10164(r30) ffc0f72c: 38 80 00 00 li r4,0 ffc0f730: 38 a0 00 00 li r5,0 ffc0f734: 4b ff 9c 09 bl ffc0933c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0f738: 3d 20 00 00 lis r9,0 ffc0f73c: 3b 89 21 b8 addi r28,r9,8632 ffc0f740: 83 a9 21 b8 lwz r29,8632(r9) RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc0f744: 3b 9c 00 04 addi r28,r28,4 rtems_libio_lock(); for ( ffc0f748: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0f74c: 3b 60 00 00 li r27,0 ffc0f750: 40 be 00 0c bne+ cr7,ffc0f75c ffc0f754: 48 00 00 30 b ffc0f784 node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; ffc0f758: 40 9a 00 2c bne- cr6,ffc0f784 <== NEVER TAKEN node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); ffc0f75c: 80 01 00 08 lwz r0,8(r1) ffc0f760: 38 7d 00 08 addi r3,r29,8 ffc0f764: 7f e4 fb 78 mr r4,r31 ffc0f768: 7c 09 03 a6 mtctr r0 ffc0f76c: 4e 80 04 21 bctrl } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0f770: 83 bd 00 00 lwz r29,0(r29) !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 ); ffc0f774: 7c 7b 1b 78 mr r27,r3 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( ffc0f778: 7f 9d e0 00 cmpw cr7,r29,r28 node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; ffc0f77c: 2f 03 00 00 cmpwi cr6,r3,0 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( ffc0f780: 40 9e ff d8 bne+ cr7,ffc0f758 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0f784: 80 7e 27 b4 lwz r3,10164(r30) ffc0f788: 4b ff 9d 41 bl ffc094c8 } rtems_libio_unlock(); } return stop; } ffc0f78c: 80 01 00 2c lwz r0,44(r1) ffc0f790: 7f 63 db 78 mr r3,r27 ffc0f794: 83 81 00 18 lwz r28,24(r1) ffc0f798: 7c 08 03 a6 mtlr r0 ffc0f79c: 83 61 00 14 lwz r27,20(r1) ffc0f7a0: 83 a1 00 1c lwz r29,28(r1) ffc0f7a4: 83 c1 00 20 lwz r30,32(r1) ffc0f7a8: 83 e1 00 24 lwz r31,36(r1) ffc0f7ac: 38 21 00 28 addi r1,r1,40 ffc0f7b0: 4e 80 00 20 blr =============================================================================== ffc05798 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { ffc05798: 94 21 ff d8 stwu r1,-40(r1) ffc0579c: 7c 08 02 a6 mflr r0 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 ); ffc057a0: 38 a0 00 00 li r5,0 ffc057a4: 93 c1 00 20 stw r30,32(r1) ffc057a8: 3f c0 00 00 lis r30,0 ffc057ac: 90 61 00 08 stw r3,8(r1) ffc057b0: 80 7e 27 b4 lwz r3,10164(r30) ffc057b4: 93 e1 00 24 stw r31,36(r1) ffc057b8: 7c 9f 23 78 mr r31,r4 ffc057bc: 38 80 00 00 li r4,0 ffc057c0: 93 61 00 14 stw r27,20(r1) rtems_chain_node *node = NULL; bool stop = false; ffc057c4: 3b 60 00 00 li r27,0 bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { ffc057c8: 93 81 00 18 stw r28,24(r1) ffc057cc: 93 a1 00 1c stw r29,28(r1) ffc057d0: 90 01 00 2c stw r0,44(r1) ffc057d4: 48 00 3b 69 bl ffc0933c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc057d8: 3d 20 00 00 lis r9,0 ffc057dc: 3b 89 21 9c addi r28,r9,8604 ffc057e0: 83 a9 21 9c lwz r29,8604(r9) RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc057e4: 3b 9c 00 04 addi r28,r28,4 rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( ffc057e8: 7f 9d e0 00 cmpw cr7,r29,r28 ffc057ec: 40 be 00 0c bne+ cr7,ffc057f8 <== ALWAYS TAKEN ffc057f0: 48 00 00 30 b ffc05820 <== NOT EXECUTED node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; ffc057f4: 40 9a 00 2c bne- cr6,ffc05820 <== 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 ); ffc057f8: 80 01 00 08 lwz r0,8(r1) ffc057fc: 7f a3 eb 78 mr r3,r29 ffc05800: 7f e4 fb 78 mr r4,r31 ffc05804: 7c 09 03 a6 mtctr r0 ffc05808: 4e 80 04 21 bctrl } rtems_libio_unlock(); return stop; } ffc0580c: 83 bd 00 00 lwz r29,0(r29) 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 ); ffc05810: 7c 7b 1b 78 mr r27,r3 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( ffc05814: 7f 9d e0 00 cmpw cr7,r29,r28 node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; ffc05818: 2f 03 00 00 cmpwi cr6,r3,0 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( ffc0581c: 40 9e ff d8 bne+ cr7,ffc057f4 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc05820: 80 7e 27 b4 lwz r3,10164(r30) ffc05824: 48 00 3c a5 bl ffc094c8 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } ffc05828: 80 01 00 2c lwz r0,44(r1) ffc0582c: 7f 63 db 78 mr r3,r27 ffc05830: 83 81 00 18 lwz r28,24(r1) ffc05834: 7c 08 03 a6 mtlr r0 ffc05838: 83 61 00 14 lwz r27,20(r1) ffc0583c: 83 a1 00 1c lwz r29,28(r1) ffc05840: 83 c1 00 20 lwz r30,32(r1) ffc05844: 83 e1 00 24 lwz r31,36(r1) ffc05848: 38 21 00 28 addi r1,r1,40 ffc0584c: 4e 80 00 20 blr =============================================================================== ffc05054 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { ffc05054: 94 21 ff e8 stwu r1,-24(r1) ffc05058: 7c 08 02 a6 mflr r0 ffc0505c: 93 a1 00 0c stw r29,12(r1) ffc05060: 7c 9d 23 78 mr r29,r4 ffc05064: 93 c1 00 10 stw r30,16(r1) ffc05068: 7c 7e 1b 78 mr r30,r3 ffc0506c: 93 e1 00 14 stw r31,20(r1) /* * Eat any separators at start of the path. */ int stripped = 0; ffc05070: 3b e0 00 00 li r31,0 int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { ffc05074: 90 01 00 1c stw r0,28(r1) /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) ffc05078: 88 63 00 00 lbz r3,0(r3) ffc0507c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05080: 41 9e 00 34 beq- cr7,ffc050b4 <== NEVER TAKEN ffc05084: 2f 84 00 00 cmpwi cr7,r4,0 ffc05088: 40 be 00 20 bne+ cr7,ffc050a8 <== ALWAYS TAKEN ffc0508c: 48 00 00 28 b ffc050b4 <== NOT EXECUTED ffc05090: 8c 7e 00 01 lbzu r3,1(r30) { pathname++; pathnamelen--; stripped++; ffc05094: 3b ff 00 01 addi r31,r31,1 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) ffc05098: 7f 1d f8 00 cmpw cr6,r29,r31 ffc0509c: 2f 83 00 00 cmpwi cr7,r3,0 ffc050a0: 41 9e 00 14 beq- cr7,ffc050b4 <== NEVER TAKEN ffc050a4: 41 9a 00 10 beq- cr6,ffc050b4 <== NEVER TAKEN ffc050a8: 48 00 13 ad bl ffc06454 ffc050ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc050b0: 40 9e ff e0 bne+ cr7,ffc05090 pathname++; pathnamelen--; stripped++; } return stripped; } ffc050b4: 80 01 00 1c lwz r0,28(r1) ffc050b8: 7f e3 fb 78 mr r3,r31 ffc050bc: 83 a1 00 0c lwz r29,12(r1) ffc050c0: 7c 08 03 a6 mtlr r0 ffc050c4: 83 c1 00 10 lwz r30,16(r1) ffc050c8: 83 e1 00 14 lwz r31,20(r1) ffc050cc: 38 21 00 18 addi r1,r1,24 ffc050d0: 4e 80 00 20 blr =============================================================================== ffc0f914 : int rtems_filesystem_unregister( const char *type ) { ffc0f914: 94 21 ff e8 stwu r1,-24(r1) ffc0f918: 7c 08 02 a6 mflr r0 ffc0f91c: 93 e1 00 14 stw r31,20(r1) rtems_chain_node *node = NULL; if ( type == NULL ) { ffc0f920: 7c 7f 1b 79 mr. r31,r3 int rtems_filesystem_unregister( const char *type ) { ffc0f924: 90 01 00 1c stw r0,28(r1) ffc0f928: 93 81 00 08 stw r28,8(r1) ffc0f92c: 93 a1 00 0c stw r29,12(r1) ffc0f930: 93 c1 00 10 stw r30,16(r1) rtems_chain_node *node = NULL; if ( type == NULL ) { ffc0f934: 41 82 00 c8 beq- ffc0f9fc 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 ); ffc0f938: 3f c0 00 00 lis r30,0 ffc0f93c: 80 7e 27 b4 lwz r3,10164(r30) ffc0f940: 38 80 00 00 li r4,0 ffc0f944: 38 a0 00 00 li r5,0 ffc0f948: 4b ff 99 f5 bl ffc0933c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0f94c: 3d 20 00 00 lis r9,0 ffc0f950: 3b 89 21 b8 addi r28,r9,8632 ffc0f954: 83 a9 21 b8 lwz r29,8632(r9) RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc0f958: 3b 9c 00 04 addi r28,r28,4 rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( ffc0f95c: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0f960: 40 be 00 14 bne+ cr7,ffc0f974 ffc0f964: 48 00 00 60 b ffc0f9c4 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0f968: 83 bd 00 00 lwz r29,0(r29) if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( ffc0f96c: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0f970: 41 9e 00 54 beq- cr7,ffc0f9c4 <== 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 ) { ffc0f974: 80 7d 00 08 lwz r3,8(r29) ffc0f978: 7f e4 fb 78 mr r4,r31 ffc0f97c: 48 00 44 35 bl ffc13db0 ffc0f980: 2f 83 00 00 cmpwi cr7,r3,0 ffc0f984: 40 9e ff e4 bne+ cr7,ffc0f968 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc0f988: 7f a3 eb 78 mr r3,r29 ffc0f98c: 4b ff a7 99 bl ffc0a124 <_Chain_Extract> rtems_chain_extract( node ); free( fsn ); ffc0f990: 7f a3 eb 78 mr r3,r29 ffc0f994: 4b ff 57 6d bl ffc05100 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0f998: 80 7e 27 b4 lwz r3,10164(r30) ffc0f99c: 4b ff 9b 2d bl ffc094c8 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0f9a0: 80 01 00 1c lwz r0,28(r1) if ( strcmp( fsn->entry.type, type ) == 0 ) { rtems_chain_extract( node ); free( fsn ); rtems_libio_unlock(); return 0; ffc0f9a4: 38 60 00 00 li r3,0 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0f9a8: 83 81 00 08 lwz r28,8(r1) ffc0f9ac: 7c 08 03 a6 mtlr r0 ffc0f9b0: 83 a1 00 0c lwz r29,12(r1) ffc0f9b4: 83 c1 00 10 lwz r30,16(r1) ffc0f9b8: 83 e1 00 14 lwz r31,20(r1) ffc0f9bc: 38 21 00 18 addi r1,r1,24 ffc0f9c0: 4e 80 00 20 blr ffc0f9c4: 80 7e 27 b4 lwz r3,10164(r30) ffc0f9c8: 4b ff 9b 01 bl ffc094c8 return 0; } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); ffc0f9cc: 48 00 30 95 bl ffc12a60 <__errno> ffc0f9d0: 38 00 00 02 li r0,2 ffc0f9d4: 90 03 00 00 stw r0,0(r3) ffc0f9d8: 38 60 ff ff li r3,-1 } ffc0f9dc: 80 01 00 1c lwz r0,28(r1) ffc0f9e0: 83 81 00 08 lwz r28,8(r1) ffc0f9e4: 7c 08 03 a6 mtlr r0 ffc0f9e8: 83 a1 00 0c lwz r29,12(r1) ffc0f9ec: 83 c1 00 10 lwz r30,16(r1) ffc0f9f0: 83 e1 00 14 lwz r31,20(r1) ffc0f9f4: 38 21 00 18 addi r1,r1,24 ffc0f9f8: 4e 80 00 20 blr ) { rtems_chain_node *node = NULL; if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); ffc0f9fc: 48 00 30 65 bl ffc12a60 <__errno> ffc0fa00: 38 00 00 16 li r0,22 ffc0fa04: 90 03 00 00 stw r0,0(r3) ffc0fa08: 38 60 ff ff li r3,-1 ffc0fa0c: 4b ff ff d0 b ffc0f9dc =============================================================================== ffc057c0 : int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { ffc057c0: 94 21 ff e8 stwu r1,-24(r1) ffc057c4: 7c 08 02 a6 mflr r0 ffc057c8: 93 a1 00 0c stw r29,12(r1) ffc057cc: 7c 7d 1b 78 mr r29,r3 * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); ffc057d0: 38 60 00 08 li r3,8 } return 0; } int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { ffc057d4: 90 01 00 1c stw r0,28(r1) ffc057d8: 93 c1 00 10 stw r30,16(r1) ffc057dc: 7c 9e 23 78 mr r30,r4 ffc057e0: 93 e1 00 14 stw r31,20(r1) * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); ffc057e4: 48 00 05 9d bl ffc05d80 ffc057e8: 7c 7f 1b 78 mr r31,r3 *key = new_key; ffc057ec: 90 7d 00 00 stw r3,0(r29) new_key->val = NULL; ffc057f0: 38 00 00 00 li r0,0 "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); ffc057f4: 38 60 00 00 li r3,0 ffc057f8: 7f e4 fb 78 mr r4,r31 * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); *key = new_key; new_key->val = NULL; ffc057fc: 90 1f 00 00 stw r0,0(r31) "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); ffc05800: 7f c5 f3 78 mr r5,r30 */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); *key = new_key; new_key->val = NULL; new_key->dtor = dtor; ffc05804: 93 df 00 04 stw r30,4(r31) "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); ffc05808: 48 00 4b d5 bl ffc0a3dc if ( status == RTEMS_SUCCESSFUL ) ffc0580c: 2f 83 00 00 cmpwi cr7,r3,0 return 0; ffc05810: 38 60 00 00 li r3,0 ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); if ( status == RTEMS_SUCCESSFUL ) ffc05814: 40 9e 00 20 bne- cr7,ffc05834 <== NEVER TAKEN return 0; free( new_key ); return -1; } ffc05818: 80 01 00 1c lwz r0,28(r1) ffc0581c: 83 a1 00 0c lwz r29,12(r1) ffc05820: 7c 08 03 a6 mtlr r0 ffc05824: 83 c1 00 10 lwz r30,16(r1) ffc05828: 83 e1 00 14 lwz r31,20(r1) ffc0582c: 38 21 00 18 addi r1,r1,24 ffc05830: 4e 80 00 20 blr /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); if ( status == RTEMS_SUCCESSFUL ) return 0; free( new_key ); ffc05834: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05838: 4b ff fd 59 bl ffc05590 <== NOT EXECUTED return -1; ffc0583c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05840: 4b ff ff d8 b ffc05818 <== NOT EXECUTED =============================================================================== ffc05854 : int rtems_gxx_key_delete (__gthread_key_t key) { ffc05854: 94 21 ff f0 stwu r1,-16(r1) ffc05858: 7c 08 02 a6 mflr r0 #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 ); ffc0585c: 7c 64 1b 78 mr r4,r3 key->val = 0; return 0; } int rtems_gxx_key_delete (__gthread_key_t key) { ffc05860: 93 e1 00 0c stw r31,12(r1) ffc05864: 7c 7f 1b 78 mr r31,r3 #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 ); ffc05868: 38 60 00 00 li r3,0 key->val = 0; return 0; } int rtems_gxx_key_delete (__gthread_key_t key) { ffc0586c: 90 01 00 14 stw r0,20(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 ); ffc05870: 48 00 4c 69 bl ffc0a4d8 if ( status == RTEMS_SUCCESSFUL ) { ffc05874: 2f 83 00 00 cmpwi cr7,r3,0 ffc05878: 40 9e 00 14 bne- cr7,ffc0588c <== NEVER TAKEN /* Hmm - hopefully all tasks using this key have gone away... */ if ( key ) free( *(void **)key ); ffc0587c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc05880: 41 9e 00 0c beq- cr7,ffc0588c <== NEVER TAKEN ffc05884: 80 7f 00 00 lwz r3,0(r31) ffc05888: 4b ff fd 09 bl ffc05590 return 0; } key = NULL; return 0; } ffc0588c: 80 01 00 14 lwz r0,20(r1) ffc05890: 38 60 00 00 li r3,0 ffc05894: 83 e1 00 0c lwz r31,12(r1) ffc05898: 38 21 00 10 addi r1,r1,16 ffc0589c: 7c 08 03 a6 mtlr r0 ffc058a0: 4e 80 00 20 blr =============================================================================== ffc059dc : printk( "gxx_wrappers: mutex init complete =%X\n", *mutex ); #endif } int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex) { ffc059dc: 94 21 ff f8 stwu r1,-8(r1) ffc059e0: 7c 08 02 a6 mflr r0 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: lock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_obtain( ffc059e4: 38 80 00 00 li r4,0 printk( "gxx_wrappers: mutex init complete =%X\n", *mutex ); #endif } int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex) { ffc059e8: 90 01 00 0c stw r0,12(r1) #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: lock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_obtain( ffc059ec: 38 a0 00 00 li r5,0 ffc059f0: 80 63 00 00 lwz r3,0(r3) ffc059f4: 48 00 40 f5 bl ffc09ae8 *(rtems_id *)mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if ( status == RTEMS_SUCCESSFUL ) ffc059f8: 2f 83 00 00 cmpwi cr7,r3,0 return 0; return -1; ffc059fc: 38 60 ff ff li r3,-1 status = rtems_semaphore_obtain( *(rtems_id *)mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if ( status == RTEMS_SUCCESSFUL ) ffc05a00: 40 9e 00 08 bne- cr7,ffc05a08 <== NEVER TAKEN return 0; ffc05a04: 38 60 00 00 li r3,0 return -1; } ffc05a08: 80 01 00 0c lwz r0,12(r1) ffc05a0c: 38 21 00 08 addi r1,r1,8 ffc05a10: 7c 08 03 a6 mtlr r0 ffc05a14: 4e 80 00 20 blr =============================================================================== ffc05a4c : int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex) { ffc05a4c: 94 21 ff f8 stwu r1,-8(r1) ffc05a50: 7c 08 02 a6 mflr r0 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: trylock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_obtain (*(rtems_id *)mutex, RTEMS_NO_WAIT, 0); ffc05a54: 38 80 00 01 li r4,1 return 0; return -1; } int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex) { ffc05a58: 90 01 00 0c stw r0,12(r1) #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: trylock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_obtain (*(rtems_id *)mutex, RTEMS_NO_WAIT, 0); ffc05a5c: 38 a0 00 00 li r5,0 ffc05a60: 80 63 00 00 lwz r3,0(r3) ffc05a64: 48 00 40 85 bl ffc09ae8 if ( status == RTEMS_SUCCESSFUL ) ffc05a68: 2f 83 00 00 cmpwi cr7,r3,0 return 0; return -1; ffc05a6c: 38 60 ff ff li r3,-1 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: trylock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_obtain (*(rtems_id *)mutex, RTEMS_NO_WAIT, 0); if ( status == RTEMS_SUCCESSFUL ) ffc05a70: 40 9e 00 08 bne- cr7,ffc05a78 <== NEVER TAKEN return 0; ffc05a74: 38 60 00 00 li r3,0 return -1; } ffc05a78: 80 01 00 0c lwz r0,12(r1) ffc05a7c: 38 21 00 08 addi r1,r1,8 ffc05a80: 7c 08 03 a6 mtlr r0 ffc05a84: 4e 80 00 20 blr =============================================================================== ffc05a88 : int rtems_gxx_mutex_unlock (__gthread_mutex_t *mutex) { ffc05a88: 94 21 ff f8 stwu r1,-8(r1) ffc05a8c: 7c 08 02 a6 mflr r0 ffc05a90: 90 01 00 0c stw r0,12(r1) #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: unlock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_release( *(rtems_id *)mutex ); ffc05a94: 80 63 00 00 lwz r3,0(r3) ffc05a98: 48 00 41 dd bl ffc09c74 if ( status == RTEMS_SUCCESSFUL ) ffc05a9c: 2f 83 00 00 cmpwi cr7,r3,0 return 0; return -1; ffc05aa0: 38 60 ff ff li r3,-1 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: unlock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_release( *(rtems_id *)mutex ); if ( status == RTEMS_SUCCESSFUL ) ffc05aa4: 40 9e 00 08 bne- cr7,ffc05aac <== NEVER TAKEN return 0; ffc05aa8: 38 60 00 00 li r3,0 return -1; } ffc05aac: 80 01 00 0c lwz r0,12(r1) ffc05ab0: 38 21 00 08 addi r1,r1,8 ffc05ab4: 7c 08 03 a6 mtlr r0 ffc05ab8: 4e 80 00 20 blr =============================================================================== ffc056f8 : /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { ffc056f8: 94 21 ff e0 stwu r1,-32(r1) ffc056fc: 7c 08 02 a6 mflr r0 ffc05700: 90 01 00 24 stw r0,36(r1) #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { ffc05704: 80 03 00 00 lwz r0,0(r3) /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { ffc05708: 93 c1 00 18 stw r30,24(r1) ffc0570c: 7c 9e 23 78 mr r30,r4 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { ffc05710: 2f 80 00 00 cmpwi cr7,r0,0 /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { ffc05714: 93 e1 00 1c stw r31,28(r1) ffc05718: 7c 7f 1b 78 mr r31,r3 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { ffc0571c: 41 9e 00 20 beq- cr7,ffc0573c rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); if ( o == 0 ) (*func)(); } return 0; } ffc05720: 80 01 00 24 lwz r0,36(r1) ffc05724: 38 60 00 00 li r3,0 ffc05728: 83 c1 00 18 lwz r30,24(r1) ffc0572c: 7c 08 03 a6 mtlr r0 ffc05730: 83 e1 00 1c lwz r31,28(r1) ffc05734: 38 21 00 20 addi r1,r1,32 ffc05738: 4e 80 00 20 blr if ( *(volatile __gthread_once_t *)once == 0 ) { rtems_mode saveMode; __gthread_once_t o; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); ffc0573c: 38 60 01 00 li r3,256 ffc05740: 38 80 01 00 li r4,256 ffc05744: 38 a1 00 08 addi r5,r1,8 ffc05748: 48 00 49 5d bl ffc0a0a4 if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { ffc0574c: 80 1f 00 00 lwz r0,0(r31) ffc05750: 2f 80 00 00 cmpwi cr7,r0,0 ffc05754: 40 9e 00 40 bne- cr7,ffc05794 <== NEVER TAKEN *(volatile __gthread_once_t *)once = 1; ffc05758: 38 00 00 01 li r0,1 } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); ffc0575c: 80 61 00 08 lwz r3,8(r1) 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; ffc05760: 90 1f 00 00 stw r0,0(r31) } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); ffc05764: 38 a1 00 08 addi r5,r1,8 ffc05768: 38 80 01 00 li r4,256 ffc0576c: 48 00 49 39 bl ffc0a0a4 if ( o == 0 ) (*func)(); ffc05770: 7f c9 03 a6 mtctr r30 ffc05774: 4e 80 04 21 bctrl } return 0; } ffc05778: 80 01 00 24 lwz r0,36(r1) ffc0577c: 38 60 00 00 li r3,0 ffc05780: 83 c1 00 18 lwz r30,24(r1) ffc05784: 7c 08 03 a6 mtlr r0 ffc05788: 83 e1 00 1c lwz r31,28(r1) ffc0578c: 38 21 00 20 addi r1,r1,32 ffc05790: 4e 80 00 20 blr 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); ffc05794: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED ffc05798: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED ffc0579c: 38 80 01 00 li r4,256 <== NOT EXECUTED ffc057a0: 48 00 49 05 bl ffc0a0a4 <== NOT EXECUTED if ( o == 0 ) (*func)(); } return 0; } ffc057a4: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc057a8: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc057ac: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc057b0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc057b4: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc057b8: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc057bc: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05934 : #endif return p; } int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { ffc05934: 94 21 ff f0 stwu r1,-16(r1) ffc05938: 7c 08 02 a6 mflr r0 ffc0593c: 90 01 00 14 stw r0,20(r1) ffc05940: 93 e1 00 0c stw r31,12(r1) ffc05944: 7c 7f 1b 78 mr r31,r3 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 ); ffc05948: 80 a3 00 04 lwz r5,4(r3) ffc0594c: 38 60 00 00 li r3,0 #endif return p; } int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { ffc05950: 93 c1 00 08 stw r30,8(r1) ffc05954: 7c 9e 23 78 mr r30,r4 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 ); ffc05958: 7f e4 fb 78 mr r4,r31 ffc0595c: 48 00 4a 81 bl ffc0a3dc if ( status == RTEMS_SUCCESSFUL ) { ffc05960: 2f 83 00 00 cmpwi cr7,r3,0 /* now let's set the proper value */ key->val = (void *)ptr; return 0; } return -1; ffc05964: 38 60 ff ff li 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 ) { ffc05968: 40 9e 00 0c bne- cr7,ffc05974 <== NEVER TAKEN /* now let's set the proper value */ key->val = (void *)ptr; ffc0596c: 93 df 00 00 stw r30,0(r31) return 0; ffc05970: 38 60 00 00 li r3,0 } return -1; } ffc05974: 80 01 00 14 lwz r0,20(r1) ffc05978: 83 c1 00 08 lwz r30,8(r1) ffc0597c: 7c 08 03 a6 mtlr r0 ffc05980: 83 e1 00 0c lwz r31,12(r1) ffc05984: 38 21 00 10 addi r1,r1,16 ffc05988: 4e 80 00 20 blr =============================================================================== ffc09c08 : void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { ffc09c08: 94 21 ff e8 stwu r1,-24(r1) ffc09c0c: 7c 08 02 a6 mflr r0 if ( ffc09c10: 3d 20 00 00 lis r9,0 void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { ffc09c14: 90 01 00 1c stw r0,28(r1) if ( ffc09c18: 80 09 28 60 lwz r0,10336(r9) void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { ffc09c1c: 93 a1 00 0c stw r29,12(r1) ffc09c20: 7c 7d 1b 78 mr r29,r3 if ( ffc09c24: 2f 80 00 03 cmpwi cr7,r0,3 void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { ffc09c28: 93 c1 00 10 stw r30,16(r1) ffc09c2c: 7c 9e 23 78 mr r30,r4 ffc09c30: 93 e1 00 14 stw r31,20(r1) ffc09c34: 7c bf 2b 78 mr r31,r5 if ( ffc09c38: 41 9e 00 3c beq- cr7,ffc09c74 <== ALWAYS TAKEN && !malloc_is_system_state_OK() ) { return NULL; } malloc_deferred_frees_process(); ffc09c3c: 4b ff ea 41 bl ffc0867c /* FIXME: Statistics, boundary checks */ return _Protected_heap_Allocate_aligned_with_boundary( ffc09c40: 3d 20 00 00 lis r9,0 ffc09c44: 80 69 27 30 lwz r3,10032(r9) ffc09c48: 7f a4 eb 78 mr r4,r29 ffc09c4c: 7f c5 f3 78 mr r5,r30 ffc09c50: 7f e6 fb 78 mr r6,r31 ffc09c54: 48 00 64 dd bl ffc10130 <_Protected_heap_Allocate_aligned_with_boundary> RTEMS_Malloc_Heap, size, alignment, boundary ); } ffc09c58: 80 01 00 1c lwz r0,28(r1) ffc09c5c: 83 a1 00 0c lwz r29,12(r1) ffc09c60: 7c 08 03 a6 mtlr r0 ffc09c64: 83 c1 00 10 lwz r30,16(r1) ffc09c68: 83 e1 00 14 lwz r31,20(r1) ffc09c6c: 38 21 00 18 addi r1,r1,24 ffc09c70: 4e 80 00 20 blr uintptr_t boundary ) { if ( _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() ffc09c74: 4b ff e9 c1 bl ffc08634 ffc09c78: 2f 83 00 00 cmpwi cr7,r3,0 ) { return NULL; ffc09c7c: 38 60 00 00 li r3,0 uintptr_t boundary ) { if ( _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() ffc09c80: 40 9e ff bc bne+ cr7,ffc09c3c ffc09c84: 4b ff ff d4 b ffc09c58 =============================================================================== ffc04894 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { ffc04894: 94 21 ff c8 stwu r1,-56(r1) ffc04898: 7c 08 02 a6 mflr r0 ffc0489c: 93 81 00 28 stw r28,40(r1) ffc048a0: 90 01 00 3c stw r0,60(r1) ffc048a4: 93 a1 00 2c stw r29,44(r1) ffc048a8: 93 c1 00 30 stw r30,48(r1) ffc048ac: 7c 9e 23 78 mr r30,r4 ffc048b0: 93 e1 00 34 stw r31,52(r1) ffc048b4: 7c 7f 1b 78 mr r31,r3 IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( ffc048b8: 48 00 fa d5 bl ffc1438c ffc048bc: 38 a0 00 00 li r5,0 ffc048c0: 7c 64 1b 78 mr r4,r3 ffc048c4: 38 c1 00 08 addi r6,r1,8 ffc048c8: 38 e0 00 01 li r7,1 ffc048cc: 7f e3 fb 78 mr r3,r31 ffc048d0: 48 00 06 a9 bl ffc04f78 name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; node_type = (*loc.ops->node_type_h)( &loc ); ffc048d4: 81 21 00 14 lwz r9,20(r1) IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( ffc048d8: 7c 7d 1b 78 mr r29,r3 name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; ffc048dc: 83 81 00 08 lwz r28,8(r1) node_type = (*loc.ops->node_type_h)( &loc ); ffc048e0: 80 09 00 10 lwz r0,16(r9) ffc048e4: 38 61 00 08 addi r3,r1,8 ffc048e8: 7c 09 03 a6 mtctr r0 ffc048ec: 4e 80 04 21 bctrl if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { ffc048f0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc048f4: 40 9e 00 0c bne- cr7,ffc04900 <== NEVER TAKEN ffc048f8: 2f 83 00 02 cmpwi cr7,r3,2 ffc048fc: 41 9e 00 30 beq- cr7,ffc0492c rtems_filesystem_freenode( &loc ); ffc04900: 38 61 00 08 addi r3,r1,8 ffc04904: 48 00 07 d1 bl ffc050d4 return RTEMS_UNSATISFIED; ffc04908: 38 60 00 0d li r3,13 device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } ffc0490c: 80 01 00 3c lwz r0,60(r1) ffc04910: 83 81 00 28 lwz r28,40(r1) ffc04914: 7c 08 03 a6 mtlr r0 ffc04918: 83 a1 00 2c lwz r29,44(r1) ffc0491c: 83 c1 00 30 lwz r30,48(r1) ffc04920: 83 e1 00 34 lwz r31,52(r1) ffc04924: 38 21 00 38 addi r1,r1,56 ffc04928: 4e 80 00 20 blr if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; ffc0492c: 93 fe 00 00 stw r31,0(r30) device_info->device_name_length = strlen( name ); ffc04930: 7f e3 fb 78 mr r3,r31 ffc04934: 48 00 fa 59 bl ffc1438c ffc04938: 90 7e 00 04 stw r3,4(r30) device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); ffc0493c: 38 61 00 08 addi r3,r1,8 return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; ffc04940: 80 1c 00 50 lwz r0,80(r28) ffc04944: 90 1e 00 08 stw r0,8(r30) device_info->minor = the_jnode->info.device.minor; ffc04948: 80 1c 00 54 lwz r0,84(r28) ffc0494c: 90 1e 00 0c stw r0,12(r30) rtems_filesystem_freenode( &loc ); ffc04950: 48 00 07 85 bl ffc050d4 return RTEMS_SUCCESSFUL; ffc04954: 38 60 00 00 li r3,0 ffc04958: 4b ff ff b4 b ffc0490c =============================================================================== ffc0aba0 : 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 ) { ffc0aba0: 94 21 ff f0 stwu r1,-16(r1) ffc0aba4: 7c 08 02 a6 mflr r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0aba8: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { ffc0abac: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0abb0: 80 09 2e 40 lwz r0,11840(r9) 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; ffc0abb4: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { ffc0abb8: 93 e1 00 0c stw r31,12(r1) ffc0abbc: 7c 7f 1b 78 mr r31,r3 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0abc0: 2f 80 00 00 cmpwi cr7,r0,0 return RTEMS_CALLED_FROM_ISR; ffc0abc4: 38 60 00 12 li r3,18 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; ffc0abc8: 80 09 27 e8 lwz r0,10216(r9) if ( rtems_interrupt_is_in_progress() ) ffc0abcc: 41 9e 00 18 beq- cr7,ffc0abe4 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0abd0: 80 01 00 14 lwz r0,20(r1) ffc0abd4: 83 e1 00 0c lwz r31,12(r1) ffc0abd8: 38 21 00 10 addi r1,r1,16 ffc0abdc: 7c 08 03 a6 mtlr r0 ffc0abe0: 4e 80 00 20 blr 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 ) ffc0abe4: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc0abe8: 38 60 00 09 li r3,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 ) ffc0abec: 41 be ff e4 beq- cr7,ffc0abd0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) ffc0abf0: 2f 84 00 00 cmpwi cr7,r4,0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; ffc0abf4: 90 05 00 00 stw r0,0(r5) if ( driver_table == NULL ) ffc0abf8: 41 be ff d8 beq- cr7,ffc0abd0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0abfc: 81 64 00 00 lwz r11,0(r4) ffc0ac00: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0ac04: 41 9e 00 f4 beq- cr7,ffc0acf8 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0ac08: 7f 80 f8 40 cmplw cr7,r0,r31 return RTEMS_INVALID_NUMBER; ffc0ac0c: 38 60 00 0a li r3,10 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0ac10: 40 9d ff c0 ble+ cr7,ffc0abd0 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc0ac14: 3d 60 00 00 lis r11,0 ffc0ac18: 81 4b 27 a0 lwz r10,10144(r11) ffc0ac1c: 38 0a 00 01 addi r0,r10,1 ffc0ac20: 90 0b 27 a0 stw r0,10144(r11) return _Thread_Dispatch_disable_level; ffc0ac24: 80 0b 27 a0 lwz r0,10144(r11) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { ffc0ac28: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0ac2c: 40 9e 00 a4 bne- cr7,ffc0acd0 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; ffc0ac30: 81 49 27 e8 lwz r10,10216(r9) rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc0ac34: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ac38: 41 9e 00 d0 beq- cr7,ffc0ad08 <== NEVER TAKEN ffc0ac3c: 3d 60 00 00 lis r11,0 ffc0ac40: 7d 49 03 a6 mtctr r10 ffc0ac44: 81 2b 27 ec lwz r9,10220(r11) ffc0ac48: 48 00 00 10 b ffc0ac58 ffc0ac4c: 3b ff 00 01 addi r31,r31,1 ffc0ac50: 39 29 00 18 addi r9,r9,24 ffc0ac54: 42 40 00 b4 bdz- ffc0ad08 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0ac58: 80 09 00 00 lwz r0,0(r9) ffc0ac5c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ac60: 40 9e ff ec bne+ cr7,ffc0ac4c ffc0ac64: 80 09 00 04 lwz r0,4(r9) ffc0ac68: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ac6c: 40 9e ff e0 bne+ cr7,ffc0ac4c } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) ffc0ac70: 7f 8a f8 00 cmpw cr7,r10,r31 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0ac74: 93 e5 00 00 stw r31,0(r5) ffc0ac78: 1c 1f 00 18 mulli r0,r31,24 if ( m != n ) ffc0ac7c: 41 9e 00 90 beq- cr7,ffc0ad0c <== NEVER TAKEN } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; ffc0ac80: 81 6b 27 ec lwz r11,10220(r11) ffc0ac84: 80 c4 00 00 lwz r6,0(r4) ffc0ac88: 80 e4 00 04 lwz r7,4(r4) ffc0ac8c: 7d 2b 02 14 add r9,r11,r0 ffc0ac90: 81 04 00 08 lwz r8,8(r4) ffc0ac94: 81 44 00 0c lwz r10,12(r4) ffc0ac98: 7c cb 01 2e stwx r6,r11,r0 ffc0ac9c: 90 e9 00 04 stw r7,4(r9) ffc0aca0: 91 09 00 08 stw r8,8(r9) ffc0aca4: 91 49 00 0c stw r10,12(r9) ffc0aca8: 81 64 00 10 lwz r11,16(r4) ffc0acac: 80 04 00 14 lwz r0,20(r4) ffc0acb0: 91 69 00 10 stw r11,16(r9) ffc0acb4: 90 09 00 14 stw r0,20(r9) _Thread_Enable_dispatch(); ffc0acb8: 48 00 26 45 bl ffc0d2fc <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); ffc0acbc: 7f e3 fb 78 mr r3,r31 ffc0acc0: 38 80 00 00 li r4,0 ffc0acc4: 38 a0 00 00 li r5,0 ffc0acc8: 48 00 9b ad bl ffc14874 ffc0accc: 4b ff ff 04 b ffc0abd0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0acd0: 3d 60 00 00 lis r11,0 ffc0acd4: 1c 1f 00 18 mulli r0,r31,24 ffc0acd8: 81 2b 27 ec lwz r9,10220(r11) static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0acdc: 7d 49 00 2e lwzx r10,r9,r0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0ace0: 7d 29 02 14 add r9,r9,r0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0ace4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ace8: 41 9e 00 30 beq- cr7,ffc0ad18 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(); ffc0acec: 48 00 26 11 bl ffc0d2fc <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; ffc0acf0: 38 60 00 0c li r3,12 ffc0acf4: 4b ff fe dc b ffc0abd0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0acf8: 81 64 00 04 lwz r11,4(r4) ffc0acfc: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0ad00: 40 9e ff 08 bne+ cr7,ffc0ac08 ffc0ad04: 4b ff fe cc b ffc0abd0 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0ad08: 93 e5 00 00 stw r31,0(r5) if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); ffc0ad0c: 48 00 25 f1 bl ffc0d2fc <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; ffc0ad10: 38 60 00 05 li r3,5 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; ffc0ad14: 4b ff fe bc b ffc0abd0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0ad18: 81 29 00 04 lwz r9,4(r9) ffc0ad1c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ad20: 40 9e ff cc bne+ cr7,ffc0acec if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; ffc0ad24: 93 e5 00 00 stw r31,0(r5) ffc0ad28: 4b ff ff 58 b ffc0ac80 =============================================================================== ffc0c808 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0c808: 94 21 ff e0 stwu r1,-32(r1) ffc0c80c: 7c 08 02 a6 mflr r0 ffc0c810: 90 01 00 24 stw r0,36(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0c814: 7c 60 1b 79 mr. r0,r3 #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0c818: 93 81 00 10 stw r28,16(r1) ffc0c81c: 93 a1 00 14 stw r29,20(r1) ffc0c820: 93 c1 00 18 stw r30,24(r1) ffc0c824: 93 e1 00 1c stw r31,28(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0c828: 90 01 00 08 stw r0,8(r1) ffc0c82c: 41 82 00 74 beq- ffc0c8a0 <== NEVER TAKEN ffc0c830: 3f a0 00 00 lis r29,0 ffc0c834: 3b bd 30 00 addi r29,r29,12288 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) ffc0c838: 3b 9d 00 0c addi r28,r29,12 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) ffc0c83c: 85 3d 00 04 lwzu r9,4(r29) ffc0c840: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c844: 41 9e 00 54 beq- cr7,ffc0c898 continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; ffc0c848: 83 c9 00 04 lwz r30,4(r9) if ( !information ) ffc0c84c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0c850: 41 9e 00 48 beq- cr7,ffc0c898 continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0c854: a0 1e 00 10 lhz r0,16(r30) ffc0c858: 70 09 ff ff andi. r9,r0,65535 ffc0c85c: 41 82 00 3c beq- ffc0c898 <== NEVER TAKEN ffc0c860: 3b e0 00 01 li r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0c864: 81 7e 00 1c lwz r11,28(r30) ffc0c868: 57 e9 10 3a rlwinm r9,r31,2,0,29 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0c86c: 3b ff 00 01 addi r31,r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0c870: 7c 6b 48 2e lwzx r3,r11,r9 if ( !the_thread ) ffc0c874: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c878: 41 9e 00 14 beq- cr7,ffc0c88c continue; (*routine)(the_thread); ffc0c87c: 80 01 00 08 lwz r0,8(r1) ffc0c880: 7c 09 03 a6 mtctr r0 ffc0c884: 4e 80 04 21 bctrl ffc0c888: a0 1e 00 10 lhz r0,16(r30) information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0c88c: 54 09 04 3e clrlwi r9,r0,16 ffc0c890: 7f 89 f8 40 cmplw cr7,r9,r31 ffc0c894: 40 9c ff d0 bge+ cr7,ffc0c864 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc0c898: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0c89c: 40 9e ff a0 bne+ cr7,ffc0c83c (*routine)(the_thread); } } } ffc0c8a0: 80 01 00 24 lwz r0,36(r1) ffc0c8a4: 83 81 00 10 lwz r28,16(r1) ffc0c8a8: 7c 08 03 a6 mtlr r0 ffc0c8ac: 83 a1 00 14 lwz r29,20(r1) ffc0c8b0: 83 c1 00 18 lwz r30,24(r1) ffc0c8b4: 83 e1 00 1c lwz r31,28(r1) ffc0c8b8: 38 21 00 20 addi r1,r1,32 ffc0c8bc: 4e 80 00 20 blr =============================================================================== ffc0f440 : */ void rtems_libio_free( rtems_libio_t *iop ) { ffc0f440: 94 21 ff f0 stwu r1,-16(r1) ffc0f444: 7c 08 02 a6 mflr r0 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 ); ffc0f448: 38 80 00 00 li r4,0 ffc0f44c: 93 c1 00 08 stw r30,8(r1) ffc0f450: 3f c0 00 00 lis r30,0 ffc0f454: 38 a0 00 00 li r5,0 ffc0f458: 93 e1 00 0c stw r31,12(r1) ffc0f45c: 7c 7f 1b 78 mr r31,r3 ffc0f460: 80 7e 27 b4 lwz r3,10164(r30) ffc0f464: 90 01 00 14 stw r0,20(r1) ffc0f468: 4b ff 9e d5 bl ffc0933c rtems_libio_lock(); if (iop->sem) ffc0f46c: 80 7f 00 30 lwz r3,48(r31) ffc0f470: 2f 83 00 00 cmpwi cr7,r3,0 ffc0f474: 41 be 00 08 beq+ cr7,ffc0f47c <== NEVER TAKEN rtems_semaphore_delete(iop->sem); ffc0f478: 4b ff 9d e9 bl ffc09260 iop->flags &= ~LIBIO_FLAGS_OPEN; ffc0f47c: 81 7f 00 18 lwz r11,24(r31) iop->data1 = rtems_libio_iop_freelist; ffc0f480: 3d 20 00 00 lis r9,0 ffc0f484: 80 09 27 b0 lwz r0,10160(r9) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; ffc0f488: 55 6b 06 2c rlwinm r11,r11,0,24,22 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0f48c: 80 7e 27 b4 lwz r3,10164(r30) iop->data1 = rtems_libio_iop_freelist; ffc0f490: 90 1f 00 38 stw r0,56(r31) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; ffc0f494: 91 7f 00 18 stw r11,24(r31) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; ffc0f498: 93 e9 27 b0 stw r31,10160(r9) ffc0f49c: 4b ff a0 2d bl ffc094c8 rtems_libio_unlock(); } ffc0f4a0: 80 01 00 14 lwz r0,20(r1) ffc0f4a4: 83 c1 00 08 lwz r30,8(r1) ffc0f4a8: 7c 08 03 a6 mtlr r0 ffc0f4ac: 83 e1 00 0c lwz r31,12(r1) ffc0f4b0: 38 21 00 10 addi r1,r1,16 ffc0f4b4: 4e 80 00 20 blr =============================================================================== ffc05268 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { ffc05268: 94 21 ff f0 stwu r1,-16(r1) rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) ffc0526c: 3d 20 00 00 lis r9,0 * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { ffc05270: 7c 08 02 a6 mflr r0 ffc05274: 93 e1 00 0c stw r31,12(r1) rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) ffc05278: 83 e9 26 fc lwz r31,9980(r9) * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { ffc0527c: 90 01 00 14 stw r0,20(r1) rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) ffc05280: 2f 9f 00 00 cmpwi cr7,r31,0 ffc05284: 41 9e 00 64 beq- cr7,ffc052e8 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, ffc05288: 7f e3 fb 78 mr r3,r31 ffc0528c: 38 80 00 40 li r4,64 ffc05290: 4b ff f8 6d bl ffc04afc ffc05294: 3d 20 00 00 lis r9,0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) ffc05298: 2f 83 00 00 cmpwi cr7,r3,0 uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, ffc0529c: 90 69 27 ac stw r3,10156(r9) sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) ffc052a0: 41 9e 00 a0 beq- cr7,ffc05340 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++) ffc052a4: 2b 9f 00 01 cmplwi cr7,r31,1 rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; ffc052a8: 3d 20 00 00 lis r9,0 ffc052ac: 90 69 27 b0 stw r3,10160(r9) for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) ffc052b0: 40 9d 00 30 ble- cr7,ffc052e0 <== NEVER TAKEN ffc052b4: 3b ff ff ff addi r31,r31,-1 ffc052b8: 7f e9 03 a6 mtctr r31 ffc052bc: 7c 69 1b 78 mr r9,r3 ffc052c0: 39 60 00 01 li r11,1 iop->data1 = iop + 1; ffc052c4: 39 29 00 40 addi r9,r9,64 ffc052c8: 91 29 ff f8 stw r9,-8(r9) ffc052cc: 39 6b 00 01 addi r11,r11,1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) ffc052d0: 42 00 ff f4 bdnz+ ffc052c4 * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) ffc052d4: 39 6b ff ff addi r11,r11,-1 ffc052d8: 55 6b 30 32 rlwinm r11,r11,6,0,25 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++) ffc052dc: 7c 63 5a 14 add r3,r3,r11 iop->data1 = iop + 1; iop->data1 = NULL; ffc052e0: 38 00 00 00 li r0,0 ffc052e4: 90 03 00 38 stw r0,56(r3) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( ffc052e8: 3c 60 4c 42 lis r3,19522 ffc052ec: 3c e0 00 00 lis r7,0 ffc052f0: 60 63 49 4f ori r3,r3,18767 ffc052f4: 38 80 00 01 li r4,1 ffc052f8: 38 a0 00 54 li r5,84 ffc052fc: 38 c0 00 00 li r6,0 ffc05300: 38 e7 27 b4 addi r7,r7,10164 ffc05304: 48 00 3d 61 bl ffc09064 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) ffc05308: 2f 83 00 00 cmpwi cr7,r3,0 ffc0530c: 40 9e 00 30 bne- cr7,ffc0533c <== NEVER TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) ffc05310: 3d 20 00 00 lis r9,0 ffc05314: 80 09 27 00 lwz r0,9984(r9) ffc05318: 2f 80 00 00 cmpwi cr7,r0,0 ffc0531c: 41 9e 00 0c beq- cr7,ffc05328 <== NEVER TAKEN (* rtems_fs_init_helper)(); ffc05320: 7c 09 03 a6 mtctr r0 ffc05324: 4e 80 04 21 bctrl } ffc05328: 80 01 00 14 lwz r0,20(r1) ffc0532c: 83 e1 00 0c lwz r31,12(r1) ffc05330: 38 21 00 10 addi r1,r1,16 ffc05334: 7c 08 03 a6 mtlr r0 ffc05338: 4e 80 00 20 blr RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); ffc0533c: 48 00 49 65 bl ffc09ca0 <== 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); ffc05340: 38 60 00 1a li r3,26 ffc05344: 48 00 49 5d bl ffc09ca0 =============================================================================== ffc0f580 : */ int rtems_libio_is_file_open( void *node_access ) { ffc0f580: 94 21 ff e8 stwu r1,-24(r1) ffc0f584: 7c 08 02 a6 mflr r0 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 ); ffc0f588: 38 80 00 00 li r4,0 ffc0f58c: 93 c1 00 10 stw r30,16(r1) ffc0f590: 3f c0 00 00 lis r30,0 ffc0f594: 38 a0 00 00 li r5,0 ffc0f598: 93 e1 00 14 stw r31,20(r1) ffc0f59c: 7c 7f 1b 78 mr r31,r3 ffc0f5a0: 80 7e 27 b4 lwz r3,10164(r30) ffc0f5a4: 90 01 00 1c stw r0,28(r1) ffc0f5a8: 93 a1 00 0c stw r29,12(r1) ffc0f5ac: 4b ff 9d 91 bl ffc0933c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0f5b0: 3d 20 00 00 lis r9,0 ffc0f5b4: 80 09 26 fc lwz r0,9980(r9) ffc0f5b8: 3d 20 00 00 lis r9,0 ffc0f5bc: 81 29 27 ac lwz r9,10156(r9) int rtems_libio_is_file_open( void *node_access ) { rtems_libio_t *iop; int result=0; ffc0f5c0: 3b a0 00 00 li r29,0 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0f5c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f5c8: 41 9e 00 2c beq- cr7,ffc0f5f4 <== NEVER TAKEN ffc0f5cc: 7c 09 03 a6 mtctr r0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { ffc0f5d0: 80 09 00 18 lwz r0,24(r9) ffc0f5d4: 70 0b 01 00 andi. r11,r0,256 ffc0f5d8: 41 82 00 10 beq- ffc0f5e8 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { ffc0f5dc: 80 09 00 1c lwz r0,28(r9) ffc0f5e0: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0f5e4: 41 9e 00 38 beq- cr7,ffc0f61c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0f5e8: 39 29 00 40 addi r9,r9,64 ffc0f5ec: 42 00 ff e4 bdnz+ ffc0f5d0 int rtems_libio_is_file_open( void *node_access ) { rtems_libio_t *iop; int result=0; ffc0f5f0: 3b a0 00 00 li r29,0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0f5f4: 80 7e 27 b4 lwz r3,10164(r30) ffc0f5f8: 4b ff 9e d1 bl ffc094c8 } rtems_libio_unlock(); return result; } ffc0f5fc: 80 01 00 1c lwz r0,28(r1) ffc0f600: 7f a3 eb 78 mr r3,r29 ffc0f604: 83 c1 00 10 lwz r30,16(r1) ffc0f608: 7c 08 03 a6 mtlr r0 ffc0f60c: 83 a1 00 0c lwz r29,12(r1) ffc0f610: 83 e1 00 14 lwz r31,20(r1) ffc0f614: 38 21 00 18 addi r1,r1,24 ffc0f618: 4e 80 00 20 blr ffc0f61c: 80 7e 27 b4 lwz r3,10164(r30) * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { result = 1; ffc0f620: 3b a0 00 01 li r29,1 ffc0f624: 4b ff 9e a5 bl ffc094c8 } rtems_libio_unlock(); return result; } ffc0f628: 80 01 00 1c lwz r0,28(r1) ffc0f62c: 7f a3 eb 78 mr r3,r29 ffc0f630: 83 c1 00 10 lwz r30,16(r1) ffc0f634: 7c 08 03 a6 mtlr r0 ffc0f638: 83 a1 00 0c lwz r29,12(r1) ffc0f63c: 83 e1 00 14 lwz r31,20(r1) ffc0f640: 38 21 00 18 addi r1,r1,24 ffc0f644: 4e 80 00 20 blr =============================================================================== ffc0f4b8 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { ffc0f4b8: 94 21 ff e8 stwu r1,-24(r1) ffc0f4bc: 7c 08 02 a6 mflr r0 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 ); ffc0f4c0: 38 80 00 00 li r4,0 ffc0f4c4: 93 c1 00 10 stw r30,16(r1) ffc0f4c8: 3f c0 00 00 lis r30,0 ffc0f4cc: 38 a0 00 00 li r5,0 ffc0f4d0: 93 e1 00 14 stw r31,20(r1) ffc0f4d4: 7c 7f 1b 78 mr r31,r3 ffc0f4d8: 80 7e 27 b4 lwz r3,10164(r30) ffc0f4dc: 90 01 00 1c stw r0,28(r1) ffc0f4e0: 93 a1 00 0c stw r29,12(r1) ffc0f4e4: 4b ff 9e 59 bl ffc0933c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0f4e8: 3d 20 00 00 lis r9,0 ffc0f4ec: 80 09 26 fc lwz r0,9980(r9) ffc0f4f0: 3d 20 00 00 lis r9,0 ffc0f4f4: 81 29 27 ac lwz r9,10156(r9) int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { rtems_libio_t *iop; int result = 0; ffc0f4f8: 3b a0 00 00 li r29,0 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0f4fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f500: 41 9e 00 2c beq- cr7,ffc0f52c <== NEVER TAKEN ffc0f504: 7c 09 03 a6 mtctr r0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { ffc0f508: 80 09 00 18 lwz r0,24(r9) ffc0f50c: 70 0b 01 00 andi. r11,r0,256 ffc0f510: 41 82 00 10 beq- ffc0f520 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { ffc0f514: 80 09 00 2c lwz r0,44(r9) ffc0f518: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0f51c: 41 9e 00 38 beq- cr7,ffc0f554 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0f520: 39 29 00 40 addi r9,r9,64 ffc0f524: 42 00 ff e4 bdnz+ ffc0f508 int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { rtems_libio_t *iop; int result = 0; ffc0f528: 3b a0 00 00 li r29,0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0f52c: 80 7e 27 b4 lwz r3,10164(r30) ffc0f530: 4b ff 9f 99 bl ffc094c8 } rtems_libio_unlock(); return result; } ffc0f534: 80 01 00 1c lwz r0,28(r1) ffc0f538: 7f a3 eb 78 mr r3,r29 ffc0f53c: 83 c1 00 10 lwz r30,16(r1) ffc0f540: 7c 08 03 a6 mtlr r0 ffc0f544: 83 a1 00 0c lwz r29,12(r1) ffc0f548: 83 e1 00 14 lwz r31,20(r1) ffc0f54c: 38 21 00 18 addi r1,r1,24 ffc0f550: 4e 80 00 20 blr ffc0f554: 80 7e 27 b4 lwz r3,10164(r30) * 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; ffc0f558: 3b a0 00 01 li r29,1 ffc0f55c: 4b ff 9f 6d bl ffc094c8 } rtems_libio_unlock(); return result; } ffc0f560: 80 01 00 1c lwz r0,28(r1) ffc0f564: 7f a3 eb 78 mr r3,r29 ffc0f568: 83 c1 00 10 lwz r30,16(r1) ffc0f56c: 7c 08 03 a6 mtlr r0 ffc0f570: 83 a1 00 0c lwz r29,12(r1) ffc0f574: 83 e1 00 14 lwz r31,20(r1) ffc0f578: 38 21 00 18 addi r1,r1,24 ffc0f57c: 4e 80 00 20 blr =============================================================================== ffc062c4 : rtems_status_code rtems_libio_set_private_env(void) { ffc062c4: 94 21 ff b8 stwu r1,-72(r1) ffc062c8: 7c 08 02 a6 mflr r0 ffc062cc: 93 e1 00 44 stw r31,68(r1) rtems_filesystem_location_info_t root_loc; rtems_filesystem_location_info_t current_loc; rtems_user_env_t *new_env = NULL; int rv = 0; rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0); ffc062d0: 3f e0 ff c2 lis r31,-62 ffc062d4: 3b ff 95 9c addi r31,r31,-27236 free(env); } } rtems_status_code rtems_libio_set_private_env(void) { ffc062d8: 90 01 00 4c stw r0,76(r1) ffc062dc: 93 c1 00 40 stw r30,64(r1) ffc062e0: 93 81 00 38 stw r28,56(r1) ffc062e4: 93 a1 00 3c stw r29,60(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_id task_id = rtems_task_self(); ffc062e8: 48 00 37 9d bl ffc09a84 ffc062ec: 7c 7e 1b 78 mr r30,r3 rtems_filesystem_location_info_t root_loc; rtems_filesystem_location_info_t current_loc; rtems_user_env_t *new_env = NULL; int rv = 0; rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0); ffc062f0: 38 80 00 01 li r4,1 ffc062f4: 7f e3 fb 78 mr r3,r31 ffc062f8: 38 a0 00 00 li r5,0 ffc062fc: 38 c1 00 1c addi r6,r1,28 ffc06300: 38 e0 00 00 li r7,0 ffc06304: 4b ff e8 55 bl ffc04b58 if (rv != 0) ffc06308: 2f 83 00 00 cmpwi cr7,r3,0 error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; ffc0630c: 38 60 00 1a li r3,26 rtems_filesystem_location_info_t current_loc; rtems_user_env_t *new_env = NULL; int rv = 0; rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0); if (rv != 0) ffc06310: 41 9e 00 24 beq- cr7,ffc06334 <== ALWAYS TAKEN error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; } ffc06314: 80 01 00 4c lwz r0,76(r1) ffc06318: 83 81 00 38 lwz r28,56(r1) ffc0631c: 7c 08 03 a6 mtlr r0 ffc06320: 83 a1 00 3c lwz r29,60(r1) ffc06324: 83 c1 00 40 lwz r30,64(r1) ffc06328: 83 e1 00 44 lwz r31,68(r1) ffc0632c: 38 21 00 48 addi r1,r1,72 ffc06330: 4e 80 00 20 blr rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0); if (rv != 0) goto error_0; rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0); ffc06334: 7f e3 fb 78 mr r3,r31 ffc06338: 38 80 00 01 li r4,1 ffc0633c: 38 a0 00 00 li r5,0 ffc06340: 38 c1 00 08 addi r6,r1,8 ffc06344: 38 e0 00 00 li r7,0 ffc06348: 4b ff e8 11 bl ffc04b58 if (rv != 0) ffc0634c: 2f 83 00 00 cmpwi cr7,r3,0 ffc06350: 40 9e 00 d8 bne- cr7,ffc06428 <== NEVER TAKEN * Bharath: I'm not sure if the check can be reduced to * if( rtems_current_user_env->task_id != task_id ) { */ if ( rtems_current_user_env == &rtems_global_user_env ffc06354: 3f 80 00 00 lis r28,0 ffc06358: 83 fc 26 f4 lwz r31,9972(r28) /* * Bharath: I'm not sure if the check can be reduced to * if( rtems_current_user_env->task_id != task_id ) { */ if ( ffc0635c: 3f a0 00 00 lis r29,0 ffc06360: 3b bd 2a d8 addi r29,r29,10968 ffc06364: 7f 9f e8 00 cmpw cr7,r31,r29 ffc06368: 41 9e 00 10 beq- cr7,ffc06378 rtems_current_user_env == &rtems_global_user_env || rtems_current_user_env->task_id != task_id ffc0636c: 80 1f 00 00 lwz r0,0(r31) ffc06370: 7f 80 f0 00 cmpw cr7,r0,r30 ffc06374: 41 9e 00 38 beq- cr7,ffc063ac ) { new_env = malloc(sizeof(rtems_user_env_t)); ffc06378: 38 60 00 48 li r3,72 ffc0637c: 4b ff f1 39 bl ffc054b4 if (new_env == NULL) ffc06380: 7c 7f 1b 79 mr. r31,r3 ffc06384: 41 82 00 9c beq- ffc06420 #ifdef HAVE_USERENV_REFCNT new_env->refcnt = 1; #endif sc = rtems_task_variable_add( ffc06388: 3c a0 ff c0 lis r5,-64 ffc0638c: 38 60 00 00 li r3,0 ffc06390: 38 9c 26 f4 addi r4,r28,9972 ffc06394: 38 a5 62 74 addi r5,r5,25204 ffc06398: 48 00 38 19 bl ffc09bb0 RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) ffc0639c: 2f 83 00 00 cmpwi cr7,r3,0 ffc063a0: 40 9e 00 78 bne- cr7,ffc06418 goto error_3; rtems_current_user_env = new_env; ffc063a4: 3d 20 00 00 lis r9,0 ffc063a8: 93 e9 26 f4 stw r31,9972(r9) } /* Inherit the global values */ *rtems_current_user_env = rtems_global_user_env; ffc063ac: 7f e3 fb 78 mr r3,r31 ffc063b0: 7f a4 eb 78 mr r4,r29 ffc063b4: 38 a0 00 48 li r5,72 ffc063b8: 48 00 d0 a5 bl ffc1345c * Clone the pathlocs. In contrast to most other code we must _not_ free the * original locs because 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_root = root_loc; ffc063bc: 80 01 00 1c lwz r0,28(r1) } /* Inherit the global values */ *rtems_current_user_env = rtems_global_user_env; rtems_current_user_env->task_id = task_id; ffc063c0: 93 df 00 00 stw r30,0(r31) * be freed when deleting the environment. */ rtems_filesystem_root = root_loc; rtems_filesystem_current = current_loc; return RTEMS_SUCCESSFUL; ffc063c4: 38 60 00 00 li r3,0 * Clone the pathlocs. In contrast to most other code we must _not_ free the * original locs because 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_root = root_loc; ffc063c8: 90 1f 00 18 stw r0,24(r31) ffc063cc: 80 01 00 20 lwz r0,32(r1) ffc063d0: 90 1f 00 1c stw r0,28(r31) ffc063d4: 80 01 00 24 lwz r0,36(r1) ffc063d8: 90 1f 00 20 stw r0,32(r31) ffc063dc: 80 01 00 28 lwz r0,40(r1) ffc063e0: 90 1f 00 24 stw r0,36(r31) ffc063e4: 80 01 00 2c lwz r0,44(r1) ffc063e8: 90 1f 00 28 stw r0,40(r31) rtems_filesystem_current = current_loc; ffc063ec: 80 01 00 08 lwz r0,8(r1) ffc063f0: 90 1f 00 04 stw r0,4(r31) ffc063f4: 80 01 00 0c lwz r0,12(r1) ffc063f8: 90 1f 00 08 stw r0,8(r31) ffc063fc: 80 01 00 10 lwz r0,16(r1) ffc06400: 90 1f 00 0c stw r0,12(r31) ffc06404: 80 01 00 14 lwz r0,20(r1) ffc06408: 90 1f 00 10 stw r0,16(r31) ffc0640c: 80 01 00 18 lwz r0,24(r1) ffc06410: 90 1f 00 14 stw r0,20(r31) return RTEMS_SUCCESSFUL; ffc06414: 4b ff ff 00 b ffc06314 error_3: free(new_env); ffc06418: 7f e3 fb 78 mr r3,r31 ffc0641c: 4b ff e8 c5 bl ffc04ce0 error_2: rtems_filesystem_freenode(¤t_loc); ffc06420: 38 61 00 08 addi r3,r1,8 ffc06424: 4b ff e8 91 bl ffc04cb4 error_1: rtems_filesystem_freenode(&root_loc); ffc06428: 38 61 00 1c addi r3,r1,28 ffc0642c: 4b ff e8 89 bl ffc04cb4 error_0: return RTEMS_NO_MEMORY; } ffc06430: 80 01 00 4c lwz r0,76(r1) error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; ffc06434: 38 60 00 1a li r3,26 } ffc06438: 83 81 00 38 lwz r28,56(r1) ffc0643c: 7c 08 03 a6 mtlr r0 ffc06440: 83 a1 00 3c lwz r29,60(r1) ffc06444: 83 c1 00 40 lwz r30,64(r1) ffc06448: 83 e1 00 44 lwz r31,68(r1) ffc0644c: 38 21 00 48 addi r1,r1,72 ffc06450: 4e 80 00 20 blr =============================================================================== ffc06454 : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { ffc06454: 94 21 ff d8 stwu r1,-40(r1) ffc06458: 7c 08 02 a6 mflr r0 ffc0645c: 93 81 00 18 stw r28,24(r1) ffc06460: 7c 7c 1b 78 mr r28,r3 ffc06464: 93 a1 00 1c stw r29,28(r1) * If this was an attempt to share the task with self, * if somebody wanted to do it... Lets tell them, its shared */ if( task_id == current_task_id ) return RTEMS_SUCCESSFUL; ffc06468: 3b a0 00 00 li r29,0 * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { ffc0646c: 93 e1 00 24 stw r31,36(r1) ffc06470: 90 01 00 2c stw r0,44(r1) ffc06474: 93 c1 00 20 stw r30,32(r1) rtems_id current_task_id; /* * get current task id */ current_task_id = rtems_task_self(); ffc06478: 48 00 36 0d bl ffc09a84 /* * If this was an attempt to share the task with self, * if somebody wanted to do it... Lets tell them, its shared */ if( task_id == current_task_id ) ffc0647c: 7f 9c 18 00 cmpw cr7,r28,r3 rtems_id current_task_id; /* * get current task id */ current_task_id = rtems_task_self(); ffc06480: 7c 7f 1b 78 mr r31,r3 /* * If this was an attempt to share the task with self, * if somebody wanted to do it... Lets tell them, its shared */ if( task_id == current_task_id ) ffc06484: 41 9e 00 38 beq- cr7,ffc064bc <== NEVER TAKEN return RTEMS_SUCCESSFUL; /* * Try to get the requested user environment */ sc = rtems_task_variable_get( ffc06488: 3f c0 00 00 lis r30,0 ffc0648c: 7f 83 e3 78 mr r3,r28 ffc06490: 38 9e 26 f4 addi r4,r30,9972 ffc06494: 38 a1 00 08 addi r5,r1,8 ffc06498: 48 00 38 15 bl ffc09cac (void*)&shared_user_env ); /* * If it was not successful, return the error code */ if (sc != RTEMS_SUCCESSFUL) ffc0649c: 7c 7d 1b 79 mr. r29,r3 ffc064a0: 40 82 00 1c bne- ffc064bc * If we have a current environment in place, we need to * free it, since we will be sharing the variable with the * shared_user_env */ if (rtems_current_user_env->task_id==current_task_id) { ffc064a4: 80 7e 26 f4 lwz r3,9972(r30) ffc064a8: 80 03 00 00 lwz r0,0(r3) ffc064ac: 7f 80 f8 00 cmpw cr7,r0,r31 ffc064b0: 41 9e 00 30 beq- cr7,ffc064e0 rtems_user_env_t *tmp = rtems_current_user_env; free_user_env( tmp ); } /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; ffc064b4: 80 01 00 08 lwz r0,8(r1) ffc064b8: 90 1e 26 f4 stw r0,9972(r30) #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; } ffc064bc: 80 01 00 2c lwz r0,44(r1) ffc064c0: 7f a3 eb 78 mr r3,r29 ffc064c4: 83 81 00 18 lwz r28,24(r1) ffc064c8: 7c 08 03 a6 mtlr r0 ffc064cc: 83 a1 00 1c lwz r29,28(r1) ffc064d0: 83 c1 00 20 lwz r30,32(r1) ffc064d4: 83 e1 00 24 lwz r31,36(r1) ffc064d8: 38 21 00 28 addi r1,r1,40 ffc064dc: 4e 80 00 20 blr * shared_user_env */ if (rtems_current_user_env->task_id==current_task_id) { rtems_user_env_t *tmp = rtems_current_user_env; free_user_env( tmp ); ffc064e0: 4b ff fd 95 bl ffc06274 ffc064e4: 4b ff ff d0 b ffc064b4 =============================================================================== ffc0f320 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { ffc0f320: 54 60 07 7c rlwinm r0,r3,0,29,30 ffc0f324: 2f 80 00 06 cmpwi cr7,r0,6 fcntl_flags |= O_RDWR; ffc0f328: 38 00 00 02 li r0,2 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { ffc0f32c: 41 9e 00 10 beq- cr7,ffc0f33c <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { ffc0f330: 70 60 00 02 andi. r0,r3,2 fcntl_flags |= O_RDONLY; ffc0f334: 38 00 00 00 li r0,0 { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { ffc0f338: 41 82 00 30 beq- ffc0f368 <== 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 ) { ffc0f33c: 70 69 00 01 andi. r9,r3,1 ffc0f340: 41 82 00 08 beq- ffc0f348 fcntl_flags |= O_NONBLOCK; ffc0f344: 60 00 40 00 ori r0,r0,16384 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { ffc0f348: 70 69 02 00 andi. r9,r3,512 ffc0f34c: 41 82 00 08 beq- ffc0f354 fcntl_flags |= O_APPEND; ffc0f350: 60 00 00 08 ori r0,r0,8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { ffc0f354: 70 69 04 00 andi. r9,r3,1024 ffc0f358: 41 82 00 08 beq- ffc0f360 fcntl_flags |= O_CREAT; ffc0f35c: 60 00 02 00 ori r0,r0,512 } return fcntl_flags; } ffc0f360: 7c 03 03 78 mr r3,r0 ffc0f364: 4e 80 00 20 blr ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; ffc0f368: 54 60 f7 fe rlwinm r0,r3,30,31,31 <== NOT EXECUTED ffc0f36c: 4b ff ff d0 b ffc0f33c <== NOT EXECUTED =============================================================================== ffc08ac4 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { ffc08ac4: 94 21 ff e8 stwu r1,-24(r1) uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { ffc08ac8: 3d 20 00 00 lis r9,0 * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { ffc08acc: 7c 08 02 a6 mflr r0 ffc08ad0: 7c 64 1b 78 mr r4,r3 uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { ffc08ad4: 80 69 27 30 lwz r3,10032(r9) ffc08ad8: 38 a1 00 08 addi r5,r1,8 * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { ffc08adc: 90 01 00 1c stw r0,28(r1) uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { ffc08ae0: 48 00 77 81 bl ffc10260 <_Protected_heap_Get_block_size> ffc08ae4: 2f 83 00 00 cmpwi cr7,r3,0 ffc08ae8: 41 9e 00 2c beq- cr7,ffc08b14 <== NEVER TAKEN MSBUMP(lifetime_freed, size); ffc08aec: 3c e0 00 00 lis r7,0 ffc08af0: 81 61 00 08 lwz r11,8(r1) ffc08af4: 38 e7 33 d0 addi r7,r7,13264 ffc08af8: 81 07 00 28 lwz r8,40(r7) ffc08afc: 39 40 00 00 li r10,0 ffc08b00: 81 27 00 2c lwz r9,44(r7) ffc08b04: 7d 6b 48 14 addc r11,r11,r9 ffc08b08: 7d 4a 41 14 adde r10,r10,r8 ffc08b0c: 91 47 00 28 stw r10,40(r7) ffc08b10: 91 67 00 2c stw r11,44(r7) } } ffc08b14: 80 01 00 1c lwz r0,28(r1) ffc08b18: 38 21 00 18 addi r1,r1,24 ffc08b1c: 7c 08 03 a6 mtlr r0 ffc08b20: 4e 80 00 20 blr =============================================================================== ffc08b24 : { uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) ffc08b24: 7c 64 1b 79 mr. r4,r3 } static void rtems_malloc_statistics_at_malloc( void *pointer ) { ffc08b28: 94 21 ff e8 stwu r1,-24(r1) ffc08b2c: 7c 08 02 a6 mflr r0 ffc08b30: 90 01 00 1c stw r0,28(r1) uintptr_t actual_size = 0; ffc08b34: 38 00 00 00 li r0,0 ffc08b38: 90 01 00 08 stw r0,8(r1) uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) ffc08b3c: 41 82 00 54 beq- ffc08b90 <== NEVER TAKEN return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); ffc08b40: 3d 20 00 00 lis r9,0 ffc08b44: 80 69 27 30 lwz r3,10032(r9) ffc08b48: 38 a1 00 08 addi r5,r1,8 ffc08b4c: 48 00 77 15 bl ffc10260 <_Protected_heap_Get_block_size> MSBUMP(lifetime_allocated, actual_size); ffc08b50: 3c e0 00 00 lis r7,0 ffc08b54: 38 e7 33 d0 addi r7,r7,13264 ffc08b58: 81 61 00 08 lwz r11,8(r1) ffc08b5c: 81 27 00 24 lwz r9,36(r7) ffc08b60: 39 40 00 00 li r10,0 ffc08b64: 81 07 00 20 lwz r8,32(r7) current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); ffc08b68: 80 07 00 2c lwz r0,44(r7) if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); ffc08b6c: 7d 6b 48 14 addc r11,r11,r9 ffc08b70: 7d 4a 41 14 adde r10,r10,r8 current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) ffc08b74: 81 27 00 18 lwz r9,24(r7) if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); ffc08b78: 91 47 00 20 stw r10,32(r7) current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); ffc08b7c: 7c 00 58 50 subf r0,r0,r11 if (current_depth > s->max_depth) ffc08b80: 7f 80 48 40 cmplw cr7,r0,r9 if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); ffc08b84: 91 67 00 24 stw r11,36(r7) current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) ffc08b88: 40 9d 00 08 ble- cr7,ffc08b90 s->max_depth = current_depth; ffc08b8c: 90 07 00 18 stw r0,24(r7) } ffc08b90: 80 01 00 1c lwz r0,28(r1) ffc08b94: 38 21 00 18 addi r1,r1,24 ffc08b98: 7c 08 03 a6 mtlr r0 ffc08b9c: 4e 80 00 20 blr =============================================================================== ffc13e78 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { ffc13e78: 94 21 ff e8 stwu r1,-24(r1) ffc13e7c: 7c 08 02 a6 mflr r0 ffc13e80: 93 e1 00 14 stw r31,20(r1) void *return_this; /* * Parameter error checks */ if ( !pointer ) ffc13e84: 7c 7f 1b 79 mr. r31,r3 int rtems_memalign( void **pointer, size_t alignment, size_t size ) { ffc13e88: 93 81 00 08 stw r28,8(r1) ffc13e8c: 7c bc 2b 78 mr r28,r5 ffc13e90: 93 a1 00 0c stw r29,12(r1) /* * Parameter error checks */ if ( !pointer ) return EINVAL; ffc13e94: 3b a0 00 16 li r29,22 int rtems_memalign( void **pointer, size_t alignment, size_t size ) { ffc13e98: 93 c1 00 10 stw r30,16(r1) ffc13e9c: 7c 9e 23 78 mr r30,r4 ffc13ea0: 90 01 00 1c stw r0,28(r1) void *return_this; /* * Parameter error checks */ if ( !pointer ) ffc13ea4: 41 82 00 6c beq- ffc13f10 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc13ea8: 3d 20 00 00 lis r9,0 ffc13eac: 80 09 27 dc lwz r0,10204(r9) ffc13eb0: 2f 80 00 03 cmpwi cr7,r0,3 * Parameter error checks */ if ( !pointer ) return EINVAL; *pointer = NULL; ffc13eb4: 38 00 00 00 li r0,0 ffc13eb8: 90 1f 00 00 stw r0,0(r31) /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc13ebc: 41 9e 00 78 beq- cr7,ffc13f34 <== ALWAYS TAKEN return EINVAL; /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); ffc13ec0: 4b ff 20 51 bl ffc05f10 Heap_Control *heap, uintptr_t size, uintptr_t alignment ) { return ffc13ec4: 3d 20 00 00 lis r9,0 ffc13ec8: 80 69 26 cc lwz r3,9932(r9) ffc13ecc: 7f c5 f3 78 mr r5,r30 ffc13ed0: 7f 84 e3 78 mr r4,r28 ffc13ed4: 38 c0 00 00 li r6,0 ffc13ed8: 4b ff 86 41 bl ffc0c518 <_Protected_heap_Allocate_aligned_with_boundary> RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) return ENOMEM; ffc13edc: 3b a0 00 0c li r29,12 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) ffc13ee0: 7c 7e 1b 79 mr. r30,r3 ffc13ee4: 41 82 00 2c beq- ffc13f10 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) ffc13ee8: 3d 20 00 00 lis r9,0 ffc13eec: 81 29 27 48 lwz r9,10056(r9) ffc13ef0: 2f 89 00 00 cmpwi cr7,r9,0 ffc13ef4: 41 9e 00 14 beq- cr7,ffc13f08 (*rtems_malloc_statistics_helpers->at_malloc)(pointer); ffc13ef8: 80 09 00 04 lwz r0,4(r9) ffc13efc: 7f e3 fb 78 mr r3,r31 ffc13f00: 7c 09 03 a6 mtctr r0 ffc13f04: 4e 80 04 21 bctrl *pointer = return_this; ffc13f08: 93 df 00 00 stw r30,0(r31) return 0; ffc13f0c: 3b a0 00 00 li r29,0 } ffc13f10: 80 01 00 1c lwz r0,28(r1) ffc13f14: 7f a3 eb 78 mr r3,r29 ffc13f18: 83 81 00 08 lwz r28,8(r1) ffc13f1c: 7c 08 03 a6 mtlr r0 ffc13f20: 83 a1 00 0c lwz r29,12(r1) ffc13f24: 83 c1 00 10 lwz r30,16(r1) ffc13f28: 83 e1 00 14 lwz r31,20(r1) ffc13f2c: 38 21 00 18 addi r1,r1,24 ffc13f30: 4e 80 00 20 blr /* * 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() ) ffc13f34: 4b ff 1f 95 bl ffc05ec8 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc13f38: 2f 83 00 00 cmpwi cr7,r3,0 ffc13f3c: 40 be ff 84 bne- cr7,ffc13ec0 <== ALWAYS TAKEN if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(pointer); *pointer = return_this; return 0; } ffc13f40: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc13f44: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc13f48: 83 81 00 08 lwz r28,8(r1) <== NOT EXECUTED ffc13f4c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc13f50: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc13f54: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc13f58: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc13f5c: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc13f60: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc120f0 : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { ffc120f0: 94 21 ff 88 stwu r1,-120(r1) ffc120f4: 7d 80 00 26 mfcr r12 ffc120f8: 7c 08 02 a6 mflr r0 ffc120fc: 93 61 00 64 stw r27,100(r1) ffc12100: 7c 9b 23 78 mr r27,r4 ffc12104: 93 c1 00 70 stw r30,112(r1) ffc12108: 90 01 00 7c stw r0,124(r1) ffc1210c: 93 21 00 5c stw r25,92(r1) ffc12110: 93 41 00 60 stw r26,96(r1) ffc12114: 93 81 00 68 stw r28,104(r1) ffc12118: 93 a1 00 6c stw r29,108(r1) ffc1211c: 93 e1 00 74 stw r31,116(r1) ffc12120: 91 81 00 58 stw r12,88(r1) int success = 0; char *dup_path = strdup(path); ffc12124: 48 00 30 69 bl ffc1518c if (dup_path != NULL) { ffc12128: 7c 7e 1b 79 mr. r30,r3 success = build(dup_path, mode); free(dup_path); } return success != 0 ? 0 : -1; ffc1212c: 38 60 ff ff li r3,-1 rtems_mkdir(const char *path, mode_t mode) { int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { ffc12130: 41 82 01 2c beq- ffc1225c <== NEVER TAKEN char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ffc12134: 88 1e 00 00 lbz r0,0(r30) ffc12138: 7f df f3 78 mr r31,r30 ffc1213c: 2f 80 00 2f cmpwi cr7,r0,47 ffc12140: 41 9e 01 60 beq- cr7,ffc122a0 ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') ffc12144: 2f 80 00 00 cmpwi cr7,r0,0 char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ffc12148: 3b a0 00 00 li r29,0 ffc1214c: 39 20 00 01 li r9,1 retval = 0; break; } } if (!last) *p = '/'; ffc12150: 3b 80 00 2f li r28,47 for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; ffc12154: 3b 40 00 00 li r26,0 oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') ffc12158: 41 9e 00 18 beq- cr7,ffc12170 <== NEVER TAKEN last = 1; else if (p[0] != '/') ffc1215c: 2f 80 00 2f cmpwi cr7,r0,47 ffc12160: 41 9e 00 ac beq- cr7,ffc1220c retval = 0; break; } } if (!last) *p = '/'; ffc12164: 8c 1f 00 01 lbzu r0,1(r31) oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') ffc12168: 2f 80 00 00 cmpwi cr7,r0,0 ffc1216c: 40 be ff f0 bne- cr7,ffc1215c else if (p[0] != '/') continue; *p = '\0'; if (!last && p[1] == '\0') last = 1; if (first) { ffc12170: 2f 89 00 00 cmpwi cr7,r9,0 for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; ffc12174: 98 1f 00 00 stb r0,0(r31) ffc12178: 3b 20 00 01 li r25,1 if (!last && p[1] == '\0') last = 1; if (first) { ffc1217c: 41 be 00 a8 beq+ cr7,ffc12224 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) ffc12180: 2e 19 00 00 cmpwi cr4,r25,0 * mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); ffc12184: 38 60 00 00 li r3,0 ffc12188: 48 00 02 29 bl ffc123b0 ffc1218c: 7c 7d 1b 78 mr r29,r3 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); ffc12190: 54 63 06 ae rlwinm r3,r3,0,26,23 ffc12194: 48 00 02 1d bl ffc123b0 first = 0; } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { ffc12198: 38 80 01 ff li r4,511 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) ffc1219c: 41 b2 00 94 beq+ cr4,ffc12230 (void)umask(oumask); ffc121a0: 7f a3 eb 78 mr r3,r29 ffc121a4: 48 00 02 0d bl ffc123b0 if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { ffc121a8: 7f 64 db 78 mr r4,r27 ffc121ac: 7f c3 f3 78 mr r3,r30 ffc121b0: 4b ff 4b 71 bl ffc06d20 ffc121b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc121b8: 40 bc 00 88 bge+ cr7,ffc12240 if (errno == EEXIST || errno == EISDIR) { ffc121bc: 48 00 1d 65 bl ffc13f20 <__errno> ffc121c0: 80 03 00 00 lwz r0,0(r3) ffc121c4: 2f 80 00 11 cmpwi cr7,r0,17 ffc121c8: 41 9e 00 14 beq- cr7,ffc121dc ffc121cc: 48 00 1d 55 bl ffc13f20 <__errno> ffc121d0: 80 03 00 00 lwz r0,0(r3) ffc121d4: 2f 80 00 15 cmpwi cr7,r0,21 ffc121d8: 40 9e 01 18 bne- cr7,ffc122f0 <== ALWAYS TAKEN if (stat(path, &sb) < 0) { ffc121dc: 7f c3 f3 78 mr r3,r30 ffc121e0: 38 81 00 08 addi r4,r1,8 ffc121e4: 48 00 01 15 bl ffc122f8 ffc121e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc121ec: 41 9c 01 04 blt- cr7,ffc122f0 <== NEVER TAKEN retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { ffc121f0: 80 01 00 14 lwz r0,20(r1) ffc121f4: 54 00 04 26 rlwinm r0,r0,0,16,19 ffc121f8: 2f 80 40 00 cmpwi cr7,r0,16384 ffc121fc: 40 9e 00 b0 bne- cr7,ffc122ac else errno = ENOTDIR; retval = 0; break; } if (last) ffc12200: 41 92 00 90 beq- cr4,ffc12290 retval = 2; ffc12204: 3b e0 00 02 li r31,2 ffc12208: 48 00 00 40 b ffc12248 else if (p[0] != '/') continue; *p = '\0'; if (!last && p[1] == '\0') last = 1; if (first) { ffc1220c: 2f 89 00 00 cmpwi cr7,r9,0 if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; if (!last && p[1] == '\0') ffc12210: 8b 3f 00 01 lbz r25,1(r31) for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; ffc12214: 9b 5f 00 00 stb r26,0(r31) if (!last && p[1] == '\0') ffc12218: 7f 39 00 34 cntlzw r25,r25 ffc1221c: 57 39 d9 7e rlwinm r25,r25,27,5,31 last = 1; if (first) { ffc12220: 40 be ff 60 bne- cr7,ffc12180 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) ffc12224: 2e 19 00 00 cmpwi cr4,r25,0 (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { ffc12228: 38 80 01 ff li r4,511 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) ffc1222c: 40 b2 ff 74 bne- cr4,ffc121a0 (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { ffc12230: 7f c3 f3 78 mr r3,r30 ffc12234: 4b ff 4a ed bl ffc06d20 ffc12238: 2f 83 00 00 cmpwi cr7,r3,0 ffc1223c: 41 bc ff 80 blt- cr7,ffc121bc } else { retval = 0; break; } } if (!last) ffc12240: 41 92 00 50 beq- cr4,ffc12290 ffc12244: 3b e0 00 01 li r31,1 int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); ffc12248: 7f c3 f3 78 mr r3,r30 ffc1224c: 4b ff 41 cd bl ffc06418 } return success != 0 ? 0 : -1; ffc12250: 2f 9f 00 00 cmpwi cr7,r31,0 ffc12254: 38 60 00 00 li r3,0 ffc12258: 41 9e 00 90 beq- cr7,ffc122e8 <== NEVER TAKEN } ffc1225c: 80 01 00 7c lwz r0,124(r1) ffc12260: 81 81 00 58 lwz r12,88(r1) ffc12264: 7c 08 03 a6 mtlr r0 ffc12268: 83 21 00 5c lwz r25,92(r1) ffc1226c: 83 41 00 60 lwz r26,96(r1) ffc12270: 7d 80 81 20 mtcrf 8,r12 ffc12274: 83 61 00 64 lwz r27,100(r1) ffc12278: 83 81 00 68 lwz r28,104(r1) ffc1227c: 83 a1 00 6c lwz r29,108(r1) ffc12280: 83 c1 00 70 lwz r30,112(r1) ffc12284: 83 e1 00 74 lwz r31,116(r1) ffc12288: 38 21 00 78 addi r1,r1,120 ffc1228c: 4e 80 00 20 blr retval = 0; break; } } if (!last) *p = '/'; ffc12290: 9b 9f 00 00 stb r28,0(r31) ffc12294: 39 20 00 00 li r9,0 ffc12298: 8c 1f 00 01 lbzu r0,1(r31) ffc1229c: 4b ff fe cc b ffc12168 p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; ffc122a0: 88 1e 00 01 lbz r0,1(r30) ffc122a4: 3b fe 00 01 addi r31,r30,1 ffc122a8: 4b ff fe 9c b ffc12144 if (errno == EEXIST || errno == EISDIR) { if (stat(path, &sb) < 0) { retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { if (last) ffc122ac: 41 92 00 20 beq- cr4,ffc122cc errno = EEXIST; ffc122b0: 48 00 1c 71 bl ffc13f20 <__errno> ffc122b4: 38 00 00 11 li r0,17 ffc122b8: 90 03 00 00 stw r0,0(r3) int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); ffc122bc: 7f c3 f3 78 mr r3,r30 ffc122c0: 4b ff 41 59 bl ffc06418 } return success != 0 ? 0 : -1; ffc122c4: 38 60 ff ff li r3,-1 ffc122c8: 4b ff ff 94 b ffc1225c break; } else if (!S_ISDIR(sb.st_mode)) { if (last) errno = EEXIST; else errno = ENOTDIR; ffc122cc: 48 00 1c 55 bl ffc13f20 <__errno> ffc122d0: 38 00 00 14 li r0,20 ffc122d4: 90 03 00 00 stw r0,0(r3) } if (!last) *p = '/'; } if (!first && !last) (void)umask(oumask); ffc122d8: 7f a3 eb 78 mr r3,r29 ffc122dc: 48 00 00 d5 bl ffc123b0 int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); ffc122e0: 7f c3 f3 78 mr r3,r30 ffc122e4: 4b ff 41 35 bl ffc06418 } return success != 0 ? 0 : -1; ffc122e8: 38 60 ff ff li r3,-1 ffc122ec: 4b ff ff 70 b ffc1225c } } if (!last) *p = '/'; } if (!first && !last) ffc122f0: 41 92 ff e8 beq+ cr4,ffc122d8 <== NEVER TAKEN ffc122f4: 4b ff ff ec b ffc122e0 =============================================================================== ffc0afa8 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { ffc0afa8: 94 21 ff f0 stwu r1,-16(r1) ffc0afac: 7c 08 02 a6 mflr r0 ffc0afb0: 93 e1 00 0c stw r31,12(r1) int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0afb4: 7c bf 2b 79 mr. r31,r5 rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { ffc0afb8: 90 01 00 14 stw r0,20(r1) /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; ffc0afbc: 38 00 00 09 li r0,9 int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0afc0: 41 82 00 7c beq- ffc0b03c return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); ffc0afc4: 54 84 04 3e clrlwi r4,r4,16 ffc0afc8: 48 00 24 25 bl ffc0d3ec <_Objects_Get_information> if ( !obj_info ) return RTEMS_INVALID_NUMBER; ffc0afcc: 38 00 00 0a li r0,10 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) ffc0afd0: 2c 03 00 00 cmpwi r3,0 ffc0afd4: 41 82 00 68 beq- ffc0b03c * 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; info->maximum = obj_info->maximum; ffc0afd8: a1 03 00 10 lhz r8,16(r3) return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; ffc0afdc: 80 03 00 08 lwz r0,8(r3) 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++ ) ffc0afe0: 2f 88 00 00 cmpwi cr7,r8,0 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; ffc0afe4: 81 63 00 0c lwz r11,12(r3) info->auto_extend = obj_info->auto_extend; ffc0afe8: 89 23 00 12 lbz r9,18(r3) return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; ffc0afec: 90 1f 00 00 stw r0,0(r31) 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++ ) ffc0aff0: 38 00 00 00 li r0,0 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; ffc0aff4: 91 7f 00 04 stw r11,4(r31) info->auto_extend = obj_info->auto_extend; ffc0aff8: 99 3f 00 0c stb r9,12(r31) info->maximum = obj_info->maximum; ffc0affc: 91 1f 00 08 stw r8,8(r31) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0b000: 41 9e 00 34 beq- cr7,ffc0b034 <== NEVER TAKEN ffc0b004: 80 e3 00 1c lwz r7,28(r3) ffc0b008: 39 60 00 01 li r11,1 ffc0b00c: 39 20 00 01 li r9,1 ffc0b010: 39 29 00 01 addi r9,r9,1 ffc0b014: 7f 88 48 40 cmplw cr7,r8,r9 if ( !obj_info->local_table[i] ) ffc0b018: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc0b01c: 7d 47 58 2e lwzx r10,r7,r11 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++ ) ffc0b020: 7d 2b 4b 78 mr r11,r9 if ( !obj_info->local_table[i] ) unallocated++; ffc0b024: 20 ca 00 00 subfic r6,r10,0 ffc0b028: 7c c0 01 94 addze r6,r0 ffc0b02c: 7c c0 33 78 mr r0,r6 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++ ) ffc0b030: 40 9c ff e0 bge+ cr7,ffc0b010 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; ffc0b034: 90 1f 00 10 stw r0,16(r31) return RTEMS_SUCCESSFUL; ffc0b038: 38 00 00 00 li r0,0 } ffc0b03c: 7c 03 03 78 mr r3,r0 ffc0b040: 80 01 00 14 lwz r0,20(r1) ffc0b044: 83 e1 00 0c lwz r31,12(r1) ffc0b048: 38 21 00 10 addi r1,r1,16 ffc0b04c: 7c 08 03 a6 mtlr r0 ffc0b050: 4e 80 00 20 blr =============================================================================== ffc04e30 : void rtems_panic( const char *printf_format, ... ) { ffc04e30: 94 21 ff 88 stwu r1,-120(r1) ffc04e34: 7c 08 02 a6 mflr r0 ffc04e38: 90 81 00 1c stw r4,28(r1) ffc04e3c: 90 01 00 7c stw r0,124(r1) ffc04e40: 90 a1 00 20 stw r5,32(r1) ffc04e44: 90 c1 00 24 stw r6,36(r1) ffc04e48: 90 e1 00 28 stw r7,40(r1) ffc04e4c: 91 01 00 2c stw r8,44(r1) ffc04e50: 91 21 00 30 stw r9,48(r1) ffc04e54: 91 41 00 34 stw r10,52(r1) ffc04e58: 40 86 00 24 bne- cr1,ffc04e7c <== ALWAYS TAKEN ffc04e5c: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED ffc04e60: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED ffc04e64: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED ffc04e68: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED ffc04e6c: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED ffc04e70: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED ffc04e74: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED ffc04e78: d9 01 00 70 stfd f8,112(r1) <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); ffc04e7c: 38 00 00 01 li r0,1 ffc04e80: 98 01 00 08 stb r0,8(r1) ffc04e84: 38 00 00 00 li r0,0 void rtems_panic( const char *printf_format, ... ) { ffc04e88: 7c 64 1b 78 mr r4,r3 va_list arglist; va_start(arglist, printf_format); ffc04e8c: 98 01 00 09 stb r0,9(r1) ffc04e90: 38 01 00 80 addi r0,r1,128 (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc04e94: 38 a1 00 08 addi r5,r1,8 ... ) { va_list arglist; va_start(arglist, printf_format); ffc04e98: 90 01 00 0c stw r0,12(r1) (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc04e9c: 3c 60 20 00 lis r3,8192 ... ) { va_list arglist; va_start(arglist, printf_format); ffc04ea0: 38 01 00 18 addi r0,r1,24 ffc04ea4: 90 01 00 10 stw r0,16(r1) (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc04ea8: 4b ff fc f9 bl ffc04ba0 va_end(arglist); rtems_error(0, "fatal error, exiting"); ffc04eac: 3c 80 ff c2 lis r4,-62 ffc04eb0: 38 84 ef bc addi r4,r4,-4164 ffc04eb4: 38 60 00 00 li r3,0 ffc04eb8: 4c c6 31 82 crclr 4*cr1+eq ffc04ebc: 4b ff fe 9d bl ffc04d58 _exit(errno); ffc04ec0: 48 00 db a1 bl ffc12a60 <__errno> ffc04ec4: 80 63 00 00 lwz r3,0(r3) ffc04ec8: 48 00 0d a5 bl ffc05c6c <_exit> =============================================================================== ffc19084 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc19084: 94 21 ff d0 stwu r1,-48(r1) ffc19088: 7c 08 02 a6 mflr r0 ffc1908c: 93 e1 00 2c stw r31,44(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc19090: 7c 7f 1b 79 mr. r31,r3 return RTEMS_INVALID_NAME; ffc19094: 38 60 00 03 li r3,3 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc19098: 93 c1 00 28 stw r30,40(r1) ffc1909c: 7c be 2b 78 mr r30,r5 ffc190a0: 90 01 00 34 stw r0,52(r1) ffc190a4: 93 61 00 1c stw r27,28(r1) ffc190a8: 93 81 00 20 stw r28,32(r1) ffc190ac: 93 a1 00 24 stw r29,36(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc190b0: 40 82 00 28 bne- ffc190d8 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc190b4: 80 01 00 34 lwz r0,52(r1) ffc190b8: 83 61 00 1c lwz r27,28(r1) ffc190bc: 7c 08 03 a6 mtlr r0 ffc190c0: 83 81 00 20 lwz r28,32(r1) ffc190c4: 83 a1 00 24 lwz r29,36(r1) ffc190c8: 83 c1 00 28 lwz r30,40(r1) ffc190cc: 83 e1 00 2c lwz r31,44(r1) ffc190d0: 38 21 00 30 addi r1,r1,48 ffc190d4: 4e 80 00 20 blr register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) ffc190d8: 2f 84 00 00 cmpwi cr7,r4,0 return RTEMS_INVALID_ADDRESS; ffc190dc: 38 60 00 09 li r3,9 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) ffc190e0: 41 be ff d4 beq- cr7,ffc190b4 return RTEMS_INVALID_ADDRESS; if ( !id ) ffc190e4: 2f 88 00 00 cmpwi cr7,r8,0 ffc190e8: 41 be ff cc beq- cr7,ffc190b4 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc190ec: 2f 85 00 00 cmpwi cr7,r5,0 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; ffc190f0: 38 60 00 08 li r3,8 return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc190f4: 41 9e ff c0 beq+ cr7,ffc190b4 ffc190f8: 2f 86 00 00 cmpwi cr7,r6,0 ffc190fc: 41 9e ff b8 beq+ cr7,ffc190b4 ffc19100: 7f 85 30 40 cmplw cr7,r5,r6 ffc19104: 41 9c ff b0 blt+ cr7,ffc190b4 ffc19108: 70 c0 00 07 andi. r0,r6,7 ffc1910c: 40 82 ff a8 bne+ ffc190b4 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc19110: 70 9b 00 07 andi. r27,r4,7 return RTEMS_INVALID_ADDRESS; ffc19114: 38 60 00 09 li r3,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 ) ) ffc19118: 40 82 ff 9c bne+ ffc190b4 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc1911c: 3d 20 00 00 lis r9,0 ffc19120: 80 09 28 9c lwz r0,10396(r9) ffc19124: 30 00 00 01 addic r0,r0,1 ffc19128: 90 09 28 9c stw r0,10396(r9) return _Thread_Dispatch_disable_level; ffc1912c: 80 09 28 9c lwz r0,10396(r9) * 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 ); ffc19130: 3f 80 00 00 lis r28,0 ffc19134: 90 81 00 08 stw r4,8(r1) ffc19138: 3b 9c 6e c0 addi r28,r28,28352 ffc1913c: 7f 83 e3 78 mr r3,r28 ffc19140: 90 c1 00 0c stw r6,12(r1) ffc19144: 90 e1 00 10 stw r7,16(r1) ffc19148: 91 01 00 14 stw r8,20(r1) ffc1914c: 48 00 5e 95 bl ffc1efe0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { ffc19150: 7c 7d 1b 79 mr. r29,r3 ffc19154: 80 81 00 08 lwz r4,8(r1) ffc19158: 80 c1 00 0c lwz r6,12(r1) ffc1915c: 80 e1 00 10 lwz r7,16(r1) ffc19160: 81 01 00 14 lwz r8,20(r1) ffc19164: 41 82 00 50 beq- ffc191b4 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, ffc19168: 7c be 33 96 divwu r5,r30,r6 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; ffc1916c: 90 9d 00 10 stw r4,16(r29) the_partition->length = length; the_partition->buffer_size = buffer_size; ffc19170: 90 dd 00 18 stw r6,24(r29) the_partition->attribute_set = attribute_set; ffc19174: 90 fd 00 1c stw r7,28(r29) return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; ffc19178: 93 dd 00 14 stw r30,20(r29) the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; ffc1917c: 93 7d 00 20 stw r27,32(r29) _Chain_Initialize( &the_partition->Memory, starting_address, ffc19180: 91 01 00 14 stw r8,20(r1) ffc19184: 38 7d 00 24 addi r3,r29,36 ffc19188: 48 00 41 6d bl ffc1d2f4 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc1918c: 80 1d 00 08 lwz r0,8(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc19190: 81 7c 00 1c lwz r11,28(r28) ffc19194: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc19198: 7f ab 49 2e stwx r29,r11,r9 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc1919c: 93 fd 00 0c stw r31,12(r29) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; ffc191a0: 81 01 00 14 lwz r8,20(r1) ffc191a4: 90 08 00 00 stw r0,0(r8) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); ffc191a8: 48 00 74 b1 bl ffc20658 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc191ac: 38 60 00 00 li r3,0 ffc191b0: 4b ff ff 04 b ffc190b4 _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); ffc191b4: 48 00 74 a5 bl ffc20658 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; ffc191b8: 38 60 00 05 li r3,5 ffc191bc: 4b ff fe f8 b ffc190b4 =============================================================================== ffc1934c : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { ffc1934c: 94 21 ff e0 stwu r1,-32(r1) ffc19350: 7c 08 02 a6 mflr r0 ffc19354: 90 01 00 24 stw r0,36(r1) ffc19358: 7c 60 1b 78 mr r0,r3 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) ffc1935c: 3c 60 00 00 lis r3,0 ffc19360: 93 e1 00 1c stw r31,28(r1) ffc19364: 38 63 6e c0 addi r3,r3,28352 ffc19368: 7c 9f 23 78 mr r31,r4 ffc1936c: 38 a1 00 08 addi r5,r1,8 ffc19370: 93 c1 00 18 stw r30,24(r1) ffc19374: 7c 04 03 78 mr r4,r0 ffc19378: 48 00 62 99 bl ffc1f610 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc1937c: 80 01 00 08 lwz r0,8(r1) ffc19380: 7c 7e 1b 78 mr r30,r3 ffc19384: 2f 80 00 00 cmpwi cr7,r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc19388: 38 60 00 04 li r3,4 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc1938c: 40 9e 00 58 bne- cr7,ffc193e4 ) { void *starting; void *ending; starting = the_partition->starting_address; ffc19390: 80 1e 00 10 lwz r0,16(r30) ending = _Addresses_Add_offset( starting, the_partition->length ); ffc19394: 81 3e 00 14 lwz r9,20(r30) const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc19398: 7f 9f 00 40 cmplw cr7,r31,r0 ffc1939c: 41 9c 00 60 blt- cr7,ffc193fc RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc193a0: 7d 20 4a 14 add r9,r0,r9 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc193a4: 7f 9f 48 40 cmplw cr7,r31,r9 ffc193a8: 41 9d 00 54 bgt- cr7,ffc193fc <== NEVER TAKEN offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); ffc193ac: 81 3e 00 18 lwz r9,24(r30) RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); ffc193b0: 7c 00 f8 50 subf r0,r0,r31 ffc193b4: 7d 60 4b 96 divwu r11,r0,r9 ffc193b8: 7d 2b 49 d6 mullw r9,r11,r9 starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && ffc193bc: 7f 80 48 00 cmpw cr7,r0,r9 ffc193c0: 40 9e 00 3c bne- cr7,ffc193fc RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); ffc193c4: 38 7e 00 24 addi r3,r30,36 ffc193c8: 7f e4 fb 78 mr r4,r31 ffc193cc: 48 00 3e 91 bl ffc1d25c <_Chain_Append> case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; ffc193d0: 81 3e 00 20 lwz r9,32(r30) ffc193d4: 38 09 ff ff addi r0,r9,-1 ffc193d8: 90 1e 00 20 stw r0,32(r30) _Thread_Enable_dispatch(); ffc193dc: 48 00 72 7d bl ffc20658 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc193e0: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc193e4: 80 01 00 24 lwz r0,36(r1) ffc193e8: 83 c1 00 18 lwz r30,24(r1) ffc193ec: 7c 08 03 a6 mtlr r0 ffc193f0: 83 e1 00 1c lwz r31,28(r1) ffc193f4: 38 21 00 20 addi r1,r1,32 ffc193f8: 4e 80 00 20 blr _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc193fc: 48 00 72 5d bl ffc20658 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc19400: 80 01 00 24 lwz r0,36(r1) the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; ffc19404: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc19408: 83 c1 00 18 lwz r30,24(r1) ffc1940c: 7c 08 03 a6 mtlr r0 ffc19410: 83 e1 00 1c lwz r31,28(r1) ffc19414: 38 21 00 20 addi r1,r1,32 ffc19418: 4e 80 00 20 blr =============================================================================== ffc0a21c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { ffc0a21c: 94 21 ff d0 stwu r1,-48(r1) ffc0a220: 7c 08 02 a6 mflr r0 ffc0a224: 93 e1 00 2c stw r31,44(r1) ffc0a228: 7c 7f 1b 78 mr r31,r3 RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) ffc0a22c: 3c 60 00 00 lis r3,0 ffc0a230: 93 c1 00 28 stw r30,40(r1) ffc0a234: 38 63 2c 00 addi r3,r3,11264 ffc0a238: 7c 9e 23 78 mr r30,r4 ffc0a23c: 38 a1 00 08 addi r5,r1,8 ffc0a240: 90 01 00 34 stw r0,52(r1) ffc0a244: 7f e4 fb 78 mr r4,r31 ffc0a248: 93 a1 00 24 stw r29,36(r1) ffc0a24c: 93 61 00 1c stw r27,28(r1) ffc0a250: 93 81 00 20 stw r28,32(r1) ffc0a254: 48 00 2c f5 bl ffc0cf48 <_Objects_Get> ffc0a258: 7c 7d 1b 78 mr r29,r3 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc0a25c: 80 01 00 08 lwz r0,8(r1) ffc0a260: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a264: 40 9e 00 4c bne- cr7,ffc0a2b0 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0a268: 3f 80 00 00 lis r28,0 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc0a26c: 81 23 00 40 lwz r9,64(r3) ffc0a270: 3b 9c 2e 98 addi r28,r28,11928 ffc0a274: 80 1c 00 0c lwz r0,12(r28) ffc0a278: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a27c: 41 9e 00 60 beq- cr7,ffc0a2dc _Thread_Enable_dispatch(); ffc0a280: 48 00 3d 11 bl ffc0df90 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a284: 80 01 00 34 lwz r0,52(r1) switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; ffc0a288: 3b e0 00 17 li r31,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a28c: 83 61 00 1c lwz r27,28(r1) ffc0a290: 7c 08 03 a6 mtlr r0 ffc0a294: 7f e3 fb 78 mr r3,r31 ffc0a298: 83 81 00 20 lwz r28,32(r1) ffc0a29c: 83 a1 00 24 lwz r29,36(r1) ffc0a2a0: 83 c1 00 28 lwz r30,40(r1) ffc0a2a4: 83 e1 00 2c lwz r31,44(r1) ffc0a2a8: 38 21 00 30 addi r1,r1,48 ffc0a2ac: 4e 80 00 20 blr #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a2b0: 3b e0 00 04 li r31,4 } ffc0a2b4: 80 01 00 34 lwz r0,52(r1) ffc0a2b8: 7f e3 fb 78 mr r3,r31 ffc0a2bc: 83 61 00 1c lwz r27,28(r1) ffc0a2c0: 7c 08 03 a6 mtlr r0 ffc0a2c4: 83 81 00 20 lwz r28,32(r1) ffc0a2c8: 83 a1 00 24 lwz r29,36(r1) ffc0a2cc: 83 c1 00 28 lwz r30,40(r1) ffc0a2d0: 83 e1 00 2c lwz r31,44(r1) ffc0a2d4: 38 21 00 30 addi r1,r1,48 ffc0a2d8: 4e 80 00 20 blr if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { ffc0a2dc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a2e0: 41 9e 00 68 beq- cr7,ffc0a348 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0a2e4: 7f 60 00 a6 mfmsr r27 ffc0a2e8: 7c 10 42 a6 mfsprg r0,0 ffc0a2ec: 7f 60 00 78 andc r0,r27,r0 ffc0a2f0: 7c 00 01 24 mtmsr r0 _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { ffc0a2f4: 80 03 00 38 lwz r0,56(r3) ffc0a2f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a2fc: 41 9e 00 74 beq- cr7,ffc0a370 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { ffc0a300: 2f 80 00 02 cmpwi cr7,r0,2 ffc0a304: 41 9e 00 bc beq- cr7,ffc0a3c0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc0a308: 2f 80 00 04 cmpwi cr7,r0,4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a30c: 3b e0 00 04 li r31,4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc0a310: 40 9e ff a4 bne+ cr7,ffc0a2b4 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); ffc0a314: 4b ff fd e1 bl ffc0a0f4 <_Rate_monotonic_Update_statistics> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0a318: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a31c: 38 00 00 02 li r0,2 the_period->next_length = length; ffc0a320: 93 dd 00 3c stw r30,60(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a324: 3c 60 00 00 lis r3,0 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a328: 90 1d 00 38 stw r0,56(r29) ffc0a32c: 38 63 2d c8 addi r3,r3,11720 ffc0a330: 38 9d 00 10 addi r4,r29,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a334: 93 dd 00 1c stw r30,28(r29) the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; ffc0a338: 3b e0 00 06 li r31,6 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a33c: 48 00 50 39 bl ffc0f374 <_Watchdog_Insert> the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc0a340: 48 00 3c 51 bl ffc0df90 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; ffc0a344: 4b ff ff 70 b ffc0a2b4 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { ffc0a348: 80 03 00 38 lwz r0,56(r3) ffc0a34c: 3b e0 00 00 li r31,0 ffc0a350: 2b 80 00 04 cmplwi cr7,r0,4 ffc0a354: 41 9d 00 14 bgt- cr7,ffc0a368 <== NEVER TAKEN ffc0a358: 3d 20 ff c2 lis r9,-62 ffc0a35c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0a360: 39 29 13 2c addi r9,r9,4908 ffc0a364: 7f e9 00 2e lwzx r31,r9,r0 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); ffc0a368: 48 00 3c 29 bl ffc0df90 <_Thread_Enable_dispatch> return( return_value ); ffc0a36c: 4b ff ff 48 b ffc0a2b4 ffc0a370: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); ffc0a374: 4b ff fc dd bl ffc0a050 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a378: 39 20 00 02 li r9,2 ffc0a37c: 91 3d 00 38 stw r9,56(r29) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0a380: 3d 20 ff c1 lis r9,-63 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a384: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc0a388: 39 29 a7 e4 addi r9,r9,-22556 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a38c: 90 1d 00 18 stw r0,24(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a390: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0a394: 91 3d 00 2c stw r9,44(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a398: 38 63 2d c8 addi r3,r3,11720 ffc0a39c: 38 9d 00 10 addi r4,r29,16 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc0a3a0: 93 fd 00 30 stw r31,48(r29) the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc0a3a4: 3b e0 00 00 li r31,0 the_watchdog->user_data = user_data; ffc0a3a8: 90 1d 00 34 stw r0,52(r29) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; ffc0a3ac: 93 dd 00 3c stw r30,60(r29) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a3b0: 93 dd 00 1c stw r30,28(r29) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a3b4: 48 00 4f c1 bl ffc0f374 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc0a3b8: 48 00 3b d9 bl ffc0df90 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a3bc: 4b ff fe f8 b ffc0a2b4 if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); ffc0a3c0: 4b ff fd 35 bl ffc0a0f4 <_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; ffc0a3c4: 38 00 00 01 li r0,1 ffc0a3c8: 90 1d 00 38 stw r0,56(r29) the_period->next_length = length; ffc0a3cc: 93 dd 00 3c stw r30,60(r29) ffc0a3d0: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc0a3d4: 81 3c 00 0c lwz r9,12(r28) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0a3d8: 38 80 40 00 li r4,16384 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc0a3dc: 80 1d 00 08 lwz r0,8(r29) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0a3e0: 7d 23 4b 78 mr r3,r9 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc0a3e4: 90 09 00 20 stw r0,32(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0a3e8: 48 00 46 6d bl ffc0ea54 <_Thread_Set_state> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0a3ec: 7d 20 00 a6 mfmsr r9 ffc0a3f0: 7c 10 42 a6 mfsprg r0,0 ffc0a3f4: 7d 20 00 78 andc r0,r9,r0 ffc0a3f8: 7c 00 01 24 mtmsr r0 * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a3fc: 39 60 00 02 li r11,2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; ffc0a400: 80 1d 00 38 lwz r0,56(r29) the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a404: 91 7d 00 38 stw r11,56(r29) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0a408: 7d 20 01 24 mtmsr r9 /* * 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 ) ffc0a40c: 2f 80 00 03 cmpwi cr7,r0,3 ffc0a410: 41 9e 00 10 beq- cr7,ffc0a420 <== NEVER TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); ffc0a414: 48 00 3b 7d bl ffc0df90 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a418: 3b e0 00 00 li r31,0 ffc0a41c: 4b ff fe 98 b ffc0a2b4 /* * 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 ); ffc0a420: 80 7c 00 0c lwz r3,12(r28) <== NOT EXECUTED ffc0a424: 38 80 40 00 li r4,16384 <== NOT EXECUTED ffc0a428: 48 00 36 e9 bl ffc0db10 <_Thread_Clear_state> <== NOT EXECUTED ffc0a42c: 4b ff ff e8 b ffc0a414 <== NOT EXECUTED =============================================================================== ffc0a430 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc0a430: 94 21 ff 70 stwu r1,-144(r1) ffc0a434: 7c 08 02 a6 mflr r0 ffc0a438: 90 01 00 94 stw r0,148(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc0a43c: 7c 80 23 79 mr. r0,r4 */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc0a440: 93 a1 00 84 stw r29,132(r1) ffc0a444: 7c 7d 1b 78 mr r29,r3 ffc0a448: 93 01 00 70 stw r24,112(r1) ffc0a44c: 93 21 00 74 stw r25,116(r1) ffc0a450: 93 41 00 78 stw r26,120(r1) ffc0a454: 93 61 00 7c stw r27,124(r1) ffc0a458: 93 81 00 80 stw r28,128(r1) ffc0a45c: 93 c1 00 88 stw r30,136(r1) ffc0a460: 93 e1 00 8c stw r31,140(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc0a464: 90 01 00 68 stw r0,104(r1) ffc0a468: 41 82 01 70 beq- ffc0a5d8 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); ffc0a46c: 3c 80 ff c2 lis r4,-62 ffc0a470: 7c 09 03 a6 mtctr r0 ffc0a474: 38 84 13 40 addi r4,r4,4928 /* * 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 ; ffc0a478: 3f c0 00 00 lis r30,0 ffc0a47c: 3b de 2c 00 addi r30,r30,11264 char name[5]; if ( !print ) return; (*print)( context, "Period information by period\n" ); ffc0a480: 4c c6 31 82 crclr 4*cr1+eq ffc0a484: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc0a488: 80 01 00 68 lwz r0,104(r1) ffc0a48c: 3c 80 ff c2 lis r4,-62 ffc0a490: 7c 09 03 a6 mtctr r0 ffc0a494: 38 84 13 60 addi r4,r4,4960 ffc0a498: 7f a3 eb 78 mr r3,r29 ffc0a49c: 4c c6 31 82 crclr 4*cr1+eq ffc0a4a0: 4e 80 04 21 bctrl (*print)( context, "--- Wall times are in seconds ---\n" ); ffc0a4a4: 80 01 00 68 lwz r0,104(r1) ffc0a4a8: 3c 80 ff c2 lis r4,-62 ffc0a4ac: 7c 09 03 a6 mtctr r0 ffc0a4b0: 38 84 13 84 addi r4,r4,4996 ffc0a4b4: 7f a3 eb 78 mr r3,r29 ffc0a4b8: 4c c6 31 82 crclr 4*cr1+eq ffc0a4bc: 4e 80 04 21 bctrl Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc0a4c0: 80 01 00 68 lwz r0,104(r1) ffc0a4c4: 3c 80 ff c2 lis r4,-62 ffc0a4c8: 7c 09 03 a6 mtctr r0 ffc0a4cc: 38 84 13 a8 addi r4,r4,5032 ffc0a4d0: 7f a3 eb 78 mr r3,r29 ffc0a4d4: 4c c6 31 82 crclr 4*cr1+eq ffc0a4d8: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc0a4dc: 80 01 00 68 lwz r0,104(r1) ffc0a4e0: 3c 80 ff c2 lis r4,-62 ffc0a4e4: 7c 09 03 a6 mtctr r0 ffc0a4e8: 7f a3 eb 78 mr r3,r29 ffc0a4ec: 38 84 13 f4 addi r4,r4,5108 ffc0a4f0: 4c c6 31 82 crclr 4*cr1+eq ffc0a4f4: 4e 80 04 21 bctrl /* * 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 ; ffc0a4f8: 83 fe 00 08 lwz r31,8(r30) ffc0a4fc: 80 1e 00 0c lwz r0,12(r30) ffc0a500: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0a504: 41 9d 00 d4 bgt- cr7,ffc0a5d8 <== 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, ffc0a508: 3f 40 ff c2 lis r26,-62 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, ffc0a50c: 3f 00 ff c2 lis r24,-62 ffc0a510: 3f 80 10 62 lis r28,4194 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, ffc0a514: 3f 20 ff c2 lis r25,-62 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a518: 3f 60 ff c2 lis r27,-62 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc0a51c: 3b 5a 14 40 addi r26,r26,5184 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, ffc0a520: 3b 18 14 58 addi r24,r24,5208 ffc0a524: 63 9c 4d d3 ori r28,r28,19923 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, ffc0a528: 3b 39 14 78 addi r25,r25,5240 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a52c: 3b 7b ff a0 addi r27,r27,-96 ffc0a530: 48 00 00 14 b ffc0a544 /* * 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 ; ffc0a534: 80 1e 00 0c lwz r0,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc0a538: 3b ff 00 01 addi r31,r31,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 ; ffc0a53c: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a540: 41 9c 00 98 blt- cr7,ffc0a5d8 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc0a544: 7f e3 fb 78 mr r3,r31 ffc0a548: 38 81 00 30 addi r4,r1,48 ffc0a54c: 48 00 74 79 bl ffc119c4 if ( status != RTEMS_SUCCESSFUL ) ffc0a550: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a554: 40 9e ff e0 bne+ cr7,ffc0a534 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); ffc0a558: 38 81 00 18 addi r4,r1,24 ffc0a55c: 7f e3 fb 78 mr r3,r31 ffc0a560: 48 00 75 75 bl ffc11ad4 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc0a564: 80 61 00 18 lwz r3,24(r1) ffc0a568: 38 a1 00 08 addi r5,r1,8 ffc0a56c: 38 80 00 05 li r4,5 ffc0a570: 48 00 03 41 bl ffc0a8b0 /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc0a574: 80 01 00 68 lwz r0,104(r1) ffc0a578: 7f 44 d3 78 mr r4,r26 ffc0a57c: 80 e1 00 30 lwz r7,48(r1) ffc0a580: 7f e5 fb 78 mr r5,r31 ffc0a584: 7c 09 03 a6 mtctr r0 ffc0a588: 7f a3 eb 78 mr r3,r29 ffc0a58c: 81 01 00 34 lwz r8,52(r1) ffc0a590: 38 c1 00 08 addi r6,r1,8 ffc0a594: 4c c6 31 82 crclr 4*cr1+eq ffc0a598: 4e 80 04 21 bctrl ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a59c: 80 01 00 30 lwz r0,48(r1) 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 ); ffc0a5a0: 38 61 00 48 addi r3,r1,72 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a5a4: 2f 80 00 00 cmpwi cr7,r0,0 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 ); ffc0a5a8: 38 a1 00 10 addi r5,r1,16 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a5ac: 7f 64 db 78 mr r4,r27 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a5b0: 40 9e 00 58 bne- cr7,ffc0a608 (*print)( context, "\n" ); ffc0a5b4: 80 01 00 68 lwz r0,104(r1) ffc0a5b8: 7f a3 eb 78 mr r3,r29 * 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 ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc0a5bc: 3b ff 00 01 addi r31,r31,1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a5c0: 7c 09 03 a6 mtctr r0 ffc0a5c4: 4c c6 31 82 crclr 4*cr1+eq ffc0a5c8: 4e 80 04 21 bctrl /* * 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 ; ffc0a5cc: 80 1e 00 0c lwz r0,12(r30) ffc0a5d0: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a5d4: 40 9c ff 70 bge+ cr7,ffc0a544 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } ffc0a5d8: 80 01 00 94 lwz r0,148(r1) ffc0a5dc: 83 01 00 70 lwz r24,112(r1) ffc0a5e0: 7c 08 03 a6 mtlr r0 ffc0a5e4: 83 21 00 74 lwz r25,116(r1) ffc0a5e8: 83 41 00 78 lwz r26,120(r1) ffc0a5ec: 83 61 00 7c lwz r27,124(r1) ffc0a5f0: 83 81 00 80 lwz r28,128(r1) ffc0a5f4: 83 a1 00 84 lwz r29,132(r1) ffc0a5f8: 83 c1 00 88 lwz r30,136(r1) ffc0a5fc: 83 e1 00 8c lwz r31,140(r1) ffc0a600: 38 21 00 90 addi r1,r1,144 ffc0a604: 4e 80 00 20 blr 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 ); ffc0a608: 7c 04 03 78 mr r4,r0 ffc0a60c: 48 00 47 41 bl ffc0ed4c <_Timespec_Divide_by_integer> (*print)( context, ffc0a610: 80 01 00 14 lwz r0,20(r1) ffc0a614: 80 81 00 3c lwz r4,60(r1) ffc0a618: 7f a3 eb 78 mr r3,r29 ffc0a61c: 81 61 00 44 lwz r11,68(r1) ffc0a620: 7d 40 e0 96 mulhw r10,r0,r28 ffc0a624: 80 e1 00 40 lwz r7,64(r1) ffc0a628: 7c c4 e0 96 mulhw r6,r4,r28 ffc0a62c: 81 21 00 10 lwz r9,16(r1) ffc0a630: 80 a1 00 38 lwz r5,56(r1) ffc0a634: 7d 0b e0 96 mulhw r8,r11,r28 ffc0a638: 7c 00 fe 70 srawi r0,r0,31 ffc0a63c: 7d 4a 36 70 srawi r10,r10,6 ffc0a640: 7d 40 50 50 subf r10,r0,r10 ffc0a644: 80 01 00 68 lwz r0,104(r1) ffc0a648: 7d 6b fe 70 srawi r11,r11,31 ffc0a64c: 7c 84 fe 70 srawi r4,r4,31 ffc0a650: 7c 09 03 a6 mtctr r0 ffc0a654: 7c c6 36 70 srawi r6,r6,6 ffc0a658: 7d 08 36 70 srawi r8,r8,6 ffc0a65c: 7c c4 30 50 subf r6,r4,r6 ffc0a660: 7d 0b 40 50 subf r8,r11,r8 ffc0a664: 7f 04 c3 78 mr r4,r24 ffc0a668: 4c c6 31 82 crclr 4*cr1+eq ffc0a66c: 4e 80 04 21 bctrl 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); ffc0a670: 80 81 00 30 lwz r4,48(r1) ffc0a674: 38 61 00 60 addi r3,r1,96 ffc0a678: 38 a1 00 10 addi r5,r1,16 ffc0a67c: 48 00 46 d1 bl ffc0ed4c <_Timespec_Divide_by_integer> (*print)( context, ffc0a680: 80 01 00 14 lwz r0,20(r1) ffc0a684: 80 c1 00 54 lwz r6,84(r1) ffc0a688: 7f a3 eb 78 mr r3,r29 ffc0a68c: 81 61 00 5c lwz r11,92(r1) ffc0a690: 7d 40 e0 96 mulhw r10,r0,r28 ffc0a694: 80 a1 00 50 lwz r5,80(r1) ffc0a698: 7d 86 e0 96 mulhw r12,r6,r28 ffc0a69c: 80 e1 00 58 lwz r7,88(r1) ffc0a6a0: 81 21 00 10 lwz r9,16(r1) ffc0a6a4: 7d 0b e0 96 mulhw r8,r11,r28 ffc0a6a8: 7c 00 fe 70 srawi r0,r0,31 ffc0a6ac: 7d 4a 36 70 srawi r10,r10,6 ffc0a6b0: 7d 40 50 50 subf r10,r0,r10 ffc0a6b4: 80 01 00 68 lwz r0,104(r1) ffc0a6b8: 7d 8c 36 70 srawi r12,r12,6 ffc0a6bc: 7d 6b fe 70 srawi r11,r11,31 ffc0a6c0: 7c 09 03 a6 mtctr r0 ffc0a6c4: 7c c6 fe 70 srawi r6,r6,31 ffc0a6c8: 7d 08 36 70 srawi r8,r8,6 ffc0a6cc: 7f 24 cb 78 mr r4,r25 ffc0a6d0: 7c c6 60 50 subf r6,r6,r12 ffc0a6d4: 7d 0b 40 50 subf r8,r11,r8 ffc0a6d8: 4c c6 31 82 crclr 4*cr1+eq ffc0a6dc: 4e 80 04 21 bctrl ffc0a6e0: 4b ff fe 54 b ffc0a534 =============================================================================== ffc0a6f4 : * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc0a6f4: 3d 20 00 00 lis r9,0 /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { ffc0a6f8: 94 21 ff f0 stwu r1,-16(r1) ffc0a6fc: 7c 08 02 a6 mflr r0 ffc0a700: 81 69 28 08 lwz r11,10248(r9) ffc0a704: 90 01 00 14 stw r0,20(r1) ffc0a708: 38 0b 00 01 addi r0,r11,1 ffc0a70c: 90 09 28 08 stw r0,10248(r9) ffc0a710: 93 c1 00 08 stw r30,8(r1) ffc0a714: 93 e1 00 0c stw r31,12(r1) return _Thread_Dispatch_disable_level; ffc0a718: 80 09 28 08 lwz r0,10248(r9) /* * 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 ; ffc0a71c: 3f c0 00 00 lis r30,0 ffc0a720: 3b de 2c 00 addi r30,r30,11264 ffc0a724: 83 fe 00 08 lwz r31,8(r30) ffc0a728: 80 1e 00 0c lwz r0,12(r30) ffc0a72c: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0a730: 41 9d 00 1c bgt- cr7,ffc0a74c <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { (void) rtems_rate_monotonic_reset_statistics( id ); ffc0a734: 7f e3 fb 78 mr r3,r31 ffc0a738: 48 00 00 31 bl ffc0a768 /* * 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 ; ffc0a73c: 80 1e 00 0c lwz r0,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc0a740: 3b ff 00 01 addi r31,r31,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 ; ffc0a744: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a748: 40 9c ff ec bge+ cr7,ffc0a734 } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); ffc0a74c: 48 00 38 45 bl ffc0df90 <_Thread_Enable_dispatch> } ffc0a750: 80 01 00 14 lwz r0,20(r1) ffc0a754: 83 c1 00 08 lwz r30,8(r1) ffc0a758: 7c 08 03 a6 mtlr r0 ffc0a75c: 83 e1 00 0c lwz r31,12(r1) ffc0a760: 38 21 00 10 addi r1,r1,16 ffc0a764: 4e 80 00 20 blr =============================================================================== ffc1ad24 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc1ad24: 94 21 ff e0 stwu r1,-32(r1) ffc1ad28: 7c 08 02 a6 mflr r0 ffc1ad2c: 93 e1 00 1c stw r31,28(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc1ad30: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc1ad34: 90 01 00 24 stw r0,36(r1) Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; ffc1ad38: 38 00 00 0a li r0,10 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc1ad3c: 40 82 00 1c bne- ffc1ad58 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1ad40: 7c 03 03 78 mr r3,r0 ffc1ad44: 80 01 00 24 lwz r0,36(r1) ffc1ad48: 83 e1 00 1c lwz r31,28(r1) ffc1ad4c: 38 21 00 20 addi r1,r1,32 ffc1ad50: 7c 08 03 a6 mtlr r0 ffc1ad54: 4e 80 00 20 blr ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); ffc1ad58: 38 81 00 08 addi r4,r1,8 ffc1ad5c: 48 00 59 39 bl ffc20694 <_Thread_Get> switch ( location ) { ffc1ad60: 80 01 00 08 lwz r0,8(r1) ffc1ad64: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ad68: 40 9e 00 6c bne- cr7,ffc1add4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc1ad6c: 81 23 01 2c lwz r9,300(r3) asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { ffc1ad70: 80 09 00 0c lwz r0,12(r9) ffc1ad74: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ad78: 41 9e 00 78 beq- cr7,ffc1adf0 if ( asr->is_enabled ) { ffc1ad7c: 88 09 00 08 lbz r0,8(r9) ffc1ad80: 2f 80 00 00 cmpwi cr7,r0,0 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1ad84: 7c 00 00 a6 mfmsr r0 ffc1ad88: 7d 70 42 a6 mfsprg r11,0 ffc1ad8c: 7c 0b 58 78 andc r11,r0,r11 ffc1ad90: 7d 60 01 24 mtmsr r11 ffc1ad94: 41 9e 00 68 beq- cr7,ffc1adfc ) { ISR_Level _level; _ISR_Disable( _level ); *signal_set |= signals; ffc1ad98: 81 69 00 14 lwz r11,20(r9) ffc1ad9c: 7d 7f fb 78 or r31,r11,r31 ffc1ada0: 93 e9 00 14 stw r31,20(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1ada4: 7c 00 01 24 mtmsr r0 _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc1ada8: 3d 20 00 00 lis r9,0 ffc1adac: 39 29 71 d8 addi r9,r9,29144 ffc1adb0: 80 09 00 08 lwz r0,8(r9) ffc1adb4: 2f 80 00 00 cmpwi cr7,r0,0 ffc1adb8: 41 9e 00 10 beq- cr7,ffc1adc8 ffc1adbc: 80 09 00 0c lwz r0,12(r9) ffc1adc0: 7f 83 00 00 cmpw cr7,r3,r0 ffc1adc4: 41 9e 00 4c beq- cr7,ffc1ae10 <== ALWAYS TAKEN _Thread_Dispatch_necessary = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); ffc1adc8: 48 00 58 91 bl ffc20658 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc1adcc: 38 00 00 00 li r0,0 ffc1add0: 4b ff ff 70 b ffc1ad40 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1add4: 38 00 00 04 li r0,4 } ffc1add8: 83 e1 00 1c lwz r31,28(r1) ffc1addc: 7c 03 03 78 mr r3,r0 ffc1ade0: 80 01 00 24 lwz r0,36(r1) ffc1ade4: 38 21 00 20 addi r1,r1,32 ffc1ade8: 7c 08 03 a6 mtlr r0 ffc1adec: 4e 80 00 20 blr _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc1adf0: 48 00 58 69 bl ffc20658 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; ffc1adf4: 38 00 00 0b li r0,11 ffc1adf8: 4b ff ff 48 b ffc1ad40 ffc1adfc: 81 69 00 18 lwz r11,24(r9) ffc1ae00: 7d 7f fb 78 or r31,r11,r31 ffc1ae04: 93 e9 00 18 stw r31,24(r9) ffc1ae08: 7c 00 01 24 mtmsr r0 ffc1ae0c: 4b ff ff bc b ffc1adc8 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; ffc1ae10: 38 00 00 01 li r0,1 ffc1ae14: 98 09 00 18 stb r0,24(r9) ffc1ae18: 4b ff ff b0 b ffc1adc8 =============================================================================== ffc03cfc : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { ffc03cfc: 7c 08 02 a6 mflr r0 ffc03d00: 94 21 ff f8 stwu r1,-8(r1) ffc03d04: 90 01 00 0c stw r0,12(r1) Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ ffc03d08: 80 03 00 08 lwz r0,8(r3) ffc03d0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc03d10: 41 9e 00 1c beq- cr7,ffc03d2c <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; ffc03d14: 80 63 00 b8 lwz r3,184(r3) ffc03d18: 3c 80 00 00 lis r4,0 ffc03d1c: 38 84 2a c4 addi r4,r4,10948 ffc03d20: 38 63 00 08 addi r3,r3,8 ffc03d24: 38 a0 00 80 li r5,128 ffc03d28: 48 00 f3 15 bl ffc1303c } ffc03d2c: 80 01 00 0c lwz r0,12(r1) ffc03d30: 38 21 00 08 addi r1,r1,8 ffc03d34: 7c 08 03 a6 mtlr r0 ffc03d38: 4e 80 00 20 blr =============================================================================== ffc03c78 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { ffc03c78: 7c 08 02 a6 mflr r0 ffc03c7c: 94 21 ff f8 stwu r1,-8(r1) static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if ( Stack_check_Initialized ) ffc03c80: 3d 20 00 00 lis r9,0 */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { ffc03c84: 90 01 00 0c stw r0,12(r1) static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if ( Stack_check_Initialized ) ffc03c88: 39 29 28 50 addi r9,r9,10320 ffc03c8c: 80 09 00 08 lwz r0,8(r9) ffc03c90: 2f 80 00 00 cmpwi cr7,r0,0 ffc03c94: 40 9e 00 3c bne- cr7,ffc03cd0 ffc03c98: 38 00 00 20 li r0,32 ffc03c9c: 7c 09 03 a6 mtctr r0 ffc03ca0: 3d 40 00 00 lis r10,0 ffc03ca4: 3d 00 ff c2 lis r8,-62 ffc03ca8: 39 4a 2a c0 addi r10,r10,10944 } /* * rtems_stack_checker_create_extension */ bool rtems_stack_checker_create_extension( ffc03cac: 39 60 00 00 li r11,0 ffc03cb0: 39 08 8f 98 addi r8,r8,-28776 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; ffc03cb4: 55 60 17 3a rlwinm r0,r11,2,28,29 ffc03cb8: 7c 08 00 2e lwzx r0,r8,r0 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { ffc03cbc: 39 6b 00 01 addi r11,r11,1 p[i] = pattern[ i%4 ]; ffc03cc0: 94 0a 00 04 stwu r0,4(r10) /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { ffc03cc4: 42 00 ff f0 bdnz+ ffc03cb4 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); } #endif Stack_check_Initialized = 1; ffc03cc8: 38 00 00 01 li r0,1 ffc03ccc: 90 09 00 08 stw r0,8(r9) Thread_Control *the_thread ) { Stack_check_Initialize(); if (the_thread) ffc03cd0: 2f 84 00 00 cmpwi cr7,r4,0 ffc03cd4: 41 9e 00 14 beq- cr7,ffc03ce8 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); ffc03cd8: 80 64 00 b8 lwz r3,184(r4) ffc03cdc: 80 a4 00 b4 lwz r5,180(r4) ffc03ce0: 38 80 00 a5 li r4,165 ffc03ce4: 48 00 f4 3d bl ffc13120 return true; } ffc03ce8: 80 01 00 0c lwz r0,12(r1) ffc03cec: 38 60 00 01 li r3,1 ffc03cf0: 38 21 00 08 addi r1,r1,8 ffc03cf4: 7c 08 03 a6 mtlr r0 ffc03cf8: 4e 80 00 20 blr =============================================================================== ffc03ea8 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc03ea8: 94 21 ff e8 stwu r1,-24(r1) ffc03eac: 7c 08 02 a6 mflr r0 ffc03eb0: 93 a1 00 0c stw r29,12(r1) Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; ffc03eb4: 3f a0 00 00 lis r29,0 ffc03eb8: 3b bd 2e 38 addi r29,r29,11832 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc03ebc: 90 01 00 1c stw r0,28(r1) Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; ffc03ec0: 81 3d 00 0c lwz r9,12(r29) /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc03ec4: 93 e1 00 14 stw r31,20(r1) ffc03ec8: 7c 3f 0b 78 mr r31,r1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc03ecc: 80 69 00 b8 lwz r3,184(r9) /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc03ed0: 93 c1 00 10 stw r30,16(r1) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; ffc03ed4: 3b c0 00 00 li r30,0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc03ed8: 7f 9f 18 40 cmplw cr7,r31,r3 ffc03edc: 41 9c 00 18 blt- cr7,ffc03ef4 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { ffc03ee0: 83 c9 00 b4 lwz r30,180(r9) ffc03ee4: 7f c3 f2 14 add r30,r3,r30 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) ffc03ee8: 7f df f0 10 subfc r30,r31,r30 ffc03eec: 3b c0 00 00 li r30,0 ffc03ef0: 7f de f1 14 adde r30,r30,r30 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { ffc03ef4: 3d 20 00 00 lis r9,0 ffc03ef8: 80 09 28 58 lwz r0,10328(r9) */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; bool sp_ok; bool pattern_ok = true; ffc03efc: 38 80 00 01 li r4,1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { ffc03f00: 2f 80 00 00 cmpwi cr7,r0,0 ffc03f04: 41 9e 00 20 beq- cr7,ffc03f24 <== NEVER TAKEN pattern_ok = (!memcmp( ffc03f08: 3c 80 00 00 lis r4,0 ffc03f0c: 38 84 2a c4 addi r4,r4,10948 ffc03f10: 38 63 00 08 addi r3,r3,8 ffc03f14: 38 a0 00 80 li r5,128 ffc03f18: 48 00 f0 81 bl ffc12f98 ffc03f1c: 7c 64 00 34 cntlzw r4,r3 ffc03f20: 54 84 d9 7e rlwinm r4,r4,27,5,31 /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { ffc03f24: 2f 9e 00 00 cmpwi cr7,r30,0 ffc03f28: 41 9e 00 30 beq- cr7,ffc03f58 <== NEVER TAKEN ffc03f2c: 2f 84 00 00 cmpwi cr7,r4,0 ffc03f30: 41 9e 00 28 beq- cr7,ffc03f58 <== NEVER TAKEN /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } ffc03f34: 39 7f 00 18 addi r11,r31,24 ffc03f38: 80 0b 00 04 lwz r0,4(r11) ffc03f3c: 38 60 00 00 li r3,0 ffc03f40: 83 ab ff f4 lwz r29,-12(r11) ffc03f44: 7c 08 03 a6 mtlr r0 ffc03f48: 83 cb ff f8 lwz r30,-8(r11) ffc03f4c: 83 eb ff fc lwz r31,-4(r11) ffc03f50: 7d 61 5b 78 mr r1,r11 ffc03f54: 4e 80 00 20 blr /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); ffc03f58: 80 7d 00 0c lwz r3,12(r29) <== NOT EXECUTED ffc03f5c: 4b ff fd e1 bl ffc03d3c <== NOT EXECUTED =============================================================================== ffc03f60 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc03f60: 94 21 ff e8 stwu r1,-24(r1) ffc03f64: 7c 08 02 a6 mflr r0 ffc03f68: 93 e1 00 14 stw r31,20(r1) if ( !print ) ffc03f6c: 7c 9f 23 79 mr. r31,r4 void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc03f70: 93 a1 00 0c stw r29,12(r1) ffc03f74: 7c 7d 1b 78 mr r29,r3 ffc03f78: 90 01 00 1c stw r0,28(r1) ffc03f7c: 93 81 00 08 stw r28,8(r1) ffc03f80: 93 c1 00 10 stw r30,16(r1) if ( !print ) ffc03f84: 41 82 00 58 beq- ffc03fdc <== NEVER TAKEN return; print_context = context; ffc03f88: 3f c0 00 00 lis r30,0 print_handler = print; (*print)( context, "Stack usage by thread\n"); ffc03f8c: 7f e9 03 a6 mtctr r31 ) { if ( !print ) return; print_context = context; ffc03f90: 3b 9e 28 50 addi r28,r30,10320 print_handler = print; ffc03f94: 93 fe 28 50 stw r31,10320(r30) (*print)( context, "Stack usage by thread\n"); ffc03f98: 3c 80 ff c2 lis r4,-62 ffc03f9c: 38 84 90 cc addi r4,r4,-28468 ) { if ( !print ) return; print_context = context; ffc03fa0: 90 7c 00 04 stw r3,4(r28) print_handler = print; (*print)( context, "Stack usage by thread\n"); ffc03fa4: 4c c6 31 82 crclr 4*cr1+eq ffc03fa8: 4e 80 04 21 bctrl (*print)( context, ffc03fac: 3c 80 ff c2 lis r4,-62 ffc03fb0: 38 84 90 e4 addi r4,r4,-28444 ffc03fb4: 7f e9 03 a6 mtctr r31 ffc03fb8: 7f a3 eb 78 mr r3,r29 ffc03fbc: 4c c6 31 82 crclr 4*cr1+eq ffc03fc0: 4e 80 04 21 bctrl " 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 ); ffc03fc4: 3c 60 ff c0 lis r3,-64 ffc03fc8: 38 63 3a 5c addi r3,r3,14940 ffc03fcc: 48 00 67 01 bl ffc0a6cc #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); #endif print_context = NULL; ffc03fd0: 38 00 00 00 li r0,0 ffc03fd4: 90 1c 00 04 stw r0,4(r28) print_handler = NULL; ffc03fd8: 90 1e 28 50 stw r0,10320(r30) } ffc03fdc: 80 01 00 1c lwz r0,28(r1) ffc03fe0: 83 81 00 08 lwz r28,8(r1) ffc03fe4: 7c 08 03 a6 mtlr r0 ffc03fe8: 83 a1 00 0c lwz r29,12(r1) ffc03fec: 83 c1 00 10 lwz r30,16(r1) ffc03ff0: 83 e1 00 14 lwz r31,20(r1) ffc03ff4: 38 21 00 18 addi r1,r1,24 ffc03ff8: 4e 80 00 20 blr =============================================================================== ffc03e1c : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc03e1c: 94 21 ff f0 stwu r1,-16(r1) ffc03e20: 7c 08 02 a6 mflr r0 /* * 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, ffc03e24: 3c 80 00 00 lis r4,0 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc03e28: 90 01 00 14 stw r0,20(r1) /* * 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, ffc03e2c: 38 84 2a c4 addi r4,r4,10948 ffc03e30: 38 a0 00 80 li r5,128 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = Stack_check_Get_pattern_area(the_stack); ffc03e34: 81 23 00 b8 lwz r9,184(r3) */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc03e38: 93 e1 00 0c stw r31,12(r1) ffc03e3c: 7c 3f 0b 78 mr r31,r1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc03e40: 7f 9f 48 40 cmplw cr7,r31,r9 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc03e44: 93 c1 00 08 stw r30,8(r1) ffc03e48: 7c 7e 1b 78 mr r30,r3 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = Stack_check_Get_pattern_area(the_stack); ffc03e4c: 38 69 00 08 addi r3,r9,8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc03e50: 41 9c 00 14 blt- cr7,ffc03e64 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { ffc03e54: 80 1e 00 b4 lwz r0,180(r30) ffc03e58: 7d 29 02 14 add r9,r9,r0 ffc03e5c: 7f 9f 48 40 cmplw cr7,r31,r9 ffc03e60: 40 9d 00 18 ble- cr7,ffc03e78 <== ALWAYS TAKEN /* * 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, ffc03e64: 48 00 f1 35 bl ffc12f98 <== NOT EXECUTED ffc03e68: 7c 64 00 34 cntlzw r4,r3 <== NOT EXECUTED ffc03e6c: 54 84 d9 7e rlwinm r4,r4,27,5,31 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); ffc03e70: 7f c3 f3 78 mr r3,r30 ffc03e74: 4b ff fe c9 bl ffc03d3c /* * 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, ffc03e78: 48 00 f1 21 bl ffc12f98 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { ffc03e7c: 2f 83 00 00 cmpwi cr7,r3,0 ffc03e80: 40 9e 00 20 bne- cr7,ffc03ea0 Stack_check_report_blown_task( running, pattern_ok ); } } ffc03e84: 39 7f 00 10 addi r11,r31,16 ffc03e88: 80 0b 00 04 lwz r0,4(r11) ffc03e8c: 83 cb ff f8 lwz r30,-8(r11) ffc03e90: 7c 08 03 a6 mtlr r0 ffc03e94: 83 eb ff fc lwz r31,-4(r11) ffc03e98: 7d 61 5b 78 mr r1,r11 ffc03e9c: 4e 80 00 20 blr 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 ) { ffc03ea0: 38 80 00 00 li r4,0 ffc03ea4: 4b ff ff cc b ffc03e70 =============================================================================== ffc0fce8 : rtems_status_code rtems_string_to_double ( const char *s, double *n, char **endptr ) { ffc0fce8: 94 21 ff d0 stwu r1,-48(r1) ffc0fcec: 7c 08 02 a6 mflr r0 ffc0fcf0: 93 c1 00 20 stw r30,32(r1) double result; char *end; if ( !n ) ffc0fcf4: 7c 9e 23 79 mr. r30,r4 rtems_status_code rtems_string_to_double ( const char *s, double *n, char **endptr ) { ffc0fcf8: 93 a1 00 1c stw r29,28(r1) ffc0fcfc: 7c bd 2b 78 mr r29,r5 ffc0fd00: 93 e1 00 24 stw r31,36(r1) ffc0fd04: 7c 7f 1b 78 mr r31,r3 double result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc0fd08: 38 60 00 09 li r3,9 rtems_status_code rtems_string_to_double ( const char *s, double *n, char **endptr ) { ffc0fd0c: 90 01 00 34 stw r0,52(r1) ffc0fd10: db e1 00 28 stfd f31,40(r1) ffc0fd14: 93 81 00 18 stw r28,24(r1) double result; char *end; if ( !n ) ffc0fd18: 41 82 00 60 beq- ffc0fd78 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0fd1c: 3f 80 ff c2 lis r28,-62 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc0fd20: 48 00 2d b1 bl ffc12ad0 <__errno> *n = 0; ffc0fd24: c8 1c 04 68 lfd f0,1128(r28) char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc0fd28: 38 00 00 00 li r0,0 ffc0fd2c: 90 03 00 00 stw r0,0(r3) *n = 0; result = strtod( s, &end ); ffc0fd30: 38 81 00 08 addi r4,r1,8 ffc0fd34: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0fd38: d8 1e 00 00 stfd f0,0(r30) result = strtod( s, &end ); ffc0fd3c: 48 00 5a c5 bl ffc15800 if ( endptr ) ffc0fd40: 2f 9d 00 00 cmpwi cr7,r29,0 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtod( s, &end ); ffc0fd44: ff e0 08 90 fmr f31,f1 if ( endptr ) *endptr = end; ffc0fd48: 80 01 00 08 lwz r0,8(r1) errno = 0; *n = 0; result = strtod( s, &end ); if ( endptr ) ffc0fd4c: 41 9e 00 08 beq- cr7,ffc0fd54 *endptr = end; ffc0fd50: 90 1d 00 00 stw r0,0(r29) if ( end == s ) ffc0fd54: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc0fd58: 38 60 00 0b li r3,11 result = strtod( s, &end ); if ( endptr ) *endptr = end; if ( end == s ) ffc0fd5c: 41 9e 00 1c beq- cr7,ffc0fd78 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc0fd60: 48 00 2d 71 bl ffc12ad0 <__errno> ffc0fd64: 80 03 00 00 lwz r0,0(r3) ffc0fd68: 2f 80 00 22 cmpwi cr7,r0,34 ffc0fd6c: 41 9e 00 30 beq- cr7,ffc0fd9c (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; *n = result; ffc0fd70: db fe 00 00 stfd f31,0(r30) return RTEMS_SUCCESSFUL; ffc0fd74: 38 60 00 00 li r3,0 } ffc0fd78: 80 01 00 34 lwz r0,52(r1) ffc0fd7c: 83 81 00 18 lwz r28,24(r1) ffc0fd80: 7c 08 03 a6 mtlr r0 ffc0fd84: 83 a1 00 1c lwz r29,28(r1) ffc0fd88: 83 c1 00 20 lwz r30,32(r1) ffc0fd8c: 83 e1 00 24 lwz r31,36(r1) ffc0fd90: cb e1 00 28 lfd f31,40(r1) ffc0fd94: 38 21 00 30 addi r1,r1,48 ffc0fd98: 4e 80 00 20 blr *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc0fd9c: c8 1c 04 68 lfd f0,1128(r28) (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; ffc0fda0: 38 60 00 0a li r3,10 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc0fda4: ff 9f 00 00 fcmpu cr7,f31,f0 ffc0fda8: 41 9e ff d0 beq+ cr7,ffc0fd78 <== NEVER TAKEN (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) ffc0fdac: 3d 20 ff c2 lis r9,-62 ffc0fdb0: c8 09 2a c0 lfd f0,10944(r9) ffc0fdb4: ff 9f 00 00 fcmpu cr7,f31,f0 ffc0fdb8: 41 9d ff c0 bgt+ cr7,ffc0fd78 <== ALWAYS TAKEN ffc0fdbc: 3d 20 ff c2 lis r9,-62 <== NOT EXECUTED ffc0fdc0: c8 09 2a c8 lfd f0,10952(r9) <== NOT EXECUTED ffc0fdc4: ff 9f 00 00 fcmpu cr7,f31,f0 <== NOT EXECUTED ffc0fdc8: 41 9c ff b0 blt+ cr7,ffc0fd78 <== NOT EXECUTED ffc0fdcc: 4b ff ff a4 b ffc0fd70 <== NOT EXECUTED =============================================================================== ffc0fdd0 : rtems_status_code rtems_string_to_float ( const char *s, float *n, char **endptr ) { ffc0fdd0: 94 21 ff d0 stwu r1,-48(r1) ffc0fdd4: 7c 08 02 a6 mflr r0 ffc0fdd8: 93 c1 00 20 stw r30,32(r1) float result; char *end; if ( !n ) ffc0fddc: 7c 9e 23 79 mr. r30,r4 rtems_status_code rtems_string_to_float ( const char *s, float *n, char **endptr ) { ffc0fde0: 93 a1 00 1c stw r29,28(r1) ffc0fde4: 7c bd 2b 78 mr r29,r5 ffc0fde8: 93 e1 00 24 stw r31,36(r1) ffc0fdec: 7c 7f 1b 78 mr r31,r3 float result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc0fdf0: 38 60 00 09 li r3,9 rtems_status_code rtems_string_to_float ( const char *s, float *n, char **endptr ) { ffc0fdf4: 90 01 00 34 stw r0,52(r1) ffc0fdf8: db e1 00 28 stfd f31,40(r1) float result; char *end; if ( !n ) ffc0fdfc: 41 82 00 5c beq- ffc0fe58 return RTEMS_INVALID_ADDRESS; errno = 0; ffc0fe00: 48 00 2c d1 bl ffc12ad0 <__errno> ffc0fe04: 38 00 00 00 li r0,0 ffc0fe08: 90 03 00 00 stw r0,0(r3) *n = 0; ffc0fe0c: 38 00 00 00 li r0,0 result = strtof( s, &end ); ffc0fe10: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0fe14: 90 1e 00 00 stw r0,0(r30) result = strtof( s, &end ); ffc0fe18: 38 81 00 08 addi r4,r1,8 ffc0fe1c: 48 00 59 fd bl ffc15818 if ( endptr ) ffc0fe20: 2f 9d 00 00 cmpwi cr7,r29,0 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtof( s, &end ); ffc0fe24: ff e0 08 90 fmr f31,f1 if ( endptr ) *endptr = end; ffc0fe28: 80 01 00 08 lwz r0,8(r1) errno = 0; *n = 0; result = strtof( s, &end ); if ( endptr ) ffc0fe2c: 41 9e 00 08 beq- cr7,ffc0fe34 *endptr = end; ffc0fe30: 90 1d 00 00 stw r0,0(r29) if ( end == s ) ffc0fe34: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc0fe38: 38 60 00 0b li r3,11 result = strtof( s, &end ); if ( endptr ) *endptr = end; if ( end == s ) ffc0fe3c: 41 9e 00 1c beq- cr7,ffc0fe58 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc0fe40: 48 00 2c 91 bl ffc12ad0 <__errno> ffc0fe44: 80 03 00 00 lwz r0,0(r3) ffc0fe48: 2f 80 00 22 cmpwi cr7,r0,34 ffc0fe4c: 41 9e 00 2c beq- cr7,ffc0fe78 (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; *n = result; ffc0fe50: d3 fe 00 00 stfs f31,0(r30) return RTEMS_SUCCESSFUL; ffc0fe54: 38 60 00 00 li r3,0 } ffc0fe58: 80 01 00 34 lwz r0,52(r1) ffc0fe5c: 83 a1 00 1c lwz r29,28(r1) ffc0fe60: 7c 08 03 a6 mtlr r0 ffc0fe64: 83 c1 00 20 lwz r30,32(r1) ffc0fe68: 83 e1 00 24 lwz r31,36(r1) ffc0fe6c: cb e1 00 28 lfd f31,40(r1) ffc0fe70: 38 21 00 30 addi r1,r1,48 ffc0fe74: 4e 80 00 20 blr *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc0fe78: 3d 20 ff c2 lis r9,-62 ffc0fe7c: c0 09 04 5c lfs f0,1116(r9) (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; ffc0fe80: 38 60 00 0a li r3,10 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc0fe84: ff 9f 00 00 fcmpu cr7,f31,f0 ffc0fe88: 41 9e ff d0 beq+ cr7,ffc0fe58 <== NEVER TAKEN (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) ffc0fe8c: 3d 20 ff c2 lis r9,-62 ffc0fe90: c0 09 2a d0 lfs f0,10960(r9) ffc0fe94: ff 9f 00 00 fcmpu cr7,f31,f0 ffc0fe98: 41 9d ff c0 bgt+ cr7,ffc0fe58 <== ALWAYS TAKEN ffc0fe9c: 3d 20 ff c2 lis r9,-62 <== NOT EXECUTED ffc0fea0: c0 09 2a d4 lfs f0,10964(r9) <== NOT EXECUTED ffc0fea4: ff 9f 00 00 fcmpu cr7,f31,f0 <== NOT EXECUTED ffc0fea8: 41 9c ff b0 blt+ cr7,ffc0fe58 <== NOT EXECUTED ffc0feac: 4b ff ff a4 b ffc0fe50 <== NOT EXECUTED =============================================================================== ffc0feb0 : const char *s, int *n, char **endptr, int base ) { ffc0feb0: 94 21 ff d8 stwu r1,-40(r1) ffc0feb4: 7c 08 02 a6 mflr r0 ffc0feb8: 93 a1 00 1c stw r29,28(r1) long result; char *end; if ( !n ) ffc0febc: 7c 9d 23 79 mr. r29,r4 const char *s, int *n, char **endptr, int base ) { ffc0fec0: 93 81 00 18 stw r28,24(r1) ffc0fec4: 7c dc 33 78 mr r28,r6 ffc0fec8: 93 c1 00 20 stw r30,32(r1) ffc0fecc: 7c be 2b 78 mr r30,r5 ffc0fed0: 93 e1 00 24 stw r31,36(r1) ffc0fed4: 7c 7f 1b 78 mr r31,r3 long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc0fed8: 38 60 00 09 li r3,9 const char *s, int *n, char **endptr, int base ) { ffc0fedc: 90 01 00 2c stw r0,44(r1) long result; char *end; if ( !n ) ffc0fee0: 41 82 00 5c beq- ffc0ff3c return RTEMS_INVALID_ADDRESS; errno = 0; ffc0fee4: 48 00 2b ed bl ffc12ad0 <__errno> ffc0fee8: 38 00 00 00 li r0,0 ffc0feec: 90 03 00 00 stw r0,0(r3) *n = 0; result = strtol( s, &end, base ); ffc0fef0: 7f 85 e3 78 mr r5,r28 ffc0fef4: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0fef8: 90 1d 00 00 stw r0,0(r29) result = strtol( s, &end, base ); ffc0fefc: 38 81 00 08 addi r4,r1,8 ffc0ff00: 48 00 5b 99 bl ffc15a98 if ( endptr ) ffc0ff04: 2f 9e 00 00 cmpwi cr7,r30,0 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtol( s, &end, base ); ffc0ff08: 7c 7c 1b 78 mr r28,r3 if ( endptr ) *endptr = end; ffc0ff0c: 80 01 00 08 lwz r0,8(r1) errno = 0; *n = 0; result = strtol( s, &end, base ); if ( endptr ) ffc0ff10: 41 9e 00 08 beq- cr7,ffc0ff18 *endptr = end; ffc0ff14: 90 1e 00 00 stw r0,0(r30) if ( end == s ) ffc0ff18: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc0ff1c: 38 60 00 0b li r3,11 result = strtol( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) ffc0ff20: 41 9e 00 1c beq- cr7,ffc0ff3c return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc0ff24: 48 00 2b ad bl ffc12ad0 <__errno> ffc0ff28: 80 03 00 00 lwz r0,0(r3) ffc0ff2c: 2f 80 00 22 cmpwi cr7,r0,34 ffc0ff30: 41 9e 00 2c beq- cr7,ffc0ff5c errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; ffc0ff34: 93 9d 00 00 stw r28,0(r29) return RTEMS_SUCCESSFUL; ffc0ff38: 38 60 00 00 li r3,0 } ffc0ff3c: 80 01 00 2c lwz r0,44(r1) ffc0ff40: 83 81 00 18 lwz r28,24(r1) ffc0ff44: 7c 08 03 a6 mtlr r0 ffc0ff48: 83 a1 00 1c lwz r29,28(r1) ffc0ff4c: 83 c1 00 20 lwz r30,32(r1) ffc0ff50: 83 e1 00 24 lwz r31,36(r1) ffc0ff54: 38 21 00 28 addi r1,r1,40 ffc0ff58: 4e 80 00 20 blr *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc0ff5c: 2f 9c 00 00 cmpwi cr7,r28,0 (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; ffc0ff60: 38 60 00 0a li r3,10 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc0ff64: 41 9e ff d8 beq+ cr7,ffc0ff3c <== NEVER TAKEN (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) ffc0ff68: 6f 80 80 00 xoris r0,r28,32768 ffc0ff6c: 2f 80 ff ff cmpwi cr7,r0,-1 ffc0ff70: 41 9e ff cc beq+ cr7,ffc0ff3c <== ALWAYS TAKEN ffc0ff74: 3c 00 80 00 lis r0,-32768 <== NOT EXECUTED ffc0ff78: 7f 9c 00 00 cmpw cr7,r28,r0 <== NOT EXECUTED ffc0ff7c: 40 9e ff b8 bne+ cr7,ffc0ff34 <== NOT EXECUTED ffc0ff80: 4b ff ff bc b ffc0ff3c <== NOT EXECUTED =============================================================================== ffc1008c : const char *s, long *n, char **endptr, int base ) { ffc1008c: 94 21 ff d8 stwu r1,-40(r1) ffc10090: 7c 08 02 a6 mflr r0 ffc10094: 93 a1 00 1c stw r29,28(r1) long result; char *end; if ( !n ) ffc10098: 7c 9d 23 79 mr. r29,r4 const char *s, long *n, char **endptr, int base ) { ffc1009c: 93 81 00 18 stw r28,24(r1) ffc100a0: 7c dc 33 78 mr r28,r6 ffc100a4: 93 c1 00 20 stw r30,32(r1) ffc100a8: 7c be 2b 78 mr r30,r5 ffc100ac: 93 e1 00 24 stw r31,36(r1) ffc100b0: 7c 7f 1b 78 mr r31,r3 long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc100b4: 38 60 00 09 li r3,9 const char *s, long *n, char **endptr, int base ) { ffc100b8: 90 01 00 2c stw r0,44(r1) long result; char *end; if ( !n ) ffc100bc: 41 82 00 5c beq- ffc10118 return RTEMS_INVALID_ADDRESS; errno = 0; ffc100c0: 48 00 2a 11 bl ffc12ad0 <__errno> ffc100c4: 38 00 00 00 li r0,0 ffc100c8: 90 03 00 00 stw r0,0(r3) *n = 0; result = strtol( s, &end, base ); ffc100cc: 7f 85 e3 78 mr r5,r28 ffc100d0: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc100d4: 90 1d 00 00 stw r0,0(r29) result = strtol( s, &end, base ); ffc100d8: 38 81 00 08 addi r4,r1,8 ffc100dc: 48 00 59 bd bl ffc15a98 if ( endptr ) ffc100e0: 2f 9e 00 00 cmpwi cr7,r30,0 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtol( s, &end, base ); ffc100e4: 7c 7c 1b 78 mr r28,r3 if ( endptr ) *endptr = end; ffc100e8: 80 01 00 08 lwz r0,8(r1) errno = 0; *n = 0; result = strtol( s, &end, base ); if ( endptr ) ffc100ec: 41 9e 00 08 beq- cr7,ffc100f4 *endptr = end; ffc100f0: 90 1e 00 00 stw r0,0(r30) if ( end == s ) ffc100f4: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc100f8: 38 60 00 0b li r3,11 result = strtol( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) ffc100fc: 41 9e 00 1c beq- cr7,ffc10118 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc10100: 48 00 29 d1 bl ffc12ad0 <__errno> ffc10104: 80 03 00 00 lwz r0,0(r3) ffc10108: 2f 80 00 22 cmpwi cr7,r0,34 ffc1010c: 41 9e 00 2c beq- cr7,ffc10138 (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; ffc10110: 93 9d 00 00 stw r28,0(r29) return RTEMS_SUCCESSFUL; ffc10114: 38 60 00 00 li r3,0 } ffc10118: 80 01 00 2c lwz r0,44(r1) ffc1011c: 83 81 00 18 lwz r28,24(r1) ffc10120: 7c 08 03 a6 mtlr r0 ffc10124: 83 a1 00 1c lwz r29,28(r1) ffc10128: 83 c1 00 20 lwz r30,32(r1) ffc1012c: 83 e1 00 24 lwz r31,36(r1) ffc10130: 38 21 00 28 addi r1,r1,40 ffc10134: 4e 80 00 20 blr *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc10138: 2f 9c 00 00 cmpwi cr7,r28,0 (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; ffc1013c: 38 60 00 0a li r3,10 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc10140: 41 9e ff d8 beq+ cr7,ffc10118 <== NEVER TAKEN (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) ffc10144: 6f 80 80 00 xoris r0,r28,32768 ffc10148: 2f 80 ff ff cmpwi cr7,r0,-1 ffc1014c: 41 9e ff cc beq+ cr7,ffc10118 ffc10150: 3c 00 80 00 lis r0,-32768 ffc10154: 7f 9c 00 00 cmpw cr7,r28,r0 ffc10158: 40 9e ff b8 bne+ cr7,ffc10110 <== NEVER TAKEN ffc1015c: 4b ff ff bc b ffc10118 =============================================================================== ffc0ff84 : const char *s, long long *n, char **endptr, int base ) { ffc0ff84: 94 21 ff d0 stwu r1,-48(r1) ffc0ff88: 7c 08 02 a6 mflr r0 ffc0ff8c: 93 a1 00 24 stw r29,36(r1) long long result; char *end; if ( !n ) ffc0ff90: 7c 9d 23 79 mr. r29,r4 const char *s, long long *n, char **endptr, int base ) { ffc0ff94: 93 81 00 20 stw r28,32(r1) ffc0ff98: 7c dc 33 78 mr r28,r6 ffc0ff9c: 93 c1 00 28 stw r30,40(r1) ffc0ffa0: 7c be 2b 78 mr r30,r5 ffc0ffa4: 93 e1 00 2c stw r31,44(r1) ffc0ffa8: 7c 7f 1b 78 mr r31,r3 long long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc0ffac: 38 60 00 09 li r3,9 const char *s, long long *n, char **endptr, int base ) { ffc0ffb0: 90 01 00 34 stw r0,52(r1) ffc0ffb4: 93 61 00 1c stw r27,28(r1) long long result; char *end; if ( !n ) ffc0ffb8: 41 82 00 70 beq- ffc10028 return RTEMS_INVALID_ADDRESS; errno = 0; ffc0ffbc: 48 00 2b 15 bl ffc12ad0 <__errno> ffc0ffc0: 38 00 00 00 li r0,0 *n = 0; ffc0ffc4: 39 40 00 00 li r10,0 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc0ffc8: 90 03 00 00 stw r0,0(r3) *n = 0; ffc0ffcc: 39 60 00 00 li r11,0 ffc0ffd0: 91 5d 00 00 stw r10,0(r29) result = strtoll( s, &end, base ); ffc0ffd4: 7f 85 e3 78 mr r5,r28 ffc0ffd8: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0ffdc: 91 7d 00 04 stw r11,4(r29) result = strtoll( s, &end, base ); ffc0ffe0: 38 81 00 08 addi r4,r1,8 ffc0ffe4: 48 00 5a d5 bl ffc15ab8 if ( endptr ) ffc0ffe8: 2f 9e 00 00 cmpwi cr7,r30,0 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoll( s, &end, base ); ffc0ffec: 7c 7c 1b 78 mr r28,r3 if ( endptr ) *endptr = end; ffc0fff0: 80 01 00 08 lwz r0,8(r1) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoll( s, &end, base ); ffc0fff4: 7c 9b 23 78 mr r27,r4 if ( endptr ) ffc0fff8: 41 9e 00 08 beq- cr7,ffc10000 *endptr = end; ffc0fffc: 90 1e 00 00 stw r0,0(r30) if ( end == s ) ffc10000: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc10004: 38 60 00 0b li r3,11 result = strtoll( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) ffc10008: 41 9e 00 20 beq- cr7,ffc10028 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc1000c: 48 00 2a c5 bl ffc12ad0 <__errno> ffc10010: 80 03 00 00 lwz r0,0(r3) ffc10014: 2f 80 00 22 cmpwi cr7,r0,34 ffc10018: 41 9e 00 34 beq- cr7,ffc1004c (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; ffc1001c: 93 9d 00 00 stw r28,0(r29) return RTEMS_SUCCESSFUL; ffc10020: 38 60 00 00 li r3,0 if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; ffc10024: 93 7d 00 04 stw r27,4(r29) return RTEMS_SUCCESSFUL; } ffc10028: 80 01 00 34 lwz r0,52(r1) ffc1002c: 83 61 00 1c lwz r27,28(r1) ffc10030: 7c 08 03 a6 mtlr r0 ffc10034: 83 81 00 20 lwz r28,32(r1) ffc10038: 83 a1 00 24 lwz r29,36(r1) ffc1003c: 83 c1 00 28 lwz r30,40(r1) ffc10040: 83 e1 00 2c lwz r31,44(r1) ffc10044: 38 21 00 30 addi r1,r1,48 ffc10048: 4e 80 00 20 blr *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc1004c: 7f 80 db 79 or. r0,r28,r27 (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; ffc10050: 38 60 00 0a li r3,10 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc10054: 41 82 ff d4 beq+ ffc10028 <== NEVER TAKEN (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) ffc10058: 6f 80 80 00 xoris r0,r28,32768 ffc1005c: 2f 80 ff ff cmpwi cr7,r0,-1 ffc10060: 41 9e 00 20 beq- cr7,ffc10080 ffc10064: 3c 00 80 00 lis r0,-32768 ffc10068: 7f 9c 00 00 cmpw cr7,r28,r0 ffc1006c: 40 9e ff b0 bne+ cr7,ffc1001c <== NEVER TAKEN ffc10070: 2f 9b 00 00 cmpwi cr7,r27,0 return RTEMS_INVALID_NUMBER; ffc10074: 38 60 00 0a li r3,10 if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) ffc10078: 40 9e ff a4 bne+ cr7,ffc1001c <== NEVER TAKEN ffc1007c: 4b ff ff ac b ffc10028 ffc10080: 2f 9b ff ff cmpwi cr7,r27,-1 ffc10084: 40 9e ff e0 bne+ cr7,ffc10064 <== NEVER TAKEN ffc10088: 4b ff ff a0 b ffc10028 =============================================================================== ffc10184 : const char *s, unsigned char *n, char **endptr, int base ) { ffc10184: 94 21 ff d8 stwu r1,-40(r1) ffc10188: 7c 08 02 a6 mflr r0 ffc1018c: 93 a1 00 1c stw r29,28(r1) unsigned long result; char *end; if ( !n ) ffc10190: 7c 9d 23 79 mr. r29,r4 const char *s, unsigned char *n, char **endptr, int base ) { ffc10194: 93 81 00 18 stw r28,24(r1) ffc10198: 7c dc 33 78 mr r28,r6 ffc1019c: 93 c1 00 20 stw r30,32(r1) ffc101a0: 7c be 2b 78 mr r30,r5 ffc101a4: 93 e1 00 24 stw r31,36(r1) ffc101a8: 7c 7f 1b 78 mr r31,r3 unsigned long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc101ac: 38 60 00 09 li r3,9 const char *s, unsigned char *n, char **endptr, int base ) { ffc101b0: 90 01 00 2c stw r0,44(r1) unsigned long result; char *end; if ( !n ) ffc101b4: 41 82 00 64 beq- ffc10218 return RTEMS_INVALID_ADDRESS; errno = 0; ffc101b8: 48 00 29 19 bl ffc12ad0 <__errno> ffc101bc: 38 00 00 00 li r0,0 ffc101c0: 90 03 00 00 stw r0,0(r3) *n = 0; result = strtoul( s, &end, base ); ffc101c4: 7f 85 e3 78 mr r5,r28 ffc101c8: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc101cc: 98 1d 00 00 stb r0,0(r29) result = strtoul( s, &end, base ); ffc101d0: 38 81 00 08 addi r4,r1,8 ffc101d4: 48 00 5e 51 bl ffc16024 if ( endptr ) ffc101d8: 2f 9e 00 00 cmpwi cr7,r30,0 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoul( s, &end, base ); ffc101dc: 7c 7c 1b 78 mr r28,r3 if ( endptr ) *endptr = end; ffc101e0: 80 01 00 08 lwz r0,8(r1) errno = 0; *n = 0; result = strtoul( s, &end, base ); if ( endptr ) ffc101e4: 41 9e 00 08 beq- cr7,ffc101ec *endptr = end; ffc101e8: 90 1e 00 00 stw r0,0(r30) if ( end == s ) ffc101ec: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc101f0: 38 60 00 0b li r3,11 result = strtoul( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) ffc101f4: 41 9e 00 24 beq- cr7,ffc10218 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc101f8: 48 00 28 d9 bl ffc12ad0 <__errno> ffc101fc: 80 03 00 00 lwz r0,0(r3) ffc10200: 2f 80 00 22 cmpwi cr7,r0,34 ffc10204: 41 9e 00 64 beq- cr7,ffc10268 <== NEVER TAKEN (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { ffc10208: 2b 9c 00 ff cmplwi cr7,r28,255 ffc1020c: 41 9d 00 2c bgt- cr7,ffc10238 <== NEVER TAKEN errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; ffc10210: 9b 9d 00 00 stb r28,0(r29) return RTEMS_SUCCESSFUL; ffc10214: 38 60 00 00 li r3,0 } ffc10218: 80 01 00 2c lwz r0,44(r1) ffc1021c: 83 81 00 18 lwz r28,24(r1) ffc10220: 7c 08 03 a6 mtlr r0 ffc10224: 83 a1 00 1c lwz r29,28(r1) ffc10228: 83 c1 00 20 lwz r30,32(r1) ffc1022c: 83 e1 00 24 lwz r31,36(r1) ffc10230: 38 21 00 28 addi r1,r1,40 ffc10234: 4e 80 00 20 blr (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { errno = ERANGE; ffc10238: 48 00 28 99 bl ffc12ad0 <__errno> <== NOT EXECUTED ffc1023c: 38 00 00 22 li r0,34 <== NOT EXECUTED ffc10240: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED return RTEMS_INVALID_NUMBER; ffc10244: 38 60 00 0a li r3,10 <== NOT EXECUTED #endif *n = result; return RTEMS_SUCCESSFUL; } ffc10248: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc1024c: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc10250: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc10254: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc10258: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc1025c: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc10260: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc10264: 4e 80 00 20 blr <== NOT EXECUTED if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_MAX ))) ffc10268: 39 3c ff ff addi r9,r28,-1 <== NOT EXECUTED *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc1026c: 38 00 ff fd li r0,-3 <== NOT EXECUTED ffc10270: 7f 89 00 40 cmplw cr7,r9,r0 <== NOT EXECUTED (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; ffc10274: 38 60 00 0a li r3,10 <== NOT EXECUTED *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc10278: 41 9d ff a0 bgt+ cr7,ffc10218 <== NOT EXECUTED ffc1027c: 4b ff ff 8c b ffc10208 <== NOT EXECUTED =============================================================================== ffc10280 : const char *s, unsigned int *n, char **endptr, int base ) { ffc10280: 94 21 ff d8 stwu r1,-40(r1) ffc10284: 7c 08 02 a6 mflr r0 ffc10288: 93 a1 00 1c stw r29,28(r1) unsigned long result; char *end; if ( !n ) ffc1028c: 7c 9d 23 79 mr. r29,r4 const char *s, unsigned int *n, char **endptr, int base ) { ffc10290: 93 81 00 18 stw r28,24(r1) ffc10294: 7c dc 33 78 mr r28,r6 ffc10298: 93 c1 00 20 stw r30,32(r1) ffc1029c: 7c be 2b 78 mr r30,r5 ffc102a0: 93 e1 00 24 stw r31,36(r1) ffc102a4: 7c 7f 1b 78 mr r31,r3 unsigned long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc102a8: 38 60 00 09 li r3,9 const char *s, unsigned int *n, char **endptr, int base ) { ffc102ac: 90 01 00 2c stw r0,44(r1) unsigned long result; char *end; if ( !n ) ffc102b0: 41 82 00 5c beq- ffc1030c return RTEMS_INVALID_ADDRESS; errno = 0; ffc102b4: 48 00 28 1d bl ffc12ad0 <__errno> ffc102b8: 38 00 00 00 li r0,0 ffc102bc: 90 03 00 00 stw r0,0(r3) *n = 0; result = strtoul( s, &end, base ); ffc102c0: 7f 85 e3 78 mr r5,r28 ffc102c4: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc102c8: 90 1d 00 00 stw r0,0(r29) result = strtoul( s, &end, base ); ffc102cc: 38 81 00 08 addi r4,r1,8 ffc102d0: 48 00 5d 55 bl ffc16024 if ( endptr ) ffc102d4: 2f 9e 00 00 cmpwi cr7,r30,0 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoul( s, &end, base ); ffc102d8: 7c 7c 1b 78 mr r28,r3 if ( endptr ) *endptr = end; ffc102dc: 80 01 00 08 lwz r0,8(r1) errno = 0; *n = 0; result = strtoul( s, &end, base ); if ( endptr ) ffc102e0: 41 9e 00 08 beq- cr7,ffc102e8 *endptr = end; ffc102e4: 90 1e 00 00 stw r0,0(r30) if ( end == s ) ffc102e8: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc102ec: 38 60 00 0b li r3,11 result = strtoul( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) ffc102f0: 41 9e 00 1c beq- cr7,ffc1030c return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc102f4: 48 00 27 dd bl ffc12ad0 <__errno> ffc102f8: 80 03 00 00 lwz r0,0(r3) ffc102fc: 2f 80 00 22 cmpwi cr7,r0,34 ffc10300: 41 9e 00 2c beq- cr7,ffc1032c errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; ffc10304: 93 9d 00 00 stw r28,0(r29) return RTEMS_SUCCESSFUL; ffc10308: 38 60 00 00 li r3,0 } ffc1030c: 80 01 00 2c lwz r0,44(r1) ffc10310: 83 81 00 18 lwz r28,24(r1) ffc10314: 7c 08 03 a6 mtlr r0 ffc10318: 83 a1 00 1c lwz r29,28(r1) ffc1031c: 83 c1 00 20 lwz r30,32(r1) ffc10320: 83 e1 00 24 lwz r31,36(r1) ffc10324: 38 21 00 28 addi r1,r1,40 ffc10328: 4e 80 00 20 blr if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_MAX ))) ffc1032c: 39 3c ff ff addi r9,r28,-1 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc10330: 38 00 ff fd li r0,-3 ffc10334: 7f 89 00 40 cmplw cr7,r9,r0 (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; ffc10338: 38 60 00 0a li r3,10 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc1033c: 41 9d ff d0 bgt+ cr7,ffc1030c <== ALWAYS TAKEN ffc10340: 4b ff ff c4 b ffc10304 <== NOT EXECUTED =============================================================================== ffc10438 : const char *s, unsigned long *n, char **endptr, int base ) { ffc10438: 94 21 ff d8 stwu r1,-40(r1) ffc1043c: 7c 08 02 a6 mflr r0 ffc10440: 93 a1 00 1c stw r29,28(r1) unsigned long result; char *end; if ( !n ) ffc10444: 7c 9d 23 79 mr. r29,r4 const char *s, unsigned long *n, char **endptr, int base ) { ffc10448: 93 81 00 18 stw r28,24(r1) ffc1044c: 7c dc 33 78 mr r28,r6 ffc10450: 93 c1 00 20 stw r30,32(r1) ffc10454: 7c be 2b 78 mr r30,r5 ffc10458: 93 e1 00 24 stw r31,36(r1) ffc1045c: 7c 7f 1b 78 mr r31,r3 unsigned long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc10460: 38 60 00 09 li r3,9 const char *s, unsigned long *n, char **endptr, int base ) { ffc10464: 90 01 00 2c stw r0,44(r1) unsigned long result; char *end; if ( !n ) ffc10468: 41 82 00 5c beq- ffc104c4 return RTEMS_INVALID_ADDRESS; errno = 0; ffc1046c: 48 00 26 65 bl ffc12ad0 <__errno> ffc10470: 38 00 00 00 li r0,0 ffc10474: 90 03 00 00 stw r0,0(r3) *n = 0; result = strtoul( s, &end, base ); ffc10478: 7f 85 e3 78 mr r5,r28 ffc1047c: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc10480: 90 1d 00 00 stw r0,0(r29) result = strtoul( s, &end, base ); ffc10484: 38 81 00 08 addi r4,r1,8 ffc10488: 48 00 5b 9d bl ffc16024 if ( endptr ) ffc1048c: 2f 9e 00 00 cmpwi cr7,r30,0 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoul( s, &end, base ); ffc10490: 7c 7c 1b 78 mr r28,r3 if ( endptr ) *endptr = end; ffc10494: 80 01 00 08 lwz r0,8(r1) errno = 0; *n = 0; result = strtoul( s, &end, base ); if ( endptr ) ffc10498: 41 9e 00 08 beq- cr7,ffc104a0 *endptr = end; ffc1049c: 90 1e 00 00 stw r0,0(r30) if ( end == s ) ffc104a0: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc104a4: 38 60 00 0b li r3,11 result = strtoul( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) ffc104a8: 41 9e 00 1c beq- cr7,ffc104c4 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc104ac: 48 00 26 25 bl ffc12ad0 <__errno> ffc104b0: 80 03 00 00 lwz r0,0(r3) ffc104b4: 2f 80 00 22 cmpwi cr7,r0,34 ffc104b8: 41 9e 00 2c beq- cr7,ffc104e4 (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; ffc104bc: 93 9d 00 00 stw r28,0(r29) return RTEMS_SUCCESSFUL; ffc104c0: 38 60 00 00 li r3,0 } ffc104c4: 80 01 00 2c lwz r0,44(r1) ffc104c8: 83 81 00 18 lwz r28,24(r1) ffc104cc: 7c 08 03 a6 mtlr r0 ffc104d0: 83 a1 00 1c lwz r29,28(r1) ffc104d4: 83 c1 00 20 lwz r30,32(r1) ffc104d8: 83 e1 00 24 lwz r31,36(r1) ffc104dc: 38 21 00 28 addi r1,r1,40 ffc104e0: 4e 80 00 20 blr if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_MAX ))) ffc104e4: 39 3c ff ff addi r9,r28,-1 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc104e8: 38 00 ff fd li r0,-3 ffc104ec: 7f 89 00 40 cmplw cr7,r9,r0 (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; ffc104f0: 38 60 00 0a li r3,10 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc104f4: 41 9d ff d0 bgt+ cr7,ffc104c4 <== ALWAYS TAKEN ffc104f8: 4b ff ff c4 b ffc104bc <== NOT EXECUTED =============================================================================== ffc10344 : const char *s, unsigned long long *n, char **endptr, int base ) { ffc10344: 94 21 ff d0 stwu r1,-48(r1) ffc10348: 7c 08 02 a6 mflr r0 ffc1034c: 93 a1 00 24 stw r29,36(r1) unsigned long long result; char *end; if ( !n ) ffc10350: 7c 9d 23 79 mr. r29,r4 const char *s, unsigned long long *n, char **endptr, int base ) { ffc10354: 93 81 00 20 stw r28,32(r1) ffc10358: 7c dc 33 78 mr r28,r6 ffc1035c: 93 c1 00 28 stw r30,40(r1) ffc10360: 7c be 2b 78 mr r30,r5 ffc10364: 93 e1 00 2c stw r31,44(r1) ffc10368: 7c 7f 1b 78 mr r31,r3 unsigned long long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc1036c: 38 60 00 09 li r3,9 const char *s, unsigned long long *n, char **endptr, int base ) { ffc10370: 90 01 00 34 stw r0,52(r1) ffc10374: 93 41 00 18 stw r26,24(r1) ffc10378: 93 61 00 1c stw r27,28(r1) unsigned long long result; char *end; if ( !n ) ffc1037c: 41 82 00 70 beq- ffc103ec return RTEMS_INVALID_ADDRESS; errno = 0; ffc10380: 48 00 27 51 bl ffc12ad0 <__errno> ffc10384: 38 00 00 00 li r0,0 *n = 0; ffc10388: 39 40 00 00 li r10,0 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc1038c: 90 03 00 00 stw r0,0(r3) *n = 0; ffc10390: 39 60 00 00 li r11,0 ffc10394: 91 5d 00 00 stw r10,0(r29) result = strtoull( s, &end, base ); ffc10398: 7f e3 fb 78 mr r3,r31 ffc1039c: 38 81 00 08 addi r4,r1,8 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc103a0: 91 7d 00 04 stw r11,4(r29) result = strtoull( s, &end, base ); ffc103a4: 7f 85 e3 78 mr r5,r28 ffc103a8: 48 00 5c 9d bl ffc16044 if ( endptr ) ffc103ac: 2f 9e 00 00 cmpwi cr7,r30,0 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoull( s, &end, base ); ffc103b0: 7c 9b 23 78 mr r27,r4 if ( endptr ) *endptr = end; ffc103b4: 80 01 00 08 lwz r0,8(r1) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoull( s, &end, base ); ffc103b8: 7c 7a 1b 78 mr r26,r3 if ( endptr ) ffc103bc: 41 9e 00 08 beq- cr7,ffc103c4 *endptr = end; ffc103c0: 90 1e 00 00 stw r0,0(r30) if ( end == s ) ffc103c4: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc103c8: 38 60 00 0b li r3,11 result = strtoull( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) ffc103cc: 41 9e 00 20 beq- cr7,ffc103ec return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc103d0: 48 00 27 01 bl ffc12ad0 <__errno> ffc103d4: 80 03 00 00 lwz r0,0(r3) ffc103d8: 2f 80 00 22 cmpwi cr7,r0,34 ffc103dc: 41 9e 00 38 beq- cr7,ffc10414 (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; ffc103e0: 93 5d 00 00 stw r26,0(r29) return RTEMS_SUCCESSFUL; ffc103e4: 38 60 00 00 li r3,0 if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; ffc103e8: 93 7d 00 04 stw r27,4(r29) return RTEMS_SUCCESSFUL; } ffc103ec: 80 01 00 34 lwz r0,52(r1) ffc103f0: 83 41 00 18 lwz r26,24(r1) ffc103f4: 7c 08 03 a6 mtlr r0 ffc103f8: 83 61 00 1c lwz r27,28(r1) ffc103fc: 83 81 00 20 lwz r28,32(r1) ffc10400: 83 a1 00 24 lwz r29,36(r1) ffc10404: 83 c1 00 28 lwz r30,40(r1) ffc10408: 83 e1 00 2c lwz r31,44(r1) ffc1040c: 38 21 00 30 addi r1,r1,48 ffc10410: 4e 80 00 20 blr if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_LONG_MAX ))) ffc10414: 31 7b ff ff addic r11,r27,-1 ffc10418: 7d 5a 01 d4 addme r10,r26 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc1041c: 2f 8a ff ff cmpwi cr7,r10,-1 ffc10420: 40 be ff c0 bne- cr7,ffc103e0 <== NEVER TAKEN ffc10424: 38 00 ff fd li r0,-3 ffc10428: 7f 8b 00 40 cmplw cr7,r11,r0 (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; ffc1042c: 38 60 00 0a li r3,10 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && ffc10430: 41 9d ff bc bgt+ cr7,ffc103ec <== ALWAYS TAKEN ffc10434: 4b ff ff ac b ffc103e0 <== NOT EXECUTED =============================================================================== ffc043dc : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { ffc043dc: 94 21 fe 38 stwu r1,-456(r1) ffc043e0: 7c 08 02 a6 mflr r0 ffc043e4: 93 21 01 ac stw r25,428(r1) ffc043e8: 90 01 01 cc stw r0,460(r1) ffc043ec: 93 41 01 b0 stw r26,432(r1) ffc043f0: 7c 7a 1b 78 mr r26,r3 ffc043f4: 93 a1 01 bc stw r29,444(r1) ffc043f8: 7c bd 2b 78 mr r29,r5 ffc043fc: 93 c1 01 c0 stw r30,448(r1) ffc04400: 7c 9e 23 78 mr r30,r4 ffc04404: 92 81 01 98 stw r20,408(r1) ffc04408: 92 a1 01 9c stw r21,412(r1) ffc0440c: 92 c1 01 a0 stw r22,416(r1) ffc04410: 92 e1 01 a4 stw r23,420(r1) ffc04414: 93 01 01 a8 stw r24,424(r1) ffc04418: 93 61 01 b4 stw r27,436(r1) ffc0441c: 93 81 01 b8 stw r28,440(r1) ffc04420: 93 e1 01 c4 stw r31,452(r1) int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( ffc04424: 48 01 35 21 bl ffc17944 ffc04428: 7c 64 1b 78 mr r4,r3 ffc0442c: 38 a0 00 00 li r5,0 ffc04430: 7f 43 d3 78 mr r3,r26 ffc04434: 38 c1 00 20 addi r6,r1,32 ffc04438: 38 e0 00 00 li r7,0 ffc0443c: 48 00 0e 5d bl ffc05298 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) ffc04440: 7c 79 1b 79 mr. r25,r3 ffc04444: 40 82 01 f0 bne- ffc04634 return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) ffc04448: 80 01 00 2c lwz r0,44(r1) ffc0444c: 3d 20 ff c2 lis r9,-62 ffc04450: 39 29 40 fc addi r9,r9,16636 ffc04454: 7f 80 48 00 cmpw cr7,r0,r9 ffc04458: 41 9e 00 14 beq- cr7,ffc0446c ffc0445c: 3d 20 ff c2 lis r9,-62 ffc04460: 39 29 48 78 addi r9,r9,18552 ffc04464: 7f 80 48 00 cmpw cr7,r0,r9 ffc04468: 40 9e 01 cc bne- cr7,ffc04634 <== ALWAYS TAKEN ffc0446c: 3a e0 00 00 li r23,0 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) ffc04470: 3b f7 02 00 addi r31,r23,512 ffc04474: 7f 9f e8 40 cmplw cr7,r31,r29 /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) ffc04478: 3f 60 ff c2 lis r27,-62 ffc0447c: 3b 7b 41 44 addi r27,r27,16708 * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { strcpy(full_filename, mountpoint); if (full_filename[strlen(full_filename)-1] != '/') strcat(full_filename, "/"); ffc04480: 3b 00 2f 00 li r24,12032 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) ffc04484: 41 9d 00 98 bgt- cr7,ffc0451c <== NEVER TAKEN break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; ffc04488: 7e fe ba 14 add r23,r30,r23 offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) ffc0448c: 38 77 01 01 addi r3,r23,257 ffc04490: 7f 64 db 78 mr r4,r27 ffc04494: 38 a0 00 05 li r5,5 ffc04498: 48 01 35 69 bl ffc17a00 ffc0449c: 7c 7c 1b 79 mr. r28,r3 ffc044a0: 40 82 00 7c bne- ffc0451c break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); ffc044a4: 38 a0 00 63 li r5,99 ffc044a8: 7e e4 bb 78 mr r4,r23 ffc044ac: 38 61 00 34 addi r3,r1,52 ffc044b0: 48 01 36 99 bl ffc17b48 filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); ffc044b4: 38 80 00 08 li r4,8 ffc044b8: 38 77 00 64 addi r3,r23,100 offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; ffc044bc: 9b 81 00 97 stb r28,151(r1) linkflag = hdr_ptr[156]; ffc044c0: 8a b7 00 9c lbz r21,156(r23) file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); ffc044c4: 48 00 9c dd bl ffc0e1a0 <_rtems_octal2ulong> ffc044c8: 7c 76 1b 78 mr r22,r3 file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); ffc044cc: 38 80 00 0c li r4,12 ffc044d0: 38 77 00 7c addi r3,r23,124 ffc044d4: 48 00 9c cd bl ffc0e1a0 <_rtems_octal2ulong> hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); ffc044d8: 38 80 00 08 li r4,8 strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); ffc044dc: 7c 7c 1b 78 mr r28,r3 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); ffc044e0: 38 77 00 94 addi r3,r23,148 ffc044e4: 48 00 9c bd bl ffc0e1a0 <_rtems_octal2ulong> ffc044e8: 7c 74 1b 78 mr r20,r3 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) ffc044ec: 7e e3 bb 78 mr r3,r23 ffc044f0: 48 00 a2 81 bl ffc0e770 <_rtems_tar_header_checksum> ffc044f4: 7f 83 a0 00 cmpw cr7,r3,r20 ffc044f8: 40 9e 00 24 bne- cr7,ffc0451c <== 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) { ffc044fc: 2f 95 00 35 cmpwi cr7,r21,53 ffc04500: 41 9e 00 b4 beq- cr7,ffc045b4 * 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) { ffc04504: 2f 95 00 30 cmpwi cr7,r21,48 ffc04508: 41 9e 00 58 beq- cr7,ffc04560 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) ffc0450c: 7f f7 fb 78 mr r23,r31 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) ffc04510: 3b f7 02 00 addi r31,r23,512 ffc04514: 7f 9f e8 40 cmplw cr7,r31,r29 ffc04518: 40 9d ff 70 ble+ cr7,ffc04488 <== ALWAYS TAKEN nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } ffc0451c: 80 01 01 cc lwz r0,460(r1) ffc04520: 7f 23 cb 78 mr r3,r25 ffc04524: 82 81 01 98 lwz r20,408(r1) ffc04528: 7c 08 03 a6 mtlr r0 ffc0452c: 82 a1 01 9c lwz r21,412(r1) ffc04530: 82 c1 01 a0 lwz r22,416(r1) ffc04534: 82 e1 01 a4 lwz r23,420(r1) ffc04538: 83 01 01 a8 lwz r24,424(r1) ffc0453c: 83 21 01 ac lwz r25,428(r1) ffc04540: 83 41 01 b0 lwz r26,432(r1) ffc04544: 83 61 01 b4 lwz r27,436(r1) ffc04548: 83 81 01 b8 lwz r28,440(r1) ffc0454c: 83 a1 01 bc lwz r29,444(r1) ffc04550: 83 c1 01 c0 lwz r30,448(r1) ffc04554: 83 e1 01 c4 lwz r31,452(r1) ffc04558: 38 21 01 c8 addi r1,r1,456 ffc0455c: 4e 80 00 20 blr * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; ffc04560: 80 01 00 20 lwz r0,32(r1) if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { ffc04564: 38 61 00 34 addi r3,r1,52 ffc04568: 38 81 00 0c addi r4,r1,12 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; ffc0456c: 90 01 00 0c stw r0,12(r1) if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { ffc04570: 38 a1 00 08 addi r5,r1,8 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; ffc04574: 80 01 00 24 lwz r0,36(r1) ffc04578: 90 01 00 10 stw r0,16(r1) ffc0457c: 80 01 00 28 lwz r0,40(r1) ffc04580: 90 01 00 14 stw r0,20(r1) ffc04584: 80 01 00 2c lwz r0,44(r1) ffc04588: 90 01 00 18 stw r0,24(r1) ffc0458c: 80 01 00 30 lwz r0,48(r1) ffc04590: 90 01 00 1c stw r0,28(r1) if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { ffc04594: 48 00 ad fd bl ffc0f390 ffc04598: 7c 77 1b 79 mr. r23,r3 ffc0459c: 41 82 00 68 beq- ffc04604 <== ALWAYS TAKEN ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; ffc045a0: 3b 9c 01 ff addi r28,r28,511 offset += 512 * nblocks; ffc045a4: 57 9c 00 2c rlwinm r28,r28,0,0,22 ffc045a8: 7f fc fa 14 add r31,r28,r31 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) ffc045ac: 7f f7 fb 78 mr r23,r31 ffc045b0: 4b ff ff 60 b ffc04510 * - 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); ffc045b4: 7f 44 d3 78 mr r4,r26 ffc045b8: 38 61 00 98 addi r3,r1,152 ffc045bc: 48 01 2e 75 bl ffc17430 if (full_filename[strlen(full_filename)-1] != '/') ffc045c0: 38 61 00 98 addi r3,r1,152 ffc045c4: 48 01 33 81 bl ffc17944 ffc045c8: 38 01 00 08 addi r0,r1,8 ffc045cc: 7d 20 1a 14 add r9,r0,r3 ffc045d0: 88 09 00 8f lbz r0,143(r9) ffc045d4: 2f 80 00 2f cmpwi cr7,r0,47 ffc045d8: 41 9e 00 0c beq- cr7,ffc045e4 <== ALWAYS TAKEN strcat(full_filename, "/"); ffc045dc: 39 21 00 98 addi r9,r1,152 <== NOT EXECUTED ffc045e0: 7f 09 1b 2e sthx r24,r9,r3 <== NOT EXECUTED strcat(full_filename, filename); ffc045e4: 38 81 00 34 addi r4,r1,52 ffc045e8: 38 61 00 98 addi r3,r1,152 ffc045ec: 48 01 2c e5 bl ffc172d0 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); ffc045f0: 38 61 00 98 addi r3,r1,152 ffc045f4: 38 80 01 ff li r4,511 ffc045f8: 48 00 18 69 bl ffc05e60 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) ffc045fc: 7f f7 fb 78 mr r23,r31 ffc04600: 4b ff ff 10 b ffc04510 loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, ffc04604: 56 c6 05 fe clrlwi r6,r22,23 else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( ffc04608: 80 a1 00 08 lwz r5,8(r1) ffc0460c: 38 61 00 0c addi r3,r1,12 ffc04610: 38 80 00 06 li r4,6 ffc04614: 60 c6 80 00 ori r6,r6,32768 ffc04618: 38 e0 00 00 li r7,0 ffc0461c: 48 00 a4 09 bl ffc0ea24 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]; ffc04620: 7c 1e fa 14 add r0,r30,r31 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; ffc04624: 93 83 00 54 stw r28,84(r3) ffc04628: 92 e3 00 50 stw r23,80(r3) node->info.linearfile.direct = &tar_image[offset]; ffc0462c: 90 03 00 58 stw r0,88(r3) ffc04630: 4b ff ff 70 b ffc045a0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) return -1; ffc04634: 3b 20 ff ff li r25,-1 ffc04638: 4b ff fe e4 b ffc0451c =============================================================================== ffc12430 : ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc12430: 2c 05 00 00 cmpwi r5,0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { ffc12434: 7c 08 02 a6 mflr r0 ffc12438: 94 21 ff f8 stwu r1,-8(r1) ffc1243c: 90 01 00 0c stw r0,12(r1) ffc12440: 7c 60 1b 78 mr r0,r3 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; ffc12444: 38 60 00 09 li r3,9 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc12448: 41 82 01 34 beq- ffc1257c return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; ffc1244c: 3c c0 00 00 lis r6,0 ffc12450: 38 c6 2d b8 addi r6,r6,11704 ffc12454: 81 26 00 0c lwz r9,12(r6) api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc12458: 81 69 00 7c lwz r11,124(r9) executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc1245c: 89 09 00 74 lbz r8,116(r9) if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc12460: 2f 8b 00 00 cmpwi cr7,r11,0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc12464: 81 69 01 2c lwz r11,300(r9) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc12468: 7d 08 00 34 cntlzw r8,r8 ffc1246c: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc12470: 55 07 40 2e rlwinm r7,r8,8,0,23 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc12474: 40 9e 01 18 bne- cr7,ffc1258c old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc12478: 89 0b 00 08 lbz r8,8(r11) #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc1247c: 39 40 00 00 li r10,0 ffc12480: 7d 08 00 34 cntlzw r8,r8 ffc12484: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc12488: 55 08 50 2a rlwinm r8,r8,10,0,21 ffc1248c: 7d 07 3b 78 or r7,r8,r7 ffc12490: 7d 40 00 a6 mfmsr r10 if (msr & MSR_EE) return 0; ffc12494: 55 48 8f fe rlwinm r8,r10,17,31,31 ffc12498: 2f 88 00 00 cmpwi cr7,r8,0 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc1249c: 70 8a 01 00 andi. r10,r4,256 ffc124a0: 7d 40 00 26 mfcr r10 ffc124a4: 55 4a ff fe rlwinm r10,r10,31,31,31 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); ffc124a8: 7c e7 53 78 or r7,r7,r10 *previous_mode_set = old_mode; ffc124ac: 90 e5 00 00 stw r7,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc124b0: 41 82 00 14 beq- ffc124c4 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; ffc124b4: 70 08 01 00 andi. r8,r0,256 ffc124b8: 7d 40 00 26 mfcr r10 ffc124bc: 55 4a 1f fe rlwinm r10,r10,3,31,31 ffc124c0: 99 49 00 74 stb r10,116(r9) if ( mask & RTEMS_TIMESLICE_MASK ) { ffc124c4: 70 8a 02 00 andi. r10,r4,512 ffc124c8: 41 82 00 20 beq- ffc124e8 if ( _Modes_Is_timeslice(mode_set) ) { ffc124cc: 70 0a 02 00 andi. r10,r0,512 ffc124d0: 41 82 01 44 beq- ffc12614 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc124d4: 3d 40 00 00 lis r10,0 ffc124d8: 81 4a 27 c4 lwz r10,10180(r10) 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; ffc124dc: 39 00 00 01 li r8,1 ffc124e0: 91 09 00 7c stw r8,124(r9) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc124e4: 91 49 00 78 stw r10,120(r9) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc124e8: 70 88 00 01 andi. r8,r4,1 ffc124ec: 41 82 00 20 beq- ffc1250c } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc124f0: 39 20 00 00 li r9,0 ffc124f4: 7d 20 00 a6 mfmsr r9 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc124f8: 70 0a 00 01 andi. r10,r0,1 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; __asm__ volatile ( ffc124fc: 7d 50 42 a6 mfsprg r10,0 ffc12500: 40 82 01 24 bne- ffc12624 msr |= ppc_interrupt_get_disable_mask(); ffc12504: 7d 49 4b 78 or r9,r10,r9 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc12508: 7d 20 01 24 mtmsr r9 * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { ffc1250c: 70 88 04 00 andi. r8,r4,1024 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; ffc12510: 39 40 00 00 li r10,0 if ( mask & RTEMS_ASR_MASK ) { ffc12514: 41 82 00 54 beq- ffc12568 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc12518: 70 09 04 00 andi. r9,r0,1024 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 ) { ffc1251c: 89 2b 00 08 lbz r9,8(r11) * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc12520: 7c 00 00 26 mfcr r0 ffc12524: 54 00 1f fe rlwinm r0,r0,3,31,31 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 ) { ffc12528: 7f 89 00 00 cmpw cr7,r9,r0 ffc1252c: 41 9e 00 3c beq- cr7,ffc12568 asr->is_enabled = is_asr_enabled; ffc12530: 98 0b 00 08 stb r0,8(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc12534: 7c 00 00 a6 mfmsr r0 ffc12538: 7d 30 42 a6 mfsprg r9,0 ffc1253c: 7c 09 48 78 andc r9,r0,r9 ffc12540: 7d 20 01 24 mtmsr r9 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; ffc12544: 81 4b 00 18 lwz r10,24(r11) information->signals_pending = information->signals_posted; ffc12548: 81 2b 00 14 lwz r9,20(r11) information->signals_posted = _signals; ffc1254c: 91 4b 00 14 stw r10,20(r11) rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; ffc12550: 91 2b 00 18 stw r9,24(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc12554: 7c 00 01 24 mtmsr r0 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { ffc12558: 80 0b 00 14 lwz r0,20(r11) needs_asr_dispatching = true; ffc1255c: 39 40 00 01 li r10,1 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { ffc12560: 2f 80 00 00 cmpwi cr7,r0,0 ffc12564: 41 9e 00 cc beq- cr7,ffc12630 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc12568: 3d 20 00 00 lis r9,0 ffc1256c: 80 09 28 04 lwz r0,10244(r9) if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; ffc12570: 38 60 00 00 li r3,0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc12574: 2f 80 00 03 cmpwi cr7,r0,3 ffc12578: 41 9e 00 58 beq- cr7,ffc125d0 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } ffc1257c: 80 01 00 0c lwz r0,12(r1) ffc12580: 38 21 00 08 addi r1,r1,8 ffc12584: 7c 08 03 a6 mtlr r0 ffc12588: 4e 80 00 20 blr 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; ffc1258c: 89 0b 00 08 lbz r8,8(r11) 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; ffc12590: 60 e7 02 00 ori r7,r7,512 #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc12594: 39 40 00 00 li r10,0 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc12598: 7d 08 00 34 cntlzw r8,r8 ffc1259c: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc125a0: 55 08 50 2a rlwinm r8,r8,10,0,21 ffc125a4: 7d 07 3b 78 or r7,r8,r7 ffc125a8: 7d 40 00 a6 mfmsr r10 if (msr & MSR_EE) return 0; ffc125ac: 55 48 8f fe rlwinm r8,r10,17,31,31 ffc125b0: 2f 88 00 00 cmpwi cr7,r8,0 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc125b4: 70 8a 01 00 andi. r10,r4,256 ffc125b8: 7d 40 00 26 mfcr r10 ffc125bc: 55 4a ff fe rlwinm r10,r10,31,31,31 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); ffc125c0: 7c e7 53 78 or r7,r7,r10 *previous_mode_set = old_mode; ffc125c4: 90 e5 00 00 stw r7,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc125c8: 41 a2 fe fc beq- ffc124c4 ffc125cc: 4b ff fe e8 b ffc124b4 { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || ffc125d0: 2f 8a 00 00 cmpwi cr7,r10,0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; ffc125d4: 81 26 00 0c lwz r9,12(r6) if ( are_signals_pending || ffc125d8: 40 9e 00 1c bne- cr7,ffc125f4 ffc125dc: 80 06 00 10 lwz r0,16(r6) ffc125e0: 7f 89 00 00 cmpw cr7,r9,r0 ffc125e4: 41 be ff 98 beq- cr7,ffc1257c (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { ffc125e8: 88 09 00 74 lbz r0,116(r9) ffc125ec: 2f 80 00 00 cmpwi cr7,r0,0 ffc125f0: 41 be ff 8c beq- cr7,ffc1257c <== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc125f4: 38 00 00 01 li r0,1 ffc125f8: 98 06 00 18 stb r0,24(r6) } } if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); ffc125fc: 4b ff 9b 81 bl ffc0c17c <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; } ffc12600: 80 01 00 0c lwz r0,12(r1) if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; ffc12604: 38 60 00 00 li r3,0 } ffc12608: 7c 08 03 a6 mtlr r0 ffc1260c: 38 21 00 08 addi r1,r1,8 ffc12610: 4e 80 00 20 blr } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc12614: 70 88 00 01 andi. r8,r4,1 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; ffc12618: 91 49 00 7c stw r10,124(r9) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc1261c: 41 a2 fe f0 beq- ffc1250c ffc12620: 4b ff fe d0 b ffc124f0 _CPU_MSR_GET(msr); if (!(level & CPU_MODES_INTERRUPT_MASK)) { msr |= ppc_interrupt_get_disable_mask(); } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc12624: 7d 29 50 78 andc r9,r9,r10 } _CPU_MSR_SET(msr); ffc12628: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); ffc1262c: 4b ff fe e0 b ffc1250c needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc12630: 3d 20 00 00 lis r9,0 ffc12634: 80 09 28 04 lwz r0,10244(r9) /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; ffc12638: 39 40 00 00 li r10,0 if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; ffc1263c: 38 60 00 00 li r3,0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc12640: 2f 80 00 03 cmpwi cr7,r0,3 ffc12644: 40 9e ff 38 bne+ cr7,ffc1257c <== NEVER TAKEN ffc12648: 4b ff ff 88 b ffc125d0 =============================================================================== ffc0e8a8 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0e8a8: 7d 80 00 26 mfcr r12 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0e8ac: 2e 04 00 00 cmpwi cr4,r4,0 rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0e8b0: 94 21 ff d8 stwu r1,-40(r1) ffc0e8b4: 7c 08 02 a6 mflr r0 ffc0e8b8: 93 e1 00 24 stw r31,36(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0e8bc: 7c 9f 23 78 mr r31,r4 rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0e8c0: 90 01 00 2c stw r0,44(r1) ffc0e8c4: 91 81 00 20 stw r12,32(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0e8c8: 41 92 00 18 beq- cr4,ffc0e8e0 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 ) ); ffc0e8cc: 3d 20 00 00 lis r9,0 ffc0e8d0: 89 29 27 04 lbz r9,9988(r9) !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; ffc0e8d4: 38 00 00 13 li r0,19 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ffc0e8d8: 7f 84 48 40 cmplw cr7,r4,r9 ffc0e8dc: 41 9d 00 68 bgt- cr7,ffc0e944 if ( !old_priority ) ffc0e8e0: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc0e8e4: 38 00 00 09 li r0,9 if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) ffc0e8e8: 41 9e 00 5c beq- cr7,ffc0e944 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); ffc0e8ec: 38 81 00 08 addi r4,r1,8 ffc0e8f0: 90 a1 00 18 stw r5,24(r1) ffc0e8f4: 48 00 2d 4d bl ffc11640 <_Thread_Get> switch ( location ) { ffc0e8f8: 80 01 00 08 lwz r0,8(r1) ffc0e8fc: 80 a1 00 18 lwz r5,24(r1) ffc0e900: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e904: 40 9e 00 60 bne- cr7,ffc0e964 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; ffc0e908: 80 03 00 14 lwz r0,20(r3) ffc0e90c: 90 05 00 00 stw r0,0(r5) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0e910: 41 92 00 2c beq- cr4,ffc0e93c the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || ffc0e914: 80 03 00 1c lwz r0,28(r3) 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; ffc0e918: 93 e3 00 18 stw r31,24(r3) if ( the_thread->resource_count == 0 || ffc0e91c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e920: 41 9e 00 10 beq- cr7,ffc0e930 ffc0e924: 80 03 00 14 lwz r0,20(r3) ffc0e928: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0e92c: 40 9c 00 10 bge- cr7,ffc0e93c <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); ffc0e930: 7f e4 fb 78 mr r4,r31 ffc0e934: 38 a0 00 00 li r5,0 ffc0e938: 48 00 26 b1 bl ffc10fe8 <_Thread_Change_priority> } _Thread_Enable_dispatch(); ffc0e93c: 48 00 2c c9 bl ffc11604 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0e940: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0e944: 7c 03 03 78 mr r3,r0 ffc0e948: 80 01 00 2c lwz r0,44(r1) ffc0e94c: 81 81 00 20 lwz r12,32(r1) ffc0e950: 7c 08 03 a6 mtlr r0 ffc0e954: 83 e1 00 24 lwz r31,36(r1) ffc0e958: 7d 80 81 20 mtcrf 8,r12 ffc0e95c: 38 21 00 28 addi r1,r1,40 ffc0e960: 4e 80 00 20 blr case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0e964: 38 00 00 04 li r0,4 } ffc0e968: 81 81 00 20 lwz r12,32(r1) ffc0e96c: 7c 03 03 78 mr r3,r0 ffc0e970: 80 01 00 2c lwz r0,44(r1) ffc0e974: 83 e1 00 24 lwz r31,36(r1) ffc0e978: 7d 80 81 20 mtcrf 8,r12 ffc0e97c: 7c 08 03 a6 mtlr r0 ffc0e980: 38 21 00 28 addi r1,r1,40 ffc0e984: 4e 80 00 20 blr =============================================================================== ffc0a4d8 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc0a4d8: 94 21 ff e0 stwu r1,-32(r1) ffc0a4dc: 7c 08 02 a6 mflr r0 ffc0a4e0: 93 e1 00 1c stw r31,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc0a4e4: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc0a4e8: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; ffc0a4ec: 38 00 00 09 li r0,9 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc0a4f0: 41 82 00 58 beq- ffc0a548 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); ffc0a4f4: 38 81 00 08 addi r4,r1,8 ffc0a4f8: 48 00 2a e1 bl ffc0cfd8 <_Thread_Get> switch (location) { ffc0a4fc: 80 01 00 08 lwz r0,8(r1) ffc0a500: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a504: 40 9e 00 5c bne- cr7,ffc0a560 case OBJECTS_LOCAL: tvp = the_thread->task_variables; ffc0a508: 81 23 01 38 lwz r9,312(r3) while (tvp) { ffc0a50c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a510: 41 9e 00 30 beq- cr7,ffc0a540 if (tvp->ptr == ptr) { ffc0a514: 80 09 00 04 lwz r0,4(r9) ffc0a518: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a51c: 40 be 00 18 bne+ cr7,ffc0a534 ffc0a520: 48 00 00 74 b ffc0a594 ffc0a524: 80 04 00 04 lwz r0,4(r4) ffc0a528: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a52c: 41 9e 00 50 beq- cr7,ffc0a57c ffc0a530: 7c 89 23 78 mr r9,r4 _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; ffc0a534: 80 89 00 00 lwz r4,0(r9) the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { ffc0a538: 2f 84 00 00 cmpwi cr7,r4,0 ffc0a53c: 40 9e ff e8 bne+ cr7,ffc0a524 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc0a540: 48 00 2a 5d bl ffc0cf9c <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; ffc0a544: 38 00 00 09 li r0,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a548: 7c 03 03 78 mr r3,r0 ffc0a54c: 80 01 00 24 lwz r0,36(r1) ffc0a550: 83 e1 00 1c lwz r31,28(r1) ffc0a554: 38 21 00 20 addi r1,r1,32 ffc0a558: 7c 08 03 a6 mtlr r0 ffc0a55c: 4e 80 00 20 blr case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a560: 38 00 00 04 li r0,4 } ffc0a564: 83 e1 00 1c lwz r31,28(r1) ffc0a568: 7c 03 03 78 mr r3,r0 ffc0a56c: 80 01 00 24 lwz r0,36(r1) ffc0a570: 38 21 00 20 addi r1,r1,32 ffc0a574: 7c 08 03 a6 mtlr r0 ffc0a578: 4e 80 00 20 blr case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; ffc0a57c: 80 04 00 00 lwz r0,0(r4) ffc0a580: 90 09 00 00 stw r0,0(r9) else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); ffc0a584: 48 00 00 d9 bl ffc0a65c <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); ffc0a588: 48 00 2a 15 bl ffc0cf9c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a58c: 38 00 00 00 li r0,0 ffc0a590: 4b ff ff b8 b ffc0a548 while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; ffc0a594: 80 09 00 00 lwz r0,0(r9) ffc0a598: 7d 24 4b 78 mr r4,r9 ffc0a59c: 90 03 01 38 stw r0,312(r3) ffc0a5a0: 4b ff ff e4 b ffc0a584 =============================================================================== ffc0a5a4 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc0a5a4: 94 21 ff d8 stwu r1,-40(r1) ffc0a5a8: 7c 08 02 a6 mflr r0 ffc0a5ac: 93 e1 00 24 stw r31,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc0a5b0: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc0a5b4: 90 01 00 2c stw r0,44(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) return RTEMS_INVALID_ADDRESS; ffc0a5b8: 38 00 00 09 li r0,9 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc0a5bc: 41 82 00 60 beq- ffc0a61c return RTEMS_INVALID_ADDRESS; if ( !result ) ffc0a5c0: 2f 85 00 00 cmpwi cr7,r5,0 ffc0a5c4: 41 9e 00 58 beq- cr7,ffc0a61c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc0a5c8: 38 81 00 08 addi r4,r1,8 ffc0a5cc: 90 a1 00 18 stw r5,24(r1) ffc0a5d0: 48 00 2a 09 bl ffc0cfd8 <_Thread_Get> switch (location) { ffc0a5d4: 80 01 00 08 lwz r0,8(r1) ffc0a5d8: 80 a1 00 18 lwz r5,24(r1) ffc0a5dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a5e0: 40 9e 00 54 bne- cr7,ffc0a634 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; ffc0a5e4: 81 23 01 38 lwz r9,312(r3) while (tvp) { ffc0a5e8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a5ec: 40 be 00 14 bne+ cr7,ffc0a600 ffc0a5f0: 48 00 00 60 b ffc0a650 */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; ffc0a5f4: 81 29 00 00 lwz r9,0(r9) case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { ffc0a5f8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a5fc: 41 9e 00 54 beq- cr7,ffc0a650 <== NEVER TAKEN if (tvp->ptr == ptr) { ffc0a600: 80 09 00 04 lwz r0,4(r9) ffc0a604: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a608: 40 9e ff ec bne+ cr7,ffc0a5f4 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; ffc0a60c: 80 09 00 0c lwz r0,12(r9) ffc0a610: 90 05 00 00 stw r0,0(r5) _Thread_Enable_dispatch(); ffc0a614: 48 00 29 89 bl ffc0cf9c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a618: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a61c: 7c 03 03 78 mr r3,r0 ffc0a620: 80 01 00 2c lwz r0,44(r1) ffc0a624: 83 e1 00 24 lwz r31,36(r1) ffc0a628: 38 21 00 28 addi r1,r1,40 ffc0a62c: 7c 08 03 a6 mtlr r0 ffc0a630: 4e 80 00 20 blr #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a634: 38 00 00 04 li r0,4 } ffc0a638: 83 e1 00 24 lwz r31,36(r1) ffc0a63c: 7c 03 03 78 mr r3,r0 ffc0a640: 80 01 00 2c lwz r0,44(r1) ffc0a644: 38 21 00 28 addi r1,r1,40 ffc0a648: 7c 08 03 a6 mtlr r0 ffc0a64c: 4e 80 00 20 blr _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc0a650: 48 00 29 4d bl ffc0cf9c <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; ffc0a654: 38 00 00 09 li r0,9 ffc0a658: 4b ff ff c4 b ffc0a61c =============================================================================== ffc082fc : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc082fc: 2f 83 00 09 cmpwi cr7,r3,9 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; ffc08300: 38 00 00 09 li r0,9 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08304: 41 9e 00 44 beq- cr7,ffc08348 ffc08308: 40 9d 00 48 ble- cr7,ffc08350 ffc0830c: 2f 83 00 0e cmpwi cr7,r3,14 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; ffc08310: 38 00 00 0e li r0,14 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08314: 41 9e 00 34 beq- cr7,ffc08348 ffc08318: 40 9d 00 78 ble- cr7,ffc08390 ffc0831c: 2f 83 10 02 cmpwi cr7,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; ffc08320: 38 00 00 11 li r0,17 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08324: 41 9e 00 24 beq- cr7,ffc08348 ffc08328: 40 9d 00 d4 ble- cr7,ffc083fc ffc0832c: 2f 83 10 03 cmpwi cr7,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; ffc08330: 38 00 00 12 li r0,18 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08334: 41 9e 00 14 beq- cr7,ffc08348 ffc08338: 2f 83 10 04 cmpwi cr7,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; ffc0833c: 38 00 00 13 li r0,19 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08340: 41 9e 00 08 beq- cr7,ffc08348 <== 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; ffc08344: 38 00 ff ff li r0,-1 } return baud_index; } ffc08348: 7c 03 03 78 mr r3,r0 ffc0834c: 4e 80 00 20 blr rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08350: 2f 83 00 04 cmpwi cr7,r3,4 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; ffc08354: 38 00 00 04 li r0,4 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08358: 41 be ff f0 beq- cr7,ffc08348 ffc0835c: 41 9d 00 64 bgt- cr7,ffc083c0 ffc08360: 2f 83 00 01 cmpwi cr7,r3,1 case B0: baud_index = 0; break; case B50: baud_index = 1; break; ffc08364: 38 00 00 01 li r0,1 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08368: 41 be ff e0 beq- cr7,ffc08348 ffc0836c: 40 9d 00 ac ble- cr7,ffc08418 ffc08370: 2f 83 00 02 cmpwi cr7,r3,2 case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; ffc08374: 38 00 00 02 li r0,2 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08378: 41 be ff d0 beq- cr7,ffc08348 ffc0837c: 2f 83 00 03 cmpwi cr7,r3,3 case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; ffc08380: 38 00 00 03 li r0,3 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08384: 41 be ff c4 beq- cr7,ffc08348 <== 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; ffc08388: 38 00 ff ff li r0,-1 <== NOT EXECUTED ffc0838c: 4b ff ff bc b ffc08348 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08390: 2f 83 00 0b cmpwi cr7,r3,11 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; ffc08394: 38 00 00 0b li r0,11 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08398: 41 be ff b0 beq- cr7,ffc08348 ffc0839c: 41 9c 00 58 blt- cr7,ffc083f4 ffc083a0: 2f 83 00 0c cmpwi cr7,r3,12 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; ffc083a4: 38 00 00 0c li r0,12 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc083a8: 41 be ff a0 beq- cr7,ffc08348 ffc083ac: 2f 83 00 0d cmpwi cr7,r3,13 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; ffc083b0: 38 00 00 0d li r0,13 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc083b4: 41 be ff 94 beq- cr7,ffc08348 <== 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; ffc083b8: 38 00 ff ff li r0,-1 <== NOT EXECUTED ffc083bc: 4b ff ff 8c b ffc08348 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc083c0: 2f 83 00 06 cmpwi cr7,r3,6 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; ffc083c4: 38 00 00 06 li r0,6 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc083c8: 41 be ff 80 beq- cr7,ffc08348 ffc083cc: 41 9c 00 20 blt- cr7,ffc083ec ffc083d0: 2f 83 00 07 cmpwi cr7,r3,7 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; ffc083d4: 38 00 00 07 li r0,7 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc083d8: 41 be ff 70 beq- cr7,ffc08348 ffc083dc: 2f 83 00 08 cmpwi cr7,r3,8 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; ffc083e0: 38 00 00 08 li r0,8 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc083e4: 40 9e ff 60 bne+ cr7,ffc08344 <== NEVER TAKEN ffc083e8: 4b ff ff 60 b ffc08348 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; ffc083ec: 38 00 00 05 li r0,5 ffc083f0: 4b ff ff 58 b ffc08348 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; ffc083f4: 38 00 00 0a li r0,10 ffc083f8: 4b ff ff 50 b ffc08348 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc083fc: 2f 83 00 0f cmpwi cr7,r3,15 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; ffc08400: 38 00 00 0f li r0,15 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08404: 41 be ff 44 beq- cr7,ffc08348 ffc08408: 2f 83 10 01 cmpwi cr7,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; ffc0840c: 38 00 00 10 li r0,16 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08410: 40 9e ff 34 bne+ cr7,ffc08344 <== NEVER TAKEN ffc08414: 4b ff ff 34 b ffc08348 ffc08418: 2f 83 00 00 cmpwi cr7,r3,0 case B0: baud_index = 0; break; ffc0841c: 38 00 00 00 li r0,0 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08420: 41 be ff 28 beq- cr7,ffc08348 ffc08424: 4b ff ff 20 b ffc08344 =============================================================================== ffc06a04 : } } rtems_status_code rtems_termios_close (void *arg) { ffc06a04: 94 21 ff e8 stwu r1,-24(r1) ffc06a08: 7c 08 02 a6 mflr r0 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain( ffc06a0c: 38 80 00 00 li r4,0 } } rtems_status_code rtems_termios_close (void *arg) { ffc06a10: 90 01 00 1c stw r0,28(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( ffc06a14: 38 a0 00 00 li r5,0 } } rtems_status_code rtems_termios_close (void *arg) { ffc06a18: 93 c1 00 10 stw r30,16(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( ffc06a1c: 3f c0 00 00 lis r30,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; ffc06a20: 81 23 00 00 lwz r9,0(r3) } } rtems_status_code rtems_termios_close (void *arg) { ffc06a24: 93 a1 00 0c stw r29,12(r1) ffc06a28: 7c 7d 1b 78 mr r29,r3 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain( ffc06a2c: 80 7e 27 b8 lwz r3,10168(r30) } } rtems_status_code rtems_termios_close (void *arg) { ffc06a30: 93 e1 00 14 stw r31,20(r1) rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc06a34: 83 e9 00 38 lwz r31,56(r9) rtems_status_code sc; sc = rtems_semaphore_obtain( ffc06a38: 48 00 29 05 bl ffc0933c rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc06a3c: 2f 83 00 00 cmpwi cr7,r3,0 ffc06a40: 40 9e 01 b0 bne- cr7,ffc06bf0 <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { ffc06a44: 81 3f 00 08 lwz r9,8(r31) ffc06a48: 38 09 ff ff addi r0,r9,-1 ffc06a4c: 2f 80 00 00 cmpwi cr7,r0,0 ffc06a50: 90 1f 00 08 stw r0,8(r31) ffc06a54: 40 9e 00 d0 bne- cr7,ffc06b24 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { ffc06a58: 80 1f 00 cc lwz r0,204(r31) ffc06a5c: 3d 20 00 00 lis r9,0 ffc06a60: 39 29 28 78 addi r9,r9,10360 ffc06a64: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc06a68: 7d 29 02 14 add r9,r9,r0 ffc06a6c: 80 09 00 04 lwz r0,4(r9) ffc06a70: 2f 80 00 00 cmpwi cr7,r0,0 ffc06a74: 41 9e 01 1c beq- cr7,ffc06b90 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); ffc06a78: 7c 09 03 a6 mtctr r0 ffc06a7c: 7f e3 fb 78 mr r3,r31 ffc06a80: 4e 80 04 21 bctrl } drainOutput (tty); rtems_semaphore_release (tty->osem); } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc06a84: 80 1f 00 b4 lwz r0,180(r31) ffc06a88: 2f 80 00 02 cmpwi cr7,r0,2 ffc06a8c: 41 9e 01 3c beq- cr7,ffc06bc8 <== 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) ffc06a90: 80 1f 00 9c lwz r0,156(r31) ffc06a94: 2f 80 00 00 cmpwi cr7,r0,0 ffc06a98: 41 9e 00 18 beq- cr7,ffc06ab0 <== ALWAYS TAKEN (*tty->device.lastClose)(tty->major, tty->minor, arg); ffc06a9c: 80 7f 00 0c lwz r3,12(r31) <== NOT EXECUTED ffc06aa0: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED ffc06aa4: 80 9f 00 10 lwz r4,16(r31) <== NOT EXECUTED ffc06aa8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06aac: 4e 80 04 21 bctrl <== NOT EXECUTED if (tty->forw == NULL) { ffc06ab0: 81 3f 00 00 lwz r9,0(r31) ffc06ab4: 2f 89 00 00 cmpwi cr7,r9,0 ffc06ab8: 41 9e 00 b8 beq- cr7,ffc06b70 rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; ffc06abc: 80 1f 00 04 lwz r0,4(r31) ffc06ac0: 90 09 00 04 stw r0,4(r9) ffc06ac4: 81 7f 00 04 lwz r11,4(r31) } if (tty->back == NULL) { ffc06ac8: 2f 0b 00 00 cmpwi cr6,r11,0 ffc06acc: 41 9a 00 8c beq- cr6,ffc06b58 <== ALWAYS TAKEN rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; ffc06ad0: 91 2b 00 00 stw r9,0(r11) } rtems_semaphore_delete (tty->isem); ffc06ad4: 80 7f 00 14 lwz r3,20(r31) ffc06ad8: 48 00 27 89 bl ffc09260 rtems_semaphore_delete (tty->osem); ffc06adc: 80 7f 00 18 lwz r3,24(r31) ffc06ae0: 48 00 27 81 bl ffc09260 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); ffc06ae4: 80 7f 00 8c lwz r3,140(r31) ffc06ae8: 48 00 27 79 bl ffc09260 if ((tty->device.pollRead == NULL) || ffc06aec: 80 1f 00 a0 lwz r0,160(r31) ffc06af0: 2f 80 00 00 cmpwi cr7,r0,0 ffc06af4: 41 9e 00 58 beq- cr7,ffc06b4c ffc06af8: 80 1f 00 b4 lwz r0,180(r31) ffc06afc: 2f 80 00 02 cmpwi cr7,r0,2 ffc06b00: 41 9e 00 4c beq- cr7,ffc06b4c (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); ffc06b04: 80 7f 00 58 lwz r3,88(r31) ffc06b08: 4b ff e5 f9 bl ffc05100 free (tty->rawOutBuf.theBuf); ffc06b0c: 80 7f 00 7c lwz r3,124(r31) ffc06b10: 4b ff e5 f1 bl ffc05100 free (tty->cbuf); ffc06b14: 80 7f 00 1c lwz r3,28(r31) ffc06b18: 4b ff e5 e9 bl ffc05100 free (tty); ffc06b1c: 7f e3 fb 78 mr r3,r31 ffc06b20: 4b ff e5 e1 bl ffc05100 } rtems_semaphore_release (rtems_termios_ttyMutex); ffc06b24: 80 7e 27 b8 lwz r3,10168(r30) ffc06b28: 48 00 29 a1 bl ffc094c8 return RTEMS_SUCCESSFUL; } ffc06b2c: 80 01 00 1c lwz r0,28(r1) ffc06b30: 38 60 00 00 li r3,0 ffc06b34: 83 a1 00 0c lwz r29,12(r1) ffc06b38: 7c 08 03 a6 mtlr r0 ffc06b3c: 83 c1 00 10 lwz r30,16(r1) ffc06b40: 83 e1 00 14 lwz r31,20(r1) ffc06b44: 38 21 00 18 addi r1,r1,24 ffc06b48: 4e 80 00 20 blr 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); ffc06b4c: 80 7f 00 68 lwz r3,104(r31) ffc06b50: 48 00 27 11 bl ffc09260 ffc06b54: 4b ff ff b0 b ffc06b04 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; ffc06b58: 3d 60 00 00 lis r11,0 ffc06b5c: 91 2b 27 c0 stw r9,10176(r11) if ( rtems_termios_ttyHead != NULL ) { ffc06b60: 41 be ff 74 beq- cr7,ffc06ad4 rtems_termios_ttyHead->back = NULL; ffc06b64: 38 00 00 00 li r0,0 ffc06b68: 90 09 00 04 stw r0,4(r9) ffc06b6c: 4b ff ff 68 b ffc06ad4 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; ffc06b70: 81 7f 00 04 lwz r11,4(r31) ffc06b74: 3d 40 00 00 lis r10,0 if ( rtems_termios_ttyTail != NULL ) { ffc06b78: 2f 0b 00 00 cmpwi cr6,r11,0 rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; ffc06b7c: 91 6a 27 bc stw r11,10172(r10) if ( rtems_termios_ttyTail != NULL ) { ffc06b80: 41 ba ff d8 beq- cr6,ffc06b58 rtems_termios_ttyTail->forw = NULL; ffc06b84: 91 2b 00 00 stw r9,0(r11) ffc06b88: 81 3f 00 00 lwz r9,0(r31) ffc06b8c: 4b ff ff 44 b ffc06ad0 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); ffc06b90: 80 7f 00 18 lwz r3,24(r31) ffc06b94: 38 80 00 00 li r4,0 ffc06b98: 38 a0 00 00 li r5,0 ffc06b9c: 48 00 27 a1 bl ffc0933c if (sc != RTEMS_SUCCESSFUL) { ffc06ba0: 2f 83 00 00 cmpwi cr7,r3,0 ffc06ba4: 40 9e 00 4c bne- cr7,ffc06bf0 <== NEVER TAKEN drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc06ba8: 80 1f 00 b4 lwz r0,180(r31) ffc06bac: 2f 80 00 00 cmpwi cr7,r0,0 ffc06bb0: 40 9e 00 44 bne- cr7,ffc06bf4 sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { rtems_fatal_error_occurred (sc); } drainOutput (tty); rtems_semaphore_release (tty->osem); ffc06bb4: 80 7f 00 18 lwz r3,24(r31) ffc06bb8: 48 00 29 11 bl ffc094c8 } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc06bbc: 80 1f 00 b4 lwz r0,180(r31) ffc06bc0: 2f 80 00 02 cmpwi cr7,r0,2 ffc06bc4: 40 9e fe cc bne+ cr7,ffc06a90 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); ffc06bc8: 80 7f 00 c4 lwz r3,196(r31) ffc06bcc: 38 80 00 01 li r4,1 ffc06bd0: 48 00 22 19 bl ffc08de8 if (sc != RTEMS_SUCCESSFUL) ffc06bd4: 2f 83 00 00 cmpwi cr7,r3,0 ffc06bd8: 40 9e 00 18 bne- cr7,ffc06bf0 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); ffc06bdc: 80 7f 00 c8 lwz r3,200(r31) ffc06be0: 38 80 00 01 li r4,1 ffc06be4: 48 00 22 05 bl ffc08de8 if (sc != RTEMS_SUCCESSFUL) ffc06be8: 2f 83 00 00 cmpwi cr7,r3,0 ffc06bec: 41 9e fe a4 beq+ cr7,ffc06a90 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); ffc06bf0: 48 00 30 b1 bl ffc09ca0 <== NOT EXECUTED drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc06bf4: 7f e3 fb 78 mr r3,r31 ffc06bf8: 4b ff f8 d5 bl ffc064cc ffc06bfc: 4b ff ff b8 b ffc06bb4 =============================================================================== ffc08618 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { ffc08618: 94 21 ff f8 stwu r1,-8(r1) ffc0861c: 7c 08 02 a6 mflr r0 ffc08620: 90 01 00 0c stw r0,12(r1) /* * sum up character count already sent */ tty->t_dqlen += len; if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc08624: 81 63 00 b4 lwz r11,180(r3) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; ffc08628: 80 03 00 90 lwz r0,144(r3) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc0862c: 2f 8b 00 02 cmpwi cr7,r11,2 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; ffc08630: 7c 00 22 14 add r0,r0,r4 ffc08634: 90 03 00 90 stw r0,144(r3) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc08638: 41 9e 00 4c beq- cr7,ffc08684 if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { ffc0863c: 80 03 00 cc lwz r0,204(r3) ffc08640: 2f 80 00 05 cmpwi cr7,r0,5 ffc08644: 41 9e 00 14 beq- cr7,ffc08658 } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); } ffc08648: 80 01 00 0c lwz r0,12(r1) ffc0864c: 38 21 00 08 addi r1,r1,8 ffc08650: 7c 08 03 a6 mtlr r0 rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); ffc08654: 4b ff fc e4 b ffc08338 if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc08658: 3d 20 00 00 lis r9,0 ffc0865c: 80 09 29 2c lwz r0,10540(r9) ffc08660: 2f 80 00 00 cmpwi cr7,r0,0 ffc08664: 41 9e 00 0c beq- cr7,ffc08670 <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); ffc08668: 7c 09 03 a6 mtctr r0 ffc0866c: 4e 80 04 21 bctrl } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); } ffc08670: 80 01 00 0c lwz r0,12(r1) ffc08674: 38 60 00 00 li r3,0 ffc08678: 38 21 00 08 addi r1,r1,8 ffc0867c: 7c 08 03 a6 mtlr r0 ffc08680: 4e 80 00 20 blr if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); ffc08684: 80 63 00 c8 lwz r3,200(r3) ffc08688: 38 80 00 02 li r4,2 ffc0868c: 48 00 07 5d bl ffc08de8 if (sc != RTEMS_SUCCESSFUL) ffc08690: 2f 83 00 00 cmpwi cr7,r3,0 ffc08694: 41 9e ff dc beq+ cr7,ffc08670 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); ffc08698: 48 00 16 09 bl ffc09ca0 <== NOT EXECUTED =============================================================================== ffc07f00 : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len) { ffc07f00: 94 21 ff c8 stwu r1,-56(r1) ffc07f04: 7c 08 02 a6 mflr r0 ffc07f08: 90 01 00 3c stw r0,60(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) { ffc07f0c: 81 23 00 cc lwz r9,204(r3) * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len) { ffc07f10: 93 c1 00 30 stw r30,48(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) { ffc07f14: 3f c0 00 00 lis r30,0 ffc07f18: 3b de 28 78 addi r30,r30,10360 ffc07f1c: 55 29 28 34 rlwinm r9,r9,5,0,26 * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len) { ffc07f20: 93 e1 00 34 stw r31,52(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) { ffc07f24: 7d 3e 4a 14 add r9,r30,r9 ffc07f28: 80 09 00 10 lwz r0,16(r9) * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len) { ffc07f2c: 7c 7f 1b 78 mr r31,r3 ffc07f30: 92 c1 00 10 stw r22,16(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) { ffc07f34: 2f 80 00 00 cmpwi cr7,r0,0 * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len) { ffc07f38: 92 e1 00 14 stw r23,20(r1) ffc07f3c: 93 01 00 18 stw r24,24(r1) ffc07f40: 93 21 00 1c stw r25,28(r1) ffc07f44: 93 41 00 20 stw r26,32(r1) ffc07f48: 93 61 00 24 stw r27,36(r1) ffc07f4c: 93 81 00 28 stw r28,40(r1) ffc07f50: 93 a1 00 2c stw r29,44(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) { ffc07f54: 41 9e 00 b8 beq- cr7,ffc0800c while (len--) { ffc07f58: 2f 85 00 00 cmpwi cr7,r5,0 ffc07f5c: 41 9e 00 40 beq- cr7,ffc07f9c <== NEVER TAKEN * 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, const char *buf, int len) ffc07f60: 3b a4 ff ff addi r29,r4,-1 int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { ffc07f64: 90 a1 00 08 stw r5,8(r1) ffc07f68: 48 00 00 14 b ffc07f7c ffc07f6c: 81 3f 00 cc lwz r9,204(r31) ffc07f70: 55 29 28 34 rlwinm r9,r9,5,0,26 ffc07f74: 7d 3e 4a 14 add r9,r30,r9 ffc07f78: 80 09 00 10 lwz r0,16(r9) c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); ffc07f7c: 7c 09 03 a6 mtctr r0 ffc07f80: 8c 7d 00 01 lbzu r3,1(r29) ffc07f84: 7f e4 fb 78 mr r4,r31 ffc07f88: 4e 80 04 21 bctrl 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--) { ffc07f8c: 80 01 00 08 lwz r0,8(r1) ffc07f90: 35 20 ff ff addic. r9,r0,-1 ffc07f94: 91 21 00 08 stw r9,8(r1) ffc07f98: 40 82 ff d4 bne+ ffc07f6c } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc07f9c: 80 1f 00 e4 lwz r0,228(r31) (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; } return 0; ffc07fa0: 3b 60 00 00 li r27,0 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc07fa4: 2f 80 00 00 cmpwi cr7,r0,0 ffc07fa8: 40 9e 00 28 bne- cr7,ffc07fd0 <== NEVER TAKEN ffc07fac: 80 1f 00 dc lwz r0,220(r31) ffc07fb0: 2f 80 00 00 cmpwi cr7,r0,0 ffc07fb4: 41 9e 00 1c beq- cr7,ffc07fd0 <== NEVER TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); ffc07fb8: 7c 09 03 a6 mtctr r0 ffc07fbc: 38 7f 00 30 addi r3,r31,48 ffc07fc0: 80 9f 00 e0 lwz r4,224(r31) ffc07fc4: 4e 80 04 21 bctrl tty->tty_rcvwakeup = 1; ffc07fc8: 38 00 00 01 li r0,1 ffc07fcc: 90 1f 00 e4 stw r0,228(r31) } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } ffc07fd0: 80 01 00 3c lwz r0,60(r1) ffc07fd4: 7f 63 db 78 mr r3,r27 ffc07fd8: 82 c1 00 10 lwz r22,16(r1) ffc07fdc: 7c 08 03 a6 mtlr r0 ffc07fe0: 82 e1 00 14 lwz r23,20(r1) ffc07fe4: 83 01 00 18 lwz r24,24(r1) ffc07fe8: 83 21 00 1c lwz r25,28(r1) ffc07fec: 83 41 00 20 lwz r26,32(r1) ffc07ff0: 83 61 00 24 lwz r27,36(r1) ffc07ff4: 83 81 00 28 lwz r28,40(r1) ffc07ff8: 83 a1 00 2c lwz r29,44(r1) ffc07ffc: 83 c1 00 30 lwz r30,48(r1) ffc08000: 83 e1 00 34 lwz r31,52(r1) ffc08004: 38 21 00 38 addi r1,r1,56 ffc08008: 4e 80 00 20 blr * 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, const char *buf, int len) ffc0800c: 3b c4 ff ff addi r30,r4,-1 ffc08010: 7f 5e 2a 14 add r26,r30,r5 ffc08014: 3b 20 00 00 li r25,0 ffc08018: 3b 60 00 00 li r27,0 /* * 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); ffc0801c: 3a e3 00 30 addi r23,r3,48 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, ffc08020: 3a c3 00 4a addi r22,r3,74 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { ffc08024: 7f 9e d0 00 cmpw cr7,r30,r26 ffc08028: 41 9e 01 14 beq- cr7,ffc0813c c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { ffc0802c: 80 1f 00 b8 lwz r0,184(r31) } return 0; } while (len--) { c = *buf++; ffc08030: 8f 9e 00 01 lbzu r28,1(r30) /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { ffc08034: 70 09 02 00 andi. r9,r0,512 ffc08038: 41 82 00 1c beq- ffc08054 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { ffc0803c: 88 1f 00 4a lbz r0,74(r31) ffc08040: 7f 80 e0 00 cmpw cr7,r0,r28 ffc08044: 41 9e 01 48 beq- cr7,ffc0818c /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { ffc08048: 88 1f 00 49 lbz r0,73(r31) ffc0804c: 7f 80 e0 00 cmpw cr7,r0,r28 ffc08050: 41 9e 01 c8 beq- cr7,ffc08218 <== NEVER TAKEN /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { ffc08054: 2f 99 00 00 cmpwi cr7,r25,0 ffc08058: 40 9e 01 50 bne- cr7,ffc081a8 <== NEVER TAKEN } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; ffc0805c: 83 bf 00 60 lwz r29,96(r31) ffc08060: 81 3f 00 64 lwz r9,100(r31) ffc08064: 38 1d 00 01 addi r0,r29,1 ffc08068: 7f a0 4b 96 divwu r29,r0,r9 ffc0806c: 7f bd 49 d6 mullw r29,r29,r9 ffc08070: 7f bd 00 50 subf r29,r29,r0 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc08074: 7f 00 00 a6 mfmsr r24 ffc08078: 7c 10 42 a6 mfsprg r0,0 ffc0807c: 7f 00 00 78 andc r0,r24,r0 ffc08080: 7c 00 01 24 mtmsr r0 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) ffc08084: 80 1f 00 5c lwz r0,92(r31) ffc08088: 81 7f 00 64 lwz r11,100(r31) % tty->rawInBuf.Size) > tty->highwater) && ffc0808c: 81 3f 00 64 lwz r9,100(r31) } } 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) ffc08090: 7c 00 58 50 subf r0,r0,r11 ffc08094: 81 7f 00 c0 lwz r11,192(r31) ffc08098: 7c 00 ea 14 add r0,r0,r29 % tty->rawInBuf.Size) > tty->highwater) && ffc0809c: 7d 40 4b 96 divwu r10,r0,r9 ffc080a0: 7d 2a 49 d6 mullw r9,r10,r9 ffc080a4: 7c 09 00 50 subf r0,r9,r0 } } 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) ffc080a8: 7f 80 58 40 cmplw cr7,r0,r11 ffc080ac: 40 9d 00 3c ble- cr7,ffc080e8 <== ALWAYS TAKEN % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { ffc080b0: 80 1f 00 b8 lwz r0,184(r31) <== 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) && ffc080b4: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc080b8: 40 82 00 30 bne- ffc080e8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; ffc080bc: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc080c0: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED ffc080c4: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) ffc080c8: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc080cc: 70 00 04 02 andi. r0,r0,1026 <== NOT EXECUTED ffc080d0: 2f 80 04 00 cmpwi cr7,r0,1024 <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || ffc080d4: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED 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)) ffc080d8: 41 9e 01 64 beq- cr7,ffc0823c <== 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) ) { ffc080dc: 70 00 01 04 andi. r0,r0,260 <== NOT EXECUTED ffc080e0: 2f 80 01 00 cmpwi cr7,r0,256 <== NOT EXECUTED ffc080e4: 41 9e 01 94 beq- cr7,ffc08278 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc080e8: 7f 00 01 24 mtmsr r24 } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { ffc080ec: 80 1f 00 5c lwz r0,92(r31) ffc080f0: 7f 80 e8 00 cmpw cr7,r0,r29 ffc080f4: 41 9e 01 1c beq- cr7,ffc08210 <== NEVER TAKEN dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; ffc080f8: 81 3f 00 58 lwz r9,88(r31) ffc080fc: 7f 89 e9 ae stbx r28,r9,r29 tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc08100: 80 1f 00 e4 lwz r0,228(r31) if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; ffc08104: 93 bf 00 60 stw r29,96(r31) /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc08108: 2f 80 00 00 cmpwi cr7,r0,0 ffc0810c: 40 be ff 18 bne- cr7,ffc08024 <== NEVER TAKEN ffc08110: 80 1f 00 dc lwz r0,220(r31) ffc08114: 2f 80 00 00 cmpwi cr7,r0,0 ffc08118: 41 be ff 0c beq- cr7,ffc08024 <== ALWAYS TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); ffc0811c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08120: 7e e3 bb 78 mr r3,r23 <== NOT EXECUTED ffc08124: 80 9f 00 e0 lwz r4,224(r31) <== NOT EXECUTED ffc08128: 4e 80 04 21 bctrl <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { ffc0812c: 7f 9e d0 00 cmpw cr7,r30,r26 <== 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; ffc08130: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc08134: 90 1f 00 e4 stw r0,228(r31) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { ffc08138: 40 9e fe f4 bne+ cr7,ffc0802c <== NOT EXECUTED } } } } tty->rawInBufDropped += dropped; ffc0813c: 80 1f 00 78 lwz r0,120(r31) rtems_semaphore_release (tty->rawInBuf.Semaphore); ffc08140: 80 7f 00 68 lwz r3,104(r31) } } } } tty->rawInBufDropped += dropped; ffc08144: 7c 00 da 14 add r0,r0,r27 ffc08148: 90 1f 00 78 stw r0,120(r31) rtems_semaphore_release (tty->rawInBuf.Semaphore); ffc0814c: 48 00 13 7d bl ffc094c8 return dropped; } ffc08150: 80 01 00 3c lwz r0,60(r1) ffc08154: 7f 63 db 78 mr r3,r27 ffc08158: 82 c1 00 10 lwz r22,16(r1) ffc0815c: 7c 08 03 a6 mtlr r0 ffc08160: 82 e1 00 14 lwz r23,20(r1) ffc08164: 83 01 00 18 lwz r24,24(r1) ffc08168: 83 21 00 1c lwz r25,28(r1) ffc0816c: 83 41 00 20 lwz r26,32(r1) ffc08170: 83 61 00 24 lwz r27,36(r1) ffc08174: 83 81 00 28 lwz r28,40(r1) ffc08178: 83 a1 00 2c lwz r29,44(r1) ffc0817c: 83 c1 00 30 lwz r30,48(r1) ffc08180: 83 e1 00 34 lwz r31,52(r1) ffc08184: 38 21 00 38 addi r1,r1,56 ffc08188: 4e 80 00 20 blr /* 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]) { ffc0818c: 89 3f 00 49 lbz r9,73(r31) ffc08190: 7f 89 00 00 cmpw cr7,r9,r0 /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; ffc08194: 80 1f 00 b8 lwz r0,184(r31) /* 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]) { ffc08198: 41 9e 00 94 beq- cr7,ffc0822c <== NEVER TAKEN tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; ffc0819c: 60 00 00 10 ori r0,r0,16 ffc081a0: 90 1f 00 b8 stw r0,184(r31) * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len) { ffc081a4: 3b 20 00 01 li r25,1 flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { ffc081a8: 80 1f 00 b8 lwz r0,184(r31) ffc081ac: 54 00 06 b6 rlwinm r0,r0,0,26,27 ffc081b0: 2f 80 00 20 cmpwi cr7,r0,32 ffc081b4: 40 9e fe 70 bne+ cr7,ffc08024 <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc081b8: 7f a0 00 a6 mfmsr r29 <== NOT EXECUTED ffc081bc: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc081c0: 7f a0 00 78 andc r0,r29,r0 <== NOT EXECUTED ffc081c4: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc081c8: 81 3f 00 94 lwz r9,148(r31) <== 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; ffc081cc: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc081d0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; ffc081d4: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED ffc081d8: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc081dc: 40 9e 00 0c bne- cr7,ffc081e8 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc081e0: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED ffc081e4: 4b ff fe 40 b ffc08024 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); ffc081e8: 81 3f 00 84 lwz r9,132(r31) <== 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)( ffc081ec: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc081f0: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED ffc081f4: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc081f8: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc081fc: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED ffc08200: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08204: 4e 80 04 21 bctrl <== NOT EXECUTED ffc08208: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED ffc0820c: 4b ff fe 18 b ffc08024 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; ffc08210: 3b 7b 00 01 addi r27,r27,1 <== NOT EXECUTED ffc08214: 4b ff fe 10 b ffc08024 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; ffc08218: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len) { ffc0821c: 3b 20 00 01 li r25,1 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; ffc08220: 54 00 07 34 rlwinm r0,r0,0,28,26 <== NOT EXECUTED ffc08224: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED ffc08228: 4b ff ff 80 b ffc081a8 <== 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; ffc0822c: 68 00 00 10 xori r0,r0,16 <== NOT EXECUTED ffc08230: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len) { ffc08234: 3b 20 00 01 li r25,1 <== NOT EXECUTED ffc08238: 4b ff ff 70 b ffc081a8 <== 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) || ffc0823c: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc08240: 40 82 00 10 bne- ffc08250 <== NOT EXECUTED ffc08244: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED ffc08248: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0824c: 40 be fe 9c bne- cr7,ffc080e8 <== 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; ffc08250: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc08254: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED ffc08258: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc0825c: 38 a0 00 01 li r5,1 <== 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; ffc08260: 61 29 00 02 ori r9,r9,2 <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc08264: 80 7f 00 10 lwz r3,16(r31) <== 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; ffc08268: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc0826c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08270: 4e 80 04 21 bctrl <== NOT EXECUTED ffc08274: 4b ff fe 74 b ffc080e8 <== 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; /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { ffc08278: 80 1f 00 ac lwz r0,172(r31) <== 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; ffc0827c: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { ffc08280: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { tty->flow_ctrl |= FL_IRTSOFF; ffc08284: 61 29 00 04 ori r9,r9,4 <== NOT EXECUTED ffc08288: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { ffc0828c: 41 be fe 5c beq- cr7,ffc080e8 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); ffc08290: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc08294: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08298: 4e 80 04 21 bctrl <== NOT EXECUTED ffc0829c: 4b ff fe 4c b ffc080e8 <== NOT EXECUTED =============================================================================== ffc06c1c : } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc06c1c: 94 21 ff e0 stwu r1,-32(r1) ffc06c20: 7c 08 02 a6 mflr r0 struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc06c24: 38 80 00 00 li r4,0 } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc06c28: 90 01 00 24 stw r0,36(r1) rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; ffc06c2c: 38 00 00 00 li r0,0 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc06c30: 38 a0 00 00 li r5,0 rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc06c34: 81 23 00 00 lwz r9,0(r3) } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc06c38: 93 c1 00 18 stw r30,24(r1) rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc06c3c: 83 c9 00 38 lwz r30,56(r9) } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc06c40: 93 81 00 10 stw r28,16(r1) ffc06c44: 93 a1 00 14 stw r29,20(r1) ffc06c48: 93 e1 00 1c stw r31,28(r1) ffc06c4c: 7c 7f 1b 78 mr r31,r3 ffc06c50: 93 41 00 08 stw r26,8(r1) ffc06c54: 93 61 00 0c stw r27,12(r1) rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; ffc06c58: 90 03 00 0c stw r0,12(r3) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc06c5c: 80 7e 00 18 lwz r3,24(r30) 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; ffc06c60: 83 9f 00 08 lwz r28,8(r31) rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc06c64: 48 00 26 d9 bl ffc0933c if (sc != RTEMS_SUCCESSFUL) { ffc06c68: 7c 7d 1b 79 mr. r29,r3 ffc06c6c: 40 82 00 58 bne- ffc06cc4 <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { ffc06c70: 80 1f 00 04 lwz r0,4(r31) ffc06c74: 2f 80 00 04 cmpwi cr7,r0,4 ffc06c78: 41 9e 00 34 beq- cr7,ffc06cac ffc06c7c: 2b 80 00 04 cmplwi cr7,r0,4 ffc06c80: 41 9d 00 74 bgt- cr7,ffc06cf4 ffc06c84: 2f 80 00 02 cmpwi cr7,r0,2 ffc06c88: 41 9e 00 c8 beq- cr7,ffc06d50 ffc06c8c: 2b 80 00 02 cmplwi cr7,r0,2 ffc06c90: 40 9d 02 58 ble- cr7,ffc06ee8 drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc06c94: 80 1e 00 b4 lwz r0,180(r30) ffc06c98: 2f 80 00 00 cmpwi cr7,r0,0 ffc06c9c: 41 be 00 20 beq+ cr7,ffc06cbc <== ALWAYS TAKEN ffc06ca0: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc06ca4: 4b ff f8 29 bl ffc064cc <== NOT EXECUTED ffc06ca8: 48 00 00 14 b ffc06cbc <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; ffc06cac: 81 5c 00 00 lwz r10,0(r28) ffc06cb0: 81 7c 00 04 lwz r11,4(r28) ffc06cb4: 91 5e 00 dc stw r10,220(r30) ffc06cb8: 91 7e 00 e0 stw r11,224(r30) *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); ffc06cbc: 80 7e 00 18 lwz r3,24(r30) ffc06cc0: 48 00 28 09 bl ffc094c8 args->ioctl_return = sc; return sc; } ffc06cc4: 80 01 00 24 lwz r0,36(r1) ffc06cc8: 7f a3 eb 78 mr r3,r29 } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; ffc06ccc: 93 bf 00 0c stw r29,12(r31) return sc; } ffc06cd0: 7c 08 03 a6 mtlr r0 ffc06cd4: 83 41 00 08 lwz r26,8(r1) ffc06cd8: 83 61 00 0c lwz r27,12(r1) ffc06cdc: 83 81 00 10 lwz r28,16(r1) ffc06ce0: 83 a1 00 14 lwz r29,20(r1) ffc06ce4: 83 c1 00 18 lwz r30,24(r1) ffc06ce8: 83 e1 00 1c lwz r31,28(r1) ffc06cec: 38 21 00 20 addi r1,r1,32 ffc06cf0: 4e 80 00 20 blr sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { ffc06cf4: 3d 20 40 04 lis r9,16388 ffc06cf8: 61 29 66 7f ori r9,r9,26239 ffc06cfc: 7f 80 48 00 cmpw cr7,r0,r9 ffc06d00: 41 9e 01 bc beq- cr7,ffc06ebc <== NEVER TAKEN ffc06d04: 7f 80 48 40 cmplw cr7,r0,r9 ffc06d08: 41 9d 01 fc bgt- cr7,ffc06f04 ffc06d0c: 2f 80 00 05 cmpwi cr7,r0,5 ffc06d10: 41 9e 02 84 beq- cr7,ffc06f94 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { ffc06d14: 80 1e 00 cc lwz r0,204(r30) ffc06d18: 3d 20 00 00 lis r9,0 ffc06d1c: 39 29 28 78 addi r9,r9,10360 ffc06d20: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc06d24: 7d 29 02 14 add r9,r9,r0 ffc06d28: 80 09 00 18 lwz r0,24(r9) sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; ffc06d2c: 3b a0 00 0a li r29,10 args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { ffc06d30: 2f 80 00 00 cmpwi cr7,r0,0 ffc06d34: 41 be ff 88 beq- cr7,ffc06cbc <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); ffc06d38: 7f c3 f3 78 mr r3,r30 ffc06d3c: 7c 09 03 a6 mtctr r0 ffc06d40: 7f e4 fb 78 mr r4,r31 ffc06d44: 4e 80 04 21 bctrl ffc06d48: 7c 7d 1b 78 mr r29,r3 ffc06d4c: 4b ff ff 70 b ffc06cbc case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; ffc06d50: 3b 9e 00 30 addi r28,r30,48 ffc06d54: 80 9f 00 08 lwz r4,8(r31) ffc06d58: 7f 83 e3 78 mr r3,r28 ffc06d5c: 38 a0 00 24 li r5,36 ffc06d60: 48 00 ca 3d bl ffc1379c /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && ffc06d64: 80 1e 00 b8 lwz r0,184(r30) ffc06d68: 70 09 02 00 andi. r9,r0,512 ffc06d6c: 41 82 00 58 beq- ffc06dc4 !(tty->termios.c_iflag & IXON)) { ffc06d70: 80 1e 00 30 lwz r0,48(r30) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && ffc06d74: 70 09 04 00 andi. r9,r0,1024 ffc06d78: 40 82 00 4c bne- ffc06dc4 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); ffc06d7c: 81 3e 00 b8 lwz r9,184(r30) ffc06d80: 38 00 fd ef li r0,-529 ffc06d84: 7d 20 00 38 and r0,r9,r0 ffc06d88: 90 1e 00 b8 stw r0,184(r30) /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { ffc06d8c: 80 1e 00 b8 lwz r0,184(r30) ffc06d90: 70 09 00 20 andi. r9,r0,32 ffc06d94: 41 82 00 30 beq- ffc06dc4 <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc06d98: 7f 60 00 a6 mfmsr r27 <== NOT EXECUTED ffc06d9c: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc06da0: 7f 60 00 78 andc r0,r27,r0 <== NOT EXECUTED ffc06da4: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc06da8: 81 3e 00 94 lwz r9,148(r30) <== 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; ffc06dac: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc06db0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; ffc06db4: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED ffc06db8: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc06dbc: 40 9e 02 50 bne- cr7,ffc0700c <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc06dc0: 7f 60 01 24 mtmsr r27 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { ffc06dc4: 80 1e 00 b8 lwz r0,184(r30) ffc06dc8: 70 09 04 00 andi. r9,r0,1024 ffc06dcc: 41 82 00 28 beq- ffc06df4 ffc06dd0: 80 1e 00 30 lwz r0,48(r30) ffc06dd4: 70 09 10 00 andi. r9,r0,4096 ffc06dd8: 40 82 00 1c bne- ffc06df4 <== NEVER TAKEN /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); ffc06ddc: 80 1e 00 b8 lwz r0,184(r30) ffc06de0: 54 00 05 a8 rlwinm r0,r0,0,22,20 ffc06de4: 90 1e 00 b8 stw r0,184(r30) /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); ffc06de8: 80 1e 00 b8 lwz r0,184(r30) ffc06dec: 54 00 07 fa rlwinm r0,r0,0,31,29 ffc06df0: 90 1e 00 b8 stw r0,184(r30) } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { ffc06df4: 80 1e 00 b8 lwz r0,184(r30) ffc06df8: 70 09 01 00 andi. r9,r0,256 ffc06dfc: 80 1e 00 38 lwz r0,56(r30) ffc06e00: 2f 80 00 00 cmpwi cr7,r0,0 ffc06e04: 41 82 00 4c beq- ffc06e50 <== ALWAYS TAKEN ffc06e08: 41 9c 01 f4 blt- cr7,ffc06ffc <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); ffc06e0c: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc06e10: 54 00 06 2c rlwinm r0,r0,0,24,22 <== NOT EXECUTED ffc06e14: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) { ffc06e18: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc06e1c: 70 09 00 04 andi. r9,r0,4 <== NOT EXECUTED ffc06e20: 41 82 00 24 beq- ffc06e44 <== NOT EXECUTED ffc06e24: 80 1e 00 b0 lwz r0,176(r30) <== NOT EXECUTED ffc06e28: 2f 00 00 00 cmpwi cr6,r0,0 <== NOT EXECUTED ffc06e2c: 41 9a 00 18 beq- cr6,ffc06e44 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); ffc06e30: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06e34: 80 7e 00 10 lwz r3,16(r30) <== NOT EXECUTED ffc06e38: 4e 80 04 21 bctrl <== NOT EXECUTED ffc06e3c: 80 1e 00 38 lwz r0,56(r30) <== NOT EXECUTED ffc06e40: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); ffc06e44: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc06e48: 54 00 07 b8 rlwinm r0,r0,0,30,28 <== NOT EXECUTED ffc06e4c: 90 1e 00 b8 stw r0,184(r30) <== 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) { ffc06e50: 41 9c 01 ac blt- cr7,ffc06ffc <== NEVER TAKEN tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { ffc06e54: 80 1e 00 30 lwz r0,48(r30) ffc06e58: 70 09 10 00 andi. r9,r0,4096 ffc06e5c: 41 82 00 10 beq- ffc06e6c tty->flow_ctrl |= FL_MDXOF; ffc06e60: 81 3e 00 b8 lwz r9,184(r30) ffc06e64: 61 29 04 00 ori r9,r9,1024 ffc06e68: 91 3e 00 b8 stw r9,184(r30) } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { ffc06e6c: 70 09 04 00 andi. r9,r0,1024 ffc06e70: 41 82 00 10 beq- ffc06e80 tty->flow_ctrl |= FL_MDXON; ffc06e74: 80 1e 00 b8 lwz r0,184(r30) ffc06e78: 60 00 02 00 ori r0,r0,512 ffc06e7c: 90 1e 00 b8 stw r0,184(r30) 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) { ffc06e80: 83 7e 00 3c lwz r27,60(r30) ffc06e84: 73 7b 00 02 andi. r27,r27,2 ffc06e88: 41 82 01 20 beq- ffc06fa8 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; ffc06e8c: 38 00 00 00 li r0,0 ffc06e90: 90 1e 00 6c stw r0,108(r30) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; ffc06e94: 90 1e 00 70 stw r0,112(r30) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; ffc06e98: 90 1e 00 74 stw r0,116(r30) } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) ffc06e9c: 80 1e 00 a8 lwz r0,168(r30) ffc06ea0: 2f 80 00 00 cmpwi cr7,r0,0 ffc06ea4: 41 be fe 18 beq- cr7,ffc06cbc <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); ffc06ea8: 80 7e 00 10 lwz r3,16(r30) ffc06eac: 7f 84 e3 78 mr r4,r28 ffc06eb0: 7c 09 03 a6 mtctr r0 ffc06eb4: 4e 80 04 21 bctrl ffc06eb8: 4b ff fe 04 b ffc06cbc case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; ffc06ebc: 81 3e 00 60 lwz r9,96(r30) <== NOT EXECUTED ffc06ec0: 80 1e 00 5c lwz r0,92(r30) <== NOT EXECUTED if ( rawnc < 0 ) ffc06ec4: 7c 00 48 51 subf. r0,r0,r9 <== NOT EXECUTED ffc06ec8: 41 80 01 28 blt- ffc06ff0 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; ffc06ecc: 81 5e 00 20 lwz r10,32(r30) <== NOT EXECUTED ffc06ed0: 81 3e 00 24 lwz r9,36(r30) <== NOT EXECUTED ffc06ed4: 81 7f 00 08 lwz r11,8(r31) <== NOT EXECUTED ffc06ed8: 7d 29 50 50 subf r9,r9,r10 <== NOT EXECUTED ffc06edc: 7c 09 02 14 add r0,r9,r0 <== NOT EXECUTED ffc06ee0: 90 0b 00 00 stw r0,0(r11) <== NOT EXECUTED } break; ffc06ee4: 4b ff fd d8 b ffc06cbc <== 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) { ffc06ee8: 2f 80 00 01 cmpwi cr7,r0,1 ffc06eec: 40 9e fe 28 bne+ cr7,ffc06d14 <== NEVER TAKEN sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; ffc06ef0: 80 7f 00 08 lwz r3,8(r31) ffc06ef4: 38 9e 00 30 addi r4,r30,48 ffc06ef8: 38 a0 00 24 li r5,36 ffc06efc: 48 00 c8 a1 bl ffc1379c break; ffc06f00: 4b ff fd bc b ffc06cbc sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { ffc06f04: 6c 09 40 04 xoris r9,r0,16388 ffc06f08: 2f 89 74 1a cmpwi cr7,r9,29722 ffc06f0c: 41 9e 00 78 beq- cr7,ffc06f84 ffc06f10: 6c 09 80 04 xoris r9,r0,32772 ffc06f14: 2f 89 74 1b cmpwi cr7,r9,29723 ffc06f18: 40 9e fd fc bne+ cr7,ffc06d14 <== NEVER TAKEN #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { ffc06f1c: 81 3e 00 cc lwz r9,204(r30) ffc06f20: 3f 80 00 00 lis r28,0 ffc06f24: 3b 9c 28 78 addi r28,r28,10360 ffc06f28: 55 29 28 34 rlwinm r9,r9,5,0,26 ffc06f2c: 7d 3c 4a 14 add r9,r28,r9 ffc06f30: 80 09 00 04 lwz r0,4(r9) ffc06f34: 2f 80 00 00 cmpwi cr7,r0,0 ffc06f38: 41 9e 00 14 beq- cr7,ffc06f4c sc = rtems_termios_linesw[tty->t_line].l_close(tty); ffc06f3c: 7f c3 f3 78 mr r3,r30 ffc06f40: 7c 09 03 a6 mtctr r0 ffc06f44: 4e 80 04 21 bctrl ffc06f48: 7c 7d 1b 78 mr r29,r3 } tty->t_line=*(int*)(args->buffer); ffc06f4c: 81 3f 00 08 lwz r9,8(r31) tty->t_sc = NULL; /* ensure that no more valid data */ ffc06f50: 38 00 00 00 li r0,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); ffc06f54: 81 29 00 00 lwz r9,0(r9) tty->t_sc = NULL; /* ensure that no more valid data */ ffc06f58: 90 1e 00 d0 stw r0,208(r30) /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { ffc06f5c: 55 20 28 34 rlwinm r0,r9,5,0,26 ffc06f60: 7c 1c 00 2e lwzx r0,r28,r0 * 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); ffc06f64: 91 3e 00 cc stw r9,204(r30) tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { ffc06f68: 2f 80 00 00 cmpwi cr7,r0,0 ffc06f6c: 41 be fd 50 beq- cr7,ffc06cbc sc = rtems_termios_linesw[tty->t_line].l_open(tty); ffc06f70: 7f c3 f3 78 mr r3,r30 ffc06f74: 7c 09 03 a6 mtctr r0 ffc06f78: 4e 80 04 21 bctrl ffc06f7c: 7c 7d 1b 78 mr r29,r3 ffc06f80: 4b ff fd 3c b ffc06cbc } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; ffc06f84: 80 1e 00 cc lwz r0,204(r30) ffc06f88: 81 3f 00 08 lwz r9,8(r31) ffc06f8c: 90 09 00 00 stw r0,0(r9) break; ffc06f90: 4b ff fd 2c b ffc06cbc case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; ffc06f94: 81 5c 00 00 lwz r10,0(r28) ffc06f98: 81 7c 00 04 lwz r11,4(r28) ffc06f9c: 91 5e 00 d4 stw r10,212(r30) ffc06fa0: 91 7e 00 d8 stw r11,216(r30) break; ffc06fa4: 4b ff fd 18 b ffc06cbc 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] * ffc06fa8: 8b 5e 00 46 lbz r26,70(r30) rtems_clock_get_ticks_per_second() / 10; ffc06fac: 48 00 1b 91 bl ffc08b3c if (tty->termios.c_cc[VTIME]) { ffc06fb0: 89 3e 00 46 lbz r9,70(r30) tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; ffc06fb4: 3c 00 cc cc lis r0,-13108 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] * ffc06fb8: 7c 63 d1 d6 mullw r3,r3,r26 rtems_clock_get_ticks_per_second() / 10; ffc06fbc: 60 00 cc cd ori r0,r0,52429 if (tty->termios.c_cc[VTIME]) { ffc06fc0: 2f 89 00 00 cmpwi cr7,r9,0 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; ffc06fc4: 7c 03 00 16 mulhwu r0,r3,r0 ffc06fc8: 54 00 e8 fe rlwinm r0,r0,29,3,31 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] * ffc06fcc: 90 1e 00 54 stw r0,84(r30) rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { ffc06fd0: 41 9e 00 64 beq- cr7,ffc07034 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) ffc06fd4: 89 3e 00 47 lbz r9,71(r30) 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; ffc06fd8: 93 7e 00 6c stw r27,108(r30) tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) ffc06fdc: 2f 89 00 00 cmpwi cr7,r9,0 } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; ffc06fe0: 90 1e 00 70 stw r0,112(r30) if (tty->termios.c_cc[VMIN]) ffc06fe4: 41 9e 00 6c beq- cr7,ffc07050 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; ffc06fe8: 93 7e 00 74 stw r27,116(r30) ffc06fec: 4b ff fe b0 b ffc06e9c break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; ffc06ff0: 81 3e 00 64 lwz r9,100(r30) <== NOT EXECUTED ffc06ff4: 7c 00 4a 14 add r0,r0,r9 <== NOT EXECUTED ffc06ff8: 4b ff fe d4 b ffc06ecc <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS; ffc06ffc: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc07000: 60 00 01 00 ori r0,r0,256 <== NOT EXECUTED ffc07004: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED ffc07008: 4b ff fe 4c b ffc06e54 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); ffc0700c: 81 3e 00 84 lwz r9,132(r30) <== 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)( ffc07010: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc07014: 80 9e 00 7c lwz r4,124(r30) <== NOT EXECUTED ffc07018: 80 1e 00 a4 lwz r0,164(r30) <== NOT EXECUTED ffc0701c: 80 7e 00 10 lwz r3,16(r30) <== NOT EXECUTED ffc07020: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED ffc07024: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07028: 4e 80 04 21 bctrl <== NOT EXECUTED ffc0702c: 7f 60 01 24 mtmsr r27 <== NOT EXECUTED ffc07030: 4b ff fd 94 b ffc06dc4 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { ffc07034: 88 1e 00 47 lbz r0,71(r30) ffc07038: 2f 80 00 00 cmpwi cr7,r0,0 ffc0703c: 41 9e 00 1c beq- cr7,ffc07058 <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; ffc07040: 91 3e 00 6c stw r9,108(r30) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; ffc07044: 91 3e 00 70 stw r9,112(r30) <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; ffc07048: 91 3e 00 74 stw r9,116(r30) <== NOT EXECUTED ffc0704c: 4b ff fe 50 b ffc06e9c <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; ffc07050: 90 1e 00 74 stw r0,116(r30) ffc07054: 4b ff fe 48 b ffc06e9c if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; ffc07058: 38 00 00 01 li r0,1 ffc0705c: 90 1e 00 6c stw r0,108(r30) ffc07060: 4b ff fe 3c b ffc06e9c =============================================================================== ffc06568 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc06568: 94 21 ff c0 stwu r1,-64(r1) ffc0656c: 7d 80 00 26 mfcr r12 ffc06570: 7c 08 02 a6 mflr r0 ffc06574: 93 81 00 30 stw r28,48(r1) struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc06578: 3f 80 00 00 lis r28,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc0657c: 93 c1 00 38 stw r30,56(r1) ffc06580: 7c 7e 1b 78 mr r30,r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc06584: 80 7c 27 b8 lwz r3,10168(r28) rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc06588: 93 41 00 28 stw r26,40(r1) ffc0658c: 7c ba 2b 78 mr r26,r5 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc06590: 38 a0 00 00 li r5,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc06594: 93 a1 00 34 stw r29,52(r1) ffc06598: 7c 9d 23 78 mr r29,r4 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc0659c: 38 80 00 00 li r4,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc065a0: 93 01 00 20 stw r24,32(r1) ffc065a4: 7c d8 33 78 mr r24,r6 ffc065a8: 93 61 00 2c stw r27,44(r1) ffc065ac: 90 01 00 44 stw r0,68(r1) ffc065b0: 92 81 00 10 stw r20,16(r1) ffc065b4: 92 a1 00 14 stw r21,20(r1) ffc065b8: 92 c1 00 18 stw r22,24(r1) ffc065bc: 92 e1 00 1c stw r23,28(r1) ffc065c0: 93 21 00 24 stw r25,36(r1) ffc065c4: 93 e1 00 3c stw r31,60(r1) ffc065c8: 91 81 00 0c stw r12,12(r1) struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc065cc: 48 00 2d 71 bl ffc0933c rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc065d0: 7c 7b 1b 79 mr. r27,r3 ffc065d4: 40 82 00 90 bne- ffc06664 <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { ffc065d8: 3e c0 00 00 lis r22,0 ffc065dc: 82 f6 27 c0 lwz r23,10176(r22) ffc065e0: 2e 17 00 00 cmpwi cr4,r23,0 ffc065e4: 41 92 01 08 beq- cr4,ffc066ec ffc065e8: 7e ff bb 78 mr r31,r23 ffc065ec: 48 00 00 10 b ffc065fc ffc065f0: 83 ff 00 00 lwz r31,0(r31) ffc065f4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc065f8: 41 9e 00 f4 beq- cr7,ffc066ec <== ALWAYS TAKEN if ((tty->major == major) && (tty->minor == minor)) ffc065fc: 80 1f 00 0c lwz r0,12(r31) ffc06600: 7f 80 f0 00 cmpw cr7,r0,r30 ffc06604: 40 9e ff ec bne+ cr7,ffc065f0 ffc06608: 80 1f 00 10 lwz r0,16(r31) ffc0660c: 7f 80 e8 00 cmpw cr7,r0,r29 ffc06610: 40 9e ff e0 bne+ cr7,ffc065f0 <== NEVER TAKEN if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { ffc06614: 81 3f 00 08 lwz r9,8(r31) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; ffc06618: 81 7a 00 00 lwz r11,0(r26) if (!tty->refcount++) { ffc0661c: 2f 89 00 00 cmpwi cr7,r9,0 ffc06620: 39 29 00 01 addi r9,r9,1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; ffc06624: 93 eb 00 38 stw r31,56(r11) if (!tty->refcount++) { ffc06628: 91 3f 00 08 stw r9,8(r31) ffc0662c: 40 9e 00 30 bne- cr7,ffc0665c if (tty->device.firstOpen) ffc06630: 80 1f 00 98 lwz r0,152(r31) ffc06634: 2f 80 00 00 cmpwi cr7,r0,0 ffc06638: 41 9e 00 18 beq- cr7,ffc06650 <== ALWAYS TAKEN (*tty->device.firstOpen)(major, minor, arg); ffc0663c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc06640: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06644: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED ffc06648: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED ffc0664c: 4e 80 04 21 bctrl <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc06650: 80 1f 00 b4 lwz r0,180(r31) ffc06654: 2f 80 00 02 cmpwi cr7,r0,2 ffc06658: 41 9e 00 58 beq- cr7,ffc066b0 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); ffc0665c: 80 7c 27 b8 lwz r3,10168(r28) ffc06660: 48 00 2e 69 bl ffc094c8 return RTEMS_SUCCESSFUL; } ffc06664: 80 01 00 44 lwz r0,68(r1) ffc06668: 7f 63 db 78 mr r3,r27 ffc0666c: 81 81 00 0c lwz r12,12(r1) ffc06670: 7c 08 03 a6 mtlr r0 ffc06674: 82 81 00 10 lwz r20,16(r1) ffc06678: 82 a1 00 14 lwz r21,20(r1) ffc0667c: 7d 80 81 20 mtcrf 8,r12 ffc06680: 82 c1 00 18 lwz r22,24(r1) ffc06684: 82 e1 00 1c lwz r23,28(r1) ffc06688: 83 01 00 20 lwz r24,32(r1) ffc0668c: 83 21 00 24 lwz r25,36(r1) ffc06690: 83 41 00 28 lwz r26,40(r1) ffc06694: 83 61 00 2c lwz r27,44(r1) ffc06698: 83 81 00 30 lwz r28,48(r1) ffc0669c: 83 a1 00 34 lwz r29,52(r1) ffc066a0: 83 c1 00 38 lwz r30,56(r1) ffc066a4: 83 e1 00 3c lwz r31,60(r1) ffc066a8: 38 21 00 40 addi r1,r1,64 ffc066ac: 4e 80 00 20 blr /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start( ffc066b0: 80 7f 00 c4 lwz r3,196(r31) ffc066b4: 3c 80 ff c1 lis r4,-63 ffc066b8: 38 84 82 a0 addi r4,r4,-32096 ffc066bc: 7f e5 fb 78 mr r5,r31 ffc066c0: 48 00 32 39 bl ffc098f8 tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) ffc066c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc066c8: 40 9e 02 d4 bne- cr7,ffc0699c <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_start( ffc066cc: 80 7f 00 c8 lwz r3,200(r31) ffc066d0: 3c 80 ff c1 lis r4,-63 ffc066d4: 38 84 85 94 addi r4,r4,-31340 ffc066d8: 7f e5 fb 78 mr r5,r31 ffc066dc: 48 00 32 1d bl ffc098f8 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) ffc066e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc066e4: 41 9e ff 78 beq+ cr7,ffc0665c <== ALWAYS TAKEN ffc066e8: 48 00 02 b4 b ffc0699c <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); ffc066ec: 38 60 00 01 li r3,1 ffc066f0: 38 80 00 e8 li r4,232 ffc066f4: 4b ff e4 09 bl ffc04afc if (tty == NULL) { ffc066f8: 7c 7f 1b 79 mr. r31,r3 ffc066fc: 41 82 02 68 beq- ffc06964 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; ffc06700: 3f 20 00 00 lis r25,0 ffc06704: 80 19 21 a8 lwz r0,8616(r25) ffc06708: 3b 39 21 a8 addi r25,r25,8616 ffc0670c: 90 1f 00 64 stw r0,100(r31) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); ffc06710: 80 7f 00 64 lwz r3,100(r31) ffc06714: 4b ff ee 09 bl ffc0551c if (tty->rawInBuf.theBuf == NULL) { ffc06718: 2f 83 00 00 cmpwi cr7,r3,0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); ffc0671c: 90 7f 00 58 stw r3,88(r31) ffc06720: 7c 75 1b 78 mr r21,r3 if (tty->rawInBuf.theBuf == NULL) { ffc06724: 41 9e 02 38 beq- cr7,ffc0695c return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; ffc06728: 80 19 00 04 lwz r0,4(r25) ffc0672c: 90 1f 00 88 stw r0,136(r31) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); ffc06730: 80 7f 00 88 lwz r3,136(r31) ffc06734: 4b ff ed e9 bl ffc0551c if (tty->rawOutBuf.theBuf == NULL) { ffc06738: 2f 83 00 00 cmpwi cr7,r3,0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); ffc0673c: 90 7f 00 7c stw r3,124(r31) ffc06740: 7c 74 1b 78 mr r20,r3 if (tty->rawOutBuf.theBuf == NULL) { ffc06744: 41 9e 02 10 beq- cr7,ffc06954 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); ffc06748: 80 79 00 08 lwz r3,8(r25) ffc0674c: 4b ff ed d1 bl ffc0551c if (tty->cbuf == NULL) { ffc06750: 2f 83 00 00 cmpwi cr7,r3,0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); ffc06754: 90 7f 00 1c stw r3,28(r31) if (tty->cbuf == NULL) { ffc06758: 41 9e 01 f4 beq- cr7,ffc0694c <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; ffc0675c: 38 00 00 00 li r0,0 tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; ffc06760: 92 ff 00 00 stw r23,0(r31) return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; ffc06764: 90 1f 00 d4 stw r0,212(r31) tty->tty_snd.sw_arg = NULL; ffc06768: 90 1f 00 d8 stw r0,216(r31) tty->tty_rcv.sw_pfn = NULL; ffc0676c: 90 1f 00 dc stw r0,220(r31) tty->tty_rcv.sw_arg = NULL; ffc06770: 90 1f 00 e0 stw r0,224(r31) tty->tty_rcvwakeup = 0; ffc06774: 90 1f 00 e4 stw r0,228(r31) /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; ffc06778: 90 1f 00 04 stw r0,4(r31) if (rtems_termios_ttyHead != NULL) ffc0677c: 41 92 00 08 beq- cr4,ffc06784 rtems_termios_ttyHead->back = tty; ffc06780: 93 f7 00 04 stw r31,4(r23) rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) ffc06784: 3d 20 00 00 lis r9,0 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; ffc06788: 93 f6 27 c0 stw r31,10176(r22) if (rtems_termios_ttyTail == NULL) ffc0678c: 80 09 27 bc lwz r0,10172(r9) ffc06790: 2f 80 00 00 cmpwi cr7,r0,0 ffc06794: 41 9e 02 68 beq- cr7,ffc069fc /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), ffc06798: 88 79 00 0c lbz r3,12(r25) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc0679c: 38 80 00 01 li r4,1 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; ffc067a0: 93 bf 00 10 stw r29,16(r31) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc067a4: 38 a0 00 54 li r5,84 ffc067a8: 64 63 54 52 oris r3,r3,21586 rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; tty->major = major; ffc067ac: 93 df 00 0c stw r30,12(r31) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc067b0: 60 63 69 00 ori r3,r3,26880 ffc067b4: 38 c0 00 00 li r6,0 ffc067b8: 38 ff 00 14 addi r7,r31,20 ffc067bc: 48 00 28 a9 bl ffc09064 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) ffc067c0: 2f 83 00 00 cmpwi cr7,r3,0 ffc067c4: 40 9e 01 d8 bne- cr7,ffc0699c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'o', c), ffc067c8: 88 79 00 0c lbz r3,12(r25) 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 ( ffc067cc: 38 80 00 01 li r4,1 ffc067d0: 38 a0 00 54 li r5,84 ffc067d4: 64 63 54 52 oris r3,r3,21586 ffc067d8: 60 63 6f 00 ori r3,r3,28416 ffc067dc: 38 c0 00 00 li r6,0 ffc067e0: 38 ff 00 18 addi r7,r31,24 ffc067e4: 48 00 28 81 bl ffc09064 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) ffc067e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc067ec: 40 9e 01 b0 bne- cr7,ffc0699c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'x', c), ffc067f0: 88 79 00 0c lbz r3,12(r25) 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 ( ffc067f4: 38 80 00 00 li r4,0 ffc067f8: 38 a0 00 20 li r5,32 ffc067fc: 64 63 54 52 oris r3,r3,21586 ffc06800: 60 63 78 00 ori r3,r3,30720 ffc06804: 38 c0 00 00 li r6,0 ffc06808: 38 ff 00 8c addi r7,r31,140 ffc0680c: 48 00 28 59 bl ffc09064 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) ffc06810: 7c 60 1b 79 mr. r0,r3 ffc06814: 40 82 01 88 bne- ffc0699c tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; ffc06818: 81 18 00 00 lwz r8,0(r24) ffc0681c: 81 58 00 04 lwz r10,4(r24) ffc06820: 81 78 00 08 lwz r11,8(r24) ffc06824: 81 38 00 0c lwz r9,12(r24) ffc06828: 91 1f 00 98 stw r8,152(r31) ffc0682c: 91 5f 00 9c stw r10,156(r31) ffc06830: 91 7f 00 a0 stw r11,160(r31) ffc06834: 91 3f 00 a4 stw r9,164(r31) ffc06838: 81 38 00 1c lwz r9,28(r24) ffc0683c: 81 18 00 10 lwz r8,16(r24) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc06840: 2f 89 00 02 cmpwi cr7,r9,2 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; ffc06844: 81 58 00 14 lwz r10,20(r24) ffc06848: 81 78 00 18 lwz r11,24(r24) 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; ffc0684c: 90 1f 00 94 stw r0,148(r31) /* * Set callbacks */ tty->device = *callbacks; ffc06850: 91 1f 00 a8 stw r8,168(r31) ffc06854: 91 5f 00 ac stw r10,172(r31) ffc06858: 91 7f 00 b0 stw r11,176(r31) ffc0685c: 91 3f 00 b4 stw r9,180(r31) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc06860: 41 9e 01 40 beq- cr7,ffc069a0 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || ffc06864: 80 1f 00 a0 lwz r0,160(r31) ffc06868: 2f 80 00 00 cmpwi cr7,r0,0 ffc0686c: 41 9e 01 08 beq- cr7,ffc06974 ffc06870: 80 1f 00 b4 lwz r0,180(r31) ffc06874: 2f 80 00 02 cmpwi cr7,r0,2 ffc06878: 41 9e 00 fc beq- cr7,ffc06974 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; ffc0687c: 39 00 25 02 li r8,9474 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc06880: 89 39 00 0c lbz r9,12(r25) } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; ffc06884: 91 1f 00 30 stw r8,48(r31) tty->termios.c_oflag = OPOST | ONLCR | XTABS; ffc06888: 39 00 18 05 li r8,6149 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; ffc0688c: 38 00 00 00 li r0,0 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; ffc06890: 91 1f 00 34 stw r8,52(r31) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; ffc06894: 39 00 08 bd li r8,2237 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc06898: 2f 89 00 7a cmpwi cr7,r9,122 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; ffc0689c: 90 1f 00 b8 stw r0,184(r31) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc068a0: 39 29 00 01 addi r9,r9,1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; ffc068a4: 91 1f 00 38 stw r8,56(r31) tty->termios.c_lflag = ffc068a8: 39 00 00 00 li r8,0 ffc068ac: 61 08 82 3b ori r8,r8,33339 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'; ffc068b0: 98 1f 00 4c stb r0,76(r31) tty->termios.c_cc[VEOL2] = '\000'; ffc068b4: 98 1f 00 51 stb r0,81(r31) tty->termios.c_cc[VSTART] = '\021'; ffc068b8: 38 00 00 11 li r0,17 ffc068bc: 98 1f 00 49 stb r0,73(r31) tty->termios.c_cc[VSTOP] = '\023'; ffc068c0: 38 00 00 13 li r0,19 /* 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; ffc068c4: 81 5f 00 64 lwz r10,100(r31) * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ffc068c8: 91 1f 00 3c stw r8,60(r31) ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; ffc068cc: 39 00 00 03 li r8,3 /* 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; ffc068d0: 55 4a f8 7e rlwinm r10,r10,31,1,31 tty->highwater = tty->rawInBuf.Size * 3/4; ffc068d4: 81 7f 00 64 lwz r11,100(r31) 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'; ffc068d8: 98 1f 00 4a stb r0,74(r31) tty->termios.c_cc[VSUSP] = '\032'; ffc068dc: 38 00 00 1a li r0,26 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; ffc068e0: 1d 6b 00 03 mulli r11,r11,3 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; ffc068e4: 99 1f 00 41 stb r8,65(r31) tty->termios.c_cc[VQUIT] = '\034'; ffc068e8: 39 00 00 1c li r8,28 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; ffc068ec: 98 1f 00 4b stb r0,75(r31) tty->termios.c_cc[VREPRINT] = '\022'; ffc068f0: 38 00 00 12 li r0,18 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; ffc068f4: 55 6b f0 be rlwinm r11,r11,30,2,31 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'; ffc068f8: 99 1f 00 42 stb r8,66(r31) tty->termios.c_cc[VERASE] = '\177'; ffc068fc: 39 00 00 7f li r8,127 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; ffc06900: 98 1f 00 4d stb r0,77(r31) tty->termios.c_cc[VDISCARD] = '\017'; ffc06904: 38 00 00 0f li r0,15 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'; ffc06908: 99 1f 00 43 stb r8,67(r31) tty->termios.c_cc[VKILL] = '\025'; ffc0690c: 39 00 00 15 li r8,21 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; ffc06910: 98 1f 00 4e stb r0,78(r31) tty->termios.c_cc[VWERASE] = '\027'; ffc06914: 38 00 00 17 li r0,23 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'; ffc06918: 99 1f 00 44 stb r8,68(r31) tty->termios.c_cc[VEOF] = '\004'; ffc0691c: 39 00 00 04 li r8,4 tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; ffc06920: 98 1f 00 4f stb r0,79(r31) tty->termios.c_cc[VLNEXT] = '\026'; ffc06924: 38 00 00 16 li r0,22 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'; ffc06928: 99 1f 00 45 stb r8,69(r31) 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'; ffc0692c: 98 1f 00 50 stb r0,80(r31) /* 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; ffc06930: 91 5f 00 bc stw r10,188(r31) tty->highwater = tty->rawInBuf.Size * 3/4; ffc06934: 91 7f 00 c0 stw r11,192(r31) /* * Bump name characer */ if (c++ == 'z') ffc06938: 99 39 00 0c stb r9,12(r25) ffc0693c: 40 9e fc d8 bne+ cr7,ffc06614 c = 'a'; ffc06940: 38 00 00 61 li r0,97 ffc06944: 98 19 00 0c stb r0,12(r25) ffc06948: 4b ff fc cc b ffc06614 /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); ffc0694c: 7e 83 a3 78 mr r3,r20 <== NOT EXECUTED ffc06950: 4b ff e7 b1 bl ffc05100 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); ffc06954: 7e a3 ab 78 mr r3,r21 ffc06958: 4b ff e7 a9 bl ffc05100 free(tty); ffc0695c: 7f e3 fb 78 mr r3,r31 ffc06960: 4b ff e7 a1 bl ffc05100 rtems_semaphore_release (rtems_termios_ttyMutex); ffc06964: 80 7c 27 b8 lwz r3,10168(r28) return RTEMS_NO_MEMORY; ffc06968: 3b 60 00 1a li r27,26 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); ffc0696c: 48 00 2b 5d bl ffc094c8 return RTEMS_NO_MEMORY; ffc06970: 4b ff fc f4 b ffc06664 } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'r', c), ffc06974: 88 79 00 0c lbz r3,12(r25) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( ffc06978: 38 80 00 00 li r4,0 ffc0697c: 38 a0 00 24 li r5,36 ffc06980: 64 63 54 52 oris r3,r3,21586 ffc06984: 60 63 72 00 ori r3,r3,29184 ffc06988: 38 c0 00 00 li r6,0 ffc0698c: 38 ff 00 68 addi r7,r31,104 ffc06990: 48 00 26 d5 bl ffc09064 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) ffc06994: 2f 83 00 00 cmpwi cr7,r3,0 ffc06998: 41 9e fe e4 beq+ cr7,ffc0687c <== 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); ffc0699c: 48 00 33 05 bl ffc09ca0 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( rtems_build_name ('T', 'x', 'T', c), ffc069a0: 88 79 00 0c lbz r3,12(r25) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( ffc069a4: 38 80 00 0a li r4,10 ffc069a8: 38 a0 04 00 li r5,1024 ffc069ac: 64 63 54 78 oris r3,r3,21624 ffc069b0: 60 63 54 00 ori r3,r3,21504 ffc069b4: 38 c0 05 00 li r6,1280 ffc069b8: 38 e0 00 00 li r7,0 ffc069bc: 39 1f 00 c8 addi r8,r31,200 ffc069c0: 48 00 2b e9 bl ffc095a8 TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) ffc069c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc069c8: 40 be ff d4 bne- cr7,ffc0699c <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_create ( rtems_build_name ('R', 'x', 'T', c), ffc069cc: 88 79 00 0c lbz r3,12(r25) RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_task_create ( ffc069d0: 38 80 00 09 li r4,9 ffc069d4: 38 a0 04 00 li r5,1024 ffc069d8: 64 63 52 78 oris r3,r3,21112 ffc069dc: 60 63 54 00 ori r3,r3,21504 ffc069e0: 38 c0 05 00 li r6,1280 ffc069e4: 38 e0 00 00 li r7,0 ffc069e8: 39 1f 00 c4 addi r8,r31,196 ffc069ec: 48 00 2b bd bl ffc095a8 TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) ffc069f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc069f4: 41 9e fe 70 beq+ cr7,ffc06864 <== ALWAYS TAKEN ffc069f8: 4b ff ff a4 b ffc0699c <== 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; ffc069fc: 93 e9 27 bc stw r31,10172(r9) ffc06a00: 4b ff fd 98 b ffc06798 =============================================================================== ffc07064 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { ffc07064: 94 21 ff d0 stwu r1,-48(r1) ffc07068: 7c 08 02 a6 mflr r0 ffc0706c: 90 01 00 34 stw r0,52(r1) const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { ffc07070: 80 05 00 b4 lwz r0,180(r5) * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { ffc07074: 93 41 00 18 stw r26,24(r1) ffc07078: 7c 7a 1b 78 mr r26,r3 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { ffc0707c: 2f 80 00 00 cmpwi cr7,r0,0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { ffc07080: 93 e1 00 2c stw r31,44(r1) ffc07084: 7c bf 2b 78 mr r31,r5 ffc07088: 93 21 00 14 stw r25,20(r1) ffc0708c: 93 61 00 1c stw r27,28(r1) ffc07090: 93 81 00 20 stw r28,32(r1) ffc07094: 93 a1 00 24 stw r29,36(r1) ffc07098: 93 c1 00 28 stw r30,40(r1) ffc0709c: 90 81 00 08 stw r4,8(r1) const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { ffc070a0: 41 9e 01 2c beq- cr7,ffc071cc (*tty->device.write)(tty->minor, buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { ffc070a4: 80 01 00 08 lwz r0,8(r1) if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, buf, len); return; } newHead = tty->rawOutBuf.Head; ffc070a8: 83 65 00 80 lwz r27,128(r5) while (len) { ffc070ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc070b0: 41 9e 00 cc beq- cr7,ffc0717c <== NEVER TAKEN /* * Send characters to device-specific code */ void rtems_termios_puts ( ffc070b4: 3b 43 ff ff addi r26,r3,-1 * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; ffc070b8: 3b 80 00 02 li r28,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; ffc070bc: 3b 20 00 01 li r25,1 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; ffc070c0: 80 1f 00 88 lwz r0,136(r31) ffc070c4: 3b 7b 00 01 addi r27,r27,1 ffc070c8: 7d 3b 03 96 divwu r9,r27,r0 ffc070cc: 7c 09 01 d6 mullw r0,r9,r0 ffc070d0: 7f 60 d8 50 subf r27,r0,r27 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc070d4: 7f c0 00 a6 mfmsr r30 ffc070d8: 7c 10 42 a6 mfsprg r0,0 ffc070dc: 7f c0 00 78 andc r0,r30,r0 ffc070e0: 7c 00 01 24 mtmsr r0 rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { ffc070e4: 83 bf 00 84 lwz r29,132(r31) ffc070e8: 7f 9d d8 00 cmpw cr7,r29,r27 ffc070ec: 40 9e 00 40 bne- cr7,ffc0712c tty->rawOutBufState = rob_wait; ffc070f0: 93 9f 00 94 stw r28,148(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc070f4: 7f c0 01 24 mtmsr r30 rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( ffc070f8: 80 7f 00 8c lwz r3,140(r31) ffc070fc: 38 80 00 00 li r4,0 ffc07100: 38 a0 00 00 li r5,0 ffc07104: 48 00 22 39 bl ffc0933c tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc07108: 2f 83 00 00 cmpwi cr7,r3,0 ffc0710c: 40 9e 01 04 bne- cr7,ffc07210 <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc07110: 7f c0 00 a6 mfmsr r30 ffc07114: 7c 10 42 a6 mfsprg r0,0 ffc07118: 7f c0 00 78 andc r0,r30,r0 ffc0711c: 7c 00 01 24 mtmsr r0 * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { ffc07120: 80 1f 00 84 lwz r0,132(r31) ffc07124: 7f 80 e8 00 cmpw cr7,r0,r29 ffc07128: 41 9e ff c8 beq+ cr7,ffc070f0 <== 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++; ffc0712c: 80 1f 00 80 lwz r0,128(r31) ffc07130: 8d 7a 00 01 lbzu r11,1(r26) ffc07134: 81 3f 00 7c lwz r9,124(r31) ffc07138: 7d 69 01 ae stbx r11,r9,r0 tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { ffc0713c: 80 1f 00 94 lwz r0,148(r31) if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; ffc07140: 93 7f 00 80 stw r27,128(r31) if (tty->rawOutBufState == rob_idle) { ffc07144: 2f 80 00 00 cmpwi cr7,r0,0 ffc07148: 40 9e 00 20 bne- cr7,ffc07168 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { ffc0714c: 80 1f 00 b8 lwz r0,184(r31) ffc07150: 70 09 00 10 andi. r9,r0,16 ffc07154: 41 82 00 54 beq- ffc071a8 <== 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; ffc07158: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc0715c: 60 00 00 20 ori r0,r0,32 <== NOT EXECUTED ffc07160: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; ffc07164: 93 3f 00 94 stw r25,148(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc07168: 7f c0 01 24 mtmsr r30 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { ffc0716c: 80 01 00 08 lwz r0,8(r1) ffc07170: 35 20 ff ff addic. r9,r0,-1 ffc07174: 91 21 00 08 stw r9,8(r1) ffc07178: 40 82 ff 48 bne+ ffc070c0 tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } ffc0717c: 80 01 00 34 lwz r0,52(r1) ffc07180: 83 21 00 14 lwz r25,20(r1) ffc07184: 7c 08 03 a6 mtlr r0 ffc07188: 83 41 00 18 lwz r26,24(r1) ffc0718c: 83 61 00 1c lwz r27,28(r1) ffc07190: 83 81 00 20 lwz r28,32(r1) ffc07194: 83 a1 00 24 lwz r29,36(r1) ffc07198: 83 c1 00 28 lwz r30,40(r1) ffc0719c: 83 e1 00 2c lwz r31,44(r1) ffc071a0: 38 21 00 30 addi r1,r1,48 ffc071a4: 4e 80 00 20 blr tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); ffc071a8: 81 3f 00 84 lwz r9,132(r31) 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, ffc071ac: 38 a0 00 01 li r5,1 ffc071b0: 80 9f 00 7c lwz r4,124(r31) ffc071b4: 80 1f 00 a4 lwz r0,164(r31) ffc071b8: 80 7f 00 10 lwz r3,16(r31) ffc071bc: 7c 84 4a 14 add r4,r4,r9 ffc071c0: 7c 09 03 a6 mtctr r0 ffc071c4: 4e 80 04 21 bctrl ffc071c8: 4b ff ff 9c b ffc07164 unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, buf, len); ffc071cc: 80 05 00 a4 lwz r0,164(r5) ffc071d0: 7f 44 d3 78 mr r4,r26 ffc071d4: 80 65 00 10 lwz r3,16(r5) ffc071d8: 7c 09 03 a6 mtctr r0 ffc071dc: 80 a1 00 08 lwz r5,8(r1) ffc071e0: 4e 80 04 21 bctrl tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } ffc071e4: 80 01 00 34 lwz r0,52(r1) ffc071e8: 83 21 00 14 lwz r25,20(r1) ffc071ec: 7c 08 03 a6 mtlr r0 ffc071f0: 83 41 00 18 lwz r26,24(r1) ffc071f4: 83 61 00 1c lwz r27,28(r1) ffc071f8: 83 81 00 20 lwz r28,32(r1) ffc071fc: 83 a1 00 24 lwz r29,36(r1) ffc07200: 83 c1 00 28 lwz r30,40(r1) ffc07204: 83 e1 00 2c lwz r31,44(r1) ffc07208: 38 21 00 30 addi r1,r1,48 ffc0720c: 4e 80 00 20 blr 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); ffc07210: 48 00 2a 91 bl ffc09ca0 <== NOT EXECUTED =============================================================================== ffc07a7c : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07a7c: 94 21 ff d0 stwu r1,-48(r1) ffc07a80: 7c 08 02 a6 mflr r0 struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07a84: 38 80 00 00 li r4,0 return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07a88: 90 01 00 34 stw r0,52(r1) struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07a8c: 38 a0 00 00 li r5,0 rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc07a90: 81 23 00 00 lwz r9,0(r3) return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07a94: 93 e1 00 2c stw r31,44(r1) rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc07a98: 83 e9 00 38 lwz r31,56(r9) return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07a9c: 93 41 00 18 stw r26,24(r1) ffc07aa0: 7c 7a 1b 78 mr r26,r3 struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07aa4: 80 7f 00 14 lwz r3,20(r31) return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07aa8: 93 01 00 10 stw r24,16(r1) ffc07aac: 93 21 00 14 stw r25,20(r1) ffc07ab0: 93 61 00 1c stw r27,28(r1) ffc07ab4: 92 c1 00 08 stw r22,8(r1) ffc07ab8: 92 e1 00 0c stw r23,12(r1) ffc07abc: 93 81 00 20 stw r28,32(r1) ffc07ac0: 93 a1 00 24 stw r29,36(r1) ffc07ac4: 93 c1 00 28 stw r30,40(r1) rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; ffc07ac8: 83 7a 00 14 lwz r27,20(r26) char *buffer = args->buffer; ffc07acc: 83 1a 00 10 lwz r24,16(r26) rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07ad0: 48 00 18 6d bl ffc0933c if (sc != RTEMS_SUCCESSFUL) ffc07ad4: 7c 79 1b 79 mr. r25,r3 ffc07ad8: 40 82 00 48 bne- ffc07b20 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { ffc07adc: 80 1f 00 cc lwz r0,204(r31) ffc07ae0: 3d 20 00 00 lis r9,0 ffc07ae4: 39 29 28 78 addi r9,r9,10360 ffc07ae8: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc07aec: 7d 29 02 14 add r9,r9,r0 ffc07af0: 80 09 00 08 lwz r0,8(r9) ffc07af4: 2f 80 00 00 cmpwi cr7,r0,0 ffc07af8: 41 9e 00 64 beq- cr7,ffc07b5c sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); ffc07afc: 7c 09 03 a6 mtctr r0 ffc07b00: 7f e3 fb 78 mr r3,r31 ffc07b04: 7f 44 d3 78 mr r4,r26 ffc07b08: 4e 80 04 21 bctrl tty->tty_rcvwakeup = 0; ffc07b0c: 38 00 00 00 li r0,0 sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); ffc07b10: 7c 79 1b 78 mr r25,r3 tty->tty_rcvwakeup = 0; ffc07b14: 90 1f 00 e4 stw r0,228(r31) rtems_semaphore_release (tty->isem); ffc07b18: 80 7f 00 14 lwz r3,20(r31) ffc07b1c: 48 00 19 ad bl ffc094c8 } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } ffc07b20: 80 01 00 34 lwz r0,52(r1) ffc07b24: 7f 23 cb 78 mr r3,r25 ffc07b28: 82 c1 00 08 lwz r22,8(r1) ffc07b2c: 7c 08 03 a6 mtlr r0 ffc07b30: 82 e1 00 0c lwz r23,12(r1) ffc07b34: 83 01 00 10 lwz r24,16(r1) ffc07b38: 83 21 00 14 lwz r25,20(r1) ffc07b3c: 83 41 00 18 lwz r26,24(r1) ffc07b40: 83 61 00 1c lwz r27,28(r1) ffc07b44: 83 81 00 20 lwz r28,32(r1) ffc07b48: 83 a1 00 24 lwz r29,36(r1) ffc07b4c: 83 c1 00 28 lwz r30,40(r1) ffc07b50: 83 e1 00 2c lwz r31,44(r1) ffc07b54: 38 21 00 30 addi r1,r1,48 ffc07b58: 4e 80 00 20 blr tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { ffc07b5c: 81 3f 00 24 lwz r9,36(r31) ffc07b60: 80 1f 00 20 lwz r0,32(r31) ffc07b64: 7f 89 00 00 cmpw cr7,r9,r0 ffc07b68: 41 9e 00 a8 beq- cr7,ffc07c10 <== ALWAYS TAKEN sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { ffc07b6c: 2f 9b 00 00 cmpwi cr7,r27,0 ffc07b70: 41 9e 00 48 beq- cr7,ffc07bb8 <== NEVER TAKEN ffc07b74: 81 3f 00 24 lwz r9,36(r31) ffc07b78: 80 1f 00 20 lwz r0,32(r31) ffc07b7c: 7f 89 00 00 cmpw cr7,r9,r0 ffc07b80: 40 9c 00 38 bge- cr7,ffc07bb8 <== NEVER TAKEN ffc07b84: 7f 09 c0 50 subf r24,r9,r24 ffc07b88: 7f 69 03 a6 mtctr r27 ffc07b8c: 48 00 00 10 b ffc07b9c ffc07b90: 80 1f 00 20 lwz r0,32(r31) ffc07b94: 7f 80 48 00 cmpw cr7,r0,r9 ffc07b98: 40 9d 00 20 ble- cr7,ffc07bb8 *buffer++ = tty->cbuf[tty->cindex++]; ffc07b9c: 81 7f 00 1c lwz r11,28(r31) count--; ffc07ba0: 3b 7b ff ff addi r27,r27,-1 if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; ffc07ba4: 7c 0b 48 ae lbzx r0,r11,r9 ffc07ba8: 7c 18 49 ae stbx r0,r24,r9 ffc07bac: 39 29 00 01 addi r9,r9,1 ffc07bb0: 91 3f 00 24 stw r9,36(r31) sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { ffc07bb4: 42 00 ff dc bdnz+ ffc07b90 *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; ffc07bb8: 80 1a 00 14 lwz r0,20(r26) tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); ffc07bbc: 80 7f 00 14 lwz r3,20(r31) } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; ffc07bc0: 7f 7b 00 50 subf r27,r27,r0 tty->tty_rcvwakeup = 0; ffc07bc4: 38 00 00 00 li r0,0 } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; ffc07bc8: 93 7a 00 1c stw r27,28(r26) tty->tty_rcvwakeup = 0; ffc07bcc: 90 1f 00 e4 stw r0,228(r31) rtems_semaphore_release (tty->isem); ffc07bd0: 48 00 18 f9 bl ffc094c8 return sc; } ffc07bd4: 80 01 00 34 lwz r0,52(r1) ffc07bd8: 7f 23 cb 78 mr r3,r25 ffc07bdc: 82 c1 00 08 lwz r22,8(r1) ffc07be0: 7c 08 03 a6 mtlr r0 ffc07be4: 82 e1 00 0c lwz r23,12(r1) ffc07be8: 83 01 00 10 lwz r24,16(r1) ffc07bec: 83 21 00 14 lwz r25,20(r1) ffc07bf0: 83 41 00 18 lwz r26,24(r1) ffc07bf4: 83 61 00 1c lwz r27,28(r1) ffc07bf8: 83 81 00 20 lwz r28,32(r1) ffc07bfc: 83 a1 00 24 lwz r29,36(r1) ffc07c00: 83 c1 00 28 lwz r30,40(r1) ffc07c04: 83 e1 00 2c lwz r31,44(r1) ffc07c08: 38 21 00 30 addi r1,r1,48 ffc07c0c: 4e 80 00 20 blr } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && ffc07c10: 80 1f 00 a0 lwz r0,160(r31) return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; ffc07c14: 81 3f 00 28 lwz r9,40(r31) if (tty->device.pollRead != NULL && ffc07c18: 2f 80 00 00 cmpwi cr7,r0,0 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; ffc07c1c: 93 3f 00 20 stw r25,32(r31) ffc07c20: 93 3f 00 24 stw r25,36(r31) tty->read_start_column = tty->column; ffc07c24: 91 3f 00 2c stw r9,44(r31) if (tty->device.pollRead != NULL && ffc07c28: 41 9e 00 10 beq- cr7,ffc07c38 ffc07c2c: 81 3f 00 b4 lwz r9,180(r31) ffc07c30: 2f 89 00 00 cmpwi cr7,r9,0 ffc07c34: 41 9e 01 b4 beq- cr7,ffc07de8 * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; ffc07c38: 83 bf 00 74 lwz r29,116(r31) rtems_status_code sc; int wait = (int)1; ffc07c3c: 3b c0 00 01 li r30,1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { ffc07c40: 3e e0 00 00 lis r23,0 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)( ffc07c44: 3a df 00 49 addi r22,r31,73 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07c48: 81 3f 00 5c lwz r9,92(r31) ffc07c4c: 80 1f 00 60 lwz r0,96(r31) ffc07c50: 7f 89 00 00 cmpw cr7,r9,r0 ffc07c54: 41 9e 01 3c beq- cr7,ffc07d90 (tty->ccount < (CBUFSIZE-1))) { ffc07c58: 3b 97 21 a8 addi r28,r23,8616 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07c5c: 80 1f 00 20 lwz r0,32(r31) (tty->ccount < (CBUFSIZE-1))) { ffc07c60: 81 3c 00 08 lwz r9,8(r28) ffc07c64: 39 29 ff ff addi r9,r9,-1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07c68: 7f 89 00 00 cmpw cr7,r9,r0 ffc07c6c: 41 bd 00 40 bgt+ cr7,ffc07cac <== ALWAYS TAKEN ffc07c70: 48 00 01 20 b ffc07d90 <== NOT EXECUTED } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) ffc07c74: 4b ff fc 59 bl ffc078cc while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07c78: 81 3f 00 5c lwz r9,92(r31) ffc07c7c: 80 1f 00 60 lwz r0,96(r31) } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; ffc07c80: 30 63 ff ff addic r3,r3,-1 ffc07c84: 7c 63 19 10 subfe r3,r3,r3 } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; ffc07c88: 83 bf 00 70 lwz r29,112(r31) while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07c8c: 7f 89 00 00 cmpw cr7,r9,r0 } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; ffc07c90: 7f de 18 38 and r30,r30,r3 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07c94: 41 9e 00 fc beq- cr7,ffc07d90 (tty->ccount < (CBUFSIZE-1))) { ffc07c98: 81 7c 00 08 lwz r11,8(r28) while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07c9c: 81 3f 00 20 lwz r9,32(r31) (tty->ccount < (CBUFSIZE-1))) { ffc07ca0: 38 0b ff ff addi r0,r11,-1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07ca4: 7f 89 00 00 cmpw cr7,r9,r0 ffc07ca8: 40 9c 00 e8 bge- cr7,ffc07d90 <== NEVER TAKEN (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; ffc07cac: 81 3f 00 5c lwz r9,92(r31) ffc07cb0: 81 7f 00 64 lwz r11,100(r31) ffc07cb4: 39 29 00 01 addi r9,r9,1 c = tty->rawInBuf.theBuf[newHead]; ffc07cb8: 81 1f 00 58 lwz r8,88(r31) 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; ffc07cbc: 7c 09 5b 96 divwu r0,r9,r11 c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) ffc07cc0: 81 5f 00 bc lwz r10,188(r31) 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; ffc07cc4: 7c 00 59 d6 mullw r0,r0,r11 ffc07cc8: 7c 00 48 50 subf r0,r0,r9 c = tty->rawInBuf.theBuf[newHead]; ffc07ccc: 7f a8 00 ae lbzx r29,r8,r0 tty->rawInBuf.Head = newHead; ffc07cd0: 90 1f 00 5c stw r0,92(r31) if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) ffc07cd4: 81 7f 00 60 lwz r11,96(r31) ffc07cd8: 81 1f 00 64 lwz r8,100(r31) % tty->rawInBuf.Size) ffc07cdc: 81 3f 00 64 lwz r9,100(r31) 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) ffc07ce0: 7d 68 5a 14 add r11,r8,r11 ffc07ce4: 7c 00 58 50 subf r0,r0,r11 % tty->rawInBuf.Size) ffc07ce8: 7d 60 4b 96 divwu r11,r0,r9 ffc07cec: 7d 2b 49 d6 mullw r9,r11,r9 ffc07cf0: 7c 09 00 50 subf r0,r9,r0 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) ffc07cf4: 7f 80 50 40 cmplw cr7,r0,r10 ffc07cf8: 40 9c 00 50 bge- cr7,ffc07d48 <== NEVER TAKEN % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; ffc07cfc: 80 1f 00 b8 lwz r0,184(r31) ffc07d00: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc07d04: 90 1f 00 b8 stw r0,184(r31) /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) ffc07d08: 80 1f 00 b8 lwz r0,184(r31) ffc07d0c: 70 00 02 02 andi. r0,r0,514 ffc07d10: 2f 80 02 02 cmpwi cr7,r0,514 ffc07d14: 41 9e 00 a0 beq- cr7,ffc07db4 <== 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) { ffc07d18: 80 1f 00 b8 lwz r0,184(r31) ffc07d1c: 70 09 01 00 andi. r9,r0,256 ffc07d20: 41 82 00 28 beq- ffc07d48 <== ALWAYS TAKEN tty->flow_ctrl &= ~FL_IRTSOFF; /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { ffc07d24: 80 1f 00 b0 lwz r0,176(r31) <== 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; ffc07d28: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { ffc07d2c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; ffc07d30: 55 29 07 b8 rlwinm r9,r9,0,30,28 <== NOT EXECUTED ffc07d34: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { ffc07d38: 41 9e 00 10 beq- cr7,ffc07d48 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); ffc07d3c: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc07d40: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07d44: 4e 80 04 21 bctrl <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { ffc07d48: 80 1f 00 3c lwz r0,60(r31) if (siproc (c, tty)) ffc07d4c: 7f a3 eb 78 mr r3,r29 ffc07d50: 7f e4 fb 78 mr r4,r31 } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { ffc07d54: 70 09 00 02 andi. r9,r0,2 ffc07d58: 40 a2 ff 1c bne- ffc07c74 <== ALWAYS TAKEN if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); ffc07d5c: 4b ff fb 71 bl ffc078cc <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) ffc07d60: 88 1f 00 47 lbz r0,71(r31) <== NOT EXECUTED ffc07d64: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; ffc07d68: 83 bf 00 70 lwz r29,112(r31) <== NOT EXECUTED if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; ffc07d6c: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07d70: 81 3f 00 5c lwz r9,92(r31) <== NOT EXECUTED if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; ffc07d74: 7c 00 00 26 mfcr r0 <== NOT EXECUTED ffc07d78: 54 00 ef fe rlwinm r0,r0,29,31,31 <== NOT EXECUTED ffc07d7c: 7c 00 00 d0 neg r0,r0 <== NOT EXECUTED ffc07d80: 7f de 00 38 and r30,r30,r0 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07d84: 80 1f 00 60 lwz r0,96(r31) <== NOT EXECUTED ffc07d88: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc07d8c: 40 9e ff 0c bne+ cr7,ffc07c98 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { ffc07d90: 2f 9e 00 00 cmpwi cr7,r30,0 ffc07d94: 41 9e fd d8 beq+ cr7,ffc07b6c sc = rtems_semaphore_obtain( ffc07d98: 80 7f 00 68 lwz r3,104(r31) ffc07d9c: 7f a5 eb 78 mr r5,r29 ffc07da0: 80 9f 00 6c lwz r4,108(r31) ffc07da4: 48 00 15 99 bl ffc0933c tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) ffc07da8: 2f 83 00 00 cmpwi cr7,r3,0 ffc07dac: 41 9e fe 9c beq+ cr7,ffc07c48 <== ALWAYS TAKEN ffc07db0: 4b ff fd bc b ffc07b6c <== 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) ffc07db4: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED ffc07db8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07dbc: 41 9e 00 10 beq- cr7,ffc07dcc <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { ffc07dc0: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07dc4: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc07dc8: 41 a2 ff 50 beq- ffc07d18 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( ffc07dcc: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc07dd0: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED ffc07dd4: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc07dd8: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc07ddc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07de0: 4e 80 04 21 bctrl <== NOT EXECUTED ffc07de4: 4b ff ff 64 b ffc07d48 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { ffc07de8: 81 3f 00 3c lwz r9,60(r31) ffc07dec: 71 2b 00 02 andi. r11,r9,2 ffc07df0: 41 82 00 34 beq- ffc07e24 for (;;) { n = (*tty->device.pollRead)(tty->minor); ffc07df4: 80 7f 00 10 lwz r3,16(r31) ffc07df8: 7c 09 03 a6 mtctr r0 ffc07dfc: 4e 80 04 21 bctrl if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) ffc07e00: 7f e4 fb 78 mr r4,r31 int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { ffc07e04: 2c 03 00 00 cmpwi r3,0 rtems_task_wake_after (1); } else { if (siproc (n, tty)) ffc07e08: 54 63 06 3e clrlwi r3,r3,24 int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { ffc07e0c: 41 80 00 bc blt- ffc07ec8 rtems_task_wake_after (1); } else { if (siproc (n, tty)) ffc07e10: 4b ff fa bd bl ffc078cc ffc07e14: 2f 83 00 00 cmpwi cr7,r3,0 ffc07e18: 40 be fd 54 bne- cr7,ffc07b6c static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { ffc07e1c: 80 1f 00 a0 lwz r0,160(r31) ffc07e20: 4b ff ff d4 b ffc07df4 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); ffc07e24: 48 00 0d 31 bl ffc08b54 ffc07e28: 7c 7e 1b 78 mr r30,r3 for (;;) { n = (*tty->device.pollRead)(tty->minor); ffc07e2c: 80 1f 00 a0 lwz r0,160(r31) ffc07e30: 80 7f 00 10 lwz r3,16(r31) ffc07e34: 7c 09 03 a6 mtctr r0 ffc07e38: 4e 80 04 21 bctrl if (n < 0) { ffc07e3c: 2c 03 00 00 cmpwi r3,0 ffc07e40: 41 80 00 38 blt- ffc07e78 break; } } rtems_task_wake_after (1); } else { siproc (n, tty); ffc07e44: 54 63 06 3e clrlwi r3,r3,24 ffc07e48: 7f e4 fb 78 mr r4,r31 ffc07e4c: 4b ff fa 81 bl ffc078cc if (tty->ccount >= tty->termios.c_cc[VMIN]) ffc07e50: 88 1f 00 47 lbz r0,71(r31) ffc07e54: 81 3f 00 20 lwz r9,32(r31) ffc07e58: 7f 89 00 00 cmpw cr7,r9,r0 ffc07e5c: 40 bc fd 10 bge- cr7,ffc07b6c break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) ffc07e60: 2f 80 00 00 cmpwi cr7,r0,0 ffc07e64: 41 be ff c8 beq- cr7,ffc07e2c <== NEVER TAKEN ffc07e68: 88 1f 00 46 lbz r0,70(r31) ffc07e6c: 2f 80 00 00 cmpwi cr7,r0,0 ffc07e70: 41 9e ff bc beq+ cr7,ffc07e2c <== NEVER TAKEN ffc07e74: 4b ff ff b0 b ffc07e24 then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { ffc07e78: 88 1f 00 47 lbz r0,71(r31) ffc07e7c: 2f 80 00 00 cmpwi cr7,r0,0 if (tty->termios.c_cc[VTIME] && tty->ccount) { ffc07e80: 88 1f 00 46 lbz r0,70(r31) then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { ffc07e84: 41 9e 00 24 beq- cr7,ffc07ea8 <== NEVER TAKEN if (tty->termios.c_cc[VTIME] && tty->ccount) { ffc07e88: 2f 80 00 00 cmpwi cr7,r0,0 ffc07e8c: 41 9e 00 10 beq- cr7,ffc07e9c <== NEVER TAKEN ffc07e90: 80 1f 00 20 lwz r0,32(r31) ffc07e94: 2f 80 00 00 cmpwi cr7,r0,0 ffc07e98: 40 9e 00 18 bne- cr7,ffc07eb0 now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); ffc07e9c: 38 60 00 01 li r3,1 ffc07ea0: 48 00 1b 75 bl ffc09a14 ffc07ea4: 4b ff ff 88 b ffc07e2c if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) ffc07ea8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07eac: 41 be fc c0 beq- cr7,ffc07b6c <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); ffc07eb0: 48 00 0c a5 bl ffc08b54 if ((now - then) > tty->vtimeTicks) { ffc07eb4: 80 1f 00 54 lwz r0,84(r31) ffc07eb8: 7c 7e 18 50 subf r3,r30,r3 ffc07ebc: 7f 83 00 40 cmplw cr7,r3,r0 ffc07ec0: 40 9d ff dc ble+ cr7,ffc07e9c ffc07ec4: 4b ff fc a8 b ffc07b6c if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); ffc07ec8: 38 60 00 01 li r3,1 ffc07ecc: 48 00 1b 49 bl ffc09a14 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { ffc07ed0: 80 1f 00 a0 lwz r0,160(r31) ffc07ed4: 4b ff ff 20 b ffc07df4 =============================================================================== ffc08338 : * 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) { ffc08338: 94 21 ff e8 stwu r1,-24(r1) ffc0833c: 7c 08 02 a6 mflr r0 ffc08340: 90 01 00 1c stw r0,28(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)) ffc08344: 80 03 00 b8 lwz r0,184(r3) * 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) { ffc08348: 93 e1 00 14 stw r31,20(r1) ffc0834c: 7c 7f 1b 78 mr r31,r3 int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) ffc08350: 70 00 04 03 andi. r0,r0,1027 * 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) { ffc08354: 93 a1 00 0c stw r29,12(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)) ffc08358: 2f 80 04 01 cmpwi cr7,r0,1025 * 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) { ffc0835c: 93 c1 00 10 stw r30,16(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)) ffc08360: 41 9e 01 5c beq- cr7,ffc084bc <== NEVER TAKEN tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { ffc08364: 80 03 00 b8 lwz r0,184(r3) ffc08368: 54 00 07 be clrlwi r0,r0,30 ffc0836c: 2f 80 00 02 cmpwi cr7,r0,2 ffc08370: 41 9e 01 b4 beq- cr7,ffc08524 <== NEVER TAKEN tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { ffc08374: 81 23 00 80 lwz r9,128(r3) ffc08378: 80 03 00 84 lwz r0,132(r3) ffc0837c: 7f 89 00 00 cmpw cr7,r9,r0 ffc08380: 41 9e 00 d8 beq- cr7,ffc08458 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc08384: 7c 00 00 a6 mfmsr r0 ffc08388: 7d 30 42 a6 mfsprg r9,0 ffc0838c: 7c 09 48 78 andc r9,r0,r9 ffc08390: 7d 20 01 24 mtmsr r9 return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; ffc08394: 39 20 00 00 li r9,0 } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; ffc08398: 83 c3 00 90 lwz r30,144(r3) tty->t_dqlen = 0; ffc0839c: 91 23 00 90 stw r9,144(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc083a0: 7c 00 01 24 mtmsr r0 rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; ffc083a4: 80 03 00 84 lwz r0,132(r3) ffc083a8: 81 23 00 88 lwz r9,136(r3) ffc083ac: 7c 1e 02 14 add r0,r30,r0 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { ffc083b0: 81 63 00 94 lwz r11,148(r3) rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; ffc083b4: 7f c0 4b 96 divwu r30,r0,r9 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { ffc083b8: 2f 8b 00 02 cmpwi cr7,r11,2 rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; ffc083bc: 7f de 49 d6 mullw r30,r30,r9 ffc083c0: 7f de 00 50 subf r30,r30,r0 tty->rawOutBuf.Tail = newTail; ffc083c4: 93 c3 00 84 stw r30,132(r3) if (tty->rawOutBufState == rob_wait) { ffc083c8: 41 9e 00 e8 beq- cr7,ffc084b0 * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { ffc083cc: 80 1f 00 80 lwz r0,128(r31) ffc083d0: 7f 80 f0 00 cmpw cr7,r0,r30 ffc083d4: 41 9e 00 a0 beq- cr7,ffc08474 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)) ffc083d8: 80 1f 00 b8 lwz r0,184(r31) ffc083dc: 70 00 02 10 andi. r0,r0,528 ffc083e0: 2f 80 02 10 cmpwi cr7,r0,528 ffc083e4: 41 9e 01 7c beq- cr7,ffc08560 <== NEVER TAKEN nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) ffc083e8: 80 1f 00 80 lwz r0,128(r31) ffc083ec: 7f 9e 00 40 cmplw cr7,r30,r0 ffc083f0: 41 9d 00 b4 bgt- cr7,ffc084a4 nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; ffc083f4: 83 bf 00 80 lwz r29,128(r31) ffc083f8: 7f be e8 50 subf r29,r30,r29 /* 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)) { ffc083fc: 80 1f 00 b8 lwz r0,184(r31) ffc08400: 7f a5 eb 78 mr r5,r29 ffc08404: 70 09 06 00 andi. r9,r0,1536 ffc08408: 41 82 00 0c beq- ffc08414 ffc0840c: 38 a0 00 01 li r5,1 nToSend = 1; ffc08410: 3b a0 00 01 li r29,1 } tty->rawOutBufState = rob_busy; /*apm*/ ffc08414: 38 00 00 01 li r0,1 (*tty->device.write)( ffc08418: 80 9f 00 7c lwz r4,124(r31) /* 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*/ ffc0841c: 90 1f 00 94 stw r0,148(r31) (*tty->device.write)( ffc08420: 7c 84 f2 14 add r4,r4,r30 ffc08424: 80 1f 00 a4 lwz r0,164(r31) ffc08428: 80 7f 00 10 lwz r3,16(r31) ffc0842c: 7c 09 03 a6 mtctr r0 ffc08430: 4e 80 04 21 bctrl tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ ffc08434: 93 df 00 84 stw r30,132(r31) } return nToSend; } ffc08438: 80 01 00 1c lwz r0,28(r1) ffc0843c: 7f a3 eb 78 mr r3,r29 ffc08440: 83 c1 00 10 lwz r30,16(r1) ffc08444: 7c 08 03 a6 mtlr r0 ffc08448: 83 a1 00 0c lwz r29,12(r1) ffc0844c: 83 e1 00 14 lwz r31,20(r1) ffc08450: 38 21 00 18 addi r1,r1,24 ffc08454: 4e 80 00 20 blr } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { ffc08458: 80 03 00 94 lwz r0,148(r3) /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; ffc0845c: 3b a0 00 00 li r29,0 } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { ffc08460: 2f 80 00 02 cmpwi cr7,r0,2 ffc08464: 40 9e ff d4 bne+ cr7,ffc08438 <== ALWAYS TAKEN /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); ffc08468: 80 63 00 8c lwz r3,140(r3) <== NOT EXECUTED ffc0846c: 48 00 10 5d bl ffc094c8 <== NOT EXECUTED ffc08470: 4b ff ff c8 b ffc08438 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { ffc08474: 80 1f 00 d4 lwz r0,212(r31) if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; ffc08478: 39 20 00 00 li r9,0 ffc0847c: 91 3f 00 94 stw r9,148(r31) nToSend = 0; ffc08480: 3b a0 00 00 li r29,0 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { ffc08484: 2f 80 00 00 cmpwi cr7,r0,0 ffc08488: 41 be ff ac beq- cr7,ffc08434 <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); ffc0848c: 38 7f 00 30 addi r3,r31,48 <== NOT EXECUTED ffc08490: 80 9f 00 d8 lwz r4,216(r31) <== NOT EXECUTED ffc08494: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08498: 4e 80 04 21 bctrl <== NOT EXECUTED } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ ffc0849c: 93 df 00 84 stw r30,132(r31) <== NOT EXECUTED ffc084a0: 4b ff ff 98 b ffc08438 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; ffc084a4: 83 bf 00 88 lwz r29,136(r31) ffc084a8: 7f be e8 50 subf r29,r30,r29 ffc084ac: 4b ff ff 50 b ffc083fc tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); ffc084b0: 80 63 00 8c lwz r3,140(r3) ffc084b4: 48 00 10 15 bl ffc094c8 ffc084b8: 4b ff ff 14 b ffc083cc /* 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); ffc084bc: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED ffc084c0: 38 9f 00 4a addi r4,r31,74 <== NOT EXECUTED ffc084c4: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc084c8: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED ffc084cc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc084d0: 4e 80 04 21 bctrl <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc084d4: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc084d8: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc084dc: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc084e0: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED rtems_interrupt_disable(level); tty->t_dqlen--; ffc084e4: 81 7f 00 90 lwz r11,144(r31) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; ffc084e8: 81 3f 00 b8 lwz r9,184(r31) <== 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--; ffc084ec: 39 6b ff ff addi r11,r11,-1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; ffc084f0: 61 29 00 02 ori r9,r9,2 <== NOT EXECUTED * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; ffc084f4: 91 7f 00 90 stw r11,144(r31) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; ffc084f8: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc084fc: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } ffc08500: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED rtems_interrupt_disable(level); tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; ffc08504: 3b a0 00 01 li r29,1 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } ffc08508: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0850c: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc08510: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc08514: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc08518: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc0851c: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc08520: 4e 80 00 20 blr <== 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); ffc08524: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED ffc08528: 38 9f 00 49 addi r4,r31,73 <== NOT EXECUTED ffc0852c: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc08530: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED ffc08534: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08538: 4e 80 04 21 bctrl <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0853c: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc08540: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc08544: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc08548: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED rtems_interrupt_disable(level); tty->t_dqlen--; ffc0854c: 81 7f 00 90 lwz r11,144(r31) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; ffc08550: 81 3f 00 b8 lwz r9,184(r31) <== 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--; ffc08554: 39 6b ff ff addi r11,r11,-1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; ffc08558: 55 29 07 fa rlwinm r9,r9,0,31,29 <== NOT EXECUTED ffc0855c: 4b ff ff 98 b ffc084f4 <== NOT EXECUTED ffc08560: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc08564: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc08568: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc0856c: 7d 20 01 24 mtmsr r9 <== 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; ffc08570: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED ffc08574: 61 29 00 20 ori r9,r9,32 <== NOT EXECUTED ffc08578: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ ffc0857c: 39 20 00 01 li r9,1 <== NOT EXECUTED ffc08580: 91 3f 00 94 stw r9,148(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc08584: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 0; ffc08588: 3b a0 00 00 li r29,0 <== NOT EXECUTED } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ ffc0858c: 93 df 00 84 stw r30,132(r31) <== NOT EXECUTED ffc08590: 4b ff fe a8 b ffc08438 <== NOT EXECUTED =============================================================================== ffc082a0 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { ffc082a0: 94 21 ff e0 stwu r1,-32(r1) ffc082a4: 7c 08 02 a6 mflr r0 ffc082a8: 93 e1 00 1c stw r31,28(r1) ffc082ac: 7c 7f 1b 78 mr r31,r3 ffc082b0: 90 01 00 24 stw r0,36(r1) ffc082b4: 48 00 00 20 b ffc082d4 } /* * do something */ c = tty->device.pollRead(tty->minor); ffc082b8: 80 1f 00 a0 lwz r0,160(r31) ffc082bc: 80 7f 00 10 lwz r3,16(r31) ffc082c0: 7c 09 03 a6 mtctr r0 ffc082c4: 4e 80 04 21 bctrl if (c != EOF) { ffc082c8: 2f 83 ff ff cmpwi cr7,r3,-1 } /* * do something */ c = tty->device.pollRead(tty->minor); ffc082cc: 7c 60 1b 78 mr r0,r3 if (c != EOF) { ffc082d0: 40 9e 00 50 bne- cr7,ffc08320 while (1) { /* * wait for rtems event */ rtems_event_receive( ffc082d4: 38 c1 00 0c addi r6,r1,12 ffc082d8: 38 80 00 02 li r4,2 ffc082dc: 38 a0 00 00 li r5,0 ffc082e0: 38 60 00 03 li r3,3 ffc082e4: 48 00 08 fd bl ffc08be0 (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) { ffc082e8: 80 01 00 0c lwz r0,12(r1) ffc082ec: 70 09 00 01 andi. r9,r0,1 ffc082f0: 41 82 ff c8 beq+ ffc082b8 <== ALWAYS TAKEN tty->rxTaskId = 0; ffc082f4: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc082f8: 90 1f 00 c4 stw r0,196(r31) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); ffc082fc: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc08300: 48 00 14 21 bl ffc09720 <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); ffc08304: 80 1f 00 a0 lwz r0,160(r31) <== NOT EXECUTED ffc08308: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc0830c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08310: 4e 80 04 21 bctrl <== NOT EXECUTED if (c != EOF) { ffc08314: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); ffc08318: 7c 60 1b 78 mr r0,r3 <== NOT EXECUTED if (c != EOF) { ffc0831c: 41 9e ff b8 beq+ cr7,ffc082d4 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); ffc08320: 7f e3 fb 78 mr r3,r31 c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; ffc08324: 98 01 00 08 stb r0,8(r1) rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); ffc08328: 38 81 00 08 addi r4,r1,8 ffc0832c: 38 a0 00 01 li r5,1 ffc08330: 4b ff fb d1 bl ffc07f00 ffc08334: 4b ff ff a0 b ffc082d4 =============================================================================== ffc08594 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { ffc08594: 94 21 ff e0 stwu r1,-32(r1) ffc08598: 7c 08 02 a6 mflr r0 ffc0859c: 93 c1 00 18 stw r30,24(r1) ffc085a0: 3f c0 00 00 lis r30,0 ffc085a4: 3b de 28 78 addi r30,r30,10360 ffc085a8: 93 e1 00 1c stw r31,28(r1) ffc085ac: 7c 7f 1b 78 mr r31,r3 ffc085b0: 90 01 00 24 stw r0,36(r1) ffc085b4: 48 00 00 30 b ffc085e4 } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc085b8: 81 3f 00 cc lwz r9,204(r31) rtems_termios_linesw[tty->t_line].l_start(tty); ffc085bc: 7f e3 fb 78 mr r3,r31 } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc085c0: 55 29 28 34 rlwinm r9,r9,5,0,26 ffc085c4: 7d 3e 4a 14 add r9,r30,r9 ffc085c8: 80 09 00 14 lwz r0,20(r9) ffc085cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc085d0: 41 9e 00 0c beq- cr7,ffc085dc <== ALWAYS TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); ffc085d4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc085d8: 4e 80 04 21 bctrl <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); ffc085dc: 7f e3 fb 78 mr r3,r31 ffc085e0: 4b ff fd 59 bl ffc08338 while (1) { /* * wait for rtems event */ rtems_event_receive( ffc085e4: 38 80 00 02 li r4,2 ffc085e8: 38 a0 00 00 li r5,0 ffc085ec: 38 c1 00 08 addi r6,r1,8 ffc085f0: 38 60 00 03 li r3,3 ffc085f4: 48 00 05 ed bl ffc08be0 (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) { ffc085f8: 80 01 00 08 lwz r0,8(r1) ffc085fc: 70 09 00 01 andi. r9,r0,1 ffc08600: 41 82 ff b8 beq+ ffc085b8 <== ALWAYS TAKEN tty->txTaskId = 0; ffc08604: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc08608: 90 1f 00 c8 stw r0,200(r31) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); ffc0860c: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc08610: 48 00 11 11 bl ffc09720 <== NOT EXECUTED ffc08614: 4b ff ff a4 b ffc085b8 <== NOT EXECUTED =============================================================================== ffc07950 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc07950: 94 21 ff e0 stwu r1,-32(r1) ffc07954: 7c 08 02 a6 mflr r0 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07958: 38 80 00 00 li r4,0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc0795c: 90 01 00 24 stw r0,36(r1) rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07960: 38 a0 00 00 li r5,0 rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc07964: 81 23 00 00 lwz r9,0(r3) rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc07968: 93 e1 00 1c stw r31,28(r1) rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc0796c: 83 e9 00 38 lwz r31,56(r9) rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc07970: 93 c1 00 18 stw r30,24(r1) ffc07974: 7c 7e 1b 78 mr r30,r3 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07978: 80 7f 00 18 lwz r3,24(r31) rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc0797c: 93 a1 00 14 stw r29,20(r1) ffc07980: 93 81 00 10 stw r28,16(r1) rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07984: 48 00 19 b9 bl ffc0933c if (sc != RTEMS_SUCCESSFUL) ffc07988: 7c 7d 1b 79 mr. r29,r3 ffc0798c: 40 82 00 40 bne- ffc079cc return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { ffc07990: 80 1f 00 cc lwz r0,204(r31) ffc07994: 3d 20 00 00 lis r9,0 ffc07998: 39 29 28 78 addi r9,r9,10360 ffc0799c: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc079a0: 7d 29 02 14 add r9,r9,r0 ffc079a4: 80 09 00 0c lwz r0,12(r9) ffc079a8: 2f 80 00 00 cmpwi cr7,r0,0 ffc079ac: 41 9e 00 44 beq- cr7,ffc079f0 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); ffc079b0: 7f e3 fb 78 mr r3,r31 ffc079b4: 7c 09 03 a6 mtctr r0 ffc079b8: 7f c4 f3 78 mr r4,r30 ffc079bc: 4e 80 04 21 bctrl ffc079c0: 7c 7d 1b 78 mr r29,r3 rtems_semaphore_release (tty->osem); ffc079c4: 80 7f 00 18 lwz r3,24(r31) ffc079c8: 48 00 1b 01 bl ffc094c8 rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } ffc079cc: 80 01 00 24 lwz r0,36(r1) ffc079d0: 7f a3 eb 78 mr r3,r29 ffc079d4: 83 81 00 10 lwz r28,16(r1) ffc079d8: 7c 08 03 a6 mtlr r0 ffc079dc: 83 a1 00 14 lwz r29,20(r1) ffc079e0: 83 c1 00 18 lwz r30,24(r1) ffc079e4: 83 e1 00 1c lwz r31,28(r1) ffc079e8: 38 21 00 20 addi r1,r1,32 ffc079ec: 4e 80 00 20 blr 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) { ffc079f0: 80 1f 00 34 lwz r0,52(r31) ffc079f4: 70 09 00 01 andi. r9,r0,1 ffc079f8: 41 82 00 70 beq- ffc07a68 <== NEVER TAKEN uint32_t count = args->count; ffc079fc: 80 1e 00 14 lwz r0,20(r30) char *buffer = args->buffer; ffc07a00: 83 9e 00 10 lwz r28,16(r30) while (count--) ffc07a04: 2f 80 00 00 cmpwi cr7,r0,0 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; ffc07a08: 90 01 00 08 stw r0,8(r1) char *buffer = args->buffer; while (count--) ffc07a0c: 38 00 00 00 li r0,0 ffc07a10: 41 9e 00 28 beq- cr7,ffc07a38 <== NEVER TAKEN } rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) ffc07a14: 3b 9c ff ff addi r28,r28,-1 } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); ffc07a18: 8c 7c 00 01 lbzu r3,1(r28) ffc07a1c: 7f e4 fb 78 mr r4,r31 ffc07a20: 4b ff f7 f5 bl ffc07214 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) ffc07a24: 80 01 00 08 lwz r0,8(r1) ffc07a28: 35 20 ff ff addic. r9,r0,-1 ffc07a2c: 91 21 00 08 stw r9,8(r1) ffc07a30: 40 82 ff e8 bne+ ffc07a18 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; ffc07a34: 80 1e 00 14 lwz r0,20(r30) ffc07a38: 90 1e 00 1c stw r0,28(r30) } rtems_semaphore_release (tty->osem); ffc07a3c: 80 7f 00 18 lwz r3,24(r31) ffc07a40: 48 00 1a 89 bl ffc094c8 return sc; } ffc07a44: 80 01 00 24 lwz r0,36(r1) ffc07a48: 7f a3 eb 78 mr r3,r29 ffc07a4c: 83 81 00 10 lwz r28,16(r1) ffc07a50: 7c 08 03 a6 mtlr r0 ffc07a54: 83 a1 00 14 lwz r29,20(r1) ffc07a58: 83 c1 00 18 lwz r30,24(r1) ffc07a5c: 83 e1 00 1c lwz r31,28(r1) ffc07a60: 38 21 00 20 addi r1,r1,32 ffc07a64: 4e 80 00 20 blr char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); ffc07a68: 80 7e 00 10 lwz r3,16(r30) <== NOT EXECUTED ffc07a6c: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc07a70: 80 9e 00 14 lwz r4,20(r30) <== NOT EXECUTED ffc07a74: 4b ff f5 f1 bl ffc07064 <== NOT EXECUTED ffc07a78: 4b ff ff bc b ffc07a34 <== NOT EXECUTED =============================================================================== ffc1ba64 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { ffc1ba64: 94 21 ff e8 stwu r1,-24(r1) ffc1ba68: 7c 08 02 a6 mflr r0 ffc1ba6c: 7c 64 1b 78 mr r4,r3 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) ffc1ba70: 3c 60 00 00 lis r3,0 ffc1ba74: 90 01 00 1c stw r0,28(r1) ffc1ba78: 38 63 72 80 addi r3,r3,29312 ffc1ba7c: 38 a1 00 08 addi r5,r1,8 ffc1ba80: 48 00 3b 91 bl ffc1f610 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1ba84: 80 01 00 08 lwz r0,8(r1) ffc1ba88: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ba8c: 40 9e 00 30 bne- cr7,ffc1babc case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) ffc1ba90: 80 03 00 38 lwz r0,56(r3) ffc1ba94: 2f 80 00 04 cmpwi cr7,r0,4 ffc1ba98: 41 9e 00 0c beq- cr7,ffc1baa4 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1ba9c: 38 63 00 10 addi r3,r3,16 ffc1baa0: 48 00 63 d1 bl ffc21e70 <_Watchdog_Remove> _Thread_Enable_dispatch(); ffc1baa4: 48 00 4b b5 bl ffc20658 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1baa8: 80 01 00 1c lwz r0,28(r1) case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) (void) _Watchdog_Remove( &the_timer->Ticker ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc1baac: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1bab0: 7c 08 03 a6 mtlr r0 ffc1bab4: 38 21 00 18 addi r1,r1,24 ffc1bab8: 4e 80 00 20 blr ffc1babc: 80 01 00 1c lwz r0,28(r1) #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1bac0: 38 60 00 04 li r3,4 } ffc1bac4: 38 21 00 18 addi r1,r1,24 ffc1bac8: 7c 08 03 a6 mtlr r0 ffc1bacc: 4e 80 00 20 blr =============================================================================== ffc1c120 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1c120: 94 21 ff c0 stwu r1,-64(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc1c124: 3d 20 00 00 lis r9,0 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1c128: 7c 08 02 a6 mflr r0 ffc1c12c: 93 e1 00 3c stw r31,60(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc1c130: 83 e9 28 ec lwz r31,10476(r9) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1c134: 93 41 00 28 stw r26,40(r1) Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; ffc1c138: 3b 40 00 0e li r26,14 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1c13c: 2f 9f 00 00 cmpwi cr7,r31,0 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1c140: 93 a1 00 34 stw r29,52(r1) ffc1c144: 7c 7d 1b 78 mr r29,r3 ffc1c148: 93 c1 00 38 stw r30,56(r1) ffc1c14c: 7c be 2b 78 mr r30,r5 ffc1c150: 90 01 00 44 stw r0,68(r1) ffc1c154: 93 21 00 24 stw r25,36(r1) ffc1c158: 93 61 00 2c stw r27,44(r1) ffc1c15c: 93 81 00 30 stw r28,48(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1c160: 41 9e 00 18 beq- cr7,ffc1c178 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc1c164: 3d 20 00 00 lis r9,0 ffc1c168: 88 09 28 a0 lbz r0,10400(r9) return RTEMS_NOT_DEFINED; ffc1c16c: 3b 40 00 0b li r26,11 Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc1c170: 2f 80 00 00 cmpwi cr7,r0,0 ffc1c174: 40 9e 00 34 bne- cr7,ffc1c1a8 <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1c178: 80 01 00 44 lwz r0,68(r1) ffc1c17c: 7f 43 d3 78 mr r3,r26 ffc1c180: 83 21 00 24 lwz r25,36(r1) ffc1c184: 7c 08 03 a6 mtlr r0 ffc1c188: 83 41 00 28 lwz r26,40(r1) ffc1c18c: 83 61 00 2c lwz r27,44(r1) ffc1c190: 83 81 00 30 lwz r28,48(r1) ffc1c194: 83 a1 00 34 lwz r29,52(r1) ffc1c198: 83 c1 00 38 lwz r30,56(r1) ffc1c19c: 83 e1 00 3c lwz r31,60(r1) ffc1c1a0: 38 21 00 40 addi r1,r1,64 ffc1c1a4: 4e 80 00 20 blr return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) ffc1c1a8: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc1c1ac: 3b 40 00 09 li r26,9 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) ffc1c1b0: 41 be ff c8 beq- cr7,ffc1c178 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc1c1b4: 7c 83 23 78 mr r3,r4 ffc1c1b8: 90 81 00 18 stw r4,24(r1) return RTEMS_INVALID_CLOCK; ffc1c1bc: 3b 40 00 14 li r26,20 return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc1c1c0: 90 c1 00 1c stw r6,28(r1) ffc1c1c4: 4b ff c0 c1 bl ffc18284 <_TOD_Validate> ffc1c1c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc1c1cc: 80 81 00 18 lwz r4,24(r1) ffc1c1d0: 41 9e ff a8 beq+ cr7,ffc1c178 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1c1d4: 7c 83 23 78 mr r3,r4 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1c1d8: 3f 60 00 00 lis r27,0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1c1dc: 4b ff c0 0d bl ffc181e8 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1c1e0: 80 1b 28 b4 lwz r0,10420(r27) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1c1e4: 7c 7c 1b 78 mr r28,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1c1e8: 7f 83 00 40 cmplw cr7,r3,r0 ffc1c1ec: 40 9d ff 8c ble+ cr7,ffc1c178 ffc1c1f0: 3c 60 00 00 lis r3,0 ffc1c1f4: 38 63 72 80 addi r3,r3,29312 ffc1c1f8: 7f a4 eb 78 mr r4,r29 ffc1c1fc: 38 a1 00 08 addi r5,r1,8 ffc1c200: 48 00 34 11 bl ffc1f610 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1c204: 83 21 00 08 lwz r25,8(r1) ffc1c208: 7c 7a 1b 78 mr r26,r3 ffc1c20c: 2f 99 00 00 cmpwi cr7,r25,0 ffc1c210: 40 9e 00 54 bne- cr7,ffc1c264 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1c214: 38 63 00 10 addi r3,r3,16 ffc1c218: 48 00 5c 59 bl ffc21e70 <_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(); ffc1c21c: 80 1b 28 b4 lwz r0,10420(r27) ffc1c220: 80 c1 00 1c lwz r6,28(r1) 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; ffc1c224: 39 20 00 03 li r9,3 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc1c228: 7f 80 e0 50 subf r28,r0,r28 (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1c22c: 80 1f 00 04 lwz r0,4(r31) ffc1c230: 7f 44 d3 78 mr r4,r26 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; ffc1c234: 91 3a 00 38 stw r9,56(r26) _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 ); ffc1c238: 7f e3 fb 78 mr r3,r31 ffc1c23c: 7c 09 03 a6 mtctr r0 ffc1c240: 90 da 00 34 stw r6,52(r26) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1c244: 93 3a 00 18 stw r25,24(r26) the_watchdog->routine = routine; ffc1c248: 93 da 00 2c stw r30,44(r26) the_watchdog->id = id; ffc1c24c: 93 ba 00 30 stw r29,48(r26) case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 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(); ffc1c250: 93 9a 00 1c stw r28,28(r26) (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc1c254: 3b 40 00 00 li r26,0 (void) _Watchdog_Remove( &the_timer->Ticker ); 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(); (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1c258: 4e 80 04 21 bctrl _Thread_Enable_dispatch(); ffc1c25c: 48 00 43 fd bl ffc20658 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc1c260: 4b ff ff 18 b ffc1c178 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1c264: 3b 40 00 04 li r26,4 ffc1c268: 4b ff ff 10 b ffc1c178 =============================================================================== ffc04ba0 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { ffc04ba0: 94 21 ff e0 stwu r1,-32(r1) ffc04ba4: 7c 08 02 a6 mflr r0 ffc04ba8: 90 01 00 24 stw r0,36(r1) int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { ffc04bac: 74 60 20 00 andis. r0,r3,8192 static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { ffc04bb0: 93 41 00 08 stw r26,8(r1) ffc04bb4: 7c 9a 23 78 mr r26,r4 ffc04bb8: 93 61 00 0c stw r27,12(r1) ffc04bbc: 7c bb 2b 78 mr r27,r5 ffc04bc0: 93 c1 00 18 stw r30,24(r1) ffc04bc4: 7c 7e 1b 78 mr r30,r3 ffc04bc8: 93 81 00 10 stw r28,16(r1) ffc04bcc: 93 a1 00 14 stw r29,20(r1) ffc04bd0: 93 e1 00 1c stw r31,28(r1) int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { ffc04bd4: 41 82 00 40 beq- ffc04c14 if (rtems_panic_in_progress++) ffc04bd8: 3d 20 00 00 lis r9,0 ffc04bdc: 81 69 27 a8 lwz r11,10152(r9) ffc04be0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc04be4: 38 0b 00 01 addi r0,r11,1 ffc04be8: 90 09 27 a8 stw r0,10152(r9) ffc04bec: 41 9e 00 1c beq- cr7,ffc04c08 <== ALWAYS TAKEN * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc04bf0: 3d 60 00 00 lis r11,0 <== NOT EXECUTED ffc04bf4: 81 4b 27 c8 lwz r10,10184(r11) <== NOT EXECUTED ffc04bf8: 38 0a 00 01 addi r0,r10,1 <== NOT EXECUTED ffc04bfc: 90 0b 27 c8 stw r0,10184(r11) <== NOT EXECUTED return _Thread_Dispatch_disable_level; ffc04c00: 80 0b 27 c8 lwz r0,10184(r11) <== NOT EXECUTED void _Thread_Disable_dispatch( void ); #else RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void ) { _Thread_Dispatch_increment_disable_level(); RTEMS_COMPILER_MEMORY_BARRIER(); ffc04c04: 80 09 27 a8 lwz r0,10152(r9) <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) ffc04c08: 2f 80 00 02 cmpwi cr7,r0,2 return 0; ffc04c0c: 3b a0 00 00 li r29,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) ffc04c10: 41 9d 00 ac bgt- cr7,ffc04cbc <== NEVER TAKEN return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ ffc04c14: 3f e0 00 00 lis r31,0 ffc04c18: 81 3f 27 4c lwz r9,10060(r31) rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { int local_errno = 0; ffc04c1c: 3b 80 00 00 li r28,0 /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ ffc04c20: 80 69 00 08 lwz r3,8(r9) ffc04c24: 48 00 e3 11 bl ffc12f34 status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ ffc04c28: 77 c0 40 00 andis. r0,r30,16384 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; ffc04c2c: 57 de 01 00 rlwinm r30,r30,0,4,0 if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ ffc04c30: 40 82 00 ec bne- ffc04d1c #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); ffc04c34: 81 3f 27 4c lwz r9,10060(r31) ffc04c38: 7f 44 d3 78 mr r4,r26 ffc04c3c: 7f 65 db 78 mr r5,r27 ffc04c40: 80 69 00 0c lwz r3,12(r9) ffc04c44: 48 01 3a 01 bl ffc18644 if (status) ffc04c48: 2f 9e 00 00 cmpwi cr7,r30,0 #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); ffc04c4c: 7c 7d 1b 78 mr r29,r3 if (status) ffc04c50: 40 9e 00 98 bne- cr7,ffc04ce8 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { ffc04c54: 2f 9c 00 00 cmpwi cr7,r28,0 ffc04c58: 41 9e 00 3c beq- cr7,ffc04c94 if ((local_errno > 0) && *strerror(local_errno)) ffc04c5c: 40 9d 00 18 ble- cr7,ffc04c74 ffc04c60: 7f 83 e3 78 mr r3,r28 ffc04c64: 48 00 f7 11 bl ffc14374 ffc04c68: 88 03 00 00 lbz r0,0(r3) ffc04c6c: 2f 80 00 00 cmpwi cr7,r0,0 ffc04c70: 40 9e 00 b8 bne- cr7,ffc04d28 <== ALWAYS TAKEN chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); ffc04c74: 81 3f 27 4c lwz r9,10060(r31) ffc04c78: 3c 80 ff c2 lis r4,-62 ffc04c7c: 38 84 ef a8 addi r4,r4,-4184 ffc04c80: 80 69 00 0c lwz r3,12(r9) ffc04c84: 7f 85 e3 78 mr r5,r28 ffc04c88: 4c c6 31 82 crclr 4*cr1+eq ffc04c8c: 48 00 e8 61 bl ffc134ec ffc04c90: 7f bd 1a 14 add r29,r29,r3 } chars_written += fprintf(stderr, "\n"); ffc04c94: 81 3f 27 4c lwz r9,10060(r31) ffc04c98: 3c 80 ff c2 lis r4,-62 ffc04c9c: 38 84 e2 24 addi r4,r4,-7644 ffc04ca0: 80 69 00 0c lwz r3,12(r9) ffc04ca4: 4c c6 31 82 crclr 4*cr1+eq ffc04ca8: 48 00 e8 45 bl ffc134ec (void) fflush(stderr); ffc04cac: 81 3f 27 4c lwz r9,10060(r31) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); ffc04cb0: 7f a3 ea 14 add r29,r3,r29 (void) fflush(stderr); ffc04cb4: 80 69 00 0c lwz r3,12(r9) ffc04cb8: 48 00 e2 7d bl ffc12f34 return chars_written; } ffc04cbc: 80 01 00 24 lwz r0,36(r1) ffc04cc0: 7f a3 eb 78 mr r3,r29 ffc04cc4: 83 41 00 08 lwz r26,8(r1) ffc04cc8: 7c 08 03 a6 mtlr r0 ffc04ccc: 83 61 00 0c lwz r27,12(r1) ffc04cd0: 83 81 00 10 lwz r28,16(r1) ffc04cd4: 83 a1 00 14 lwz r29,20(r1) ffc04cd8: 83 c1 00 18 lwz r30,24(r1) ffc04cdc: 83 e1 00 1c lwz r31,28(r1) ffc04ce0: 38 21 00 20 addi r1,r1,32 ffc04ce4: 4e 80 00 20 blr chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); ffc04ce8: 3d 20 00 00 lis r9,0 ffc04cec: 81 29 27 4c lwz r9,10060(r9) ffc04cf0: 7f c3 f3 78 mr r3,r30 ffc04cf4: 83 c9 00 0c lwz r30,12(r9) ffc04cf8: 4b ff fe 7d bl ffc04b74 ffc04cfc: 3c 80 ff c2 lis r4,-62 ffc04d00: 7c 65 1b 78 mr r5,r3 ffc04d04: 38 84 ef 88 addi r4,r4,-4216 ffc04d08: 7f c3 f3 78 mr r3,r30 ffc04d0c: 4c c6 31 82 crclr 4*cr1+eq ffc04d10: 48 00 e7 dd bl ffc134ec #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += ffc04d14: 7f bd 1a 14 add r29,r29,r3 ffc04d18: 4b ff ff 3c b ffc04c54 (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; ffc04d1c: 48 00 dd 45 bl ffc12a60 <__errno> ffc04d20: 83 83 00 00 lwz r28,0(r3) ffc04d24: 4b ff ff 10 b ffc04c34 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)); ffc04d28: 81 3f 27 4c lwz r9,10060(r31) ffc04d2c: 7f 83 e3 78 mr r3,r28 ffc04d30: 83 c9 00 0c lwz r30,12(r9) ffc04d34: 48 00 f6 41 bl ffc14374 ffc04d38: 3c 80 ff c2 lis r4,-62 ffc04d3c: 7c 65 1b 78 mr r5,r3 ffc04d40: 38 84 ef 98 addi r4,r4,-4200 ffc04d44: 7f c3 f3 78 mr r3,r30 ffc04d48: 4c c6 31 82 crclr 4*cr1+eq ffc04d4c: 48 00 e7 a1 bl ffc134ec ffc04d50: 7f bd 1a 14 add r29,r29,r3 ffc04d54: 4b ff ff 40 b ffc04c94 =============================================================================== ffc053ac : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc053ac: 94 21 ff d8 stwu r1,-40(r1) ffc053b0: 7c 08 02 a6 mflr r0 ffc053b4: 93 41 00 10 stw r26,16(r1) sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) ffc053b8: 3f 40 cc cc lis r26,-13108 ffc053bc: 63 5a cc cd ori r26,r26,52429 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc053c0: 93 81 00 18 stw r28,24(r1) int c; unsigned int i = 0; unsigned int limit = INT_MAX; ffc053c4: 3f 80 7f ff lis r28,32767 ffc053c8: 63 9c ff ff ori r28,r28,65535 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc053cc: 90 01 00 2c stw r0,44(r1) ffc053d0: 93 01 00 08 stw r24,8(r1) ffc053d4: 7c 98 23 78 mr r24,r4 ffc053d8: 93 21 00 0c stw r25,12(r1) unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc053dc: 3f 20 00 00 lis r25,0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc053e0: 93 61 00 14 stw r27,20(r1) limit++; continue; } sign = 1; } if (!isdigit(c)) ffc053e4: 3f 60 00 00 lis r27,0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc053e8: 93 a1 00 1c stw r29,28(r1) int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; ffc053ec: 3b a0 00 00 li r29,0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc053f0: 93 c1 00 20 stw r30,32(r1) int c; unsigned int i = 0; ffc053f4: 3b c0 00 00 li r30,0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc053f8: 93 e1 00 24 stw r31,36(r1) ffc053fc: 7c 7f 1b 78 mr r31,r3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc05400: 81 3f 00 04 lwz r9,4(r31) ffc05404: 38 09 ff ff addi r0,r9,-1 ffc05408: 2f 80 00 00 cmpwi cr7,r0,0 ffc0540c: 90 1f 00 04 stw r0,4(r31) ffc05410: 41 9c 00 7c blt- cr7,ffc0548c <== NEVER TAKEN ffc05414: 81 3f 00 00 lwz r9,0(r31) ffc05418: 88 69 00 00 lbz r3,0(r9) ffc0541c: 38 09 00 01 addi r0,r9,1 ffc05420: 90 1f 00 00 stw r0,0(r31) if (c == ':') ffc05424: 2f 83 00 3a cmpwi cr7,r3,58 ffc05428: 41 9e 00 78 beq- cr7,ffc054a0 break; if (sign == 0) { ffc0542c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc05430: 40 9e 00 10 bne- cr7,ffc05440 if (c == '-') { ffc05434: 2f 83 00 2d cmpwi cr7,r3,45 sign = -1; limit++; continue; } sign = 1; ffc05438: 3b a0 00 01 li r29,1 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { ffc0543c: 41 9e 00 ec beq- cr7,ffc05528 limit++; continue; } sign = 1; } if (!isdigit(c)) ffc05440: 81 3b 27 24 lwz r9,10020(r27) ffc05444: 7d 29 1a 14 add r9,r9,r3 ffc05448: 88 09 00 01 lbz r0,1(r9) ffc0544c: 70 09 00 04 andi. r9,r0,4 ffc05450: 41 82 00 a4 beq- ffc054f4 return 0; d = c - '0'; if ((i > (limit / 10)) ffc05454: 7c 1c d0 16 mulhwu r0,r28,r26 ffc05458: 54 00 e8 fe rlwinm r0,r0,29,3,31 ffc0545c: 7f 9e 00 40 cmplw cr7,r30,r0 ffc05460: 41 9d 00 94 bgt- cr7,ffc054f4 || ((i == (limit / 10)) && (d > (limit % 10)))) ffc05464: 7f 9e 00 00 cmpw cr7,r30,r0 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; ffc05468: 38 63 ff d0 addi r3,r3,-48 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) ffc0546c: 1f de 00 0a mulli r30,r30,10 ffc05470: 41 9e 00 78 beq- cr7,ffc054e8 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc05474: 81 3f 00 04 lwz r9,4(r31) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; ffc05478: 7f c3 f2 14 add r30,r3,r30 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc0547c: 38 09 ff ff addi r0,r9,-1 ffc05480: 2f 80 00 00 cmpwi cr7,r0,0 ffc05484: 90 1f 00 04 stw r0,4(r31) ffc05488: 40 9c ff 8c bge+ cr7,ffc05414 <== ALWAYS TAKEN ffc0548c: 80 79 27 2c lwz r3,10028(r25) <== NOT EXECUTED ffc05490: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc05494: 48 00 fe 71 bl ffc15304 <__srget_r> <== NOT EXECUTED if (c == ':') ffc05498: 2f 83 00 3a cmpwi cr7,r3,58 <== NOT EXECUTED ffc0549c: 40 9e ff 90 bne+ cr7,ffc0542c <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) ffc054a0: 2f 9d 00 00 cmpwi cr7,r29,0 return 0; ffc054a4: 38 60 00 00 li r3,0 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) ffc054a8: 41 9e 00 50 beq- cr7,ffc054f8 <== NEVER TAKEN return 0; *val = i * sign; return 1; } ffc054ac: 80 01 00 2c lwz r0,44(r1) return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; ffc054b0: 7f dd f1 d6 mullw r30,r29,r30 return 1; } ffc054b4: 83 21 00 0c lwz r25,12(r1) ffc054b8: 7c 08 03 a6 mtlr r0 i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; ffc054bc: 38 60 00 01 li r3,1 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; ffc054c0: 93 d8 00 00 stw r30,0(r24) return 1; } ffc054c4: 83 01 00 08 lwz r24,8(r1) ffc054c8: 83 41 00 10 lwz r26,16(r1) ffc054cc: 83 61 00 14 lwz r27,20(r1) ffc054d0: 83 81 00 18 lwz r28,24(r1) ffc054d4: 83 a1 00 1c lwz r29,28(r1) ffc054d8: 83 c1 00 20 lwz r30,32(r1) ffc054dc: 83 e1 00 24 lwz r31,36(r1) ffc054e0: 38 21 00 28 addi r1,r1,40 ffc054e4: 4e 80 00 20 blr } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) ffc054e8: 7c 1e e0 50 subf r0,r30,r28 ffc054ec: 7f 83 00 40 cmplw cr7,r3,r0 ffc054f0: 40 9d ff 84 ble+ cr7,ffc05474 <== NEVER TAKEN return 0; ffc054f4: 38 60 00 00 li r3,0 } if (sign == 0) return 0; *val = i * sign; return 1; } ffc054f8: 80 01 00 2c lwz r0,44(r1) ffc054fc: 83 01 00 08 lwz r24,8(r1) ffc05500: 7c 08 03 a6 mtlr r0 ffc05504: 83 21 00 0c lwz r25,12(r1) ffc05508: 83 41 00 10 lwz r26,16(r1) ffc0550c: 83 61 00 14 lwz r27,20(r1) ffc05510: 83 81 00 18 lwz r28,24(r1) ffc05514: 83 a1 00 1c lwz r29,28(r1) ffc05518: 83 c1 00 20 lwz r30,32(r1) ffc0551c: 83 e1 00 24 lwz r31,36(r1) ffc05520: 38 21 00 28 addi r1,r1,40 ffc05524: 4e 80 00 20 blr if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; ffc05528: 3b 9c 00 01 addi r28,r28,1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; ffc0552c: 3b a0 ff ff li r29,-1 limit++; continue; ffc05530: 4b ff fe d0 b ffc05400 =============================================================================== ffc05534 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { ffc05534: 94 21 ff e0 stwu r1,-32(r1) ffc05538: 7c 08 02 a6 mflr r0 ffc0553c: 90 01 00 24 stw r0,36(r1) int c; *name = *bufp; ffc05540: 80 05 00 00 lwz r0,0(r5) /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { ffc05544: 93 61 00 0c stw r27,12(r1) ffc05548: 7c fb 3b 78 mr r27,r7 ffc0554c: 93 81 00 10 stw r28,16(r1) int c; *name = *bufp; for (;;) { c = getc(fp); ffc05550: 3f 80 00 00 lis r28,0 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { ffc05554: 93 a1 00 14 stw r29,20(r1) ffc05558: 7c dd 33 78 mr r29,r6 ffc0555c: 93 c1 00 18 stw r30,24(r1) ffc05560: 7c be 2b 78 mr r30,r5 ffc05564: 93 e1 00 1c stw r31,28(r1) ffc05568: 7c 7f 1b 78 mr r31,r3 int c; *name = *bufp; ffc0556c: 90 04 00 00 stw r0,0(r4) ffc05570: 48 00 00 58 b ffc055c8 for (;;) { c = getc(fp); ffc05574: 81 3f 00 00 lwz r9,0(r31) ffc05578: 88 69 00 00 lbz r3,0(r9) ffc0557c: 38 09 00 01 addi r0,r9,1 ffc05580: 90 1f 00 00 stw r0,0(r31) if (c == ':') { ffc05584: 2f 83 00 3a cmpwi cr7,r3,58 if (nlFlag) return 0; break; } if (c == '\n') { ffc05588: 2f 03 00 0a cmpwi cr6,r3,10 if (!nlFlag) return 0; break; } if (c == EOF) ffc0558c: 2c 83 ff ff cmpwi cr1,r3,-1 int c; *name = *bufp; for (;;) { c = getc(fp); if (c == ':') { ffc05590: 41 9e 00 68 beq- cr7,ffc055f8 if (nlFlag) return 0; break; } if (c == '\n') { ffc05594: 41 9a 00 e4 beq- cr6,ffc05678 if (!nlFlag) return 0; break; } if (c == EOF) ffc05598: 41 86 00 b8 beq- cr1,ffc05650 return 0; if (*nleft < 2) ffc0559c: 80 1d 00 00 lwz r0,0(r29) ffc055a0: 2b 80 00 01 cmplwi cr7,r0,1 ffc055a4: 40 9d 00 ac ble- cr7,ffc05650 return 0; **bufp = c; ffc055a8: 81 3e 00 00 lwz r9,0(r30) ffc055ac: 98 69 00 00 stb r3,0(r9) ++(*bufp); ffc055b0: 81 3e 00 00 lwz r9,0(r30) --(*nleft); ffc055b4: 81 7d 00 00 lwz r11,0(r29) if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); ffc055b8: 39 29 00 01 addi r9,r9,1 --(*nleft); ffc055bc: 38 0b ff ff addi r0,r11,-1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); ffc055c0: 91 3e 00 00 stw r9,0(r30) --(*nleft); ffc055c4: 90 1d 00 00 stw r0,0(r29) { int c; *name = *bufp; for (;;) { c = getc(fp); ffc055c8: 81 3f 00 04 lwz r9,4(r31) ffc055cc: 38 09 ff ff addi r0,r9,-1 ffc055d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc055d4: 90 1f 00 04 stw r0,4(r31) ffc055d8: 40 9c ff 9c bge+ cr7,ffc05574 ffc055dc: 80 7c 27 2c lwz r3,10028(r28) ffc055e0: 7f e4 fb 78 mr r4,r31 ffc055e4: 48 00 fd 21 bl ffc15304 <__srget_r> if (c == ':') { ffc055e8: 2f 83 00 3a cmpwi cr7,r3,58 if (nlFlag) return 0; break; } if (c == '\n') { ffc055ec: 2f 03 00 0a cmpwi cr6,r3,10 if (!nlFlag) return 0; break; } if (c == EOF) ffc055f0: 2c 83 ff ff cmpwi cr1,r3,-1 int c; *name = *bufp; for (;;) { c = getc(fp); if (c == ':') { ffc055f4: 40 9e ff a0 bne+ cr7,ffc05594 <== ALWAYS TAKEN if (nlFlag) ffc055f8: 2f 9b 00 00 cmpwi cr7,r27,0 return 0; ffc055fc: 38 60 00 00 li r3,0 *name = *bufp; for (;;) { c = getc(fp); if (c == ':') { if (nlFlag) ffc05600: 40 9e 00 54 bne- cr7,ffc05654 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ffc05604: 81 3e 00 00 lwz r9,0(r30) ffc05608: 38 00 00 00 li r0,0 ++(*bufp); --(*nleft); return 1; ffc0560c: 38 60 00 01 li r3,1 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ffc05610: 98 09 00 00 stb r0,0(r9) ++(*bufp); ffc05614: 81 3e 00 00 lwz r9,0(r30) --(*nleft); ffc05618: 81 7d 00 00 lwz r11,0(r29) **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); ffc0561c: 39 29 00 01 addi r9,r9,1 --(*nleft); ffc05620: 38 0b ff ff addi r0,r11,-1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); ffc05624: 91 3e 00 00 stw r9,0(r30) --(*nleft); ffc05628: 90 1d 00 00 stw r0,0(r29) return 1; } ffc0562c: 80 01 00 24 lwz r0,36(r1) ffc05630: 83 61 00 0c lwz r27,12(r1) ffc05634: 7c 08 03 a6 mtlr r0 ffc05638: 83 81 00 10 lwz r28,16(r1) ffc0563c: 83 a1 00 14 lwz r29,20(r1) ffc05640: 83 c1 00 18 lwz r30,24(r1) ffc05644: 83 e1 00 1c lwz r31,28(r1) ffc05648: 38 21 00 20 addi r1,r1,32 ffc0564c: 4e 80 00 20 blr break; } if (c == EOF) return 0; if (*nleft < 2) return 0; ffc05650: 38 60 00 00 li r3,0 } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } ffc05654: 80 01 00 24 lwz r0,36(r1) ffc05658: 83 61 00 0c lwz r27,12(r1) ffc0565c: 7c 08 03 a6 mtlr r0 ffc05660: 83 81 00 10 lwz r28,16(r1) ffc05664: 83 a1 00 14 lwz r29,20(r1) ffc05668: 83 c1 00 18 lwz r30,24(r1) ffc0566c: 83 e1 00 1c lwz r31,28(r1) ffc05670: 38 21 00 20 addi r1,r1,32 ffc05674: 4e 80 00 20 blr if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) ffc05678: 2f 9b 00 00 cmpwi cr7,r27,0 return 0; ffc0567c: 38 60 00 00 li r3,0 if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) ffc05680: 41 be ff d4 beq- cr7,ffc05654 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ffc05684: 81 3e 00 00 lwz r9,0(r30) ffc05688: 38 00 00 00 li r0,0 ++(*bufp); --(*nleft); return 1; ffc0568c: 38 60 00 01 li r3,1 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ffc05690: 98 09 00 00 stb r0,0(r9) ++(*bufp); ffc05694: 81 3e 00 00 lwz r9,0(r30) --(*nleft); ffc05698: 81 7d 00 00 lwz r11,0(r29) **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); ffc0569c: 39 29 00 01 addi r9,r9,1 --(*nleft); ffc056a0: 38 0b ff ff addi r0,r11,-1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); ffc056a4: 91 3e 00 00 stw r9,0(r30) --(*nleft); ffc056a8: 90 1d 00 00 stw r0,0(r29) ffc056ac: 4b ff ff 80 b ffc0562c =============================================================================== ffc056b0 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc056b0: 94 21 ff d0 stwu r1,-48(r1) ffc056b4: 7c 08 02 a6 mflr r0 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc056b8: 38 e0 00 00 li r7,0 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc056bc: 90 a1 00 18 stw r5,24(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc056c0: 38 a1 00 18 addi r5,r1,24 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc056c4: 90 c1 00 1c stw r6,28(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc056c8: 38 c1 00 1c addi r6,r1,28 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc056cc: 93 a1 00 24 stw r29,36(r1) ffc056d0: 7c 9d 23 78 mr r29,r4 ffc056d4: 93 c1 00 28 stw r30,40(r1) ffc056d8: 7c 7e 1b 78 mr r30,r3 ffc056dc: 93 e1 00 2c stw r31,44(r1) 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; ffc056e0: 3b e0 00 00 li r31,0 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc056e4: 90 01 00 34 stw r0,52(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc056e8: 4b ff fe 4d bl ffc05534 ffc056ec: 2f 83 00 00 cmpwi cr7,r3,0 ffc056f0: 40 9e 00 24 bne- cr7,ffc05714 grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } ffc056f4: 80 01 00 34 lwz r0,52(r1) ffc056f8: 7f e3 fb 78 mr r3,r31 ffc056fc: 83 a1 00 24 lwz r29,36(r1) ffc05700: 7c 08 03 a6 mtlr r0 ffc05704: 83 c1 00 28 lwz r30,40(r1) ffc05708: 83 e1 00 2c lwz r31,44(r1) ffc0570c: 38 21 00 30 addi r1,r1,48 ffc05710: 4e 80 00 20 blr int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) ffc05714: 7f c3 f3 78 mr r3,r30 ffc05718: 38 9d 00 04 addi r4,r29,4 ffc0571c: 38 a1 00 18 addi r5,r1,24 ffc05720: 38 c1 00 1c addi r6,r1,28 ffc05724: 38 e0 00 00 li r7,0 ffc05728: 4b ff fe 0d bl ffc05534 ffc0572c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05730: 41 9e ff c4 beq+ cr7,ffc056f4 <== NEVER TAKEN || !scanInt(fp, &grgid) ffc05734: 7f c3 f3 78 mr r3,r30 ffc05738: 38 81 00 0c addi r4,r1,12 ffc0573c: 4b ff fc 71 bl ffc053ac ffc05740: 2f 83 00 00 cmpwi cr7,r3,0 ffc05744: 41 9e ff b0 beq+ cr7,ffc056f4 <== NEVER TAKEN || !scanString(fp, &grmem, &buffer, &bufsize, 1)) ffc05748: 7f c3 f3 78 mr r3,r30 ffc0574c: 38 81 00 08 addi r4,r1,8 ffc05750: 38 a1 00 18 addi r5,r1,24 ffc05754: 38 c1 00 1c addi r6,r1,28 ffc05758: 38 e0 00 01 li r7,1 ffc0575c: 4b ff fd d9 bl ffc05534 ffc05760: 2f 83 00 00 cmpwi cr7,r3,0 ffc05764: 41 be ff 90 beq- cr7,ffc056f4 <== NEVER TAKEN return 0; grp->gr_gid = grgid; ffc05768: 80 01 00 0c lwz r0,12(r1) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc0576c: 39 20 00 17 li r9,23 ffc05770: 81 01 00 08 lwz r8,8(r1) 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; ffc05774: b0 1d 00 08 sth r0,8(r29) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05778: 88 08 00 00 lbz r0,0(r8) ffc0577c: 2f 80 00 00 cmpwi cr7,r0,0 ffc05780: 41 9e 00 30 beq- cr7,ffc057b0 <== NEVER TAKEN ffc05784: 7d 0b 43 78 mr r11,r8 ffc05788: 39 20 00 01 li r9,1 if(*cp == ',') memcount++; ffc0578c: 68 0a 00 2c xori r10,r0,44 ffc05790: 21 4a 00 00 subfic r10,r10,0 ffc05794: 7d 49 01 94 addze r10,r9 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05798: 8c 0b 00 01 lbzu r0,1(r11) ffc0579c: 2f 80 00 00 cmpwi cr7,r0,0 if(*cp == ',') memcount++; ffc057a0: 7d 49 53 78 mr r9,r10 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc057a4: 40 9e ff e8 bne+ cr7,ffc0578c ffc057a8: 55 49 10 3a rlwinm r9,r10,2,0,29 ffc057ac: 39 29 00 13 addi r9,r9,19 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) ffc057b0: 80 01 00 1c lwz r0,28(r1) return 0; ffc057b4: 3b e0 00 00 li r31,0 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) ffc057b8: 7f 80 48 40 cmplw cr7,r0,r9 ffc057bc: 41 bc ff 38 blt- cr7,ffc056f4 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); ffc057c0: 81 21 00 18 lwz r9,24(r1) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc057c4: 39 40 00 04 li r10,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); ffc057c8: 39 29 00 0f addi r9,r9,15 ffc057cc: 55 29 00 36 rlwinm r9,r9,0,0,27 ffc057d0: 91 3d 00 0c stw r9,12(r29) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; ffc057d4: 91 09 00 00 stw r8,0(r9) for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc057d8: 81 61 00 08 lwz r11,8(r1) ffc057dc: 88 0b 00 00 lbz r0,0(r11) ffc057e0: 2f 80 00 00 cmpwi cr7,r0,0 ffc057e4: 41 9e 00 48 beq- cr7,ffc0582c <== NEVER TAKEN } /* * Extract a single group record from the database */ static int scangr( ffc057e8: 39 2b 00 01 addi r9,r11,1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc057ec: 39 40 00 01 li r10,1 if(*cp == ',') { *cp = '\0'; ffc057f0: 38 e0 00 00 li r7,0 ffc057f4: 48 00 00 14 b ffc05808 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc057f8: 8c 0b 00 01 lbzu r0,1(r11) ffc057fc: 39 29 00 01 addi r9,r9,1 ffc05800: 2f 80 00 00 cmpwi cr7,r0,0 ffc05804: 41 9e 00 24 beq- cr7,ffc05828 if(*cp == ',') { ffc05808: 2f 80 00 2c cmpwi cr7,r0,44 ffc0580c: 40 9e ff ec bne+ cr7,ffc057f8 *cp = '\0'; ffc05810: 98 e9 ff ff stb r7,-1(r9) grp->gr_mem[memcount++] = cp + 1; ffc05814: 55 40 10 3a rlwinm r0,r10,2,0,29 ffc05818: 39 4a 00 01 addi r10,r10,1 ffc0581c: 81 1d 00 0c lwz r8,12(r29) ffc05820: 7d 28 01 2e stwx r9,r8,r0 ffc05824: 4b ff ff d4 b ffc057f8 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05828: 55 4a 10 3a rlwinm r10,r10,2,0,29 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; ffc0582c: 81 3d 00 0c lwz r9,12(r29) ffc05830: 38 00 00 00 li r0,0 return 1; ffc05834: 3b e0 00 01 li r31,1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; ffc05838: 7c 09 51 2e stwx r0,r9,r10 return 1; ffc0583c: 4b ff fe b8 b ffc056f4 =============================================================================== ffc05840 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05840: 94 21 ff d0 stwu r1,-48(r1) ffc05844: 7c 08 02 a6 mflr r0 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05848: 38 e0 00 00 li r7,0 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc0584c: 90 a1 00 18 stw r5,24(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05850: 38 a1 00 18 addi r5,r1,24 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05854: 90 c1 00 1c stw r6,28(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05858: 38 c1 00 1c addi r6,r1,28 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc0585c: 93 a1 00 24 stw r29,36(r1) ffc05860: 7c 9d 23 78 mr r29,r4 ffc05864: 93 c1 00 28 stw r30,40(r1) ffc05868: 7c 7e 1b 78 mr r30,r3 ffc0586c: 93 e1 00 2c stw r31,44(r1) || !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; ffc05870: 3b e0 00 00 li r31,0 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05874: 90 01 00 34 stw r0,52(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05878: 4b ff fc bd bl ffc05534 ffc0587c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05880: 40 9e 00 24 bne- cr7,ffc058a4 || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } ffc05884: 80 01 00 34 lwz r0,52(r1) ffc05888: 7f e3 fb 78 mr r3,r31 ffc0588c: 83 a1 00 24 lwz r29,36(r1) ffc05890: 7c 08 03 a6 mtlr r0 ffc05894: 83 c1 00 28 lwz r30,40(r1) ffc05898: 83 e1 00 2c lwz r31,44(r1) ffc0589c: 38 21 00 30 addi r1,r1,48 ffc058a0: 4e 80 00 20 blr ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) ffc058a4: 7f c3 f3 78 mr r3,r30 ffc058a8: 38 9d 00 04 addi r4,r29,4 ffc058ac: 38 a1 00 18 addi r5,r1,24 ffc058b0: 38 c1 00 1c addi r6,r1,28 ffc058b4: 38 e0 00 00 li r7,0 ffc058b8: 4b ff fc 7d bl ffc05534 ffc058bc: 2f 83 00 00 cmpwi cr7,r3,0 ffc058c0: 41 9e ff c4 beq+ cr7,ffc05884 <== NEVER TAKEN || !scanInt(fp, &pwuid) ffc058c4: 7f c3 f3 78 mr r3,r30 ffc058c8: 38 81 00 0c addi r4,r1,12 ffc058cc: 4b ff fa e1 bl ffc053ac ffc058d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc058d4: 41 9e ff b0 beq+ cr7,ffc05884 || !scanInt(fp, &pwgid) ffc058d8: 7f c3 f3 78 mr r3,r30 ffc058dc: 38 81 00 08 addi r4,r1,8 ffc058e0: 4b ff fa cd bl ffc053ac ffc058e4: 2f 83 00 00 cmpwi cr7,r3,0 ffc058e8: 41 9e ff 9c beq+ cr7,ffc05884 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) ffc058ec: 7f c3 f3 78 mr r3,r30 ffc058f0: 38 9d 00 0c addi r4,r29,12 ffc058f4: 38 a1 00 18 addi r5,r1,24 ffc058f8: 38 c1 00 1c addi r6,r1,28 ffc058fc: 38 e0 00 00 li r7,0 ffc05900: 4b ff fc 35 bl ffc05534 ffc05904: 2f 83 00 00 cmpwi cr7,r3,0 ffc05908: 41 9e ff 7c beq+ cr7,ffc05884 <== NEVER TAKEN || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) ffc0590c: 7f c3 f3 78 mr r3,r30 ffc05910: 38 9d 00 10 addi r4,r29,16 ffc05914: 38 a1 00 18 addi r5,r1,24 ffc05918: 38 c1 00 1c addi r6,r1,28 ffc0591c: 38 e0 00 00 li r7,0 ffc05920: 4b ff fc 15 bl ffc05534 ffc05924: 2f 83 00 00 cmpwi cr7,r3,0 ffc05928: 41 9e ff 5c beq+ cr7,ffc05884 <== NEVER TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) ffc0592c: 7f c3 f3 78 mr r3,r30 ffc05930: 38 9d 00 14 addi r4,r29,20 ffc05934: 38 a1 00 18 addi r5,r1,24 ffc05938: 38 c1 00 1c addi r6,r1,28 ffc0593c: 38 e0 00 00 li r7,0 ffc05940: 4b ff fb f5 bl ffc05534 ffc05944: 2f 83 00 00 cmpwi cr7,r3,0 ffc05948: 41 9e ff 3c beq+ cr7,ffc05884 <== NEVER TAKEN || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) ffc0594c: 7f c3 f3 78 mr r3,r30 ffc05950: 38 9d 00 18 addi r4,r29,24 ffc05954: 38 a1 00 18 addi r5,r1,24 ffc05958: 38 c1 00 1c addi r6,r1,28 ffc0595c: 38 e0 00 01 li r7,1 ffc05960: 4b ff fb d5 bl ffc05534 ffc05964: 2f 83 00 00 cmpwi cr7,r3,0 ffc05968: 41 be ff 1c beq- cr7,ffc05884 return 0; pwd->pw_uid = pwuid; ffc0596c: 80 01 00 0c lwz r0,12(r1) pwd->pw_gid = pwgid; return 1; ffc05970: 3b e0 00 01 li r31,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; ffc05974: b0 1d 00 08 sth r0,8(r29) pwd->pw_gid = pwgid; ffc05978: 80 01 00 08 lwz r0,8(r1) ffc0597c: b0 1d 00 0a sth r0,10(r29) return 1; ffc05980: 4b ff ff 04 b ffc05884 =============================================================================== ffc078cc : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { ffc078cc: 94 21 ff f0 stwu r1,-16(r1) ffc078d0: 7c 08 02 a6 mflr r0 ffc078d4: 90 01 00 14 stw r0,20(r1) int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { ffc078d8: 80 04 00 3c lwz r0,60(r4) /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { ffc078dc: 93 c1 00 08 stw r30,8(r1) ffc078e0: 7c 7e 1b 78 mr r30,r3 int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { ffc078e4: 70 09 0e 78 andi. r9,r0,3704 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { ffc078e8: 93 e1 00 0c stw r31,12(r1) ffc078ec: 7c 9f 23 78 mr r31,r4 int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { ffc078f0: 40 82 00 1c bne- ffc0790c <== ALWAYS TAKEN } else { i = iproc (c, tty); } return i; } ffc078f4: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc078f8: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc078fc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc07900: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc07904: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); ffc07908: 4b ff fd d8 b ffc076e0 <== 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); ffc0790c: 80 64 00 18 lwz r3,24(r4) ffc07910: 38 a0 00 00 li r5,0 ffc07914: 38 80 00 00 li r4,0 ffc07918: 48 00 1a 25 bl ffc0933c i = iproc (c, tty); ffc0791c: 7f e4 fb 78 mr r4,r31 ffc07920: 7f c3 f3 78 mr r3,r30 ffc07924: 4b ff fd bd bl ffc076e0 ffc07928: 7c 7e 1b 78 mr r30,r3 rtems_semaphore_release (tty->osem); ffc0792c: 80 7f 00 18 lwz r3,24(r31) ffc07930: 48 00 1b 99 bl ffc094c8 } else { i = iproc (c, tty); } return i; } ffc07934: 80 01 00 14 lwz r0,20(r1) ffc07938: 7f c3 f3 78 mr r3,r30 ffc0793c: 83 e1 00 0c lwz r31,12(r1) ffc07940: 7c 08 03 a6 mtlr r0 ffc07944: 83 c1 00 08 lwz r30,8(r1) ffc07948: 38 21 00 10 addi r1,r1,16 ffc0794c: 4e 80 00 20 blr =============================================================================== ffc08d8c : #include int statvfs (const char *path, struct statvfs *sb) { ffc08d8c: 94 21 ff d0 stwu r1,-48(r1) ffc08d90: 7c 08 02 a6 mflr r0 ffc08d94: 93 c1 00 28 stw r30,40(r1) ffc08d98: 7c 7e 1b 78 mr r30,r3 ffc08d9c: 90 01 00 34 stw r0,52(r1) ffc08da0: 93 e1 00 2c stw r31,44(r1) ffc08da4: 7c 9f 23 78 mr r31,r4 * 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 ) ) ffc08da8: 48 00 ee 81 bl ffc17c28 ffc08dac: 38 a0 00 00 li r5,0 ffc08db0: 7c 64 1b 78 mr r4,r3 ffc08db4: 38 c1 00 08 addi r6,r1,8 ffc08db8: 7f c3 f3 78 mr r3,r30 ffc08dbc: 38 e0 00 01 li r7,1 ffc08dc0: 4b ff e6 3d bl ffc073fc return -1; ffc08dc4: 3b c0 ff ff li r30,-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 ) ) ffc08dc8: 2f 83 00 00 cmpwi cr7,r3,0 ffc08dcc: 40 9e 00 3c bne- cr7,ffc08e08 <== NEVER TAKEN return -1; mt_entry = loc.mt_entry; ffc08dd0: 83 c1 00 18 lwz r30,24(r1) fs_mount_root = &mt_entry->mt_fs_root; memset (sb, 0, sizeof (struct statvfs)); ffc08dd4: 38 80 00 00 li r4,0 ffc08dd8: 38 a0 00 38 li r5,56 ffc08ddc: 7f e3 fb 78 mr r3,r31 ffc08de0: 48 00 dc 1d bl ffc169fc result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); ffc08de4: 81 3e 00 28 lwz r9,40(r30) ffc08de8: 38 7e 00 1c addi r3,r30,28 ffc08dec: 80 09 00 44 lwz r0,68(r9) ffc08df0: 7f e4 fb 78 mr r4,r31 ffc08df4: 7c 09 03 a6 mtctr r0 ffc08df8: 4e 80 04 21 bctrl ffc08dfc: 7c 7e 1b 78 mr r30,r3 rtems_filesystem_freenode( &loc ); ffc08e00: 38 61 00 08 addi r3,r1,8 ffc08e04: 4b ff e7 55 bl ffc07558 return result; } ffc08e08: 80 01 00 34 lwz r0,52(r1) ffc08e0c: 7f c3 f3 78 mr r3,r30 ffc08e10: 83 e1 00 2c lwz r31,44(r1) ffc08e14: 7c 08 03 a6 mtlr r0 ffc08e18: 83 c1 00 28 lwz r30,40(r1) ffc08e1c: 38 21 00 30 addi r1,r1,48 ffc08e20: 4e 80 00 20 blr =============================================================================== ffc07590 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { ffc07590: 94 21 ff f0 stwu r1,-16(r1) ffc07594: 7c 08 02 a6 mflr r0 ffc07598: 90 01 00 14 stw r0,20(r1) /* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; ffc0759c: 80 03 01 28 lwz r0,296(r3) fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { ffc075a0: 93 c1 00 08 stw r30,8(r1) /* * 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 ) { ffc075a4: 2f 80 00 00 cmpwi cr7,r0,0 fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { ffc075a8: 93 e1 00 0c stw r31,12(r1) /* * 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 ) { ffc075ac: 41 9e 00 30 beq- cr7,ffc075dc <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; ffc075b0: 3f e0 00 00 lis r31,0 ffc075b4: 3b ff 2d 98 addi r31,r31,11672 ffc075b8: 81 3f 00 0c lwz r9,12(r31) _Thread_Executing->libc_reent = this_reent; _fwalk (t->libc_reent, sync_wrapper); ffc075bc: 3c 80 ff c0 lis r4,-64 ffc075c0: 38 84 75 f4 addi r4,r4,30196 * 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; ffc075c4: 83 c9 01 28 lwz r30,296(r9) _Thread_Executing->libc_reent = this_reent; ffc075c8: 90 09 01 28 stw r0,296(r9) _fwalk (t->libc_reent, sync_wrapper); ffc075cc: 80 63 01 28 lwz r3,296(r3) ffc075d0: 48 00 d4 e1 bl ffc14ab0 <_fwalk> _Thread_Executing->libc_reent = current_reent; ffc075d4: 81 3f 00 0c lwz r9,12(r31) ffc075d8: 93 c9 01 28 stw r30,296(r9) } } ffc075dc: 80 01 00 14 lwz r0,20(r1) ffc075e0: 83 c1 00 08 lwz r30,8(r1) ffc075e4: 7c 08 03 a6 mtlr r0 ffc075e8: 83 e1 00 0c lwz r31,12(r1) ffc075ec: 38 21 00 10 addi r1,r1,16 ffc075f0: 4e 80 00 20 blr =============================================================================== ffc11020 : int fd, int opt, struct termios *tp ) { switch (opt) { ffc11020: 2c 04 00 00 cmpwi r4,0 int tcsetattr( int fd, int opt, struct termios *tp ) { ffc11024: 94 21 ff f0 stwu r1,-16(r1) ffc11028: 7c 08 02 a6 mflr r0 ffc1102c: 93 c1 00 08 stw r30,8(r1) ffc11030: 7c 7e 1b 78 mr r30,r3 ffc11034: 93 e1 00 0c stw r31,12(r1) ffc11038: 7c bf 2b 78 mr r31,r5 ffc1103c: 90 01 00 14 stw r0,20(r1) switch (opt) { ffc11040: 41 82 00 50 beq- ffc11090 ffc11044: 2f 84 00 01 cmpwi cr7,r4,1 ffc11048: 41 9e 00 2c beq- cr7,ffc11074 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc1104c: 48 00 3c 01 bl ffc14c4c <__errno> ffc11050: 38 00 00 86 li r0,134 ffc11054: 90 03 00 00 stw r0,0(r3) ffc11058: 38 60 ff ff li r3,-1 * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } ffc1105c: 80 01 00 14 lwz r0,20(r1) ffc11060: 83 c1 00 08 lwz r30,8(r1) ffc11064: 7c 08 03 a6 mtlr r0 ffc11068: 83 e1 00 0c lwz r31,12(r1) ffc1106c: 38 21 00 10 addi r1,r1,16 ffc11070: 4e 80 00 20 blr switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) ffc11074: 38 80 00 03 li r4,3 ffc11078: 38 a0 00 00 li r5,0 ffc1107c: 4c c6 31 82 crclr 4*cr1+eq ffc11080: 4b ff fa 01 bl ffc10a80 ffc11084: 2f 83 00 00 cmpwi cr7,r3,0 return -1; ffc11088: 38 60 ff ff li r3,-1 switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) ffc1108c: 41 9c 00 18 blt- cr7,ffc110a4 <== NEVER TAKEN return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); ffc11090: 7f c3 f3 78 mr r3,r30 ffc11094: 38 80 00 02 li r4,2 ffc11098: 7f e5 fb 78 mr r5,r31 ffc1109c: 4c c6 31 82 crclr 4*cr1+eq ffc110a0: 4b ff f9 e1 bl ffc10a80 } } ffc110a4: 80 01 00 14 lwz r0,20(r1) ffc110a8: 83 c1 00 08 lwz r30,8(r1) ffc110ac: 7c 08 03 a6 mtlr r0 ffc110b0: 83 e1 00 0c lwz r31,12(r1) ffc110b4: 38 21 00 10 addi r1,r1,16 ffc110b8: 4e 80 00 20 blr =============================================================================== ffc09318 : #include int unlink( const char *path ) { ffc09318: 94 21 ff b0 stwu r1,-80(r1) ffc0931c: 7c 08 02 a6 mflr r0 ffc09320: 93 a1 00 44 stw r29,68(r1) ffc09324: 93 c1 00 48 stw r30,72(r1) */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); ffc09328: 3b c1 00 20 addi r30,r1,32 #include int unlink( const char *path ) { ffc0932c: 93 e1 00 4c stw r31,76(r1) ffc09330: 7c 7f 1b 78 mr r31,r3 ffc09334: 90 01 00 54 stw r0,84(r1) ffc09338: 93 61 00 3c stw r27,60(r1) ffc0933c: 93 81 00 40 stw r28,64(r1) /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); ffc09340: 4b ff c8 35 bl ffc05b74 if ( parentpathlen == 0 ) ffc09344: 7c 7d 1b 79 mr. r29,r3 rtems_filesystem_get_start_loc( path, &i, &parentloc ); ffc09348: 7f e3 fb 78 mr r3,r31 * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) ffc0934c: 40 82 00 b8 bne- ffc09404 rtems_filesystem_get_start_loc( path, &i, &parentloc ); ffc09350: 38 81 00 08 addi r4,r1,8 ffc09354: 7f c5 f3 78 mr r5,r30 ffc09358: 4b ff dc b9 bl ffc07010 ffc0935c: 3b a0 00 00 li r29,0 const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; ffc09360: 3b 80 00 00 li r28,0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc09364: 80 01 00 20 lwz r0,32(r1) name = path + parentpathlen; ffc09368: 7f ff ea 14 add r31,r31,r29 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc0936c: 7f e3 fb 78 mr r3,r31 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc09370: 90 01 00 0c stw r0,12(r1) ffc09374: 80 01 00 24 lwz r0,36(r1) ffc09378: 90 01 00 10 stw r0,16(r1) ffc0937c: 80 01 00 28 lwz r0,40(r1) ffc09380: 90 01 00 14 stw r0,20(r1) ffc09384: 80 01 00 2c lwz r0,44(r1) ffc09388: 90 01 00 18 stw r0,24(r1) ffc0938c: 80 01 00 30 lwz r0,48(r1) ffc09390: 90 01 00 1c stw r0,28(r1) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc09394: 48 00 ef dd bl ffc18370 ffc09398: 7c 64 1b 78 mr r4,r3 ffc0939c: 7f e3 fb 78 mr r3,r31 ffc093a0: 4b ff c8 35 bl ffc05bd4 ffc093a4: 7f ff 1a 14 add r31,r31,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc093a8: 7f e3 fb 78 mr r3,r31 ffc093ac: 48 00 ef c5 bl ffc18370 ffc093b0: 38 a0 00 00 li r5,0 ffc093b4: 7c 64 1b 78 mr r4,r3 ffc093b8: 38 c1 00 0c addi r6,r1,12 ffc093bc: 7f e3 fb 78 mr r3,r31 ffc093c0: 38 e0 00 00 li r7,0 ffc093c4: 4b ff c6 89 bl ffc05a4c 0, &loc, false ); if ( result != 0 ) { ffc093c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc093cc: 41 9e 00 60 beq- cr7,ffc0942c if ( free_parentloc ) ffc093d0: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_filesystem_freenode( &parentloc ); return -1; ffc093d4: 3b 60 ff ff li r27,-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 ) ffc093d8: 40 9e 00 9c bne- cr7,ffc09474 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } ffc093dc: 80 01 00 54 lwz r0,84(r1) ffc093e0: 7f 63 db 78 mr r3,r27 ffc093e4: 83 81 00 40 lwz r28,64(r1) ffc093e8: 7c 08 03 a6 mtlr r0 ffc093ec: 83 61 00 3c lwz r27,60(r1) ffc093f0: 83 a1 00 44 lwz r29,68(r1) ffc093f4: 83 c1 00 48 lwz r30,72(r1) ffc093f8: 83 e1 00 4c lwz r31,76(r1) ffc093fc: 38 21 00 50 addi r1,r1,80 ffc09400: 4e 80 00 20 blr parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, ffc09404: 7f a4 eb 78 mr r4,r29 ffc09408: 38 a0 00 02 li r5,2 ffc0940c: 7f c6 f3 78 mr r6,r30 ffc09410: 38 e0 00 00 li r7,0 ffc09414: 4b ff c6 e5 bl ffc05af8 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) return -1; ffc09418: 3b 60 ff ff li r27,-1 else { result = rtems_filesystem_evaluate_path( path, parentpathlen, RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) ffc0941c: 2f 83 00 00 cmpwi cr7,r3,0 ffc09420: 40 be ff bc bne- cr7,ffc093dc <== NEVER TAKEN return -1; free_parentloc = true; ffc09424: 3b 80 00 01 li r28,1 ffc09428: 4b ff ff 3c b ffc09364 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { ffc0942c: 81 21 00 18 lwz r9,24(r1) ffc09430: 38 61 00 0c addi r3,r1,12 ffc09434: 80 09 00 10 lwz r0,16(r9) ffc09438: 7c 09 03 a6 mtctr r0 ffc0943c: 4e 80 04 21 bctrl ffc09440: 2f 83 00 01 cmpwi cr7,r3,1 ffc09444: 41 9e 00 60 beq- cr7,ffc094a4 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); ffc09448: 81 21 00 18 lwz r9,24(r1) ffc0944c: 38 81 00 0c addi r4,r1,12 ffc09450: 7f c3 f3 78 mr r3,r30 ffc09454: 80 09 00 0c lwz r0,12(r9) ffc09458: 7c 09 03 a6 mtctr r0 ffc0945c: 4e 80 04 21 bctrl ffc09460: 7c 7b 1b 78 mr r27,r3 rtems_filesystem_freenode( &loc ); ffc09464: 38 61 00 0c addi r3,r1,12 ffc09468: 4b ff c7 ed bl ffc05c54 if ( free_parentloc ) ffc0946c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc09470: 41 9e ff 6c beq+ cr7,ffc093dc rtems_filesystem_freenode( &parentloc ); ffc09474: 7f c3 f3 78 mr r3,r30 ffc09478: 4b ff c7 dd bl ffc05c54 return result; } ffc0947c: 80 01 00 54 lwz r0,84(r1) ffc09480: 7f 63 db 78 mr r3,r27 ffc09484: 83 81 00 40 lwz r28,64(r1) ffc09488: 7c 08 03 a6 mtlr r0 ffc0948c: 83 61 00 3c lwz r27,60(r1) ffc09490: 83 a1 00 44 lwz r29,68(r1) ffc09494: 83 c1 00 48 lwz r30,72(r1) ffc09498: 83 e1 00 4c lwz r31,76(r1) ffc0949c: 38 21 00 50 addi r1,r1,80 ffc094a0: 4e 80 00 20 blr rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); ffc094a4: 38 61 00 0c addi r3,r1,12 ffc094a8: 4b ff c7 ad bl ffc05c54 if ( free_parentloc ) ffc094ac: 2f 9c 00 00 cmpwi cr7,r28,0 ffc094b0: 41 be 00 0c beq+ cr7,ffc094bc rtems_filesystem_freenode( &parentloc ); ffc094b4: 7f c3 f3 78 mr r3,r30 ffc094b8: 4b ff c7 9d bl ffc05c54 rtems_set_errno_and_return_minus_one( EISDIR ); ffc094bc: 48 00 dd 39 bl ffc171f4 <__errno> ffc094c0: 38 00 00 15 li r0,21 ffc094c4: 90 03 00 00 stw r0,0(r3) ffc094c8: 3b 60 ff ff li r27,-1 ffc094cc: 4b ff ff 10 b ffc093dc =============================================================================== ffc08494 : */ int unmount( const char *path ) { ffc08494: 94 21 ff d0 stwu r1,-48(r1) ffc08498: 7c 08 02 a6 mflr r0 ffc0849c: 93 e1 00 2c stw r31,44(r1) ffc084a0: 7c 7f 1b 78 mr r31,r3 ffc084a4: 90 01 00 34 stw r0,52(r1) ffc084a8: 93 c1 00 28 stw r30,40(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 ) ) ffc084ac: 48 00 b0 25 bl ffc134d0 ffc084b0: 7c 64 1b 78 mr r4,r3 ffc084b4: 38 a0 00 00 li r5,0 ffc084b8: 7f e3 fb 78 mr r3,r31 ffc084bc: 38 c1 00 08 addi r6,r1,8 ffc084c0: 38 e0 00 01 li r7,1 ffc084c4: 4b ff c4 e9 bl ffc049ac ffc084c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc084cc: 40 9e 01 38 bne- cr7,ffc08604 return -1; mt_entry = loc.mt_entry; ffc084d0: 83 e1 00 18 lwz r31,24(r1) /* * 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 ); ffc084d4: 38 61 00 08 addi r3,r1,8 /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ ffc084d8: 80 01 00 08 lwz r0,8(r1) ffc084dc: 81 3f 00 1c lwz r9,28(r31) ffc084e0: 7f 89 00 00 cmpw cr7,r9,r0 ffc084e4: 40 9e 00 f4 bne- cr7,ffc085d8 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); ffc084e8: 4b ff c6 21 bl ffc04b08 * 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 ) ffc084ec: 3d 20 00 00 lis r9,0 ffc084f0: 81 29 26 f8 lwz r9,9976(r9) ffc084f4: 80 09 00 14 lwz r0,20(r9) ffc084f8: 7f 80 f8 00 cmpw cr7,r0,r31 ffc084fc: 41 9e 01 24 beq- cr7,ffc08620 /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, ffc08500: 80 9f 00 2c lwz r4,44(r31) ffc08504: 3c 60 ff c1 lis r3,-63 ffc08508: 38 63 84 80 addi r3,r3,-31616 ffc0850c: 4b ff d0 49 bl ffc05554 ffc08510: 2f 83 00 00 cmpwi cr7,r3,0 ffc08514: 40 9e 01 0c bne- cr7,ffc08620 * 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 ) ffc08518: 7f e3 fb 78 mr r3,r31 ffc0851c: 4b ff ca 59 bl ffc04f74 ffc08520: 2f 83 00 01 cmpwi cr7,r3,1 ffc08524: 41 9e 00 fc beq- cr7,ffc08620 * 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 ) ffc08528: 81 3f 00 14 lwz r9,20(r31) ffc0852c: 7f e3 fb 78 mr r3,r31 ffc08530: 80 09 00 28 lwz r0,40(r9) ffc08534: 7c 09 03 a6 mtctr r0 ffc08538: 4e 80 04 21 bctrl ffc0853c: 2f 83 00 00 cmpwi cr7,r3,0 ffc08540: 40 9e 00 c4 bne- cr7,ffc08604 <== NEVER TAKEN * 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){ ffc08544: 81 3f 00 28 lwz r9,40(r31) ffc08548: 7f e3 fb 78 mr r3,r31 ffc0854c: 80 09 00 2c lwz r0,44(r9) ffc08550: 7c 09 03 a6 mtctr r0 ffc08554: 4e 80 04 21 bctrl ffc08558: 2f 83 00 00 cmpwi cr7,r3,0 ffc0855c: 40 9e 00 54 bne- cr7,ffc085b0 <== 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 ); ffc08560: 3f c0 00 00 lis r30,0 ffc08564: 80 7e 27 6c lwz r3,10092(r30) ffc08568: 38 80 00 00 li r4,0 ffc0856c: 38 a0 00 00 li r5,0 ffc08570: 48 00 0d b5 bl ffc09324 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc08574: 7f e3 fb 78 mr r3,r31 ffc08578: 48 00 1b 49 bl ffc0a0c0 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0857c: 80 7e 27 6c lwz r3,10092(r30) ffc08580: 48 00 0f 31 bl ffc094b0 /* * 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 ); ffc08584: 38 7f 00 08 addi r3,r31,8 ffc08588: 4b ff c5 81 bl ffc04b08 free( mt_entry ); ffc0858c: 7f e3 fb 78 mr r3,r31 ffc08590: 4b ff c5 a5 bl ffc04b34 return 0; ffc08594: 38 60 00 00 li r3,0 } ffc08598: 80 01 00 34 lwz r0,52(r1) ffc0859c: 83 c1 00 28 lwz r30,40(r1) ffc085a0: 7c 08 03 a6 mtlr r0 ffc085a4: 83 e1 00 2c lwz r31,44(r1) ffc085a8: 38 21 00 30 addi r1,r1,48 ffc085ac: 4e 80 00 20 blr * 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 ) ffc085b0: 81 3f 00 14 lwz r9,20(r31) <== NOT EXECUTED ffc085b4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc085b8: 80 09 00 20 lwz r0,32(r9) <== NOT EXECUTED ffc085bc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc085c0: 4e 80 04 21 bctrl <== NOT EXECUTED ffc085c4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); return -1; ffc085c8: 38 60 ff ff li r3,-1 <== NOT EXECUTED * 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 ) ffc085cc: 41 9e ff cc beq+ cr7,ffc08598 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); ffc085d0: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc085d4: 48 00 16 69 bl ffc09c3c <== NOT EXECUTED /* * 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 ); ffc085d8: 4b ff c5 31 bl ffc04b08 rtems_set_errno_and_return_minus_one( EACCES ); ffc085dc: 48 00 9d 79 bl ffc12354 <__errno> ffc085e0: 38 00 00 0d li r0,13 ffc085e4: 90 03 00 00 stw r0,0(r3) ffc085e8: 38 60 ff ff li r3,-1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } ffc085ec: 80 01 00 34 lwz r0,52(r1) ffc085f0: 83 c1 00 28 lwz r30,40(r1) ffc085f4: 7c 08 03 a6 mtlr r0 ffc085f8: 83 e1 00 2c lwz r31,44(r1) ffc085fc: 38 21 00 30 addi r1,r1,48 ffc08600: 4e 80 00 20 blr ffc08604: 80 01 00 34 lwz r0,52(r1) * 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 ) return -1; ffc08608: 38 60 ff ff li r3,-1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } ffc0860c: 83 c1 00 28 lwz r30,40(r1) ffc08610: 7c 08 03 a6 mtlr r0 ffc08614: 83 e1 00 2c lwz r31,44(r1) ffc08618: 38 21 00 30 addi r1,r1,48 ffc0861c: 4e 80 00 20 blr * 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 ); ffc08620: 48 00 9d 35 bl ffc12354 <__errno> ffc08624: 38 00 00 10 li r0,16 ffc08628: 90 03 00 00 stw r0,0(r3) ffc0862c: 38 60 ff ff li r3,-1 ffc08630: 4b ff ff 68 b ffc08598 =============================================================================== ffc0869c : */ void vprintk( const char *fmt, va_list ap ) { ffc0869c: 94 21 ff a8 stwu r1,-88(r1) ffc086a0: 7d 80 00 26 mfcr r12 ffc086a4: 7c 08 02 a6 mflr r0 ffc086a8: 93 01 00 38 stw r24,56(r1) ffc086ac: 7c 98 23 78 mr r24,r4 ffc086b0: 93 e1 00 54 stw r31,84(r1) ffc086b4: 7c 7f 1b 78 mr r31,r3 ffc086b8: 90 01 00 5c stw r0,92(r1) ffc086bc: 92 a1 00 2c stw r21,44(r1) ffc086c0: 92 c1 00 30 stw r22,48(r1) ffc086c4: 92 e1 00 34 stw r23,52(r1) ffc086c8: 93 21 00 3c stw r25,60(r1) ffc086cc: 93 41 00 40 stw r26,64(r1) ffc086d0: 93 61 00 44 stw r27,68(r1) ffc086d4: 93 81 00 48 stw r28,72(r1) ffc086d8: 93 a1 00 4c stw r29,76(r1) ffc086dc: 93 c1 00 50 stw r30,80(r1) ffc086e0: 91 81 00 28 stw r12,40(r1) for (; *fmt != '\0'; fmt++) { ffc086e4: 88 63 00 00 lbz r3,0(r3) ffc086e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc086ec: 41 9e 01 04 beq- cr7,ffc087f0 <== NEVER TAKEN bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); ffc086f0: 3e e0 00 00 lis r23,0 * console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk( ffc086f4: 3b a1 00 08 addi r29,r1,8 ffc086f8: 3e c0 ff c2 lis r22,-62 char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { str = ""; ffc086fc: 3e a0 ff c2 lis r21,-62 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { ffc08700: 2f 83 00 25 cmpwi cr7,r3,37 ffc08704: 40 9e 00 d0 bne- cr7,ffc087d4 BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { ffc08708: 88 7f 00 01 lbz r3,1(r31) ffc0870c: 2f 83 00 30 cmpwi cr7,r3,48 ffc08710: 41 9e 02 24 beq- cr7,ffc08934 if (*fmt != '%') { BSP_output_char(*fmt); continue; } fmt++; ffc08714: 3b ff 00 01 addi r31,r31,1 unsigned base = 0; unsigned width = 0; bool lflag = false; bool minus = false; bool sign = false; char lead = ' '; ffc08718: 3b 40 00 20 li r26,32 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { ffc0871c: 2f 83 00 2d cmpwi cr7,r3,45 { for (; *fmt != '\0'; fmt++) { unsigned base = 0; unsigned width = 0; bool lflag = false; bool minus = false; ffc08720: 39 60 00 00 li r11,0 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { ffc08724: 41 9e 02 00 beq- cr7,ffc08924 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc08728: 38 03 ff d0 addi r0,r3,-48 ffc0872c: 54 00 06 3e clrlwi r0,r0,24 ffc08730: 2b 80 00 09 cmplwi cr7,r0,9 ffc08734: 3b c0 00 00 li r30,0 ffc08738: 41 9d 00 2c bgt- cr7,ffc08764 ffc0873c: 7f e9 fb 78 mr r9,r31 width *= 10; ffc08740: 1f de 00 0a mulli r30,r30,10 width += ((unsigned) *fmt - '0'); ffc08744: 7f de 1a 14 add r30,r30,r3 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc08748: 8c 69 00 01 lbzu r3,1(r9) width *= 10; width += ((unsigned) *fmt - '0'); ffc0874c: 3b de ff d0 addi r30,r30,-48 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc08750: 38 03 ff d0 addi r0,r3,-48 ffc08754: 54 00 06 3e clrlwi r0,r0,24 ffc08758: 2b 80 00 09 cmplwi cr7,r0,9 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; ffc0875c: 3b ff 00 01 addi r31,r31,1 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc08760: 40 9d ff e0 ble+ cr7,ffc08740 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { ffc08764: 2f 83 00 6c cmpwi cr7,r3,108 ffc08768: 41 9e 02 20 beq- cr7,ffc08988 lflag = true; c = *++fmt; } if ( c == 'c' ) { ffc0876c: 2f 83 00 63 cmpwi cr7,r3,99 ffc08770: 41 9e 01 d4 beq- cr7,ffc08944 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); continue; } if ( c == 's' ) { ffc08774: 2f 83 00 73 cmpwi cr7,r3,115 ffc08778: 41 9e 02 38 beq- cr7,ffc089b0 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { ffc0877c: 2f 83 00 6f cmpwi cr7,r3,111 ffc08780: 41 9e 02 24 beq- cr7,ffc089a4 ffc08784: 2f 83 00 4f cmpwi cr7,r3,79 ffc08788: 41 9e 02 1c beq- cr7,ffc089a4 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || ffc0878c: 2f 83 00 69 cmpwi cr7,r3,105 ffc08790: 41 9e 00 a4 beq- cr7,ffc08834 ffc08794: 2f 83 00 49 cmpwi cr7,r3,73 ffc08798: 41 9e 00 9c beq- cr7,ffc08834 ffc0879c: 2f 83 00 64 cmpwi cr7,r3,100 ffc087a0: 41 9e 00 94 beq- cr7,ffc08834 c == 'd' || c == 'D' ) { ffc087a4: 2f 83 00 44 cmpwi cr7,r3,68 ffc087a8: 41 9e 00 8c beq- cr7,ffc08834 base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { ffc087ac: 2f 83 00 75 cmpwi cr7,r3,117 ffc087b0: 41 9e 03 40 beq- cr7,ffc08af0 ffc087b4: 2f 83 00 55 cmpwi cr7,r3,85 ffc087b8: 41 9e 03 38 beq- cr7,ffc08af0 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { ffc087bc: 2f 83 00 78 cmpwi cr7,r3,120 ffc087c0: 41 9e 03 3c beq- cr7,ffc08afc ffc087c4: 2f 83 00 58 cmpwi cr7,r3,88 ffc087c8: 41 9e 03 34 beq- cr7,ffc08afc base = 16; sign = false; } else if ( c == 'p' ) { ffc087cc: 2f 83 00 70 cmpwi cr7,r3,112 ffc087d0: 41 9e 03 2c beq- cr7,ffc08afc base = 16; sign = false; lflag = true; } else { BSP_output_char(c); ffc087d4: 80 17 27 34 lwz r0,10036(r23) ffc087d8: 7c 09 03 a6 mtctr r0 ffc087dc: 4e 80 04 21 bctrl void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { ffc087e0: 88 7f 00 01 lbz r3,1(r31) ffc087e4: 3b ff 00 01 addi r31,r31,1 ffc087e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc087ec: 40 9e ff 14 bne+ cr7,ffc08700 sign, width, lead ); } } ffc087f0: 80 01 00 5c lwz r0,92(r1) ffc087f4: 81 81 00 28 lwz r12,40(r1) ffc087f8: 7c 08 03 a6 mtlr r0 ffc087fc: 82 a1 00 2c lwz r21,44(r1) ffc08800: 82 c1 00 30 lwz r22,48(r1) ffc08804: 7d 80 81 20 mtcrf 8,r12 ffc08808: 82 e1 00 34 lwz r23,52(r1) ffc0880c: 83 01 00 38 lwz r24,56(r1) ffc08810: 83 21 00 3c lwz r25,60(r1) ffc08814: 83 41 00 40 lwz r26,64(r1) ffc08818: 83 61 00 44 lwz r27,68(r1) ffc0881c: 83 81 00 48 lwz r28,72(r1) ffc08820: 83 a1 00 4c lwz r29,76(r1) ffc08824: 83 c1 00 50 lwz r30,80(r1) ffc08828: 83 e1 00 54 lwz r31,84(r1) ffc0882c: 38 21 00 58 addi r1,r1,88 ffc08830: 4e 80 00 20 blr /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { base = 8; sign = false; } else if ( c == 'i' || c == 'I' || c == 'd' || c == 'D' ) { base = 10; sign = true; ffc08834: 39 20 00 01 li r9,1 ffc08838: 3b 80 00 0a li r28,10 BSP_output_char(c); continue; } printNum( lflag ? va_arg(ap, long) : (long) va_arg(ap, int), ffc0883c: 89 78 00 00 lbz r11,0(r24) ffc08840: 2b 8b 00 08 cmplwi cr7,r11,8 ffc08844: 40 9c 01 50 bge- cr7,ffc08994 ffc08848: 55 60 10 3a rlwinm r0,r11,2,0,29 ffc0884c: 81 58 00 08 lwz r10,8(r24) ffc08850: 39 6b 00 01 addi r11,r11,1 ffc08854: 99 78 00 00 stb r11,0(r24) ffc08858: 7d 4a 02 14 add r10,r10,r0 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { ffc0885c: 2f 89 00 00 cmpwi cr7,r9,0 } else { BSP_output_char(c); continue; } printNum( ffc08860: 83 6a 00 00 lwz r27,0(r10) unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { ffc08864: 41 9e 00 0c beq- cr7,ffc08870 ffc08868: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0886c: 41 9c 02 9c blt- cr7,ffc08b08 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { ffc08870: 7c 1b e3 96 divwu r0,r27,r28 ffc08874: 2f 80 00 00 cmpwi cr7,r0,0 ffc08878: 57 88 06 3e clrlwi r8,r28,24 if (maxwidth) maxwidth--; } else { unsigned_num = (unsigned long) num; } count = 0; ffc0887c: 39 20 00 00 li r9,0 while ((n = unsigned_num / base) > 0) { ffc08880: 40 be 00 10 bne+ cr7,ffc08890 ffc08884: 48 00 02 a8 b ffc08b2c ffc08888: 7c 1b 03 78 mr r27,r0 ffc0888c: 7d 60 5b 78 mr r0,r11 ffc08890: 7d 60 e3 96 divwu r11,r0,r28 ffc08894: 2f 8b 00 00 cmpwi cr7,r11,0 toPrint[count++] = (char) (unsigned_num - (n * base)); ffc08898: 7d 48 01 d6 mullw r10,r8,r0 ffc0889c: 7f 6a d8 50 subf r27,r10,r27 ffc088a0: 7f 7d 49 ae stbx r27,r29,r9 ffc088a4: 39 29 00 01 addi r9,r9,1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { ffc088a8: 40 9e ff e0 bne+ cr7,ffc08888 ffc088ac: 3b 69 00 01 addi r27,r9,1 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) ffc088b0: 7f 9e d8 40 cmplw cr7,r30,r27 count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; ffc088b4: 7d 21 4a 14 add r9,r1,r9 ffc088b8: 98 09 00 08 stb r0,8(r9) for (n=maxwidth ; n > count; n-- ) ffc088bc: 40 9d 00 24 ble- cr7,ffc088e0 ffc088c0: 3b 97 27 34 addi r28,r23,10036 BSP_output_char(lead); ffc088c4: 80 1c 00 00 lwz r0,0(r28) ffc088c8: 7f 43 d3 78 mr r3,r26 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) ffc088cc: 3b de ff ff addi r30,r30,-1 BSP_output_char(lead); ffc088d0: 7c 09 03 a6 mtctr r0 ffc088d4: 4e 80 04 21 bctrl toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) ffc088d8: 7f 9e d8 40 cmplw cr7,r30,r27 ffc088dc: 41 9d ff e8 bgt+ cr7,ffc088c4 BSP_output_char(lead); for (n = 0; n < count; n++) { ffc088e0: 2f 9b 00 00 cmpwi cr7,r27,0 ffc088e4: 41 be fe fc beq- cr7,ffc087e0 <== NEVER TAKEN * console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk( ffc088e8: 7f dd da 14 add r30,r29,r27 ffc088ec: 3b 97 27 34 addi r28,r23,10036 ffc088f0: 3b 76 f3 50 addi r27,r22,-3248 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); ffc088f4: 8d 3e ff ff lbzu r9,-1(r30) ffc088f8: 80 1c 00 00 lwz r0,0(r28) ffc088fc: 7c 7b 48 ae lbzx r3,r27,r9 ffc08900: 7c 09 03 a6 mtctr r0 ffc08904: 4e 80 04 21 bctrl toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { ffc08908: 7f 9e e8 00 cmpw cr7,r30,r29 ffc0890c: 40 9e ff e8 bne+ cr7,ffc088f4 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { ffc08910: 88 7f 00 01 lbz r3,1(r31) ffc08914: 3b ff 00 01 addi r31,r31,1 ffc08918: 2f 83 00 00 cmpwi cr7,r3,0 ffc0891c: 40 9e fd e4 bne+ cr7,ffc08700 <== ALWAYS TAKEN ffc08920: 4b ff fe d0 b ffc087f0 <== NOT EXECUTED lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; fmt++; ffc08924: 88 7f 00 01 lbz r3,1(r31) if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; ffc08928: 39 60 00 01 li r11,1 fmt++; ffc0892c: 3b ff 00 01 addi r31,r31,1 ffc08930: 4b ff fd f8 b ffc08728 continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; ffc08934: 88 7f 00 02 lbz r3,2(r31) BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { lead = '0'; ffc08938: 3b 40 00 30 li r26,48 fmt++; ffc0893c: 3b ff 00 02 addi r31,r31,2 ffc08940: 4b ff fd dc b ffc0871c lflag = true; c = *++fmt; } if ( c == 'c' ) { /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); ffc08944: 89 38 00 00 lbz r9,0(r24) ffc08948: 2b 89 00 08 cmplwi cr7,r9,8 ffc0894c: 40 9c 01 74 bge- cr7,ffc08ac0 <== NEVER TAKEN ffc08950: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc08954: 81 78 00 08 lwz r11,8(r24) ffc08958: 39 29 00 01 addi r9,r9,1 ffc0895c: 99 38 00 00 stb r9,0(r24) ffc08960: 7d 6b 02 14 add r11,r11,r0 BSP_output_char(chr); ffc08964: 80 17 27 34 lwz r0,10036(r23) ffc08968: 88 6b 00 03 lbz r3,3(r11) ffc0896c: 7c 09 03 a6 mtctr r0 ffc08970: 4e 80 04 21 bctrl void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { ffc08974: 88 7f 00 01 lbz r3,1(r31) ffc08978: 3b ff 00 01 addi r31,r31,1 ffc0897c: 2f 83 00 00 cmpwi cr7,r3,0 ffc08980: 40 9e fd 80 bne+ cr7,ffc08700 <== ALWAYS TAKEN ffc08984: 4b ff fe 6c b ffc087f0 <== NOT EXECUTED fmt++; } if ((c = *fmt) == 'l') { lflag = true; c = *++fmt; ffc08988: 88 7f 00 01 lbz r3,1(r31) ffc0898c: 3b ff 00 01 addi r31,r31,1 ffc08990: 4b ff fd dc b ffc0876c BSP_output_char(c); continue; } printNum( lflag ? va_arg(ap, long) : (long) va_arg(ap, int), ffc08994: 81 58 00 04 lwz r10,4(r24) ffc08998: 38 0a 00 04 addi r0,r10,4 ffc0899c: 90 18 00 04 stw r0,4(r24) ffc089a0: 4b ff fe bc b ffc0885c continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { base = 8; sign = false; ffc089a4: 39 20 00 00 li r9,0 ffc089a8: 3b 80 00 08 li r28,8 ffc089ac: 4b ff fe 90 b ffc0883c } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); ffc089b0: 89 38 00 00 lbz r9,0(r24) ffc089b4: 2b 89 00 08 cmplwi cr7,r9,8 ffc089b8: 40 9c 01 18 bge- cr7,ffc08ad0 <== NEVER TAKEN ffc089bc: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc089c0: 81 58 00 08 lwz r10,8(r24) ffc089c4: 39 29 00 01 addi r9,r9,1 ffc089c8: 99 38 00 00 stb r9,0(r24) ffc089cc: 7d 4a 02 14 add r10,r10,r0 ffc089d0: 83 4a 00 00 lwz r26,0(r10) if ( str == NULL ) { ffc089d4: 2f 9a 00 00 cmpwi cr7,r26,0 ffc089d8: 41 9e 01 10 beq- cr7,ffc08ae8 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) ffc089dc: 88 1a 00 00 lbz r0,0(r26) ffc089e0: 3b 60 00 00 li r27,0 ffc089e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc089e8: 41 9e 00 18 beq- cr7,ffc08a00 ffc089ec: 7f 49 d3 78 mr r9,r26 ffc089f0: 8c 09 00 01 lbzu r0,1(r9) ffc089f4: 3b 7b 00 01 addi r27,r27,1 ffc089f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc089fc: 40 9e ff f4 bne+ cr7,ffc089f0 ; /* leading spaces */ if ( !minus ) ffc08a00: 2e 0b 00 00 cmpwi cr4,r11,0 ffc08a04: 40 92 00 30 bne- cr4,ffc08a34 for ( i=len ; i ffc08a10: 7f 79 db 78 mr r25,r27 ffc08a14: 3b 97 27 34 addi r28,r23,10036 BSP_output_char(' '); ffc08a18: 80 1c 00 00 lwz r0,0(r28) ffc08a1c: 38 60 00 20 li r3,32 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i BSP_output_char(' '); /* no width option */ if (width == 0) { ffc08a34: 2f 9e 00 00 cmpwi cr7,r30,0 ffc08a38: 40 9e 00 10 bne- cr7,ffc08a48 width = len; } /* output the string */ for ( i=0 ; i ffc08a44: 7f 7e db 78 mr r30,r27 ffc08a48: 88 7a 00 00 lbz r3,0(r26) ffc08a4c: 2f 83 00 00 cmpwi cr7,r3,0 ffc08a50: 41 9e 00 30 beq- cr7,ffc08a80 <== NEVER TAKEN BSP_output_char(*str); ffc08a54: 80 17 27 34 lwz r0,10036(r23) ffc08a58: 3b 97 27 34 addi r28,r23,10036 ffc08a5c: 7c 09 03 a6 mtctr r0 ffc08a60: 4e 80 04 21 bctrl ffc08a64: 48 00 00 10 b ffc08a74 ffc08a68: 80 1c 00 00 lwz r0,0(r28) ffc08a6c: 7c 09 03 a6 mtctr r0 ffc08a70: 4e 80 04 21 bctrl if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) ffc08a80: 41 b2 fd 60 beq- cr4,ffc087e0 for ( i=len ; i ffc08a8c: 3b 97 27 34 addi r28,r23,10036 BSP_output_char(' '); ffc08a90: 80 1c 00 00 lwz r0,0(r28) ffc08a94: 38 60 00 20 li r3,32 for ( i=0 ; i void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { ffc08aac: 88 7f 00 01 lbz r3,1(r31) ffc08ab0: 3b ff 00 01 addi r31,r31,1 ffc08ab4: 2f 83 00 00 cmpwi cr7,r3,0 ffc08ab8: 40 9e fc 48 bne+ cr7,ffc08700 <== ALWAYS TAKEN ffc08abc: 4b ff fd 34 b ffc087f0 <== NOT EXECUTED lflag = true; c = *++fmt; } if ( c == 'c' ) { /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); ffc08ac0: 81 78 00 04 lwz r11,4(r24) <== NOT EXECUTED ffc08ac4: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED ffc08ac8: 90 18 00 04 stw r0,4(r24) <== NOT EXECUTED ffc08acc: 4b ff fe 98 b ffc08964 <== NOT EXECUTED } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); ffc08ad0: 81 58 00 04 lwz r10,4(r24) <== NOT EXECUTED ffc08ad4: 38 0a 00 04 addi r0,r10,4 <== NOT EXECUTED ffc08ad8: 90 18 00 04 stw r0,4(r24) <== NOT EXECUTED ffc08adc: 83 4a 00 00 lwz r26,0(r10) <== NOT EXECUTED if ( str == NULL ) { ffc08ae0: 2f 9a 00 00 cmpwi cr7,r26,0 <== NOT EXECUTED ffc08ae4: 40 9e fe f8 bne+ cr7,ffc089dc <== NOT EXECUTED str = ""; ffc08ae8: 3b 55 e3 d0 addi r26,r21,-7216 ffc08aec: 4b ff fe f0 b ffc089dc base = 8; sign = false; } else if ( c == 'i' || c == 'I' || c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { base = 10; sign = false; ffc08af0: 39 20 00 00 li r9,0 ffc08af4: 3b 80 00 0a li r28,10 ffc08af8: 4b ff fd 44 b ffc0883c } else if ( c == 'x' || c == 'X' ) { base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; ffc08afc: 39 20 00 00 li r9,0 ffc08b00: 3b 80 00 10 li r28,16 ffc08b04: 4b ff fd 38 b ffc0883c unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); ffc08b08: 80 17 27 34 lwz r0,10036(r23) ffc08b0c: 38 60 00 2d li r3,45 unsigned_num = (unsigned long) -num; ffc08b10: 7f 7b 00 d0 neg r27,r27 unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); ffc08b14: 7c 09 03 a6 mtctr r0 ffc08b18: 4e 80 04 21 bctrl unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; ffc08b1c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc08b20: 41 be fd 50 beq- cr7,ffc08870 ffc08b24: 3b de ff ff addi r30,r30,-1 ffc08b28: 4b ff fd 48 b ffc08870 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { ffc08b2c: 7f 60 db 78 mr r0,r27 if (maxwidth) maxwidth--; } else { unsigned_num = (unsigned long) num; } count = 0; ffc08b30: 39 20 00 00 li r9,0 while ((n = unsigned_num / base) > 0) { ffc08b34: 3b 60 00 01 li r27,1 ffc08b38: 4b ff fd 78 b ffc088b0 =============================================================================== ffc1db5c : ssize_t write( int fd, const void *buffer, size_t count ) { ffc1db5c: 94 21 ff f0 stwu r1,-16(r1) ffc1db60: 7c 08 02 a6 mflr r0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc1db64: 3d 20 00 00 lis r9,0 ssize_t write( int fd, const void *buffer, size_t count ) { ffc1db68: 90 01 00 14 stw r0,20(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc1db6c: 80 09 26 fc lwz r0,9980(r9) ssize_t write( int fd, const void *buffer, size_t count ) { ffc1db70: 93 e1 00 0c stw r31,12(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc1db74: 7f 83 00 40 cmplw cr7,r3,r0 ffc1db78: 40 9c 00 8c bge- cr7,ffc1dc04 iop = rtems_libio_iop( fd ); ffc1db7c: 3d 60 00 00 lis r11,0 ffc1db80: 83 eb 27 ac lwz r31,10156(r11) ffc1db84: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc1db88: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open( iop ); ffc1db8c: 81 7f 00 18 lwz r11,24(r31) ffc1db90: 71 6a 01 00 andi. r10,r11,256 ffc1db94: 41 82 00 70 beq- ffc1dc04 rtems_libio_check_buffer( buffer ); ffc1db98: 2f 84 00 00 cmpwi cr7,r4,0 ffc1db9c: 41 9e 00 7c beq- cr7,ffc1dc18 <== NEVER TAKEN rtems_libio_check_count( count ); ffc1dba0: 2f 85 00 00 cmpwi cr7,r5,0 ffc1dba4: 38 60 00 00 li r3,0 ffc1dba8: 41 9e 00 48 beq- cr7,ffc1dbf0 rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); ffc1dbac: 71 60 00 04 andi. r0,r11,4 ffc1dbb0: 41 82 00 54 beq- ffc1dc04 /* * Now process the write() request. */ rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count ); ffc1dbb4: 81 3f 00 24 lwz r9,36(r31) ffc1dbb8: 7f e3 fb 78 mr r3,r31 ffc1dbbc: 80 09 00 0c lwz r0,12(r9) ffc1dbc0: 7c 09 03 a6 mtctr r0 ffc1dbc4: 4e 80 04 21 bctrl if ( rc > 0 ) ffc1dbc8: 2c 03 00 00 cmpwi r3,0 ffc1dbcc: 40 81 00 24 ble- ffc1dbf0 iop->offset += rc; ffc1dbd0: 81 1f 00 10 lwz r8,16(r31) ffc1dbd4: 7c 6b 1b 78 mr r11,r3 ffc1dbd8: 81 3f 00 14 lwz r9,20(r31) ffc1dbdc: 7c 6a fe 70 srawi r10,r3,31 ffc1dbe0: 7d 6b 48 14 addc r11,r11,r9 ffc1dbe4: 7d 4a 41 14 adde r10,r10,r8 ffc1dbe8: 91 5f 00 10 stw r10,16(r31) ffc1dbec: 91 7f 00 14 stw r11,20(r31) return rc; } ffc1dbf0: 80 01 00 14 lwz r0,20(r1) ffc1dbf4: 83 e1 00 0c lwz r31,12(r1) ffc1dbf8: 38 21 00 10 addi r1,r1,16 ffc1dbfc: 7c 08 03 a6 mtlr r0 ffc1dc00: 4e 80 00 20 blr 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_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); ffc1dc04: 4b ff 4e 5d bl ffc12a60 <__errno> ffc1dc08: 38 00 00 09 li r0,9 ffc1dc0c: 90 03 00 00 stw r0,0(r3) ffc1dc10: 38 60 ff ff li r3,-1 ffc1dc14: 4b ff ff dc b ffc1dbf0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); ffc1dc18: 4b ff 4e 49 bl ffc12a60 <__errno> <== NOT EXECUTED ffc1dc1c: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc1dc20: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1dc24: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc1dc28: 4b ff ff c8 b ffc1dbf0 <== NOT EXECUTED =============================================================================== ffc09b3c : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc09b3c: 94 21 ff d8 stwu r1,-40(r1) ffc09b40: 7c 08 02 a6 mflr r0 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc09b44: 3d 20 00 00 lis r9,0 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc09b48: 90 01 00 2c stw r0,44(r1) int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc09b4c: 80 09 26 dc lwz r0,9948(r9) ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc09b50: 93 a1 00 1c stw r29,28(r1) ffc09b54: 7c 9d 23 78 mr r29,r4 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc09b58: 7f 83 00 40 cmplw cr7,r3,r0 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc09b5c: 93 01 00 08 stw r24,8(r1) ffc09b60: 93 21 00 0c stw r25,12(r1) ffc09b64: 93 41 00 10 stw r26,16(r1) ffc09b68: 93 61 00 14 stw r27,20(r1) ffc09b6c: 93 81 00 18 stw r28,24(r1) ffc09b70: 93 c1 00 20 stw r30,32(r1) ffc09b74: 93 e1 00 24 stw r31,36(r1) int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc09b78: 40 9c 01 64 bge- cr7,ffc09cdc iop = rtems_libio_iop( fd ); ffc09b7c: 3d 20 00 00 lis r9,0 ffc09b80: 83 29 27 88 lwz r25,10120(r9) ffc09b84: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc09b88: 7f 39 1a 14 add r25,r25,r3 rtems_libio_check_is_open( iop ); ffc09b8c: 80 19 00 18 lwz r0,24(r25) ffc09b90: 70 09 01 00 andi. r9,r0,256 ffc09b94: 41 82 01 48 beq- ffc09cdc rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); ffc09b98: 70 09 00 04 andi. r9,r0,4 ffc09b9c: 41 82 01 40 beq- ffc09cdc <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) ffc09ba0: 2f 84 00 00 cmpwi cr7,r4,0 ffc09ba4: 41 9e 00 f4 beq- cr7,ffc09c98 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) ffc09ba8: 2f 85 00 00 cmpwi cr7,r5,0 ffc09bac: 40 9d 00 ec ble- cr7,ffc09c98 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc09bb0: 2f 85 04 00 cmpwi cr7,r5,1024 ffc09bb4: 41 9d 00 e4 bgt- cr7,ffc09c98 <== NEVER TAKEN #include #include #include ssize_t writev( ffc09bb8: 54 ba 18 38 rlwinm r26,r5,3,0,28 ffc09bbc: 39 7a ff f8 addi r11,r26,-8 ffc09bc0: 55 6b e8 fe rlwinm r11,r11,29,3,31 ffc09bc4: 39 6b 00 01 addi r11,r11,1 ffc09bc8: 7d 69 03 a6 mtctr r11 ffc09bcc: 39 20 00 00 li r9,0 ffc09bd0: 39 00 00 01 li r8,1 ffc09bd4: 38 00 00 00 li r0,0 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) ffc09bd8: 7d 7d 48 2e lwzx r11,r29,r9 #include #include #include ssize_t writev( ffc09bdc: 7d 5d 4a 14 add r10,r29,r9 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc09be0: 39 29 00 08 addi r9,r9,8 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) ffc09be4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc09be8: 41 9e 00 b0 beq- cr7,ffc09c98 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) ffc09bec: 81 4a 00 04 lwz r10,4(r10) all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; ffc09bf0: 7d 6a 02 14 add r11,r10,r0 if ( total < old || total > SSIZE_MAX ) ffc09bf4: 7f 80 58 00 cmpw cr7,r0,r11 */ if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; ffc09bf8: 31 4a ff ff addic r10,r10,-1 ffc09bfc: 7d 4a 51 10 subfe r10,r10,r10 ffc09c00: 7d 08 50 38 and r8,r8,r10 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { ffc09c04: 7d 60 5b 78 mr r0,r11 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) ffc09c08: 41 9d 00 90 bgt- cr7,ffc09c98 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { ffc09c0c: 42 00 ff cc bdnz+ ffc09bd8 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { ffc09c10: 2f 88 00 00 cmpwi cr7,r8,0 return 0; ffc09c14: 3b 00 00 00 li r24,0 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { ffc09c18: 40 9e 00 90 bne- cr7,ffc09ca8 ffc09c1c: 3b 80 00 00 li r28,0 ffc09c20: 48 00 00 10 b ffc09c30 if ( bytes > 0 ) { iop->offset += bytes; total += bytes; } if (bytes != iov[ v ].iov_len) ffc09c24: 3b 9c 00 08 addi r28,r28,8 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc09c28: 7f 9c d0 00 cmpw cr7,r28,r26 ffc09c2c: 41 9e 00 7c beq- cr7,ffc09ca8 #include #include #include ssize_t writev( ffc09c30: 7f 7d e2 14 add r27,r29,r28 /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) ffc09c34: 80 bb 00 04 lwz r5,4(r27) ffc09c38: 2f 85 00 00 cmpwi cr7,r5,0 ffc09c3c: 41 9e ff e8 beq+ cr7,ffc09c24 <== NEVER TAKEN continue; bytes = (*iop->pathinfo.handlers->write_h)( ffc09c40: 81 39 00 24 lwz r9,36(r25) ffc09c44: 7f 23 cb 78 mr r3,r25 ffc09c48: 7c 9d e0 2e lwzx r4,r29,r28 ffc09c4c: 80 09 00 0c lwz r0,12(r9) ffc09c50: 7c 09 03 a6 mtctr r0 ffc09c54: 4e 80 04 21 bctrl iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) ffc09c58: 2c 03 00 00 cmpwi r3,0 ffc09c5c: 41 80 00 94 blt- ffc09cf0 <== NEVER TAKEN return -1; if ( bytes > 0 ) { ffc09c60: 41 82 00 28 beq- ffc09c88 <== NEVER TAKEN iop->offset += bytes; ffc09c64: 81 59 00 10 lwz r10,16(r25) ffc09c68: 7c 7f 1b 78 mr r31,r3 ffc09c6c: 81 79 00 14 lwz r11,20(r25) ffc09c70: 7c 7e fe 70 srawi r30,r3,31 total += bytes; ffc09c74: 7f 18 1a 14 add r24,r24,r3 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; ffc09c78: 7d 6b f8 14 addc r11,r11,r31 ffc09c7c: 7d 4a f1 14 adde r10,r10,r30 ffc09c80: 91 59 00 10 stw r10,16(r25) ffc09c84: 91 79 00 14 stw r11,20(r25) total += bytes; } if (bytes != iov[ v ].iov_len) ffc09c88: 80 1b 00 04 lwz r0,4(r27) ffc09c8c: 7f 83 00 00 cmpw cr7,r3,r0 ffc09c90: 41 9e ff 94 beq+ cr7,ffc09c24 <== ALWAYS TAKEN ffc09c94: 48 00 00 14 b ffc09ca8 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc09c98: 48 00 98 c9 bl ffc13560 <__errno> ffc09c9c: 38 00 00 16 li r0,22 ffc09ca0: 90 03 00 00 stw r0,0(r3) ffc09ca4: 3b 00 ff ff li r24,-1 if (bytes != iov[ v ].iov_len) break; } return total; } ffc09ca8: 80 01 00 2c lwz r0,44(r1) ffc09cac: 7f 03 c3 78 mr r3,r24 ffc09cb0: 83 21 00 0c lwz r25,12(r1) ffc09cb4: 7c 08 03 a6 mtlr r0 ffc09cb8: 83 01 00 08 lwz r24,8(r1) ffc09cbc: 83 41 00 10 lwz r26,16(r1) ffc09cc0: 83 61 00 14 lwz r27,20(r1) ffc09cc4: 83 81 00 18 lwz r28,24(r1) ffc09cc8: 83 a1 00 1c lwz r29,28(r1) ffc09ccc: 83 c1 00 20 lwz r30,32(r1) ffc09cd0: 83 e1 00 24 lwz r31,36(r1) ffc09cd4: 38 21 00 28 addi r1,r1,40 ffc09cd8: 4e 80 00 20 blr bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); ffc09cdc: 48 00 98 85 bl ffc13560 <__errno> ffc09ce0: 38 00 00 09 li r0,9 ffc09ce4: 90 03 00 00 stw r0,0(r3) ffc09ce8: 3b 00 ff ff li r24,-1 ffc09cec: 4b ff ff bc b ffc09ca8 iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; ffc09cf0: 3b 00 ff ff li r24,-1 <== NOT EXECUTED ffc09cf4: 4b ff ff b4 b ffc09ca8 <== NOT EXECUTED