=============================================================================== ffc0dadc : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { ffc0dadc: 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; ffc0dae0: 81 23 00 10 lwz r9,16(r3) switch( node->type ) { ffc0dae4: 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; ffc0dae8: 81 29 00 34 lwz r9,52(r9) switch( node->type ) { ffc0daec: 2b 80 00 07 cmplwi cr7,r0,7 ffc0daf0: 41 9d 00 28 bgt- cr7,ffc0db18 <== NEVER TAKEN ffc0daf4: 3d 60 ff c2 lis r11,-62 ffc0daf8: 39 6b 90 74 addi r11,r11,-28556 ffc0dafc: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0db00: 7c 0b 00 2e lwzx r0,r11,r0 ffc0db04: 7d 60 5a 14 add r11,r0,r11 ffc0db08: 7d 69 03 a6 mtctr r11 ffc0db0c: 4e 80 04 20 bctr case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; ffc0db10: 80 09 00 0c lwz r0,12(r9) ffc0db14: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0db18: 38 60 00 00 li r3,0 ffc0db1c: 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; ffc0db20: 80 09 00 08 lwz r0,8(r9) ffc0db24: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0db28: 38 60 00 00 li r3,0 ffc0db2c: 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; ffc0db30: 3d 20 ff c2 lis r9,-62 ffc0db34: 38 09 91 14 addi r0,r9,-28396 ffc0db38: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0db3c: 38 60 00 00 li r3,0 ffc0db40: 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; ffc0db44: 80 09 00 10 lwz r0,16(r9) ffc0db48: 90 03 00 08 stw r0,8(r3) break; } return 0; } ffc0db4c: 38 60 00 00 li r3,0 ffc0db50: 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; ffc0db54: 3d 20 ff c2 lis r9,-62 ffc0db58: 38 09 90 a4 addi r0,r9,-28508 ffc0db5c: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0db60: 38 60 00 00 li r3,0 ffc0db64: 4e 80 00 20 blr =============================================================================== ffc0d8cc : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0d8cc: 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 ) ffc0d8d0: 7c 69 1b 79 mr. r9,r3 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0d8d4: 94 21 ff e0 stwu r1,-32(r1) ffc0d8d8: 7c 08 02 a6 mflr r0 ffc0d8dc: 93 61 00 0c stw r27,12(r1) /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; ffc0d8e0: 3b 60 00 00 li r27,0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0d8e4: 93 81 00 10 stw r28,16(r1) ffc0d8e8: 7c fc 3b 78 mr r28,r7 ffc0d8ec: 93 e1 00 1c stw r31,28(r1) ffc0d8f0: 7c 9f 23 78 mr r31,r4 ffc0d8f4: 90 01 00 24 stw r0,36(r1) ffc0d8f8: 93 a1 00 14 stw r29,20(r1) ffc0d8fc: 93 c1 00 18 stw r30,24(r1) ffc0d900: 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 ) ffc0d904: 41 82 00 b4 beq- ffc0d9b8 <== NEVER TAKEN fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && ffc0d908: 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; ffc0d90c: 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; ffc0d910: 83 a9 00 00 lwz r29,0(r9) fs_info = parent_loc->mt_entry->fs_info; ffc0d914: 83 cb 00 34 lwz r30,52(r11) /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && ffc0d918: 41 92 00 d0 beq- cr4,ffc0d9e8 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); ffc0d91c: 3d 20 00 00 lis r9,0 ffc0d920: 81 29 26 a4 lwz r9,9892(r9) ffc0d924: 7c a4 2b 78 mr r4,r5 ffc0d928: 7f e3 fb 78 mr r3,r31 ffc0d92c: 80 09 00 2c lwz r0,44(r9) ffc0d930: 7c c5 00 78 andc r5,r6,r0 ffc0d934: 4b ff fe f1 bl ffc0d824 if ( !node ) ffc0d938: 7c 7b 1b 79 mr. r27,r3 ffc0d93c: 41 82 00 7c beq- ffc0d9b8 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { ffc0d940: 2f 9f 00 01 cmpwi cr7,r31,1 ffc0d944: 41 9e 00 3c beq- cr7,ffc0d980 rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { ffc0d948: 2f 9f 00 03 cmpwi cr7,r31,3 ffc0d94c: 41 9e 00 f4 beq- cr7,ffc0da40 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { ffc0d950: 2f 9f 00 04 cmpwi cr7,r31,4 ffc0d954: 41 9e 00 ec beq- cr7,ffc0da40 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { ffc0d958: 2f 9f 00 02 cmpwi cr7,r31,2 ffc0d95c: 41 9e 00 d0 beq- cr7,ffc0da2c node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { ffc0d960: 2f 9f 00 06 cmpwi cr7,r31,6 ffc0d964: 41 9e 00 e8 beq- cr7,ffc0da4c node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { ffc0d968: 2f 9f 00 05 cmpwi cr7,r31,5 ffc0d96c: 41 9e 00 fc beq- cr7,ffc0da68 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 ) { ffc0d970: 40 b2 00 28 bne+ cr4,ffc0d998 <== NEVER TAKEN node->info.fifo.pipe = NULL; ffc0d974: 38 00 00 00 li r0,0 ffc0d978: 90 1b 00 50 stw r0,80(r27) ffc0d97c: 48 00 00 1c b ffc0d998 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 ); ffc0d980: 39 3b 00 54 addi r9,r27,84 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); ffc0d984: 38 1b 00 50 addi r0,r27,80 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0d988: 91 3b 00 50 stw r9,80(r27) head->previous = NULL; ffc0d98c: 39 20 00 00 li r9,0 ffc0d990: 91 3b 00 54 stw r9,84(r27) tail->previous = head; ffc0d994: 90 1b 00 58 stw r0,88(r27) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; ffc0d998: 81 3e 00 04 lwz r9,4(r30) ffc0d99c: 38 7d 00 50 addi r3,r29,80 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; ffc0d9a0: 93 bb 00 08 stw r29,8(r27) ffc0d9a4: 7f 64 db 78 mr r4,r27 node->st_ino = ++fs_info->ino_count; ffc0d9a8: 38 09 00 01 addi r0,r9,1 ffc0d9ac: 90 1e 00 04 stw r0,4(r30) ffc0d9b0: 90 1b 00 38 stw r0,56(r27) ffc0d9b4: 4b ff c2 b5 bl ffc09c68 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } ffc0d9b8: 80 01 00 24 lwz r0,36(r1) ffc0d9bc: 7f 63 db 78 mr r3,r27 ffc0d9c0: 81 81 00 08 lwz r12,8(r1) ffc0d9c4: 7c 08 03 a6 mtlr r0 ffc0d9c8: 83 61 00 0c lwz r27,12(r1) ffc0d9cc: 83 81 00 10 lwz r28,16(r1) ffc0d9d0: 7d 80 81 20 mtcrf 8,r12 ffc0d9d4: 83 a1 00 14 lwz r29,20(r1) ffc0d9d8: 83 c1 00 18 lwz r30,24(r1) ffc0d9dc: 83 e1 00 1c lwz r31,28(r1) ffc0d9e0: 38 21 00 20 addi r1,r1,32 ffc0d9e4: 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 && ffc0d9e8: 81 3e 00 10 lwz r9,16(r30) ffc0d9ec: 3d 60 ff c2 lis r11,-62 ffc0d9f0: 38 0b 90 0c addi r0,r11,-28660 ffc0d9f4: 7f 89 00 00 cmpw cr7,r9,r0 ffc0d9f8: 40 be ff 24 bne- cr7,ffc0d91c node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } ffc0d9fc: 80 01 00 24 lwz r0,36(r1) ffc0da00: 7f 63 db 78 mr r3,r27 ffc0da04: 81 81 00 08 lwz r12,8(r1) ffc0da08: 7c 08 03 a6 mtlr r0 ffc0da0c: 83 61 00 0c lwz r27,12(r1) ffc0da10: 83 81 00 10 lwz r28,16(r1) ffc0da14: 7d 80 81 20 mtcrf 8,r12 ffc0da18: 83 a1 00 14 lwz r29,20(r1) ffc0da1c: 83 c1 00 18 lwz r30,24(r1) ffc0da20: 83 e1 00 1c lwz r31,28(r1) ffc0da24: 38 21 00 20 addi r1,r1,32 ffc0da28: 4e 80 00 20 blr } 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; ffc0da2c: 81 3c 00 00 lwz r9,0(r28) node->info.device.minor = info->device.minor; ffc0da30: 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; ffc0da34: 91 3b 00 50 stw r9,80(r27) node->info.device.minor = info->device.minor; ffc0da38: 90 1b 00 54 stw r0,84(r27) ffc0da3c: 4b ff ff 5c b ffc0d998 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; ffc0da40: 80 1c 00 00 lwz r0,0(r28) ffc0da44: 90 1b 00 50 stw r0,80(r27) ffc0da48: 4b ff ff 50 b ffc0d998 } 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; ffc0da4c: 39 20 00 00 li r9,0 ffc0da50: 39 40 00 00 li r10,0 ffc0da54: 91 3b 00 50 stw r9,80(r27) node->info.linearfile.direct = 0; ffc0da58: 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; ffc0da5c: 91 5b 00 54 stw r10,84(r27) node->info.linearfile.direct = 0; ffc0da60: 90 1b 00 58 stw r0,88(r27) ffc0da64: 4b ff ff 34 b ffc0d998 } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; node->info.file.indirect = 0; ffc0da68: 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; ffc0da6c: 39 20 00 00 li r9,0 node->info.file.indirect = 0; ffc0da70: 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; ffc0da74: 39 40 00 00 li r10,0 ffc0da78: 91 3b 00 50 stw r9,80(r27) ffc0da7c: 91 5b 00 54 stw r10,84(r27) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; ffc0da80: 90 1b 00 5c stw r0,92(r27) node->info.file.triply_indirect = 0; ffc0da84: 90 1b 00 60 stw r0,96(r27) ffc0da88: 4b ff ff 10 b ffc0d998 =============================================================================== ffc07570 : */ void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { ffc07570: 94 21 ff d0 stwu r1,-48(r1) ffc07574: 7d 80 00 26 mfcr r12 ffc07578: 7c 08 02 a6 mflr r0 ffc0757c: 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)); ffc07580: 3b 43 00 54 addi r26,r3,84 ffc07584: 93 a1 00 24 stw r29,36(r1) ffc07588: 7c 9d 23 78 mr r29,r4 ffc0758c: 90 01 00 34 stw r0,52(r1) ffc07590: 93 01 00 10 stw r24,16(r1) ffc07594: 93 21 00 14 stw r25,20(r1) ffc07598: 93 61 00 1c stw r27,28(r1) ffc0759c: 93 81 00 20 stw r28,32(r1) ffc075a0: 93 c1 00 28 stw r30,40(r1) ffc075a4: 93 e1 00 2c stw r31,44(r1) ffc075a8: 91 81 00 0c stw r12,12(r1) * */ int IMFS_memfile_maximum_size( void ) { return IMFS_MEMFILE_MAXIMUM_SIZE; } ffc075ac: 83 63 00 50 lwz r27,80(r3) 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 ); ffc075b0: 7f 9b d0 00 cmpw cr7,r27,r26 ffc075b4: 41 9e 00 68 beq- cr7,ffc0761c ffc075b8: 2e 04 00 00 cmpwi cr4,r4,0 ffc075bc: 3f 80 ff c3 lis r28,-61 ffc075c0: 3b 9c 92 e0 addi r28,r28,-27936 ffc075c4: 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 ); ffc075c8: 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++ ) ffc075cc: 41 90 00 30 blt- cr4,ffc075fc <== NEVER TAKEN ffc075d0: 3b e0 00 00 li r31,0 ffc075d4: 3b d9 26 f4 addi r30,r25,9972 fprintf(stdout, "...." ); ffc075d8: 81 3e 00 00 lwz r9,0(r30) ffc075dc: 7f 83 e3 78 mr r3,r28 ffc075e0: 38 80 00 01 li r4,1 ffc075e4: 80 c9 00 08 lwz r6,8(r9) ffc075e8: 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++ ) ffc075ec: 3b ff 00 01 addi r31,r31,1 fprintf(stdout, "...." ); ffc075f0: 48 01 17 4d bl ffc18d3c !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++ ) ffc075f4: 7f 9d f8 00 cmpw cr7,r29,r31 ffc075f8: 40 9c ff e0 bge+ cr7,ffc075d8 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); ffc075fc: 7f 63 db 78 mr r3,r27 ffc07600: 4b ff fd e9 bl ffc073e8 if ( the_jnode->type == IMFS_DIRECTORY ) ffc07604: 80 1b 00 4c lwz r0,76(r27) ffc07608: 2f 80 00 01 cmpwi cr7,r0,1 ffc0760c: 41 9e 00 48 beq- cr7,ffc07654 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 ) { ffc07610: 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 ); ffc07614: 7f 9b d0 00 cmpw cr7,r27,r26 ffc07618: 40 9e ff b4 bne+ cr7,ffc075cc fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } ffc0761c: 80 01 00 34 lwz r0,52(r1) ffc07620: 81 81 00 0c lwz r12,12(r1) ffc07624: 7c 08 03 a6 mtlr r0 ffc07628: 83 01 00 10 lwz r24,16(r1) ffc0762c: 83 21 00 14 lwz r25,20(r1) ffc07630: 7d 80 81 20 mtcrf 8,r12 ffc07634: 83 41 00 18 lwz r26,24(r1) ffc07638: 83 61 00 1c lwz r27,28(r1) ffc0763c: 83 81 00 20 lwz r28,32(r1) ffc07640: 83 a1 00 24 lwz r29,36(r1) ffc07644: 83 c1 00 28 lwz r30,40(r1) ffc07648: 83 e1 00 2c lwz r31,44(r1) ffc0764c: 38 21 00 30 addi r1,r1,48 ffc07650: 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 ); ffc07654: 7f 63 db 78 mr r3,r27 ffc07658: 7f 04 c3 78 mr r4,r24 ffc0765c: 4b ff ff 15 bl ffc07570 ffc07660: 4b ff ff b0 b ffc07610 =============================================================================== ffc0dc24 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0dc24: 94 21 ff 90 stwu r1,-112(r1) ffc0dc28: 7c 08 02 a6 mflr r0 ffc0dc2c: 90 01 00 74 stw r0,116(r1) char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { ffc0dc30: 54 a0 00 39 rlwinm. r0,r5,0,0,28 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0dc34: 93 01 00 50 stw r24,80(r1) ffc0dc38: 7c b8 2b 78 mr r24,r5 ffc0dc3c: 93 41 00 58 stw r26,88(r1) ffc0dc40: 7c 7a 1b 78 mr r26,r3 ffc0dc44: 93 81 00 60 stw r28,96(r1) ffc0dc48: 7c dc 33 78 mr r28,r6 ffc0dc4c: 93 e1 00 6c stw r31,108(r1) ffc0dc50: 7c 9f 23 78 mr r31,r4 ffc0dc54: 92 c1 00 48 stw r22,72(r1) ffc0dc58: 92 e1 00 4c stw r23,76(r1) ffc0dc5c: 93 21 00 54 stw r25,84(r1) ffc0dc60: 93 61 00 5c stw r27,92(r1) ffc0dc64: 93 a1 00 64 stw r29,100(r1) ffc0dc68: 93 c1 00 68 stw r30,104(r1) char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { ffc0dc6c: 40 82 02 9c bne- ffc0df08 <== NEVER TAKEN /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0dc70: 83 a6 00 00 lwz r29,0(r6) size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; ffc0dc74: 3b c0 00 00 li r30,0 ffc0dc78: 3b 61 00 20 addi r27,r1,32 ffc0dc7c: 3b 21 00 08 addi r25,r1,8 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0dc80: 3e e0 00 00 lis r23,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 ); ffc0dc84: 7c 7a f2 14 add r3,r26,r30 ffc0dc88: 7f e4 fb 78 mr r4,r31 ffc0dc8c: 7f 65 db 78 mr r5,r27 ffc0dc90: 7f 26 cb 78 mr r6,r25 ffc0dc94: 48 00 09 89 bl ffc0e61c pathnamelen -= len; i += len; if ( !pathloc->node_access ) ffc0dc98: 81 3c 00 00 lwz r9,0(r28) * 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 ); ffc0dc9c: 7c 76 1b 78 mr r22,r3 pathnamelen -= len; ffc0dca0: 80 01 00 08 lwz r0,8(r1) i += len; if ( !pathloc->node_access ) ffc0dca4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0dca8: 41 9e 02 18 beq- cr7,ffc0dec0 <== 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 ) ffc0dcac: 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; ffc0dcb0: 7f e0 f8 50 subf r31,r0,r31 i += len; ffc0dcb4: 7f de 02 14 add r30,r30,r0 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) ffc0dcb8: 40 9e 00 44 bne- cr7,ffc0dcfc * 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 ) { ffc0dcbc: 80 09 00 4c lwz r0,76(r9) ffc0dcc0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0dcc4: 41 9e 01 50 beq- cr7,ffc0de14 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0dcc8: 7f 83 e3 78 mr r3,r28 ffc0dccc: 4b ff fe 11 bl ffc0dadc /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0dcd0: 7f 04 c3 78 mr r4,r24 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0dcd4: 7c 76 1b 78 mr r22,r3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0dcd8: 7f 83 e3 78 mr r3,r28 ffc0dcdc: 4b ff fe 8d bl ffc0db68 ffc0dce0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0dce4: 40 be 00 d8 bne+ cr7,ffc0ddbc rtems_set_errno_and_return_minus_one( EACCES ); ffc0dce8: 48 00 46 75 bl ffc1235c <__errno> ffc0dcec: 38 00 00 0d li r0,13 ffc0dcf0: 90 03 00 00 stw r0,0(r3) ffc0dcf4: 3a c0 ff ff li r22,-1 ffc0dcf8: 48 00 00 c4 b ffc0ddbc /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) ffc0dcfc: 80 1d 00 4c lwz r0,76(r29) ffc0dd00: 2f 80 00 01 cmpwi cr7,r0,1 ffc0dd04: 41 9e 00 f4 beq- cr7,ffc0ddf8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0dd08: 2f 96 00 03 cmpwi cr7,r22,3 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; ffc0dd0c: 7d 3d 4b 78 mr r29,r9 switch( type ) { ffc0dd10: 41 9e 00 1c beq- cr7,ffc0dd2c ffc0dd14: 2f 96 00 04 cmpwi cr7,r22,4 ffc0dd18: 41 9e 00 94 beq- cr7,ffc0ddac ffc0dd1c: 2f 16 00 02 cmpwi cr6,r22,2 ffc0dd20: 41 9a 00 50 beq- cr6,ffc0dd70 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc0dd24: 40 9e ff 60 bne+ cr7,ffc0dc84 <== ALWAYS TAKEN ffc0dd28: 4b ff ff 94 b ffc0dcbc <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { ffc0dd2c: 80 09 00 4c lwz r0,76(r9) ffc0dd30: 2f 80 00 03 cmpwi cr7,r0,3 ffc0dd34: 41 9e 01 a0 beq- cr7,ffc0ded4 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { ffc0dd38: 2f 80 00 04 cmpwi cr7,r0,4 ffc0dd3c: 41 9e 01 f4 beq- cr7,ffc0df30 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0dd40: 2f 80 00 01 cmpwi cr7,r0,1 ffc0dd44: 40 9e 01 d8 bne- cr7,ffc0df1c /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { ffc0dd48: 80 fd 00 5c lwz r7,92(r29) ffc0dd4c: 2f 87 00 00 cmpwi cr7,r7,0 ffc0dd50: 40 9e 00 d0 bne- cr7,ffc0de20 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); ffc0dd54: 7f a3 eb 78 mr r3,r29 ffc0dd58: 7f 64 db 78 mr r4,r27 ffc0dd5c: 48 00 07 fd bl ffc0e558 if ( !node ) ffc0dd60: 7c 7d 1b 79 mr. r29,r3 ffc0dd64: 41 82 01 5c beq- ffc0dec0 /* * Set the node access to the point we have found. */ pathloc->node_access = node; ffc0dd68: 93 bc 00 00 stw r29,0(r28) ffc0dd6c: 4b ff ff 18 b ffc0dc84 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0dd70: 81 77 26 a4 lwz r11,9892(r23) ffc0dd74: 80 0b 00 18 lwz r0,24(r11) ffc0dd78: 7f 80 48 00 cmpw cr7,r0,r9 ffc0dd7c: 41 be ff 08 beq- cr7,ffc0dc84 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { ffc0dd80: 80 fc 00 10 lwz r7,16(r28) /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == ffc0dd84: 80 07 00 1c lwz r0,28(r7) ffc0dd88: 7f 80 48 00 cmpw cr7,r0,r9 ffc0dd8c: 41 9e 01 60 beq- cr7,ffc0deec pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) ffc0dd90: 83 a9 00 08 lwz r29,8(r9) ffc0dd94: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0dd98: 40 9e ff d0 bne+ cr7,ffc0dd68 rtems_set_errno_and_return_minus_one( ENOENT ); ffc0dd9c: 48 00 45 c1 bl ffc1235c <__errno> ffc0dda0: 92 c3 00 00 stw r22,0(r3) ffc0dda4: 3a c0 ff ff li r22,-1 ffc0dda8: 48 00 00 14 b ffc0ddbc case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); ffc0ddac: 48 00 45 b1 bl ffc1235c <__errno> ffc0ddb0: 38 00 00 5b li r0,91 ffc0ddb4: 90 03 00 00 stw r0,0(r3) ffc0ddb8: 3a c0 ff ff li r22,-1 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0ddbc: 80 01 00 74 lwz r0,116(r1) ffc0ddc0: 7e c3 b3 78 mr r3,r22 ffc0ddc4: 82 e1 00 4c lwz r23,76(r1) ffc0ddc8: 7c 08 03 a6 mtlr r0 ffc0ddcc: 82 c1 00 48 lwz r22,72(r1) ffc0ddd0: 83 01 00 50 lwz r24,80(r1) ffc0ddd4: 83 21 00 54 lwz r25,84(r1) ffc0ddd8: 83 41 00 58 lwz r26,88(r1) ffc0dddc: 83 61 00 5c lwz r27,92(r1) ffc0dde0: 83 81 00 60 lwz r28,96(r1) ffc0dde4: 83 a1 00 64 lwz r29,100(r1) ffc0dde8: 83 c1 00 68 lwz r30,104(r1) ffc0ddec: 83 e1 00 6c lwz r31,108(r1) ffc0ddf0: 38 21 00 70 addi r1,r1,112 ffc0ddf4: 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 ) ) ffc0ddf8: 7f 83 e3 78 mr r3,r28 ffc0ddfc: 38 80 00 01 li r4,1 ffc0de00: 4b ff fd 69 bl ffc0db68 ffc0de04: 2f 83 00 00 cmpwi cr7,r3,0 ffc0de08: 41 be fe e0 beq- cr7,ffc0dce8 ffc0de0c: 81 3c 00 00 lwz r9,0(r28) ffc0de10: 4b ff fe f8 b ffc0dd08 * * 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 ) { ffc0de14: 80 e9 00 5c lwz r7,92(r9) ffc0de18: 2f 87 00 00 cmpwi cr7,r7,0 ffc0de1c: 41 be fe ac beq- cr7,ffc0dcc8 newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0de20: 80 81 00 08 lwz r4,8(r1) * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; ffc0de24: 81 27 00 28 lwz r9,40(r7) ffc0de28: 81 07 00 1c lwz r8,28(r7) ffc0de2c: 81 47 00 20 lwz r10,32(r7) ffc0de30: 81 67 00 24 lwz r11,36(r7) ffc0de34: 80 07 00 2c lwz r0,44(r7) ffc0de38: 90 01 00 1c stw r0,28(r1) *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0de3c: 7c 64 f0 50 subf r3,r4,r30 ffc0de40: 7c 7a 1a 14 add r3,r26,r3 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; ffc0de44: 91 01 00 0c stw r8,12(r1) *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0de48: 7c 9f 22 14 add r4,r31,r4 ffc0de4c: 7f 05 c3 78 mr r5,r24 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; ffc0de50: 91 41 00 10 stw r10,16(r1) *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0de54: 7f 86 e3 78 mr r6,r28 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; ffc0de58: 91 61 00 14 stw r11,20(r1) ffc0de5c: 91 21 00 18 stw r9,24(r1) *pathloc = newloc; ffc0de60: 90 1c 00 10 stw r0,16(r28) return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0de64: 80 09 00 00 lwz r0,0(r9) */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; ffc0de68: 91 1c 00 00 stw r8,0(r28) return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0de6c: 7c 09 03 a6 mtctr r0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; ffc0de70: 91 5c 00 04 stw r10,4(r28) ffc0de74: 91 7c 00 08 stw r11,8(r28) ffc0de78: 91 3c 00 0c stw r9,12(r28) return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0de7c: 4e 80 04 21 bctrl if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0de80: 80 01 00 74 lwz r0,116(r1) if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0de84: 7c 76 1b 78 mr r22,r3 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0de88: 82 e1 00 4c lwz r23,76(r1) ffc0de8c: 7c 08 03 a6 mtlr r0 ffc0de90: 7e c3 b3 78 mr r3,r22 ffc0de94: 83 01 00 50 lwz r24,80(r1) ffc0de98: 82 c1 00 48 lwz r22,72(r1) ffc0de9c: 83 21 00 54 lwz r25,84(r1) ffc0dea0: 83 41 00 58 lwz r26,88(r1) ffc0dea4: 83 61 00 5c lwz r27,92(r1) ffc0dea8: 83 81 00 60 lwz r28,96(r1) ffc0deac: 83 a1 00 64 lwz r29,100(r1) ffc0deb0: 83 c1 00 68 lwz r30,104(r1) ffc0deb4: 83 e1 00 6c lwz r31,108(r1) ffc0deb8: 38 21 00 70 addi r1,r1,112 ffc0debc: 4e 80 00 20 blr /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); ffc0dec0: 48 00 44 9d bl ffc1235c <__errno> ffc0dec4: 38 00 00 02 li r0,2 ffc0dec8: 90 03 00 00 stw r0,0(r3) ffc0decc: 3a c0 ff ff li r22,-1 ffc0ded0: 4b ff fe ec b ffc0ddbc case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); ffc0ded4: 7f 83 e3 78 mr r3,r28 ffc0ded8: 38 80 00 00 li r4,0 ffc0dedc: 4b ff fc e1 bl ffc0dbbc node = pathloc->node_access; ffc0dee0: 83 bc 00 00 lwz r29,0(r28) ffc0dee4: 80 1d 00 4c lwz r0,76(r29) ffc0dee8: 4b ff fe 58 b ffc0dd40 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc0deec: 80 81 00 08 lwz r4,8(r1) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; ffc0def0: 81 27 00 14 lwz r9,20(r7) ffc0def4: 81 07 00 08 lwz r8,8(r7) ffc0def8: 81 47 00 0c lwz r10,12(r7) ffc0defc: 81 67 00 10 lwz r11,16(r7) ffc0df00: 80 07 00 18 lwz r0,24(r7) ffc0df04: 4b ff ff 34 b ffc0de38 rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); ffc0df08: 48 00 44 55 bl ffc1235c <__errno> <== NOT EXECUTED ffc0df0c: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc0df10: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0df14: 3a c0 ff ff li r22,-1 <== NOT EXECUTED ffc0df18: 4b ff fe a4 b ffc0ddbc <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0df1c: 48 00 44 41 bl ffc1235c <__errno> ffc0df20: 38 00 00 14 li r0,20 ffc0df24: 90 03 00 00 stw r0,0(r3) ffc0df28: 3a c0 ff ff li r22,-1 ffc0df2c: 4b ff fe 90 b ffc0ddbc * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); ffc0df30: 7f 83 e3 78 mr r3,r28 ffc0df34: 38 80 00 00 li r4,0 ffc0df38: 48 00 00 1d bl ffc0df54 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; ffc0df3c: 83 bc 00 00 lwz r29,0(r28) if ( result == -1 ) ffc0df40: 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 ); ffc0df44: 7c 76 1b 78 mr r22,r3 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) ffc0df48: 41 be fe 74 beq- cr7,ffc0ddbc <== NEVER TAKEN /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; ffc0df4c: 80 1d 00 4c lwz r0,76(r29) ffc0df50: 4b ff fd f0 b ffc0dd40 =============================================================================== ffc0e120 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0e120: 94 21 ff 88 stwu r1,-120(r1) ffc0e124: 7c 08 02 a6 mflr r0 ffc0e128: 7d 80 00 26 mfcr r12 ffc0e12c: 90 01 00 7c stw r0,124(r1) ffc0e130: 92 e1 00 54 stw r23,84(r1) ffc0e134: 7c b7 2b 78 mr r23,r5 ffc0e138: 93 01 00 58 stw r24,88(r1) case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0e13c: 3f 00 00 00 lis r24,0 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0e140: 93 21 00 5c stw r25,92(r1) ffc0e144: 3b 21 00 08 addi r25,r1,8 ffc0e148: 93 41 00 60 stw r26,96(r1) ffc0e14c: 7c 7a 1b 78 mr r26,r3 ffc0e150: 93 61 00 64 stw r27,100(r1) ffc0e154: 3b 61 00 20 addi r27,r1,32 ffc0e158: 93 81 00 68 stw r28,104(r1) int i = 0; ffc0e15c: 3b 80 00 00 li r28,0 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0e160: 93 a1 00 6c stw r29,108(r1) ffc0e164: 7c 9d 23 78 mr r29,r4 ffc0e168: 93 c1 00 70 stw r30,112(r1) ffc0e16c: 93 e1 00 74 stw r31,116(r1) ffc0e170: 92 a1 00 4c stw r21,76(r1) ffc0e174: 92 c1 00 50 stw r22,80(r1) ffc0e178: 91 81 00 48 stw r12,72(r1) /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0e17c: 83 c4 00 00 lwz r30,0(r4) /* * Get the path length. */ pathlen = strlen( path ); ffc0e180: 48 00 54 65 bl ffc135e4 ffc0e184: 7c 7f 1b 78 mr r31,r3 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc0e188: 7f e4 fb 78 mr r4,r31 ffc0e18c: 7c 7a e2 14 add r3,r26,r28 ffc0e190: 7f 65 db 78 mr r5,r27 ffc0e194: 7f 26 cb 78 mr r6,r25 ffc0e198: 48 00 04 85 bl ffc0e61c pathlen -= len; i += len; if ( !pathloc->node_access ) ffc0e19c: 81 3d 00 00 lwz r9,0(r29) */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0e1a0: 82 a1 00 08 lwz r21,8(r1) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc0e1a4: 7c 76 1b 78 mr r22,r3 pathlen -= len; i += len; if ( !pathloc->node_access ) ffc0e1a8: 2f 89 00 00 cmpwi cr7,r9,0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0e1ac: 7f f5 f8 50 subf r31,r21,r31 i += len; if ( !pathloc->node_access ) ffc0e1b0: 41 9e 01 7c beq- cr7,ffc0e32c <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) ffc0e1b4: 2e 03 00 00 cmpwi cr4,r3,0 ffc0e1b8: 40 92 00 5c bne- cr4,ffc0e214 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); ffc0e1bc: 48 00 41 a1 bl ffc1235c <__errno> ffc0e1c0: 38 00 00 11 li r0,17 ffc0e1c4: 90 03 00 00 stw r0,0(r3) ffc0e1c8: 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; } ffc0e1cc: 80 01 00 7c lwz r0,124(r1) ffc0e1d0: 7f c3 f3 78 mr r3,r30 ffc0e1d4: 81 81 00 48 lwz r12,72(r1) ffc0e1d8: 7c 08 03 a6 mtlr r0 ffc0e1dc: 82 a1 00 4c lwz r21,76(r1) ffc0e1e0: 82 c1 00 50 lwz r22,80(r1) ffc0e1e4: 7d 80 81 20 mtcrf 8,r12 ffc0e1e8: 82 e1 00 54 lwz r23,84(r1) ffc0e1ec: 83 01 00 58 lwz r24,88(r1) ffc0e1f0: 83 21 00 5c lwz r25,92(r1) ffc0e1f4: 83 41 00 60 lwz r26,96(r1) ffc0e1f8: 83 61 00 64 lwz r27,100(r1) ffc0e1fc: 83 81 00 68 lwz r28,104(r1) ffc0e200: 83 a1 00 6c lwz r29,108(r1) ffc0e204: 83 c1 00 70 lwz r30,112(r1) ffc0e208: 83 e1 00 74 lwz r31,116(r1) ffc0e20c: 38 21 00 78 addi r1,r1,120 ffc0e210: 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 ) ffc0e214: 80 1e 00 4c lwz r0,76(r30) ffc0e218: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e21c: 41 9e 01 24 beq- cr7,ffc0e340 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0e220: 2f 96 00 02 cmpwi cr7,r22,2 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; ffc0e224: 7f 9c aa 14 add r28,r28,r21 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; ffc0e228: 7d 3e 4b 78 mr r30,r9 switch( type ) { ffc0e22c: 41 9e 00 88 beq- cr7,ffc0e2b4 ffc0e230: 2b 96 00 02 cmplwi cr7,r22,2 ffc0e234: 40 9d 00 28 ble- cr7,ffc0e25c ffc0e238: 2f 96 00 03 cmpwi cr7,r22,3 ffc0e23c: 41 9e 00 28 beq- cr7,ffc0e264 ffc0e240: 2f 96 00 04 cmpwi cr7,r22,4 ffc0e244: 40 9e ff 44 bne+ cr7,ffc0e188 <== NEVER TAKEN case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); ffc0e248: 48 00 41 15 bl ffc1235c <__errno> ffc0e24c: 38 00 00 5b li r0,91 ffc0e250: 90 03 00 00 stw r0,0(r3) ffc0e254: 3b c0 ff ff li r30,-1 ffc0e258: 4b ff ff 74 b ffc0e1cc if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0e25c: 41 b2 ff 60 beq- cr4,ffc0e1bc <== NEVER TAKEN ffc0e260: 4b ff ff 28 b ffc0e188 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { ffc0e264: 80 09 00 4c lwz r0,76(r9) ffc0e268: 2f 80 00 03 cmpwi cr7,r0,3 ffc0e26c: 41 9e 01 c4 beq- cr7,ffc0e430 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { ffc0e270: 2f 80 00 04 cmpwi cr7,r0,4 ffc0e274: 41 9e 01 bc beq- cr7,ffc0e430 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) ffc0e278: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e27c: 41 9e 01 88 beq- cr7,ffc0e404 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0e280: 80 1e 00 4c lwz r0,76(r30) ffc0e284: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e288: 40 9e 01 7c bne- cr7,ffc0e404 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { ffc0e28c: 80 fe 00 5c lwz r7,92(r30) ffc0e290: 2f 87 00 00 cmpwi cr7,r7,0 ffc0e294: 40 9e 01 84 bne- cr7,ffc0e418 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); ffc0e298: 7f c3 f3 78 mr r3,r30 ffc0e29c: 7f 64 db 78 mr r4,r27 ffc0e2a0: 48 00 02 b9 bl ffc0e558 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) ffc0e2a4: 7c 7e 1b 79 mr. r30,r3 ffc0e2a8: 41 82 00 48 beq- ffc0e2f0 done = true; else pathloc->node_access = node; ffc0e2ac: 93 dd 00 00 stw r30,0(r29) ffc0e2b0: 4b ff fe d8 b ffc0e188 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0e2b4: 81 78 26 a4 lwz r11,9892(r24) ffc0e2b8: 80 0b 00 18 lwz r0,24(r11) ffc0e2bc: 7f 89 00 00 cmpw cr7,r9,r0 ffc0e2c0: 41 be fe c8 beq- cr7,ffc0e188 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ ffc0e2c4: 80 fd 00 10 lwz r7,16(r29) ffc0e2c8: 80 07 00 1c lwz r0,28(r7) ffc0e2cc: 7f 89 00 00 cmpw cr7,r9,r0 ffc0e2d0: 41 9e 00 8c beq- cr7,ffc0e35c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) ffc0e2d4: 83 c9 00 08 lwz r30,8(r9) ffc0e2d8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e2dc: 40 9e ff d0 bne+ cr7,ffc0e2ac rtems_set_errno_and_return_minus_one( ENOENT ); ffc0e2e0: 48 00 40 7d bl ffc1235c <__errno> ffc0e2e4: 3b c0 ff ff li r30,-1 ffc0e2e8: 92 c3 00 00 stw r22,0(r3) ffc0e2ec: 4b ff fe e0 b ffc0e1cc case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; ffc0e2f0: 80 01 00 08 lwz r0,8(r1) /* * 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++) { ffc0e2f4: 7f fa e2 14 add r31,r26,r28 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; ffc0e2f8: 7c 00 e0 50 subf r0,r0,r28 ffc0e2fc: 7c 1a 02 14 add r0,r26,r0 ffc0e300: 90 17 00 00 stw r0,0(r23) /* * 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++) { ffc0e304: 7c 7a e0 ae lbzx r3,r26,r28 ffc0e308: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e30c: 40 be 00 14 bne+ cr7,ffc0e320 ffc0e310: 48 00 00 b0 b ffc0e3c0 ffc0e314: 8c 7f 00 01 lbzu r3,1(r31) ffc0e318: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e31c: 41 9e 00 a4 beq- cr7,ffc0e3c0 if ( !IMFS_is_separator( path[ i ] ) ) ffc0e320: 4b ff 7b e9 bl ffc05f08 ffc0e324: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e328: 40 9e ff ec bne+ cr7,ffc0e314 rtems_set_errno_and_return_minus_one( ENOENT ); ffc0e32c: 48 00 40 31 bl ffc1235c <__errno> ffc0e330: 38 00 00 02 li r0,2 ffc0e334: 90 03 00 00 stw r0,0(r3) ffc0e338: 3b c0 ff ff li r30,-1 ffc0e33c: 4b ff fe 90 b ffc0e1cc * 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 ) ) ffc0e340: 7f a3 eb 78 mr r3,r29 ffc0e344: 38 80 00 01 li r4,1 ffc0e348: 4b ff f8 21 bl ffc0db68 ffc0e34c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e350: 41 9e 00 a0 beq- cr7,ffc0e3f0 ffc0e354: 81 3d 00 00 lwz r9,0(r29) ffc0e358: 4b ff fe c8 b ffc0e220 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; ffc0e35c: 81 27 00 14 lwz r9,20(r7) ffc0e360: 81 07 00 08 lwz r8,8(r7) ffc0e364: 81 47 00 0c lwz r10,12(r7) ffc0e368: 81 67 00 10 lwz r11,16(r7) ffc0e36c: 80 07 00 18 lwz r0,24(r7) */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0e370: 80 61 00 08 lwz r3,8(r1) ffc0e374: 7f a4 eb 78 mr r4,r29 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; ffc0e378: 90 01 00 1c stw r0,28(r1) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0e37c: 7e e5 bb 78 mr r5,r23 ffc0e380: 7c 63 e0 50 subf r3,r3,r28 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; ffc0e384: 91 01 00 0c stw r8,12(r1) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0e388: 7c 7a 1a 14 add r3,r26,r3 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; ffc0e38c: 91 41 00 10 stw r10,16(r1) ffc0e390: 91 61 00 14 stw r11,20(r1) ffc0e394: 91 21 00 18 stw r9,24(r1) *pathloc = newloc; ffc0e398: 90 1d 00 10 stw r0,16(r29) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0e39c: 80 09 00 04 lwz r0,4(r9) * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; ffc0e3a0: 91 1d 00 00 stw r8,0(r29) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0e3a4: 7c 09 03 a6 mtctr r0 * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; ffc0e3a8: 91 5d 00 04 stw r10,4(r29) ffc0e3ac: 91 7d 00 08 stw r11,8(r29) ffc0e3b0: 91 3d 00 0c stw r9,12(r29) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0e3b4: 4e 80 04 21 bctrl ffc0e3b8: 7c 7e 1b 78 mr r30,r3 ffc0e3bc: 4b ff fe 10 b ffc0e1cc /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0e3c0: 7f a3 eb 78 mr r3,r29 ffc0e3c4: 4b ff f7 19 bl ffc0dadc /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) ffc0e3c8: 81 3d 00 00 lwz r9,0(r29) /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0e3cc: 7c 7e 1b 78 mr r30,r3 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) ffc0e3d0: 80 09 00 4c lwz r0,76(r9) ffc0e3d4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e3d8: 40 9e 00 2c bne- cr7,ffc0e404 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) ffc0e3dc: 7f a3 eb 78 mr r3,r29 ffc0e3e0: 38 80 00 03 li r4,3 ffc0e3e4: 4b ff f7 85 bl ffc0db68 ffc0e3e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e3ec: 40 9e fd e0 bne+ cr7,ffc0e1cc rtems_set_errno_and_return_minus_one( EACCES ); ffc0e3f0: 48 00 3f 6d bl ffc1235c <__errno> ffc0e3f4: 38 00 00 0d li r0,13 ffc0e3f8: 90 03 00 00 stw r0,0(r3) ffc0e3fc: 3b c0 ff ff li r30,-1 ffc0e400: 4b ff fd cc b ffc0e1cc /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0e404: 48 00 3f 59 bl ffc1235c <__errno> ffc0e408: 38 00 00 14 li r0,20 ffc0e40c: 90 03 00 00 stw r0,0(r3) ffc0e410: 3b c0 ff ff li r30,-1 ffc0e414: 4b ff fd b8 b ffc0e1cc * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; ffc0e418: 81 27 00 28 lwz r9,40(r7) ffc0e41c: 81 07 00 1c lwz r8,28(r7) ffc0e420: 81 47 00 20 lwz r10,32(r7) ffc0e424: 81 67 00 24 lwz r11,36(r7) ffc0e428: 80 07 00 2c lwz r0,44(r7) ffc0e42c: 4b ff ff 44 b ffc0e370 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); ffc0e430: 7f a3 eb 78 mr r3,r29 ffc0e434: 38 80 00 00 li r4,0 ffc0e438: 4b ff fb d5 bl ffc0e00c if ( result == -1 ) ffc0e43c: 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 ); ffc0e440: 7c 7e 1b 78 mr r30,r3 if ( result == -1 ) ffc0e444: 41 be fd 88 beq- cr7,ffc0e1cc <== NEVER TAKEN ffc0e448: 83 dd 00 00 lwz r30,0(r29) ffc0e44c: 4b ff fe 2c b ffc0e278 =============================================================================== ffc0e00c : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0e00c: 94 21 ff e8 stwu r1,-24(r1) ffc0e010: 7c 08 02 a6 mflr r0 ffc0e014: 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 ); ffc0e018: 3f a0 00 00 lis r29,0 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0e01c: 93 81 00 08 stw r28,8(r1) ffc0e020: 7c 9c 23 78 mr r28,r4 ffc0e024: 93 c1 00 10 stw r30,16(r1) ffc0e028: 7c 7e 1b 78 mr r30,r3 ffc0e02c: 90 01 00 1c stw r0,28(r1) ffc0e030: 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 ); ffc0e034: 81 3d 26 a4 lwz r9,9892(r29) ffc0e038: 48 00 00 14 b ffc0e04c */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) ffc0e03c: 41 9a 00 90 beq- cr6,ffc0e0cc result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ffc0e040: 39 6b ff fd addi r11,r11,-3 ffc0e044: 2b 8b 00 01 cmplwi cr7,r11,1 ffc0e048: 41 9d 00 58 bgt- cr7,ffc0e0a0 <== ALWAYS TAKEN /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0e04c: a1 69 00 30 lhz r11,48(r9) { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; ffc0e050: 83 fe 00 00 lwz r31,0(r30) /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0e054: 38 0b 00 01 addi r0,r11,1 ffc0e058: 54 00 04 3e clrlwi r0,r0,16 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { ffc0e05c: 2b 80 00 05 cmplwi cr7,r0,5 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0e060: b0 09 00 30 sth r0,48(r9) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { ffc0e064: 41 9d 00 84 bgt- cr7,ffc0e0e8 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) ffc0e068: 81 7f 00 4c lwz r11,76(r31) ffc0e06c: 2f 8b 00 03 cmpwi cr7,r11,3 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) ffc0e070: 2f 0b 00 04 cmpwi cr6,r11,4 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) ffc0e074: 40 9e ff c8 bne+ cr7,ffc0e03c result = IMFS_evaluate_hard_link( node, flags ); ffc0e078: 7f c3 f3 78 mr r3,r30 ffc0e07c: 7f 84 e3 78 mr r4,r28 ffc0e080: 4b ff fb 3d bl ffc0dbbc 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 ) ) ); ffc0e084: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e088: 40 9e 00 58 bne- cr7,ffc0e0e0 ffc0e08c: 81 7f 00 4c lwz r11,76(r31) ffc0e090: 81 3d 26 a4 lwz r9,9892(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 ) || ffc0e094: 39 6b ff fd addi r11,r11,-3 ffc0e098: 2b 8b 00 01 cmplwi cr7,r11,1 ffc0e09c: 40 9d ff b0 ble+ cr7,ffc0e04c <== ALWAYS TAKEN ffc0e0a0: 38 60 00 00 li r3,0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; ffc0e0a4: 38 00 00 00 li r0,0 return result; } ffc0e0a8: 83 81 00 08 lwz r28,8(r1) /* * Clear link counter. */ rtems_filesystem_link_counts = 0; ffc0e0ac: b0 09 00 30 sth r0,48(r9) return result; } ffc0e0b0: 80 01 00 1c lwz r0,28(r1) ffc0e0b4: 83 a1 00 0c lwz r29,12(r1) ffc0e0b8: 7c 08 03 a6 mtlr r0 ffc0e0bc: 83 c1 00 10 lwz r30,16(r1) ffc0e0c0: 83 e1 00 14 lwz r31,20(r1) ffc0e0c4: 38 21 00 18 addi r1,r1,24 ffc0e0c8: 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 ); ffc0e0cc: 7f c3 f3 78 mr r3,r30 ffc0e0d0: 7f 84 e3 78 mr r4,r28 ffc0e0d4: 4b ff fe 81 bl ffc0df54 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); ffc0e0d8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e0dc: 41 9e ff b0 beq+ cr7,ffc0e08c ffc0e0e0: 81 3d 26 a4 lwz r9,9892(r29) ffc0e0e4: 4b ff ff c0 b ffc0e0a4 * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; ffc0e0e8: 38 00 00 00 li r0,0 ffc0e0ec: b0 09 00 30 sth r0,48(r9) rtems_set_errno_and_return_minus_one( ELOOP ); ffc0e0f0: 48 00 42 6d bl ffc1235c <__errno> ffc0e0f4: 38 00 00 5c li r0,92 ffc0e0f8: 90 03 00 00 stw r0,0(r3) ffc0e0fc: 38 60 ff ff li r3,-1 */ rtems_filesystem_link_counts = 0; return result; } ffc0e100: 80 01 00 1c lwz r0,28(r1) ffc0e104: 83 81 00 08 lwz r28,8(r1) ffc0e108: 7c 08 03 a6 mtlr r0 ffc0e10c: 83 a1 00 0c lwz r29,12(r1) ffc0e110: 83 c1 00 10 lwz r30,16(r1) ffc0e114: 83 e1 00 14 lwz r31,20(r1) ffc0e118: 38 21 00 18 addi r1,r1,24 ffc0e11c: 4e 80 00 20 blr =============================================================================== ffc0db68 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { ffc0db68: 7c 08 02 a6 mflr r0 ffc0db6c: 94 21 ff f8 stwu r1,-8(r1) ffc0db70: 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 ) ) ffc0db74: 54 80 00 39 rlwinm. r0,r4,0,0,28 ffc0db78: 40 82 00 30 bne- ffc0dba8 <== 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 ) ffc0db7c: 81 23 00 00 lwz r9,0(r3) */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; ffc0db80: 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 ) ffc0db84: 80 69 00 30 lwz r3,48(r9) ffc0db88: 7c 83 18 38 and r3,r4,r3 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 ); ffc0db8c: 7c 83 1a 78 xor r3,r4,r3 ffc0db90: 7c 63 00 34 cntlzw r3,r3 ffc0db94: 54 63 d9 7e rlwinm r3,r3,27,5,31 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } ffc0db98: 80 01 00 0c lwz r0,12(r1) ffc0db9c: 38 21 00 08 addi r1,r1,8 ffc0dba0: 7c 08 03 a6 mtlr r0 ffc0dba4: 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 ); ffc0dba8: 48 00 47 b5 bl ffc1235c <__errno> <== NOT EXECUTED ffc0dbac: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0dbb0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0dbb4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0dbb8: 4b ff ff e0 b ffc0db98 <== NOT EXECUTED =============================================================================== ffc0589c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc0589c: 94 21 ff f0 stwu r1,-16(r1) ffc058a0: 7c 08 02 a6 mflr r0 ffc058a4: 7c 68 1b 78 mr r8,r3 ffc058a8: 90 01 00 14 stw r0,20(r1) ffc058ac: 93 e1 00 0c stw r31,12(r1) off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); ffc058b0: 81 23 00 1c lwz r9,28(r3) ffc058b4: 80 69 00 50 lwz r3,80(r9) ffc058b8: 48 00 c7 6d bl ffc12024 ffc058bc: 7c 69 fe 70 srawi r9,r3,31 IMFS_FIFO_RETURN(err); ffc058c0: 2f 89 00 00 cmpwi cr7,r9,0 rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); ffc058c4: 7c 7f 1b 78 mr r31,r3 ffc058c8: 7c 6a 1b 78 mr r10,r3 IMFS_FIFO_RETURN(err); ffc058cc: 41 9c 00 20 blt- cr7,ffc058ec <== ALWAYS TAKEN } ffc058d0: 80 01 00 14 lwz r0,20(r1) ffc058d4: 7d 23 4b 78 mr r3,r9 ffc058d8: 7d 44 53 78 mr r4,r10 ffc058dc: 83 e1 00 0c lwz r31,12(r1) ffc058e0: 7c 08 03 a6 mtlr r0 ffc058e4: 38 21 00 10 addi r1,r1,16 ffc058e8: 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); ffc058ec: 48 00 f1 7d bl ffc14a68 <__errno> ffc058f0: 7f ff 00 d0 neg r31,r31 ffc058f4: 93 e3 00 00 stw r31,0(r3) ffc058f8: 39 20 ff ff li r9,-1 ffc058fc: 39 40 ff ff li r10,-1 ffc05900: 4b ff ff d0 b ffc058d0 =============================================================================== ffc059c8 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { ffc059c8: 94 21 ff e0 stwu r1,-32(r1) ffc059cc: 7c 08 02 a6 mflr r0 ffc059d0: 7c 66 1b 78 mr r6,r3 ffc059d4: 90 01 00 24 stw r0,36(r1) ffc059d8: 93 c1 00 18 stw r30,24(r1) ffc059dc: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *jnode = iop->pathinfo.node_access; ffc059e0: 83 e3 00 1c lwz r31,28(r3) int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); ffc059e4: 80 7f 00 50 lwz r3,80(r31) ffc059e8: 48 00 c3 3d bl ffc11d24 if (err > 0) { ffc059ec: 7c 7e 1b 79 mr. r30,r3 ffc059f0: 40 81 00 38 ble- ffc05a28 IMFS_mtime_ctime_update(jnode); ffc059f4: 38 61 00 08 addi r3,r1,8 ffc059f8: 38 80 00 00 li r4,0 ffc059fc: 48 00 16 2d bl ffc07028 ffc05a00: 80 01 00 08 lwz r0,8(r1) ffc05a04: 90 1f 00 44 stw r0,68(r31) ffc05a08: 90 1f 00 48 stw r0,72(r31) } IMFS_FIFO_RETURN(err); } ffc05a0c: 80 01 00 24 lwz r0,36(r1) ffc05a10: 7f c3 f3 78 mr r3,r30 ffc05a14: 83 e1 00 1c lwz r31,28(r1) ffc05a18: 7c 08 03 a6 mtlr r0 ffc05a1c: 83 c1 00 18 lwz r30,24(r1) ffc05a20: 38 21 00 20 addi r1,r1,32 ffc05a24: 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); ffc05a28: 41 82 ff e4 beq+ ffc05a0c <== NEVER TAKEN ffc05a2c: 7f de 00 d0 neg r30,r30 ffc05a30: 48 00 f0 39 bl ffc14a68 <__errno> ffc05a34: 93 c3 00 00 stw r30,0(r3) ffc05a38: 3b c0 ff ff li r30,-1 ffc05a3c: 4b ff ff d0 b ffc05a0c =============================================================================== ffc0e558 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0e558: 94 21 ff e8 stwu r1,-24(r1) ffc0e55c: 7c 08 02 a6 mflr r0 ffc0e560: 93 a1 00 0c stw r29,12(r1) /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0e564: 3f a0 ff c2 lis r29,-62 ffc0e568: 3b bd 90 94 addi r29,r29,-28524 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0e56c: 93 c1 00 10 stw r30,16(r1) ffc0e570: 7c 9e 23 78 mr r30,r4 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0e574: 7f a4 eb 78 mr r4,r29 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0e578: 93 e1 00 14 stw r31,20(r1) ffc0e57c: 7c 7f 1b 78 mr r31,r3 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0e580: 7f c3 f3 78 mr r3,r30 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0e584: 90 01 00 1c stw r0,28(r1) ffc0e588: 93 81 00 08 stw r28,8(r1) /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0e58c: 48 00 4e 95 bl ffc13420 ffc0e590: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e594: 41 9e 00 1c beq- cr7,ffc0e5b0 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) ffc0e598: 7f c3 f3 78 mr r3,r30 ffc0e59c: 38 9d 00 04 addi r4,r29,4 ffc0e5a0: 48 00 4e 81 bl ffc13420 ffc0e5a4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e5a8: 40 9e 00 2c bne- cr7,ffc0e5d4 <== ALWAYS TAKEN return directory->Parent; ffc0e5ac: 83 ff 00 08 lwz r31,8(r31) <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } ffc0e5b0: 80 01 00 1c lwz r0,28(r1) ffc0e5b4: 7f e3 fb 78 mr r3,r31 ffc0e5b8: 83 81 00 08 lwz r28,8(r1) ffc0e5bc: 7c 08 03 a6 mtlr r0 ffc0e5c0: 83 a1 00 0c lwz r29,12(r1) ffc0e5c4: 83 c1 00 10 lwz r30,16(r1) ffc0e5c8: 83 e1 00 14 lwz r31,20(r1) ffc0e5cc: 38 21 00 18 addi r1,r1,24 ffc0e5d0: 4e 80 00 20 blr ffc0e5d4: 83 bf 00 50 lwz r29,80(r31) RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc0e5d8: 3b 9f 00 54 addi r28,r31,84 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; ffc0e5dc: 3b e0 00 00 li r31,0 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc0e5e0: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0e5e4: 40 be 00 14 bne+ cr7,ffc0e5f8 ffc0e5e8: 4b ff ff c8 b ffc0e5b0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { ffc0e5ec: 83 bd 00 00 lwz r29,0(r29) if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc0e5f0: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0e5f4: 41 9e 00 20 beq- cr7,ffc0e614 !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 ) ) ffc0e5f8: 38 9d 00 0c addi r4,r29,12 ffc0e5fc: 7f c3 f3 78 mr r3,r30 ffc0e600: 48 00 4e 21 bl ffc13420 ffc0e604: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e608: 40 9e ff e4 bne+ cr7,ffc0e5ec for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; ffc0e60c: 7f bf eb 78 mr r31,r29 ffc0e610: 4b ff ff a0 b ffc0e5b0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; ffc0e614: 3b e0 00 00 li r31,0 ffc0e618: 4b ff ff 98 b ffc0e5b0 =============================================================================== ffc0e450 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0e450: 94 21 ff c8 stwu r1,-56(r1) ffc0e454: 7c 08 02 a6 mflr r0 ffc0e458: 90 01 00 3c stw r0,60(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; ffc0e45c: 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 ) { ffc0e460: 93 a1 00 2c stw r29,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; ffc0e464: 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; ffc0e468: 83 a3 00 1c lwz r29,28(r3) loc = temp_mt_entry->mt_fs_root; ffc0e46c: 81 63 00 24 lwz r11,36(r3) ffc0e470: 81 23 00 28 lwz r9,40(r3) ffc0e474: 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; ffc0e478: 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 ) { ffc0e47c: 93 e1 00 34 stw r31,52(r1) ffc0e480: 3b e1 00 08 addi r31,r1,8 ffc0e484: 93 c1 00 30 stw r30,48(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; ffc0e488: 93 a1 00 08 stw r29,8(r1) ffc0e48c: 91 41 00 0c stw r10,12(r1) ffc0e490: 91 61 00 10 stw r11,16(r1) ffc0e494: 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; ffc0e498: 90 03 00 1c stw r0,28(r3) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc0e49c: 7f e3 fb 78 mr r3,r31 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; ffc0e4a0: 83 dd 00 08 lwz r30,8(r29) loc.node_access = (void *)jnode; ffc0e4a4: 93 a1 00 08 stw r29,8(r1) IMFS_Set_handlers( &loc ); ffc0e4a8: 4b ff f6 35 bl ffc0dadc RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0e4ac: 39 3d 00 54 addi r9,r29,84 if ( jnode->type != IMFS_DIRECTORY ) { ffc0e4b0: 80 1d 00 4c lwz r0,76(r29) ffc0e4b4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e4b8: 40 9e 00 60 bne- cr7,ffc0e518 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { ffc0e4bc: 80 1d 00 50 lwz r0,80(r29) ffc0e4c0: 7f 80 48 00 cmpw cr7,r0,r9 ffc0e4c4: 41 9e 00 74 beq- cr7,ffc0e538 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { ffc0e4c8: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0e4cc: 41 9e 00 2c beq- cr7,ffc0e4f8 if ( jnode->type == IMFS_DIRECTORY ) { ffc0e4d0: 80 1d 00 4c lwz r0,76(r29) ffc0e4d4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e4d8: 40 9e ff c4 bne+ cr7,ffc0e49c <== NEVER TAKEN } } } while (jnode != NULL); return 0; } ffc0e4dc: 80 1d 00 50 lwz r0,80(r29) ffc0e4e0: 39 3d 00 54 addi r9,r29,84 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) ffc0e4e4: 7f 80 48 00 cmpw cr7,r0,r9 ffc0e4e8: 41 be ff b4 beq- cr7,ffc0e49c jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); ffc0e4ec: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e4f0: 7c 1d 03 78 mr r29,r0 ffc0e4f4: 40 9e ff a8 bne+ cr7,ffc0e49c <== ALWAYS TAKEN return 0; ffc0e4f8: 38 60 00 00 li r3,0 } ffc0e4fc: 80 01 00 3c lwz r0,60(r1) ffc0e500: 83 a1 00 2c lwz r29,44(r1) ffc0e504: 7c 08 03 a6 mtlr r0 ffc0e508: 83 c1 00 30 lwz r30,48(r1) ffc0e50c: 83 e1 00 34 lwz r31,52(r1) ffc0e510: 38 21 00 38 addi r1,r1,56 ffc0e514: 4e 80 00 20 blr next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); ffc0e518: 7f e4 fb 78 mr r4,r31 ffc0e51c: 38 60 00 00 li r3,0 ffc0e520: 4b ff 60 2d bl ffc0454c if (result != 0) return -1; jnode = next; ffc0e524: 7f dd f3 78 mr r29,r30 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) ffc0e528: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e52c: 41 9e ff 9c beq+ cr7,ffc0e4c8 <== ALWAYS TAKEN return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; ffc0e530: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0e534: 4b ff ff c8 b ffc0e4fc <== NOT EXECUTED result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); ffc0e538: 38 60 00 00 li r3,0 ffc0e53c: 7f e4 fb 78 mr r4,r31 ffc0e540: 4b ff 60 0d bl ffc0454c if (result != 0) return -1; jnode = next; ffc0e544: 7f dd f3 78 mr r29,r30 if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) ffc0e548: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e54c: 41 9e ff 7c beq+ cr7,ffc0e4c8 <== ALWAYS TAKEN return -1; ffc0e550: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0e554: 4b ff ff a8 b ffc0e4fc <== NOT EXECUTED =============================================================================== ffc0e61c : const char *path, int pathlen, char *token, int *token_len ) { ffc0e61c: 94 21 ff e0 stwu r1,-32(r1) ffc0e620: 7c 08 02 a6 mflr r0 ffc0e624: 93 41 00 08 stw r26,8(r1) ffc0e628: 7c da 33 78 mr r26,r6 ffc0e62c: 93 81 00 10 stw r28,16(r1) register int i = 0; ffc0e630: 3b 80 00 00 li r28,0 const char *path, int pathlen, char *token, int *token_len ) { ffc0e634: 93 a1 00 14 stw r29,20(r1) ffc0e638: 7c 9d 23 78 mr r29,r4 ffc0e63c: 93 c1 00 18 stw r30,24(r1) ffc0e640: 7c be 2b 78 mr r30,r5 ffc0e644: 93 e1 00 1c stw r31,28(r1) ffc0e648: 7c 7f 1b 78 mr r31,r3 ffc0e64c: 90 01 00 24 stw r0,36(r1) ffc0e650: 93 61 00 0c stw r27,12(r1) register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; ffc0e654: 8b 63 00 00 lbz r27,0(r3) while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { ffc0e658: 48 00 00 08 b ffc0e660 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; ffc0e65c: 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) ) { ffc0e660: 7f 63 db 78 mr r3,r27 ffc0e664: 4b ff 78 a5 bl ffc05f08 ffc0e668: 7f 1c e8 00 cmpw cr6,r28,r29 ffc0e66c: 2f 83 00 00 cmpwi cr7,r3,0 token[i] = c; if ( i == IMFS_NAME_MAX ) ffc0e670: 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) ) { ffc0e674: 40 9e 00 40 bne- cr7,ffc0e6b4 ffc0e678: 40 98 00 3c bge- cr6,ffc0e6b4 <== NEVER TAKEN token[i] = c; ffc0e67c: 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]; ffc0e680: 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 ) ffc0e684: 40 86 ff d8 bne+ cr1,ffc0e65c return IMFS_INVALID_TOKEN; ffc0e688: 38 60 00 04 li r3,4 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } ffc0e68c: 80 01 00 24 lwz r0,36(r1) ffc0e690: 83 41 00 08 lwz r26,8(r1) ffc0e694: 7c 08 03 a6 mtlr r0 ffc0e698: 83 61 00 0c lwz r27,12(r1) ffc0e69c: 83 81 00 10 lwz r28,16(r1) ffc0e6a0: 83 a1 00 14 lwz r29,20(r1) ffc0e6a4: 83 c1 00 18 lwz r30,24(r1) ffc0e6a8: 83 e1 00 1c lwz r31,28(r1) ffc0e6ac: 38 21 00 20 addi r1,r1,32 ffc0e6b0: 4e 80 00 20 blr /* * Copy a seperator into token. */ if ( i == 0 ) { ffc0e6b4: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0e6b8: 40 9e 00 28 bne- cr7,ffc0e6e0 token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0e6bc: 2f 9b 00 00 cmpwi cr7,r27,0 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; ffc0e6c0: 9b 7e 00 00 stb r27,0(r30) if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; ffc0e6c4: 38 60 00 00 li r3,0 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0e6c8: 41 9e 00 10 beq- cr7,ffc0e6d8 ffc0e6cc: 2f 9d 00 00 cmpwi cr7,r29,0 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; ffc0e6d0: 7f 83 e3 78 mr r3,r28 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0e6d4: 40 9e 00 8c bne- cr7,ffc0e760 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0e6d8: 93 9a 00 00 stw r28,0(r26) ffc0e6dc: 4b ff ff b0 b ffc0e68c i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { ffc0e6e0: 7d 3e e2 14 add r9,r30,r28 ffc0e6e4: 88 09 ff ff lbz r0,-1(r9) ffc0e6e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e6ec: 41 9e 00 0c beq- cr7,ffc0e6f8 <== NEVER TAKEN token[i] = '\0'; ffc0e6f0: 38 00 00 00 li r0,0 ffc0e6f4: 7c 1e e1 ae stbx r0,r30,r28 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0e6f8: 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 ) ffc0e6fc: 3c 80 ff c2 lis r4,-62 ffc0e700: 7f c3 f3 78 mr r3,r30 ffc0e704: 38 84 90 a0 addi r4,r4,-28512 ffc0e708: 48 00 4d 19 bl ffc13420 ffc0e70c: 2f 83 00 00 cmpwi cr7,r3,0 type = IMFS_UP_DIR; ffc0e710: 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 ) ffc0e714: 41 be ff 78 beq- cr7,ffc0e68c type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) ffc0e718: 3c 80 ff c2 lis r4,-62 ffc0e71c: 7f c3 f3 78 mr r3,r30 ffc0e720: 38 84 90 9c addi r4,r4,-28516 ffc0e724: 48 00 4c fd bl ffc13420 type = IMFS_CURRENT_DIR; } return type; } ffc0e728: 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 ) ffc0e72c: 30 63 ff ff addic r3,r3,-1 ffc0e730: 7c 63 19 10 subfe r3,r3,r3 type = IMFS_CURRENT_DIR; } return type; } ffc0e734: 83 41 00 08 lwz r26,8(r1) ffc0e738: 7c 08 03 a6 mtlr r0 ffc0e73c: 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 ) ffc0e740: 54 63 00 3c rlwinm r3,r3,0,0,30 type = IMFS_CURRENT_DIR; } return type; } ffc0e744: 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 ) ffc0e748: 38 63 00 03 addi r3,r3,3 type = IMFS_CURRENT_DIR; } return type; } ffc0e74c: 83 a1 00 14 lwz r29,20(r1) ffc0e750: 83 c1 00 18 lwz r30,24(r1) ffc0e754: 83 e1 00 1c lwz r31,28(r1) ffc0e758: 38 21 00 20 addi r1,r1,32 ffc0e75c: 4e 80 00 20 blr if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; ffc0e760: 3b 80 00 01 li r28,1 type = IMFS_CURRENT_DIR; ffc0e764: 38 60 00 01 li r3,1 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0e768: 93 9a 00 00 stw r28,0(r26) ffc0e76c: 4b ff ff 20 b ffc0e68c =============================================================================== ffc04048 : 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 ) { ffc04048: 94 21 ff e0 stwu r1,-32(r1) ffc0404c: 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, ffc04050: 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 ) { ffc04054: 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, ffc04058: 80 09 26 50 lwz r0,9808(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 ) { ffc0405c: 93 41 00 08 stw r26,8(r1) ffc04060: 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) { ffc04064: 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 ) { ffc04068: 93 81 00 10 stw r28,16(r1) ffc0406c: 7c dc 33 78 mr r28,r6 ffc04070: 93 a1 00 14 stw r29,20(r1) ffc04074: 7c 9d 23 78 mr r29,r4 ffc04078: 93 c1 00 18 stw r30,24(r1) ffc0407c: 7c be 2b 78 mr r30,r5 ffc04080: 93 e1 00 1c stw r31,28(r1) ffc04084: 7c 7f 1b 78 mr r31,r3 ffc04088: 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) { ffc0408c: 41 9e 00 30 beq- cr7,ffc040bc is_valid = true; break; } if(bit_mask > requested_bytes_per_block) ffc04090: 2f 80 00 0f cmpwi cr7,r0,15 ffc04094: 40 9d 00 24 ble- cr7,ffc040b8 ffc04098: 39 60 00 05 li r11,5 ffc0409c: 7d 69 03 a6 mtctr r11 ffc040a0: 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) { ffc040a4: 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) { ffc040a8: 55 29 08 3c rlwinm r9,r9,1,0,30 if (bit_mask == requested_bytes_per_block) { ffc040ac: 41 9e 00 10 beq- cr7,ffc040bc is_valid = true; break; } if(bit_mask > requested_bytes_per_block) ffc040b0: 41 9c 00 08 blt- cr7,ffc040b8 <== 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) { ffc040b4: 42 00 ff f0 bdnz+ ffc040a4 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); ffc040b8: 38 00 00 80 li r0,128 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ffc040bc: 3d 20 00 00 lis r9,0 ffc040c0: 90 09 27 08 stw r0,9992(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(); ffc040c4: 48 00 99 c9 bl ffc0da8c 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; ffc040c8: 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(); ffc040cc: 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; ffc040d0: 38 84 90 44 addi r4,r4,-28604 ffc040d4: 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; ffc040d8: 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(); ffc040dc: 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; ffc040e0: 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; ffc040e4: 93 bf 00 28 stw r29,40(r31) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; ffc040e8: 48 00 ee d5 bl ffc12fbc /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); ffc040ec: 38 60 00 01 li r3,1 ffc040f0: 38 80 00 14 li r4,20 ffc040f4: 48 00 08 dd bl ffc049d0 if ( !fs_info ) { ffc040f8: 7c 69 1b 79 mr. r9,r3 ffc040fc: 41 82 00 60 beq- ffc0415c /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc04100: 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; ffc04104: 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; ffc04108: 38 00 00 01 li r0,1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc0410c: 81 4b 27 d0 lwz r10,10192(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; ffc04110: 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; ffc04114: 90 09 00 04 stw r0,4(r9) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc04118: 39 0a 00 01 addi r8,r10,1 ffc0411c: 91 49 00 00 stw r10,0(r9) fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; ffc04120: 93 c9 00 08 stw r30,8(r9) fs_info->directory_handlers = directory_handlers; ffc04124: 93 89 00 0c stw r28,12(r9) fs_info->fifo_handlers = fifo_handlers; ffc04128: 93 49 00 10 stw r26,16(r9) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc0412c: 91 0b 27 d0 stw r8,10192(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; ffc04130: 90 1b 00 38 stw r0,56(r27) return 0; } ffc04134: 80 01 00 24 lwz r0,36(r1) ffc04138: 83 41 00 08 lwz r26,8(r1) ffc0413c: 7c 08 03 a6 mtlr r0 ffc04140: 83 61 00 0c lwz r27,12(r1) ffc04144: 83 81 00 10 lwz r28,16(r1) ffc04148: 83 a1 00 14 lwz r29,20(r1) ffc0414c: 83 c1 00 18 lwz r30,24(r1) ffc04150: 83 e1 00 1c lwz r31,28(r1) ffc04154: 38 21 00 20 addi r1,r1,32 ffc04158: 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); ffc0415c: 7f 63 db 78 mr r3,r27 ffc04160: 48 00 0b 1d bl ffc04c7c rtems_set_errno_and_return_minus_one(ENOMEM); ffc04164: 48 00 e1 f9 bl ffc1235c <__errno> ffc04168: 38 00 00 0c li r0,12 ffc0416c: 90 03 00 00 stw r0,0(r3) ffc04170: 38 60 ff ff li r3,-1 ffc04174: 4b ff ff c0 b ffc04134 =============================================================================== ffc10dc8 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc10dc8: 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 ) ffc10dcc: 3d 20 00 00 lis r9,0 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc10dd0: 7c 08 02 a6 mflr r0 ffc10dd4: 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 ) ffc10dd8: 83 a9 27 08 lwz r29,9992(r9) */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc10ddc: 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 ) ffc10de0: 57 a9 f0 be rlwinm r9,r29,30,2,31 ffc10de4: 39 69 00 01 addi r11,r9,1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc10de8: 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 ) ffc10dec: 7d 6b 49 d6 mullw r11,r11,r9 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc10df0: 93 81 00 18 stw r28,24(r1) ffc10df4: 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 ) ffc10df8: 38 0b 00 01 addi r0,r11,1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc10dfc: 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 ) ffc10e00: 39 60 00 00 li r11,0 ffc10e04: 7f 8b 28 00 cmpw cr7,r11,r5 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc10e08: 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 ) ffc10e0c: 7d 20 49 d6 mullw r9,r0,r9 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc10e10: 93 21 00 0c stw r25,12(r1) ffc10e14: 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 ) ffc10e18: 39 29 ff ff addi r9,r9,-1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc10e1c: 93 61 00 14 stw r27,20(r1) ffc10e20: 7c 7f 1b 78 mr r31,r3 ffc10e24: 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 ) ffc10e28: 7d 29 e9 d6 mullw r9,r9,r29 ffc10e2c: 40 9d 01 50 ble- cr7,ffc10f7c <== 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 ) ffc10e30: 83 7f 00 50 lwz r27,80(r31) ffc10e34: 83 3f 00 54 lwz r25,84(r31) ffc10e38: 7f 9c d8 00 cmpw cr7,r28,r27 ffc10e3c: 40 9d 00 c4 ble- cr7,ffc10f00 <== ALWAYS TAKEN return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10e40: 7f b8 fe 70 srawi r24,r29,31 ffc10e44: 7f 05 c3 78 mr r5,r24 ffc10e48: 7f a6 eb 78 mr r6,r29 ffc10e4c: 7f 83 e3 78 mr r3,r28 ffc10e50: 7f 44 d3 78 mr r4,r26 ffc10e54: 48 00 53 b5 bl ffc16208 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10e58: 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; ffc10e5c: 7c 9e 23 78 mr r30,r4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10e60: 7f 05 c3 78 mr r5,r24 ffc10e64: 7f 24 cb 78 mr r4,r25 ffc10e68: 7f a6 eb 78 mr r6,r29 ffc10e6c: 48 00 53 9d bl ffc16208 <__divdi3> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc10e70: 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; ffc10e74: 7c 9b 23 78 mr r27,r4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc10e78: 41 9c 00 c8 blt- cr7,ffc10f40 <== NEVER TAKEN ffc10e7c: 7c 9d 23 78 mr r29,r4 ffc10e80: 48 00 00 10 b ffc10e90 ffc10e84: 3b bd 00 01 addi r29,r29,1 ffc10e88: 7f 9e e8 40 cmplw cr7,r30,r29 ffc10e8c: 41 9c 00 b4 blt- cr7,ffc10f40 if ( IMFS_memfile_addblock( the_jnode, block ) ) { ffc10e90: 7f a4 eb 78 mr r4,r29 ffc10e94: 7f e3 fb 78 mr r3,r31 ffc10e98: 4b ff fc 2d bl ffc10ac4 ffc10e9c: 2f 83 00 00 cmpwi cr7,r3,0 ffc10ea0: 41 9e ff e4 beq+ cr7,ffc10e84 ffc10ea4: 48 00 00 14 b ffc10eb8 for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); ffc10ea8: 7f a4 eb 78 mr r4,r29 ffc10eac: 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-- ) { ffc10eb0: 3b bd ff ff addi r29,r29,-1 IMFS_memfile_remove_block( the_jnode, block ); ffc10eb4: 4b ff fe d9 bl ffc10d8c /* * 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-- ) { ffc10eb8: 7f 9b e8 40 cmplw cr7,r27,r29 ffc10ebc: 40 9d ff ec ble+ cr7,ffc10ea8 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); ffc10ec0: 48 00 14 9d bl ffc1235c <__errno> ffc10ec4: 38 00 00 1c li r0,28 ffc10ec8: 90 03 00 00 stw r0,0(r3) ffc10ecc: 38 60 ff ff li r3,-1 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } ffc10ed0: 80 01 00 2c lwz r0,44(r1) ffc10ed4: 83 01 00 08 lwz r24,8(r1) ffc10ed8: 7c 08 03 a6 mtlr r0 ffc10edc: 83 21 00 0c lwz r25,12(r1) ffc10ee0: 83 41 00 10 lwz r26,16(r1) ffc10ee4: 83 61 00 14 lwz r27,20(r1) ffc10ee8: 83 81 00 18 lwz r28,24(r1) ffc10eec: 83 a1 00 1c lwz r29,28(r1) ffc10ef0: 83 c1 00 20 lwz r30,32(r1) ffc10ef4: 83 e1 00 24 lwz r31,36(r1) ffc10ef8: 38 21 00 28 addi r1,r1,40 ffc10efc: 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 ) ffc10f00: 40 9e 00 0c bne- cr7,ffc10f0c <== NEVER TAKEN ffc10f04: 7f 9a c8 40 cmplw cr7,r26,r25 ffc10f08: 41 9d ff 38 bgt+ cr7,ffc10e40 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } ffc10f0c: 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; ffc10f10: 38 60 00 00 li r3,0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } ffc10f14: 83 01 00 08 lwz r24,8(r1) ffc10f18: 7c 08 03 a6 mtlr r0 ffc10f1c: 83 21 00 0c lwz r25,12(r1) ffc10f20: 83 41 00 10 lwz r26,16(r1) ffc10f24: 83 61 00 14 lwz r27,20(r1) ffc10f28: 83 81 00 18 lwz r28,24(r1) ffc10f2c: 83 a1 00 1c lwz r29,28(r1) ffc10f30: 83 c1 00 20 lwz r30,32(r1) ffc10f34: 83 e1 00 24 lwz r31,36(r1) ffc10f38: 38 21 00 28 addi r1,r1,40 ffc10f3c: 4e 80 00 20 blr } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc10f40: 93 9f 00 50 stw r28,80(r31) return 0; ffc10f44: 38 60 00 00 li r3,0 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc10f48: 93 5f 00 54 stw r26,84(r31) return 0; } ffc10f4c: 80 01 00 2c lwz r0,44(r1) ffc10f50: 83 01 00 08 lwz r24,8(r1) ffc10f54: 7c 08 03 a6 mtlr r0 ffc10f58: 83 21 00 0c lwz r25,12(r1) ffc10f5c: 83 41 00 10 lwz r26,16(r1) ffc10f60: 83 61 00 14 lwz r27,20(r1) ffc10f64: 83 81 00 18 lwz r28,24(r1) ffc10f68: 83 a1 00 1c lwz r29,28(r1) ffc10f6c: 83 c1 00 20 lwz r30,32(r1) ffc10f70: 83 e1 00 24 lwz r31,36(r1) ffc10f74: 38 21 00 28 addi r1,r1,40 ffc10f78: 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 ) ffc10f7c: 40 9e 00 0c bne- cr7,ffc10f88 <== NEVER TAKEN ffc10f80: 7f 89 30 40 cmplw cr7,r9,r6 ffc10f84: 41 9d fe ac bgt+ cr7,ffc10e30 rtems_set_errno_and_return_minus_one( EINVAL ); ffc10f88: 48 00 13 d5 bl ffc1235c <__errno> ffc10f8c: 38 00 00 16 li r0,22 ffc10f90: 90 03 00 00 stw r0,0(r3) ffc10f94: 38 60 ff ff li r3,-1 ffc10f98: 4b ff ff 38 b ffc10ed0 =============================================================================== ffc10580 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc10580: 94 21 ff d8 stwu r1,-40(r1) ffc10584: 7c 08 02 a6 mflr r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc10588: 3d 20 00 00 lis r9,0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc1058c: 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 ) { ffc10590: 80 09 27 08 lwz r0,9992(r9) #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc10594: 93 e1 00 24 stw r31,36(r1) ffc10598: 7c 7f 1b 78 mr r31,r3 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc1059c: 54 09 f0 be rlwinm r9,r0,30,2,31 ffc105a0: 38 09 ff ff addi r0,r9,-1 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc105a4: 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 ) { ffc105a8: 7f 84 00 40 cmplw cr7,r4,r0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc105ac: 93 81 00 18 stw r28,24(r1) ffc105b0: 93 a1 00 1c stw r29,28(r1) ffc105b4: 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 ) { ffc105b8: 41 9d 00 48 bgt- cr7,ffc10600 p = info->indirect; if ( malloc_it ) { ffc105bc: 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; ffc105c0: 80 63 00 58 lwz r3,88(r3) if ( malloc_it ) { ffc105c4: 41 9e 00 b8 beq- cr7,ffc1067c if ( !p ) { ffc105c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc105cc: 41 9e 01 70 beq- cr7,ffc1073c /* * This means the requested block number is out of range. */ return 0; } ffc105d0: 80 01 00 2c lwz r0,44(r1) } if ( !p ) return 0; return &info->indirect[ my_block ]; ffc105d4: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc105d8: 7f c3 22 14 add r30,r3,r4 /* * This means the requested block number is out of range. */ return 0; } ffc105dc: 83 61 00 14 lwz r27,20(r1) ffc105e0: 7c 08 03 a6 mtlr r0 ffc105e4: 7f c3 f3 78 mr r3,r30 ffc105e8: 83 81 00 18 lwz r28,24(r1) ffc105ec: 83 a1 00 1c lwz r29,28(r1) ffc105f0: 83 c1 00 20 lwz r30,32(r1) ffc105f4: 83 e1 00 24 lwz r31,36(r1) ffc105f8: 38 21 00 28 addi r1,r1,40 ffc105fc: 4e 80 00 20 blr /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { ffc10600: 3b 89 00 01 addi r28,r9,1 ffc10604: 7f 9c 49 d6 mullw r28,r28,r9 ffc10608: 38 1c ff ff addi r0,r28,-1 ffc1060c: 7f 84 00 40 cmplw cr7,r4,r0 ffc10610: 41 9d 00 7c bgt- cr7,ffc1068c my_block -= FIRST_DOUBLY_INDIRECT; ffc10614: 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; ffc10618: 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; ffc1061c: 7f a4 4b 96 divwu r29,r4,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc10620: 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; ffc10624: 7d 3d 49 d6 mullw r9,r29,r9 ffc10628: 7f 89 20 50 subf r28,r9,r4 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc1062c: 41 9e 00 e8 beq- cr7,ffc10714 if ( !p ) { ffc10630: 2f 8b 00 00 cmpwi cr7,r11,0 ffc10634: 41 9e 01 28 beq- cr7,ffc1075c if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; ffc10638: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc1063c: 7c 6b e8 2e lwzx r3,r11,r29 ffc10640: 7f ab ea 14 add r29,r11,r29 if ( !p1 ) { ffc10644: 2f 83 00 00 cmpwi cr7,r3,0 ffc10648: 41 9e 01 2c beq- cr7,ffc10774 p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; ffc1064c: 57 9e 10 3a rlwinm r30,r28,2,0,29 ffc10650: 7f c3 f2 14 add r30,r3,r30 /* * This means the requested block number is out of range. */ return 0; } ffc10654: 80 01 00 2c lwz r0,44(r1) ffc10658: 7f c3 f3 78 mr r3,r30 ffc1065c: 83 61 00 14 lwz r27,20(r1) ffc10660: 7c 08 03 a6 mtlr r0 ffc10664: 83 81 00 18 lwz r28,24(r1) ffc10668: 83 a1 00 1c lwz r29,28(r1) ffc1066c: 83 c1 00 20 lwz r30,32(r1) ffc10670: 83 e1 00 24 lwz r31,36(r1) ffc10674: 38 21 00 28 addi r1,r1,40 ffc10678: 4e 80 00 20 blr info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) ffc1067c: 2f 83 00 00 cmpwi cr7,r3,0 return 0; ffc10680: 3b c0 00 00 li r30,0 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) ffc10684: 40 9e ff 4c bne+ cr7,ffc105d0 <== ALWAYS TAKEN ffc10688: 4b ff ff cc b ffc10654 <== NOT EXECUTED } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc1068c: 39 7c 00 01 addi r11,r28,1 ffc10690: 7d 6b 49 d6 mullw r11,r11,r9 } /* * This means the requested block number is out of range. */ return 0; ffc10694: 3b c0 00 00 li r30,0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc10698: 38 0b ff ff addi r0,r11,-1 ffc1069c: 7f 84 00 40 cmplw cr7,r4,r0 ffc106a0: 41 bd ff b4 bgt- cr7,ffc10654 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; ffc106a4: 7c 9c 20 50 subf r4,r28,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; ffc106a8: 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; ffc106ac: 7d 64 4b 96 divwu r11,r4,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; ffc106b0: 7f ab 4b 96 divwu r29,r11,r9 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { ffc106b4: 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; ffc106b8: 7f 8b 49 d6 mullw r28,r11,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ffc106bc: 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; ffc106c0: 7f 9c 20 50 subf r28,r28,r4 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ffc106c4: 7f 69 58 50 subf r27,r9,r11 p = info->triply_indirect; if ( malloc_it ) { ffc106c8: 41 9e 00 c4 beq- cr7,ffc1078c if ( !p ) { ffc106cc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc106d0: 41 9e 01 00 beq- cr7,ffc107d0 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; ffc106d4: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc106d8: 7d 2a e8 2e lwzx r9,r10,r29 ffc106dc: 7f aa ea 14 add r29,r10,r29 if ( !p1 ) { ffc106e0: 2f 89 00 00 cmpwi cr7,r9,0 ffc106e4: 41 9e 00 d4 beq- cr7,ffc107b8 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; ffc106e8: 57 7b 10 3a rlwinm r27,r27,2,0,29 ffc106ec: 7c 69 d8 2e lwzx r3,r9,r27 ffc106f0: 7f 69 da 14 add r27,r9,r27 if ( !p2 ) { ffc106f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc106f8: 40 9e ff 54 bne+ cr7,ffc1064c p2 = memfile_alloc_block(); ffc106fc: 4b ff fe 41 bl ffc1053c if ( !p2 ) return 0; ffc10700: 3b c0 00 00 li r30,0 } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) ffc10704: 2c 03 00 00 cmpwi r3,0 ffc10708: 41 a2 ff 4c beq- ffc10654 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; ffc1070c: 90 7b 00 00 stw r3,0(r27) ffc10710: 4b ff ff 3c b ffc1064c } return (block_p *)&p1[ singly ]; } if ( !p ) ffc10714: 2f 8b 00 00 cmpwi cr7,r11,0 return 0; ffc10718: 3b c0 00 00 li r30,0 } return (block_p *)&p1[ singly ]; } if ( !p ) ffc1071c: 41 9e ff 38 beq+ cr7,ffc10654 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; ffc10720: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc10724: 7c 0b e8 2e lwzx r0,r11,r29 if ( !p ) ffc10728: 2f 80 00 00 cmpwi cr7,r0,0 ffc1072c: 41 be ff 28 beq- cr7,ffc10654 <== NEVER TAKEN p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; ffc10730: 57 9e 10 3a rlwinm r30,r28,2,0,29 ffc10734: 7f c0 f2 14 add r30,r0,r30 ffc10738: 4b ff ff 1c b ffc10654 p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc1073c: 90 81 00 08 stw r4,8(r1) ffc10740: 4b ff fd fd bl ffc1053c if ( !p ) ffc10744: 2c 03 00 00 cmpwi r3,0 return 0; ffc10748: 3b c0 00 00 li r30,0 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) ffc1074c: 80 81 00 08 lwz r4,8(r1) ffc10750: 41 a2 ff 04 beq- ffc10654 <== NEVER TAKEN return 0; info->indirect = p; ffc10754: 90 7f 00 58 stw r3,88(r31) ffc10758: 4b ff fe 78 b ffc105d0 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc1075c: 4b ff fd e1 bl ffc1053c if ( !p ) return 0; ffc10760: 3b c0 00 00 li r30,0 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) ffc10764: 7c 6b 1b 79 mr. r11,r3 ffc10768: 41 a2 fe ec beq- ffc10654 <== NEVER TAKEN return 0; info->doubly_indirect = p; ffc1076c: 91 7f 00 5c stw r11,92(r31) ffc10770: 4b ff fe c8 b ffc10638 } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); ffc10774: 4b ff fd c9 bl ffc1053c if ( !p1 ) return 0; ffc10778: 3b c0 00 00 li r30,0 } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) ffc1077c: 2c 03 00 00 cmpwi r3,0 ffc10780: 41 a2 fe d4 beq- ffc10654 <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; ffc10784: 90 7d 00 00 stw r3,0(r29) ffc10788: 4b ff fe c4 b ffc1064c p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) ffc1078c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc10790: 41 9e fe c4 beq+ cr7,ffc10654 <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; ffc10794: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc10798: 7d 2a e8 2e lwzx r9,r10,r29 if ( !p1 ) ffc1079c: 2f 89 00 00 cmpwi cr7,r9,0 ffc107a0: 41 9e fe b4 beq+ cr7,ffc10654 <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; ffc107a4: 57 7b 10 3a rlwinm r27,r27,2,0,29 ffc107a8: 7c 09 d8 2e lwzx r0,r9,r27 if ( !p2 ) ffc107ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc107b0: 40 9e ff 80 bne+ cr7,ffc10730 <== ALWAYS TAKEN ffc107b4: 4b ff fe a0 b ffc10654 <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); ffc107b8: 4b ff fd 85 bl ffc1053c if ( !p1 ) return 0; ffc107bc: 3b c0 00 00 li r30,0 } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) ffc107c0: 7c 69 1b 79 mr. r9,r3 ffc107c4: 41 a2 fe 90 beq- ffc10654 <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; ffc107c8: 91 3d 00 00 stw r9,0(r29) ffc107cc: 4b ff ff 1c b ffc106e8 p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc107d0: 4b ff fd 6d bl ffc1053c if ( !p ) ffc107d4: 7c 6a 1b 79 mr. r10,r3 ffc107d8: 41 a2 fe 7c beq- ffc10654 <== NEVER TAKEN return 0; info->triply_indirect = p; ffc107dc: 91 5f 00 60 stw r10,96(r31) ffc107e0: 4b ff fe f4 b ffc106d4 =============================================================================== ffc107e4 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc107e4: 94 21 ff c0 stwu r1,-64(r1) ffc107e8: 7c 08 02 a6 mflr r0 ffc107ec: 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) { ffc107f0: 80 03 00 4c lwz r0,76(r3) IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc107f4: 93 81 00 30 stw r28,48(r1) ffc107f8: 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) { ffc107fc: 2f 80 00 06 cmpwi cr7,r0,6 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc10800: 93 a1 00 34 stw r29,52(r1) ffc10804: 7c 7d 1b 78 mr r29,r3 ffc10808: 93 c1 00 38 stw r30,56(r1) ffc1080c: 7c be 2b 78 mr r30,r5 ffc10810: 93 e1 00 3c stw r31,60(r1) ffc10814: 7c df 33 78 mr r31,r6 ffc10818: 92 e1 00 1c stw r23,28(r1) ffc1081c: 93 01 00 20 stw r24,32(r1) ffc10820: 93 21 00 24 stw r25,36(r1) ffc10824: 93 41 00 28 stw r26,40(r1) ffc10828: 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) { ffc1082c: 41 9e 01 d0 beq- cr7,ffc109fc /* * 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 ) ffc10830: 80 03 00 50 lwz r0,80(r3) ffc10834: 39 20 00 00 li r9,0 ffc10838: 83 43 00 54 lwz r26,84(r3) ffc1083c: 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; ffc10840: 7c c0 33 78 mr r0,r6 ffc10844: 7d 28 32 14 add r9,r8,r6 if ( last_byte > the_jnode->info.file.size ) ffc10848: 40 9d 01 28 ble- cr7,ffc10970 <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; ffc1084c: 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; ffc10850: 3f 20 00 00 lis r25,0 ffc10854: 83 79 27 08 lwz r27,9992(r25) ffc10858: 7f c3 f3 78 mr r3,r30 ffc1085c: 7f e4 fb 78 mr r4,r31 ffc10860: 7f 78 fe 70 srawi r24,r27,31 ffc10864: 7f 05 c3 78 mr r5,r24 ffc10868: 7f 66 db 78 mr r6,r27 ffc1086c: 48 00 5d b5 bl ffc16620 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10870: 7f c3 f3 78 mr r3,r30 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10874: 7c 97 23 78 mr r23,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10878: 7f 05 c3 78 mr r5,r24 ffc1087c: 7f e4 fb 78 mr r4,r31 ffc10880: 7f 66 db 78 mr r6,r27 ffc10884: 48 00 59 85 bl ffc16208 <__divdi3> if ( start_offset ) { ffc10888: 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; ffc1088c: 7c 9e 23 78 mr r30,r4 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; ffc10890: 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; ffc10894: 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 ) { ffc10898: 41 9e 00 50 beq- cr7,ffc108e8 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 ); ffc1089c: 7f a3 eb 78 mr r3,r29 ffc108a0: 38 a0 00 00 li r5,0 ffc108a4: 4b ff fc dd bl ffc10580 if ( !block_ptr ) ffc108a8: 7c 69 1b 79 mr. r9,r3 return copied; ffc108ac: 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 ) ffc108b0: 41 82 00 8c beq- ffc1093c <== 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; ffc108b4: 7f 77 d8 50 subf r27,r23,r27 ffc108b8: 7f 9a d8 40 cmplw cr7,r26,r27 ffc108bc: 7f 5f d3 78 mr r31,r26 ffc108c0: 41 9d 01 cc bgt- cr7,ffc10a8c 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 ); ffc108c4: 80 89 00 00 lwz r4,0(r9) ffc108c8: 7f 83 e3 78 mr r3,r28 ffc108cc: 7f e5 fb 78 mr r5,r31 ffc108d0: 7c 84 ba 14 add r4,r4,r23 ffc108d4: 48 00 26 e9 bl ffc12fbc dest += to_copy; block++; my_length -= to_copy; ffc108d8: 83 79 27 08 lwz r27,9992(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; ffc108dc: 7f 1c fa 14 add r24,r28,r31 block++; ffc108e0: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; ffc108e4: 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 ) { ffc108e8: 7f 9a d8 40 cmplw cr7,r26,r27 ffc108ec: 40 bc 00 20 bge+ cr7,ffc1090c ffc108f0: 48 00 00 8c b ffc1097c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc108f4: 80 89 00 00 lwz r4,0(r9) dest += to_copy; block++; my_length -= to_copy; copied += to_copy; ffc108f8: 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 ); ffc108fc: 48 00 26 c1 bl ffc12fbc /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc10900: 80 19 27 08 lwz r0,9992(r25) ffc10904: 7f 80 d0 40 cmplw cr7,r0,r26 ffc10908: 41 9d 00 74 bgt- cr7,ffc1097c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc1090c: 7f c4 f3 78 mr r4,r30 ffc10910: 38 a0 00 00 li r5,0 ffc10914: 7f a3 eb 78 mr r3,r29 ffc10918: 4b ff fc 69 bl ffc10580 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; ffc1091c: 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 ) ffc10920: 7c 69 1b 79 mr. r9,r3 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc10924: 7f 65 db 78 mr r5,r27 ffc10928: 7f 03 c3 78 mr r3,r24 dest += to_copy; block++; ffc1092c: 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; ffc10930: 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 ) ffc10934: 40 82 ff c0 bne+ ffc108f4 <== 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; ffc10938: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } ffc1093c: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc10940: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc10944: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc10948: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc1094c: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc10950: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc10954: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc10958: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc1095c: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc10960: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc10964: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc10968: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc1096c: 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 ) ffc10970: 41 9e 01 0c beq- cr7,ffc10a7c <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc10974: 7d 1a 43 78 mr r26,r8 <== NOT EXECUTED ffc10978: 4b ff fe d8 b ffc10850 <== NOT EXECUTED /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { ffc1097c: 2f 9a 00 00 cmpwi cr7,r26,0 ffc10980: 41 9e 00 30 beq- cr7,ffc109b0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc10984: 7f a3 eb 78 mr r3,r29 ffc10988: 7f c4 f3 78 mr r4,r30 ffc1098c: 38 a0 00 00 li r5,0 ffc10990: 4b ff fb f1 bl ffc10580 if ( !block_ptr ) ffc10994: 2c 03 00 00 cmpwi r3,0 ffc10998: 41 a2 ff a0 beq- ffc10938 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); ffc1099c: 80 83 00 00 lwz r4,0(r3) ffc109a0: 7f 45 d3 78 mr r5,r26 ffc109a4: 7f 03 c3 78 mr r3,r24 ffc109a8: 48 00 26 15 bl ffc12fbc copied += my_length; ffc109ac: 7f ff d2 14 add r31,r31,r26 } IMFS_update_atime( the_jnode ); ffc109b0: 38 61 00 08 addi r3,r1,8 ffc109b4: 38 80 00 00 li r4,0 ffc109b8: 4b ff 43 8d bl ffc04d44 ffc109bc: 80 01 00 08 lwz r0,8(r1) return copied; ffc109c0: 7f e3 fb 78 mr r3,r31 } ffc109c4: 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 ); ffc109c8: 90 1d 00 40 stw r0,64(r29) return copied; } ffc109cc: 80 01 00 44 lwz r0,68(r1) ffc109d0: 83 01 00 20 lwz r24,32(r1) ffc109d4: 7c 08 03 a6 mtlr r0 ffc109d8: 83 21 00 24 lwz r25,36(r1) ffc109dc: 83 41 00 28 lwz r26,40(r1) ffc109e0: 83 61 00 2c lwz r27,44(r1) ffc109e4: 83 81 00 30 lwz r28,48(r1) ffc109e8: 83 a1 00 34 lwz r29,52(r1) ffc109ec: 83 c1 00 38 lwz r30,56(r1) ffc109f0: 83 e1 00 3c lwz r31,60(r1) ffc109f4: 38 21 00 40 addi r1,r1,64 ffc109f8: 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)) ffc109fc: 81 23 00 50 lwz r9,80(r3) ffc10a00: 38 00 00 00 li r0,0 ffc10a04: 81 43 00 54 lwz r10,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; ffc10a08: 80 83 00 58 lwz r4,88(r3) if (my_length > (the_jnode->info.linearfile.size - start)) ffc10a0c: 7d 9f 50 10 subfc r12,r31,r10 ffc10a10: 7d 7e 49 10 subfe r11,r30,r9 ffc10a14: 7f 80 58 00 cmpw cr7,r0,r11 ffc10a18: 40 9d 00 7c ble- cr7,ffc10a94 <== ALWAYS TAKEN my_length = the_jnode->info.linearfile.size - start; ffc10a1c: 7f 5f 50 50 subf r26,r31,r10 memcpy(dest, &file_ptr[start], my_length); ffc10a20: 7c 84 fa 14 add r4,r4,r31 ffc10a24: 7f 45 d3 78 mr r5,r26 ffc10a28: 7f 83 e3 78 mr r3,r28 ffc10a2c: 48 00 25 91 bl ffc12fbc IMFS_update_atime( the_jnode ); ffc10a30: 38 61 00 08 addi r3,r1,8 ffc10a34: 38 80 00 00 li r4,0 ffc10a38: 4b ff 43 0d bl ffc04d44 ffc10a3c: 80 01 00 08 lwz r0,8(r1) return my_length; ffc10a40: 7f 43 d3 78 mr r3,r26 } IMFS_update_atime( the_jnode ); return copied; } ffc10a44: 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 ); ffc10a48: 90 1d 00 40 stw r0,64(r29) } IMFS_update_atime( the_jnode ); return copied; } ffc10a4c: 80 01 00 44 lwz r0,68(r1) ffc10a50: 83 01 00 20 lwz r24,32(r1) ffc10a54: 7c 08 03 a6 mtlr r0 ffc10a58: 83 21 00 24 lwz r25,36(r1) ffc10a5c: 83 41 00 28 lwz r26,40(r1) ffc10a60: 83 61 00 2c lwz r27,44(r1) ffc10a64: 83 81 00 30 lwz r28,48(r1) ffc10a68: 83 a1 00 34 lwz r29,52(r1) ffc10a6c: 83 c1 00 38 lwz r30,56(r1) ffc10a70: 83 e1 00 3c lwz r31,60(r1) ffc10a74: 38 21 00 40 addi r1,r1,64 ffc10a78: 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 ) ffc10a7c: 7f 89 d0 40 cmplw cr7,r9,r26 ffc10a80: 41 bd fd cc bgt- cr7,ffc1084c /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc10a84: 7d 1a 43 78 mr r26,r8 ffc10a88: 4b ff fd c8 b ffc10850 * 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; ffc10a8c: 7f 7f db 78 mr r31,r27 ffc10a90: 4b ff fe 34 b ffc108c4 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)) ffc10a94: 40 9e 00 0c bne- cr7,ffc10aa0 <== NEVER TAKEN ffc10a98: 7f 88 60 40 cmplw cr7,r8,r12 ffc10a9c: 41 9d ff 80 bgt+ cr7,ffc10a1c <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc10aa0: 7d 1a 43 78 mr r26,r8 <== NOT EXECUTED ffc10aa4: 4b ff ff 7c b ffc10a20 <== NOT EXECUTED =============================================================================== ffc10be0 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc10be0: 94 21 ff d8 stwu r1,-40(r1) ffc10be4: 7c 08 02 a6 mflr r0 ffc10be8: 93 41 00 10 stw r26,16(r1) ffc10bec: 7c 7a 1b 78 mr r26,r3 ffc10bf0: 93 a1 00 1c stw r29,28(r1) ffc10bf4: 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; ffc10bf8: 3f c0 00 00 lis r30,0 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc10bfc: 90 01 00 2c stw r0,44(r1) ffc10c00: 93 21 00 0c stw r25,12(r1) ffc10c04: 93 61 00 14 stw r27,20(r1) ffc10c08: 93 81 00 18 stw r28,24(r1) ffc10c0c: 93 e1 00 24 stw r31,36(r1) * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc10c10: 80 03 00 58 lwz r0,88(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; ffc10c14: 83 be 27 08 lwz r29,9992(r30) * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc10c18: 2f 80 00 00 cmpwi cr7,r0,0 /* * 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; ffc10c1c: 57 bd f0 be rlwinm r29,r29,30,2,31 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc10c20: 41 9e 00 10 beq- cr7,ffc10c30 memfile_free_blocks_in_table( &info->indirect, to_free ); ffc10c24: 38 63 00 58 addi r3,r3,88 ffc10c28: 7f a4 eb 78 mr r4,r29 ffc10c2c: 4b ff ff 25 bl ffc10b50 } if ( info->doubly_indirect ) { ffc10c30: 81 3a 00 5c lwz r9,92(r26) ffc10c34: 2f 89 00 00 cmpwi cr7,r9,0 ffc10c38: 41 9e 00 68 beq- cr7,ffc10ca0 for ( i=0 ; i <== NEVER TAKEN ffc10c48: 3f 80 00 00 lis r28,0 ffc10c4c: 38 60 00 00 li r3,0 ffc10c50: 3b e0 00 00 li r31,0 ffc10c54: 3b 9c 27 08 addi r28,r28,9992 ffc10c58: 48 00 00 08 b ffc10c60 ffc10c5c: 81 3a 00 5c lwz r9,92(r26) if ( info->doubly_indirect[i] ) { ffc10c60: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc10c64: 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( ffc10c6c: 7c 69 1a 14 add r3,r9,r3 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { ffc10c70: 2f 80 00 00 cmpwi cr7,r0,0 memfile_free_blocks_in_table( ffc10c74: 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] ) { ffc10c78: 41 9e 00 08 beq- cr7,ffc10c80 <== NEVER TAKEN memfile_free_blocks_in_table( ffc10c7c: 4b ff fe d5 bl ffc10b50 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 ); ffc10c94: 38 7a 00 5c addi r3,r26,92 ffc10c98: 7f a4 eb 78 mr r4,r29 ffc10c9c: 4b ff fe b5 bl ffc10b50 } if ( info->triply_indirect ) { ffc10ca0: 80 7a 00 60 lwz r3,96(r26) ffc10ca4: 2f 83 00 00 cmpwi cr7,r3,0 ffc10ca8: 41 9e 00 b4 beq- cr7,ffc10d5c for ( i=0 ; i <== NEVER TAKEN p = (block_p *) info->triply_indirect[i]; ffc10cb8: 83 c3 00 00 lwz r30,0(r3) if ( !p ) /* ensure we have a valid pointer */ ffc10cbc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc10cc0: 41 9e 00 90 beq- cr7,ffc10d50 <== NEVER TAKEN ffc10cc4: 3f 80 00 00 lis r28,0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc10cc8: 3b 20 00 00 li r25,0 if ( !p ) /* ensure we have a valid pointer */ ffc10ccc: 3b 60 00 00 li r27,0 ffc10cd0: 3b 9c 27 08 addi r28,r28,9992 break; for ( j=0 ; j<== NEVER TAKEN ffc10cdc: 38 60 00 00 li r3,0 ffc10ce0: 3b e0 00 00 li r31,0 if ( p[j] ) { ffc10ce4: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc10ce8: 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 ; 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); ffc10d00: 4b ff fe 51 bl ffc10b50 if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j ffc10d18: 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( ffc10d1c: 7c 63 ca 14 add r3,r3,r25 ffc10d20: 7f a4 eb 78 mr r4,r29 ffc10d24: 4b ff fe 2d bl ffc10b50 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]; ffc10d3c: 80 7a 00 60 lwz r3,96(r26) if ( !p ) /* ensure we have a valid pointer */ ffc10d40: 57 79 10 3a rlwinm r25,r27,2,0,29 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc10d44: 7f c3 c8 2e lwzx r30,r3,r25 if ( !p ) /* ensure we have a valid pointer */ ffc10d48: 2f 9e 00 00 cmpwi cr7,r30,0 ffc10d4c: 40 9e ff 88 bne+ cr7,ffc10cd4 <== ALWAYS TAKEN } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( ffc10d50: 38 7a 00 60 addi r3,r26,96 ffc10d54: 7f a4 eb 78 mr r4,r29 ffc10d58: 4b ff fd f9 bl ffc10b50 (block_p **)&info->triply_indirect, to_free ); } return 0; } ffc10d5c: 80 01 00 2c lwz r0,44(r1) ffc10d60: 38 60 00 00 li r3,0 ffc10d64: 83 21 00 0c lwz r25,12(r1) ffc10d68: 7c 08 03 a6 mtlr r0 ffc10d6c: 83 41 00 10 lwz r26,16(r1) ffc10d70: 83 61 00 14 lwz r27,20(r1) ffc10d74: 83 81 00 18 lwz r28,24(r1) ffc10d78: 83 a1 00 1c lwz r29,28(r1) ffc10d7c: 83 c1 00 20 lwz r30,32(r1) ffc10d80: 83 e1 00 24 lwz r31,36(r1) ffc10d84: 38 21 00 28 addi r1,r1,40 ffc10d88: 4e 80 00 20 blr =============================================================================== ffc10f9c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc10f9c: 94 21 ff c0 stwu r1,-64(r1) ffc10fa0: 7c 08 02 a6 mflr r0 ffc10fa4: 92 e1 00 1c stw r23,28(r1) ffc10fa8: 7c f7 3b 78 mr r23,r7 ffc10fac: 93 81 00 30 stw r28,48(r1) ffc10fb0: 7c bc 2b 78 mr r28,r5 ffc10fb4: 93 a1 00 34 stw r29,52(r1) ffc10fb8: 7d 1d 43 78 mr r29,r8 ffc10fbc: 93 c1 00 38 stw r30,56(r1) ffc10fc0: 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; ffc10fc4: 7c c8 32 14 add r6,r8,r6 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc10fc8: 93 e1 00 3c stw r31,60(r1) ffc10fcc: 7c 7f 1b 78 mr r31,r3 ffc10fd0: 90 01 00 44 stw r0,68(r1) ffc10fd4: 93 01 00 20 stw r24,32(r1) ffc10fd8: 93 21 00 24 stw r25,36(r1) ffc10fdc: 93 41 00 28 stw r26,40(r1) ffc10fe0: 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 ) { ffc10fe4: 80 03 00 50 lwz r0,80(r3) ffc10fe8: 2f 80 00 00 cmpwi cr7,r0,0 ffc10fec: 41 9c 01 b4 blt- cr7,ffc111a0 <== NEVER TAKEN ffc10ff0: 41 9e 01 a4 beq- cr7,ffc11194 <== ALWAYS TAKEN */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10ff4: 3f 40 00 00 lis r26,0 ffc10ff8: 83 7a 27 08 lwz r27,9992(r26) ffc10ffc: 7f 83 e3 78 mr r3,r28 ffc11000: 7f c4 f3 78 mr r4,r30 ffc11004: 7f 79 fe 70 srawi r25,r27,31 ffc11008: 7f 25 cb 78 mr r5,r25 ffc1100c: 7f 66 db 78 mr r6,r27 ffc11010: 48 00 56 11 bl ffc16620 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11014: 7f 83 e3 78 mr r3,r28 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11018: 7c 98 23 78 mr r24,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc1101c: 7f 25 cb 78 mr r5,r25 ffc11020: 7f c4 f3 78 mr r4,r30 ffc11024: 7f 66 db 78 mr r6,r27 ffc11028: 48 00 51 e1 bl ffc16208 <__divdi3> if ( start_offset ) { ffc1102c: 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; ffc11030: 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; ffc11034: 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 ) { ffc11038: 40 9e 00 8c bne- cr7,ffc110c4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc1103c: 7f 9d d8 40 cmplw cr7,r29,r27 ffc11040: 40 bc 00 20 bge+ cr7,ffc11060 ffc11044: 48 00 00 cc b ffc11110 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 ); ffc11048: 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( ffc1104c: 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 ); ffc11050: 48 00 1f 6d bl ffc12fbc /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc11054: 80 1a 27 08 lwz r0,9992(r26) ffc11058: 7f 80 e8 40 cmplw cr7,r0,r29 ffc1105c: 41 9d 00 b4 bgt- cr7,ffc11110 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11060: 7f c4 f3 78 mr r4,r30 ffc11064: 38 a0 00 00 li r5,0 ffc11068: 7f e3 fb 78 mr r3,r31 ffc1106c: 4b ff f5 15 bl ffc10580 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; ffc11070: 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 ) ffc11074: 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 ); ffc11078: 7e e4 bb 78 mr r4,r23 ffc1107c: 7f 65 db 78 mr r5,r27 src += to_copy; ffc11080: 7e f7 da 14 add r23,r23,r27 block++; ffc11084: 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 ) ffc11088: 40 82 ff c0 bne+ ffc11048 <== ALWAYS TAKEN } IMFS_mtime_ctime_update( the_jnode ); return copied; } ffc1108c: 80 01 00 44 lwz r0,68(r1) ffc11090: 7f 83 e3 78 mr r3,r28 ffc11094: 82 e1 00 1c lwz r23,28(r1) ffc11098: 7c 08 03 a6 mtlr r0 ffc1109c: 83 01 00 20 lwz r24,32(r1) ffc110a0: 83 21 00 24 lwz r25,36(r1) ffc110a4: 83 41 00 28 lwz r26,40(r1) ffc110a8: 83 61 00 2c lwz r27,44(r1) ffc110ac: 83 81 00 30 lwz r28,48(r1) ffc110b0: 83 a1 00 34 lwz r29,52(r1) ffc110b4: 83 c1 00 38 lwz r30,56(r1) ffc110b8: 83 e1 00 3c lwz r31,60(r1) ffc110bc: 38 21 00 40 addi r1,r1,64 ffc110c0: 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 ); ffc110c4: 7f e3 fb 78 mr r3,r31 ffc110c8: 38 a0 00 00 li r5,0 ffc110cc: 4b ff f4 b5 bl ffc10580 if ( !block_ptr ) return copied; ffc110d0: 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 ) ffc110d4: 2c 03 00 00 cmpwi r3,0 ffc110d8: 41 a2 ff b4 beq- ffc1108c <== 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; ffc110dc: 7f 98 d8 50 subf r28,r24,r27 ffc110e0: 7f 9c e8 40 cmplw cr7,r28,r29 ffc110e4: 41 9d 00 e4 bgt- cr7,ffc111c8 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc110e8: 80 63 00 00 lwz r3,0(r3) ffc110ec: 7e e4 bb 78 mr r4,r23 ffc110f0: 7f 85 e3 78 mr r5,r28 ffc110f4: 7c 63 c2 14 add r3,r3,r24 ffc110f8: 48 00 1e c5 bl ffc12fbc src += to_copy; ffc110fc: 7e f7 e2 14 add r23,r23,r28 block++; ffc11100: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; copied += to_copy; ffc11104: 83 7a 27 08 lwz r27,9992(r26) ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; ffc11108: 7f bc e8 50 subf r29,r28,r29 ffc1110c: 4b ff ff 30 b ffc1103c * 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 ) { ffc11110: 2f 9d 00 00 cmpwi cr7,r29,0 ffc11114: 41 9e 00 30 beq- cr7,ffc11144 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11118: 7f e3 fb 78 mr r3,r31 ffc1111c: 7f c4 f3 78 mr r4,r30 ffc11120: 38 a0 00 00 li r5,0 ffc11124: 4b ff f4 5d bl ffc10580 if ( !block_ptr ) ffc11128: 2c 03 00 00 cmpwi r3,0 ffc1112c: 41 a2 ff 60 beq- ffc1108c <== 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 ); ffc11130: 80 63 00 00 lwz r3,0(r3) ffc11134: 7e e4 bb 78 mr r4,r23 ffc11138: 7f a5 eb 78 mr r5,r29 ffc1113c: 48 00 1e 81 bl ffc12fbc my_length = 0; copied += to_copy; ffc11140: 7f 9c ea 14 add r28,r28,r29 } IMFS_mtime_ctime_update( the_jnode ); ffc11144: 38 61 00 08 addi r3,r1,8 ffc11148: 38 80 00 00 li r4,0 ffc1114c: 4b ff 3b f9 bl ffc04d44 ffc11150: 80 01 00 08 lwz r0,8(r1) return copied; } ffc11154: 7f 83 e3 78 mr r3,r28 ffc11158: 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 ); ffc1115c: 90 1f 00 44 stw r0,68(r31) ffc11160: 90 1f 00 48 stw r0,72(r31) return copied; } ffc11164: 80 01 00 44 lwz r0,68(r1) ffc11168: 83 01 00 20 lwz r24,32(r1) ffc1116c: 7c 08 03 a6 mtlr r0 ffc11170: 83 21 00 24 lwz r25,36(r1) ffc11174: 83 41 00 28 lwz r26,40(r1) ffc11178: 83 61 00 2c lwz r27,44(r1) ffc1117c: 83 81 00 30 lwz r28,48(r1) ffc11180: 83 a1 00 34 lwz r29,52(r1) ffc11184: 83 c1 00 38 lwz r30,56(r1) ffc11188: 83 e1 00 3c lwz r31,60(r1) ffc1118c: 38 21 00 40 addi r1,r1,64 ffc11190: 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 ) { ffc11194: 80 03 00 54 lwz r0,84(r3) ffc11198: 7f 80 30 40 cmplw cr7,r0,r6 ffc1119c: 40 9c fe 58 bge+ cr7,ffc10ff4 <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); ffc111a0: 7f e3 fb 78 mr r3,r31 ffc111a4: 38 a0 00 00 li r5,0 ffc111a8: 4b ff fc 21 bl ffc10dc8 if ( status ) ffc111ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc111b0: 41 9e fe 44 beq+ cr7,ffc10ff4 rtems_set_errno_and_return_minus_one( ENOSPC ); ffc111b4: 48 00 11 a9 bl ffc1235c <__errno> ffc111b8: 38 00 00 1c li r0,28 ffc111bc: 90 03 00 00 stw r0,0(r3) ffc111c0: 3b 80 ff ff li r28,-1 ffc111c4: 4b ff fe c8 b ffc1108c block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc111c8: 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; ffc111cc: 7f bc eb 78 mr r28,r29 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc111d0: 7e e4 bb 78 mr r4,r23 ffc111d4: 7c 63 c2 14 add r3,r3,r24 ffc111d8: 7f 85 e3 78 mr r5,r28 ffc111dc: 48 00 1d e1 bl ffc12fbc src += to_copy; ffc111e0: 7e f7 e2 14 add r23,r23,r28 block++; ffc111e4: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; copied += to_copy; ffc111e8: 83 7a 27 08 lwz r27,9992(r26) ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; ffc111ec: 7f bc e8 50 subf r29,r28,r29 ffc111f0: 4b ff fe 4c b ffc1103c =============================================================================== ffc04364 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc04364: 7c 08 02 a6 mflr r0 ffc04368: 94 21 ff f8 stwu r1,-8(r1) ffc0436c: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc04370: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc04374: 80 09 00 4c lwz r0,76(r9) ffc04378: 2f 80 00 01 cmpwi cr7,r0,1 ffc0437c: 40 9e 00 1c bne- cr7,ffc04398 <== 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; ffc04380: 90 69 00 5c stw r3,92(r9) return 0; ffc04384: 38 60 00 00 li r3,0 } ffc04388: 80 01 00 0c lwz r0,12(r1) ffc0438c: 38 21 00 08 addi r1,r1,8 ffc04390: 7c 08 03 a6 mtlr r0 ffc04394: 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 ); ffc04398: 48 00 df c5 bl ffc1235c <__errno> <== NOT EXECUTED ffc0439c: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc043a0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc043a4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc043a8: 4b ff ff e0 b ffc04388 <== NOT EXECUTED =============================================================================== ffc073e8 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc073e8: 94 21 ff f0 stwu r1,-16(r1) ffc073ec: 7c 08 02 a6 mflr r0 ffc073f0: 93 c1 00 08 stw r30,8(r1) IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc073f4: 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 ) { ffc073f8: 90 01 00 14 stw r0,20(r1) IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc073fc: 81 3e 26 f4 lwz r9,9972(r30) * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc07400: 93 e1 00 0c stw r31,12(r1) ffc07404: 7c 7f 1b 78 mr r31,r3 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc07408: 38 63 00 0c addi r3,r3,12 ffc0740c: 80 89 00 08 lwz r4,8(r9) ffc07410: 48 01 0a dd bl ffc17eec switch( the_jnode->type ) { ffc07414: 80 bf 00 4c lwz r5,76(r31) ffc07418: 2b 85 00 07 cmplwi cr7,r5,7 ffc0741c: 40 9d 00 34 ble- cr7,ffc07450 <== ALWAYS TAKEN case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); ffc07420: 81 3e 26 f4 lwz r9,9972(r30) <== NOT EXECUTED ffc07424: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc07428: 38 84 92 d0 addi r4,r4,-27952 <== NOT EXECUTED ffc0742c: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED ffc07430: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc07434: 48 01 08 b5 bl ffc17ce8 <== NOT EXECUTED return; } puts(""); } ffc07438: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc0743c: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc07440: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc07444: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc07448: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0744c: 4e 80 00 20 blr <== NOT EXECUTED ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { ffc07450: 3d 20 ff c3 lis r9,-61 ffc07454: 39 29 92 58 addi r9,r9,-28072 ffc07458: 54 a0 10 3a rlwinm r0,r5,2,0,29 ffc0745c: 7c 09 00 2e lwzx r0,r9,r0 ffc07460: 7d 20 4a 14 add r9,r0,r9 ffc07464: 7d 29 03 a6 mtctr r9 ffc07468: 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" ); ffc0746c: 81 3e 26 f4 lwz r9,9972(r30) <== NOT EXECUTED ffc07470: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc07474: 38 63 92 a8 addi r3,r3,-27992 <== NOT EXECUTED ffc07478: 80 c9 00 08 lwz r6,8(r9) <== NOT EXECUTED ffc0747c: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc07480: 38 a0 00 13 li r5,19 <== NOT EXECUTED ffc07484: 48 01 18 b9 bl ffc18d3c <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } ffc07488: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc0748c: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc07490: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc07494: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc07498: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0749c: 4e 80 00 20 blr <== NOT EXECUTED case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); ffc074a0: 81 3e 26 f4 lwz r9,9972(r30) <== NOT EXECUTED ffc074a4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc074a8: 38 63 92 bc addi r3,r3,-27972 <== NOT EXECUTED ffc074ac: 80 c9 00 08 lwz r6,8(r9) <== NOT EXECUTED ffc074b0: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc074b4: 38 a0 00 12 li r5,18 <== NOT EXECUTED ffc074b8: 48 01 18 85 bl ffc18d3c <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } ffc074bc: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc074c0: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc074c4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc074c8: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc074cc: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc074d0: 4e 80 00 20 blr <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", ffc074d4: 81 3e 26 f4 lwz r9,9972(r30) ffc074d8: 3c 80 ff c3 lis r4,-61 ffc074dc: 80 bf 00 54 lwz r5,84(r31) ffc074e0: 38 84 92 9c addi r4,r4,-28004 ffc074e4: 80 69 00 08 lwz r3,8(r9) ffc074e8: 4c c6 31 82 crclr 4*cr1+eq ffc074ec: 48 01 07 fd bl ffc17ce8 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); ffc074f0: 3c 60 ff c3 lis r3,-61 ffc074f4: 38 63 84 e4 addi r3,r3,-31516 ffc074f8: 48 01 2a bd bl ffc19fb4 } ffc074fc: 80 01 00 14 lwz r0,20(r1) ffc07500: 83 c1 00 08 lwz r30,8(r1) ffc07504: 7c 08 03 a6 mtlr r0 ffc07508: 83 e1 00 0c lwz r31,12(r1) ffc0750c: 38 21 00 10 addi r1,r1,16 ffc07510: 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)", ffc07514: 81 3e 26 f4 lwz r9,9972(r30) ffc07518: 3c 80 ff c3 lis r4,-61 ffc0751c: 80 bf 00 54 lwz r5,84(r31) ffc07520: 38 84 92 8c addi r4,r4,-28020 ffc07524: 80 69 00 08 lwz r3,8(r9) ffc07528: 80 df 00 58 lwz r6,88(r31) ffc0752c: 4c c6 31 82 crclr 4*cr1+eq ffc07530: 48 01 07 b9 bl ffc17ce8 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; ffc07534: 4b ff ff bc b ffc074f0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); ffc07538: 81 3e 26 f4 lwz r9,9972(r30) ffc0753c: 38 60 00 2f li r3,47 ffc07540: 80 89 00 08 lwz r4,8(r9) ffc07544: 48 01 08 8d bl ffc17dd0 break; ffc07548: 4b ff ff a8 b ffc074f0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", ffc0754c: 81 3e 26 f4 lwz r9,9972(r30) ffc07550: 3c 80 ff c3 lis r4,-61 ffc07554: 80 bf 00 50 lwz r5,80(r31) ffc07558: 38 84 92 78 addi r4,r4,-28040 ffc0755c: 80 69 00 08 lwz r3,8(r9) ffc07560: 80 df 00 54 lwz r6,84(r31) ffc07564: 4c c6 31 82 crclr 4*cr1+eq ffc07568: 48 01 07 81 bl ffc17ce8 the_jnode->info.device.major, the_jnode->info.device.minor ); break; ffc0756c: 4b ff ff 84 b ffc074f0 =============================================================================== ffc04408 : 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 */ ) { ffc04408: 94 21 ff e0 stwu r1,-32(r1) ffc0440c: 7c 08 02 a6 mflr r0 ffc04410: 90 01 00 24 stw r0,36(r1) ffc04414: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; ffc04418: 83 e4 00 00 lwz r31,0(r4) strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); ffc0441c: 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 */ ) { ffc04420: 93 c1 00 18 stw r30,24(r1) ffc04424: 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 ); ffc04428: 38 7f 00 0c addi r3,r31,12 ffc0442c: 38 a0 00 20 li r5,32 ffc04430: 48 00 f2 59 bl ffc13688 if ( the_jnode->Parent != NULL ) ffc04434: 80 1f 00 08 lwz r0,8(r31) ffc04438: 2f 80 00 00 cmpwi cr7,r0,0 ffc0443c: 41 9e 00 0c beq- cr7,ffc04448 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc04440: 7f e3 fb 78 mr r3,r31 ffc04444: 48 00 58 55 bl ffc09c98 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; ffc04448: 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 ); ffc0444c: 7f e4 fb 78 mr r4,r31 the_jnode->Parent = new_parent; ffc04450: 90 7f 00 08 stw r3,8(r31) ffc04454: 38 63 00 50 addi r3,r3,80 ffc04458: 48 00 58 11 bl ffc09c68 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); ffc0445c: 38 61 00 08 addi r3,r1,8 ffc04460: 38 80 00 00 li r4,0 ffc04464: 48 00 08 e1 bl ffc04d44 ffc04468: 80 01 00 08 lwz r0,8(r1) return 0; } ffc0446c: 38 60 00 00 li r3,0 ffc04470: 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 ); ffc04474: 90 1f 00 48 stw r0,72(r31) return 0; } ffc04478: 80 01 00 24 lwz r0,36(r1) ffc0447c: 83 e1 00 1c lwz r31,28(r1) ffc04480: 38 21 00 20 addi r1,r1,32 ffc04484: 7c 08 03 a6 mtlr r0 ffc04488: 4e 80 00 20 blr =============================================================================== ffc0e8ac : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc0e8ac: 94 21 ff f0 stwu r1,-16(r1) ffc0e8b0: 7c 08 02 a6 mflr r0 ffc0e8b4: 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; ffc0e8b8: 81 23 00 00 lwz r9,0(r3) int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc0e8bc: 93 e1 00 0c stw r31,12(r1) IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { ffc0e8c0: 80 09 00 4c lwz r0,76(r9) ffc0e8c4: 2b 80 00 07 cmplwi cr7,r0,7 ffc0e8c8: 40 9d 00 28 ble- cr7,ffc0e8f0 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0e8cc: 48 00 3a 91 bl ffc1235c <__errno> ffc0e8d0: 38 00 00 86 li r0,134 ffc0e8d4: 90 03 00 00 stw r0,0(r3) ffc0e8d8: 38 60 ff ff li r3,-1 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } ffc0e8dc: 80 01 00 14 lwz r0,20(r1) ffc0e8e0: 83 e1 00 0c lwz r31,12(r1) ffc0e8e4: 38 21 00 10 addi r1,r1,16 ffc0e8e8: 7c 08 03 a6 mtlr r0 ffc0e8ec: 4e 80 00 20 blr IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { ffc0e8f0: 3d 60 ff c2 lis r11,-62 ffc0e8f4: 39 6b 91 84 addi r11,r11,-28284 ffc0e8f8: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0e8fc: 7c 0b 00 2e lwzx r0,r11,r0 ffc0e900: 7d 60 5a 14 add r11,r0,r11 ffc0e904: 7d 69 03 a6 mtctr r11 ffc0e908: 4e 80 04 20 bctr case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; ffc0e90c: 39 60 00 00 li r11,0 ffc0e910: 39 80 00 00 li r12,0 ffc0e914: 91 64 00 20 stw r11,32(r4) ffc0e918: 91 84 00 24 stw r12,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; ffc0e91c: 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; return 0; ffc0e920: 38 60 00 00 li r3,0 buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; ffc0e924: 80 09 00 48 lwz r0,72(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 ); ffc0e928: 81 6b 00 34 lwz r11,52(r11) buf->st_mode = the_jnode->st_mode; ffc0e92c: 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 ); ffc0e930: 83 eb 00 00 lwz r31,0(r11) buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; ffc0e934: a0 a9 00 34 lhz r5,52(r9) buf->st_ino = the_jnode->st_ino; ffc0e938: 80 c9 00 38 lwz r6,56(r9) buf->st_uid = the_jnode->st_uid; ffc0e93c: a0 e9 00 3c lhz r7,60(r9) buf->st_gid = the_jnode->st_gid; ffc0e940: a1 09 00 3e lhz r8,62(r9) buf->st_atime = the_jnode->stat_atime; ffc0e944: 81 49 00 40 lwz r10,64(r9) buf->st_mtime = the_jnode->stat_mtime; ffc0e948: 81 69 00 44 lwz r11,68(r9) rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; ffc0e94c: 39 20 00 00 li r9,0 buf->st_ctime = the_jnode->stat_ctime; ffc0e950: 90 04 00 38 stw r0,56(r4) ffc0e954: 61 29 ff fe ori r9,r9,65534 return 0; } ffc0e958: 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 = ffc0e95c: 93 e4 00 04 stw r31,4(r4) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } ffc0e960: 7c 08 03 a6 mtlr r0 ffc0e964: 83 e1 00 0c lwz r31,12(r1) ffc0e968: 38 21 00 10 addi r1,r1,16 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = ffc0e96c: 91 24 00 00 stw r9,0(r4) rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; ffc0e970: 91 84 00 0c stw r12,12(r4) buf->st_nlink = the_jnode->st_nlink; ffc0e974: b0 a4 00 10 sth r5,16(r4) buf->st_ino = the_jnode->st_ino; ffc0e978: 90 c4 00 08 stw r6,8(r4) buf->st_uid = the_jnode->st_uid; ffc0e97c: b0 e4 00 12 sth r7,18(r4) buf->st_gid = the_jnode->st_gid; ffc0e980: b1 04 00 14 sth r8,20(r4) buf->st_atime = the_jnode->stat_atime; ffc0e984: 91 44 00 28 stw r10,40(r4) buf->st_mtime = the_jnode->stat_mtime; ffc0e988: 91 64 00 30 stw r11,48(r4) buf->st_ctime = the_jnode->stat_ctime; return 0; } ffc0e98c: 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 ); ffc0e990: 81 69 00 54 lwz r11,84(r9) ffc0e994: 80 09 00 50 lwz r0,80(r9) ffc0e998: 91 64 00 1c stw r11,28(r4) ffc0e99c: 90 04 00 18 stw r0,24(r4) break; ffc0e9a0: 4b ff ff 7c b ffc0e91c case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; ffc0e9a4: 81 69 00 50 lwz r11,80(r9) ffc0e9a8: 81 89 00 54 lwz r12,84(r9) ffc0e9ac: 91 64 00 20 stw r11,32(r4) ffc0e9b0: 91 84 00 24 stw r12,36(r4) break; ffc0e9b4: 4b ff ff 68 b ffc0e91c =============================================================================== ffc0454c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { ffc0454c: 94 21 ff c8 stwu r1,-56(r1) ffc04550: 7c 08 02 a6 mflr r0 ffc04554: 90 01 00 3c stw r0,60(r1) ffc04558: 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; ffc0455c: 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 */ ) { ffc04560: 93 a1 00 2c stw r29,44(r1) ffc04564: 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 ) { ffc04568: 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 */ ) { ffc0456c: 93 e1 00 34 stw r31,52(r1) ffc04570: 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 ) { ffc04574: 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 */ ) { ffc04578: 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 ) { ffc0457c: 41 9e 00 3c beq- cr7,ffc045b8 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); ffc04580: 81 3f 00 08 lwz r9,8(r31) ffc04584: 7f a3 eb 78 mr r3,r29 ffc04588: 7f e4 fb 78 mr r4,r31 ffc0458c: 80 09 00 34 lwz r0,52(r9) ffc04590: 7c 09 03 a6 mtctr r0 ffc04594: 4e 80 04 21 bctrl return result; } ffc04598: 80 01 00 3c lwz r0,60(r1) ffc0459c: 83 81 00 28 lwz r28,40(r1) ffc045a0: 7c 08 03 a6 mtlr r0 ffc045a4: 83 a1 00 2c lwz r29,44(r1) ffc045a8: 83 c1 00 30 lwz r30,48(r1) ffc045ac: 83 e1 00 34 lwz r31,52(r1) ffc045b0: 38 21 00 38 addi r1,r1,56 ffc045b4: 4e 80 00 20 blr * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) ffc045b8: 80 1e 00 50 lwz r0,80(r30) ffc045bc: 2f 80 00 00 cmpwi cr7,r0,0 ffc045c0: 41 9e 00 90 beq- cr7,ffc04650 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node; ffc045c4: 7c 3c 0b 78 mr r28,r1 ffc045c8: 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; ffc045cc: 81 64 00 08 lwz r11,8(r4) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); ffc045d0: 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; ffc045d4: 81 24 00 0c lwz r9,12(r4) ffc045d8: 81 44 00 04 lwz r10,4(r4) ffc045dc: 80 04 00 10 lwz r0,16(r4) ffc045e0: 91 61 00 18 stw r11,24(r1) ffc045e4: 91 21 00 1c stw r9,28(r1) ffc045e8: 91 41 00 14 stw r10,20(r1) ffc045ec: 90 01 00 20 stw r0,32(r1) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); ffc045f0: 48 00 94 ed bl ffc0dadc /* * 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) ffc045f4: 81 3e 00 50 lwz r9,80(r30) ffc045f8: a1 69 00 34 lhz r11,52(r9) ffc045fc: 2f 8b 00 01 cmpwi cr7,r11,1 ffc04600: 41 9e 00 28 beq- cr7,ffc04628 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; ffc04604: 39 6b ff ff addi r11,r11,-1 ffc04608: b1 69 00 34 sth r11,52(r9) IMFS_update_ctime( node->info.hard_link.link_node ); ffc0460c: 38 61 00 08 addi r3,r1,8 ffc04610: 38 80 00 00 li r4,0 ffc04614: 48 00 07 31 bl ffc04d44 ffc04618: 81 3e 00 50 lwz r9,80(r30) ffc0461c: 80 01 00 08 lwz r0,8(r1) ffc04620: 90 09 00 48 stw r0,72(r9) ffc04624: 4b ff ff 5c b ffc04580 * 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 ); ffc04628: 81 21 00 18 lwz r9,24(r1) ffc0462c: 7f a3 eb 78 mr r3,r29 ffc04630: 7f 84 e3 78 mr r4,r28 ffc04634: 80 09 00 34 lwz r0,52(r9) ffc04638: 7c 09 03 a6 mtctr r0 ffc0463c: 4e 80 04 21 bctrl if ( result != 0 ) ffc04640: 2f 83 00 00 cmpwi cr7,r3,0 return -1; ffc04644: 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 ) ffc04648: 41 9e ff 38 beq+ cr7,ffc04580 ffc0464c: 4b ff ff 4c b ffc04598 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc04650: 48 00 dd 0d bl ffc1235c <__errno> <== NOT EXECUTED ffc04654: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc04658: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0465c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04660: 4b ff ff 38 b ffc04598 <== NOT EXECUTED =============================================================================== ffc04664 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc04664: 7c 08 02 a6 mflr r0 ffc04668: 94 21 ff f8 stwu r1,-8(r1) ffc0466c: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc04670: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc04674: 80 09 00 4c lwz r0,76(r9) ffc04678: 2f 80 00 01 cmpwi cr7,r0,1 ffc0467c: 40 9e 00 2c bne- cr7,ffc046a8 <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) ffc04680: 80 09 00 5c lwz r0,92(r9) ffc04684: 2f 80 00 00 cmpwi cr7,r0,0 ffc04688: 41 9e 00 34 beq- cr7,ffc046bc <== 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; ffc0468c: 38 00 00 00 li r0,0 ffc04690: 90 09 00 5c stw r0,92(r9) return 0; ffc04694: 38 60 00 00 li r3,0 } ffc04698: 80 01 00 0c lwz r0,12(r1) ffc0469c: 38 21 00 08 addi r1,r1,8 ffc046a0: 7c 08 03 a6 mtlr r0 ffc046a4: 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 ); ffc046a8: 48 00 dc b5 bl ffc1235c <__errno> <== NOT EXECUTED ffc046ac: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc046b0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc046b4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc046b8: 4b ff ff e0 b ffc04698 <== 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 */ ffc046bc: 48 00 dc a1 bl ffc1235c <__errno> <== NOT EXECUTED ffc046c0: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc046c4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc046c8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc046cc: 4b ff ff cc b ffc04698 <== NOT EXECUTED =============================================================================== ffc04f80 : ) { /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc04f80: 3d 20 00 00 lis r9,0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc04f84: 94 21 ff e8 stwu r1,-24(r1) ffc04f88: 7c 08 02 a6 mflr r0 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc04f8c: 81 29 26 c8 lwz r9,9928(r9) void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc04f90: 93 a1 00 0c stw r29,12(r1) ffc04f94: 7c 9d 23 78 mr r29,r4 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc04f98: 2f 89 00 00 cmpwi cr7,r9,0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc04f9c: 93 c1 00 10 stw r30,16(r1) ffc04fa0: 7c 7e 1b 78 mr r30,r3 ffc04fa4: 93 e1 00 14 stw r31,20(r1) ffc04fa8: 7c bf 2b 78 mr r31,r5 ffc04fac: 90 01 00 1c stw r0,28(r1) ffc04fb0: 93 81 00 08 stw r28,8(r1) /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc04fb4: 41 9e 00 10 beq- cr7,ffc04fc4 (*rtems_malloc_statistics_helpers->initialize)(); ffc04fb8: 80 09 00 00 lwz r0,0(r9) ffc04fbc: 7c 09 03 a6 mtctr r0 ffc04fc0: 4e 80 04 21 bctrl } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); ffc04fc4: 4b ff ff 2d bl ffc04ef0 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { ffc04fc8: 3d 20 00 00 lis r9,0 ffc04fcc: 81 29 26 cc lwz r9,9932(r9) ffc04fd0: 2f 89 00 00 cmpwi cr7,r9,0 ffc04fd4: 41 9e 00 20 beq- cr7,ffc04ff4 heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( ffc04fd8: 80 09 00 00 lwz r0,0(r9) ffc04fdc: 7f c3 f3 78 mr r3,r30 ffc04fe0: 7f e4 fb 78 mr r4,r31 ffc04fe4: 7c 09 03 a6 mtctr r0 heap_begin, sbrk_amount ); heap_size = (uintptr_t) sbrk_amount; ffc04fe8: 7f fd fb 78 mr r29,r31 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( ffc04fec: 4e 80 04 21 bctrl ffc04ff0: 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 ( ffc04ff4: 3f 80 00 00 lis r28,0 ffc04ff8: 88 1c 26 c4 lbz r0,9924(r28) ffc04ffc: 3f e0 00 00 lis r31,0 ffc05000: 2f 80 00 00 cmpwi cr7,r0,0 ffc05004: 40 9e 00 34 bne- cr7,ffc05038 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ffc05008: 3d 20 00 00 lis r9,0 ffc0500c: 88 09 20 cc lbz r0,8396(r9) ffc05010: 2f 80 00 00 cmpwi cr7,r0,0 ffc05014: 40 9e 00 5c bne- cr7,ffc05070 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); ffc05018: 3f e0 00 00 lis r31,0 ffc0501c: 80 7f 26 64 lwz r3,9828(r31) ffc05020: 7f c4 f3 78 mr r4,r30 ffc05024: 7f a5 eb 78 mr r5,r29 ffc05028: 38 c0 00 08 li r6,8 ffc0502c: 48 00 54 e5 bl ffc0a510 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { ffc05030: 2f 83 00 00 cmpwi cr7,r3,0 ffc05034: 41 9e 00 5c beq- cr7,ffc05090 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); ffc05038: 80 7f 26 64 lwz r3,9828(r31) ffc0503c: 3f c0 00 00 lis r30,0 ffc05040: 83 fe 2a 48 lwz r31,10824(r30) ffc05044: 48 00 62 5d bl ffc0b2a0 <_Protected_heap_Get_size> } ffc05048: 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) ); ffc0504c: 7c 63 fa 14 add r3,r3,r31 } ffc05050: 83 81 00 08 lwz r28,8(r1) ffc05054: 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) ); ffc05058: 90 7e 2a 48 stw r3,10824(r30) } ffc0505c: 83 a1 00 0c lwz r29,12(r1) ffc05060: 83 c1 00 10 lwz r30,16(r1) ffc05064: 83 e1 00 14 lwz r31,20(r1) ffc05068: 38 21 00 18 addi r1,r1,24 ffc0506c: 4e 80 00 20 blr if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); ffc05070: 7f c3 f3 78 mr r3,r30 ffc05074: 38 80 00 00 li r4,0 ffc05078: 7f a5 eb 78 mr r5,r29 ffc0507c: 48 00 e0 21 bl ffc1309c * 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 ) { ffc05080: 88 1c 26 c4 lbz r0,9924(r28) ffc05084: 2f 80 00 00 cmpwi cr7,r0,0 ffc05088: 41 9e ff 90 beq+ cr7,ffc05018 <== ALWAYS TAKEN ffc0508c: 4b ff ff ac b ffc05038 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); ffc05090: 38 60 00 1a li r3,26 ffc05094: 48 00 47 75 bl ffc09808 =============================================================================== ffc03c24 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03c24: 94 21 ff c0 stwu r1,-64(r1) ffc03c28: 7c 08 02 a6 mflr r0 ffc03c2c: 90 01 00 44 stw r0,68(r1) ffc03c30: 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); ffc03c34: 81 03 00 b8 lwz r8,184(r3) size = Stack_check_usable_stack_size(stack); ffc03c38: 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); ffc03c3c: 39 08 00 80 addi r8,r8,128 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03c40: 93 41 00 28 stw r26,40(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); ffc03c44: 3b 9c ff 80 addi r28,r28,-128 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; ffc03c48: 39 28 00 80 addi r9,r8,128 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03c4c: 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++) ffc03c50: 57 8b 00 3a rlwinm r11,r28,0,0,29 ffc03c54: 7d 69 5a 14 add r11,r9,r11 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03c58: 93 a1 00 34 stw r29,52(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++) ffc03c5c: 7f 89 58 40 cmplw cr7,r9,r11 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03c60: 92 e1 00 1c stw r23,28(r1) ffc03c64: 7c 7b 1b 78 mr r27,r3 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; ffc03c68: 3b a0 00 00 li r29,0 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03c6c: 93 01 00 20 stw r24,32(r1) ffc03c70: 93 21 00 24 stw r25,36(r1) ffc03c74: 93 c1 00 38 stw r30,56(r1) ffc03c78: 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 ); ffc03c7c: 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++) ffc03c80: 40 9c 00 34 bge- cr7,ffc03cb4 <== NEVER TAKEN if (*base != U32_PATTERN) ffc03c84: 81 48 00 80 lwz r10,128(r8) ffc03c88: 6d 40 5a 5a xoris r0,r10,23130 ffc03c8c: 2f 80 a5 a5 cmpwi cr7,r0,-23131 ffc03c90: 41 9e 00 14 beq- cr7,ffc03ca4 <== ALWAYS TAKEN ffc03c94: 48 00 00 f8 b ffc03d8c <== NOT EXECUTED ffc03c98: 80 09 00 00 lwz r0,0(r9) ffc03c9c: 7f 80 50 00 cmpw cr7,r0,r10 ffc03ca0: 40 9e 00 ec bne- cr7,ffc03d8c * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) ffc03ca4: 39 29 00 04 addi r9,r9,4 ffc03ca8: 7f 8b 48 40 cmplw cr7,r11,r9 ffc03cac: 41 9d ff ec bgt+ cr7,ffc03c98 <== 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; ffc03cb0: 3b a0 00 00 li r29,0 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( ffc03cb4: 82 fb 00 08 lwz r23,8(r27) ffc03cb8: 3f c0 00 00 lis r30,0 ffc03cbc: 3b fe 27 cc addi r31,r30,10188 ffc03cc0: 83 3e 27 cc lwz r25,10188(r30) ffc03cc4: 83 1f 00 04 lwz r24,4(r31) ffc03cc8: 38 80 00 05 li r4,5 ffc03ccc: 38 a1 00 08 addi r5,r1,8 ffc03cd0: 7e e3 bb 78 mr r3,r23 ffc03cd4: 48 00 50 4d bl ffc08d20 ffc03cd8: 3c 80 ff c2 lis r4,-62 ffc03cdc: 7c 66 1b 78 mr r6,r3 ffc03ce0: 7f 29 03 a6 mtctr r25 ffc03ce4: 38 84 8e a0 addi r4,r4,-29024 ffc03ce8: 7e e5 bb 78 mr r5,r23 ffc03cec: 7f 03 c3 78 mr r3,r24 ffc03cf0: 4c c6 31 82 crclr 4*cr1+eq ffc03cf4: 4e 80 04 21 bctrl (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc03cf8: 80 db 00 b4 lwz r6,180(r27) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc03cfc: 80 1e 27 cc lwz r0,10188(r30) ffc03d00: 3c 80 ff c2 lis r4,-62 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc03d04: 80 bb 00 b8 lwz r5,184(r27) ffc03d08: 38 c6 ff ff addi r6,r6,-1 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc03d0c: 7c 09 03 a6 mtctr r0 ffc03d10: 80 7f 00 04 lwz r3,4(r31) ffc03d14: 38 84 8e b0 addi r4,r4,-29008 ffc03d18: 7c c5 32 14 add r6,r5,r6 ffc03d1c: 7f 47 d3 78 mr r7,r26 ffc03d20: 7f 88 e3 78 mr r8,r28 ffc03d24: 4c c6 31 82 crclr 4*cr1+eq ffc03d28: 4e 80 04 21 bctrl stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc03d2c: 80 1f 00 08 lwz r0,8(r31) ffc03d30: 2f 80 00 00 cmpwi cr7,r0,0 ffc03d34: 41 9e 00 70 beq- cr7,ffc03da4 <== NEVER TAKEN (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); ffc03d38: 80 1e 27 cc lwz r0,10188(r30) ffc03d3c: 3c 80 ff c2 lis r4,-62 ffc03d40: 80 7f 00 04 lwz r3,4(r31) ffc03d44: 7f a5 eb 78 mr r5,r29 ffc03d48: 7c 09 03 a6 mtctr r0 ffc03d4c: 38 84 8e e0 addi r4,r4,-28960 ffc03d50: 4c c6 31 82 crclr 4*cr1+eq ffc03d54: 4e 80 04 21 bctrl } } ffc03d58: 80 01 00 44 lwz r0,68(r1) ffc03d5c: 82 e1 00 1c lwz r23,28(r1) ffc03d60: 7c 08 03 a6 mtlr r0 ffc03d64: 83 01 00 20 lwz r24,32(r1) ffc03d68: 83 21 00 24 lwz r25,36(r1) ffc03d6c: 83 41 00 28 lwz r26,40(r1) ffc03d70: 83 61 00 2c lwz r27,44(r1) ffc03d74: 83 81 00 30 lwz r28,48(r1) ffc03d78: 83 a1 00 34 lwz r29,52(r1) ffc03d7c: 83 c1 00 38 lwz r30,56(r1) ffc03d80: 83 e1 00 3c lwz r31,60(r1) ffc03d84: 38 21 00 40 addi r1,r1,64 ffc03d88: 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 ) ffc03d8c: 2f 89 00 00 cmpwi cr7,r9,0 used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; ffc03d90: 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 ) ffc03d94: 41 be ff 20 beq- cr7,ffc03cb4 <== NEVER TAKEN used = Stack_check_Calculate_used( low, size, high_water_mark ); ffc03d98: 7f a8 e2 14 add r29,r8,r28 ffc03d9c: 7f a9 e8 50 subf r29,r9,r29 ffc03da0: 4b ff ff 14 b ffc03cb4 current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); ffc03da4: 80 1e 27 cc lwz r0,10188(r30) <== NOT EXECUTED ffc03da8: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03dac: 80 7f 00 04 lwz r3,4(r31) <== NOT EXECUTED ffc03db0: 38 84 8e d0 addi r4,r4,-28976 <== NOT EXECUTED ffc03db4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03db8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03dbc: 4e 80 04 21 bctrl <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } ffc03dc0: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc03dc4: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc03dc8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03dcc: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc03dd0: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc03dd4: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc03dd8: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc03ddc: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc03de0: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc03de4: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc03de8: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc03dec: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc03df0: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03ecc : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc03ecc: 94 21 ff c8 stwu r1,-56(r1) ffc03ed0: 7c 08 02 a6 mflr r0 ffc03ed4: 93 a1 00 2c stw r29,44(r1) ffc03ed8: 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"); ffc03edc: 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) { ffc03ee0: 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"); ffc03ee4: 38 63 8e e8 addi r3,r3,-28952 Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc03ee8: 93 c1 00 30 stw r30,48(r1) ffc03eec: 93 e1 00 34 stw r31,52(r1) ffc03ef0: 7c 9f 23 78 mr r31,r4 Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); ffc03ef4: 83 dd 00 b8 lwz r30,184(r29) char name[32]; printk("BLOWN STACK!!!\n"); ffc03ef8: 4c c6 31 82 crclr 4*cr1+eq ffc03efc: 48 00 20 61 bl ffc05f5c printk("task control block: 0x%08" PRIxPTR "\n", running); ffc03f00: 3c 60 ff c2 lis r3,-62 ffc03f04: 38 63 8e f8 addi r3,r3,-28936 ffc03f08: 7f a4 eb 78 mr r4,r29 ffc03f0c: 4c c6 31 82 crclr 4*cr1+eq ffc03f10: 48 00 20 4d bl ffc05f5c printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); ffc03f14: 80 9d 00 08 lwz r4,8(r29) ffc03f18: 3c 60 ff c2 lis r3,-62 ffc03f1c: 38 63 8f 18 addi r3,r3,-28904 ffc03f20: 4c c6 31 82 crclr 4*cr1+eq ffc03f24: 48 00 20 39 bl ffc05f5c printk( ffc03f28: 80 9d 00 0c lwz r4,12(r29) ffc03f2c: 3c 60 ff c2 lis r3,-62 ffc03f30: 38 63 8f 2c addi r3,r3,-28884 ffc03f34: 4c c6 31 82 crclr 4*cr1+eq ffc03f38: 48 00 20 25 bl ffc05f5c "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( ffc03f3c: 80 7d 00 08 lwz r3,8(r29) ffc03f40: 38 a1 00 08 addi r5,r1,8 ffc03f44: 38 80 00 20 li r4,32 ffc03f48: 48 00 4d d9 bl ffc08d20 ffc03f4c: 7c 64 1b 78 mr r4,r3 ffc03f50: 3c 60 ff c2 lis r3,-62 ffc03f54: 38 63 8f 40 addi r3,r3,-28864 ffc03f58: 4c c6 31 82 crclr 4*cr1+eq ffc03f5c: 48 00 20 01 bl ffc05f5c ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ffc03f60: 80 bd 00 b8 lwz r5,184(r29) ffc03f64: 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( ffc03f68: 3c 60 ff c2 lis r3,-62 ffc03f6c: 38 63 8f 58 addi r3,r3,-28840 ffc03f70: 7c c5 22 14 add r6,r5,r4 ffc03f74: 4c c6 31 82 crclr 4*cr1+eq ffc03f78: 48 00 1f e5 bl ffc05f5c "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) { ffc03f7c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc03f80: 41 9e 00 0c beq- cr7,ffc03f8c <== ALWAYS TAKEN rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); ffc03f84: 38 60 00 81 li r3,129 ffc03f88: 48 00 5a 41 bl ffc099c8 (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( ffc03f8c: 3c 60 ff c2 lis r3,-62 ffc03f90: 38 63 8f 8c addi r3,r3,-28788 ffc03f94: 38 80 00 80 li r4,128 ffc03f98: 38 be 00 08 addi r5,r30,8 ffc03f9c: 38 de 00 88 addi r6,r30,136 ffc03fa0: 4c c6 31 82 crclr 4*cr1+eq ffc03fa4: 48 00 1f b9 bl ffc05f5c ffc03fa8: 4b ff ff dc b ffc03f84 =============================================================================== ffc09a3c <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09a3c: 94 21 ff f0 stwu r1,-16(r1) the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09a40: 3d 20 00 00 lis r9,0 * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09a44: 7c 08 02 a6 mflr r0 ffc09a48: 93 c1 00 08 stw r30,8(r1) the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09a4c: 3b c9 2d 00 addi r30,r9,11520 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09a50: 3b de 00 04 addi r30,r30,4 * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09a54: 93 e1 00 0c stw r31,12(r1) the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09a58: 83 e9 2d 00 lwz r31,11520(r9) * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09a5c: 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 ); ffc09a60: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09a64: 41 9e 00 1c beq- cr7,ffc09a80 <_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)(); ffc09a68: 80 1f 00 08 lwz r0,8(r31) ffc09a6c: 7c 09 03 a6 mtctr r0 ffc09a70: 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 ) { ffc09a74: 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 ); ffc09a78: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09a7c: 40 9e ff ec bne+ cr7,ffc09a68 <_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)(); } } ffc09a80: 80 01 00 14 lwz r0,20(r1) ffc09a84: 83 c1 00 08 lwz r30,8(r1) ffc09a88: 7c 08 03 a6 mtlr r0 ffc09a8c: 83 e1 00 0c lwz r31,12(r1) ffc09a90: 38 21 00 10 addi r1,r1,16 ffc09a94: 4e 80 00 20 blr =============================================================================== ffc09a98 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09a98: 94 21 ff e8 stwu r1,-24(r1) the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09a9c: 3d 20 00 00 lis r9,0 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09aa0: 7c 08 02 a6 mflr r0 ffc09aa4: 93 c1 00 10 stw r30,16(r1) the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09aa8: 3b c9 2d 00 addi r30,r9,11520 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09aac: 3b de 00 04 addi r30,r30,4 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09ab0: 93 e1 00 14 stw r31,20(r1) the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09ab4: 83 e9 2d 00 lwz r31,11520(r9) * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09ab8: 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 ); ffc09abc: 7f 9f f0 00 cmpw cr7,r31,r30 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09ac0: 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 ); ffc09ac4: 41 9e 00 28 beq- cr7,ffc09aec <_API_extensions_Run_postswitch+0x54><== NEVER TAKEN ffc09ac8: 3f a0 00 00 lis r29,0 ffc09acc: 3b bd 2d 38 addi r29,r29,11576 !_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 ); ffc09ad0: 80 1f 00 0c lwz r0,12(r31) ffc09ad4: 80 7d 00 0c lwz r3,12(r29) ffc09ad8: 7c 09 03 a6 mtctr r0 ffc09adc: 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 ) { ffc09ae0: 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 ); ffc09ae4: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09ae8: 40 9e ff e8 bne+ cr7,ffc09ad0 <_API_extensions_Run_postswitch+0x38><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09aec: 80 01 00 1c lwz r0,28(r1) ffc09af0: 83 a1 00 0c lwz r29,12(r1) ffc09af4: 7c 08 03 a6 mtlr r0 ffc09af8: 83 c1 00 10 lwz r30,16(r1) ffc09afc: 83 e1 00 14 lwz r31,20(r1) ffc09b00: 38 21 00 18 addi r1,r1,24 ffc09b04: 4e 80 00 20 blr =============================================================================== ffc1c99c <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1c99c: 94 21 ff e0 stwu r1,-32(r1) ffc1c9a0: 7c 08 02 a6 mflr r0 ffc1c9a4: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1c9a8: 80 03 00 4c lwz r0,76(r3) Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1c9ac: 93 41 00 08 stw r26,8(r1) ffc1c9b0: 7d 1a 43 78 mr r26,r8 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1c9b4: 7f 80 28 40 cmplw cr7,r0,r5 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1c9b8: 93 a1 00 14 stw r29,20(r1) ffc1c9bc: 7c 9d 23 78 mr r29,r4 ffc1c9c0: 93 c1 00 18 stw r30,24(r1) ffc1c9c4: 7c 7e 1b 78 mr r30,r3 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; ffc1c9c8: 38 60 00 01 li r3,1 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1c9cc: 93 e1 00 1c stw r31,28(r1) ffc1c9d0: 7c bf 2b 78 mr r31,r5 ffc1c9d4: 93 61 00 0c stw r27,12(r1) ffc1c9d8: 93 81 00 10 stw r28,16(r1) Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1c9dc: 41 9c 00 20 blt- cr7,ffc1c9fc <_CORE_message_queue_Broadcast+0x60><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { ffc1c9e0: 80 1e 00 48 lwz r0,72(r30) ffc1c9e4: 3b 60 00 00 li r27,0 ffc1c9e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc1c9ec: 41 be 00 4c beq+ cr7,ffc1ca38 <_CORE_message_queue_Broadcast+0x9c> *count = 0; ffc1c9f0: 38 00 00 00 li r0,0 ffc1c9f4: 90 08 00 00 stw r0,0(r8) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc1c9f8: 38 60 00 00 li r3,0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1c9fc: 80 01 00 24 lwz r0,36(r1) ffc1ca00: 83 41 00 08 lwz r26,8(r1) ffc1ca04: 7c 08 03 a6 mtlr r0 ffc1ca08: 83 61 00 0c lwz r27,12(r1) ffc1ca0c: 83 81 00 10 lwz r28,16(r1) ffc1ca10: 83 a1 00 14 lwz r29,20(r1) ffc1ca14: 83 c1 00 18 lwz r30,24(r1) ffc1ca18: 83 e1 00 1c lwz r31,28(r1) ffc1ca1c: 38 21 00 20 addi r1,r1,32 ffc1ca20: 4e 80 00 20 blr const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc1ca24: 80 7c 00 2c lwz r3,44(r28) */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; ffc1ca28: 3b 7b 00 01 addi r27,r27,1 ffc1ca2c: 48 00 a3 bd bl ffc26de8 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc1ca30: 81 3c 00 28 lwz r9,40(r28) ffc1ca34: 93 e9 00 00 stw r31,0(r9) /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = ffc1ca38: 7f c3 f3 78 mr r3,r30 ffc1ca3c: 48 00 35 29 bl ffc1ff64 <_Thread_queue_Dequeue> ffc1ca40: 7f a4 eb 78 mr r4,r29 ffc1ca44: 7c 7c 1b 79 mr. r28,r3 ffc1ca48: 7f e5 fb 78 mr r5,r31 ffc1ca4c: 40 82 ff d8 bne+ ffc1ca24 <_CORE_message_queue_Broadcast+0x88> #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1ca50: 80 01 00 24 lwz r0,36(r1) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; ffc1ca54: 93 7a 00 00 stw r27,0(r26) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1ca58: 7c 08 03 a6 mtlr r0 ffc1ca5c: 83 41 00 08 lwz r26,8(r1) ffc1ca60: 83 61 00 0c lwz r27,12(r1) ffc1ca64: 83 81 00 10 lwz r28,16(r1) ffc1ca68: 83 a1 00 14 lwz r29,20(r1) ffc1ca6c: 83 c1 00 18 lwz r30,24(r1) ffc1ca70: 83 e1 00 1c lwz r31,28(r1) ffc1ca74: 38 21 00 20 addi r1,r1,32 ffc1ca78: 4e 80 00 20 blr =============================================================================== ffc15330 <_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 ) { ffc15330: 94 21 ff e0 stwu r1,-32(r1) ffc15334: 7c 08 02 a6 mflr r0 /* * 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)) { ffc15338: 7c c9 33 78 mr r9,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 ) { ffc1533c: 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)) { ffc15340: 70 c0 00 03 andi. r0,r6,3 { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; ffc15344: 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 ) { ffc15348: 93 a1 00 14 stw r29,20(r1) ffc1534c: 7c 9d 23 78 mr r29,r4 ffc15350: 93 e1 00 1c stw r31,28(r1) ffc15354: 7c 7f 1b 78 mr r31,r3 ffc15358: 93 81 00 10 stw r28,16(r1) ffc1535c: 93 c1 00 18 stw r30,24(r1) size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; ffc15360: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; ffc15364: 90 03 00 48 stw r0,72(r3) the_message_queue->maximum_message_size = maximum_message_size; ffc15368: 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)) { ffc1536c: 41 82 00 3c beq- ffc153a8 <_CORE_message_queue_Initialize+0x78> allocated_message_size += sizeof(uint32_t); ffc15370: 39 26 00 04 addi r9,r6,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); ffc15374: 55 29 00 3a rlwinm r9,r9,0,0,29 } if (allocated_message_size < maximum_message_size) ffc15378: 7f 86 48 40 cmplw cr7,r6,r9 return false; ffc1537c: 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) ffc15380: 40 9d 00 28 ble- cr7,ffc153a8 <_CORE_message_queue_Initialize+0x78><== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc15384: 80 01 00 24 lwz r0,36(r1) ffc15388: 7f c3 f3 78 mr r3,r30 ffc1538c: 83 81 00 10 lwz r28,16(r1) ffc15390: 7c 08 03 a6 mtlr r0 ffc15394: 83 a1 00 14 lwz r29,20(r1) ffc15398: 83 c1 00 18 lwz r30,24(r1) ffc1539c: 83 e1 00 1c lwz r31,28(r1) ffc153a0: 38 21 00 20 addi r1,r1,32 ffc153a4: 4e 80 00 20 blr /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); ffc153a8: 3b 89 00 10 addi r28,r9,16 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * ffc153ac: 7c 7c 29 d6 mullw r3,r28,r5 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) return false; ffc153b0: 3b c0 00 00 li r30,0 * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) ffc153b4: 7f 83 48 40 cmplw cr7,r3,r9 ffc153b8: 41 9c ff cc blt+ cr7,ffc15384 <_CORE_message_queue_Initialize+0x54><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc153bc: 90 a1 00 08 stw r5,8(r1) ffc153c0: 48 00 3c 81 bl ffc19040 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) ffc153c4: 2f 83 00 00 cmpwi cr7,r3,0 /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc153c8: 7c 64 1b 78 mr r4,r3 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc153cc: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) ffc153d0: 80 a1 00 08 lwz r5,8(r1) ffc153d4: 41 be ff b0 beq- cr7,ffc15384 <_CORE_message_queue_Initialize+0x54> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc153d8: 38 7f 00 60 addi r3,r31,96 ffc153dc: 7f 86 e3 78 mr r6,r28 ffc153e0: 48 00 60 19 bl ffc1b3f8 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); ffc153e4: 38 1f 00 50 addi r0,r31,80 Chain_Node *tail = _Chain_Tail( the_chain ); ffc153e8: 39 3f 00 54 addi r9,r31,84 head->next = tail; head->previous = NULL; ffc153ec: 93 df 00 54 stw r30,84(r31) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc153f0: 7f e3 fb 78 mr r3,r31 tail->previous = head; ffc153f4: 90 1f 00 58 stw r0,88(r31) ffc153f8: 38 a0 00 80 li r5,128 ffc153fc: 38 c0 00 06 li r6,6 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc15400: 91 3f 00 50 stw r9,80(r31) THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; ffc15404: 3b c0 00 01 li r30,1 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc15408: 80 9d 00 00 lwz r4,0(r29) ffc1540c: 68 84 00 01 xori r4,r4,1 ffc15410: 7c 84 00 34 cntlzw r4,r4 ffc15414: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc15418: 48 00 2d 15 bl ffc1812c <_Thread_queue_Initialize> STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc1541c: 80 01 00 24 lwz r0,36(r1) ffc15420: 7f c3 f3 78 mr r3,r30 ffc15424: 83 81 00 10 lwz r28,16(r1) ffc15428: 7c 08 03 a6 mtlr r0 ffc1542c: 83 a1 00 14 lwz r29,20(r1) ffc15430: 83 c1 00 18 lwz r30,24(r1) ffc15434: 83 e1 00 1c lwz r31,28(r1) ffc15438: 38 21 00 20 addi r1,r1,32 ffc1543c: 4e 80 00 20 blr =============================================================================== ffc09eb8 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09eb8: 94 21 ff d8 stwu r1,-40(r1) ffc09ebc: 7c 08 02 a6 mflr r0 ffc09ec0: 93 c1 00 20 stw r30,32(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09ec4: 3f c0 00 00 lis r30,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09ec8: 90 01 00 2c stw r0,44(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09ecc: 80 1e 27 28 lwz r0,10024(r30) Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09ed0: 93 61 00 14 stw r27,20(r1) ffc09ed4: 7c db 33 78 mr r27,r6 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09ed8: 2f 80 00 00 cmpwi cr7,r0,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09edc: 93 81 00 18 stw r28,24(r1) ffc09ee0: 7c bc 2b 78 mr r28,r5 ffc09ee4: 93 a1 00 1c stw r29,28(r1) ffc09ee8: 7c 9d 23 78 mr r29,r4 ffc09eec: 93 e1 00 24 stw r31,36(r1) ffc09ef0: 7c 7f 1b 78 mr r31,r3 ffc09ef4: 90 e1 00 08 stw r7,8(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09ef8: 41 9e 00 0c beq- cr7,ffc09f04 <_CORE_mutex_Seize+0x4c> ffc09efc: 2f 85 00 00 cmpwi cr7,r5,0 ffc09f00: 40 9e 00 5c bne- cr7,ffc09f5c <_CORE_mutex_Seize+0xa4> <== ALWAYS TAKEN ffc09f04: 7f e3 fb 78 mr r3,r31 ffc09f08: 38 81 00 08 addi r4,r1,8 ffc09f0c: 48 00 5a d1 bl ffc0f9dc <_CORE_mutex_Seize_interrupt_trylock> ffc09f10: 2f 83 00 00 cmpwi cr7,r3,0 ffc09f14: 41 9e 00 24 beq- cr7,ffc09f38 <_CORE_mutex_Seize+0x80> ffc09f18: 2f 9c 00 00 cmpwi cr7,r28,0 ffc09f1c: 40 9e 00 60 bne- cr7,ffc09f7c <_CORE_mutex_Seize+0xc4> ffc09f20: 80 01 00 08 lwz r0,8(r1) ffc09f24: 7c 00 01 24 mtmsr r0 ffc09f28: 3d 20 00 00 lis r9,0 ffc09f2c: 81 29 2d 44 lwz r9,11588(r9) ffc09f30: 38 00 00 01 li r0,1 ffc09f34: 90 09 00 34 stw r0,52(r9) } ffc09f38: 80 01 00 2c lwz r0,44(r1) ffc09f3c: 83 61 00 14 lwz r27,20(r1) ffc09f40: 7c 08 03 a6 mtlr r0 ffc09f44: 83 81 00 18 lwz r28,24(r1) ffc09f48: 83 a1 00 1c lwz r29,28(r1) ffc09f4c: 83 c1 00 20 lwz r30,32(r1) ffc09f50: 83 e1 00 24 lwz r31,36(r1) ffc09f54: 38 21 00 28 addi r1,r1,40 ffc09f58: 4e 80 00 20 blr bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09f5c: 3d 20 00 00 lis r9,0 ffc09f60: 80 09 27 6c lwz r0,10092(r9) ffc09f64: 2b 80 00 01 cmplwi cr7,r0,1 ffc09f68: 40 9d ff 9c ble+ cr7,ffc09f04 <_CORE_mutex_Seize+0x4c> ffc09f6c: 38 60 00 00 li r3,0 ffc09f70: 38 80 00 00 li r4,0 ffc09f74: 38 a0 00 12 li r5,18 ffc09f78: 48 00 08 a1 bl ffc0a818 <_Internal_error_Occurred> ffc09f7c: 3d 20 00 00 lis r9,0 ffc09f80: 81 7e 27 28 lwz r11,10024(r30) ffc09f84: 81 29 2d 44 lwz r9,11588(r9) 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; ffc09f88: 38 00 00 01 li r0,1 ffc09f8c: 90 1f 00 30 stw r0,48(r31) ffc09f90: 38 0b 00 01 addi r0,r11,1 ffc09f94: 93 e9 00 44 stw r31,68(r9) ffc09f98: 93 a9 00 20 stw r29,32(r9) ffc09f9c: 90 1e 27 28 stw r0,10024(r30) ffc09fa0: 80 01 00 08 lwz r0,8(r1) ffc09fa4: 7c 00 01 24 mtmsr r0 ffc09fa8: 7f e3 fb 78 mr r3,r31 ffc09fac: 7f 64 db 78 mr r4,r27 ffc09fb0: 4b ff fe 45 bl ffc09df4 <_CORE_mutex_Seize_interrupt_blocking> } ffc09fb4: 80 01 00 2c lwz r0,44(r1) ffc09fb8: 83 61 00 14 lwz r27,20(r1) ffc09fbc: 7c 08 03 a6 mtlr r0 ffc09fc0: 83 81 00 18 lwz r28,24(r1) ffc09fc4: 83 a1 00 1c lwz r29,28(r1) ffc09fc8: 83 c1 00 20 lwz r30,32(r1) ffc09fcc: 83 e1 00 24 lwz r31,36(r1) ffc09fd0: 38 21 00 28 addi r1,r1,40 ffc09fd4: 4e 80 00 20 blr =============================================================================== ffc0f9dc <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { ffc0f9dc: 94 21 ff f8 stwu r1,-8(r1) ffc0f9e0: 7c 08 02 a6 mflr r0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; ffc0f9e4: 3d 60 00 00 lis r11,0 ffc0f9e8: 90 01 00 0c stw r0,12(r1) ffc0f9ec: 7c 69 1b 78 mr r9,r3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { ffc0f9f0: 80 03 00 50 lwz r0,80(r3) { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; ffc0f9f4: 81 6b 2d 44 lwz r11,11588(r11) executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { ffc0f9f8: 2f 80 00 00 cmpwi cr7,r0,0 Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; ffc0f9fc: 38 00 00 00 li r0,0 ffc0fa00: 90 0b 00 34 stw r0,52(r11) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { ffc0fa04: 41 9e 00 4c beq- cr7,ffc0fa50 <_CORE_mutex_Seize_interrupt_trylock+0x74> return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } ffc0fa08: 81 43 00 48 lwz r10,72(r3) the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; ffc0fa0c: 39 00 00 01 li r8,1 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; ffc0fa10: 80 eb 00 08 lwz r7,8(r11) the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc0fa14: 2f 8a 00 02 cmpwi cr7,r10,2 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; ffc0fa18: 90 03 00 50 stw r0,80(r3) the_mutex->holder = executing; ffc0fa1c: 91 63 00 5c stw r11,92(r3) the_mutex->holder_id = executing->Object.id; ffc0fa20: 90 e3 00 60 stw r7,96(r3) the_mutex->nest_count = 1; ffc0fa24: 91 03 00 54 stw r8,84(r3) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc0fa28: 41 9e 00 60 beq- cr7,ffc0fa88 <_CORE_mutex_Seize_interrupt_trylock+0xac> ffc0fa2c: 2f 8a 00 03 cmpwi cr7,r10,3 ffc0fa30: 41 9e 00 68 beq- cr7,ffc0fa98 <_CORE_mutex_Seize_interrupt_trylock+0xbc> ffc0fa34: 80 04 00 00 lwz r0,0(r4) ffc0fa38: 7c 00 01 24 mtmsr r0 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); return 0; ffc0fa3c: 38 60 00 00 li r3,0 ffc0fa40: 80 01 00 0c lwz r0,12(r1) ffc0fa44: 38 21 00 08 addi r1,r1,8 ffc0fa48: 7c 08 03 a6 mtlr r0 ffc0fa4c: 4e 80 00 20 blr /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { ffc0fa50: 80 03 00 5c lwz r0,92(r3) /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; ffc0fa54: 38 60 00 01 li r3,1 /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { ffc0fa58: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0fa5c: 40 9e ff e4 bne+ cr7,ffc0fa40 <_CORE_mutex_Seize_interrupt_trylock+0x64> switch ( the_mutex->Attributes.lock_nesting_behavior ) { ffc0fa60: 80 09 00 40 lwz r0,64(r9) ffc0fa64: 2f 80 00 00 cmpwi cr7,r0,0 ffc0fa68: 40 9e 00 84 bne- cr7,ffc0faec <_CORE_mutex_Seize_interrupt_trylock+0x110> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; ffc0fa6c: 81 69 00 54 lwz r11,84(r9) ffc0fa70: 38 0b 00 01 addi r0,r11,1 ffc0fa74: 90 09 00 54 stw r0,84(r9) ffc0fa78: 80 04 00 00 lwz r0,0(r4) ffc0fa7c: 7c 00 01 24 mtmsr r0 _ISR_Enable( *level_p ); return 0; ffc0fa80: 38 60 00 00 li r3,0 ffc0fa84: 4b ff ff bc b ffc0fa40 <_CORE_mutex_Seize_interrupt_trylock+0x64> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; ffc0fa88: 81 2b 00 1c lwz r9,28(r11) ffc0fa8c: 38 09 00 01 addi r0,r9,1 ffc0fa90: 90 0b 00 1c stw r0,28(r11) ffc0fa94: 4b ff ff a0 b ffc0fa34 <_CORE_mutex_Seize_interrupt_trylock+0x58> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; ffc0fa98: 80 e3 00 4c lwz r7,76(r3) current = executing->current_priority; ffc0fa9c: 81 4b 00 14 lwz r10,20(r11) _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; ffc0faa0: 80 cb 00 1c lwz r6,28(r11) Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { ffc0faa4: 7f 87 50 00 cmpw cr7,r7,r10 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; ffc0faa8: 38 a6 00 01 addi r5,r6,1 ffc0faac: 90 ab 00 1c stw r5,28(r11) Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { ffc0fab0: 41 9e 00 90 beq- cr7,ffc0fb40 <_CORE_mutex_Seize_interrupt_trylock+0x164> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { ffc0fab4: 7f 87 50 40 cmplw cr7,r7,r10 ffc0fab8: 41 9c 00 54 blt- cr7,ffc0fb0c <_CORE_mutex_Seize_interrupt_trylock+0x130> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; ffc0fabc: 39 40 00 06 li r10,6 ffc0fac0: 91 4b 00 34 stw r10,52(r11) the_mutex->lock = CORE_MUTEX_UNLOCKED; ffc0fac4: 91 03 00 50 stw r8,80(r3) the_mutex->nest_count = 0; /* undo locking above */ ffc0fac8: 90 03 00 54 stw r0,84(r3) executing->resource_count--; /* undo locking above */ ffc0facc: 90 cb 00 1c stw r6,28(r11) ffc0fad0: 80 04 00 00 lwz r0,0(r4) ffc0fad4: 7c 00 01 24 mtmsr r0 ffc0fad8: 80 01 00 0c lwz r0,12(r1) _ISR_Enable( *level_p ); return 0; ffc0fadc: 38 60 00 00 li r3,0 ffc0fae0: 38 21 00 08 addi r1,r1,8 ffc0fae4: 7c 08 03 a6 mtlr r0 ffc0fae8: 4e 80 00 20 blr * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { ffc0faec: 2f 80 00 01 cmpwi cr7,r0,1 ffc0faf0: 40 9e ff 50 bne+ cr7,ffc0fa40 <_CORE_mutex_Seize_interrupt_trylock+0x64><== ALWAYS TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; ffc0faf4: 38 00 00 02 li r0,2 <== NOT EXECUTED ffc0faf8: 90 0b 00 34 stw r0,52(r11) <== NOT EXECUTED ffc0fafc: 80 04 00 00 lwz r0,0(r4) <== NOT EXECUTED ffc0fb00: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED _ISR_Enable( *level_p ); return 0; ffc0fb04: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0fb08: 4b ff ff 38 b ffc0fa40 <_CORE_mutex_Seize_interrupt_trylock+0x64><== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0fb0c: 3d 60 00 00 lis r11,0 ffc0fb10: 81 4b 27 28 lwz r10,10024(r11) ffc0fb14: 38 0a 00 01 addi r0,r10,1 ffc0fb18: 90 0b 27 28 stw r0,10024(r11) ffc0fb1c: 80 04 00 00 lwz r0,0(r4) ffc0fb20: 7c 00 01 24 mtmsr r0 } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( ffc0fb24: 80 63 00 5c lwz r3,92(r3) ffc0fb28: 38 a0 00 00 li r5,0 ffc0fb2c: 80 89 00 4c lwz r4,76(r9) ffc0fb30: 4b ff bb 65 bl ffc0b694 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); ffc0fb34: 4b ff c2 1d bl ffc0bd50 <_Thread_Enable_dispatch> return 0; ffc0fb38: 38 60 00 00 li r3,0 ffc0fb3c: 4b ff ff 04 b ffc0fa40 <_CORE_mutex_Seize_interrupt_trylock+0x64> ffc0fb40: 80 04 00 00 lwz r0,0(r4) ffc0fb44: 7c 00 01 24 mtmsr r0 ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); return 0; ffc0fb48: 38 60 00 00 li r3,0 ffc0fb4c: 4b ff fe f4 b ffc0fa40 <_CORE_mutex_Seize_interrupt_trylock+0x64> =============================================================================== ffc0a198 <_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 ) { ffc0a198: 94 21 ff f0 stwu r1,-16(r1) ffc0a19c: 7c 08 02 a6 mflr r0 ffc0a1a0: 93 e1 00 0c stw r31,12(r1) ffc0a1a4: 7c 7f 1b 78 mr r31,r3 ffc0a1a8: 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)) ) { ffc0a1ac: 48 00 1f e9 bl ffc0c194 <_Thread_queue_Dequeue> ffc0a1b0: 2f 83 00 00 cmpwi cr7,r3,0 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0a1b4: 38 60 00 00 li r3,0 if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc0a1b8: 41 9e 00 18 beq- cr7,ffc0a1d0 <_CORE_semaphore_Surrender+0x38> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0a1bc: 80 01 00 14 lwz r0,20(r1) ffc0a1c0: 83 e1 00 0c lwz r31,12(r1) ffc0a1c4: 38 21 00 10 addi r1,r1,16 ffc0a1c8: 7c 08 03 a6 mtlr r0 ffc0a1cc: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a1d0: 7c 00 00 a6 mfmsr r0 ffc0a1d4: 7d 30 42 a6 mfsprg r9,0 ffc0a1d8: 7c 09 48 78 andc r9,r0,r9 ffc0a1dc: 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 ) ffc0a1e0: 81 3f 00 48 lwz r9,72(r31) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; ffc0a1e4: 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 ) ffc0a1e8: 81 7f 00 40 lwz r11,64(r31) ffc0a1ec: 7f 89 58 40 cmplw cr7,r9,r11 ffc0a1f0: 40 9c 00 10 bge- cr7,ffc0a200 <_CORE_semaphore_Surrender+0x68><== NEVER TAKEN the_semaphore->count += 1; ffc0a1f4: 39 29 00 01 addi r9,r9,1 ffc0a1f8: 91 3f 00 48 stw r9,72(r31) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0a1fc: 38 60 00 00 li r3,0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a200: 7c 00 01 24 mtmsr r0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0a204: 80 01 00 14 lwz r0,20(r1) ffc0a208: 83 e1 00 0c lwz r31,12(r1) ffc0a20c: 38 21 00 10 addi r1,r1,16 ffc0a210: 7c 08 03 a6 mtlr r0 ffc0a214: 4e 80 00 20 blr =============================================================================== ffc0f984 <_Chain_Initialize>: Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc0f984: 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; ffc0f988: 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 ); ffc0f98c: 39 43 00 04 addi r10,r3,4 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; ffc0f990: 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; ffc0f994: 7c 69 1b 78 mr r9,r3 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc0f998: 41 82 00 38 beq- ffc0f9d0 <_Chain_Initialize+0x4c> <== NEVER TAKEN ffc0f99c: 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; ffc0f9a0: 7c a9 03 a6 mtctr r5 Chain_Node *next = starting_address; ffc0f9a4: 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; ffc0f9a8: 7c 6b 1b 78 mr r11,r3 ffc0f9ac: 48 00 00 0c b ffc0f9b8 <_Chain_Initialize+0x34> Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc0f9b0: 7d 2b 4b 78 mr r11,r9 current->next = next; next->previous = current; current = next; next = (Chain_Node *) ffc0f9b4: 7c 09 03 78 mr r9,r0 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; ffc0f9b8: 91 2b 00 00 stw r9,0(r11) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( ffc0f9bc: 7c 09 32 14 add r0,r9,r6 head->previous = NULL; while ( count-- ) { current->next = next; next->previous = current; ffc0f9c0: 91 69 00 04 stw r11,4(r9) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc0f9c4: 42 00 ff ec bdnz+ ffc0f9b0 <_Chain_Initialize+0x2c> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( ffc0f9c8: 7c c6 41 d6 mullw r6,r6,r8 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc0f9cc: 7d 24 32 14 add r9,r4,r6 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; ffc0f9d0: 91 49 00 00 stw r10,0(r9) tail->previous = current; ffc0f9d4: 91 23 00 08 stw r9,8(r3) } ffc0f9d8: 4e 80 00 20 blr =============================================================================== ffc0896c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { ffc0896c: 94 21 ff f0 stwu r1,-16(r1) ffc08970: 7c 08 02 a6 mflr r0 ffc08974: 90 01 00 14 stw r0,20(r1) ffc08978: 93 e1 00 0c stw r31,12(r1) ffc0897c: 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 ]; ffc08980: 81 63 01 2c lwz r11,300(r3) option_set = (rtems_option) the_thread->Wait.option; ffc08984: 80 c3 00 30 lwz r6,48(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08988: 7d 40 00 a6 mfmsr r10 ffc0898c: 7c 10 42 a6 mfsprg r0,0 ffc08990: 7d 40 00 78 andc r0,r10,r0 ffc08994: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); pending_events = api->pending_events; ffc08998: 81 2b 00 00 lwz r9,0(r11) event_condition = (rtems_event_set) the_thread->Wait.count; ffc0899c: 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 ) ) { ffc089a0: 7c 08 48 39 and. r8,r0,r9 ffc089a4: 41 82 00 b0 beq- ffc08a54 <_Event_Surrender+0xe8> /* * 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() && ffc089a8: 3c e0 00 00 lis r7,0 ffc089ac: 38 e7 2d 38 addi r7,r7,11576 ffc089b0: 80 a7 00 08 lwz r5,8(r7) ffc089b4: 2f 85 00 00 cmpwi cr7,r5,0 ffc089b8: 41 9e 00 10 beq- cr7,ffc089c8 <_Event_Surrender+0x5c> ffc089bc: 80 e7 00 0c lwz r7,12(r7) ffc089c0: 7f 83 38 00 cmpw cr7,r3,r7 ffc089c4: 41 9e 00 d0 beq- cr7,ffc08a94 <_Event_Surrender+0x128> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); ffc089c8: 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 ) ) { ffc089cc: 70 e5 01 00 andi. r5,r7,256 ffc089d0: 41 82 00 6c beq- ffc08a3c <_Event_Surrender+0xd0> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc089d4: 7f 80 40 00 cmpw cr7,r0,r8 ffc089d8: 41 9e 00 0c beq- cr7,ffc089e4 <_Event_Surrender+0x78> ffc089dc: 70 c0 00 02 andi. r0,r6,2 ffc089e0: 41 82 00 5c beq- ffc08a3c <_Event_Surrender+0xd0> <== 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; ffc089e4: 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) ); ffc089e8: 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; ffc089ec: 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 ); ffc089f0: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc089f4: 90 1f 00 24 stw r0,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc089f8: 91 07 00 00 stw r8,0(r7) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc089fc: 7c 00 00 a6 mfmsr r0 ffc08a00: 7d 40 01 24 mtmsr r10 ffc08a04: 7c 00 01 24 mtmsr r0 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc08a08: 80 1f 00 50 lwz r0,80(r31) ffc08a0c: 2f 80 00 02 cmpwi cr7,r0,2 ffc08a10: 41 9e 00 5c beq- cr7,ffc08a6c <_Event_Surrender+0x100> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08a14: 7d 40 01 24 mtmsr r10 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc08a18: 3c 80 10 03 lis r4,4099 ffc08a1c: 7f e3 fb 78 mr r3,r31 ffc08a20: 60 84 ff f8 ori r4,r4,65528 ffc08a24: 48 00 2e 75 bl ffc0b898 <_Thread_Clear_state> } return; } } _ISR_Enable( level ); } ffc08a28: 80 01 00 14 lwz r0,20(r1) ffc08a2c: 83 e1 00 0c lwz r31,12(r1) ffc08a30: 38 21 00 10 addi r1,r1,16 ffc08a34: 7c 08 03 a6 mtlr r0 ffc08a38: 4e 80 00 20 blr ffc08a3c: 7d 40 01 24 mtmsr r10 ffc08a40: 80 01 00 14 lwz r0,20(r1) ffc08a44: 83 e1 00 0c lwz r31,12(r1) ffc08a48: 38 21 00 10 addi r1,r1,16 ffc08a4c: 7c 08 03 a6 mtlr r0 ffc08a50: 4e 80 00 20 blr ffc08a54: 7d 40 01 24 mtmsr r10 ffc08a58: 80 01 00 14 lwz r0,20(r1) ffc08a5c: 83 e1 00 0c lwz r31,12(r1) ffc08a60: 38 21 00 10 addi r1,r1,16 ffc08a64: 7c 08 03 a6 mtlr r0 ffc08a68: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc08a6c: 38 00 00 03 li r0,3 ffc08a70: 90 1f 00 50 stw r0,80(r31) ffc08a74: 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 ); ffc08a78: 38 7f 00 48 addi r3,r31,72 ffc08a7c: 48 00 49 49 bl ffc0d3c4 <_Watchdog_Remove> ffc08a80: 3c 80 10 03 lis r4,4099 ffc08a84: 7f e3 fb 78 mr r3,r31 ffc08a88: 60 84 ff f8 ori r4,r4,65528 ffc08a8c: 48 00 2e 0d bl ffc0b898 <_Thread_Clear_state> ffc08a90: 4b ff ff b0 b ffc08a40 <_Event_Surrender+0xd4> * 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) || ffc08a94: 3c e0 00 00 lis r7,0 ffc08a98: 80 a7 27 78 lwz r5,10104(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 ) && ffc08a9c: 2f 85 00 02 cmpwi cr7,r5,2 ffc08aa0: 41 9e 00 10 beq- cr7,ffc08ab0 <_Event_Surrender+0x144> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { ffc08aa4: 80 a7 27 78 lwz r5,10104(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) || ffc08aa8: 2f 85 00 01 cmpwi cr7,r5,1 ffc08aac: 40 9e ff 1c bne+ cr7,ffc089c8 <_Event_Surrender+0x5c> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { ffc08ab0: 7f 80 40 00 cmpw cr7,r0,r8 ffc08ab4: 41 9e 00 0c beq- cr7,ffc08ac0 <_Event_Surrender+0x154> ffc08ab8: 70 c0 00 02 andi. r0,r6,2 ffc08abc: 41 82 00 24 beq- ffc08ae0 <_Event_Surrender+0x174> <== 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; ffc08ac0: 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; ffc08ac4: 38 00 00 00 li r0,0 ffc08ac8: 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 ); ffc08acc: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc08ad0: 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; ffc08ad4: 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; ffc08ad8: 91 06 00 00 stw r8,0(r6) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc08adc: 90 07 27 78 stw r0,10104(r7) ffc08ae0: 7d 40 01 24 mtmsr r10 ffc08ae4: 4b ff ff 5c b ffc08a40 <_Event_Surrender+0xd4> =============================================================================== ffc08ae8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { ffc08ae8: 94 21 ff e8 stwu r1,-24(r1) ffc08aec: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc08af0: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *ignored ) { ffc08af4: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc08af8: 48 00 32 79 bl ffc0bd70 <_Thread_Get> switch ( location ) { ffc08afc: 80 01 00 08 lwz r0,8(r1) ffc08b00: 2f 80 00 00 cmpwi cr7,r0,0 ffc08b04: 40 9e 00 50 bne- cr7,ffc08b54 <_Event_Timeout+0x6c> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08b08: 7d 20 00 a6 mfmsr r9 ffc08b0c: 7d 70 42 a6 mfsprg r11,0 ffc08b10: 7d 2b 58 78 andc r11,r9,r11 ffc08b14: 7d 60 01 24 mtmsr r11 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc08b18: 3d 60 00 00 lis r11,0 _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc08b1c: 90 03 00 24 stw r0,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc08b20: 81 6b 2d 44 lwz r11,11588(r11) ffc08b24: 7f 83 58 00 cmpw cr7,r3,r11 ffc08b28: 41 9e 00 3c beq- cr7,ffc08b64 <_Event_Timeout+0x7c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; ffc08b2c: 38 00 00 06 li r0,6 ffc08b30: 90 03 00 34 stw r0,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08b34: 7d 20 01 24 mtmsr r9 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc08b38: 3c 80 10 03 lis r4,4099 ffc08b3c: 60 84 ff f8 ori r4,r4,65528 ffc08b40: 48 00 2d 59 bl ffc0b898 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc08b44: 3d 20 00 00 lis r9,0 ffc08b48: 81 69 27 28 lwz r11,10024(r9) ffc08b4c: 38 0b ff ff addi r0,r11,-1 ffc08b50: 90 09 27 28 stw r0,10024(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc08b54: 80 01 00 1c lwz r0,28(r1) ffc08b58: 38 21 00 18 addi r1,r1,24 ffc08b5c: 7c 08 03 a6 mtlr r0 ffc08b60: 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 ) ffc08b64: 3d 60 00 00 lis r11,0 ffc08b68: 80 0b 27 78 lwz r0,10104(r11) ffc08b6c: 2f 80 00 01 cmpwi cr7,r0,1 ffc08b70: 40 9e ff bc bne+ cr7,ffc08b2c <_Event_Timeout+0x44> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc08b74: 38 00 00 02 li r0,2 ffc08b78: 90 0b 27 78 stw r0,10104(r11) ffc08b7c: 4b ff ff b0 b ffc08b2c <_Event_Timeout+0x44> =============================================================================== ffc0fbf4 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc0fbf4: 94 21 ff e0 stwu r1,-32(r1) ffc0fbf8: 7c 08 02 a6 mflr r0 ffc0fbfc: 7d 80 00 26 mfcr r12 ffc0fc00: 7c 89 23 78 mr r9,r4 ffc0fc04: 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 ffc0fc08: 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 ) { ffc0fc0c: 7f 84 00 40 cmplw cr7,r4,r0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc0fc10: 93 a1 00 14 stw r29,20(r1) ffc0fc14: 7c 7d 1b 78 mr r29,r3 ffc0fc18: 91 81 00 08 stw r12,8(r1) ffc0fc1c: 93 61 00 0c stw r27,12(r1) 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; ffc0fc20: 81 83 00 10 lwz r12,16(r3) uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { /* Integer overflow occured */ return NULL; ffc0fc24: 38 60 00 00 li r3,0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc0fc28: 93 81 00 10 stw r28,16(r1) ffc0fc2c: 93 c1 00 18 stw r30,24(r1) ffc0fc30: 93 e1 00 1c stw r31,28(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 ) { ffc0fc34: 41 9d 01 60 bgt- cr7,ffc0fd94 <_Heap_Allocate_aligned_with_boundary+0x1a0> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { ffc0fc38: 2e 06 00 00 cmpwi cr4,r6,0 ffc0fc3c: 40 92 01 8c bne- cr4,ffc0fdc8 <_Heap_Allocate_aligned_with_boundary+0x1d4> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } ffc0fc40: 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 ) { ffc0fc44: 38 60 00 00 li r3,0 ffc0fc48: 7f 9d 20 00 cmpw cr7,r29,r4 ffc0fc4c: 41 9e 01 48 beq- cr7,ffc0fd94 <_Heap_Allocate_aligned_with_boundary+0x1a0> ffc0fc50: 3b c0 00 01 li r30,1 * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { if ( alignment == 0 ) { ffc0fc54: 2c 05 00 00 cmpwi r5,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 ffc0fc58: 3b 6c 00 07 addi r27,r12,7 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; ffc0fc5c: 23 89 00 04 subfic r28,r9,4 ffc0fc60: 48 00 00 24 b ffc0fc84 <_Heap_Allocate_aligned_with_boundary+0x90> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0fc64: 3b e4 00 08 addi r31,r4,8 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc0fc68: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0fc6c: 40 9e 00 ec bne- cr7,ffc0fd58 <_Heap_Allocate_aligned_with_boundary+0x164><== ALWAYS TAKEN break; } block = block->next; ffc0fc70: 80 84 00 08 lwz r4,8(r4) ffc0fc74: 39 7e 00 01 addi r11,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 ) { ffc0fc78: 7f 9d 20 00 cmpw cr7,r29,r4 ffc0fc7c: 41 9e 01 44 beq- cr7,ffc0fdc0 <_Heap_Allocate_aligned_with_boundary+0x1cc> ffc0fc80: 7d 7e 5b 78 mr r30,r11 /* * 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 ) { ffc0fc84: 81 64 00 04 lwz r11,4(r4) ffc0fc88: 7f 80 58 40 cmplw cr7,r0,r11 ffc0fc8c: 40 bc ff e4 bge- cr7,ffc0fc70 <_Heap_Allocate_aligned_with_boundary+0x7c> if ( alignment == 0 ) { ffc0fc90: 41 a2 ff d4 beq- ffc0fc64 <_Heap_Allocate_aligned_with_boundary+0x70> - 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; ffc0fc94: 55 6b 00 3c rlwinm r11,r11,0,0,30 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } ffc0fc98: 80 fd 00 14 lwz r7,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; ffc0fc9c: 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; ffc0fca0: 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); ffc0fca4: 7f ff 2b 96 divwu r31,r31,r5 ffc0fca8: 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; ffc0fcac: 7d 47 d8 50 subf r10,r7,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 ffc0fcb0: 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 ) { ffc0fcb4: 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; ffc0fcb8: 38 64 00 08 addi r3,r4,8 ffc0fcbc: 40 9c 00 0c bge- cr7,ffc0fcc8 <_Heap_Allocate_aligned_with_boundary+0xd4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0fcc0: 7d 6b 2b 96 divwu r11,r11,r5 ffc0fcc4: 7f eb 29 d6 mullw r31,r11,r5 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc0fcc8: 41 92 00 60 beq- cr4,ffc0fd28 <_Heap_Allocate_aligned_with_boundary+0x134> /* 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; ffc0fccc: 7d 5f 4a 14 add r10,r31,r9 ffc0fcd0: 7d 6a 33 96 divwu r11,r10,r6 ffc0fcd4: 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 ) { ffc0fcd8: 7f 9f 58 40 cmplw cr7,r31,r11 ffc0fcdc: 40 9c 00 4c bge- cr7,ffc0fd28 <_Heap_Allocate_aligned_with_boundary+0x134> ffc0fce0: 7f 8a 58 40 cmplw cr7,r10,r11 ffc0fce4: 40 9d 00 44 ble- cr7,ffc0fd28 <_Heap_Allocate_aligned_with_boundary+0x134> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; ffc0fce8: 7d 03 4a 14 add r8,r3,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 ) { ffc0fcec: 7f 88 58 40 cmplw cr7,r8,r11 ffc0fcf0: 40 bd 00 10 ble+ cr7,ffc0fd00 <_Heap_Allocate_aligned_with_boundary+0x10c> ffc0fcf4: 4b ff ff 7c b ffc0fc70 <_Heap_Allocate_aligned_with_boundary+0x7c> /* 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 ) { ffc0fcf8: 40 99 00 30 ble- cr6,ffc0fd28 <_Heap_Allocate_aligned_with_boundary+0x134> if ( boundary_line < boundary_floor ) { ffc0fcfc: 41 a5 ff 74 bgt- cr1,ffc0fc70 <_Heap_Allocate_aligned_with_boundary+0x7c><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; ffc0fd00: 7f e9 58 50 subf r31,r9,r11 ffc0fd04: 7f ff 2b 96 divwu r31,r31,r5 ffc0fd08: 7f ff 29 d6 mullw r31,r31,r5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; ffc0fd0c: 7d 5f 4a 14 add r10,r31,r9 ffc0fd10: 7d 6a 33 96 divwu r11,r10,r6 ffc0fd14: 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 ) { ffc0fd18: 7f 9f 58 40 cmplw cr7,r31,r11 ffc0fd1c: 7f 0a 58 40 cmplw cr6,r10,r11 if ( boundary_line < boundary_floor ) { ffc0fd20: 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 ) { ffc0fd24: 41 9c ff d4 blt+ cr7,ffc0fcf8 <_Heap_Allocate_aligned_with_boundary+0x104> 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 ) { ffc0fd28: 7f 83 f8 40 cmplw cr7,r3,r31 ffc0fd2c: 41 bd ff 44 bgt- cr7,ffc0fc70 <_Heap_Allocate_aligned_with_boundary+0x7c> ffc0fd30: 7d 7f 63 96 divwu r11,r31,r12 ffc0fd34: 7d 6b 61 d6 mullw r11,r11,r12 ffc0fd38: 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; ffc0fd3c: 7d 6a 5a 14 add r11,r10,r11 if ( free_size >= min_block_size || free_size == 0 ) { ffc0fd40: 7f 87 58 40 cmplw cr7,r7,r11 ffc0fd44: 40 bd ff 24 ble- cr7,ffc0fc68 <_Heap_Allocate_aligned_with_boundary+0x74> ffc0fd48: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0fd4c: 40 be ff 24 bne- cr7,ffc0fc70 <_Heap_Allocate_aligned_with_boundary+0x7c> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc0fd50: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0fd54: 41 9e ff 1c beq+ cr7,ffc0fc70 <_Heap_Allocate_aligned_with_boundary+0x7c><== NEVER TAKEN search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc0fd58: 81 7d 00 48 lwz r11,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0fd5c: 7f a3 eb 78 mr r3,r29 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc0fd60: 80 1d 00 4c lwz r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0fd64: 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; ffc0fd68: 39 6b 00 01 addi r11,r11,1 stats->searches += search_count; ffc0fd6c: 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; ffc0fd70: 91 7d 00 48 stw r11,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0fd74: 7d 26 4b 78 mr r6,r9 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc0fd78: 90 1d 00 4c stw r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0fd7c: 4b ff a9 41 bl ffc0a6bc <_Heap_Block_allocate> ffc0fd80: 7f e3 fb 78 mr r3,r31 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { ffc0fd84: 80 1d 00 44 lwz r0,68(r29) ffc0fd88: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0fd8c: 40 9c 00 08 bge- cr7,ffc0fd94 <_Heap_Allocate_aligned_with_boundary+0x1a0> stats->max_search = search_count; ffc0fd90: 93 dd 00 44 stw r30,68(r29) } return (void *) alloc_begin; } ffc0fd94: 80 01 00 24 lwz r0,36(r1) ffc0fd98: 81 81 00 08 lwz r12,8(r1) ffc0fd9c: 7c 08 03 a6 mtlr r0 ffc0fda0: 83 61 00 0c lwz r27,12(r1) ffc0fda4: 83 81 00 10 lwz r28,16(r1) ffc0fda8: 7d 80 81 20 mtcrf 8,r12 ffc0fdac: 83 a1 00 14 lwz r29,20(r1) ffc0fdb0: 83 c1 00 18 lwz r30,24(r1) ffc0fdb4: 83 e1 00 1c lwz r31,28(r1) ffc0fdb8: 38 21 00 20 addi r1,r1,32 ffc0fdbc: 4e 80 00 20 blr do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc0fdc0: 38 60 00 00 li r3,0 ffc0fdc4: 4b ff ff c0 b ffc0fd84 <_Heap_Allocate_aligned_with_boundary+0x190> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { ffc0fdc8: 7f 84 30 40 cmplw cr7,r4,r6 ffc0fdcc: 41 bd ff c8 bgt- cr7,ffc0fd94 <_Heap_Allocate_aligned_with_boundary+0x1a0> return NULL; } if ( alignment == 0 ) { ffc0fdd0: 2f 85 00 00 cmpwi cr7,r5,0 ffc0fdd4: 40 be fe 6c bne- cr7,ffc0fc40 <_Heap_Allocate_aligned_with_boundary+0x4c> alignment = page_size; ffc0fdd8: 7d 85 63 78 mr r5,r12 ffc0fddc: 4b ff fe 64 b ffc0fc40 <_Heap_Allocate_aligned_with_boundary+0x4c> =============================================================================== ffc102d0 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc102d0: 94 21 ff c0 stwu r1,-64(r1) ffc102d4: 7d 80 00 26 mfcr r12 ffc102d8: 7c 08 02 a6 mflr r0 ffc102dc: 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; ffc102e0: 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 ) { ffc102e4: 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 ) { ffc102e8: 90 01 00 44 stw r0,68(r1) ffc102ec: 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; ffc102f0: 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 ) { ffc102f4: 93 c1 00 38 stw r30,56(r1) ffc102f8: 7c 7e 1b 78 mr r30,r3 ffc102fc: 93 01 00 20 stw r24,32(r1) ffc10300: 93 21 00 24 stw r25,36(r1) ffc10304: 7c d9 33 78 mr r25,r6 ffc10308: 93 61 00 2c stw r27,44(r1) ffc1030c: 93 81 00 30 stw r28,48(r1) ffc10310: 93 e1 00 3c stw r31,60(r1) ffc10314: 7c 9f 23 78 mr r31,r4 Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; ffc10318: 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; ffc1031c: 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 ) { ffc10320: 92 e1 00 1c stw r23,28(r1) ffc10324: 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; ffc10328: 93 41 00 08 stw r26,8(r1) Heap_Block *extend_last_block = NULL; ffc1032c: 93 41 00 0c stw r26,12(r1) uintptr_t const page_size = heap->page_size; ffc10330: 83 9e 00 10 lwz r28,16(r30) uintptr_t const min_block_size = heap->min_block_size; ffc10334: 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; ffc10338: 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 ) { ffc1033c: 40 9d 00 40 ble- cr7,ffc1037c <_Heap_Extend+0xac> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc10340: 80 01 00 44 lwz r0,68(r1) ffc10344: 81 81 00 18 lwz r12,24(r1) ffc10348: 7c 08 03 a6 mtlr r0 ffc1034c: 82 e1 00 1c lwz r23,28(r1) ffc10350: 83 01 00 20 lwz r24,32(r1) ffc10354: 7d 81 81 20 mtcrf 24,r12 ffc10358: 83 21 00 24 lwz r25,36(r1) ffc1035c: 83 41 00 28 lwz r26,40(r1) ffc10360: 83 61 00 2c lwz r27,44(r1) ffc10364: 83 81 00 30 lwz r28,48(r1) ffc10368: 83 a1 00 34 lwz r29,52(r1) ffc1036c: 83 c1 00 38 lwz r30,56(r1) ffc10370: 83 e1 00 3c lwz r31,60(r1) ffc10374: 38 21 00 40 addi r1,r1,64 ffc10378: 4e 80 00 20 blr if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( ffc1037c: 7c 83 23 78 mr r3,r4 ffc10380: 38 e1 00 08 addi r7,r1,8 ffc10384: 7c a4 2b 78 mr r4,r5 ffc10388: 39 01 00 0c addi r8,r1,12 ffc1038c: 7f 85 e3 78 mr r5,r28 ffc10390: 4b ff a5 65 bl ffc0a8f4 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc10394: 2f 83 00 00 cmpwi cr7,r3,0 /* For simplicity we reject extend areas that are too small */ return false; ffc10398: 7f 43 d3 78 mr r3,r26 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc1039c: 41 be ff a4 beq- cr7,ffc10340 <_Heap_Extend+0x70> ffc103a0: 7f 69 db 78 mr r9,r27 ffc103a4: 3a e0 00 00 li r23,0 ffc103a8: 38 00 00 00 li r0,0 ffc103ac: 39 00 00 00 li r8,0 ffc103b0: 48 00 00 44 b ffc103f4 <_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 ) { ffc103b4: 7f 9d 58 40 cmplw cr7,r29,r11 ffc103b8: 40 9c 00 08 bge- cr7,ffc103c0 <_Heap_Extend+0xf0> ffc103bc: 7d 20 4b 78 mr r0,r9 ffc103c0: 7d 4b e3 96 divwu r10,r11,r28 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc103c4: 7f 8b f8 00 cmpw cr7,r11,r31 ffc103c8: 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); ffc103cc: 39 4a ff f8 addi r10,r10,-8 ffc103d0: 41 9e 00 64 beq- cr7,ffc10434 <_Heap_Extend+0x164> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { ffc103d4: 7f 9f 58 40 cmplw cr7,r31,r11 ffc103d8: 40 9d 00 08 ble- cr7,ffc103e0 <_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 ) ffc103dc: 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; ffc103e0: 81 2a 00 04 lwz r9,4(r10) ffc103e4: 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); ffc103e8: 7d 2a 4a 14 add r9,r10,r9 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc103ec: 7f 9b 48 00 cmpw cr7,r27,r9 ffc103f0: 41 9e 00 60 beq- cr7,ffc10450 <_Heap_Extend+0x180> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc103f4: 7f 89 d8 00 cmpw cr7,r9,r27 ffc103f8: 7d 2a 4b 78 mr r10,r9 ffc103fc: 41 9e 01 b8 beq- cr7,ffc105b4 <_Heap_Extend+0x2e4> uintptr_t const sub_area_end = start_block->prev_size; ffc10400: 81 69 00 00 lwz r11,0(r9) Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( ffc10404: 7f 9f 58 40 cmplw cr7,r31,r11 ffc10408: 40 9c 00 0c bge- cr7,ffc10414 <_Heap_Extend+0x144> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ffc1040c: 7f 8a e8 40 cmplw cr7,r10,r29 ffc10410: 41 9c 02 28 blt- cr7,ffc10638 <_Heap_Extend+0x368> ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc10414: 7f 8a e8 00 cmpw cr7,r10,r29 ffc10418: 40 9e ff 9c bne+ cr7,ffc103b4 <_Heap_Extend+0xe4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1041c: 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 ) { ffc10420: 7f 8b f8 00 cmpw cr7,r11,r31 ffc10424: 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 ) { ffc10428: 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); ffc1042c: 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 ) { ffc10430: 40 9e ff a4 bne+ cr7,ffc103d4 <_Heap_Extend+0x104> <== ALWAYS TAKEN start_block->prev_size = extend_area_end; ffc10434: 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 ) ffc10438: 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; ffc1043c: 81 2a 00 04 lwz r9,4(r10) ffc10440: 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); ffc10444: 7d 2a 4a 14 add r9,r10,r9 } 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 ); ffc10448: 7f 9b 48 00 cmpw cr7,r27,r9 ffc1044c: 40 9e ff a8 bne+ cr7,ffc103f4 <_Heap_Extend+0x124> <== NEVER TAKEN if ( extend_area_begin < heap->area_begin ) { ffc10450: 81 3e 00 18 lwz r9,24(r30) ffc10454: 7f 9f 48 40 cmplw cr7,r31,r9 ffc10458: 41 9c 01 64 blt- cr7,ffc105bc <_Heap_Extend+0x2ec> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { ffc1045c: 81 3e 00 1c lwz r9,28(r30) ffc10460: 7f 9d 48 40 cmplw cr7,r29,r9 ffc10464: 40 9d 00 08 ble- cr7,ffc1046c <_Heap_Extend+0x19c> heap->area_end = extend_area_end; ffc10468: 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 ) { ffc1046c: 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; ffc10470: 81 21 00 08 lwz r9,8(r1) ffc10474: 81 61 00 0c lwz r11,12(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 ) { ffc10478: 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; ffc1047c: 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 = ffc10480: 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; ffc10484: 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; ffc10488: 91 4b 00 00 stw r10,0(r11) extend_last_block->size_and_flag = 0; ffc1048c: 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 = ffc10490: 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; ffc10494: 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 ) { ffc10498: 40 9d 01 58 ble- cr7,ffc105f0 <_Heap_Extend+0x320> <== ALWAYS TAKEN heap->first_block = extend_first_block; ffc1049c: 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 ) { ffc104a0: 2e 08 00 00 cmpwi cr4,r8,0 ffc104a4: 41 92 01 b0 beq- cr4,ffc10654 <_Heap_Extend+0x384> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; ffc104a8: 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 ); ffc104ac: 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; ffc104b0: 7d 3f 03 96 divwu r9,r31,r0 ffc104b4: 7d 29 01 d6 mullw r9,r9,r0 if ( remainder != 0 ) { ffc104b8: 7d 29 f8 51 subf. r9,r9,r31 ffc104bc: 41 82 00 0c beq- ffc104c8 <_Heap_Extend+0x1f8> <== ALWAYS TAKEN return value - remainder + alignment; ffc104c0: 7f ff 02 14 add r31,r31,r0 <== NOT EXECUTED ffc104c4: 7f e9 f8 50 subf r31,r9,r31 <== NOT EXECUTED uintptr_t const new_first_block_begin = ffc104c8: 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; ffc104cc: 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 = ffc104d0: 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; ffc104d4: 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; ffc104d8: 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 ); ffc104dc: 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; ffc104e0: 90 04 00 04 stw r0,4(r4) _Heap_Free_block( heap, new_first_block ); ffc104e4: 4b ff fd b1 bl ffc10294 <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { ffc104e8: 2d 9a 00 00 cmpwi cr3,r26,0 ffc104ec: 41 8e 01 18 beq- cr3,ffc10604 <_Heap_Extend+0x334> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc104f0: 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, ffc104f4: 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( ffc104f8: 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) ffc104fc: 81 7a 00 04 lwz r11,4(r26) ffc10500: 7c 00 4b 96 divwu r0,r0,r9 ffc10504: 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 ); ffc10508: 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) ffc1050c: 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 = ffc10510: 7d 20 d2 14 add r9,r0,r26 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; ffc10514: 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 = ffc10518: 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 ); ffc1051c: 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; ffc10520: 81 3a 00 04 lwz r9,4(r26) ffc10524: 55 29 07 fe clrlwi r9,r9,31 block->size_and_flag = size | flag; ffc10528: 7c 00 4b 78 or r0,r0,r9 ffc1052c: 90 1a 00 04 stw r0,4(r26) ffc10530: 4b ff fd 65 bl ffc10294 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc10534: 41 92 01 0c beq- cr4,ffc10640 <_Heap_Extend+0x370> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc10538: 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 ) ffc1053c: 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( ffc10540: 81 5e 00 20 lwz r10,32(r30) *extended_size_ptr = extended_size; return true; ffc10544: 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; ffc10548: 81 69 00 04 lwz r11,4(r9) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc1054c: 81 1e 00 30 lwz r8,48(r30) * 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( ffc10550: 7d 49 50 50 subf r10,r9,r10 /* Statistics */ stats->size += extended_size; ffc10554: 80 1e 00 2c lwz r0,44(r30) 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; ffc10558: 55 6b 07 fe clrlwi r11,r11,31 _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc1055c: 7f 18 40 50 subf r24,r24,r8 block->size_and_flag = size | flag; ffc10560: 7d 4b 5b 78 or r11,r10,r11 /* Statistics */ stats->size += extended_size; ffc10564: 7c 00 c2 14 add r0,r0,r24 ffc10568: 91 69 00 04 stw r11,4(r9) ffc1056c: 90 1e 00 2c stw r0,44(r30) if ( extended_size_ptr != NULL ) ffc10570: 41 be fd d0 beq- cr7,ffc10340 <_Heap_Extend+0x70> <== NEVER TAKEN *extended_size_ptr = extended_size; return true; } ffc10574: 80 01 00 44 lwz r0,68(r1) ffc10578: 81 81 00 18 lwz r12,24(r1) ffc1057c: 7c 08 03 a6 mtlr r0 /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; ffc10580: 93 19 00 00 stw r24,0(r25) return true; } ffc10584: 7d 81 81 20 mtcrf 24,r12 ffc10588: 82 e1 00 1c lwz r23,28(r1) ffc1058c: 83 01 00 20 lwz r24,32(r1) ffc10590: 83 21 00 24 lwz r25,36(r1) ffc10594: 83 41 00 28 lwz r26,40(r1) ffc10598: 83 61 00 2c lwz r27,44(r1) ffc1059c: 83 81 00 30 lwz r28,48(r1) ffc105a0: 83 a1 00 34 lwz r29,52(r1) ffc105a4: 83 c1 00 38 lwz r30,56(r1) ffc105a8: 83 e1 00 3c lwz r31,60(r1) ffc105ac: 38 21 00 40 addi r1,r1,64 ffc105b0: 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; ffc105b4: 81 5e 00 18 lwz r10,24(r30) ffc105b8: 4b ff fe 48 b ffc10400 <_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 ) { ffc105bc: 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; ffc105c0: 81 21 00 08 lwz r9,8(r1) ffc105c4: 81 61 00 0c lwz r11,12(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 ) { ffc105c8: 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; ffc105cc: 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 = ffc105d0: 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; ffc105d4: 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; ffc105d8: 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; ffc105dc: 91 4b 00 00 stw r10,0(r11) extend_last_block->size_and_flag = 0; ffc105e0: 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 = ffc105e4: 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; ffc105e8: 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 ) { ffc105ec: 41 bd fe b0 bgt- cr7,ffc1049c <_Heap_Extend+0x1cc> <== ALWAYS TAKEN heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { ffc105f0: 81 3e 00 24 lwz r9,36(r30) ffc105f4: 7f 89 58 40 cmplw cr7,r9,r11 ffc105f8: 40 bc fe a8 bge- cr7,ffc104a0 <_Heap_Extend+0x1d0> heap->last_block = extend_last_block; ffc105fc: 91 7e 00 24 stw r11,36(r30) ffc10600: 4b ff fe a0 b ffc104a0 <_Heap_Extend+0x1d0> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { ffc10604: 2f 97 00 00 cmpwi cr7,r23,0 ffc10608: 41 be ff 2c beq- cr7,ffc10534 <_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; ffc1060c: 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 ); ffc10610: 80 01 00 08 lwz r0,8(r1) ffc10614: 55 29 07 fe clrlwi r9,r9,31 ffc10618: 7c 17 00 50 subf r0,r23,r0 block->size_and_flag = size | flag; ffc1061c: 7c 00 4b 78 or r0,r0,r9 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( ffc10620: 81 21 00 0c lwz r9,12(r1) ffc10624: 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; ffc10628: 80 09 00 04 lwz r0,4(r9) ffc1062c: 60 00 00 01 ori r0,r0,1 ffc10630: 90 09 00 04 stw r0,4(r9) ffc10634: 4b ff ff 00 b ffc10534 <_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; ffc10638: 38 60 00 00 li r3,0 ffc1063c: 4b ff fd 04 b ffc10340 <_Heap_Extend+0x70> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc10640: 40 8e fe f8 bne+ cr3,ffc10538 <_Heap_Extend+0x268> _Heap_Free_block( heap, extend_first_block ); ffc10644: 80 81 00 08 lwz r4,8(r1) ffc10648: 7f c3 f3 78 mr r3,r30 ffc1064c: 4b ff fc 49 bl ffc10294 <_Heap_Free_block> ffc10650: 4b ff fe e8 b ffc10538 <_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 ) { ffc10654: 2f 80 00 00 cmpwi cr7,r0,0 ffc10658: 41 be fe 90 beq- cr7,ffc104e8 <_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; ffc1065c: 7c 0b 00 50 subf r0,r11,r0 ffc10660: 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 = ffc10664: 90 0b 00 04 stw r0,4(r11) ffc10668: 4b ff fe 80 b ffc104e8 <_Heap_Extend+0x218> =============================================================================== ffc0fde0 <_Heap_Free>: ffc0fde0: 80 03 00 10 lwz r0,16(r3) return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc0fde4: 7c 69 1b 78 mr r9,r3 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 ffc0fde8: 81 63 00 20 lwz r11,32(r3) bool next_is_free = false; _Heap_Protection_block_check( heap, block ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; ffc0fdec: 38 60 00 00 li r3,0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0fdf0: 7d 44 03 96 divwu r10,r4,r0 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc0fdf4: 94 21 ff f0 stwu r1,-16(r1) ffc0fdf8: 93 e1 00 0c stw r31,12(r1) ffc0fdfc: 7d 4a 01 d6 mullw r10,r10,r0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc0fe00: 39 4a ff f8 addi r10,r10,-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; ffc0fe04: 7f 8a 58 40 cmplw cr7,r10,r11 ffc0fe08: 41 9c 01 24 blt- cr7,ffc0ff2c <_Heap_Free+0x14c> ffc0fe0c: 80 09 00 24 lwz r0,36(r9) ffc0fe10: 7f 8a 00 40 cmplw cr7,r10,r0 ffc0fe14: 41 9d 01 18 bgt- cr7,ffc0ff2c <_Heap_Free+0x14c> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0fe18: 80 ea 00 04 lwz r7,4(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; ffc0fe1c: 54 e6 00 3c rlwinm r6,r7,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); ffc0fe20: 7d 0a 32 14 add r8,r10,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; ffc0fe24: 7f 8b 40 40 cmplw cr7,r11,r8 ffc0fe28: 41 9d 01 04 bgt- cr7,ffc0ff2c <_Heap_Free+0x14c> <== NEVER TAKEN ffc0fe2c: 7f 80 40 40 cmplw cr7,r0,r8 ffc0fe30: 41 9c 00 fc blt- cr7,ffc0ff2c <_Heap_Free+0x14c> <== NEVER TAKEN ffc0fe34: 80 a8 00 04 lwz r5,4(r8) if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0fe38: 70 a4 00 01 andi. r4,r5,1 ffc0fe3c: 41 82 00 f0 beq- ffc0ff2c <_Heap_Free+0x14c> 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 )); ffc0fe40: 7f 80 40 00 cmpw cr7,r0,r8 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0fe44: 54 a4 00 3c rlwinm r4,r5,0,0,30 ffc0fe48: 38 a0 00 00 li r5,0 ffc0fe4c: 41 9e 00 18 beq- cr7,ffc0fe64 <_Heap_Free+0x84> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0fe50: 7c a8 22 14 add r5,r8,r4 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0fe54: 80 a5 00 04 lwz r5,4(r5) return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) ffc0fe58: 70 a3 00 01 andi. r3,r5,1 ffc0fe5c: 7c a0 00 26 mfcr r5 ffc0fe60: 54 a5 1f fe rlwinm r5,r5,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 ) ) { ffc0fe64: 70 e7 00 01 andi. r7,r7,1 ffc0fe68: 40 82 00 6c bne- ffc0fed4 <_Heap_Free+0xf4> uintptr_t const prev_size = block->prev_size; ffc0fe6c: 83 ea 00 00 lwz r31,0(r10) Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { _HAssert( false ); return( false ); ffc0fe70: 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); ffc0fe74: 7d 9f 50 50 subf r12,r31,r10 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0fe78: 7f 8b 60 40 cmplw cr7,r11,r12 ffc0fe7c: 41 9d 00 b0 bgt- cr7,ffc0ff2c <_Heap_Free+0x14c> <== NEVER TAKEN ffc0fe80: 7f 80 60 40 cmplw cr7,r0,r12 ffc0fe84: 7c e3 3b 78 mr r3,r7 ffc0fe88: 41 9c 00 a4 blt- cr7,ffc0ff2c <_Heap_Free+0x14c> <== 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; ffc0fe8c: 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) ) { ffc0fe90: 70 0b 00 01 andi. r11,r0,1 ffc0fe94: 41 82 00 98 beq- ffc0ff2c <_Heap_Free+0x14c> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc0fe98: 2f 85 00 00 cmpwi cr7,r5,0 ffc0fe9c: 41 9e 00 e8 beq- cr7,ffc0ff84 <_Heap_Free+0x1a4> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc0fea0: 80 e9 00 38 lwz r7,56(r9) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc0fea4: 7c 86 22 14 add r4,r6,r4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0fea8: 81 68 00 08 lwz r11,8(r8) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc0feac: 7f e4 fa 14 add r31,r4,r31 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0feb0: 81 48 00 0c lwz r10,12(r8) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0feb4: 63 e0 00 01 ori r0,r31,1 } 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; ffc0feb8: 39 07 ff ff addi r8,r7,-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; ffc0febc: 91 6a 00 08 stw r11,8(r10) next->prev = prev; ffc0fec0: 91 4b 00 0c stw r10,12(r11) ffc0fec4: 91 09 00 38 stw r8,56(r9) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0fec8: 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; ffc0fecc: 7f ec f9 2e stwx r31,r12,r31 ffc0fed0: 48 00 00 34 b ffc0ff04 <_Heap_Free+0x124> 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 */ ffc0fed4: 2f 85 00 00 cmpwi cr7,r5,0 ffc0fed8: 41 9e 00 60 beq- cr7,ffc0ff38 <_Heap_Free+0x158> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0fedc: 81 68 00 08 lwz r11,8(r8) 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; ffc0fee0: 7c 84 32 14 add r4,r4,r6 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0fee4: 81 08 00 0c lwz r8,12(r8) 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; ffc0fee8: 60 80 00 01 ori r0,r4,1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc0feec: 91 6a 00 08 stw r11,8(r10) new_block->prev = prev; ffc0fef0: 91 0a 00 0c stw r8,12(r10) next->prev = new_block; prev->next = new_block; ffc0fef4: 91 48 00 08 stw r10,8(r8) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc0fef8: 91 4b 00 0c stw r10,12(r11) ffc0fefc: 90 0a 00 04 stw r0,4(r10) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc0ff00: 7c 8a 21 2e stwx r4,r10,r4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0ff04: 81 69 00 40 lwz r11,64(r9) ++stats->frees; stats->free_size += block_size; return( true ); ffc0ff08: 38 60 00 01 li r3,1 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc0ff0c: 81 09 00 50 lwz r8,80(r9) stats->free_size += block_size; ffc0ff10: 81 49 00 30 lwz r10,48(r9) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0ff14: 39 6b ff ff addi r11,r11,-1 ++stats->frees; ffc0ff18: 38 08 00 01 addi r0,r8,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0ff1c: 91 69 00 40 stw r11,64(r9) ++stats->frees; stats->free_size += block_size; ffc0ff20: 7c ca 32 14 add r6,r10,r6 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc0ff24: 90 09 00 50 stw r0,80(r9) stats->free_size += block_size; ffc0ff28: 90 c9 00 30 stw r6,48(r9) return( true ); } ffc0ff2c: 83 e1 00 0c lwz r31,12(r1) ffc0ff30: 38 21 00 10 addi r1,r1,16 ffc0ff34: 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; ffc0ff38: 80 e9 00 38 lwz r7,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc0ff3c: 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; ffc0ff40: 38 07 00 01 addi r0,r7,1 ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; ffc0ff44: 91 2a 00 0c stw r9,12(r10) 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; ffc0ff48: 60 c7 00 01 ori r7,r6,1 ffc0ff4c: 90 ea 00 04 stw r7,4(r10) 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 ) { ffc0ff50: 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; ffc0ff54: 80 e8 00 04 lwz r7,4(r8) RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc0ff58: 81 69 00 08 lwz r11,8(r9) ffc0ff5c: 54 e7 00 3c rlwinm r7,r7,0,0,30 next_block->prev_size = block_size; ffc0ff60: 7c ca 31 2e stwx r6,r10,r6 new_block->next = next; ffc0ff64: 91 6a 00 08 stw r11,8(r10) } 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; ffc0ff68: 90 e8 00 04 stw r7,4(r8) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; ffc0ff6c: 91 4b 00 0c stw r10,12(r11) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; ffc0ff70: 91 49 00 08 stw r10,8(r9) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc0ff74: 90 09 00 38 stw r0,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc0ff78: 40 bd ff 8c ble- cr7,ffc0ff04 <_Heap_Free+0x124> stats->max_free_blocks = stats->free_blocks; ffc0ff7c: 90 09 00 3c stw r0,60(r9) ffc0ff80: 4b ff ff 84 b ffc0ff04 <_Heap_Free+0x124> 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; ffc0ff84: 7f e6 fa 14 add r31,r6,r31 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0ff88: 63 e0 00 01 ori r0,r31,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc0ff8c: 7f ea 31 2e stwx r31,r10,r6 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; ffc0ff90: 90 0c 00 04 stw r0,4(r12) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0ff94: 80 08 00 04 lwz r0,4(r8) ffc0ff98: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc0ff9c: 90 08 00 04 stw r0,4(r8) ffc0ffa0: 4b ff ff 64 b ffc0ff04 <_Heap_Free+0x124> =============================================================================== ffc0b500 <_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; ffc0b500: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc0b504: 94 21 ff 98 stwu r1,-104(r1) ffc0b508: 7c 08 02 a6 mflr r0 ffc0b50c: 92 e1 00 44 stw r23,68(r1) ffc0b510: 90 01 00 6c stw r0,108(r1) ffc0b514: 93 01 00 48 stw r24,72(r1) ffc0b518: 93 21 00 4c stw r25,76(r1) ffc0b51c: 7c 99 23 78 mr r25,r4 ffc0b520: 93 41 00 50 stw r26,80(r1) ffc0b524: 93 61 00 54 stw r27,84(r1) ffc0b528: 93 e1 00 64 stw r31,100(r1) ffc0b52c: 7c 7f 1b 78 mr r31,r3 ffc0b530: 91 c1 00 20 stw r14,32(r1) ffc0b534: 91 e1 00 24 stw r15,36(r1) ffc0b538: 92 01 00 28 stw r16,40(r1) ffc0b53c: 92 21 00 2c stw r17,44(r1) ffc0b540: 92 41 00 30 stw r18,48(r1) ffc0b544: 92 61 00 34 stw r19,52(r1) ffc0b548: 92 81 00 38 stw r20,56(r1) ffc0b54c: 92 a1 00 3c stw r21,60(r1) ffc0b550: 92 c1 00 40 stw r22,64(r1) ffc0b554: 93 81 00 58 stw r28,88(r1) ffc0b558: 93 a1 00 5c stw r29,92(r1) ffc0b55c: 93 c1 00 60 stw r30,96(r1) uintptr_t const page_size = heap->page_size; ffc0b560: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0b564: 83 03 00 14 lwz r24,20(r3) Heap_Block *const first_block = heap->first_block; ffc0b568: 83 43 00 20 lwz r26,32(r3) Heap_Block *const last_block = heap->last_block; ffc0b56c: 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; ffc0b570: 41 9e 00 7c beq- cr7,ffc0b5ec <_Heap_Walk+0xec> ffc0b574: 3d 20 ff c1 lis r9,-63 ffc0b578: 39 29 b4 00 addi r9,r9,-19456 ffc0b57c: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b580: 3d 20 00 00 lis r9,0 return true; ffc0b584: 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() ) ) { ffc0b588: 80 09 27 6c lwz r0,10092(r9) ffc0b58c: 2f 80 00 03 cmpwi cr7,r0,3 ffc0b590: 41 9e 00 7c beq- cr7,ffc0b60c <_Heap_Walk+0x10c> <== ALWAYS TAKEN block = next_block; } while ( block != first_block ); return true; } ffc0b594: 80 01 00 6c lwz r0,108(r1) ffc0b598: 81 c1 00 20 lwz r14,32(r1) ffc0b59c: 7c 08 03 a6 mtlr r0 ffc0b5a0: 81 e1 00 24 lwz r15,36(r1) ffc0b5a4: 82 01 00 28 lwz r16,40(r1) ffc0b5a8: 82 21 00 2c lwz r17,44(r1) ffc0b5ac: 82 41 00 30 lwz r18,48(r1) ffc0b5b0: 82 61 00 34 lwz r19,52(r1) ffc0b5b4: 82 81 00 38 lwz r20,56(r1) ffc0b5b8: 82 a1 00 3c lwz r21,60(r1) ffc0b5bc: 82 c1 00 40 lwz r22,64(r1) ffc0b5c0: 82 e1 00 44 lwz r23,68(r1) ffc0b5c4: 83 01 00 48 lwz r24,72(r1) ffc0b5c8: 83 21 00 4c lwz r25,76(r1) ffc0b5cc: 83 41 00 50 lwz r26,80(r1) ffc0b5d0: 83 61 00 54 lwz r27,84(r1) ffc0b5d4: 83 81 00 58 lwz r28,88(r1) ffc0b5d8: 83 a1 00 5c lwz r29,92(r1) ffc0b5dc: 83 c1 00 60 lwz r30,96(r1) ffc0b5e0: 83 e1 00 64 lwz r31,100(r1) ffc0b5e4: 38 21 00 68 addi r1,r1,104 ffc0b5e8: 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; ffc0b5ec: 3d 20 ff c1 lis r9,-63 ffc0b5f0: 39 29 b3 fc addi r9,r9,-19460 ffc0b5f4: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b5f8: 3d 20 00 00 lis r9,0 return true; ffc0b5fc: 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() ) ) { ffc0b600: 80 09 27 6c lwz r0,10092(r9) ffc0b604: 2f 80 00 03 cmpwi cr7,r0,3 ffc0b608: 40 9e ff 8c bne+ cr7,ffc0b594 <_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)( ffc0b60c: 80 1f 00 0c lwz r0,12(r31) ffc0b610: 3c a0 ff c2 lis r5,-62 ffc0b614: 81 1f 00 18 lwz r8,24(r31) ffc0b618: 7f 23 cb 78 mr r3,r25 ffc0b61c: 81 3f 00 1c lwz r9,28(r31) ffc0b620: 38 80 00 00 li r4,0 ffc0b624: 81 7f 00 08 lwz r11,8(r31) ffc0b628: 38 a5 a5 7c addi r5,r5,-23172 ffc0b62c: 90 01 00 10 stw r0,16(r1) ffc0b630: 7f 66 db 78 mr r6,r27 ffc0b634: 7f 07 c3 78 mr r7,r24 ffc0b638: 80 01 00 18 lwz r0,24(r1) ffc0b63c: 7f 4a d3 78 mr r10,r26 ffc0b640: 92 e1 00 08 stw r23,8(r1) ffc0b644: 7c 09 03 a6 mtctr r0 ffc0b648: 91 61 00 0c stw r11,12(r1) ffc0b64c: 4c c6 31 82 crclr 4*cr1+eq ffc0b650: 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 ) { ffc0b654: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0b658: 41 9e 00 ac beq- cr7,ffc0b704 <_Heap_Walk+0x204> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc0b65c: 73 67 00 07 andi. r7,r27,7 ffc0b660: 40 82 00 cc bne- ffc0b72c <_Heap_Walk+0x22c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b664: 7c 18 db 96 divwu r0,r24,r27 ffc0b668: 7c 00 d9 d6 mullw r0,r0,r27 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc0b66c: 7f 98 00 00 cmpw cr7,r24,r0 ffc0b670: 40 9e 00 e8 bne- cr7,ffc0b758 <_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; ffc0b674: 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; ffc0b678: 7d 20 db 96 divwu r9,r0,r27 ffc0b67c: 7d 29 d9 d6 mullw r9,r9,r27 ); return false; } if ( ffc0b680: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b684: 40 9e 01 00 bne- cr7,ffc0b784 <_Heap_Walk+0x284> block = next_block; } while ( block != first_block ); return true; } ffc0b688: 82 da 00 04 lwz r22,4(r26) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc0b68c: 72 c7 00 01 andi. r7,r22,1 ffc0b690: 41 82 01 64 beq- ffc0b7f4 <_Heap_Walk+0x2f4> - 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; ffc0b694: 81 37 00 04 lwz r9,4(r23) ffc0b698: 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); ffc0b69c: 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; ffc0b6a0: 80 09 00 04 lwz r0,4(r9) ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc0b6a4: 70 07 00 01 andi. r7,r0,1 ffc0b6a8: 41 82 00 34 beq- ffc0b6dc <_Heap_Walk+0x1dc> ); return false; } if ( ffc0b6ac: 7f 9a 48 00 cmpw cr7,r26,r9 ffc0b6b0: 41 9e 01 00 beq- cr7,ffc0b7b0 <_Heap_Walk+0x2b0> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( ffc0b6b4: 80 01 00 18 lwz r0,24(r1) <== NOT EXECUTED ffc0b6b8: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc0b6bc: 7f 23 cb 78 mr r3,r25 <== NOT EXECUTED ffc0b6c0: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc0b6c4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0b6c8: 38 a5 a6 e4 addi r5,r5,-22812 <== NOT EXECUTED ffc0b6cc: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0b6d0: 4e 80 04 21 bctrl <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b6d4: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0b6d8: 4b ff fe bc b ffc0b594 <_Heap_Walk+0x94> <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( ffc0b6dc: 80 01 00 18 lwz r0,24(r1) ffc0b6e0: 3c a0 ff c2 lis r5,-62 ffc0b6e4: 7f 23 cb 78 mr r3,r25 ffc0b6e8: 38 80 00 01 li r4,1 ffc0b6ec: 7c 09 03 a6 mtctr r0 ffc0b6f0: 38 a5 a6 cc addi r5,r5,-22836 ffc0b6f4: 4c c6 31 82 crclr 4*cr1+eq ffc0b6f8: 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; ffc0b6fc: 38 60 00 00 li r3,0 ffc0b700: 4b ff fe 94 b ffc0b594 <_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" ); ffc0b704: 80 01 00 18 lwz r0,24(r1) ffc0b708: 3c a0 ff c2 lis r5,-62 ffc0b70c: 7f 23 cb 78 mr r3,r25 ffc0b710: 38 80 00 01 li r4,1 ffc0b714: 7c 09 03 a6 mtctr r0 ffc0b718: 38 a5 a6 10 addi r5,r5,-23024 ffc0b71c: 4c c6 31 82 crclr 4*cr1+eq ffc0b720: 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; ffc0b724: 38 60 00 00 li r3,0 ffc0b728: 4b ff fe 6c b ffc0b594 <_Heap_Walk+0x94> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( ffc0b72c: 80 01 00 18 lwz r0,24(r1) ffc0b730: 3c a0 ff c2 lis r5,-62 ffc0b734: 7f 23 cb 78 mr r3,r25 ffc0b738: 38 80 00 01 li r4,1 ffc0b73c: 7c 09 03 a6 mtctr r0 ffc0b740: 38 a5 a6 24 addi r5,r5,-23004 ffc0b744: 7f 66 db 78 mr r6,r27 ffc0b748: 4c c6 31 82 crclr 4*cr1+eq ffc0b74c: 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; ffc0b750: 38 60 00 00 li r3,0 ffc0b754: 4b ff fe 40 b ffc0b594 <_Heap_Walk+0x94> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( ffc0b758: 80 01 00 18 lwz r0,24(r1) ffc0b75c: 3c a0 ff c2 lis r5,-62 ffc0b760: 7f 23 cb 78 mr r3,r25 ffc0b764: 38 80 00 01 li r4,1 ffc0b768: 7c 09 03 a6 mtctr r0 ffc0b76c: 38 a5 a6 44 addi r5,r5,-22972 ffc0b770: 7f 06 c3 78 mr r6,r24 ffc0b774: 4c c6 31 82 crclr 4*cr1+eq ffc0b778: 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; ffc0b77c: 38 60 00 00 li r3,0 ffc0b780: 4b ff fe 14 b ffc0b594 <_Heap_Walk+0x94> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc0b784: 80 01 00 18 lwz r0,24(r1) ffc0b788: 3c a0 ff c2 lis r5,-62 ffc0b78c: 7f 23 cb 78 mr r3,r25 ffc0b790: 38 80 00 01 li r4,1 ffc0b794: 7c 09 03 a6 mtctr r0 ffc0b798: 38 a5 a6 68 addi r5,r5,-22936 ffc0b79c: 7f 46 d3 78 mr r6,r26 ffc0b7a0: 4c c6 31 82 crclr 4*cr1+eq ffc0b7a4: 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; ffc0b7a8: 38 60 00 00 li r3,0 ffc0b7ac: 4b ff fd e8 b ffc0b594 <_Heap_Walk+0x94> block = next_block; } while ( block != first_block ); return true; } ffc0b7b0: 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; ffc0b7b4: 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 ) { ffc0b7b8: 7f 9f 30 00 cmpw cr7,r31,r6 ffc0b7bc: 41 9e 01 28 beq- cr7,ffc0b8e4 <_Heap_Walk+0x3e4> block = next_block; } while ( block != first_block ); return true; } ffc0b7c0: 80 1f 00 20 lwz r0,32(r31) 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; ffc0b7c4: 7f 80 30 40 cmplw cr7,r0,r6 ffc0b7c8: 40 9d 00 54 ble- cr7,ffc0b81c <_Heap_Walk+0x31c> <== ALWAYS TAKEN const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( ffc0b7cc: 80 01 00 18 lwz r0,24(r1) ffc0b7d0: 3c a0 ff c2 lis r5,-62 ffc0b7d4: 7f 23 cb 78 mr r3,r25 ffc0b7d8: 38 80 00 01 li r4,1 ffc0b7dc: 7c 09 03 a6 mtctr r0 ffc0b7e0: 38 a5 a7 14 addi r5,r5,-22764 ffc0b7e4: 4c c6 31 82 crclr 4*cr1+eq ffc0b7e8: 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; ffc0b7ec: 38 60 00 00 li r3,0 ffc0b7f0: 4b ff fd a4 b ffc0b594 <_Heap_Walk+0x94> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0b7f4: 80 01 00 18 lwz r0,24(r1) ffc0b7f8: 3c a0 ff c2 lis r5,-62 ffc0b7fc: 7f 23 cb 78 mr r3,r25 ffc0b800: 38 80 00 01 li r4,1 ffc0b804: 7c 09 03 a6 mtctr r0 ffc0b808: 38 a5 a6 9c addi r5,r5,-22884 ffc0b80c: 4c c6 31 82 crclr 4*cr1+eq ffc0b810: 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; ffc0b814: 38 60 00 00 li r3,0 ffc0b818: 4b ff fd 7c b ffc0b594 <_Heap_Walk+0x94> ffc0b81c: 81 5f 00 24 lwz r10,36(r31) ffc0b820: 7f 8a 30 40 cmplw cr7,r10,r6 ffc0b824: 41 bc ff a8 blt- cr7,ffc0b7cc <_Heap_Walk+0x2cc> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0b828: 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; ffc0b82c: 7d 69 43 96 divwu r11,r9,r8 ffc0b830: 7d 6b 41 d6 mullw r11,r11,r8 ); return false; } if ( ffc0b834: 7f 89 58 00 cmpw cr7,r9,r11 ffc0b838: 40 9e 03 a8 bne- cr7,ffc0bbe0 <_Heap_Walk+0x6e0> <== 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; ffc0b83c: 81 26 00 04 lwz r9,4(r6) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b840: 7f eb fb 78 mr r11,r31 ffc0b844: 7c c5 33 78 mr r5,r6 ffc0b848: 55 29 00 3c rlwinm r9,r9,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0b84c: 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; ffc0b850: 81 29 00 04 lwz r9,4(r9) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b854: 71 27 00 01 andi. r7,r9,1 ffc0b858: 41 a2 00 58 beq+ ffc0b8b0 <_Heap_Walk+0x3b0> <== ALWAYS TAKEN ffc0b85c: 48 00 03 ac b ffc0bc08 <_Heap_Walk+0x708> <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; ffc0b860: 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 ) { ffc0b864: 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; ffc0b868: 7f 00 30 40 cmplw cr6,r0,r6 ffc0b86c: 7c 86 50 40 cmplw cr1,r6,r10 ffc0b870: 41 9e 00 78 beq- cr7,ffc0b8e8 <_Heap_Walk+0x3e8> ffc0b874: 41 b9 ff 58 bgt- cr6,ffc0b7cc <_Heap_Walk+0x2cc> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0b878: 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; ffc0b87c: 41 a5 ff 50 bgt- cr1,ffc0b7cc <_Heap_Walk+0x2cc> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b880: 7c e9 43 96 divwu r7,r9,r8 ffc0b884: 7c e7 41 d6 mullw r7,r7,r8 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b888: 7c ab 2b 78 mr r11,r5 ); return false; } if ( ffc0b88c: 7f 89 38 00 cmpw cr7,r9,r7 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b890: 7c c5 33 78 mr r5,r6 ); return false; } if ( ffc0b894: 40 9e 03 4c bne- cr7,ffc0bbe0 <_Heap_Walk+0x6e0> - 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; ffc0b898: 81 26 00 04 lwz r9,4(r6) ffc0b89c: 55 29 00 3c rlwinm r9,r9,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0b8a0: 7d 29 32 14 add r9,r9,r6 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; ffc0b8a4: 81 29 00 04 lwz r9,4(r9) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b8a8: 71 27 00 01 andi. r7,r9,1 ffc0b8ac: 40 82 03 5c bne- ffc0bc08 <_Heap_Walk+0x708> ); return false; } if ( free_block->prev != prev_block ) { ffc0b8b0: 80 e6 00 0c lwz r7,12(r6) ffc0b8b4: 7f 87 58 00 cmpw cr7,r7,r11 ffc0b8b8: 41 9e ff a8 beq+ cr7,ffc0b860 <_Heap_Walk+0x360> (*printer)( ffc0b8bc: 80 01 00 18 lwz r0,24(r1) ffc0b8c0: 3c a0 ff c2 lis r5,-62 ffc0b8c4: 7f 23 cb 78 mr r3,r25 ffc0b8c8: 38 80 00 01 li r4,1 ffc0b8cc: 7c 09 03 a6 mtctr r0 ffc0b8d0: 38 a5 a7 80 addi r5,r5,-22656 ffc0b8d4: 4c c6 31 82 crclr 4*cr1+eq ffc0b8d8: 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; ffc0b8dc: 38 60 00 00 li r3,0 ffc0b8e0: 4b ff fc b4 b ffc0b594 <_Heap_Walk+0x94> 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 ) { ffc0b8e4: 80 1f 00 20 lwz r0,32(r31) "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b8e8: 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)( ffc0b8ec: 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)( ffc0b8f0: 3e 40 ff c2 lis r18,-62 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b8f4: 7f 5d d3 78 mr r29,r26 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b8f8: 3a 73 a9 30 addi r19,r19,-22224 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc0b8fc: 3a 94 a9 18 addi r20,r20,-22248 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)( ffc0b900: 3a 52 a8 74 addi r18,r18,-22412 ffc0b904: 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)" : "") ffc0b908: 3e a0 ff c2 lis r21,-62 ffc0b90c: 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)( ffc0b910: 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)" : ""), ffc0b914: 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; ffc0b918: 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); ffc0b91c: 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; ffc0b920: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0b924: 40 9d 00 34 ble- cr7,ffc0b958 <_Heap_Walk+0x458> <== 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)( ffc0b928: 3c a0 ff c2 lis r5,-62 ffc0b92c: 7f 23 cb 78 mr r3,r25 ffc0b930: 38 80 00 01 li r4,1 ffc0b934: 38 a5 a7 b4 addi r5,r5,-22604 return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0b938: 80 01 00 18 lwz r0,24(r1) ffc0b93c: 7f a6 eb 78 mr r6,r29 ffc0b940: 7f c7 f3 78 mr r7,r30 ffc0b944: 7c 09 03 a6 mtctr r0 ffc0b948: 4c c6 31 82 crclr 4*cr1+eq ffc0b94c: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0b950: 38 60 00 00 li r3,0 ffc0b954: 4b ff fc 40 b ffc0b594 <_Heap_Walk+0x94> ffc0b958: 80 1f 00 24 lwz r0,36(r31) ffc0b95c: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0b960: 41 bc ff c8 blt- cr7,ffc0b928 <_Heap_Walk+0x428> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b964: 7d 3c db 96 divwu r9,r28,r27 ffc0b968: 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; ffc0b96c: 7f a0 ba 78 xor r0,r29,r23 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0b970: 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; ffc0b974: 7c 00 00 34 cntlzw r0,r0 ffc0b978: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0b97c: 68 00 00 01 xori r0,r0,1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0b980: 41 9e 00 0c beq- cr7,ffc0b98c <_Heap_Walk+0x48c> ffc0b984: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b988: 40 9e 01 e0 bne- cr7,ffc0bb68 <_Heap_Walk+0x668> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { ffc0b98c: 7f 98 e0 40 cmplw cr7,r24,r28 ffc0b990: 40 9d 00 0c ble- cr7,ffc0b99c <_Heap_Walk+0x49c> ffc0b994: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b998: 40 9e 02 00 bne- cr7,ffc0bb98 <_Heap_Walk+0x698> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { ffc0b99c: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0b9a0: 41 9c 00 0c blt- cr7,ffc0b9ac <_Heap_Walk+0x4ac> ffc0b9a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b9a8: 40 9e 02 24 bne- cr7,ffc0bbcc <_Heap_Walk+0x6cc> 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; ffc0b9ac: 80 1e 00 04 lwz r0,4(r30) ffc0b9b0: 56 d6 07 fe clrlwi r22,r22,31 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0b9b4: 70 07 00 01 andi. r7,r0,1 ffc0b9b8: 41 82 00 74 beq- ffc0ba2c <_Heap_Walk+0x52c> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { ffc0b9bc: 2f 96 00 00 cmpwi cr7,r22,0 ffc0b9c0: 41 9e 00 40 beq- cr7,ffc0ba00 <_Heap_Walk+0x500> (*printer)( ffc0b9c4: 80 01 00 18 lwz r0,24(r1) ffc0b9c8: 7f 23 cb 78 mr r3,r25 ffc0b9cc: 38 80 00 00 li r4,0 ffc0b9d0: 7e 85 a3 78 mr r5,r20 ffc0b9d4: 7c 09 03 a6 mtctr r0 ffc0b9d8: 7f a6 eb 78 mr r6,r29 ffc0b9dc: 7f 87 e3 78 mr r7,r28 ffc0b9e0: 4c c6 31 82 crclr 4*cr1+eq ffc0b9e4: 4e 80 04 21 bctrl block->prev_size ); } block = next_block; } while ( block != first_block ); ffc0b9e8: 7f 9a f0 00 cmpw cr7,r26,r30 ffc0b9ec: 41 9e 01 0c beq- cr7,ffc0baf8 <_Heap_Walk+0x5f8> ffc0b9f0: 82 de 00 04 lwz r22,4(r30) ffc0b9f4: 7f dd f3 78 mr r29,r30 ffc0b9f8: 80 1f 00 20 lwz r0,32(r31) ffc0b9fc: 4b ff ff 1c b ffc0b918 <_Heap_Walk+0x418> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0ba00: 80 01 00 18 lwz r0,24(r1) ffc0ba04: 7f a6 eb 78 mr r6,r29 ffc0ba08: 7f 23 cb 78 mr r3,r25 ffc0ba0c: 81 1d 00 00 lwz r8,0(r29) ffc0ba10: 38 80 00 00 li r4,0 ffc0ba14: 7c 09 03 a6 mtctr r0 ffc0ba18: 7e 65 9b 78 mr r5,r19 ffc0ba1c: 7f 87 e3 78 mr r7,r28 ffc0ba20: 4c c6 31 82 crclr 4*cr1+eq ffc0ba24: 4e 80 04 21 bctrl ffc0ba28: 4b ff ff c0 b ffc0b9e8 <_Heap_Walk+0x4e8> 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 ? ffc0ba2c: 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)( ffc0ba30: 81 3f 00 08 lwz r9,8(r31) block = next_block; } while ( block != first_block ); return true; } ffc0ba34: 80 1f 00 0c lwz r0,12(r31) 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)( ffc0ba38: 7f 89 40 00 cmpw cr7,r9,r8 ffc0ba3c: 41 9e 01 00 beq- cr7,ffc0bb3c <_Heap_Walk+0x63c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0ba40: 7f 9f 40 00 cmpw cr7,r31,r8 ffc0ba44: 41 9e 01 08 beq- cr7,ffc0bb4c <_Heap_Walk+0x64c> ffc0ba48: 39 35 a8 e4 addi r9,r21,-22300 block->next, block->next == last_free_block ? ffc0ba4c: 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)( ffc0ba50: 7f 80 50 00 cmpw cr7,r0,r10 ffc0ba54: 41 9e 00 e0 beq- cr7,ffc0bb34 <_Heap_Walk+0x634> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0ba58: 7f 9f 50 00 cmpw cr7,r31,r10 ffc0ba5c: 41 9e 00 e8 beq- cr7,ffc0bb44 <_Heap_Walk+0x644> ffc0ba60: 38 15 a8 e4 addi r0,r21,-22300 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)( ffc0ba64: 90 01 00 08 stw r0,8(r1) ffc0ba68: 7f 23 cb 78 mr r3,r25 ffc0ba6c: 38 80 00 00 li r4,0 ffc0ba70: 80 01 00 18 lwz r0,24(r1) ffc0ba74: 7e 45 93 78 mr r5,r18 ffc0ba78: 7f a6 eb 78 mr r6,r29 ffc0ba7c: 7f 87 e3 78 mr r7,r28 ffc0ba80: 7c 09 03 a6 mtctr r0 ffc0ba84: 4c c6 31 82 crclr 4*cr1+eq ffc0ba88: 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 ) { ffc0ba8c: 81 1e 00 00 lwz r8,0(r30) ffc0ba90: 7f 9c 40 00 cmpw cr7,r28,r8 ffc0ba94: 40 9e 00 6c bne- cr7,ffc0bb00 <_Heap_Walk+0x600> ); return false; } if ( !prev_used ) { ffc0ba98: 2f 96 00 00 cmpwi cr7,r22,0 ffc0ba9c: 41 9e 00 b8 beq- cr7,ffc0bb54 <_Heap_Walk+0x654> block = next_block; } while ( block != first_block ); return true; } ffc0baa0: 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 ) { ffc0baa4: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0baa8: 41 9e 00 24 beq- cr7,ffc0bacc <_Heap_Walk+0x5cc> <== NEVER TAKEN if ( free_block == block ) { ffc0baac: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0bab0: 40 be 00 0c bne+ cr7,ffc0babc <_Heap_Walk+0x5bc> ffc0bab4: 4b ff ff 34 b ffc0b9e8 <_Heap_Walk+0x4e8> ffc0bab8: 41 ba ff 30 beq- cr6,ffc0b9e8 <_Heap_Walk+0x4e8> return true; } free_block = free_block->next; ffc0babc: 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 ) { ffc0bac0: 7f 9f 48 00 cmpw cr7,r31,r9 if ( free_block == block ) { ffc0bac4: 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 ) { ffc0bac8: 40 9e ff f0 bne+ cr7,ffc0bab8 <_Heap_Walk+0x5b8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0bacc: 3c a0 ff c2 lis r5,-62 ffc0bad0: 7f 23 cb 78 mr r3,r25 ffc0bad4: 38 80 00 01 li r4,1 ffc0bad8: 38 a5 a9 58 addi r5,r5,-22184 ffc0badc: 80 01 00 18 lwz r0,24(r1) ffc0bae0: 7f a6 eb 78 mr r6,r29 ffc0bae4: 7c 09 03 a6 mtctr r0 ffc0bae8: 4c c6 31 82 crclr 4*cr1+eq ffc0baec: 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; ffc0baf0: 38 60 00 00 li r3,0 ffc0baf4: 4b ff fa a0 b ffc0b594 <_Heap_Walk+0x94> } block = next_block; } while ( block != first_block ); return true; ffc0baf8: 38 60 00 01 li r3,1 ffc0bafc: 4b ff fa 98 b ffc0b594 <_Heap_Walk+0x94> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( ffc0bb00: 80 01 00 18 lwz r0,24(r1) ffc0bb04: 3c a0 ff c2 lis r5,-62 ffc0bb08: 7f 23 cb 78 mr r3,r25 ffc0bb0c: 38 80 00 01 li r4,1 ffc0bb10: 7c 09 03 a6 mtctr r0 ffc0bb14: 38 a5 a8 ac addi r5,r5,-22356 ffc0bb18: 7f a6 eb 78 mr r6,r29 ffc0bb1c: 7f 87 e3 78 mr r7,r28 ffc0bb20: 7f c9 f3 78 mr r9,r30 ffc0bb24: 4c c6 31 82 crclr 4*cr1+eq ffc0bb28: 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; ffc0bb2c: 38 60 00 00 li r3,0 ffc0bb30: 4b ff fa 64 b ffc0b594 <_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)( ffc0bb34: 38 11 a5 60 addi r0,r17,-23200 ffc0bb38: 4b ff ff 2c b ffc0ba64 <_Heap_Walk+0x564> ffc0bb3c: 39 30 a5 44 addi r9,r16,-23228 ffc0bb40: 4b ff ff 0c b ffc0ba4c <_Heap_Walk+0x54c> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0bb44: 38 0f a5 70 addi r0,r15,-23184 ffc0bb48: 4b ff ff 1c b ffc0ba64 <_Heap_Walk+0x564> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0bb4c: 39 2e a5 54 addi r9,r14,-23212 ffc0bb50: 4b ff fe fc b ffc0ba4c <_Heap_Walk+0x54c> return false; } if ( !prev_used ) { (*printer)( ffc0bb54: 3c a0 ff c2 lis r5,-62 ffc0bb58: 7f 23 cb 78 mr r3,r25 ffc0bb5c: 38 80 00 01 li r4,1 ffc0bb60: 38 a5 a8 e8 addi r5,r5,-22296 ffc0bb64: 4b ff ff 78 b ffc0badc <_Heap_Walk+0x5dc> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( ffc0bb68: 80 01 00 18 lwz r0,24(r1) ffc0bb6c: 3c a0 ff c2 lis r5,-62 ffc0bb70: 7f 23 cb 78 mr r3,r25 ffc0bb74: 38 80 00 01 li r4,1 ffc0bb78: 7c 09 03 a6 mtctr r0 ffc0bb7c: 38 a5 a7 e4 addi r5,r5,-22556 ffc0bb80: 7f a6 eb 78 mr r6,r29 ffc0bb84: 7f 87 e3 78 mr r7,r28 ffc0bb88: 4c c6 31 82 crclr 4*cr1+eq ffc0bb8c: 4e 80 04 21 bctrl "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; ffc0bb90: 38 60 00 00 li r3,0 ffc0bb94: 4b ff fa 00 b ffc0b594 <_Heap_Walk+0x94> } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( ffc0bb98: 80 01 00 18 lwz r0,24(r1) ffc0bb9c: 3c a0 ff c2 lis r5,-62 ffc0bba0: 7f 23 cb 78 mr r3,r25 ffc0bba4: 38 80 00 01 li r4,1 ffc0bba8: 7c 09 03 a6 mtctr r0 ffc0bbac: 38 a5 a8 14 addi r5,r5,-22508 ffc0bbb0: 7f a6 eb 78 mr r6,r29 ffc0bbb4: 7f 87 e3 78 mr r7,r28 ffc0bbb8: 7f 08 c3 78 mr r8,r24 ffc0bbbc: 4c c6 31 82 crclr 4*cr1+eq ffc0bbc0: 4e 80 04 21 bctrl block, block_size, min_block_size ); return false; ffc0bbc4: 38 60 00 00 li r3,0 ffc0bbc8: 4b ff f9 cc b ffc0b594 <_Heap_Walk+0x94> } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0bbcc: 3c a0 ff c2 lis r5,-62 ffc0bbd0: 7f 23 cb 78 mr r3,r25 ffc0bbd4: 38 80 00 01 li r4,1 ffc0bbd8: 38 a5 a8 40 addi r5,r5,-22464 ffc0bbdc: 4b ff fd 5c b ffc0b938 <_Heap_Walk+0x438> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc0bbe0: 80 01 00 18 lwz r0,24(r1) ffc0bbe4: 3c a0 ff c2 lis r5,-62 ffc0bbe8: 7f 23 cb 78 mr r3,r25 ffc0bbec: 38 80 00 01 li r4,1 ffc0bbf0: 7c 09 03 a6 mtctr r0 ffc0bbf4: 38 a5 a7 34 addi r5,r5,-22732 ffc0bbf8: 4c c6 31 82 crclr 4*cr1+eq ffc0bbfc: 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; ffc0bc00: 38 60 00 00 li r3,0 ffc0bc04: 4b ff f9 90 b ffc0b594 <_Heap_Walk+0x94> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( ffc0bc08: 80 01 00 18 lwz r0,24(r1) ffc0bc0c: 3c a0 ff c2 lis r5,-62 ffc0bc10: 7f 23 cb 78 mr r3,r25 ffc0bc14: 38 80 00 01 li r4,1 ffc0bc18: 7c 09 03 a6 mtctr r0 ffc0bc1c: 38 a5 a7 64 addi r5,r5,-22684 ffc0bc20: 4c c6 31 82 crclr 4*cr1+eq ffc0bc24: 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; ffc0bc28: 38 60 00 00 li r3,0 ffc0bc2c: 4b ff f9 68 b ffc0b594 <_Heap_Walk+0x94> =============================================================================== ffc0b400 <_Heap_Walk_print>: static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b400: 94 21 ff 88 stwu r1,-120(r1) ffc0b404: 7c 08 02 a6 mflr r0 ffc0b408: 93 e1 00 74 stw r31,116(r1) ffc0b40c: 90 01 00 7c stw r0,124(r1) ffc0b410: 7c 60 1b 78 mr r0,r3 ffc0b414: 90 c1 00 1c stw r6,28(r1) ffc0b418: 90 e1 00 20 stw r7,32(r1) ffc0b41c: 91 01 00 24 stw r8,36(r1) ffc0b420: 91 21 00 28 stw r9,40(r1) ffc0b424: 91 41 00 2c stw r10,44(r1) ffc0b428: 40 86 00 24 bne- cr1,ffc0b44c <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN ffc0b42c: d8 21 00 30 stfd f1,48(r1) ffc0b430: d8 41 00 38 stfd f2,56(r1) ffc0b434: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0b438: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0b43c: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0b440: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0b444: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0b448: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0b44c: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b450: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc0b454: 40 9e 00 58 bne- cr7,ffc0b4ac <_Heap_Walk_print+0xac> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); ffc0b458: 3c 60 ff c2 lis r3,-62 ffc0b45c: 7c 04 03 78 mr r4,r0 ffc0b460: 38 63 a5 38 addi r3,r3,-23240 ffc0b464: 4c c6 31 82 crclr 4*cr1+eq ffc0b468: 4b ff b1 89 bl ffc065f0 } va_start( ap, fmt ); ffc0b46c: 38 00 00 03 li r0,3 ffc0b470: 98 01 00 08 stb r0,8(r1) ffc0b474: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b478: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b47c: 98 01 00 09 stb r0,9(r1) ffc0b480: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b484: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b488: 90 01 00 0c stw r0,12(r1) ffc0b48c: 38 01 00 10 addi r0,r1,16 ffc0b490: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b494: 4b ff d5 59 bl ffc089ec va_end( ap ); } ffc0b498: 80 01 00 7c lwz r0,124(r1) ffc0b49c: 83 e1 00 74 lwz r31,116(r1) ffc0b4a0: 38 21 00 78 addi r1,r1,120 ffc0b4a4: 7c 08 03 a6 mtlr r0 ffc0b4a8: 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 ); ffc0b4ac: 3c 60 ff c2 lis r3,-62 ffc0b4b0: 7c 04 03 78 mr r4,r0 ffc0b4b4: 38 63 a5 2c addi r3,r3,-23252 ffc0b4b8: 4c c6 31 82 crclr 4*cr1+eq ffc0b4bc: 4b ff b1 35 bl ffc065f0 } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b4c0: 38 00 00 03 li r0,3 ffc0b4c4: 98 01 00 08 stb r0,8(r1) ffc0b4c8: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b4cc: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b4d0: 98 01 00 09 stb r0,9(r1) ffc0b4d4: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b4d8: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b4dc: 90 01 00 0c stw r0,12(r1) ffc0b4e0: 38 01 00 10 addi r0,r1,16 ffc0b4e4: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b4e8: 4b ff d5 05 bl ffc089ec va_end( ap ); } ffc0b4ec: 80 01 00 7c lwz r0,124(r1) ffc0b4f0: 83 e1 00 74 lwz r31,116(r1) ffc0b4f4: 38 21 00 78 addi r1,r1,120 ffc0b4f8: 7c 08 03 a6 mtlr r0 ffc0b4fc: 4e 80 00 20 blr =============================================================================== ffc09934 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09934: 94 21 ff f0 stwu r1,-16(r1) ffc09938: 7c 08 02 a6 mflr r0 ffc0993c: 93 c1 00 08 stw r30,8(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09940: 3f c0 00 00 lis r30,0 * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09944: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09948: 80 1e 27 7c lwz r0,10108(r30) * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc0994c: 93 e1 00 0c stw r31,12(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09950: 2f 80 00 00 cmpwi cr7,r0,0 ffc09954: 41 9e 00 2c beq- cr7,ffc09980 <_IO_Initialize_all_drivers+0x4c><== NEVER TAKEN ffc09958: 3b e0 00 00 li r31,0 ffc0995c: 3b de 27 7c addi r30,r30,10108 (void) rtems_io_initialize( major, 0, NULL ); ffc09960: 7f e3 fb 78 mr r3,r31 ffc09964: 38 80 00 00 li r4,0 ffc09968: 38 a0 00 00 li r5,0 ffc0996c: 48 00 5f bd bl ffc0f928 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09970: 80 1e 00 00 lwz r0,0(r30) ffc09974: 3b ff 00 01 addi r31,r31,1 ffc09978: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0997c: 41 9d ff e4 bgt+ cr7,ffc09960 <_IO_Initialize_all_drivers+0x2c> (void) rtems_io_initialize( major, 0, NULL ); } ffc09980: 80 01 00 14 lwz r0,20(r1) ffc09984: 83 c1 00 08 lwz r30,8(r1) ffc09988: 7c 08 03 a6 mtlr r0 ffc0998c: 83 e1 00 0c lwz r31,12(r1) ffc09990: 38 21 00 10 addi r1,r1,16 ffc09994: 4e 80 00 20 blr =============================================================================== ffc09824 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { ffc09824: 94 21 ff e0 stwu r1,-32(r1) ffc09828: 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; ffc0982c: 3d 20 00 00 lis r9,0 * workspace. * */ void _IO_Manager_initialization(void) { ffc09830: 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; ffc09834: 39 29 20 a0 addi r9,r9,8352 * workspace. * */ void _IO_Manager_initialization(void) { ffc09838: 93 a1 00 14 stw r29,20(r1) ffc0983c: 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; ffc09840: 83 a9 00 30 lwz r29,48(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; ffc09844: 83 c9 00 34 lwz r30,52(r9) * workspace. * */ void _IO_Manager_initialization(void) { ffc09848: 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 ) ffc0984c: 7f 9e e8 40 cmplw cr7,r30,r29 * workspace. * */ void _IO_Manager_initialization(void) { ffc09850: 93 61 00 0c stw r27,12(r1) ffc09854: 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; ffc09858: 83 e9 00 38 lwz r31,56(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 ) ffc0985c: 40 9c 00 a4 bge- cr7,ffc09900 <_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 ) ffc09860: 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( ffc09864: 7f 63 db 78 mr r3,r27 ffc09868: 48 00 3d ed bl ffc0d654 <_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 *) ffc0986c: 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; ffc09870: 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 *) ffc09874: 90 7c 27 80 stw r3,10112(r28) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc09878: 38 80 00 00 li r4,0 ffc0987c: 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; ffc09880: 93 a9 27 7c stw r29,10108(r9) memset( ffc09884: 48 00 98 19 bl ffc1309c _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc09888: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0988c: 41 9e 00 50 beq- cr7,ffc098dc <_IO_Manager_initialization+0xb8><== NEVER TAKEN ffc09890: 7f c9 03 a6 mtctr r30 ffc09894: 81 1c 27 80 lwz r8,10112(r28) ffc09898: 39 40 00 00 li r10,0 _IO_Driver_address_table[index] = driver_table[index]; ffc0989c: 7f e9 fb 78 mr r9,r31 ffc098a0: 7c a9 50 6e lwzux r5,r9,r10 ffc098a4: 7d 68 52 14 add r11,r8,r10 ffc098a8: 80 e9 00 08 lwz r7,8(r9) ffc098ac: 80 09 00 0c lwz r0,12(r9) ffc098b0: 80 c9 00 04 lwz r6,4(r9) ffc098b4: 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++ ) ffc098b8: 39 4a 00 18 addi r10,r10,24 _IO_Driver_address_table[index] = driver_table[index]; ffc098bc: 90 cb 00 04 stw r6,4(r11) ffc098c0: 90 eb 00 08 stw r7,8(r11) ffc098c4: 90 0b 00 0c stw r0,12(r11) ffc098c8: 80 e9 00 10 lwz r7,16(r9) ffc098cc: 80 09 00 14 lwz r0,20(r9) ffc098d0: 90 eb 00 10 stw r7,16(r11) ffc098d4: 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++ ) ffc098d8: 42 00 ff c4 bdnz+ ffc0989c <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; } ffc098dc: 80 01 00 24 lwz r0,36(r1) ffc098e0: 83 61 00 0c lwz r27,12(r1) ffc098e4: 7c 08 03 a6 mtlr r0 ffc098e8: 83 81 00 10 lwz r28,16(r1) ffc098ec: 83 a1 00 14 lwz r29,20(r1) ffc098f0: 83 c1 00 18 lwz r30,24(r1) ffc098f4: 83 e1 00 1c lwz r31,28(r1) ffc098f8: 38 21 00 20 addi r1,r1,32 ffc098fc: 4e 80 00 20 blr ffc09900: 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; ffc09904: 3d 20 00 00 lis r9,0 ffc09908: 93 e9 27 80 stw r31,10112(r9) _IO_Number_of_drivers = number_of_drivers; ffc0990c: 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]; } ffc09910: 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; ffc09914: 93 c9 27 7c stw r30,10108(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]; } ffc09918: 83 61 00 0c lwz r27,12(r1) ffc0991c: 83 81 00 10 lwz r28,16(r1) ffc09920: 83 a1 00 14 lwz r29,20(r1) ffc09924: 83 c1 00 18 lwz r30,24(r1) ffc09928: 83 e1 00 1c lwz r31,28(r1) ffc0992c: 38 21 00 20 addi r1,r1,32 ffc09930: 4e 80 00 20 blr =============================================================================== ffc0a818 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0a818: 94 21 ff f0 stwu r1,-16(r1) ffc0a81c: 7c 08 02 a6 mflr r0 _Internal_errors_What_happened.the_source = the_source; ffc0a820: 3d 60 00 00 lis r11,0 ffc0a824: 39 2b 2c 50 addi r9,r11,11344 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0a828: 90 01 00 14 stw r0,20(r1) ffc0a82c: 93 e1 00 0c stw r31,12(r1) ffc0a830: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc0a834: 98 89 00 04 stb r4,4(r9) _Internal_errors_What_happened.the_error = the_error; ffc0a838: 90 a9 00 08 stw r5,8(r9) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; ffc0a83c: 90 6b 2c 50 stw r3,11344(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 ); ffc0a840: 48 00 26 e9 bl ffc0cf28 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc0a844: 38 00 00 05 li r0,5 ffc0a848: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc0a84c: 7f e3 fb 78 mr r3,r31 ffc0a850: 90 09 27 6c stw r0,10092(r9) ffc0a854: 4b ff 92 f5 bl ffc03b48 <_BSP_Fatal_error> ffc0a858: 48 00 00 00 b ffc0a858 <_Internal_error_Occurred+0x40><== NOT EXECUTED =============================================================================== ffc0a870 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0a870: 94 21 ff f0 stwu r1,-16(r1) ffc0a874: 7c 08 02 a6 mflr r0 ffc0a878: 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 ) ffc0a87c: 80 03 00 18 lwz r0,24(r3) */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0a880: 93 e1 00 0c stw r31,12(r1) ffc0a884: 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 ) ffc0a888: 2f 80 00 00 cmpwi cr7,r0,0 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0a88c: 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; ffc0a890: 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 ) ffc0a894: 40 9e 00 1c bne- cr7,ffc0a8b0 <_Objects_Allocate+0x40> <== ALWAYS TAKEN ); } #endif return the_object; } ffc0a898: 80 01 00 14 lwz r0,20(r1) ffc0a89c: 83 c1 00 08 lwz r30,8(r1) ffc0a8a0: 7c 08 03 a6 mtlr r0 ffc0a8a4: 83 e1 00 0c lwz r31,12(r1) ffc0a8a8: 38 21 00 10 addi r1,r1,16 ffc0a8ac: 4e 80 00 20 blr /* * 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 ); ffc0a8b0: 3b df 00 20 addi r30,r31,32 ffc0a8b4: 7f c3 f3 78 mr r3,r30 ffc0a8b8: 4b ff f4 09 bl ffc09cc0 <_Chain_Get> if ( information->auto_extend ) { ffc0a8bc: 88 1f 00 12 lbz r0,18(r31) ffc0a8c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a8c4: 41 be ff d4 beq- cr7,ffc0a898 <_Objects_Allocate+0x28> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc0a8c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a8cc: 41 9e 00 50 beq- cr7,ffc0a91c <_Objects_Allocate+0xac> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0a8d0: a1 63 00 0a lhz r11,10(r3) ffc0a8d4: a0 1f 00 0a lhz r0,10(r31) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc0a8d8: a1 3f 00 14 lhz r9,20(r31) } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0a8dc: 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--; ffc0a8e0: 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; ffc0a8e4: 7c 00 4b 96 divwu r0,r0,r9 information->inactive_per_block[ block ]--; ffc0a8e8: 81 3f 00 30 lwz r9,48(r31) ); } #endif return the_object; } ffc0a8ec: 83 c1 00 08 lwz r30,8(r1) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc0a8f0: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0a8f4: 7d 49 00 2e lwzx r10,r9,r0 information->inactive--; ffc0a8f8: 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 ]--; ffc0a8fc: 39 4a ff ff addi r10,r10,-1 ffc0a900: 7d 49 01 2e stwx r10,r9,r0 ); } #endif return the_object; } ffc0a904: 80 01 00 14 lwz r0,20(r1) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; ffc0a908: b1 7f 00 2c sth r11,44(r31) ); } #endif return the_object; } ffc0a90c: 7c 08 03 a6 mtlr r0 ffc0a910: 83 e1 00 0c lwz r31,12(r1) ffc0a914: 38 21 00 10 addi r1,r1,16 ffc0a918: 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 ); ffc0a91c: 7f e3 fb 78 mr r3,r31 ffc0a920: 48 00 00 4d bl ffc0a96c <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc0a924: 7f c3 f3 78 mr r3,r30 ffc0a928: 4b ff f3 99 bl ffc09cc0 <_Chain_Get> } if ( the_object ) { ffc0a92c: 2c 03 00 00 cmpwi r3,0 ffc0a930: 41 82 ff 68 beq+ ffc0a898 <_Objects_Allocate+0x28> ffc0a934: 4b ff ff 9c b ffc0a8d0 <_Objects_Allocate+0x60> =============================================================================== ffc0a96c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc0a96c: 94 21 ff c0 stwu r1,-64(r1) ffc0a970: 7c 08 02 a6 mflr r0 ffc0a974: 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 ) ffc0a978: 81 23 00 34 lwz r9,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc0a97c: 93 a1 00 34 stw r29,52(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 ) ffc0a980: 2f 89 00 00 cmpwi cr7,r9,0 */ void _Objects_Extend_information( Objects_Information *information ) { ffc0a984: 93 e1 00 3c stw r31,60(r1) ffc0a988: 7c 7f 1b 78 mr r31,r3 ffc0a98c: 92 c1 00 18 stw r22,24(r1) ffc0a990: 92 e1 00 1c stw r23,28(r1) ffc0a994: 93 01 00 20 stw r24,32(r1) ffc0a998: 93 21 00 24 stw r25,36(r1) ffc0a99c: 93 41 00 28 stw r26,40(r1) ffc0a9a0: 93 61 00 2c stw r27,44(r1) ffc0a9a4: 93 81 00 30 stw r28,48(r1) ffc0a9a8: 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 ); ffc0a9ac: a3 a3 00 0a lhz r29,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0a9b0: 41 9e 02 8c beq- cr7,ffc0ac3c <_Objects_Extend_information+0x2d0> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc0a9b4: a3 43 00 10 lhz r26,16(r3) ffc0a9b8: a1 63 00 14 lhz r11,20(r3) ffc0a9bc: 7e da 5b 96 divwu r22,r26,r11 for ( ; block < block_count; block++ ) { ffc0a9c0: 2f 96 00 00 cmpwi cr7,r22,0 ffc0a9c4: 41 9e 02 94 beq- cr7,ffc0ac58 <_Objects_Extend_information+0x2ec><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { ffc0a9c8: 80 09 00 00 lwz r0,0(r9) ffc0a9cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a9d0: 41 9e 02 9c beq- cr7,ffc0ac6c <_Objects_Extend_information+0x300><== NEVER TAKEN ffc0a9d4: 7d 6a 5b 78 mr r10,r11 * 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; ffc0a9d8: 7e c9 03 a6 mtctr r22 /* * 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 ); ffc0a9dc: 7f be eb 78 mr r30,r29 index_base = minimum_index; block = 0; ffc0a9e0: 3b 60 00 00 li r27,0 ffc0a9e4: 48 00 00 10 b ffc0a9f4 <_Objects_Extend_information+0x88> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0a9e8: 84 09 00 04 lwzu r0,4(r9) ffc0a9ec: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a9f0: 41 9e 01 fc beq- cr7,ffc0abec <_Objects_Extend_information+0x280> do_extend = false; break; } else index_base += information->allocation_size; ffc0a9f4: 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++ ) { ffc0a9f8: 3b 7b 00 01 addi r27,r27,1 ffc0a9fc: 42 00 ff ec bdnz+ ffc0a9e8 <_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; ffc0aa00: 3b 20 00 01 li r25,1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc0aa04: 7f 5a 52 14 add r26,r26,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 ) { ffc0aa08: 2b 9a ff ff cmplwi cr7,r26,65535 ffc0aa0c: 41 9d 01 a8 bgt- cr7,ffc0abb4 <_Objects_Extend_information+0x248> /* * 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 ) { ffc0aa10: 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; ffc0aa14: 80 7f 00 18 lwz r3,24(r31) if ( information->auto_extend ) { ffc0aa18: 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; ffc0aa1c: 7c 6a 19 d6 mullw r3,r10,r3 if ( information->auto_extend ) { ffc0aa20: 41 9e 01 d4 beq- cr7,ffc0abf4 <_Objects_Extend_information+0x288> new_object_block = _Workspace_Allocate( block_size ); ffc0aa24: 48 00 2b d1 bl ffc0d5f4 <_Workspace_Allocate> if ( !new_object_block ) ffc0aa28: 7c 7c 1b 79 mr. r28,r3 ffc0aa2c: 41 82 01 88 beq- ffc0abb4 <_Objects_Extend_information+0x248> } /* * Do we need to grow the tables? */ if ( do_extend ) { ffc0aa30: 2f 99 00 00 cmpwi cr7,r25,0 ffc0aa34: 41 9e 00 fc beq- cr7,ffc0ab30 <_Objects_Extend_information+0x1c4> */ /* * Up the block count and maximum */ block_count++; ffc0aa38: 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 *)) + ffc0aa3c: 1c 77 00 03 mulli r3,r23,3 ((maximum + minimum_index) * sizeof(Objects_Control *)); ffc0aa40: 7c 7a 1a 14 add r3,r26,r3 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc0aa44: 7c 63 ea 14 add r3,r3,r29 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); ffc0aa48: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0aa4c: 48 00 2b a9 bl ffc0d5f4 <_Workspace_Allocate> if ( !object_blocks ) { ffc0aa50: 7c 78 1b 79 mr. r24,r3 ffc0aa54: 41 82 02 2c beq- ffc0ac80 <_Objects_Extend_information+0x314> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0aa58: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc0aa5c: 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); ffc0aa60: 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 ) { ffc0aa64: 7f 9d 00 40 cmplw cr7,r29,r0 ffc0aa68: 7e f9 ba 14 add r23,r25,r23 ffc0aa6c: 41 9c 01 94 blt- cr7,ffc0ac00 <_Objects_Extend_information+0x294> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0aa70: 2f 9d 00 00 cmpwi cr7,r29,0 local_table[ index ] = NULL; ffc0aa74: 7f a9 03 a6 mtctr r29 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0aa78: 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; ffc0aa7c: 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++ ) { ffc0aa80: 41 9e 00 0c beq- cr7,ffc0aa8c <_Objects_Extend_information+0x120><== NEVER TAKEN local_table[ index ] = NULL; ffc0aa84: 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++ ) { ffc0aa88: 42 00 ff fc bdnz+ ffc0aa84 <_Objects_Extend_information+0x118> ffc0aa8c: 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 ); ffc0aa90: a1 7f 00 14 lhz r11,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0aa94: 38 00 00 00 li r0,0 ffc0aa98: 7c 18 b1 2e stwx r0,r24,r22 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0aa9c: 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 ; ffc0aaa0: 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; ffc0aaa4: 7c 19 b1 2e stwx r0,r25,r22 for ( index=index_base ; ffc0aaa8: 40 9c 00 30 bge- cr7,ffc0aad8 <_Objects_Extend_information+0x16c><== NEVER TAKEN ffc0aaac: 38 1e 00 01 addi r0,r30,1 ffc0aab0: 7f 80 58 40 cmplw cr7,r0,r11 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc0aab4: 57 c9 10 3a rlwinm r9,r30,2,0,29 ffc0aab8: 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; ffc0aabc: 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 ; ffc0aac0: 7d 29 ba 14 add r9,r9,r23 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0aac4: 7d 69 03 a6 mtctr r11 ffc0aac8: 38 00 00 00 li r0,0 ffc0aacc: 41 9d 01 c0 bgt- cr7,ffc0ac8c <_Objects_Extend_information+0x320><== NEVER TAKEN ffc0aad0: 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 ; ffc0aad4: 42 00 ff fc bdnz+ ffc0aad0 <_Objects_Extend_information+0x164> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0aad8: 7c 00 00 a6 mfmsr r0 ffc0aadc: 7d 30 42 a6 mfsprg r9,0 ffc0aae0: 7c 09 48 78 andc r9,r0,r9 ffc0aae4: 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) | ffc0aae8: 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; ffc0aaec: 57 5a 04 3e clrlwi r26,r26,16 information->maximum_id = _Objects_Build_id( ffc0aaf0: a1 3f 00 04 lhz r9,4(r31) ffc0aaf4: 55 6b c0 0e rlwinm r11,r11,24,0,7 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0aaf8: 80 7f 00 34 lwz r3,52(r31) ffc0aafc: 65 6b 00 01 oris r11,r11,1 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; ffc0ab00: 93 3f 00 30 stw r25,48(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0ab04: 55 29 d8 08 rlwinm r9,r9,27,0,4 ffc0ab08: 7d 69 4b 78 or r9,r11,r9 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; ffc0ab0c: 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) | ffc0ab10: 7d 29 d3 78 or r9,r9,r26 information->inactive_per_block = inactive_per_block; information->local_table = local_table; ffc0ab14: 92 ff 00 1c stw r23,28(r31) information->maximum = (Objects_Maximum) maximum; ffc0ab18: b3 5f 00 10 sth r26,16(r31) information->maximum_id = _Objects_Build_id( ffc0ab1c: 91 3f 00 0c stw r9,12(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ab20: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); if ( old_tables ) ffc0ab24: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ab28: 41 9e 00 08 beq- cr7,ffc0ab30 <_Objects_Extend_information+0x1c4> _Workspace_Free( old_tables ); ffc0ab2c: 48 00 2a fd bl ffc0d628 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0ab30: 81 3f 00 34 lwz r9,52(r31) ffc0ab34: 57 7b 10 3a rlwinm r27,r27,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0ab38: 3b a1 00 08 addi r29,r1,8 ffc0ab3c: a0 bf 00 14 lhz r5,20(r31) } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0ab40: 7f 89 d9 2e stwx r28,r9,r27 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0ab44: 7f 84 e3 78 mr r4,r28 ffc0ab48: 7f a3 eb 78 mr r3,r29 ffc0ab4c: 80 df 00 18 lwz r6,24(r31) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0ab50: 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( ffc0ab54: 48 00 4e 31 bl ffc0f984 <_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 ) { ffc0ab58: 48 00 00 2c b ffc0ab84 <_Objects_Extend_information+0x218> ffc0ab5c: 81 7f 00 00 lwz r11,0(r31) the_object->id = _Objects_Build_id( ffc0ab60: a0 1f 00 04 lhz r0,4(r31) ffc0ab64: 55 6b c0 0e rlwinm r11,r11,24,0,7 ffc0ab68: 65 6b 00 01 oris r11,r11,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0ab6c: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc0ab70: 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) | ffc0ab74: 7c 00 f3 78 or r0,r0,r30 ffc0ab78: 90 09 00 08 stw r0,8(r9) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc0ab7c: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0ab80: 4b ff f0 e9 bl ffc09c68 <_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 ) { ffc0ab84: 7f a3 eb 78 mr r3,r29 ffc0ab88: 4b ff f1 39 bl ffc09cc0 <_Chain_Get> ffc0ab8c: 7c 69 1b 79 mr. r9,r3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0ab90: 7f 83 e3 78 mr r3,r28 ffc0ab94: 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 ) { ffc0ab98: 40 82 ff c4 bne+ ffc0ab5c <_Objects_Extend_information+0x1f0> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0ab9c: a1 3f 00 2c lhz r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0aba0: a0 1f 00 14 lhz r0,20(r31) ffc0aba4: 81 7f 00 30 lwz r11,48(r31) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0aba8: 7d 20 4a 14 add r9,r0,r9 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0abac: 7c 0b d9 2e stwx r0,r11,r27 information->inactive = ffc0abb0: b1 3f 00 2c sth r9,44(r31) (Objects_Maximum)(information->inactive + information->allocation_size); } ffc0abb4: 80 01 00 44 lwz r0,68(r1) ffc0abb8: 82 c1 00 18 lwz r22,24(r1) ffc0abbc: 7c 08 03 a6 mtlr r0 ffc0abc0: 82 e1 00 1c lwz r23,28(r1) ffc0abc4: 83 01 00 20 lwz r24,32(r1) ffc0abc8: 83 21 00 24 lwz r25,36(r1) ffc0abcc: 83 41 00 28 lwz r26,40(r1) ffc0abd0: 83 61 00 2c lwz r27,44(r1) ffc0abd4: 83 81 00 30 lwz r28,48(r1) ffc0abd8: 83 a1 00 34 lwz r29,52(r1) ffc0abdc: 83 c1 00 38 lwz r30,56(r1) ffc0abe0: 83 e1 00 3c lwz r31,60(r1) ffc0abe4: 38 21 00 40 addi r1,r1,64 ffc0abe8: 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; ffc0abec: 3b 20 00 00 li r25,0 ffc0abf0: 4b ff fe 14 b ffc0aa04 <_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 ); ffc0abf4: 48 00 2a 61 bl ffc0d654 <_Workspace_Allocate_or_fatal_error> ffc0abf8: 7c 7c 1b 78 mr r28,r3 ffc0abfc: 4b ff fe 34 b ffc0aa30 <_Objects_Extend_information+0xc4> * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc0ac00: 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, ffc0ac04: 80 9f 00 34 lwz r4,52(r31) ffc0ac08: 7e c5 b3 78 mr r5,r22 ffc0ac0c: 48 00 83 b1 bl ffc12fbc information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc0ac10: 80 9f 00 30 lwz r4,48(r31) ffc0ac14: 7e c5 b3 78 mr r5,r22 ffc0ac18: 7f 23 cb 78 mr r3,r25 ffc0ac1c: 48 00 83 a1 bl ffc12fbc information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0ac20: 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, ffc0ac24: 80 9f 00 1c lwz r4,28(r31) ffc0ac28: 7e e3 bb 78 mr r3,r23 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0ac2c: 7c bd 2a 14 add r5,r29,r5 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0ac30: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0ac34: 48 00 83 89 bl ffc12fbc ffc0ac38: 4b ff fe 58 b ffc0aa90 <_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 ) ffc0ac3c: a3 43 00 10 lhz r26,16(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 ); ffc0ac40: 7f be eb 78 mr r30,r29 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0ac44: 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; ffc0ac48: 3b 20 00 01 li r25,1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0ac4c: 3b 60 00 00 li r27,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; ffc0ac50: 3a c0 00 00 li r22,0 ffc0ac54: 4b ff fd b0 b ffc0aa04 <_Objects_Extend_information+0x98> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0ac58: 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 ); ffc0ac5c: 7f be eb 78 mr r30,r29 <== 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; ffc0ac60: 3b 20 00 01 li r25,1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0ac64: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc0ac68: 4b ff fd 9c b ffc0aa04 <_Objects_Extend_information+0x98><== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0ac6c: 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 ); ffc0ac70: 7f be eb 78 mr r30,r29 <== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; ffc0ac74: 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; ffc0ac78: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc0ac7c: 4b ff fd 88 b ffc0aa04 <_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 ); ffc0ac80: 7f 83 e3 78 mr r3,r28 ffc0ac84: 48 00 29 a5 bl ffc0d628 <_Workspace_Free> return; ffc0ac88: 4b ff ff 2c b ffc0abb4 <_Objects_Extend_information+0x248> ffc0ac8c: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc0ac90: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED ffc0ac94: 4b ff fe 3c b ffc0aad0 <_Objects_Extend_information+0x164><== NOT EXECUTED =============================================================================== ffc0ad84 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0ad84: 94 21 ff e8 stwu r1,-24(r1) ffc0ad88: 7c 08 02 a6 mflr r0 ffc0ad8c: 93 c1 00 10 stw r30,16(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0ad90: 7c 9e 23 79 mr. r30,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0ad94: 93 a1 00 0c stw r29,12(r1) ffc0ad98: 7c 7d 1b 78 mr r29,r3 ffc0ad9c: 93 e1 00 14 stw r31,20(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; ffc0ada0: 3b e0 00 00 li r31,0 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0ada4: 90 01 00 1c stw r0,28(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0ada8: 40 82 00 24 bne- ffc0adcc <_Objects_Get_information+0x48> if ( info->maximum == 0 ) return NULL; #endif return info; } ffc0adac: 80 01 00 1c lwz r0,28(r1) ffc0adb0: 7f e3 fb 78 mr r3,r31 ffc0adb4: 83 a1 00 0c lwz r29,12(r1) ffc0adb8: 7c 08 03 a6 mtlr r0 ffc0adbc: 83 c1 00 10 lwz r30,16(r1) ffc0adc0: 83 e1 00 14 lwz r31,20(r1) ffc0adc4: 38 21 00 18 addi r1,r1,24 ffc0adc8: 4e 80 00 20 blr /* * 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 ); ffc0adcc: 48 00 51 d9 bl ffc0ffa4 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) ffc0add0: 2c 03 00 00 cmpwi r3,0 ffc0add4: 41 82 ff d8 beq+ ffc0adac <_Objects_Get_information+0x28> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc0add8: 7f 83 f0 40 cmplw cr7,r3,r30 ffc0addc: 41 9c ff d0 blt+ cr7,ffc0adac <_Objects_Get_information+0x28> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc0ade0: 3d 20 00 00 lis r9,0 ffc0ade4: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc0ade8: 39 29 2b 40 addi r9,r9,11072 ffc0adec: 7d 29 e8 2e lwzx r9,r9,r29 ffc0adf0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0adf4: 41 9e ff b8 beq+ cr7,ffc0adac <_Objects_Get_information+0x28><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc0adf8: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0adfc: 7f e9 f0 2e lwzx r31,r9,r30 if ( !info ) ffc0ae00: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0ae04: 41 9e ff a8 beq+ cr7,ffc0adac <_Objects_Get_information+0x28><== 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 ) ffc0ae08: a0 1f 00 10 lhz r0,16(r31) ffc0ae0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ae10: 40 9e ff 9c bne+ cr7,ffc0adac <_Objects_Get_information+0x28> return NULL; ffc0ae14: 3b e0 00 00 li r31,0 ffc0ae18: 4b ff ff 94 b ffc0adac <_Objects_Get_information+0x28> =============================================================================== ffc0d060 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0d060: 94 21 ff d8 stwu r1,-40(r1) ffc0d064: 7c 08 02 a6 mflr r0 ffc0d068: 93 c1 00 20 stw r30,32(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0d06c: 7c 9e 23 79 mr. r30,r4 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0d070: 93 e1 00 24 stw r31,36(r1) ffc0d074: 7c bf 2b 78 mr r31,r5 ffc0d078: 90 01 00 2c stw r0,44(r1) ffc0d07c: 93 a1 00 1c stw r29,28(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0d080: 40 82 00 28 bne- ffc0d0a8 <_Objects_Get_name_as_string+0x48> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; ffc0d084: 3b e0 00 00 li r31,0 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc0d088: 80 01 00 2c lwz r0,44(r1) ffc0d08c: 7f e3 fb 78 mr r3,r31 ffc0d090: 83 a1 00 1c lwz r29,28(r1) ffc0d094: 7c 08 03 a6 mtlr r0 ffc0d098: 83 c1 00 20 lwz r30,32(r1) ffc0d09c: 83 e1 00 24 lwz r31,36(r1) ffc0d0a0: 38 21 00 28 addi r1,r1,40 ffc0d0a4: 4e 80 00 20 blr Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) ffc0d0a8: 2f 85 00 00 cmpwi cr7,r5,0 ffc0d0ac: 41 9e ff dc beq+ cr7,ffc0d088 <_Objects_Get_name_as_string+0x28> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0d0b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d0b4: 7c 7d 1b 78 mr r29,r3 ffc0d0b8: 40 9e 00 10 bne- cr7,ffc0d0c8 <_Objects_Get_name_as_string+0x68> ffc0d0bc: 3d 20 00 01 lis r9,1 ffc0d0c0: 81 29 ab c4 lwz r9,-21564(r9) ffc0d0c4: 83 a9 00 08 lwz r29,8(r9) information = _Objects_Get_information_id( tmpId ); ffc0d0c8: 7f a3 eb 78 mr r3,r29 ffc0d0cc: 4b ff fe 61 bl ffc0cf2c <_Objects_Get_information_id> if ( !information ) ffc0d0d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d0d4: 41 9e ff b0 beq+ cr7,ffc0d084 <_Objects_Get_name_as_string+0x24> return NULL; the_object = _Objects_Get( information, tmpId, &location ); ffc0d0d8: 7f a4 eb 78 mr r4,r29 ffc0d0dc: 38 a1 00 08 addi r5,r1,8 ffc0d0e0: 48 00 00 a5 bl ffc0d184 <_Objects_Get> switch ( location ) { ffc0d0e4: 80 01 00 08 lwz r0,8(r1) ffc0d0e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d0ec: 40 be ff 98 bne- cr7,ffc0d084 <_Objects_Get_name_as_string+0x24> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d0f0: 37 de ff ff addic. r30,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; ffc0d0f4: 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'; ffc0d0f8: 98 01 00 10 stb r0,16(r1) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d0fc: 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; ffc0d100: 55 60 46 3e rlwinm r0,r11,8,24,31 lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0d104: 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; ffc0d108: 98 01 00 0c stb r0,12(r1) lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0d10c: 55 6a c2 3e rlwinm r10,r11,24,8,31 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0d110: 99 01 00 0d stb r8,13(r1) lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0d114: 99 41 00 0e stb r10,14(r1) lname[ 3 ] = (u32_name >> 0) & 0xff; ffc0d118: 99 61 00 0f stb r11,15(r1) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d11c: 41 82 00 58 beq- ffc0d174 <_Objects_Get_name_as_string+0x114><== NEVER TAKEN ffc0d120: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d124: 41 9e 00 50 beq- cr7,ffc0d174 <_Objects_Get_name_as_string+0x114> ffc0d128: 3d 00 00 00 lis r8,0 *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc0d12c: 7f c9 03 a6 mtctr r30 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d130: 39 60 00 00 li r11,0 ffc0d134: 39 08 27 50 addi r8,r8,10064 ffc0d138: 48 00 00 14 b ffc0d14c <_Objects_Get_name_as_string+0xec> ffc0d13c: 39 41 00 0c addi r10,r1,12 ffc0d140: 7c 0a 58 ae lbzx r0,r10,r11 ffc0d144: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d148: 41 9e 00 2c beq- cr7,ffc0d174 <_Objects_Get_name_as_string+0x114> *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc0d14c: 81 48 00 00 lwz r10,0(r8) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d150: 39 6b 00 01 addi r11,r11,1 *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc0d154: 7d 4a 02 14 add r10,r10,r0 ffc0d158: 89 4a 00 01 lbz r10,1(r10) ffc0d15c: 71 47 00 97 andi. r7,r10,151 ffc0d160: 40 82 00 08 bne- ffc0d168 <_Objects_Get_name_as_string+0x108> ffc0d164: 38 00 00 2a li r0,42 ffc0d168: 98 09 00 00 stb r0,0(r9) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d16c: 39 29 00 01 addi r9,r9,1 ffc0d170: 42 00 ff cc bdnz+ ffc0d13c <_Objects_Get_name_as_string+0xdc> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; ffc0d174: 38 00 00 00 li r0,0 ffc0d178: 98 09 00 00 stb r0,0(r9) _Thread_Enable_dispatch(); ffc0d17c: 48 00 0e cd bl ffc0e048 <_Thread_Enable_dispatch> return name; ffc0d180: 4b ff ff 08 b ffc0d088 <_Objects_Get_name_as_string+0x28> =============================================================================== ffc1ec14 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; ffc1ec14: 81 23 00 08 lwz r9,8(r3) if ( information->maximum >= index ) { ffc1ec18: a0 03 00 10 lhz r0,16(r3) /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; ffc1ec1c: 21 29 00 01 subfic r9,r9,1 ffc1ec20: 7d 29 22 14 add r9,r9,r4 if ( information->maximum >= index ) { ffc1ec24: 7f 89 00 40 cmplw cr7,r9,r0 ffc1ec28: 41 9d 00 24 bgt- cr7,ffc1ec4c <_Objects_Get_no_protection+0x38> if ( (the_object = information->local_table[ index ]) != NULL ) { ffc1ec2c: 81 63 00 1c lwz r11,28(r3) ffc1ec30: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc1ec34: 7c 6b 48 2e lwzx r3,r11,r9 ffc1ec38: 2f 83 00 00 cmpwi cr7,r3,0 ffc1ec3c: 41 9e 00 10 beq- cr7,ffc1ec4c <_Objects_Get_no_protection+0x38><== NEVER TAKEN *location = OBJECTS_LOCAL; ffc1ec40: 38 00 00 00 li r0,0 ffc1ec44: 90 05 00 00 stw r0,0(r5) return the_object; ffc1ec48: 4e 80 00 20 blr /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; ffc1ec4c: 38 00 00 01 li r0,1 ffc1ec50: 90 05 00 00 stw r0,0(r5) return NULL; ffc1ec54: 38 60 00 00 li r3,0 } ffc1ec58: 4e 80 00 20 blr =============================================================================== ffc0ca38 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0ca38: 94 21 ff e0 stwu r1,-32(r1) ffc0ca3c: 7c 08 02 a6 mflr r0 ffc0ca40: 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; ffc0ca44: 7c 60 1b 79 mr. r0,r3 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0ca48: 93 c1 00 18 stw r30,24(r1) ffc0ca4c: 7c 9e 23 78 mr r30,r4 ffc0ca50: 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; ffc0ca54: 40 82 00 10 bne- ffc0ca64 <_Objects_Id_to_name+0x2c> ffc0ca58: 3d 20 00 00 lis r9,0 ffc0ca5c: 81 29 2d c4 lwz r9,11716(r9) ffc0ca60: 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); ffc0ca64: 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 ) ffc0ca68: 39 69 ff ff addi r11,r9,-1 ffc0ca6c: 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; ffc0ca70: 3b e0 00 03 li r31,3 ffc0ca74: 41 9d 00 50 bgt- cr7,ffc0cac4 <_Objects_Id_to_name+0x8c> if ( !_Objects_Information_table[ the_api ] ) ffc0ca78: 3d 60 00 00 lis r11,0 ffc0ca7c: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0ca80: 39 6b 2b c0 addi r11,r11,11200 ffc0ca84: 7d 2b 48 2e lwzx r9,r11,r9 ffc0ca88: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ca8c: 41 9e 00 38 beq- cr7,ffc0cac4 <_Objects_Id_to_name+0x8c> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc0ca90: 54 0b 3e 7a rlwinm r11,r0,7,25,29 ffc0ca94: 7c 69 58 2e lwzx r3,r9,r11 if ( !information ) ffc0ca98: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ca9c: 41 9e 00 28 beq- cr7,ffc0cac4 <_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 ); ffc0caa0: 7c 04 03 78 mr r4,r0 ffc0caa4: 38 a1 00 08 addi r5,r1,8 ffc0caa8: 4b ff fe f5 bl ffc0c99c <_Objects_Get> if ( !the_object ) ffc0caac: 2c 03 00 00 cmpwi r3,0 ffc0cab0: 41 82 00 14 beq- ffc0cac4 <_Objects_Id_to_name+0x8c> return OBJECTS_INVALID_ID; *name = the_object->name; ffc0cab4: 80 03 00 0c lwz r0,12(r3) _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0cab8: 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; ffc0cabc: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0cac0: 48 00 0e 49 bl ffc0d908 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc0cac4: 80 01 00 24 lwz r0,36(r1) ffc0cac8: 7f e3 fb 78 mr r3,r31 ffc0cacc: 83 c1 00 18 lwz r30,24(r1) ffc0cad0: 7c 08 03 a6 mtlr r0 ffc0cad4: 83 e1 00 1c lwz r31,28(r1) ffc0cad8: 38 21 00 20 addi r1,r1,32 ffc0cadc: 4e 80 00 20 blr =============================================================================== ffc0af28 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { ffc0af28: 94 21 ff f8 stwu r1,-8(r1) ffc0af2c: 7c 08 02 a6 mflr r0 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc0af30: 3d 40 00 00 lis r10,0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { ffc0af34: 90 01 00 0c stw r0,12(r1) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; ffc0af38: 54 c0 0f fe rlwinm r0,r6,1,31,31 maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { ffc0af3c: 2f 80 00 00 cmpwi cr7,r0,0 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc0af40: 39 4a 2b 40 addi r10,r10,11072 ffc0af44: 54 8b 10 3a rlwinm r11,r4,2,0,29 ffc0af48: 7d 6a 58 2e lwzx r11,r10,r11 ffc0af4c: 54 a8 10 3a rlwinm r8,r5,2,0,29 #endif information->the_api = the_api; information->the_class = the_class; information->size = size; information->local_table = 0; ffc0af50: 39 40 00 00 li r10,0 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; ffc0af54: 90 83 00 00 stw r4,0(r3) ffc0af58: 54 c6 00 7f clrlwi. r6,r6,1 information->the_class = the_class; ffc0af5c: b0 a3 00 04 sth r5,4(r3) information->size = size; ffc0af60: 90 e3 00 18 stw r7,24(r3) information->local_table = 0; ffc0af64: 91 43 00 1c stw r10,28(r3) information->inactive_per_block = 0; ffc0af68: 91 43 00 30 stw r10,48(r3) information->object_blocks = 0; ffc0af6c: 91 43 00 34 stw r10,52(r3) information->inactive = 0; ffc0af70: b1 43 00 2c sth r10,44(r3) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; ffc0af74: b1 43 00 10 sth r10,16(r3) /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc0af78: 7c 6b 41 2e stwx r3,r11,r8 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = ffc0af7c: 98 03 00 12 stb r0,18(r3) maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { ffc0af80: 41 9e 00 08 beq- cr7,ffc0af88 <_Objects_Initialize_information+0x60> ffc0af84: 41 82 00 84 beq- ffc0b008 <_Objects_Initialize_information+0xe0> /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) ffc0af88: 55 20 07 be clrlwi r0,r9,30 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; ffc0af8c: b0 c3 00 14 sth r6,20(r3) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) ffc0af90: 2f 80 00 00 cmpwi cr7,r0,0 information->local_table = &null_local_table; /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; ffc0af94: 7c 00 00 26 mfcr r0 ffc0af98: 54 00 1f fe rlwinm r0,r0,3,31,31 ffc0af9c: 54 84 c0 0e rlwinm r4,r4,24,0,7 ffc0afa0: 64 84 00 01 oris r4,r4,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0afa4: 54 a5 d8 08 rlwinm r5,r5,27,0,4 ffc0afa8: 68 00 00 01 xori r0,r0,1 ffc0afac: 7c 85 2b 78 or r5,r4,r5 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; ffc0afb0: 3d 60 00 00 lis r11,0 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0afb4: 7c a5 03 78 or r5,r5,r0 ffc0afb8: 38 0b 28 d8 addi r0,r11,10456 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = ffc0afbc: 90 a3 00 08 stw r5,8(r3) information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; ffc0afc0: 90 03 00 1c stw r0,28(r3) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) ffc0afc4: 40 9e 00 38 bne- cr7,ffc0affc <_Objects_Initialize_information+0xd4><== NEVER TAKEN 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 ); ffc0afc8: 39 63 00 24 addi r11,r3,36 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; ffc0afcc: b1 23 00 38 sth r9,56(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); ffc0afd0: 38 03 00 20 addi r0,r3,32 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc0afd4: 39 20 00 00 li r9,0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0afd8: 91 63 00 20 stw r11,32(r3) head->previous = NULL; ffc0afdc: 91 23 00 24 stw r9,36(r3) tail->previous = head; ffc0afe0: 90 03 00 28 stw r0,40(r3) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { ffc0afe4: 41 a2 00 08 beq+ ffc0afec <_Objects_Initialize_information+0xc4> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); ffc0afe8: 4b ff f9 85 bl ffc0a96c <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } ffc0afec: 80 01 00 0c lwz r0,12(r1) ffc0aff0: 38 21 00 08 addi r1,r1,8 ffc0aff4: 7c 08 03 a6 mtlr r0 ffc0aff8: 4e 80 00 20 blr * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ffc0affc: 39 29 00 04 addi r9,r9,4 <== NOT EXECUTED ffc0b000: 55 29 00 3a rlwinm r9,r9,0,0,29 <== NOT EXECUTED ffc0b004: 4b ff ff c4 b ffc0afc8 <_Objects_Initialize_information+0xa0><== NOT EXECUTED /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( ffc0b008: 38 60 00 00 li r3,0 ffc0b00c: 38 80 00 01 li r4,1 ffc0b010: 38 a0 00 13 li r5,19 ffc0b014: 4b ff f8 05 bl ffc0a818 <_Internal_error_Occurred> =============================================================================== ffc0b0b0 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b0b0: 94 21 ff e8 stwu r1,-24(r1) ffc0b0b4: 7c 08 02 a6 mflr r0 ffc0b0b8: 90 01 00 1c stw r0,28(r1) ffc0b0bc: 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) / ffc0b0c0: 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 ); ffc0b0c4: a3 e3 00 0a lhz r31,10(r3) block_count = (information->maximum - index_base) / ffc0b0c8: a0 03 00 14 lhz r0,20(r3) ffc0b0cc: 7d 5f 50 50 subf r10,r31,r10 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b0d0: 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) / ffc0b0d4: 7d 4a 03 96 divwu r10,r10,r0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b0d8: 93 a1 00 0c stw r29,12(r1) ffc0b0dc: 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++ ) { ffc0b0e0: 2f 8a 00 00 cmpwi cr7,r10,0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b0e4: 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++ ) { ffc0b0e8: 41 9e 00 3c beq- cr7,ffc0b124 <_Objects_Shrink_information+0x74><== NEVER TAKEN if ( information->inactive_per_block[ block ] == ffc0b0ec: 81 63 00 30 lwz r11,48(r3) ffc0b0f0: 81 2b 00 00 lwz r9,0(r11) ffc0b0f4: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b0f8: 41 9e 00 4c beq- cr7,ffc0b144 <_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++ ) { ffc0b0fc: 39 20 00 00 li r9,0 ffc0b100: 7d 49 03 a6 mtctr r10 ffc0b104: 48 00 00 18 b ffc0b11c <_Objects_Shrink_information+0x6c> if ( information->inactive_per_block[ block ] == ffc0b108: 85 4b 00 04 lwzu r10,4(r11) information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0b10c: 7f ff 02 14 add r31,r31,r0 ffc0b110: 55 3d 10 3a rlwinm r29,r9,2,0,29 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 ] == ffc0b114: 7f 80 50 00 cmpw cr7,r0,r10 ffc0b118: 41 9e 00 30 beq- cr7,ffc0b148 <_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++ ) { ffc0b11c: 39 29 00 01 addi r9,r9,1 ffc0b120: 42 00 ff e8 bdnz+ ffc0b108 <_Objects_Shrink_information+0x58> return; } index_base += information->allocation_size; } } ffc0b124: 80 01 00 1c lwz r0,28(r1) ffc0b128: 83 81 00 08 lwz r28,8(r1) ffc0b12c: 7c 08 03 a6 mtlr r0 ffc0b130: 83 a1 00 0c lwz r29,12(r1) ffc0b134: 83 c1 00 10 lwz r30,16(r1) ffc0b138: 83 e1 00 14 lwz r31,20(r1) ffc0b13c: 38 21 00 18 addi r1,r1,24 ffc0b140: 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 ] == ffc0b144: 3b a0 00 00 li r29,0 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); ffc0b148: 80 7c 00 20 lwz r3,32(r28) ffc0b14c: 48 00 00 10 b ffc0b15c <_Objects_Shrink_information+0xac> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0b150: 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; ffc0b154: 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 ); ffc0b158: 41 9e 00 34 beq- cr7,ffc0b18c <_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 ); ffc0b15c: 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; ffc0b160: 83 c3 00 00 lwz r30,0(r3) if ((index >= index_base) && ffc0b164: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0b168: 41 bc ff e8 blt- cr7,ffc0b150 <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { ffc0b16c: a1 3c 00 14 lhz r9,20(r28) ffc0b170: 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) && ffc0b174: 7f 80 48 40 cmplw cr7,r0,r9 ffc0b178: 40 9c ff d8 bge+ cr7,ffc0b150 <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); ffc0b17c: 4b ff eb 1d bl ffc09c98 <_Chain_Extract> } } while ( the_object ); ffc0b180: 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; ffc0b184: 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 ); ffc0b188: 40 9e ff d4 bne+ cr7,ffc0b15c <_Objects_Shrink_information+0xac><== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc0b18c: 81 3c 00 34 lwz r9,52(r28) ffc0b190: 7c 69 e8 2e lwzx r3,r9,r29 ffc0b194: 48 00 24 95 bl ffc0d628 <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0b198: a1 5c 00 2c lhz r10,44(r28) ffc0b19c: 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; ffc0b1a0: 81 7c 00 34 lwz r11,52(r28) information->inactive_per_block[ block ] = 0; ffc0b1a4: 81 3c 00 30 lwz r9,48(r28) information->inactive -= information->allocation_size; ffc0b1a8: 7c 00 50 50 subf r0,r0,r10 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0b1ac: 7f cb e9 2e stwx r30,r11,r29 information->inactive_per_block[ block ] = 0; ffc0b1b0: 7f c9 e9 2e stwx r30,r9,r29 information->inactive -= information->allocation_size; ffc0b1b4: b0 1c 00 2c sth r0,44(r28) return; } index_base += information->allocation_size; } } ffc0b1b8: 80 01 00 1c lwz r0,28(r1) ffc0b1bc: 83 81 00 08 lwz r28,8(r1) ffc0b1c0: 7c 08 03 a6 mtlr r0 ffc0b1c4: 83 a1 00 0c lwz r29,12(r1) ffc0b1c8: 83 c1 00 10 lwz r30,16(r1) ffc0b1cc: 83 e1 00 14 lwz r31,20(r1) ffc0b1d0: 38 21 00 18 addi r1,r1,24 ffc0b1d4: 4e 80 00 20 blr =============================================================================== ffc093e8 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc093e8: 94 21 ff d8 stwu r1,-40(r1) ffc093ec: 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; ffc093f0: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc093f4: 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; ffc093f8: 39 29 20 70 addi r9,r9,8304 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc093fc: 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; ffc09400: 83 e9 00 2c lwz r31,44(r9) * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09404: 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 ) ffc09408: 2f 9f 00 00 cmpwi cr7,r31,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc0940c: 93 81 00 18 stw r28,24(r1) ffc09410: 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; ffc09414: 83 a9 00 28 lwz r29,40(r9) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc09418: 41 9e 00 60 beq- cr7,ffc09478 <_RTEMS_tasks_Initialize_user_tasks_body+0x90> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc0941c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc09420: 41 9e 00 58 beq- cr7,ffc09478 <_RTEMS_tasks_Initialize_user_tasks_body+0x90><== NEVER TAKEN ffc09424: 3b c0 00 00 li r30,0 ffc09428: 3b 81 00 08 addi r28,r1,8 return_value = rtems_task_create( ffc0942c: 80 bf 00 04 lwz r5,4(r31) ffc09430: 7f 88 e3 78 mr r8,r28 ffc09434: 80 7f 00 00 lwz r3,0(r31) ffc09438: 80 9f 00 08 lwz r4,8(r31) ffc0943c: 80 df 00 14 lwz r6,20(r31) ffc09440: 80 ff 00 0c lwz r7,12(r31) ffc09444: 4b ff fc b1 bl ffc090f4 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) ffc09448: 7c 65 1b 79 mr. r5,r3 ffc0944c: 40 82 00 4c bne- ffc09498 <_RTEMS_tasks_Initialize_user_tasks_body+0xb0> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( ffc09450: 80 bf 00 18 lwz r5,24(r31) ffc09454: 80 61 00 08 lwz r3,8(r1) ffc09458: 80 9f 00 10 lwz r4,16(r31) ffc0945c: 48 00 00 49 bl ffc094a4 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) ffc09460: 7c 65 1b 79 mr. r5,r3 ffc09464: 40 82 00 34 bne- ffc09498 <_RTEMS_tasks_Initialize_user_tasks_body+0xb0> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc09468: 3b de 00 01 addi r30,r30,1 ffc0946c: 7f 9d f0 40 cmplw cr7,r29,r30 ffc09470: 3b ff 00 1c addi r31,r31,28 ffc09474: 41 9d ff b8 bgt+ cr7,ffc0942c <_RTEMS_tasks_Initialize_user_tasks_body+0x44><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } ffc09478: 80 01 00 2c lwz r0,44(r1) ffc0947c: 83 81 00 18 lwz r28,24(r1) ffc09480: 7c 08 03 a6 mtlr r0 ffc09484: 83 a1 00 1c lwz r29,28(r1) ffc09488: 83 c1 00 20 lwz r30,32(r1) ffc0948c: 83 e1 00 24 lwz r31,36(r1) ffc09490: 38 21 00 28 addi r1,r1,40 ffc09494: 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 ); ffc09498: 38 60 00 01 li r3,1 ffc0949c: 38 80 00 01 li r4,1 ffc094a0: 48 00 13 79 bl ffc0a818 <_Internal_error_Occurred> =============================================================================== ffc0f62c <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0f62c: 94 21 ff d8 stwu r1,-40(r1) ffc0f630: 7c 08 02 a6 mflr r0 ffc0f634: 90 01 00 2c stw r0,44(r1) ffc0f638: 93 e1 00 24 stw r31,36(r1) RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0f63c: 83 e3 01 2c lwz r31,300(r3) */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0f640: 93 a1 00 1c stw r29,28(r1) ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; if ( !api ) ffc0f644: 2f 9f 00 00 cmpwi cr7,r31,0 */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0f648: 93 c1 00 20 stw r30,32(r1) ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; if ( !api ) ffc0f64c: 41 9e 00 80 beq- cr7,ffc0f6cc <_RTEMS_tasks_Post_switch_extension+0xa0><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f650: 7c 00 00 a6 mfmsr r0 ffc0f654: 7d 30 42 a6 mfsprg r9,0 ffc0f658: 7c 09 48 78 andc r9,r0,r9 ffc0f65c: 7d 20 01 24 mtmsr r9 asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; asr->signals_posted = 0; ffc0f660: 39 20 00 00 li r9,0 */ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; ffc0f664: 83 df 00 14 lwz r30,20(r31) asr->signals_posted = 0; ffc0f668: 91 3f 00 14 stw r9,20(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f66c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ ffc0f670: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0f674: 41 be 00 58 beq+ cr7,ffc0f6cc <_RTEMS_tasks_Post_switch_extension+0xa0> return; asr->nest_level += 1; ffc0f678: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0f67c: 3b a1 00 08 addi r29,r1,8 ffc0f680: 38 80 00 00 li r4,0 ffc0f684: 80 7f 00 10 lwz r3,16(r31) if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc0f688: 38 09 00 01 addi r0,r9,1 ffc0f68c: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0f690: 60 84 ff ff ori r4,r4,65535 ffc0f694: 7f a5 eb 78 mr r5,r29 ffc0f698: 48 00 26 f5 bl ffc11d8c (*asr->handler)( signal_set ); ffc0f69c: 80 1f 00 0c lwz r0,12(r31) ffc0f6a0: 7f c3 f3 78 mr r3,r30 ffc0f6a4: 7c 09 03 a6 mtctr r0 ffc0f6a8: 4e 80 04 21 bctrl asr->nest_level -= 1; ffc0f6ac: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0f6b0: 38 80 00 00 li r4,0 ffc0f6b4: 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; ffc0f6b8: 38 09 ff ff addi r0,r9,-1 ffc0f6bc: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0f6c0: 60 84 ff ff ori r4,r4,65535 ffc0f6c4: 7f a5 eb 78 mr r5,r29 ffc0f6c8: 48 00 26 c5 bl ffc11d8c } ffc0f6cc: 80 01 00 2c lwz r0,44(r1) ffc0f6d0: 83 a1 00 1c lwz r29,28(r1) ffc0f6d4: 7c 08 03 a6 mtlr r0 ffc0f6d8: 83 c1 00 20 lwz r30,32(r1) ffc0f6dc: 83 e1 00 24 lwz r31,36(r1) ffc0f6e0: 38 21 00 28 addi r1,r1,40 ffc0f6e4: 4e 80 00 20 blr =============================================================================== ffc0f59c <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; ffc0f59c: 81 23 01 38 lwz r9,312(r3) while (tvp) { ffc0f5a0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f5a4: 41 9e 00 24 beq- cr7,ffc0f5c8 <_RTEMS_tasks_Switch_extension+0x2c> tvp->tval = *tvp->ptr; ffc0f5a8: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->gval; ffc0f5ac: 80 09 00 08 lwz r0,8(r9) * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; ffc0f5b0: 81 4b 00 00 lwz r10,0(r11) ffc0f5b4: 91 49 00 0c stw r10,12(r9) *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; ffc0f5b8: 81 29 00 00 lwz r9,0(r9) */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; ffc0f5bc: 90 0b 00 00 stw r0,0(r11) /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { ffc0f5c0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f5c4: 40 9e ff e4 bne+ cr7,ffc0f5a8 <_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; ffc0f5c8: 81 24 01 38 lwz r9,312(r4) while (tvp) { ffc0f5cc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f5d0: 4d 9e 00 20 beqlr cr7 tvp->gval = *tvp->ptr; ffc0f5d4: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->tval; ffc0f5d8: 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; ffc0f5dc: 81 4b 00 00 lwz r10,0(r11) ffc0f5e0: 91 49 00 08 stw r10,8(r9) *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; ffc0f5e4: 81 29 00 00 lwz r9,0(r9) } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; ffc0f5e8: 90 0b 00 00 stw r0,0(r11) *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { ffc0f5ec: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f5f0: 40 9e ff e4 bne+ cr7,ffc0f5d4 <_RTEMS_tasks_Switch_extension+0x38><== NEVER TAKEN ffc0f5f4: 4e 80 00 20 blr =============================================================================== ffc0a9b8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc0a9b8: 94 21 ff e0 stwu r1,-32(r1) ffc0a9bc: 7c 08 02 a6 mflr r0 ffc0a9c0: 7c 64 1b 78 mr r4,r3 ffc0a9c4: 3c 60 00 00 lis r3,0 ffc0a9c8: 90 01 00 24 stw r0,36(r1) ffc0a9cc: 38 63 2b a0 addi r3,r3,11168 ffc0a9d0: 38 a1 00 08 addi r5,r1,8 ffc0a9d4: 93 e1 00 1c stw r31,28(r1) ffc0a9d8: 48 00 27 e9 bl ffc0d1c0 <_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 ) { ffc0a9dc: 80 01 00 08 lwz r0,8(r1) ffc0a9e0: 7c 7f 1b 78 mr r31,r3 ffc0a9e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a9e8: 40 9e 00 48 bne- cr7,ffc0aa30 <_Rate_monotonic_Timeout+0x78><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; ffc0a9ec: 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); ffc0a9f0: 80 03 00 10 lwz r0,16(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc0a9f4: 70 09 40 00 andi. r9,r0,16384 ffc0a9f8: 41 82 00 14 beq- ffc0aa0c <_Rate_monotonic_Timeout+0x54> ffc0a9fc: 81 23 00 20 lwz r9,32(r3) ffc0aa00: 80 1f 00 08 lwz r0,8(r31) ffc0aa04: 7f 89 00 00 cmpw cr7,r9,r0 ffc0aa08: 41 9e 00 68 beq- cr7,ffc0aa70 <_Rate_monotonic_Timeout+0xb8> _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 ) { ffc0aa0c: 80 1f 00 38 lwz r0,56(r31) ffc0aa10: 2f 80 00 01 cmpwi cr7,r0,1 ffc0aa14: 41 9e 00 30 beq- cr7,ffc0aa44 <_Rate_monotonic_Timeout+0x8c> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; ffc0aa18: 38 00 00 04 li r0,4 ffc0aa1c: 90 1f 00 38 stw r0,56(r31) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0aa20: 3d 20 00 00 lis r9,0 ffc0aa24: 81 69 27 ac lwz r11,10156(r9) ffc0aa28: 38 0b ff ff addi r0,r11,-1 ffc0aa2c: 90 09 27 ac stw r0,10156(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc0aa30: 80 01 00 24 lwz r0,36(r1) ffc0aa34: 83 e1 00 1c lwz r31,28(r1) ffc0aa38: 38 21 00 20 addi r1,r1,32 ffc0aa3c: 7c 08 03 a6 mtlr r0 ffc0aa40: 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; ffc0aa44: 38 00 00 03 li r0,3 ffc0aa48: 90 1f 00 38 stw r0,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc0aa4c: 7f e3 fb 78 mr r3,r31 ffc0aa50: 4b ff f7 55 bl ffc0a1a4 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0aa54: 80 1f 00 3c lwz r0,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0aa58: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0aa5c: 90 1f 00 1c stw r0,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0aa60: 38 63 2d 88 addi r3,r3,11656 ffc0aa64: 38 9f 00 10 addi r4,r31,16 ffc0aa68: 48 00 4b ed bl ffc0f654 <_Watchdog_Insert> ffc0aa6c: 4b ff ff b4 b ffc0aa20 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0aa70: 3c 80 10 03 lis r4,4099 ffc0aa74: 60 84 ff f8 ori r4,r4,65528 ffc0aa78: 48 00 31 55 bl ffc0dbcc <_Thread_Clear_state> ffc0aa7c: 4b ff ff d0 b ffc0aa4c <_Rate_monotonic_Timeout+0x94> =============================================================================== ffc0ffc8 <_Scheduler_priority_Block>: RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract( Thread_Control *the_thread ) { Chain_Control *ready = the_thread->scheduler.priority->ready_chain; ffc0ffc8: 81 24 00 8c lwz r9,140(r4) ffc0ffcc: 81 29 00 00 lwz r9,0(r9) if ( _Chain_Has_only_one_node( ready ) ) { ffc0ffd0: 81 69 00 00 lwz r11,0(r9) ffc0ffd4: 80 09 00 08 lwz r0,8(r9) ffc0ffd8: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0ffdc: 41 9e 00 a8 beq- cr7,ffc10084 <_Scheduler_priority_Block+0xbc> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0ffe0: 81 64 00 00 lwz r11,0(r4) previous = the_node->previous; ffc0ffe4: 81 24 00 04 lwz r9,4(r4) next->previous = previous; ffc0ffe8: 91 2b 00 04 stw r9,4(r11) previous->next = next; ffc0ffec: 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 ); ffc0fff0: 3d 20 00 00 lis r9,0 ffc0fff4: 39 29 2d 38 addi r9,r9,11576 { _Scheduler_priority_Ready_queue_extract(the_thread); /* TODO: flash critical section */ if ( _Thread_Is_heir( the_thread ) ) ffc0fff8: 80 09 00 10 lwz r0,16(r9) ffc0fffc: 7f 84 00 00 cmpw cr7,r4,r0 ffc10000: 41 9e 00 1c beq- cr7,ffc1001c <_Scheduler_priority_Block+0x54> _Scheduler_priority_Schedule_body(the_scheduler); if ( _Thread_Is_executing( the_thread ) ) ffc10004: 80 09 00 0c lwz r0,12(r9) ffc10008: 7f 84 00 00 cmpw cr7,r4,r0 ffc1000c: 4c be 00 20 bnelr+ cr7 _Thread_Dispatch_necessary = true; ffc10010: 38 00 00 01 li r0,1 ffc10014: 98 09 00 18 stb r0,24(r9) ffc10018: 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 ); ffc1001c: 3c a0 00 00 lis r5,0 Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { _Scheduler_priority_Block_body(the_scheduler, the_thread); } ffc10020: 81 43 00 00 lwz r10,0(r3) ffc10024: 81 65 27 74 lwz r11,10100(r5) ffc10028: 7d 66 00 34 cntlzw r6,r11 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc1002c: 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 ); ffc10030: 91 65 27 74 stw r11,10100(r5) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc10034: 38 e7 2d 60 addi r7,r7,11616 ffc10038: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc1003c: 7c 07 40 2e lwzx r0,r7,r8 ffc10040: 7c 0b 00 34 cntlzw r11,r0 return (_Priority_Bits_index( major ) << 4) + ffc10044: 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 ); ffc10048: 7c 07 41 2e stwx r0,r7,r8 return (_Priority_Bits_index( major ) << 4) + ffc1004c: 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 ] ) ) ffc10050: 1d 6b 00 0c mulli r11,r11,12 ffc10054: 7d 0a 5a 14 add r8,r10,r11 ffc10058: 7d 6a 58 2e lwzx r11,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 ); ffc1005c: 38 08 00 04 addi r0,r8,4 ffc10060: 7f 8b 00 00 cmpw cr7,r11,r0 return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc10064: 38 00 00 00 li r0,0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc10068: 41 9e 00 08 beq- cr7,ffc10070 <_Scheduler_priority_Block+0xa8><== NEVER TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); ffc1006c: 7d 60 5b 78 mr r0,r11 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body( Scheduler_Control *the_scheduler ) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc10070: 90 09 00 10 stw r0,16(r9) /* TODO: flash critical section */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(the_scheduler); if ( _Thread_Is_executing( the_thread ) ) ffc10074: 80 09 00 0c lwz r0,12(r9) ffc10078: 7f 84 00 00 cmpw cr7,r4,r0 ffc1007c: 4c be 00 20 bnelr+ cr7 ffc10080: 4b ff ff 90 b ffc10010 <_Scheduler_priority_Block+0x48> 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 ); ffc10084: 38 09 00 04 addi r0,r9,4 head->next = tail; head->previous = NULL; tail->previous = head; ffc10088: 91 29 00 08 stw r9,8(r9) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1008c: 90 09 00 00 stw r0,0(r9) head->previous = NULL; ffc10090: 38 00 00 00 li r0,0 ffc10094: 90 09 00 04 stw r0,4(r9) { Chain_Control *ready = the_thread->scheduler.priority->ready_chain; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_bit_map_Remove( &the_thread->scheduler.priority->Priority_map ); ffc10098: 81 24 00 8c lwz r9,140(r4) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc1009c: 81 69 00 04 lwz r11,4(r9) ffc100a0: 80 09 00 14 lwz r0,20(r9) ffc100a4: 81 4b 00 00 lwz r10,0(r11) ffc100a8: 7d 40 00 38 and r0,r10,r0 if ( *the_priority_map->minor == 0 ) ffc100ac: 2f 80 00 00 cmpwi cr7,r0,0 RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc100b0: 90 0b 00 00 stw r0,0(r11) if ( *the_priority_map->minor == 0 ) ffc100b4: 40 be ff 3c bne- cr7,ffc0fff0 <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; ffc100b8: 3d 60 00 00 lis r11,0 ffc100bc: 80 09 00 10 lwz r0,16(r9) ffc100c0: 81 4b 27 74 lwz r10,10100(r11) ffc100c4: 7d 40 00 38 and r0,r10,r0 ffc100c8: 90 0b 27 74 stw r0,10100(r11) ffc100cc: 4b ff ff 24 b ffc0fff0 <_Scheduler_priority_Block+0x28> =============================================================================== ffc0b3dc <_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 ); ffc0b3dc: 3d 20 00 00 lis r9,0 void _Scheduler_priority_Schedule( Scheduler_Control *the_scheduler ) { _Scheduler_priority_Schedule_body( the_scheduler ); } ffc0b3e0: 81 63 00 00 lwz r11,0(r3) ffc0b3e4: 80 09 27 74 lwz r0,10100(r9) ffc0b3e8: 7c 07 00 34 cntlzw r7,r0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b3ec: 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 ); ffc0b3f0: 90 09 27 74 stw r0,10100(r9) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b3f4: 39 08 2d 60 addi r8,r8,11616 ffc0b3f8: 54 ea 10 3a rlwinm r10,r7,2,0,29 ffc0b3fc: 7c c8 50 2e lwzx r6,r8,r10 ffc0b400: 7c c0 33 78 mr r0,r6 ffc0b404: 7c 06 00 34 cntlzw r6,r0 return (_Priority_Bits_index( major ) << 4) + ffc0b408: 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 ); ffc0b40c: 7c 08 51 2e stwx r0,r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc0b410: 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 ] ) ) ffc0b414: 1d 29 00 0c mulli r9,r9,12 ffc0b418: 7d 4b 4a 14 add r10,r11,r9 ffc0b41c: 7d 2b 48 2e lwzx r9,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 ); ffc0b420: 38 0a 00 04 addi r0,r10,4 ffc0b424: 7f 89 00 00 cmpw cr7,r9,r0 return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0b428: 38 00 00 00 li r0,0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0b42c: 41 9e 00 08 beq- cr7,ffc0b434 <_Scheduler_priority_Schedule+0x58><== NEVER TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); ffc0b430: 7d 20 4b 78 mr r0,r9 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body( Scheduler_Control *the_scheduler ) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0b434: 3d 20 00 00 lis r9,0 ffc0b438: 90 09 2d 48 stw r0,11592(r9) ffc0b43c: 4e 80 00 20 blr =============================================================================== ffc0b590 <_Scheduler_priority_Yield>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc0b590: 3d 40 00 00 lis r10,0 ffc0b594: 39 4a 2d 38 addi r10,r10,11576 ffc0b598: 81 2a 00 0c lwz r9,12(r10) ready = executing->scheduler.priority->ready_chain; ffc0b59c: 81 69 00 8c lwz r11,140(r9) ffc0b5a0: 81 6b 00 00 lwz r11,0(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b5a4: 7c 00 00 a6 mfmsr r0 ffc0b5a8: 7d 10 42 a6 mfsprg r8,0 ffc0b5ac: 7c 08 40 78 andc r8,r0,r8 ffc0b5b0: 7d 00 01 24 mtmsr r8 _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { ffc0b5b4: 80 eb 00 00 lwz r7,0(r11) ffc0b5b8: 81 0b 00 08 lwz r8,8(r11) ffc0b5bc: 7f 87 40 00 cmpw cr7,r7,r8 ffc0b5c0: 41 9e 00 60 beq- cr7,ffc0b620 <_Scheduler_priority_Yield+0x90> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0b5c4: 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 ); ffc0b5c8: 38 ab 00 04 addi r5,r11,4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0b5cc: 80 e9 00 04 lwz r7,4(r9) next->previous = previous; ffc0b5d0: 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; ffc0b5d4: 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; ffc0b5d8: 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; ffc0b5dc: 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; ffc0b5e0: 90 a9 00 00 stw r5,0(r9) tail->previous = the_node; old_last->next = the_node; the_node->previous = old_last; ffc0b5e4: 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; ffc0b5e8: 91 28 00 00 stw r9,0(r8) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0b5ec: 7d 00 00 a6 mfmsr r8 ffc0b5f0: 7c 00 01 24 mtmsr r0 ffc0b5f4: 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 ) ) ffc0b5f8: 81 0a 00 10 lwz r8,16(r10) ffc0b5fc: 7f 89 40 00 cmpw cr7,r9,r8 ffc0b600: 41 9e 00 14 beq- cr7,ffc0b614 <_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; ffc0b604: 39 20 00 01 li r9,1 ffc0b608: 99 2a 00 18 stb r9,24(r10) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b60c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); } ffc0b610: 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 ); ffc0b614: 81 2b 00 00 lwz r9,0(r11) ffc0b618: 91 2a 00 10 stw r9,16(r10) ffc0b61c: 4b ff ff e8 b ffc0b604 <_Scheduler_priority_Yield+0x74> _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) ffc0b620: 81 6a 00 10 lwz r11,16(r10) ffc0b624: 7f 89 58 00 cmpw cr7,r9,r11 ffc0b628: 40 9e ff dc bne+ cr7,ffc0b604 <_Scheduler_priority_Yield+0x74><== NEVER TAKEN ffc0b62c: 4b ff ff e0 b ffc0b60c <_Scheduler_priority_Yield+0x7c> =============================================================================== ffc0a2f4 <_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() ); ffc0a2f4: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc0a2f8: 94 21 ff d8 stwu r1,-40(r1) ffc0a2fc: 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 ); ffc0a300: 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() ); ffc0a304: 81 69 20 ac lwz r11,8364(r9) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0a308: 3d 20 00 00 lis r9,0 ffc0a30c: 81 49 27 64 lwz r10,10084(r9) /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc0a310: 38 63 27 30 addi r3,r3,10032 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a314: 1d 6b 03 e8 mulli r11,r11,1000 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc0a318: 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 ); ffc0a31c: 3b e1 00 08 addi r31,r1,8 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc0a320: 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 ); ffc0a324: 7f e4 fb 78 mr r4,r31 /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0a328: 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() ); ffc0a32c: 91 61 00 0c stw r11,12(r1) ffc0a330: 39 40 00 00 li r10,0 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0a334: 90 09 27 64 stw r0,10084(r9) { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a338: 91 41 00 08 stw r10,8(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc0a33c: 48 00 29 49 bl ffc0cc84 <_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 ); ffc0a340: 3c 60 00 00 lis r3,0 ffc0a344: 38 63 27 40 addi r3,r3,10048 ffc0a348: 7f e4 fb 78 mr r4,r31 ffc0a34c: 48 00 29 39 bl ffc0cc84 <_Timespec_Add_to> while ( seconds ) { ffc0a350: 7c 60 1b 79 mr. r0,r3 ffc0a354: 90 01 00 18 stw r0,24(r1) ffc0a358: 41 82 00 24 beq- ffc0a37c <_TOD_Tickle_ticks+0x88> ffc0a35c: 3f e0 00 00 lis r31,0 ffc0a360: 3b ff 2c 5c addi r31,r31,11356 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); ffc0a364: 7f e3 fb 78 mr r3,r31 ffc0a368: 48 00 31 2d bl ffc0d494 <_Watchdog_Tickle> ffc0a36c: 80 01 00 18 lwz r0,24(r1) ffc0a370: 35 20 ff ff addic. r9,r0,-1 ffc0a374: 91 21 00 18 stw r9,24(r1) ffc0a378: 40 82 ff ec bne+ ffc0a364 <_TOD_Tickle_ticks+0x70> <== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } ffc0a37c: 80 01 00 2c lwz r0,44(r1) ffc0a380: 83 e1 00 24 lwz r31,36(r1) ffc0a384: 38 21 00 28 addi r1,r1,40 ffc0a388: 7c 08 03 a6 mtlr r0 ffc0a38c: 4e 80 00 20 blr =============================================================================== ffc0b694 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc0b694: 94 21 ff e8 stwu r1,-24(r1) ffc0b698: 7c 08 02 a6 mflr r0 ffc0b69c: 90 01 00 1c stw r0,28(r1) ffc0b6a0: 93 e1 00 14 stw r31,20(r1) ffc0b6a4: 7c 7f 1b 78 mr r31,r3 ffc0b6a8: 93 81 00 08 stw r28,8(r1) ffc0b6ac: 7c bc 2b 78 mr r28,r5 ffc0b6b0: 93 a1 00 0c stw r29,12(r1) ffc0b6b4: 93 c1 00 10 stw r30,16(r1) ffc0b6b8: 7c 9e 23 78 mr r30,r4 */ /* * Save original state */ original_state = the_thread->current_state; ffc0b6bc: 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 ); ffc0b6c0: 48 00 12 4d bl ffc0c90c <_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 ) ffc0b6c4: 80 1f 00 14 lwz r0,20(r31) ffc0b6c8: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0b6cc: 41 9e 00 10 beq- cr7,ffc0b6dc <_Thread_Change_priority+0x48> _Thread_Set_priority( the_thread, new_priority ); ffc0b6d0: 7f e3 fb 78 mr r3,r31 ffc0b6d4: 7f c4 f3 78 mr r4,r30 ffc0b6d8: 48 00 11 6d bl ffc0c844 <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b6dc: 7f c0 00 a6 mfmsr r30 ffc0b6e0: 7c 10 42 a6 mfsprg r0,0 ffc0b6e4: 7f c0 00 78 andc r0,r30,r0 ffc0b6e8: 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; ffc0b6ec: 80 1f 00 10 lwz r0,16(r31) if ( state != STATES_TRANSIENT ) { ffc0b6f0: 2f 80 00 04 cmpwi cr7,r0,4 ffc0b6f4: 41 9e 00 88 beq- cr7,ffc0b77c <_Thread_Change_priority+0xe8> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc0b6f8: 73 a9 00 04 andi. r9,r29,4 ffc0b6fc: 41 82 00 38 beq- ffc0b734 <_Thread_Change_priority+0xa0><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b700: 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); ffc0b704: 3d 20 00 03 lis r9,3 <== NOT EXECUTED ffc0b708: 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 ) ) { ffc0b70c: 7c 0b 48 39 and. r11,r0,r9 <== NOT EXECUTED ffc0b710: 40 82 00 40 bne- ffc0b750 <_Thread_Change_priority+0xbc><== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0b714: 80 01 00 1c lwz r0,28(r1) ffc0b718: 83 81 00 08 lwz r28,8(r1) ffc0b71c: 7c 08 03 a6 mtlr r0 ffc0b720: 83 a1 00 0c lwz r29,12(r1) ffc0b724: 83 c1 00 10 lwz r30,16(r1) ffc0b728: 83 e1 00 14 lwz r31,20(r1) ffc0b72c: 38 21 00 18 addi r1,r1,24 ffc0b730: 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); ffc0b734: 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 ); ffc0b738: 91 3f 00 10 stw r9,16(r31) ffc0b73c: 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); ffc0b740: 3d 20 00 03 lis r9,3 ffc0b744: 61 29 be e0 ori r9,r9,48864 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0b748: 7c 0b 48 39 and. r11,r0,r9 ffc0b74c: 41 82 ff c8 beq+ ffc0b714 <_Thread_Change_priority+0x80> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0b750: 80 7f 00 44 lwz r3,68(r31) ffc0b754: 7f e4 fb 78 mr r4,r31 ffc0b758: 48 00 0f f5 bl ffc0c74c <_Thread_queue_Requeue> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0b75c: 80 01 00 1c lwz r0,28(r1) ffc0b760: 83 81 00 08 lwz r28,8(r1) ffc0b764: 7c 08 03 a6 mtlr r0 ffc0b768: 83 a1 00 0c lwz r29,12(r1) ffc0b76c: 83 c1 00 10 lwz r30,16(r1) ffc0b770: 83 e1 00 14 lwz r31,20(r1) ffc0b774: 38 21 00 18 addi r1,r1,24 ffc0b778: 4e 80 00 20 blr } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc0b77c: 73 bd 00 04 andi. r29,r29,4 ffc0b780: 40 82 00 58 bne- ffc0b7d8 <_Thread_Change_priority+0x144><== NEVER TAKEN * FIXME: hard-coded for priority scheduling. Might be ok since this * function is specific to priority scheduling? */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); if ( prepend_it ) ffc0b784: 2f 9c 00 00 cmpwi cr7,r28,0 * Ready Queue with interrupts off. * * FIXME: hard-coded for priority scheduling. Might be ok since this * function is specific to priority scheduling? */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc0b788: 93 bf 00 10 stw r29,16(r31) if ( prepend_it ) ffc0b78c: 41 9e 00 bc beq- cr7,ffc0b848 <_Thread_Change_priority+0x1b4> RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue_first( Thread_Control *the_thread ) { _Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map ); ffc0b790: 81 3f 00 8c lwz r9,140(r31) ffc0b794: 3d 40 00 00 lis r10,0 RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0b798: 81 69 00 04 lwz r11,4(r9) ffc0b79c: 80 09 00 0c lwz r0,12(r9) ffc0b7a0: 81 0b 00 00 lwz r8,0(r11) ffc0b7a4: 7d 00 03 78 or r0,r8,r0 ffc0b7a8: 90 0b 00 00 stw r0,0(r11) _Chain_Prepend_unprotected( the_thread->scheduler.priority->ready_chain, ffc0b7ac: 81 7f 00 8c lwz r11,140(r31) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0b7b0: 80 09 00 08 lwz r0,8(r9) ffc0b7b4: 81 2b 00 00 lwz r9,0(r11) ffc0b7b8: 81 0a 27 74 lwz r8,10100(r10) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0b7bc: 81 69 00 00 lwz r11,0(r9) ffc0b7c0: 7d 00 03 78 or r0,r8,r0 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0b7c4: 91 3f 00 04 stw r9,4(r31) ffc0b7c8: 90 0a 27 74 stw r0,10100(r10) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; ffc0b7cc: 93 eb 00 04 stw r31,4(r11) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; ffc0b7d0: 93 e9 00 00 stw r31,0(r9) the_node->next = before_node; ffc0b7d4: 91 7f 00 00 stw r11,0(r31) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0b7d8: 7c 00 00 a6 mfmsr r0 ffc0b7dc: 7f c0 01 24 mtmsr r30 ffc0b7e0: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( Scheduler_Control *the_scheduler ) { the_scheduler->Operations.schedule( the_scheduler ); ffc0b7e4: 3c 60 00 00 lis r3,0 ffc0b7e8: 38 63 2c 20 addi r3,r3,11296 ffc0b7ec: 80 03 00 04 lwz r0,4(r3) ffc0b7f0: 7c 09 03 a6 mtctr r0 ffc0b7f4: 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 ); ffc0b7f8: 3d 20 00 00 lis r9,0 ffc0b7fc: 39 29 2d 38 addi r9,r9,11576 ffc0b800: 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(&_Scheduler); if ( !_Thread_Is_executing_also_the_heir() && ffc0b804: 80 09 00 10 lwz r0,16(r9) ffc0b808: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0b80c: 41 9e 00 18 beq- cr7,ffc0b824 <_Thread_Change_priority+0x190> ffc0b810: 88 0b 00 74 lbz r0,116(r11) ffc0b814: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b818: 41 9e 00 0c beq- cr7,ffc0b824 <_Thread_Change_priority+0x190> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; ffc0b81c: 38 00 00 01 li r0,1 ffc0b820: 98 09 00 18 stb r0,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b824: 7f c0 01 24 mtmsr r30 _ISR_Enable( level ); } ffc0b828: 80 01 00 1c lwz r0,28(r1) ffc0b82c: 83 81 00 08 lwz r28,8(r1) ffc0b830: 7c 08 03 a6 mtlr r0 ffc0b834: 83 a1 00 0c lwz r29,12(r1) ffc0b838: 83 c1 00 10 lwz r30,16(r1) ffc0b83c: 83 e1 00 14 lwz r31,20(r1) ffc0b840: 38 21 00 18 addi r1,r1,24 ffc0b844: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue( Thread_Control *the_thread ) { _Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map ); ffc0b848: 81 3f 00 8c lwz r9,140(r31) ffc0b84c: 3d 40 00 00 lis r10,0 RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0b850: 81 69 00 04 lwz r11,4(r9) ffc0b854: 80 09 00 0c lwz r0,12(r9) ffc0b858: 81 0b 00 00 lwz r8,0(r11) ffc0b85c: 7d 00 03 78 or r0,r8,r0 ffc0b860: 90 0b 00 00 stw r0,0(r11) _Chain_Append_unprotected( the_thread->scheduler.priority->ready_chain, ffc0b864: 81 7f 00 8c lwz r11,140(r31) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0b868: 80 09 00 08 lwz r0,8(r9) ffc0b86c: 81 2b 00 00 lwz r9,0(r11) ffc0b870: 81 0a 27 74 lwz r8,10100(r10) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; ffc0b874: 81 69 00 08 lwz r11,8(r9) ffc0b878: 7d 08 03 78 or r8,r8,r0 the_node->next = tail; tail->previous = the_node; ffc0b87c: 93 e9 00 08 stw r31,8(r9) RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); ffc0b880: 38 09 00 04 addi r0,r9,4 ffc0b884: 91 0a 27 74 stw r8,10100(r10) Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; old_last->next = the_node; the_node->previous = old_last; ffc0b888: 91 7f 00 04 stw r11,4(r31) ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; ffc0b88c: 90 1f 00 00 stw r0,0(r31) tail->previous = the_node; old_last->next = the_node; ffc0b890: 93 eb 00 00 stw r31,0(r11) ffc0b894: 4b ff ff 44 b ffc0b7d8 <_Thread_Change_priority+0x144> =============================================================================== ffc0b920 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { ffc0b920: 94 21 ff e8 stwu r1,-24(r1) ffc0b924: 7c 08 02 a6 mflr r0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0b928: 39 60 00 00 li r11,0 ffc0b92c: 90 01 00 1c stw r0,28(r1) RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( ffc0b930: a0 04 00 0a lhz r0,10(r4) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0b934: 81 23 00 1c lwz r9,28(r3) ffc0b938: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0b93c: 93 c1 00 10 stw r30,16(r1) ffc0b940: 7c 7e 1b 78 mr r30,r3 ffc0b944: 93 e1 00 14 stw r31,20(r1) ffc0b948: 7c 9f 23 78 mr r31,r4 ffc0b94c: 93 a1 00 0c stw r29,12(r1) ffc0b950: 7d 69 01 2e stwx r11,r9,r0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0b954: 3f a0 00 00 lis r29,0 ffc0b958: 81 3d 27 28 lwz r9,10024(r29) * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); ffc0b95c: 7c 83 23 78 mr r3,r4 ffc0b960: 38 09 ff ff addi r0,r9,-1 ffc0b964: 90 1d 27 28 stw r0,10024(r29) ffc0b968: 48 00 17 0d bl ffc0d074 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0b96c: 81 3d 27 28 lwz r9,10024(r29) ffc0b970: 38 09 00 01 addi r0,r9,1 ffc0b974: 90 1d 27 28 stw r0,10024(r29) /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); ffc0b978: 7f e4 fb 78 mr r4,r31 ffc0b97c: 7f c3 f3 78 mr r3,r30 ffc0b980: 4b ff ef b9 bl ffc0a938 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); ffc0b984: 7f e3 fb 78 mr r3,r31 ffc0b988: 38 80 00 01 li r4,1 ffc0b98c: 48 00 0e f9 bl ffc0c884 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { ffc0b990: 7f e3 fb 78 mr r3,r31 ffc0b994: 48 00 0c bd bl ffc0c650 <_Thread_queue_Extract_with_proxy> ffc0b998: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b99c: 40 9e 00 10 bne- cr7,ffc0b9ac <_Thread_Close+0x8c> if ( _Watchdog_Is_active( &the_thread->Timer ) ) ffc0b9a0: 80 1f 00 50 lwz r0,80(r31) ffc0b9a4: 2f 80 00 02 cmpwi cr7,r0,2 ffc0b9a8: 41 9e 00 78 beq- cr7,ffc0ba20 <_Thread_Close+0x100> RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_free( Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return the_scheduler->Operations.scheduler_free( the_scheduler, the_thread ); ffc0b9ac: 3c 60 00 00 lis r3,0 ffc0b9b0: 38 63 2c 20 addi r3,r3,11296 ffc0b9b4: 80 03 00 18 lwz r0,24(r3) ffc0b9b8: 7f e4 fb 78 mr r4,r31 ffc0b9bc: 7c 09 03 a6 mtctr r0 ffc0b9c0: 4e 80 04 21 bctrl if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) ffc0b9c4: 80 7f 00 bc lwz r3,188(r31) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; ffc0b9c8: 38 00 00 00 li r0,0 if ( the_thread->Start.fp_context ) ffc0b9cc: 2f 83 00 00 cmpwi cr7,r3,0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; ffc0b9d0: 90 1f 01 24 stw r0,292(r31) if ( the_thread->Start.fp_context ) ffc0b9d4: 41 9e 00 08 beq- cr7,ffc0b9dc <_Thread_Close+0xbc> <== NEVER TAKEN (void) _Workspace_Free( the_thread->Start.fp_context ); ffc0b9d8: 48 00 1c 51 bl ffc0d628 <_Workspace_Free> /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); ffc0b9dc: 7f e3 fb 78 mr r3,r31 ffc0b9e0: 48 00 10 71 bl ffc0ca50 <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) ffc0b9e4: 80 7f 01 34 lwz r3,308(r31) /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; ffc0b9e8: 38 00 00 00 li r0,0 if ( the_thread->extensions ) ffc0b9ec: 2f 83 00 00 cmpwi cr7,r3,0 /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; ffc0b9f0: 90 1f 00 c0 stw r0,192(r31) if ( the_thread->extensions ) ffc0b9f4: 41 9e 00 08 beq- cr7,ffc0b9fc <_Thread_Close+0xdc> (void) _Workspace_Free( the_thread->extensions ); ffc0b9f8: 48 00 1c 31 bl ffc0d628 <_Workspace_Free> the_thread->extensions = NULL; ffc0b9fc: 38 00 00 00 li r0,0 } ffc0ba00: 83 a1 00 0c lwz r29,12(r1) _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; if ( the_thread->extensions ) (void) _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; ffc0ba04: 90 1f 01 34 stw r0,308(r31) } ffc0ba08: 80 01 00 1c lwz r0,28(r1) ffc0ba0c: 83 c1 00 10 lwz r30,16(r1) ffc0ba10: 7c 08 03 a6 mtlr r0 ffc0ba14: 83 e1 00 14 lwz r31,20(r1) ffc0ba18: 38 21 00 18 addi r1,r1,24 ffc0ba1c: 4e 80 00 20 blr */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); ffc0ba20: 38 7f 00 48 addi r3,r31,72 ffc0ba24: 48 00 19 a1 bl ffc0d3c4 <_Watchdog_Remove> ffc0ba28: 4b ff ff 84 b ffc0b9ac <_Thread_Close+0x8c> =============================================================================== ffc0bb28 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0bb28: 94 21 ff e8 stwu r1,-24(r1) ffc0bb2c: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0bb30: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0bb34: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0bb38: 48 00 02 39 bl ffc0bd70 <_Thread_Get> switch ( location ) { ffc0bb3c: 80 01 00 08 lwz r0,8(r1) ffc0bb40: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bb44: 40 9e 00 20 bne- cr7,ffc0bb64 <_Thread_Delay_ended+0x3c><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc0bb48: 3c 80 10 00 lis r4,4096 ffc0bb4c: 60 84 00 18 ori r4,r4,24 ffc0bb50: 4b ff fd 49 bl ffc0b898 <_Thread_Clear_state> ffc0bb54: 3d 20 00 00 lis r9,0 ffc0bb58: 81 69 27 28 lwz r11,10024(r9) ffc0bb5c: 38 0b ff ff addi r0,r11,-1 ffc0bb60: 90 09 27 28 stw r0,10024(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc0bb64: 80 01 00 1c lwz r0,28(r1) ffc0bb68: 38 21 00 18 addi r1,r1,24 ffc0bb6c: 7c 08 03 a6 mtlr r0 ffc0bb70: 4e 80 00 20 blr =============================================================================== ffc0bb74 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0bb74: 94 21 ff b8 stwu r1,-72(r1) ffc0bb78: 7c 08 02 a6 mflr r0 ffc0bb7c: 93 a1 00 3c stw r29,60(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc0bb80: 3f a0 00 00 lis r29,0 ffc0bb84: 3b bd 2d 38 addi r29,r29,11576 * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0bb88: 93 e1 00 44 stw r31,68(r1) ffc0bb8c: 90 01 00 4c stw r0,76(r1) ffc0bb90: 92 a1 00 1c stw r21,28(r1) ffc0bb94: 92 c1 00 20 stw r22,32(r1) ffc0bb98: 92 e1 00 24 stw r23,36(r1) ffc0bb9c: 93 01 00 28 stw r24,40(r1) ffc0bba0: 93 21 00 2c stw r25,44(r1) ffc0bba4: 93 41 00 30 stw r26,48(r1) ffc0bba8: 93 61 00 34 stw r27,52(r1) ffc0bbac: 93 81 00 38 stw r28,56(r1) ffc0bbb0: 93 c1 00 40 stw r30,64(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc0bbb4: 83 fd 00 0c lwz r31,12(r29) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0bbb8: 7c 00 00 a6 mfmsr r0 ffc0bbbc: 7d 30 42 a6 mfsprg r9,0 ffc0bbc0: 7c 09 48 78 andc r9,r0,r9 ffc0bbc4: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0bbc8: 89 3d 00 18 lbz r9,24(r29) ffc0bbcc: 3f 20 00 00 lis r25,0 ffc0bbd0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bbd4: 41 9e 01 30 beq- cr7,ffc0bd04 <_Thread_Dispatch+0x190> heir = _Thread_Heir; ffc0bbd8: 83 dd 00 10 lwz r30,16(r29) _Thread_Dispatch_disable_level = 1; ffc0bbdc: 39 20 00 01 li r9,1 ffc0bbe0: 91 39 27 28 stw r9,10024(r25) _Thread_Dispatch_necessary = false; ffc0bbe4: 39 20 00 00 li r9,0 /* * 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 ) ffc0bbe8: 7f 9f f0 00 cmpw cr7,r31,r30 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; _Thread_Executing = heir; ffc0bbec: 93 dd 00 0c stw r30,12(r29) executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; ffc0bbf0: 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 ) ffc0bbf4: 41 9e 01 10 beq- cr7,ffc0bd04 <_Thread_Dispatch+0x190> ffc0bbf8: 3f 60 00 00 lis r27,0 ffc0bbfc: 3f 00 00 00 lis r24,0 ffc0bc00: 3b 41 00 08 addi r26,r1,8 ffc0bc04: 3b 7b 27 58 addi r27,r27,10072 ffc0bc08: 3b 81 00 10 addi r28,r1,16 ffc0bc0c: 3b 18 27 3c addi r24,r24,10044 #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; ffc0bc10: 3e a0 00 00 lis r21,0 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; ffc0bc14: 3a c0 00 01 li r22,1 _Thread_Dispatch_necessary = false; ffc0bc18: 3a e0 00 00 li r23,0 ffc0bc1c: 48 00 00 d0 b ffc0bcec <_Thread_Dispatch+0x178> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0bc20: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc0bc24: 7f 43 d3 78 mr r3,r26 ffc0bc28: 48 00 3f 29 bl ffc0fb50 <_TOD_Get_uptime> _Timestamp_Subtract( ffc0bc2c: 7f 63 db 78 mr r3,r27 ffc0bc30: 7f 44 d3 78 mr r4,r26 ffc0bc34: 7f 85 e3 78 mr r5,r28 ffc0bc38: 48 00 10 a9 bl ffc0cce0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); ffc0bc3c: 7f 84 e3 78 mr r4,r28 ffc0bc40: 38 7f 00 84 addi r3,r31,132 ffc0bc44: 48 00 10 41 bl ffc0cc84 <_Timespec_Add_to> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0bc48: 81 78 00 00 lwz r11,0(r24) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0bc4c: 81 21 00 08 lwz r9,8(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0bc50: 7f e3 fb 78 mr r3,r31 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0bc54: 2f 8b 00 00 cmpwi cr7,r11,0 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0bc58: 81 41 00 0c lwz r10,12(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0bc5c: 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; ffc0bc60: 91 3b 00 00 stw r9,0(r27) ffc0bc64: 91 5b 00 04 stw r10,4(r27) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0bc68: 41 9e 00 14 beq- cr7,ffc0bc7c <_Thread_Dispatch+0x108> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc0bc6c: 80 0b 00 00 lwz r0,0(r11) ffc0bc70: 90 1f 01 28 stw r0,296(r31) *_Thread_libc_reent = heir->libc_reent; ffc0bc74: 80 1e 01 28 lwz r0,296(r30) ffc0bc78: 90 0b 00 00 stw r0,0(r11) } _User_extensions_Thread_switch( executing, heir ); ffc0bc7c: 48 00 15 05 bl ffc0d180 <_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 ) ffc0bc80: 80 1f 01 24 lwz r0,292(r31) _Context_Save_fp( &executing->fp_context ); ffc0bc84: 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 ) ffc0bc88: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bc8c: 41 9e 00 08 beq- cr7,ffc0bc94 <_Thread_Dispatch+0x120> _Context_Save_fp( &executing->fp_context ); ffc0bc90: 48 00 b5 d1 bl ffc17260 <_CPU_Context_save_fp> #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc0bc94: 38 7f 00 c4 addi r3,r31,196 ffc0bc98: 38 9e 00 c4 addi r4,r30,196 ffc0bc9c: 48 00 b7 45 bl ffc173e0 <_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 ) ffc0bca0: 80 1f 01 24 lwz r0,292(r31) _Context_Restore_fp( &executing->fp_context ); ffc0bca4: 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 ) ffc0bca8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bcac: 41 9e 00 08 beq- cr7,ffc0bcb4 <_Thread_Dispatch+0x140> _Context_Restore_fp( &executing->fp_context ); ffc0bcb0: 48 00 b6 71 bl ffc17320 <_CPU_Context_restore_fp> #endif #endif executing = _Thread_Executing; ffc0bcb4: 83 fd 00 0c lwz r31,12(r29) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0bcb8: 7c 00 00 a6 mfmsr r0 ffc0bcbc: 7d 30 42 a6 mfsprg r9,0 ffc0bcc0: 7c 09 48 78 andc r9,r0,r9 ffc0bcc4: 7d 20 01 24 mtmsr r9 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0bcc8: 89 3d 00 18 lbz r9,24(r29) ffc0bccc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bcd0: 41 9e 00 34 beq- cr7,ffc0bd04 <_Thread_Dispatch+0x190> heir = _Thread_Heir; ffc0bcd4: 83 dd 00 10 lwz r30,16(r29) _Thread_Dispatch_disable_level = 1; ffc0bcd8: 92 d9 27 28 stw r22,10024(r25) /* * 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 ) ffc0bcdc: 7f 9e f8 00 cmpw cr7,r30,r31 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; ffc0bce0: 9a fd 00 18 stb r23,24(r29) _Thread_Executing = heir; ffc0bce4: 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 ) ffc0bce8: 41 9e 00 1c beq- cr7,ffc0bd04 <_Thread_Dispatch+0x190> <== 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 ) ffc0bcec: 81 3e 00 7c lwz r9,124(r30) ffc0bcf0: 2f 89 00 01 cmpwi cr7,r9,1 ffc0bcf4: 40 9e ff 2c bne+ cr7,ffc0bc20 <_Thread_Dispatch+0xac> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0bcf8: 81 35 27 24 lwz r9,10020(r21) ffc0bcfc: 91 3e 00 78 stw r9,120(r30) ffc0bd00: 4b ff ff 20 b ffc0bc20 <_Thread_Dispatch+0xac> _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; ffc0bd04: 39 20 00 00 li r9,0 ffc0bd08: 91 39 27 28 stw r9,10024(r25) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0bd0c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _API_extensions_Run_postswitch(); ffc0bd10: 4b ff dd 89 bl ffc09a98 <_API_extensions_Run_postswitch> } ffc0bd14: 80 01 00 4c lwz r0,76(r1) ffc0bd18: 82 a1 00 1c lwz r21,28(r1) ffc0bd1c: 7c 08 03 a6 mtlr r0 ffc0bd20: 82 c1 00 20 lwz r22,32(r1) ffc0bd24: 82 e1 00 24 lwz r23,36(r1) ffc0bd28: 83 01 00 28 lwz r24,40(r1) ffc0bd2c: 83 21 00 2c lwz r25,44(r1) ffc0bd30: 83 41 00 30 lwz r26,48(r1) ffc0bd34: 83 61 00 34 lwz r27,52(r1) ffc0bd38: 83 81 00 38 lwz r28,56(r1) ffc0bd3c: 83 a1 00 3c lwz r29,60(r1) ffc0bd40: 83 c1 00 40 lwz r30,64(r1) ffc0bd44: 83 e1 00 44 lwz r31,68(r1) ffc0bd48: 38 21 00 48 addi r1,r1,72 ffc0bd4c: 4e 80 00 20 blr =============================================================================== ffc0bd70 <_Thread_Get>: */ Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { ffc0bd70: 7c 08 02 a6 mflr r0 ffc0bd74: 94 21 ff f8 stwu r1,-8(r1) ffc0bd78: 7c 85 23 78 mr r5,r4 ffc0bd7c: 90 01 00 0c stw r0,12(r1) uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { ffc0bd80: 7c 60 1b 79 mr. r0,r3 ffc0bd84: 41 82 00 78 beq- ffc0bdfc <_Thread_Get+0x8c> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc0bd88: 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 ) ffc0bd8c: 39 69 ff ff addi r11,r9,-1 ffc0bd90: 2b 8b 00 02 cmplwi cr7,r11,2 ffc0bd94: 41 9d 00 4c bgt- cr7,ffc0bde0 <_Thread_Get+0x70> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) ffc0bd98: 54 0a 2e fe rlwinm r10,r0,5,27,31 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ ffc0bd9c: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0bda0: 40 9e 00 40 bne- cr7,ffc0bde0 <_Thread_Get+0x70> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; ffc0bda4: 3d 60 00 00 lis r11,0 ffc0bda8: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0bdac: 39 6b 2b 40 addi r11,r11,11072 ffc0bdb0: 7d 2b 48 2e lwzx r9,r11,r9 /* * There is no way for this to happen if POSIX is enabled. */ #if !defined(RTEMS_POSIX_API) if ( !api_information ) { ffc0bdb4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bdb8: 41 9e 00 78 beq- cr7,ffc0be30 <_Thread_Get+0xc0> <== NEVER TAKEN *location = OBJECTS_ERROR; goto done; } #endif information = api_information[ the_class ]; ffc0bdbc: 80 69 00 04 lwz r3,4(r9) if ( !information ) { ffc0bdc0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bdc4: 41 9e 00 64 beq- cr7,ffc0be28 <_Thread_Get+0xb8> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); ffc0bdc8: 7c 04 03 78 mr r4,r0 ffc0bdcc: 4b ff f0 c1 bl ffc0ae8c <_Objects_Get> done: return tp; } ffc0bdd0: 80 01 00 0c lwz r0,12(r1) ffc0bdd4: 38 21 00 08 addi r1,r1,8 ffc0bdd8: 7c 08 03 a6 mtlr r0 ffc0bddc: 4e 80 00 20 blr goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; ffc0bde0: 38 00 00 01 li r0,1 ffc0bde4: 90 05 00 00 stw r0,0(r5) { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; ffc0bde8: 38 60 00 00 li r3,0 tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } ffc0bdec: 80 01 00 0c lwz r0,12(r1) ffc0bdf0: 38 21 00 08 addi r1,r1,8 ffc0bdf4: 7c 08 03 a6 mtlr r0 ffc0bdf8: 4e 80 00 20 blr rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0bdfc: 3d 20 00 00 lis r9,0 ffc0be00: 81 69 27 28 lwz r11,10024(r9) ffc0be04: 39 6b 00 01 addi r11,r11,1 ffc0be08: 91 69 27 28 stw r11,10024(r9) Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; ffc0be0c: 90 04 00 00 stw r0,0(r4) tp = _Thread_Executing; ffc0be10: 3d 20 00 00 lis r9,0 tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } ffc0be14: 80 01 00 0c lwz r0,12(r1) ffc0be18: 38 21 00 08 addi r1,r1,8 Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; ffc0be1c: 80 69 2d 44 lwz r3,11588(r9) tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } ffc0be20: 7c 08 03 a6 mtlr r0 ffc0be24: 4e 80 00 20 blr } #endif information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; ffc0be28: 91 45 00 00 stw r10,0(r5) goto done; ffc0be2c: 4b ff ff c0 b ffc0bdec <_Thread_Get+0x7c> /* * There is no way for this to happen if POSIX is enabled. */ #if !defined(RTEMS_POSIX_API) if ( !api_information ) { *location = OBJECTS_ERROR; ffc0be30: 91 45 00 00 stw r10,0(r5) <== NOT EXECUTED { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; ffc0be34: 38 60 00 00 li r3,0 <== NOT EXECUTED * There is no way for this to happen if POSIX is enabled. */ #if !defined(RTEMS_POSIX_API) if ( !api_information ) { *location = OBJECTS_ERROR; goto done; ffc0be38: 4b ff ff b4 b ffc0bdec <_Thread_Get+0x7c> <== NOT EXECUTED =============================================================================== ffc12178 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc12178: 94 21 ff f0 stwu r1,-16(r1) ffc1217c: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc12180: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc12184: 90 01 00 14 stw r0,20(r1) ffc12188: 93 e1 00 0c stw r31,12(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc1218c: 83 e9 2d 44 lwz r31,11588(r9) * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc12190: 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; ffc12194: 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); ffc12198: 38 00 00 00 li r0,0 ffc1219c: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc121a0: 71 2b 00 01 andi. r11,r9,1 ffc121a4: 40 82 00 58 bne- ffc121fc <_Thread_Handler+0x84> static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc121a8: 7d 30 42 a6 mfsprg r9,0 msr |= ppc_interrupt_get_disable_mask(); ffc121ac: 7d 20 03 78 or r0,r9,r0 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc121b0: 7c 00 01 24 mtmsr r0 _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc121b4: 3d 20 00 00 lis r9,0 ffc121b8: 8b c9 28 dc lbz r30,10460(r9) doneConstructors = 1; ffc121bc: 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 ); ffc121c0: 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; ffc121c4: 98 09 28 dc stb r0,10460(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 ); ffc121c8: 4b ff ac 7d bl ffc0ce44 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc121cc: 4b ff 9b 85 bl ffc0bd50 <_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) */ { ffc121d0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc121d4: 41 9e 00 58 beq- cr7,ffc1222c <_Thread_Handler+0xb4> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc121d8: 80 1f 00 94 lwz r0,148(r31) ffc121dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc121e0: 41 9e 00 5c beq- cr7,ffc1223c <_Thread_Handler+0xc4> <== 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 ); ffc121e4: 7f e3 fb 78 mr r3,r31 ffc121e8: 4b ff ac d1 bl ffc0ceb8 <_User_extensions_Thread_exitted> _Internal_error_Occurred( ffc121ec: 38 60 00 00 li r3,0 ffc121f0: 38 80 00 01 li r4,1 ffc121f4: 38 a0 00 05 li r5,5 ffc121f8: 4b ff 86 21 bl ffc0a818 <_Internal_error_Occurred> ffc121fc: 7d 30 42 a6 mfsprg r9,0 _CPU_MSR_GET(msr); if (!(level & CPU_MODES_INTERRUPT_MASK)) { msr |= ppc_interrupt_get_disable_mask(); } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc12200: 7c 00 48 78 andc r0,r0,r9 } _CPU_MSR_SET(msr); ffc12204: 7c 00 01 24 mtmsr r0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc12208: 3d 20 00 00 lis r9,0 ffc1220c: 8b c9 28 dc lbz r30,10460(r9) doneConstructors = 1; ffc12210: 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 ); ffc12214: 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; ffc12218: 98 09 28 dc stb r0,10460(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 ); ffc1221c: 4b ff ac 29 bl ffc0ce44 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc12220: 4b ff 9b 31 bl ffc0bd50 <_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) */ { ffc12224: 2f 9e 00 00 cmpwi cr7,r30,0 ffc12228: 40 9e ff b0 bne+ cr7,ffc121d8 <_Thread_Handler+0x60> <== ALWAYS TAKEN INIT_NAME (); ffc1222c: 48 00 60 f1 bl ffc1831c <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc12230: 80 1f 00 94 lwz r0,148(r31) ffc12234: 2f 80 00 00 cmpwi cr7,r0,0 ffc12238: 40 9e ff ac bne+ cr7,ffc121e4 <_Thread_Handler+0x6c> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc1223c: 80 1f 00 90 lwz r0,144(r31) ffc12240: 80 7f 00 9c lwz r3,156(r31) ffc12244: 7c 09 03 a6 mtctr r0 ffc12248: 4e 80 04 21 bctrl INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = ffc1224c: 90 7f 00 28 stw r3,40(r31) ffc12250: 4b ff ff 94 b ffc121e4 <_Thread_Handler+0x6c> =============================================================================== ffc0be3c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0be3c: 94 21 ff d0 stwu r1,-48(r1) ffc0be40: 7c 08 02 a6 mflr r0 ffc0be44: 7d 80 00 26 mfcr r12 ffc0be48: 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; ffc0be4c: 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 ) { ffc0be50: 90 01 00 34 stw r0,52(r1) ffc0be54: 92 e1 00 0c stw r23,12(r1) ffc0be58: 93 01 00 10 stw r24,16(r1) ffc0be5c: 7d 58 53 78 mr r24,r10 ffc0be60: 93 21 00 14 stw r25,20(r1) ffc0be64: 7d 39 4b 78 mr r25,r9 ffc0be68: 93 41 00 18 stw r26,24(r1) ffc0be6c: 7d 1a 43 78 mr r26,r8 ffc0be70: 93 61 00 1c stw r27,28(r1) ffc0be74: 7c fb 3b 78 mr r27,r7 ffc0be78: 93 81 00 20 stw r28,32(r1) ffc0be7c: 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 ); ffc0be80: 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 ) { ffc0be84: 93 a1 00 24 stw r29,36(r1) ffc0be88: 7c dd 33 78 mr r29,r6 ffc0be8c: 93 e1 00 2c stw r31,44(r1) ffc0be90: 7c 9f 23 78 mr r31,r4 ffc0be94: 81 61 00 40 lwz r11,64(r1) ffc0be98: 91 81 00 08 stw r12,8(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0be9c: 93 c4 01 2c stw r30,300(r4) ffc0bea0: 93 c4 01 30 stw r30,304(r4) extensions_area = NULL; the_thread->libc_reent = NULL; ffc0bea4: 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 ); ffc0bea8: 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 ) { ffc0beac: 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 ); ffc0beb0: 48 00 0a f9 bl ffc0c9a8 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0beb4: 7c 60 1b 79 mr. r0,r3 return false; /* stack allocation failed */ ffc0beb8: 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 ) ffc0bebc: 41 82 01 5c beq- ffc0c018 <_Thread_Initialize+0x1dc> ffc0bec0: 7f 9d 00 40 cmplw cr7,r29,r0 ffc0bec4: 41 9d 01 54 bgt- cr7,ffc0c018 <_Thread_Initialize+0x1dc><== NEVER TAKEN /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0bec8: 2f 9b 00 00 cmpwi cr7,r27,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0becc: 81 7f 00 c0 lwz r11,192(r31) the_stack->size = size; ffc0bed0: 90 1f 00 b4 stw r0,180(r31) ffc0bed4: 39 20 00 00 li r9,0 extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; ffc0bed8: 3b 60 00 00 li r27,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0bedc: 91 7f 00 b8 stw r11,184(r31) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0bee0: 40 9e 01 74 bne- cr7,ffc0c054 <_Thread_Initialize+0x218> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0bee4: 3f a0 00 00 lis r29,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; ffc0bee8: 91 3f 01 24 stw r9,292(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0beec: 38 00 00 00 li r0,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0bef0: 81 7d 27 48 lwz r11,10056(r29) 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; ffc0bef4: 91 3f 00 bc stw r9,188(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0bef8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0befc: 90 1f 00 50 stw r0,80(r31) the_watchdog->routine = routine; ffc0bf00: 90 1f 00 64 stw r0,100(r31) the_watchdog->id = id; ffc0bf04: 90 1f 00 68 stw r0,104(r31) the_watchdog->user_data = user_data; ffc0bf08: 90 1f 00 6c stw r0,108(r31) ffc0bf0c: 40 9e 01 64 bne- cr7,ffc0c070 <_Thread_Initialize+0x234> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0bf10: 91 7f 01 34 stw r11,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; ffc0bf14: 3b c0 00 00 li r30,0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0bf18: 80 01 00 38 lwz r0,56(r1) Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return the_scheduler->Operations.scheduler_allocate( the_scheduler, the_thread ); ffc0bf1c: 3d 20 00 00 lis r9,0 ffc0bf20: 39 29 2c 20 addi r9,r9,11296 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0bf24: 9b 3f 00 a0 stb r25,160(r31) } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0bf28: 3b a0 00 00 li r29,0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0bf2c: 90 1f 00 a8 stw r0,168(r31) RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate( Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return ffc0bf30: 7d 23 4b 78 mr r3,r9 ffc0bf34: 7f e4 fb 78 mr r4,r31 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0bf38: 80 01 00 3c lwz r0,60(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; ffc0bf3c: 93 1f 00 a4 stw r24,164(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0bf40: 90 1f 00 ac stw r0,172(r31) the_thread->current_state = STATES_DORMANT; ffc0bf44: 38 00 00 01 li r0,1 ffc0bf48: 90 1f 00 10 stw r0,16(r31) ffc0bf4c: 80 09 00 14 lwz r0,20(r9) the_thread->Wait.queue = NULL; ffc0bf50: 93 bf 00 44 stw r29,68(r31) ffc0bf54: 7c 09 03 a6 mtctr r0 the_thread->resource_count = 0; ffc0bf58: 93 bf 00 1c stw r29,28(r31) the_thread->real_priority = priority; ffc0bf5c: 93 5f 00 18 stw r26,24(r31) the_thread->Start.initial_priority = priority; ffc0bf60: 93 5f 00 b0 stw r26,176(r31) ffc0bf64: 4e 80 04 21 bctrl sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread ); if ( !sched ) ffc0bf68: 2e 03 00 00 cmpwi cr4,r3,0 ffc0bf6c: 7c 79 1b 78 mr r25,r3 ffc0bf70: 41 92 00 40 beq- cr4,ffc0bfb0 <_Thread_Initialize+0x174> goto failed; _Thread_Set_priority( the_thread, priority ); ffc0bf74: 7f e3 fb 78 mr r3,r31 ffc0bf78: 7f 44 d3 78 mr r4,r26 ffc0bf7c: 48 00 08 c9 bl ffc0c844 <_Thread_Set_priority> Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( ffc0bf80: a0 1f 00 0a lhz r0,10(r31) _Thread_Stack_Free( the_thread ); return false; } ffc0bf84: 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 ); ffc0bf88: 7f e3 fb 78 mr r3,r31 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0bf8c: 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 ); ffc0bf90: 93 bf 00 84 stw r29,132(r31) ffc0bf94: 93 bf 00 88 stw r29,136(r31) ffc0bf98: 7f e9 01 2e stwx r31,r9,r0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0bf9c: 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 ); ffc0bfa0: 48 00 10 19 bl ffc0cfb8 <_User_extensions_Thread_create> if ( extension_status ) ffc0bfa4: 2f 83 00 00 cmpwi cr7,r3,0 return true; ffc0bfa8: 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 ) ffc0bfac: 40 9e 00 6c bne- cr7,ffc0c018 <_Thread_Initialize+0x1dc> ffc0bfb0: 2d 9b 00 00 cmpwi cr3,r27,0 ffc0bfb4: 2d 1e 00 00 cmpwi cr2,r30,0 return true; failed: if ( the_thread->libc_reent ) ffc0bfb8: 80 7f 01 28 lwz r3,296(r31) ffc0bfbc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bfc0: 41 9e 00 08 beq- cr7,ffc0bfc8 <_Thread_Initialize+0x18c> _Workspace_Free( the_thread->libc_reent ); ffc0bfc4: 48 00 16 65 bl ffc0d628 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) ffc0bfc8: 80 7f 01 2c lwz r3,300(r31) ffc0bfcc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bfd0: 41 9e 00 08 beq- cr7,ffc0bfd8 <_Thread_Initialize+0x19c> _Workspace_Free( the_thread->API_Extensions[i] ); ffc0bfd4: 48 00 16 55 bl ffc0d628 <_Workspace_Free> failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) ffc0bfd8: 80 7f 01 30 lwz r3,304(r31) ffc0bfdc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bfe0: 41 9e 00 08 beq- cr7,ffc0bfe8 <_Thread_Initialize+0x1ac><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); ffc0bfe4: 48 00 16 45 bl ffc0d628 <_Workspace_Free> <== NOT EXECUTED if ( extensions_area ) ffc0bfe8: 41 8a 00 0c beq- cr2,ffc0bff4 <_Thread_Initialize+0x1b8> (void) _Workspace_Free( extensions_area ); ffc0bfec: 7f c3 f3 78 mr r3,r30 ffc0bff0: 48 00 16 39 bl ffc0d628 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) ffc0bff4: 41 8e 00 0c beq- cr3,ffc0c000 <_Thread_Initialize+0x1c4> (void) _Workspace_Free( fp_area ); ffc0bff8: 7f 63 db 78 mr r3,r27 ffc0bffc: 48 00 16 2d bl ffc0d628 <_Workspace_Free> #endif if ( sched ) ffc0c000: 41 92 00 0c beq- cr4,ffc0c00c <_Thread_Initialize+0x1d0> (void) _Workspace_Free( sched ); ffc0c004: 7f 23 cb 78 mr r3,r25 ffc0c008: 48 00 16 21 bl ffc0d628 <_Workspace_Free> _Thread_Stack_Free( the_thread ); ffc0c00c: 7f e3 fb 78 mr r3,r31 ffc0c010: 48 00 0a 41 bl ffc0ca50 <_Thread_Stack_Free> return false; ffc0c014: 38 60 00 00 li r3,0 } ffc0c018: 80 01 00 34 lwz r0,52(r1) ffc0c01c: 81 81 00 08 lwz r12,8(r1) ffc0c020: 7c 08 03 a6 mtlr r0 ffc0c024: 82 e1 00 0c lwz r23,12(r1) ffc0c028: 83 01 00 10 lwz r24,16(r1) ffc0c02c: 7d 83 81 20 mtcrf 56,r12 ffc0c030: 83 21 00 14 lwz r25,20(r1) ffc0c034: 83 41 00 18 lwz r26,24(r1) ffc0c038: 83 61 00 1c lwz r27,28(r1) ffc0c03c: 83 81 00 20 lwz r28,32(r1) ffc0c040: 83 a1 00 24 lwz r29,36(r1) ffc0c044: 83 c1 00 28 lwz r30,40(r1) ffc0c048: 83 e1 00 2c lwz r31,44(r1) ffc0c04c: 38 21 00 30 addi r1,r1,48 ffc0c050: 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 ); ffc0c054: 38 60 01 08 li r3,264 ffc0c058: 48 00 15 9d bl ffc0d5f4 <_Workspace_Allocate> if ( !fp_area ) ffc0c05c: 2d 83 00 00 cmpwi cr3,r3,0 ffc0c060: 7c 7b 1b 78 mr r27,r3 ffc0c064: 41 8e 00 54 beq- cr3,ffc0c0b8 <_Thread_Initialize+0x27c> ffc0c068: 7c 69 1b 78 mr r9,r3 ffc0c06c: 4b ff fe 78 b ffc0bee4 <_Thread_Initialize+0xa8> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( ffc0c070: 39 6b 00 01 addi r11,r11,1 ffc0c074: 55 63 10 3a rlwinm r3,r11,2,0,29 ffc0c078: 48 00 15 7d bl ffc0d5f4 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0c07c: 2d 03 00 00 cmpwi cr2,r3,0 ffc0c080: 7c 7e 1b 78 mr r30,r3 ffc0c084: 41 8a 00 48 beq- cr2,ffc0c0cc <_Thread_Initialize+0x290> goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c088: 90 7f 01 34 stw r3,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++ ) ffc0c08c: 38 00 00 00 li r0,0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c090: 39 20 00 00 li r9,0 ffc0c094: 81 5d 27 48 lwz r10,10056(r29) * 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; ffc0c098: 39 60 00 00 li r11,0 * 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++ ) ffc0c09c: 39 29 00 01 addi r9,r9,1 ffc0c0a0: 7f 8a 48 40 cmplw cr7,r10,r9 the_thread->extensions[i] = NULL; ffc0c0a4: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c0a8: 7d 7e 01 2e stwx r11,r30,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++ ) ffc0c0ac: 7d 20 4b 78 mr r0,r9 ffc0c0b0: 40 9c ff ec bge+ cr7,ffc0c09c <_Thread_Initialize+0x260> ffc0c0b4: 4b ff fe 64 b ffc0bf18 <_Thread_Initialize+0xdc> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0c0b8: 3b c0 00 00 li r30,0 ffc0c0bc: 4d 0c 00 00 mcrf cr2,cr3 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; ffc0c0c0: 3b 20 00 00 li r25,0 ffc0c0c4: 4e 0c 00 00 mcrf cr4,cr3 ffc0c0c8: 4b ff fe f0 b ffc0bfb8 <_Thread_Initialize+0x17c> ffc0c0cc: 2d 9b 00 00 cmpwi cr3,r27,0 ffc0c0d0: 4e 08 00 00 mcrf cr4,cr2 ffc0c0d4: 3b 20 00 00 li r25,0 ffc0c0d8: 4b ff fe e0 b ffc0bfb8 <_Thread_Initialize+0x17c> =============================================================================== ffc0d8f4 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0d8f4: 94 21 ff e8 stwu r1,-24(r1) ffc0d8f8: 7c 08 02 a6 mflr r0 ffc0d8fc: 90 01 00 1c stw r0,28(r1) */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); ffc0d900: 80 03 00 10 lwz r0,16(r3) ffc0d904: 93 e1 00 14 stw r31,20(r1) ffc0d908: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0d90c: 70 09 00 01 andi. r9,r0,1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0d910: 93 c1 00 10 stw r30,16(r1) _Thread_Restart_self(); return true; } return false; ffc0d914: 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 ) ) { ffc0d918: 41 82 00 20 beq- ffc0d938 <_Thread_Restart+0x44> return true; } return false; } ffc0d91c: 7c 03 03 78 mr r3,r0 ffc0d920: 80 01 00 1c lwz r0,28(r1) ffc0d924: 83 c1 00 10 lwz r30,16(r1) ffc0d928: 7c 08 03 a6 mtlr r0 ffc0d92c: 83 e1 00 14 lwz r31,20(r1) ffc0d930: 38 21 00 18 addi r1,r1,24 ffc0d934: 4e 80 00 20 blr Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0d938: 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 ); ffc0d93c: 3f c0 00 00 lis r30,0 ffc0d940: 3b de 2d b8 addi r30,r30,11704 ffc0d944: 90 a1 00 0c stw r5,12(r1) ffc0d948: 48 00 01 25 bl ffc0da6c <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0d94c: 7f e3 fb 78 mr r3,r31 ffc0d950: 80 81 00 08 lwz r4,8(r1) ffc0d954: 80 a1 00 0c lwz r5,12(r1) ffc0d958: 48 00 3e 51 bl ffc117a8 <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0d95c: 7f e3 fb 78 mr r3,r31 ffc0d960: 48 00 3a 85 bl ffc113e4 <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0d964: 7f e3 fb 78 mr r3,r31 ffc0d968: 48 00 3d e5 bl ffc1174c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); ffc0d96c: 7f e3 fb 78 mr r3,r31 ffc0d970: 48 00 08 e9 bl ffc0e258 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) ffc0d974: 81 3e 00 0c lwz r9,12(r30) _Thread_Restart_self(); return true; ffc0d978: 38 00 00 01 li r0,1 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0d97c: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0d980: 40 9e ff 9c bne+ cr7,ffc0d91c <_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 ) ffc0d984: 80 1f 01 24 lwz r0,292(r31) ffc0d988: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d98c: 41 9e 00 0c beq- cr7,ffc0d998 <_Thread_Restart+0xa4> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0d990: 38 7f 01 24 addi r3,r31,292 ffc0d994: 48 01 01 ed bl ffc1db80 <_CPU_Context_restore_fp> #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0d998: 80 7e 00 0c lwz r3,12(r30) ffc0d99c: 38 63 00 c4 addi r3,r3,196 ffc0d9a0: 48 01 03 a1 bl ffc1dd40 <_CPU_Context_restore> =============================================================================== ffc109e4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { ffc109e4: 94 21 ff f0 stwu r1,-16(r1) ffc109e8: 7c 08 02 a6 mflr r0 ffc109ec: 7c 64 1b 78 mr r4,r3 ffc109f0: 90 01 00 14 stw r0,20(r1) ffc109f4: 93 e1 00 0c stw r31,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc109f8: 7f e0 00 a6 mfmsr r31 ffc109fc: 7c 10 42 a6 mfsprg r0,0 ffc10a00: 7f e0 00 78 andc r0,r31,r0 ffc10a04: 7c 00 01 24 mtmsr r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); current_state = the_thread->current_state; ffc10a08: 80 03 00 10 lwz r0,16(r3) if ( current_state & STATES_SUSPENDED ) { ffc10a0c: 70 09 00 02 andi. r9,r0,2 ffc10a10: 41 82 00 14 beq- ffc10a24 <_Thread_Resume+0x40> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc10a14: 54 00 07 fa rlwinm r0,r0,0,31,29 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { ffc10a18: 2f 80 00 00 cmpwi cr7,r0,0 _ISR_Disable( level ); current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); ffc10a1c: 90 03 00 10 stw r0,16(r3) if ( _States_Is_ready( current_state ) ) { ffc10a20: 41 9e 00 1c beq- cr7,ffc10a3c <_Thread_Resume+0x58> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc10a24: 7f e0 01 24 mtmsr r31 _Scheduler_Unblock( &_Scheduler, the_thread ); } } _ISR_Enable( level ); } ffc10a28: 80 01 00 14 lwz r0,20(r1) ffc10a2c: 83 e1 00 0c lwz r31,12(r1) ffc10a30: 38 21 00 10 addi r1,r1,16 ffc10a34: 7c 08 03 a6 mtlr r0 ffc10a38: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { the_scheduler->Operations.unblock( the_scheduler, the_thread ); ffc10a3c: 3c 60 00 00 lis r3,0 ffc10a40: 38 63 2d 00 addi r3,r3,11520 ffc10a44: 80 03 00 10 lwz r0,16(r3) ffc10a48: 7c 09 03 a6 mtctr r0 ffc10a4c: 4e 80 04 21 bctrl ffc10a50: 7f e0 01 24 mtmsr r31 ffc10a54: 80 01 00 14 lwz r0,20(r1) ffc10a58: 83 e1 00 0c lwz r31,12(r1) ffc10a5c: 38 21 00 10 addi r1,r1,16 ffc10a60: 7c 08 03 a6 mtlr r0 ffc10a64: 4e 80 00 20 blr =============================================================================== ffc0c464 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; ffc0c464: 80 04 00 14 lwz r0,20(r4) 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 ); ffc0c468: 39 44 00 3c addi r10,r4,60 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { ffc0c46c: 94 21 ff f0 stwu r1,-16(r1) ffc0c470: 7c 69 1b 78 mr r9,r3 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) ffc0c474: 70 0b 00 20 andi. r11,r0,32 head->next = tail; ffc0c478: 91 44 00 38 stw r10,56(r4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); ffc0c47c: 39 64 00 38 addi r11,r4,56 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc0c480: 39 40 00 00 li r10,0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { ffc0c484: 93 c1 00 08 stw r30,8(r1) RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); ffc0c488: 54 03 d1 be rlwinm r3,r0,26,6,31 ffc0c48c: 93 e1 00 0c stw r31,12(r1) ffc0c490: 91 44 00 3c stw r10,60(r4) tail->previous = head; ffc0c494: 91 64 00 40 stw r11,64(r4) _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; ffc0c498: 81 09 00 38 lwz r8,56(r9) if ( _Thread_queue_Is_reverse_search( priority ) ) ffc0c49c: 40 82 00 84 bne- ffc0c520 <_Thread_queue_Enqueue_priority+0xbc> ffc0c4a0: 1c 63 00 0c mulli r3,r3,12 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } ffc0c4a4: 7c 69 1a 14 add r3,r9,r3 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc0c4a8: 39 83 00 04 addi r12,r3,4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c4ac: 7c c0 00 a6 mfmsr r6 ffc0c4b0: 7d 70 42 a6 mfsprg r11,0 ffc0c4b4: 7c cb 58 78 andc r11,r6,r11 ffc0c4b8: 7d 60 01 24 mtmsr r11 ffc0c4bc: 7c df 33 78 mr r31,r6 ffc0c4c0: 81 63 00 00 lwz r11,0(r3) restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { ffc0c4c4: 7f 8b 60 00 cmpw cr7,r11,r12 ffc0c4c8: 40 be 00 2c bne+ cr7,ffc0c4f4 <_Thread_queue_Enqueue_priority+0x90> ffc0c4cc: 48 00 01 7c b ffc0c648 <_Thread_queue_Enqueue_priority+0x1e4> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0c4d0: 7c e0 00 a6 mfmsr r7 ffc0c4d4: 7c c0 01 24 mtmsr r6 ffc0c4d8: 7c e0 01 24 mtmsr r7 RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); ffc0c4dc: 80 eb 00 10 lwz r7,16(r11) search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { ffc0c4e0: 7d 1e 38 39 and. r30,r8,r7 ffc0c4e4: 41 82 00 f8 beq- ffc0c5dc <_Thread_queue_Enqueue_priority+0x178> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; ffc0c4e8: 81 6b 00 00 lwz r11,0(r11) restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { ffc0c4ec: 7f 8b 60 00 cmpw cr7,r11,r12 ffc0c4f0: 41 9e 00 10 beq- cr7,ffc0c500 <_Thread_queue_Enqueue_priority+0x9c> search_priority = search_thread->current_priority; ffc0c4f4: 81 4b 00 14 lwz r10,20(r11) if ( priority <= search_priority ) ffc0c4f8: 7f 80 50 40 cmplw cr7,r0,r10 ffc0c4fc: 41 9d ff d4 bgt+ cr7,ffc0c4d0 <_Thread_queue_Enqueue_priority+0x6c> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != ffc0c500: 80 69 00 30 lwz r3,48(r9) ffc0c504: 2f 83 00 01 cmpwi cr7,r3,1 ffc0c508: 41 9e 00 dc beq- cr7,ffc0c5e4 <_Thread_queue_Enqueue_priority+0x180> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; ffc0c50c: 93 e5 00 00 stw r31,0(r5) return the_thread_queue->sync_state; } ffc0c510: 83 c1 00 08 lwz r30,8(r1) ffc0c514: 83 e1 00 0c lwz r31,12(r1) ffc0c518: 38 21 00 10 addi r1,r1,16 ffc0c51c: 4e 80 00 20 blr ffc0c520: 1c 63 00 0c mulli r3,r3,12 ffc0c524: 3d 80 00 00 lis r12,0 ffc0c528: 39 8c 26 6c addi r12,r12,9836 ffc0c52c: 7c 69 1a 14 add r3,r9,r3 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; ffc0c530: 89 4c 00 00 lbz r10,0(r12) ffc0c534: 39 4a 00 01 addi r10,r10,1 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c538: 7c c0 00 a6 mfmsr r6 ffc0c53c: 7d 70 42 a6 mfsprg r11,0 ffc0c540: 7c cb 58 78 andc r11,r6,r11 ffc0c544: 7d 60 01 24 mtmsr r11 ffc0c548: 7c df 33 78 mr r31,r6 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } ffc0c54c: 81 63 00 08 lwz r11,8(r3) restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { ffc0c550: 7f 8b 18 00 cmpw cr7,r11,r3 ffc0c554: 40 be 00 2c bne+ cr7,ffc0c580 <_Thread_queue_Enqueue_priority+0x11c> ffc0c558: 48 00 00 34 b ffc0c58c <_Thread_queue_Enqueue_priority+0x128> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0c55c: 7c e0 00 a6 mfmsr r7 ffc0c560: 7c c0 01 24 mtmsr r6 ffc0c564: 7c e0 01 24 mtmsr r7 ffc0c568: 80 eb 00 10 lwz r7,16(r11) search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { ffc0c56c: 7d 1e 38 39 and. r30,r8,r7 ffc0c570: 41 82 00 64 beq- ffc0c5d4 <_Thread_queue_Enqueue_priority+0x170><== NEVER TAKEN _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; ffc0c574: 81 6b 00 04 lwz r11,4(r11) restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { ffc0c578: 7f 8b 18 00 cmpw cr7,r11,r3 ffc0c57c: 41 9e 00 10 beq- cr7,ffc0c58c <_Thread_queue_Enqueue_priority+0x128> search_priority = search_thread->current_priority; ffc0c580: 81 4b 00 14 lwz r10,20(r11) if ( priority >= search_priority ) ffc0c584: 7f 80 50 40 cmplw cr7,r0,r10 ffc0c588: 41 9c ff d4 blt+ cr7,ffc0c55c <_Thread_queue_Enqueue_priority+0xf8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != ffc0c58c: 80 69 00 30 lwz r3,48(r9) ffc0c590: 2f 83 00 01 cmpwi cr7,r3,1 ffc0c594: 40 9e ff 78 bne+ cr7,ffc0c50c <_Thread_queue_Enqueue_priority+0xa8> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) ffc0c598: 7f 80 50 00 cmpw cr7,r0,r10 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0c59c: 38 00 00 00 li r0,0 ffc0c5a0: 90 09 00 30 stw r0,48(r9) if ( priority == search_priority ) ffc0c5a4: 41 9e 00 7c beq- cr7,ffc0c620 <_Thread_queue_Enqueue_priority+0x1bc> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; ffc0c5a8: 81 4b 00 00 lwz r10,0(r11) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; ffc0c5ac: 91 64 00 04 stw r11,4(r4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; ffc0c5b0: 91 44 00 00 stw r10,0(r4) the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; ffc0c5b4: 90 8a 00 04 stw r4,4(r10) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; ffc0c5b8: 90 8b 00 00 stw r4,0(r11) next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; ffc0c5bc: 91 24 00 44 stw r9,68(r4) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c5c0: 7c c0 01 24 mtmsr r6 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } ffc0c5c4: 83 c1 00 08 lwz r30,8(r1) ffc0c5c8: 83 e1 00 0c lwz r31,12(r1) ffc0c5cc: 38 21 00 10 addi r1,r1,16 ffc0c5d0: 4e 80 00 20 blr ffc0c5d4: 7c c0 01 24 mtmsr r6 <== NOT EXECUTED ffc0c5d8: 4b ff ff 58 b ffc0c530 <_Thread_queue_Enqueue_priority+0xcc><== NOT EXECUTED ffc0c5dc: 7c c0 01 24 mtmsr r6 ffc0c5e0: 4b ff fe cc b ffc0c4ac <_Thread_queue_Enqueue_priority+0x48> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) ffc0c5e4: 7f 80 50 00 cmpw cr7,r0,r10 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0c5e8: 38 00 00 00 li r0,0 ffc0c5ec: 90 09 00 30 stw r0,48(r9) if ( priority == search_priority ) ffc0c5f0: 41 9e 00 30 beq- cr7,ffc0c620 <_Thread_queue_Enqueue_priority+0x1bc> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; ffc0c5f4: 81 4b 00 04 lwz r10,4(r11) the_node = (Chain_Node *) the_thread; the_node->next = search_node; ffc0c5f8: 91 64 00 00 stw r11,0(r4) the_node->previous = previous_node; ffc0c5fc: 91 44 00 04 stw r10,4(r4) previous_node->next = the_node; ffc0c600: 90 8a 00 00 stw r4,0(r10) search_node->previous = the_node; ffc0c604: 90 8b 00 04 stw r4,4(r11) the_thread->Wait.queue = the_thread_queue; ffc0c608: 91 24 00 44 stw r9,68(r4) ffc0c60c: 7c c0 01 24 mtmsr r6 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } ffc0c610: 83 c1 00 08 lwz r30,8(r1) ffc0c614: 83 e1 00 0c lwz r31,12(r1) ffc0c618: 38 21 00 10 addi r1,r1,16 ffc0c61c: 4e 80 00 20 blr _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; ffc0c620: 81 4b 00 40 lwz r10,64(r11) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); ffc0c624: 38 0b 00 3c addi r0,r11,60 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; ffc0c628: 90 04 00 00 stw r0,0(r4) the_node->previous = previous_node; ffc0c62c: 91 44 00 04 stw r10,4(r4) previous_node->next = the_node; ffc0c630: 90 8a 00 00 stw r4,0(r10) search_node->previous = the_node; ffc0c634: 90 8b 00 40 stw r4,64(r11) the_thread->Wait.queue = the_thread_queue; ffc0c638: 91 24 00 44 stw r9,68(r4) ffc0c63c: 7f e0 01 24 mtmsr r31 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0c640: 38 60 00 01 li r3,1 ffc0c644: 4b ff fe cc b ffc0c510 <_Thread_queue_Enqueue_priority+0xac> if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; ffc0c648: 39 40 ff ff li r10,-1 ffc0c64c: 4b ff fe b4 b ffc0c500 <_Thread_queue_Enqueue_priority+0x9c> =============================================================================== ffc0c74c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0c74c: 94 21 ff d8 stwu r1,-40(r1) ffc0c750: 7c 08 02 a6 mflr r0 ffc0c754: 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 ) ffc0c758: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0c75c: 93 c1 00 20 stw r30,32(r1) ffc0c760: 7c 9e 23 78 mr r30,r4 ffc0c764: 90 01 00 2c stw r0,44(r1) ffc0c768: 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 ) ffc0c76c: 41 82 00 10 beq- ffc0c77c <_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 ) { ffc0c770: 80 1f 00 34 lwz r0,52(r31) ffc0c774: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c778: 41 9e 00 20 beq- cr7,ffc0c798 <_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 ); } } ffc0c77c: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0c780: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0c784: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0c788: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0c78c: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0c790: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0c794: 4e 80 00 20 blr <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c798: 7f a0 00 a6 mfmsr r29 ffc0c79c: 7d 30 42 a6 mfsprg r9,0 ffc0c7a0: 7f a9 48 78 andc r9,r29,r9 ffc0c7a4: 7d 20 01 24 mtmsr r9 ffc0c7a8: 3d 60 00 03 lis r11,3 ffc0c7ac: 81 24 00 10 lwz r9,16(r4) ffc0c7b0: 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 ) ) { ffc0c7b4: 7d 6a 48 39 and. r10,r11,r9 ffc0c7b8: 40 82 00 24 bne- ffc0c7dc <_Thread_queue_Requeue+0x90> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c7bc: 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 ); } } ffc0c7c0: 80 01 00 2c lwz r0,44(r1) ffc0c7c4: 83 a1 00 1c lwz r29,28(r1) ffc0c7c8: 7c 08 03 a6 mtlr r0 ffc0c7cc: 83 c1 00 20 lwz r30,32(r1) ffc0c7d0: 83 e1 00 24 lwz r31,36(r1) ffc0c7d4: 38 21 00 28 addi r1,r1,40 ffc0c7d8: 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; ffc0c7dc: 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 ); ffc0c7e0: 38 a0 00 01 li r5,1 ffc0c7e4: 48 00 3a d9 bl ffc102bc <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0c7e8: 7f e3 fb 78 mr r3,r31 ffc0c7ec: 7f c4 f3 78 mr r4,r30 ffc0c7f0: 38 a1 00 08 addi r5,r1,8 ffc0c7f4: 4b ff fc 71 bl ffc0c464 <_Thread_queue_Enqueue_priority> ffc0c7f8: 7f a0 01 24 mtmsr r29 ffc0c7fc: 4b ff ff c4 b ffc0c7c0 <_Thread_queue_Requeue+0x74> =============================================================================== ffc0c800 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c800: 94 21 ff e8 stwu r1,-24(r1) ffc0c804: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c808: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c80c: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c810: 4b ff f5 61 bl ffc0bd70 <_Thread_Get> switch ( location ) { ffc0c814: 80 01 00 08 lwz r0,8(r1) ffc0c818: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c81c: 40 9e 00 18 bne- cr7,ffc0c834 <_Thread_queue_Timeout+0x34><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); ffc0c820: 48 00 3b b1 bl ffc103d0 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0c824: 3d 20 00 00 lis r9,0 ffc0c828: 81 69 27 28 lwz r11,10024(r9) ffc0c82c: 38 0b ff ff addi r0,r11,-1 ffc0c830: 90 09 27 28 stw r0,10024(r9) _Thread_Unnest_dispatch(); break; } } ffc0c834: 80 01 00 1c lwz r0,28(r1) ffc0c838: 38 21 00 18 addi r1,r1,24 ffc0c83c: 7c 08 03 a6 mtlr r0 ffc0c840: 4e 80 00 20 blr =============================================================================== ffc1babc <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1babc: 94 21 ff 98 stwu r1,-104(r1) ffc1bac0: 7c 08 02 a6 mflr r0 ffc1bac4: 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; head->previous = NULL; tail->previous = head; ffc1bac8: 3a a1 00 08 addi r21,r1,8 ffc1bacc: 90 01 00 6c stw r0,108(r1) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc1bad0: 38 00 00 00 li r0,0 ffc1bad4: 93 21 00 4c stw r25,76(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1bad8: 3b 21 00 0c addi r25,r1,12 ffc1badc: 93 41 00 50 stw r26,80(r1) ffc1bae0: 3b 41 00 18 addi r26,r1,24 ffc1bae4: 93 81 00 58 stw r28,88(r1) ffc1bae8: 3b 81 00 14 addi r28,r1,20 ffc1baec: 92 81 00 38 stw r20,56(r1) ffc1baf0: 3e 80 00 00 lis r20,0 ffc1baf4: 3a 94 28 40 addi r20,r20,10304 ffc1baf8: 92 e1 00 44 stw r23,68(r1) ffc1bafc: 3e e0 00 00 lis r23,0 ffc1bb00: 3a f7 28 7c addi r23,r23,10364 ffc1bb04: 93 01 00 48 stw r24,72(r1) ffc1bb08: 3f 00 00 00 lis r24,0 ffc1bb0c: 3b 18 28 58 addi r24,r24,10328 ffc1bb10: 93 c1 00 60 stw r30,96(r1) ffc1bb14: 93 21 00 08 stw r25,8(r1) head->previous = NULL; ffc1bb18: 90 01 00 0c stw r0,12(r1) tail->previous = head; ffc1bb1c: 92 a1 00 10 stw r21,16(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1bb20: 93 41 00 14 stw r26,20(r1) head->previous = NULL; ffc1bb24: 90 01 00 18 stw r0,24(r1) tail->previous = head; ffc1bb28: 93 81 00 1c stw r28,28(r1) ffc1bb2c: 92 21 00 2c stw r17,44(r1) ffc1bb30: 3a 23 00 08 addi r17,r3,8 ffc1bb34: 92 41 00 30 stw r18,48(r1) ffc1bb38: 3a 43 00 40 addi r18,r3,64 ffc1bb3c: 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; ffc1bb40: 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 ) { ffc1bb44: 92 c1 00 40 stw r22,64(r1) _ISR_Disable( level ); tmp = ts->insert_chain; if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; do_loop = false; ffc1bb48: 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 ) { ffc1bb4c: 93 61 00 54 stw r27,84(r1) ffc1bb50: 3b 63 00 68 addi r27,r3,104 ffc1bb54: 93 a1 00 5c stw r29,92(r1) ffc1bb58: 3b a3 00 30 addi r29,r3,48 ffc1bb5c: 93 e1 00 64 stw r31,100(r1) ffc1bb60: 7c 7f 1b 78 mr r31,r3 Chain_Control *tmp; /* * 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; ffc1bb64: 92 bf 00 78 stw r21,120(r31) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1bb68: 80 17 00 00 lwz r0,0(r23) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bb6c: 7f 85 e3 78 mr r5,r28 Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1bb70: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bb74: 7f a3 eb 78 mr r3,r29 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc1bb78: 90 1f 00 3c stw r0,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bb7c: 7c 84 00 50 subf r4,r4,r0 ffc1bb80: 48 00 57 a1 bl ffc21320 <_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(); ffc1bb84: 83 d8 00 00 lwz r30,0(r24) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1bb88: 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 ) { ffc1bb8c: 7f 9e 28 40 cmplw cr7,r30,r5 ffc1bb90: 41 9d 00 fc bgt- cr7,ffc1bc8c <_Timer_server_Body+0x1d0> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { ffc1bb94: 41 9c 00 d4 blt- cr7,ffc1bc68 <_Timer_server_Body+0x1ac> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; ffc1bb98: 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 ); ffc1bb9c: 80 7f 00 78 lwz r3,120(r31) ffc1bba0: 48 00 0d 61 bl ffc1c900 <_Chain_Get> if ( timer == NULL ) { ffc1bba4: 7c 64 1b 79 mr. r4,r3 ffc1bba8: 41 82 00 34 beq- ffc1bbdc <_Timer_server_Body+0x120> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1bbac: 80 04 00 38 lwz r0,56(r4) ffc1bbb0: 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 ) { ffc1bbb4: 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 ) { ffc1bbb8: 41 9e 00 c4 beq- cr7,ffc1bc7c <_Timer_server_Body+0x1c0> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1bbbc: 40 9a ff e0 bne+ cr6,ffc1bb9c <_Timer_server_Body+0xe0> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1bbc0: 38 84 00 10 addi r4,r4,16 ffc1bbc4: 7f 63 db 78 mr r3,r27 ffc1bbc8: 48 00 58 11 bl ffc213d8 <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1bbcc: 80 7f 00 78 lwz r3,120(r31) ffc1bbd0: 48 00 0d 31 bl ffc1c900 <_Chain_Get> if ( timer == NULL ) { ffc1bbd4: 7c 64 1b 79 mr. r4,r3 ffc1bbd8: 40 82 ff d4 bne+ ffc1bbac <_Timer_server_Body+0xf0> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1bbdc: 7d 20 00 a6 mfmsr r9 ffc1bbe0: 7c 10 42 a6 mfsprg r0,0 ffc1bbe4: 7d 20 00 78 andc r0,r9,r0 ffc1bbe8: 7c 00 01 24 mtmsr r0 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); tmp = ts->insert_chain; ffc1bbec: 80 1f 00 78 lwz r0,120(r31) if ( _Chain_Is_empty( insert_chain ) ) { ffc1bbf0: 80 01 00 08 lwz r0,8(r1) ffc1bbf4: 7f 80 c8 00 cmpw cr7,r0,r25 ffc1bbf8: 38 00 00 01 li r0,1 ffc1bbfc: 41 9e 00 a4 beq- cr7,ffc1bca0 <_Timer_server_Body+0x1e4><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1bc00: 7d 20 01 24 mtmsr r9 * 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; while ( do_loop ) { ffc1bc04: 2f 80 00 00 cmpwi cr7,r0,0 ffc1bc08: 40 9e ff 60 bne+ cr7,ffc1bb68 <_Timer_server_Body+0xac> <== NEVER TAKEN _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 ) ) { ffc1bc0c: 81 21 00 14 lwz r9,20(r1) ffc1bc10: 7f 89 d0 00 cmpw cr7,r9,r26 ffc1bc14: 40 be 00 30 bne+ cr7,ffc1bc44 <_Timer_server_Body+0x188> ffc1bc18: 48 00 00 94 b ffc1bcac <_Timer_server_Body+0x1f0> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; ffc1bc1c: 81 69 00 00 lwz r11,0(r9) head->next = new_first; new_first->previous = head; ffc1bc20: 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; ffc1bc24: 91 61 00 14 stw r11,20(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; ffc1bc28: 92 c9 00 08 stw r22,8(r9) ffc1bc2c: 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 ); ffc1bc30: 80 09 00 1c lwz r0,28(r9) ffc1bc34: 80 69 00 20 lwz r3,32(r9) ffc1bc38: 80 89 00 24 lwz r4,36(r9) ffc1bc3c: 7c 09 03 a6 mtctr r0 ffc1bc40: 4e 80 04 21 bctrl static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1bc44: 7c 00 00 a6 mfmsr r0 ffc1bc48: 7d 30 42 a6 mfsprg r9,0 ffc1bc4c: 7c 09 48 78 andc r9,r0,r9 ffc1bc50: 7d 20 01 24 mtmsr r9 initialized = false; } #endif return status; } ffc1bc54: 81 21 00 14 lwz r9,20(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) ffc1bc58: 7f 89 d0 00 cmpw cr7,r9,r26 ffc1bc5c: 40 9e ff c0 bne+ cr7,ffc1bc1c <_Timer_server_Body+0x160> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1bc60: 7c 00 01 24 mtmsr r0 ffc1bc64: 4b ff ff 00 b ffc1bb64 <_Timer_server_Body+0xa8> /* * 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 ); ffc1bc68: 7f 63 db 78 mr r3,r27 ffc1bc6c: 38 80 00 01 li r4,1 ffc1bc70: 7c be 28 50 subf r5,r30,r5 ffc1bc74: 48 00 55 8d bl ffc21200 <_Watchdog_Adjust> ffc1bc78: 4b ff ff 20 b ffc1bb98 <_Timer_server_Body+0xdc> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1bc7c: 7f a3 eb 78 mr r3,r29 ffc1bc80: 38 84 00 10 addi r4,r4,16 ffc1bc84: 48 00 57 55 bl ffc213d8 <_Watchdog_Insert> ffc1bc88: 4b ff ff 14 b ffc1bb9c <_Timer_server_Body+0xe0> /* * 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 ); ffc1bc8c: 7c 85 f0 50 subf r4,r5,r30 ffc1bc90: 7f 63 db 78 mr r3,r27 ffc1bc94: 7f 85 e3 78 mr r5,r28 ffc1bc98: 48 00 56 89 bl ffc21320 <_Watchdog_Adjust_to_chain> ffc1bc9c: 4b ff fe fc b ffc1bb98 <_Timer_server_Body+0xdc> _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); tmp = ts->insert_chain; if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; ffc1bca0: 90 9f 00 78 stw r4,120(r31) do_loop = false; ffc1bca4: 38 00 00 00 li r0,0 ffc1bca8: 4b ff ff 58 b ffc1bc00 <_Timer_server_Body+0x144> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; ffc1bcac: 98 1f 00 7c stb r0,124(r31) ffc1bcb0: 80 14 00 00 lwz r0,0(r20) ffc1bcb4: 30 00 00 01 addic r0,r0,1 ffc1bcb8: 90 14 00 00 stw r0,0(r20) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); ffc1bcbc: 80 7f 00 00 lwz r3,0(r31) ffc1bcc0: 38 80 00 08 li r4,8 ffc1bcc4: 48 00 4a c5 bl ffc20788 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1bcc8: 7f e3 fb 78 mr r3,r31 ffc1bccc: 4b ff fc c9 bl ffc1b994 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1bcd0: 7f e3 fb 78 mr r3,r31 ffc1bcd4: 4b ff fd 55 bl ffc1ba28 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); ffc1bcd8: 48 00 3e 49 bl ffc1fb20 <_Thread_Enable_dispatch> ts->active = true; ffc1bcdc: 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 ); ffc1bce0: 7e 23 8b 78 mr r3,r17 ffc1bce4: 48 00 58 bd bl ffc215a0 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1bce8: 7e 43 93 78 mr r3,r18 ffc1bcec: 48 00 58 b5 bl ffc215a0 <_Watchdog_Remove> ffc1bcf0: 4b ff fe 74 b ffc1bb64 <_Timer_server_Body+0xa8> =============================================================================== ffc1bcf4 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1bcf4: 94 21 ff f0 stwu r1,-16(r1) ffc1bcf8: 7c 08 02 a6 mflr r0 ffc1bcfc: 7c 89 23 78 mr r9,r4 ffc1bd00: 90 01 00 14 stw r0,20(r1) if ( ts->insert_chain == NULL ) { ffc1bd04: 80 03 00 78 lwz r0,120(r3) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1bd08: 93 e1 00 0c stw r31,12(r1) ffc1bd0c: 7c 7f 1b 78 mr r31,r3 if ( ts->insert_chain == NULL ) { ffc1bd10: 2f 80 00 00 cmpwi cr7,r0,0 ffc1bd14: 41 9e 00 20 beq- cr7,ffc1bd34 <_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 ); ffc1bd18: 80 63 00 78 lwz r3,120(r3) ffc1bd1c: 48 00 0b 8d bl ffc1c8a8 <_Chain_Append> } } ffc1bd20: 80 01 00 14 lwz r0,20(r1) ffc1bd24: 83 e1 00 0c lwz r31,12(r1) ffc1bd28: 38 21 00 10 addi r1,r1,16 ffc1bd2c: 7c 08 03 a6 mtlr r0 ffc1bd30: 4e 80 00 20 blr ffc1bd34: 3d 60 00 00 lis r11,0 ffc1bd38: 81 4b 28 40 lwz r10,10304(r11) ffc1bd3c: 38 0a 00 01 addi r0,r10,1 ffc1bd40: 90 0b 28 40 stw r0,10304(r11) * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1bd44: 80 04 00 38 lwz r0,56(r4) ffc1bd48: 2f 80 00 01 cmpwi cr7,r0,1 ffc1bd4c: 41 9e 00 ac beq- cr7,ffc1bdf8 <_Timer_server_Schedule_operation_method+0x104> _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 ) { ffc1bd50: 2f 80 00 03 cmpwi cr7,r0,3 ffc1bd54: 41 9e 00 1c beq- cr7,ffc1bd70 <_Timer_server_Schedule_operation_method+0x7c> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1bd58: 48 00 3d c9 bl ffc1fb20 <_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 ); } } ffc1bd5c: 80 01 00 14 lwz r0,20(r1) ffc1bd60: 83 e1 00 0c lwz r31,12(r1) ffc1bd64: 38 21 00 10 addi r1,r1,16 ffc1bd68: 7c 08 03 a6 mtlr r0 ffc1bd6c: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1bd70: 7c c0 00 a6 mfmsr r6 ffc1bd74: 7c 10 42 a6 mfsprg r0,0 ffc1bd78: 7c c0 00 78 andc r0,r6,r0 ffc1bd7c: 7c 00 01 24 mtmsr r0 initialized = false; } #endif return status; } ffc1bd80: 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 ); ffc1bd84: 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(); ffc1bd88: 3d 40 00 00 lis r10,0 last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1bd8c: 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(); ffc1bd90: 80 0a 28 58 lwz r0,10328(r10) last_snapshot = ts->TOD_watchdogs.last_snapshot; ffc1bd94: 81 43 00 74 lwz r10,116(r3) if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1bd98: 41 9e 00 30 beq- cr7,ffc1bdc8 <_Timer_server_Schedule_operation_method+0xd4> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc1bd9c: 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; ffc1bda0: 80 eb 00 10 lwz r7,16(r11) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; ffc1bda4: 7d 07 52 14 add r8,r7,r10 delta_interval += delta; ffc1bda8: 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 ) { ffc1bdac: 40 9d 00 18 ble- cr7,ffc1bdc4 <_Timer_server_Schedule_operation_method+0xd0> /* * We advanced in time. */ delta = snapshot - last_snapshot; ffc1bdb0: 7d 4a 00 50 subf r10,r10,r0 if (delta_interval > delta) { ffc1bdb4: 7f 87 50 40 cmplw cr7,r7,r10 delta_interval -= delta; } else { delta_interval = 0; ffc1bdb8: 39 00 00 00 li r8,0 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { ffc1bdbc: 40 9d 00 08 ble- cr7,ffc1bdc4 <_Timer_server_Schedule_operation_method+0xd0><== NEVER TAKEN delta_interval -= delta; ffc1bdc0: 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; ffc1bdc4: 91 0b 00 10 stw r8,16(r11) } ts->TOD_watchdogs.last_snapshot = snapshot; ffc1bdc8: 90 1f 00 74 stw r0,116(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1bdcc: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1bdd0: 38 7f 00 68 addi r3,r31,104 ffc1bdd4: 38 89 00 10 addi r4,r9,16 ffc1bdd8: 48 00 56 01 bl ffc213d8 <_Watchdog_Insert> if ( !ts->active ) { ffc1bddc: 88 1f 00 7c lbz r0,124(r31) ffc1bde0: 2f 80 00 00 cmpwi cr7,r0,0 ffc1bde4: 40 9e ff 74 bne+ cr7,ffc1bd58 <_Timer_server_Schedule_operation_method+0x64> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1bde8: 7f e3 fb 78 mr r3,r31 ffc1bdec: 4b ff fc 3d bl ffc1ba28 <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); ffc1bdf0: 48 00 3d 31 bl ffc1fb20 <_Thread_Enable_dispatch> ffc1bdf4: 4b ff ff 68 b ffc1bd5c <_Timer_server_Schedule_operation_method+0x68> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1bdf8: 7c c0 00 a6 mfmsr r6 ffc1bdfc: 7c 10 42 a6 mfsprg r0,0 ffc1be00: 7c c0 00 78 andc r0,r6,r0 ffc1be04: 7c 00 01 24 mtmsr r0 initialized = false; } #endif return status; } ffc1be08: 81 63 00 30 lwz r11,48(r3) ffc1be0c: 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; ffc1be10: 3d 40 00 00 lis r10,0 last_snapshot = ts->Interval_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1be14: 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; ffc1be18: 80 0a 28 7c lwz r0,10364(r10) last_snapshot = ts->Interval_watchdogs.last_snapshot; ffc1be1c: 81 03 00 3c lwz r8,60(r3) if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1be20: 41 9e 00 20 beq- cr7,ffc1be40 <_Timer_server_Schedule_operation_method+0x14c> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; ffc1be24: 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; ffc1be28: 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; ffc1be2c: 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) { ffc1be30: 7f 88 38 40 cmplw cr7,r8,r7 ffc1be34: 40 9c 00 08 bge- cr7,ffc1be3c <_Timer_server_Schedule_operation_method+0x148> delta_interval -= delta; ffc1be38: 7d 48 38 50 subf r10,r8,r7 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; ffc1be3c: 91 4b 00 10 stw r10,16(r11) } ts->Interval_watchdogs.last_snapshot = snapshot; ffc1be40: 90 1f 00 3c stw r0,60(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1be44: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1be48: 38 7f 00 30 addi r3,r31,48 ffc1be4c: 38 89 00 10 addi r4,r9,16 ffc1be50: 48 00 55 89 bl ffc213d8 <_Watchdog_Insert> if ( !ts->active ) { ffc1be54: 88 1f 00 7c lbz r0,124(r31) ffc1be58: 2f 80 00 00 cmpwi cr7,r0,0 ffc1be5c: 40 9e fe fc bne+ cr7,ffc1bd58 <_Timer_server_Schedule_operation_method+0x64> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1be60: 7f e3 fb 78 mr r3,r31 ffc1be64: 4b ff fb 31 bl ffc1b994 <_Timer_server_Reset_interval_system_watchdog> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1be68: 48 00 3c b9 bl ffc1fb20 <_Thread_Enable_dispatch> ffc1be6c: 4b ff fe f0 b ffc1bd5c <_Timer_server_Schedule_operation_method+0x68> =============================================================================== ffc0cc84 <_Timespec_Add_to>: { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0cc84: 80 03 00 04 lwz r0,4(r3) uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { ffc0cc88: 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; ffc0cc8c: 81 04 00 04 lwz r8,4(r4) uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; ffc0cc90: 80 64 00 00 lwz r3,0(r4) /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0cc94: 7d 08 02 14 add r8,r8,r0 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0cc98: 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 ) { ffc0cc9c: 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; ffc0cca0: 91 09 00 04 stw r8,4(r9) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0cca4: 60 00 c9 ff ori r0,r0,51711 ffc0cca8: 7f 88 00 40 cmplw cr7,r8,r0 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0ccac: 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 ) { ffc0ccb0: 7d 0b 43 78 mr r11,r8 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0ccb4: 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 ) { ffc0ccb8: 4c 9d 00 20 blelr cr7 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ffc0ccbc: 3d 6b c4 65 addis r11,r11,-15259 ffc0ccc0: 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 ) { ffc0ccc4: 7f 8b 00 40 cmplw cr7,r11,r0 * * This routines adds two timespecs. The second argument is added * to the first. */ uint32_t _Timespec_Add_to( ffc0ccc8: 39 4a 00 01 addi r10,r10,1 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; seconds++; ffc0cccc: 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 ) { ffc0ccd0: 41 9d ff ec bgt+ cr7,ffc0ccbc <_Timespec_Add_to+0x38> <== NEVER TAKEN ffc0ccd4: 91 69 00 04 stw r11,4(r9) ffc0ccd8: 91 49 00 00 stw r10,0(r9) time->tv_sec++; seconds++; } return seconds; } ffc0ccdc: 4e 80 00 20 blr =============================================================================== ffc0f0fc <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) ffc0f0fc: 81 63 00 00 lwz r11,0(r3) bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { ffc0f100: 7c 69 1b 78 mr r9,r3 if ( lhs->tv_sec < rhs->tv_sec ) ffc0f104: 80 04 00 00 lwz r0,0(r4) return true; ffc0f108: 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 ) ffc0f10c: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0f110: 4d 9c 00 20 bltlr cr7 return true; if ( lhs->tv_sec > rhs->tv_sec ) ffc0f114: 41 9d 00 1c bgt- cr7,ffc0f130 <_Timespec_Less_than+0x34><== NEVER TAKEN #include #include #include bool _Timespec_Less_than( ffc0f118: 81 29 00 04 lwz r9,4(r9) ffc0f11c: 80 04 00 04 lwz r0,4(r4) ffc0f120: 7f 89 00 00 cmpw cr7,r9,r0 ffc0f124: 7c 60 00 26 mfcr r3 ffc0f128: 54 63 ef fe rlwinm r3,r3,29,31,31 ffc0f12c: 4e 80 00 20 blr { if ( lhs->tv_sec < rhs->tv_sec ) return true; if ( lhs->tv_sec > rhs->tv_sec ) return false; ffc0f130: 38 60 00 00 li r3,0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } ffc0f134: 4e 80 00 20 blr =============================================================================== ffc0cf28 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0cf28: 94 21 ff e0 stwu r1,-32(r1) ffc0cf2c: 7c 08 02 a6 mflr r0 ffc0cf30: 93 c1 00 18 stw r30,24(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0cf34: 3f c0 00 00 lis r30,0 ffc0cf38: 3b de 2c f4 addi r30,r30,11508 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0cf3c: 93 e1 00 1c stw r31,28(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0cf40: 83 fe 00 08 lwz r31,8(r30) void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0cf44: 93 61 00 0c stw r27,12(r1) ffc0cf48: 7c 7b 1b 78 mr r27,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0cf4c: 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 ) { ffc0cf50: 93 81 00 10 stw r28,16(r1) ffc0cf54: 7c 9c 23 78 mr r28,r4 ffc0cf58: 93 a1 00 14 stw r29,20(r1) ffc0cf5c: 7c bd 2b 78 mr r29,r5 ffc0cf60: 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 ); ffc0cf64: 41 9e 00 30 beq- cr7,ffc0cf94 <_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 ) ffc0cf68: 80 1f 00 30 lwz r0,48(r31) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0cf6c: 7f 63 db 78 mr r3,r27 ffc0cf70: 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 ) ffc0cf74: 2f 80 00 00 cmpwi cr7,r0,0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0cf78: 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 ) ffc0cf7c: 41 9e 00 0c beq- cr7,ffc0cf88 <_User_extensions_Fatal+0x60> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0cf80: 7c 09 03 a6 mtctr r0 ffc0cf84: 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 ) { ffc0cf88: 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 ); ffc0cf8c: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0cf90: 40 9e ff d8 bne+ cr7,ffc0cf68 <_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 ); } } ffc0cf94: 80 01 00 24 lwz r0,36(r1) ffc0cf98: 83 61 00 0c lwz r27,12(r1) ffc0cf9c: 7c 08 03 a6 mtlr r0 ffc0cfa0: 83 81 00 10 lwz r28,16(r1) ffc0cfa4: 83 a1 00 14 lwz r29,20(r1) ffc0cfa8: 83 c1 00 18 lwz r30,24(r1) ffc0cfac: 83 e1 00 1c lwz r31,28(r1) ffc0cfb0: 38 21 00 20 addi r1,r1,32 ffc0cfb4: 4e 80 00 20 blr =============================================================================== ffc0cd34 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { ffc0cd34: 94 21 ff e8 stwu r1,-24(r1) ffc0cd38: 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; ffc0cd3c: 3c e0 00 00 lis r7,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0cd40: 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; ffc0cd44: 38 e7 20 a0 addi r7,r7,8352 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0cd48: 3d 00 00 00 lis r8,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0cd4c: 93 a1 00 0c stw r29,12(r1) ffc0cd50: 3d 40 00 00 lis r10,0 ffc0cd54: 39 68 2c f4 addi r11,r8,11508 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; ffc0cd58: 83 a7 00 40 lwz r29,64(r7) ffc0cd5c: 39 2a 2b b0 addi r9,r10,11184 head->previous = NULL; ffc0cd60: 38 00 00 00 li r0,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0cd64: 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 ) { ffc0cd68: 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; ffc0cd6c: 38 ab 00 04 addi r5,r11,4 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0cd70: 93 81 00 08 stw r28,8(r1) ffc0cd74: 38 c9 00 04 addi r6,r9,4 ffc0cd78: 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; ffc0cd7c: 83 c7 00 3c lwz r30,60(r7) ffc0cd80: 90 a8 2c f4 stw r5,11508(r8) head->previous = NULL; ffc0cd84: 90 0b 00 04 stw r0,4(r11) tail->previous = head; ffc0cd88: 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; ffc0cd8c: 90 ca 2b b0 stw r6,11184(r10) head->previous = NULL; ffc0cd90: 90 09 00 04 stw r0,4(r9) tail->previous = head; ffc0cd94: 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 ) { ffc0cd98: 41 9e 00 8c beq- cr7,ffc0ce24 <_User_extensions_Handler_initialization+0xf0><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ffc0cd9c: 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 *) _Workspace_Allocate_or_fatal_error( ffc0cda0: 7f 83 e3 78 mr r3,r28 ffc0cda4: 48 00 08 b1 bl ffc0d654 <_Workspace_Allocate_or_fatal_error> number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0cda8: 38 80 00 00 li r4,0 ffc0cdac: 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 *) _Workspace_Allocate_or_fatal_error( ffc0cdb0: 7c 7f 1b 78 mr r31,r3 number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0cdb4: 48 00 62 e9 bl ffc1309c extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0cdb8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0cdbc: 41 9e 00 68 beq- cr7,ffc0ce24 <_User_extensions_Handler_initialization+0xf0><== NEVER TAKEN ffc0cdc0: 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; ffc0cdc4: 7f a9 eb 78 mr r9,r29 #include #include #include #include void _User_extensions_Handler_initialization(void) ffc0cdc8: 57 80 28 34 rlwinm r0,r28,5,0,26 ffc0cdcc: 7d 09 00 6e lwzux r8,r9,r0 _User_extensions_Add_set( extension ); ffc0cdd0: 7f e3 fb 78 mr r3,r31 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0cdd4: 3b 9c 00 01 addi r28,r28,1 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0cdd8: 81 49 00 04 lwz r10,4(r9) ffc0cddc: 81 69 00 08 lwz r11,8(r9) ffc0cde0: 80 09 00 0c lwz r0,12(r9) ffc0cde4: 91 1f 00 14 stw r8,20(r31) ffc0cde8: 91 5f 00 18 stw r10,24(r31) ffc0cdec: 91 7f 00 1c stw r11,28(r31) ffc0cdf0: 90 1f 00 20 stw r0,32(r31) ffc0cdf4: 81 09 00 10 lwz r8,16(r9) ffc0cdf8: 81 49 00 14 lwz r10,20(r9) ffc0cdfc: 81 69 00 18 lwz r11,24(r9) ffc0ce00: 80 09 00 1c lwz r0,28(r9) ffc0ce04: 91 1f 00 24 stw r8,36(r31) ffc0ce08: 91 5f 00 28 stw r10,40(r31) ffc0ce0c: 91 7f 00 2c stw r11,44(r31) ffc0ce10: 90 1f 00 30 stw r0,48(r31) _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; ffc0ce14: 3b ff 00 34 addi r31,r31,52 _User_extensions_Add_set( extension ); ffc0ce18: 48 00 36 7d bl ffc10494 <_User_extensions_Add_set> extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0ce1c: 7f 9e e0 40 cmplw cr7,r30,r28 ffc0ce20: 41 9d ff a4 bgt+ cr7,ffc0cdc4 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } ffc0ce24: 80 01 00 1c lwz r0,28(r1) ffc0ce28: 83 81 00 08 lwz r28,8(r1) ffc0ce2c: 7c 08 03 a6 mtlr r0 ffc0ce30: 83 a1 00 0c lwz r29,12(r1) ffc0ce34: 83 c1 00 10 lwz r30,16(r1) ffc0ce38: 83 e1 00 14 lwz r31,20(r1) ffc0ce3c: 38 21 00 18 addi r1,r1,24 ffc0ce40: 4e 80 00 20 blr =============================================================================== ffc0ce44 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0ce44: 94 21 ff e8 stwu r1,-24(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0ce48: 3d 20 00 00 lis r9,0 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0ce4c: 7c 08 02 a6 mflr r0 ffc0ce50: 93 c1 00 10 stw r30,16(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0ce54: 3b c9 2c f4 addi r30,r9,11508 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0ce58: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0ce5c: 93 e1 00 14 stw r31,20(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0ce60: 83 e9 2c f4 lwz r31,11508(r9) #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0ce64: 93 a1 00 0c stw r29,12(r1) ffc0ce68: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0ce6c: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0ce70: 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 ); ffc0ce74: 41 9e 00 28 beq- cr7,ffc0ce9c <_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 ) ffc0ce78: 80 1f 00 28 lwz r0,40(r31) (*the_extension->Callouts.thread_begin)( executing ); ffc0ce7c: 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 ) ffc0ce80: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ce84: 41 9e 00 0c beq- cr7,ffc0ce90 <_User_extensions_Thread_begin+0x4c> (*the_extension->Callouts.thread_begin)( executing ); ffc0ce88: 7c 09 03 a6 mtctr r0 ffc0ce8c: 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 ) { ffc0ce90: 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 ); ffc0ce94: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0ce98: 40 9e ff e0 bne+ cr7,ffc0ce78 <_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 ); } } ffc0ce9c: 80 01 00 1c lwz r0,28(r1) ffc0cea0: 83 a1 00 0c lwz r29,12(r1) ffc0cea4: 7c 08 03 a6 mtlr r0 ffc0cea8: 83 c1 00 10 lwz r30,16(r1) ffc0ceac: 83 e1 00 14 lwz r31,20(r1) ffc0ceb0: 38 21 00 18 addi r1,r1,24 ffc0ceb4: 4e 80 00 20 blr =============================================================================== ffc0cfb8 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0cfb8: 94 21 ff e8 stwu r1,-24(r1) return false; } } return true; } ffc0cfbc: 3d 20 00 00 lis r9,0 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0cfc0: 7c 08 02 a6 mflr r0 ffc0cfc4: 93 c1 00 10 stw r30,16(r1) return false; } } return true; } ffc0cfc8: 3b c9 2c f4 addi r30,r9,11508 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0cfcc: 3b de 00 04 addi r30,r30,4 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0cfd0: 93 e1 00 14 stw r31,20(r1) return false; } } return true; } ffc0cfd4: 83 e9 2c f4 lwz r31,11508(r9) #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0cfd8: 93 a1 00 0c stw r29,12(r1) ffc0cfdc: 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 ); ffc0cfe0: 7f 9f f0 00 cmpw cr7,r31,r30 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0cfe4: 90 01 00 1c stw r0,28(r1) if ( !status ) return false; } } return true; ffc0cfe8: 38 60 00 01 li r3,1 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0cfec: 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 ); ffc0cff0: 41 9e 00 40 beq- cr7,ffc0d030 <_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)( ffc0cff4: 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 ) { ffc0cff8: 80 1f 00 14 lwz r0,20(r31) status = (*the_extension->Callouts.thread_create)( ffc0cffc: 39 3c 2d 38 addi r9,r28,11576 ffc0d000: 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 ) { ffc0d004: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d008: 41 9e 00 18 beq- cr7,ffc0d020 <_User_extensions_Thread_create+0x68> status = (*the_extension->Callouts.thread_create)( ffc0d00c: 80 69 00 0c lwz r3,12(r9) ffc0d010: 7c 09 03 a6 mtctr r0 ffc0d014: 4e 80 04 21 bctrl _Thread_Executing, the_thread ); if ( !status ) ffc0d018: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d01c: 41 9e 00 34 beq- cr7,ffc0d050 <_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 ) { ffc0d020: 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 ); ffc0d024: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d028: 40 9e ff d0 bne+ cr7,ffc0cff8 <_User_extensions_Thread_create+0x40> if ( !status ) return false; } } return true; ffc0d02c: 38 60 00 01 li r3,1 } ffc0d030: 80 01 00 1c lwz r0,28(r1) ffc0d034: 83 81 00 08 lwz r28,8(r1) ffc0d038: 7c 08 03 a6 mtlr r0 ffc0d03c: 83 a1 00 0c lwz r29,12(r1) ffc0d040: 83 c1 00 10 lwz r30,16(r1) ffc0d044: 83 e1 00 14 lwz r31,20(r1) ffc0d048: 38 21 00 18 addi r1,r1,24 ffc0d04c: 4e 80 00 20 blr ffc0d050: 80 01 00 1c lwz r0,28(r1) status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; ffc0d054: 38 60 00 00 li r3,0 } } return true; } ffc0d058: 83 81 00 08 lwz r28,8(r1) ffc0d05c: 7c 08 03 a6 mtlr r0 ffc0d060: 83 a1 00 0c lwz r29,12(r1) ffc0d064: 83 c1 00 10 lwz r30,16(r1) ffc0d068: 83 e1 00 14 lwz r31,20(r1) ffc0d06c: 38 21 00 18 addi r1,r1,24 ffc0d070: 4e 80 00 20 blr =============================================================================== ffc0d074 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d074: 94 21 ff e8 stwu r1,-24(r1) ffc0d078: 7c 08 02 a6 mflr r0 ffc0d07c: 93 c1 00 10 stw r30,16(r1) (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } ffc0d080: 3f c0 00 00 lis r30,0 ffc0d084: 3b de 2c f4 addi r30,r30,11508 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d088: 93 e1 00 14 stw r31,20(r1) (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } ffc0d08c: 83 fe 00 08 lwz r31,8(r30) #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d090: 93 a1 00 0c stw r29,12(r1) ffc0d094: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d098: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d09c: 90 01 00 1c stw r0,28(r1) ffc0d0a0: 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 ); ffc0d0a4: 41 9e 00 34 beq- cr7,ffc0d0d8 <_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)( ffc0d0a8: 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 ) ffc0d0ac: 80 1f 00 20 lwz r0,32(r31) (*the_extension->Callouts.thread_delete)( ffc0d0b0: 39 3c 2d 38 addi r9,r28,11576 ffc0d0b4: 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 ) ffc0d0b8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d0bc: 41 9e 00 10 beq- cr7,ffc0d0cc <_User_extensions_Thread_delete+0x58> (*the_extension->Callouts.thread_delete)( ffc0d0c0: 80 69 00 0c lwz r3,12(r9) ffc0d0c4: 7c 09 03 a6 mtctr r0 ffc0d0c8: 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 ) { ffc0d0cc: 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 ); ffc0d0d0: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d0d4: 40 9e ff d8 bne+ cr7,ffc0d0ac <_User_extensions_Thread_delete+0x38> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } ffc0d0d8: 80 01 00 1c lwz r0,28(r1) ffc0d0dc: 83 81 00 08 lwz r28,8(r1) ffc0d0e0: 7c 08 03 a6 mtlr r0 ffc0d0e4: 83 a1 00 0c lwz r29,12(r1) ffc0d0e8: 83 c1 00 10 lwz r30,16(r1) ffc0d0ec: 83 e1 00 14 lwz r31,20(r1) ffc0d0f0: 38 21 00 18 addi r1,r1,24 ffc0d0f4: 4e 80 00 20 blr =============================================================================== ffc0ceb8 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0ceb8: 94 21 ff e8 stwu r1,-24(r1) ffc0cebc: 7c 08 02 a6 mflr r0 ffc0cec0: 93 c1 00 10 stw r30,16(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0cec4: 3f c0 00 00 lis r30,0 ffc0cec8: 3b de 2c f4 addi r30,r30,11508 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0cecc: 93 e1 00 14 stw r31,20(r1) the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0ced0: 83 fe 00 08 lwz r31,8(r30) } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0ced4: 93 a1 00 0c stw r29,12(r1) ffc0ced8: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0cedc: 7f 9f f0 00 cmpw cr7,r31,r30 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0cee0: 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 ); ffc0cee4: 41 9e 00 28 beq- cr7,ffc0cf0c <_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 ) ffc0cee8: 80 1f 00 2c lwz r0,44(r31) (*the_extension->Callouts.thread_exitted)( executing ); ffc0ceec: 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 ) ffc0cef0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cef4: 41 9e 00 0c beq- cr7,ffc0cf00 <_User_extensions_Thread_exitted+0x48> (*the_extension->Callouts.thread_exitted)( executing ); ffc0cef8: 7c 09 03 a6 mtctr r0 ffc0cefc: 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 ) { ffc0cf00: 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 ); ffc0cf04: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0cf08: 40 9e ff e0 bne+ cr7,ffc0cee8 <_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 ); } } ffc0cf0c: 80 01 00 1c lwz r0,28(r1) ffc0cf10: 83 a1 00 0c lwz r29,12(r1) ffc0cf14: 7c 08 03 a6 mtlr r0 ffc0cf18: 83 c1 00 10 lwz r30,16(r1) ffc0cf1c: 83 e1 00 14 lwz r31,20(r1) ffc0cf20: 38 21 00 18 addi r1,r1,24 ffc0cf24: 4e 80 00 20 blr =============================================================================== ffc0e258 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e258: 94 21 ff e8 stwu r1,-24(r1) (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0e25c: 3d 20 00 00 lis r9,0 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e260: 7c 08 02 a6 mflr r0 ffc0e264: 93 c1 00 10 stw r30,16(r1) (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0e268: 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 ); ffc0e26c: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e270: 93 e1 00 14 stw r31,20(r1) (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0e274: 83 e9 2d 74 lwz r31,11636(r9) #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e278: 93 a1 00 0c stw r29,12(r1) ffc0e27c: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e280: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e284: 90 01 00 1c stw r0,28(r1) ffc0e288: 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 ); ffc0e28c: 41 9e 00 34 beq- cr7,ffc0e2c0 <_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)( ffc0e290: 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 ) ffc0e294: 80 1f 00 1c lwz r0,28(r31) (*the_extension->Callouts.thread_restart)( ffc0e298: 39 3c 2d b8 addi r9,r28,11704 ffc0e29c: 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 ) ffc0e2a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e2a4: 41 9e 00 10 beq- cr7,ffc0e2b4 <_User_extensions_Thread_restart+0x5c> (*the_extension->Callouts.thread_restart)( ffc0e2a8: 80 69 00 0c lwz r3,12(r9) ffc0e2ac: 7c 09 03 a6 mtctr r0 ffc0e2b0: 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 ) { ffc0e2b4: 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 ); ffc0e2b8: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0e2bc: 40 9e ff d8 bne+ cr7,ffc0e294 <_User_extensions_Thread_restart+0x3c> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0e2c0: 80 01 00 1c lwz r0,28(r1) ffc0e2c4: 83 81 00 08 lwz r28,8(r1) ffc0e2c8: 7c 08 03 a6 mtlr r0 ffc0e2cc: 83 a1 00 0c lwz r29,12(r1) ffc0e2d0: 83 c1 00 10 lwz r30,16(r1) ffc0e2d4: 83 e1 00 14 lwz r31,20(r1) ffc0e2d8: 38 21 00 18 addi r1,r1,24 ffc0e2dc: 4e 80 00 20 blr =============================================================================== ffc0d0f8 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d0f8: 94 21 ff e8 stwu r1,-24(r1) (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0d0fc: 3d 20 00 00 lis r9,0 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d100: 7c 08 02 a6 mflr r0 ffc0d104: 93 c1 00 10 stw r30,16(r1) (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0d108: 3b c9 2c f4 addi r30,r9,11508 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d10c: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d110: 93 e1 00 14 stw r31,20(r1) (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0d114: 83 e9 2c f4 lwz r31,11508(r9) #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d118: 93 a1 00 0c stw r29,12(r1) ffc0d11c: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d120: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d124: 90 01 00 1c stw r0,28(r1) ffc0d128: 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 ); ffc0d12c: 41 9e 00 34 beq- cr7,ffc0d160 <_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)( ffc0d130: 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 ) ffc0d134: 80 1f 00 18 lwz r0,24(r31) (*the_extension->Callouts.thread_start)( ffc0d138: 39 3c 2d 38 addi r9,r28,11576 ffc0d13c: 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 ) ffc0d140: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d144: 41 9e 00 10 beq- cr7,ffc0d154 <_User_extensions_Thread_start+0x5c> (*the_extension->Callouts.thread_start)( ffc0d148: 80 69 00 0c lwz r3,12(r9) ffc0d14c: 7c 09 03 a6 mtctr r0 ffc0d150: 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 ) { ffc0d154: 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 ); ffc0d158: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d15c: 40 9e ff d8 bne+ cr7,ffc0d134 <_User_extensions_Thread_start+0x3c> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0d160: 80 01 00 1c lwz r0,28(r1) ffc0d164: 83 81 00 08 lwz r28,8(r1) ffc0d168: 7c 08 03 a6 mtlr r0 ffc0d16c: 83 a1 00 0c lwz r29,12(r1) ffc0d170: 83 c1 00 10 lwz r30,16(r1) ffc0d174: 83 e1 00 14 lwz r31,20(r1) ffc0d178: 38 21 00 18 addi r1,r1,24 ffc0d17c: 4e 80 00 20 blr =============================================================================== ffc0d180 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d180: 94 21 ff e8 stwu r1,-24(r1) the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0d184: 3d 20 00 00 lis r9,0 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d188: 7c 08 02 a6 mflr r0 ffc0d18c: 93 c1 00 10 stw r30,16(r1) the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0d190: 3b c9 2b b0 addi r30,r9,11184 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d194: 3b de 00 04 addi r30,r30,4 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d198: 93 e1 00 14 stw r31,20(r1) the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0d19c: 83 e9 2b b0 lwz r31,11184(r9) void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d1a0: 93 81 00 08 stw r28,8(r1) ffc0d1a4: 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 ); ffc0d1a8: 7f 9f f0 00 cmpw cr7,r31,r30 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d1ac: 93 a1 00 0c stw r29,12(r1) ffc0d1b0: 7c 9d 23 78 mr r29,r4 ffc0d1b4: 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 ); ffc0d1b8: 41 9e 00 24 beq- cr7,ffc0d1dc <_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 ); ffc0d1bc: 80 1f 00 08 lwz r0,8(r31) ffc0d1c0: 7f 83 e3 78 mr r3,r28 ffc0d1c4: 7f a4 eb 78 mr r4,r29 ffc0d1c8: 7c 09 03 a6 mtctr r0 ffc0d1cc: 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 ) { ffc0d1d0: 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 ); ffc0d1d4: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d1d8: 40 9e ff e4 bne+ cr7,ffc0d1bc <_User_extensions_Thread_switch+0x3c> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0d1dc: 80 01 00 1c lwz r0,28(r1) ffc0d1e0: 83 81 00 08 lwz r28,8(r1) ffc0d1e4: 7c 08 03 a6 mtlr r0 ffc0d1e8: 83 a1 00 0c lwz r29,12(r1) ffc0d1ec: 83 c1 00 10 lwz r30,16(r1) ffc0d1f0: 83 e1 00 14 lwz r31,20(r1) ffc0d1f4: 38 21 00 18 addi r1,r1,24 ffc0d1f8: 4e 80 00 20 blr =============================================================================== ffc0f6dc <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0f6dc: 94 21 ff e0 stwu r1,-32(r1) ffc0f6e0: 7c 08 02 a6 mflr r0 ffc0f6e4: 93 c1 00 18 stw r30,24(r1) ffc0f6e8: 7c be 2b 78 mr r30,r5 ffc0f6ec: 93 e1 00 1c stw r31,28(r1) ffc0f6f0: 7c 7f 1b 78 mr r31,r3 ffc0f6f4: 90 01 00 24 stw r0,36(r1) ffc0f6f8: 93 61 00 0c stw r27,12(r1) ffc0f6fc: 93 81 00 10 stw r28,16(r1) ffc0f700: 93 a1 00 14 stw r29,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f704: 7c 00 00 a6 mfmsr r0 ffc0f708: 7d 30 42 a6 mfsprg r9,0 ffc0f70c: 7c 09 48 78 andc r9,r0,r9 ffc0f710: 7d 20 01 24 mtmsr r9 } } _ISR_Enable( level ); } ffc0f714: 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 ); ffc0f718: 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 ) ) { ffc0f71c: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0f720: 41 9e 00 6c beq- cr7,ffc0f78c <_Watchdog_Adjust+0xb0> switch ( direction ) { ffc0f724: 2f 84 00 00 cmpwi cr7,r4,0 ffc0f728: 40 9e 00 8c bne- cr7,ffc0f7b4 <_Watchdog_Adjust+0xd8> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f72c: 2f 85 00 00 cmpwi cr7,r5,0 ffc0f730: 41 9e 00 5c beq- cr7,ffc0f78c <_Watchdog_Adjust+0xb0> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f734: 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; ffc0f738: 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 ) { ffc0f73c: 7f 85 e8 40 cmplw cr7,r5,r29 ffc0f740: 40 bc 00 18 bge+ cr7,ffc0f758 <_Watchdog_Adjust+0x7c> <== ALWAYS TAKEN ffc0f744: 48 00 00 ac b ffc0f7f0 <_Watchdog_Adjust+0x114> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f748: 41 82 00 44 beq- ffc0f78c <_Watchdog_Adjust+0xb0> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f74c: 83 a9 00 10 lwz r29,16(r9) ffc0f750: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0f754: 41 9d 00 9c bgt- cr7,ffc0f7f0 <_Watchdog_Adjust+0x114> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0f758: 93 69 00 10 stw r27,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f75c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0f760: 7f e3 fb 78 mr r3,r31 ffc0f764: 48 00 03 31 bl ffc0fa94 <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f768: 7c 00 00 a6 mfmsr r0 ffc0f76c: 7d 30 42 a6 mfsprg r9,0 ffc0f770: 7c 09 48 78 andc r9,r0,r9 ffc0f774: 7d 20 01 24 mtmsr r9 } } _ISR_Enable( level ); } ffc0f778: 81 7f 00 00 lwz r11,0(r31) switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f77c: 7f dd f0 51 subf. r30,r29,r30 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0f780: 7f 9c 58 00 cmpw cr7,r28,r11 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); ffc0f784: 7d 69 5b 78 mr r9,r11 ffc0f788: 40 9e ff c0 bne+ cr7,ffc0f748 <_Watchdog_Adjust+0x6c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f78c: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0f790: 80 01 00 24 lwz r0,36(r1) ffc0f794: 83 61 00 0c lwz r27,12(r1) ffc0f798: 7c 08 03 a6 mtlr r0 ffc0f79c: 83 81 00 10 lwz r28,16(r1) ffc0f7a0: 83 a1 00 14 lwz r29,20(r1) ffc0f7a4: 83 c1 00 18 lwz r30,24(r1) ffc0f7a8: 83 e1 00 1c lwz r31,28(r1) ffc0f7ac: 38 21 00 20 addi r1,r1,32 ffc0f7b0: 4e 80 00 20 blr * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0f7b4: 2f 84 00 01 cmpwi cr7,r4,1 ffc0f7b8: 40 9e ff d4 bne+ cr7,ffc0f78c <_Watchdog_Adjust+0xb0> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0f7bc: 81 69 00 10 lwz r11,16(r9) ffc0f7c0: 7f cb 2a 14 add r30,r11,r5 ffc0f7c4: 93 c9 00 10 stw r30,16(r9) ffc0f7c8: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0f7cc: 80 01 00 24 lwz r0,36(r1) ffc0f7d0: 83 61 00 0c lwz r27,12(r1) ffc0f7d4: 7c 08 03 a6 mtlr r0 ffc0f7d8: 83 81 00 10 lwz r28,16(r1) ffc0f7dc: 83 a1 00 14 lwz r29,20(r1) ffc0f7e0: 83 c1 00 18 lwz r30,24(r1) ffc0f7e4: 83 e1 00 1c lwz r31,28(r1) ffc0f7e8: 38 21 00 20 addi r1,r1,32 ffc0f7ec: 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; ffc0f7f0: 7f de e8 50 subf r30,r30,r29 ffc0f7f4: 93 c9 00 10 stw r30,16(r9) break; ffc0f7f8: 4b ff ff 94 b ffc0f78c <_Watchdog_Adjust+0xb0> =============================================================================== ffc21320 <_Watchdog_Adjust_to_chain>: { Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { ffc21320: 2c 04 00 00 cmpwi r4,0 Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { ffc21324: 94 21 ff f0 stwu r1,-16(r1) ffc21328: 93 e1 00 0c stw r31,12(r1) Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { ffc2132c: 41 82 00 94 beq- ffc213c0 <_Watchdog_Adjust_to_chain+0xa0> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc21330: 7c c0 00 a6 mfmsr r6 ffc21334: 7c 10 42 a6 mfsprg r0,0 ffc21338: 7c c0 00 78 andc r0,r6,r0 ffc2133c: 7c 00 01 24 mtmsr r0 return; } _ISR_Disable( level ); ffc21340: 81 23 00 00 lwz r9,0(r3) /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc21344: 3b e0 00 00 li r31,0 ffc21348: 38 e3 00 04 addi r7,r3,4 ffc2134c: 39 85 00 04 addi r12,r5,4 while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { ffc21350: 7f 89 38 00 cmpw cr7,r9,r7 ffc21354: 41 9e 00 68 beq- cr7,ffc213bc <_Watchdog_Adjust_to_chain+0x9c> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { ffc21358: 80 09 00 10 lwz r0,16(r9) ffc2135c: 7f 80 20 40 cmplw cr7,r0,r4 ffc21360: 41 9d 00 6c bgt- cr7,ffc213cc <_Watchdog_Adjust_to_chain+0xac> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc21364: 93 e9 00 10 stw r31,16(r9) /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; ffc21368: 7c 80 20 50 subf r4,r0,r4 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc2136c: 81 09 00 00 lwz r8,0(r9) previous = the_node->previous; ffc21370: 81 49 00 04 lwz r10,4(r9) next->previous = previous; ffc21374: 91 48 00 04 stw r10,4(r8) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; ffc21378: 81 65 00 08 lwz r11,8(r5) Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; ffc2137c: 91 0a 00 00 stw r8,0(r10) ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; ffc21380: 91 89 00 00 stw r12,0(r9) tail->previous = the_node; old_last->next = the_node; ffc21384: 91 2b 00 00 stw r9,0(r11) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; ffc21388: 91 25 00 08 stw r9,8(r5) old_last->next = the_node; the_node->previous = old_last; ffc2138c: 91 69 00 04 stw r11,4(r9) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc21390: 7c 00 00 a6 mfmsr r0 ffc21394: 7c c0 01 24 mtmsr r6 ffc21398: 7c 00 01 24 mtmsr r0 break; } } _ISR_Enable( level ); } ffc2139c: 81 23 00 00 lwz r9,0(r3) _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); if ( _Chain_Is_empty( header ) ) ffc213a0: 7f 87 48 00 cmpw cr7,r7,r9 ffc213a4: 41 9e 00 10 beq- cr7,ffc213b4 <_Watchdog_Adjust_to_chain+0x94> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) ffc213a8: 80 09 00 10 lwz r0,16(r9) ffc213ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc213b0: 41 9e ff bc beq+ cr7,ffc2136c <_Watchdog_Adjust_to_chain+0x4c><== NEVER TAKEN } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { ffc213b4: 2f 84 00 00 cmpwi cr7,r4,0 ffc213b8: 40 9e ff 98 bne+ cr7,ffc21350 <_Watchdog_Adjust_to_chain+0x30> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc213bc: 7c c0 01 24 mtmsr r6 break; } } _ISR_Enable( level ); } ffc213c0: 83 e1 00 0c lwz r31,12(r1) ffc213c4: 38 21 00 10 addi r1,r1,16 ffc213c8: 4e 80 00 20 blr /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; ffc213cc: 7c 04 00 50 subf r0,r4,r0 ffc213d0: 90 09 00 10 stw r0,16(r9) break; ffc213d4: 4b ff ff e8 b ffc213bc <_Watchdog_Adjust_to_chain+0x9c> =============================================================================== ffc0d1fc <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; ffc0d1fc: 3d 20 00 00 lis r9,0 ffc0d200: 80 09 2d 40 lwz r0,11584(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d204: 7c e0 00 a6 mfmsr r7 ffc0d208: 7d 30 42 a6 mfsprg r9,0 ffc0d20c: 7c e9 48 78 andc r9,r7,r9 ffc0d210: 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 ) { ffc0d214: 81 24 00 08 lwz r9,8(r4) ffc0d218: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d21c: 40 9e 01 0c bne- cr7,ffc0d328 <_Watchdog_Insert+0x12c> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; ffc0d220: 3c a0 00 00 lis r5,0 ffc0d224: 81 25 27 60 lwz r9,10080(r5) if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; ffc0d228: 39 60 00 01 li r11,1 ffc0d22c: 91 64 00 08 stw r11,8(r4) ffc0d230: 3d 80 00 00 lis r12,0 _Watchdog_Sync_count++; ffc0d234: 39 29 00 01 addi r9,r9,1 ffc0d238: 91 25 27 60 stw r9,10080(r5) restart: delta_interval = the_watchdog->initial; ffc0d23c: 81 24 00 0c lwz r9,12(r4) RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); ffc0d240: 81 63 00 00 lwz r11,0(r3) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d244: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d248: 41 9e 00 98 beq- cr7,ffc0d2e0 <_Watchdog_Insert+0xe4> ffc0d24c: 81 4b 00 00 lwz r10,0(r11) ffc0d250: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d254: 41 9e 00 8c beq- cr7,ffc0d2e0 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0d258: 81 4b 00 10 lwz r10,16(r11) ffc0d25c: 7f 89 50 40 cmplw cr7,r9,r10 ffc0d260: 41 9c 00 d0 blt- cr7,ffc0d330 <_Watchdog_Insert+0x134> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0d264: 7d 00 00 a6 mfmsr r8 ffc0d268: 7c e0 01 24 mtmsr r7 ffc0d26c: 7d 00 01 24 mtmsr r8 delta_interval -= after->delta_interval; _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d270: 81 04 00 08 lwz r8,8(r4) ffc0d274: 2f 88 00 01 cmpwi cr7,r8,1 ffc0d278: 40 9e 00 98 bne- cr7,ffc0d310 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d27c: 81 0c 27 50 lwz r8,10064(r12) ffc0d280: 38 cc 27 50 addi r6,r12,10064 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0d284: 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 ) { ffc0d288: 7f 80 40 40 cmplw cr7,r0,r8 ffc0d28c: 40 bc 00 48 bge+ cr7,ffc0d2d4 <_Watchdog_Insert+0xd8> ffc0d290: 48 00 00 dc b ffc0d36c <_Watchdog_Insert+0x170> for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d294: 81 4b 00 00 lwz r10,0(r11) ffc0d298: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d29c: 41 9e 00 44 beq- cr7,ffc0d2e0 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0d2a0: 81 4b 00 10 lwz r10,16(r11) ffc0d2a4: 7f 8a 48 40 cmplw cr7,r10,r9 ffc0d2a8: 41 9d 00 88 bgt- cr7,ffc0d330 <_Watchdog_Insert+0x134> ffc0d2ac: 7d 00 00 a6 mfmsr r8 ffc0d2b0: 7c e0 01 24 mtmsr r7 ffc0d2b4: 7d 00 01 24 mtmsr r8 delta_interval -= after->delta_interval; _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d2b8: 81 04 00 08 lwz r8,8(r4) if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0d2bc: 7d 2a 48 50 subf r9,r10,r9 _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d2c0: 2f 88 00 01 cmpwi cr7,r8,1 ffc0d2c4: 40 9e 00 4c bne- cr7,ffc0d310 <_Watchdog_Insert+0x114> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d2c8: 81 46 00 00 lwz r10,0(r6) ffc0d2cc: 7f 80 50 40 cmplw cr7,r0,r10 ffc0d2d0: 41 9c 00 9c blt- cr7,ffc0d36c <_Watchdog_Insert+0x170> <== NEVER TAKEN for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d2d4: 2f 89 00 00 cmpwi cr7,r9,0 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } ffc0d2d8: 81 6b 00 00 lwz r11,0(r11) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d2dc: 40 9e ff b8 bne+ cr7,ffc0d294 <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0d2e0: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d2e4: 3d 00 00 00 lis r8,0 ffc0d2e8: 81 08 27 64 lwz r8,10084(r8) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; ffc0d2ec: 38 c0 00 02 li r6,2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0d2f0: 81 4b 00 00 lwz r10,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0d2f4: 91 64 00 04 stw r11,4(r4) ffc0d2f8: 90 c4 00 08 stw r6,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0d2fc: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0d300: 90 8b 00 00 stw r4,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0d304: 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; ffc0d308: 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; ffc0d30c: 91 04 00 14 stw r8,20(r4) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; ffc0d310: 90 0c 27 50 stw r0,10064(r12) _Watchdog_Sync_count--; ffc0d314: 81 25 27 60 lwz r9,10080(r5) ffc0d318: 38 09 ff ff addi r0,r9,-1 ffc0d31c: 90 05 27 60 stw r0,10080(r5) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d320: 7c e0 01 24 mtmsr r7 ffc0d324: 4e 80 00 20 blr ffc0d328: 7c e0 01 24 mtmsr r7 ffc0d32c: 4e 80 00 20 blr if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; ffc0d330: 7d 49 50 50 subf r10,r9,r10 ffc0d334: 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; ffc0d338: 3d 00 00 00 lis r8,0 ffc0d33c: 38 c0 00 02 li r6,2 _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0d340: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d344: 81 08 27 64 lwz r8,10084(r8) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0d348: 81 4b 00 00 lwz r10,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0d34c: 91 64 00 04 stw r11,4(r4) ffc0d350: 90 c4 00 08 stw r6,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0d354: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0d358: 90 8b 00 00 stw r4,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0d35c: 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; ffc0d360: 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; ffc0d364: 91 04 00 14 stw r8,20(r4) ffc0d368: 4b ff ff a8 b ffc0d310 <_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; ffc0d36c: 90 0c 27 50 stw r0,10064(r12) goto restart; ffc0d370: 4b ff fe cc b ffc0d23c <_Watchdog_Insert+0x40> =============================================================================== ffc0d3c4 <_Watchdog_Remove>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d3c4: 7d 20 00 a6 mfmsr r9 ffc0d3c8: 7c 10 42 a6 mfsprg r0,0 ffc0d3cc: 7d 20 00 78 andc r0,r9,r0 ffc0d3d0: 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; ffc0d3d4: 80 03 00 08 lwz r0,8(r3) switch ( previous_state ) { ffc0d3d8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d3dc: 41 9e 00 98 beq- cr7,ffc0d474 <_Watchdog_Remove+0xb0> ffc0d3e0: 2b 80 00 01 cmplwi cr7,r0,1 ffc0d3e4: 40 9c 00 1c bge- cr7,ffc0d400 <_Watchdog_Remove+0x3c> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d3e8: 3d 60 00 00 lis r11,0 ffc0d3ec: 81 6b 27 64 lwz r11,10084(r11) ffc0d3f0: 91 63 00 18 stw r11,24(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d3f4: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d3f8: 7c 03 03 78 mr r3,r0 ffc0d3fc: 4e 80 00 20 blr Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { ffc0d400: 2b 80 00 03 cmplwi cr7,r0,3 ffc0d404: 41 bd ff e4 bgt- cr7,ffc0d3e8 <_Watchdog_Remove+0x24> <== NEVER TAKEN } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } ffc0d408: 81 63 00 00 lwz r11,0(r3) break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0d40c: 39 00 00 00 li r8,0 ffc0d410: 91 03 00 08 stw r8,8(r3) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0d414: 81 4b 00 00 lwz r10,0(r11) ffc0d418: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d41c: 41 9e 00 14 beq- cr7,ffc0d430 <_Watchdog_Remove+0x6c> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0d420: 81 0b 00 10 lwz r8,16(r11) ffc0d424: 81 43 00 10 lwz r10,16(r3) ffc0d428: 7d 48 52 14 add r10,r8,r10 ffc0d42c: 91 4b 00 10 stw r10,16(r11) if ( _Watchdog_Sync_count ) ffc0d430: 3d 40 00 00 lis r10,0 ffc0d434: 81 4a 27 60 lwz r10,10080(r10) ffc0d438: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d43c: 41 9e 00 14 beq- cr7,ffc0d450 <_Watchdog_Remove+0x8c> _Watchdog_Sync_level = _ISR_Nest_level; ffc0d440: 3d 40 00 00 lis r10,0 ffc0d444: 81 0a 2d 40 lwz r8,11584(r10) ffc0d448: 3d 40 00 00 lis r10,0 ffc0d44c: 91 0a 27 50 stw r8,10064(r10) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0d450: 81 43 00 04 lwz r10,4(r3) next->previous = previous; ffc0d454: 91 4b 00 04 stw r10,4(r11) previous->next = next; ffc0d458: 91 6a 00 00 stw r11,0(r10) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d45c: 3d 60 00 00 lis r11,0 ffc0d460: 81 6b 27 64 lwz r11,10084(r11) ffc0d464: 91 63 00 18 stw r11,24(r3) ffc0d468: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d46c: 7c 03 03 78 mr r3,r0 ffc0d470: 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; ffc0d474: 39 60 00 00 li r11,0 ffc0d478: 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; ffc0d47c: 3d 60 00 00 lis r11,0 ffc0d480: 81 6b 27 64 lwz r11,10084(r11) ffc0d484: 91 63 00 18 stw r11,24(r3) ffc0d488: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d48c: 7c 03 03 78 mr r3,r0 ffc0d490: 4e 80 00 20 blr =============================================================================== ffc0ee38 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0ee38: 94 21 ff e8 stwu r1,-24(r1) ffc0ee3c: 7c 08 02 a6 mflr r0 ffc0ee40: 93 c1 00 10 stw r30,16(r1) ffc0ee44: 7c 7e 1b 78 mr r30,r3 ffc0ee48: 93 e1 00 14 stw r31,20(r1) ffc0ee4c: 7c 9f 23 78 mr r31,r4 ffc0ee50: 90 01 00 1c stw r0,28(r1) ffc0ee54: 93 81 00 08 stw r28,8(r1) ffc0ee58: 93 a1 00 0c stw r29,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ee5c: 7f a0 00 a6 mfmsr r29 ffc0ee60: 7c 10 42 a6 mfsprg r0,0 ffc0ee64: 7f a0 00 78 andc r0,r29,r0 ffc0ee68: 7c 00 01 24 mtmsr r0 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0ee6c: 3c 60 ff c2 lis r3,-62 ffc0ee70: 7f e5 fb 78 mr r5,r31 ffc0ee74: 38 63 10 ac addi r3,r3,4268 ffc0ee78: 7f c4 f3 78 mr r4,r30 ffc0ee7c: 4c c6 31 82 crclr 4*cr1+eq ffc0ee80: 4b ff 7f 61 bl ffc06de0 printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0ee84: 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 ); ffc0ee88: 3b ff 00 04 addi r31,r31,4 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { ffc0ee8c: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0ee90: 41 9e 00 54 beq- cr7,ffc0eee4 <_Watchdog_Report_chain+0xac> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0ee94: 7f 84 e3 78 mr r4,r28 ffc0ee98: 38 60 00 00 li r3,0 ffc0ee9c: 48 00 00 5d bl ffc0eef8 <_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 ) ffc0eea0: 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 ) ; ffc0eea4: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0eea8: 40 9e ff ec bne+ cr7,ffc0ee94 <_Watchdog_Report_chain+0x5c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0eeac: 3c 60 ff c2 lis r3,-62 ffc0eeb0: 38 63 10 c4 addi r3,r3,4292 ffc0eeb4: 7f c4 f3 78 mr r4,r30 ffc0eeb8: 4c c6 31 82 crclr 4*cr1+eq ffc0eebc: 4b ff 7f 25 bl ffc06de0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0eec0: 7f a0 01 24 mtmsr r29 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0eec4: 80 01 00 1c lwz r0,28(r1) ffc0eec8: 83 81 00 08 lwz r28,8(r1) ffc0eecc: 7c 08 03 a6 mtlr r0 ffc0eed0: 83 a1 00 0c lwz r29,12(r1) ffc0eed4: 83 c1 00 10 lwz r30,16(r1) ffc0eed8: 83 e1 00 14 lwz r31,20(r1) ffc0eedc: 38 21 00 18 addi r1,r1,24 ffc0eee0: 4e 80 00 20 blr _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); ffc0eee4: 3c 60 ff c2 lis r3,-62 ffc0eee8: 38 63 10 d4 addi r3,r3,4308 ffc0eeec: 4c c6 31 82 crclr 4*cr1+eq ffc0eef0: 4b ff 7e f1 bl ffc06de0 ffc0eef4: 4b ff ff cc b ffc0eec0 <_Watchdog_Report_chain+0x88> =============================================================================== ffc27e20 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } ffc27e20: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc27e24: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc04de0 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); ffc04de0: 4b ff ff 64 b ffc04d44 <== NOT EXECUTED =============================================================================== ffc0a138 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc0a138: 94 21 ff 90 stwu r1,-112(r1) ffc0a13c: 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 ); ffc0a140: 7c 83 23 78 mr r3,r4 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc0a144: 93 81 00 60 stw r28,96(r1) ffc0a148: 7c bc 2b 78 mr r28,r5 ffc0a14c: 93 e1 00 6c stw r31,108(r1) ffc0a150: 7c 9f 23 78 mr r31,r4 ffc0a154: 90 01 00 74 stw r0,116(r1) ffc0a158: 93 41 00 58 stw r26,88(r1) ffc0a15c: 93 61 00 5c stw r27,92(r1) ffc0a160: 93 a1 00 64 stw r29,100(r1) ffc0a164: 93 c1 00 68 stw r30,104(r1) /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); ffc0a168: 4b ff e2 dd bl ffc08444 if ( old_parent_pathlen == 0 ) ffc0a16c: 2c 03 00 00 cmpwi r3,0 ffc0a170: 40 82 01 cc bne- ffc0a33c <_rename_r+0x204> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc0a174: 3b a1 00 24 addi r29,r1,36 ffc0a178: 7f e3 fb 78 mr r3,r31 ffc0a17c: 38 81 00 08 addi r4,r1,8 ffc0a180: 7f a5 eb 78 mr r5,r29 ffc0a184: 48 00 04 bd bl ffc0a640 ffc0a188: 3b c0 00 00 li r30,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; ffc0a18c: 3b 60 00 00 li r27,0 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; ffc0a190: 80 01 00 24 lwz r0,36(r1) name = old + old_parent_pathlen; ffc0a194: 7f ff f2 14 add r31,r31,r30 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc0a198: 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; ffc0a19c: 93 e1 00 0c stw r31,12(r1) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc0a1a0: 3b c1 00 10 addi r30,r1,16 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; ffc0a1a4: 90 01 00 10 stw r0,16(r1) ffc0a1a8: 80 01 00 28 lwz r0,40(r1) ffc0a1ac: 90 01 00 14 stw r0,20(r1) ffc0a1b0: 80 01 00 2c lwz r0,44(r1) ffc0a1b4: 90 01 00 18 stw r0,24(r1) ffc0a1b8: 80 01 00 30 lwz r0,48(r1) ffc0a1bc: 90 01 00 1c stw r0,28(r1) ffc0a1c0: 80 01 00 34 lwz r0,52(r1) ffc0a1c4: 90 01 00 20 stw r0,32(r1) name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc0a1c8: 48 01 07 ad bl ffc1a974 ffc0a1cc: 7c 64 1b 78 mr r4,r3 ffc0a1d0: 7f e3 fb 78 mr r3,r31 ffc0a1d4: 4b ff e2 d1 bl ffc084a4 ffc0a1d8: 7f ff 1a 14 add r31,r31,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc0a1dc: 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 ) ); ffc0a1e0: 93 e1 00 0c stw r31,12(r1) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc0a1e4: 48 01 07 91 bl ffc1a974 ffc0a1e8: 38 a0 00 00 li r5,0 ffc0a1ec: 7c 64 1b 78 mr r4,r3 ffc0a1f0: 7f c6 f3 78 mr r6,r30 ffc0a1f4: 7f e3 fb 78 mr r3,r31 ffc0a1f8: 38 e0 00 00 li r7,0 ffc0a1fc: 4b ff e1 21 bl ffc0831c 0, &old_loc, false ); if ( result != 0 ) { ffc0a200: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a204: 40 9e 01 20 bne- cr7,ffc0a324 <_rename_r+0x1ec> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); ffc0a208: 3b e1 00 38 addi r31,r1,56 ffc0a20c: 7f 83 e3 78 mr r3,r28 ffc0a210: 38 81 00 08 addi r4,r1,8 ffc0a214: 7f e5 fb 78 mr r5,r31 ffc0a218: 48 00 04 29 bl ffc0a640 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); ffc0a21c: 81 21 00 44 lwz r9,68(r1) ffc0a220: 80 61 00 08 lwz r3,8(r1) ffc0a224: 7f e4 fb 78 mr r4,r31 ffc0a228: 80 09 00 04 lwz r0,4(r9) ffc0a22c: 38 a1 00 0c addi r5,r1,12 ffc0a230: 7c 7c 1a 14 add r3,r28,r3 ffc0a234: 7c 09 03 a6 mtctr r0 ffc0a238: 4e 80 04 21 bctrl if ( result != 0 ) { ffc0a23c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a240: 40 9e 01 30 bne- cr7,ffc0a370 <_rename_r+0x238> /* * 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 ) { ffc0a244: 80 01 00 48 lwz r0,72(r1) ffc0a248: 81 21 00 34 lwz r9,52(r1) ffc0a24c: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a250: 40 9e 00 78 bne- cr7,ffc0a2c8 <_rename_r+0x190> 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 ); ffc0a254: 81 21 00 44 lwz r9,68(r1) ffc0a258: 7f c4 f3 78 mr r4,r30 ffc0a25c: 7f e5 fb 78 mr r5,r31 ffc0a260: 80 c1 00 0c lwz r6,12(r1) ffc0a264: 80 09 00 40 lwz r0,64(r9) ffc0a268: 7f a3 eb 78 mr r3,r29 ffc0a26c: 7c 09 03 a6 mtctr r0 ffc0a270: 4e 80 04 21 bctrl ffc0a274: 7c 7a 1b 78 mr r26,r3 rtems_filesystem_freenode( &new_parent_loc ); ffc0a278: 7f e3 fb 78 mr r3,r31 ffc0a27c: 4b ff e5 51 bl ffc087cc if ( free_old_parentloc ) ffc0a280: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0a284: 40 9e 00 38 bne- cr7,ffc0a2bc <_rename_r+0x184> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); ffc0a288: 7f c3 f3 78 mr r3,r30 ffc0a28c: 4b ff e5 41 bl ffc087cc return result; } ffc0a290: 80 01 00 74 lwz r0,116(r1) ffc0a294: 7f 43 d3 78 mr r3,r26 ffc0a298: 83 61 00 5c lwz r27,92(r1) ffc0a29c: 7c 08 03 a6 mtlr r0 ffc0a2a0: 83 41 00 58 lwz r26,88(r1) ffc0a2a4: 83 81 00 60 lwz r28,96(r1) ffc0a2a8: 83 a1 00 64 lwz r29,100(r1) ffc0a2ac: 83 c1 00 68 lwz r30,104(r1) ffc0a2b0: 83 e1 00 6c lwz r31,108(r1) ffc0a2b4: 38 21 00 70 addi r1,r1,112 ffc0a2b8: 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 ); ffc0a2bc: 7f a3 eb 78 mr r3,r29 ffc0a2c0: 4b ff e5 0d bl ffc087cc ffc0a2c4: 4b ff ff c4 b ffc0a288 <_rename_r+0x150> * 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 ); ffc0a2c8: 7f e3 fb 78 mr r3,r31 ffc0a2cc: 4b ff e5 01 bl ffc087cc if ( free_old_parentloc ) ffc0a2d0: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0a2d4: 41 be 00 0c beq+ cr7,ffc0a2e0 <_rename_r+0x1a8> rtems_filesystem_freenode( &old_parent_loc ); ffc0a2d8: 7f a3 eb 78 mr r3,r29 ffc0a2dc: 4b ff e4 f1 bl ffc087cc rtems_filesystem_freenode( &old_loc ); ffc0a2e0: 7f c3 f3 78 mr r3,r30 ffc0a2e4: 4b ff e4 e9 bl ffc087cc rtems_set_errno_and_return_minus_one( EXDEV ); ffc0a2e8: 3b 40 ff ff li r26,-1 ffc0a2ec: 48 00 cc 19 bl ffc16f04 <__errno> ffc0a2f0: 38 00 00 12 li r0,18 ffc0a2f4: 90 03 00 00 stw r0,0(r3) if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } ffc0a2f8: 7f 43 d3 78 mr r3,r26 ffc0a2fc: 80 01 00 74 lwz r0,116(r1) ffc0a300: 83 41 00 58 lwz r26,88(r1) ffc0a304: 7c 08 03 a6 mtlr r0 ffc0a308: 83 61 00 5c lwz r27,92(r1) ffc0a30c: 83 81 00 60 lwz r28,96(r1) ffc0a310: 83 a1 00 64 lwz r29,100(r1) ffc0a314: 83 c1 00 68 lwz r30,104(r1) ffc0a318: 83 e1 00 6c lwz r31,108(r1) ffc0a31c: 38 21 00 70 addi r1,r1,112 ffc0a320: 4e 80 00 20 blr 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 ) ffc0a324: 2f 9b 00 00 cmpwi cr7,r27,0 rtems_filesystem_freenode( &old_parent_loc ); return -1; ffc0a328: 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 ) ffc0a32c: 41 9e ff 64 beq+ cr7,ffc0a290 <_rename_r+0x158> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); ffc0a330: 7f a3 eb 78 mr r3,r29 ffc0a334: 4b ff e4 99 bl ffc087cc ffc0a338: 4b ff ff 58 b ffc0a290 <_rename_r+0x158> 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, ffc0a33c: 7c 7e 1b 78 mr r30,r3 ffc0a340: 3b a1 00 24 addi r29,r1,36 ffc0a344: 7f e3 fb 78 mr r3,r31 ffc0a348: 7f c4 f3 78 mr r4,r30 ffc0a34c: 38 a0 00 02 li r5,2 ffc0a350: 7f a6 eb 78 mr r6,r29 ffc0a354: 38 e0 00 00 li r7,0 ffc0a358: 4b ff e0 71 bl ffc083c8 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) return -1; ffc0a35c: 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 ) ffc0a360: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a364: 40 be ff 2c bne- cr7,ffc0a290 <_rename_r+0x158> <== NEVER TAKEN return -1; free_old_parentloc = true; ffc0a368: 3b 60 00 01 li r27,1 ffc0a36c: 4b ff fe 24 b ffc0a190 <_rename_r+0x58> 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 ); ffc0a370: 7f e3 fb 78 mr r3,r31 ffc0a374: 4b ff e4 59 bl ffc087cc if ( free_old_parentloc ) ffc0a378: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0a37c: 41 be 00 0c beq+ cr7,ffc0a388 <_rename_r+0x250> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); ffc0a380: 7f a3 eb 78 mr r3,r29 ffc0a384: 4b ff e4 49 bl ffc087cc rtems_filesystem_freenode( &old_loc ); ffc0a388: 7f c3 f3 78 mr r3,r30 ffc0a38c: 4b ff e4 41 bl ffc087cc return -1; ffc0a390: 3b 40 ff ff li r26,-1 ffc0a394: 4b ff fe fc b ffc0a290 <_rename_r+0x158> =============================================================================== ffc04b10 : #include int chroot( const char *pathname ) { ffc04b10: 94 21 ff c8 stwu r1,-56(r1) ffc04b14: 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) { ffc04b18: 3d 20 00 00 lis r9,0 #include int chroot( const char *pathname ) { ffc04b1c: 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) { ffc04b20: 3f e0 00 00 lis r31,0 #include int chroot( const char *pathname ) { ffc04b24: 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) { ffc04b28: 83 df 26 7c lwz r30,9852(r31) #include int chroot( const char *pathname ) { ffc04b2c: 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) { ffc04b30: 38 09 2a 50 addi r0,r9,10832 ffc04b34: 7f 9e 00 00 cmpw cr7,r30,r0 #include int chroot( const char *pathname ) { ffc04b38: 93 a1 00 2c stw r29,44(r1) ffc04b3c: 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) { ffc04b40: 41 9e 00 90 beq- cr7,ffc04bd0 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); ffc04b44: 7f a3 eb 78 mr r3,r29 ffc04b48: 48 00 a9 bd bl ffc0f504 if (result) { ffc04b4c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04b50: 40 9e 00 a4 bne- cr7,ffc04bf4 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { ffc04b54: 3c 60 ff c2 lis r3,-62 ffc04b58: 38 63 95 c0 addi r3,r3,-27200 ffc04b5c: 38 80 00 01 li r4,1 ffc04b60: 38 a0 00 00 li r5,0 ffc04b64: 38 c1 00 08 addi r6,r1,8 ffc04b68: 38 e0 00 00 li r7,0 ffc04b6c: 48 00 01 f1 bl ffc04d5c ffc04b70: 2f 83 00 00 cmpwi cr7,r3,0 ffc04b74: 40 9e 00 80 bne- cr7,ffc04bf4 <== 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); ffc04b78: 80 7f 26 7c lwz r3,9852(r31) ffc04b7c: 38 63 00 18 addi r3,r3,24 ffc04b80: 48 00 03 39 bl ffc04eb8 rtems_filesystem_root = loc; ffc04b84: 81 3f 26 7c lwz r9,9852(r31) ffc04b88: 80 01 00 08 lwz r0,8(r1) return 0; ffc04b8c: 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; ffc04b90: 90 09 00 18 stw r0,24(r9) ffc04b94: 80 01 00 0c lwz r0,12(r1) ffc04b98: 90 09 00 1c stw r0,28(r9) ffc04b9c: 80 01 00 10 lwz r0,16(r1) ffc04ba0: 90 09 00 20 stw r0,32(r9) ffc04ba4: 80 01 00 14 lwz r0,20(r1) ffc04ba8: 90 09 00 24 stw r0,36(r9) ffc04bac: 80 01 00 18 lwz r0,24(r1) ffc04bb0: 90 09 00 28 stw r0,40(r9) return 0; } ffc04bb4: 80 01 00 3c lwz r0,60(r1) ffc04bb8: 83 a1 00 2c lwz r29,44(r1) ffc04bbc: 7c 08 03 a6 mtlr r0 ffc04bc0: 83 c1 00 30 lwz r30,48(r1) ffc04bc4: 83 e1 00 34 lwz r31,52(r1) ffc04bc8: 38 21 00 38 addi r1,r1,56 ffc04bcc: 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*/ ffc04bd0: 48 00 18 ed bl ffc064bc if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ ffc04bd4: 80 1f 26 7c lwz r0,9852(r31) ffc04bd8: 7f 80 f0 00 cmpw cr7,r0,r30 ffc04bdc: 40 9e ff 68 bne+ cr7,ffc04b44 rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc04be0: 48 00 de 79 bl ffc12a58 <__errno> ffc04be4: 38 00 00 86 li r0,134 ffc04be8: 90 03 00 00 stw r0,0(r3) ffc04bec: 38 60 ff ff li r3,-1 ffc04bf0: 4b ff ff c4 b ffc04bb4 } /* 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 ); ffc04bf4: 48 00 de 65 bl ffc12a58 <__errno> ffc04bf8: 7c 7f 1b 78 mr r31,r3 ffc04bfc: 48 00 de 5d bl ffc12a58 <__errno> ffc04c00: 80 03 00 00 lwz r0,0(r3) ffc04c04: 38 60 ff ff li r3,-1 ffc04c08: 90 1f 00 00 stw r0,0(r31) ffc04c0c: 4b ff ff a8 b ffc04bb4 =============================================================================== ffc0d874 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0d874: 94 21 ff d8 stwu r1,-40(r1) ffc0d878: 7c 08 02 a6 mflr r0 ffc0d87c: 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 ) ) ffc0d880: 54 a0 00 39 rlwinm. r0,r5,0,0,28 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0d884: 93 01 00 08 stw r24,8(r1) ffc0d888: 7c d8 33 78 mr r24,r6 ffc0d88c: 93 c1 00 20 stw r30,32(r1) ffc0d890: 7c 7e 1b 78 mr r30,r3 ffc0d894: 93 e1 00 24 stw r31,36(r1) ffc0d898: 7c 9f 23 78 mr r31,r4 ffc0d89c: 93 21 00 0c stw r25,12(r1) ffc0d8a0: 93 41 00 10 stw r26,16(r1) ffc0d8a4: 93 61 00 14 stw r27,20(r1) ffc0d8a8: 93 81 00 18 stw r28,24(r1) ffc0d8ac: 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 ) ) ffc0d8b0: 40 82 01 0c bne- ffc0d9bc <== 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; ffc0d8b4: 83 66 00 00 lwz r27,0(r6) if (!device_name_table) ffc0d8b8: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0d8bc: 41 9e 01 14 beq- cr7,ffc0d9d0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { ffc0d8c0: 3d 20 00 00 lis r9,0 ffc0d8c4: 83 49 26 d0 lwz r26,9936(r9) ffc0d8c8: 38 00 00 00 li r0,0 ffc0d8cc: 3b a0 00 00 li r29,0 ffc0d8d0: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0d8d4: 41 9e 00 4c beq- cr7,ffc0d920 <== NEVER TAKEN if (!device_name_table[i].device_name) ffc0d8d8: 1c 00 00 14 mulli r0,r0,20 ffc0d8dc: 7f 9b 00 2e lwzx r28,r27,r0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0d8e0: 7f c3 f3 78 mr r3,r30 ffc0d8e4: 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) ffc0d8e8: 2f 9c 00 00 cmpwi cr7,r28,0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0d8ec: 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++) { ffc0d8f0: 3b bd 00 01 addi r29,r29,1 if (!device_name_table[i].device_name) ffc0d8f4: 7f 3b 02 14 add r25,r27,r0 ffc0d8f8: 41 9e 00 1c beq- cr7,ffc0d914 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0d8fc: 48 00 33 59 bl ffc10c54 ffc0d900: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d904: 40 9e 00 10 bne- cr7,ffc0d914 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') ffc0d908: 7c 1c f8 ae lbzx r0,r28,r31 ffc0d90c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d910: 41 9e 00 50 beq- cr7,ffc0d960 <== 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++) { ffc0d914: 7f 9a e8 40 cmplw cr7,r26,r29 ffc0d918: 7f a0 eb 78 mr r0,r29 ffc0d91c: 41 9d ff bc bgt+ cr7,ffc0d8d8 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); ffc0d920: 48 00 22 01 bl ffc0fb20 <__errno> ffc0d924: 38 00 00 02 li r0,2 ffc0d928: 90 03 00 00 stw r0,0(r3) ffc0d92c: 38 60 ff ff li r3,-1 } ffc0d930: 80 01 00 2c lwz r0,44(r1) ffc0d934: 83 01 00 08 lwz r24,8(r1) ffc0d938: 7c 08 03 a6 mtlr r0 ffc0d93c: 83 21 00 0c lwz r25,12(r1) ffc0d940: 83 41 00 10 lwz r26,16(r1) ffc0d944: 83 61 00 14 lwz r27,20(r1) ffc0d948: 83 81 00 18 lwz r28,24(r1) ffc0d94c: 83 a1 00 1c lwz r29,28(r1) ffc0d950: 83 c1 00 20 lwz r30,32(r1) ffc0d954: 83 e1 00 24 lwz r31,36(r1) ffc0d958: 38 21 00 28 addi r1,r1,40 ffc0d95c: 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; ffc0d960: 3d 20 00 00 lis r9,0 ffc0d964: 81 29 27 24 lwz r9,10020(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]; ffc0d968: 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; ffc0d96c: 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; ffc0d970: 3d 20 00 00 lis r9,0 ffc0d974: 39 29 21 6c addi r9,r9,8556 ffc0d978: 91 38 00 08 stw r9,8(r24) pathloc->ops = &devFS_ops; ffc0d97c: 3d 20 00 00 lis r9,0 ffc0d980: 39 29 21 a4 addi r9,r9,8612 ffc0d984: 91 38 00 0c stw r9,12(r24) pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0d988: 90 18 00 10 stw r0,16(r24) return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0d98c: 80 01 00 2c lwz r0,44(r1) ffc0d990: 83 01 00 08 lwz r24,8(r1) ffc0d994: 7c 08 03 a6 mtlr r0 ffc0d998: 83 21 00 0c lwz r25,12(r1) ffc0d99c: 83 41 00 10 lwz r26,16(r1) ffc0d9a0: 83 61 00 14 lwz r27,20(r1) ffc0d9a4: 83 81 00 18 lwz r28,24(r1) ffc0d9a8: 83 a1 00 1c lwz r29,28(r1) ffc0d9ac: 83 c1 00 20 lwz r30,32(r1) ffc0d9b0: 83 e1 00 24 lwz r31,36(r1) ffc0d9b4: 38 21 00 28 addi r1,r1,40 ffc0d9b8: 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 ); ffc0d9bc: 48 00 21 65 bl ffc0fb20 <__errno> <== NOT EXECUTED ffc0d9c0: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0d9c4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0d9c8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0d9cc: 4b ff ff c0 b ffc0d98c <== 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 ); ffc0d9d0: 48 00 21 51 bl ffc0fb20 <__errno> ffc0d9d4: 38 00 00 0e li r0,14 ffc0d9d8: 90 03 00 00 stw r0,0(r3) ffc0d9dc: 38 60 ff ff li r3,-1 ffc0d9e0: 4b ff ff ac b ffc0d98c =============================================================================== ffc04190 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { ffc04190: 94 21 ff d8 stwu r1,-40(r1) ffc04194: 7c 08 02 a6 mflr r0 ffc04198: 93 81 00 18 stw r28,24(r1) ffc0419c: 7c dc 33 78 mr r28,r6 ffc041a0: 93 a1 00 1c stw r29,28(r1) ffc041a4: 7c bd 2b 78 mr r29,r5 ffc041a8: 93 c1 00 20 stw r30,32(r1) ffc041ac: 7c 9e 23 78 mr r30,r4 ffc041b0: 93 e1 00 24 stw r31,36(r1) ffc041b4: 7c 7f 1b 78 mr r31,r3 ffc041b8: 90 01 00 2c stw r0,44(r1) ffc041bc: 93 01 00 08 stw r24,8(r1) ffc041c0: 93 21 00 0c stw r25,12(r1) ffc041c4: 93 41 00 10 stw r26,16(r1) ffc041c8: 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') && ffc041cc: 88 03 00 00 lbz r0,0(r3) ffc041d0: 2f 80 00 64 cmpwi cr7,r0,100 ffc041d4: 41 9e 01 40 beq- cr7,ffc04314 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) ffc041d8: 57 c0 04 26 rlwinm r0,r30,0,16,19 ffc041dc: 2f 80 60 00 cmpwi cr7,r0,24576 ffc041e0: 41 9e 00 0c beq- cr7,ffc041ec ffc041e4: 2f 80 20 00 cmpwi cr7,r0,8192 ffc041e8: 40 9e 01 58 bne- cr7,ffc04340 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; ffc041ec: 83 47 00 00 lwz r26,0(r7) if (!device_name_table) ffc041f0: 2f 9a 00 00 cmpwi cr7,r26,0 ffc041f4: 41 9e 01 74 beq- cr7,ffc04368 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ ffc041f8: 3d 20 00 00 lis r9,0 ffc041fc: 83 29 26 d0 lwz r25,9936(r9) ffc04200: 2f 99 00 00 cmpwi cr7,r25,0 ffc04204: 41 9e 01 50 beq- cr7,ffc04354 ffc04208: 38 00 00 00 li r0,0 ffc0420c: 3b 00 ff ff li r24,-1 ffc04210: 3b 60 00 00 li r27,0 ffc04214: 48 00 00 20 b ffc04234 if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc04218: 48 00 c8 e5 bl ffc10afc ffc0421c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04220: 41 9e 00 b4 beq- cr7,ffc042d4 /* 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++){ ffc04224: 3b 7b 00 01 addi r27,r27,1 ffc04228: 7f 9b c8 40 cmplw cr7,r27,r25 ffc0422c: 7f 60 db 78 mr r0,r27 ffc04230: 40 9c 00 30 bge- cr7,ffc04260 if (device_name_table[i].device_name == NULL) ffc04234: 1c 00 00 14 mulli r0,r0,20 ffc04238: 7c 1a 00 2e lwzx r0,r26,r0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc0423c: 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) ffc04240: 2f 80 00 00 cmpwi cr7,r0,0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc04244: 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) ffc04248: 40 9e ff d0 bne+ cr7,ffc04218 ffc0424c: 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++){ ffc04250: 3b 7b 00 01 addi r27,r27,1 ffc04254: 7f 9b c8 40 cmplw cr7,r27,r25 ffc04258: 7f 60 db 78 mr r0,r27 ffc0425c: 41 9c ff d8 blt+ cr7,ffc04234 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) ffc04260: 2f 98 ff ff cmpwi cr7,r24,-1 ffc04264: 41 9e 00 f0 beq- cr7,ffc04354 <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc04268: 7f 60 00 a6 mfmsr r27 ffc0426c: 7c 10 42 a6 mfsprg r0,0 ffc04270: 7f 60 00 78 andc r0,r27,r0 ffc04274: 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; ffc04278: 1f 18 00 14 mulli r24,r24,20 ffc0427c: 7f fa c1 2e stwx r31,r26,r24 device_name_table[slot].device_name_length = strlen(path); ffc04280: 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; ffc04284: 7f 5a c2 14 add r26,r26,r24 device_name_table[slot].device_name_length = strlen(path); ffc04288: 48 00 c9 29 bl ffc10bb0 device_name_table[slot].major = major; ffc0428c: 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); ffc04290: 90 7a 00 04 stw r3,4(r26) device_name_table[slot].major = major; device_name_table[slot].minor = minor; ffc04294: 93 9a 00 0c stw r28,12(r26) device_name_table[slot].mode = mode; ffc04298: 93 da 00 10 stw r30,16(r26) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0429c: 7f 60 01 24 mtmsr r27 _ISR_Enable(level); return 0; ffc042a0: 38 60 00 00 li r3,0 } ffc042a4: 80 01 00 2c lwz r0,44(r1) ffc042a8: 83 01 00 08 lwz r24,8(r1) ffc042ac: 7c 08 03 a6 mtlr r0 ffc042b0: 83 21 00 0c lwz r25,12(r1) ffc042b4: 83 41 00 10 lwz r26,16(r1) ffc042b8: 83 61 00 14 lwz r27,20(r1) ffc042bc: 83 81 00 18 lwz r28,24(r1) ffc042c0: 83 a1 00 1c lwz r29,28(r1) ffc042c4: 83 c1 00 20 lwz r30,32(r1) ffc042c8: 83 e1 00 24 lwz r31,36(r1) ffc042cc: 38 21 00 28 addi r1,r1,40 ffc042d0: 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 ); ffc042d4: 48 00 b8 4d bl ffc0fb20 <__errno> ffc042d8: 38 00 00 11 li r0,17 ffc042dc: 90 03 00 00 stw r0,0(r3) ffc042e0: 38 60 ff ff li r3,-1 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } ffc042e4: 80 01 00 2c lwz r0,44(r1) ffc042e8: 83 01 00 08 lwz r24,8(r1) ffc042ec: 7c 08 03 a6 mtlr r0 ffc042f0: 83 21 00 0c lwz r25,12(r1) ffc042f4: 83 41 00 10 lwz r26,16(r1) ffc042f8: 83 61 00 14 lwz r27,20(r1) ffc042fc: 83 81 00 18 lwz r28,24(r1) ffc04300: 83 a1 00 1c lwz r29,28(r1) ffc04304: 83 c1 00 20 lwz r30,32(r1) ffc04308: 83 e1 00 24 lwz r31,36(r1) ffc0430c: 38 21 00 28 addi r1,r1,40 ffc04310: 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') && ffc04314: 88 03 00 01 lbz r0,1(r3) ffc04318: 2f 80 00 65 cmpwi cr7,r0,101 ffc0431c: 40 9e fe bc bne+ cr7,ffc041d8 <== NEVER TAKEN ffc04320: 88 03 00 02 lbz r0,2(r3) ffc04324: 2f 80 00 76 cmpwi cr7,r0,118 ffc04328: 40 9e fe b0 bne+ cr7,ffc041d8 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) ffc0432c: 88 03 00 03 lbz r0,3(r3) return 0; ffc04330: 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')) ffc04334: 2f 80 00 00 cmpwi cr7,r0,0 ffc04338: 40 9e fe a0 bne+ cr7,ffc041d8 ffc0433c: 4b ff ff 68 b ffc042a4 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 ); ffc04340: 48 00 b7 e1 bl ffc0fb20 <__errno> ffc04344: 38 00 00 16 li r0,22 ffc04348: 90 03 00 00 stw r0,0(r3) ffc0434c: 38 60 ff ff li r3,-1 ffc04350: 4b ff ff 54 b ffc042a4 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 ); ffc04354: 48 00 b7 cd bl ffc0fb20 <__errno> ffc04358: 38 00 00 0c li r0,12 ffc0435c: 90 03 00 00 stw r0,0(r3) ffc04360: 38 60 ff ff li r3,-1 ffc04364: 4b ff ff 40 b ffc042a4 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 ); ffc04368: 48 00 b7 b9 bl ffc0fb20 <__errno> ffc0436c: 38 00 00 0e li r0,14 ffc04370: 90 03 00 00 stw r0,0(r3) ffc04374: 38 60 ff ff li r3,-1 ffc04378: 4b ff ff 2c b ffc042a4 =============================================================================== ffc05f80 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { ffc05f80: 94 21 ff f0 stwu r1,-16(r1) ffc05f84: 7c 08 02 a6 mflr r0 ffc05f88: 90 01 00 14 stw r0,20(r1) rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc05f8c: 80 03 00 b4 lwz r0,180(r3) /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { ffc05f90: 93 e1 00 0c stw r31,12(r1) ffc05f94: 7c 7f 1b 78 mr r31,r3 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc05f98: 2f 80 00 00 cmpwi cr7,r0,0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { ffc05f9c: 93 c1 00 08 stw r30,8(r1) rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc05fa0: 41 9e 00 6c beq- cr7,ffc0600c static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc05fa4: 7c 00 00 a6 mfmsr r0 ffc05fa8: 7d 30 42 a6 mfsprg r9,0 ffc05fac: 7c 09 48 78 andc r9,r0,r9 ffc05fb0: 7d 20 01 24 mtmsr r9 rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { ffc05fb4: 81 63 00 84 lwz r11,132(r3) ffc05fb8: 81 23 00 80 lwz r9,128(r3) ffc05fbc: 7f 8b 48 00 cmpw cr7,r11,r9 ffc05fc0: 41 9e 00 48 beq- cr7,ffc06008 <== ALWAYS TAKEN tty->rawOutBufState = rob_wait; ffc05fc4: 3b c0 00 02 li r30,2 <== NOT EXECUTED ffc05fc8: 93 df 00 94 stw r30,148(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc05fcc: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( ffc05fd0: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc05fd4: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc05fd8: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc05fdc: 48 00 2e a5 bl ffc08e80 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc05fe0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05fe4: 40 9e 00 40 bne- cr7,ffc06024 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc05fe8: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc05fec: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc05ff0: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc05ff4: 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) { ffc05ff8: 81 7f 00 84 lwz r11,132(r31) <== NOT EXECUTED ffc05ffc: 81 3f 00 80 lwz r9,128(r31) <== NOT EXECUTED ffc06000: 7f 8b 48 00 cmpw cr7,r11,r9 <== NOT EXECUTED ffc06004: 40 9e ff c4 bne+ cr7,ffc05fc8 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc06008: 7c 00 01 24 mtmsr r0 rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); } } ffc0600c: 80 01 00 14 lwz r0,20(r1) ffc06010: 83 c1 00 08 lwz r30,8(r1) ffc06014: 7c 08 03 a6 mtlr r0 ffc06018: 83 e1 00 0c lwz r31,12(r1) ffc0601c: 38 21 00 10 addi r1,r1,16 ffc06020: 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); ffc06024: 48 00 37 e5 bl ffc09808 <== NOT EXECUTED =============================================================================== ffc06e44 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { ffc06e44: 94 21 ff e0 stwu r1,-32(r1) ffc06e48: 7c 08 02 a6 mflr r0 ffc06e4c: 90 01 00 24 stw r0,36(r1) if ((tty->termios.c_lflag & ECHOCTL) && ffc06e50: 81 24 00 3c lwz r9,60(r4) /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { ffc06e54: 93 e1 00 1c stw r31,28(r1) ffc06e58: 7c 9f 23 78 mr r31,r4 if ((tty->termios.c_lflag & ECHOCTL) && ffc06e5c: 71 20 02 00 andi. r0,r9,512 ffc06e60: 41 82 00 2c beq- ffc06e8c <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { ffc06e64: 3d 20 00 00 lis r9,0 ffc06e68: 81 29 26 a8 lwz r9,9896(r9) ffc06e6c: 7d 29 1a 14 add r9,r9,r3 ffc06e70: 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) && ffc06e74: 70 09 00 20 andi. r9,r0,32 ffc06e78: 41 82 00 14 beq- ffc06e8c iscntrl(c) && (c != '\t') && (c != '\n')) { ffc06e7c: 2f 83 00 09 cmpwi cr7,r3,9 ffc06e80: 41 9e 00 0c beq- cr7,ffc06e8c ffc06e84: 2f 83 00 0a cmpwi cr7,r3,10 ffc06e88: 40 9e 00 20 bne- cr7,ffc06ea8 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); ffc06e8c: 7f e4 fb 78 mr r4,r31 ffc06e90: 4b ff fe 1d bl ffc06cac } } ffc06e94: 80 01 00 24 lwz r0,36(r1) ffc06e98: 83 e1 00 1c lwz r31,28(r1) ffc06e9c: 38 21 00 20 addi r1,r1,32 ffc06ea0: 7c 08 03 a6 mtlr r0 ffc06ea4: 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; ffc06ea8: 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] = '^'; ffc06eac: 39 20 00 5e li r9,94 echobuf[1] = c ^ 0x40; ffc06eb0: 98 01 00 09 stb r0,9(r1) rtems_termios_puts (echobuf, 2, tty); ffc06eb4: 38 61 00 08 addi r3,r1,8 ffc06eb8: 7f e5 fb 78 mr r5,r31 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; ffc06ebc: 99 21 00 08 stb r9,8(r1) echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); ffc06ec0: 38 80 00 02 li r4,2 ffc06ec4: 4b ff fc 61 bl ffc06b24 tty->column += 2; ffc06ec8: 81 3f 00 28 lwz r9,40(r31) ffc06ecc: 38 09 00 02 addi r0,r9,2 ffc06ed0: 90 1f 00 28 stw r0,40(r31) } else { oproc (c, tty); } } ffc06ed4: 80 01 00 24 lwz r0,36(r1) ffc06ed8: 83 e1 00 1c lwz r31,28(r1) ffc06edc: 38 21 00 20 addi r1,r1,32 ffc06ee0: 7c 08 03 a6 mtlr r0 ffc06ee4: 4e 80 00 20 blr =============================================================================== ffc062a8 : void endgrent(void) { if (group_fp != NULL) ffc062a8: 3d 20 00 00 lis r9,0 fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc062ac: 94 21 ff f8 stwu r1,-8(r1) ffc062b0: 7c 08 02 a6 mflr r0 if (group_fp != NULL) ffc062b4: 80 69 29 98 lwz r3,10648(r9) fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc062b8: 90 01 00 0c stw r0,12(r1) if (group_fp != NULL) ffc062bc: 2f 83 00 00 cmpwi cr7,r3,0 ffc062c0: 41 9e 00 08 beq- cr7,ffc062c8 <== NEVER TAKEN fclose(group_fp); ffc062c4: 48 00 d8 65 bl ffc13b28 } ffc062c8: 80 01 00 0c lwz r0,12(r1) ffc062cc: 38 21 00 08 addi r1,r1,8 ffc062d0: 7c 08 03 a6 mtlr r0 ffc062d4: 4e 80 00 20 blr =============================================================================== ffc060d8 : void endpwent(void) { if (passwd_fp != NULL) ffc060d8: 3d 20 00 00 lis r9,0 fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc060dc: 94 21 ff f8 stwu r1,-8(r1) ffc060e0: 7c 08 02 a6 mflr r0 if (passwd_fp != NULL) ffc060e4: 80 69 28 bc lwz r3,10428(r9) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc060e8: 90 01 00 0c stw r0,12(r1) if (passwd_fp != NULL) ffc060ec: 2f 83 00 00 cmpwi cr7,r3,0 ffc060f0: 41 9e 00 08 beq- cr7,ffc060f8 <== NEVER TAKEN fclose(passwd_fp); ffc060f4: 48 00 da 35 bl ffc13b28 } ffc060f8: 80 01 00 0c lwz r0,12(r1) ffc060fc: 38 21 00 08 addi r1,r1,8 ffc06100: 7c 08 03 a6 mtlr r0 ffc06104: 4e 80 00 20 blr =============================================================================== ffc06ee8 : * 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) { ffc06ee8: 94 21 ff d8 stwu r1,-40(r1) ffc06eec: 7c 08 02 a6 mflr r0 ffc06ef0: 7d 80 00 26 mfcr r12 ffc06ef4: 90 01 00 2c stw r0,44(r1) if (tty->ccount == 0) ffc06ef8: 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) { ffc06efc: 93 e1 00 24 stw r31,36(r1) ffc06f00: 7c 7f 1b 78 mr r31,r3 if (tty->ccount == 0) ffc06f04: 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) { ffc06f08: 93 41 00 10 stw r26,16(r1) ffc06f0c: 93 61 00 14 stw r27,20(r1) ffc06f10: 93 81 00 18 stw r28,24(r1) ffc06f14: 93 a1 00 1c stw r29,28(r1) ffc06f18: 93 c1 00 20 stw r30,32(r1) ffc06f1c: 91 81 00 0c stw r12,12(r1) if (tty->ccount == 0) ffc06f20: 41 9e 00 a0 beq- cr7,ffc06fc0 return; if (lineFlag) { ffc06f24: 2e 04 00 00 cmpwi cr4,r4,0 ffc06f28: 40 92 00 88 bne- cr4,ffc06fb0 echo ('\n', tty); return; } } while (tty->ccount) { ffc06f2c: 80 03 00 3c lwz r0,60(r3) ffc06f30: 54 0b 07 38 rlwinm r11,r0,0,28,28 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc06f34: 3f 60 ff c2 lis r27,-62 ffc06f38: 3f a0 ff c2 lis r29,-62 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc06f3c: 3f 80 00 00 lis r28,0 rtems_termios_puts ("\b \b", 3, tty); ffc06f40: 3b 7b 8f 54 addi r27,r27,-28844 ffc06f44: 3b bd 8f 50 addi r29,r29,-28848 } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { ffc06f48: 2f 8b 00 00 cmpwi cr7,r11,0 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; ffc06f4c: 81 5f 00 1c lwz r10,28(r31) ffc06f50: 39 29 ff ff addi r9,r9,-1 ffc06f54: 91 3f 00 20 stw r9,32(r31) ffc06f58: 7f ca 48 ae lbzx r30,r10,r9 if (tty->termios.c_lflag & ECHO) { ffc06f5c: 41 9e 00 38 beq- cr7,ffc06f94 <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { ffc06f60: 40 92 00 0c bne- cr4,ffc06f6c ffc06f64: 70 0b 00 10 andi. r11,r0,16 ffc06f68: 41 82 01 e8 beq- ffc07150 <== NEVER TAKEN echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { ffc06f6c: 2f 9e 00 09 cmpwi cr7,r30,9 ffc06f70: 41 9e 00 e8 beq- cr7,ffc07058 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc06f74: 81 3c 26 a8 lwz r9,9896(r28) ffc06f78: 3b de 00 01 addi r30,r30,1 ffc06f7c: 7f 7a db 78 mr r26,r27 ffc06f80: 7d 29 f0 ae lbzx r9,r9,r30 ffc06f84: 71 2b 00 20 andi. r11,r9,32 ffc06f88: 41 82 00 a8 beq- ffc07030 <== ALWAYS TAKEN ffc06f8c: 70 09 02 00 andi. r9,r0,512 <== NOT EXECUTED ffc06f90: 40 82 00 60 bne- ffc06ff0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) ffc06f94: 41 92 00 2c beq- cr4,ffc06fc0 echo ('\n', tty); return; } } while (tty->ccount) { ffc06f98: 81 3f 00 20 lwz r9,32(r31) ffc06f9c: 2f 89 00 00 cmpwi cr7,r9,0 ffc06fa0: 41 9e 00 20 beq- cr7,ffc06fc0 } 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); ffc06fa4: 80 1f 00 3c lwz r0,60(r31) ffc06fa8: 54 0b 07 38 rlwinm r11,r0,0,28,28 ffc06fac: 4b ff ff 9c b ffc06f48 erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { ffc06fb0: 80 03 00 3c lwz r0,60(r3) ffc06fb4: 70 0b 00 08 andi. r11,r0,8 ffc06fb8: 40 a2 01 3c bne+ ffc070f4 <== ALWAYS TAKEN tty->ccount = 0; ffc06fbc: 91 63 00 20 stw r11,32(r3) <== NOT EXECUTED } } if (!lineFlag) break; } } ffc06fc0: 80 01 00 2c lwz r0,44(r1) ffc06fc4: 81 81 00 0c lwz r12,12(r1) ffc06fc8: 7c 08 03 a6 mtlr r0 ffc06fcc: 83 41 00 10 lwz r26,16(r1) ffc06fd0: 83 61 00 14 lwz r27,20(r1) ffc06fd4: 7d 80 81 20 mtcrf 8,r12 ffc06fd8: 83 81 00 18 lwz r28,24(r1) ffc06fdc: 83 a1 00 1c lwz r29,28(r1) ffc06fe0: 83 c1 00 20 lwz r30,32(r1) ffc06fe4: 83 e1 00 24 lwz r31,36(r1) ffc06fe8: 38 21 00 28 addi r1,r1,40 ffc06fec: 4e 80 00 20 blr tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc06ff0: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc06ff4: 38 80 00 03 li r4,3 <== NOT EXECUTED ffc06ff8: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc06ffc: 4b ff fb 29 bl ffc06b24 <== NOT EXECUTED if (tty->column) ffc07000: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED ffc07004: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc07008: 41 9e 00 0c beq- cr7,ffc07014 <== NOT EXECUTED tty->column--; ffc0700c: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc07010: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { ffc07014: 81 3c 26 a8 lwz r9,9896(r28) <== NOT EXECUTED ffc07018: 7c 09 f0 ae lbzx r0,r9,r30 <== NOT EXECUTED ffc0701c: 70 0b 00 20 andi. r11,r0,32 <== NOT EXECUTED ffc07020: 41 82 00 10 beq- ffc07030 <== NOT EXECUTED ffc07024: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED ffc07028: 70 09 02 00 andi. r9,r0,512 <== NOT EXECUTED ffc0702c: 41 a2 ff 68 beq- ffc06f94 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); ffc07030: 7f 43 d3 78 mr r3,r26 ffc07034: 38 80 00 03 li r4,3 ffc07038: 7f e5 fb 78 mr r5,r31 ffc0703c: 4b ff fa e9 bl ffc06b24 if (tty->column) ffc07040: 81 3f 00 28 lwz r9,40(r31) ffc07044: 2f 89 00 00 cmpwi cr7,r9,0 ffc07048: 41 be ff 4c beq- cr7,ffc06f94 <== NEVER TAKEN tty->column--; ffc0704c: 39 29 ff ff addi r9,r9,-1 ffc07050: 91 3f 00 28 stw r9,40(r31) ffc07054: 4b ff ff 40 b ffc06f94 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc07058: 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; ffc0705c: 83 df 00 2c lwz r30,44(r31) int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc07060: 41 9e 00 44 beq- cr7,ffc070a4 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) ffc07064: 7d 29 03 a6 mtctr r9 ffc07068: 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)) { ffc0706c: 81 1c 26 a8 lwz r8,9896(r28) if (tty->termios.c_lflag & ECHOCTL) ffc07070: 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; ffc07074: 39 60 00 00 li r11,0 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; ffc07078: 7c 0a 58 ae lbzx r0,r10,r11 ffc0707c: 39 6b 00 01 addi r11,r11,1 if (c == '\t') { ffc07080: 2f 80 00 09 cmpwi cr7,r0,9 col = (col | 7) + 1; } else if (iscntrl (c)) { ffc07084: 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') { ffc07088: 41 9e 00 5c beq- cr7,ffc070e4 col = (col | 7) + 1; } else if (iscntrl (c)) { ffc0708c: 88 09 00 01 lbz r0,1(r9) ffc07090: 70 09 00 20 andi. r9,r0,32 ffc07094: 41 82 00 44 beq- ffc070d8 <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) ffc07098: 41 9a 00 08 beq- cr6,ffc070a0 <== NOT EXECUTED col += 2; ffc0709c: 3b de 00 02 addi r30,r30,2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc070a0: 42 00 ff d8 bdnz+ ffc07078 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { ffc070a4: 80 1f 00 28 lwz r0,40(r31) ffc070a8: 7f 9e 00 00 cmpw cr7,r30,r0 ffc070ac: 40 bc fe e8 bge- cr7,ffc06f94 <== NEVER TAKEN rtems_termios_puts ("\b", 1, tty); ffc070b0: 7f a3 eb 78 mr r3,r29 ffc070b4: 38 80 00 01 li r4,1 ffc070b8: 7f e5 fb 78 mr r5,r31 ffc070bc: 4b ff fa 69 bl ffc06b24 tty->column--; ffc070c0: 81 3f 00 28 lwz r9,40(r31) ffc070c4: 38 09 ff ff addi r0,r9,-1 } /* * Back up over the tab */ while (tty->column > col) { ffc070c8: 7f 80 f0 00 cmpw cr7,r0,r30 rtems_termios_puts ("\b", 1, tty); tty->column--; ffc070cc: 90 1f 00 28 stw r0,40(r31) } /* * Back up over the tab */ while (tty->column > col) { ffc070d0: 41 9d ff e0 bgt+ cr7,ffc070b0 ffc070d4: 4b ff fe c0 b ffc06f94 col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; ffc070d8: 3b de 00 01 addi r30,r30,1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc070dc: 42 00 ff 9c bdnz+ ffc07078 ffc070e0: 4b ff ff c4 b ffc070a4 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; ffc070e4: 63 de 00 07 ori r30,r30,7 ffc070e8: 3b de 00 01 addi r30,r30,1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc070ec: 42 00 ff 8c bdnz+ ffc07078 ffc070f0: 4b ff ff b4 b ffc070a4 <== NOT EXECUTED if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { ffc070f4: 70 0a 00 10 andi. r10,r0,16 ffc070f8: 40 82 fe 3c bne+ ffc06f34 <== ALWAYS TAKEN tty->ccount = 0; ffc070fc: 91 43 00 20 stw r10,32(r3) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); ffc07100: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED ffc07104: 88 63 00 44 lbz r3,68(r3) <== NOT EXECUTED ffc07108: 4b ff fd 3d bl ffc06e44 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) ffc0710c: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED echo ('\n', tty); ffc07110: 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) ffc07114: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc07118: 41 82 fe a8 beq+ ffc06fc0 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc0711c: 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); ffc07120: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc07124: 81 81 00 0c lwz r12,12(r1) <== NOT EXECUTED ffc07128: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0712c: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc07130: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc07134: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc07138: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc0713c: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc07140: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc07144: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc07148: 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); ffc0714c: 4b ff fc f8 b ffc06e44 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc07150: 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); ffc07154: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc07158: 81 81 00 0c lwz r12,12(r1) <== NOT EXECUTED ffc0715c: 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); ffc07160: 88 7f 00 43 lbz r3,67(r31) <== NOT EXECUTED } } if (!lineFlag) break; } } ffc07164: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc07168: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc0716c: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc07170: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc07174: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc07178: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0717c: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc07180: 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); ffc07184: 4b ff fc c0 b ffc06e44 <== NOT EXECUTED =============================================================================== ffc05950 : int fcntl( int fd, int cmd, ... ) { ffc05950: 94 21 ff c8 stwu r1,-56(r1) ffc05954: 7c 08 02 a6 mflr r0 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc05958: 3d 20 00 00 lis r9,0 int fcntl( int fd, int cmd, ... ) { ffc0595c: 90 01 00 3c stw r0,60(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc05960: 80 09 26 4c lwz r0,9804(r9) ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc05964: 39 20 00 02 li r9,2 ffc05968: 99 21 00 08 stb r9,8(r1) ffc0596c: 39 21 00 40 addi r9,r1,64 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc05970: 7f 83 00 40 cmplw cr7,r3,r0 ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc05974: 91 21 00 0c stw r9,12(r1) ffc05978: 39 21 00 10 addi r9,r1,16 int fcntl( int fd, int cmd, ... ) { ffc0597c: 93 c1 00 30 stw r30,48(r1) ffc05980: 93 e1 00 34 stw r31,52(r1) ffc05984: 90 a1 00 18 stw r5,24(r1) ffc05988: 90 c1 00 1c stw r6,28(r1) ffc0598c: 90 e1 00 20 stw r7,32(r1) int ret; va_list ap; va_start( ap, cmd ); ffc05990: 91 21 00 10 stw r9,16(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc05994: 40 9c 02 08 bge- cr7,ffc05b9c iop = rtems_libio_iop( fd ); ffc05998: 3f e0 00 00 lis r31,0 ffc0599c: 81 7f 27 0c lwz r11,9996(r31) ffc059a0: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc059a4: 7f cb 1a 14 add r30,r11,r3 rtems_libio_check_is_open(iop); ffc059a8: 80 7e 00 18 lwz r3,24(r30) ffc059ac: 70 69 01 00 andi. r9,r3,256 ffc059b0: 41 82 01 ec beq- ffc05b9c /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc059b4: 2b 84 00 09 cmplwi cr7,r4,9 ffc059b8: 40 9d 00 30 ble- cr7,ffc059e8 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; ffc059bc: 48 00 e0 dd bl ffc13a98 <__errno> ffc059c0: 38 00 00 16 li r0,22 ffc059c4: 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; ffc059c8: 3b e0 ff ff li r31,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc059cc: 80 01 00 3c lwz r0,60(r1) ffc059d0: 7f e3 fb 78 mr r3,r31 ffc059d4: 83 c1 00 30 lwz r30,48(r1) ffc059d8: 7c 08 03 a6 mtlr r0 ffc059dc: 83 e1 00 34 lwz r31,52(r1) ffc059e0: 38 21 00 38 addi r1,r1,56 ffc059e4: 4e 80 00 20 blr /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc059e8: 3d 20 ff c2 lis r9,-62 ffc059ec: 39 29 b2 5c addi r9,r9,-19876 ffc059f0: 54 8a 10 3a rlwinm r10,r4,2,0,29 ffc059f4: 7d 49 50 2e lwzx r10,r9,r10 ffc059f8: 7d 2a 4a 14 add r9,r10,r9 ffc059fc: 7d 29 03 a6 mtctr r9 ffc05a00: 4e 80 04 20 bctr errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; ffc05a04: 48 00 e0 95 bl ffc13a98 <__errno> ffc05a08: 38 00 00 86 li r0,134 ffc05a0c: 90 03 00 00 stw r0,0(r3) ffc05a10: 4b ff ff b8 b ffc059c8 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 ) ); ffc05a14: 89 21 00 08 lbz r9,8(r1) ffc05a18: 2b 89 00 07 cmplwi cr7,r9,7 ffc05a1c: 40 9d 01 68 ble- cr7,ffc05b84 <== ALWAYS TAKEN ffc05a20: 81 61 00 0c lwz r11,12(r1) <== NOT EXECUTED ffc05a24: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED ffc05a28: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc05a2c: 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; ffc05a30: 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 ) ); ffc05a34: 90 81 00 28 stw r4,40(r1) ffc05a38: 48 00 07 01 bl ffc06138 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); ffc05a3c: 39 20 fd fe li r9,-514 ffc05a40: 80 1e 00 18 lwz r0,24(r30) ffc05a44: 70 63 02 01 andi. r3,r3,513 ffc05a48: 80 81 00 28 lwz r4,40(r1) ffc05a4c: 7d 20 00 38 and r0,r9,r0 ffc05a50: 7c 60 03 78 or r0,r3,r0 ffc05a54: 90 1e 00 18 stw r0,24(r30) ffc05a58: 48 00 00 1c b ffc05a74 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); ffc05a5c: 90 81 00 28 stw r4,40(r1) ffc05a60: 48 00 07 39 bl ffc06198 ffc05a64: 7c 7f 1b 78 mr r31,r3 ffc05a68: 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) { ffc05a6c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc05a70: 41 bc ff 5c blt- cr7,ffc059cc <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); ffc05a74: 81 3e 00 24 lwz r9,36(r30) ffc05a78: 7c 83 23 78 mr r3,r4 ffc05a7c: 7f c4 f3 78 mr r4,r30 ffc05a80: 80 09 00 30 lwz r0,48(r9) ffc05a84: 7c 09 03 a6 mtctr r0 ffc05a88: 4e 80 04 21 bctrl if (err) { ffc05a8c: 7c 7e 1b 79 mr. r30,r3 ffc05a90: 41 82 ff 3c beq+ ffc059cc <== ALWAYS TAKEN errno = err; ffc05a94: 48 00 e0 05 bl ffc13a98 <__errno> <== NOT EXECUTED ffc05a98: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED ffc05a9c: 4b ff ff 2c b ffc059c8 <== 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 ) ) ffc05aa0: 89 21 00 08 lbz r9,8(r1) ffc05aa4: 2b 89 00 07 cmplwi cr7,r9,7 ffc05aa8: 41 9d 00 cc bgt- cr7,ffc05b74 <== NEVER TAKEN ffc05aac: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc05ab0: 81 61 00 10 lwz r11,16(r1) ffc05ab4: 39 29 00 01 addi r9,r9,1 ffc05ab8: 99 21 00 08 stb r9,8(r1) ffc05abc: 7d 6b 02 14 add r11,r11,r0 ffc05ac0: 80 0b 00 00 lwz r0,0(r11) ffc05ac4: 2f 80 00 00 cmpwi cr7,r0,0 ffc05ac8: 41 9e 00 e8 beq- cr7,ffc05bb0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; ffc05acc: 60 63 08 00 ori r3,r3,2048 ffc05ad0: 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; ffc05ad4: 3b e0 00 00 li r31,0 ffc05ad8: 4b ff ff 9c b ffc05a74 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); ffc05adc: 54 7f af fe rlwinm r31,r3,21,31,31 ffc05ae0: 4b ff ff 94 b ffc05a74 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc05ae4: 89 21 00 08 lbz r9,8(r1) ffc05ae8: 2b 89 00 07 cmplwi cr7,r9,7 ffc05aec: 41 9d 00 78 bgt- cr7,ffc05b64 <== NEVER TAKEN ffc05af0: 55 2a 10 3a rlwinm r10,r9,2,0,29 ffc05af4: 81 01 00 10 lwz r8,16(r1) ffc05af8: 39 29 00 01 addi r9,r9,1 ffc05afc: 99 21 00 08 stb r9,8(r1) ffc05b00: 7d 48 52 14 add r10,r8,r10 ffc05b04: 81 4a 00 00 lwz r10,0(r10) if ( fd2 ) ffc05b08: 2f 8a 00 00 cmpwi cr7,r10,0 ffc05b0c: 41 9e 00 b4 beq- cr7,ffc05bc0 diop = rtems_libio_iop( fd2 ); ffc05b10: 7f 80 50 40 cmplw cr7,r0,r10 ffc05b14: 3b e0 00 00 li r31,0 ffc05b18: 39 20 00 00 li r9,0 ffc05b1c: 40 9d 00 10 ble- cr7,ffc05b2c <== NEVER TAKEN ffc05b20: 55 49 30 32 rlwinm r9,r10,6,0,25 ffc05b24: 7d 2b 4a 14 add r9,r11,r9 ffc05b28: 7d 3f 4b 78 mr r31,r9 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc05b2c: 80 1e 00 28 lwz r0,40(r30) ret = (int) (diop - rtems_libio_iops); ffc05b30: 7f eb f8 50 subf r31,r11,r31 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc05b34: 80 fe 00 1c lwz r7,28(r30) ret = (int) (diop - rtems_libio_iops); ffc05b38: 7f ff 36 70 srawi r31,r31,6 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc05b3c: 81 1e 00 20 lwz r8,32(r30) ffc05b40: 81 5e 00 24 lwz r10,36(r30) ffc05b44: 90 e9 00 1c stw r7,28(r9) ffc05b48: 91 09 00 20 stw r8,32(r9) ffc05b4c: 91 49 00 24 stw r10,36(r9) ffc05b50: 90 09 00 28 stw r0,40(r9) ffc05b54: 80 1e 00 2c lwz r0,44(r30) ret = -1; break; } } diop->flags = iop->flags; ffc05b58: 90 69 00 18 stw r3,24(r9) diop->pathinfo = iop->pathinfo; ffc05b5c: 90 09 00 2c stw r0,44(r9) ffc05b60: 4b ff ff 0c b ffc05a6c * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc05b64: 81 41 00 0c lwz r10,12(r1) <== NOT EXECUTED ffc05b68: 39 2a 00 04 addi r9,r10,4 <== NOT EXECUTED ffc05b6c: 91 21 00 0c stw r9,12(r1) <== NOT EXECUTED ffc05b70: 4b ff ff 94 b ffc05b04 <== 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 ) ) ffc05b74: 81 61 00 0c lwz r11,12(r1) <== NOT EXECUTED ffc05b78: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED ffc05b7c: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc05b80: 4b ff ff 40 b ffc05ac0 <== 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 ) ); ffc05b84: 81 61 00 10 lwz r11,16(r1) ffc05b88: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc05b8c: 39 29 00 01 addi r9,r9,1 ffc05b90: 7d 6b 02 14 add r11,r11,r0 ffc05b94: 99 21 00 08 stb r9,8(r1) ffc05b98: 4b ff fe 94 b ffc05a2c int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); ffc05b9c: 48 00 de fd bl ffc13a98 <__errno> ffc05ba0: 38 00 00 09 li r0,9 ffc05ba4: 90 03 00 00 stw r0,0(r3) ffc05ba8: 3b e0 ff ff li r31,-1 ffc05bac: 4b ff fe 20 b ffc059cc */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; ffc05bb0: 54 63 05 66 rlwinm r3,r3,0,21,19 ffc05bb4: 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; ffc05bb8: 3b e0 00 00 li r31,0 ffc05bbc: 4b ff fe b8 b ffc05a74 fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); ffc05bc0: 90 81 00 28 stw r4,40(r1) ffc05bc4: 48 00 06 25 bl ffc061e8 if ( diop == 0 ) { ffc05bc8: 7c 69 1b 79 mr. r9,r3 ffc05bcc: 80 81 00 28 lwz r4,40(r1) ffc05bd0: 41 a2 fd f8 beq- ffc059c8 <== NEVER TAKEN ffc05bd4: 81 7f 27 0c lwz r11,9996(r31) ffc05bd8: 7d 3f 4b 78 mr r31,r9 ffc05bdc: 80 7e 00 18 lwz r3,24(r30) ffc05be0: 4b ff ff 4c b ffc05b2c =============================================================================== ffc11688 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11688: 94 21 ff d0 stwu r1,-48(r1) ffc1168c: 7c 08 02 a6 mflr r0 ffc11690: 93 e1 00 2c stw r31,44(r1) static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc11694: 3f e0 00 00 lis r31,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11698: 90 01 00 34 stw r0,52(r1) static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc1169c: 80 1f 28 fc lwz r0,10492(r31) */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc116a0: 93 61 00 1c stw r27,28(r1) static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc116a4: 3b 7f 28 fc addi r27,r31,10492 ffc116a8: 2f 80 00 00 cmpwi cr7,r0,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc116ac: 93 a1 00 24 stw r29,36(r1) ffc116b0: 7c 9d 23 78 mr r29,r4 ffc116b4: 93 c1 00 28 stw r30,40(r1) ffc116b8: 7c 7e 1b 78 mr r30,r3 ffc116bc: 93 81 00 20 stw r28,32(r1) static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc116c0: 41 9e 00 bc beq- cr7,ffc1177c rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc116c4: 7c 03 03 78 mr r3,r0 ffc116c8: 38 80 00 00 li r4,0 ffc116cc: 38 a0 00 00 li r5,0 ffc116d0: 4b ff a2 05 bl ffc0b8d4 ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); ffc116d4: 3b 80 ff f4 li r28,-12 if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); } if (sc == RTEMS_SUCCESSFUL) { ffc116d8: 2f 83 00 00 cmpwi cr7,r3,0 ffc116dc: 40 9e 00 78 bne- cr7,ffc11754 <== NEVER TAKEN err = pipe_lock(); if (err) return err; pipe = *pipep; ffc116e0: 83 fe 00 00 lwz r31,0(r30) if (pipe == NULL) { ffc116e4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc116e8: 41 9e 02 2c beq- cr7,ffc11914 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc116ec: 80 7f 00 28 lwz r3,40(r31) ffc116f0: 38 80 00 00 li r4,0 ffc116f4: 38 a0 00 00 li r5,0 ffc116f8: 4b ff a1 dd bl ffc0b8d4 err = -EINTR; ffc116fc: 3b 80 ff fc li r28,-4 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc11700: 2f 83 00 00 cmpwi cr7,r3,0 ffc11704: 40 9e 00 08 bne- cr7,ffc1170c <== NEVER TAKEN ffc11708: 3b 80 00 00 li r28,0 err = -EINTR; if (*pipep == NULL) { ffc1170c: 80 1e 00 00 lwz r0,0(r30) ffc11710: 2f 80 00 00 cmpwi cr7,r0,0 ffc11714: 41 9e 02 d4 beq- cr7,ffc119e8 else *pipep = pipe; } out: pipe_unlock(); ffc11718: 4b ff fe 09 bl ffc11520 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) ffc1171c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc11720: 40 9e 00 34 bne- cr7,ffc11754 <== NEVER TAKEN return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { ffc11724: 80 1d 00 18 lwz r0,24(r29) int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; ffc11728: 83 fe 00 00 lwz r31,0(r30) switch (LIBIO_ACCMODE(iop)) { ffc1172c: 54 00 07 7c rlwinm r0,r0,0,29,30 ffc11730: 2f 80 00 04 cmpwi cr7,r0,4 ffc11734: 41 9e 00 78 beq- cr7,ffc117ac ffc11738: 2f 80 00 06 cmpwi cr7,r0,6 ffc1173c: 41 9e 01 88 beq- cr7,ffc118c4 ffc11740: 2f 80 00 02 cmpwi cr7,r0,2 ffc11744: 41 9e 00 fc beq- cr7,ffc11840 <== ALWAYS TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); ffc11748: 80 7f 00 28 lwz r3,40(r31) return 0; ffc1174c: 3b 80 00 00 li r28,0 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); ffc11750: 4b ff a3 0d bl ffc0ba5c return 0; out_error: pipe_release(pipep, iop); return err; } ffc11754: 80 01 00 34 lwz r0,52(r1) ffc11758: 7f 83 e3 78 mr r3,r28 ffc1175c: 83 61 00 1c lwz r27,28(r1) ffc11760: 7c 08 03 a6 mtlr r0 ffc11764: 83 81 00 20 lwz r28,32(r1) ffc11768: 83 a1 00 24 lwz r29,36(r1) ffc1176c: 83 c1 00 28 lwz r30,40(r1) ffc11770: 83 e1 00 2c lwz r31,44(r1) ffc11774: 38 21 00 30 addi r1,r1,48 ffc11778: 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 ); ffc1177c: 3f 80 00 00 lis r28,0 ffc11780: 80 7c 27 34 lwz r3,10036(r28) ffc11784: 38 80 00 00 li r4,0 ffc11788: 38 a0 00 00 li r5,0 ffc1178c: 4b ff a1 49 bl ffc0b8d4 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { ffc11790: 80 1f 28 fc lwz r0,10492(r31) ffc11794: 2f 80 00 00 cmpwi cr7,r0,0 ffc11798: 41 9e 02 64 beq- cr7,ffc119fc <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc1179c: 80 7c 27 34 lwz r3,10036(r28) <== NOT EXECUTED ffc117a0: 4b ff a2 bd bl ffc0ba5c <== NOT EXECUTED ffc117a4: 80 1f 28 fc lwz r0,10492(r31) <== NOT EXECUTED ffc117a8: 4b ff ff 1c b ffc116c4 <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc117ac: 81 3f 00 14 lwz r9,20(r31) } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc117b0: 81 7f 00 24 lwz r11,36(r31) if (pipe->Writers ++ == 0) ffc117b4: 2f 89 00 00 cmpwi cr7,r9,0 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc117b8: 38 0b 00 01 addi r0,r11,1 if (pipe->Writers ++ == 0) ffc117bc: 39 29 00 01 addi r9,r9,1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc117c0: 90 1f 00 24 stw r0,36(r31) if (pipe->Writers ++ == 0) ffc117c4: 91 3f 00 14 stw r9,20(r31) ffc117c8: 41 9e 02 90 beq- cr7,ffc11a58 <== ALWAYS TAKEN PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { ffc117cc: 80 1f 00 10 lwz r0,16(r31) ffc117d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc117d4: 40 be ff 74 bne- cr7,ffc11748 ffc117d8: 80 1d 00 18 lwz r0,24(r29) ffc117dc: 70 09 00 01 andi. r9,r0,1 ffc117e0: 40 82 02 b8 bne- ffc11a98 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; ffc117e4: 83 9f 00 20 lwz r28,32(r31) ffc117e8: 48 00 00 20 b ffc11808 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) ffc117ec: 80 7f 00 28 lwz r3,40(r31) ffc117f0: 4b ff a0 e5 bl ffc0b8d4 ffc117f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc117f8: 40 9e 00 34 bne- cr7,ffc1182c <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); ffc117fc: 80 1f 00 20 lwz r0,32(r31) ffc11800: 7f 80 e0 00 cmpw cr7,r0,r28 ffc11804: 40 be ff 44 bne- cr7,ffc11748 <== ALWAYS TAKEN if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); ffc11808: 80 7f 00 28 lwz r3,40(r31) ffc1180c: 4b ff a2 51 bl ffc0ba5c if (! PIPE_WRITEWAIT(pipe)) ffc11810: 80 7f 00 30 lwz r3,48(r31) ffc11814: 38 80 00 00 li r4,0 ffc11818: 48 00 18 81 bl ffc13098 goto out_error; if (! PIPE_LOCK(pipe)) ffc1181c: 38 80 00 00 li r4,0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc11820: 2f 83 00 00 cmpwi cr7,r3,0 goto out_error; if (! PIPE_LOCK(pipe)) ffc11824: 38 a0 00 00 li r5,0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc11828: 41 9e ff c4 beq+ cr7,ffc117ec <== ALWAYS TAKEN goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; ffc1182c: 3b 80 ff fc li r28,-4 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); ffc11830: 7f c3 f3 78 mr r3,r30 ffc11834: 7f a4 eb 78 mr r4,r29 ffc11838: 4b ff fd 11 bl ffc11548 return err; ffc1183c: 4b ff ff 18 b ffc11754 pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc11840: 81 3f 00 10 lwz r9,16(r31) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc11844: 81 7f 00 20 lwz r11,32(r31) if (pipe->Readers ++ == 0) ffc11848: 2f 89 00 00 cmpwi cr7,r9,0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc1184c: 38 0b 00 01 addi r0,r11,1 if (pipe->Readers ++ == 0) ffc11850: 39 29 00 01 addi r9,r9,1 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc11854: 90 1f 00 20 stw r0,32(r31) if (pipe->Readers ++ == 0) ffc11858: 91 3f 00 10 stw r9,16(r31) ffc1185c: 41 9e 01 dc beq- cr7,ffc11a38 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { ffc11860: 80 1f 00 14 lwz r0,20(r31) ffc11864: 2f 80 00 00 cmpwi cr7,r0,0 ffc11868: 40 be fe e0 bne- cr7,ffc11748 /* Not an error */ if (LIBIO_NODELAY(iop)) ffc1186c: 80 1d 00 18 lwz r0,24(r29) ffc11870: 70 09 00 01 andi. r9,r0,1 ffc11874: 40 a2 fe d4 bne- ffc11748 break; prevCounter = pipe->writerCounter; ffc11878: 83 9f 00 24 lwz r28,36(r31) ffc1187c: 48 00 00 20 b ffc1189c /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) ffc11880: 80 7f 00 28 lwz r3,40(r31) ffc11884: 4b ff a0 51 bl ffc0b8d4 ffc11888: 2f 83 00 00 cmpwi cr7,r3,0 ffc1188c: 40 be ff a0 bne- cr7,ffc1182c <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); ffc11890: 80 1f 00 24 lwz r0,36(r31) ffc11894: 7f 80 e0 00 cmpw cr7,r0,r28 ffc11898: 40 be fe b0 bne- cr7,ffc11748 <== ALWAYS TAKEN prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); ffc1189c: 80 7f 00 28 lwz r3,40(r31) ffc118a0: 4b ff a1 bd bl ffc0ba5c if (! PIPE_READWAIT(pipe)) ffc118a4: 80 7f 00 2c lwz r3,44(r31) ffc118a8: 38 80 00 00 li r4,0 ffc118ac: 48 00 17 ed bl ffc13098 goto out_error; if (! PIPE_LOCK(pipe)) ffc118b0: 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)) ffc118b4: 2f 83 00 00 cmpwi cr7,r3,0 goto out_error; if (! PIPE_LOCK(pipe)) ffc118b8: 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)) ffc118bc: 41 9e ff c4 beq+ cr7,ffc11880 <== ALWAYS TAKEN ffc118c0: 4b ff ff 6c b ffc1182c <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc118c4: 81 3f 00 10 lwz r9,16(r31) } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc118c8: 81 7f 00 20 lwz r11,32(r31) if (pipe->Readers ++ == 0) ffc118cc: 2f 89 00 00 cmpwi cr7,r9,0 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc118d0: 38 0b 00 01 addi r0,r11,1 if (pipe->Readers ++ == 0) ffc118d4: 39 29 00 01 addi r9,r9,1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc118d8: 90 1f 00 20 stw r0,32(r31) if (pipe->Readers ++ == 0) ffc118dc: 91 3f 00 10 stw r9,16(r31) ffc118e0: 41 9e 01 68 beq- cr7,ffc11a48 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc118e4: 81 3f 00 14 lwz r9,20(r31) case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc118e8: 81 7f 00 24 lwz r11,36(r31) if (pipe->Writers ++ == 0) ffc118ec: 2f 89 00 00 cmpwi cr7,r9,0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc118f0: 38 0b 00 01 addi r0,r11,1 if (pipe->Writers ++ == 0) ffc118f4: 39 29 00 01 addi r9,r9,1 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc118f8: 90 1f 00 24 stw r0,36(r31) if (pipe->Writers ++ == 0) ffc118fc: 91 3f 00 14 stw r9,20(r31) ffc11900: 40 9e fe 48 bne+ cr7,ffc11748 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); ffc11904: 80 7f 00 2c lwz r3,44(r31) ffc11908: 38 81 00 08 addi r4,r1,8 ffc1190c: 48 00 16 f9 bl ffc13004 ffc11910: 4b ff fe 38 b ffc11748 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ffc11914: 38 60 00 34 li r3,52 ffc11918: 4b ff 60 55 bl ffc0796c if (pipe == NULL) ffc1191c: 2f 83 00 00 cmpwi cr7,r3,0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ffc11920: 7c 7f 1b 78 mr r31,r3 ffc11924: 7c 7b 1b 78 mr r27,r3 if (pipe == NULL) ffc11928: 41 9e 01 a0 beq- cr7,ffc11ac8 return err; memset(pipe, 0, sizeof(pipe_control_t)); ffc1192c: 38 80 00 00 li r4,0 ffc11930: 38 a0 00 34 li r5,52 ffc11934: 48 00 49 89 bl ffc162bc pipe->Size = PIPE_BUF; ffc11938: 38 00 02 00 li r0,512 ffc1193c: 90 1f 00 04 stw r0,4(r31) pipe->Buffer = malloc(pipe->Size); ffc11940: 38 60 02 00 li r3,512 ffc11944: 4b ff 60 29 bl ffc0796c if (! pipe->Buffer) ffc11948: 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); ffc1194c: 90 7f 00 00 stw r3,0(r31) if (! pipe->Buffer) ffc11950: 41 9e 01 70 beq- cr7,ffc11ac0 <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), ffc11954: 3f 80 00 00 lis r28,0 ffc11958: 88 7c 21 85 lbz r3,8581(r28) if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( ffc1195c: 38 80 00 00 li r4,0 ffc11960: 38 a0 00 00 li r5,0 ffc11964: 64 63 50 49 oris r3,r3,20553 ffc11968: 60 63 72 00 ori r3,r3,29184 ffc1196c: 38 df 00 2c addi r6,r31,44 ffc11970: 48 00 14 8d bl ffc12dfc ffc11974: 2f 83 00 00 cmpwi cr7,r3,0 ffc11978: 40 9e 01 40 bne- cr7,ffc11ab8 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), ffc1197c: 88 7c 21 85 lbz r3,8581(r28) 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( ffc11980: 38 80 00 00 li r4,0 ffc11984: 38 a0 00 00 li r5,0 ffc11988: 64 63 50 49 oris r3,r3,20553 ffc1198c: 60 63 77 00 ori r3,r3,30464 ffc11990: 38 df 00 30 addi r6,r31,48 ffc11994: 48 00 14 69 bl ffc12dfc ffc11998: 2f 83 00 00 cmpwi cr7,r3,0 ffc1199c: 40 9e 01 14 bne- cr7,ffc11ab0 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, ffc119a0: 88 7c 21 85 lbz r3,8581(r28) 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( ffc119a4: 38 80 00 01 li r4,1 ffc119a8: 38 a0 00 10 li r5,16 ffc119ac: 64 63 50 49 oris r3,r3,20553 ffc119b0: 60 63 73 00 ori r3,r3,29440 ffc119b4: 38 c0 00 00 li r6,0 ffc119b8: 38 ff 00 28 addi r7,r31,40 ffc119bc: 4b ff 9c 19 bl ffc0b5d4 ffc119c0: 2f 83 00 00 cmpwi cr7,r3,0 ffc119c4: 40 9e 00 e4 bne- cr7,ffc11aa8 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') ffc119c8: 89 3c 21 85 lbz r9,8581(r28) ffc119cc: 2f 89 00 7a cmpwi cr7,r9,122 ffc119d0: 39 29 00 01 addi r9,r9,1 ffc119d4: 99 3c 21 85 stb r9,8581(r28) ffc119d8: 40 9e fd 14 bne+ cr7,ffc116ec c = 'a'; ffc119dc: 38 00 00 61 li r0,97 ffc119e0: 98 1c 21 85 stb r0,8581(r28) ffc119e4: 4b ff fd 08 b ffc116ec if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) ffc119e8: 2f 9c 00 00 cmpwi cr7,r28,0 ffc119ec: 40 9e 00 7c bne- cr7,ffc11a68 <== NEVER TAKEN pipe_free(pipe); else *pipep = pipe; ffc119f0: 93 fe 00 00 stw r31,0(r30) } out: pipe_unlock(); ffc119f4: 4b ff fb 2d bl ffc11520 ffc119f8: 4b ff fd 2c b ffc11724 if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( ffc119fc: 3c 60 50 49 lis r3,20553 ffc11a00: 7f 67 db 78 mr r7,r27 ffc11a04: 38 80 00 01 li r4,1 ffc11a08: 38 a0 00 54 li r5,84 ffc11a0c: 38 c0 00 00 li r6,0 ffc11a10: 60 63 50 45 ori r3,r3,20549 ffc11a14: 4b ff 9b c1 bl ffc0b5d4 ffc11a18: 7c 7b 1b 78 mr r27,r3 ffc11a1c: 80 7c 27 34 lwz r3,10036(r28) ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); ffc11a20: 3b 80 ff f4 li r28,-12 ffc11a24: 4b ff a0 39 bl ffc0ba5c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { ffc11a28: 2f 9b 00 00 cmpwi cr7,r27,0 ffc11a2c: 40 9e fd 28 bne+ cr7,ffc11754 ffc11a30: 80 1f 28 fc lwz r0,10492(r31) ffc11a34: 4b ff fc 90 b ffc116c4 switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); ffc11a38: 80 7f 00 30 lwz r3,48(r31) ffc11a3c: 38 81 00 08 addi r4,r1,8 ffc11a40: 48 00 15 c5 bl ffc13004 ffc11a44: 4b ff fe 1c b ffc11860 break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); ffc11a48: 80 7f 00 30 lwz r3,48(r31) ffc11a4c: 38 81 00 08 addi r4,r1,8 ffc11a50: 48 00 15 b5 bl ffc13004 ffc11a54: 4b ff fe 90 b ffc118e4 case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); ffc11a58: 80 7f 00 2c lwz r3,44(r31) ffc11a5c: 38 81 00 08 addi r4,r1,8 ffc11a60: 48 00 15 a5 bl ffc13004 ffc11a64: 4b ff fd 68 b ffc117cc /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); ffc11a68: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED ffc11a6c: 48 00 14 cd bl ffc12f38 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); ffc11a70: 80 7f 00 30 lwz r3,48(r31) <== NOT EXECUTED ffc11a74: 48 00 14 c5 bl ffc12f38 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); ffc11a78: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc11a7c: 4b ff 9d 7d bl ffc0b7f8 <== NOT EXECUTED free(pipe->Buffer); ffc11a80: 80 7f 00 00 lwz r3,0(r31) <== NOT EXECUTED ffc11a84: 4b ff 54 dd bl ffc06f60 <== NOT EXECUTED free(pipe); ffc11a88: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc11a8c: 4b ff 54 d5 bl ffc06f60 <== NOT EXECUTED else *pipep = pipe; } out: pipe_unlock(); ffc11a90: 4b ff fa 91 bl ffc11520 <== NOT EXECUTED ffc11a94: 4b ff fc c0 b ffc11754 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); ffc11a98: 80 7f 00 28 lwz r3,40(r31) err = -ENXIO; ffc11a9c: 3b 80 ff fa li r28,-6 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); ffc11aa0: 4b ff 9f bd bl ffc0ba5c err = -ENXIO; goto out_error; ffc11aa4: 4b ff fd 8c b ffc11830 if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); ffc11aa8: 80 7f 00 30 lwz r3,48(r31) ffc11aac: 48 00 14 8d bl ffc12f38 err_wbar: rtems_barrier_delete(pipe->readBarrier); ffc11ab0: 80 7b 00 2c lwz r3,44(r27) ffc11ab4: 48 00 14 85 bl ffc12f38 err_rbar: free(pipe->Buffer); ffc11ab8: 80 7b 00 00 lwz r3,0(r27) ffc11abc: 4b ff 54 a5 bl ffc06f60 err_buf: free(pipe); ffc11ac0: 7f 63 db 78 mr r3,r27 ffc11ac4: 4b ff 54 9d bl ffc06f60 ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); ffc11ac8: 3b 80 ff f4 li r28,-12 else *pipep = pipe; } out: pipe_unlock(); ffc11acc: 4b ff fa 55 bl ffc11520 ffc11ad0: 4b ff fc 84 b ffc11754 =============================================================================== ffc05c80 : long fpathconf( int fd, int name ) { ffc05c80: 7c 08 02 a6 mflr r0 ffc05c84: 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); ffc05c88: 3d 20 00 00 lis r9,0 long fpathconf( int fd, int name ) { ffc05c8c: 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); ffc05c90: 80 09 26 4c lwz r0,9804(r9) ffc05c94: 7f 83 00 40 cmplw cr7,r3,r0 ffc05c98: 40 9c 00 d0 bge- cr7,ffc05d68 iop = rtems_libio_iop(fd); ffc05c9c: 3d 20 00 00 lis r9,0 ffc05ca0: 80 09 27 0c lwz r0,9996(r9) ffc05ca4: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc05ca8: 7c 60 1a 14 add r3,r0,r3 rtems_libio_check_is_open(iop); ffc05cac: 80 03 00 18 lwz r0,24(r3) ffc05cb0: 70 09 01 00 andi. r9,r0,256 ffc05cb4: 41 82 00 b4 beq- ffc05d68 <== NEVER TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); ffc05cb8: 70 09 00 02 andi. r9,r0,2 ffc05cbc: 41 82 00 10 beq- ffc05ccc * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { ffc05cc0: 2b 84 00 0b cmplwi cr7,r4,11 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; ffc05cc4: 81 23 00 2c lwz r9,44(r3) switch ( name ) { ffc05cc8: 40 9d 00 24 ble- cr7,ffc05cec break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc05ccc: 48 00 dd cd bl ffc13a98 <__errno> ffc05cd0: 38 00 00 16 li r0,22 ffc05cd4: 90 03 00 00 stw r0,0(r3) ffc05cd8: 38 60 ff ff li r3,-1 break; } return return_value; } ffc05cdc: 80 01 00 0c lwz r0,12(r1) ffc05ce0: 38 21 00 08 addi r1,r1,8 ffc05ce4: 7c 08 03 a6 mtlr r0 ffc05ce8: 4e 80 00 20 blr * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { ffc05cec: 3d 60 ff c2 lis r11,-62 ffc05cf0: 39 6b b2 84 addi r11,r11,-19836 ffc05cf4: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc05cf8: 7c 0b 20 2e lwzx r0,r11,r4 ffc05cfc: 7d 60 5a 14 add r11,r0,r11 ffc05d00: 7d 69 03 a6 mtctr r11 ffc05d04: 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; ffc05d08: 80 69 00 5c lwz r3,92(r9) break; ffc05d0c: 4b ff ff d0 b ffc05cdc break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; ffc05d10: 80 69 00 50 lwz r3,80(r9) break; ffc05d14: 4b ff ff c8 b ffc05cdc break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; ffc05d18: 80 69 00 64 lwz r3,100(r9) break; ffc05d1c: 4b ff ff c0 b ffc05cdc break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; ffc05d20: 80 69 00 58 lwz r3,88(r9) break; ffc05d24: 4b ff ff b8 b ffc05cdc break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; ffc05d28: 80 69 00 54 lwz r3,84(r9) break; ffc05d2c: 4b ff ff b0 b ffc05cdc break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; ffc05d30: 80 69 00 4c lwz r3,76(r9) break; ffc05d34: 4b ff ff a8 b ffc05cdc break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; ffc05d38: 80 69 00 48 lwz r3,72(r9) break; ffc05d3c: 4b ff ff a0 b ffc05cdc break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; ffc05d40: 80 69 00 44 lwz r3,68(r9) break; ffc05d44: 4b ff ff 98 b ffc05cdc break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; ffc05d48: 80 69 00 40 lwz r3,64(r9) break; ffc05d4c: 4b ff ff 90 b ffc05cdc switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; ffc05d50: 80 69 00 3c lwz r3,60(r9) break; ffc05d54: 4b ff ff 88 b ffc05cdc the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; ffc05d58: 80 69 00 38 lwz r3,56(r9) break; ffc05d5c: 4b ff ff 80 b ffc05cdc break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; ffc05d60: 80 69 00 60 lwz r3,96(r9) break; ffc05d64: 4b ff ff 78 b ffc05cdc 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); ffc05d68: 48 00 dd 31 bl ffc13a98 <__errno> ffc05d6c: 38 00 00 09 li r0,9 ffc05d70: 90 03 00 00 stw r0,0(r3) ffc05d74: 38 60 ff ff li r3,-1 ffc05d78: 4b ff ff 64 b ffc05cdc =============================================================================== ffc04c7c : #include void free( void *ptr ) { ffc04c7c: 94 21 ff f0 stwu r1,-16(r1) ffc04c80: 7c 08 02 a6 mflr r0 MSBUMP(free_calls, 1); ffc04c84: 3d 20 00 00 lis r9,0 #include void free( void *ptr ) { ffc04c88: 90 01 00 14 stw r0,20(r1) MSBUMP(free_calls, 1); ffc04c8c: 39 29 2a 48 addi r9,r9,10824 #include void free( void *ptr ) { ffc04c90: 93 e1 00 0c stw r31,12(r1) MSBUMP(free_calls, 1); if ( !ptr ) ffc04c94: 7c 7f 1b 79 mr. r31,r3 void free( void *ptr ) { MSBUMP(free_calls, 1); ffc04c98: 81 69 00 0c lwz r11,12(r9) #include void free( void *ptr ) { ffc04c9c: 93 c1 00 08 stw r30,8(r1) MSBUMP(free_calls, 1); ffc04ca0: 38 0b 00 01 addi r0,r11,1 ffc04ca4: 90 09 00 0c stw r0,12(r9) if ( !ptr ) ffc04ca8: 41 82 00 6c beq- ffc04d14 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc04cac: 3d 20 00 00 lis r9,0 ffc04cb0: 80 09 27 6c lwz r0,10092(r9) ffc04cb4: 2f 80 00 03 cmpwi cr7,r0,3 ffc04cb8: 41 9e 00 74 beq- cr7,ffc04d2c <== ALWAYS TAKEN } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc04cbc: 3d 20 00 00 lis r9,0 ffc04cc0: 81 29 26 c8 lwz r9,9928(r9) ffc04cc4: 2f 89 00 00 cmpwi cr7,r9,0 ffc04cc8: 41 9e 00 14 beq- cr7,ffc04cdc (*rtems_malloc_statistics_helpers->at_free)(ptr); ffc04ccc: 80 09 00 08 lwz r0,8(r9) ffc04cd0: 7f e3 fb 78 mr r3,r31 ffc04cd4: 7c 09 03 a6 mtctr r0 ffc04cd8: 4e 80 04 21 bctrl if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { ffc04cdc: 3f c0 00 00 lis r30,0 ffc04ce0: 80 7e 26 64 lwz r3,9828(r30) ffc04ce4: 7f e4 fb 78 mr r4,r31 ffc04ce8: 48 00 65 5d bl ffc0b244 <_Protected_heap_Free> ffc04cec: 2f 83 00 00 cmpwi cr7,r3,0 ffc04cf0: 40 be 00 24 bne+ cr7,ffc04d14 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, ffc04cf4: 81 3e 26 64 lwz r9,9828(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", ffc04cf8: 3c 60 ff c2 lis r3,-62 ffc04cfc: 38 63 8e d4 addi r3,r3,-28972 ffc04d00: 80 a9 00 18 lwz r5,24(r9) ffc04d04: 7f e4 fb 78 mr r4,r31 ffc04d08: 80 c9 00 1c lwz r6,28(r9) ffc04d0c: 4c c6 31 82 crclr 4*cr1+eq ffc04d10: 48 00 10 ad bl ffc05dbc RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } ffc04d14: 80 01 00 14 lwz r0,20(r1) ffc04d18: 83 c1 00 08 lwz r30,8(r1) ffc04d1c: 7c 08 03 a6 mtlr r0 ffc04d20: 83 e1 00 0c lwz r31,12(r1) ffc04d24: 38 21 00 10 addi r1,r1,16 ffc04d28: 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() ) { ffc04d2c: 48 00 01 9d bl ffc04ec8 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc04d30: 2f 83 00 00 cmpwi cr7,r3,0 ffc04d34: 40 9e ff 88 bne+ cr7,ffc04cbc !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); ffc04d38: 7f e3 fb 78 mr r3,r31 ffc04d3c: 48 00 02 19 bl ffc04f54 return; ffc04d40: 4b ff ff d4 b ffc04d14 =============================================================================== ffc0646c : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc0646c: 94 21 ff f0 stwu r1,-16(r1) ffc06470: 7c 08 02 a6 mflr r0 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc06474: 3d 20 00 00 lis r9,0 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc06478: 90 01 00 14 stw r0,20(r1) rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc0647c: 38 09 2a 50 addi r0,r9,10832 ffc06480: 7f 83 00 00 cmpw cr7,r3,r0 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc06484: 93 e1 00 0c stw r31,12(r1) ffc06488: 7c 7f 1b 78 mr r31,r3 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc0648c: 41 9e 00 1c beq- cr7,ffc064a8 <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); ffc06490: 38 63 00 04 addi r3,r3,4 ffc06494: 4b ff ea 25 bl ffc04eb8 rtems_filesystem_freenode( &env->root_directory); ffc06498: 38 7f 00 18 addi r3,r31,24 ffc0649c: 4b ff ea 1d bl ffc04eb8 free(env); ffc064a0: 7f e3 fb 78 mr r3,r31 ffc064a4: 4b ff ea 41 bl ffc04ee4 } } ffc064a8: 80 01 00 14 lwz r0,20(r1) ffc064ac: 83 e1 00 0c lwz r31,12(r1) ffc064b0: 38 21 00 10 addi r1,r1,16 ffc064b4: 7c 08 03 a6 mtlr r0 ffc064b8: 4e 80 00 20 blr =============================================================================== ffc194bc : int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc194bc: 94 21 ff c8 stwu r1,-56(r1) ffc194c0: 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 ); ffc194c4: 3d 20 00 00 lis r9,0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc194c8: 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 ); ffc194cc: 80 09 26 ec lwz r0,9964(r9) int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc194d0: 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 ); ffc194d4: 3b a0 00 00 li r29,0 ffc194d8: 7f 83 00 40 cmplw cr7,r3,r0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc194dc: 93 c1 00 30 stw r30,48(r1) ffc194e0: 7c 9e 23 78 mr r30,r4 ffc194e4: 93 e1 00 34 stw r31,52(r1) ffc194e8: 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 ); ffc194ec: 40 9c 00 14 bge- cr7,ffc19500 <== NEVER TAKEN ffc194f0: 3d 20 00 00 lis r9,0 ffc194f4: 83 a9 27 b8 lwz r29,10168(r9) ffc194f8: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc194fc: 7f bd 1a 14 add r29,r29,r3 /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc19500: 81 3d 00 28 lwz r9,40(r29) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc19504: 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; ffc19508: 80 1d 00 2c lwz r0,44(r29) ffc1950c: 81 1d 00 1c lwz r8,28(r29) ffc19510: 81 5d 00 20 lwz r10,32(r29) ffc19514: 81 7d 00 24 lwz r11,36(r29) ffc19518: 90 01 00 18 stw r0,24(r1) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc1951c: 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; ffc19520: 91 01 00 08 stw r8,8(r1) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc19524: 7c 09 03 a6 mtctr r0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc19528: 91 41 00 0c stw r10,12(r1) ffc1952c: 91 61 00 10 stw r11,16(r1) ffc19530: 91 21 00 14 stw r9,20(r1) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc19534: 4e 80 04 21 bctrl ffc19538: 2f 83 00 01 cmpwi cr7,r3,1 ffc1953c: 40 9e 00 3c bne- cr7,ffc19578 /* * 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 ); ffc19540: 81 3d 00 24 lwz r9,36(r29) ffc19544: 7f a3 eb 78 mr r3,r29 ffc19548: 7f c4 f3 78 mr r4,r30 ffc1954c: 80 09 00 08 lwz r0,8(r9) ffc19550: 7f e5 fb 78 mr r5,r31 ffc19554: 7c 09 03 a6 mtctr r0 ffc19558: 4e 80 04 21 bctrl } ffc1955c: 80 01 00 3c lwz r0,60(r1) ffc19560: 83 a1 00 2c lwz r29,44(r1) ffc19564: 7c 08 03 a6 mtlr r0 ffc19568: 83 c1 00 30 lwz r30,48(r1) ffc1956c: 83 e1 00 34 lwz r31,52(r1) ffc19570: 38 21 00 38 addi r1,r1,56 ffc19574: 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 ); ffc19578: 4b ff 9e b9 bl ffc13430 <__errno> ffc1957c: 38 00 00 14 li r0,20 ffc19580: 90 03 00 00 stw r0,0(r3) ffc19584: 38 60 ff ff li r3,-1 ffc19588: 4b ff ff d4 b ffc1955c =============================================================================== ffc04d44 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc04d44: 94 21 ff e0 stwu r1,-32(r1) ffc04d48: 7c 08 02 a6 mflr r0 ffc04d4c: 93 e1 00 1c stw r31,28(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) ffc04d50: 7c 7f 1b 79 mr. r31,r3 */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc04d54: 90 01 00 24 stw r0,36(r1) ffc04d58: 93 c1 00 18 stw r30,24(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) ffc04d5c: 41 82 00 64 beq- ffc04dc0 <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc04d60: 7f c0 00 a6 mfmsr r30 ffc04d64: 7c 10 42 a6 mfsprg r0,0 ffc04d68: 7f c0 00 78 andc r0,r30,r0 ffc04d6c: 7c 00 01 24 mtmsr r0 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); ffc04d70: 38 61 00 08 addi r3,r1,8 ffc04d74: 48 00 54 a5 bl ffc0a218 <_TOD_Get> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc04d78: 7f c0 01 24 mtmsr r30 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; ffc04d7c: 3d 20 10 62 lis r9,4194 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; ffc04d80: 80 01 00 0c lwz r0,12(r1) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; ffc04d84: 61 29 4d d3 ori r9,r9,19923 ffc04d88: 7d 20 48 96 mulhw r9,r0,r9 ffc04d8c: 7c 00 fe 70 srawi r0,r0,31 ffc04d90: 7d 29 36 70 srawi r9,r9,6 ffc04d94: 7c 00 48 50 subf r0,r0,r9 time->tv_sec = now.tv_sec; ffc04d98: 81 21 00 08 lwz r9,8(r1) time->tv_usec = useconds; ffc04d9c: 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; ffc04da0: 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; ffc04da4: 91 3f 00 00 stw r9,0(r31) } ffc04da8: 80 01 00 24 lwz r0,36(r1) ffc04dac: 83 c1 00 18 lwz r30,24(r1) ffc04db0: 7c 08 03 a6 mtlr r0 ffc04db4: 83 e1 00 1c lwz r31,28(r1) ffc04db8: 38 21 00 20 addi r1,r1,32 ffc04dbc: 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 ); ffc04dc0: 48 00 d5 9d bl ffc1235c <__errno> <== NOT EXECUTED ffc04dc4: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc04dc8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc04dcc: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04dd0: 4b ff ff d8 b ffc04da8 <== NOT EXECUTED =============================================================================== ffc117dc : 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 ) ffc117dc: 81 23 00 1c lwz r9,28(r3) return -1; /* It wasn't a directory --> return error */ ffc117e0: 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 ) ffc117e4: 81 29 00 4c lwz r9,76(r9) ffc117e8: 2f 89 00 01 cmpwi cr7,r9,1 ffc117ec: 40 be 00 18 bne+ cr7,ffc11804 <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; ffc117f0: 39 20 00 00 li r9,0 ffc117f4: 39 40 00 00 li r10,0 ffc117f8: 91 23 00 10 stw r9,16(r3) return 0; ffc117fc: 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; ffc11800: 91 43 00 14 stw r10,20(r3) return 0; } ffc11804: 7c 03 03 78 mr r3,r0 ffc11808: 4e 80 00 20 blr =============================================================================== ffc1180c : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc1180c: 94 21 fe a8 stwu r1,-344(r1) ffc11810: 7c 08 02 a6 mflr r0 ffc11814: 90 01 01 5c stw r0,348(r1) ffc11818: 93 01 01 38 stw r24,312(r1) ffc1181c: 7c 98 23 78 mr r24,r4 ffc11820: 93 21 01 3c stw r25,316(r1) ffc11824: 7c 79 1b 78 mr r25,r3 ffc11828: 93 41 01 40 stw r26,320(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; ffc1182c: 3b 40 00 00 li r26,0 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc11830: 93 81 01 48 stw r28,328(r1) ffc11834: 92 81 01 28 stw r20,296(r1) int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; ffc11838: 83 83 00 1c lwz r28,28(r3) ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc1183c: 92 a1 01 2c stw r21,300(r1) ffc11840: 92 c1 01 30 stw r22,304(r1) ffc11844: 92 e1 01 34 stw r23,308(r1) ffc11848: 93 61 01 44 stw r27,324(r1) ffc1184c: 93 a1 01 4c stw r29,332(r1) ffc11850: 93 c1 01 50 stw r30,336(r1) ffc11854: 93 e1 01 54 stw r31,340(r1) IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } ffc11858: 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 ); ffc1185c: 3b 9c 00 54 addi r28,r28,84 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 ) ) ffc11860: 7f 9e e0 00 cmpw cr7,r30,r28 ffc11864: 41 9e 00 d0 beq- cr7,ffc11934 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); ffc11868: 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; ffc1186c: 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); ffc11870: 54 a5 e8 fe rlwinm r5,r5,29,3,31 ffc11874: 63 7b ea 0f ori r27,r27,59919 ffc11878: 7f 65 d8 16 mulhwu r27,r5,r27 /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc1187c: 3b e0 00 00 li r31,0 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); ffc11880: 57 7b f8 7e rlwinm r27,r27,31,1,31 ffc11884: 1f 7b 01 18 mulli r27,r27,280 /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc11888: 7f 7b ea 15 add. r27,r27,r29 ffc1188c: 40 81 00 a8 ble- ffc11934 <== NEVER TAKEN } 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 ); ffc11890: 3a a0 01 18 li r21,280 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); ffc11894: 3a c1 00 1c addi r22,r1,28 memcpy( ffc11898: 3a e1 00 08 addi r23,r1,8 ffc1189c: 48 00 00 1c b ffc118b8 * 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( ffc118a0: 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; ffc118a4: 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 ( ffc118a8: 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 ) ){ ffc118ac: 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 ( ffc118b0: 40 9d 00 84 ble- cr7,ffc11934 <== 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 ) ){ ffc118b4: 41 9a 00 80 beq- cr6,ffc11934 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { ffc118b8: 7f 9d f8 00 cmpw cr7,r29,r31 ffc118bc: 41 9d ff e4 bgt+ cr7,ffc118a0 /* 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; ffc118c0: 80 1e 00 38 lwz r0,56(r30) tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc118c4: 3a 9e 00 0c addi r20,r30,12 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; ffc118c8: 7f e9 fe 70 srawi r9,r31,31 ffc118cc: 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 ); ffc118d0: 7e 83 a3 78 mr r3,r20 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; ffc118d4: 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( ffc118d8: 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; ffc118dc: 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 ); ffc118e0: b2 a1 00 18 sth r21,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 ); ffc118e4: 48 00 1d 01 bl ffc135e4 strcpy( tmp_dirent.d_name, the_jnode->name ); ffc118e8: 7e 84 a3 78 mr r4,r20 /* 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 ); ffc118ec: b0 61 00 1a sth r3,26(r1) strcpy( tmp_dirent.d_name, the_jnode->name ); ffc118f0: 7e c3 b3 78 mr r3,r22 ffc118f4: 48 00 1b e1 bl ffc134d4 memcpy( ffc118f8: 7c 78 d2 14 add r3,r24,r26 ffc118fc: 7e e4 bb 78 mr r4,r23 ffc11900: 38 a0 01 18 li r5,280 ffc11904: 48 00 16 b9 bl ffc12fbc /* 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 ( ffc11908: 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); ffc1190c: 81 39 00 10 lwz r9,16(r25) bytes_transferred = bytes_transferred + sizeof( struct dirent ); ffc11910: 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); ffc11914: 81 59 00 14 lwz r10,20(r25) bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; ffc11918: 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); ffc1191c: 31 4a 01 18 addic r10,r10,280 ffc11920: 7d 29 01 94 addze r9,r9 ffc11924: 91 39 00 10 stw r9,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 ) ){ ffc11928: 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); ffc1192c: 91 59 00 14 stw r10,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 ( ffc11930: 41 9d ff 84 bgt+ cr7,ffc118b4 <== NEVER TAKEN the_node = the_node->next; } /* Success */ return bytes_transferred; } ffc11934: 80 01 01 5c lwz r0,348(r1) ffc11938: 7f 43 d3 78 mr r3,r26 ffc1193c: 82 81 01 28 lwz r20,296(r1) ffc11940: 7c 08 03 a6 mtlr r0 ffc11944: 82 a1 01 2c lwz r21,300(r1) ffc11948: 82 c1 01 30 lwz r22,304(r1) ffc1194c: 82 e1 01 34 lwz r23,308(r1) ffc11950: 83 01 01 38 lwz r24,312(r1) ffc11954: 83 21 01 3c lwz r25,316(r1) ffc11958: 83 41 01 40 lwz r26,320(r1) ffc1195c: 83 61 01 44 lwz r27,324(r1) ffc11960: 83 81 01 48 lwz r28,328(r1) ffc11964: 83 a1 01 4c lwz r29,332(r1) ffc11968: 83 c1 01 50 lwz r30,336(r1) ffc1196c: 83 e1 01 54 lwz r31,340(r1) ffc11970: 38 21 01 58 addi r1,r1,344 ffc11974: 4e 80 00 20 blr =============================================================================== ffc11aec : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { ffc11aec: 94 21 ff f0 stwu r1,-16(r1) ffc11af0: 7c 08 02 a6 mflr r0 ffc11af4: 93 e1 00 0c stw r31,12(r1) ffc11af8: 90 01 00 14 stw r0,20(r1) IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; ffc11afc: 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 ) ) ffc11b00: 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 ); ffc11b04: 38 1f 00 54 addi r0,r31,84 ffc11b08: 7f 89 00 00 cmpw cr7,r9,r0 ffc11b0c: 40 9e 00 6c bne- cr7,ffc11b78 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) ffc11b10: 81 24 00 10 lwz r9,16(r4) ffc11b14: 80 09 00 1c lwz r0,28(r9) ffc11b18: 7f 9f 00 00 cmpw cr7,r31,r0 ffc11b1c: 41 9e 00 38 beq- cr7,ffc11b54 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) ffc11b20: 80 1f 00 5c lwz r0,92(r31) ffc11b24: 2f 80 00 00 cmpwi cr7,r0,0 ffc11b28: 40 9e 00 2c bne- cr7,ffc11b54 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); ffc11b2c: 7f e3 fb 78 mr r3,r31 ffc11b30: 4b ff cc 41 bl ffc0e770 IMFS_check_node_remove( the_jnode ); ffc11b34: 7f e3 fb 78 mr r3,r31 ffc11b38: 4b ff cc 99 bl ffc0e7d0 return 0; ffc11b3c: 38 60 00 00 li r3,0 } ffc11b40: 80 01 00 14 lwz r0,20(r1) ffc11b44: 83 e1 00 0c lwz r31,12(r1) ffc11b48: 38 21 00 10 addi r1,r1,16 ffc11b4c: 7c 08 03 a6 mtlr r0 ffc11b50: 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 ); ffc11b54: 48 00 08 09 bl ffc1235c <__errno> ffc11b58: 38 00 00 10 li r0,16 ffc11b5c: 90 03 00 00 stw r0,0(r3) ffc11b60: 38 60 ff ff li r3,-1 IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } ffc11b64: 80 01 00 14 lwz r0,20(r1) ffc11b68: 83 e1 00 0c lwz r31,12(r1) ffc11b6c: 38 21 00 10 addi r1,r1,16 ffc11b70: 7c 08 03 a6 mtlr r0 ffc11b74: 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 ); ffc11b78: 48 00 07 e5 bl ffc1235c <__errno> ffc11b7c: 38 00 00 5a li r0,90 ffc11b80: 90 03 00 00 stw r0,0(r3) ffc11b84: 38 60 ff ff li r3,-1 ffc11b88: 4b ff ff b8 b ffc11b40 =============================================================================== ffc05b68 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05b68: 94 21 ff f0 stwu r1,-16(r1) ffc05b6c: 7c 08 02 a6 mflr r0 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05b70: 3d 20 00 00 lis r9,0 /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05b74: 90 01 00 14 stw r0,20(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05b78: 88 09 27 d4 lbz r0,10196(r9) /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05b7c: 93 c1 00 08 stw r30,8(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05b80: 2f 80 00 00 cmpwi cr7,r0,0 /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05b84: 93 e1 00 0c stw r31,12(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05b88: 41 9e 00 1c beq- cr7,ffc05ba4 fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } ffc05b8c: 80 01 00 14 lwz r0,20(r1) ffc05b90: 83 c1 00 08 lwz r30,8(r1) ffc05b94: 7c 08 03 a6 mtlr r0 ffc05b98: 83 e1 00 0c lwz r31,12(r1) ffc05b9c: 38 21 00 10 addi r1,r1,16 ffc05ba0: 4e 80 00 20 blr static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc05ba4: 3c 60 ff c2 lis r3,-62 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc05ba8: 3f c0 ff c2 lis r30,-62 ffc05bac: 3f e0 ff c2 lis r31,-62 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; ffc05bb0: 38 00 00 01 li r0,1 mkdir("/etc", 0777); ffc05bb4: 38 80 01 ff li r4,511 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; ffc05bb8: 98 09 27 d4 stb r0,10196(r9) mkdir("/etc", 0777); ffc05bbc: 38 63 b2 00 addi r3,r3,-19968 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc05bc0: 3b de b2 08 addi r30,r30,-19960 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc05bc4: 48 00 0b 99 bl ffc0675c /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc05bc8: 3b ff b2 14 addi r31,r31,-19948 ffc05bcc: 7f c3 f3 78 mr r3,r30 ffc05bd0: 7f e4 fb 78 mr r4,r31 ffc05bd4: 48 00 e9 15 bl ffc144e8 ffc05bd8: 2f 83 00 00 cmpwi cr7,r3,0 ffc05bdc: 41 9e 00 7c beq- cr7,ffc05c58 } 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); ffc05be0: 48 00 df 49 bl ffc13b28 } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { ffc05be4: 3f c0 ff c2 lis r30,-62 ffc05be8: 3b de b2 84 addi r30,r30,-19836 ffc05bec: 7f c3 f3 78 mr r3,r30 ffc05bf0: 7f e4 fb 78 mr r4,r31 ffc05bf4: 48 00 e8 f5 bl ffc144e8 ffc05bf8: 2f 83 00 00 cmpwi cr7,r3,0 ffc05bfc: 41 9e 00 20 beq- cr7,ffc05c1c } 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); ffc05c00: 48 00 df 29 bl ffc13b28 } } ffc05c04: 80 01 00 14 lwz r0,20(r1) ffc05c08: 83 c1 00 08 lwz r30,8(r1) ffc05c0c: 7c 08 03 a6 mtlr r0 ffc05c10: 83 e1 00 0c lwz r31,12(r1) ffc05c14: 38 21 00 10 addi r1,r1,16 ffc05c18: 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) { ffc05c1c: 3c 80 ff c2 lis r4,-62 ffc05c20: 7f c3 f3 78 mr r3,r30 ffc05c24: 38 84 b2 18 addi r4,r4,-19944 ffc05c28: 48 00 e8 c1 bl ffc144e8 ffc05c2c: 7c 7f 1b 79 mr. r31,r3 ffc05c30: 41 a2 ff 5c beq- ffc05b8c <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" ffc05c34: 3c 60 ff c2 lis r3,-62 ffc05c38: 38 80 00 01 li r4,1 ffc05c3c: 38 a0 00 2a li r5,42 ffc05c40: 7f e6 fb 78 mr r6,r31 ffc05c44: 38 63 b2 90 addi r3,r3,-19824 ffc05c48: 48 00 f1 85 bl ffc14dcc "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); ffc05c4c: 7f e3 fb 78 mr r3,r31 ffc05c50: 48 00 de d9 bl ffc13b28 ffc05c54: 4b ff ff b0 b ffc05c04 * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { ffc05c58: 3c 80 ff c2 lis r4,-62 ffc05c5c: 7f c3 f3 78 mr r3,r30 ffc05c60: 38 84 b2 18 addi r4,r4,-19944 ffc05c64: 48 00 e8 85 bl ffc144e8 ffc05c68: 7c 7e 1b 79 mr. r30,r3 ffc05c6c: 41 a2 ff 78 beq- ffc05be4 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" ffc05c70: 3c 60 ff c2 lis r3,-62 ffc05c74: 38 63 b2 1c addi r3,r3,-19940 ffc05c78: 38 80 00 01 li r4,1 ffc05c7c: 38 a0 00 66 li r5,102 ffc05c80: 7f c6 f3 78 mr r6,r30 ffc05c84: 48 00 f1 49 bl ffc14dcc "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); ffc05c88: 7f c3 f3 78 mr r3,r30 ffc05c8c: 4b ff ff 54 b ffc05be0 =============================================================================== ffc07188 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc07188: 94 21 ff f0 stwu r1,-16(r1) ffc0718c: 7c 08 02 a6 mflr r0 ffc07190: 90 01 00 14 stw r0,20(r1) if (tty->termios.c_iflag & ISTRIP) ffc07194: 80 04 00 30 lwz r0,48(r4) /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc07198: 93 c1 00 08 stw r30,8(r1) ffc0719c: 7c 9e 23 78 mr r30,r4 if (tty->termios.c_iflag & ISTRIP) ffc071a0: 70 09 00 20 andi. r9,r0,32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc071a4: 93 e1 00 0c stw r31,12(r1) ffc071a8: 7c 7f 1b 78 mr r31,r3 if (tty->termios.c_iflag & ISTRIP) ffc071ac: 41 82 00 08 beq- ffc071b4 <== ALWAYS TAKEN c &= 0x7f; ffc071b0: 54 7f 06 7e clrlwi r31,r3,25 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) ffc071b4: 70 0b 02 00 andi. r11,r0,512 ffc071b8: 41 82 00 28 beq- ffc071e0 c = tolower (c); ffc071bc: 3d 20 00 00 lis r9,0 ffc071c0: 81 69 26 a8 lwz r11,9896(r9) ffc071c4: 7f e9 fb 78 mr r9,r31 ffc071c8: 7f eb fa 14 add r31,r11,r31 ffc071cc: 89 7f 00 01 lbz r11,1(r31) ffc071d0: 55 6b 07 be clrlwi r11,r11,30 ffc071d4: 2f 8b 00 01 cmpwi cr7,r11,1 ffc071d8: 41 9e 01 14 beq- cr7,ffc072ec ffc071dc: 55 3f 06 3e clrlwi r31,r9,24 if (c == '\r') { ffc071e0: 2f 9f 00 0d cmpwi cr7,r31,13 ffc071e4: 41 9e 00 68 beq- cr7,ffc0724c 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)) { ffc071e8: 2f 9f 00 0a cmpwi cr7,r31,10 ffc071ec: 41 9e 00 f0 beq- cr7,ffc072dc c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { ffc071f0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc071f4: 40 9e 00 70 bne- cr7,ffc07264 <== ALWAYS TAKEN } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { ffc071f8: 3d 20 00 00 lis r9,0 ffc071fc: 81 69 21 80 lwz r11,8576(r9) if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; ffc07200: 38 60 00 00 li r3,0 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { ffc07204: 81 3e 00 20 lwz r9,32(r30) ffc07208: 38 0b ff ff addi r0,r11,-1 ffc0720c: 7f 89 00 00 cmpw cr7,r9,r0 ffc07210: 40 9c 00 24 bge- cr7,ffc07234 <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) ffc07214: 80 1e 00 3c lwz r0,60(r30) ffc07218: 70 0b 00 08 andi. r11,r0,8 ffc0721c: 40 82 00 d8 bne- ffc072f4 <== ALWAYS TAKEN echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc07220: 81 7e 00 1c lwz r11,28(r30) ffc07224: 38 09 00 01 addi r0,r9,1 } return 0; ffc07228: 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; ffc0722c: 7f eb 49 ae stbx r31,r11,r9 ffc07230: 90 1e 00 20 stw r0,32(r30) } return 0; } ffc07234: 80 01 00 14 lwz r0,20(r1) ffc07238: 83 c1 00 08 lwz r30,8(r1) ffc0723c: 7c 08 03 a6 mtlr r0 ffc07240: 83 e1 00 0c lwz r31,12(r1) ffc07244: 38 21 00 10 addi r1,r1,16 ffc07248: 4e 80 00 20 blr if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) ffc0724c: 70 09 00 80 andi. r9,r0,128 return 0; ffc07250: 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) ffc07254: 40 a2 ff e0 bne- ffc07234 <== NEVER TAKEN return 0; if (tty->termios.c_iflag & ICRNL) ffc07258: 70 0b 01 00 andi. r11,r0,256 ffc0725c: 41 82 00 08 beq- ffc07264 <== NEVER TAKEN c = '\n'; ffc07260: 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)) { ffc07264: 80 1e 00 3c lwz r0,60(r30) ffc07268: 70 0b 00 02 andi. r11,r0,2 ffc0726c: 41 a2 ff 8c beq- ffc071f8 if (c == tty->termios.c_cc[VERASE]) { ffc07270: 89 3e 00 43 lbz r9,67(r30) ffc07274: 7f 89 f8 00 cmpw cr7,r9,r31 ffc07278: 41 9e 00 e8 beq- cr7,ffc07360 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { ffc0727c: 89 3e 00 44 lbz r9,68(r30) ffc07280: 7f 89 f8 00 cmpw cr7,r9,r31 ffc07284: 41 9e 00 94 beq- cr7,ffc07318 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { ffc07288: 89 3e 00 45 lbz r9,69(r30) return 1; ffc0728c: 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]) { ffc07290: 7f 89 f8 00 cmpw cr7,r9,r31 ffc07294: 41 be ff a0 beq- cr7,ffc07234 <== NEVER TAKEN return 1; } else if (c == '\n') { ffc07298: 2f 9f 00 0a cmpwi cr7,r31,10 ffc0729c: 41 9e 00 90 beq- cr7,ffc0732c 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]) || ffc072a0: 89 3e 00 4c lbz r9,76(r30) ffc072a4: 7f 89 f8 00 cmpw cr7,r9,r31 ffc072a8: 41 9e 00 10 beq- cr7,ffc072b8 <== NEVER TAKEN ffc072ac: 89 3e 00 51 lbz r9,81(r30) ffc072b0: 7f 89 f8 00 cmpw cr7,r9,r31 ffc072b4: 40 9e ff 44 bne+ cr7,ffc071f8 <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) ffc072b8: 70 0b 00 08 andi. r11,r0,8 <== NOT EXECUTED ffc072bc: 40 82 00 4c bne- ffc07308 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc072c0: 81 3e 00 20 lwz r9,32(r30) <== NOT EXECUTED return 1; ffc072c4: 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; ffc072c8: 81 7e 00 1c lwz r11,28(r30) <== NOT EXECUTED ffc072cc: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED ffc072d0: 7f eb 49 ae stbx r31,r11,r9 <== NOT EXECUTED ffc072d4: 90 1e 00 20 stw r0,32(r30) <== NOT EXECUTED return 1; ffc072d8: 4b ff ff 5c b ffc07234 <== 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)) { ffc072dc: 70 09 00 40 andi. r9,r0,64 ffc072e0: 41 a2 ff 84 beq- ffc07264 <== ALWAYS TAKEN c = '\r'; ffc072e4: 3b e0 00 0d li r31,13 <== NOT EXECUTED ffc072e8: 4b ff ff 7c b ffc07264 <== NOT EXECUTED { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); ffc072ec: 39 29 00 20 addi r9,r9,32 ffc072f0: 4b ff fe ec b ffc071dc /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); ffc072f4: 7f e3 fb 78 mr r3,r31 ffc072f8: 7f c4 f3 78 mr r4,r30 ffc072fc: 4b ff fb 49 bl ffc06e44 ffc07300: 81 3e 00 20 lwz r9,32(r30) ffc07304: 4b ff ff 1c b ffc07220 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); ffc07308: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0730c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc07310: 4b ff fb 35 bl ffc06e44 <== NOT EXECUTED ffc07314: 4b ff ff ac b ffc072c0 <== 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); ffc07318: 7f c3 f3 78 mr r3,r30 ffc0731c: 38 80 00 01 li r4,1 ffc07320: 4b ff fb c9 bl ffc06ee8 return 0; ffc07324: 38 60 00 00 li r3,0 ffc07328: 4b ff ff 0c b ffc07234 } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) ffc0732c: 70 09 00 48 andi. r9,r0,72 ffc07330: 41 a2 00 10 beq+ ffc07340 <== NEVER TAKEN echo (c, tty); ffc07334: 38 60 00 0a li r3,10 ffc07338: 7f c4 f3 78 mr r4,r30 ffc0733c: 4b ff fb 09 bl ffc06e44 tty->cbuf[tty->ccount++] = c; ffc07340: 81 3e 00 20 lwz r9,32(r30) ffc07344: 39 40 00 0a li r10,10 ffc07348: 81 7e 00 1c lwz r11,28(r30) return 1; ffc0734c: 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; ffc07350: 38 09 00 01 addi r0,r9,1 ffc07354: 7d 4b 49 ae stbx r10,r11,r9 ffc07358: 90 1e 00 20 stw r0,32(r30) return 1; ffc0735c: 4b ff fe d8 b ffc07234 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); ffc07360: 7f c3 f3 78 mr r3,r30 ffc07364: 38 80 00 00 li r4,0 ffc07368: 4b ff fb 81 bl ffc06ee8 return 0; ffc0736c: 38 60 00 00 li r3,0 ffc07370: 4b ff fe c4 b ffc07234 =============================================================================== ffc27e10 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } ffc27e10: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc27e14: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc1780c : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc1780c: 94 21 ff f0 stwu r1,-16(r1) ffc17810: 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())) ffc17814: 3d 20 00 00 lis r9,0 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc17818: 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())) ffc1781c: 80 09 27 6c lwz r0,10092(r9) extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc17820: 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())) ffc17824: 2f 80 00 03 cmpwi cr7,r0,3 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc17828: 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())) ffc1782c: 41 9e 00 1c beq- cr7,ffc17848 <== ALWAYS TAKEN */ fclose (stdin); fclose (stdout); fclose (stderr); } ffc17830: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc17834: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc17838: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc1783c: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc17840: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc17844: 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) { ffc17848: 3f e0 00 00 lis r31,0 ffc1784c: 3d 20 00 00 lis r9,0 ffc17850: 80 1f 26 ac lwz r0,9900(r31) ffc17854: 83 c9 26 b0 lwz r30,9904(r9) ffc17858: 7f 80 f0 00 cmpw cr7,r0,r30 ffc1785c: 41 9e 00 10 beq- cr7,ffc1786c _wrapup_reent(_global_impure_ptr); ffc17860: 7f c3 f3 78 mr r3,r30 ffc17864: 48 00 08 45 bl ffc180a8 <_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; ffc17868: 93 df 26 ac stw r30,9900(r31) * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); ffc1786c: 80 7e 00 04 lwz r3,4(r30) ffc17870: 4b ff ac 8d bl ffc124fc fclose (stdout); ffc17874: 81 3f 26 ac lwz r9,9900(r31) ffc17878: 80 69 00 08 lwz r3,8(r9) ffc1787c: 4b ff ac 81 bl ffc124fc fclose (stderr); ffc17880: 81 3f 26 ac lwz r9,9900(r31) ffc17884: 80 69 00 0c lwz r3,12(r9) ffc17888: 4b ff ac 75 bl ffc124fc } ffc1788c: 80 01 00 14 lwz r0,20(r1) ffc17890: 83 c1 00 08 lwz r30,8(r1) ffc17894: 7c 08 03 a6 mtlr r0 ffc17898: 83 e1 00 0c lwz r31,12(r1) ffc1789c: 38 21 00 10 addi r1,r1,16 ffc178a0: 4e 80 00 20 blr =============================================================================== ffc17658 : off_t lseek( int fd, off_t offset, int whence ) { ffc17658: 94 21 ff e8 stwu r1,-24(r1) ffc1765c: 7c 08 02 a6 mflr r0 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc17660: 3d 20 00 00 lis r9,0 off_t lseek( int fd, off_t offset, int whence ) { ffc17664: 90 01 00 1c stw r0,28(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc17668: 80 09 26 4c lwz r0,9804(r9) off_t lseek( int fd, off_t offset, int whence ) { ffc1766c: 93 a1 00 0c stw r29,12(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc17670: 7f 83 00 40 cmplw cr7,r3,r0 off_t lseek( int fd, off_t offset, int whence ) { ffc17674: 93 c1 00 10 stw r30,16(r1) ffc17678: 93 e1 00 14 stw r31,20(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc1767c: 40 9c 01 4c bge- cr7,ffc177c8 iop = rtems_libio_iop( fd ); ffc17680: 3d 20 00 00 lis r9,0 ffc17684: 83 a9 27 0c lwz r29,9996(r9) ffc17688: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc1768c: 7f bd 1a 14 add r29,r29,r3 rtems_libio_check_is_open(iop); ffc17690: 80 1d 00 18 lwz r0,24(r29) ffc17694: 70 09 01 00 andi. r9,r0,256 ffc17698: 41 82 01 30 beq- ffc177c8 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { ffc1769c: 2f 87 00 01 cmpwi cr7,r7,1 /* * Now process the lseek(). */ old_offset = iop->offset; ffc176a0: 83 dd 00 10 lwz r30,16(r29) ffc176a4: 83 fd 00 14 lwz r31,20(r29) switch ( whence ) { ffc176a8: 41 9e 00 d4 beq- cr7,ffc1777c ffc176ac: 2f 87 00 02 cmpwi cr7,r7,2 ffc176b0: 41 9e 00 5c beq- cr7,ffc1770c ffc176b4: 2f 87 00 00 cmpwi cr7,r7,0 ffc176b8: 40 9e 00 d8 bne- cr7,ffc17790 case SEEK_SET: iop->offset = offset; ffc176bc: 90 bd 00 10 stw r5,16(r29) ffc176c0: 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 ); ffc176c4: 81 3d 00 24 lwz r9,36(r29) ffc176c8: 7f a3 eb 78 mr r3,r29 ffc176cc: 80 09 00 14 lwz r0,20(r9) ffc176d0: 7c 09 03 a6 mtctr r0 ffc176d4: 4e 80 04 21 bctrl ffc176d8: 7c 69 1b 78 mr r9,r3 if ( status == (off_t) -1 ) ffc176dc: 2f 89 ff ff cmpwi cr7,r9,-1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); ffc176e0: 7c 8a 23 78 mr r10,r4 if ( status == (off_t) -1 ) ffc176e4: 41 9e 00 64 beq- cr7,ffc17748 /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc176e8: 80 01 00 1c lwz r0,28(r1) ffc176ec: 7d 23 4b 78 mr r3,r9 ffc176f0: 7d 44 53 78 mr r4,r10 ffc176f4: 83 a1 00 0c lwz r29,12(r1) ffc176f8: 7c 08 03 a6 mtlr r0 ffc176fc: 83 c1 00 10 lwz r30,16(r1) ffc17700: 83 e1 00 14 lwz r31,20(r1) ffc17704: 38 21 00 18 addi r1,r1,24 ffc17708: 4e 80 00 20 blr case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; ffc1770c: 81 3d 00 08 lwz r9,8(r29) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); ffc17710: 7f a3 eb 78 mr r3,r29 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; ffc17714: 81 5d 00 0c lwz r10,12(r29) ffc17718: 7d 4a 30 14 addc r10,r10,r6 ffc1771c: 7d 29 29 14 adde r9,r9,r5 ffc17720: 91 3d 00 10 stw r9,16(r29) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); ffc17724: 81 3d 00 24 lwz r9,36(r29) case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; ffc17728: 91 5d 00 14 stw r10,20(r29) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); ffc1772c: 80 09 00 14 lwz r0,20(r9) ffc17730: 7c 09 03 a6 mtctr r0 ffc17734: 4e 80 04 21 bctrl ffc17738: 7c 69 1b 78 mr r9,r3 if ( status == (off_t) -1 ) ffc1773c: 2f 89 ff ff cmpwi cr7,r9,-1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); ffc17740: 7c 8a 23 78 mr r10,r4 if ( status == (off_t) -1 ) ffc17744: 40 9e ff a4 bne+ cr7,ffc176e8 ffc17748: 2f 84 ff ff cmpwi cr7,r4,-1 ffc1774c: 40 9e ff 9c bne+ cr7,ffc176e8 <== NEVER TAKEN /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc17750: 80 01 00 1c lwz r0,28(r1) ffc17754: 7d 23 4b 78 mr r3,r9 * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset; ffc17758: 93 dd 00 10 stw r30,16(r29) /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc1775c: 7d 44 53 78 mr r4,r10 ffc17760: 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; ffc17764: 93 fd 00 14 stw r31,20(r29) /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc17768: 83 c1 00 10 lwz r30,16(r1) ffc1776c: 83 a1 00 0c lwz r29,12(r1) ffc17770: 83 e1 00 14 lwz r31,20(r1) ffc17774: 38 21 00 18 addi r1,r1,24 ffc17778: 4e 80 00 20 blr case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; ffc1777c: 7d 46 f8 14 addc r10,r6,r31 ffc17780: 7d 25 f1 14 adde r9,r5,r30 ffc17784: 91 3d 00 10 stw r9,16(r29) ffc17788: 91 5d 00 14 stw r10,20(r29) break; ffc1778c: 4b ff ff 38 b ffc176c4 case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc17790: 4b ff ab cd bl ffc1235c <__errno> ffc17794: 38 00 00 16 li r0,22 ffc17798: 90 03 00 00 stw r0,0(r3) ffc1779c: 39 20 ff ff li r9,-1 ffc177a0: 39 40 ff ff li r10,-1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc177a4: 80 01 00 1c lwz r0,28(r1) ffc177a8: 7d 23 4b 78 mr r3,r9 ffc177ac: 7d 44 53 78 mr r4,r10 ffc177b0: 83 a1 00 0c lwz r29,12(r1) ffc177b4: 7c 08 03 a6 mtlr r0 ffc177b8: 83 c1 00 10 lwz r30,16(r1) ffc177bc: 83 e1 00 14 lwz r31,20(r1) ffc177c0: 38 21 00 18 addi r1,r1,24 ffc177c4: 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); ffc177c8: 4b ff ab 95 bl ffc1235c <__errno> ffc177cc: 38 00 00 09 li r0,9 ffc177d0: 90 03 00 00 stw r0,0(r3) ffc177d4: 39 20 ff ff li r9,-1 ffc177d8: 39 40 ff ff li r10,-1 ffc177dc: 4b ff ff 0c b ffc176e8 =============================================================================== ffc05098 : #include "malloc_p.h" void *malloc( size_t size ) { ffc05098: 94 21 ff f0 stwu r1,-16(r1) ffc0509c: 7c 08 02 a6 mflr r0 void *return_this; MSBUMP(malloc_calls, 1); ffc050a0: 3d 20 00 00 lis r9,0 #include "malloc_p.h" void *malloc( size_t size ) { ffc050a4: 90 01 00 14 stw r0,20(r1) void *return_this; MSBUMP(malloc_calls, 1); ffc050a8: 39 29 2a 48 addi r9,r9,10824 ffc050ac: 81 69 00 04 lwz r11,4(r9) #include "malloc_p.h" void *malloc( size_t size ) { ffc050b0: 93 c1 00 08 stw r30,8(r1) /* * Validate the parameters */ if ( !size ) return (void *) 0; ffc050b4: 3b c0 00 00 li r30,0 size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); ffc050b8: 39 6b 00 01 addi r11,r11,1 #include "malloc_p.h" void *malloc( size_t size ) { ffc050bc: 93 e1 00 0c stw r31,12(r1) ffc050c0: 7c 7f 1b 78 mr r31,r3 void *return_this; MSBUMP(malloc_calls, 1); ffc050c4: 91 69 00 04 stw r11,4(r9) /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); ffc050c8: 4b ff fe 49 bl ffc04f10 /* * Validate the parameters */ if ( !size ) ffc050cc: 2f 9f 00 00 cmpwi cr7,r31,0 ffc050d0: 41 9e 00 74 beq- cr7,ffc05144 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc050d4: 3d 20 00 00 lis r9,0 ffc050d8: 80 09 27 6c lwz r0,10092(r9) ffc050dc: 2f 80 00 03 cmpwi cr7,r0,3 ffc050e0: 41 9e 00 b0 beq- cr7,ffc05190 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc050e4: 3d 20 00 00 lis r9,0 ffc050e8: 80 69 26 64 lwz r3,9828(r9) ffc050ec: 7f e4 fb 78 mr r4,r31 ffc050f0: 38 a0 00 00 li r5,0 ffc050f4: 38 c0 00 00 li r6,0 ffc050f8: 48 00 60 e1 bl ffc0b1d8 <_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 ) { ffc050fc: 7c 7e 1b 79 mr. r30,r3 ffc05100: 41 82 00 60 beq- ffc05160 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) ffc05104: 3d 20 00 00 lis r9,0 ffc05108: 80 09 26 d0 lwz r0,9936(r9) ffc0510c: 2f 80 00 00 cmpwi cr7,r0,0 ffc05110: 41 9e 00 14 beq- cr7,ffc05124 (*rtems_malloc_dirty_helper)( return_this, size ); ffc05114: 7f c3 f3 78 mr r3,r30 ffc05118: 7c 09 03 a6 mtctr r0 ffc0511c: 7f e4 fb 78 mr r4,r31 ffc05120: 4e 80 04 21 bctrl /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc05124: 3d 20 00 00 lis r9,0 ffc05128: 81 29 26 c8 lwz r9,9928(r9) ffc0512c: 2f 89 00 00 cmpwi cr7,r9,0 ffc05130: 41 9e 00 14 beq- cr7,ffc05144 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); ffc05134: 80 09 00 04 lwz r0,4(r9) ffc05138: 7f c3 f3 78 mr r3,r30 ffc0513c: 7c 09 03 a6 mtctr r0 ffc05140: 4e 80 04 21 bctrl return return_this; } ffc05144: 80 01 00 14 lwz r0,20(r1) ffc05148: 7f c3 f3 78 mr r3,r30 ffc0514c: 83 e1 00 0c lwz r31,12(r1) ffc05150: 7c 08 03 a6 mtlr r0 ffc05154: 83 c1 00 08 lwz r30,8(r1) ffc05158: 38 21 00 10 addi r1,r1,16 ffc0515c: 4e 80 00 20 blr */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) ffc05160: 3d 20 00 00 lis r9,0 ffc05164: 81 29 26 cc lwz r9,9932(r9) ffc05168: 2f 89 00 00 cmpwi cr7,r9,0 ffc0516c: 41 9e 00 34 beq- cr7,ffc051a0 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); ffc05170: 80 09 00 04 lwz r0,4(r9) ffc05174: 7f e3 fb 78 mr r3,r31 ffc05178: 7c 09 03 a6 mtctr r0 ffc0517c: 4e 80 04 21 bctrl if ( !return_this ) { ffc05180: 2c 03 00 00 cmpwi r3,0 ffc05184: 41 82 00 1c beq- ffc051a0 <== ALWAYS TAKEN ffc05188: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ffc0518c: 4b ff ff 78 b ffc05104 <== NOT EXECUTED /* * 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() ) ffc05190: 4b ff fd 39 bl ffc04ec8 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc05194: 2f 83 00 00 cmpwi cr7,r3,0 ffc05198: 40 9e ff 4c bne+ cr7,ffc050e4 <== ALWAYS TAKEN ffc0519c: 4b ff ff a8 b ffc05144 <== NOT EXECUTED if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; ffc051a0: 48 00 d1 bd bl ffc1235c <__errno> ffc051a4: 38 00 00 0c li r0,12 ffc051a8: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc051ac: 4b ff ff 98 b ffc05144 =============================================================================== ffc054c4 : } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc054c4: 94 21 ff e8 stwu r1,-24(r1) ffc054c8: 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; ffc054cc: 3d 20 00 00 lis r9,0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc054d0: 90 01 00 1c stw r0,28(r1) * 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; ffc054d4: 80 09 27 40 lwz r0,10048(r9) } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc054d8: 93 c1 00 10 stw r30,16(r1) ffc054dc: 7c 7e 1b 78 mr r30,r3 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) ffc054e0: 2f 80 00 00 cmpwi cr7,r0,0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc054e4: 93 e1 00 14 stw r31,20(r1) */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; ffc054e8: 3b e0 00 00 li r31,0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc054ec: 93 81 00 08 stw r28,8(r1) ffc054f0: 93 a1 00 0c stw r29,12(r1) * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) ffc054f4: 40 9e 00 28 bne- cr7,ffc0551c <== ALWAYS TAKEN MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } ffc054f8: 80 01 00 1c lwz r0,28(r1) ffc054fc: 7f e3 fb 78 mr r3,r31 ffc05500: 83 81 00 08 lwz r28,8(r1) ffc05504: 7c 08 03 a6 mtlr r0 ffc05508: 83 a1 00 0c lwz r29,12(r1) ffc0550c: 83 c1 00 10 lwz r30,16(r1) ffc05510: 83 e1 00 14 lwz r31,20(r1) ffc05514: 38 21 00 18 addi r1,r1,24 ffc05518: 4e 80 00 20 blr sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); ffc0551c: 7f a3 02 14 add r29,r3,r0 ffc05520: 7f bd 03 96 divwu r29,r29,r0 ffc05524: 7f bd 01 d6 mullw r29,r29,r0 starting_address = (void *) sbrk(the_size); ffc05528: 7f a3 eb 78 mr r3,r29 ffc0552c: 4b ff af 91 bl ffc004bc if ( starting_address == (void*) -1 ) ffc05530: 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); ffc05534: 7c 64 1b 78 mr r4,r3 if ( starting_address == (void*) -1 ) ffc05538: 41 be ff c0 beq- cr7,ffc054f8 return (void *) 0; if ( !_Protected_heap_Extend( ffc0553c: 3f 80 00 00 lis r28,0 ffc05540: 80 7c 26 64 lwz r3,9828(r28) ffc05544: 7f a5 eb 78 mr r5,r29 ffc05548: 48 00 61 49 bl ffc0b690 <_Protected_heap_Extend> ffc0554c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05550: 41 9e 00 30 beq- cr7,ffc05580 sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); ffc05554: 3d 20 00 00 lis r9,0 ffc05558: 80 7c 26 64 lwz r3,9828(r28) ffc0555c: 80 09 2b c8 lwz r0,11208(r9) ffc05560: 7f c4 f3 78 mr r4,r30 ffc05564: 38 a0 00 00 li r5,0 ffc05568: 7c 1d 02 14 add r0,r29,r0 ffc0556c: 38 c0 00 00 li r6,0 ffc05570: 90 09 2b c8 stw r0,11208(r9) ffc05574: 48 00 60 b1 bl ffc0b624 <_Protected_heap_Allocate_aligned_with_boundary> ffc05578: 7c 7f 1b 78 mr r31,r3 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; ffc0557c: 4b ff ff 7c b ffc054f8 if ( starting_address == (void*) -1 ) return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); ffc05580: 7c 7d 00 d0 neg r3,r29 ffc05584: 4b ff af 39 bl ffc004bc errno = ENOMEM; ffc05588: 48 00 d6 61 bl ffc12be8 <__errno> ffc0558c: 38 00 00 0c li r0,12 ffc05590: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc05594: 4b ff ff 64 b ffc054f8 =============================================================================== ffc10b50 : */ void memfile_free_blocks_in_table( block_p **block_table, int entries ) { ffc10b50: 94 21 ff e0 stwu r1,-32(r1) ffc10b54: 7c 08 02 a6 mflr r0 ffc10b58: 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( ffc10b80: 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] ); ffc10b9c: 4b ff ff 85 bl ffc10b20 b[i] = 0; ffc10ba0: 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 ffc10bac: 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 ); ffc10bb0: 4b ff ff 71 bl ffc10b20 *block_table = 0; ffc10bb4: 38 00 00 00 li r0,0 ffc10bb8: 90 1b 00 00 stw r0,0(r27) } ffc10bbc: 80 01 00 24 lwz r0,36(r1) ffc10bc0: 83 61 00 0c lwz r27,12(r1) ffc10bc4: 7c 08 03 a6 mtlr r0 ffc10bc8: 83 81 00 10 lwz r28,16(r1) ffc10bcc: 83 a1 00 14 lwz r29,20(r1) ffc10bd0: 83 c1 00 18 lwz r30,24(r1) ffc10bd4: 83 e1 00 1c lwz r31,28(r1) ffc10bd8: 38 21 00 20 addi r1,r1,32 ffc10bdc: 4e 80 00 20 blr =============================================================================== ffc11330 : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { ffc11330: 94 21 ff e0 stwu r1,-32(r1) ffc11334: 7c 08 02 a6 mflr r0 ffc11338: 7c 69 1b 78 mr r9,r3 ffc1133c: 90 01 00 24 stw r0,36(r1) ffc11340: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc11344: 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 ) ffc11348: 80 1f 00 50 lwz r0,80(r31) ffc1134c: 7f 80 28 00 cmpw cr7,r0,r5 ffc11350: 41 9c 00 50 blt- cr7,ffc113a0 <== NEVER TAKEN ffc11354: 41 9e 00 40 beq- cr7,ffc11394 <== 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; ffc11358: 90 bf 00 50 stw r5,80(r31) iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); ffc1135c: 38 61 00 08 addi r3,r1,8 ffc11360: 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; ffc11364: 90 df 00 54 stw r6,84(r31) iop->size = the_jnode->info.file.size; ffc11368: 90 a9 00 08 stw r5,8(r9) ffc1136c: 90 c9 00 0c stw r6,12(r9) IMFS_update_atime( the_jnode ); ffc11370: 4b ff 39 d5 bl ffc04d44 ffc11374: 80 01 00 08 lwz r0,8(r1) return 0; ffc11378: 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 ); ffc1137c: 90 1f 00 40 stw r0,64(r31) return 0; } ffc11380: 80 01 00 24 lwz r0,36(r1) ffc11384: 83 e1 00 1c lwz r31,28(r1) ffc11388: 38 21 00 20 addi r1,r1,32 ffc1138c: 7c 08 03 a6 mtlr r0 ffc11390: 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 ) ffc11394: 80 1f 00 54 lwz r0,84(r31) ffc11398: 7f 80 30 40 cmplw cr7,r0,r6 ffc1139c: 40 9c ff bc bge+ cr7,ffc11358 return IMFS_memfile_extend( the_jnode, length ); ffc113a0: 7f e3 fb 78 mr r3,r31 ffc113a4: 4b ff fa 25 bl ffc10dc8 iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } ffc113a8: 80 01 00 24 lwz r0,36(r1) ffc113ac: 83 e1 00 1c lwz r31,28(r1) ffc113b0: 38 21 00 20 addi r1,r1,32 ffc113b4: 7c 08 03 a6 mtlr r0 ffc113b8: 4e 80 00 20 blr =============================================================================== ffc113bc : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc113bc: 94 21 ff f0 stwu r1,-16(r1) ffc113c0: 7c 08 02 a6 mflr r0 ffc113c4: 90 01 00 14 stw r0,20(r1) ffc113c8: 93 c1 00 08 stw r30,8(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc113cc: 83 c3 00 1c lwz r30,28(r3) rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc113d0: 93 e1 00 0c stw r31,12(r1) ffc113d4: 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) { ffc113d8: 80 1e 00 4c lwz r0,76(r30) ffc113dc: 2f 80 00 06 cmpwi cr7,r0,6 ffc113e0: 41 9e 00 54 beq- cr7,ffc11434 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 )) ffc113e4: 80 a3 00 10 lwz r5,16(r3) ffc113e8: 80 c3 00 14 lwz r6,20(r3) ffc113ec: 7f c3 f3 78 mr r3,r30 ffc113f0: 4b ff f9 d9 bl ffc10dc8 ffc113f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc113f8: 40 9e 00 90 bne- cr7,ffc11488 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; ffc113fc: 81 7e 00 50 lwz r11,80(r30) ffc11400: 81 9e 00 54 lwz r12,84(r30) ffc11404: 81 3f 00 10 lwz r9,16(r31) ffc11408: 81 5f 00 14 lwz r10,20(r31) ffc1140c: 91 7f 00 08 stw r11,8(r31) ffc11410: 91 9f 00 0c stw r12,12(r31) } return iop->offset; } ffc11414: 80 01 00 14 lwz r0,20(r1) ffc11418: 7d 23 4b 78 mr r3,r9 ffc1141c: 7d 44 53 78 mr r4,r10 ffc11420: 83 c1 00 08 lwz r30,8(r1) ffc11424: 7c 08 03 a6 mtlr r0 ffc11428: 83 e1 00 0c lwz r31,12(r1) ffc1142c: 38 21 00 10 addi r1,r1,16 ffc11430: 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) ffc11434: 81 23 00 10 lwz r9,16(r3) ffc11438: 80 1e 00 50 lwz r0,80(r30) ffc1143c: 81 43 00 14 lwz r10,20(r3) ffc11440: 7f 89 00 00 cmpw cr7,r9,r0 ffc11444: 81 7e 00 54 lwz r11,84(r30) ffc11448: 41 9d 00 10 bgt- cr7,ffc11458 <== NEVER TAKEN ffc1144c: 40 be ff c8 bne- cr7,ffc11414 <== NEVER TAKEN ffc11450: 7f 8a 58 40 cmplw cr7,r10,r11 ffc11454: 40 bd ff c0 ble- cr7,ffc11414 <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; ffc11458: 7c 09 03 78 mr r9,r0 <== NOT EXECUTED ffc1145c: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED ffc11460: 7d 6a 5b 78 mr r10,r11 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } ffc11464: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc11468: 7d 23 4b 78 mr r3,r9 <== 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; ffc1146c: 91 7f 00 14 stw r11,20(r31) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } ffc11470: 7d 44 53 78 mr r4,r10 <== NOT EXECUTED ffc11474: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc11478: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc1147c: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc11480: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc11484: 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 ); ffc11488: 48 00 0e d5 bl ffc1235c <__errno> ffc1148c: 38 00 00 1c li r0,28 ffc11490: 90 03 00 00 stw r0,0(r3) ffc11494: 39 20 ff ff li r9,-1 ffc11498: 39 40 ff ff li r10,-1 ffc1149c: 4b ff ff 78 b ffc11414 =============================================================================== ffc11250 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc11250: 94 21 ff f0 stwu r1,-16(r1) ffc11254: 7c 08 02 a6 mflr r0 ffc11258: 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)) ffc1125c: 80 03 00 18 lwz r0,24(r3) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc11260: 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)) ffc11264: 70 09 02 04 andi. r9,r0,516 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc11268: 93 e1 00 0c stw r31,12(r1) ffc1126c: 7c 7f 1b 78 mr r31,r3 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc11270: 83 c3 00 1c lwz r30,28(r3) /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc11274: 41 82 00 10 beq- ffc11284 && (the_jnode->type == IMFS_LINEAR_FILE)) { ffc11278: 81 3e 00 4c lwz r9,76(r30) ffc1127c: 2f 89 00 06 cmpwi cr7,r9,6 ffc11280: 41 9e 00 4c beq- cr7,ffc112cc <== 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)) ffc11284: 81 3e 00 50 lwz r9,80(r30) ffc11288: 81 5e 00 54 lwz r10,84(r30) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) ffc1128c: 70 0b 02 00 andi. r11,r0,512 ffc11290: 40 82 00 28 bne- ffc112b8 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; ffc11294: 91 3f 00 08 stw r9,8(r31) return 0; ffc11298: 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; ffc1129c: 91 5f 00 0c stw r10,12(r31) return 0; } ffc112a0: 80 01 00 14 lwz r0,20(r1) ffc112a4: 83 c1 00 08 lwz r30,8(r1) ffc112a8: 7c 08 03 a6 mtlr r0 ffc112ac: 83 e1 00 0c lwz r31,12(r1) ffc112b0: 38 21 00 10 addi r1,r1,16 ffc112b4: 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; ffc112b8: 91 3f 00 10 stw r9,16(r31) ffc112bc: 91 5f 00 14 stw r10,20(r31) ffc112c0: 81 3e 00 50 lwz r9,80(r30) ffc112c4: 81 5e 00 54 lwz r10,84(r30) ffc112c8: 4b ff ff cc b ffc11294 /* * 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; ffc112cc: 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; ffc112d0: 39 20 00 05 li r9,5 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; ffc112d4: 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; ffc112d8: 91 3e 00 4c stw r9,76(r30) <== 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) ffc112dc: 2f 88 00 00 cmpwi cr7,r8,0 <== NOT EXECUTED && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; ffc112e0: 39 20 00 00 li r9,0 <== 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; ffc112e4: 80 fe 00 58 lwz r7,88(r30) <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; ffc112e8: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc112ec: 91 3e 00 50 stw r9,80(r30) <== NOT EXECUTED ffc112f0: 91 5e 00 54 stw r10,84(r30) <== NOT EXECUTED the_jnode->info.file.indirect = 0; ffc112f4: 90 1e 00 58 stw r0,88(r30) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; ffc112f8: 90 1e 00 5c stw r0,92(r30) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; ffc112fc: 90 1e 00 60 stw r0,96(r30) <== NOT EXECUTED if ((count != 0) ffc11300: 40 9e 00 0c bne- cr7,ffc1130c <== NOT EXECUTED ffc11304: 80 03 00 18 lwz r0,24(r3) <== NOT EXECUTED ffc11308: 4b ff ff 84 b ffc1128c <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) ffc1130c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc11310: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc11314: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc11318: 4b ff fc 85 bl ffc10f9c <== NOT EXECUTED ffc1131c: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED return -1; ffc11320: 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)) ffc11324: 41 be ff 7c beq- cr7,ffc112a0 <== NOT EXECUTED ffc11328: 80 1f 00 18 lwz r0,24(r31) <== NOT EXECUTED ffc1132c: 4b ff ff 58 b ffc11284 <== NOT EXECUTED =============================================================================== ffc053ac : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc053ac: 7d 80 00 26 mfcr r12 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && ffc053b0: 2b 86 00 01 cmplwi cr7,r6,1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc053b4: 94 21 ff a0 stwu r1,-96(r1) ffc053b8: 7c 08 02 a6 mflr r0 ffc053bc: 93 01 00 40 stw r24,64(r1) ffc053c0: 7c b8 2b 78 mr r24,r5 ffc053c4: 93 41 00 48 stw r26,72(r1) ffc053c8: 7c da 33 78 mr r26,r6 ffc053cc: 93 61 00 4c stw r27,76(r1) ffc053d0: 7c 9b 23 78 mr r27,r4 ffc053d4: 93 81 00 50 stw r28,80(r1) ffc053d8: 7c 7c 1b 78 mr r28,r3 ffc053dc: 93 c1 00 58 stw r30,88(r1) ffc053e0: 7c fe 3b 78 mr r30,r7 ffc053e4: 90 01 00 64 stw r0,100(r1) ffc053e8: 92 61 00 2c stw r19,44(r1) ffc053ec: 92 81 00 30 stw r20,48(r1) ffc053f0: 92 a1 00 34 stw r21,52(r1) ffc053f4: 92 c1 00 38 stw r22,56(r1) ffc053f8: 92 e1 00 3c stw r23,60(r1) ffc053fc: 93 21 00 44 stw r25,68(r1) ffc05400: 93 a1 00 54 stw r29,84(r1) ffc05404: 93 e1 00 5c stw r31,92(r1) ffc05408: 91 81 00 28 stw r12,40(r1) /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && ffc0540c: 41 9d 02 a0 bgt- cr7,ffc056ac rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); ffc05410: 7c a3 2b 78 mr r3,r5 ffc05414: 48 00 9c 41 bl ffc0f054 if ( !mount_h ) ffc05418: 7c 7d 1b 79 mr. r29,r3 ffc0541c: 41 82 02 90 beq- ffc056ac { 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; ffc05420: 7f 60 00 34 cntlzw r0,r27 ffc05424: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc05428: 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 : "/"; ffc0542c: 2e 00 00 00 cmpwi cr4,r0,0 ffc05430: 41 92 02 68 beq- cr4,ffc05698 * 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( ffc05434: 7f 63 db 78 mr r3,r27 ffc05438: 48 00 e1 ad bl ffc135e4 ffc0543c: 7f 73 db 78 mr r19,r27 ffc05440: 7c 74 1b 78 mr r20,r3 ffc05444: 3a a3 00 01 addi r21,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; ffc05448: 7f 03 c3 78 mr r3,r24 ffc0544c: 48 00 e1 99 bl ffc135e4 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; ffc05450: 2f 9c 00 00 cmpwi cr7,r28,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; ffc05454: 3a e3 00 01 addi r23,r3,1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; ffc05458: 3b 20 00 00 li r25,0 ffc0545c: 41 9e 00 10 beq- cr7,ffc0546c ffc05460: 7f 83 e3 78 mr r3,r28 ffc05464: 48 00 e1 81 bl ffc135e4 ffc05468: 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; ffc0546c: 38 95 00 74 addi r4,r21,116 ffc05470: 7c 84 ba 14 add r4,r4,r23 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); ffc05474: 38 60 00 01 li r3,1 ffc05478: 7c 84 ca 14 add r4,r4,r25 ffc0547c: 4b ff f5 55 bl ffc049d0 if ( mt_entry != NULL ) { ffc05480: 7c 7f 1b 79 mr. r31,r3 ffc05484: 41 82 02 00 beq- ffc05684 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); ffc05488: 3a df 00 74 addi r22,r31,116 memcpy( str, filesystemtype, filesystemtype_size ); ffc0548c: 7e e5 bb 78 mr r5,r23 ffc05490: 7f 04 c3 78 mr r4,r24 ffc05494: 7e c3 b3 78 mr r3,r22 ffc05498: 48 00 db 25 bl ffc12fbc mt_entry->type = str; str += filesystemtype_size; ffc0549c: 7e f6 ba 14 add r23,r22,r23 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; ffc054a0: 92 df 00 6c stw r22,108(r31) str += filesystemtype_size; memcpy( str, source_or_null, source_size ); ffc054a4: 7f 25 cb 78 mr r5,r25 ffc054a8: 7f 84 e3 78 mr r4,r28 ffc054ac: 7e e3 bb 78 mr r3,r23 ffc054b0: 48 00 db 0d bl ffc12fbc mt_entry->dev = str; str += source_size; ffc054b4: 7f 37 ca 14 add r25,r23,r25 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; ffc054b8: 92 ff 00 70 stw r23,112(r31) str += source_size; memcpy( str, target, target_size ); ffc054bc: 7e 64 9b 78 mr r4,r19 ffc054c0: 7e a5 ab 78 mr r5,r21 ffc054c4: 7f 23 cb 78 mr r3,r25 ffc054c8: 48 00 da f5 bl ffc12fbc 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; ffc054cc: 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; ffc054d0: 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; ffc054d4: 38 7f 00 38 addi r3,r31,56 ffc054d8: 38 84 8f 0c addi r4,r4,-28916 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; ffc054dc: 93 ff 00 2c stw r31,44(r31) mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; ffc054e0: 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; ffc054e4: 93 5f 00 30 stw r26,48(r31) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; ffc054e8: 48 00 da d5 bl ffc12fbc /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { ffc054ec: 40 92 00 f0 bne- cr4,ffc055dc stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } ffc054f0: 3d 20 00 00 lis r9,0 ffc054f4: 39 69 21 6c addi r11,r9,8556 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { ffc054f8: 81 29 21 6c lwz r9,8556(r9) */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail( const Chain_Control *the_chain ) { return &the_chain->Tail.Node; ffc054fc: 38 0b 00 04 addi r0,r11,4 ffc05500: 7f 89 00 00 cmpw cr7,r9,r0 ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; ffc05504: 3b 80 00 00 li r28,0 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { ffc05508: 40 9e 01 b8 bne- cr7,ffc056c0 <== NEVER TAKEN * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { ffc0550c: 7f e3 fb 78 mr r3,r31 ffc05510: 7f a9 03 a6 mtctr r29 ffc05514: 7f c4 f3 78 mr r4,r30 ffc05518: 4e 80 04 21 bctrl ffc0551c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05520: 40 9e 01 bc bne- cr7,ffc056dc 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 ); ffc05524: 3f c0 00 00 lis r30,0 ffc05528: 80 7e 27 14 lwz r3,10004(r30) ffc0552c: 38 80 00 00 li r4,0 ffc05530: 38 a0 00 00 li r5,0 ffc05534: 48 00 39 4d bl ffc08e80 /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); ffc05538: 3c 60 00 00 lis r3,0 ffc0553c: 38 63 21 6c addi r3,r3,8556 ffc05540: 7f e4 fb 78 mr r4,r31 ffc05544: 48 00 47 25 bl ffc09c68 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc05548: 80 7e 27 14 lwz r3,10004(r30) ffc0554c: 48 00 3a bd bl ffc09008 rtems_libio_unlock(); if ( !has_target ) ffc05550: 41 92 00 54 beq- cr4,ffc055a4 rtems_filesystem_root = mt_entry->mt_fs_root; return 0; ffc05554: 38 60 00 00 li r3,0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } ffc05558: 80 01 00 64 lwz r0,100(r1) ffc0555c: 81 81 00 28 lwz r12,40(r1) ffc05560: 7c 08 03 a6 mtlr r0 ffc05564: 82 61 00 2c lwz r19,44(r1) ffc05568: 82 81 00 30 lwz r20,48(r1) ffc0556c: 7d 80 81 20 mtcrf 8,r12 ffc05570: 82 a1 00 34 lwz r21,52(r1) ffc05574: 82 c1 00 38 lwz r22,56(r1) ffc05578: 82 e1 00 3c lwz r23,60(r1) ffc0557c: 83 01 00 40 lwz r24,64(r1) ffc05580: 83 21 00 44 lwz r25,68(r1) ffc05584: 83 41 00 48 lwz r26,72(r1) ffc05588: 83 61 00 4c lwz r27,76(r1) ffc0558c: 83 81 00 50 lwz r28,80(r1) ffc05590: 83 a1 00 54 lwz r29,84(r1) ffc05594: 83 c1 00 58 lwz r30,88(r1) ffc05598: 83 e1 00 5c lwz r31,92(r1) ffc0559c: 38 21 00 60 addi r1,r1,96 ffc055a0: 4e 80 00 20 blr 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; ffc055a4: 3d 20 00 00 lis r9,0 ffc055a8: 80 ff 00 1c lwz r7,28(r31) ffc055ac: 81 29 26 a4 lwz r9,9892(r9) return 0; ffc055b0: 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; ffc055b4: 81 1f 00 20 lwz r8,32(r31) ffc055b8: 81 5f 00 24 lwz r10,36(r31) ffc055bc: 81 7f 00 28 lwz r11,40(r31) ffc055c0: 80 1f 00 2c lwz r0,44(r31) ffc055c4: 90 e9 00 18 stw r7,24(r9) ffc055c8: 91 09 00 1c stw r8,28(r9) ffc055cc: 91 49 00 20 stw r10,32(r9) ffc055d0: 91 69 00 24 stw r11,36(r9) ffc055d4: 90 09 00 28 stw r0,40(r9) ffc055d8: 4b ff ff 80 b ffc05558 * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( ffc055dc: 3b 81 00 08 addi r28,r1,8 ffc055e0: 7f 63 db 78 mr r3,r27 ffc055e4: 7e 84 a3 78 mr r4,r20 ffc055e8: 38 a0 00 07 li r5,7 ffc055ec: 7f 86 e3 78 mr r6,r28 ffc055f0: 38 e0 00 01 li r7,1 ffc055f4: 4b ff f5 01 bl ffc04af4 ffc055f8: 2f 83 ff ff cmpwi cr7,r3,-1 ffc055fc: 41 9e 00 d0 beq- cr7,ffc056cc <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { ffc05600: 81 21 00 14 lwz r9,20(r1) ffc05604: 7f 83 e3 78 mr r3,r28 ffc05608: 80 09 00 10 lwz r0,16(r9) ffc0560c: 7c 09 03 a6 mtctr r0 ffc05610: 4e 80 04 21 bctrl ffc05614: 2f 83 00 01 cmpwi cr7,r3,1 ffc05618: 40 9e 00 f0 bne- cr7,ffc05708 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { ffc0561c: 80 81 00 08 lwz r4,8(r1) ffc05620: 3c 60 ff c0 lis r3,-64 ffc05624: 38 63 52 e0 addi r3,r3,21216 ffc05628: 4b ff fc cd bl ffc052f4 ffc0562c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05630: 40 9e 00 e8 bne- cr7,ffc05718 * 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; ffc05634: 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 ) ) { ffc05638: 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; ffc0563c: 81 21 00 14 lwz r9,20(r1) * 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; ffc05640: 90 1f 00 08 stw r0,8(r31) mt_entry->mt_point_node.handlers = loc.handlers; ffc05644: 80 01 00 10 lwz r0,16(r1) mt_entry->mt_point_node.ops = loc.ops; ffc05648: 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; ffc0564c: 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; ffc05650: 80 01 00 18 lwz r0,24(r1) ffc05654: 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 ) ) { ffc05658: 80 09 00 20 lwz r0,32(r9) ffc0565c: 7c 09 03 a6 mtctr r0 ffc05660: 4e 80 04 21 bctrl ffc05664: 2f 83 00 00 cmpwi cr7,r3,0 ffc05668: 41 9e fe a4 beq+ cr7,ffc0550c <== ALWAYS TAKEN return 0; cleanup_and_bail: free( mt_entry ); ffc0566c: 7f e3 fb 78 mr r3,r31 ffc05670: 4b ff f6 0d bl ffc04c7c if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); ffc05674: 7f 83 e3 78 mr r3,r28 ffc05678: 4b ff f5 d9 bl ffc04c50 return -1; ffc0567c: 38 60 ff ff li r3,-1 ffc05680: 4b ff fe d8 b ffc05558 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); ffc05684: 48 00 cc d9 bl ffc1235c <__errno> <== NOT EXECUTED ffc05688: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc0568c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05690: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05694: 4b ff fe c4 b ffc05558 <== 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 : "/"; ffc05698: 3e 60 ff c2 lis r19,-62 ffc0569c: 3a a0 00 02 li r21,2 ffc056a0: 3a 80 00 01 li r20,1 ffc056a4: 3a 73 8e c8 addi r19,r19,-28984 ffc056a8: 4b ff fd a0 b ffc05448 /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc056ac: 48 00 cc b1 bl ffc1235c <__errno> ffc056b0: 38 00 00 16 li r0,22 ffc056b4: 90 03 00 00 stw r0,0(r3) ffc056b8: 38 60 ff ff li r3,-1 ffc056bc: 4b ff fe 9c b ffc05558 } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; ffc056c0: 48 00 cc 9d bl ffc1235c <__errno> <== NOT EXECUTED ffc056c4: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc056c8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); ffc056cc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc056d0: 4b ff f5 ad bl ffc04c7c <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; ffc056d4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc056d8: 4b ff fe 80 b ffc05558 <== NOT EXECUTED if ( (*mount_h)( mt_entry, data ) ) { /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); ffc056dc: 81 21 00 14 lwz r9,20(r1) ffc056e0: 7f e3 fb 78 mr r3,r31 ffc056e4: 80 09 00 28 lwz r0,40(r9) ffc056e8: 7c 09 03 a6 mtctr r0 ffc056ec: 4e 80 04 21 bctrl return 0; cleanup_and_bail: free( mt_entry ); ffc056f0: 7f e3 fb 78 mr r3,r31 ffc056f4: 4b ff f5 89 bl ffc04c7c if ( loc_to_free ) ffc056f8: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_filesystem_freenode( loc_to_free ); return -1; ffc056fc: 38 60 ff ff li r3,-1 cleanup_and_bail: free( mt_entry ); if ( loc_to_free ) ffc05700: 41 9e fe 58 beq+ cr7,ffc05558 <== NEVER TAKEN ffc05704: 4b ff ff 70 b ffc05674 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; ffc05708: 48 00 cc 55 bl ffc1235c <__errno> ffc0570c: 38 00 00 14 li r0,20 ffc05710: 90 03 00 00 stw r0,0(r3) goto cleanup_and_bail; ffc05714: 4b ff ff 58 b ffc0566c /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { errno = EBUSY; ffc05718: 48 00 cc 45 bl ffc1235c <__errno> ffc0571c: 38 00 00 10 li r0,16 ffc05720: 90 03 00 00 stw r0,0(r3) goto cleanup_and_bail; ffc05724: 4b ff ff 48 b ffc0566c =============================================================================== ffc058f4 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc058f4: 94 21 ff e0 stwu r1,-32(r1) ffc058f8: 7c 08 02 a6 mflr r0 ffc058fc: 93 e1 00 1c stw r31,28(r1) int rv = -1; if (target != NULL) { ffc05900: 7c 9f 23 79 mr. r31,r4 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc05904: 93 61 00 0c stw r27,12(r1) ffc05908: 7c bb 2b 78 mr r27,r5 ffc0590c: 93 81 00 10 stw r28,16(r1) ffc05910: 7c dc 33 78 mr r28,r6 ffc05914: 93 a1 00 14 stw r29,20(r1) ffc05918: 7c fd 3b 78 mr r29,r7 ffc0591c: 93 c1 00 18 stw r30,24(r1) ffc05920: 7c 7e 1b 78 mr r30,r3 ffc05924: 90 01 00 24 stw r0,36(r1) int rv = -1; if (target != NULL) { ffc05928: 41 82 00 78 beq- ffc059a0 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); ffc0592c: 7f e3 fb 78 mr r3,r31 ffc05930: 38 80 01 ff li r4,511 ffc05934: 48 00 0b e1 bl ffc06514 if (rv == 0) { ffc05938: 2c 03 00 00 cmpwi r3,0 ffc0593c: 41 82 00 28 beq- ffc05964 <== ALWAYS TAKEN } else { errno = EINVAL; } return rv; } ffc05940: 80 01 00 24 lwz r0,36(r1) ffc05944: 83 61 00 0c lwz r27,12(r1) ffc05948: 7c 08 03 a6 mtlr r0 ffc0594c: 83 81 00 10 lwz r28,16(r1) ffc05950: 83 a1 00 14 lwz r29,20(r1) ffc05954: 83 c1 00 18 lwz r30,24(r1) ffc05958: 83 e1 00 1c lwz r31,28(r1) ffc0595c: 38 21 00 20 addi r1,r1,32 ffc05960: 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( ffc05964: 7f c3 f3 78 mr r3,r30 ffc05968: 7f e4 fb 78 mr r4,r31 ffc0596c: 7f 65 db 78 mr r5,r27 ffc05970: 7f 86 e3 78 mr r6,r28 ffc05974: 7f a7 eb 78 mr r7,r29 ffc05978: 48 00 01 09 bl ffc05a80 } else { errno = EINVAL; } return rv; } ffc0597c: 80 01 00 24 lwz r0,36(r1) ffc05980: 83 61 00 0c lwz r27,12(r1) ffc05984: 7c 08 03 a6 mtlr r0 ffc05988: 83 81 00 10 lwz r28,16(r1) ffc0598c: 83 a1 00 14 lwz r29,20(r1) ffc05990: 83 c1 00 18 lwz r30,24(r1) ffc05994: 83 e1 00 1c lwz r31,28(r1) ffc05998: 38 21 00 20 addi r1,r1,32 ffc0599c: 4e 80 00 20 blr options, data ); } } else { errno = EINVAL; ffc059a0: 48 00 ce 19 bl ffc127b8 <__errno> ffc059a4: 38 00 00 16 li r0,22 ffc059a8: 90 03 00 00 stw r0,0(r3) const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; ffc059ac: 38 60 ff ff li r3,-1 ffc059b0: 4b ff ff 90 b ffc05940 =============================================================================== ffc05998 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { ffc05998: 7d 80 00 26 mfcr r12 /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ffc0599c: 7e 03 20 00 cmpw cr4,r3,r4 void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { ffc059a0: 94 21 ff e8 stwu r1,-24(r1) ffc059a4: 7c 08 02 a6 mflr r0 ffc059a8: 93 c1 00 10 stw r30,16(r1) ffc059ac: 7c 9e 23 78 mr r30,r4 ffc059b0: 90 01 00 1c stw r0,28(r1) ffc059b4: 93 e1 00 14 stw r31,20(r1) ffc059b8: 91 81 00 0c stw r12,12(r1) /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ffc059bc: 41 92 00 8c beq- cr4,ffc05a48 ptr = _REENT; } else { ptr = deleted_task->libc_reent; ffc059c0: 83 e4 01 28 lwz r31,296(r4) } if (ptr && ptr != _global_impure_ptr) { ffc059c4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc059c8: 41 9e 00 2c beq- cr7,ffc059f4 <== NEVER TAKEN ffc059cc: 3d 20 00 00 lis r9,0 ffc059d0: 80 09 26 b0 lwz r0,9904(r9) ffc059d4: 7f 9f 00 00 cmpw cr7,r31,r0 ffc059d8: 41 9e 00 1c beq- cr7,ffc059f4 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); ffc059dc: 3c 80 ff c0 lis r4,-64 ffc059e0: 7f e3 fb 78 mr r3,r31 ffc059e4: 38 84 57 2c addi r4,r4,22316 ffc059e8: 48 00 d3 d1 bl ffc12db8 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); ffc059ec: 7f e3 fb 78 mr r3,r31 ffc059f0: 48 00 7c 39 bl ffc0d628 <_Workspace_Free> #endif } deleted_task->libc_reent = NULL; ffc059f4: 38 00 00 00 li r0,0 ffc059f8: 90 1e 01 28 stw r0,296(r30) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { ffc059fc: 41 92 00 24 beq- cr4,ffc05a20 _REENT = 0; } } ffc05a00: 80 01 00 1c lwz r0,28(r1) ffc05a04: 81 81 00 0c lwz r12,12(r1) ffc05a08: 7c 08 03 a6 mtlr r0 ffc05a0c: 83 c1 00 10 lwz r30,16(r1) ffc05a10: 83 e1 00 14 lwz r31,20(r1) ffc05a14: 7d 80 81 20 mtcrf 8,r12 ffc05a18: 38 21 00 18 addi r1,r1,24 ffc05a1c: 4e 80 00 20 blr /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; ffc05a20: 3d 20 00 00 lis r9,0 } } ffc05a24: 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; ffc05a28: 90 09 26 ac stw r0,9900(r9) } } ffc05a2c: 7d 80 81 20 mtcrf 8,r12 ffc05a30: 80 01 00 1c lwz r0,28(r1) ffc05a34: 83 c1 00 10 lwz r30,16(r1) ffc05a38: 7c 08 03 a6 mtlr r0 ffc05a3c: 83 e1 00 14 lwz r31,20(r1) ffc05a40: 38 21 00 18 addi r1,r1,24 ffc05a44: 4e 80 00 20 blr /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; ffc05a48: 3d 20 00 00 lis r9,0 ffc05a4c: 83 e9 26 ac lwz r31,9900(r9) ffc05a50: 4b ff ff 74 b ffc059c4 =============================================================================== ffc0572c : */ int newlib_free_buffers( FILE *fp ) { ffc0572c: 94 21 ff f0 stwu r1,-16(r1) ffc05730: 7c 08 02 a6 mflr r0 ffc05734: 93 e1 00 0c stw r31,12(r1) ffc05738: 7c 7f 1b 78 mr r31,r3 ffc0573c: 90 01 00 14 stw r0,20(r1) switch ( fileno(fp) ) { ffc05740: 48 00 d1 01 bl ffc12840 ffc05744: 2b 83 00 02 cmplwi cr7,r3,2 ffc05748: 40 9d 00 24 ble- cr7,ffc0576c <== ALWAYS TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); ffc0574c: 7f e3 fb 78 mr r3,r31 ffc05750: 48 00 cd ad bl ffc124fc <== NOT EXECUTED } return 0; } ffc05754: 80 01 00 14 lwz r0,20(r1) ffc05758: 38 60 00 00 li r3,0 ffc0575c: 83 e1 00 0c lwz r31,12(r1) ffc05760: 38 21 00 10 addi r1,r1,16 ffc05764: 7c 08 03 a6 mtlr r0 ffc05768: 4e 80 00 20 blr { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { ffc0576c: a0 1f 00 0c lhz r0,12(r31) ffc05770: 70 09 00 80 andi. r9,r0,128 ffc05774: 41 82 ff e0 beq+ ffc05754 <== ALWAYS TAKEN free( fp->_bf._base ); ffc05778: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc0577c: 4b ff f5 01 bl ffc04c7c <== NOT EXECUTED fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; ffc05780: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc05784: 90 1f 00 00 stw r0,0(r31) <== NOT EXECUTED break; default: fclose(fp); } return 0; } ffc05788: 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; ffc0578c: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED break; default: fclose(fp); } return 0; } ffc05790: 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; ffc05794: a1 3f 00 0c lhz r9,12(r31) <== NOT EXECUTED break; default: fclose(fp); } return 0; } ffc05798: 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; ffc0579c: 55 29 06 6e rlwinm r9,r9,0,25,23 <== NOT EXECUTED ffc057a0: b1 3f 00 0c sth r9,12(r31) <== NOT EXECUTED break; default: fclose(fp); } return 0; } ffc057a4: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc057a8: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc057ac: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05aec : int open( const char *pathname, int flags, ... ) { ffc05aec: 94 21 ff b0 stwu r1,-80(r1) ffc05af0: 7c 08 02 a6 mflr r0 ffc05af4: 7d 80 00 26 mfcr r12 ffc05af8: 90 01 00 54 stw r0,84(r1) /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; ffc05afc: 38 04 00 01 addi r0,r4,1 if ( ( status & _FREAD ) == _FREAD ) ffc05b00: 70 09 00 01 andi. r9,r0,1 int open( const char *pathname, int flags, ... ) { ffc05b04: 93 41 00 38 stw r26,56(r1) int eval_flags; /* * Set the Evaluation flags */ eval_flags = 0; ffc05b08: 3b 40 00 00 li r26,0 int open( const char *pathname, int flags, ... ) { ffc05b0c: 93 a1 00 44 stw r29,68(r1) ffc05b10: 7c 7d 1b 78 mr r29,r3 ffc05b14: 93 c1 00 48 stw r30,72(r1) ffc05b18: 7c 9e 23 78 mr r30,r4 ffc05b1c: 93 21 00 34 stw r25,52(r1) ffc05b20: 93 61 00 3c stw r27,60(r1) ffc05b24: 93 81 00 40 stw r28,64(r1) ffc05b28: 93 e1 00 4c stw r31,76(r1) ffc05b2c: 91 81 00 30 stw r12,48(r1) ffc05b30: 90 a1 00 28 stw r5,40(r1) /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) ffc05b34: 41 82 00 08 beq- ffc05b3c eval_flags |= RTEMS_LIBIO_PERMS_READ; ffc05b38: 3b 40 00 04 li r26,4 if ( ( status & _FWRITE ) == _FWRITE ) ffc05b3c: 70 09 00 02 andi. r9,r0,2 ffc05b40: 41 82 00 08 beq- ffc05b48 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; ffc05b44: 63 5a 00 02 ori r26,r26,2 va_start(ap, flags); ffc05b48: 38 01 00 58 addi r0,r1,88 ffc05b4c: 39 21 00 20 addi r9,r1,32 ffc05b50: 90 01 00 0c stw r0,12(r1) mode = va_arg( ap, int ); ffc05b54: 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); ffc05b58: 91 21 00 10 stw r9,16(r1) mode = va_arg( ap, int ); ffc05b5c: 98 01 00 08 stb r0,8(r1) ffc05b60: 83 69 00 08 lwz r27,8(r9) * 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(); ffc05b64: 48 00 90 b1 bl ffc0ec14 if ( iop == 0 ) { ffc05b68: 2e 03 00 00 cmpwi cr4,r3,0 ffc05b6c: 7c 7f 1b 78 mr r31,r3 ffc05b70: 41 92 00 e8 beq- cr4,ffc05c58 } /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( ffc05b74: 7f a3 eb 78 mr r3,r29 ffc05b78: 48 00 da 6d bl ffc135e4 ffc05b7c: 3b 81 00 14 addi r28,r1,20 ffc05b80: 7c 64 1b 78 mr r4,r3 ffc05b84: 7f 45 d3 78 mr r5,r26 ffc05b88: 7f a3 eb 78 mr r3,r29 ffc05b8c: 7f 86 e3 78 mr r6,r28 ffc05b90: 38 e0 00 01 li r7,1 ffc05b94: 4b ff ef 61 bl ffc04af4 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { ffc05b98: 2f 83 ff ff cmpwi cr7,r3,-1 ffc05b9c: 41 9e 01 14 beq- cr7,ffc05cb0 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { ffc05ba0: 73 c0 0a 00 andi. r0,r30,2560 ffc05ba4: 2f 80 0a 00 cmpwi cr7,r0,2560 ffc05ba8: 41 9e 00 c4 beq- cr7,ffc05c6c /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); ffc05bac: 7f c3 f3 78 mr r3,r30 ffc05bb0: 83 5f 00 18 lwz r26,24(r31) ffc05bb4: 48 00 8f b1 bl ffc0eb64 iop->pathinfo = loc; ffc05bb8: 80 01 00 14 lwz r0,20(r1) ffc05bbc: 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 ); ffc05bc0: 7c 63 d3 78 or r3,r3,r26 iop->pathinfo = loc; ffc05bc4: 90 1f 00 1c stw r0,28(r31) rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); ffc05bc8: 7f a4 eb 78 mr r4,r29 ffc05bcc: 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; ffc05bd0: 80 01 00 18 lwz r0,24(r1) rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); ffc05bd4: 7f 66 db 78 mr r6,r27 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); ffc05bd8: 90 7f 00 18 stw r3,24(r31) iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); ffc05bdc: 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; ffc05be0: 90 1f 00 20 stw r0,32(r31) ffc05be4: 80 01 00 20 lwz r0,32(r1) ffc05be8: 91 3f 00 24 stw r9,36(r31) ffc05bec: 90 1f 00 28 stw r0,40(r31) ffc05bf0: 80 01 00 24 lwz r0,36(r1) ffc05bf4: 90 1f 00 2c stw r0,44(r31) rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); ffc05bf8: 80 09 00 00 lwz r0,0(r9) ffc05bfc: 7c 09 03 a6 mtctr r0 ffc05c00: 4e 80 04 21 bctrl if ( rc ) { ffc05c04: 2f 83 00 00 cmpwi cr7,r3,0 ffc05c08: 40 9e 00 8c bne- cr7,ffc05c94 } /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { ffc05c0c: 73 c0 04 00 andi. r0,r30,1024 ffc05c10: 3f c0 00 00 lis r30,0 ffc05c14: 40 82 00 c0 bne- ffc05cd4 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; ffc05c18: 80 7e 27 0c lwz r3,9996(r30) ffc05c1c: 7f e3 f8 50 subf r31,r3,r31 ffc05c20: 7f e3 36 70 srawi r3,r31,6 } ffc05c24: 80 01 00 54 lwz r0,84(r1) ffc05c28: 81 81 00 30 lwz r12,48(r1) ffc05c2c: 7c 08 03 a6 mtlr r0 ffc05c30: 83 21 00 34 lwz r25,52(r1) ffc05c34: 83 41 00 38 lwz r26,56(r1) ffc05c38: 7d 80 81 20 mtcrf 8,r12 ffc05c3c: 83 61 00 3c lwz r27,60(r1) ffc05c40: 83 81 00 40 lwz r28,64(r1) ffc05c44: 83 a1 00 44 lwz r29,68(r1) ffc05c48: 83 c1 00 48 lwz r30,72(r1) ffc05c4c: 83 e1 00 4c lwz r31,76(r1) ffc05c50: 38 21 00 50 addi r1,r1,80 ffc05c54: 4e 80 00 20 blr */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { rc = ENFILE; ffc05c58: 3b 20 00 17 li r25,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 ); ffc05c5c: 48 00 c7 01 bl ffc1235c <__errno> ffc05c60: 93 23 00 00 stw r25,0(r3) ffc05c64: 38 60 ff ff li r3,-1 ffc05c68: 4b ff ff bc b ffc05c24 } } 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; ffc05c6c: 7f 9a e3 78 mr r26,r28 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; ffc05c70: 3b 20 00 11 li r25,17 */ done: va_end(ap); if ( rc ) { if ( iop ) ffc05c74: 41 92 00 0c beq- cr4,ffc05c80 rtems_libio_free( iop ); ffc05c78: 7f e3 fb 78 mr r3,r31 ffc05c7c: 48 00 90 6d bl ffc0ece8 if ( loc_to_free ) ffc05c80: 2f 9a 00 00 cmpwi cr7,r26,0 ffc05c84: 41 be ff d8 beq- cr7,ffc05c5c rtems_filesystem_freenode( loc_to_free ); ffc05c88: 7f 43 d3 78 mr r3,r26 ffc05c8c: 4b ff ef c5 bl ffc04c50 ffc05c90: 4b ff ff cc b ffc05c5c iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; ffc05c94: 48 00 c6 c9 bl ffc1235c <__errno> rc = EEXIST; loc_to_free = &loc; goto done; } loc_to_free = &loc; ffc05c98: 7f 9a e3 78 mr r26,r28 iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; ffc05c9c: 83 23 00 00 lwz r25,0(r3) ffc05ca0: 2e 19 00 00 cmpwi cr4,r25,0 * Single exit and clean up path. */ done: va_end(ap); if ( rc ) { ffc05ca4: 40 92 00 fc bne- cr4,ffc05da0 <== ALWAYS TAKEN ffc05ca8: 3f c0 00 00 lis r30,0 <== NOT EXECUTED ffc05cac: 4b ff ff 6c b ffc05c18 <== NOT EXECUTED */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { ffc05cb0: 48 00 c6 ad bl ffc1235c <__errno> ffc05cb4: 80 03 00 00 lwz r0,0(r3) ffc05cb8: 2f 80 00 02 cmpwi cr7,r0,2 ffc05cbc: 41 9e 00 68 beq- cr7,ffc05d24 rc = errno; ffc05cc0: 48 00 c6 9d bl ffc1235c <__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; ffc05cc4: 3b 40 00 00 li r26,0 status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { rc = errno; ffc05cc8: 83 23 00 00 lwz r25,0(r3) ffc05ccc: 2e 19 00 00 cmpwi cr4,r25,0 goto done; ffc05cd0: 4b ff ff d4 b ffc05ca4 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); ffc05cd4: 80 7e 27 0c lwz r3,9996(r30) ffc05cd8: 38 a0 00 00 li r5,0 ffc05cdc: 38 c0 00 00 li r6,0 ffc05ce0: 7c 63 f8 50 subf r3,r3,r31 ffc05ce4: 7c 63 36 70 srawi r3,r3,6 ffc05ce8: 48 00 8d 71 bl ffc0ea58 if ( rc ) { ffc05cec: 2e 03 00 00 cmpwi cr4,r3,0 ffc05cf0: 7c 79 1b 78 mr r25,r3 ffc05cf4: 41 92 ff 24 beq+ cr4,ffc05c18 if(errno) rc = errno; ffc05cf8: 48 00 c6 65 bl ffc1235c <__errno> ffc05cfc: 80 03 00 00 lwz r0,0(r3) ffc05d00: 2f 80 00 00 cmpwi cr7,r0,0 ffc05d04: 40 9e 00 5c bne- cr7,ffc05d60 <== ALWAYS TAKEN close( iop - rtems_libio_iops ); ffc05d08: 80 7e 27 0c lwz r3,9996(r30) /* those are released by close(): */ iop = 0; loc_to_free = NULL; ffc05d0c: 3b 40 00 00 li r26,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 ); ffc05d10: 7c 63 f8 50 subf r3,r3,r31 ffc05d14: 7c 63 36 70 srawi r3,r3,6 ffc05d18: 48 00 8c a1 bl ffc0e9b8 /* those are released by close(): */ iop = 0; ffc05d1c: 3b e0 00 00 li r31,0 ffc05d20: 4b ff ff 84 b ffc05ca4 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { ffc05d24: 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; ffc05d28: 3b 40 00 00 li r26,0 goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { rc = ENOENT; ffc05d2c: 3b 20 00 02 li r25,2 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { ffc05d30: 41 82 ff 44 beq+ ffc05c74 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); ffc05d34: 7f a3 eb 78 mr r3,r29 ffc05d38: 63 64 80 00 ori r4,r27,32768 ffc05d3c: 38 a0 00 00 li r5,0 ffc05d40: 38 c0 00 00 li r6,0 ffc05d44: 4b ff f4 99 bl ffc051dc if ( rc ) { ffc05d48: 2f 83 00 00 cmpwi cr7,r3,0 ffc05d4c: 41 9e 00 24 beq- cr7,ffc05d70 <== ALWAYS TAKEN rc = errno; ffc05d50: 48 00 c6 0d bl ffc1235c <__errno> <== NOT EXECUTED ffc05d54: 83 23 00 00 lwz r25,0(r3) <== NOT EXECUTED ffc05d58: 2e 19 00 00 cmpwi cr4,r25,0 <== NOT EXECUTED goto done; ffc05d5c: 4b ff ff 48 b ffc05ca4 <== 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; ffc05d60: 48 00 c5 fd bl ffc1235c <__errno> ffc05d64: 83 23 00 00 lwz r25,0(r3) ffc05d68: 2e 19 00 00 cmpwi cr4,r25,0 ffc05d6c: 4b ff ff 9c b ffc05d08 /* * 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( ffc05d70: 7f a3 eb 78 mr r3,r29 ffc05d74: 48 00 d8 71 bl ffc135e4 ffc05d78: 38 a0 00 00 li r5,0 ffc05d7c: 7c 64 1b 78 mr r4,r3 ffc05d80: 7f 86 e3 78 mr r6,r28 ffc05d84: 7f a3 eb 78 mr r3,r29 ffc05d88: 38 e0 00 01 li r7,1 ffc05d8c: 4b ff ed 69 bl ffc04af4 pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ rc = EACCES; ffc05d90: 3b 20 00 0d li r25,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 */ ffc05d94: 2f 83 00 00 cmpwi cr7,r3,0 ffc05d98: 40 be fe dc bne- cr7,ffc05c74 <== NEVER TAKEN ffc05d9c: 4b ff fe 10 b ffc05bac ffc05da0: 2e 1f 00 00 cmpwi cr4,r31,0 ffc05da4: 4b ff fe d0 b ffc05c74 =============================================================================== ffc06cac : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { ffc06cac: 94 21 ff e8 stwu r1,-24(r1) ffc06cb0: 7c 08 02 a6 mflr r0 ffc06cb4: 90 01 00 1c stw r0,28(r1) int i; if (tty->termios.c_oflag & OPOST) { ffc06cb8: 80 04 00 34 lwz r0,52(r4) /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { ffc06cbc: 93 e1 00 14 stw r31,20(r1) ffc06cc0: 7c 9f 23 78 mr r31,r4 int i; if (tty->termios.c_oflag & OPOST) { ffc06cc4: 70 09 00 01 andi. r9,r0,1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { ffc06cc8: 98 61 00 08 stb r3,8(r1) int i; if (tty->termios.c_oflag & OPOST) { ffc06ccc: 41 82 00 50 beq- ffc06d1c <== NEVER TAKEN switch (c) { ffc06cd0: 2f 83 00 09 cmpwi cr7,r3,9 ffc06cd4: 41 9e 00 fc beq- cr7,ffc06dd0 ffc06cd8: 2b 83 00 09 cmplwi cr7,r3,9 ffc06cdc: 40 9d 00 64 ble- cr7,ffc06d40 <== NEVER TAKEN ffc06ce0: 2f 83 00 0a cmpwi cr7,r3,10 ffc06ce4: 41 9e 00 7c beq- cr7,ffc06d60 ffc06ce8: 2f 83 00 0d cmpwi cr7,r3,13 ffc06cec: 41 9e 00 ac beq- cr7,ffc06d98 <== NEVER TAKEN if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) ffc06cf0: 70 09 00 02 andi. r9,r0,2 ffc06cf4: 40 82 01 00 bne- ffc06df4 <== NEVER TAKEN ffc06cf8: 3d 20 00 00 lis r9,0 ffc06cfc: 80 09 26 a8 lwz r0,9896(r9) c = toupper(c); if (!iscntrl(c)) ffc06d00: 7c 60 1a 14 add r3,r0,r3 ffc06d04: 88 03 00 01 lbz r0,1(r3) ffc06d08: 70 09 00 20 andi. r9,r0,32 ffc06d0c: 40 82 00 10 bne- ffc06d1c <== NEVER TAKEN tty->column++; ffc06d10: 81 3f 00 28 lwz r9,40(r31) ffc06d14: 38 09 00 01 addi r0,r9,1 ffc06d18: 90 1f 00 28 stw r0,40(r31) break; } } rtems_termios_puts (&c, 1, tty); ffc06d1c: 38 61 00 08 addi r3,r1,8 ffc06d20: 38 80 00 01 li r4,1 ffc06d24: 7f e5 fb 78 mr r5,r31 ffc06d28: 4b ff fd fd bl ffc06b24 } ffc06d2c: 80 01 00 1c lwz r0,28(r1) ffc06d30: 83 e1 00 14 lwz r31,20(r1) ffc06d34: 38 21 00 18 addi r1,r1,24 ffc06d38: 7c 08 03 a6 mtlr r0 ffc06d3c: 4e 80 00 20 blr oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { ffc06d40: 2f 83 00 08 cmpwi cr7,r3,8 <== NOT EXECUTED ffc06d44: 40 9e ff ac bne+ cr7,ffc06cf0 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) ffc06d48: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED ffc06d4c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc06d50: 40 bd ff cc ble- cr7,ffc06d1c <== NOT EXECUTED tty->column--; ffc06d54: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc06d58: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED ffc06d5c: 4b ff ff c0 b ffc06d1c <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) ffc06d60: 70 09 00 20 andi. r9,r0,32 ffc06d64: 41 82 00 0c beq- ffc06d70 <== ALWAYS TAKEN tty->column = 0; ffc06d68: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc06d6c: 91 24 00 28 stw r9,40(r4) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { ffc06d70: 70 09 00 04 andi. r9,r0,4 ffc06d74: 41 82 ff a8 beq+ ffc06d1c <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); ffc06d78: 3c 60 ff c2 lis r3,-62 ffc06d7c: 38 63 8f 40 addi r3,r3,-28864 ffc06d80: 38 80 00 01 li r4,1 ffc06d84: 7f e5 fb 78 mr r5,r31 ffc06d88: 4b ff fd 9d bl ffc06b24 tty->column = 0; ffc06d8c: 38 00 00 00 li r0,0 ffc06d90: 90 1f 00 28 stw r0,40(r31) ffc06d94: 4b ff ff 88 b ffc06d1c } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) ffc06d98: 70 09 00 10 andi. r9,r0,16 <== NOT EXECUTED ffc06d9c: 41 82 00 10 beq- ffc06dac <== NOT EXECUTED ffc06da0: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED ffc06da4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc06da8: 41 be ff 84 beq- cr7,ffc06d2c <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { ffc06dac: 70 09 00 08 andi. r9,r0,8 <== NOT EXECUTED ffc06db0: 41 a2 ff a8 beq- ffc06d58 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) ffc06db4: 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'; ffc06db8: 38 00 00 0a li r0,10 <== NOT EXECUTED ffc06dbc: 98 01 00 08 stb r0,8(r1) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) ffc06dc0: 41 a2 ff 5c beq- ffc06d1c <== NOT EXECUTED tty->column = 0; ffc06dc4: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc06dc8: 90 1f 00 28 stw r0,40(r31) <== NOT EXECUTED ffc06dcc: 4b ff ff 50 b ffc06d1c <== NOT EXECUTED tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { ffc06dd0: 54 00 04 e8 rlwinm r0,r0,0,19,20 ffc06dd4: 2f 80 18 00 cmpwi cr7,r0,6144 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); ffc06dd8: 80 04 00 28 lwz r0,40(r4) ffc06ddc: 54 04 07 7e clrlwi r4,r0,29 ffc06de0: 20 84 00 08 subfic r4,r4,8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { ffc06de4: 41 9e 00 44 beq- cr7,ffc06e28 <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; ffc06de8: 7c 84 02 14 add r4,r4,r0 <== NOT EXECUTED ffc06dec: 90 9f 00 28 stw r4,40(r31) <== NOT EXECUTED break; ffc06df0: 4b ff ff 2c b ffc06d1c <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); ffc06df4: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc06df8: 80 09 26 a8 lwz r0,9896(r9) <== NOT EXECUTED ffc06dfc: 7c 69 1b 78 mr r9,r3 <== NOT EXECUTED ffc06e00: 7c 60 1a 14 add r3,r0,r3 <== NOT EXECUTED ffc06e04: 89 63 00 01 lbz r11,1(r3) <== NOT EXECUTED ffc06e08: 55 6b 07 be clrlwi r11,r11,30 <== NOT EXECUTED ffc06e0c: 2f 8b 00 02 cmpwi cr7,r11,2 <== NOT EXECUTED ffc06e10: 41 9e 00 10 beq- cr7,ffc06e20 <== NOT EXECUTED ffc06e14: 55 23 06 3e clrlwi r3,r9,24 <== NOT EXECUTED ffc06e18: 98 61 00 08 stb r3,8(r1) <== NOT EXECUTED ffc06e1c: 4b ff fe e4 b ffc06d00 <== NOT EXECUTED ffc06e20: 39 29 ff e0 addi r9,r9,-32 <== NOT EXECUTED ffc06e24: 4b ff ff f0 b ffc06e14 <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; ffc06e28: 7c 04 02 14 add r0,r4,r0 ffc06e2c: 90 1f 00 28 stw r0,40(r31) rtems_termios_puts ( " ", i, tty); ffc06e30: 3c 60 ff c2 lis r3,-62 ffc06e34: 38 63 8f 44 addi r3,r3,-28860 ffc06e38: 7f e5 fb 78 mr r5,r31 ffc06e3c: 4b ff fc e9 bl ffc06b24 return; ffc06e40: 4b ff fe ec b ffc06d2c =============================================================================== ffc103f4 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc103f4: 94 21 ff d8 stwu r1,-40(r1) ffc103f8: 7c 08 02 a6 mflr r0 rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) ffc103fc: 38 80 01 ff li r4,511 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc10400: 93 a1 00 1c stw r29,28(r1) ffc10404: 7c 7d 1b 78 mr r29,r3 rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) ffc10408: 3c 60 ff c2 lis r3,-62 ffc1040c: 38 63 16 10 addi r3,r3,5648 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc10410: 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; ffc10414: 3b e0 ff ff li r31,-1 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc10418: 90 01 00 2c stw r0,44(r1) ffc1041c: 93 81 00 18 stw r28,24(r1) ffc10420: 93 c1 00 20 stw r30,32(r1) rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) ffc10424: 48 00 1d dd bl ffc12200 ffc10428: 2f 83 00 00 cmpwi cr7,r3,0 ffc1042c: 41 9e 00 28 beq- cr7,ffc10454 <== ALWAYS TAKEN unlink(fifopath); } if(err != 0) rtems_set_errno_and_return_minus_one(err); return 0; } ffc10430: 80 01 00 2c lwz r0,44(r1) ffc10434: 7f e3 fb 78 mr r3,r31 ffc10438: 83 81 00 18 lwz r28,24(r1) ffc1043c: 7c 08 03 a6 mtlr r0 ffc10440: 83 a1 00 1c lwz r29,28(r1) ffc10444: 83 c1 00 20 lwz r30,32(r1) ffc10448: 83 e1 00 24 lwz r31,36(r1) ffc1044c: 38 21 00 28 addi r1,r1,40 ffc10450: 4e 80 00 20 blr return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc10454: 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); ffc10458: 3d 40 ff c2 lis r10,-62 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc1045c: a0 a9 28 fc lhz r5,10492(r9) if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc10460: 39 6a 16 18 addi r11,r10,5656 ffc10464: 81 0a 16 18 lwz r8,5656(r10) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc10468: 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); ffc1046c: 81 4b 00 04 lwz r10,4(r11) ffc10470: a1 6b 00 08 lhz r11,8(r11) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc10474: 38 05 00 01 addi r0,r5,1 ffc10478: 38 84 16 24 addi r4,r4,5668 if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc1047c: 91 01 00 08 stw r8,8(r1) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc10480: 38 61 00 12 addi r3,r1,18 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { ffc10484: 3b c1 00 08 addi r30,r1,8 if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc10488: 91 41 00 0c stw r10,12(r1) ffc1048c: b1 61 00 10 sth r11,16(r1) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc10490: b0 09 28 fc sth r0,10492(r9) ffc10494: 4c c6 31 82 crclr 4*cr1+eq ffc10498: 48 00 4b e5 bl ffc1507c /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { ffc1049c: 7f c3 f3 78 mr r3,r30 ffc104a0: 38 80 01 80 li r4,384 ffc104a4: 48 00 19 75 bl ffc11e18 ffc104a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc104ac: 40 9e 00 c0 bne- cr7,ffc1056c 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); ffc104b0: 7f c3 f3 78 mr r3,r30 ffc104b4: 38 80 40 00 li r4,16384 ffc104b8: 4c c6 31 82 crclr 4*cr1+eq ffc104bc: 4b ff 70 d9 bl ffc07594 if (filsdes[0] < 0) { ffc104c0: 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); ffc104c4: 90 7d 00 00 stw r3,0(r29) if (filsdes[0] < 0) { ffc104c8: 41 9c 00 7c blt- cr7,ffc10544 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]); ffc104cc: 3d 20 00 00 lis r9,0 ffc104d0: 80 09 26 6c lwz r0,9836(r9) ffc104d4: 39 20 00 00 li r9,0 ffc104d8: 7f 83 00 40 cmplw cr7,r3,r0 ffc104dc: 41 9c 00 54 blt- cr7,ffc10530 <== ALWAYS TAKEN iop->flags &= ~LIBIO_FLAGS_NO_DELAY; ffc104e0: 80 09 00 18 lwz r0,24(r9) filsdes[1] = open(fifopath, O_WRONLY); ffc104e4: 7f c3 f3 78 mr r3,r30 ffc104e8: 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; ffc104ec: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc104f0: 90 09 00 18 stw r0,24(r9) int pipe_create( int filsdes[2] ) { rtems_libio_t *iop; int err = 0; ffc104f4: 3b 80 00 00 li r28,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); ffc104f8: 4c c6 31 82 crclr 4*cr1+eq ffc104fc: 4b ff 70 99 bl ffc07594 if (filsdes[1] < 0) { ffc10500: 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); ffc10504: 90 7d 00 04 stw r3,4(r29) if (filsdes[1] < 0) { ffc10508: 41 9c 00 50 blt- cr7,ffc10558 err = errno; close(filsdes[0]); } unlink(fifopath); ffc1050c: 7f c3 f3 78 mr r3,r30 ffc10510: 4b ff 98 25 bl ffc09d34 } if(err != 0) ffc10514: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_set_errno_and_return_minus_one(err); return 0; ffc10518: 3b e0 00 00 li r31,0 err = errno; close(filsdes[0]); } unlink(fifopath); } if(err != 0) ffc1051c: 41 9e ff 14 beq+ cr7,ffc10430 rtems_set_errno_and_return_minus_one(err); ffc10520: 48 00 3c 55 bl ffc14174 <__errno> ffc10524: 3b e0 ff ff li r31,-1 ffc10528: 93 83 00 00 stw r28,0(r3) ffc1052c: 4b ff ff 04 b ffc10430 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]); ffc10530: 3d 20 00 00 lis r9,0 ffc10534: 81 29 27 2c lwz r9,10028(r9) ffc10538: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc1053c: 7d 29 1a 14 add r9,r9,r3 ffc10540: 4b ff ff a0 b ffc104e0 } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; ffc10544: 48 00 3c 31 bl ffc14174 <__errno> ffc10548: 83 83 00 00 lwz r28,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); ffc1054c: 7f c3 f3 78 mr r3,r30 ffc10550: 4b ff 97 e5 bl ffc09d34 ffc10554: 4b ff ff c0 b ffc10514 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; ffc10558: 48 00 3c 1d bl ffc14174 <__errno> ffc1055c: 83 83 00 00 lwz r28,0(r3) close(filsdes[0]); ffc10560: 80 7d 00 00 lwz r3,0(r29) ffc10564: 4b ff 5b 29 bl ffc0608c ffc10568: 4b ff ff a4 b ffc1050c 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){ ffc1056c: 48 00 3c 09 bl ffc14174 <__errno> ffc10570: 4b ff fe c0 b ffc10430 =============================================================================== ffc11f9c : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { ffc11f9c: 94 21 ff f0 stwu r1,-16(r1) ffc11fa0: 7c 08 02 a6 mflr r0 ffc11fa4: 90 01 00 14 stw r0,20(r1) if (cmd == FIONREAD) { ffc11fa8: 3c 00 40 04 lis r0,16388 ffc11fac: 60 00 66 7f ori r0,r0,26239 ffc11fb0: 7f 84 00 00 cmpw cr7,r4,r0 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { ffc11fb4: 93 c1 00 08 stw r30,8(r1) ffc11fb8: 7c 7e 1b 78 mr r30,r3 ffc11fbc: 93 e1 00 0c stw r31,12(r1) *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; ffc11fc0: 38 60 ff ea li r3,-22 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { ffc11fc4: 7c bf 2b 78 mr r31,r5 if (cmd == FIONREAD) { ffc11fc8: 41 9e 00 1c beq- cr7,ffc11fe4 PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } ffc11fcc: 80 01 00 14 lwz r0,20(r1) ffc11fd0: 83 c1 00 08 lwz r30,8(r1) ffc11fd4: 7c 08 03 a6 mtlr r0 ffc11fd8: 83 e1 00 0c lwz r31,12(r1) ffc11fdc: 38 21 00 10 addi r1,r1,16 ffc11fe0: 4e 80 00 20 blr void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) ffc11fe4: 2f 85 00 00 cmpwi cr7,r5,0 return -EFAULT; ffc11fe8: 38 60 ff f2 li r3,-14 void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) ffc11fec: 41 9e ff e0 beq+ cr7,ffc11fcc return -EFAULT; if (! PIPE_LOCK(pipe)) ffc11ff0: 80 7e 00 28 lwz r3,40(r30) ffc11ff4: 38 80 00 00 li r4,0 ffc11ff8: 38 a0 00 00 li r5,0 ffc11ffc: 4b ff 98 d9 bl ffc0b8d4 ffc12000: 2f 83 00 00 cmpwi cr7,r3,0 return -EINTR; ffc12004: 38 60 ff fc li r3,-4 { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) ffc12008: 40 9e ff c4 bne+ cr7,ffc11fcc <== NEVER TAKEN return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; ffc1200c: 80 1e 00 0c lwz r0,12(r30) PIPE_UNLOCK(pipe); ffc12010: 80 7e 00 28 lwz r3,40(r30) if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; ffc12014: 90 1f 00 00 stw r0,0(r31) PIPE_UNLOCK(pipe); ffc12018: 4b ff 9a 45 bl ffc0ba5c return 0; ffc1201c: 38 60 00 00 li r3,0 ffc12020: 4b ff ff ac b ffc11fcc =============================================================================== ffc11ad4 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc11ad4: 94 21 ff c0 stwu r1,-64(r1) ffc11ad8: 7c 08 02 a6 mflr r0 ffc11adc: 90 01 00 44 stw r0,68(r1) ffc11ae0: 93 e1 00 3c stw r31,60(r1) ffc11ae4: 7c 7f 1b 78 mr r31,r3 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc11ae8: 80 63 00 28 lwz r3,40(r3) pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc11aec: 93 a1 00 34 stw r29,52(r1) ffc11af0: 7c 9d 23 78 mr r29,r4 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc11af4: 38 80 00 00 li r4,0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc11af8: 93 c1 00 38 stw r30,56(r1) ffc11afc: 7c be 2b 78 mr r30,r5 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc11b00: 38 a0 00 00 li r5,0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc11b04: 93 41 00 28 stw r26,40(r1) int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; ffc11b08: 3b 40 ff fc li r26,-4 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc11b0c: 93 61 00 2c stw r27,44(r1) ffc11b10: 7c db 33 78 mr r27,r6 ffc11b14: 92 e1 00 1c stw r23,28(r1) ffc11b18: 93 01 00 20 stw r24,32(r1) ffc11b1c: 93 21 00 24 stw r25,36(r1) ffc11b20: 93 81 00 30 stw r28,48(r1) int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc11b24: 4b ff 9d b1 bl ffc0b8d4 ffc11b28: 2f 83 00 00 cmpwi cr7,r3,0 ffc11b2c: 40 9e 00 a8 bne- cr7,ffc11bd4 <== NEVER TAKEN return -EINTR; while (read < count) { ffc11b30: 2f 9e 00 00 cmpwi cr7,r30,0 ffc11b34: 3b 20 00 00 li r25,0 ffc11b38: 3b 40 00 00 li r26,0 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); ffc11b3c: 3b 01 00 08 addi r24,r1,8 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { ffc11b40: 41 9e 01 90 beq- cr7,ffc11cd0 <== NEVER TAKEN while (PIPE_EMPTY(pipe)) { ffc11b44: 83 9f 00 0c lwz r28,12(r31) ffc11b48: 2f 9c 00 00 cmpwi cr7,r28,0 ffc11b4c: 40 9e 00 fc bne- cr7,ffc11c48 /* Not an error */ if (pipe->Writers == 0) ffc11b50: 80 1f 00 14 lwz r0,20(r31) ffc11b54: 2f 80 00 00 cmpwi cr7,r0,0 ffc11b58: 41 9e 01 78 beq- cr7,ffc11cd0 goto out_locked; if (LIBIO_NODELAY(iop)) { ffc11b5c: 80 1b 00 18 lwz r0,24(r27) ffc11b60: 70 09 00 01 andi. r9,r0,1 ffc11b64: 40 82 01 74 bne- ffc11cd8 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; ffc11b68: 81 3f 00 18 lwz r9,24(r31) PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; ffc11b6c: 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); ffc11b70: 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 ++; ffc11b74: 38 09 00 01 addi r0,r9,1 ffc11b78: 90 1f 00 18 stw r0,24(r31) PIPE_UNLOCK(pipe); ffc11b7c: 4b ff 9e e1 bl ffc0ba5c if (! PIPE_READWAIT(pipe)) ffc11b80: 80 7f 00 2c lwz r3,44(r31) ffc11b84: 38 80 00 00 li r4,0 ffc11b88: 48 00 15 11 bl ffc13098 ffc11b8c: 2f 83 00 00 cmpwi cr7,r3,0 ffc11b90: 40 9e 00 08 bne- cr7,ffc11b98 <== NEVER TAKEN ffc11b94: 3b 80 00 00 li r28,0 ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc11b98: 80 7f 00 28 lwz r3,40(r31) ffc11b9c: 38 80 00 00 li r4,0 ffc11ba0: 38 a0 00 00 li r5,0 ffc11ba4: 4b ff 9d 31 bl ffc0b8d4 ffc11ba8: 2f 83 00 00 cmpwi cr7,r3,0 ffc11bac: 40 9e 01 34 bne- cr7,ffc11ce0 <== NEVER TAKEN /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) ffc11bb0: 2f 9c 00 00 cmpwi cr7,r28,0 if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; ffc11bb4: 81 3f 00 18 lwz r9,24(r31) ffc11bb8: 38 09 ff ff addi r0,r9,-1 ffc11bbc: 90 1f 00 18 stw r0,24(r31) if (ret != 0) ffc11bc0: 41 9e ff 84 beq+ cr7,ffc11b44 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); ffc11bc4: 80 7f 00 28 lwz r3,40(r31) ffc11bc8: 4b ff 9e 95 bl ffc0ba5c out_nolock: if (read > 0) ffc11bcc: 2f 9a 00 00 cmpwi cr7,r26,0 ffc11bd0: 40 9d 00 3c ble- cr7,ffc11c0c return read; return ret; } ffc11bd4: 80 01 00 44 lwz r0,68(r1) ffc11bd8: 7f 43 d3 78 mr r3,r26 ffc11bdc: 82 e1 00 1c lwz r23,28(r1) ffc11be0: 7c 08 03 a6 mtlr r0 ffc11be4: 83 01 00 20 lwz r24,32(r1) ffc11be8: 83 21 00 24 lwz r25,36(r1) ffc11bec: 83 41 00 28 lwz r26,40(r1) ffc11bf0: 83 61 00 2c lwz r27,44(r1) ffc11bf4: 83 81 00 30 lwz r28,48(r1) ffc11bf8: 83 a1 00 34 lwz r29,52(r1) ffc11bfc: 83 c1 00 38 lwz r30,56(r1) ffc11c00: 83 e1 00 3c lwz r31,60(r1) ffc11c04: 38 21 00 40 addi r1,r1,64 ffc11c08: 4e 80 00 20 blr ffc11c0c: 80 01 00 44 lwz r0,68(r1) PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; ffc11c10: 7f 9a e3 78 mr r26,r28 } ffc11c14: 7f 43 d3 78 mr r3,r26 ffc11c18: 82 e1 00 1c lwz r23,28(r1) ffc11c1c: 7c 08 03 a6 mtlr r0 ffc11c20: 83 01 00 20 lwz r24,32(r1) ffc11c24: 83 21 00 24 lwz r25,36(r1) ffc11c28: 83 41 00 28 lwz r26,40(r1) ffc11c2c: 83 61 00 2c lwz r27,44(r1) ffc11c30: 83 81 00 30 lwz r28,48(r1) ffc11c34: 83 a1 00 34 lwz r29,52(r1) ffc11c38: 83 c1 00 38 lwz r30,56(r1) ffc11c3c: 83 e1 00 3c lwz r31,60(r1) ffc11c40: 38 21 00 40 addi r1,r1,64 ffc11c44: 4e 80 00 20 blr if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); ffc11c48: 7c 19 f0 50 subf r0,r25,r30 ffc11c4c: 7f 9c 00 40 cmplw cr7,r28,r0 ffc11c50: 40 9d 00 08 ble- cr7,ffc11c58 ffc11c54: 7c 1c 03 78 mr r28,r0 chunk1 = pipe->Size - pipe->Start; ffc11c58: 80 1f 00 08 lwz r0,8(r31) ffc11c5c: 82 ff 00 04 lwz r23,4(r31) ffc11c60: 7e e0 b8 50 subf r23,r0,r23 if (chunk > chunk1) { ffc11c64: 7f 9c b8 00 cmpw cr7,r28,r23 ffc11c68: 41 9d 00 80 bgt- cr7,ffc11ce8 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); ffc11c6c: 80 9f 00 00 lwz r4,0(r31) ffc11c70: 7c 7d ca 14 add r3,r29,r25 ffc11c74: 7f 85 e3 78 mr r5,r28 ffc11c78: 7c 84 02 14 add r4,r4,r0 ffc11c7c: 48 00 44 49 bl ffc160c4 pipe->Start += chunk; ffc11c80: 81 3f 00 08 lwz r9,8(r31) pipe->Start %= pipe->Size; ffc11c84: 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; ffc11c88: 7d 3c 4a 14 add r9,r28,r9 pipe->Start %= pipe->Size; pipe->Length -= chunk; ffc11c8c: 80 1f 00 0c lwz r0,12(r31) } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; ffc11c90: 7d 49 5b 96 divwu r10,r9,r11 pipe->Length -= chunk; ffc11c94: 7c 1c 00 50 subf r0,r28,r0 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) ffc11c98: 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; ffc11c9c: 90 1f 00 0c stw r0,12(r31) } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; ffc11ca0: 7d 6a 59 d6 mullw r11,r10,r11 ffc11ca4: 7d 2b 48 50 subf r9,r11,r9 ffc11ca8: 91 3f 00 08 stw r9,8(r31) pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) ffc11cac: 40 9e 00 08 bne- cr7,ffc11cb4 pipe->Start = 0; ffc11cb0: 90 1f 00 08 stw r0,8(r31) if (pipe->waitingWriters > 0) ffc11cb4: 80 1f 00 1c lwz r0,28(r31) ffc11cb8: 2f 80 00 00 cmpwi cr7,r0,0 ffc11cbc: 40 9e 00 58 bne- cr7,ffc11d14 PIPE_WAKEUPWRITERS(pipe); read += chunk; ffc11cc0: 7f 5a e2 14 add r26,r26,r28 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { ffc11cc4: 7f 9a f0 40 cmplw cr7,r26,r30 ffc11cc8: 7f 59 d3 78 mr r25,r26 ffc11ccc: 41 9c fe 78 blt+ cr7,ffc11b44 <== NEVER TAKEN while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) ffc11cd0: 3b 80 00 00 li r28,0 ffc11cd4: 4b ff fe f0 b ffc11bc4 goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; ffc11cd8: 3b 80 ff f5 li r28,-11 ffc11cdc: 4b ff fe e8 b ffc11bc4 PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; ffc11ce0: 3b 80 ff fc li r28,-4 <== NOT EXECUTED ffc11ce4: 4b ff fe e8 b ffc11bcc <== NOT EXECUTED /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); ffc11ce8: 80 9f 00 00 lwz r4,0(r31) ffc11cec: 7e e5 bb 78 mr r5,r23 ffc11cf0: 7c 7d ca 14 add r3,r29,r25 ffc11cf4: 7c 84 02 14 add r4,r4,r0 ffc11cf8: 48 00 43 cd bl ffc160c4 memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); ffc11cfc: 7c 79 ba 14 add r3,r25,r23 ffc11d00: 80 9f 00 00 lwz r4,0(r31) ffc11d04: 7c 7d 1a 14 add r3,r29,r3 ffc11d08: 7c b7 e0 50 subf r5,r23,r28 ffc11d0c: 48 00 43 b9 bl ffc160c4 ffc11d10: 4b ff ff 70 b ffc11c80 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); ffc11d14: 80 7f 00 30 lwz r3,48(r31) ffc11d18: 7f 04 c3 78 mr r4,r24 ffc11d1c: 48 00 12 e9 bl ffc13004 ffc11d20: 4b ff ff a0 b ffc11cc0 =============================================================================== ffc11548 : */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11548: 94 21 ff d8 stwu r1,-40(r1) ffc1154c: 7c 08 02 a6 mflr r0 ffc11550: 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); ffc11554: 80 04 00 18 lwz r0,24(r4) */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11558: 93 a1 00 1c stw r29,28(r1) ffc1155c: 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) ffc11560: 70 09 00 02 andi. r9,r0,2 */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11564: 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); ffc11568: 54 1e 07 7c rlwinm r30,r0,0,29,30 */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc1156c: 93 e1 00 24 stw r31,36(r1) ffc11570: 93 81 00 18 stw r28,24(r1) pipe_control_t *pipe = *pipep; ffc11574: 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) ffc11578: 41 82 00 10 beq- ffc11588 pipe->Readers --; ffc1157c: 81 3f 00 10 lwz r9,16(r31) ffc11580: 38 09 ff ff addi r0,r9,-1 ffc11584: 90 1f 00 10 stw r0,16(r31) if (mode & LIBIO_FLAGS_WRITE) ffc11588: 73 c0 00 04 andi. r0,r30,4 ffc1158c: 41 82 00 10 beq- ffc1159c pipe->Writers --; ffc11590: 81 3f 00 14 lwz r9,20(r31) ffc11594: 38 09 ff ff addi r0,r9,-1 ffc11598: 90 1f 00 14 stw r0,20(r31) PIPE_UNLOCK(pipe); ffc1159c: 80 7f 00 28 lwz r3,40(r31) ffc115a0: 4b ff a4 bd bl ffc0ba5c if (pipe->Readers == 0 && pipe->Writers == 0) { ffc115a4: 80 1f 00 10 lwz r0,16(r31) ffc115a8: 2f 80 00 00 cmpwi cr7,r0,0 ffc115ac: 41 9e 00 48 beq- cr7,ffc115f4 *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) ffc115b0: 80 1f 00 14 lwz r0,20(r31) ffc115b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc115b8: 40 9e 00 18 bne- cr7,ffc115d0 <== NEVER TAKEN ffc115bc: 2f 9e 00 02 cmpwi cr7,r30,2 ffc115c0: 41 9e 00 10 beq- cr7,ffc115d0 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); ffc115c4: 80 7f 00 2c lwz r3,44(r31) ffc115c8: 38 81 00 08 addi r4,r1,8 ffc115cc: 48 00 1a 39 bl ffc13004 pipe_unlock(); ffc115d0: 4b ff ff 51 bl ffc11520 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } ffc115d4: 80 01 00 2c lwz r0,44(r1) ffc115d8: 83 81 00 18 lwz r28,24(r1) ffc115dc: 7c 08 03 a6 mtlr r0 ffc115e0: 83 a1 00 1c lwz r29,28(r1) ffc115e4: 83 c1 00 20 lwz r30,32(r1) ffc115e8: 83 e1 00 24 lwz r31,36(r1) ffc115ec: 38 21 00 28 addi r1,r1,40 ffc115f0: 4e 80 00 20 blr if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { ffc115f4: 83 9f 00 14 lwz r28,20(r31) ffc115f8: 2f 9c 00 00 cmpwi cr7,r28,0 ffc115fc: 41 9e 00 3c beq- cr7,ffc11638 delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) ffc11600: 2f 9e 00 04 cmpwi cr7,r30,4 ffc11604: 41 9e ff cc beq+ cr7,ffc115d0 <== NEVER TAKEN /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); ffc11608: 80 7f 00 30 lwz r3,48(r31) ffc1160c: 38 81 00 08 addi r4,r1,8 ffc11610: 48 00 19 f5 bl ffc13004 else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); pipe_unlock(); ffc11614: 4b ff ff 0d bl ffc11520 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } ffc11618: 80 01 00 2c lwz r0,44(r1) ffc1161c: 83 81 00 18 lwz r28,24(r1) ffc11620: 7c 08 03 a6 mtlr r0 ffc11624: 83 a1 00 1c lwz r29,28(r1) ffc11628: 83 c1 00 20 lwz r30,32(r1) ffc1162c: 83 e1 00 24 lwz r31,36(r1) ffc11630: 38 21 00 28 addi r1,r1,40 ffc11634: 4e 80 00 20 blr /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); ffc11638: 80 7f 00 2c lwz r3,44(r31) ffc1163c: 48 00 18 fd bl ffc12f38 rtems_barrier_delete(pipe->writeBarrier); ffc11640: 80 7f 00 30 lwz r3,48(r31) ffc11644: 48 00 18 f5 bl ffc12f38 rtems_semaphore_delete(pipe->Semaphore); ffc11648: 80 7f 00 28 lwz r3,40(r31) ffc1164c: 4b ff a1 ad bl ffc0b7f8 free(pipe->Buffer); ffc11650: 80 7f 00 00 lwz r3,0(r31) ffc11654: 4b ff 59 0d bl ffc06f60 free(pipe); ffc11658: 7f e3 fb 78 mr r3,r31 ffc1165c: 4b ff 59 05 bl ffc06f60 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; ffc11660: 93 9d 00 00 stw r28,0(r29) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); pipe_unlock(); ffc11664: 4b ff fe bd bl ffc11520 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } ffc11668: 80 01 00 2c lwz r0,44(r1) ffc1166c: 83 81 00 18 lwz r28,24(r1) ffc11670: 7c 08 03 a6 mtlr r0 ffc11674: 83 a1 00 1c lwz r29,28(r1) ffc11678: 83 c1 00 20 lwz r30,32(r1) ffc1167c: 83 e1 00 24 lwz r31,36(r1) ffc11680: 38 21 00 28 addi r1,r1,40 ffc11684: 4e 80 00 20 blr =============================================================================== ffc11d24 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc11d24: 94 21 ff c0 stwu r1,-64(r1) ffc11d28: 7c 08 02 a6 mflr r0 ffc11d2c: 93 c1 00 38 stw r30,56(r1) int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) ffc11d30: 7c be 2b 79 mr. r30,r5 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc11d34: 93 81 00 30 stw r28,48(r1) int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; ffc11d38: 3b 80 00 00 li r28,0 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc11d3c: 93 a1 00 34 stw r29,52(r1) ffc11d40: 7c 9d 23 78 mr r29,r4 ffc11d44: 93 e1 00 3c stw r31,60(r1) ffc11d48: 7c 7f 1b 78 mr r31,r3 ffc11d4c: 90 01 00 44 stw r0,68(r1) ffc11d50: 93 01 00 20 stw r24,32(r1) ffc11d54: 93 21 00 24 stw r25,36(r1) ffc11d58: 93 41 00 28 stw r26,40(r1) ffc11d5c: 93 61 00 2c stw r27,44(r1) int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) ffc11d60: 40 82 00 38 bne- ffc11d98 <== ALWAYS TAKEN #endif if (written > 0) return written; return ret; } ffc11d64: 80 01 00 44 lwz r0,68(r1) ffc11d68: 7f 83 e3 78 mr r3,r28 ffc11d6c: 83 01 00 20 lwz r24,32(r1) ffc11d70: 7c 08 03 a6 mtlr r0 ffc11d74: 83 21 00 24 lwz r25,36(r1) ffc11d78: 83 41 00 28 lwz r26,40(r1) ffc11d7c: 83 61 00 2c lwz r27,44(r1) ffc11d80: 83 81 00 30 lwz r28,48(r1) ffc11d84: 83 a1 00 34 lwz r29,52(r1) ffc11d88: 83 c1 00 38 lwz r30,56(r1) ffc11d8c: 83 e1 00 3c lwz r31,60(r1) ffc11d90: 38 21 00 40 addi r1,r1,64 ffc11d94: 4e 80 00 20 blr /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) ffc11d98: 80 63 00 28 lwz r3,40(r3) ffc11d9c: 38 80 00 00 li r4,0 ffc11da0: 38 a0 00 00 li r5,0 ffc11da4: 90 c1 00 18 stw r6,24(r1) ffc11da8: 4b ff 9b 2d bl ffc0b8d4 return -EINTR; ffc11dac: 3b 80 ff fc li r28,-4 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) ffc11db0: 2f 83 00 00 cmpwi cr7,r3,0 ffc11db4: 80 c1 00 18 lwz r6,24(r1) ffc11db8: 40 be ff ac bne- cr7,ffc11d64 <== NEVER TAKEN return -EINTR; if (pipe->Readers == 0) { ffc11dbc: 80 1f 00 10 lwz r0,16(r31) ffc11dc0: 2f 80 00 00 cmpwi cr7,r0,0 ffc11dc4: 41 9e 01 84 beq- cr7,ffc11f48 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; ffc11dc8: 81 3f 00 04 lwz r9,4(r31) ffc11dcc: 3b 40 00 01 li r26,1 ffc11dd0: 7f 9e 48 40 cmplw cr7,r30,r9 ffc11dd4: 41 9d 00 08 bgt- cr7,ffc11ddc <== NEVER TAKEN ffc11dd8: 7f da f3 78 mr r26,r30 ffc11ddc: 3b 20 00 00 li r25,0 ffc11de0: 3b 80 00 00 li r28,0 else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); ffc11de4: 3b 01 00 08 addi r24,r1,8 /* 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) { ffc11de8: 80 1f 00 0c lwz r0,12(r31) ffc11dec: 7f 60 48 50 subf r27,r0,r9 ffc11df0: 7f 9b d0 40 cmplw cr7,r27,r26 ffc11df4: 40 9c 00 9c bge- cr7,ffc11e90 if (LIBIO_NODELAY(iop)) { ffc11df8: 80 06 00 18 lwz r0,24(r6) ffc11dfc: 70 09 00 01 andi. r9,r0,1 ffc11e00: 40 82 01 54 bne- ffc11f54 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; ffc11e04: 81 3f 00 1c lwz r9,28(r31) PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; ffc11e08: 3b 60 ff fc li r27,-4 goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); ffc11e0c: 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 ++; ffc11e10: 38 09 00 01 addi r0,r9,1 ffc11e14: 90 1f 00 1c stw r0,28(r31) PIPE_UNLOCK(pipe); ffc11e18: 90 c1 00 18 stw r6,24(r1) ffc11e1c: 4b ff 9c 41 bl ffc0ba5c if (! PIPE_WRITEWAIT(pipe)) ffc11e20: 38 80 00 00 li r4,0 ffc11e24: 80 7f 00 30 lwz r3,48(r31) ffc11e28: 48 00 12 71 bl ffc13098 ffc11e2c: 80 c1 00 18 lwz r6,24(r1) ffc11e30: 2f 83 00 00 cmpwi cr7,r3,0 ffc11e34: 40 9e 00 08 bne- cr7,ffc11e3c <== NEVER TAKEN ffc11e38: 3b 60 00 00 li r27,0 ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc11e3c: 80 7f 00 28 lwz r3,40(r31) ffc11e40: 38 80 00 00 li r4,0 ffc11e44: 38 a0 00 00 li r5,0 ffc11e48: 90 c1 00 18 stw r6,24(r1) ffc11e4c: 4b ff 9a 89 bl ffc0b8d4 ffc11e50: 2f 83 00 00 cmpwi cr7,r3,0 ffc11e54: 80 c1 00 18 lwz r6,24(r1) ffc11e58: 40 9e 01 04 bne- cr7,ffc11f5c <== NEVER TAKEN /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; if (ret != 0) ffc11e5c: 2f 9b 00 00 cmpwi cr7,r27,0 if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; ffc11e60: 81 3f 00 1c lwz r9,28(r31) ffc11e64: 38 09 ff ff addi r0,r9,-1 ffc11e68: 90 1f 00 1c stw r0,28(r31) if (ret != 0) ffc11e6c: 40 9e 00 bc bne- cr7,ffc11f28 <== NEVER TAKEN goto out_locked; if (pipe->Readers == 0) { ffc11e70: 80 1f 00 10 lwz r0,16(r31) ffc11e74: 2f 80 00 00 cmpwi cr7,r0,0 ffc11e78: 41 9e 00 c8 beq- cr7,ffc11f40 <== NEVER TAKEN ffc11e7c: 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) { ffc11e80: 80 1f 00 0c lwz r0,12(r31) ffc11e84: 7f 60 48 50 subf r27,r0,r9 ffc11e88: 7f 9b d0 40 cmplw cr7,r27,r26 ffc11e8c: 41 9c ff 6c blt+ cr7,ffc11df8 <== NEVER TAKEN ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); ffc11e90: 7d 79 f0 50 subf r11,r25,r30 ffc11e94: 7f 9b 58 40 cmplw cr7,r27,r11 ffc11e98: 40 9d 00 08 ble- cr7,ffc11ea0 ffc11e9c: 7d 7b 5b 78 mr r27,r11 chunk1 = pipe->Size - PIPE_WSTART(pipe); ffc11ea0: 81 7f 00 08 lwz r11,8(r31) ffc11ea4: 7c 00 5a 14 add r0,r0,r11 ffc11ea8: 7d 60 4b 96 divwu r11,r0,r9 ffc11eac: 7d 6b 49 d6 mullw r11,r11,r9 ffc11eb0: 7c 0b 00 50 subf r0,r11,r0 ffc11eb4: 7f 40 48 50 subf r26,r0,r9 if (chunk > chunk1) { ffc11eb8: 7f 9b d0 00 cmpw cr7,r27,r26 ffc11ebc: 40 9d 00 a8 ble- cr7,ffc11f64 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); ffc11ec0: 80 7f 00 00 lwz r3,0(r31) ffc11ec4: 7c 9d ca 14 add r4,r29,r25 ffc11ec8: 7f 45 d3 78 mr r5,r26 ffc11ecc: 90 c1 00 18 stw r6,24(r1) ffc11ed0: 7c 63 02 14 add r3,r3,r0 ffc11ed4: 48 00 41 f1 bl ffc160c4 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); ffc11ed8: 7c 9a ca 14 add r4,r26,r25 ffc11edc: 80 7f 00 00 lwz r3,0(r31) ffc11ee0: 7c 9d 22 14 add r4,r29,r4 ffc11ee4: 7c ba d8 50 subf r5,r26,r27 ffc11ee8: 48 00 41 dd bl ffc160c4 ffc11eec: 80 c1 00 18 lwz r6,24(r1) } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) ffc11ef0: 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; ffc11ef4: 80 1f 00 0c lwz r0,12(r31) if (pipe->waitingReaders > 0) ffc11ef8: 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; ffc11efc: 7c 00 da 14 add r0,r0,r27 ffc11f00: 90 1f 00 0c stw r0,12(r31) if (pipe->waitingReaders > 0) ffc11f04: 40 9e 00 80 bne- cr7,ffc11f84 PIPE_WAKEUPREADERS(pipe); written += chunk; ffc11f08: 7f 9c da 14 add r28,r28,r27 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { ffc11f0c: 7f 9e e0 40 cmplw cr7,r30,r28 ffc11f10: 7f 99 e3 78 mr r25,r28 ffc11f14: 40 9d 00 10 ble- cr7,ffc11f24 <== ALWAYS TAKEN ffc11f18: 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; ffc11f1c: 3b 40 00 01 li r26,1 <== NOT EXECUTED ffc11f20: 4b ff fe c8 b ffc11de8 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { ffc11f24: 3b 60 00 00 li r27,0 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); ffc11f28: 80 7f 00 28 lwz r3,40(r31) ffc11f2c: 4b ff 9b 31 bl ffc0ba5c /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) ffc11f30: 2f 9c 00 00 cmpwi cr7,r28,0 ffc11f34: 41 9d fe 30 bgt+ cr7,ffc11d64 return written; return ret; ffc11f38: 7f 7c db 78 mr r28,r27 ffc11f3c: 4b ff fe 28 b ffc11d64 pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; ffc11f40: 3b 60 ff e0 li r27,-32 <== NOT EXECUTED ffc11f44: 4b ff ff e4 b ffc11f28 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; if (pipe->Readers == 0) { ret = -EPIPE; ffc11f48: 3b 60 ff e0 li r27,-32 const void *buffer, size_t count, rtems_libio_t *iop ) { int chunk, chunk1, written = 0, ret = 0; ffc11f4c: 3b 80 00 00 li r28,0 ffc11f50: 4b ff ff d8 b ffc11f28 chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; ffc11f54: 3b 60 ff f5 li r27,-11 ffc11f58: 4b ff ff d0 b ffc11f28 PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; ffc11f5c: 3b 60 ff fc li r27,-4 <== NOT EXECUTED ffc11f60: 4b ff ff d0 b ffc11f30 <== 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); ffc11f64: 80 7f 00 00 lwz r3,0(r31) ffc11f68: 7c 9d ca 14 add r4,r29,r25 ffc11f6c: 7f 65 db 78 mr r5,r27 ffc11f70: 90 c1 00 18 stw r6,24(r1) ffc11f74: 7c 63 02 14 add r3,r3,r0 ffc11f78: 48 00 41 4d bl ffc160c4 ffc11f7c: 80 c1 00 18 lwz r6,24(r1) ffc11f80: 4b ff ff 70 b ffc11ef0 pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); ffc11f84: 80 7f 00 2c lwz r3,44(r31) ffc11f88: 7f 04 c3 78 mr r4,r24 ffc11f8c: 90 c1 00 18 stw r6,24(r1) ffc11f90: 48 00 10 75 bl ffc13004 ffc11f94: 80 c1 00 18 lwz r6,24(r1) ffc11f98: 4b ff ff 70 b ffc11f08 =============================================================================== ffc09908 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { ffc09908: 7c 08 02 a6 mflr r0 ffc0990c: 94 21 ff f8 stwu r1,-8(r1) /* * Update call statistics */ MSBUMP(memalign_calls, 1); ffc09910: 3d 60 00 00 lis r11,0 ffc09914: 39 6b 33 70 addi r11,r11,13168 int posix_memalign( void **pointer, size_t alignment, size_t size ) { ffc09918: 90 01 00 0c stw r0,12(r1) /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) ffc0991c: 38 04 ff ff addi r0,r4,-1 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); ffc09920: 81 4b 00 08 lwz r10,8(r11) if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) ffc09924: 7c 08 20 39 and. r8,r0,r4 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); ffc09928: 38 0a 00 01 addi r0,r10,1 ffc0992c: 90 0b 00 08 stw r0,8(r11) if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) return EINVAL; ffc09930: 38 00 00 16 li r0,22 /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) ffc09934: 40 82 00 0c bne- ffc09940 <== NEVER TAKEN ffc09938: 2b 84 00 03 cmplwi cr7,r4,3 ffc0993c: 41 9d 00 18 bgt- cr7,ffc09954 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } ffc09940: 7c 03 03 78 mr r3,r0 ffc09944: 80 01 00 0c lwz r0,12(r1) ffc09948: 38 21 00 08 addi r1,r1,8 ffc0994c: 7c 08 03 a6 mtlr r0 ffc09950: 4e 80 00 20 blr /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); ffc09954: 48 00 03 31 bl ffc09c84 ffc09958: 7c 60 1b 78 mr r0,r3 } ffc0995c: 7c 03 03 78 mr r3,r0 ffc09960: 80 01 00 0c lwz r0,12(r1) ffc09964: 38 21 00 08 addi r1,r1,8 ffc09968: 7c 08 03 a6 mtlr r0 ffc0996c: 4e 80 00 20 blr =============================================================================== ffc05dbc : * printk * * Kernel printf function requiring minimal infrastrure. */ void printk(const char *fmt, ...) { ffc05dbc: 94 21 ff 88 stwu r1,-120(r1) ffc05dc0: 7c 08 02 a6 mflr r0 ffc05dc4: 90 81 00 1c stw r4,28(r1) ffc05dc8: 90 01 00 7c stw r0,124(r1) ffc05dcc: 90 a1 00 20 stw r5,32(r1) ffc05dd0: 90 c1 00 24 stw r6,36(r1) ffc05dd4: 90 e1 00 28 stw r7,40(r1) ffc05dd8: 91 01 00 2c stw r8,44(r1) ffc05ddc: 91 21 00 30 stw r9,48(r1) ffc05de0: 91 41 00 34 stw r10,52(r1) ffc05de4: 40 86 00 24 bne- cr1,ffc05e08 <== ALWAYS TAKEN ffc05de8: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED ffc05dec: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED ffc05df0: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED ffc05df4: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED ffc05df8: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED ffc05dfc: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED ffc05e00: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED ffc05e04: 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 */ ffc05e08: 38 00 00 01 li r0,1 ffc05e0c: 98 01 00 08 stb r0,8(r1) ffc05e10: 38 00 00 00 li r0,0 vprintk(fmt, ap); ffc05e14: 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 */ ffc05e18: 98 01 00 09 stb r0,9(r1) ffc05e1c: 38 01 00 80 addi r0,r1,128 ffc05e20: 90 01 00 0c stw r0,12(r1) ffc05e24: 38 01 00 18 addi r0,r1,24 ffc05e28: 90 01 00 10 stw r0,16(r1) vprintk(fmt, ap); ffc05e2c: 48 00 23 8d bl ffc081b8 va_end(ap); /* clean up when done */ } ffc05e30: 80 01 00 7c lwz r0,124(r1) ffc05e34: 38 21 00 78 addi r1,r1,120 ffc05e38: 7c 08 03 a6 mtlr r0 ffc05e3c: 4e 80 00 20 blr =============================================================================== ffc0764c : int printk_plugin( void *ignored __attribute__((unused)), const char *format, ... ) { ffc0764c: 94 21 ff 90 stwu r1,-112(r1) ffc07650: 7c 08 02 a6 mflr r0 ffc07654: 90 a1 00 18 stw r5,24(r1) ffc07658: 90 01 00 74 stw r0,116(r1) ffc0765c: 90 c1 00 1c stw r6,28(r1) ffc07660: 90 e1 00 20 stw r7,32(r1) ffc07664: 91 01 00 24 stw r8,36(r1) ffc07668: 91 21 00 28 stw r9,40(r1) ffc0766c: 91 41 00 2c stw r10,44(r1) ffc07670: 40 86 00 24 bne- cr1,ffc07694 <== ALWAYS TAKEN ffc07674: d8 21 00 30 stfd f1,48(r1) ffc07678: d8 41 00 38 stfd f2,56(r1) ffc0767c: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc07680: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc07684: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc07688: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0768c: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc07690: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list arg_pointer; va_start (arg_pointer, format); ffc07694: 38 00 00 02 li r0,2 ffc07698: 98 01 00 08 stb r0,8(r1) ffc0769c: 38 00 00 00 li r0,0 vprintk( format, arg_pointer ); ffc076a0: 7c 83 23 78 mr r3,r4 ... ) { va_list arg_pointer; va_start (arg_pointer, format); ffc076a4: 98 01 00 09 stb r0,9(r1) ffc076a8: 38 01 00 78 addi r0,r1,120 vprintk( format, arg_pointer ); ffc076ac: 38 81 00 08 addi r4,r1,8 ... ) { va_list arg_pointer; va_start (arg_pointer, format); ffc076b0: 90 01 00 0c stw r0,12(r1) ffc076b4: 38 01 00 10 addi r0,r1,16 ffc076b8: 90 01 00 10 stw r0,16(r1) vprintk( format, arg_pointer ); ffc076bc: 48 00 23 91 bl ffc09a4c va_end(arg_pointer); /* clean up when done */ return 0; } ffc076c0: 38 60 00 00 li r3,0 ffc076c4: 80 01 00 74 lwz r0,116(r1) ffc076c8: 38 21 00 70 addi r1,r1,112 ffc076cc: 7c 08 03 a6 mtlr r0 ffc076d0: 4e 80 00 20 blr =============================================================================== ffc178c4 : ssize_t read( int fd, void *buffer, size_t count ) { ffc178c4: 94 21 ff f0 stwu r1,-16(r1) ffc178c8: 7c 08 02 a6 mflr r0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc178cc: 3d 20 00 00 lis r9,0 ssize_t read( int fd, void *buffer, size_t count ) { ffc178d0: 90 01 00 14 stw r0,20(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc178d4: 80 09 26 4c lwz r0,9804(r9) ssize_t read( int fd, void *buffer, size_t count ) { ffc178d8: 93 e1 00 0c stw r31,12(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc178dc: 7f 83 00 40 cmplw cr7,r3,r0 ffc178e0: 40 9c 00 8c bge- cr7,ffc1796c <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc178e4: 3d 60 00 00 lis r11,0 ffc178e8: 83 eb 27 0c lwz r31,9996(r11) ffc178ec: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc178f0: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open( iop ); ffc178f4: 81 7f 00 18 lwz r11,24(r31) ffc178f8: 71 6a 01 00 andi. r10,r11,256 ffc178fc: 41 82 00 70 beq- ffc1796c rtems_libio_check_buffer( buffer ); ffc17900: 2f 84 00 00 cmpwi cr7,r4,0 ffc17904: 41 9e 00 7c beq- cr7,ffc17980 <== NEVER TAKEN rtems_libio_check_count( count ); ffc17908: 2f 85 00 00 cmpwi cr7,r5,0 ffc1790c: 38 60 00 00 li r3,0 ffc17910: 41 9e 00 48 beq- cr7,ffc17958 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); ffc17914: 71 60 00 02 andi. r0,r11,2 ffc17918: 41 82 00 68 beq- ffc17980 /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); ffc1791c: 81 3f 00 24 lwz r9,36(r31) ffc17920: 7f e3 fb 78 mr r3,r31 ffc17924: 80 09 00 08 lwz r0,8(r9) ffc17928: 7c 09 03 a6 mtctr r0 ffc1792c: 4e 80 04 21 bctrl if ( rc > 0 ) ffc17930: 2c 03 00 00 cmpwi r3,0 ffc17934: 40 81 00 24 ble- ffc17958 iop->offset += rc; ffc17938: 81 7f 00 10 lwz r11,16(r31) ffc1793c: 7c 6a 1b 78 mr r10,r3 ffc17940: 81 9f 00 14 lwz r12,20(r31) ffc17944: 7c 69 fe 70 srawi r9,r3,31 ffc17948: 7d 4a 60 14 addc r10,r10,r12 ffc1794c: 7d 29 59 14 adde r9,r9,r11 ffc17950: 91 3f 00 10 stw r9,16(r31) ffc17954: 91 5f 00 14 stw r10,20(r31) return rc; } ffc17958: 80 01 00 14 lwz r0,20(r1) ffc1795c: 83 e1 00 0c lwz r31,12(r1) ffc17960: 38 21 00 10 addi r1,r1,16 ffc17964: 7c 08 03 a6 mtlr r0 ffc17968: 4e 80 00 20 blr ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); ffc1796c: 4b ff a9 f1 bl ffc1235c <__errno> ffc17970: 38 00 00 09 li r0,9 ffc17974: 90 03 00 00 stw r0,0(r3) ffc17978: 38 60 ff ff li r3,-1 ffc1797c: 4b ff ff dc b ffc17958 rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); ffc17980: 4b ff a9 dd bl ffc1235c <__errno> ffc17984: 38 00 00 16 li r0,22 ffc17988: 90 03 00 00 stw r0,0(r3) ffc1798c: 38 60 ff ff li r3,-1 ffc17990: 4b ff ff c8 b ffc17958 =============================================================================== ffc08c4c : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { ffc08c4c: 94 21 ff c8 stwu r1,-56(r1) ffc08c50: 7c 08 02 a6 mflr r0 ffc08c54: 93 a1 00 2c stw r29,44(r1) rtems_filesystem_location_info_t loc; int result; if (!buf) ffc08c58: 7c 9d 23 79 mr. r29,r4 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { ffc08c5c: 93 81 00 28 stw r28,40(r1) ffc08c60: 7c 7c 1b 78 mr r28,r3 ffc08c64: 93 c1 00 30 stw r30,48(r1) ffc08c68: 7c be 2b 78 mr r30,r5 ffc08c6c: 90 01 00 3c stw r0,60(r1) ffc08c70: 93 e1 00 34 stw r31,52(r1) rtems_filesystem_location_info_t loc; int result; if (!buf) ffc08c74: 41 82 00 bc beq- ffc08d30 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), ffc08c78: 48 00 f2 71 bl ffc17ee8 ffc08c7c: 3b e1 00 08 addi r31,r1,8 ffc08c80: 7c 64 1b 78 mr r4,r3 ffc08c84: 38 a0 00 00 li r5,0 ffc08c88: 7f 83 e3 78 mr r3,r28 ffc08c8c: 7f e6 fb 78 mr r6,r31 ffc08c90: 38 e0 00 00 li r7,0 ffc08c94: 4b ff e9 41 bl ffc075d4 0, &loc, false ); if ( result != 0 ) return -1; ffc08c98: 3b 80 ff ff li r28,-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 ) ffc08c9c: 2f 83 00 00 cmpwi cr7,r3,0 ffc08ca0: 41 9e 00 28 beq- cr7,ffc08cc8 <== ALWAYS TAKEN result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } ffc08ca4: 80 01 00 3c lwz r0,60(r1) ffc08ca8: 7f 83 e3 78 mr r3,r28 ffc08cac: 83 a1 00 2c lwz r29,44(r1) ffc08cb0: 7c 08 03 a6 mtlr r0 ffc08cb4: 83 81 00 28 lwz r28,40(r1) ffc08cb8: 83 c1 00 30 lwz r30,48(r1) ffc08cbc: 83 e1 00 34 lwz r31,52(r1) ffc08cc0: 38 21 00 38 addi r1,r1,56 ffc08cc4: 4e 80 00 20 blr 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 ){ ffc08cc8: 81 21 00 14 lwz r9,20(r1) ffc08ccc: 7f e3 fb 78 mr r3,r31 ffc08cd0: 80 09 00 10 lwz r0,16(r9) ffc08cd4: 7c 09 03 a6 mtctr r0 ffc08cd8: 4e 80 04 21 bctrl ffc08cdc: 2f 83 00 04 cmpwi cr7,r3,4 ffc08ce0: 40 9e 00 84 bne- cr7,ffc08d64 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); ffc08ce4: 81 21 00 14 lwz r9,20(r1) ffc08ce8: 7f a4 eb 78 mr r4,r29 ffc08cec: 7f c5 f3 78 mr r5,r30 ffc08cf0: 80 09 00 3c lwz r0,60(r9) ffc08cf4: 7f e3 fb 78 mr r3,r31 ffc08cf8: 7c 09 03 a6 mtctr r0 ffc08cfc: 4e 80 04 21 bctrl ffc08d00: 7c 7c 1b 78 mr r28,r3 rtems_filesystem_freenode( &loc ); ffc08d04: 7f e3 fb 78 mr r3,r31 ffc08d08: 4b ff ea 29 bl ffc07730 return result; } ffc08d0c: 80 01 00 3c lwz r0,60(r1) ffc08d10: 7f 83 e3 78 mr r3,r28 ffc08d14: 83 a1 00 2c lwz r29,44(r1) ffc08d18: 7c 08 03 a6 mtlr r0 ffc08d1c: 83 81 00 28 lwz r28,40(r1) ffc08d20: 83 c1 00 30 lwz r30,48(r1) ffc08d24: 83 e1 00 34 lwz r31,52(r1) ffc08d28: 38 21 00 38 addi r1,r1,56 ffc08d2c: 4e 80 00 20 blr { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); ffc08d30: 48 00 d2 1d bl ffc15f4c <__errno> ffc08d34: 38 00 00 0e li r0,14 ffc08d38: 90 03 00 00 stw r0,0(r3) ffc08d3c: 3b 80 ff ff li r28,-1 result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } ffc08d40: 7f 83 e3 78 mr r3,r28 ffc08d44: 80 01 00 3c lwz r0,60(r1) ffc08d48: 83 81 00 28 lwz r28,40(r1) ffc08d4c: 7c 08 03 a6 mtlr r0 ffc08d50: 83 a1 00 2c lwz r29,44(r1) ffc08d54: 83 c1 00 30 lwz r30,48(r1) ffc08d58: 83 e1 00 34 lwz r31,52(r1) ffc08d5c: 38 21 00 38 addi r1,r1,56 ffc08d60: 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 ); ffc08d64: 7f e3 fb 78 mr r3,r31 ffc08d68: 4b ff e9 c9 bl ffc07730 rtems_set_errno_and_return_minus_one( EINVAL ); ffc08d6c: 48 00 d1 e1 bl ffc15f4c <__errno> ffc08d70: 38 00 00 16 li r0,22 ffc08d74: 90 03 00 00 stw r0,0(r3) ffc08d78: 4b ff ff 2c b ffc08ca4 =============================================================================== ffc07384 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc07384: 94 21 ff d8 stwu r1,-40(r1) ffc07388: 7c 08 02 a6 mflr r0 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc0738c: 3d 20 00 00 lis r9,0 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc07390: 90 01 00 2c stw r0,44(r1) int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc07394: 80 09 26 4c lwz r0,9804(r9) ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc07398: 93 41 00 10 stw r26,16(r1) ffc0739c: 7c ba 2b 78 mr r26,r5 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc073a0: 7f 83 00 40 cmplw cr7,r3,r0 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc073a4: 93 21 00 0c stw r25,12(r1) ffc073a8: 93 61 00 14 stw r27,20(r1) ffc073ac: 93 81 00 18 stw r28,24(r1) ffc073b0: 93 a1 00 1c stw r29,28(r1) ffc073b4: 93 c1 00 20 stw r30,32(r1) ffc073b8: 93 e1 00 24 stw r31,36(r1) int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc073bc: 40 9c 01 4c bge- cr7,ffc07508 iop = rtems_libio_iop( fd ); ffc073c0: 3d 20 00 00 lis r9,0 ffc073c4: 83 89 27 0c lwz r28,9996(r9) ffc073c8: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc073cc: 7f 9c 1a 14 add r28,r28,r3 rtems_libio_check_is_open( iop ); ffc073d0: 80 1c 00 18 lwz r0,24(r28) ffc073d4: 70 09 01 00 andi. r9,r0,256 ffc073d8: 41 82 01 30 beq- ffc07508 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); ffc073dc: 70 09 00 02 andi. r9,r0,2 ffc073e0: 41 82 00 e8 beq- ffc074c8 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) ffc073e4: 2f 84 00 00 cmpwi cr7,r4,0 ffc073e8: 41 9e 00 e0 beq- cr7,ffc074c8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) ffc073ec: 2f 85 00 00 cmpwi cr7,r5,0 ffc073f0: 40 9d 00 d8 ble- cr7,ffc074c8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc073f4: 2f 85 04 00 cmpwi cr7,r5,1024 ffc073f8: 41 9d 00 d0 bgt- cr7,ffc074c8 <== NEVER TAKEN ffc073fc: 7c a9 03 a6 mtctr r5 rtems_set_errno_and_return_minus_one( EINVAL ); ffc07400: 7c 9d 23 78 mr r29,r4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc07404: 7c 89 23 78 mr r9,r4 ffc07408: 39 00 00 01 li r8,1 ffc0740c: 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 ) ffc07410: 81 69 00 00 lwz r11,0(r9) ffc07414: 2f 8b 00 00 cmpwi cr7,r11,0 ffc07418: 41 9e 00 b0 beq- cr7,ffc074c8 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; ffc0741c: 81 49 00 04 lwz r10,4(r9) * 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++ ) { ffc07420: 39 29 00 08 addi r9,r9,8 if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; ffc07424: 7d 60 52 14 add r11,r0,r10 if ( total < old ) ffc07428: 7f 80 58 00 cmpw cr7,r0,r11 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; ffc0742c: 31 4a ff ff addic r10,r10,-1 ffc07430: 7d 4a 51 10 subfe r10,r10,r10 ffc07434: 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; ffc07438: 7d 60 5b 78 mr r0,r11 if ( total < old ) ffc0743c: 41 9d 00 8c bgt- cr7,ffc074c8 * 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++ ) { ffc07440: 42 00 ff d0 bdnz+ ffc07410 /* * 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 ) { ffc07444: 2f 88 00 00 cmpwi cr7,r8,0 return 0; ffc07448: 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 ) { ffc0744c: 40 9e 00 8c bne- cr7,ffc074d8 ffc07450: 3b 60 00 00 li r27,0 ffc07454: 48 00 00 40 b ffc07494 ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { ffc07458: 41 82 00 28 beq- ffc07480 <== NEVER TAKEN iop->offset += bytes; ffc0745c: 81 3c 00 10 lwz r9,16(r28) ffc07460: 7c 7f 1b 78 mr r31,r3 ffc07464: 81 5c 00 14 lwz r10,20(r28) ffc07468: 7c 7e fe 70 srawi r30,r3,31 total += bytes; ffc0746c: 7f 39 1a 14 add r25,r25,r3 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; ffc07470: 7d 4a f8 14 addc r10,r10,r31 ffc07474: 7d 29 f1 14 adde r9,r9,r30 ffc07478: 91 3c 00 10 stw r9,16(r28) ffc0747c: 91 5c 00 14 stw r10,20(r28) total += bytes; } if (bytes != iov[ v ].iov_len) ffc07480: 80 1d 00 04 lwz r0,4(r29) } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc07484: 3b bd 00 08 addi r29,r29,8 if ( bytes > 0 ) { iop->offset += bytes; total += bytes; } if (bytes != iov[ v ].iov_len) ffc07488: 7f 03 00 00 cmpw cr6,r3,r0 ffc0748c: 40 9a 00 4c bne- cr6,ffc074d8 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc07490: 40 9d 00 48 ble- cr7,ffc074d8 bytes = (*iop->pathinfo.handlers->read_h)( ffc07494: 81 3c 00 24 lwz r9,36(r28) ffc07498: 7f 83 e3 78 mr r3,r28 ffc0749c: 80 9d 00 00 lwz r4,0(r29) } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc074a0: 3b 7b 00 01 addi r27,r27,1 bytes = (*iop->pathinfo.handlers->read_h)( ffc074a4: 80 09 00 08 lwz r0,8(r9) ffc074a8: 80 bd 00 04 lwz r5,4(r29) ffc074ac: 7c 09 03 a6 mtctr r0 ffc074b0: 4e 80 04 21 bctrl } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc074b4: 7f 9a d8 00 cmpw cr7,r26,r27 iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) ffc074b8: 2c 03 00 00 cmpwi r3,0 ffc074bc: 40 80 ff 9c bge+ ffc07458 <== ALWAYS TAKEN return -1; ffc074c0: 3b 20 ff ff li r25,-1 <== NOT EXECUTED ffc074c4: 48 00 00 14 b ffc074d8 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc074c8: 48 00 c2 b1 bl ffc13778 <__errno> ffc074cc: 38 00 00 16 li r0,22 ffc074d0: 90 03 00 00 stw r0,0(r3) ffc074d4: 3b 20 ff ff li r25,-1 if (bytes != iov[ v ].iov_len) break; } return total; } ffc074d8: 80 01 00 2c lwz r0,44(r1) ffc074dc: 7f 23 cb 78 mr r3,r25 ffc074e0: 83 41 00 10 lwz r26,16(r1) ffc074e4: 7c 08 03 a6 mtlr r0 ffc074e8: 83 21 00 0c lwz r25,12(r1) ffc074ec: 83 61 00 14 lwz r27,20(r1) ffc074f0: 83 81 00 18 lwz r28,24(r1) ffc074f4: 83 a1 00 1c lwz r29,28(r1) ffc074f8: 83 c1 00 20 lwz r30,32(r1) ffc074fc: 83 e1 00 24 lwz r31,36(r1) ffc07500: 38 21 00 28 addi r1,r1,40 ffc07504: 4e 80 00 20 blr rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); ffc07508: 48 00 c2 71 bl ffc13778 <__errno> ffc0750c: 38 00 00 09 li r0,9 ffc07510: 90 03 00 00 stw r0,0(r3) ffc07514: 3b 20 ff ff li r25,-1 ffc07518: 4b ff ff c0 b ffc074d8 =============================================================================== ffc17a38 : void *realloc( void *ptr, size_t size ) { ffc17a38: 94 21 ff d8 stwu r1,-40(r1) ffc17a3c: 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())) { ffc17a40: 3d 20 00 00 lis r9,0 void *realloc( void *ptr, size_t size ) { ffc17a44: 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())) { ffc17a48: 80 09 27 6c lwz r0,10092(r9) void *realloc( void *ptr, size_t size ) { ffc17a4c: 93 c1 00 20 stw r30,32(r1) uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); ffc17a50: 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())) { ffc17a54: 2f 80 00 03 cmpwi cr7,r0,3 ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); ffc17a58: 3b de 2a 48 addi r30,r30,10824 void *realloc( void *ptr, size_t size ) { ffc17a5c: 93 a1 00 1c stw r29,28(r1) ffc17a60: 7c 9d 23 78 mr r29,r4 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); ffc17a64: 81 3e 00 10 lwz r9,16(r30) void *realloc( void *ptr, size_t size ) { ffc17a68: 93 e1 00 24 stw r31,36(r1) ffc17a6c: 7c 7f 1b 78 mr r31,r3 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); ffc17a70: 39 29 00 01 addi r9,r9,1 void *realloc( void *ptr, size_t size ) { ffc17a74: 93 81 00 18 stw r28,24(r1) uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); ffc17a78: 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())) { ffc17a7c: 41 9e 00 a0 beq- cr7,ffc17b1c <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) ffc17a80: 2f 9f 00 00 cmpwi cr7,r31,0 ffc17a84: 41 9e 00 88 beq- cr7,ffc17b0c return malloc( size ); if ( !size ) { ffc17a88: 2f 9d 00 00 cmpwi cr7,r29,0 ffc17a8c: 41 9e 00 5c beq- cr7,ffc17ae8 <== NEVER TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { ffc17a90: 3f 80 00 00 lis r28,0 ffc17a94: 80 7c 26 64 lwz r3,9828(r28) ffc17a98: 7f e4 fb 78 mr r4,r31 ffc17a9c: 38 a1 00 08 addi r5,r1,8 ffc17aa0: 48 00 01 c9 bl ffc17c68 <_Protected_heap_Get_block_size> ffc17aa4: 2f 83 00 00 cmpwi cr7,r3,0 ffc17aa8: 41 9e 00 50 beq- cr7,ffc17af8 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { ffc17aac: 80 7c 26 64 lwz r3,9828(r28) ffc17ab0: 7f e4 fb 78 mr r4,r31 ffc17ab4: 7f a5 eb 78 mr r5,r29 ffc17ab8: 48 00 02 15 bl ffc17ccc <_Protected_heap_Resize_block> ffc17abc: 2f 83 00 00 cmpwi cr7,r3,0 ffc17ac0: 41 9e 00 8c beq- cr7,ffc17b4c memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } ffc17ac4: 80 01 00 2c lwz r0,44(r1) ffc17ac8: 7f e3 fb 78 mr r3,r31 ffc17acc: 83 81 00 18 lwz r28,24(r1) ffc17ad0: 7c 08 03 a6 mtlr r0 ffc17ad4: 83 a1 00 1c lwz r29,28(r1) ffc17ad8: 83 c1 00 20 lwz r30,32(r1) ffc17adc: 83 e1 00 24 lwz r31,36(r1) ffc17ae0: 38 21 00 28 addi r1,r1,40 ffc17ae4: 4e 80 00 20 blr */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); ffc17ae8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc17aec: 4b fe d1 91 bl ffc04c7c <== NOT EXECUTED return (void *) 0; ffc17af0: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc17af4: 4b ff ff d0 b ffc17ac4 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; ffc17af8: 4b ff a8 65 bl ffc1235c <__errno> ffc17afc: 38 00 00 16 li r0,22 ffc17b00: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc17b04: 3b e0 00 00 li r31,0 ffc17b08: 4b ff ff bc b ffc17ac4 /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); ffc17b0c: 7f a3 eb 78 mr r3,r29 ffc17b10: 4b fe d5 89 bl ffc05098 ffc17b14: 7c 7f 1b 78 mr r31,r3 ffc17b18: 4b ff ff ac b ffc17ac4 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) ffc17b1c: 3d 20 00 00 lis r9,0 ffc17b20: 80 09 27 28 lwz r0,10024(r9) ffc17b24: 2f 80 00 00 cmpwi cr7,r0,0 ffc17b28: 41 9e 00 0c beq- cr7,ffc17b34 <== ALWAYS TAKEN new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; ffc17b2c: 3b e0 00 00 li r31,0 ffc17b30: 4b ff ff 94 b ffc17ac4 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) ffc17b34: 3d 20 00 00 lis r9,0 ffc17b38: 80 09 2d 40 lwz r0,11584(r9) ffc17b3c: 2f 80 00 00 cmpwi cr7,r0,0 ffc17b40: 41 9e ff 40 beq+ cr7,ffc17a80 <== ALWAYS TAKEN new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; ffc17b44: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc17b48: 4b ff ff 7c b ffc17ac4 <== NOT EXECUTED * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); ffc17b4c: 7f a3 eb 78 mr r3,r29 ffc17b50: 4b fe d5 49 bl ffc05098 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc17b54: 81 3e 00 04 lwz r9,4(r30) if ( !new_area ) { ffc17b58: 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 */ ffc17b5c: 38 09 ff ff addi r0,r9,-1 ffc17b60: 90 1e 00 04 stw r0,4(r30) if ( !new_area ) { ffc17b64: 41 a2 ff c8 beq- ffc17b2c return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); ffc17b68: 80 01 00 08 lwz r0,8(r1) ffc17b6c: 7f a5 eb 78 mr r5,r29 ffc17b70: 7f 9d 00 40 cmplw cr7,r29,r0 ffc17b74: 40 9d 00 08 ble- cr7,ffc17b7c <== NEVER TAKEN ffc17b78: 7c 05 03 78 mr r5,r0 ffc17b7c: 7f e4 fb 78 mr r4,r31 ffc17b80: 7f 83 e3 78 mr r3,r28 ffc17b84: 4b ff b4 39 bl ffc12fbc free( ptr ); ffc17b88: 7f e3 fb 78 mr r3,r31 ffc17b8c: 4b fe d0 f1 bl ffc04c7c return new_area; ffc17b90: 7f 9f e3 78 mr r31,r28 ffc17b94: 4b ff ff 30 b ffc17ac4 =============================================================================== ffc06458 : #include int rmdir( const char *pathname ) { ffc06458: 94 21 ff b0 stwu r1,-80(r1) ffc0645c: 7c 08 02 a6 mflr r0 ffc06460: 93 e1 00 4c stw r31,76(r1) ffc06464: 7c 7f 1b 78 mr r31,r3 ffc06468: 90 01 00 54 stw r0,84(r1) ffc0646c: 93 61 00 3c stw r27,60(r1) ffc06470: 93 81 00 40 stw r28,64(r1) ffc06474: 93 a1 00 44 stw r29,68(r1) ffc06478: 93 c1 00 48 stw r30,72(r1) /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); ffc0647c: 4b ff ed 0d bl ffc05188 if ( parentpathlen == 0 ) ffc06480: 2c 03 00 00 cmpwi r3,0 ffc06484: 40 82 01 68 bne- ffc065ec rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); ffc06488: 3b c1 00 0c addi r30,r1,12 ffc0648c: 7f e3 fb 78 mr r3,r31 ffc06490: 38 81 00 08 addi r4,r1,8 ffc06494: 7f c5 f3 78 mr r5,r30 ffc06498: 48 00 01 89 bl ffc06620 ffc0649c: 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; ffc064a0: 3b 80 00 00 li r28,0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc064a4: 80 01 00 0c lwz r0,12(r1) name = pathname + parentpathlen; ffc064a8: 7f bf ea 14 add r29,r31,r29 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc064ac: 7f a3 eb 78 mr r3,r29 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc064b0: 90 01 00 20 stw r0,32(r1) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc064b4: 3b e1 00 20 addi r31,r1,32 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc064b8: 80 01 00 10 lwz r0,16(r1) ffc064bc: 90 01 00 24 stw r0,36(r1) ffc064c0: 80 01 00 14 lwz r0,20(r1) ffc064c4: 90 01 00 28 stw r0,40(r1) ffc064c8: 80 01 00 18 lwz r0,24(r1) ffc064cc: 90 01 00 2c stw r0,44(r1) ffc064d0: 80 01 00 1c lwz r0,28(r1) ffc064d4: 90 01 00 30 stw r0,48(r1) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc064d8: 48 00 dd 11 bl ffc141e8 ffc064dc: 7c 64 1b 78 mr r4,r3 ffc064e0: 7f a3 eb 78 mr r3,r29 ffc064e4: 4b ff ed 05 bl ffc051e8 ffc064e8: 7f bd 1a 14 add r29,r29,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc064ec: 7f a3 eb 78 mr r3,r29 ffc064f0: 48 00 dc f9 bl ffc141e8 ffc064f4: 38 a0 00 00 li r5,0 ffc064f8: 7c 64 1b 78 mr r4,r3 ffc064fc: 7f e6 fb 78 mr r6,r31 ffc06500: 7f a3 eb 78 mr r3,r29 ffc06504: 38 e0 00 00 li r7,0 ffc06508: 4b ff eb 59 bl ffc05060 0, &loc, false ); if ( result != 0 ) { ffc0650c: 2f 83 00 00 cmpwi cr7,r3,0 ffc06510: 40 9e 00 74 bne- cr7,ffc06584 } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { ffc06514: 81 21 00 2c lwz r9,44(r1) ffc06518: 7f e3 fb 78 mr r3,r31 ffc0651c: 80 09 00 10 lwz r0,16(r9) ffc06520: 7c 09 03 a6 mtctr r0 ffc06524: 4e 80 04 21 bctrl ffc06528: 2f 83 00 01 cmpwi cr7,r3,1 ffc0652c: 40 9e 00 94 bne- cr7,ffc065c0 /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); ffc06530: 81 21 00 28 lwz r9,40(r1) ffc06534: 7f e4 fb 78 mr r4,r31 ffc06538: 7f c3 f3 78 mr r3,r30 ffc0653c: 80 09 00 34 lwz r0,52(r9) ffc06540: 7c 09 03 a6 mtctr r0 ffc06544: 4e 80 04 21 bctrl ffc06548: 7c 7b 1b 78 mr r27,r3 rtems_filesystem_freenode( &loc ); ffc0654c: 7f e3 fb 78 mr r3,r31 ffc06550: 4b ff ed 19 bl ffc05268 if ( free_parentloc ) ffc06554: 2f 9c 00 00 cmpwi cr7,r28,0 ffc06558: 40 9e 00 38 bne- cr7,ffc06590 rtems_filesystem_freenode( &parentloc ); return result; } ffc0655c: 80 01 00 54 lwz r0,84(r1) ffc06560: 7f 63 db 78 mr r3,r27 ffc06564: 83 81 00 40 lwz r28,64(r1) ffc06568: 7c 08 03 a6 mtlr r0 ffc0656c: 83 61 00 3c lwz r27,60(r1) ffc06570: 83 a1 00 44 lwz r29,68(r1) ffc06574: 83 c1 00 48 lwz r30,72(r1) ffc06578: 83 e1 00 4c lwz r31,76(r1) ffc0657c: 38 21 00 50 addi r1,r1,80 ffc06580: 4e 80 00 20 blr 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 ) ffc06584: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_filesystem_freenode( &parentloc ); return -1; ffc06588: 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 ) ffc0658c: 41 9e ff d0 beq+ cr7,ffc0655c result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); ffc06590: 7f c3 f3 78 mr r3,r30 ffc06594: 4b ff ec d5 bl ffc05268 return result; } ffc06598: 80 01 00 54 lwz r0,84(r1) ffc0659c: 7f 63 db 78 mr r3,r27 ffc065a0: 83 81 00 40 lwz r28,64(r1) ffc065a4: 7c 08 03 a6 mtlr r0 ffc065a8: 83 61 00 3c lwz r27,60(r1) ffc065ac: 83 a1 00 44 lwz r29,68(r1) ffc065b0: 83 c1 00 48 lwz r30,72(r1) ffc065b4: 83 e1 00 4c lwz r31,76(r1) ffc065b8: 38 21 00 50 addi r1,r1,80 ffc065bc: 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 ); ffc065c0: 7f e3 fb 78 mr r3,r31 ffc065c4: 4b ff ec a5 bl ffc05268 if ( free_parentloc ) ffc065c8: 2f 9c 00 00 cmpwi cr7,r28,0 ffc065cc: 41 be 00 0c beq+ cr7,ffc065d8 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); ffc065d0: 7f c3 f3 78 mr r3,r30 ffc065d4: 4b ff ec 95 bl ffc05268 rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc065d8: 48 00 ca 71 bl ffc13048 <__errno> ffc065dc: 38 00 00 14 li r0,20 ffc065e0: 90 03 00 00 stw r0,0(r3) ffc065e4: 3b 60 ff ff li r27,-1 ffc065e8: 4b ff ff 74 b ffc0655c parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, ffc065ec: 7c 7d 1b 78 mr r29,r3 ffc065f0: 3b c1 00 0c addi r30,r1,12 ffc065f4: 7f e3 fb 78 mr r3,r31 ffc065f8: 7f a4 eb 78 mr r4,r29 ffc065fc: 38 a0 00 02 li r5,2 ffc06600: 7f c6 f3 78 mr r6,r30 ffc06604: 38 e0 00 00 li r7,0 ffc06608: 4b ff eb 05 bl ffc0510c RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) return -1; ffc0660c: 3b 60 ff ff li r27,-1 else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) ffc06610: 2f 83 00 00 cmpwi cr7,r3,0 ffc06614: 40 be ff 48 bne- cr7,ffc0655c <== NEVER TAKEN return -1; free_parentloc = true; ffc06618: 3b 80 00 01 li r28,1 ffc0661c: 4b ff fe 88 b ffc064a4 =============================================================================== ffc11be8 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc11be8: 94 21 ff e0 stwu r1,-32(r1) ffc11bec: 7c 08 02 a6 mflr r0 ffc11bf0: 90 01 00 24 stw r0,36(r1) ffc11bf4: 38 00 00 20 li r0,32 ffc11bf8: 93 81 00 10 stw r28,16(r1) ffc11bfc: 7c 7c 1b 78 mr r28,r3 ffc11c00: 93 a1 00 14 stw r29,20(r1) uint32_t b; uint32_t local_value = 0; ffc11c04: 3b a0 00 00 li r29,0 uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc11c08: 93 c1 00 18 stw r30,24(r1) ffc11c0c: 7c 9e 23 78 mr r30,r4 ffc11c10: 93 e1 00 1c stw r31,28(r1) uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ffc11c14: 3b e0 00 01 li r31,1 uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc11c18: 90 01 00 08 stw r0,8(r1) ffc11c1c: 48 00 00 18 b ffc11c34 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ffc11c20: 80 01 00 08 lwz r0,8(r1) ffc11c24: 57 ff 08 3c rlwinm r31,r31,1,0,30 ffc11c28: 35 20 ff ff addic. r9,r0,-1 ffc11c2c: 91 21 00 08 stw r9,8(r1) ffc11c30: 41 82 00 30 beq- ffc11c60 if (b & remote_value) ffc11c34: 7f e9 f0 39 and. r9,r31,r30 ffc11c38: 41 82 ff e8 beq+ ffc11c20 local_value |= rtems_assoc_local_by_remote(ap, b); ffc11c3c: 7f e4 fb 78 mr r4,r31 ffc11c40: 7f 83 e3 78 mr r3,r28 ffc11c44: 48 00 00 41 bl ffc11c84 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ffc11c48: 80 01 00 08 lwz r0,8(r1) if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); ffc11c4c: 7f bd 1b 78 or r29,r29,r3 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ffc11c50: 35 20 ff ff addic. r9,r0,-1 ffc11c54: 57 ff 08 3c rlwinm r31,r31,1,0,30 ffc11c58: 91 21 00 08 stw r9,8(r1) ffc11c5c: 40 82 ff d8 bne+ ffc11c34 <== ALWAYS TAKEN if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } ffc11c60: 80 01 00 24 lwz r0,36(r1) ffc11c64: 7f a3 eb 78 mr r3,r29 ffc11c68: 83 81 00 10 lwz r28,16(r1) ffc11c6c: 7c 08 03 a6 mtlr r0 ffc11c70: 83 a1 00 14 lwz r29,20(r1) ffc11c74: 83 c1 00 18 lwz r30,24(r1) ffc11c78: 83 e1 00 1c lwz r31,28(r1) ffc11c7c: 38 21 00 20 addi r1,r1,32 ffc11c80: 4e 80 00 20 blr =============================================================================== ffc15b44 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ffc15b44: 94 21 ff f0 stwu r1,-16(r1) ffc15b48: 7c 08 02 a6 mflr r0 ffc15b4c: 90 01 00 14 stw r0,20(r1) ffc15b50: 93 e1 00 0c stw r31,12(r1) ffc15b54: 7c 7f 1b 78 mr r31,r3 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc15b58: 80 63 00 00 lwz r3,0(r3) const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ffc15b5c: 93 c1 00 08 stw r30,8(r1) ffc15b60: 7c 9e 23 78 mr r30,r4 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc15b64: 2f 83 00 00 cmpwi cr7,r3,0 ffc15b68: 41 9e 00 94 beq- cr7,ffc15bfc ffc15b6c: 3c 80 ff c3 lis r4,-61 ffc15b70: 38 84 9f d8 addi r4,r4,-24616 ffc15b74: 48 00 51 21 bl ffc1ac94 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; ffc15b78: 39 20 00 00 li r9,0 if (rtems_assoc_is_default(ap)) ffc15b7c: 2f 83 00 00 cmpwi cr7,r3,0 ffc15b80: 40 9e 00 34 bne- cr7,ffc15bb4 default_ap = ap++; for ( ; ap->name; ap++) ffc15b84: 81 3f 00 0c lwz r9,12(r31) ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; ffc15b88: 38 1f 00 0c addi r0,r31,12 for ( ; ap->name; ap++) ffc15b8c: 2f 89 00 00 cmpwi cr7,r9,0 ffc15b90: 41 9e 00 30 beq- cr7,ffc15bc0 <== NEVER TAKEN ffc15b94: 7f e9 fb 78 mr r9,r31 ffc15b98: 7c 1f 03 78 mr r31,r0 if (ap->local_value == local_value) ffc15b9c: 80 1f 00 04 lwz r0,4(r31) ffc15ba0: 7f 80 f0 00 cmpw cr7,r0,r30 ffc15ba4: 41 9e 00 1c beq- cr7,ffc15bc0 <== NEVER TAKEN const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc15ba8: 84 1f 00 0c lwzu r0,12(r31) ffc15bac: 2f 80 00 00 cmpwi cr7,r0,0 ffc15bb0: 41 9e 00 2c beq- cr7,ffc15bdc if (ap->local_value == local_value) ffc15bb4: 80 1f 00 04 lwz r0,4(r31) ffc15bb8: 7f 80 f0 00 cmpw cr7,r0,r30 ffc15bbc: 40 9e ff ec bne+ cr7,ffc15ba8 return ap; return default_ap; } ffc15bc0: 80 01 00 14 lwz r0,20(r1) ffc15bc4: 7f e3 fb 78 mr r3,r31 ffc15bc8: 83 c1 00 08 lwz r30,8(r1) ffc15bcc: 7c 08 03 a6 mtlr r0 ffc15bd0: 83 e1 00 0c lwz r31,12(r1) ffc15bd4: 38 21 00 10 addi r1,r1,16 ffc15bd8: 4e 80 00 20 blr ffc15bdc: 80 01 00 14 lwz r0,20(r1) const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc15be0: 7d 3f 4b 78 mr r31,r9 if (ap->local_value == local_value) return ap; return default_ap; } ffc15be4: 7f e3 fb 78 mr r3,r31 ffc15be8: 83 c1 00 08 lwz r30,8(r1) ffc15bec: 7c 08 03 a6 mtlr r0 ffc15bf0: 83 e1 00 0c lwz r31,12(r1) ffc15bf4: 38 21 00 10 addi r1,r1,16 ffc15bf8: 4e 80 00 20 blr ffc15bfc: 80 01 00 14 lwz r0,20(r1) 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; ffc15c00: 3b e0 00 00 li r31,0 for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } ffc15c04: 7f e3 fb 78 mr r3,r31 ffc15c08: 83 c1 00 08 lwz r30,8(r1) ffc15c0c: 7c 08 03 a6 mtlr r0 ffc15c10: 83 e1 00 0c lwz r31,12(r1) ffc15c14: 38 21 00 10 addi r1,r1,16 ffc15c18: 4e 80 00 20 blr =============================================================================== ffc05970 : const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { ffc05970: 94 21 ff e8 stwu r1,-24(r1) ffc05974: 7c 08 02 a6 mflr r0 ffc05978: 90 01 00 1c stw r0,28(r1) ffc0597c: 93 e1 00 14 stw r31,20(r1) const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc05980: 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 ) { ffc05984: 93 a1 00 0c stw r29,12(r1) ffc05988: 7c 9d 23 78 mr r29,r4 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc0598c: 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 ) { ffc05990: 93 c1 00 10 stw r30,16(r1) ffc05994: 7c 7e 1b 78 mr r30,r3 ffc05998: 93 81 00 08 stw r28,8(r1) const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc0599c: 41 9e 00 b8 beq- cr7,ffc05a54 ffc059a0: 3c 80 ff c2 lis r4,-62 ffc059a4: 7f e3 fb 78 mr r3,r31 ffc059a8: 38 84 9d 48 addi r4,r4,-25272 ffc059ac: 48 00 ec 55 bl ffc14600 const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { const rtems_assoc_t *default_ap = 0; ffc059b0: 3b 80 00 00 li r28,0 if (rtems_assoc_is_default(ap)) ffc059b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc059b8: 40 9e 00 3c bne- cr7,ffc059f4 default_ap = ap++; for ( ; ap->name; ap++) ffc059bc: 83 fe 00 0c lwz r31,12(r30) ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; ffc059c0: 38 1e 00 0c addi r0,r30,12 for ( ; ap->name; ap++) ffc059c4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc059c8: 41 9e 00 40 beq- cr7,ffc05a08 <== NEVER TAKEN if (strcmp(ap->name, name) == 0) ffc059cc: 7f e3 fb 78 mr r3,r31 ffc059d0: 7f a4 eb 78 mr r4,r29 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc059d4: 7f dc f3 78 mr r28,r30 ffc059d8: 7c 1e 03 78 mr r30,r0 if (strcmp(ap->name, name) == 0) ffc059dc: 48 00 ec 25 bl ffc14600 ffc059e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc059e4: 41 9e 00 24 beq- cr7,ffc05a08 <== NEVER TAKEN const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc059e8: 87 fe 00 0c lwzu r31,12(r30) ffc059ec: 2f 9f 00 00 cmpwi cr7,r31,0 ffc059f0: 41 9e 00 3c beq- cr7,ffc05a2c if (strcmp(ap->name, name) == 0) ffc059f4: 7f e3 fb 78 mr r3,r31 ffc059f8: 7f a4 eb 78 mr r4,r29 ffc059fc: 48 00 ec 05 bl ffc14600 ffc05a00: 2f 83 00 00 cmpwi cr7,r3,0 ffc05a04: 40 9e ff e4 bne+ cr7,ffc059e8 return ap; return default_ap; } ffc05a08: 80 01 00 1c lwz r0,28(r1) ffc05a0c: 7f c3 f3 78 mr r3,r30 ffc05a10: 83 81 00 08 lwz r28,8(r1) ffc05a14: 7c 08 03 a6 mtlr r0 ffc05a18: 83 a1 00 0c lwz r29,12(r1) ffc05a1c: 83 c1 00 10 lwz r30,16(r1) ffc05a20: 83 e1 00 14 lwz r31,20(r1) ffc05a24: 38 21 00 18 addi r1,r1,24 ffc05a28: 4e 80 00 20 blr ffc05a2c: 80 01 00 1c lwz r0,28(r1) const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc05a30: 7f 9e e3 78 mr r30,r28 if (strcmp(ap->name, name) == 0) return ap; return default_ap; } ffc05a34: 7f c3 f3 78 mr r3,r30 ffc05a38: 83 81 00 08 lwz r28,8(r1) ffc05a3c: 7c 08 03 a6 mtlr r0 ffc05a40: 83 a1 00 0c lwz r29,12(r1) ffc05a44: 83 c1 00 10 lwz r30,16(r1) ffc05a48: 83 e1 00 14 lwz r31,20(r1) ffc05a4c: 38 21 00 18 addi r1,r1,24 ffc05a50: 4e 80 00 20 blr ffc05a54: 80 01 00 1c lwz r0,28(r1) const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { const rtems_assoc_t *default_ap = 0; ffc05a58: 3b c0 00 00 li r30,0 for ( ; ap->name; ap++) if (strcmp(ap->name, name) == 0) return ap; return default_ap; } ffc05a5c: 7f c3 f3 78 mr r3,r30 ffc05a60: 83 81 00 08 lwz r28,8(r1) ffc05a64: 7c 08 03 a6 mtlr r0 ffc05a68: 83 a1 00 0c lwz r29,12(r1) ffc05a6c: 83 c1 00 10 lwz r30,16(r1) ffc05a70: 83 e1 00 14 lwz r31,20(r1) ffc05a74: 38 21 00 18 addi r1,r1,24 ffc05a78: 4e 80 00 20 blr =============================================================================== ffc11cb4 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc11cb4: 94 21 ff f0 stwu r1,-16(r1) ffc11cb8: 7c 08 02 a6 mflr r0 ffc11cbc: 90 01 00 14 stw r0,20(r1) ffc11cc0: 93 e1 00 0c stw r31,12(r1) ffc11cc4: 7c 7f 1b 78 mr r31,r3 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc11cc8: 80 63 00 00 lwz r3,0(r3) const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc11ccc: 93 c1 00 08 stw r30,8(r1) ffc11cd0: 7c 9e 23 78 mr r30,r4 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc11cd4: 2f 83 00 00 cmpwi cr7,r3,0 ffc11cd8: 41 9e 00 94 beq- cr7,ffc11d6c ffc11cdc: 3c 80 ff c2 lis r4,-62 ffc11ce0: 38 84 92 48 addi r4,r4,-28088 ffc11ce4: 48 00 17 3d bl ffc13420 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; ffc11ce8: 39 20 00 00 li r9,0 if (rtems_assoc_is_default(ap)) ffc11cec: 2f 83 00 00 cmpwi cr7,r3,0 ffc11cf0: 40 9e 00 34 bne- cr7,ffc11d24 default_ap = ap++; for ( ; ap->name; ap++) ffc11cf4: 81 3f 00 0c lwz r9,12(r31) ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; ffc11cf8: 38 1f 00 0c addi r0,r31,12 for ( ; ap->name; ap++) ffc11cfc: 2f 89 00 00 cmpwi cr7,r9,0 ffc11d00: 41 9e 00 30 beq- cr7,ffc11d30 <== NEVER TAKEN ffc11d04: 7f e9 fb 78 mr r9,r31 ffc11d08: 7c 1f 03 78 mr r31,r0 if (ap->remote_value == remote_value) ffc11d0c: 80 1f 00 08 lwz r0,8(r31) ffc11d10: 7f 80 f0 00 cmpw cr7,r0,r30 ffc11d14: 41 9e 00 1c beq- cr7,ffc11d30 <== NEVER TAKEN const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc11d18: 84 1f 00 0c lwzu r0,12(r31) ffc11d1c: 2f 80 00 00 cmpwi cr7,r0,0 ffc11d20: 41 9e 00 2c beq- cr7,ffc11d4c if (ap->remote_value == remote_value) ffc11d24: 80 1f 00 08 lwz r0,8(r31) ffc11d28: 7f 80 f0 00 cmpw cr7,r0,r30 ffc11d2c: 40 9e ff ec bne+ cr7,ffc11d18 return ap; return default_ap; } ffc11d30: 80 01 00 14 lwz r0,20(r1) ffc11d34: 7f e3 fb 78 mr r3,r31 ffc11d38: 83 c1 00 08 lwz r30,8(r1) ffc11d3c: 7c 08 03 a6 mtlr r0 ffc11d40: 83 e1 00 0c lwz r31,12(r1) ffc11d44: 38 21 00 10 addi r1,r1,16 ffc11d48: 4e 80 00 20 blr ffc11d4c: 80 01 00 14 lwz r0,20(r1) const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc11d50: 7d 3f 4b 78 mr r31,r9 if (ap->remote_value == remote_value) return ap; return default_ap; } ffc11d54: 7f e3 fb 78 mr r3,r31 ffc11d58: 83 c1 00 08 lwz r30,8(r1) ffc11d5c: 7c 08 03 a6 mtlr r0 ffc11d60: 83 e1 00 0c lwz r31,12(r1) ffc11d64: 38 21 00 10 addi r1,r1,16 ffc11d68: 4e 80 00 20 blr ffc11d6c: 80 01 00 14 lwz r0,20(r1) 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; ffc11d70: 3b e0 00 00 li r31,0 for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } ffc11d74: 7f e3 fb 78 mr r3,r31 ffc11d78: 83 c1 00 08 lwz r30,8(r1) ffc11d7c: 7c 08 03 a6 mtlr r0 ffc11d80: 83 e1 00 0c lwz r31,12(r1) ffc11d84: 38 21 00 10 addi r1,r1,16 ffc11d88: 4e 80 00 20 blr =============================================================================== ffc05b54 : uint32_t rtems_assoc_remote_by_local_bitfield( const rtems_assoc_t *ap, uint32_t local_value ) { ffc05b54: 94 21 ff e0 stwu r1,-32(r1) ffc05b58: 7c 08 02 a6 mflr r0 ffc05b5c: 90 01 00 24 stw r0,36(r1) ffc05b60: 38 00 00 20 li r0,32 ffc05b64: 93 81 00 10 stw r28,16(r1) ffc05b68: 7c 7c 1b 78 mr r28,r3 ffc05b6c: 93 a1 00 14 stw r29,20(r1) uint32_t b; uint32_t remote_value = 0; ffc05b70: 3b a0 00 00 li r29,0 uint32_t rtems_assoc_remote_by_local_bitfield( const rtems_assoc_t *ap, uint32_t local_value ) { ffc05b74: 93 c1 00 18 stw r30,24(r1) ffc05b78: 7c 9e 23 78 mr r30,r4 ffc05b7c: 93 e1 00 1c stw r31,28(r1) uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) ffc05b80: 3b e0 00 01 li r31,1 uint32_t rtems_assoc_remote_by_local_bitfield( const rtems_assoc_t *ap, uint32_t local_value ) { ffc05b84: 90 01 00 08 stw r0,8(r1) ffc05b88: 48 00 00 18 b ffc05ba0 uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) ffc05b8c: 80 01 00 08 lwz r0,8(r1) ffc05b90: 57 ff 08 3c rlwinm r31,r31,1,0,30 ffc05b94: 35 20 ff ff addic. r9,r0,-1 ffc05b98: 91 21 00 08 stw r9,8(r1) ffc05b9c: 41 82 00 30 beq- ffc05bcc if (b & local_value) ffc05ba0: 7f e9 f0 39 and. r9,r31,r30 ffc05ba4: 41 82 ff e8 beq+ ffc05b8c remote_value |= rtems_assoc_remote_by_local(ap, b); ffc05ba8: 7f e4 fb 78 mr r4,r31 ffc05bac: 7f 83 e3 78 mr r3,r28 ffc05bb0: 48 00 00 41 bl ffc05bf0 ) { uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) ffc05bb4: 80 01 00 08 lwz r0,8(r1) if (b & local_value) remote_value |= rtems_assoc_remote_by_local(ap, b); ffc05bb8: 7f bd 1b 78 or r29,r29,r3 ) { uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) ffc05bbc: 35 20 ff ff addic. r9,r0,-1 ffc05bc0: 57 ff 08 3c rlwinm r31,r31,1,0,30 ffc05bc4: 91 21 00 08 stw r9,8(r1) ffc05bc8: 40 82 ff d8 bne+ ffc05ba0 <== ALWAYS TAKEN if (b & local_value) remote_value |= rtems_assoc_remote_by_local(ap, b); return remote_value; } ffc05bcc: 80 01 00 24 lwz r0,36(r1) ffc05bd0: 7f a3 eb 78 mr r3,r29 ffc05bd4: 83 81 00 10 lwz r28,16(r1) ffc05bd8: 7c 08 03 a6 mtlr r0 ffc05bdc: 83 a1 00 14 lwz r29,20(r1) ffc05be0: 83 c1 00 18 lwz r30,24(r1) ffc05be4: 83 e1 00 1c lwz r31,28(r1) ffc05be8: 38 21 00 20 addi r1,r1,32 ffc05bec: 4e 80 00 20 blr =============================================================================== ffc12dfc : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { ffc12dfc: 94 21 ff d0 stwu r1,-48(r1) ffc12e00: 7c 08 02 a6 mflr r0 ffc12e04: 93 e1 00 2c stw r31,44(r1) Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) ffc12e08: 7c 7f 1b 79 mr. r31,r3 return RTEMS_INVALID_NAME; ffc12e0c: 38 60 00 03 li r3,3 rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { ffc12e10: 93 a1 00 24 stw r29,36(r1) ffc12e14: 7c dd 33 78 mr r29,r6 ffc12e18: 90 01 00 34 stw r0,52(r1) ffc12e1c: 93 81 00 20 stw r28,32(r1) ffc12e20: 93 c1 00 28 stw r30,40(r1) Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) ffc12e24: 41 82 00 90 beq- ffc12eb4 return RTEMS_INVALID_NAME; if ( !id ) ffc12e28: 2f 86 00 00 cmpwi cr7,r6,0 return RTEMS_INVALID_ADDRESS; ffc12e2c: 38 60 00 09 li r3,9 CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) ffc12e30: 41 9e 00 84 beq- cr7,ffc12eb4 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { ffc12e34: 70 80 00 10 andi. r0,r4,16 ffc12e38: 41 82 00 9c beq- ffc12ed4 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) ffc12e3c: 2f 85 00 00 cmpwi cr7,r5,0 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; ffc12e40: 38 00 00 00 li r0,0 ffc12e44: 90 01 00 08 stw r0,8(r1) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; ffc12e48: 38 60 00 0a li r3,10 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) ffc12e4c: 41 9e 00 68 beq- cr7,ffc12eb4 ffc12e50: 3d 20 00 00 lis r9,0 return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; ffc12e54: 90 a1 00 0c stw r5,12(r1) ffc12e58: 81 69 27 48 lwz r11,10056(r9) ffc12e5c: 38 0b 00 01 addi r0,r11,1 ffc12e60: 90 09 27 48 stw r0,10056(r9) * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); ffc12e64: 3f 80 00 00 lis r28,0 ffc12e68: 90 81 00 18 stw r4,24(r1) ffc12e6c: 3b 9c 2d c0 addi r28,r28,11712 ffc12e70: 7f 83 e3 78 mr r3,r28 ffc12e74: 4b ff a4 51 bl ffc0d2c4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { ffc12e78: 80 81 00 18 lwz r4,24(r1) ffc12e7c: 7c 7e 1b 79 mr. r30,r3 ffc12e80: 41 82 00 90 beq- ffc12f10 <== NEVER TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; ffc12e84: 90 9e 00 10 stw r4,16(r30) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); ffc12e88: 38 7e 00 14 addi r3,r30,20 ffc12e8c: 38 81 00 08 addi r4,r1,8 ffc12e90: 48 00 0a d1 bl ffc13960 <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc12e94: 80 1e 00 08 lwz r0,8(r30) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc12e98: 81 7c 00 1c lwz r11,28(r28) ffc12e9c: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc12ea0: 7f cb 49 2e stwx r30,r11,r9 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc12ea4: 93 fe 00 0c stw r31,12(r30) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; ffc12ea8: 90 1d 00 00 stw r0,0(r29) _Thread_Enable_dispatch(); ffc12eac: 4b ff b9 51 bl ffc0e7fc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc12eb0: 38 60 00 00 li r3,0 } ffc12eb4: 80 01 00 34 lwz r0,52(r1) ffc12eb8: 83 81 00 20 lwz r28,32(r1) ffc12ebc: 7c 08 03 a6 mtlr r0 ffc12ec0: 83 a1 00 24 lwz r29,36(r1) ffc12ec4: 83 c1 00 28 lwz r30,40(r1) ffc12ec8: 83 e1 00 2c lwz r31,44(r1) ffc12ecc: 38 21 00 30 addi r1,r1,48 ffc12ed0: 4e 80 00 20 blr ffc12ed4: 3d 20 00 00 lis r9,0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; ffc12ed8: 90 a1 00 0c stw r5,12(r1) if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; ffc12edc: 38 00 00 01 li r0,1 ffc12ee0: 81 69 27 48 lwz r11,10056(r9) ffc12ee4: 90 01 00 08 stw r0,8(r1) ffc12ee8: 38 0b 00 01 addi r0,r11,1 ffc12eec: 90 09 27 48 stw r0,10056(r9) ffc12ef0: 3f 80 00 00 lis r28,0 ffc12ef4: 90 81 00 18 stw r4,24(r1) ffc12ef8: 3b 9c 2d c0 addi r28,r28,11712 ffc12efc: 7f 83 e3 78 mr r3,r28 ffc12f00: 4b ff a3 c5 bl ffc0d2c4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { ffc12f04: 80 81 00 18 lwz r4,24(r1) ffc12f08: 7c 7e 1b 79 mr. r30,r3 ffc12f0c: 40 82 ff 78 bne+ ffc12e84 _Thread_Enable_dispatch(); ffc12f10: 4b ff b8 ed bl ffc0e7fc <_Thread_Enable_dispatch> *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc12f14: 80 01 00 34 lwz r0,52(r1) the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; ffc12f18: 38 60 00 05 li r3,5 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc12f1c: 83 81 00 20 lwz r28,32(r1) ffc12f20: 7c 08 03 a6 mtlr r0 ffc12f24: 83 a1 00 24 lwz r29,36(r1) ffc12f28: 83 c1 00 28 lwz r30,40(r1) ffc12f2c: 83 e1 00 2c lwz r31,44(r1) ffc12f30: 38 21 00 30 addi r1,r1,48 ffc12f34: 4e 80 00 20 blr =============================================================================== ffc0436c : size_t length ) { const char *p; if ( !name ) ffc0436c: 2f 83 00 00 cmpwi cr7,r3,0 const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { ffc04370: 94 21 ff f0 stwu r1,-16(r1) ffc04374: 7c 08 02 a6 mflr r0 ffc04378: 90 01 00 14 stw r0,20(r1) const char *p; if ( !name ) ffc0437c: 40 9e 00 1c bne- cr7,ffc04398 value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); if ( !p ) return NULL; ffc04380: 38 80 00 00 li r4,0 copy_string( p, value, length ); return value; } ffc04384: 80 01 00 14 lwz r0,20(r1) ffc04388: 7c 83 23 78 mr r3,r4 ffc0438c: 38 21 00 10 addi r1,r1,16 ffc04390: 7c 08 03 a6 mtlr r0 ffc04394: 4e 80 00 20 blr const char *p; if ( !name ) return NULL; if ( !value ) ffc04398: 2f 84 00 00 cmpwi cr7,r4,0 ffc0439c: 41 9e ff e8 beq+ cr7,ffc04384 return NULL; if ( !length ) ffc043a0: 2f 85 00 00 cmpwi cr7,r5,0 ffc043a4: 41 9e ff dc beq+ cr7,ffc04380 return NULL; value[0] = '\0'; ffc043a8: 38 00 00 00 li r0,0 ffc043ac: 98 04 00 00 stb r0,0(r4) p = rtems_bsp_cmdline_get_param_raw( name ); ffc043b0: 90 81 00 08 stw r4,8(r1) ffc043b4: 90 a1 00 0c stw r5,12(r1) ffc043b8: 48 00 00 81 bl ffc04438 if ( !p ) ffc043bc: 2c 03 00 00 cmpwi r3,0 ffc043c0: 80 81 00 08 lwz r4,8(r1) ffc043c4: 80 a1 00 0c lwz r5,12(r1) ffc043c8: 41 a2 ff b8 beq- ffc04380 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<== NEVER TAKEN ffc043d8: 34 a5 ff ff addic. r5,r5,-1 ffc043dc: 41 a2 ff a8 beq- ffc04384 <== NEVER TAKEN ffc043e0: 39 60 00 00 li r11,0 if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) break; value[i++] = *p++; value[i] = '\0'; ffc043e4: 7c a9 03 a6 mtctr r5 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes=0; for (i=0 ; *p && i ffc04400: 41 be ff 84 beq- cr7,ffc04384 break; value[i++] = *p++; ffc04404: 39 29 00 01 addi r9,r9,1 ffc04408: 7c 04 59 ae stbx r0,r4,r11 ffc0440c: 7d 2b 4b 78 mr r11,r9 value[i] = '\0'; ffc04410: 7d 04 49 ae stbx r8,r4,r9 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i ffc04420: 42 40 ff 64 bdz+ ffc04384 if ( *p == '\"' ) { ffc04424: 2f 80 00 22 cmpwi cr7,r0,34 quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) ffc04428: 71 47 00 01 andi. r7,r10,1 int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; ffc04430: 39 4a 00 01 addi r10,r10,1 ffc04434: 4b ff ff d0 b ffc04404 =============================================================================== ffc09f04 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { ffc09f04: 94 21 ff f0 stwu r1,-16(r1) ffc09f08: 7c 08 02 a6 mflr r0 ffc09f0c: 93 c1 00 08 stw r30,8(r1) ffc09f10: 7c de 33 78 mr r30,r6 ffc09f14: 93 e1 00 0c stw r31,12(r1) ffc09f18: 7c bf 2b 78 mr r31,r5 ffc09f1c: 90 01 00 14 stw r0,20(r1) RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); ffc09f20: 48 00 07 5d bl ffc0a67c <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { ffc09f24: 2f 83 00 00 cmpwi cr7,r3,0 rtems_chain_node *node, rtems_id task, rtems_event_set events ) { rtems_status_code sc = RTEMS_SUCCESSFUL; ffc09f28: 38 60 00 00 li r3,0 bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { ffc09f2c: 41 be 00 10 beq+ cr7,ffc09f3c <== NEVER TAKEN sc = rtems_event_send( task, events ); ffc09f30: 7f e3 fb 78 mr r3,r31 ffc09f34: 7f c4 f3 78 mr r4,r30 ffc09f38: 4b ff f2 01 bl ffc09138 } return sc; } ffc09f3c: 80 01 00 14 lwz r0,20(r1) ffc09f40: 83 c1 00 08 lwz r30,8(r1) ffc09f44: 7c 08 03 a6 mtlr r0 ffc09f48: 83 e1 00 0c lwz r31,12(r1) ffc09f4c: 38 21 00 10 addi r1,r1,16 ffc09f50: 4e 80 00 20 blr =============================================================================== ffc09fa8 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { ffc09fa8: 94 21 ff d0 stwu r1,-48(r1) ffc09fac: 7c 08 02 a6 mflr r0 ffc09fb0: 93 e1 00 2c stw r31,44(r1) ffc09fb4: 90 01 00 34 stw r0,52(r1) ffc09fb8: 93 41 00 18 stw r26,24(r1) ffc09fbc: 7c da 33 78 mr r26,r6 ffc09fc0: 93 61 00 1c stw r27,28(r1) ffc09fc4: 7c 7b 1b 78 mr r27,r3 ffc09fc8: 93 81 00 20 stw r28,32(r1) ffc09fcc: 7c 9c 23 78 mr r28,r4 ffc09fd0: 93 a1 00 24 stw r29,36(r1) ffc09fd4: 7c bd 2b 78 mr r29,r5 ffc09fd8: 93 c1 00 28 stw r30,40(r1) while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( ffc09fdc: 3b c1 00 08 addi r30,r1,8 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); ffc09fe0: 7f 63 db 78 mr r3,r27 ffc09fe4: 48 00 07 91 bl ffc0a774 <_Chain_Get> ffc09fe8: 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 ffc09fec: 7c 7f 1b 79 mr. r31,r3 ) { rtems_event_set out; sc = rtems_event_receive( ffc09ff0: 7f a5 eb 78 mr r5,r29 ffc09ff4: 7f c6 f3 78 mr r6,r30 ffc09ff8: 7f 83 e3 78 mr r3,r28 rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ffc09ffc: 40 82 00 3c bne- ffc0a038 ) { rtems_event_set out; sc = rtems_event_receive( ffc0a000: 4b ff ef 35 bl ffc08f34 ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( ffc0a004: 2c 03 00 00 cmpwi r3,0 ffc0a008: 41 82 ff d8 beq+ ffc09fe0 <== NEVER TAKEN } *node_ptr = node; return sc; } ffc0a00c: 80 01 00 34 lwz r0,52(r1) timeout, &out ); } *node_ptr = node; ffc0a010: 93 fa 00 00 stw r31,0(r26) return sc; } ffc0a014: 7c 08 03 a6 mtlr r0 ffc0a018: 83 41 00 18 lwz r26,24(r1) ffc0a01c: 83 61 00 1c lwz r27,28(r1) ffc0a020: 83 81 00 20 lwz r28,32(r1) ffc0a024: 83 a1 00 24 lwz r29,36(r1) ffc0a028: 83 c1 00 28 lwz r30,40(r1) ffc0a02c: 83 e1 00 2c lwz r31,44(r1) ffc0a030: 38 21 00 30 addi r1,r1,48 ffc0a034: 4e 80 00 20 blr ffc0a038: 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 ffc0a03c: 38 60 00 00 li r3,0 timeout, &out ); } *node_ptr = node; ffc0a040: 93 fa 00 00 stw r31,0(r26) return sc; } ffc0a044: 7c 08 03 a6 mtlr r0 ffc0a048: 83 41 00 18 lwz r26,24(r1) ffc0a04c: 83 61 00 1c lwz r27,28(r1) ffc0a050: 83 81 00 20 lwz r28,32(r1) ffc0a054: 83 a1 00 24 lwz r29,36(r1) ffc0a058: 83 c1 00 28 lwz r30,40(r1) ffc0a05c: 83 e1 00 2c lwz r31,44(r1) ffc0a060: 38 21 00 30 addi r1,r1,48 ffc0a064: 4e 80 00 20 blr =============================================================================== ffc0a068 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { ffc0a068: 94 21 ff f0 stwu r1,-16(r1) ffc0a06c: 7c 08 02 a6 mflr r0 ffc0a070: 93 c1 00 08 stw r30,8(r1) ffc0a074: 7c de 33 78 mr r30,r6 ffc0a078: 93 e1 00 0c stw r31,12(r1) ffc0a07c: 7c bf 2b 78 mr r31,r5 ffc0a080: 90 01 00 14 stw r0,20(r1) RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); ffc0a084: 48 00 07 61 bl ffc0a7e4 <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { ffc0a088: 2f 83 00 00 cmpwi cr7,r3,0 rtems_chain_node *node, rtems_id task, rtems_event_set events ) { rtems_status_code sc = RTEMS_SUCCESSFUL; ffc0a08c: 38 60 00 00 li r3,0 bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { ffc0a090: 41 be 00 10 beq+ cr7,ffc0a0a0 <== NEVER TAKEN sc = rtems_event_send( task, events ); ffc0a094: 7f e3 fb 78 mr r3,r31 ffc0a098: 7f c4 f3 78 mr r4,r30 ffc0a09c: 4b ff f0 9d bl ffc09138 } return sc; } ffc0a0a0: 80 01 00 14 lwz r0,20(r1) ffc0a0a4: 83 c1 00 08 lwz r30,8(r1) ffc0a0a8: 7c 08 03 a6 mtlr r0 ffc0a0ac: 83 e1 00 0c lwz r31,12(r1) ffc0a0b0: 38 21 00 10 addi r1,r1,16 ffc0a0b4: 4e 80 00 20 blr =============================================================================== ffc05104 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc05104: 94 21 ff 68 stwu r1,-152(r1) ffc05108: 7c 08 02 a6 mflr r0 ffc0510c: 90 01 00 9c stw r0,156(r1) Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) ffc05110: 7c 80 23 79 mr. r0,r4 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc05114: 93 81 00 88 stw r28,136(r1) ffc05118: 7c 7c 1b 78 mr r28,r3 ffc0511c: 91 c1 00 50 stw r14,80(r1) ffc05120: 91 e1 00 54 stw r15,84(r1) ffc05124: 92 01 00 58 stw r16,88(r1) ffc05128: 92 21 00 5c stw r17,92(r1) ffc0512c: 92 41 00 60 stw r18,96(r1) ffc05130: 92 61 00 64 stw r19,100(r1) ffc05134: 92 81 00 68 stw r20,104(r1) ffc05138: 92 a1 00 6c stw r21,108(r1) ffc0513c: 92 c1 00 70 stw r22,112(r1) ffc05140: 92 e1 00 74 stw r23,116(r1) ffc05144: 93 01 00 78 stw r24,120(r1) ffc05148: 93 21 00 7c stw r25,124(r1) ffc0514c: 93 41 00 80 stw r26,128(r1) ffc05150: 93 61 00 84 stw r27,132(r1) ffc05154: 93 a1 00 8c stw r29,140(r1) ffc05158: 93 c1 00 90 stw r30,144(r1) ffc0515c: 93 e1 00 94 stw r31,148(r1) Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) ffc05160: 90 01 00 48 stw r0,72(r1) ffc05164: 41 82 01 d4 beq- ffc05338 <== NEVER TAKEN * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); ffc05168: 3a 41 00 10 addi r18,r1,16 ffc0516c: 7e 43 93 78 mr r3,r18 ffc05170: 48 00 70 e9 bl ffc0c258 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); ffc05174: 3b 61 00 18 addi r27,r1,24 ffc05178: 3c 60 00 00 lis r3,0 ffc0517c: 38 63 28 44 addi r3,r3,10308 ffc05180: 7e 44 93 78 mr r4,r18 ffc05184: 7f 65 db 78 mr r5,r27 ffc05188: 48 00 9f e1 bl ffc0f168 <_Timespec_Subtract> } } } #endif (*print)( ffc0518c: 80 01 00 48 lwz r0,72(r1) ffc05190: 3c 80 ff c2 lis r4,-62 ffc05194: 7f 83 e3 78 mr r3,r28 ffc05198: 7c 09 03 a6 mtctr r0 ffc0519c: 38 84 10 9c addi r4,r4,4252 ffc051a0: 3e 80 00 01 lis r20,1 ffc051a4: 3a 94 a9 80 addi r20,r20,-22144 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( ffc051a8: 3e e0 ff c2 lis r23,-62 /* * Print the information */ (*print)( context, ffc051ac: 3f 20 ff c2 lis r25,-62 } } } #endif (*print)( ffc051b0: 4c c6 31 82 crclr 4*cr1+eq ffc051b4: 4e 80 04 21 bctrl /* * Print the information */ (*print)( context, ffc051b8: 3f 40 10 62 lis r26,4194 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( ffc051bc: 3e 00 00 00 lis r16,0 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc051c0: 3b a1 00 30 addi r29,r1,48 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc051c4: 3e a0 00 01 lis r21,1 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); ffc051c8: 3a c1 00 0c addi r22,r1,12 /*PAGE * * rtems_cpu_usage_report */ void rtems_cpu_usage_report_with_plugin( ffc051cc: 3a 34 00 0c addi r17,r20,12 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( ffc051d0: 3a f7 12 10 addi r23,r23,4624 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); ffc051d4: 3b 01 00 08 addi r24,r1,8 /* * Print the information */ (*print)( context, ffc051d8: 3b 39 12 24 addi r25,r25,4644 ffc051dc: 63 5a 4d d3 ori r26,r26,19923 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( ffc051e0: 3a 10 28 24 addi r16,r16,10276 ffc051e4: 3a 61 00 28 addi r19,r1,40 "------------+----------------------------------------+---------------+---------\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 ] ) ffc051e8: 85 34 00 04 lwzu r9,4(r20) ffc051ec: 2f 89 00 00 cmpwi cr7,r9,0 ffc051f0: 41 9e 01 0c beq- cr7,ffc052fc continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; ffc051f4: 83 c9 00 04 lwz r30,4(r9) if ( information ) { ffc051f8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc051fc: 41 9e 01 00 beq- cr7,ffc052fc <== NEVER TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { ffc05200: a1 7e 00 10 lhz r11,16(r30) ffc05204: 71 60 ff ff andi. r0,r11,65535 ffc05208: 41 82 00 f4 beq- ffc052fc <== NEVER TAKEN ffc0520c: 3b e0 00 01 li r31,1 ffc05210: 48 00 00 58 b ffc05268 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); ffc05214: 7d c3 73 78 mr r3,r14 ffc05218: 7f 64 db 78 mr r4,r27 ffc0521c: 7f 05 c3 78 mr r5,r24 ffc05220: 7e c6 b3 78 mr r6,r22 ffc05224: 48 00 9e 39 bl ffc0f05c <_Timespec_Divide> /* * Print the information */ (*print)( context, ffc05228: 80 c1 00 24 lwz r6,36(r1) ffc0522c: 80 01 00 48 lwz r0,72(r1) ffc05230: 7f 83 e3 78 mr r3,r28 ffc05234: 7c c6 d0 16 mulhwu r6,r6,r26 ffc05238: 80 a1 00 20 lwz r5,32(r1) ffc0523c: 80 e1 00 08 lwz r7,8(r1) ffc05240: 7c 09 03 a6 mtctr r0 ffc05244: 7f 24 cb 78 mr r4,r25 ffc05248: 81 01 00 0c lwz r8,12(r1) ffc0524c: 54 c6 d1 be rlwinm r6,r6,26,6,31 ffc05250: 4c c6 31 82 crclr 4*cr1+eq ffc05254: 4e 80 04 21 bctrl ffc05258: 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++ ) { ffc0525c: 55 60 04 3e clrlwi r0,r11,16 ffc05260: 7f 80 f8 40 cmplw cr7,r0,r31 ffc05264: 41 9c 00 98 blt- cr7,ffc052fc the_thread = (Thread_Control *)information->local_table[ i ]; ffc05268: 81 3e 00 1c lwz r9,28(r30) ffc0526c: 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 ); ffc05270: 7f a5 eb 78 mr r5,r29 #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 ]; ffc05274: 7d e9 00 2e lwzx r15,r9,r0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc05278: 38 80 00 0d li r4,13 continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { ffc0527c: 3b ff 00 01 addi r31,r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) ffc05280: 2f 8f 00 00 cmpwi cr7,r15,0 ffc05284: 39 c1 00 20 addi r14,r1,32 ffc05288: 41 be ff d4 beq- cr7,ffc0525c <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc0528c: 80 6f 00 08 lwz r3,8(r15) ffc05290: 48 00 54 8d bl ffc0a71c (*print)( ffc05294: 80 01 00 48 lwz r0,72(r1) ffc05298: 7f 83 e3 78 mr r3,r28 ffc0529c: 80 af 00 08 lwz r5,8(r15) ffc052a0: 7c 09 03 a6 mtctr r0 ffc052a4: 7e e4 bb 78 mr r4,r23 ffc052a8: 7f a6 eb 78 mr r6,r29 ffc052ac: 4c c6 31 82 crclr 4*cr1+eq ffc052b0: 4e 80 04 21 bctrl /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc052b4: 39 35 ab b8 addi r9,r21,-21576 ffc052b8: 81 29 00 0c lwz r9,12(r9) ffc052bc: 80 0f 00 08 lwz r0,8(r15) ffc052c0: 81 69 00 08 lwz r11,8(r9) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; ffc052c4: 81 4f 00 88 lwz r10,136(r15) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc052c8: 7f 8b 00 00 cmpw cr7,r11,r0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; ffc052cc: 81 2f 00 84 lwz r9,132(r15) ffc052d0: 91 41 00 24 stw r10,36(r1) ffc052d4: 91 21 00 20 stw r9,32(r1) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc052d8: 40 9e ff 3c bne+ cr7,ffc05214 Timestamp_Control used; _Timestamp_Subtract( ffc052dc: 7e 03 83 78 mr r3,r16 ffc052e0: 7e 44 93 78 mr r4,r18 ffc052e4: 7e 65 9b 78 mr r5,r19 ffc052e8: 48 00 9e 81 bl ffc0f168 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); ffc052ec: 7d c3 73 78 mr r3,r14 ffc052f0: 7e 64 9b 78 mr r4,r19 ffc052f4: 48 00 9d 0d bl ffc0f000 <_Timespec_Add_to> ffc052f8: 4b ff ff 1c b ffc05214 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc052fc: 7f 94 88 00 cmpw cr7,r20,r17 ffc05300: 40 9e fe e8 bne+ cr7,ffc051e8 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( ffc05304: 3c 00 10 62 lis r0,4194 ffc05308: 80 c1 00 1c lwz r6,28(r1) ffc0530c: 60 00 4d d3 ori r0,r0,19923 ffc05310: 80 a1 00 18 lwz r5,24(r1) ffc05314: 7c c6 00 16 mulhwu r6,r6,r0 ffc05318: 80 01 00 48 lwz r0,72(r1) ffc0531c: 3c 80 ff c2 lis r4,-62 ffc05320: 7c 09 03 a6 mtctr r0 ffc05324: 7f 83 e3 78 mr r3,r28 ffc05328: 38 84 12 3c addi r4,r4,4668 ffc0532c: 54 c6 d1 be rlwinm r6,r6,26,6,31 ffc05330: 4c c6 31 82 crclr 4*cr1+eq ffc05334: 4e 80 04 21 bctrl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } ffc05338: 80 01 00 9c lwz r0,156(r1) ffc0533c: 81 c1 00 50 lwz r14,80(r1) ffc05340: 7c 08 03 a6 mtlr r0 ffc05344: 81 e1 00 54 lwz r15,84(r1) ffc05348: 82 01 00 58 lwz r16,88(r1) ffc0534c: 82 21 00 5c lwz r17,92(r1) ffc05350: 82 41 00 60 lwz r18,96(r1) ffc05354: 82 61 00 64 lwz r19,100(r1) ffc05358: 82 81 00 68 lwz r20,104(r1) ffc0535c: 82 a1 00 6c lwz r21,108(r1) ffc05360: 82 c1 00 70 lwz r22,112(r1) ffc05364: 82 e1 00 74 lwz r23,116(r1) ffc05368: 83 01 00 78 lwz r24,120(r1) ffc0536c: 83 21 00 7c lwz r25,124(r1) ffc05370: 83 41 00 80 lwz r26,128(r1) ffc05374: 83 61 00 84 lwz r27,132(r1) ffc05378: 83 81 00 88 lwz r28,136(r1) ffc0537c: 83 a1 00 8c lwz r29,140(r1) ffc05380: 83 c1 00 90 lwz r30,144(r1) ffc05384: 83 e1 00 94 lwz r31,148(r1) ffc05388: 38 21 00 98 addi r1,r1,152 ffc0538c: 4e 80 00 20 blr =============================================================================== ffc12300 : [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { ffc12300: 94 21 ff f0 stwu r1,-16(r1) ffc12304: 7c 08 02 a6 mflr r0 ffc12308: 90 01 00 14 stw r0,20(r1) if (sc == RTEMS_SUCCESSFUL) { ffc1230c: 7c 60 1b 79 mr. r0,r3 return 0; ffc12310: 38 60 00 00 li r3,0 [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { ffc12314: 93 e1 00 0c stw r31,12(r1) if (sc == RTEMS_SUCCESSFUL) { ffc12318: 40 82 00 18 bne- ffc12330 errno = eno; return -1; } } ffc1231c: 80 01 00 14 lwz r0,20(r1) ffc12320: 83 e1 00 0c lwz r31,12(r1) ffc12324: 38 21 00 10 addi r1,r1,16 ffc12328: 7c 08 03 a6 mtlr r0 ffc1232c: 4e 80 00 20 blr if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { ffc12330: 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; ffc12334: 3b e0 00 16 li r31,22 if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { ffc12338: 41 9d 00 14 bgt- cr7,ffc1234c <== NEVER TAKEN eno = status_code_to_errno [sc]; ffc1233c: 3d 20 ff c2 lis r9,-62 ffc12340: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc12344: 39 29 92 54 addi r9,r9,-28076 ffc12348: 7f e9 00 2e lwzx r31,r9,r0 } errno = eno; ffc1234c: 48 00 00 11 bl ffc1235c <__errno> ffc12350: 93 e3 00 00 stw r31,0(r3) return -1; ffc12354: 38 60 ff ff li r3,-1 ffc12358: 4b ff ff c4 b ffc1231c =============================================================================== ffc0aed8 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { ffc0aed8: 94 21 ff 88 stwu r1,-120(r1) ffc0aedc: 7c 08 02 a6 mflr r0 ffc0aee0: 93 e1 00 74 stw r31,116(r1) ffc0aee4: 7c 7f 1b 78 mr r31,r3 ffc0aee8: 90 01 00 7c stw r0,124(r1) ffc0aeec: 90 a1 00 18 stw r5,24(r1) ffc0aef0: 90 c1 00 1c stw r6,28(r1) ffc0aef4: 90 e1 00 20 stw r7,32(r1) ffc0aef8: 91 01 00 24 stw r8,36(r1) ffc0aefc: 91 21 00 28 stw r9,40(r1) ffc0af00: 91 41 00 2c stw r10,44(r1) ffc0af04: 40 86 00 24 bne- cr1,ffc0af28 <== ALWAYS TAKEN ffc0af08: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0af0c: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0af10: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0af14: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0af18: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0af1c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0af20: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0af24: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); ffc0af28: 38 00 00 02 li r0,2 ffc0af2c: 98 01 00 08 stb r0,8(r1) ffc0af30: 38 00 00 00 li r0,0 chars_written = rtems_verror(error_flag, printf_format, arglist); ffc0af34: 7f e3 fb 78 mr r3,r31 ) { va_list arglist; int chars_written; va_start(arglist, printf_format); ffc0af38: 98 01 00 09 stb r0,9(r1) ffc0af3c: 38 01 00 80 addi r0,r1,128 chars_written = rtems_verror(error_flag, printf_format, arglist); ffc0af40: 38 a1 00 08 addi r5,r1,8 ) { va_list arglist; int chars_written; va_start(arglist, printf_format); ffc0af44: 90 01 00 0c stw r0,12(r1) ffc0af48: 38 01 00 10 addi r0,r1,16 ffc0af4c: 90 01 00 10 stw r0,16(r1) chars_written = rtems_verror(error_flag, printf_format, arglist); ffc0af50: 4b ff fd d5 bl ffc0ad24 va_end(arglist); if (error_flag & RTEMS_ERROR_PANIC) { ffc0af54: 77 e0 20 00 andis. r0,r31,8192 ffc0af58: 40 82 00 20 bne- ffc0af78 rtems_error(0, "fatal error, exiting"); _exit(errno); } if (error_flag & RTEMS_ERROR_ABORT) { ffc0af5c: 77 e0 10 00 andis. r0,r31,4096 ffc0af60: 40 82 00 38 bne- ffc0af98 rtems_error(0, "fatal error, aborting"); abort(); } return chars_written; } ffc0af64: 80 01 00 7c lwz r0,124(r1) ffc0af68: 83 e1 00 74 lwz r31,116(r1) ffc0af6c: 38 21 00 78 addi r1,r1,120 ffc0af70: 7c 08 03 a6 mtlr r0 ffc0af74: 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"); ffc0af78: 3c 80 ff c3 lis r4,-61 ffc0af7c: 38 84 99 f8 addi r4,r4,-26120 ffc0af80: 38 60 00 00 li r3,0 ffc0af84: 4c c6 31 82 crclr 4*cr1+eq ffc0af88: 4b ff ff 51 bl ffc0aed8 _exit(errno); ffc0af8c: 48 00 e6 09 bl ffc19594 <__errno> ffc0af90: 80 63 00 00 lwz r3,0(r3) ffc0af94: 48 00 0e 31 bl ffc0bdc4 <_exit> } if (error_flag & RTEMS_ERROR_ABORT) { rtems_error(0, "fatal error, aborting"); ffc0af98: 3c 80 ff c3 lis r4,-61 ffc0af9c: 38 84 9a 10 addi r4,r4,-26096 ffc0afa0: 38 60 00 00 li r3,0 ffc0afa4: 4c c6 31 82 crclr 4*cr1+eq ffc0afa8: 4b ff ff 31 bl ffc0aed8 abort(); ffc0afac: 48 00 e5 cd bl ffc19578 =============================================================================== ffc04b70 : int rtems_filesystem_dirname( const char *pathname ) { ffc04b70: 94 21 ff f0 stwu r1,-16(r1) ffc04b74: 7c 08 02 a6 mflr r0 ffc04b78: 93 c1 00 08 stw r30,8(r1) ffc04b7c: 7c 7e 1b 78 mr r30,r3 ffc04b80: 93 e1 00 0c stw r31,12(r1) ffc04b84: 90 01 00 14 stw r0,20(r1) int len = strlen( pathname ); ffc04b88: 48 00 ea 5d bl ffc135e4 while ( len ) { ffc04b8c: 7c 7f 1b 79 mr. r31,r3 ffc04b90: 40 a2 00 0c bne+ ffc04b9c <== ALWAYS TAKEN ffc04b94: 48 00 00 20 b ffc04bb4 <== NOT EXECUTED ffc04b98: 41 9a 00 1c beq- cr6,ffc04bb4 len--; ffc04b9c: 3b ff ff ff addi r31,r31,-1 if ( rtems_filesystem_is_separator( pathname[len] ) ) ffc04ba0: 7c 7e f8 ae lbzx r3,r30,r31 ffc04ba4: 48 00 13 65 bl ffc05f08 const char *pathname ) { int len = strlen( pathname ); while ( len ) { ffc04ba8: 2f 1f 00 00 cmpwi cr6,r31,0 len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) ffc04bac: 2f 83 00 00 cmpwi cr7,r3,0 ffc04bb0: 41 9e ff e8 beq+ cr7,ffc04b98 break; } return len; } ffc04bb4: 80 01 00 14 lwz r0,20(r1) ffc04bb8: 7f e3 fb 78 mr r3,r31 ffc04bbc: 83 c1 00 08 lwz r30,8(r1) ffc04bc0: 7c 08 03 a6 mtlr r0 ffc04bc4: 83 e1 00 0c lwz r31,12(r1) ffc04bc8: 38 21 00 10 addi r1,r1,16 ffc04bcc: 4e 80 00 20 blr =============================================================================== ffc0f054 : find_arg fa = { .type = type, .mount_h = NULL }; if ( type != NULL ) { ffc0f054: 2f 83 00 00 cmpwi cr7,r3,0 rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { ffc0f058: 94 21 ff e8 stwu r1,-24(r1) ffc0f05c: 7c 08 02 a6 mflr r0 find_arg fa = { ffc0f060: 90 61 00 08 stw r3,8(r1) .type = type, .mount_h = NULL }; if ( type != NULL ) { ffc0f064: 38 60 00 00 li r3,0 rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { ffc0f068: 90 01 00 1c stw r0,28(r1) find_arg fa = { ffc0f06c: 38 00 00 00 li r0,0 ffc0f070: 90 01 00 0c stw r0,12(r1) .type = type, .mount_h = NULL }; if ( type != NULL ) { ffc0f074: 41 9e 00 18 beq- cr7,ffc0f08c <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); ffc0f078: 3c 60 ff c1 lis r3,-63 ffc0f07c: 38 63 ee f8 addi r3,r3,-4360 ffc0f080: 38 81 00 08 addi r4,r1,8 ffc0f084: 4b ff fe cd bl ffc0ef50 ffc0f088: 80 61 00 0c lwz r3,12(r1) } return fa.mount_h; } ffc0f08c: 80 01 00 1c lwz r0,28(r1) ffc0f090: 38 21 00 18 addi r1,r1,24 ffc0f094: 7c 08 03 a6 mtlr r0 ffc0f098: 4e 80 00 20 blr =============================================================================== ffc04878 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc04878: 94 21 ff c8 stwu r1,-56(r1) ffc0487c: 7c 08 02 a6 mflr r0 rtems_filesystem_umask = 022; /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) ffc04880: 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 ) { ffc04884: 90 01 00 3c stw r0,60(r1) rtems_filesystem_umask = 022; /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) ffc04888: 80 09 26 58 lwz r0,9816(r9) * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc0488c: 93 e1 00 34 stw r31,52(r1) /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; ffc04890: 3f e0 00 00 lis r31,0 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) ffc04894: 2f 80 00 00 cmpwi cr7,r0,0 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; ffc04898: 81 3f 26 a4 lwz r9,9892(r31) ffc0489c: 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 ) { ffc048a0: 93 a1 00 2c stw r29,44(r1) ffc048a4: 93 c1 00 30 stw r30,48(r1) /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; ffc048a8: 90 09 00 2c stw r0,44(r9) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) ffc048ac: 41 9e 01 00 beq- cr7,ffc049ac <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; ffc048b0: 3d 20 00 00 lis r9,0 ffc048b4: 81 29 26 54 lwz r9,9812(r9) status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); ffc048b8: 38 e0 00 00 li r7,0 ffc048bc: 80 69 00 08 lwz r3,8(r9) ffc048c0: 80 89 00 0c lwz r4,12(r9) ffc048c4: 80 a9 00 00 lwz r5,0(r9) ffc048c8: 80 c9 00 04 lwz r6,4(r9) ffc048cc: 48 00 0a e1 bl ffc053ac if ( status == -1 ) ffc048d0: 2f 83 ff ff cmpwi cr7,r3,-1 ffc048d4: 41 9e 00 f0 beq- cr7,ffc049c4 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; ffc048d8: 81 3f 26 a4 lwz r9,9892(r31) ffc048dc: 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); ffc048e0: 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; ffc048e4: 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); ffc048e8: 3b de 8e c8 addi r30,r30,-28984 ffc048ec: 3b a1 00 08 addi r29,r1,8 ffc048f0: 38 80 00 01 li r4,1 ffc048f4: 38 a0 00 00 li r5,0 ffc048f8: 7f a6 eb 78 mr r6,r29 ffc048fc: 38 e0 00 00 li r7,0 ffc04900: 7f c3 f3 78 mr r3,r30 ffc04904: 48 00 01 f1 bl ffc04af4 rtems_filesystem_root = loc; ffc04908: 81 3f 26 a4 lwz r9,9892(r31) ffc0490c: 80 01 00 08 lwz r0,8(r1) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04910: 38 80 00 01 li r4,1 ffc04914: 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; ffc04918: 90 09 00 18 stw r0,24(r9) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc0491c: 7f a6 eb 78 mr r6,r29 ffc04920: 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; ffc04924: 80 01 00 0c lwz r0,12(r1) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04928: 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; ffc0492c: 90 09 00 1c stw r0,28(r9) ffc04930: 80 01 00 10 lwz r0,16(r1) ffc04934: 90 09 00 20 stw r0,32(r9) ffc04938: 80 01 00 14 lwz r0,20(r1) ffc0493c: 90 09 00 24 stw r0,36(r9) ffc04940: 80 01 00 18 lwz r0,24(r1) ffc04944: 90 09 00 28 stw r0,40(r9) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04948: 48 00 01 ad bl ffc04af4 rtems_filesystem_current = loc; ffc0494c: 81 3f 26 a4 lwz r9,9892(r31) ffc04950: 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); ffc04954: 3c 60 ff c2 lis r3,-62 ffc04958: 38 63 8e cc addi r3,r3,-28980 /* 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; ffc0495c: 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); ffc04960: 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; ffc04964: 80 01 00 0c lwz r0,12(r1) ffc04968: 90 09 00 08 stw r0,8(r9) ffc0496c: 80 01 00 10 lwz r0,16(r1) ffc04970: 90 09 00 0c stw r0,12(r9) ffc04974: 80 01 00 14 lwz r0,20(r1) ffc04978: 90 09 00 10 stw r0,16(r9) ffc0497c: 80 01 00 18 lwz r0,24(r1) ffc04980: 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); ffc04984: 48 00 08 2d bl ffc051b0 if ( status != 0 ) ffc04988: 2f 83 00 00 cmpwi cr7,r3,0 ffc0498c: 40 9e 00 2c bne- cr7,ffc049b8 <== 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. */ } ffc04990: 80 01 00 3c lwz r0,60(r1) ffc04994: 83 a1 00 2c lwz r29,44(r1) ffc04998: 7c 08 03 a6 mtlr r0 ffc0499c: 83 c1 00 30 lwz r30,48(r1) ffc049a0: 83 e1 00 34 lwz r31,52(r1) ffc049a4: 38 21 00 38 addi r1,r1,56 ffc049a8: 4e 80 00 20 blr /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); ffc049ac: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc049b0: 60 63 00 01 ori r3,r3,1 <== NOT EXECUTED ffc049b4: 48 00 4e 55 bl ffc09808 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); ffc049b8: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc049bc: 60 63 00 03 ori r3,r3,3 <== NOT EXECUTED ffc049c0: 48 00 4e 49 bl ffc09808 <== 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 ); ffc049c4: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc049c8: 60 63 00 02 ori r3,r3,2 <== NOT EXECUTED ffc049cc: 48 00 4e 3d bl ffc09808 <== NOT EXECUTED =============================================================================== ffc0ef50 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { ffc0ef50: 94 21 ff d8 stwu r1,-40(r1) ffc0ef54: 7c 08 02 a6 mflr r0 ffc0ef58: 93 c1 00 20 stw r30,32(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 ) { ffc0ef5c: 3f c0 ff c2 lis r30,-62 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { ffc0ef60: 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 ) { ffc0ef64: 80 1e 83 74 lwz r0,-31884(r30) ffc0ef68: 3b de 83 74 addi r30,r30,-31884 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { ffc0ef6c: 93 e1 00 24 stw r31,36(r1) ffc0ef70: 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 ) { ffc0ef74: 2f 80 00 00 cmpwi cr7,r0,0 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { ffc0ef78: 93 61 00 14 stw r27,20(r1) ffc0ef7c: 93 81 00 18 stw r28,24(r1) ffc0ef80: 93 a1 00 1c stw r29,28(r1) ffc0ef84: 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 ) { ffc0ef88: 40 be 00 0c bne+ cr7,ffc0ef94 <== ALWAYS TAKEN ffc0ef8c: 48 00 00 38 b ffc0efc4 <== NOT EXECUTED ffc0ef90: 40 9a 00 9c bne- cr6,ffc0f02c stop = (*routine)( table_entry, routine_arg ); ffc0ef94: 80 01 00 08 lwz r0,8(r1) ffc0ef98: 7f c3 f3 78 mr r3,r30 ffc0ef9c: 7f e4 fb 78 mr r4,r31 ffc0efa0: 7c 09 03 a6 mtctr r0 ffc0efa4: 4e 80 04 21 bctrl { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { ffc0efa8: 84 1e 00 08 lwzu r0,8(r30) stop = (*routine)( table_entry, routine_arg ); ffc0efac: 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 ) { ffc0efb0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0efb4: 2f 03 00 00 cmpwi cr6,r3,0 ffc0efb8: 40 9e ff d8 bne+ cr7,ffc0ef90 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { ffc0efbc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0efc0: 40 9e 00 6c bne- cr7,ffc0f02c 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 ); ffc0efc4: 3f c0 00 00 lis r30,0 ffc0efc8: 80 7e 27 14 lwz r3,10004(r30) ffc0efcc: 38 80 00 00 li r4,0 ffc0efd0: 38 a0 00 00 li r5,0 ffc0efd4: 4b ff 9e ad bl ffc08e80 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0efd8: 3d 20 00 00 lis r9,0 ffc0efdc: 3b 89 21 88 addi r28,r9,8584 ffc0efe0: 83 a9 21 88 lwz r29,8584(r9) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return &the_chain->Tail.Node; ffc0efe4: 3b 9c 00 04 addi r28,r28,4 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( ffc0efe8: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0efec: 3b 60 00 00 li r27,0 ffc0eff0: 40 be 00 0c bne+ cr7,ffc0effc ffc0eff4: 48 00 00 30 b ffc0f024 node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; ffc0eff8: 40 9a 00 2c bne- cr6,ffc0f024 <== NEVER TAKEN node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); ffc0effc: 80 01 00 08 lwz r0,8(r1) ffc0f000: 38 7d 00 08 addi r3,r29,8 ffc0f004: 7f e4 fb 78 mr r4,r31 ffc0f008: 7c 09 03 a6 mtctr r0 ffc0f00c: 4e 80 04 21 bctrl } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0f010: 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 ); ffc0f014: 7c 7b 1b 78 mr r27,r3 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( ffc0f018: 7f 9d e0 00 cmpw cr7,r29,r28 node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; ffc0f01c: 2f 03 00 00 cmpwi cr6,r3,0 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( ffc0f020: 40 9e ff d8 bne+ cr7,ffc0eff8 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0f024: 80 7e 27 14 lwz r3,10004(r30) ffc0f028: 4b ff 9f e1 bl ffc09008 } rtems_libio_unlock(); } return stop; } ffc0f02c: 80 01 00 2c lwz r0,44(r1) ffc0f030: 7f 63 db 78 mr r3,r27 ffc0f034: 83 81 00 18 lwz r28,24(r1) ffc0f038: 7c 08 03 a6 mtlr r0 ffc0f03c: 83 61 00 14 lwz r27,20(r1) ffc0f040: 83 a1 00 1c lwz r29,28(r1) ffc0f044: 83 c1 00 20 lwz r30,32(r1) ffc0f048: 83 e1 00 24 lwz r31,36(r1) ffc0f04c: 38 21 00 28 addi r1,r1,40 ffc0f050: 4e 80 00 20 blr =============================================================================== ffc052f4 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { ffc052f4: 94 21 ff d8 stwu r1,-40(r1) ffc052f8: 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 ); ffc052fc: 38 a0 00 00 li r5,0 ffc05300: 93 c1 00 20 stw r30,32(r1) ffc05304: 3f c0 00 00 lis r30,0 ffc05308: 90 61 00 08 stw r3,8(r1) ffc0530c: 80 7e 27 14 lwz r3,10004(r30) ffc05310: 93 e1 00 24 stw r31,36(r1) ffc05314: 7c 9f 23 78 mr r31,r4 ffc05318: 38 80 00 00 li r4,0 ffc0531c: 93 61 00 14 stw r27,20(r1) rtems_chain_node *node = NULL; bool stop = false; ffc05320: 3b 60 00 00 li r27,0 bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { ffc05324: 93 81 00 18 stw r28,24(r1) ffc05328: 93 a1 00 1c stw r29,28(r1) ffc0532c: 90 01 00 2c stw r0,44(r1) ffc05330: 48 00 3b 51 bl ffc08e80 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } ffc05334: 3d 20 00 00 lis r9,0 ffc05338: 3b 89 21 6c addi r28,r9,8556 ffc0533c: 83 a9 21 6c lwz r29,8556(r9) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return &the_chain->Tail.Node; ffc05340: 3b 9c 00 04 addi r28,r28,4 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( ffc05344: 7f 9d e0 00 cmpw cr7,r29,r28 ffc05348: 40 be 00 0c bne+ cr7,ffc05354 <== ALWAYS TAKEN ffc0534c: 48 00 00 30 b ffc0537c <== NOT EXECUTED node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; ffc05350: 40 9a 00 2c bne- cr6,ffc0537c <== 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 ); ffc05354: 80 01 00 08 lwz r0,8(r1) ffc05358: 7f a3 eb 78 mr r3,r29 ffc0535c: 7f e4 fb 78 mr r4,r31 ffc05360: 7c 09 03 a6 mtctr r0 ffc05364: 4e 80 04 21 bctrl } rtems_libio_unlock(); return stop; } ffc05368: 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 ); ffc0536c: 7c 7b 1b 78 mr r27,r3 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( ffc05370: 7f 9d e0 00 cmpw cr7,r29,r28 node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; ffc05374: 2f 03 00 00 cmpwi cr6,r3,0 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( ffc05378: 40 9e ff d8 bne+ cr7,ffc05350 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0537c: 80 7e 27 14 lwz r3,10004(r30) ffc05380: 48 00 3c 89 bl ffc09008 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } ffc05384: 80 01 00 2c lwz r0,44(r1) ffc05388: 7f 63 db 78 mr r3,r27 ffc0538c: 83 81 00 18 lwz r28,24(r1) ffc05390: 7c 08 03 a6 mtlr r0 ffc05394: 83 61 00 14 lwz r27,20(r1) ffc05398: 83 a1 00 1c lwz r29,28(r1) ffc0539c: 83 c1 00 20 lwz r30,32(r1) ffc053a0: 83 e1 00 24 lwz r31,36(r1) ffc053a4: 38 21 00 28 addi r1,r1,40 ffc053a8: 4e 80 00 20 blr =============================================================================== ffc04bd0 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { ffc04bd0: 94 21 ff e8 stwu r1,-24(r1) ffc04bd4: 7c 08 02 a6 mflr r0 ffc04bd8: 93 a1 00 0c stw r29,12(r1) ffc04bdc: 7c 9d 23 78 mr r29,r4 ffc04be0: 93 c1 00 10 stw r30,16(r1) /* * Eat any separators at start of the path. */ int stripped = 0; ffc04be4: 3b c0 00 00 li r30,0 int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { ffc04be8: 93 e1 00 14 stw r31,20(r1) ffc04bec: 7c 7f 1b 78 mr r31,r3 ffc04bf0: 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 ) ) ffc04bf4: 88 63 00 00 lbz r3,0(r3) ffc04bf8: 2f 83 00 00 cmpwi cr7,r3,0 ffc04bfc: 41 9e 00 34 beq- cr7,ffc04c30 <== NEVER TAKEN ffc04c00: 2f 84 00 00 cmpwi cr7,r4,0 ffc04c04: 40 be 00 20 bne+ cr7,ffc04c24 <== ALWAYS TAKEN ffc04c08: 48 00 00 28 b ffc04c30 <== NOT EXECUTED { pathname++; pathnamelen--; stripped++; ffc04c0c: 3b de 00 01 addi r30,r30,1 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) ffc04c10: 7c 7f f0 ae lbzx r3,r31,r30 ffc04c14: 7f 1d f0 00 cmpw cr6,r29,r30 ffc04c18: 2f 83 00 00 cmpwi cr7,r3,0 ffc04c1c: 41 9e 00 14 beq- cr7,ffc04c30 <== NEVER TAKEN ffc04c20: 41 9a 00 10 beq- cr6,ffc04c30 <== NEVER TAKEN ffc04c24: 48 00 12 e5 bl ffc05f08 ffc04c28: 2f 83 00 00 cmpwi cr7,r3,0 ffc04c2c: 40 9e ff e0 bne+ cr7,ffc04c0c pathname++; pathnamelen--; stripped++; } return stripped; } ffc04c30: 80 01 00 1c lwz r0,28(r1) ffc04c34: 7f c3 f3 78 mr r3,r30 ffc04c38: 83 a1 00 0c lwz r29,12(r1) ffc04c3c: 7c 08 03 a6 mtlr r0 ffc04c40: 83 c1 00 10 lwz r30,16(r1) ffc04c44: 83 e1 00 14 lwz r31,20(r1) ffc04c48: 38 21 00 18 addi r1,r1,24 ffc04c4c: 4e 80 00 20 blr =============================================================================== ffc0f1b8 : int rtems_filesystem_unregister( const char *type ) { ffc0f1b8: 94 21 ff e8 stwu r1,-24(r1) ffc0f1bc: 7c 08 02 a6 mflr r0 ffc0f1c0: 93 e1 00 14 stw r31,20(r1) rtems_chain_node *node = NULL; if ( type == NULL ) { ffc0f1c4: 7c 7f 1b 79 mr. r31,r3 int rtems_filesystem_unregister( const char *type ) { ffc0f1c8: 90 01 00 1c stw r0,28(r1) ffc0f1cc: 93 81 00 08 stw r28,8(r1) ffc0f1d0: 93 a1 00 0c stw r29,12(r1) ffc0f1d4: 93 c1 00 10 stw r30,16(r1) rtems_chain_node *node = NULL; if ( type == NULL ) { ffc0f1d8: 41 82 00 c8 beq- ffc0f2a0 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 ); ffc0f1dc: 3f c0 00 00 lis r30,0 ffc0f1e0: 80 7e 27 14 lwz r3,10004(r30) ffc0f1e4: 38 80 00 00 li r4,0 ffc0f1e8: 38 a0 00 00 li r5,0 ffc0f1ec: 4b ff 9c 95 bl ffc08e80 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0f1f0: 3d 20 00 00 lis r9,0 ffc0f1f4: 3b 89 21 88 addi r28,r9,8584 ffc0f1f8: 83 a9 21 88 lwz r29,8584(r9) ffc0f1fc: 3b 9c 00 04 addi r28,r28,4 if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( ffc0f200: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0f204: 40 be 00 14 bne+ cr7,ffc0f218 ffc0f208: 48 00 00 60 b ffc0f268 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0f20c: 83 bd 00 00 lwz r29,0(r29) if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( ffc0f210: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0f214: 41 9e 00 54 beq- cr7,ffc0f268 <== 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 ) { ffc0f218: 80 7d 00 08 lwz r3,8(r29) ffc0f21c: 7f e4 fb 78 mr r4,r31 ffc0f220: 48 00 42 01 bl ffc13420 ffc0f224: 2f 83 00 00 cmpwi cr7,r3,0 ffc0f228: 40 9e ff e4 bne+ cr7,ffc0f20c */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc0f22c: 7f a3 eb 78 mr r3,r29 ffc0f230: 4b ff aa 69 bl ffc09c98 <_Chain_Extract> rtems_chain_extract( node ); free( fsn ); ffc0f234: 7f a3 eb 78 mr r3,r29 ffc0f238: 4b ff 5a 45 bl ffc04c7c } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0f23c: 80 7e 27 14 lwz r3,10004(r30) ffc0f240: 4b ff 9d c9 bl ffc09008 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0f244: 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; ffc0f248: 38 60 00 00 li r3,0 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0f24c: 83 81 00 08 lwz r28,8(r1) ffc0f250: 7c 08 03 a6 mtlr r0 ffc0f254: 83 a1 00 0c lwz r29,12(r1) ffc0f258: 83 c1 00 10 lwz r30,16(r1) ffc0f25c: 83 e1 00 14 lwz r31,20(r1) ffc0f260: 38 21 00 18 addi r1,r1,24 ffc0f264: 4e 80 00 20 blr ffc0f268: 80 7e 27 14 lwz r3,10004(r30) ffc0f26c: 4b ff 9d 9d bl ffc09008 return 0; } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); ffc0f270: 48 00 30 ed bl ffc1235c <__errno> ffc0f274: 38 00 00 02 li r0,2 ffc0f278: 90 03 00 00 stw r0,0(r3) ffc0f27c: 38 60 ff ff li r3,-1 } ffc0f280: 80 01 00 1c lwz r0,28(r1) ffc0f284: 83 81 00 08 lwz r28,8(r1) ffc0f288: 7c 08 03 a6 mtlr r0 ffc0f28c: 83 a1 00 0c lwz r29,12(r1) ffc0f290: 83 c1 00 10 lwz r30,16(r1) ffc0f294: 83 e1 00 14 lwz r31,20(r1) ffc0f298: 38 21 00 18 addi r1,r1,24 ffc0f29c: 4e 80 00 20 blr ) { rtems_chain_node *node = NULL; if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); ffc0f2a0: 48 00 30 bd bl ffc1235c <__errno> ffc0f2a4: 38 00 00 16 li r0,22 ffc0f2a8: 90 03 00 00 stw r0,0(r3) ffc0f2ac: 38 60 ff ff li r3,-1 ffc0f2b0: 4b ff ff d0 b ffc0f280 =============================================================================== ffc05a04 : int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { ffc05a04: 94 21 ff e8 stwu r1,-24(r1) ffc05a08: 7c 08 02 a6 mflr r0 ffc05a0c: 93 a1 00 0c stw r29,12(r1) ffc05a10: 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 ) ); ffc05a14: 38 60 00 08 li r3,8 } return 0; } int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { ffc05a18: 90 01 00 1c stw r0,28(r1) ffc05a1c: 93 c1 00 10 stw r30,16(r1) ffc05a20: 7c 9e 23 78 mr r30,r4 ffc05a24: 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 ) ); ffc05a28: 48 00 05 9d bl ffc05fc4 ffc05a2c: 7c 7f 1b 78 mr r31,r3 *key = new_key; ffc05a30: 90 7d 00 00 stw r3,0(r29) new_key->val = NULL; ffc05a34: 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 ); ffc05a38: 38 60 00 00 li r3,0 ffc05a3c: 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; ffc05a40: 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 ); ffc05a44: 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; ffc05a48: 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 ); ffc05a4c: 48 00 4c c1 bl ffc0a70c if ( status == RTEMS_SUCCESSFUL ) ffc05a50: 2f 83 00 00 cmpwi cr7,r3,0 return 0; ffc05a54: 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 ) ffc05a58: 40 9e 00 20 bne- cr7,ffc05a78 <== NEVER TAKEN return 0; free( new_key ); return -1; } ffc05a5c: 80 01 00 1c lwz r0,28(r1) ffc05a60: 83 a1 00 0c lwz r29,12(r1) ffc05a64: 7c 08 03 a6 mtlr r0 ffc05a68: 83 c1 00 10 lwz r30,16(r1) ffc05a6c: 83 e1 00 14 lwz r31,20(r1) ffc05a70: 38 21 00 18 addi r1,r1,24 ffc05a74: 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 ); ffc05a78: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05a7c: 4b ff fd 45 bl ffc057c0 <== NOT EXECUTED return -1; ffc05a80: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05a84: 4b ff ff d8 b ffc05a5c <== NOT EXECUTED =============================================================================== ffc05a98 : int rtems_gxx_key_delete (__gthread_key_t key) { ffc05a98: 94 21 ff f0 stwu r1,-16(r1) ffc05a9c: 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 ); ffc05aa0: 7c 64 1b 78 mr r4,r3 key->val = 0; return 0; } int rtems_gxx_key_delete (__gthread_key_t key) { ffc05aa4: 93 e1 00 0c stw r31,12(r1) ffc05aa8: 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 ); ffc05aac: 38 60 00 00 li r3,0 key->val = 0; return 0; } int rtems_gxx_key_delete (__gthread_key_t key) { ffc05ab0: 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 ); ffc05ab4: 48 00 4d 6d bl ffc0a820 if ( status == RTEMS_SUCCESSFUL ) { ffc05ab8: 2f 83 00 00 cmpwi cr7,r3,0 ffc05abc: 40 9e 00 14 bne- cr7,ffc05ad0 <== NEVER TAKEN /* Hmm - hopefully all tasks using this key have gone away... */ if ( key ) free( *(void **)key ); ffc05ac0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc05ac4: 41 9e 00 0c beq- cr7,ffc05ad0 <== NEVER TAKEN ffc05ac8: 80 7f 00 00 lwz r3,0(r31) ffc05acc: 4b ff fc f5 bl ffc057c0 return 0; } key = NULL; return 0; } ffc05ad0: 80 01 00 14 lwz r0,20(r1) ffc05ad4: 38 60 00 00 li r3,0 ffc05ad8: 83 e1 00 0c lwz r31,12(r1) ffc05adc: 38 21 00 10 addi r1,r1,16 ffc05ae0: 7c 08 03 a6 mtlr r0 ffc05ae4: 4e 80 00 20 blr =============================================================================== ffc05c20 : printk( "gxx_wrappers: mutex init complete =%X\n", *mutex ); #endif } int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex) { ffc05c20: 94 21 ff f8 stwu r1,-8(r1) ffc05c24: 7c 08 02 a6 mflr r0 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: lock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_obtain( ffc05c28: 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) { ffc05c2c: 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( ffc05c30: 38 a0 00 00 li r5,0 ffc05c34: 80 63 00 00 lwz r3,0(r3) ffc05c38: 48 00 41 75 bl ffc09dac *(rtems_id *)mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if ( status == RTEMS_SUCCESSFUL ) ffc05c3c: 2f 83 00 00 cmpwi cr7,r3,0 return 0; return -1; ffc05c40: 38 60 ff ff li r3,-1 status = rtems_semaphore_obtain( *(rtems_id *)mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if ( status == RTEMS_SUCCESSFUL ) ffc05c44: 40 9e 00 08 bne- cr7,ffc05c4c <== NEVER TAKEN return 0; ffc05c48: 38 60 00 00 li r3,0 return -1; } ffc05c4c: 80 01 00 0c lwz r0,12(r1) ffc05c50: 38 21 00 08 addi r1,r1,8 ffc05c54: 7c 08 03 a6 mtlr r0 ffc05c58: 4e 80 00 20 blr =============================================================================== ffc05c90 : int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex) { ffc05c90: 94 21 ff f8 stwu r1,-8(r1) ffc05c94: 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); ffc05c98: 38 80 00 01 li r4,1 return 0; return -1; } int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex) { ffc05c9c: 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); ffc05ca0: 38 a0 00 00 li r5,0 ffc05ca4: 80 63 00 00 lwz r3,0(r3) ffc05ca8: 48 00 41 05 bl ffc09dac if ( status == RTEMS_SUCCESSFUL ) ffc05cac: 2f 83 00 00 cmpwi cr7,r3,0 return 0; return -1; ffc05cb0: 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 ) ffc05cb4: 40 9e 00 08 bne- cr7,ffc05cbc <== NEVER TAKEN return 0; ffc05cb8: 38 60 00 00 li r3,0 return -1; } ffc05cbc: 80 01 00 0c lwz r0,12(r1) ffc05cc0: 38 21 00 08 addi r1,r1,8 ffc05cc4: 7c 08 03 a6 mtlr r0 ffc05cc8: 4e 80 00 20 blr =============================================================================== ffc05ccc : int rtems_gxx_mutex_unlock (__gthread_mutex_t *mutex) { ffc05ccc: 94 21 ff f8 stwu r1,-8(r1) ffc05cd0: 7c 08 02 a6 mflr r0 ffc05cd4: 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 ); ffc05cd8: 80 63 00 00 lwz r3,0(r3) ffc05cdc: 48 00 42 59 bl ffc09f34 if ( status == RTEMS_SUCCESSFUL ) ffc05ce0: 2f 83 00 00 cmpwi cr7,r3,0 return 0; return -1; ffc05ce4: 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 ) ffc05ce8: 40 9e 00 08 bne- cr7,ffc05cf0 <== NEVER TAKEN return 0; ffc05cec: 38 60 00 00 li r3,0 return -1; } ffc05cf0: 80 01 00 0c lwz r0,12(r1) ffc05cf4: 38 21 00 08 addi r1,r1,8 ffc05cf8: 7c 08 03 a6 mtlr r0 ffc05cfc: 4e 80 00 20 blr =============================================================================== ffc05928 : /* 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)) { ffc05928: 94 21 ff d8 stwu r1,-40(r1) ffc0592c: 7c 08 02 a6 mflr r0 ffc05930: 90 01 00 2c stw r0,44(r1) #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { ffc05934: 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)) { ffc05938: 93 c1 00 20 stw r30,32(r1) ffc0593c: 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 ) { ffc05940: 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)) { ffc05944: 93 e1 00 24 stw r31,36(r1) ffc05948: 7c 7f 1b 78 mr r31,r3 ffc0594c: 93 a1 00 1c stw r29,28(r1) #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { ffc05950: 41 9e 00 24 beq- cr7,ffc05974 rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); if ( o == 0 ) (*func)(); } return 0; } ffc05954: 80 01 00 2c lwz r0,44(r1) ffc05958: 38 60 00 00 li r3,0 ffc0595c: 83 a1 00 1c lwz r29,28(r1) ffc05960: 7c 08 03 a6 mtlr r0 ffc05964: 83 c1 00 20 lwz r30,32(r1) ffc05968: 83 e1 00 24 lwz r31,36(r1) ffc0596c: 38 21 00 28 addi r1,r1,40 ffc05970: 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); ffc05974: 3b a1 00 08 addi r29,r1,8 ffc05978: 38 60 01 00 li r3,256 ffc0597c: 38 80 01 00 li r4,256 ffc05980: 7f a5 eb 78 mr r5,r29 ffc05984: 48 00 4a 4d bl ffc0a3d0 if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { ffc05988: 80 1f 00 00 lwz r0,0(r31) ffc0598c: 2f 80 00 00 cmpwi cr7,r0,0 ffc05990: 40 9e 00 44 bne- cr7,ffc059d4 <== NEVER TAKEN *(volatile __gthread_once_t *)once = 1; ffc05994: 38 00 00 01 li r0,1 } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); ffc05998: 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; ffc0599c: 90 1f 00 00 stw r0,0(r31) } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); ffc059a0: 7f a5 eb 78 mr r5,r29 ffc059a4: 38 80 01 00 li r4,256 ffc059a8: 48 00 4a 29 bl ffc0a3d0 if ( o == 0 ) (*func)(); ffc059ac: 7f c9 03 a6 mtctr r30 ffc059b0: 4e 80 04 21 bctrl } return 0; } ffc059b4: 80 01 00 2c lwz r0,44(r1) ffc059b8: 38 60 00 00 li r3,0 ffc059bc: 83 a1 00 1c lwz r29,28(r1) ffc059c0: 7c 08 03 a6 mtlr r0 ffc059c4: 83 c1 00 20 lwz r30,32(r1) ffc059c8: 83 e1 00 24 lwz r31,36(r1) ffc059cc: 38 21 00 28 addi r1,r1,40 ffc059d0: 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); ffc059d4: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED ffc059d8: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED ffc059dc: 38 80 01 00 li r4,256 <== NOT EXECUTED ffc059e0: 48 00 49 f1 bl ffc0a3d0 <== NOT EXECUTED if ( o == 0 ) (*func)(); } return 0; } ffc059e4: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc059e8: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc059ec: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc059f0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc059f4: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc059f8: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc059fc: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc05a00: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05b78 : #endif return p; } int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { ffc05b78: 94 21 ff f0 stwu r1,-16(r1) ffc05b7c: 7c 08 02 a6 mflr r0 ffc05b80: 90 01 00 14 stw r0,20(r1) ffc05b84: 93 e1 00 0c stw r31,12(r1) ffc05b88: 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 ); ffc05b8c: 80 a3 00 04 lwz r5,4(r3) ffc05b90: 38 60 00 00 li r3,0 #endif return p; } int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { ffc05b94: 93 c1 00 08 stw r30,8(r1) ffc05b98: 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 ); ffc05b9c: 7f e4 fb 78 mr r4,r31 ffc05ba0: 48 00 4b 6d bl ffc0a70c if ( status == RTEMS_SUCCESSFUL ) { ffc05ba4: 2f 83 00 00 cmpwi cr7,r3,0 /* now let's set the proper value */ key->val = (void *)ptr; return 0; } return -1; ffc05ba8: 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 ) { ffc05bac: 40 9e 00 0c bne- cr7,ffc05bb8 <== NEVER TAKEN /* now let's set the proper value */ key->val = (void *)ptr; ffc05bb0: 93 df 00 00 stw r30,0(r31) return 0; ffc05bb4: 38 60 00 00 li r3,0 } return -1; } ffc05bb8: 80 01 00 14 lwz r0,20(r1) ffc05bbc: 83 c1 00 08 lwz r30,8(r1) ffc05bc0: 7c 08 03 a6 mtlr r0 ffc05bc4: 83 e1 00 0c lwz r31,12(r1) ffc05bc8: 38 21 00 10 addi r1,r1,16 ffc05bcc: 4e 80 00 20 blr =============================================================================== ffc09c04 : void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { ffc09c04: 94 21 ff e8 stwu r1,-24(r1) ffc09c08: 7c 08 02 a6 mflr r0 if ( ffc09c0c: 3d 20 00 00 lis r9,0 void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { ffc09c10: 90 01 00 1c stw r0,28(r1) if ( ffc09c14: 80 09 28 0c lwz r0,10252(r9) void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { ffc09c18: 93 a1 00 0c stw r29,12(r1) ffc09c1c: 7c 7d 1b 78 mr r29,r3 if ( ffc09c20: 2f 80 00 03 cmpwi cr7,r0,3 void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { ffc09c24: 93 c1 00 10 stw r30,16(r1) ffc09c28: 7c 9e 23 78 mr r30,r4 ffc09c2c: 93 e1 00 14 stw r31,20(r1) ffc09c30: 7c bf 2b 78 mr r31,r5 if ( ffc09c34: 41 9e 00 3c beq- cr7,ffc09c70 <== ALWAYS TAKEN && !malloc_is_system_state_OK() ) { return NULL; } malloc_deferred_frees_process(); ffc09c38: 4b ff ea 2d bl ffc08664 /* FIXME: Statistics, boundary checks */ return _Protected_heap_Allocate_aligned_with_boundary( ffc09c3c: 3d 20 00 00 lis r9,0 ffc09c40: 80 69 26 e4 lwz r3,9956(r9) ffc09c44: 7f a4 eb 78 mr r4,r29 ffc09c48: 7f c5 f3 78 mr r5,r30 ffc09c4c: 7f e6 fb 78 mr r6,r31 ffc09c50: 48 00 65 b9 bl ffc10208 <_Protected_heap_Allocate_aligned_with_boundary> RTEMS_Malloc_Heap, size, alignment, boundary ); } ffc09c54: 80 01 00 1c lwz r0,28(r1) ffc09c58: 83 a1 00 0c lwz r29,12(r1) ffc09c5c: 7c 08 03 a6 mtlr r0 ffc09c60: 83 c1 00 10 lwz r30,16(r1) ffc09c64: 83 e1 00 14 lwz r31,20(r1) ffc09c68: 38 21 00 18 addi r1,r1,24 ffc09c6c: 4e 80 00 20 blr uintptr_t boundary ) { if ( _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() ffc09c70: 4b ff e9 ad bl ffc0861c ffc09c74: 2f 83 00 00 cmpwi cr7,r3,0 ) { return NULL; ffc09c78: 38 60 00 00 li r3,0 uintptr_t boundary ) { if ( _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() ffc09c7c: 40 9e ff bc bne+ cr7,ffc09c38 ffc09c80: 4b ff ff d4 b ffc09c54 =============================================================================== ffc04750 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { ffc04750: 94 21 ff c0 stwu r1,-64(r1) ffc04754: 7c 08 02 a6 mflr r0 ffc04758: 93 61 00 2c stw r27,44(r1) ffc0475c: 90 01 00 44 stw r0,68(r1) ffc04760: 93 81 00 30 stw r28,48(r1) ffc04764: 93 a1 00 34 stw r29,52(r1) ffc04768: 7c 9d 23 78 mr r29,r4 ffc0476c: 93 c1 00 38 stw r30,56(r1) ffc04770: 7c 7e 1b 78 mr r30,r3 ffc04774: 93 e1 00 3c stw r31,60(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( ffc04778: 48 00 ee 6d bl ffc135e4 ffc0477c: 3b e1 00 08 addi r31,r1,8 ffc04780: 7c 64 1b 78 mr r4,r3 ffc04784: 38 a0 00 00 li r5,0 ffc04788: 7f e6 fb 78 mr r6,r31 ffc0478c: 38 e0 00 01 li r7,1 ffc04790: 7f c3 f3 78 mr r3,r30 ffc04794: 48 00 03 61 bl ffc04af4 name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; node_type = (*loc.ops->node_type_h)( &loc ); ffc04798: 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( ffc0479c: 7c 7c 1b 78 mr r28,r3 name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; ffc047a0: 83 61 00 08 lwz r27,8(r1) node_type = (*loc.ops->node_type_h)( &loc ); ffc047a4: 80 09 00 10 lwz r0,16(r9) ffc047a8: 7f e3 fb 78 mr r3,r31 ffc047ac: 7c 09 03 a6 mtctr r0 ffc047b0: 4e 80 04 21 bctrl if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { ffc047b4: 2f 9c 00 00 cmpwi cr7,r28,0 ffc047b8: 40 9e 00 0c bne- cr7,ffc047c4 <== NEVER TAKEN ffc047bc: 2f 83 00 02 cmpwi cr7,r3,2 ffc047c0: 41 9e 00 34 beq- cr7,ffc047f4 rtems_filesystem_freenode( &loc ); ffc047c4: 7f e3 fb 78 mr r3,r31 ffc047c8: 48 00 04 89 bl ffc04c50 return RTEMS_UNSATISFIED; ffc047cc: 38 60 00 0d li r3,13 device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } ffc047d0: 80 01 00 44 lwz r0,68(r1) ffc047d4: 83 61 00 2c lwz r27,44(r1) ffc047d8: 7c 08 03 a6 mtlr r0 ffc047dc: 83 81 00 30 lwz r28,48(r1) ffc047e0: 83 a1 00 34 lwz r29,52(r1) ffc047e4: 83 c1 00 38 lwz r30,56(r1) ffc047e8: 83 e1 00 3c lwz r31,60(r1) ffc047ec: 38 21 00 40 addi r1,r1,64 ffc047f0: 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; ffc047f4: 93 dd 00 00 stw r30,0(r29) device_info->device_name_length = strlen( name ); ffc047f8: 7f c3 f3 78 mr r3,r30 ffc047fc: 48 00 ed e9 bl ffc135e4 ffc04800: 90 7d 00 04 stw r3,4(r29) device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); ffc04804: 7f e3 fb 78 mr r3,r31 return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; ffc04808: 80 1b 00 50 lwz r0,80(r27) ffc0480c: 90 1d 00 08 stw r0,8(r29) device_info->minor = the_jnode->info.device.minor; ffc04810: 80 1b 00 54 lwz r0,84(r27) ffc04814: 90 1d 00 0c stw r0,12(r29) rtems_filesystem_freenode( &loc ); ffc04818: 48 00 04 39 bl ffc04c50 return RTEMS_SUCCESSFUL; ffc0481c: 38 60 00 00 li r3,0 ffc04820: 4b ff ff b0 b ffc047d0 =============================================================================== ffc0ae68 : 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 ) { ffc0ae68: 94 21 ff f0 stwu r1,-16(r1) ffc0ae6c: 7c 08 02 a6 mflr r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0ae70: 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 ) { ffc0ae74: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0ae78: 80 09 2e 00 lwz r0,11776(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; ffc0ae7c: 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 ) { ffc0ae80: 93 e1 00 0c stw r31,12(r1) ffc0ae84: 7c 7f 1b 78 mr r31,r3 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0ae88: 2f 80 00 00 cmpwi cr7,r0,0 return RTEMS_CALLED_FROM_ISR; ffc0ae8c: 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; ffc0ae90: 80 09 27 98 lwz r0,10136(r9) if ( rtems_interrupt_is_in_progress() ) ffc0ae94: 40 9e 00 ec bne- cr7,ffc0af80 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) ffc0ae98: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc0ae9c: 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 ) ffc0aea0: 41 9e 00 e0 beq- cr7,ffc0af80 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) ffc0aea4: 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; ffc0aea8: 90 05 00 00 stw r0,0(r5) if ( driver_table == NULL ) ffc0aeac: 41 9e 00 d4 beq- cr7,ffc0af80 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0aeb0: 81 64 00 00 lwz r11,0(r4) ffc0aeb4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0aeb8: 41 9e 01 14 beq- cr7,ffc0afcc return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0aebc: 7f 80 f8 40 cmplw cr7,r0,r31 return RTEMS_INVALID_NUMBER; ffc0aec0: 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 ) ffc0aec4: 40 9d 00 bc ble- cr7,ffc0af80 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0aec8: 3d 60 00 00 lis r11,0 ffc0aecc: 81 4b 27 44 lwz r10,10052(r11) ffc0aed0: 38 0a 00 01 addi r0,r10,1 ffc0aed4: 90 0b 27 44 stw r0,10052(r11) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { ffc0aed8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0aedc: 40 9e 00 b8 bne- cr7,ffc0af94 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; ffc0aee0: 81 49 27 98 lwz r10,10136(r9) rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc0aee4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0aee8: 41 9e 00 f4 beq- cr7,ffc0afdc <== NEVER TAKEN ffc0aeec: 3d 60 00 00 lis r11,0 ffc0aef0: 7d 49 03 a6 mtctr r10 ffc0aef4: 81 2b 27 9c lwz r9,10140(r11) ffc0aef8: 40 be 00 14 bne+ cr7,ffc0af0c <== ALWAYS TAKEN ffc0aefc: 48 00 01 04 b ffc0b000 <== NOT EXECUTED ffc0af00: 3b ff 00 01 addi r31,r31,1 ffc0af04: 39 29 00 18 addi r9,r9,24 ffc0af08: 42 40 00 1c bdz- ffc0af24 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0af0c: 80 09 00 00 lwz r0,0(r9) ffc0af10: 2f 80 00 00 cmpwi cr7,r0,0 ffc0af14: 40 9e ff ec bne+ cr7,ffc0af00 ffc0af18: 80 09 00 04 lwz r0,4(r9) ffc0af1c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0af20: 40 9e ff e0 bne+ cr7,ffc0af00 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) ffc0af24: 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; ffc0af28: 93 e5 00 00 stw r31,0(r5) if ( m != n ) ffc0af2c: 1c 1f 00 18 mulli r0,r31,24 ffc0af30: 41 9e 00 b0 beq- cr7,ffc0afe0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; ffc0af34: 81 6b 27 9c lwz r11,10140(r11) ffc0af38: 80 c4 00 00 lwz r6,0(r4) ffc0af3c: 80 e4 00 04 lwz r7,4(r4) ffc0af40: 7d 2b 02 14 add r9,r11,r0 ffc0af44: 81 04 00 08 lwz r8,8(r4) ffc0af48: 81 44 00 0c lwz r10,12(r4) ffc0af4c: 7c cb 01 2e stwx r6,r11,r0 ffc0af50: 90 e9 00 04 stw r7,4(r9) ffc0af54: 91 09 00 08 stw r8,8(r9) ffc0af58: 91 49 00 0c stw r10,12(r9) ffc0af5c: 81 64 00 10 lwz r11,16(r4) ffc0af60: 80 04 00 14 lwz r0,20(r4) ffc0af64: 91 69 00 10 stw r11,16(r9) ffc0af68: 90 09 00 14 stw r0,20(r9) _Thread_Enable_dispatch(); ffc0af6c: 48 00 25 2d bl ffc0d498 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); ffc0af70: 7f e3 fb 78 mr r3,r31 ffc0af74: 38 80 00 00 li r4,0 ffc0af78: 38 a0 00 00 li r5,0 ffc0af7c: 48 00 9a 25 bl ffc149a0 } ffc0af80: 80 01 00 14 lwz r0,20(r1) ffc0af84: 83 e1 00 0c lwz r31,12(r1) ffc0af88: 38 21 00 10 addi r1,r1,16 ffc0af8c: 7c 08 03 a6 mtlr r0 ffc0af90: 4e 80 00 20 blr _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0af94: 3d 60 00 00 lis r11,0 ffc0af98: 1c 1f 00 18 mulli r0,r31,24 ffc0af9c: 81 2b 27 9c lwz r9,10140(r11) static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0afa0: 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; ffc0afa4: 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; ffc0afa8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0afac: 41 9e 00 40 beq- cr7,ffc0afec 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(); ffc0afb0: 48 00 24 e9 bl ffc0d498 <_Thread_Enable_dispatch> _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0afb4: 80 01 00 14 lwz r0,20(r1) } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; ffc0afb8: 38 60 00 0c li r3,12 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0afbc: 83 e1 00 0c lwz r31,12(r1) ffc0afc0: 7c 08 03 a6 mtlr r0 ffc0afc4: 38 21 00 10 addi r1,r1,16 ffc0afc8: 4e 80 00 20 blr static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0afcc: 81 64 00 04 lwz r11,4(r4) ffc0afd0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0afd4: 40 9e fe e8 bne+ cr7,ffc0aebc ffc0afd8: 4b ff ff a8 b ffc0af80 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0afdc: 93 e5 00 00 stw r31,0(r5) <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); ffc0afe0: 48 00 24 b9 bl ffc0d498 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; ffc0afe4: 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; ffc0afe8: 4b ff ff 98 b ffc0af80 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0afec: 81 29 00 04 lwz r9,4(r9) ffc0aff0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0aff4: 40 9e ff bc bne+ cr7,ffc0afb0 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; ffc0aff8: 93 e5 00 00 stw r31,0(r5) ffc0affc: 4b ff ff 38 b ffc0af34 ffc0b000: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0b004: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0b008: 4b ff ff 04 b ffc0af0c <== NOT EXECUTED =============================================================================== ffc0c98c : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0c98c: 94 21 ff e0 stwu r1,-32(r1) ffc0c990: 7c 08 02 a6 mflr r0 ffc0c994: 90 01 00 24 stw r0,36(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0c998: 7c 60 1b 79 mr. r0,r3 #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0c99c: 93 81 00 10 stw r28,16(r1) ffc0c9a0: 93 a1 00 14 stw r29,20(r1) ffc0c9a4: 93 c1 00 18 stw r30,24(r1) ffc0c9a8: 93 e1 00 1c stw r31,28(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0c9ac: 90 01 00 08 stw r0,8(r1) ffc0c9b0: 41 82 00 74 beq- ffc0ca24 <== NEVER TAKEN ffc0c9b4: 3f a0 00 01 lis r29,1 ffc0c9b8: 3b bd a9 80 addi r29,r29,-22144 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) ffc0c9bc: 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 ] ) ffc0c9c0: 85 3d 00 04 lwzu r9,4(r29) ffc0c9c4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c9c8: 41 9e 00 54 beq- cr7,ffc0ca1c continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; ffc0c9cc: 83 c9 00 04 lwz r30,4(r9) if ( !information ) ffc0c9d0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0c9d4: 41 9e 00 48 beq- cr7,ffc0ca1c continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0c9d8: a0 1e 00 10 lhz r0,16(r30) ffc0c9dc: 70 09 ff ff andi. r9,r0,65535 ffc0c9e0: 41 82 00 3c beq- ffc0ca1c <== NEVER TAKEN ffc0c9e4: 3b e0 00 01 li r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0c9e8: 81 7e 00 1c lwz r11,28(r30) ffc0c9ec: 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++ ) { ffc0c9f0: 3b ff 00 01 addi r31,r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0c9f4: 7c 6b 48 2e lwzx r3,r11,r9 if ( !the_thread ) ffc0c9f8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c9fc: 41 9e 00 14 beq- cr7,ffc0ca10 continue; (*routine)(the_thread); ffc0ca00: 80 01 00 08 lwz r0,8(r1) ffc0ca04: 7c 09 03 a6 mtctr r0 ffc0ca08: 4e 80 04 21 bctrl ffc0ca0c: 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++ ) { ffc0ca10: 54 09 04 3e clrlwi r9,r0,16 ffc0ca14: 7f 89 f8 40 cmplw cr7,r9,r31 ffc0ca18: 40 9c ff d0 bge+ cr7,ffc0c9e8 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc0ca1c: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0ca20: 40 9e ff a0 bne+ cr7,ffc0c9c0 (*routine)(the_thread); } } } ffc0ca24: 80 01 00 24 lwz r0,36(r1) ffc0ca28: 83 81 00 10 lwz r28,16(r1) ffc0ca2c: 7c 08 03 a6 mtlr r0 ffc0ca30: 83 a1 00 14 lwz r29,20(r1) ffc0ca34: 83 c1 00 18 lwz r30,24(r1) ffc0ca38: 83 e1 00 1c lwz r31,28(r1) ffc0ca3c: 38 21 00 20 addi r1,r1,32 ffc0ca40: 4e 80 00 20 blr =============================================================================== ffc0ece8 : */ void rtems_libio_free( rtems_libio_t *iop ) { ffc0ece8: 94 21 ff f0 stwu r1,-16(r1) ffc0ecec: 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 ); ffc0ecf0: 38 80 00 00 li r4,0 ffc0ecf4: 93 c1 00 08 stw r30,8(r1) ffc0ecf8: 3f c0 00 00 lis r30,0 ffc0ecfc: 38 a0 00 00 li r5,0 ffc0ed00: 93 e1 00 0c stw r31,12(r1) ffc0ed04: 7c 7f 1b 78 mr r31,r3 ffc0ed08: 80 7e 27 14 lwz r3,10004(r30) ffc0ed0c: 90 01 00 14 stw r0,20(r1) ffc0ed10: 4b ff a1 71 bl ffc08e80 rtems_libio_lock(); if (iop->sem) ffc0ed14: 80 7f 00 30 lwz r3,48(r31) ffc0ed18: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ed1c: 41 be 00 08 beq+ cr7,ffc0ed24 <== NEVER TAKEN rtems_semaphore_delete(iop->sem); ffc0ed20: 4b ff a0 85 bl ffc08da4 iop->flags &= ~LIBIO_FLAGS_OPEN; ffc0ed24: 81 7f 00 18 lwz r11,24(r31) iop->data1 = rtems_libio_iop_freelist; ffc0ed28: 3d 20 00 00 lis r9,0 ffc0ed2c: 80 09 27 10 lwz r0,10000(r9) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; ffc0ed30: 55 6b 06 2c rlwinm r11,r11,0,24,22 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0ed34: 80 7e 27 14 lwz r3,10004(r30) iop->data1 = rtems_libio_iop_freelist; ffc0ed38: 90 1f 00 38 stw r0,56(r31) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; ffc0ed3c: 91 7f 00 18 stw r11,24(r31) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; ffc0ed40: 93 e9 27 10 stw r31,10000(r9) ffc0ed44: 4b ff a2 c5 bl ffc09008 rtems_libio_unlock(); } ffc0ed48: 80 01 00 14 lwz r0,20(r1) ffc0ed4c: 83 c1 00 08 lwz r30,8(r1) ffc0ed50: 7c 08 03 a6 mtlr r0 ffc0ed54: 83 e1 00 0c lwz r31,12(r1) ffc0ed58: 38 21 00 10 addi r1,r1,16 ffc0ed5c: 4e 80 00 20 blr =============================================================================== ffc04de4 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { ffc04de4: 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) ffc04de8: 3d 20 00 00 lis r9,0 * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { ffc04dec: 7c 08 02 a6 mflr r0 ffc04df0: 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) ffc04df4: 83 e9 26 4c lwz r31,9804(r9) * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { ffc04df8: 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) ffc04dfc: 2f 9f 00 00 cmpwi cr7,r31,0 ffc04e00: 41 9e 00 68 beq- cr7,ffc04e68 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, ffc04e04: 7f e3 fb 78 mr r3,r31 ffc04e08: 38 80 00 40 li r4,64 ffc04e0c: 4b ff fb c5 bl ffc049d0 ffc04e10: 3d 20 00 00 lis r9,0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) ffc04e14: 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, ffc04e18: 90 69 27 0c stw r3,9996(r9) ffc04e1c: 7c 6b 1b 78 mr r11,r3 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) ffc04e20: 41 9e 00 a0 beq- cr7,ffc04ec0 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++) ffc04e24: 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; ffc04e28: 3d 20 00 00 lis r9,0 ffc04e2c: 90 69 27 10 stw r3,10000(r9) for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) ffc04e30: 40 9d 00 30 ble- cr7,ffc04e60 <== NEVER TAKEN * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) ffc04e34: 3b ff ff ff addi r31,r31,-1 ffc04e38: 7f e9 03 a6 mtctr r31 ffc04e3c: 39 23 00 40 addi r9,r3,64 ffc04e40: 39 60 00 01 li r11,1 if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) iop->data1 = iop + 1; ffc04e44: 91 29 ff f8 stw r9,-8(r9) ffc04e48: 39 6b 00 01 addi r11,r11,1 ffc04e4c: 39 29 00 40 addi r9,r9,64 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) ffc04e50: 42 00 ff f4 bdnz+ ffc04e44 * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) ffc04e54: 39 6b ff ff addi r11,r11,-1 ffc04e58: 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++) ffc04e5c: 7d 63 5a 14 add r11,r3,r11 iop->data1 = iop + 1; iop->data1 = NULL; ffc04e60: 38 00 00 00 li r0,0 ffc04e64: 90 0b 00 38 stw r0,56(r11) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( ffc04e68: 3c 60 4c 42 lis r3,19522 ffc04e6c: 3c e0 00 00 lis r7,0 ffc04e70: 60 63 49 4f ori r3,r3,18767 ffc04e74: 38 80 00 01 li r4,1 ffc04e78: 38 a0 00 54 li r5,84 ffc04e7c: 38 c0 00 00 li r6,0 ffc04e80: 38 e7 27 14 addi r7,r7,10004 ffc04e84: 48 00 3c fd bl ffc08b80 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) ffc04e88: 2f 83 00 00 cmpwi cr7,r3,0 ffc04e8c: 40 9e 00 30 bne- cr7,ffc04ebc <== NEVER TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) ffc04e90: 3d 20 00 00 lis r9,0 ffc04e94: 80 09 26 48 lwz r0,9800(r9) ffc04e98: 2f 80 00 00 cmpwi cr7,r0,0 ffc04e9c: 41 9e 00 0c beq- cr7,ffc04ea8 <== NEVER TAKEN (* rtems_fs_init_helper)(); ffc04ea0: 7c 09 03 a6 mtctr r0 ffc04ea4: 4e 80 04 21 bctrl } ffc04ea8: 80 01 00 14 lwz r0,20(r1) ffc04eac: 83 e1 00 0c lwz r31,12(r1) ffc04eb0: 38 21 00 10 addi r1,r1,16 ffc04eb4: 7c 08 03 a6 mtlr r0 ffc04eb8: 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 ); ffc04ebc: 48 00 49 4d bl ffc09808 <== 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); ffc04ec0: 38 60 00 1a li r3,26 ffc04ec4: 48 00 49 45 bl ffc09808 =============================================================================== ffc0ee2c : */ int rtems_libio_is_file_open( void *node_access ) { ffc0ee2c: 94 21 ff e8 stwu r1,-24(r1) ffc0ee30: 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 ); ffc0ee34: 38 80 00 00 li r4,0 ffc0ee38: 93 c1 00 10 stw r30,16(r1) ffc0ee3c: 3f c0 00 00 lis r30,0 ffc0ee40: 38 a0 00 00 li r5,0 ffc0ee44: 93 e1 00 14 stw r31,20(r1) ffc0ee48: 7c 7f 1b 78 mr r31,r3 ffc0ee4c: 80 7e 27 14 lwz r3,10004(r30) ffc0ee50: 90 01 00 1c stw r0,28(r1) ffc0ee54: 93 a1 00 0c stw r29,12(r1) ffc0ee58: 4b ff a0 29 bl ffc08e80 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0ee5c: 3d 20 00 00 lis r9,0 ffc0ee60: 80 09 26 4c lwz r0,9804(r9) ffc0ee64: 3d 20 00 00 lis r9,0 ffc0ee68: 81 29 27 0c lwz r9,9996(r9) int rtems_libio_is_file_open( void *node_access ) { rtems_libio_t *iop; int result=0; ffc0ee6c: 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++){ ffc0ee70: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ee74: 41 9e 00 30 beq- cr7,ffc0eea4 <== NEVER TAKEN ffc0ee78: 7c 09 03 a6 mtctr r0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { ffc0ee7c: 80 09 00 18 lwz r0,24(r9) ffc0ee80: 70 0b 01 00 andi. r11,r0,256 ffc0ee84: 41 82 00 10 beq- ffc0ee94 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { ffc0ee88: 80 09 00 1c lwz r0,28(r9) ffc0ee8c: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0ee90: 41 9e 00 3c beq- cr7,ffc0eecc /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0ee94: 42 40 00 0c bdz- ffc0eea0 ffc0ee98: 39 29 00 40 addi r9,r9,64 ffc0ee9c: 4b ff ff e0 b ffc0ee7c int rtems_libio_is_file_open( void *node_access ) { rtems_libio_t *iop; int result=0; ffc0eea0: 3b a0 00 00 li r29,0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0eea4: 80 7e 27 14 lwz r3,10004(r30) ffc0eea8: 4b ff a1 61 bl ffc09008 } rtems_libio_unlock(); return result; } ffc0eeac: 80 01 00 1c lwz r0,28(r1) ffc0eeb0: 7f a3 eb 78 mr r3,r29 ffc0eeb4: 83 c1 00 10 lwz r30,16(r1) ffc0eeb8: 7c 08 03 a6 mtlr r0 ffc0eebc: 83 a1 00 0c lwz r29,12(r1) ffc0eec0: 83 e1 00 14 lwz r31,20(r1) ffc0eec4: 38 21 00 18 addi r1,r1,24 ffc0eec8: 4e 80 00 20 blr ffc0eecc: 80 7e 27 14 lwz r3,10004(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; ffc0eed0: 3b a0 00 01 li r29,1 ffc0eed4: 4b ff a1 35 bl ffc09008 } rtems_libio_unlock(); return result; } ffc0eed8: 80 01 00 1c lwz r0,28(r1) ffc0eedc: 7f a3 eb 78 mr r3,r29 ffc0eee0: 83 c1 00 10 lwz r30,16(r1) ffc0eee4: 7c 08 03 a6 mtlr r0 ffc0eee8: 83 a1 00 0c lwz r29,12(r1) ffc0eeec: 83 e1 00 14 lwz r31,20(r1) ffc0eef0: 38 21 00 18 addi r1,r1,24 ffc0eef4: 4e 80 00 20 blr =============================================================================== ffc0ed60 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { ffc0ed60: 94 21 ff e8 stwu r1,-24(r1) ffc0ed64: 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 ); ffc0ed68: 38 80 00 00 li r4,0 ffc0ed6c: 93 c1 00 10 stw r30,16(r1) ffc0ed70: 3f c0 00 00 lis r30,0 ffc0ed74: 38 a0 00 00 li r5,0 ffc0ed78: 93 e1 00 14 stw r31,20(r1) ffc0ed7c: 7c 7f 1b 78 mr r31,r3 ffc0ed80: 80 7e 27 14 lwz r3,10004(r30) ffc0ed84: 90 01 00 1c stw r0,28(r1) ffc0ed88: 93 a1 00 0c stw r29,12(r1) ffc0ed8c: 4b ff a0 f5 bl ffc08e80 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0ed90: 3d 20 00 00 lis r9,0 ffc0ed94: 80 09 26 4c lwz r0,9804(r9) ffc0ed98: 3d 20 00 00 lis r9,0 ffc0ed9c: 81 29 27 0c lwz r9,9996(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; ffc0eda0: 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++){ ffc0eda4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0eda8: 41 9e 00 30 beq- cr7,ffc0edd8 <== NEVER TAKEN ffc0edac: 7c 09 03 a6 mtctr r0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { ffc0edb0: 80 09 00 18 lwz r0,24(r9) ffc0edb4: 70 0b 01 00 andi. r11,r0,256 ffc0edb8: 41 82 00 10 beq- ffc0edc8 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { ffc0edbc: 80 09 00 2c lwz r0,44(r9) ffc0edc0: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0edc4: 41 9e 00 3c beq- cr7,ffc0ee00 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0edc8: 42 40 00 0c bdz- ffc0edd4 ffc0edcc: 39 29 00 40 addi r9,r9,64 ffc0edd0: 4b ff ff e0 b ffc0edb0 int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { rtems_libio_t *iop; int result = 0; ffc0edd4: 3b a0 00 00 li r29,0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0edd8: 80 7e 27 14 lwz r3,10004(r30) ffc0eddc: 4b ff a2 2d bl ffc09008 } rtems_libio_unlock(); return result; } ffc0ede0: 80 01 00 1c lwz r0,28(r1) ffc0ede4: 7f a3 eb 78 mr r3,r29 ffc0ede8: 83 c1 00 10 lwz r30,16(r1) ffc0edec: 7c 08 03 a6 mtlr r0 ffc0edf0: 83 a1 00 0c lwz r29,12(r1) ffc0edf4: 83 e1 00 14 lwz r31,20(r1) ffc0edf8: 38 21 00 18 addi r1,r1,24 ffc0edfc: 4e 80 00 20 blr ffc0ee00: 80 7e 27 14 lwz r3,10004(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; ffc0ee04: 3b a0 00 01 li r29,1 ffc0ee08: 4b ff a2 01 bl ffc09008 } rtems_libio_unlock(); return result; } ffc0ee0c: 80 01 00 1c lwz r0,28(r1) ffc0ee10: 7f a3 eb 78 mr r3,r29 ffc0ee14: 83 c1 00 10 lwz r30,16(r1) ffc0ee18: 7c 08 03 a6 mtlr r0 ffc0ee1c: 83 a1 00 0c lwz r29,12(r1) ffc0ee20: 83 e1 00 14 lwz r31,20(r1) ffc0ee24: 38 21 00 18 addi r1,r1,24 ffc0ee28: 4e 80 00 20 blr =============================================================================== ffc064bc : rtems_status_code rtems_libio_set_private_env(void) { ffc064bc: 94 21 ff a8 stwu r1,-88(r1) ffc064c0: 7c 08 02 a6 mflr r0 ffc064c4: 93 e1 00 54 stw r31,84(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); ffc064c8: 3f e0 ff c2 lis r31,-62 ffc064cc: 3b ff 95 b4 addi r31,r31,-27212 free(env); } } rtems_status_code rtems_libio_set_private_env(void) { ffc064d0: 90 01 00 5c stw r0,92(r1) ffc064d4: 93 a1 00 4c stw r29,76(r1) ffc064d8: 93 c1 00 50 stw r30,80(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); ffc064dc: 3b c1 00 08 addi r30,r1,8 free(env); } } rtems_status_code rtems_libio_set_private_env(void) { ffc064e0: 93 21 00 3c stw r25,60(r1) ffc064e4: 93 41 00 40 stw r26,64(r1) ffc064e8: 93 61 00 44 stw r27,68(r1) ffc064ec: 93 81 00 48 stw r28,72(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_id task_id = rtems_task_self(); ffc064f0: 48 00 39 05 bl ffc09df4 ffc064f4: 7c 7d 1b 78 mr r29,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); ffc064f8: 38 80 00 01 li r4,1 ffc064fc: 7f e3 fb 78 mr r3,r31 ffc06500: 38 a0 00 00 li r5,0 ffc06504: 7f c6 f3 78 mr r6,r30 ffc06508: 38 e0 00 00 li r7,0 ffc0650c: 4b ff e8 51 bl ffc04d5c if (rv != 0) ffc06510: 2f 83 00 00 cmpwi cr7,r3,0 error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; ffc06514: 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) ffc06518: 41 9e 00 30 beq- cr7,ffc06548 <== ALWAYS TAKEN error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; } ffc0651c: 80 01 00 5c lwz r0,92(r1) <== NOT EXECUTED ffc06520: 83 21 00 3c lwz r25,60(r1) <== NOT EXECUTED ffc06524: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc06528: 83 41 00 40 lwz r26,64(r1) <== NOT EXECUTED ffc0652c: 83 61 00 44 lwz r27,68(r1) <== NOT EXECUTED ffc06530: 83 81 00 48 lwz r28,72(r1) <== NOT EXECUTED ffc06534: 83 a1 00 4c lwz r29,76(r1) <== NOT EXECUTED ffc06538: 83 c1 00 50 lwz r30,80(r1) <== NOT EXECUTED ffc0653c: 83 e1 00 54 lwz r31,84(r1) <== NOT EXECUTED ffc06540: 38 21 00 58 addi r1,r1,88 <== NOT EXECUTED ffc06544: 4e 80 00 20 blr <== NOT EXECUTED 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); ffc06548: 3b 81 00 1c addi r28,r1,28 ffc0654c: 7f e3 fb 78 mr r3,r31 ffc06550: 38 80 00 01 li r4,1 ffc06554: 38 a0 00 00 li r5,0 ffc06558: 7f 86 e3 78 mr r6,r28 ffc0655c: 38 e0 00 00 li r7,0 ffc06560: 4b ff e7 fd bl ffc04d5c if (rv != 0) ffc06564: 2f 83 00 00 cmpwi cr7,r3,0 ffc06568: 40 9e 01 04 bne- cr7,ffc0666c <== 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 ffc0656c: 3f 20 00 00 lis r25,0 ffc06570: 83 f9 26 7c lwz r31,9852(r25) /* * Bharath: I'm not sure if the check can be reduced to * if( rtems_current_user_env->task_id != task_id ) { */ if ( ffc06574: 3f 60 00 00 lis r27,0 ffc06578: 3b 7b 2a 50 addi r27,r27,10832 ffc0657c: 7f 9f d8 00 cmpw cr7,r31,r27 ffc06580: 41 9e 00 10 beq- cr7,ffc06590 rtems_current_user_env == &rtems_global_user_env || rtems_current_user_env->task_id != task_id ffc06584: 80 1f 00 00 lwz r0,0(r31) ffc06588: 7f 80 e8 00 cmpw cr7,r0,r29 ffc0658c: 41 9e 00 3c beq- cr7,ffc065c8 ) { new_env = malloc(sizeof(rtems_user_env_t)); ffc06590: 38 60 00 48 li r3,72 ffc06594: 4b ff f1 31 bl ffc056c4 if (new_env == NULL) ffc06598: 2f 83 00 00 cmpwi cr7,r3,0 if ( rtems_current_user_env == &rtems_global_user_env || rtems_current_user_env->task_id != task_id ) { new_env = malloc(sizeof(rtems_user_env_t)); ffc0659c: 7c 7f 1b 78 mr r31,r3 if (new_env == NULL) ffc065a0: 41 9e 00 c4 beq- cr7,ffc06664 #ifdef HAVE_USERENV_REFCNT new_env->refcnt = 1; #endif sc = rtems_task_variable_add( ffc065a4: 3c a0 ff c0 lis r5,-64 ffc065a8: 38 60 00 00 li r3,0 ffc065ac: 38 99 26 7c addi r4,r25,9852 ffc065b0: 38 a5 64 6c addi r5,r5,25708 ffc065b4: 48 00 39 81 bl ffc09f34 RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) ffc065b8: 2f 83 00 00 cmpwi cr7,r3,0 ffc065bc: 40 9e 00 a0 bne- cr7,ffc0665c goto error_3; rtems_current_user_env = new_env; ffc065c0: 3d 20 00 00 lis r9,0 ffc065c4: 93 e9 26 7c stw r31,9852(r9) } /* Inherit the global values */ *rtems_current_user_env = rtems_global_user_env; ffc065c8: 7f e3 fb 78 mr r3,r31 ffc065cc: 7f 64 db 78 mr r4,r27 ffc065d0: 38 a0 00 48 li r5,72 ffc065d4: 48 00 d0 e5 bl ffc136b8 * 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; ffc065d8: 80 01 00 08 lwz r0,8(r1) } /* Inherit the global values */ *rtems_current_user_env = rtems_global_user_env; rtems_current_user_env->task_id = task_id; ffc065dc: 93 bf 00 00 stw r29,0(r31) * be freed when deleting the environment. */ rtems_filesystem_root = root_loc; rtems_filesystem_current = current_loc; return RTEMS_SUCCESSFUL; ffc065e0: 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; ffc065e4: 90 1f 00 18 stw r0,24(r31) ffc065e8: 80 01 00 0c lwz r0,12(r1) error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; } ffc065ec: 83 21 00 3c lwz r25,60(r1) * 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; ffc065f0: 90 1f 00 1c stw r0,28(r31) ffc065f4: 80 01 00 10 lwz r0,16(r1) error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; } ffc065f8: 83 41 00 40 lwz r26,64(r1) * 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; ffc065fc: 90 1f 00 20 stw r0,32(r31) ffc06600: 80 01 00 14 lwz r0,20(r1) error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; } ffc06604: 83 61 00 44 lwz r27,68(r1) * 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; ffc06608: 90 1f 00 24 stw r0,36(r31) ffc0660c: 80 01 00 18 lwz r0,24(r1) error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; } ffc06610: 83 81 00 48 lwz r28,72(r1) * 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; ffc06614: 90 1f 00 28 stw r0,40(r31) rtems_filesystem_current = current_loc; ffc06618: 80 01 00 1c lwz r0,28(r1) error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; } ffc0661c: 83 a1 00 4c lwz r29,76(r1) * 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; rtems_filesystem_current = current_loc; ffc06620: 90 1f 00 04 stw r0,4(r31) ffc06624: 80 01 00 20 lwz r0,32(r1) error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; } ffc06628: 83 c1 00 50 lwz r30,80(r1) * 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; rtems_filesystem_current = current_loc; ffc0662c: 90 1f 00 08 stw r0,8(r31) ffc06630: 80 01 00 24 lwz r0,36(r1) ffc06634: 90 1f 00 0c stw r0,12(r31) ffc06638: 80 01 00 28 lwz r0,40(r1) ffc0663c: 90 1f 00 10 stw r0,16(r31) ffc06640: 80 01 00 2c lwz r0,44(r1) ffc06644: 90 1f 00 14 stw r0,20(r31) error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; } ffc06648: 80 01 00 5c lwz r0,92(r1) ffc0664c: 83 e1 00 54 lwz r31,84(r1) ffc06650: 38 21 00 58 addi r1,r1,88 ffc06654: 7c 08 03 a6 mtlr r0 ffc06658: 4e 80 00 20 blr rtems_filesystem_current = current_loc; return RTEMS_SUCCESSFUL; error_3: free(new_env); ffc0665c: 7f e3 fb 78 mr r3,r31 ffc06660: 4b ff e8 85 bl ffc04ee4 error_2: rtems_filesystem_freenode(¤t_loc); ffc06664: 7f 83 e3 78 mr r3,r28 ffc06668: 4b ff e8 51 bl ffc04eb8 error_1: rtems_filesystem_freenode(&root_loc); ffc0666c: 7f c3 f3 78 mr r3,r30 ffc06670: 4b ff e8 49 bl ffc04eb8 error_0: return RTEMS_NO_MEMORY; } ffc06674: 80 01 00 5c lwz r0,92(r1) error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; ffc06678: 38 60 00 1a li r3,26 } ffc0667c: 83 21 00 3c lwz r25,60(r1) ffc06680: 7c 08 03 a6 mtlr r0 ffc06684: 83 41 00 40 lwz r26,64(r1) ffc06688: 83 61 00 44 lwz r27,68(r1) ffc0668c: 83 81 00 48 lwz r28,72(r1) ffc06690: 83 a1 00 4c lwz r29,76(r1) ffc06694: 83 c1 00 50 lwz r30,80(r1) ffc06698: 83 e1 00 54 lwz r31,84(r1) ffc0669c: 38 21 00 58 addi r1,r1,88 ffc066a0: 4e 80 00 20 blr =============================================================================== ffc066a4 : * 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) { ffc066a4: 94 21 ff d8 stwu r1,-40(r1) ffc066a8: 7c 08 02 a6 mflr r0 ffc066ac: 93 81 00 18 stw r28,24(r1) ffc066b0: 7c 7c 1b 78 mr r28,r3 ffc066b4: 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; ffc066b8: 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) { ffc066bc: 93 e1 00 24 stw r31,36(r1) ffc066c0: 90 01 00 2c stw r0,44(r1) ffc066c4: 93 c1 00 20 stw r30,32(r1) rtems_id current_task_id; /* * get current task id */ current_task_id = rtems_task_self(); ffc066c8: 48 00 37 2d bl ffc09df4 /* * 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 ) ffc066cc: 7f 9c 18 00 cmpw cr7,r28,r3 rtems_id current_task_id; /* * get current task id */ current_task_id = rtems_task_self(); ffc066d0: 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 ) ffc066d4: 41 9e 00 38 beq- cr7,ffc0670c <== NEVER TAKEN return RTEMS_SUCCESSFUL; /* * Try to get the requested user environment */ sc = rtems_task_variable_get( ffc066d8: 3f c0 00 00 lis r30,0 ffc066dc: 7f 83 e3 78 mr r3,r28 ffc066e0: 38 9e 26 7c addi r4,r30,9852 ffc066e4: 38 a1 00 08 addi r5,r1,8 ffc066e8: 48 00 39 61 bl ffc0a048 (void*)&shared_user_env ); /* * If it was not successful, return the error code */ if (sc != RTEMS_SUCCESSFUL) ffc066ec: 7c 7d 1b 79 mr. r29,r3 ffc066f0: 40 82 00 1c bne- ffc0670c * 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) { ffc066f4: 80 7e 26 7c lwz r3,9852(r30) ffc066f8: 80 03 00 00 lwz r0,0(r3) ffc066fc: 7f 80 f8 00 cmpw cr7,r0,r31 ffc06700: 41 9e 00 30 beq- cr7,ffc06730 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; ffc06704: 80 01 00 08 lwz r0,8(r1) ffc06708: 90 1e 26 7c stw r0,9852(r30) #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; } ffc0670c: 80 01 00 2c lwz r0,44(r1) ffc06710: 7f a3 eb 78 mr r3,r29 ffc06714: 83 81 00 18 lwz r28,24(r1) ffc06718: 7c 08 03 a6 mtlr r0 ffc0671c: 83 a1 00 1c lwz r29,28(r1) ffc06720: 83 c1 00 20 lwz r30,32(r1) ffc06724: 83 e1 00 24 lwz r31,36(r1) ffc06728: 38 21 00 28 addi r1,r1,40 ffc0672c: 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 ); ffc06730: 4b ff fd 3d bl ffc0646c ffc06734: 4b ff ff d0 b ffc06704 =============================================================================== ffc0ebc4 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { ffc0ebc4: 54 60 07 7c rlwinm r0,r3,0,29,30 ffc0ebc8: 2f 80 00 06 cmpwi cr7,r0,6 fcntl_flags |= O_RDWR; ffc0ebcc: 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 ) { ffc0ebd0: 41 9e 00 10 beq- cr7,ffc0ebe0 <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { ffc0ebd4: 70 60 00 02 andi. r0,r3,2 fcntl_flags |= O_RDONLY; ffc0ebd8: 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) { ffc0ebdc: 41 82 00 30 beq- ffc0ec0c <== 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 ) { ffc0ebe0: 70 69 00 01 andi. r9,r3,1 ffc0ebe4: 41 82 00 08 beq- ffc0ebec fcntl_flags |= O_NONBLOCK; ffc0ebe8: 60 00 40 00 ori r0,r0,16384 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { ffc0ebec: 70 69 02 00 andi. r9,r3,512 ffc0ebf0: 41 82 00 08 beq- ffc0ebf8 fcntl_flags |= O_APPEND; ffc0ebf4: 60 00 00 08 ori r0,r0,8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { ffc0ebf8: 70 69 04 00 andi. r9,r3,1024 ffc0ebfc: 41 82 00 08 beq- ffc0ec04 fcntl_flags |= O_CREAT; ffc0ec00: 60 00 02 00 ori r0,r0,512 } return fcntl_flags; } ffc0ec04: 7c 03 03 78 mr r3,r0 ffc0ec08: 4e 80 00 20 blr ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; ffc0ec0c: 54 60 f7 fe rlwinm r0,r3,30,31,31 <== NOT EXECUTED ffc0ec10: 4b ff ff d0 b ffc0ebe0 <== NOT EXECUTED =============================================================================== ffc08b00 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { ffc08b00: 94 21 ff e8 stwu r1,-24(r1) uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { ffc08b04: 3d 20 00 00 lis r9,0 * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { ffc08b08: 7c 08 02 a6 mflr r0 ffc08b0c: 7c 64 1b 78 mr r4,r3 uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { ffc08b10: 80 69 26 e4 lwz r3,9956(r9) ffc08b14: 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 ) { ffc08b18: 90 01 00 1c stw r0,28(r1) uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { ffc08b1c: 48 00 78 1d bl ffc10338 <_Protected_heap_Get_block_size> ffc08b20: 2f 83 00 00 cmpwi cr7,r3,0 ffc08b24: 41 9e 00 2c beq- cr7,ffc08b50 <== NEVER TAKEN MSBUMP(lifetime_freed, size); ffc08b28: 3d 00 00 00 lis r8,0 ffc08b2c: 81 41 00 08 lwz r10,8(r1) ffc08b30: 39 08 33 70 addi r8,r8,13168 ffc08b34: 81 68 00 28 lwz r11,40(r8) ffc08b38: 39 20 00 00 li r9,0 ffc08b3c: 81 88 00 2c lwz r12,44(r8) ffc08b40: 7d 4a 60 14 addc r10,r10,r12 ffc08b44: 7d 29 59 14 adde r9,r9,r11 ffc08b48: 91 28 00 28 stw r9,40(r8) ffc08b4c: 91 48 00 2c stw r10,44(r8) } } ffc08b50: 80 01 00 1c lwz r0,28(r1) ffc08b54: 38 21 00 18 addi r1,r1,24 ffc08b58: 7c 08 03 a6 mtlr r0 ffc08b5c: 4e 80 00 20 blr =============================================================================== ffc08b60 : { uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) ffc08b60: 7c 64 1b 79 mr. r4,r3 } static void rtems_malloc_statistics_at_malloc( void *pointer ) { ffc08b64: 94 21 ff e8 stwu r1,-24(r1) ffc08b68: 7c 08 02 a6 mflr r0 ffc08b6c: 90 01 00 1c stw r0,28(r1) uintptr_t actual_size = 0; ffc08b70: 38 00 00 00 li r0,0 ffc08b74: 90 01 00 08 stw r0,8(r1) uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) ffc08b78: 41 82 00 54 beq- ffc08bcc <== NEVER TAKEN return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); ffc08b7c: 3d 20 00 00 lis r9,0 ffc08b80: 80 69 26 e4 lwz r3,9956(r9) ffc08b84: 38 a1 00 08 addi r5,r1,8 ffc08b88: 48 00 77 b1 bl ffc10338 <_Protected_heap_Get_block_size> MSBUMP(lifetime_allocated, actual_size); ffc08b8c: 3d 00 00 00 lis r8,0 ffc08b90: 39 08 33 70 addi r8,r8,13168 ffc08b94: 81 41 00 08 lwz r10,8(r1) ffc08b98: 81 68 00 20 lwz r11,32(r8) ffc08b9c: 39 20 00 00 li r9,0 ffc08ba0: 81 88 00 24 lwz r12,36(r8) current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); ffc08ba4: 80 08 00 2c lwz r0,44(r8) if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); ffc08ba8: 7d 4a 60 14 addc r10,r10,r12 ffc08bac: 7d 29 59 14 adde r9,r9,r11 current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) ffc08bb0: 81 68 00 18 lwz r11,24(r8) if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); ffc08bb4: 91 28 00 20 stw r9,32(r8) current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); ffc08bb8: 7c 00 50 50 subf r0,r0,r10 if (current_depth > s->max_depth) ffc08bbc: 7f 80 58 40 cmplw cr7,r0,r11 if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); ffc08bc0: 91 48 00 24 stw r10,36(r8) current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) ffc08bc4: 40 9d 00 08 ble- cr7,ffc08bcc s->max_depth = current_depth; ffc08bc8: 90 08 00 18 stw r0,24(r8) } ffc08bcc: 80 01 00 1c lwz r0,28(r1) ffc08bd0: 38 21 00 18 addi r1,r1,24 ffc08bd4: 7c 08 03 a6 mtlr r0 ffc08bd8: 4e 80 00 20 blr =============================================================================== ffc13fbc : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { ffc13fbc: 94 21 ff e8 stwu r1,-24(r1) ffc13fc0: 7c 08 02 a6 mflr r0 ffc13fc4: 93 e1 00 14 stw r31,20(r1) void *return_this; /* * Parameter error checks */ if ( !pointer ) ffc13fc8: 7c 7f 1b 79 mr. r31,r3 int rtems_memalign( void **pointer, size_t alignment, size_t size ) { ffc13fcc: 93 81 00 08 stw r28,8(r1) ffc13fd0: 7c bc 2b 78 mr r28,r5 ffc13fd4: 93 a1 00 0c stw r29,12(r1) /* * Parameter error checks */ if ( !pointer ) return EINVAL; ffc13fd8: 3b a0 00 16 li r29,22 int rtems_memalign( void **pointer, size_t alignment, size_t size ) { ffc13fdc: 93 c1 00 10 stw r30,16(r1) ffc13fe0: 7c 9e 23 78 mr r30,r4 ffc13fe4: 90 01 00 1c stw r0,28(r1) void *return_this; /* * Parameter error checks */ if ( !pointer ) ffc13fe8: 41 82 00 6c beq- ffc14054 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc13fec: 3d 20 00 00 lis r9,0 ffc13ff0: 80 09 27 88 lwz r0,10120(r9) ffc13ff4: 2f 80 00 03 cmpwi cr7,r0,3 * Parameter error checks */ if ( !pointer ) return EINVAL; *pointer = NULL; ffc13ff8: 38 00 00 00 li r0,0 ffc13ffc: 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()) && ffc14000: 41 9e 00 78 beq- cr7,ffc14078 <== ALWAYS TAKEN return EINVAL; /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); ffc14004: 4b ff 21 35 bl ffc06138 Heap_Control *heap, uintptr_t size, uintptr_t alignment ) { return ffc14008: 3d 20 00 00 lis r9,0 ffc1400c: 80 69 26 84 lwz r3,9860(r9) ffc14010: 7f c5 f3 78 mr r5,r30 ffc14014: 7f 84 e3 78 mr r4,r28 ffc14018: 38 c0 00 00 li r6,0 ffc1401c: 4b ff 88 31 bl ffc0c84c <_Protected_heap_Allocate_aligned_with_boundary> RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) return ENOMEM; ffc14020: 3b a0 00 0c li r29,12 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) ffc14024: 7c 7e 1b 79 mr. r30,r3 ffc14028: 41 82 00 2c beq- ffc14054 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) ffc1402c: 3d 20 00 00 lis r9,0 ffc14030: 81 29 26 e8 lwz r9,9960(r9) ffc14034: 2f 89 00 00 cmpwi cr7,r9,0 ffc14038: 41 9e 00 14 beq- cr7,ffc1404c (*rtems_malloc_statistics_helpers->at_malloc)(pointer); ffc1403c: 80 09 00 04 lwz r0,4(r9) ffc14040: 7f e3 fb 78 mr r3,r31 ffc14044: 7c 09 03 a6 mtctr r0 ffc14048: 4e 80 04 21 bctrl *pointer = return_this; ffc1404c: 93 df 00 00 stw r30,0(r31) return 0; ffc14050: 3b a0 00 00 li r29,0 } ffc14054: 80 01 00 1c lwz r0,28(r1) ffc14058: 7f a3 eb 78 mr r3,r29 ffc1405c: 83 81 00 08 lwz r28,8(r1) ffc14060: 7c 08 03 a6 mtlr r0 ffc14064: 83 a1 00 0c lwz r29,12(r1) ffc14068: 83 c1 00 10 lwz r30,16(r1) ffc1406c: 83 e1 00 14 lwz r31,20(r1) ffc14070: 38 21 00 18 addi r1,r1,24 ffc14074: 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() ) ffc14078: 4b ff 20 79 bl ffc060f0 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc1407c: 2f 83 00 00 cmpwi cr7,r3,0 ffc14080: 40 9e ff 84 bne+ cr7,ffc14004 <== ALWAYS TAKEN ffc14084: 4b ff ff d0 b ffc14054 <== NOT EXECUTED =============================================================================== ffc12200 : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { ffc12200: 94 21 ff 80 stwu r1,-128(r1) ffc12204: 7d 80 00 26 mfcr r12 ffc12208: 7c 08 02 a6 mflr r0 ffc1220c: 93 61 00 6c stw r27,108(r1) ffc12210: 7c 9b 23 78 mr r27,r4 ffc12214: 93 c1 00 78 stw r30,120(r1) ffc12218: 90 01 00 84 stw r0,132(r1) ffc1221c: 93 01 00 60 stw r24,96(r1) ffc12220: 93 21 00 64 stw r25,100(r1) ffc12224: 93 41 00 68 stw r26,104(r1) ffc12228: 93 81 00 70 stw r28,112(r1) ffc1222c: 93 a1 00 74 stw r29,116(r1) ffc12230: 93 e1 00 7c stw r31,124(r1) ffc12234: 91 81 00 5c stw r12,92(r1) int success = 0; char *dup_path = strdup(path); ffc12238: 48 00 31 cd bl ffc15404 if (dup_path != NULL) { ffc1223c: 7c 7e 1b 79 mr. r30,r3 success = build(dup_path, mode); free(dup_path); } return success != 0 ? 0 : -1; ffc12240: 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) { ffc12244: 41 82 01 2c beq- ffc12370 <== NEVER TAKEN char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ffc12248: 88 1e 00 00 lbz r0,0(r30) ffc1224c: 7f df f3 78 mr r31,r30 ffc12250: 2f 80 00 2f cmpwi cr7,r0,47 ffc12254: 41 9e 01 64 beq- cr7,ffc123b8 ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') ffc12258: 2f 80 00 00 cmpwi cr7,r0,0 char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ffc1225c: 3b a0 00 00 li r29,0 ffc12260: 39 20 00 01 li r9,1 retval = 0; break; } } if (!last) *p = '/'; ffc12264: 3b 80 00 2f li r28,47 } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { if (errno == EEXIST || errno == EISDIR) { if (stat(path, &sb) < 0) { ffc12268: 3b 21 00 08 addi r25,r1,8 for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; ffc1226c: 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') ffc12270: 41 9e 00 18 beq- cr7,ffc12288 <== NEVER TAKEN last = 1; else if (p[0] != '/') ffc12274: 2f 80 00 2f cmpwi cr7,r0,47 ffc12278: 41 9e 00 a8 beq- cr7,ffc12320 retval = 0; break; } } if (!last) *p = '/'; ffc1227c: 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') ffc12280: 2f 80 00 00 cmpwi cr7,r0,0 ffc12284: 40 be ff f0 bne- cr7,ffc12274 else if (p[0] != '/') continue; *p = '\0'; if (!last && p[1] == '\0') last = 1; if (first) { ffc12288: 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'; ffc1228c: 98 1f 00 00 stb r0,0(r31) ffc12290: 3b 00 00 01 li r24,1 if (!last && p[1] == '\0') last = 1; if (first) { ffc12294: 41 be 00 a4 beq+ cr7,ffc12338 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) ffc12298: 2e 18 00 00 cmpwi cr4,r24,0 * mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); ffc1229c: 38 60 00 00 li r3,0 ffc122a0: 48 00 02 51 bl ffc124f0 ffc122a4: 7c 7d 1b 78 mr r29,r3 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); ffc122a8: 54 63 06 ae rlwinm r3,r3,0,26,23 ffc122ac: 48 00 02 45 bl ffc124f0 first = 0; } if (last) ffc122b0: 41 b2 00 90 beq+ cr4,ffc12340 (void)umask(oumask); ffc122b4: 7f a3 eb 78 mr r3,r29 ffc122b8: 48 00 02 39 bl ffc124f0 if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { ffc122bc: 7f 64 db 78 mr r4,r27 ffc122c0: 7f c3 f3 78 mr r3,r30 ffc122c4: 4b ff 49 95 bl ffc06c58 ffc122c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc122cc: 40 bc 00 88 bge+ cr7,ffc12354 if (errno == EEXIST || errno == EISDIR) { ffc122d0: 48 00 1e a5 bl ffc14174 <__errno> ffc122d4: 80 03 00 00 lwz r0,0(r3) ffc122d8: 2f 80 00 11 cmpwi cr7,r0,17 ffc122dc: 41 9e 00 14 beq- cr7,ffc122f0 ffc122e0: 48 00 1e 95 bl ffc14174 <__errno> ffc122e4: 80 03 00 00 lwz r0,0(r3) ffc122e8: 2f 80 00 15 cmpwi cr7,r0,21 ffc122ec: 40 9e 01 1c bne- cr7,ffc12408 <== ALWAYS TAKEN if (stat(path, &sb) < 0) { ffc122f0: 7f c3 f3 78 mr r3,r30 ffc122f4: 7f 24 cb 78 mr r4,r25 ffc122f8: 48 00 01 19 bl ffc12410 ffc122fc: 2f 83 00 00 cmpwi cr7,r3,0 ffc12300: 41 9c 01 08 blt- cr7,ffc12408 <== NEVER TAKEN retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { ffc12304: 80 01 00 14 lwz r0,20(r1) ffc12308: 54 00 04 26 rlwinm r0,r0,0,16,19 ffc1230c: 2f 80 40 00 cmpwi cr7,r0,16384 ffc12310: 40 9e 00 b4 bne- cr7,ffc123c4 else errno = ENOTDIR; retval = 0; break; } if (last) ffc12314: 41 92 00 94 beq- cr4,ffc123a8 retval = 2; ffc12318: 3b e0 00 02 li r31,2 ffc1231c: 48 00 00 40 b ffc1235c else if (p[0] != '/') continue; *p = '\0'; if (!last && p[1] == '\0') last = 1; if (first) { ffc12320: 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') ffc12324: 8b 1f 00 01 lbz r24,1(r31) for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; ffc12328: 9b 5f 00 00 stb r26,0(r31) if (!last && p[1] == '\0') ffc1232c: 7f 18 00 34 cntlzw r24,r24 ffc12330: 57 18 d9 7e rlwinm r24,r24,27,5,31 last = 1; if (first) { ffc12334: 40 be ff 64 bne- cr7,ffc12298 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) ffc12338: 2e 18 00 00 cmpwi cr4,r24,0 ffc1233c: 40 b2 ff 78 bne- cr4,ffc122b4 (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { ffc12340: 38 80 01 ff li r4,511 ffc12344: 7f c3 f3 78 mr r3,r30 ffc12348: 4b ff 49 11 bl ffc06c58 ffc1234c: 2f 83 00 00 cmpwi cr7,r3,0 ffc12350: 41 bc ff 80 blt- cr7,ffc122d0 } else { retval = 0; break; } } if (!last) ffc12354: 41 92 00 54 beq- cr4,ffc123a8 ffc12358: 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); ffc1235c: 7f c3 f3 78 mr r3,r30 ffc12360: 4b ff 40 01 bl ffc06360 } return success != 0 ? 0 : -1; ffc12364: 2f 9f 00 00 cmpwi cr7,r31,0 ffc12368: 38 60 00 00 li r3,0 ffc1236c: 41 9e 00 94 beq- cr7,ffc12400 <== NEVER TAKEN } ffc12370: 80 01 00 84 lwz r0,132(r1) ffc12374: 81 81 00 5c lwz r12,92(r1) ffc12378: 7c 08 03 a6 mtlr r0 ffc1237c: 83 01 00 60 lwz r24,96(r1) ffc12380: 83 21 00 64 lwz r25,100(r1) ffc12384: 7d 80 81 20 mtcrf 8,r12 ffc12388: 83 41 00 68 lwz r26,104(r1) ffc1238c: 83 61 00 6c lwz r27,108(r1) ffc12390: 83 81 00 70 lwz r28,112(r1) ffc12394: 83 a1 00 74 lwz r29,116(r1) ffc12398: 83 c1 00 78 lwz r30,120(r1) ffc1239c: 83 e1 00 7c lwz r31,124(r1) ffc123a0: 38 21 00 80 addi r1,r1,128 ffc123a4: 4e 80 00 20 blr retval = 0; break; } } if (!last) *p = '/'; ffc123a8: 9b 9f 00 00 stb r28,0(r31) ffc123ac: 39 20 00 00 li r9,0 ffc123b0: 8c 1f 00 01 lbzu r0,1(r31) ffc123b4: 4b ff fe cc b ffc12280 p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; ffc123b8: 88 1e 00 01 lbz r0,1(r30) ffc123bc: 3b fe 00 01 addi r31,r30,1 ffc123c0: 4b ff fe 98 b ffc12258 if (errno == EEXIST || errno == EISDIR) { if (stat(path, &sb) < 0) { retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { if (last) ffc123c4: 41 92 00 20 beq- cr4,ffc123e4 errno = EEXIST; ffc123c8: 48 00 1d ad bl ffc14174 <__errno> ffc123cc: 38 00 00 11 li r0,17 ffc123d0: 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); ffc123d4: 7f c3 f3 78 mr r3,r30 ffc123d8: 4b ff 3f 89 bl ffc06360 } return success != 0 ? 0 : -1; ffc123dc: 38 60 ff ff li r3,-1 ffc123e0: 4b ff ff 90 b ffc12370 break; } else if (!S_ISDIR(sb.st_mode)) { if (last) errno = EEXIST; else errno = ENOTDIR; ffc123e4: 48 00 1d 91 bl ffc14174 <__errno> ffc123e8: 38 00 00 14 li r0,20 ffc123ec: 90 03 00 00 stw r0,0(r3) } if (!last) *p = '/'; } if (!first && !last) (void)umask(oumask); ffc123f0: 7f a3 eb 78 mr r3,r29 ffc123f4: 48 00 00 fd bl ffc124f0 int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); ffc123f8: 7f c3 f3 78 mr r3,r30 ffc123fc: 4b ff 3f 65 bl ffc06360 } return success != 0 ? 0 : -1; ffc12400: 38 60 ff ff li r3,-1 ffc12404: 4b ff ff 6c b ffc12370 } } if (!last) *p = '/'; } if (!first && !last) ffc12408: 41 92 ff e8 beq+ cr4,ffc123f0 <== NEVER TAKEN ffc1240c: 4b ff ff ec b ffc123f8 =============================================================================== ffc0af54 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { ffc0af54: 94 21 ff f0 stwu r1,-16(r1) ffc0af58: 7c 08 02 a6 mflr r0 ffc0af5c: 93 e1 00 0c stw r31,12(r1) int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0af60: 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 ) { ffc0af64: 90 01 00 14 stw r0,20(r1) /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; ffc0af68: 38 00 00 09 li r0,9 int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0af6c: 41 82 00 7c beq- ffc0afe8 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); ffc0af70: 54 84 04 3e clrlwi r4,r4,16 ffc0af74: 48 00 24 f5 bl ffc0d468 <_Objects_Get_information> if ( !obj_info ) return RTEMS_INVALID_NUMBER; ffc0af78: 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 ) ffc0af7c: 2c 03 00 00 cmpwi r3,0 ffc0af80: 41 82 00 68 beq- ffc0afe8 * 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; ffc0af84: 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; ffc0af88: 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++ ) ffc0af8c: 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; ffc0af90: 81 63 00 0c lwz r11,12(r3) info->auto_extend = obj_info->auto_extend; ffc0af94: 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; ffc0af98: 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++ ) ffc0af9c: 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; ffc0afa0: 91 7f 00 04 stw r11,4(r31) info->auto_extend = obj_info->auto_extend; ffc0afa4: 99 3f 00 0c stb r9,12(r31) info->maximum = obj_info->maximum; ffc0afa8: 91 1f 00 08 stw r8,8(r31) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0afac: 41 9e 00 34 beq- cr7,ffc0afe0 <== NEVER TAKEN ffc0afb0: 80 e3 00 1c lwz r7,28(r3) ffc0afb4: 39 60 00 01 li r11,1 ffc0afb8: 39 20 00 01 li r9,1 ffc0afbc: 39 29 00 01 addi r9,r9,1 ffc0afc0: 7f 88 48 40 cmplw cr7,r8,r9 if ( !obj_info->local_table[i] ) ffc0afc4: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc0afc8: 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++ ) ffc0afcc: 7d 2b 4b 78 mr r11,r9 if ( !obj_info->local_table[i] ) unallocated++; ffc0afd0: 20 ca 00 00 subfic r6,r10,0 ffc0afd4: 7c c0 01 94 addze r6,r0 ffc0afd8: 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++ ) ffc0afdc: 40 9c ff e0 bge+ cr7,ffc0afbc if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; ffc0afe0: 90 1f 00 10 stw r0,16(r31) return RTEMS_SUCCESSFUL; ffc0afe4: 38 00 00 00 li r0,0 } ffc0afe8: 7c 03 03 78 mr r3,r0 ffc0afec: 80 01 00 14 lwz r0,20(r1) ffc0aff0: 83 e1 00 0c lwz r31,12(r1) ffc0aff4: 38 21 00 10 addi r1,r1,16 ffc0aff8: 7c 08 03 a6 mtlr r0 ffc0affc: 4e 80 00 20 blr =============================================================================== ffc0afb0 : void rtems_panic( const char *printf_format, ... ) { ffc0afb0: 94 21 ff 88 stwu r1,-120(r1) ffc0afb4: 7c 08 02 a6 mflr r0 ffc0afb8: 90 81 00 1c stw r4,28(r1) ffc0afbc: 90 01 00 7c stw r0,124(r1) ffc0afc0: 90 a1 00 20 stw r5,32(r1) ffc0afc4: 90 c1 00 24 stw r6,36(r1) ffc0afc8: 90 e1 00 28 stw r7,40(r1) ffc0afcc: 91 01 00 2c stw r8,44(r1) ffc0afd0: 91 21 00 30 stw r9,48(r1) ffc0afd4: 91 41 00 34 stw r10,52(r1) ffc0afd8: 40 86 00 24 bne- cr1,ffc0affc <== ALWAYS TAKEN ffc0afdc: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED ffc0afe0: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED ffc0afe4: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED ffc0afe8: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED ffc0afec: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED ffc0aff0: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED ffc0aff4: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED ffc0aff8: d9 01 00 70 stfd f8,112(r1) <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); ffc0affc: 38 00 00 01 li r0,1 ffc0b000: 98 01 00 08 stb r0,8(r1) ffc0b004: 38 00 00 00 li r0,0 void rtems_panic( const char *printf_format, ... ) { ffc0b008: 7c 64 1b 78 mr r4,r3 va_list arglist; va_start(arglist, printf_format); ffc0b00c: 98 01 00 09 stb r0,9(r1) ffc0b010: 38 01 00 80 addi r0,r1,128 (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc0b014: 38 a1 00 08 addi r5,r1,8 ... ) { va_list arglist; va_start(arglist, printf_format); ffc0b018: 90 01 00 0c stw r0,12(r1) (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc0b01c: 3c 60 20 00 lis r3,8192 ... ) { va_list arglist; va_start(arglist, printf_format); ffc0b020: 38 01 00 18 addi r0,r1,24 ffc0b024: 90 01 00 10 stw r0,16(r1) (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc0b028: 4b ff fc fd bl ffc0ad24 va_end(arglist); rtems_error(0, "fatal error, exiting"); ffc0b02c: 3c 80 ff c3 lis r4,-61 ffc0b030: 38 84 99 f8 addi r4,r4,-26120 ffc0b034: 38 60 00 00 li r3,0 ffc0b038: 4c c6 31 82 crclr 4*cr1+eq ffc0b03c: 4b ff fe 9d bl ffc0aed8 _exit(errno); ffc0b040: 48 00 e5 55 bl ffc19594 <__errno> ffc0b044: 80 63 00 00 lwz r3,0(r3) ffc0b048: 48 00 0d 7d bl ffc0bdc4 <_exit> =============================================================================== ffc18650 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc18650: 94 21 ff d0 stwu r1,-48(r1) ffc18654: 7c 08 02 a6 mflr r0 ffc18658: 93 e1 00 2c stw r31,44(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc1865c: 7c 7f 1b 79 mr. r31,r3 return RTEMS_INVALID_NAME; ffc18660: 38 60 00 03 li r3,3 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc18664: 93 c1 00 28 stw r30,40(r1) ffc18668: 7c be 2b 78 mr r30,r5 ffc1866c: 90 01 00 34 stw r0,52(r1) ffc18670: 93 61 00 1c stw r27,28(r1) ffc18674: 93 81 00 20 stw r28,32(r1) ffc18678: 93 a1 00 24 stw r29,36(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc1867c: 41 82 00 48 beq- ffc186c4 return RTEMS_INVALID_NAME; if ( !starting_address ) ffc18680: 2f 84 00 00 cmpwi cr7,r4,0 return RTEMS_INVALID_ADDRESS; ffc18684: 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 ) ffc18688: 41 9e 00 3c beq- cr7,ffc186c4 return RTEMS_INVALID_ADDRESS; if ( !id ) ffc1868c: 2f 88 00 00 cmpwi cr7,r8,0 ffc18690: 41 9e 00 34 beq- cr7,ffc186c4 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc18694: 2f 85 00 00 cmpwi cr7,r5,0 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; ffc18698: 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 || ffc1869c: 41 9e 00 28 beq- cr7,ffc186c4 ffc186a0: 2f 86 00 00 cmpwi cr7,r6,0 ffc186a4: 41 9e 00 20 beq- cr7,ffc186c4 ffc186a8: 7f 85 30 40 cmplw cr7,r5,r6 ffc186ac: 41 9c 00 18 blt- cr7,ffc186c4 ffc186b0: 70 c0 00 07 andi. r0,r6,7 ffc186b4: 40 82 00 10 bne- ffc186c4 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc186b8: 70 9b 00 07 andi. r27,r4,7 return RTEMS_INVALID_ADDRESS; ffc186bc: 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 ) ) ffc186c0: 41 82 00 28 beq- ffc186e8 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc186c4: 80 01 00 34 lwz r0,52(r1) ffc186c8: 83 61 00 1c lwz r27,28(r1) ffc186cc: 7c 08 03 a6 mtlr r0 ffc186d0: 83 81 00 20 lwz r28,32(r1) ffc186d4: 83 a1 00 24 lwz r29,36(r1) ffc186d8: 83 c1 00 28 lwz r30,40(r1) ffc186dc: 83 e1 00 2c lwz r31,44(r1) ffc186e0: 38 21 00 30 addi r1,r1,48 ffc186e4: 4e 80 00 20 blr ffc186e8: 3d 20 00 00 lis r9,0 ffc186ec: 81 69 28 40 lwz r11,10304(r9) ffc186f0: 38 0b 00 01 addi r0,r11,1 ffc186f4: 90 09 28 40 stw r0,10304(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 ); ffc186f8: 3f 80 00 00 lis r28,0 ffc186fc: 90 81 00 08 stw r4,8(r1) ffc18700: 3b 9c 6e 60 addi r28,r28,28256 ffc18704: 7f 83 e3 78 mr r3,r28 ffc18708: 90 c1 00 0c stw r6,12(r1) ffc1870c: 90 e1 00 10 stw r7,16(r1) ffc18710: 91 01 00 14 stw r8,20(r1) ffc18714: 48 00 5e e5 bl ffc1e5f8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { ffc18718: 7c 7d 1b 79 mr. r29,r3 ffc1871c: 80 81 00 08 lwz r4,8(r1) ffc18720: 80 c1 00 0c lwz r6,12(r1) ffc18724: 80 e1 00 10 lwz r7,16(r1) ffc18728: 81 01 00 14 lwz r8,20(r1) ffc1872c: 41 82 00 50 beq- ffc1877c 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, ffc18730: 7c be 33 96 divwu r5,r30,r6 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; ffc18734: 90 9d 00 10 stw r4,16(r29) the_partition->length = length; the_partition->buffer_size = buffer_size; ffc18738: 90 dd 00 18 stw r6,24(r29) the_partition->attribute_set = attribute_set; ffc1873c: 90 fd 00 1c stw r7,28(r29) return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; ffc18740: 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; ffc18744: 93 7d 00 20 stw r27,32(r29) _Chain_Initialize( &the_partition->Memory, starting_address, ffc18748: 91 01 00 14 stw r8,20(r1) ffc1874c: 38 7d 00 24 addi r3,r29,36 ffc18750: 48 00 41 f5 bl ffc1c944 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc18754: 80 1d 00 08 lwz r0,8(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc18758: 81 7c 00 1c lwz r11,28(r28) ffc1875c: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc18760: 7f ab 49 2e stwx r29,r11,r9 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc18764: 93 fd 00 0c stw r31,12(r29) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; ffc18768: 81 01 00 14 lwz r8,20(r1) ffc1876c: 90 08 00 00 stw r0,0(r8) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); ffc18770: 48 00 73 b1 bl ffc1fb20 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc18774: 38 60 00 00 li r3,0 ffc18778: 4b ff ff 4c b ffc186c4 _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); ffc1877c: 48 00 73 a5 bl ffc1fb20 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; ffc18780: 38 60 00 05 li r3,5 ffc18784: 4b ff ff 40 b ffc186c4 =============================================================================== ffc18914 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { ffc18914: 94 21 ff e0 stwu r1,-32(r1) ffc18918: 7c 08 02 a6 mflr r0 ffc1891c: 90 01 00 24 stw r0,36(r1) ffc18920: 7c 60 1b 78 mr r0,r3 Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); ffc18924: 3c 60 00 00 lis r3,0 ffc18928: 93 e1 00 1c stw r31,28(r1) ffc1892c: 38 63 6e 60 addi r3,r3,28256 ffc18930: 7c 9f 23 78 mr r31,r4 ffc18934: 38 a1 00 08 addi r5,r1,8 ffc18938: 93 c1 00 18 stw r30,24(r1) ffc1893c: 7c 04 03 78 mr r4,r0 ffc18940: 48 00 63 1d bl ffc1ec5c <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc18944: 80 01 00 08 lwz r0,8(r1) ffc18948: 7c 7e 1b 78 mr r30,r3 ffc1894c: 2f 80 00 00 cmpwi cr7,r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc18950: 38 60 00 04 li r3,4 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc18954: 40 9e 00 58 bne- cr7,ffc189ac ) { void *starting; void *ending; starting = the_partition->starting_address; ffc18958: 80 1e 00 10 lwz r0,16(r30) ending = _Addresses_Add_offset( starting, the_partition->length ); ffc1895c: 81 3e 00 14 lwz r9,20(r30) const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc18960: 7f 9f 00 40 cmplw cr7,r31,r0 ffc18964: 41 9c 00 60 blt- cr7,ffc189c4 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc18968: 7d 20 4a 14 add r9,r0,r9 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc1896c: 7f 9f 48 40 cmplw cr7,r31,r9 ffc18970: 41 9d 00 54 bgt- cr7,ffc189c4 <== NEVER TAKEN offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); ffc18974: 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); ffc18978: 7c 00 f8 50 subf r0,r0,r31 ffc1897c: 7d 60 4b 96 divwu r11,r0,r9 ffc18980: 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 ) && ffc18984: 7f 80 48 00 cmpw cr7,r0,r9 ffc18988: 40 9e 00 3c bne- cr7,ffc189c4 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); ffc1898c: 38 7e 00 24 addi r3,r30,36 ffc18990: 7f e4 fb 78 mr r4,r31 ffc18994: 48 00 3f 15 bl ffc1c8a8 <_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; ffc18998: 81 3e 00 20 lwz r9,32(r30) ffc1899c: 38 09 ff ff addi r0,r9,-1 ffc189a0: 90 1e 00 20 stw r0,32(r30) _Thread_Enable_dispatch(); ffc189a4: 48 00 71 7d bl ffc1fb20 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc189a8: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc189ac: 80 01 00 24 lwz r0,36(r1) ffc189b0: 83 c1 00 18 lwz r30,24(r1) ffc189b4: 7c 08 03 a6 mtlr r0 ffc189b8: 83 e1 00 1c lwz r31,28(r1) ffc189bc: 38 21 00 20 addi r1,r1,32 ffc189c0: 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(); ffc189c4: 48 00 71 5d bl ffc1fb20 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc189c8: 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; ffc189cc: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc189d0: 83 c1 00 18 lwz r30,24(r1) ffc189d4: 7c 08 03 a6 mtlr r0 ffc189d8: 83 e1 00 1c lwz r31,28(r1) ffc189dc: 38 21 00 20 addi r1,r1,32 ffc189e0: 4e 80 00 20 blr =============================================================================== ffc04028 : void rtems_print_buffer( const unsigned char *buffer, int length ) { ffc04028: 7d 80 00 26 mfcr r12 int i, mod, max; if ( !length ) return; ffc0402c: 2c 04 00 00 cmpwi r4,0 void rtems_print_buffer( const unsigned char *buffer, int length ) { ffc04030: 94 21 ff 40 stwu r1,-192(r1) ffc04034: 7c 08 02 a6 mflr r0 ffc04038: 92 c1 00 98 stw r22,152(r1) ffc0403c: 7c 76 1b 78 mr r22,r3 ffc04040: 90 01 00 c4 stw r0,196(r1) ffc04044: 92 61 00 8c stw r19,140(r1) ffc04048: 92 81 00 90 stw r20,144(r1) ffc0404c: 92 a1 00 94 stw r21,148(r1) ffc04050: 92 e1 00 9c stw r23,156(r1) ffc04054: 93 01 00 a0 stw r24,160(r1) ffc04058: 93 21 00 a4 stw r25,164(r1) ffc0405c: 93 41 00 a8 stw r26,168(r1) ffc04060: 93 61 00 ac stw r27,172(r1) ffc04064: 93 81 00 b0 stw r28,176(r1) ffc04068: 93 a1 00 b4 stw r29,180(r1) ffc0406c: 93 c1 00 b8 stw r30,184(r1) ffc04070: 93 e1 00 bc stw r31,188(r1) ffc04074: 91 81 00 88 stw r12,136(r1) int i, mod, max; if ( !length ) return; ffc04078: 41 82 01 0c beq- ffc04184 mod = length % 16; ffc0407c: 7c 98 26 70 srawi r24,r4,4 ffc04080: 7f 18 01 94 addze r24,r24 ffc04084: 57 18 20 36 rlwinm r24,r24,4,0,27 ffc04088: 7f 18 20 50 subf r24,r24,r4 max = length - mod; for ( i=0 ; i ffc04094: 3f 40 ff c2 lis r26,-62 ffc04098: 3f 60 00 00 lis r27,0 ffc0409c: 3f 80 ff c2 lis r28,-62 ffc040a0: 3e e0 ff c2 lis r23,-62 ffc040a4: 3b 20 00 00 li r25,0 ffc040a8: 3b 5a f6 14 addi r26,r26,-2540 ffc040ac: 3b e1 00 08 addi r31,r1,8 ffc040b0: 3b 7b 26 e8 addi r27,r27,9960 ffc040b4: 3b 9c f6 1c addi r28,r28,-2532 ffc040b8: 3a f7 f6 24 addi r23,r23,-2524 { int i; char line_buffer[120]; line_buffer[0] = '\0'; ffc040bc: 3a 60 00 00 li r19,0 sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); ffc040c0: 3a 80 7c 00 li r20,31744 { int i; char line_buffer[120]; line_buffer[0] = '\0'; ffc040c4: 9a 61 00 08 stb r19,8(r1) static inline void Dump_Line( const unsigned char *buffer, int length ); void rtems_print_buffer( ffc040c8: 7f b6 ca 14 add r29,r22,r25 int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); ffc040f4: 7f e3 fb 78 mr r3,r31 ffc040f8: 48 00 f8 b1 bl ffc139a8 for( i=0 ; i ffc0412c: 7c 06 03 78 mr r6,r0 ffc04130: 4c c6 31 82 crclr 4*cr1+eq ffc04134: 48 00 f4 55 bl ffc13588 for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); ffc04144: 7f e3 fb 78 mr r3,r31 ffc04148: 48 00 f8 61 bl ffc139a8 ffc0414c: a1 57 00 00 lhz r10,0(r23) ffc04150: 89 77 00 02 lbz r11,2(r23) ffc04154: 7c 60 1b 78 mr r0,r3 ffc04158: 7d 3f 1a 14 add r9,r31,r3 ffc0415c: 7d 5f 03 2e sthx r10,r31,r0 printk( line_buffer ); ffc04160: 7f e3 fb 78 mr r3,r31 isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); ffc04164: 99 69 00 02 stb r11,2(r9) mod = length % 16; max = length - mod; for ( i=0 ; i mod = length % 16; max = length - mod; for ( i=0 ; i Dump_Line( &buffer[ i ], 16 ); if ( mod ) ffc0417c: 2e 18 00 00 cmpwi cr4,r24,0 ffc04180: 40 92 00 50 bne- cr4,ffc041d0 Dump_Line( &buffer[ max ], mod ); } ffc04184: 80 01 00 c4 lwz r0,196(r1) ffc04188: 81 81 00 88 lwz r12,136(r1) ffc0418c: 7c 08 03 a6 mtlr r0 ffc04190: 82 61 00 8c lwz r19,140(r1) ffc04194: 82 81 00 90 lwz r20,144(r1) ffc04198: 7d 81 81 20 mtcrf 24,r12 ffc0419c: 82 a1 00 94 lwz r21,148(r1) ffc041a0: 82 c1 00 98 lwz r22,152(r1) ffc041a4: 82 e1 00 9c lwz r23,156(r1) ffc041a8: 83 01 00 a0 lwz r24,160(r1) ffc041ac: 83 21 00 a4 lwz r25,164(r1) ffc041b0: 83 41 00 a8 lwz r26,168(r1) ffc041b4: 83 61 00 ac lwz r27,172(r1) ffc041b8: 83 81 00 b0 lwz r28,176(r1) ffc041bc: 83 a1 00 b4 lwz r29,180(r1) ffc041c0: 83 c1 00 b8 lwz r30,184(r1) ffc041c4: 83 e1 00 bc lwz r31,188(r1) ffc041c8: 38 21 00 c0 addi r1,r1,192 ffc041cc: 4e 80 00 20 blr { int i; char line_buffer[120]; line_buffer[0] = '\0'; ffc041d0: 38 00 00 00 li r0,0 for ( i=0 ; i ffc041e0: 3f 40 ff c2 lis r26,-62 ffc041e4: 3b c0 00 00 li r30,0 ffc041e8: 3b 5a f6 14 addi r26,r26,-2540 ffc041ec: 3b e1 00 08 addi r31,r1,8 sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); ffc041f0: 7c d6 f0 ae lbzx r6,r22,r30 ffc041f4: 7f e3 fb 78 mr r3,r31 ffc041f8: 7f 44 d3 78 mr r4,r26 ffc041fc: 7f e5 fb 78 mr r5,r31 int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) ffc04214: 2d 98 00 0f cmpwi cr3,r24,15 ffc04218: 7f 1e c3 78 mr r30,r24 ffc0421c: 41 8d 00 f4 bgt- cr3,ffc04310 <== NEVER TAKEN strcat( line_buffer, " " ); ffc04220: 3f a0 20 20 lis r29,8224 ffc04224: 63 bd 20 00 ori r29,r29,8192 ffc04228: 7f e3 fb 78 mr r3,r31 line_buffer[0] = '\0'; for( i=0 ; i line_buffer[0] = '\0'; for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|" ); ffc04240: 7f e3 fb 78 mr r3,r31 ffc04244: 48 00 f7 65 bl ffc139a8 ffc04248: 38 00 7c 00 li r0,31744 ffc0424c: 7c 1f 1b 2e sthx r0,r31,r3 for( i=0 ; i ffc04254: 2d 98 00 0f cmpwi cr3,r24,15 ffc04258: 3f 60 00 00 lis r27,0 ffc0425c: 3f 80 ff c2 lis r28,-62 ffc04260: 3b c0 00 00 li r30,0 ffc04264: 3b 7b 26 e8 addi r27,r27,9960 ffc04268: 3b 9c f6 1c addi r28,r28,-2532 sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); ffc0426c: 7c 16 f0 ae lbzx r0,r22,r30 for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i ffc04298: 7c 06 03 78 mr r6,r0 ffc0429c: 4c c6 31 82 crclr 4*cr1+eq ffc042a0: 48 00 f2 e9 bl ffc13588 for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) ffc042ac: 41 8d 00 20 bgt- cr3,ffc042cc <== NEVER TAKEN strcat( line_buffer, " " ); ffc042b0: 3b c0 20 00 li r30,8192 ffc042b4: 7f e3 fb 78 mr r3,r31 strcat( line_buffer, "|" ); for( i=0 ; i strcat( line_buffer, "|" ); for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); ffc042cc: 7f e3 fb 78 mr r3,r31 ffc042d0: 48 00 f6 d9 bl ffc139a8 ffc042d4: 3d 20 ff c2 lis r9,-62 ffc042d8: 39 69 f6 24 addi r11,r9,-2524 ffc042dc: a1 49 f6 24 lhz r10,-2524(r9) ffc042e0: 89 6b 00 02 lbz r11,2(r11) ffc042e4: 7c 60 1b 78 mr r0,r3 ffc042e8: 7d 3f 1a 14 add r9,r31,r3 ffc042ec: 7d 5f 03 2e sthx r10,r31,r0 printk( line_buffer ); ffc042f0: 7f e3 fb 78 mr r3,r31 isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); ffc042f4: 99 69 00 02 stb r11,2(r9) printk( line_buffer ); ffc042f8: 4c c6 31 82 crclr 4*cr1+eq ffc042fc: 48 00 1d e5 bl ffc060e0 ffc04300: 4b ff fe 84 b ffc04184 int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); ffc04310: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc04314: 48 00 f6 95 bl ffc139a8 <== NOT EXECUTED ffc04318: 38 00 7c 00 li r0,31744 <== NOT EXECUTED ffc0431c: 7c 1f 1b 2e sthx r0,r31,r3 <== NOT EXECUTED ffc04320: 4b ff ff 38 b ffc04258 <== NOT EXECUTED for( i=0 ; i =============================================================================== ffc0a3a4 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { ffc0a3a4: 94 21 ff d0 stwu r1,-48(r1) ffc0a3a8: 7c 08 02 a6 mflr r0 ffc0a3ac: 93 e1 00 2c stw r31,44(r1) ffc0a3b0: 7c 7f 1b 78 mr r31,r3 Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); ffc0a3b4: 3c 60 00 00 lis r3,0 ffc0a3b8: 93 c1 00 28 stw r30,40(r1) ffc0a3bc: 38 63 2b a0 addi r3,r3,11168 ffc0a3c0: 7c 9e 23 78 mr r30,r4 ffc0a3c4: 38 a1 00 08 addi r5,r1,8 ffc0a3c8: 90 01 00 34 stw r0,52(r1) ffc0a3cc: 7f e4 fb 78 mr r4,r31 ffc0a3d0: 93 a1 00 24 stw r29,36(r1) ffc0a3d4: 93 61 00 1c stw r27,28(r1) ffc0a3d8: 93 81 00 20 stw r28,32(r1) ffc0a3dc: 48 00 2d e5 bl ffc0d1c0 <_Objects_Get> ffc0a3e0: 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 ) { ffc0a3e4: 80 01 00 08 lwz r0,8(r1) ffc0a3e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a3ec: 41 9e 00 30 beq- cr7,ffc0a41c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a3f0: 3b e0 00 04 li r31,4 } ffc0a3f4: 80 01 00 34 lwz r0,52(r1) ffc0a3f8: 7f e3 fb 78 mr r3,r31 ffc0a3fc: 83 61 00 1c lwz r27,28(r1) ffc0a400: 7c 08 03 a6 mtlr r0 ffc0a404: 83 81 00 20 lwz r28,32(r1) ffc0a408: 83 a1 00 24 lwz r29,36(r1) ffc0a40c: 83 c1 00 28 lwz r30,40(r1) ffc0a410: 83 e1 00 2c lwz r31,44(r1) ffc0a414: 38 21 00 30 addi r1,r1,48 ffc0a418: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0a41c: 3f 80 00 00 lis r28,0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc0a420: 81 23 00 40 lwz r9,64(r3) ffc0a424: 3b 9c 2e 58 addi r28,r28,11864 ffc0a428: 80 1c 00 0c lwz r0,12(r28) ffc0a42c: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a430: 41 9e 00 34 beq- cr7,ffc0a464 _Thread_Enable_dispatch(); ffc0a434: 48 00 3c 51 bl ffc0e084 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a438: 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; ffc0a43c: 3b e0 00 17 li r31,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a440: 83 61 00 1c lwz r27,28(r1) ffc0a444: 7c 08 03 a6 mtlr r0 ffc0a448: 7f e3 fb 78 mr r3,r31 ffc0a44c: 83 81 00 20 lwz r28,32(r1) ffc0a450: 83 a1 00 24 lwz r29,36(r1) ffc0a454: 83 c1 00 28 lwz r30,40(r1) ffc0a458: 83 e1 00 2c lwz r31,44(r1) ffc0a45c: 38 21 00 30 addi r1,r1,48 ffc0a460: 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 ) { ffc0a464: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a468: 40 9e 00 1c bne- cr7,ffc0a484 switch ( the_period->state ) { ffc0a46c: 80 03 00 38 lwz r0,56(r3) ffc0a470: 3b e0 00 00 li r31,0 ffc0a474: 2b 80 00 04 cmplwi cr7,r0,4 ffc0a478: 40 9d 00 70 ble- cr7,ffc0a4e8 <== ALWAYS TAKEN case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); ffc0a47c: 48 00 3c 09 bl ffc0e084 <_Thread_Enable_dispatch> <== NOT EXECUTED return( return_value ); ffc0a480: 4b ff ff 74 b ffc0a3f4 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a484: 7f 60 00 a6 mfmsr r27 ffc0a488: 7c 10 42 a6 mfsprg r0,0 ffc0a48c: 7f 60 00 78 andc r0,r27,r0 ffc0a490: 7c 00 01 24 mtmsr r0 } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { ffc0a494: 80 03 00 38 lwz r0,56(r3) ffc0a498: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a49c: 41 9e 00 64 beq- cr7,ffc0a500 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { ffc0a4a0: 2f 80 00 02 cmpwi cr7,r0,2 ffc0a4a4: 41 9e 00 ac beq- cr7,ffc0a550 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc0a4a8: 2f 80 00 04 cmpwi cr7,r0,4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a4ac: 3b e0 00 04 li r31,4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc0a4b0: 40 9e ff 44 bne+ cr7,ffc0a3f4 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); ffc0a4b4: 4b ff fd a9 bl ffc0a25c <_Rate_monotonic_Update_statistics> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a4b8: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a4bc: 38 00 00 02 li r0,2 the_period->next_length = length; ffc0a4c0: 93 dd 00 3c stw r30,60(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a4c4: 3c 60 00 00 lis r3,0 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a4c8: 90 1d 00 38 stw r0,56(r29) ffc0a4cc: 38 63 2d 88 addi r3,r3,11656 ffc0a4d0: 38 9d 00 10 addi r4,r29,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a4d4: 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; ffc0a4d8: 3b e0 00 06 li r31,6 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a4dc: 48 00 51 79 bl ffc0f654 <_Watchdog_Insert> the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc0a4e0: 48 00 3b a5 bl ffc0e084 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; ffc0a4e4: 4b ff ff 10 b ffc0a3f4 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { ffc0a4e8: 3d 20 ff c2 lis r9,-62 ffc0a4ec: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0a4f0: 39 29 0e e4 addi r9,r9,3812 ffc0a4f4: 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(); ffc0a4f8: 48 00 3b 8d bl ffc0e084 <_Thread_Enable_dispatch> ffc0a4fc: 4b ff fe f8 b ffc0a3f4 ffc0a500: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); ffc0a504: 4b ff fc a1 bl ffc0a1a4 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a508: 39 20 00 02 li r9,2 ffc0a50c: 91 3d 00 38 stw r9,56(r29) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0a510: 3d 20 ff c1 lis r9,-63 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a514: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc0a518: 39 29 a9 b8 addi r9,r9,-22088 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a51c: 90 1d 00 18 stw r0,24(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a520: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0a524: 91 3d 00 2c stw r9,44(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a528: 38 63 2d 88 addi r3,r3,11656 ffc0a52c: 38 9d 00 10 addi r4,r29,16 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc0a530: 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; ffc0a534: 3b e0 00 00 li r31,0 the_watchdog->user_data = user_data; ffc0a538: 90 1d 00 34 stw r0,52(r29) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; ffc0a53c: 93 dd 00 3c stw r30,60(r29) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a540: 93 dd 00 1c stw r30,28(r29) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a544: 48 00 51 11 bl ffc0f654 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc0a548: 48 00 3b 3d bl ffc0e084 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a54c: 4b ff fe a8 b ffc0a3f4 if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); ffc0a550: 4b ff fd 0d bl ffc0a25c <_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; ffc0a554: 38 00 00 01 li r0,1 ffc0a558: 90 1d 00 38 stw r0,56(r29) the_period->next_length = length; ffc0a55c: 93 dd 00 3c stw r30,60(r29) ffc0a560: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc0a564: 81 3c 00 0c lwz r9,12(r28) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0a568: 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; ffc0a56c: 80 1d 00 08 lwz r0,8(r29) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0a570: 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; ffc0a574: 90 09 00 20 stw r0,32(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0a578: 48 00 46 41 bl ffc0ebb8 <_Thread_Set_state> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a57c: 7d 20 00 a6 mfmsr r9 ffc0a580: 7c 10 42 a6 mfsprg r0,0 ffc0a584: 7d 20 00 78 andc r0,r9,r0 ffc0a588: 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; ffc0a58c: 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; ffc0a590: 80 1d 00 38 lwz r0,56(r29) the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a594: 91 7d 00 38 stw r11,56(r29) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a598: 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 ) ffc0a59c: 2f 80 00 03 cmpwi cr7,r0,3 ffc0a5a0: 41 9e 00 10 beq- cr7,ffc0a5b0 <== NEVER TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); ffc0a5a4: 48 00 3a e1 bl ffc0e084 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a5a8: 3b e0 00 00 li r31,0 ffc0a5ac: 4b ff fe 48 b ffc0a3f4 /* * 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 ); ffc0a5b0: 80 7c 00 0c lwz r3,12(r28) <== NOT EXECUTED ffc0a5b4: 38 80 40 00 li r4,16384 <== NOT EXECUTED ffc0a5b8: 48 00 36 15 bl ffc0dbcc <_Thread_Clear_state> <== NOT EXECUTED ffc0a5bc: 4b ff ff e8 b ffc0a5a4 <== NOT EXECUTED =============================================================================== ffc0a5c0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc0a5c0: 94 21 ff 58 stwu r1,-168(r1) ffc0a5c4: 7c 08 02 a6 mflr r0 ffc0a5c8: 90 01 00 ac stw r0,172(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc0a5cc: 7c 80 23 79 mr. r0,r4 */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc0a5d0: 93 a1 00 9c stw r29,156(r1) ffc0a5d4: 7c 7d 1b 78 mr r29,r3 ffc0a5d8: 92 41 00 70 stw r18,112(r1) ffc0a5dc: 92 61 00 74 stw r19,116(r1) ffc0a5e0: 92 81 00 78 stw r20,120(r1) ffc0a5e4: 92 a1 00 7c stw r21,124(r1) ffc0a5e8: 92 c1 00 80 stw r22,128(r1) ffc0a5ec: 92 e1 00 84 stw r23,132(r1) ffc0a5f0: 93 01 00 88 stw r24,136(r1) ffc0a5f4: 93 21 00 8c stw r25,140(r1) ffc0a5f8: 93 41 00 90 stw r26,144(r1) ffc0a5fc: 93 61 00 94 stw r27,148(r1) ffc0a600: 93 81 00 98 stw r28,152(r1) ffc0a604: 93 c1 00 a0 stw r30,160(r1) ffc0a608: 93 e1 00 a4 stw r31,164(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc0a60c: 90 01 00 68 stw r0,104(r1) ffc0a610: 41 82 01 88 beq- ffc0a798 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); ffc0a614: 3c 80 ff c2 lis r4,-62 ffc0a618: 7c 09 03 a6 mtctr r0 ffc0a61c: 38 84 0e f8 addi r4,r4,3832 /* * 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 ; ffc0a620: 3f c0 00 00 lis r30,0 ffc0a624: 3b de 2b a0 addi r30,r30,11168 char name[5]; if ( !print ) return; (*print)( context, "Period information by period\n" ); ffc0a628: 4c c6 31 82 crclr 4*cr1+eq ffc0a62c: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc0a630: 80 01 00 68 lwz r0,104(r1) ffc0a634: 3c 80 ff c2 lis r4,-62 ffc0a638: 7c 09 03 a6 mtctr r0 ffc0a63c: 38 84 0f 18 addi r4,r4,3864 ffc0a640: 7f a3 eb 78 mr r3,r29 ffc0a644: 4c c6 31 82 crclr 4*cr1+eq ffc0a648: 4e 80 04 21 bctrl (*print)( context, "--- Wall times are in seconds ---\n" ); ffc0a64c: 80 01 00 68 lwz r0,104(r1) ffc0a650: 3c 80 ff c2 lis r4,-62 ffc0a654: 7c 09 03 a6 mtctr r0 ffc0a658: 38 84 0f 3c addi r4,r4,3900 ffc0a65c: 7f a3 eb 78 mr r3,r29 ffc0a660: 4c c6 31 82 crclr 4*cr1+eq ffc0a664: 4e 80 04 21 bctrl Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc0a668: 80 01 00 68 lwz r0,104(r1) ffc0a66c: 3c 80 ff c2 lis r4,-62 ffc0a670: 7c 09 03 a6 mtctr r0 ffc0a674: 38 84 0f 60 addi r4,r4,3936 ffc0a678: 7f a3 eb 78 mr r3,r29 ffc0a67c: 4c c6 31 82 crclr 4*cr1+eq ffc0a680: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc0a684: 80 01 00 68 lwz r0,104(r1) ffc0a688: 3c 80 ff c2 lis r4,-62 ffc0a68c: 7c 09 03 a6 mtctr r0 ffc0a690: 7f a3 eb 78 mr r3,r29 ffc0a694: 38 84 0f ac addi r4,r4,4012 ffc0a698: 4c c6 31 82 crclr 4*cr1+eq ffc0a69c: 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 ; ffc0a6a0: 83 fe 00 08 lwz r31,8(r30) ffc0a6a4: 80 1e 00 0c lwz r0,12(r30) ffc0a6a8: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0a6ac: 41 9d 00 ec bgt- cr7,ffc0a798 <== 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, ffc0a6b0: 3e c0 ff c2 lis r22,-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, ffc0a6b4: 3e 60 ff c2 lis r19,-62 ffc0a6b8: 3f 60 10 62 lis r27,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, ffc0a6bc: 3e 40 ff c2 lis r18,-62 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a6c0: 3f 00 ff c2 lis r24,-62 ffc0a6c4: 3b 81 00 30 addi r28,r1,48 #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 ); ffc0a6c8: 3a a1 00 18 addi r21,r1,24 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc0a6cc: 3b 41 00 08 addi r26,r1,8 /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc0a6d0: 3a d6 0f f8 addi r22,r22,4088 { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; ffc0a6d4: 3a e1 00 48 addi r23,r1,72 _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc0a6d8: 3b 21 00 10 addi r25,r1,16 (*print)( context, ffc0a6dc: 3a 73 10 10 addi r19,r19,4112 ffc0a6e0: 63 7b 4d d3 ori r27,r27,19923 { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; ffc0a6e4: 3a 81 00 60 addi r20,r1,96 _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, ffc0a6e8: 3a 52 10 30 addi r18,r18,4144 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a6ec: 3b 18 fc 00 addi r24,r24,-1024 ffc0a6f0: 48 00 00 14 b ffc0a704 /* * 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 ; ffc0a6f4: 80 1e 00 0c lwz r0,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc0a6f8: 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 ; ffc0a6fc: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a700: 41 9c 00 98 blt- cr7,ffc0a798 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc0a704: 7f e3 fb 78 mr r3,r31 ffc0a708: 7f 84 e3 78 mr r4,r28 ffc0a70c: 48 00 73 6d bl ffc11a78 if ( status != RTEMS_SUCCESSFUL ) ffc0a710: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a714: 40 9e ff e0 bne+ cr7,ffc0a6f4 #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 ); ffc0a718: 7e a4 ab 78 mr r4,r21 ffc0a71c: 7f e3 fb 78 mr r3,r31 ffc0a720: 48 00 74 69 bl ffc11b88 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc0a724: 80 61 00 18 lwz r3,24(r1) ffc0a728: 7f 45 d3 78 mr r5,r26 ffc0a72c: 38 80 00 05 li r4,5 ffc0a730: 48 00 03 51 bl ffc0aa80 /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc0a734: 80 01 00 68 lwz r0,104(r1) ffc0a738: 7e c4 b3 78 mr r4,r22 ffc0a73c: 80 e1 00 30 lwz r7,48(r1) ffc0a740: 7f e5 fb 78 mr r5,r31 ffc0a744: 7c 09 03 a6 mtctr r0 ffc0a748: 7f a3 eb 78 mr r3,r29 ffc0a74c: 81 01 00 34 lwz r8,52(r1) ffc0a750: 7f 46 d3 78 mr r6,r26 ffc0a754: 4c c6 31 82 crclr 4*cr1+eq ffc0a758: 4e 80 04 21 bctrl ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a75c: 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 ); ffc0a760: 7e e3 bb 78 mr r3,r23 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a764: 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 ); ffc0a768: 7f 25 cb 78 mr r5,r25 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a76c: 7f 04 c3 78 mr r4,r24 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a770: 40 9e 00 70 bne- cr7,ffc0a7e0 (*print)( context, "\n" ); ffc0a774: 80 01 00 68 lwz r0,104(r1) ffc0a778: 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++ ) { ffc0a77c: 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" ); ffc0a780: 7c 09 03 a6 mtctr r0 ffc0a784: 4c c6 31 82 crclr 4*cr1+eq ffc0a788: 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 ; ffc0a78c: 80 1e 00 0c lwz r0,12(r30) ffc0a790: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a794: 40 9c ff 70 bge+ cr7,ffc0a704 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } ffc0a798: 80 01 00 ac lwz r0,172(r1) ffc0a79c: 82 41 00 70 lwz r18,112(r1) ffc0a7a0: 7c 08 03 a6 mtlr r0 ffc0a7a4: 82 61 00 74 lwz r19,116(r1) ffc0a7a8: 82 81 00 78 lwz r20,120(r1) ffc0a7ac: 82 a1 00 7c lwz r21,124(r1) ffc0a7b0: 82 c1 00 80 lwz r22,128(r1) ffc0a7b4: 82 e1 00 84 lwz r23,132(r1) ffc0a7b8: 83 01 00 88 lwz r24,136(r1) ffc0a7bc: 83 21 00 8c lwz r25,140(r1) ffc0a7c0: 83 41 00 90 lwz r26,144(r1) ffc0a7c4: 83 61 00 94 lwz r27,148(r1) ffc0a7c8: 83 81 00 98 lwz r28,152(r1) ffc0a7cc: 83 a1 00 9c lwz r29,156(r1) ffc0a7d0: 83 c1 00 a0 lwz r30,160(r1) ffc0a7d4: 83 e1 00 a4 lwz r31,164(r1) ffc0a7d8: 38 21 00 a8 addi r1,r1,168 ffc0a7dc: 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 ); ffc0a7e0: 7c 04 03 78 mr r4,r0 ffc0a7e4: 48 00 48 31 bl ffc0f014 <_Timespec_Divide_by_integer> (*print)( context, ffc0a7e8: 80 01 00 14 lwz r0,20(r1) ffc0a7ec: 80 81 00 3c lwz r4,60(r1) ffc0a7f0: 7f a3 eb 78 mr r3,r29 ffc0a7f4: 81 61 00 44 lwz r11,68(r1) ffc0a7f8: 7d 40 d8 96 mulhw r10,r0,r27 ffc0a7fc: 80 e1 00 40 lwz r7,64(r1) ffc0a800: 7c c4 d8 96 mulhw r6,r4,r27 ffc0a804: 81 21 00 10 lwz r9,16(r1) ffc0a808: 80 a1 00 38 lwz r5,56(r1) ffc0a80c: 7d 0b d8 96 mulhw r8,r11,r27 ffc0a810: 7c 00 fe 70 srawi r0,r0,31 ffc0a814: 7d 4a 36 70 srawi r10,r10,6 ffc0a818: 7d 40 50 50 subf r10,r0,r10 ffc0a81c: 80 01 00 68 lwz r0,104(r1) ffc0a820: 7d 6b fe 70 srawi r11,r11,31 ffc0a824: 7c 84 fe 70 srawi r4,r4,31 ffc0a828: 7c 09 03 a6 mtctr r0 ffc0a82c: 7c c6 36 70 srawi r6,r6,6 ffc0a830: 7d 08 36 70 srawi r8,r8,6 ffc0a834: 7c c4 30 50 subf r6,r4,r6 ffc0a838: 7d 0b 40 50 subf r8,r11,r8 ffc0a83c: 7e 64 9b 78 mr r4,r19 ffc0a840: 4c c6 31 82 crclr 4*cr1+eq ffc0a844: 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); ffc0a848: 80 81 00 30 lwz r4,48(r1) ffc0a84c: 7e 83 a3 78 mr r3,r20 ffc0a850: 7f 25 cb 78 mr r5,r25 ffc0a854: 48 00 47 c1 bl ffc0f014 <_Timespec_Divide_by_integer> (*print)( context, ffc0a858: 80 01 00 14 lwz r0,20(r1) ffc0a85c: 80 c1 00 54 lwz r6,84(r1) ffc0a860: 7f a3 eb 78 mr r3,r29 ffc0a864: 81 61 00 5c lwz r11,92(r1) ffc0a868: 7d 40 d8 96 mulhw r10,r0,r27 ffc0a86c: 80 a1 00 50 lwz r5,80(r1) ffc0a870: 7d 86 d8 96 mulhw r12,r6,r27 ffc0a874: 80 e1 00 58 lwz r7,88(r1) ffc0a878: 81 21 00 10 lwz r9,16(r1) ffc0a87c: 7d 0b d8 96 mulhw r8,r11,r27 ffc0a880: 7c 00 fe 70 srawi r0,r0,31 ffc0a884: 7d 4a 36 70 srawi r10,r10,6 ffc0a888: 7d 40 50 50 subf r10,r0,r10 ffc0a88c: 80 01 00 68 lwz r0,104(r1) ffc0a890: 7d 8c 36 70 srawi r12,r12,6 ffc0a894: 7d 6b fe 70 srawi r11,r11,31 ffc0a898: 7c 09 03 a6 mtctr r0 ffc0a89c: 7c c6 fe 70 srawi r6,r6,31 ffc0a8a0: 7d 08 36 70 srawi r8,r8,6 ffc0a8a4: 7e 44 93 78 mr r4,r18 ffc0a8a8: 7c c6 60 50 subf r6,r6,r12 ffc0a8ac: 7d 0b 40 50 subf r8,r11,r8 ffc0a8b0: 4c c6 31 82 crclr 4*cr1+eq ffc0a8b4: 4e 80 04 21 bctrl ffc0a8b8: 4b ff fe 3c b ffc0a6f4 =============================================================================== ffc0a8cc : rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0a8cc: 3d 20 00 00 lis r9,0 /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { ffc0a8d0: 94 21 ff f0 stwu r1,-16(r1) ffc0a8d4: 7c 08 02 a6 mflr r0 ffc0a8d8: 81 69 27 ac lwz r11,10156(r9) ffc0a8dc: 90 01 00 14 stw r0,20(r1) ffc0a8e0: 38 0b 00 01 addi r0,r11,1 ffc0a8e4: 93 c1 00 08 stw r30,8(r1) ffc0a8e8: 93 e1 00 0c stw r31,12(r1) ffc0a8ec: 90 09 27 ac stw r0,10156(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 ; ffc0a8f0: 3f c0 00 00 lis r30,0 ffc0a8f4: 3b de 2b a0 addi r30,r30,11168 ffc0a8f8: 83 fe 00 08 lwz r31,8(r30) ffc0a8fc: 80 1e 00 0c lwz r0,12(r30) ffc0a900: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0a904: 41 9d 00 1c bgt- cr7,ffc0a920 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { (void) rtems_rate_monotonic_reset_statistics( id ); ffc0a908: 7f e3 fb 78 mr r3,r31 ffc0a90c: 48 00 00 31 bl ffc0a93c /* * 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 ; ffc0a910: 80 1e 00 0c lwz r0,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc0a914: 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 ; ffc0a918: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a91c: 40 9c ff ec bge+ cr7,ffc0a908 } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); ffc0a920: 48 00 37 65 bl ffc0e084 <_Thread_Enable_dispatch> } ffc0a924: 80 01 00 14 lwz r0,20(r1) ffc0a928: 83 c1 00 08 lwz r30,8(r1) ffc0a92c: 7c 08 03 a6 mtlr r0 ffc0a930: 83 e1 00 0c lwz r31,12(r1) ffc0a934: 38 21 00 10 addi r1,r1,16 ffc0a938: 4e 80 00 20 blr =============================================================================== ffc1a370 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc1a370: 94 21 ff e0 stwu r1,-32(r1) ffc1a374: 7c 08 02 a6 mflr r0 ffc1a378: 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 ) ffc1a37c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc1a380: 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; ffc1a384: 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 ) ffc1a388: 40 82 00 1c bne- ffc1a3a4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1a38c: 7c 03 03 78 mr r3,r0 ffc1a390: 80 01 00 24 lwz r0,36(r1) ffc1a394: 83 e1 00 1c lwz r31,28(r1) ffc1a398: 38 21 00 20 addi r1,r1,32 ffc1a39c: 7c 08 03 a6 mtlr r0 ffc1a3a0: 4e 80 00 20 blr ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); ffc1a3a4: 38 81 00 08 addi r4,r1,8 ffc1a3a8: 48 00 57 99 bl ffc1fb40 <_Thread_Get> switch ( location ) { ffc1a3ac: 80 01 00 08 lwz r0,8(r1) ffc1a3b0: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a3b4: 41 9e 00 20 beq- cr7,ffc1a3d4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1a3b8: 38 00 00 04 li r0,4 } ffc1a3bc: 83 e1 00 1c lwz r31,28(r1) ffc1a3c0: 7c 03 03 78 mr r3,r0 ffc1a3c4: 80 01 00 24 lwz r0,36(r1) ffc1a3c8: 38 21 00 20 addi r1,r1,32 ffc1a3cc: 7c 08 03 a6 mtlr r0 ffc1a3d0: 4e 80 00 20 blr the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc1a3d4: 81 23 01 2c lwz r9,300(r3) asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { ffc1a3d8: 80 09 00 0c lwz r0,12(r9) ffc1a3dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a3e0: 41 9e 00 9c beq- cr7,ffc1a47c if ( asr->is_enabled ) { ffc1a3e4: 88 09 00 08 lbz r0,8(r9) ffc1a3e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a3ec: 41 9e 00 50 beq- cr7,ffc1a43c static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1a3f0: 7c 00 00 a6 mfmsr r0 ffc1a3f4: 7d 70 42 a6 mfsprg r11,0 ffc1a3f8: 7c 0b 58 78 andc r11,r0,r11 ffc1a3fc: 7d 60 01 24 mtmsr r11 ) { ISR_Level _level; _ISR_Disable( _level ); *signal_set |= signals; ffc1a400: 81 69 00 14 lwz r11,20(r9) ffc1a404: 7d 7f fb 78 or r31,r11,r31 ffc1a408: 93 e9 00 14 stw r31,20(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1a40c: 7c 00 01 24 mtmsr r0 _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc1a410: 3d 20 00 00 lis r9,0 ffc1a414: 39 29 71 98 addi r9,r9,29080 ffc1a418: 80 09 00 08 lwz r0,8(r9) ffc1a41c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a420: 41 9e 00 3c beq- cr7,ffc1a45c ffc1a424: 80 09 00 0c lwz r0,12(r9) ffc1a428: 7f 83 00 00 cmpw cr7,r3,r0 ffc1a42c: 40 be 00 30 bne+ cr7,ffc1a45c <== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc1a430: 38 00 00 01 li r0,1 ffc1a434: 98 09 00 18 stb r0,24(r9) ffc1a438: 48 00 00 24 b ffc1a45c static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1a43c: 7c 00 00 a6 mfmsr r0 ffc1a440: 7d 70 42 a6 mfsprg r11,0 ffc1a444: 7c 0b 58 78 andc r11,r0,r11 ffc1a448: 7d 60 01 24 mtmsr r11 ffc1a44c: 81 69 00 18 lwz r11,24(r9) ffc1a450: 7d 7f fb 78 or r31,r11,r31 ffc1a454: 93 e9 00 18 stw r31,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1a458: 7c 00 01 24 mtmsr r0 } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); ffc1a45c: 48 00 56 c5 bl ffc1fb20 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc1a460: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1a464: 7c 03 03 78 mr r3,r0 ffc1a468: 80 01 00 24 lwz r0,36(r1) ffc1a46c: 83 e1 00 1c lwz r31,28(r1) ffc1a470: 38 21 00 20 addi r1,r1,32 ffc1a474: 7c 08 03 a6 mtlr r0 ffc1a478: 4e 80 00 20 blr _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc1a47c: 48 00 56 a5 bl ffc1fb20 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; ffc1a480: 38 00 00 0b li r0,11 ffc1a484: 4b ff ff 08 b ffc1a38c =============================================================================== ffc03e8c : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { ffc03e8c: 7c 08 02 a6 mflr r0 ffc03e90: 94 21 ff f8 stwu r1,-8(r1) ffc03e94: 90 01 00 0c stw r0,12(r1) Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ ffc03e98: 80 03 00 08 lwz r0,8(r3) ffc03e9c: 2f 80 00 00 cmpwi cr7,r0,0 ffc03ea0: 41 9e 00 1c beq- cr7,ffc03ebc <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; ffc03ea4: 80 63 00 b8 lwz r3,184(r3) ffc03ea8: 3c 80 00 00 lis r4,0 ffc03eac: 38 84 2a 40 addi r4,r4,10816 ffc03eb0: 38 63 00 08 addi r3,r3,8 ffc03eb4: 38 a0 00 80 li r5,128 ffc03eb8: 48 00 f2 a5 bl ffc1315c } ffc03ebc: 80 01 00 0c lwz r0,12(r1) ffc03ec0: 38 21 00 08 addi r1,r1,8 ffc03ec4: 7c 08 03 a6 mtlr r0 ffc03ec8: 4e 80 00 20 blr =============================================================================== ffc03e44 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { ffc03e44: 94 21 ff f0 stwu r1,-16(r1) ffc03e48: 7c 08 02 a6 mflr r0 ffc03e4c: 93 e1 00 0c stw r31,12(r1) ffc03e50: 7c 9f 23 78 mr r31,r4 ffc03e54: 90 01 00 14 stw r0,20(r1) Stack_check_Initialize(); ffc03e58: 4b ff ff 9d bl ffc03df4 if (the_thread) ffc03e5c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc03e60: 41 9e 00 14 beq- cr7,ffc03e74 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); ffc03e64: 80 7f 00 b8 lwz r3,184(r31) ffc03e68: 38 80 00 a5 li r4,165 ffc03e6c: 80 bf 00 b4 lwz r5,180(r31) ffc03e70: 48 00 f3 cd bl ffc1323c return true; } ffc03e74: 80 01 00 14 lwz r0,20(r1) ffc03e78: 38 60 00 01 li r3,1 ffc03e7c: 83 e1 00 0c lwz r31,12(r1) ffc03e80: 38 21 00 10 addi r1,r1,16 ffc03e84: 7c 08 03 a6 mtlr r0 ffc03e88: 4e 80 00 20 blr =============================================================================== ffc04044 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc04044: 94 21 ff e8 stwu r1,-24(r1) ffc04048: 7c 08 02 a6 mflr r0 ffc0404c: 93 a1 00 0c stw r29,12(r1) Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; ffc04050: 3f a0 00 00 lis r29,0 ffc04054: 3b bd 2d d8 addi r29,r29,11736 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc04058: 90 01 00 1c stw r0,28(r1) Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; ffc0405c: 81 3d 00 0c lwz r9,12(r29) /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc04060: 93 e1 00 14 stw r31,20(r1) ffc04064: 7c 3f 0b 78 mr r31,r1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc04068: 80 69 00 b8 lwz r3,184(r9) /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc0406c: 93 c1 00 10 stw r30,16(r1) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; ffc04070: 3b c0 00 00 li r30,0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc04074: 7f 9f 18 40 cmplw cr7,r31,r3 ffc04078: 41 9c 00 18 blt- cr7,ffc04090 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { ffc0407c: 83 c9 00 b4 lwz r30,180(r9) ffc04080: 7f c3 f2 14 add r30,r3,r30 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) ffc04084: 7f df f0 10 subfc r30,r31,r30 ffc04088: 3b c0 00 00 li r30,0 ffc0408c: 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 ) { ffc04090: 3d 20 00 00 lis r9,0 ffc04094: 80 09 27 d4 lwz r0,10196(r9) */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; bool sp_ok; bool pattern_ok = true; ffc04098: 38 80 00 01 li r4,1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { ffc0409c: 2f 80 00 00 cmpwi cr7,r0,0 ffc040a0: 41 9e 00 20 beq- cr7,ffc040c0 <== NEVER TAKEN pattern_ok = (!memcmp( ffc040a4: 3c 80 00 00 lis r4,0 ffc040a8: 38 84 2a 40 addi r4,r4,10816 ffc040ac: 38 63 00 08 addi r3,r3,8 ffc040b0: 38 a0 00 80 li r5,128 ffc040b4: 48 00 f0 11 bl ffc130c4 ffc040b8: 7c 64 00 34 cntlzw r4,r3 ffc040bc: 54 84 d9 7e rlwinm r4,r4,27,5,31 /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { ffc040c0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc040c4: 41 9e 00 30 beq- cr7,ffc040f4 <== NEVER TAKEN ffc040c8: 2f 84 00 00 cmpwi cr7,r4,0 ffc040cc: 41 9e 00 28 beq- cr7,ffc040f4 <== NEVER TAKEN /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } ffc040d0: 39 7f 00 18 addi r11,r31,24 ffc040d4: 80 0b 00 04 lwz r0,4(r11) ffc040d8: 38 60 00 00 li r3,0 ffc040dc: 83 ab ff f4 lwz r29,-12(r11) ffc040e0: 7c 08 03 a6 mtlr r0 ffc040e4: 83 cb ff f8 lwz r30,-8(r11) ffc040e8: 83 eb ff fc lwz r31,-4(r11) ffc040ec: 7d 61 5b 78 mr r1,r11 ffc040f0: 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 ); ffc040f4: 80 7d 00 0c lwz r3,12(r29) <== NOT EXECUTED ffc040f8: 4b ff fd d5 bl ffc03ecc <== NOT EXECUTED =============================================================================== ffc040fc : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc040fc: 94 21 ff e8 stwu r1,-24(r1) ffc04100: 7c 08 02 a6 mflr r0 ffc04104: 93 e1 00 14 stw r31,20(r1) if ( !print ) ffc04108: 7c 9f 23 79 mr. r31,r4 void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc0410c: 93 a1 00 0c stw r29,12(r1) ffc04110: 7c 7d 1b 78 mr r29,r3 ffc04114: 90 01 00 1c stw r0,28(r1) ffc04118: 93 81 00 08 stw r28,8(r1) ffc0411c: 93 c1 00 10 stw r30,16(r1) if ( !print ) ffc04120: 41 82 00 58 beq- ffc04178 <== NEVER TAKEN return; print_context = context; ffc04124: 3f c0 00 00 lis r30,0 print_handler = print; (*print)( context, "Stack usage by thread\n"); ffc04128: 7f e9 03 a6 mtctr r31 ) { if ( !print ) return; print_context = context; ffc0412c: 3b 9e 27 cc addi r28,r30,10188 print_handler = print; ffc04130: 93 fe 27 cc stw r31,10188(r30) (*print)( context, "Stack usage by thread\n"); ffc04134: 3c 80 ff c2 lis r4,-62 ffc04138: 38 84 8f c4 addi r4,r4,-28732 ) { if ( !print ) return; print_context = context; ffc0413c: 90 7c 00 04 stw r3,4(r28) print_handler = print; (*print)( context, "Stack usage by thread\n"); ffc04140: 4c c6 31 82 crclr 4*cr1+eq ffc04144: 4e 80 04 21 bctrl (*print)( context, ffc04148: 3c 80 ff c2 lis r4,-62 ffc0414c: 38 84 8f dc addi r4,r4,-28708 ffc04150: 7f e9 03 a6 mtctr r31 ffc04154: 7f a3 eb 78 mr r3,r29 ffc04158: 4c c6 31 82 crclr 4*cr1+eq ffc0415c: 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 ); ffc04160: 3c 60 ff c0 lis r3,-64 ffc04164: 38 63 3c 24 addi r3,r3,15396 ffc04168: 48 00 68 2d bl ffc0a994 #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); #endif print_context = NULL; ffc0416c: 38 00 00 00 li r0,0 ffc04170: 90 1c 00 04 stw r0,4(r28) print_handler = NULL; ffc04174: 90 1e 27 cc stw r0,10188(r30) } ffc04178: 80 01 00 1c lwz r0,28(r1) ffc0417c: 83 81 00 08 lwz r28,8(r1) ffc04180: 7c 08 03 a6 mtlr r0 ffc04184: 83 a1 00 0c lwz r29,12(r1) ffc04188: 83 c1 00 10 lwz r30,16(r1) ffc0418c: 83 e1 00 14 lwz r31,20(r1) ffc04190: 38 21 00 18 addi r1,r1,24 ffc04194: 4e 80 00 20 blr =============================================================================== ffc03fac : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc03fac: 94 21 ff f0 stwu r1,-16(r1) ffc03fb0: 7c 08 02 a6 mflr r0 ffc03fb4: 90 01 00 14 stw r0,20(r1) 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); ffc03fb8: 81 23 00 b8 lwz r9,184(r3) */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc03fbc: 93 e1 00 0c stw r31,12(r1) ffc03fc0: 7c 3f 0b 78 mr r31,r1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc03fc4: 7f 9f 48 40 cmplw cr7,r31,r9 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc03fc8: 93 c1 00 08 stw r30,8(r1) ffc03fcc: 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); ffc03fd0: 38 69 00 08 addi r3,r9,8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc03fd4: 41 9c 00 14 blt- cr7,ffc03fe8 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { ffc03fd8: 80 1e 00 b4 lwz r0,180(r30) ffc03fdc: 7d 29 02 14 add r9,r9,r0 ffc03fe0: 7f 9f 48 40 cmplw cr7,r31,r9 ffc03fe4: 40 9d 00 24 ble- cr7,ffc04008 <== 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, ffc03fe8: 3c 80 00 00 lis r4,0 <== NOT EXECUTED ffc03fec: 38 84 2a 40 addi r4,r4,10816 <== NOT EXECUTED ffc03ff0: 38 a0 00 80 li r5,128 <== NOT EXECUTED ffc03ff4: 48 00 f0 d1 bl ffc130c4 <== NOT EXECUTED ffc03ff8: 7c 64 00 34 cntlzw r4,r3 <== NOT EXECUTED ffc03ffc: 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 ); ffc04000: 7f c3 f3 78 mr r3,r30 ffc04004: 4b ff fe c9 bl ffc03ecc /* * 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, ffc04008: 3c 80 00 00 lis r4,0 ffc0400c: 38 84 2a 40 addi r4,r4,10816 ffc04010: 38 a0 00 80 li r5,128 ffc04014: 48 00 f0 b1 bl ffc130c4 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { ffc04018: 2f 83 00 00 cmpwi cr7,r3,0 ffc0401c: 40 9e 00 20 bne- cr7,ffc0403c Stack_check_report_blown_task( running, pattern_ok ); } } ffc04020: 39 7f 00 10 addi r11,r31,16 ffc04024: 80 0b 00 04 lwz r0,4(r11) ffc04028: 83 cb ff f8 lwz r30,-8(r11) ffc0402c: 7c 08 03 a6 mtlr r0 ffc04030: 83 eb ff fc lwz r31,-4(r11) ffc04034: 7d 61 5b 78 mr r1,r11 ffc04038: 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 ) { ffc0403c: 38 80 00 00 li r4,0 ffc04040: 4b ff ff c0 b ffc04000 =============================================================================== ffc101b0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc101b0: 94 21 ff d0 stwu r1,-48(r1) ffc101b4: 7c 08 02 a6 mflr r0 ffc101b8: 93 c1 00 28 stw r30,40(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc101bc: 7c 9e 23 79 mr. r30,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc101c0: 93 a1 00 24 stw r29,36(r1) ffc101c4: 7c bd 2b 78 mr r29,r5 ffc101c8: 93 e1 00 2c stw r31,44(r1) ffc101cc: 7c 7f 1b 78 mr r31,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc101d0: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc101d4: 90 01 00 34 stw r0,52(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc101d8: 41 82 00 5c beq- ffc10234 return RTEMS_INVALID_ADDRESS; errno = 0; ffc101dc: 48 00 2f 01 bl ffc130dc <__errno> *n = 0; ffc101e0: 3d 20 ff c2 lis r9,-62 ffc101e4: c8 09 05 08 lfd f0,1288(r9) char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc101e8: 38 00 00 00 li r0,0 ffc101ec: 90 03 00 00 stw r0,0(r3) *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc101f0: 38 81 00 08 addi r4,r1,8 ffc101f4: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc101f8: d8 1e 00 00 stfd f0,0(r30) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc101fc: 48 00 5c 25 bl ffc15e20 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10200: 2f 9d 00 00 cmpwi cr7,r29,0 ffc10204: 41 9e 00 6c beq- cr7,ffc10270 *endptr = end; ffc10208: 80 01 00 08 lwz r0,8(r1) ffc1020c: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc10210: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc10214: 38 60 00 0b li r3,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc10218: 41 9e 00 1c beq- cr7,ffc10234 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc1021c: 3d 20 ff c2 lis r9,-62 ffc10220: c8 09 2a d0 lfd f0,10960(r9) ffc10224: ff 81 00 00 fcmpu cr7,f1,f0 ffc10228: 41 9d 00 28 bgt- cr7,ffc10250 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc1022c: d8 3e 00 00 stfd f1,0(r30) #endif return RTEMS_SUCCESSFUL; ffc10230: 38 60 00 00 li r3,0 } ffc10234: 80 01 00 34 lwz r0,52(r1) ffc10238: 83 a1 00 24 lwz r29,36(r1) ffc1023c: 7c 08 03 a6 mtlr r0 ffc10240: 83 c1 00 28 lwz r30,40(r1) ffc10244: 83 e1 00 2c lwz r31,44(r1) ffc10248: 38 21 00 30 addi r1,r1,48 ffc1024c: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10250: d8 21 00 18 stfd f1,24(r1) ffc10254: 48 00 2e 89 bl ffc130dc <__errno> ffc10258: 80 03 00 00 lwz r0,0(r3) return RTEMS_INVALID_NUMBER; ffc1025c: 38 60 00 0a li r3,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10260: c8 21 00 18 lfd f1,24(r1) ffc10264: 2f 80 00 22 cmpwi cr7,r0,34 ffc10268: 40 9e ff c4 bne+ cr7,ffc1022c <== NEVER TAKEN ffc1026c: 4b ff ff c8 b ffc10234 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10270: 80 01 00 08 lwz r0,8(r1) ffc10274: 4b ff ff 9c b ffc10210 =============================================================================== ffc10278 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10278: 94 21 ff d0 stwu r1,-48(r1) ffc1027c: 7c 08 02 a6 mflr r0 ffc10280: 93 c1 00 28 stw r30,40(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10284: 7c 9e 23 79 mr. r30,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10288: 93 a1 00 24 stw r29,36(r1) ffc1028c: 7c bd 2b 78 mr r29,r5 ffc10290: 93 e1 00 2c stw r31,44(r1) ffc10294: 7c 7f 1b 78 mr r31,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc10298: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc1029c: 90 01 00 34 stw r0,52(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc102a0: 41 82 00 58 beq- ffc102f8 return RTEMS_INVALID_ADDRESS; errno = 0; ffc102a4: 48 00 2e 39 bl ffc130dc <__errno> ffc102a8: 38 00 00 00 li r0,0 ffc102ac: 90 03 00 00 stw r0,0(r3) *n = 0; ffc102b0: 38 00 00 00 li r0,0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc102b4: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc102b8: 90 1e 00 00 stw r0,0(r30) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc102bc: 38 81 00 08 addi r4,r1,8 ffc102c0: 48 00 5b 79 bl ffc15e38 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc102c4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc102c8: 41 9e 00 6c beq- cr7,ffc10334 *endptr = end; ffc102cc: 80 01 00 08 lwz r0,8(r1) ffc102d0: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc102d4: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc102d8: 38 60 00 0b li r3,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc102dc: 41 9e 00 1c beq- cr7,ffc102f8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc102e0: 3d 20 ff c2 lis r9,-62 ffc102e4: c0 09 2a d8 lfs f0,10968(r9) ffc102e8: ff 81 00 00 fcmpu cr7,f1,f0 ffc102ec: 41 9d 00 28 bgt- cr7,ffc10314 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc102f0: d0 3e 00 00 stfs f1,0(r30) #endif return RTEMS_SUCCESSFUL; ffc102f4: 38 60 00 00 li r3,0 } ffc102f8: 80 01 00 34 lwz r0,52(r1) ffc102fc: 83 a1 00 24 lwz r29,36(r1) ffc10300: 7c 08 03 a6 mtlr r0 ffc10304: 83 c1 00 28 lwz r30,40(r1) ffc10308: 83 e1 00 2c lwz r31,44(r1) ffc1030c: 38 21 00 30 addi r1,r1,48 ffc10310: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10314: d8 21 00 18 stfd f1,24(r1) ffc10318: 48 00 2d c5 bl ffc130dc <__errno> ffc1031c: 80 03 00 00 lwz r0,0(r3) return RTEMS_INVALID_NUMBER; ffc10320: 38 60 00 0a li r3,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10324: c8 21 00 18 lfd f1,24(r1) ffc10328: 2f 80 00 22 cmpwi cr7,r0,34 ffc1032c: 40 9e ff c4 bne+ cr7,ffc102f0 <== NEVER TAKEN ffc10330: 4b ff ff c8 b ffc102f8 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10334: 80 01 00 08 lwz r0,8(r1) ffc10338: 4b ff ff 9c b ffc102d4 =============================================================================== ffc10404 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10404: 94 21 ff d0 stwu r1,-48(r1) ffc10408: 7c 08 02 a6 mflr r0 ffc1040c: 93 e1 00 2c stw r31,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10410: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10414: 93 81 00 20 stw r28,32(r1) ffc10418: 7c dc 33 78 mr r28,r6 ffc1041c: 93 a1 00 24 stw r29,36(r1) ffc10420: 7c bd 2b 78 mr r29,r5 ffc10424: 93 c1 00 28 stw r30,40(r1) ffc10428: 7c 7e 1b 78 mr r30,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc1042c: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10430: 90 01 00 34 stw r0,52(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10434: 41 82 00 74 beq- ffc104a8 return RTEMS_INVALID_ADDRESS; errno = 0; ffc10438: 48 00 2c a5 bl ffc130dc <__errno> ffc1043c: 38 00 00 00 li r0,0 *n = 0; ffc10440: 39 20 00 00 li r9,0 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc10444: 90 03 00 00 stw r0,0(r3) *n = 0; ffc10448: 39 40 00 00 li r10,0 ffc1044c: 91 3f 00 00 stw r9,0(r31) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc10450: 7f 85 e3 78 mr r5,r28 ffc10454: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc10458: 91 5f 00 04 stw r10,4(r31) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc1045c: 38 81 00 08 addi r4,r1,8 ffc10460: 48 00 5c 71 bl ffc160d0 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10464: 2f 9d 00 00 cmpwi cr7,r29,0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc10468: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc1046c: 41 9e 00 90 beq- cr7,ffc104fc *endptr = end; ffc10470: 80 01 00 08 lwz r0,8(r1) ffc10474: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc10478: 7f 9e 00 00 cmpw cr7,r30,r0 return RTEMS_NOT_DEFINED; ffc1047c: 38 60 00 0b li r3,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc10480: 41 9e 00 28 beq- cr7,ffc104a8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10484: 6f 80 80 00 xoris r0,r28,32768 ffc10488: 2f 80 ff ff cmpwi cr7,r0,-1 ffc1048c: 41 9e 00 64 beq- cr7,ffc104f0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) ffc10490: 3c 00 80 00 lis r0,-32768 ffc10494: 7f 9c 00 00 cmpw cr7,r28,r0 ffc10498: 41 9e 00 30 beq- cr7,ffc104c8 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc1049c: 93 9f 00 00 stw r28,0(r31) #endif return RTEMS_SUCCESSFUL; ffc104a0: 38 60 00 00 li r3,0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc104a4: 90 9f 00 04 stw r4,4(r31) #endif return RTEMS_SUCCESSFUL; } ffc104a8: 80 01 00 34 lwz r0,52(r1) ffc104ac: 83 81 00 20 lwz r28,32(r1) ffc104b0: 7c 08 03 a6 mtlr r0 ffc104b4: 83 a1 00 24 lwz r29,36(r1) ffc104b8: 83 c1 00 28 lwz r30,40(r1) ffc104bc: 83 e1 00 2c lwz r31,44(r1) ffc104c0: 38 21 00 30 addi r1,r1,48 ffc104c4: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) ffc104c8: 2f 84 00 00 cmpwi cr7,r4,0 ffc104cc: 40 9e ff d0 bne+ cr7,ffc1049c <== NEVER TAKEN ffc104d0: 90 81 00 18 stw r4,24(r1) ffc104d4: 48 00 2c 09 bl ffc130dc <__errno> ffc104d8: 80 03 00 00 lwz r0,0(r3) return RTEMS_INVALID_NUMBER; ffc104dc: 38 60 00 0a li r3,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) ffc104e0: 80 81 00 18 lwz r4,24(r1) ffc104e4: 2f 80 00 22 cmpwi cr7,r0,34 ffc104e8: 40 9e ff b4 bne+ cr7,ffc1049c ffc104ec: 4b ff ff bc b ffc104a8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc104f0: 2f 84 ff ff cmpwi cr7,r4,-1 ffc104f4: 40 9e ff 9c bne+ cr7,ffc10490 <== NEVER TAKEN ffc104f8: 4b ff ff d8 b ffc104d0 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc104fc: 80 01 00 08 lwz r0,8(r1) ffc10500: 4b ff ff 78 b ffc10478 =============================================================================== ffc105d8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc105d8: 94 21 ff d8 stwu r1,-40(r1) ffc105dc: 7c 08 02 a6 mflr r0 ffc105e0: 93 c1 00 20 stw r30,32(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc105e4: 7c 9e 23 79 mr. r30,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc105e8: 93 a1 00 1c stw r29,28(r1) ffc105ec: 7c bd 2b 78 mr r29,r5 ffc105f0: 93 e1 00 24 stw r31,36(r1) ffc105f4: 7c 7f 1b 78 mr r31,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc105f8: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc105fc: 90 01 00 2c stw r0,44(r1) ffc10600: 93 81 00 18 stw r28,24(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10604: 41 82 00 54 beq- ffc10658 return RTEMS_INVALID_ADDRESS; errno = 0; ffc10608: 48 00 2a d5 bl ffc130dc <__errno> ffc1060c: 38 00 00 00 li r0,0 ffc10610: 90 03 00 00 stw r0,0(r3) *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); ffc10614: 38 81 00 08 addi r4,r1,8 ffc10618: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc1061c: 90 1e 00 00 stw r0,0(r30) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); ffc10620: 38 a0 00 10 li r5,16 ffc10624: 48 00 60 0d bl ffc16630 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10628: 2f 9d 00 00 cmpwi cr7,r29,0 *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); ffc1062c: 7c 7c 1b 78 mr r28,r3 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10630: 41 9e 00 60 beq- cr7,ffc10690 *endptr = end; ffc10634: 80 01 00 08 lwz r0,8(r1) ffc10638: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc1063c: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc10640: 38 60 00 0b li r3,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc10644: 41 9e 00 14 beq- cr7,ffc10658 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10648: 2f 9c ff ff cmpwi cr7,r28,-1 ffc1064c: 41 9e 00 2c beq- cr7,ffc10678 <== NEVER TAKEN if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; ffc10650: 93 9e 00 00 stw r28,0(r30) #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; ffc10654: 38 60 00 00 li r3,0 } ffc10658: 80 01 00 2c lwz r0,44(r1) ffc1065c: 83 81 00 18 lwz r28,24(r1) ffc10660: 7c 08 03 a6 mtlr r0 ffc10664: 83 a1 00 1c lwz r29,28(r1) ffc10668: 83 c1 00 20 lwz r30,32(r1) ffc1066c: 83 e1 00 24 lwz r31,36(r1) ffc10670: 38 21 00 28 addi r1,r1,40 ffc10674: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10678: 48 00 2a 65 bl ffc130dc <__errno> <== NOT EXECUTED ffc1067c: 80 03 00 00 lwz r0,0(r3) <== NOT EXECUTED return RTEMS_INVALID_NUMBER; ffc10680: 38 60 00 0a li r3,10 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10684: 2f 80 00 22 cmpwi cr7,r0,34 <== NOT EXECUTED ffc10688: 40 9e ff c8 bne+ cr7,ffc10650 <== NOT EXECUTED ffc1068c: 4b ff ff cc b ffc10658 <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10690: 80 01 00 08 lwz r0,8(r1) ffc10694: 4b ff ff a8 b ffc1063c =============================================================================== ffc1073c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc1073c: 94 21 ff d8 stwu r1,-40(r1) ffc10740: 7c 08 02 a6 mflr r0 ffc10744: 93 c1 00 20 stw r30,32(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10748: 7c 9e 23 79 mr. r30,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc1074c: 93 81 00 18 stw r28,24(r1) ffc10750: 7c dc 33 78 mr r28,r6 ffc10754: 93 a1 00 1c stw r29,28(r1) ffc10758: 7c bd 2b 78 mr r29,r5 ffc1075c: 93 e1 00 24 stw r31,36(r1) ffc10760: 7c 7f 1b 78 mr r31,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc10764: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10768: 90 01 00 2c stw r0,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc1076c: 41 82 00 54 beq- ffc107c0 return RTEMS_INVALID_ADDRESS; errno = 0; ffc10770: 48 00 29 6d bl ffc130dc <__errno> ffc10774: 38 00 00 00 li r0,0 ffc10778: 90 03 00 00 stw r0,0(r3) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc1077c: 7f 85 e3 78 mr r5,r28 ffc10780: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc10784: 90 1e 00 00 stw r0,0(r30) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc10788: 38 81 00 08 addi r4,r1,8 ffc1078c: 48 00 5e a5 bl ffc16630 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10790: 2f 9d 00 00 cmpwi cr7,r29,0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc10794: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10798: 41 9e 00 60 beq- cr7,ffc107f8 *endptr = end; ffc1079c: 80 01 00 08 lwz r0,8(r1) ffc107a0: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc107a4: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc107a8: 38 60 00 0b li r3,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc107ac: 41 9e 00 14 beq- cr7,ffc107c0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc107b0: 2f 9c ff ff cmpwi cr7,r28,-1 ffc107b4: 41 9e 00 2c beq- cr7,ffc107e0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc107b8: 93 9e 00 00 stw r28,0(r30) #endif return RTEMS_SUCCESSFUL; ffc107bc: 38 60 00 00 li r3,0 } ffc107c0: 80 01 00 2c lwz r0,44(r1) ffc107c4: 83 81 00 18 lwz r28,24(r1) ffc107c8: 7c 08 03 a6 mtlr r0 ffc107cc: 83 a1 00 1c lwz r29,28(r1) ffc107d0: 83 c1 00 20 lwz r30,32(r1) ffc107d4: 83 e1 00 24 lwz r31,36(r1) ffc107d8: 38 21 00 28 addi r1,r1,40 ffc107dc: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc107e0: 48 00 28 fd bl ffc130dc <__errno> ffc107e4: 80 03 00 00 lwz r0,0(r3) return RTEMS_INVALID_NUMBER; ffc107e8: 38 60 00 0a li r3,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc107ec: 2f 80 00 22 cmpwi cr7,r0,34 ffc107f0: 40 9e ff c8 bne+ cr7,ffc107b8 <== NEVER TAKEN ffc107f4: 4b ff ff cc b ffc107c0 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc107f8: 80 01 00 08 lwz r0,8(r1) ffc107fc: 4b ff ff a8 b ffc107a4 =============================================================================== ffc108e4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc108e4: 94 21 ff d8 stwu r1,-40(r1) ffc108e8: 7c 08 02 a6 mflr r0 ffc108ec: 93 c1 00 20 stw r30,32(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc108f0: 7c 9e 23 79 mr. r30,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc108f4: 93 81 00 18 stw r28,24(r1) ffc108f8: 7c dc 33 78 mr r28,r6 ffc108fc: 93 a1 00 1c stw r29,28(r1) ffc10900: 7c bd 2b 78 mr r29,r5 ffc10904: 93 e1 00 24 stw r31,36(r1) ffc10908: 7c 7f 1b 78 mr r31,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc1090c: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10910: 90 01 00 2c stw r0,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10914: 41 82 00 54 beq- ffc10968 return RTEMS_INVALID_ADDRESS; errno = 0; ffc10918: 48 00 27 c5 bl ffc130dc <__errno> ffc1091c: 38 00 00 00 li r0,0 ffc10920: 90 03 00 00 stw r0,0(r3) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc10924: 7f 85 e3 78 mr r5,r28 ffc10928: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc1092c: 90 1e 00 00 stw r0,0(r30) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc10930: 38 81 00 08 addi r4,r1,8 ffc10934: 48 00 5c fd bl ffc16630 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10938: 2f 9d 00 00 cmpwi cr7,r29,0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc1093c: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10940: 41 9e 00 60 beq- cr7,ffc109a0 *endptr = end; ffc10944: 80 01 00 08 lwz r0,8(r1) ffc10948: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc1094c: 7f 9f 00 00 cmpw cr7,r31,r0 return RTEMS_NOT_DEFINED; ffc10950: 38 60 00 0b li r3,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc10954: 41 9e 00 14 beq- cr7,ffc10968 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10958: 2f 9c ff ff cmpwi cr7,r28,-1 ffc1095c: 41 9e 00 2c beq- cr7,ffc10988 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc10960: 93 9e 00 00 stw r28,0(r30) #endif return RTEMS_SUCCESSFUL; ffc10964: 38 60 00 00 li r3,0 } ffc10968: 80 01 00 2c lwz r0,44(r1) ffc1096c: 83 81 00 18 lwz r28,24(r1) ffc10970: 7c 08 03 a6 mtlr r0 ffc10974: 83 a1 00 1c lwz r29,28(r1) ffc10978: 83 c1 00 20 lwz r30,32(r1) ffc1097c: 83 e1 00 24 lwz r31,36(r1) ffc10980: 38 21 00 28 addi r1,r1,40 ffc10984: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10988: 48 00 27 55 bl ffc130dc <__errno> ffc1098c: 80 03 00 00 lwz r0,0(r3) return RTEMS_INVALID_NUMBER; ffc10990: 38 60 00 0a li r3,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10994: 2f 80 00 22 cmpwi cr7,r0,34 ffc10998: 40 9e ff c8 bne+ cr7,ffc10960 <== NEVER TAKEN ffc1099c: 4b ff ff cc b ffc10968 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc109a0: 80 01 00 08 lwz r0,8(r1) ffc109a4: 4b ff ff a8 b ffc1094c =============================================================================== ffc10800 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10800: 94 21 ff d0 stwu r1,-48(r1) ffc10804: 7c 08 02 a6 mflr r0 ffc10808: 93 e1 00 2c stw r31,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc1080c: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10810: 93 81 00 20 stw r28,32(r1) ffc10814: 7c dc 33 78 mr r28,r6 ffc10818: 93 a1 00 24 stw r29,36(r1) ffc1081c: 7c bd 2b 78 mr r29,r5 ffc10820: 93 c1 00 28 stw r30,40(r1) ffc10824: 7c 7e 1b 78 mr r30,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc10828: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc1082c: 90 01 00 34 stw r0,52(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10830: 41 82 00 64 beq- ffc10894 return RTEMS_INVALID_ADDRESS; errno = 0; ffc10834: 48 00 28 a9 bl ffc130dc <__errno> ffc10838: 38 00 00 00 li r0,0 *n = 0; ffc1083c: 39 20 00 00 li r9,0 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc10840: 90 03 00 00 stw r0,0(r3) *n = 0; ffc10844: 39 40 00 00 li r10,0 ffc10848: 91 3f 00 00 stw r9,0(r31) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc1084c: 7f 85 e3 78 mr r5,r28 ffc10850: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc10854: 91 5f 00 04 stw r10,4(r31) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc10858: 38 81 00 08 addi r4,r1,8 ffc1085c: 48 00 5d f5 bl ffc16650 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10860: 2f 9d 00 00 cmpwi cr7,r29,0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc10864: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10868: 41 9e 00 74 beq- cr7,ffc108dc *endptr = end; ffc1086c: 80 01 00 08 lwz r0,8(r1) ffc10870: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc10874: 7f 9e 00 00 cmpw cr7,r30,r0 return RTEMS_NOT_DEFINED; ffc10878: 38 60 00 0b li r3,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc1087c: 41 9e 00 18 beq- cr7,ffc10894 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10880: 2f 9c ff ff cmpwi cr7,r28,-1 ffc10884: 41 9e 00 30 beq- cr7,ffc108b4 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc10888: 93 9f 00 00 stw r28,0(r31) #endif return RTEMS_SUCCESSFUL; ffc1088c: 38 60 00 00 li r3,0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc10890: 90 9f 00 04 stw r4,4(r31) #endif return RTEMS_SUCCESSFUL; } ffc10894: 80 01 00 34 lwz r0,52(r1) ffc10898: 83 81 00 20 lwz r28,32(r1) ffc1089c: 7c 08 03 a6 mtlr r0 ffc108a0: 83 a1 00 24 lwz r29,36(r1) ffc108a4: 83 c1 00 28 lwz r30,40(r1) ffc108a8: 83 e1 00 2c lwz r31,44(r1) ffc108ac: 38 21 00 30 addi r1,r1,48 ffc108b0: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc108b4: 2f 84 ff ff cmpwi cr7,r4,-1 ffc108b8: 40 9e ff d0 bne+ cr7,ffc10888 <== NEVER TAKEN ffc108bc: 90 81 00 18 stw r4,24(r1) ffc108c0: 48 00 28 1d bl ffc130dc <__errno> ffc108c4: 80 03 00 00 lwz r0,0(r3) return RTEMS_INVALID_NUMBER; ffc108c8: 38 60 00 0a li r3,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc108cc: 80 81 00 18 lwz r4,24(r1) ffc108d0: 2f 80 00 22 cmpwi cr7,r0,34 ffc108d4: 40 9e ff b4 bne+ cr7,ffc10888 <== NEVER TAKEN ffc108d8: 4b ff ff bc b ffc10894 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc108dc: 80 01 00 08 lwz r0,8(r1) ffc108e0: 4b ff ff 94 b ffc10874 =============================================================================== ffc04570 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { ffc04570: 94 21 fe 28 stwu r1,-472(r1) ffc04574: 7c 08 02 a6 mflr r0 ffc04578: 92 e1 01 b4 stw r23,436(r1) ffc0457c: 90 01 01 dc stw r0,476(r1) ffc04580: 93 01 01 b8 stw r24,440(r1) ffc04584: 7c 78 1b 78 mr r24,r3 ffc04588: 93 81 01 c8 stw r28,456(r1) ffc0458c: 7c bc 2b 78 mr r28,r5 ffc04590: 93 a1 01 cc stw r29,460(r1) ffc04594: 7c 9d 23 78 mr r29,r4 ffc04598: 92 01 01 98 stw r16,408(r1) ffc0459c: 92 21 01 9c stw r17,412(r1) ffc045a0: 92 41 01 a0 stw r18,416(r1) ffc045a4: 92 61 01 a4 stw r19,420(r1) ffc045a8: 92 81 01 a8 stw r20,424(r1) ffc045ac: 92 a1 01 ac stw r21,428(r1) ffc045b0: 92 c1 01 b0 stw r22,432(r1) ffc045b4: 93 21 01 bc stw r25,444(r1) ffc045b8: 93 41 01 c0 stw r26,448(r1) ffc045bc: 93 61 01 c4 stw r27,452(r1) ffc045c0: 93 c1 01 d0 stw r30,464(r1) ffc045c4: 93 e1 01 d4 stw r31,468(r1) int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( ffc045c8: 48 01 34 95 bl ffc17a5c ffc045cc: 7c 64 1b 78 mr r4,r3 ffc045d0: 38 a0 00 00 li r5,0 ffc045d4: 7f 03 c3 78 mr r3,r24 ffc045d8: 38 c1 00 0c addi r6,r1,12 ffc045dc: 38 e0 00 00 li r7,0 ffc045e0: 48 00 0e b1 bl ffc05490 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) ffc045e4: 7c 77 1b 79 mr. r23,r3 ffc045e8: 40 82 01 dc bne- ffc047c4 return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) ffc045ec: 80 01 00 18 lwz r0,24(r1) ffc045f0: 3d 20 ff c2 lis r9,-62 ffc045f4: 39 29 3c b4 addi r9,r9,15540 ffc045f8: 7f 80 48 00 cmpw cr7,r0,r9 ffc045fc: 3a 60 00 00 li r19,0 ffc04600: 40 9e 01 b0 bne- cr7,ffc047b0 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) ffc04604: 3b f3 02 00 addi r31,r19,512 ffc04608: 7f 9f e0 40 cmplw cr7,r31,r28 /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) ffc0460c: 3f 40 ff c2 lis r26,-62 ffc04610: 3b 5a 3c fc addi r26,r26,15612 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); ffc04614: 3b c1 00 34 addi r30,r1,52 */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { ffc04618: 3a a1 00 20 addi r21,r1,32 ffc0461c: 3a c1 00 08 addi r22,r1,8 * - 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); ffc04620: 3b 21 00 98 addi r25,r1,152 if (full_filename[strlen(full_filename)-1] != '/') strcat(full_filename, "/"); ffc04624: 3a 80 2f 00 li r20,12032 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) ffc04628: 41 9d 00 98 bgt- cr7,ffc046c0 <== NEVER TAKEN break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; ffc0462c: 7e 7d 9a 14 add r19,r29,r19 offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) ffc04630: 38 73 01 01 addi r3,r19,257 ffc04634: 7f 44 d3 78 mr r4,r26 ffc04638: 38 a0 00 05 li r5,5 ffc0463c: 48 01 34 c5 bl ffc17b00 ffc04640: 7c 7b 1b 79 mr. r27,r3 ffc04644: 40 82 00 7c bne- ffc046c0 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); ffc04648: 38 a0 00 63 li r5,99 ffc0464c: 7e 64 9b 78 mr r4,r19 ffc04650: 7f c3 f3 78 mr r3,r30 ffc04654: 48 01 35 f5 bl ffc17c48 filename[MAX_NAME_FIELD_SIZE] = '\0'; ffc04658: 9b 61 00 97 stb r27,151(r1) linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); ffc0465c: 38 80 00 08 li r4,8 ffc04660: 38 73 00 64 addi r3,r19,100 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; ffc04664: 8a 33 00 9c lbz r17,156(r19) file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); ffc04668: 48 00 9e 49 bl ffc0e4b0 <_rtems_octal2ulong> file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); ffc0466c: 38 80 00 0c li r4,12 strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); ffc04670: 7c 72 1b 78 mr r18,r3 file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); ffc04674: 38 73 00 7c addi r3,r19,124 ffc04678: 48 00 9e 39 bl ffc0e4b0 <_rtems_octal2ulong> hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); ffc0467c: 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); ffc04680: 7c 7b 1b 78 mr r27,r3 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); ffc04684: 38 73 00 94 addi r3,r19,148 ffc04688: 48 00 9e 29 bl ffc0e4b0 <_rtems_octal2ulong> ffc0468c: 7c 70 1b 78 mr r16,r3 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) ffc04690: 7e 63 9b 78 mr r3,r19 ffc04694: 48 00 a3 81 bl ffc0ea14 <_rtems_tar_header_checksum> ffc04698: 7f 83 80 00 cmpw cr7,r3,r16 ffc0469c: 40 9e 00 24 bne- cr7,ffc046c0 <== 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) { ffc046a0: 2f 91 00 35 cmpwi cr7,r17,53 ffc046a4: 41 9e 00 c4 beq- cr7,ffc04768 * 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) { ffc046a8: 2f 91 00 30 cmpwi cr7,r17,48 ffc046ac: 41 9e 00 68 beq- cr7,ffc04714 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) ffc046b0: 7f f3 fb 78 mr r19,r31 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) ffc046b4: 3b f3 02 00 addi r31,r19,512 ffc046b8: 7f 9f e0 40 cmplw cr7,r31,r28 ffc046bc: 40 9d ff 70 ble+ cr7,ffc0462c <== ALWAYS TAKEN nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } ffc046c0: 80 01 01 dc lwz r0,476(r1) ffc046c4: 7e e3 bb 78 mr r3,r23 ffc046c8: 82 01 01 98 lwz r16,408(r1) ffc046cc: 7c 08 03 a6 mtlr r0 ffc046d0: 82 21 01 9c lwz r17,412(r1) ffc046d4: 82 41 01 a0 lwz r18,416(r1) ffc046d8: 82 61 01 a4 lwz r19,420(r1) ffc046dc: 82 81 01 a8 lwz r20,424(r1) ffc046e0: 82 a1 01 ac lwz r21,428(r1) ffc046e4: 82 c1 01 b0 lwz r22,432(r1) ffc046e8: 82 e1 01 b4 lwz r23,436(r1) ffc046ec: 83 01 01 b8 lwz r24,440(r1) ffc046f0: 83 21 01 bc lwz r25,444(r1) ffc046f4: 83 41 01 c0 lwz r26,448(r1) ffc046f8: 83 61 01 c4 lwz r27,452(r1) ffc046fc: 83 81 01 c8 lwz r28,456(r1) ffc04700: 83 a1 01 cc lwz r29,460(r1) ffc04704: 83 c1 01 d0 lwz r30,464(r1) ffc04708: 83 e1 01 d4 lwz r31,468(r1) ffc0470c: 38 21 01 d8 addi r1,r1,472 ffc04710: 4e 80 00 20 blr * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; ffc04714: 80 01 00 0c lwz r0,12(r1) if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { ffc04718: 7f c3 f3 78 mr r3,r30 ffc0471c: 7e a4 ab 78 mr r4,r21 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; ffc04720: 90 01 00 20 stw r0,32(r1) if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { ffc04724: 7e c5 b3 78 mr r5,r22 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; ffc04728: 80 01 00 10 lwz r0,16(r1) ffc0472c: 90 01 00 24 stw r0,36(r1) ffc04730: 80 01 00 14 lwz r0,20(r1) ffc04734: 90 01 00 28 stw r0,40(r1) ffc04738: 80 01 00 18 lwz r0,24(r1) ffc0473c: 90 01 00 2c stw r0,44(r1) ffc04740: 80 01 00 1c lwz r0,28(r1) ffc04744: 90 01 00 30 stw r0,48(r1) if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { ffc04748: 48 00 ad d5 bl ffc0f51c ffc0474c: 7c 73 1b 79 mr. r19,r3 ffc04750: 41 82 00 7c beq- ffc047cc <== ALWAYS TAKEN ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; ffc04754: 3b 7b 01 ff addi r27,r27,511 <== NOT EXECUTED offset += 512 * nblocks; ffc04758: 57 7b 00 2c rlwinm r27,r27,0,0,22 <== NOT EXECUTED ffc0475c: 7f fb fa 14 add r31,r27,r31 <== NOT EXECUTED 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) ffc04760: 7f f3 fb 78 mr r19,r31 ffc04764: 4b ff ff 50 b ffc046b4 * - 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); ffc04768: 7f 04 c3 78 mr r4,r24 ffc0476c: 7f 23 cb 78 mr r3,r25 ffc04770: 48 01 2e 19 bl ffc17588 if (full_filename[strlen(full_filename)-1] != '/') ffc04774: 7f 23 cb 78 mr r3,r25 ffc04778: 48 01 32 e5 bl ffc17a5c ffc0477c: 7d 36 1a 14 add r9,r22,r3 ffc04780: 88 09 00 8f lbz r0,143(r9) ffc04784: 2f 80 00 2f cmpwi cr7,r0,47 ffc04788: 41 9e 00 08 beq- cr7,ffc04790 <== ALWAYS TAKEN strcat(full_filename, "/"); ffc0478c: 7e 99 1b 2e sthx r20,r25,r3 <== NOT EXECUTED strcat(full_filename, filename); ffc04790: 7f c4 f3 78 mr r4,r30 ffc04794: 7f 23 cb 78 mr r3,r25 ffc04798: 48 01 2c b5 bl ffc1744c mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); ffc0479c: 7f 23 cb 78 mr r3,r25 ffc047a0: 38 80 01 ff li r4,511 ffc047a4: 48 00 18 cd bl ffc06070 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) ffc047a8: 7f f3 fb 78 mr r19,r31 ffc047ac: 4b ff ff 08 b ffc046b4 ffc047b0: 3d 20 ff c2 lis r9,-62 ffc047b4: 39 29 44 44 addi r9,r9,17476 ffc047b8: 7f 80 48 00 cmpw cr7,r0,r9 ffc047bc: 7e f3 bb 78 mr r19,r23 ffc047c0: 41 be fe 44 beq- cr7,ffc04604 <== NEVER TAKEN return -1; ffc047c4: 3a e0 ff ff li r23,-1 ffc047c8: 4b ff fe f8 b ffc046c0 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, ffc047cc: 56 46 05 fe clrlwi r6,r18,23 else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( ffc047d0: 80 a1 00 08 lwz r5,8(r1) ffc047d4: 7e a3 ab 78 mr r3,r21 ffc047d8: 38 80 00 06 li r4,6 ffc047dc: 60 c6 80 00 ori r6,r6,32768 ffc047e0: 38 e0 00 00 li r7,0 ffc047e4: 48 00 a4 e5 bl ffc0ecc8 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]; ffc047e8: 7c 1d fa 14 add r0,r29,r31 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; ffc047ec: 93 63 00 54 stw r27,84(r3) node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; ffc047f0: 3b 7b 01 ff addi r27,r27,511 offset += 512 * nblocks; ffc047f4: 57 7b 00 2c rlwinm r27,r27,0,0,22 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; ffc047f8: 92 63 00 50 stw r19,80(r3) node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; ffc047fc: 7f fb fa 14 add r31,r27,r31 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]; ffc04800: 90 03 00 58 stw r0,88(r3) ffc04804: 4b ff ff 5c b ffc04760 =============================================================================== ffc11d8c : ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc11d8c: 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 ) { ffc11d90: 7c 08 02 a6 mflr r0 ffc11d94: 94 21 ff f8 stwu r1,-8(r1) ffc11d98: 90 01 00 0c stw r0,12(r1) ffc11d9c: 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; ffc11da0: 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 ) ffc11da4: 41 82 01 34 beq- ffc11ed8 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; ffc11da8: 3c c0 00 00 lis r6,0 ffc11dac: 38 c6 2d 38 addi r6,r6,11576 ffc11db0: 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 ) ffc11db4: 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; ffc11db8: 89 09 00 74 lbz r8,116(r9) if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc11dbc: 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 ]; ffc11dc0: 81 69 01 2c lwz r11,300(r9) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc11dc4: 7d 08 00 34 cntlzw r8,r8 ffc11dc8: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc11dcc: 55 07 40 2e rlwinm r7,r8,8,0,23 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc11dd0: 40 9e 01 18 bne- cr7,ffc11ee8 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc11dd4: 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); ffc11dd8: 39 40 00 00 li r10,0 ffc11ddc: 7d 08 00 34 cntlzw r8,r8 ffc11de0: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc11de4: 55 08 50 2a rlwinm r8,r8,10,0,21 ffc11de8: 7d 07 3b 78 or r7,r8,r7 ffc11dec: 7d 40 00 a6 mfmsr r10 if (msr & MSR_EE) return 0; ffc11df0: 55 48 8f fe rlwinm r8,r10,17,31,31 ffc11df4: 2f 88 00 00 cmpwi cr7,r8,0 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc11df8: 70 8a 01 00 andi. r10,r4,256 ffc11dfc: 7d 40 00 26 mfcr r10 ffc11e00: 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(); ffc11e04: 7c e7 53 78 or r7,r7,r10 *previous_mode_set = old_mode; ffc11e08: 90 e5 00 00 stw r7,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc11e0c: 41 82 00 14 beq- ffc11e20 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; ffc11e10: 70 08 01 00 andi. r8,r0,256 ffc11e14: 7d 40 00 26 mfcr r10 ffc11e18: 55 4a 1f fe rlwinm r10,r10,3,31,31 ffc11e1c: 99 49 00 74 stb r10,116(r9) if ( mask & RTEMS_TIMESLICE_MASK ) { ffc11e20: 70 8a 02 00 andi. r10,r4,512 ffc11e24: 41 82 00 20 beq- ffc11e44 if ( _Modes_Is_timeslice(mode_set) ) { ffc11e28: 70 0a 02 00 andi. r10,r0,512 ffc11e2c: 41 82 01 54 beq- ffc11f80 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc11e30: 3d 40 00 00 lis r10,0 ffc11e34: 81 4a 27 24 lwz r10,10020(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; ffc11e38: 39 00 00 01 li r8,1 ffc11e3c: 91 09 00 7c stw r8,124(r9) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc11e40: 91 49 00 78 stw r10,120(r9) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc11e44: 70 88 00 01 andi. r8,r4,1 ffc11e48: 41 82 00 20 beq- ffc11e68 } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc11e4c: 39 20 00 00 li r9,0 ffc11e50: 7d 20 00 a6 mfmsr r9 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc11e54: 70 0a 00 01 andi. r10,r0,1 ffc11e58: 40 82 01 18 bne- ffc11f70 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc11e5c: 7d 50 42 a6 mfsprg r10,0 msr |= ppc_interrupt_get_disable_mask(); ffc11e60: 7d 49 4b 78 or r9,r10,r9 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc11e64: 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 ) { ffc11e68: 70 88 04 00 andi. r8,r4,1024 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; ffc11e6c: 39 40 00 00 li r10,0 if ( mask & RTEMS_ASR_MASK ) { ffc11e70: 41 82 00 54 beq- ffc11ec4 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc11e74: 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 ) { ffc11e78: 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( ffc11e7c: 7c 00 00 26 mfcr r0 ffc11e80: 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 ) { ffc11e84: 7f 89 00 00 cmpw cr7,r9,r0 ffc11e88: 41 9e 00 3c beq- cr7,ffc11ec4 asr->is_enabled = is_asr_enabled; ffc11e8c: 98 0b 00 08 stb r0,8(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc11e90: 7c 00 00 a6 mfmsr r0 ffc11e94: 7d 30 42 a6 mfsprg r9,0 ffc11e98: 7c 09 48 78 andc r9,r0,r9 ffc11e9c: 7d 20 01 24 mtmsr r9 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; ffc11ea0: 81 4b 00 18 lwz r10,24(r11) information->signals_pending = information->signals_posted; ffc11ea4: 81 2b 00 14 lwz r9,20(r11) information->signals_posted = _signals; ffc11ea8: 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; ffc11eac: 91 2b 00 18 stw r9,24(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc11eb0: 7c 00 01 24 mtmsr r0 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { ffc11eb4: 80 0b 00 14 lwz r0,20(r11) needs_asr_dispatching = true; ffc11eb8: 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 ) ) { ffc11ebc: 2f 80 00 00 cmpwi cr7,r0,0 ffc11ec0: 41 9e 00 d0 beq- cr7,ffc11f90 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc11ec4: 3d 20 00 00 lis r9,0 ffc11ec8: 80 09 27 6c lwz r0,10092(r9) if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; ffc11ecc: 38 60 00 00 li r3,0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc11ed0: 2f 80 00 03 cmpwi cr7,r0,3 ffc11ed4: 41 9e 00 58 beq- cr7,ffc11f2c <== ALWAYS TAKEN if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } ffc11ed8: 80 01 00 0c lwz r0,12(r1) ffc11edc: 38 21 00 08 addi r1,r1,8 ffc11ee0: 7c 08 03 a6 mtlr r0 ffc11ee4: 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; ffc11ee8: 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; ffc11eec: 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); ffc11ef0: 39 40 00 00 li r10,0 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc11ef4: 7d 08 00 34 cntlzw r8,r8 ffc11ef8: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc11efc: 55 08 50 2a rlwinm r8,r8,10,0,21 ffc11f00: 7d 07 3b 78 or r7,r8,r7 ffc11f04: 7d 40 00 a6 mfmsr r10 if (msr & MSR_EE) return 0; ffc11f08: 55 48 8f fe rlwinm r8,r10,17,31,31 ffc11f0c: 2f 88 00 00 cmpwi cr7,r8,0 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc11f10: 70 8a 01 00 andi. r10,r4,256 ffc11f14: 7d 40 00 26 mfcr r10 ffc11f18: 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(); ffc11f1c: 7c e7 53 78 or r7,r7,r10 *previous_mode_set = old_mode; ffc11f20: 90 e5 00 00 stw r7,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc11f24: 41 a2 fe fc beq- ffc11e20 ffc11f28: 4b ff fe e8 b ffc11e10 { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || ffc11f2c: 2f 8a 00 00 cmpwi cr7,r10,0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; ffc11f30: 81 26 00 0c lwz r9,12(r6) if ( are_signals_pending || ffc11f34: 40 9e 00 1c bne- cr7,ffc11f50 ffc11f38: 80 06 00 10 lwz r0,16(r6) ffc11f3c: 7f 89 00 00 cmpw cr7,r9,r0 ffc11f40: 41 be ff 98 beq- cr7,ffc11ed8 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { ffc11f44: 88 09 00 74 lbz r0,116(r9) ffc11f48: 2f 80 00 00 cmpwi cr7,r0,0 ffc11f4c: 41 be ff 8c beq- cr7,ffc11ed8 <== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc11f50: 38 00 00 01 li r0,1 ffc11f54: 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(); ffc11f58: 4b ff 9c 1d bl ffc0bb74 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; } ffc11f5c: 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; ffc11f60: 38 60 00 00 li r3,0 } ffc11f64: 7c 08 03 a6 mtlr r0 ffc11f68: 38 21 00 08 addi r1,r1,8 ffc11f6c: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc11f70: 7d 50 42 a6 mfsprg r10,0 _CPU_MSR_GET(msr); if (!(level & CPU_MODES_INTERRUPT_MASK)) { msr |= ppc_interrupt_get_disable_mask(); } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc11f74: 7d 29 50 78 andc r9,r9,r10 } _CPU_MSR_SET(msr); ffc11f78: 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 ) ); ffc11f7c: 4b ff fe ec b ffc11e68 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc11f80: 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; ffc11f84: 91 49 00 7c stw r10,124(r9) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc11f88: 41 a2 fe e0 beq- ffc11e68 ffc11f8c: 4b ff fe c0 b ffc11e4c /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; ffc11f90: 39 40 00 00 li r10,0 ffc11f94: 4b ff ff 30 b ffc11ec4 =============================================================================== ffc0eb24 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0eb24: 7d 80 00 26 mfcr r12 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0eb28: 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 ) { ffc0eb2c: 94 21 ff d8 stwu r1,-40(r1) ffc0eb30: 7c 08 02 a6 mflr r0 ffc0eb34: 93 c1 00 20 stw r30,32(r1) ffc0eb38: 7c be 2b 78 mr r30,r5 ffc0eb3c: 93 e1 00 24 stw r31,36(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0eb40: 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 ) { ffc0eb44: 90 01 00 2c stw r0,44(r1) ffc0eb48: 91 81 00 1c stw r12,28(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0eb4c: 41 92 00 18 beq- cr4,ffc0eb64 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 ) ); ffc0eb50: 3d 20 00 00 lis r9,0 ffc0eb54: 89 29 26 ac lbz r9,9900(r9) !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; ffc0eb58: 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 ) && ffc0eb5c: 7f 84 48 40 cmplw cr7,r4,r9 ffc0eb60: 41 9d 00 60 bgt- cr7,ffc0ebc0 if ( !old_priority ) ffc0eb64: 2f 9e 00 00 cmpwi cr7,r30,0 return RTEMS_INVALID_ADDRESS; ffc0eb68: 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 ) ffc0eb6c: 41 9e 00 54 beq- cr7,ffc0ebc0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); ffc0eb70: 38 81 00 08 addi r4,r1,8 ffc0eb74: 48 00 2c 09 bl ffc1177c <_Thread_Get> switch ( location ) { ffc0eb78: 80 01 00 08 lwz r0,8(r1) ffc0eb7c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0eb80: 40 9e 00 64 bne- cr7,ffc0ebe4 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; ffc0eb84: 80 03 00 14 lwz r0,20(r3) ffc0eb88: 90 1e 00 00 stw r0,0(r30) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0eb8c: 41 92 00 2c beq- cr4,ffc0ebb8 the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || ffc0eb90: 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; ffc0eb94: 93 e3 00 18 stw r31,24(r3) if ( the_thread->resource_count == 0 || ffc0eb98: 2f 80 00 00 cmpwi cr7,r0,0 ffc0eb9c: 41 9e 00 10 beq- cr7,ffc0ebac ffc0eba0: 80 03 00 14 lwz r0,20(r3) ffc0eba4: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0eba8: 40 9c 00 10 bge- cr7,ffc0ebb8 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); ffc0ebac: 7f e4 fb 78 mr r4,r31 ffc0ebb0: 38 a0 00 00 li r5,0 ffc0ebb4: 48 00 24 ed bl ffc110a0 <_Thread_Change_priority> } _Thread_Enable_dispatch(); ffc0ebb8: 48 00 2b a5 bl ffc1175c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0ebbc: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0ebc0: 7c 03 03 78 mr r3,r0 ffc0ebc4: 80 01 00 2c lwz r0,44(r1) ffc0ebc8: 81 81 00 1c lwz r12,28(r1) ffc0ebcc: 7c 08 03 a6 mtlr r0 ffc0ebd0: 83 c1 00 20 lwz r30,32(r1) ffc0ebd4: 83 e1 00 24 lwz r31,36(r1) ffc0ebd8: 7d 80 81 20 mtcrf 8,r12 ffc0ebdc: 38 21 00 28 addi r1,r1,40 ffc0ebe0: 4e 80 00 20 blr case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0ebe4: 38 00 00 04 li r0,4 } ffc0ebe8: 81 81 00 1c lwz r12,28(r1) ffc0ebec: 7c 03 03 78 mr r3,r0 ffc0ebf0: 80 01 00 2c lwz r0,44(r1) ffc0ebf4: 83 c1 00 20 lwz r30,32(r1) ffc0ebf8: 7d 80 81 20 mtcrf 8,r12 ffc0ebfc: 7c 08 03 a6 mtlr r0 ffc0ec00: 83 e1 00 24 lwz r31,36(r1) ffc0ec04: 38 21 00 28 addi r1,r1,40 ffc0ec08: 4e 80 00 20 blr =============================================================================== ffc0a820 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc0a820: 94 21 ff e0 stwu r1,-32(r1) ffc0a824: 7c 08 02 a6 mflr r0 ffc0a828: 93 e1 00 1c stw r31,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc0a82c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc0a830: 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; ffc0a834: 38 00 00 09 li r0,9 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc0a838: 41 82 00 58 beq- ffc0a890 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); ffc0a83c: 38 81 00 08 addi r4,r1,8 ffc0a840: 48 00 29 a1 bl ffc0d1e0 <_Thread_Get> switch (location) { ffc0a844: 80 01 00 08 lwz r0,8(r1) ffc0a848: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a84c: 40 9e 00 5c bne- cr7,ffc0a8a8 case OBJECTS_LOCAL: tvp = the_thread->task_variables; ffc0a850: 81 23 01 38 lwz r9,312(r3) while (tvp) { ffc0a854: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a858: 41 9e 00 30 beq- cr7,ffc0a888 if (tvp->ptr == ptr) { ffc0a85c: 80 09 00 04 lwz r0,4(r9) ffc0a860: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a864: 40 be 00 18 bne+ cr7,ffc0a87c ffc0a868: 48 00 00 88 b ffc0a8f0 ffc0a86c: 80 04 00 04 lwz r0,4(r4) ffc0a870: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a874: 41 9e 00 50 beq- cr7,ffc0a8c4 ffc0a878: 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; ffc0a87c: 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) { ffc0a880: 2f 84 00 00 cmpwi cr7,r4,0 ffc0a884: 40 9e ff e8 bne+ cr7,ffc0a86c <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc0a888: 48 00 29 39 bl ffc0d1c0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; ffc0a88c: 38 00 00 09 li r0,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a890: 7c 03 03 78 mr r3,r0 ffc0a894: 80 01 00 24 lwz r0,36(r1) ffc0a898: 83 e1 00 1c lwz r31,28(r1) ffc0a89c: 38 21 00 20 addi r1,r1,32 ffc0a8a0: 7c 08 03 a6 mtlr r0 ffc0a8a4: 4e 80 00 20 blr case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a8a8: 38 00 00 04 li r0,4 } ffc0a8ac: 83 e1 00 1c lwz r31,28(r1) ffc0a8b0: 7c 03 03 78 mr r3,r0 ffc0a8b4: 80 01 00 24 lwz r0,36(r1) ffc0a8b8: 38 21 00 20 addi r1,r1,32 ffc0a8bc: 7c 08 03 a6 mtlr r0 ffc0a8c0: 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; ffc0a8c4: 80 04 00 00 lwz r0,0(r4) ffc0a8c8: 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 ); ffc0a8cc: 48 00 01 0d bl ffc0a9d8 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); ffc0a8d0: 48 00 28 f1 bl ffc0d1c0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a8d4: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a8d8: 7c 03 03 78 mr r3,r0 ffc0a8dc: 80 01 00 24 lwz r0,36(r1) ffc0a8e0: 83 e1 00 1c lwz r31,28(r1) ffc0a8e4: 38 21 00 20 addi r1,r1,32 ffc0a8e8: 7c 08 03 a6 mtlr r0 ffc0a8ec: 4e 80 00 20 blr while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; ffc0a8f0: 80 09 00 00 lwz r0,0(r9) ffc0a8f4: 7d 24 4b 78 mr r4,r9 ffc0a8f8: 90 03 01 38 stw r0,312(r3) ffc0a8fc: 4b ff ff d0 b ffc0a8cc =============================================================================== ffc0a900 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc0a900: 94 21 ff e0 stwu r1,-32(r1) ffc0a904: 7c 08 02 a6 mflr r0 ffc0a908: 93 e1 00 1c stw r31,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc0a90c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc0a910: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) return RTEMS_INVALID_ADDRESS; ffc0a914: 38 00 00 09 li r0,9 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc0a918: 93 c1 00 18 stw r30,24(r1) ffc0a91c: 7c be 2b 78 mr r30,r5 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc0a920: 41 82 00 58 beq- ffc0a978 return RTEMS_INVALID_ADDRESS; if ( !result ) ffc0a924: 2f 85 00 00 cmpwi cr7,r5,0 ffc0a928: 41 9e 00 50 beq- cr7,ffc0a978 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc0a92c: 38 81 00 08 addi r4,r1,8 ffc0a930: 48 00 28 b1 bl ffc0d1e0 <_Thread_Get> switch (location) { ffc0a934: 80 01 00 08 lwz r0,8(r1) ffc0a938: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a93c: 40 9e 00 58 bne- cr7,ffc0a994 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; ffc0a940: 81 23 01 38 lwz r9,312(r3) while (tvp) { ffc0a944: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a948: 40 be 00 14 bne+ cr7,ffc0a95c ffc0a94c: 48 00 00 68 b ffc0a9b4 */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; ffc0a950: 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) { ffc0a954: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a958: 41 9e 00 5c beq- cr7,ffc0a9b4 <== NEVER TAKEN if (tvp->ptr == ptr) { ffc0a95c: 80 09 00 04 lwz r0,4(r9) ffc0a960: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a964: 40 9e ff ec bne+ cr7,ffc0a950 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; ffc0a968: 80 09 00 0c lwz r0,12(r9) ffc0a96c: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0a970: 48 00 28 51 bl ffc0d1c0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a974: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a978: 7c 03 03 78 mr r3,r0 ffc0a97c: 80 01 00 24 lwz r0,36(r1) ffc0a980: 83 c1 00 18 lwz r30,24(r1) ffc0a984: 7c 08 03 a6 mtlr r0 ffc0a988: 83 e1 00 1c lwz r31,28(r1) ffc0a98c: 38 21 00 20 addi r1,r1,32 ffc0a990: 4e 80 00 20 blr #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a994: 38 00 00 04 li r0,4 } ffc0a998: 83 c1 00 18 lwz r30,24(r1) ffc0a99c: 7c 03 03 78 mr r3,r0 ffc0a9a0: 80 01 00 24 lwz r0,36(r1) ffc0a9a4: 83 e1 00 1c lwz r31,28(r1) ffc0a9a8: 38 21 00 20 addi r1,r1,32 ffc0a9ac: 7c 08 03 a6 mtlr r0 ffc0a9b0: 4e 80 00 20 blr _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc0a9b4: 48 00 28 0d bl ffc0d1c0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; ffc0a9b8: 38 00 00 09 li r0,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a9bc: 7c 03 03 78 mr r3,r0 ffc0a9c0: 80 01 00 24 lwz r0,36(r1) ffc0a9c4: 83 c1 00 18 lwz r30,24(r1) ffc0a9c8: 7c 08 03 a6 mtlr r0 ffc0a9cc: 83 e1 00 1c lwz r31,28(r1) ffc0a9d0: 38 21 00 20 addi r1,r1,32 ffc0a9d4: 4e 80 00 20 blr =============================================================================== ffc08520 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08520: 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; ffc08524: 38 00 00 09 li r0,9 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08528: 41 9e 00 44 beq- cr7,ffc0856c ffc0852c: 40 9d 00 48 ble- cr7,ffc08574 ffc08530: 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; ffc08534: 38 00 00 0e li r0,14 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08538: 41 9e 00 34 beq- cr7,ffc0856c ffc0853c: 40 9d 00 78 ble- cr7,ffc085b4 ffc08540: 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; ffc08544: 38 00 00 11 li r0,17 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08548: 41 9e 00 24 beq- cr7,ffc0856c ffc0854c: 40 9d 00 d4 ble- cr7,ffc08620 ffc08550: 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; ffc08554: 38 00 00 12 li r0,18 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08558: 41 9e 00 14 beq- cr7,ffc0856c ffc0855c: 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; ffc08560: 38 00 00 13 li r0,19 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08564: 41 9e 00 08 beq- cr7,ffc0856c <== 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; ffc08568: 38 00 ff ff li r0,-1 } return baud_index; } ffc0856c: 7c 03 03 78 mr r3,r0 ffc08570: 4e 80 00 20 blr rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08574: 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; ffc08578: 38 00 00 04 li r0,4 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc0857c: 41 be ff f0 beq- cr7,ffc0856c ffc08580: 41 9d 00 64 bgt- cr7,ffc085e4 ffc08584: 2f 83 00 01 cmpwi cr7,r3,1 case B0: baud_index = 0; break; case B50: baud_index = 1; break; ffc08588: 38 00 00 01 li r0,1 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc0858c: 41 be ff e0 beq- cr7,ffc0856c ffc08590: 40 9d 00 ac ble- cr7,ffc0863c ffc08594: 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; ffc08598: 38 00 00 02 li r0,2 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc0859c: 41 be ff d0 beq- cr7,ffc0856c ffc085a0: 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; ffc085a4: 38 00 00 03 li r0,3 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc085a8: 41 be ff c4 beq- cr7,ffc0856c <== 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; ffc085ac: 38 00 ff ff li r0,-1 <== NOT EXECUTED ffc085b0: 4b ff ff bc b ffc0856c <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc085b4: 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; ffc085b8: 38 00 00 0b li r0,11 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc085bc: 41 be ff b0 beq- cr7,ffc0856c ffc085c0: 41 9c 00 58 blt- cr7,ffc08618 ffc085c4: 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; ffc085c8: 38 00 00 0c li r0,12 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc085cc: 41 be ff a0 beq- cr7,ffc0856c ffc085d0: 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; ffc085d4: 38 00 00 0d li r0,13 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc085d8: 41 be ff 94 beq- cr7,ffc0856c <== 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; ffc085dc: 38 00 ff ff li r0,-1 <== NOT EXECUTED ffc085e0: 4b ff ff 8c b ffc0856c <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc085e4: 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; ffc085e8: 38 00 00 06 li r0,6 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc085ec: 41 be ff 80 beq- cr7,ffc0856c ffc085f0: 41 9c 00 20 blt- cr7,ffc08610 ffc085f4: 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; ffc085f8: 38 00 00 07 li r0,7 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc085fc: 41 be ff 70 beq- cr7,ffc0856c ffc08600: 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; ffc08604: 38 00 00 08 li r0,8 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08608: 40 9e ff 60 bne+ cr7,ffc08568 <== NEVER TAKEN ffc0860c: 4b ff ff 60 b ffc0856c 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; ffc08610: 38 00 00 05 li r0,5 ffc08614: 4b ff ff 58 b ffc0856c 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; ffc08618: 38 00 00 0a li r0,10 ffc0861c: 4b ff ff 50 b ffc0856c rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08620: 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; ffc08624: 38 00 00 0f li r0,15 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08628: 41 be ff 44 beq- cr7,ffc0856c ffc0862c: 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; ffc08630: 38 00 00 10 li r0,16 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08634: 40 9e ff 34 bne+ cr7,ffc08568 <== NEVER TAKEN ffc08638: 4b ff ff 34 b ffc0856c ffc0863c: 2f 83 00 00 cmpwi cr7,r3,0 case B0: baud_index = 0; break; ffc08640: 38 00 00 00 li r0,0 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc08644: 41 be ff 28 beq- cr7,ffc0856c ffc08648: 4b ff ff 20 b ffc08568 =============================================================================== ffc064d4 : } } rtems_status_code rtems_termios_close (void *arg) { ffc064d4: 94 21 ff e8 stwu r1,-24(r1) ffc064d8: 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( ffc064dc: 38 80 00 00 li r4,0 } } rtems_status_code rtems_termios_close (void *arg) { ffc064e0: 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( ffc064e4: 38 a0 00 00 li r5,0 } } rtems_status_code rtems_termios_close (void *arg) { ffc064e8: 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( ffc064ec: 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; ffc064f0: 81 23 00 00 lwz r9,0(r3) } } rtems_status_code rtems_termios_close (void *arg) { ffc064f4: 93 a1 00 0c stw r29,12(r1) ffc064f8: 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( ffc064fc: 80 7e 27 18 lwz r3,10008(r30) } } rtems_status_code rtems_termios_close (void *arg) { ffc06500: 93 e1 00 14 stw r31,20(r1) rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc06504: 83 e9 00 38 lwz r31,56(r9) rtems_status_code sc; sc = rtems_semaphore_obtain( ffc06508: 48 00 29 79 bl ffc08e80 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc0650c: 2f 83 00 00 cmpwi cr7,r3,0 ffc06510: 40 9e 01 ac bne- cr7,ffc066bc <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { ffc06514: 81 3f 00 08 lwz r9,8(r31) ffc06518: 38 09 ff ff addi r0,r9,-1 ffc0651c: 2f 80 00 00 cmpwi cr7,r0,0 ffc06520: 90 1f 00 08 stw r0,8(r31) ffc06524: 40 9e 00 d0 bne- cr7,ffc065f4 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { ffc06528: 80 1f 00 cc lwz r0,204(r31) ffc0652c: 3d 20 00 00 lis r9,0 ffc06530: 39 29 27 d4 addi r9,r9,10196 ffc06534: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc06538: 7d 29 02 14 add r9,r9,r0 ffc0653c: 80 09 00 04 lwz r0,4(r9) ffc06540: 2f 80 00 00 cmpwi cr7,r0,0 ffc06544: 41 9e 01 1c beq- cr7,ffc06660 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); ffc06548: 7c 09 03 a6 mtctr r0 ffc0654c: 7f e3 fb 78 mr r3,r31 ffc06550: 4e 80 04 21 bctrl } drainOutput (tty); rtems_semaphore_release (tty->osem); } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc06554: 80 1f 00 b4 lwz r0,180(r31) ffc06558: 2f 80 00 02 cmpwi cr7,r0,2 ffc0655c: 41 9e 01 38 beq- cr7,ffc06694 <== 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) ffc06560: 80 1f 00 9c lwz r0,156(r31) ffc06564: 2f 80 00 00 cmpwi cr7,r0,0 ffc06568: 41 9e 00 18 beq- cr7,ffc06580 <== ALWAYS TAKEN (*tty->device.lastClose)(tty->major, tty->minor, arg); ffc0656c: 80 7f 00 0c lwz r3,12(r31) <== NOT EXECUTED ffc06570: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED ffc06574: 80 9f 00 10 lwz r4,16(r31) <== NOT EXECUTED ffc06578: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0657c: 4e 80 04 21 bctrl <== NOT EXECUTED if (tty->forw == NULL) { ffc06580: 81 3f 00 00 lwz r9,0(r31) ffc06584: 2f 89 00 00 cmpwi cr7,r9,0 ffc06588: 41 9e 00 b8 beq- cr7,ffc06640 rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; ffc0658c: 80 1f 00 04 lwz r0,4(r31) ffc06590: 90 09 00 04 stw r0,4(r9) ffc06594: 81 7f 00 04 lwz r11,4(r31) } if (tty->back == NULL) { ffc06598: 2f 0b 00 00 cmpwi cr6,r11,0 ffc0659c: 41 9a 00 8c beq- cr6,ffc06628 <== ALWAYS TAKEN rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; ffc065a0: 91 2b 00 00 stw r9,0(r11) } rtems_semaphore_delete (tty->isem); ffc065a4: 80 7f 00 14 lwz r3,20(r31) ffc065a8: 48 00 27 fd bl ffc08da4 rtems_semaphore_delete (tty->osem); ffc065ac: 80 7f 00 18 lwz r3,24(r31) ffc065b0: 48 00 27 f5 bl ffc08da4 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); ffc065b4: 80 7f 00 8c lwz r3,140(r31) ffc065b8: 48 00 27 ed bl ffc08da4 if ((tty->device.pollRead == NULL) || ffc065bc: 80 1f 00 a0 lwz r0,160(r31) ffc065c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc065c4: 41 9e 00 58 beq- cr7,ffc0661c ffc065c8: 80 1f 00 b4 lwz r0,180(r31) ffc065cc: 2f 80 00 02 cmpwi cr7,r0,2 ffc065d0: 41 9e 00 4c beq- cr7,ffc0661c (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); ffc065d4: 80 7f 00 58 lwz r3,88(r31) ffc065d8: 4b ff e6 a5 bl ffc04c7c free (tty->rawOutBuf.theBuf); ffc065dc: 80 7f 00 7c lwz r3,124(r31) ffc065e0: 4b ff e6 9d bl ffc04c7c free (tty->cbuf); ffc065e4: 80 7f 00 1c lwz r3,28(r31) ffc065e8: 4b ff e6 95 bl ffc04c7c free (tty); ffc065ec: 7f e3 fb 78 mr r3,r31 ffc065f0: 4b ff e6 8d bl ffc04c7c } rtems_semaphore_release (rtems_termios_ttyMutex); ffc065f4: 80 7e 27 18 lwz r3,10008(r30) ffc065f8: 48 00 2a 11 bl ffc09008 return RTEMS_SUCCESSFUL; } ffc065fc: 80 01 00 1c lwz r0,28(r1) ffc06600: 38 60 00 00 li r3,0 ffc06604: 83 a1 00 0c lwz r29,12(r1) ffc06608: 7c 08 03 a6 mtlr r0 ffc0660c: 83 c1 00 10 lwz r30,16(r1) ffc06610: 83 e1 00 14 lwz r31,20(r1) ffc06614: 38 21 00 18 addi r1,r1,24 ffc06618: 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); ffc0661c: 80 7f 00 68 lwz r3,104(r31) ffc06620: 48 00 27 85 bl ffc08da4 ffc06624: 4b ff ff b0 b ffc065d4 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; ffc06628: 3d 60 00 00 lis r11,0 ffc0662c: 91 2b 27 20 stw r9,10016(r11) if ( rtems_termios_ttyHead != NULL ) { ffc06630: 41 be ff 74 beq- cr7,ffc065a4 rtems_termios_ttyHead->back = NULL; ffc06634: 38 00 00 00 li r0,0 ffc06638: 90 09 00 04 stw r0,4(r9) ffc0663c: 4b ff ff 68 b ffc065a4 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; ffc06640: 81 7f 00 04 lwz r11,4(r31) ffc06644: 3d 40 00 00 lis r10,0 if ( rtems_termios_ttyTail != NULL ) { ffc06648: 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; ffc0664c: 91 6a 27 1c stw r11,10012(r10) if ( rtems_termios_ttyTail != NULL ) { ffc06650: 41 ba ff d8 beq- cr6,ffc06628 rtems_termios_ttyTail->forw = NULL; ffc06654: 91 2b 00 00 stw r9,0(r11) ffc06658: 81 3f 00 00 lwz r9,0(r31) ffc0665c: 4b ff ff 44 b ffc065a0 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); ffc06660: 80 7f 00 18 lwz r3,24(r31) ffc06664: 38 80 00 00 li r4,0 ffc06668: 38 a0 00 00 li r5,0 ffc0666c: 48 00 28 15 bl ffc08e80 if (sc != RTEMS_SUCCESSFUL) { ffc06670: 2f 83 00 00 cmpwi cr7,r3,0 ffc06674: 40 9e 00 48 bne- cr7,ffc066bc <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); ffc06678: 7f e3 fb 78 mr r3,r31 ffc0667c: 4b ff f9 05 bl ffc05f80 rtems_semaphore_release (tty->osem); ffc06680: 80 7f 00 18 lwz r3,24(r31) ffc06684: 48 00 29 85 bl ffc09008 } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc06688: 80 1f 00 b4 lwz r0,180(r31) ffc0668c: 2f 80 00 02 cmpwi cr7,r0,2 ffc06690: 40 9e fe d0 bne+ cr7,ffc06560 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); ffc06694: 80 7f 00 c4 lwz r3,196(r31) ffc06698: 38 80 00 01 li r4,1 ffc0669c: 48 00 22 4d bl ffc088e8 if (sc != RTEMS_SUCCESSFUL) ffc066a0: 2f 83 00 00 cmpwi cr7,r3,0 ffc066a4: 40 9e 00 18 bne- cr7,ffc066bc <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); ffc066a8: 80 7f 00 c8 lwz r3,200(r31) ffc066ac: 38 80 00 01 li r4,1 ffc066b0: 48 00 22 39 bl ffc088e8 if (sc != RTEMS_SUCCESSFUL) ffc066b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc066b8: 41 9e fe a8 beq+ cr7,ffc06560 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); ffc066bc: 48 00 31 4d bl ffc09808 <== NOT EXECUTED =============================================================================== ffc08134 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { ffc08134: 94 21 ff f8 stwu r1,-8(r1) ffc08138: 7c 08 02 a6 mflr r0 ffc0813c: 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) { ffc08140: 81 63 00 b4 lwz r11,180(r3) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; ffc08144: 80 03 00 90 lwz r0,144(r3) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc08148: 2f 8b 00 02 cmpwi cr7,r11,2 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; ffc0814c: 7c 00 22 14 add r0,r0,r4 ffc08150: 90 03 00 90 stw r0,144(r3) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc08154: 41 9e 00 4c beq- cr7,ffc081a0 if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { ffc08158: 80 03 00 cc lwz r0,204(r3) ffc0815c: 2f 80 00 05 cmpwi cr7,r0,5 ffc08160: 41 9e 00 14 beq- cr7,ffc08174 } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); } ffc08164: 80 01 00 0c lwz r0,12(r1) ffc08168: 38 21 00 08 addi r1,r1,8 ffc0816c: 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); ffc08170: 4b ff fc b0 b ffc07e20 if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc08174: 3d 20 00 00 lis r9,0 ffc08178: 80 09 28 88 lwz r0,10376(r9) ffc0817c: 2f 80 00 00 cmpwi cr7,r0,0 ffc08180: 41 9e 00 0c beq- cr7,ffc0818c <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); ffc08184: 7c 09 03 a6 mtctr r0 ffc08188: 4e 80 04 21 bctrl } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); } ffc0818c: 80 01 00 0c lwz r0,12(r1) ffc08190: 38 60 00 00 li r3,0 ffc08194: 38 21 00 08 addi r1,r1,8 ffc08198: 7c 08 03 a6 mtlr r0 ffc0819c: 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); ffc081a0: 80 63 00 c8 lwz r3,200(r3) ffc081a4: 38 80 00 02 li r4,2 ffc081a8: 48 00 07 41 bl ffc088e8 if (sc != RTEMS_SUCCESSFUL) ffc081ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc081b0: 41 9e ff dc beq+ cr7,ffc0818c <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); ffc081b4: 48 00 16 55 bl ffc09808 <== NOT EXECUTED =============================================================================== ffc079c4 : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { ffc079c4: 94 21 ff d0 stwu r1,-48(r1) ffc079c8: 7c 08 02 a6 mflr r0 ffc079cc: 90 01 00 34 stw r0,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) { ffc079d0: 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, char *buf, int len) { ffc079d4: 93 c1 00 28 stw r30,40(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) { ffc079d8: 3f c0 00 00 lis r30,0 ffc079dc: 3b de 27 d4 addi r30,r30,10196 ffc079e0: 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, char *buf, int len) { ffc079e4: 93 61 00 1c stw r27,28(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) { ffc079e8: 7d 3e 4a 14 add r9,r30,r9 ffc079ec: 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, char *buf, int len) { ffc079f0: 7c bb 2b 78 mr r27,r5 ffc079f4: 93 a1 00 24 stw r29,36(r1) ffc079f8: 7c 9d 23 78 mr r29,r4 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) { ffc079fc: 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, char *buf, int len) { ffc07a00: 93 e1 00 2c stw r31,44(r1) ffc07a04: 7c 7f 1b 78 mr r31,r3 ffc07a08: 92 c1 00 08 stw r22,8(r1) ffc07a0c: 92 e1 00 0c stw r23,12(r1) ffc07a10: 93 01 00 10 stw r24,16(r1) ffc07a14: 93 21 00 14 stw r25,20(r1) ffc07a18: 93 41 00 18 stw r26,24(r1) ffc07a1c: 93 81 00 20 stw r28,32(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) { ffc07a20: 41 9e 00 b0 beq- cr7,ffc07ad0 while (len--) { ffc07a24: 2f 85 00 00 cmpwi cr7,r5,0 ffc07a28: 41 9e 00 38 beq- cr7,ffc07a60 <== NEVER TAKEN ffc07a2c: 3b 80 00 00 li r28,0 ffc07a30: 48 00 00 14 b ffc07a44 ffc07a34: 81 3f 00 cc lwz r9,204(r31) ffc07a38: 55 29 28 34 rlwinm r9,r9,5,0,26 ffc07a3c: 7d 3e 4a 14 add r9,r30,r9 ffc07a40: 80 09 00 10 lwz r0,16(r9) c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); ffc07a44: 7c 7d e0 ae lbzx r3,r29,r28 ffc07a48: 7f e4 fb 78 mr r4,r31 ffc07a4c: 7c 09 03 a6 mtctr r0 ffc07a50: 3b 9c 00 01 addi r28,r28,1 ffc07a54: 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--) { ffc07a58: 7f 9c d8 00 cmpw cr7,r28,r27 ffc07a5c: 40 9e ff d8 bne+ cr7,ffc07a34 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc07a60: 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; ffc07a64: 3b 40 00 00 li r26,0 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc07a68: 2f 80 00 00 cmpwi cr7,r0,0 ffc07a6c: 40 9e 00 28 bne- cr7,ffc07a94 <== NEVER TAKEN ffc07a70: 80 1f 00 dc lwz r0,220(r31) ffc07a74: 2f 80 00 00 cmpwi cr7,r0,0 ffc07a78: 41 9e 00 1c beq- cr7,ffc07a94 <== NEVER TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); ffc07a7c: 7c 09 03 a6 mtctr r0 ffc07a80: 38 7f 00 30 addi r3,r31,48 ffc07a84: 80 9f 00 e0 lwz r4,224(r31) ffc07a88: 4e 80 04 21 bctrl tty->tty_rcvwakeup = 1; ffc07a8c: 38 00 00 01 li r0,1 ffc07a90: 90 1f 00 e4 stw r0,228(r31) } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } ffc07a94: 80 01 00 34 lwz r0,52(r1) ffc07a98: 7f 43 d3 78 mr r3,r26 ffc07a9c: 82 c1 00 08 lwz r22,8(r1) ffc07aa0: 7c 08 03 a6 mtlr r0 ffc07aa4: 82 e1 00 0c lwz r23,12(r1) ffc07aa8: 83 01 00 10 lwz r24,16(r1) ffc07aac: 83 21 00 14 lwz r25,20(r1) ffc07ab0: 83 41 00 18 lwz r26,24(r1) ffc07ab4: 83 61 00 1c lwz r27,28(r1) ffc07ab8: 83 81 00 20 lwz r28,32(r1) ffc07abc: 83 a1 00 24 lwz r29,36(r1) ffc07ac0: 83 c1 00 28 lwz r30,40(r1) ffc07ac4: 83 e1 00 2c lwz r31,44(r1) ffc07ac8: 38 21 00 30 addi r1,r1,48 ffc07acc: 4e 80 00 20 blr 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) { ffc07ad0: 7c be 2b 78 mr r30,r5 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { ffc07ad4: 2f 9e 00 00 cmpwi cr7,r30,0 * NOTE: This routine runs in the context of the * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) ffc07ad8: 3b 64 ff ff addi r27,r4,-1 ffc07adc: 3b 20 00 00 li r25,0 ffc07ae0: 3b 40 00 00 li r26,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); ffc07ae4: 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, ffc07ae8: 3a c3 00 4a addi r22,r3,74 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { ffc07aec: 41 9e 01 18 beq- cr7,ffc07c04 <== NEVER TAKEN c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { ffc07af0: 80 1f 00 b8 lwz r0,184(r31) } return 0; } while (len--) { c = *buf++; ffc07af4: 8f 9b 00 01 lbzu r28,1(r27) /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { ffc07af8: 70 09 02 00 andi. r9,r0,512 ffc07afc: 41 82 00 1c beq- ffc07b18 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { ffc07b00: 88 1f 00 4a lbz r0,74(r31) ffc07b04: 7f 80 e0 00 cmpw cr7,r0,r28 ffc07b08: 41 9e 01 4c beq- cr7,ffc07c54 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { ffc07b0c: 88 1f 00 49 lbz r0,73(r31) ffc07b10: 7f 80 e0 00 cmpw cr7,r0,r28 ffc07b14: 41 9e 01 d4 beq- cr7,ffc07ce8 <== NEVER TAKEN /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { ffc07b18: 2f 99 00 00 cmpwi cr7,r25,0 ffc07b1c: 40 9e 01 54 bne- cr7,ffc07c70 <== NEVER TAKEN } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; ffc07b20: 83 bf 00 60 lwz r29,96(r31) ffc07b24: 81 3f 00 64 lwz r9,100(r31) ffc07b28: 38 1d 00 01 addi r0,r29,1 ffc07b2c: 7f a0 4b 96 divwu r29,r0,r9 ffc07b30: 7f bd 49 d6 mullw r29,r29,r9 ffc07b34: 7f bd 00 50 subf r29,r29,r0 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07b38: 7f 00 00 a6 mfmsr r24 ffc07b3c: 7c 10 42 a6 mfsprg r0,0 ffc07b40: 7f 00 00 78 andc r0,r24,r0 ffc07b44: 7c 00 01 24 mtmsr r0 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) ffc07b48: 80 1f 00 5c lwz r0,92(r31) ffc07b4c: 81 7f 00 64 lwz r11,100(r31) % tty->rawInBuf.Size) > tty->highwater) && ffc07b50: 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) ffc07b54: 7c 00 58 50 subf r0,r0,r11 ffc07b58: 81 7f 00 c0 lwz r11,192(r31) ffc07b5c: 7c 00 ea 14 add r0,r0,r29 % tty->rawInBuf.Size) > tty->highwater) && ffc07b60: 7d 40 4b 96 divwu r10,r0,r9 ffc07b64: 7d 2a 49 d6 mullw r9,r10,r9 ffc07b68: 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) ffc07b6c: 7f 80 58 40 cmplw cr7,r0,r11 ffc07b70: 40 9d 00 3c ble- cr7,ffc07bac <== ALWAYS TAKEN % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { ffc07b74: 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) && ffc07b78: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc07b7c: 40 82 00 30 bne- ffc07bac <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; ffc07b80: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07b84: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED ffc07b88: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) ffc07b8c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07b90: 70 00 04 02 andi. r0,r0,1026 <== NOT EXECUTED ffc07b94: 2f 80 04 00 cmpwi cr7,r0,1024 <== NOT EXECUTED ffc07b98: 41 9e 01 78 beq- cr7,ffc07d10 <== 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) ) { ffc07b9c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07ba0: 70 00 01 04 andi. r0,r0,260 <== NOT EXECUTED ffc07ba4: 2f 80 01 00 cmpwi cr7,r0,256 <== NOT EXECUTED ffc07ba8: 41 9e 01 a8 beq- cr7,ffc07d50 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc07bac: 7f 00 01 24 mtmsr r24 } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { ffc07bb0: 80 1f 00 5c lwz r0,92(r31) ffc07bb4: 7f 80 e8 00 cmpw cr7,r0,r29 ffc07bb8: 41 9e 01 24 beq- cr7,ffc07cdc <== NEVER TAKEN dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; ffc07bbc: 81 3f 00 58 lwz r9,88(r31) ffc07bc0: 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 )) { ffc07bc4: 80 1f 00 e4 lwz r0,228(r31) if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; ffc07bc8: 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 )) { ffc07bcc: 2f 80 00 00 cmpwi cr7,r0,0 ffc07bd0: 40 9e 00 28 bne- cr7,ffc07bf8 <== NEVER TAKEN ffc07bd4: 80 1f 00 dc lwz r0,220(r31) ffc07bd8: 2f 80 00 00 cmpwi cr7,r0,0 ffc07bdc: 41 9e 00 1c beq- cr7,ffc07bf8 <== ALWAYS TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); ffc07be0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07be4: 7e e3 bb 78 mr r3,r23 <== NOT EXECUTED ffc07be8: 80 9f 00 e0 lwz r4,224(r31) <== NOT EXECUTED ffc07bec: 4e 80 04 21 bctrl <== NOT EXECUTED tty->tty_rcvwakeup = 1; ffc07bf0: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc07bf4: 90 1f 00 e4 stw r0,228(r31) <== NOT EXECUTED ffc07bf8: 3b de ff ff addi r30,r30,-1 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { ffc07bfc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc07c00: 40 9e fe f0 bne+ cr7,ffc07af0 <== NEVER TAKEN } } } } tty->rawInBufDropped += dropped; ffc07c04: 80 1f 00 78 lwz r0,120(r31) rtems_semaphore_release (tty->rawInBuf.Semaphore); ffc07c08: 80 7f 00 68 lwz r3,104(r31) } } } } tty->rawInBufDropped += dropped; ffc07c0c: 7c 00 d2 14 add r0,r0,r26 ffc07c10: 90 1f 00 78 stw r0,120(r31) rtems_semaphore_release (tty->rawInBuf.Semaphore); ffc07c14: 48 00 13 f5 bl ffc09008 return dropped; } ffc07c18: 80 01 00 34 lwz r0,52(r1) ffc07c1c: 7f 43 d3 78 mr r3,r26 ffc07c20: 82 c1 00 08 lwz r22,8(r1) ffc07c24: 7c 08 03 a6 mtlr r0 ffc07c28: 82 e1 00 0c lwz r23,12(r1) ffc07c2c: 83 01 00 10 lwz r24,16(r1) ffc07c30: 83 21 00 14 lwz r25,20(r1) ffc07c34: 83 41 00 18 lwz r26,24(r1) ffc07c38: 83 61 00 1c lwz r27,28(r1) ffc07c3c: 83 81 00 20 lwz r28,32(r1) ffc07c40: 83 a1 00 24 lwz r29,36(r1) ffc07c44: 83 c1 00 28 lwz r30,40(r1) ffc07c48: 83 e1 00 2c lwz r31,44(r1) ffc07c4c: 38 21 00 30 addi r1,r1,48 ffc07c50: 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]) { ffc07c54: 89 3f 00 49 lbz r9,73(r31) ffc07c58: 7f 89 00 00 cmpw cr7,r9,r0 ffc07c5c: 41 9e 00 a0 beq- cr7,ffc07cfc <== NEVER TAKEN tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; ffc07c60: 80 1f 00 b8 lwz r0,184(r31) 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--) { ffc07c64: 3b 20 00 01 li r25,1 tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; ffc07c68: 60 00 00 10 ori r0,r0,16 ffc07c6c: 90 1f 00 b8 stw r0,184(r31) flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { ffc07c70: 80 1f 00 b8 lwz r0,184(r31) ffc07c74: 54 00 06 b6 rlwinm r0,r0,0,26,27 ffc07c78: 2f 80 00 20 cmpwi cr7,r0,32 ffc07c7c: 40 9e ff 7c bne+ cr7,ffc07bf8 <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07c80: 7f a0 00 a6 mfmsr r29 <== NOT EXECUTED ffc07c84: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc07c88: 7f a0 00 78 andc r0,r29,r0 <== NOT EXECUTED ffc07c8c: 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) { ffc07c90: 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; ffc07c94: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc07c98: 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; ffc07c9c: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED ffc07ca0: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc07ca4: 40 9e 00 10 bne- cr7,ffc07cb4 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc07ca8: 7f a0 01 24 mtmsr r29 <== 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; ffc07cac: 3b de ff ff addi r30,r30,-1 <== NOT EXECUTED ffc07cb0: 4b ff ff 4c b ffc07bfc <== 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); ffc07cb4: 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)( ffc07cb8: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc07cbc: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED ffc07cc0: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc07cc4: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc07cc8: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED ffc07ccc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07cd0: 4e 80 04 21 bctrl <== NOT EXECUTED ffc07cd4: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED ffc07cd8: 4b ff ff d4 b ffc07cac <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; ffc07cdc: 3b 5a 00 01 addi r26,r26,1 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; ffc07ce0: 3b de ff ff addi r30,r30,-1 <== NOT EXECUTED ffc07ce4: 4b ff ff 18 b ffc07bfc <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; ffc07ce8: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { ffc07cec: 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; ffc07cf0: 54 00 07 34 rlwinm r0,r0,0,28,26 <== NOT EXECUTED ffc07cf4: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED ffc07cf8: 4b ff ff 78 b ffc07c70 <== 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; ffc07cfc: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { ffc07d00: 3b 20 00 01 li r25,1 <== 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; ffc07d04: 68 00 00 10 xori r0,r0,16 <== NOT EXECUTED ffc07d08: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED ffc07d0c: 4b ff ff 64 b ffc07c70 <== 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) || ffc07d10: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07d14: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc07d18: 40 82 00 10 bne- ffc07d28 <== NOT EXECUTED ffc07d1c: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED ffc07d20: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07d24: 40 be fe 88 bne- cr7,ffc07bac <== 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; ffc07d28: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc07d2c: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED ffc07d30: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc07d34: 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; ffc07d38: 61 29 00 02 ori r9,r9,2 <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc07d3c: 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; ffc07d40: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc07d44: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07d48: 4e 80 04 21 bctrl <== NOT EXECUTED ffc07d4c: 4b ff fe 60 b ffc07bac <== 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) { ffc07d50: 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; ffc07d54: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { ffc07d58: 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; ffc07d5c: 61 29 00 04 ori r9,r9,4 <== NOT EXECUTED ffc07d60: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { ffc07d64: 41 be fe 48 beq- cr7,ffc07bac <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); ffc07d68: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc07d6c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07d70: 4e 80 04 21 bctrl <== NOT EXECUTED ffc07d74: 4b ff fe 38 b ffc07bac <== NOT EXECUTED =============================================================================== ffc066dc : } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc066dc: 94 21 ff e0 stwu r1,-32(r1) ffc066e0: 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); ffc066e4: 38 80 00 00 li r4,0 } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc066e8: 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; ffc066ec: 38 00 00 00 li r0,0 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc066f0: 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; ffc066f4: 81 23 00 00 lwz r9,0(r3) } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc066f8: 93 c1 00 18 stw r30,24(r1) rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc066fc: 83 c9 00 38 lwz r30,56(r9) } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc06700: 93 81 00 10 stw r28,16(r1) ffc06704: 93 a1 00 14 stw r29,20(r1) ffc06708: 93 e1 00 1c stw r31,28(r1) ffc0670c: 7c 7f 1b 78 mr r31,r3 ffc06710: 93 41 00 08 stw r26,8(r1) ffc06714: 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; ffc06718: 90 03 00 0c stw r0,12(r3) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc0671c: 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; ffc06720: 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); ffc06724: 48 00 27 5d bl ffc08e80 if (sc != RTEMS_SUCCESSFUL) { ffc06728: 7c 7d 1b 79 mr. r29,r3 ffc0672c: 40 82 00 4c bne- ffc06778 <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { ffc06730: 80 1f 00 04 lwz r0,4(r31) ffc06734: 2f 80 00 04 cmpwi cr7,r0,4 ffc06738: 41 9e 00 28 beq- cr7,ffc06760 ffc0673c: 2b 80 00 04 cmplwi cr7,r0,4 ffc06740: 41 9d 00 68 bgt- cr7,ffc067a8 ffc06744: 2f 80 00 02 cmpwi cr7,r0,2 ffc06748: 41 9e 00 bc beq- cr7,ffc06804 ffc0674c: 2b 80 00 02 cmplwi cr7,r0,2 ffc06750: 40 9d 02 4c ble- cr7,ffc0699c if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); ffc06754: 7f c3 f3 78 mr r3,r30 ffc06758: 4b ff f8 29 bl ffc05f80 break; ffc0675c: 48 00 00 14 b ffc06770 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; ffc06760: 81 3c 00 00 lwz r9,0(r28) ffc06764: 81 5c 00 04 lwz r10,4(r28) ffc06768: 91 3e 00 dc stw r9,220(r30) ffc0676c: 91 5e 00 e0 stw r10,224(r30) *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); ffc06770: 80 7e 00 18 lwz r3,24(r30) ffc06774: 48 00 28 95 bl ffc09008 args->ioctl_return = sc; return sc; } ffc06778: 80 01 00 24 lwz r0,36(r1) ffc0677c: 7f a3 eb 78 mr r3,r29 } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; ffc06780: 93 bf 00 0c stw r29,12(r31) return sc; } ffc06784: 7c 08 03 a6 mtlr r0 ffc06788: 83 41 00 08 lwz r26,8(r1) ffc0678c: 83 61 00 0c lwz r27,12(r1) ffc06790: 83 81 00 10 lwz r28,16(r1) ffc06794: 83 a1 00 14 lwz r29,20(r1) ffc06798: 83 c1 00 18 lwz r30,24(r1) ffc0679c: 83 e1 00 1c lwz r31,28(r1) ffc067a0: 38 21 00 20 addi r1,r1,32 ffc067a4: 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) { ffc067a8: 3d 20 40 04 lis r9,16388 ffc067ac: 61 29 66 7f ori r9,r9,26239 ffc067b0: 7f 80 48 00 cmpw cr7,r0,r9 ffc067b4: 41 9e 01 bc beq- cr7,ffc06970 <== NEVER TAKEN ffc067b8: 7f 80 48 40 cmplw cr7,r0,r9 ffc067bc: 41 9d 01 fc bgt- cr7,ffc069b8 ffc067c0: 2f 80 00 05 cmpwi cr7,r0,5 ffc067c4: 41 9e 02 84 beq- cr7,ffc06a48 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { ffc067c8: 80 1e 00 cc lwz r0,204(r30) ffc067cc: 3d 20 00 00 lis r9,0 ffc067d0: 39 29 27 d4 addi r9,r9,10196 ffc067d4: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc067d8: 7d 29 02 14 add r9,r9,r0 ffc067dc: 80 09 00 18 lwz r0,24(r9) sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; ffc067e0: 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) { ffc067e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc067e8: 41 be ff 88 beq- cr7,ffc06770 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); ffc067ec: 7f c3 f3 78 mr r3,r30 ffc067f0: 7c 09 03 a6 mtctr r0 ffc067f4: 7f e4 fb 78 mr r4,r31 ffc067f8: 4e 80 04 21 bctrl ffc067fc: 7c 7d 1b 78 mr r29,r3 ffc06800: 4b ff ff 70 b ffc06770 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; ffc06804: 3b 9e 00 30 addi r28,r30,48 ffc06808: 80 9f 00 08 lwz r4,8(r31) ffc0680c: 7f 83 e3 78 mr r3,r28 ffc06810: 38 a0 00 24 li r5,36 ffc06814: 48 00 c7 a9 bl ffc12fbc /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && ffc06818: 80 1e 00 b8 lwz r0,184(r30) ffc0681c: 70 09 02 00 andi. r9,r0,512 ffc06820: 41 82 00 58 beq- ffc06878 !(tty->termios.c_iflag & IXON)) { ffc06824: 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) && ffc06828: 70 09 04 00 andi. r9,r0,1024 ffc0682c: 40 82 00 4c bne- ffc06878 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); ffc06830: 81 3e 00 b8 lwz r9,184(r30) <== NOT EXECUTED ffc06834: 38 00 fd ef li r0,-529 <== NOT EXECUTED ffc06838: 7d 20 00 38 and r0,r9,r0 <== NOT EXECUTED ffc0683c: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { ffc06840: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc06844: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc06848: 41 82 00 30 beq- ffc06878 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0684c: 7f 60 00 a6 mfmsr r27 <== NOT EXECUTED ffc06850: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc06854: 7f 60 00 78 andc r0,r27,r0 <== NOT EXECUTED ffc06858: 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) { ffc0685c: 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; ffc06860: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc06864: 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; ffc06868: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED ffc0686c: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc06870: 40 9e 02 04 bne- cr7,ffc06a74 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc06874: 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)) { ffc06878: 80 1e 00 b8 lwz r0,184(r30) ffc0687c: 70 09 04 00 andi. r9,r0,1024 ffc06880: 41 82 00 28 beq- ffc068a8 <== ALWAYS TAKEN ffc06884: 80 1e 00 30 lwz r0,48(r30) <== NOT EXECUTED ffc06888: 70 09 10 00 andi. r9,r0,4096 <== NOT EXECUTED ffc0688c: 40 82 00 1c bne- ffc068a8 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); ffc06890: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc06894: 54 00 05 a8 rlwinm r0,r0,0,22,20 <== NOT EXECUTED ffc06898: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); ffc0689c: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc068a0: 54 00 07 fa rlwinm r0,r0,0,31,29 <== NOT EXECUTED ffc068a4: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { ffc068a8: 80 1e 00 b8 lwz r0,184(r30) ffc068ac: 70 09 01 00 andi. r9,r0,256 ffc068b0: 41 82 01 ac beq- ffc06a5c <== ALWAYS TAKEN ffc068b4: 80 1e 00 38 lwz r0,56(r30) <== NOT EXECUTED ffc068b8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc068bc: 41 9c 02 28 blt- cr7,ffc06ae4 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); ffc068c0: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc068c4: 54 00 06 2c rlwinm r0,r0,0,24,22 <== NOT EXECUTED ffc068c8: 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)) { ffc068cc: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc068d0: 70 09 00 04 andi. r9,r0,4 <== NOT EXECUTED ffc068d4: 41 82 00 24 beq- ffc068f8 <== NOT EXECUTED ffc068d8: 80 1e 00 b0 lwz r0,176(r30) <== NOT EXECUTED ffc068dc: 2f 00 00 00 cmpwi cr6,r0,0 <== NOT EXECUTED ffc068e0: 41 9a 00 18 beq- cr6,ffc068f8 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); ffc068e4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc068e8: 80 7e 00 10 lwz r3,16(r30) <== NOT EXECUTED ffc068ec: 4e 80 04 21 bctrl <== NOT EXECUTED ffc068f0: 80 1e 00 38 lwz r0,56(r30) <== NOT EXECUTED ffc068f4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); ffc068f8: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc068fc: 54 00 07 b8 rlwinm r0,r0,0,30,28 <== NOT EXECUTED ffc06900: 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) { ffc06904: 41 9c 01 e0 blt- cr7,ffc06ae4 <== NEVER TAKEN tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { ffc06908: 80 1e 00 30 lwz r0,48(r30) ffc0690c: 70 09 10 00 andi. r9,r0,4096 ffc06910: 41 82 00 10 beq- ffc06920 tty->flow_ctrl |= FL_MDXOF; ffc06914: 81 3e 00 b8 lwz r9,184(r30) ffc06918: 61 29 04 00 ori r9,r9,1024 ffc0691c: 91 3e 00 b8 stw r9,184(r30) } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { ffc06920: 70 09 04 00 andi. r9,r0,1024 ffc06924: 41 82 00 10 beq- ffc06934 <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; ffc06928: 80 1e 00 b8 lwz r0,184(r30) ffc0692c: 60 00 02 00 ori r0,r0,512 ffc06930: 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) { ffc06934: 83 7e 00 3c lwz r27,60(r30) ffc06938: 73 7b 00 02 andi. r27,r27,2 ffc0693c: 41 82 01 60 beq- ffc06a9c tty->rawInBufSemaphoreOptions = RTEMS_WAIT; ffc06940: 38 00 00 00 li r0,0 ffc06944: 90 1e 00 6c stw r0,108(r30) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; ffc06948: 90 1e 00 70 stw r0,112(r30) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; ffc0694c: 90 1e 00 74 stw r0,116(r30) } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) ffc06950: 80 1e 00 a8 lwz r0,168(r30) ffc06954: 2f 80 00 00 cmpwi cr7,r0,0 ffc06958: 41 be fe 18 beq- cr7,ffc06770 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); ffc0695c: 80 7e 00 10 lwz r3,16(r30) ffc06960: 7f 84 e3 78 mr r4,r28 ffc06964: 7c 09 03 a6 mtctr r0 ffc06968: 4e 80 04 21 bctrl ffc0696c: 4b ff fe 04 b ffc06770 case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; ffc06970: 81 3e 00 60 lwz r9,96(r30) <== NOT EXECUTED ffc06974: 80 1e 00 5c lwz r0,92(r30) <== NOT EXECUTED if ( rawnc < 0 ) ffc06978: 7c 00 48 51 subf. r0,r0,r9 <== NOT EXECUTED ffc0697c: 41 80 00 ec blt- ffc06a68 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; ffc06980: 81 5e 00 20 lwz r10,32(r30) <== NOT EXECUTED ffc06984: 81 3e 00 24 lwz r9,36(r30) <== NOT EXECUTED ffc06988: 81 7f 00 08 lwz r11,8(r31) <== NOT EXECUTED ffc0698c: 7d 29 50 50 subf r9,r9,r10 <== NOT EXECUTED ffc06990: 7c 09 02 14 add r0,r9,r0 <== NOT EXECUTED ffc06994: 90 0b 00 00 stw r0,0(r11) <== NOT EXECUTED } break; ffc06998: 4b ff fd d8 b ffc06770 <== 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) { ffc0699c: 2f 80 00 01 cmpwi cr7,r0,1 ffc069a0: 40 9e fe 28 bne+ cr7,ffc067c8 <== NEVER TAKEN sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; ffc069a4: 80 7f 00 08 lwz r3,8(r31) ffc069a8: 38 9e 00 30 addi r4,r30,48 ffc069ac: 38 a0 00 24 li r5,36 ffc069b0: 48 00 c6 0d bl ffc12fbc break; ffc069b4: 4b ff fd bc b ffc06770 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { ffc069b8: 6c 09 40 04 xoris r9,r0,16388 ffc069bc: 2f 89 74 1a cmpwi cr7,r9,29722 ffc069c0: 41 9e 00 78 beq- cr7,ffc06a38 ffc069c4: 6c 09 80 04 xoris r9,r0,32772 ffc069c8: 2f 89 74 1b cmpwi cr7,r9,29723 ffc069cc: 40 9e fd fc bne+ cr7,ffc067c8 <== NEVER TAKEN #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { ffc069d0: 81 3e 00 cc lwz r9,204(r30) ffc069d4: 3f 80 00 00 lis r28,0 ffc069d8: 3b 9c 27 d4 addi r28,r28,10196 ffc069dc: 55 29 28 34 rlwinm r9,r9,5,0,26 ffc069e0: 7d 3c 4a 14 add r9,r28,r9 ffc069e4: 80 09 00 04 lwz r0,4(r9) ffc069e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc069ec: 41 9e 00 14 beq- cr7,ffc06a00 sc = rtems_termios_linesw[tty->t_line].l_close(tty); ffc069f0: 7f c3 f3 78 mr r3,r30 ffc069f4: 7c 09 03 a6 mtctr r0 ffc069f8: 4e 80 04 21 bctrl ffc069fc: 7c 7d 1b 78 mr r29,r3 } tty->t_line=*(int*)(args->buffer); ffc06a00: 81 3f 00 08 lwz r9,8(r31) tty->t_sc = NULL; /* ensure that no more valid data */ ffc06a04: 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); ffc06a08: 81 29 00 00 lwz r9,0(r9) tty->t_sc = NULL; /* ensure that no more valid data */ ffc06a0c: 90 1e 00 d0 stw r0,208(r30) /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { ffc06a10: 55 20 28 34 rlwinm r0,r9,5,0,26 ffc06a14: 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); ffc06a18: 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) { ffc06a1c: 2f 80 00 00 cmpwi cr7,r0,0 ffc06a20: 41 be fd 50 beq- cr7,ffc06770 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_open(tty); ffc06a24: 7f c3 f3 78 mr r3,r30 ffc06a28: 7c 09 03 a6 mtctr r0 ffc06a2c: 4e 80 04 21 bctrl ffc06a30: 7c 7d 1b 78 mr r29,r3 ffc06a34: 4b ff fd 3c b ffc06770 } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; ffc06a38: 81 3f 00 08 lwz r9,8(r31) ffc06a3c: 80 1e 00 cc lwz r0,204(r30) ffc06a40: 90 09 00 00 stw r0,0(r9) break; ffc06a44: 4b ff fd 2c b ffc06770 case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; ffc06a48: 81 3c 00 00 lwz r9,0(r28) ffc06a4c: 81 5c 00 04 lwz r10,4(r28) ffc06a50: 91 3e 00 d4 stw r9,212(r30) ffc06a54: 91 5e 00 d8 stw r10,216(r30) break; ffc06a58: 4b ff fd 18 b ffc06770 /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { ffc06a5c: 80 1e 00 38 lwz r0,56(r30) ffc06a60: 2f 80 00 00 cmpwi cr7,r0,0 ffc06a64: 4b ff fe a0 b ffc06904 break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; ffc06a68: 81 3e 00 64 lwz r9,100(r30) <== NOT EXECUTED ffc06a6c: 7c 00 4a 14 add r0,r0,r9 <== NOT EXECUTED ffc06a70: 4b ff ff 10 b ffc06980 <== 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); ffc06a74: 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)( ffc06a78: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc06a7c: 80 9e 00 7c lwz r4,124(r30) <== NOT EXECUTED ffc06a80: 80 1e 00 a4 lwz r0,164(r30) <== NOT EXECUTED ffc06a84: 80 7e 00 10 lwz r3,16(r30) <== NOT EXECUTED ffc06a88: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED ffc06a8c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06a90: 4e 80 04 21 bctrl <== NOT EXECUTED ffc06a94: 7f 60 01 24 mtmsr r27 <== NOT EXECUTED ffc06a98: 4b ff fd e0 b ffc06878 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * ffc06a9c: 8b 5e 00 46 lbz r26,70(r30) rtems_clock_get_ticks_per_second() / 10; ffc06aa0: 48 00 1b 99 bl ffc08638 if (tty->termios.c_cc[VTIME]) { ffc06aa4: 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; ffc06aa8: 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] * ffc06aac: 7c 63 d1 d6 mullw r3,r3,r26 rtems_clock_get_ticks_per_second() / 10; ffc06ab0: 60 00 cc cd ori r0,r0,52429 if (tty->termios.c_cc[VTIME]) { ffc06ab4: 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; ffc06ab8: 7c 03 00 16 mulhwu r0,r3,r0 ffc06abc: 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] * ffc06ac0: 90 1e 00 54 stw r0,84(r30) rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { ffc06ac4: 41 9e 00 30 beq- cr7,ffc06af4 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) ffc06ac8: 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; ffc06acc: 93 7e 00 6c stw r27,108(r30) tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) ffc06ad0: 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; ffc06ad4: 90 1e 00 70 stw r0,112(r30) if (tty->termios.c_cc[VMIN]) ffc06ad8: 41 9e 00 38 beq- cr7,ffc06b10 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; ffc06adc: 93 7e 00 74 stw r27,116(r30) ffc06ae0: 4b ff fe 70 b ffc06950 /* * 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; ffc06ae4: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc06ae8: 60 00 01 00 ori r0,r0,256 <== NOT EXECUTED ffc06aec: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED ffc06af0: 4b ff fe 18 b ffc06908 <== 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]) { ffc06af4: 88 1e 00 47 lbz r0,71(r30) ffc06af8: 2f 80 00 00 cmpwi cr7,r0,0 ffc06afc: 41 9e 00 1c beq- cr7,ffc06b18 <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; ffc06b00: 91 3e 00 6c stw r9,108(r30) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; ffc06b04: 91 3e 00 70 stw r9,112(r30) <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; ffc06b08: 91 3e 00 74 stw r9,116(r30) <== NOT EXECUTED ffc06b0c: 4b ff fe 44 b ffc06950 <== 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; ffc06b10: 90 1e 00 74 stw r0,116(r30) ffc06b14: 4b ff fe 3c b ffc06950 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; ffc06b18: 38 00 00 01 li r0,1 ffc06b1c: 90 1e 00 6c stw r0,108(r30) ffc06b20: 4b ff fe 30 b ffc06950 =============================================================================== ffc06028 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc06028: 94 21 ff c0 stwu r1,-64(r1) ffc0602c: 7d 80 00 26 mfcr r12 ffc06030: 7c 08 02 a6 mflr r0 ffc06034: 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( ffc06038: 3f 80 00 00 lis r28,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc0603c: 93 c1 00 38 stw r30,56(r1) ffc06040: 7c 7e 1b 78 mr r30,r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc06044: 80 7c 27 18 lwz r3,10008(r28) rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc06048: 93 41 00 28 stw r26,40(r1) ffc0604c: 7c ba 2b 78 mr r26,r5 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc06050: 38 a0 00 00 li r5,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc06054: 93 a1 00 34 stw r29,52(r1) ffc06058: 7c 9d 23 78 mr r29,r4 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc0605c: 38 80 00 00 li r4,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc06060: 92 e1 00 1c stw r23,28(r1) ffc06064: 7c d7 33 78 mr r23,r6 ffc06068: 93 61 00 2c stw r27,44(r1) ffc0606c: 90 01 00 44 stw r0,68(r1) ffc06070: 92 61 00 0c stw r19,12(r1) ffc06074: 92 81 00 10 stw r20,16(r1) ffc06078: 92 a1 00 14 stw r21,20(r1) ffc0607c: 92 c1 00 18 stw r22,24(r1) ffc06080: 93 01 00 20 stw r24,32(r1) ffc06084: 93 21 00 24 stw r25,36(r1) ffc06088: 93 e1 00 3c stw r31,60(r1) ffc0608c: 91 81 00 08 stw r12,8(r1) struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc06090: 48 00 2d f1 bl ffc08e80 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc06094: 7c 7b 1b 79 mr. r27,r3 ffc06098: 40 82 00 90 bne- ffc06128 <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { ffc0609c: 3e a0 00 00 lis r21,0 ffc060a0: 82 d5 27 20 lwz r22,10016(r21) ffc060a4: 2e 16 00 00 cmpwi cr4,r22,0 ffc060a8: 41 92 01 0c beq- cr4,ffc061b4 ffc060ac: 7e df b3 78 mr r31,r22 ffc060b0: 48 00 00 10 b ffc060c0 ffc060b4: 83 ff 00 00 lwz r31,0(r31) ffc060b8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc060bc: 41 9e 00 f8 beq- cr7,ffc061b4 <== ALWAYS TAKEN if ((tty->major == major) && (tty->minor == minor)) ffc060c0: 80 1f 00 0c lwz r0,12(r31) ffc060c4: 7f 80 f0 00 cmpw cr7,r0,r30 ffc060c8: 40 9e ff ec bne+ cr7,ffc060b4 ffc060cc: 80 1f 00 10 lwz r0,16(r31) ffc060d0: 7f 80 e8 00 cmpw cr7,r0,r29 ffc060d4: 40 9e ff e0 bne+ cr7,ffc060b4 <== NEVER TAKEN if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { ffc060d8: 81 3f 00 08 lwz r9,8(r31) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; ffc060dc: 81 7a 00 00 lwz r11,0(r26) if (!tty->refcount++) { ffc060e0: 2f 89 00 00 cmpwi cr7,r9,0 ffc060e4: 39 29 00 01 addi r9,r9,1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; ffc060e8: 93 eb 00 38 stw r31,56(r11) if (!tty->refcount++) { ffc060ec: 91 3f 00 08 stw r9,8(r31) ffc060f0: 40 9e 00 30 bne- cr7,ffc06120 if (tty->device.firstOpen) ffc060f4: 80 1f 00 98 lwz r0,152(r31) ffc060f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc060fc: 41 9e 00 18 beq- cr7,ffc06114 <== ALWAYS TAKEN (*tty->device.firstOpen)(major, minor, arg); ffc06100: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc06104: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06108: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED ffc0610c: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED ffc06110: 4e 80 04 21 bctrl <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc06114: 80 1f 00 b4 lwz r0,180(r31) ffc06118: 2f 80 00 02 cmpwi cr7,r0,2 ffc0611c: 41 9e 00 5c beq- cr7,ffc06178 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); ffc06120: 80 7c 27 18 lwz r3,10008(r28) ffc06124: 48 00 2e e5 bl ffc09008 return RTEMS_SUCCESSFUL; } ffc06128: 80 01 00 44 lwz r0,68(r1) ffc0612c: 7f 63 db 78 mr r3,r27 ffc06130: 81 81 00 08 lwz r12,8(r1) ffc06134: 7c 08 03 a6 mtlr r0 ffc06138: 82 61 00 0c lwz r19,12(r1) ffc0613c: 82 81 00 10 lwz r20,16(r1) ffc06140: 7d 80 81 20 mtcrf 8,r12 ffc06144: 82 a1 00 14 lwz r21,20(r1) ffc06148: 82 c1 00 18 lwz r22,24(r1) ffc0614c: 82 e1 00 1c lwz r23,28(r1) ffc06150: 83 01 00 20 lwz r24,32(r1) ffc06154: 83 21 00 24 lwz r25,36(r1) ffc06158: 83 41 00 28 lwz r26,40(r1) ffc0615c: 83 61 00 2c lwz r27,44(r1) ffc06160: 83 81 00 30 lwz r28,48(r1) ffc06164: 83 a1 00 34 lwz r29,52(r1) ffc06168: 83 c1 00 38 lwz r30,56(r1) ffc0616c: 83 e1 00 3c lwz r31,60(r1) ffc06170: 38 21 00 40 addi r1,r1,64 ffc06174: 4e 80 00 20 blr /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start( ffc06178: 80 7f 00 c4 lwz r3,196(r31) ffc0617c: 3c 80 ff c0 lis r4,-64 ffc06180: 38 84 7d 78 addi r4,r4,32120 ffc06184: 7f e5 fb 78 mr r5,r31 ffc06188: 48 00 33 1d bl ffc094a4 tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) ffc0618c: 2f 83 00 00 cmpwi cr7,r3,0 ffc06190: 40 9e 02 dc bne- cr7,ffc0646c <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_start( ffc06194: 80 7f 00 c8 lwz r3,200(r31) ffc06198: 3c 80 ff c1 lis r4,-63 ffc0619c: 38 84 80 a8 addi r4,r4,-32600 ffc061a0: 7f e5 fb 78 mr r5,r31 ffc061a4: 48 00 33 01 bl ffc094a4 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) ffc061a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc061ac: 41 9e ff 74 beq+ cr7,ffc06120 <== ALWAYS TAKEN ffc061b0: 48 00 02 bc b ffc0646c <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); ffc061b4: 38 60 00 01 li r3,1 ffc061b8: 38 80 00 e8 li r4,232 ffc061bc: 4b ff e8 15 bl ffc049d0 if (tty == NULL) { ffc061c0: 2f 83 00 00 cmpwi cr7,r3,0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); ffc061c4: 7c 79 1b 78 mr r25,r3 ffc061c8: 7c 7f 1b 78 mr r31,r3 if (tty == NULL) { ffc061cc: 41 9e 02 68 beq- cr7,ffc06434 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; ffc061d0: 3f 00 00 00 lis r24,0 ffc061d4: 80 18 21 78 lwz r0,8568(r24) ffc061d8: 3b 18 21 78 addi r24,r24,8568 ffc061dc: 90 03 00 64 stw r0,100(r3) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); ffc061e0: 80 63 00 64 lwz r3,100(r3) ffc061e4: 4b ff ee b5 bl ffc05098 if (tty->rawInBuf.theBuf == NULL) { ffc061e8: 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); ffc061ec: 90 79 00 58 stw r3,88(r25) ffc061f0: 7c 74 1b 78 mr r20,r3 if (tty->rawInBuf.theBuf == NULL) { ffc061f4: 41 9e 02 38 beq- cr7,ffc0642c return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; ffc061f8: 80 18 00 04 lwz r0,4(r24) ffc061fc: 90 19 00 88 stw r0,136(r25) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); ffc06200: 80 79 00 88 lwz r3,136(r25) ffc06204: 4b ff ee 95 bl ffc05098 if (tty->rawOutBuf.theBuf == NULL) { ffc06208: 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); ffc0620c: 90 79 00 7c stw r3,124(r25) ffc06210: 7c 73 1b 78 mr r19,r3 if (tty->rawOutBuf.theBuf == NULL) { ffc06214: 41 9e 02 10 beq- cr7,ffc06424 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); ffc06218: 80 78 00 08 lwz r3,8(r24) ffc0621c: 4b ff ee 7d bl ffc05098 if (tty->cbuf == NULL) { ffc06220: 2f 83 00 00 cmpwi cr7,r3,0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); ffc06224: 90 79 00 1c stw r3,28(r25) if (tty->cbuf == NULL) { ffc06228: 41 9e 01 f4 beq- cr7,ffc0641c <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; ffc0622c: 38 00 00 00 li r0,0 tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; ffc06230: 92 d9 00 00 stw r22,0(r25) return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; ffc06234: 90 19 00 d4 stw r0,212(r25) tty->tty_snd.sw_arg = NULL; ffc06238: 90 19 00 d8 stw r0,216(r25) tty->tty_rcv.sw_pfn = NULL; ffc0623c: 90 19 00 dc stw r0,220(r25) tty->tty_rcv.sw_arg = NULL; ffc06240: 90 19 00 e0 stw r0,224(r25) tty->tty_rcvwakeup = 0; ffc06244: 90 19 00 e4 stw r0,228(r25) /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; ffc06248: 90 19 00 04 stw r0,4(r25) if (rtems_termios_ttyHead != NULL) ffc0624c: 41 92 00 08 beq- cr4,ffc06254 rtems_termios_ttyHead->back = tty; ffc06250: 93 36 00 04 stw r25,4(r22) rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) ffc06254: 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; ffc06258: 93 35 27 20 stw r25,10016(r21) if (rtems_termios_ttyTail == NULL) ffc0625c: 80 09 27 1c lwz r0,10012(r9) ffc06260: 2f 80 00 00 cmpwi cr7,r0,0 ffc06264: 41 9e 02 68 beq- cr7,ffc064cc /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), ffc06268: 88 78 00 0c lbz r3,12(r24) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc0626c: 38 80 00 01 li r4,1 ffc06270: 38 a0 00 54 li r5,84 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; ffc06274: 93 b9 00 10 stw r29,16(r25) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc06278: 64 63 54 52 oris r3,r3,21586 ffc0627c: 60 63 69 00 ori r3,r3,26880 rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; tty->major = major; ffc06280: 93 d9 00 0c stw r30,12(r25) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc06284: 38 c0 00 00 li r6,0 ffc06288: 38 f9 00 14 addi r7,r25,20 ffc0628c: 48 00 28 f5 bl ffc08b80 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) ffc06290: 2f 83 00 00 cmpwi cr7,r3,0 ffc06294: 40 9e 01 d8 bne- cr7,ffc0646c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'o', c), ffc06298: 88 78 00 0c lbz r3,12(r24) 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 ( ffc0629c: 38 80 00 01 li r4,1 ffc062a0: 38 a0 00 54 li r5,84 ffc062a4: 64 63 54 52 oris r3,r3,21586 ffc062a8: 60 63 6f 00 ori r3,r3,28416 ffc062ac: 38 c0 00 00 li r6,0 ffc062b0: 38 f9 00 18 addi r7,r25,24 ffc062b4: 48 00 28 cd bl ffc08b80 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) ffc062b8: 2f 83 00 00 cmpwi cr7,r3,0 ffc062bc: 40 9e 01 b0 bne- cr7,ffc0646c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'x', c), ffc062c0: 88 78 00 0c lbz r3,12(r24) 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 ( ffc062c4: 38 80 00 00 li r4,0 ffc062c8: 38 a0 00 20 li r5,32 ffc062cc: 64 63 54 52 oris r3,r3,21586 ffc062d0: 60 63 78 00 ori r3,r3,30720 ffc062d4: 38 c0 00 00 li r6,0 ffc062d8: 38 f9 00 8c addi r7,r25,140 ffc062dc: 48 00 28 a5 bl ffc08b80 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) ffc062e0: 7c 60 1b 79 mr. r0,r3 ffc062e4: 40 82 01 88 bne- ffc0646c tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; ffc062e8: 81 37 00 1c lwz r9,28(r23) ffc062ec: 80 97 00 00 lwz r4,0(r23) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc062f0: 2f 89 00 02 cmpwi cr7,r9,2 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; ffc062f4: 80 b7 00 04 lwz r5,4(r23) ffc062f8: 80 d7 00 08 lwz r6,8(r23) ffc062fc: 80 f7 00 0c lwz r7,12(r23) ffc06300: 81 17 00 10 lwz r8,16(r23) ffc06304: 81 57 00 14 lwz r10,20(r23) ffc06308: 81 77 00 18 lwz r11,24(r23) 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; ffc0630c: 90 19 00 94 stw r0,148(r25) /* * Set callbacks */ tty->device = *callbacks; ffc06310: 90 99 00 98 stw r4,152(r25) ffc06314: 90 b9 00 9c stw r5,156(r25) ffc06318: 90 d9 00 a0 stw r6,160(r25) ffc0631c: 90 f9 00 a4 stw r7,164(r25) ffc06320: 91 19 00 a8 stw r8,168(r25) ffc06324: 91 59 00 ac stw r10,172(r25) ffc06328: 91 79 00 b0 stw r11,176(r25) ffc0632c: 91 39 00 b4 stw r9,180(r25) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc06330: 41 9e 01 40 beq- cr7,ffc06470 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || ffc06334: 80 19 00 a0 lwz r0,160(r25) ffc06338: 2f 80 00 00 cmpwi cr7,r0,0 ffc0633c: 41 9e 01 08 beq- cr7,ffc06444 ffc06340: 80 19 00 b4 lwz r0,180(r25) ffc06344: 2f 80 00 02 cmpwi cr7,r0,2 ffc06348: 41 9e 00 fc beq- cr7,ffc06444 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; ffc0634c: 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') ffc06350: 89 38 00 0c lbz r9,12(r24) } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; ffc06354: 91 19 00 30 stw r8,48(r25) tty->termios.c_oflag = OPOST | ONLCR | XTABS; ffc06358: 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; ffc0635c: 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; ffc06360: 91 19 00 34 stw r8,52(r25) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; ffc06364: 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') ffc06368: 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; ffc0636c: 90 19 00 b8 stw r0,184(r25) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc06370: 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; ffc06374: 91 19 00 38 stw r8,56(r25) tty->termios.c_lflag = ffc06378: 39 00 00 00 li r8,0 ffc0637c: 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'; ffc06380: 98 19 00 4c stb r0,76(r25) tty->termios.c_cc[VEOL2] = '\000'; ffc06384: 98 19 00 51 stb r0,81(r25) tty->termios.c_cc[VSTART] = '\021'; ffc06388: 38 00 00 11 li r0,17 ffc0638c: 98 19 00 49 stb r0,73(r25) tty->termios.c_cc[VSTOP] = '\023'; ffc06390: 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; ffc06394: 81 59 00 64 lwz r10,100(r25) * 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 = ffc06398: 91 19 00 3c stw r8,60(r25) ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; ffc0639c: 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; ffc063a0: 55 4a f8 7e rlwinm r10,r10,31,1,31 tty->highwater = tty->rawInBuf.Size * 3/4; ffc063a4: 81 79 00 64 lwz r11,100(r25) 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'; ffc063a8: 98 19 00 4a stb r0,74(r25) tty->termios.c_cc[VSUSP] = '\032'; ffc063ac: 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; ffc063b0: 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'; ffc063b4: 99 19 00 41 stb r8,65(r25) tty->termios.c_cc[VQUIT] = '\034'; ffc063b8: 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'; ffc063bc: 98 19 00 4b stb r0,75(r25) tty->termios.c_cc[VREPRINT] = '\022'; ffc063c0: 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; ffc063c4: 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'; ffc063c8: 99 19 00 42 stb r8,66(r25) tty->termios.c_cc[VERASE] = '\177'; ffc063cc: 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'; ffc063d0: 98 19 00 4d stb r0,77(r25) tty->termios.c_cc[VDISCARD] = '\017'; ffc063d4: 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'; ffc063d8: 99 19 00 43 stb r8,67(r25) tty->termios.c_cc[VKILL] = '\025'; ffc063dc: 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'; ffc063e0: 98 19 00 4e stb r0,78(r25) tty->termios.c_cc[VWERASE] = '\027'; ffc063e4: 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'; ffc063e8: 99 19 00 44 stb r8,68(r25) tty->termios.c_cc[VEOF] = '\004'; ffc063ec: 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'; ffc063f0: 98 19 00 4f stb r0,79(r25) tty->termios.c_cc[VLNEXT] = '\026'; ffc063f4: 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'; ffc063f8: 99 19 00 45 stb r8,69(r25) 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'; ffc063fc: 98 19 00 50 stb r0,80(r25) /* 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; ffc06400: 91 59 00 bc stw r10,188(r25) tty->highwater = tty->rawInBuf.Size * 3/4; ffc06404: 91 79 00 c0 stw r11,192(r25) /* * Bump name characer */ if (c++ == 'z') ffc06408: 99 38 00 0c stb r9,12(r24) ffc0640c: 40 9e fc cc bne+ cr7,ffc060d8 c = 'a'; ffc06410: 38 00 00 61 li r0,97 ffc06414: 98 18 00 0c stb r0,12(r24) ffc06418: 4b ff fc c0 b ffc060d8 /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); ffc0641c: 7e 63 9b 78 mr r3,r19 <== NOT EXECUTED ffc06420: 4b ff e8 5d bl ffc04c7c <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); ffc06424: 7e 83 a3 78 mr r3,r20 ffc06428: 4b ff e8 55 bl ffc04c7c free(tty); ffc0642c: 7f 23 cb 78 mr r3,r25 ffc06430: 4b ff e8 4d bl ffc04c7c rtems_semaphore_release (rtems_termios_ttyMutex); ffc06434: 80 7c 27 18 lwz r3,10008(r28) return RTEMS_NO_MEMORY; ffc06438: 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); ffc0643c: 48 00 2b cd bl ffc09008 return RTEMS_NO_MEMORY; ffc06440: 4b ff fc e8 b ffc06128 } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'r', c), ffc06444: 88 78 00 0c lbz r3,12(r24) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( ffc06448: 38 80 00 00 li r4,0 ffc0644c: 38 a0 00 24 li r5,36 ffc06450: 64 63 54 52 oris r3,r3,21586 ffc06454: 60 63 72 00 ori r3,r3,29184 ffc06458: 38 c0 00 00 li r6,0 ffc0645c: 38 f9 00 68 addi r7,r25,104 ffc06460: 48 00 27 21 bl ffc08b80 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) ffc06464: 2f 83 00 00 cmpwi cr7,r3,0 ffc06468: 41 9e fe e4 beq+ cr7,ffc0634c <== 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); ffc0646c: 48 00 33 9d bl ffc09808 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( rtems_build_name ('T', 'x', 'T', c), ffc06470: 88 78 00 0c lbz r3,12(r24) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( ffc06474: 38 80 00 0a li r4,10 ffc06478: 38 a0 04 00 li r5,1024 ffc0647c: 64 63 54 78 oris r3,r3,21624 ffc06480: 60 63 54 00 ori r3,r3,21504 ffc06484: 38 c0 05 00 li r6,1280 ffc06488: 38 e0 00 00 li r7,0 ffc0648c: 39 19 00 c8 addi r8,r25,200 ffc06490: 48 00 2c 65 bl ffc090f4 TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) ffc06494: 2f 83 00 00 cmpwi cr7,r3,0 ffc06498: 40 be ff d4 bne- cr7,ffc0646c <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_create ( rtems_build_name ('R', 'x', 'T', c), ffc0649c: 88 78 00 0c lbz r3,12(r24) RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_task_create ( ffc064a0: 38 80 00 09 li r4,9 ffc064a4: 38 a0 04 00 li r5,1024 ffc064a8: 64 63 52 78 oris r3,r3,21112 ffc064ac: 60 63 54 00 ori r3,r3,21504 ffc064b0: 38 c0 05 00 li r6,1280 ffc064b4: 38 e0 00 00 li r7,0 ffc064b8: 39 19 00 c4 addi r8,r25,196 ffc064bc: 48 00 2c 39 bl ffc090f4 TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) ffc064c0: 2f 83 00 00 cmpwi cr7,r3,0 ffc064c4: 41 9e fe 70 beq+ cr7,ffc06334 <== ALWAYS TAKEN ffc064c8: 4b ff ff a4 b ffc0646c <== 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; ffc064cc: 93 29 27 1c stw r25,10012(r9) ffc064d0: 4b ff fd 98 b ffc06268 =============================================================================== ffc06b24 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { ffc06b24: 94 21 ff d0 stwu r1,-48(r1) ffc06b28: 7c 08 02 a6 mflr r0 ffc06b2c: 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) { ffc06b30: 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) { ffc06b34: 93 41 00 18 stw r26,24(r1) ffc06b38: 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) { ffc06b3c: 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) { ffc06b40: 93 e1 00 2c stw r31,44(r1) ffc06b44: 7c bf 2b 78 mr r31,r5 ffc06b48: 93 21 00 14 stw r25,20(r1) ffc06b4c: 93 61 00 1c stw r27,28(r1) ffc06b50: 93 81 00 20 stw r28,32(r1) ffc06b54: 93 a1 00 24 stw r29,36(r1) ffc06b58: 93 c1 00 28 stw r30,40(r1) ffc06b5c: 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) { ffc06b60: 41 9e 01 2c beq- cr7,ffc06c8c (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { ffc06b64: 80 01 00 08 lwz r0,8(r1) if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; ffc06b68: 83 65 00 80 lwz r27,128(r5) while (len) { ffc06b6c: 2f 80 00 00 cmpwi cr7,r0,0 ffc06b70: 41 9e 00 cc beq- cr7,ffc06c3c <== NEVER TAKEN /* * Send characters to device-specific code */ void rtems_termios_puts ( ffc06b74: 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; ffc06b78: 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; ffc06b7c: 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; ffc06b80: 80 1f 00 88 lwz r0,136(r31) ffc06b84: 3b 7b 00 01 addi r27,r27,1 ffc06b88: 7d 3b 03 96 divwu r9,r27,r0 ffc06b8c: 7c 09 01 d6 mullw r0,r9,r0 ffc06b90: 7f 60 d8 50 subf r27,r0,r27 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc06b94: 7f c0 00 a6 mfmsr r30 ffc06b98: 7c 10 42 a6 mfsprg r0,0 ffc06b9c: 7f c0 00 78 andc r0,r30,r0 ffc06ba0: 7c 00 01 24 mtmsr r0 rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { ffc06ba4: 83 bf 00 84 lwz r29,132(r31) ffc06ba8: 7f 9d d8 00 cmpw cr7,r29,r27 ffc06bac: 40 9e 00 40 bne- cr7,ffc06bec tty->rawOutBufState = rob_wait; ffc06bb0: 93 9f 00 94 stw r28,148(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc06bb4: 7f c0 01 24 mtmsr r30 rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( ffc06bb8: 80 7f 00 8c lwz r3,140(r31) ffc06bbc: 38 80 00 00 li r4,0 ffc06bc0: 38 a0 00 00 li r5,0 ffc06bc4: 48 00 22 bd bl ffc08e80 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc06bc8: 2f 83 00 00 cmpwi cr7,r3,0 ffc06bcc: 40 9e 00 dc bne- cr7,ffc06ca8 <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc06bd0: 7f c0 00 a6 mfmsr r30 ffc06bd4: 7c 10 42 a6 mfsprg r0,0 ffc06bd8: 7f c0 00 78 andc r0,r30,r0 ffc06bdc: 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) { ffc06be0: 80 1f 00 84 lwz r0,132(r31) ffc06be4: 7f 80 e8 00 cmpw cr7,r0,r29 ffc06be8: 41 9e ff c8 beq+ cr7,ffc06bb0 <== 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++; ffc06bec: 80 1f 00 80 lwz r0,128(r31) ffc06bf0: 8d 7a 00 01 lbzu r11,1(r26) ffc06bf4: 81 3f 00 7c lwz r9,124(r31) ffc06bf8: 7d 69 01 ae stbx r11,r9,r0 tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { ffc06bfc: 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; ffc06c00: 93 7f 00 80 stw r27,128(r31) if (tty->rawOutBufState == rob_idle) { ffc06c04: 2f 80 00 00 cmpwi cr7,r0,0 ffc06c08: 40 9e 00 20 bne- cr7,ffc06c28 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { ffc06c0c: 80 1f 00 b8 lwz r0,184(r31) ffc06c10: 70 09 00 10 andi. r9,r0,16 ffc06c14: 41 82 00 54 beq- ffc06c68 <== 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; ffc06c18: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06c1c: 60 00 00 20 ori r0,r0,32 <== NOT EXECUTED ffc06c20: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; ffc06c24: 93 3f 00 94 stw r25,148(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc06c28: 7f c0 01 24 mtmsr r30 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { ffc06c2c: 80 01 00 08 lwz r0,8(r1) ffc06c30: 35 20 ff ff addic. r9,r0,-1 ffc06c34: 91 21 00 08 stw r9,8(r1) ffc06c38: 40 82 ff 48 bne+ ffc06b80 tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } ffc06c3c: 80 01 00 34 lwz r0,52(r1) ffc06c40: 83 21 00 14 lwz r25,20(r1) ffc06c44: 7c 08 03 a6 mtlr r0 ffc06c48: 83 41 00 18 lwz r26,24(r1) ffc06c4c: 83 61 00 1c lwz r27,28(r1) ffc06c50: 83 81 00 20 lwz r28,32(r1) ffc06c54: 83 a1 00 24 lwz r29,36(r1) ffc06c58: 83 c1 00 28 lwz r30,40(r1) ffc06c5c: 83 e1 00 2c lwz r31,44(r1) ffc06c60: 38 21 00 30 addi r1,r1,48 ffc06c64: 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); ffc06c68: 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, ffc06c6c: 38 a0 00 01 li r5,1 ffc06c70: 80 9f 00 7c lwz r4,124(r31) ffc06c74: 80 1f 00 a4 lwz r0,164(r31) ffc06c78: 80 7f 00 10 lwz r3,16(r31) ffc06c7c: 7c 84 4a 14 add r4,r4,r9 ffc06c80: 7c 09 03 a6 mtctr r0 ffc06c84: 4e 80 04 21 bctrl ffc06c88: 4b ff ff 9c b ffc06c24 unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); ffc06c8c: 80 05 00 a4 lwz r0,164(r5) ffc06c90: 7f 44 d3 78 mr r4,r26 ffc06c94: 80 65 00 10 lwz r3,16(r5) ffc06c98: 7c 09 03 a6 mtctr r0 ffc06c9c: 80 a1 00 08 lwz r5,8(r1) ffc06ca0: 4e 80 04 21 bctrl return; ffc06ca4: 4b ff ff 98 b ffc06c3c 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); ffc06ca8: 48 00 2b 61 bl ffc09808 <== NOT EXECUTED =============================================================================== ffc07534 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07534: 94 21 ff d0 stwu r1,-48(r1) ffc07538: 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); ffc0753c: 38 80 00 00 li r4,0 return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07540: 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); ffc07544: 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; ffc07548: 81 23 00 00 lwz r9,0(r3) return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc0754c: 93 e1 00 2c stw r31,44(r1) rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc07550: 83 e9 00 38 lwz r31,56(r9) return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07554: 93 41 00 18 stw r26,24(r1) ffc07558: 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); ffc0755c: 80 7f 00 14 lwz r3,20(r31) return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07560: 93 01 00 10 stw r24,16(r1) ffc07564: 93 21 00 14 stw r25,20(r1) ffc07568: 93 61 00 1c stw r27,28(r1) ffc0756c: 92 c1 00 08 stw r22,8(r1) ffc07570: 92 e1 00 0c stw r23,12(r1) ffc07574: 93 81 00 20 stw r28,32(r1) ffc07578: 93 a1 00 24 stw r29,36(r1) ffc0757c: 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; ffc07580: 83 7a 00 14 lwz r27,20(r26) char *buffer = args->buffer; ffc07584: 83 1a 00 10 lwz r24,16(r26) rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07588: 48 00 18 f9 bl ffc08e80 if (sc != RTEMS_SUCCESSFUL) ffc0758c: 7c 79 1b 79 mr. r25,r3 ffc07590: 40 82 00 48 bne- ffc075d8 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { ffc07594: 80 1f 00 cc lwz r0,204(r31) ffc07598: 3d 20 00 00 lis r9,0 ffc0759c: 39 29 27 d4 addi r9,r9,10196 ffc075a0: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc075a4: 7d 29 02 14 add r9,r9,r0 ffc075a8: 80 09 00 08 lwz r0,8(r9) ffc075ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc075b0: 41 9e 00 64 beq- cr7,ffc07614 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); ffc075b4: 7c 09 03 a6 mtctr r0 ffc075b8: 7f e3 fb 78 mr r3,r31 ffc075bc: 7f 44 d3 78 mr r4,r26 ffc075c0: 4e 80 04 21 bctrl tty->tty_rcvwakeup = 0; ffc075c4: 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); ffc075c8: 7c 79 1b 78 mr r25,r3 tty->tty_rcvwakeup = 0; ffc075cc: 90 1f 00 e4 stw r0,228(r31) rtems_semaphore_release (tty->isem); ffc075d0: 80 7f 00 14 lwz r3,20(r31) ffc075d4: 48 00 1a 35 bl ffc09008 } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } ffc075d8: 80 01 00 34 lwz r0,52(r1) ffc075dc: 7f 23 cb 78 mr r3,r25 ffc075e0: 82 c1 00 08 lwz r22,8(r1) ffc075e4: 7c 08 03 a6 mtlr r0 ffc075e8: 82 e1 00 0c lwz r23,12(r1) ffc075ec: 83 01 00 10 lwz r24,16(r1) ffc075f0: 83 21 00 14 lwz r25,20(r1) ffc075f4: 83 41 00 18 lwz r26,24(r1) ffc075f8: 83 61 00 1c lwz r27,28(r1) ffc075fc: 83 81 00 20 lwz r28,32(r1) ffc07600: 83 a1 00 24 lwz r29,36(r1) ffc07604: 83 c1 00 28 lwz r30,40(r1) ffc07608: 83 e1 00 2c lwz r31,44(r1) ffc0760c: 38 21 00 30 addi r1,r1,48 ffc07610: 4e 80 00 20 blr tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { ffc07614: 81 3f 00 24 lwz r9,36(r31) ffc07618: 80 1f 00 20 lwz r0,32(r31) ffc0761c: 7f 89 00 00 cmpw cr7,r9,r0 ffc07620: 41 9e 00 a8 beq- cr7,ffc076c8 <== ALWAYS TAKEN sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { ffc07624: 2f 9b 00 00 cmpwi cr7,r27,0 ffc07628: 41 9e 00 48 beq- cr7,ffc07670 <== NEVER TAKEN ffc0762c: 81 3f 00 24 lwz r9,36(r31) ffc07630: 80 1f 00 20 lwz r0,32(r31) ffc07634: 7f 89 00 00 cmpw cr7,r9,r0 ffc07638: 40 9c 00 38 bge- cr7,ffc07670 <== NEVER TAKEN } return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) ffc0763c: 3b 18 ff ff addi r24,r24,-1 ffc07640: 7f 69 03 a6 mtctr r27 ffc07644: 48 00 00 10 b ffc07654 sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { ffc07648: 80 1f 00 20 lwz r0,32(r31) ffc0764c: 7f 80 48 00 cmpw cr7,r0,r9 ffc07650: 40 9d 00 20 ble- cr7,ffc07670 *buffer++ = tty->cbuf[tty->cindex++]; ffc07654: 81 7f 00 1c lwz r11,28(r31) count--; ffc07658: 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++]; ffc0765c: 7c 0b 48 ae lbzx r0,r11,r9 ffc07660: 39 29 00 01 addi r9,r9,1 ffc07664: 9c 18 00 01 stbu r0,1(r24) ffc07668: 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)) { ffc0766c: 42 00 ff dc bdnz+ ffc07648 *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; ffc07670: 80 1a 00 14 lwz r0,20(r26) tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); ffc07674: 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; ffc07678: 7f 7b 00 50 subf r27,r27,r0 tty->tty_rcvwakeup = 0; ffc0767c: 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; ffc07680: 93 7a 00 1c stw r27,28(r26) tty->tty_rcvwakeup = 0; ffc07684: 90 1f 00 e4 stw r0,228(r31) rtems_semaphore_release (tty->isem); ffc07688: 48 00 19 81 bl ffc09008 return sc; } ffc0768c: 80 01 00 34 lwz r0,52(r1) ffc07690: 7f 23 cb 78 mr r3,r25 ffc07694: 82 c1 00 08 lwz r22,8(r1) ffc07698: 7c 08 03 a6 mtlr r0 ffc0769c: 82 e1 00 0c lwz r23,12(r1) ffc076a0: 83 01 00 10 lwz r24,16(r1) ffc076a4: 83 21 00 14 lwz r25,20(r1) ffc076a8: 83 41 00 18 lwz r26,24(r1) ffc076ac: 83 61 00 1c lwz r27,28(r1) ffc076b0: 83 81 00 20 lwz r28,32(r1) ffc076b4: 83 a1 00 24 lwz r29,36(r1) ffc076b8: 83 c1 00 28 lwz r30,40(r1) ffc076bc: 83 e1 00 2c lwz r31,44(r1) ffc076c0: 38 21 00 30 addi r1,r1,48 ffc076c4: 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 && ffc076c8: 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; ffc076cc: 81 3f 00 28 lwz r9,40(r31) if (tty->device.pollRead != NULL && ffc076d0: 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; ffc076d4: 93 3f 00 20 stw r25,32(r31) ffc076d8: 93 3f 00 24 stw r25,36(r31) tty->read_start_column = tty->column; ffc076dc: 91 3f 00 2c stw r9,44(r31) if (tty->device.pollRead != NULL && ffc076e0: 41 9e 00 10 beq- cr7,ffc076f0 ffc076e4: 81 3f 00 b4 lwz r9,180(r31) ffc076e8: 2f 89 00 00 cmpwi cr7,r9,0 ffc076ec: 41 9e 01 bc beq- cr7,ffc078a8 * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; ffc076f0: 83 bf 00 74 lwz r29,116(r31) rtems_status_code sc; int wait = (int)1; ffc076f4: 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))) { ffc076f8: 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)( ffc076fc: 3a df 00 49 addi r22,r31,73 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07700: 81 3f 00 5c lwz r9,92(r31) ffc07704: 80 1f 00 60 lwz r0,96(r31) ffc07708: 7f 89 00 00 cmpw cr7,r9,r0 ffc0770c: 41 9e 01 44 beq- cr7,ffc07850 (tty->ccount < (CBUFSIZE-1))) { ffc07710: 3b 97 21 78 addi r28,r23,8568 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07714: 80 1f 00 20 lwz r0,32(r31) (tty->ccount < (CBUFSIZE-1))) { ffc07718: 81 3c 00 08 lwz r9,8(r28) ffc0771c: 39 29 ff ff addi r9,r9,-1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07720: 7f 89 00 00 cmpw cr7,r9,r0 ffc07724: 41 bd 00 48 bgt+ cr7,ffc0776c <== ALWAYS TAKEN ffc07728: 48 00 01 28 b ffc07850 <== NOT EXECUTED } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) ffc0772c: 7f a3 eb 78 mr r3,r29 ffc07730: 7f e4 fb 78 mr r4,r31 ffc07734: 4b ff fc 41 bl ffc07374 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07738: 81 3f 00 5c lwz r9,92(r31) ffc0773c: 80 1f 00 60 lwz r0,96(r31) } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; ffc07740: 30 63 ff ff addic r3,r3,-1 ffc07744: 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; ffc07748: 83 bf 00 70 lwz r29,112(r31) while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc0774c: 7f 89 00 00 cmpw cr7,r9,r0 } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; ffc07750: 7f de 18 38 and r30,r30,r3 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07754: 41 9e 00 fc beq- cr7,ffc07850 (tty->ccount < (CBUFSIZE-1))) { ffc07758: 81 7c 00 08 lwz r11,8(r28) while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc0775c: 81 3f 00 20 lwz r9,32(r31) (tty->ccount < (CBUFSIZE-1))) { ffc07760: 38 0b ff ff addi r0,r11,-1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07764: 7f 89 00 00 cmpw cr7,r9,r0 ffc07768: 40 9c 00 e8 bge- cr7,ffc07850 <== NEVER TAKEN (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; ffc0776c: 81 3f 00 5c lwz r9,92(r31) ffc07770: 81 7f 00 64 lwz r11,100(r31) ffc07774: 39 29 00 01 addi r9,r9,1 c = tty->rawInBuf.theBuf[newHead]; ffc07778: 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; ffc0777c: 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) ffc07780: 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; ffc07784: 7c 00 59 d6 mullw r0,r0,r11 ffc07788: 7c 00 48 50 subf r0,r0,r9 c = tty->rawInBuf.theBuf[newHead]; ffc0778c: 7f a8 00 ae lbzx r29,r8,r0 tty->rawInBuf.Head = newHead; ffc07790: 90 1f 00 5c stw r0,92(r31) if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) ffc07794: 81 7f 00 60 lwz r11,96(r31) ffc07798: 81 1f 00 64 lwz r8,100(r31) % tty->rawInBuf.Size) ffc0779c: 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) ffc077a0: 7d 68 5a 14 add r11,r8,r11 ffc077a4: 7c 00 58 50 subf r0,r0,r11 % tty->rawInBuf.Size) ffc077a8: 7d 60 4b 96 divwu r11,r0,r9 ffc077ac: 7d 2b 49 d6 mullw r9,r11,r9 ffc077b0: 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) ffc077b4: 7f 80 50 40 cmplw cr7,r0,r10 ffc077b8: 40 9c 00 50 bge- cr7,ffc07808 <== NEVER TAKEN % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; ffc077bc: 80 1f 00 b8 lwz r0,184(r31) ffc077c0: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc077c4: 90 1f 00 b8 stw r0,184(r31) /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) ffc077c8: 80 1f 00 b8 lwz r0,184(r31) ffc077cc: 70 00 02 02 andi. r0,r0,514 ffc077d0: 2f 80 02 02 cmpwi cr7,r0,514 ffc077d4: 41 9e 00 a0 beq- cr7,ffc07874 <== 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) { ffc077d8: 80 1f 00 b8 lwz r0,184(r31) ffc077dc: 70 09 01 00 andi. r9,r0,256 ffc077e0: 41 82 00 28 beq- ffc07808 <== ALWAYS TAKEN tty->flow_ctrl &= ~FL_IRTSOFF; /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { ffc077e4: 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; ffc077e8: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { ffc077ec: 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; ffc077f0: 55 29 07 b8 rlwinm r9,r9,0,30,28 <== NOT EXECUTED ffc077f4: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { ffc077f8: 41 9e 00 10 beq- cr7,ffc07808 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); ffc077fc: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc07800: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07804: 4e 80 04 21 bctrl <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { ffc07808: 80 1f 00 3c lwz r0,60(r31) ffc0780c: 70 09 00 02 andi. r9,r0,2 ffc07810: 40 a2 ff 1c bne- ffc0772c <== ALWAYS TAKEN if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); ffc07814: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc07818: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc0781c: 4b ff fb 59 bl ffc07374 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) ffc07820: 88 1f 00 47 lbz r0,71(r31) <== NOT EXECUTED ffc07824: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; ffc07828: 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; ffc0782c: 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) && ffc07830: 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; ffc07834: 7c 00 00 26 mfcr r0 <== NOT EXECUTED ffc07838: 54 00 ef fe rlwinm r0,r0,29,31,31 <== NOT EXECUTED ffc0783c: 7c 00 00 d0 neg r0,r0 <== NOT EXECUTED ffc07840: 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) && ffc07844: 80 1f 00 60 lwz r0,96(r31) <== NOT EXECUTED ffc07848: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc0784c: 40 9e ff 0c bne+ cr7,ffc07758 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { ffc07850: 2f 9e 00 00 cmpwi cr7,r30,0 ffc07854: 41 9e fd d0 beq+ cr7,ffc07624 sc = rtems_semaphore_obtain( ffc07858: 80 7f 00 68 lwz r3,104(r31) ffc0785c: 7f a5 eb 78 mr r5,r29 ffc07860: 80 9f 00 6c lwz r4,108(r31) ffc07864: 48 00 16 1d bl ffc08e80 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) ffc07868: 2f 83 00 00 cmpwi cr7,r3,0 ffc0786c: 41 9e fe 94 beq+ cr7,ffc07700 <== ALWAYS TAKEN ffc07870: 4b ff fd b4 b ffc07624 <== 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) ffc07874: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED ffc07878: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0787c: 41 9e 00 10 beq- cr7,ffc0788c <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { ffc07880: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07884: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc07888: 41 a2 ff 50 beq- ffc077d8 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( ffc0788c: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc07890: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED ffc07894: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc07898: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc0789c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc078a0: 4e 80 04 21 bctrl <== NOT EXECUTED ffc078a4: 4b ff ff 64 b ffc07808 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { ffc078a8: 81 3f 00 3c lwz r9,60(r31) ffc078ac: 71 2b 00 02 andi. r11,r9,2 ffc078b0: 41 82 00 34 beq- ffc078e4 for (;;) { n = (*tty->device.pollRead)(tty->minor); ffc078b4: 80 7f 00 10 lwz r3,16(r31) ffc078b8: 7c 09 03 a6 mtctr r0 ffc078bc: 4e 80 04 21 bctrl if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) ffc078c0: 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) { ffc078c4: 2c 03 00 00 cmpwi r3,0 rtems_task_wake_after (1); } else { if (siproc (n, tty)) ffc078c8: 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) { ffc078cc: 41 80 00 c0 blt- ffc0798c rtems_task_wake_after (1); } else { if (siproc (n, tty)) ffc078d0: 4b ff fa a5 bl ffc07374 ffc078d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc078d8: 40 be fd 4c bne- cr7,ffc07624 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { ffc078dc: 80 1f 00 a0 lwz r0,160(r31) ffc078e0: 4b ff ff d4 b ffc078b4 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); ffc078e4: 48 00 0d 6d bl ffc08650 ffc078e8: 7c 7e 1b 78 mr r30,r3 for (;;) { n = (*tty->device.pollRead)(tty->minor); ffc078ec: 80 1f 00 a0 lwz r0,160(r31) ffc078f0: 80 7f 00 10 lwz r3,16(r31) ffc078f4: 7c 09 03 a6 mtctr r0 ffc078f8: 4e 80 04 21 bctrl if (n < 0) { ffc078fc: 2c 03 00 00 cmpwi r3,0 ffc07900: 41 80 00 38 blt- ffc07938 break; } } rtems_task_wake_after (1); } else { siproc (n, tty); ffc07904: 54 63 06 3e clrlwi r3,r3,24 ffc07908: 7f e4 fb 78 mr r4,r31 ffc0790c: 4b ff fa 69 bl ffc07374 if (tty->ccount >= tty->termios.c_cc[VMIN]) ffc07910: 88 1f 00 47 lbz r0,71(r31) ffc07914: 81 3f 00 20 lwz r9,32(r31) ffc07918: 7f 89 00 00 cmpw cr7,r9,r0 ffc0791c: 40 bc fd 08 bge- cr7,ffc07624 <== NEVER TAKEN break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) ffc07920: 2f 80 00 00 cmpwi cr7,r0,0 ffc07924: 41 be ff c8 beq- cr7,ffc078ec <== NEVER TAKEN ffc07928: 88 1f 00 46 lbz r0,70(r31) ffc0792c: 2f 80 00 00 cmpwi cr7,r0,0 ffc07930: 41 9e ff bc beq+ cr7,ffc078ec <== NEVER TAKEN ffc07934: 4b ff ff b0 b ffc078e4 then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { ffc07938: 88 1f 00 47 lbz r0,71(r31) ffc0793c: 2f 80 00 00 cmpwi cr7,r0,0 ffc07940: 41 9e 00 28 beq- cr7,ffc07968 <== NEVER TAKEN if (tty->termios.c_cc[VTIME] && tty->ccount) { ffc07944: 88 1f 00 46 lbz r0,70(r31) ffc07948: 2f 80 00 00 cmpwi cr7,r0,0 ffc0794c: 41 9e 00 10 beq- cr7,ffc0795c <== NEVER TAKEN ffc07950: 80 1f 00 20 lwz r0,32(r31) ffc07954: 2f 80 00 00 cmpwi cr7,r0,0 ffc07958: 40 9e 00 1c bne- cr7,ffc07974 now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); ffc0795c: 38 60 00 01 li r3,1 ffc07960: 48 00 1c 75 bl ffc095d4 ffc07964: 4b ff ff 88 b ffc078ec if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) ffc07968: 88 1f 00 46 lbz r0,70(r31) <== NOT EXECUTED ffc0796c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07970: 41 be fc b4 beq- cr7,ffc07624 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); ffc07974: 48 00 0c dd bl ffc08650 if ((now - then) > tty->vtimeTicks) { ffc07978: 80 1f 00 54 lwz r0,84(r31) ffc0797c: 7c 7e 18 50 subf r3,r30,r3 ffc07980: 7f 83 00 40 cmplw cr7,r3,r0 ffc07984: 40 9d ff d8 ble+ cr7,ffc0795c ffc07988: 4b ff fc 9c b ffc07624 if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); ffc0798c: 38 60 00 01 li r3,1 ffc07990: 48 00 1c 45 bl ffc095d4 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { ffc07994: 80 1f 00 a0 lwz r0,160(r31) ffc07998: 4b ff ff 1c b ffc078b4 =============================================================================== ffc07e20 : * 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) { ffc07e20: 94 21 ff e8 stwu r1,-24(r1) ffc07e24: 7c 08 02 a6 mflr r0 ffc07e28: 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)) ffc07e2c: 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) { ffc07e30: 93 e1 00 14 stw r31,20(r1) ffc07e34: 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)) ffc07e38: 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) { ffc07e3c: 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)) ffc07e40: 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) { ffc07e44: 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)) ffc07e48: 41 9e 01 5c beq- cr7,ffc07fa4 <== NEVER TAKEN tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { ffc07e4c: 80 03 00 b8 lwz r0,184(r3) ffc07e50: 54 00 07 be clrlwi r0,r0,30 ffc07e54: 2f 80 00 02 cmpwi cr7,r0,2 ffc07e58: 41 9e 01 b4 beq- cr7,ffc0800c <== NEVER TAKEN tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { ffc07e5c: 81 23 00 80 lwz r9,128(r3) ffc07e60: 80 03 00 84 lwz r0,132(r3) ffc07e64: 7f 89 00 00 cmpw cr7,r9,r0 ffc07e68: 41 9e 00 d8 beq- cr7,ffc07f40 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07e6c: 7c 00 00 a6 mfmsr r0 ffc07e70: 7d 30 42 a6 mfsprg r9,0 ffc07e74: 7c 09 48 78 andc r9,r0,r9 ffc07e78: 7d 20 01 24 mtmsr r9 return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; ffc07e7c: 39 20 00 00 li r9,0 } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; ffc07e80: 83 c3 00 90 lwz r30,144(r3) tty->t_dqlen = 0; ffc07e84: 91 23 00 90 stw r9,144(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc07e88: 7c 00 01 24 mtmsr r0 rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; ffc07e8c: 80 03 00 84 lwz r0,132(r3) ffc07e90: 81 23 00 88 lwz r9,136(r3) ffc07e94: 7c 1e 02 14 add r0,r30,r0 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { ffc07e98: 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; ffc07e9c: 7f c0 4b 96 divwu r30,r0,r9 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { ffc07ea0: 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; ffc07ea4: 7f de 49 d6 mullw r30,r30,r9 ffc07ea8: 7f de 00 50 subf r30,r30,r0 tty->rawOutBuf.Tail = newTail; ffc07eac: 93 c3 00 84 stw r30,132(r3) if (tty->rawOutBufState == rob_wait) { ffc07eb0: 41 9e 00 e8 beq- cr7,ffc07f98 * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { ffc07eb4: 80 1f 00 80 lwz r0,128(r31) ffc07eb8: 7f 80 f0 00 cmpw cr7,r0,r30 ffc07ebc: 41 9e 00 a0 beq- cr7,ffc07f5c 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)) ffc07ec0: 80 1f 00 b8 lwz r0,184(r31) ffc07ec4: 70 00 02 10 andi. r0,r0,528 ffc07ec8: 2f 80 02 10 cmpwi cr7,r0,528 ffc07ecc: 41 9e 01 a8 beq- cr7,ffc08074 <== NEVER TAKEN nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) ffc07ed0: 80 1f 00 80 lwz r0,128(r31) ffc07ed4: 7f 9e 00 40 cmplw cr7,r30,r0 ffc07ed8: 41 9d 00 b4 bgt- cr7,ffc07f8c nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; ffc07edc: 83 bf 00 80 lwz r29,128(r31) ffc07ee0: 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)) { ffc07ee4: 80 1f 00 b8 lwz r0,184(r31) ffc07ee8: 7f a5 eb 78 mr r5,r29 ffc07eec: 70 09 06 00 andi. r9,r0,1536 ffc07ef0: 41 82 00 0c beq- ffc07efc ffc07ef4: 38 a0 00 01 li r5,1 nToSend = 1; ffc07ef8: 3b a0 00 01 li r29,1 } tty->rawOutBufState = rob_busy; /*apm*/ ffc07efc: 38 00 00 01 li r0,1 (*tty->device.write)( ffc07f00: 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*/ ffc07f04: 90 1f 00 94 stw r0,148(r31) (*tty->device.write)( ffc07f08: 7c 84 f2 14 add r4,r4,r30 ffc07f0c: 80 1f 00 a4 lwz r0,164(r31) ffc07f10: 80 7f 00 10 lwz r3,16(r31) ffc07f14: 7c 09 03 a6 mtctr r0 ffc07f18: 4e 80 04 21 bctrl tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ ffc07f1c: 93 df 00 84 stw r30,132(r31) } return nToSend; } ffc07f20: 80 01 00 1c lwz r0,28(r1) ffc07f24: 7f a3 eb 78 mr r3,r29 ffc07f28: 83 c1 00 10 lwz r30,16(r1) ffc07f2c: 7c 08 03 a6 mtlr r0 ffc07f30: 83 a1 00 0c lwz r29,12(r1) ffc07f34: 83 e1 00 14 lwz r31,20(r1) ffc07f38: 38 21 00 18 addi r1,r1,24 ffc07f3c: 4e 80 00 20 blr } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { ffc07f40: 80 03 00 94 lwz r0,148(r3) /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; ffc07f44: 3b a0 00 00 li r29,0 } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { ffc07f48: 2f 80 00 02 cmpwi cr7,r0,2 ffc07f4c: 40 9e ff d4 bne+ cr7,ffc07f20 <== ALWAYS TAKEN /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); ffc07f50: 80 63 00 8c lwz r3,140(r3) <== NOT EXECUTED ffc07f54: 48 00 10 b5 bl ffc09008 <== NOT EXECUTED ffc07f58: 4b ff ff c8 b ffc07f20 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { ffc07f5c: 80 1f 00 d4 lwz r0,212(r31) if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; ffc07f60: 39 20 00 00 li r9,0 ffc07f64: 91 3f 00 94 stw r9,148(r31) nToSend = 0; ffc07f68: 3b a0 00 00 li r29,0 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { ffc07f6c: 2f 80 00 00 cmpwi cr7,r0,0 ffc07f70: 41 be ff ac beq- cr7,ffc07f1c <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); ffc07f74: 38 7f 00 30 addi r3,r31,48 <== NOT EXECUTED ffc07f78: 80 9f 00 d8 lwz r4,216(r31) <== NOT EXECUTED ffc07f7c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07f80: 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*/ ffc07f84: 93 df 00 84 stw r30,132(r31) <== NOT EXECUTED ffc07f88: 4b ff ff 98 b ffc07f20 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; ffc07f8c: 83 bf 00 88 lwz r29,136(r31) ffc07f90: 7f be e8 50 subf r29,r30,r29 ffc07f94: 4b ff ff 50 b ffc07ee4 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); ffc07f98: 80 63 00 8c lwz r3,140(r3) ffc07f9c: 48 00 10 6d bl ffc09008 ffc07fa0: 4b ff ff 14 b ffc07eb4 /* 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); ffc07fa4: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED ffc07fa8: 38 9f 00 4a addi r4,r31,74 <== NOT EXECUTED ffc07fac: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc07fb0: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED ffc07fb4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07fb8: 4e 80 04 21 bctrl <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07fbc: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc07fc0: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc07fc4: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc07fc8: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED rtems_interrupt_disable(level); tty->t_dqlen--; ffc07fcc: 81 7f 00 90 lwz r11,144(r31) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; ffc07fd0: 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--; ffc07fd4: 39 6b ff ff addi r11,r11,-1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; ffc07fd8: 61 29 00 02 ori r9,r9,2 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; ffc07fdc: 91 7f 00 90 stw r11,144(r31) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; ffc07fe0: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc07fe4: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } ffc07fe8: 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; ffc07fec: 3b a0 00 01 li r29,1 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } ffc07ff0: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc07ff4: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc07ff8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc07ffc: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc08000: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc08004: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc08008: 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); ffc0800c: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED ffc08010: 38 9f 00 49 addi r4,r31,73 <== NOT EXECUTED ffc08014: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc08018: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED ffc0801c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08020: 4e 80 04 21 bctrl <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08024: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc08028: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc0802c: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc08030: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED rtems_interrupt_disable(level); tty->t_dqlen--; ffc08034: 81 7f 00 90 lwz r11,144(r31) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; ffc08038: 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--; ffc0803c: 39 6b ff ff addi r11,r11,-1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; ffc08040: 55 29 07 fa rlwinm r9,r9,0,31,29 <== 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--; ffc08044: 91 7f 00 90 stw r11,144(r31) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; ffc08048: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0804c: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } ffc08050: 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; ffc08054: 3b a0 00 01 li r29,1 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } ffc08058: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0805c: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc08060: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc08064: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc08068: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc0806c: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc08070: 4e 80 00 20 blr <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08074: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc08078: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc0807c: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc08080: 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; ffc08084: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED ffc08088: 61 29 00 20 ori r9,r9,32 <== NOT EXECUTED ffc0808c: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ ffc08090: 39 20 00 01 li r9,1 <== NOT EXECUTED ffc08094: 91 3f 00 94 stw r9,148(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08098: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 0; ffc0809c: 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*/ ffc080a0: 93 df 00 84 stw r30,132(r31) <== NOT EXECUTED ffc080a4: 4b ff fe 7c b ffc07f20 <== NOT EXECUTED =============================================================================== ffc07d78 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { ffc07d78: 94 21 ff d8 stwu r1,-40(r1) ffc07d7c: 7c 08 02 a6 mflr r0 ffc07d80: 93 a1 00 1c stw r29,28(r1) ffc07d84: 3b a1 00 08 addi r29,r1,8 ffc07d88: 93 c1 00 20 stw r30,32(r1) ffc07d8c: 3b c1 00 0c addi r30,r1,12 ffc07d90: 93 e1 00 24 stw r31,36(r1) ffc07d94: 7c 7f 1b 78 mr r31,r3 ffc07d98: 90 01 00 2c stw r0,44(r1) ffc07d9c: 48 00 00 20 b ffc07dbc } /* * do something */ c = tty->device.pollRead(tty->minor); ffc07da0: 80 1f 00 a0 lwz r0,160(r31) ffc07da4: 80 7f 00 10 lwz r3,16(r31) ffc07da8: 7c 09 03 a6 mtctr r0 ffc07dac: 4e 80 04 21 bctrl if (c != EOF) { ffc07db0: 2f 83 ff ff cmpwi cr7,r3,-1 } /* * do something */ c = tty->device.pollRead(tty->minor); ffc07db4: 7c 60 1b 78 mr r0,r3 if (c != EOF) { ffc07db8: 40 9e 00 50 bne- cr7,ffc07e08 while (1) { /* * wait for rtems event */ rtems_event_receive( ffc07dbc: 7f c6 f3 78 mr r6,r30 ffc07dc0: 38 80 00 02 li r4,2 ffc07dc4: 38 a0 00 00 li r5,0 ffc07dc8: 38 60 00 03 li r3,3 ffc07dcc: 48 00 09 19 bl ffc086e4 (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) { ffc07dd0: 80 01 00 0c lwz r0,12(r1) ffc07dd4: 70 09 00 01 andi. r9,r0,1 ffc07dd8: 41 82 ff c8 beq+ ffc07da0 <== ALWAYS TAKEN tty->rxTaskId = 0; ffc07ddc: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc07de0: 90 1f 00 c4 stw r0,196(r31) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); ffc07de4: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc07de8: 48 00 14 d9 bl ffc092c0 <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); ffc07dec: 80 1f 00 a0 lwz r0,160(r31) <== NOT EXECUTED ffc07df0: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc07df4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07df8: 4e 80 04 21 bctrl <== NOT EXECUTED if (c != EOF) { ffc07dfc: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); ffc07e00: 7c 60 1b 78 mr r0,r3 <== NOT EXECUTED if (c != EOF) { ffc07e04: 41 9e ff b8 beq+ cr7,ffc07dbc <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); ffc07e08: 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; ffc07e0c: 98 01 00 08 stb r0,8(r1) rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); ffc07e10: 7f a4 eb 78 mr r4,r29 ffc07e14: 38 a0 00 01 li r5,1 ffc07e18: 4b ff fb ad bl ffc079c4 ffc07e1c: 4b ff ff a0 b ffc07dbc =============================================================================== ffc080a8 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { ffc080a8: 94 21 ff d8 stwu r1,-40(r1) ffc080ac: 7c 08 02 a6 mflr r0 ffc080b0: 93 c1 00 20 stw r30,32(r1) ffc080b4: 3f c0 00 00 lis r30,0 ffc080b8: 3b de 27 d4 addi r30,r30,10196 ffc080bc: 93 a1 00 1c stw r29,28(r1) ffc080c0: 3b a1 00 08 addi r29,r1,8 ffc080c4: 93 e1 00 24 stw r31,36(r1) ffc080c8: 7c 7f 1b 78 mr r31,r3 ffc080cc: 90 01 00 2c stw r0,44(r1) ffc080d0: 48 00 00 30 b ffc08100 } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc080d4: 81 3f 00 cc lwz r9,204(r31) rtems_termios_linesw[tty->t_line].l_start(tty); ffc080d8: 7f e3 fb 78 mr r3,r31 } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc080dc: 55 29 28 34 rlwinm r9,r9,5,0,26 ffc080e0: 7d 3e 4a 14 add r9,r30,r9 ffc080e4: 80 09 00 14 lwz r0,20(r9) ffc080e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc080ec: 41 9e 00 0c beq- cr7,ffc080f8 <== ALWAYS TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); ffc080f0: 7c 09 03 a6 mtctr r0 ffc080f4: 4e 80 04 21 bctrl <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); ffc080f8: 7f e3 fb 78 mr r3,r31 ffc080fc: 4b ff fd 25 bl ffc07e20 while (1) { /* * wait for rtems event */ rtems_event_receive( ffc08100: 38 80 00 02 li r4,2 ffc08104: 38 a0 00 00 li r5,0 ffc08108: 7f a6 eb 78 mr r6,r29 ffc0810c: 38 60 00 03 li r3,3 ffc08110: 48 00 05 d5 bl ffc086e4 (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) { ffc08114: 80 01 00 08 lwz r0,8(r1) ffc08118: 70 09 00 01 andi. r9,r0,1 ffc0811c: 41 82 ff b8 beq+ ffc080d4 <== ALWAYS TAKEN tty->txTaskId = 0; ffc08120: 38 00 00 00 li r0,0 ffc08124: 90 1f 00 c8 stw r0,200(r31) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); ffc08128: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0812c: 48 00 11 95 bl ffc092c0 <== NOT EXECUTED ffc08130: 4b ff ff a4 b ffc080d4 <== NOT EXECUTED =============================================================================== ffc073f8 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc073f8: 94 21 ff e0 stwu r1,-32(r1) ffc073fc: 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); ffc07400: 38 80 00 00 li r4,0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc07404: 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); ffc07408: 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; ffc0740c: 81 23 00 00 lwz r9,0(r3) rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc07410: 93 e1 00 1c stw r31,28(r1) rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc07414: 83 e9 00 38 lwz r31,56(r9) rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc07418: 93 c1 00 18 stw r30,24(r1) ffc0741c: 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); ffc07420: 80 7f 00 18 lwz r3,24(r31) rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc07424: 93 a1 00 14 stw r29,20(r1) ffc07428: 93 41 00 08 stw r26,8(r1) ffc0742c: 93 61 00 0c stw r27,12(r1) ffc07430: 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); ffc07434: 48 00 1a 4d bl ffc08e80 if (sc != RTEMS_SUCCESSFUL) ffc07438: 7c 7d 1b 79 mr. r29,r3 ffc0743c: 40 82 00 40 bne- ffc0747c <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { ffc07440: 80 1f 00 cc lwz r0,204(r31) ffc07444: 3d 20 00 00 lis r9,0 ffc07448: 39 29 27 d4 addi r9,r9,10196 ffc0744c: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc07450: 7d 29 02 14 add r9,r9,r0 ffc07454: 80 09 00 0c lwz r0,12(r9) ffc07458: 2f 80 00 00 cmpwi cr7,r0,0 ffc0745c: 41 9e 00 4c beq- cr7,ffc074a8 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); ffc07460: 7f e3 fb 78 mr r3,r31 ffc07464: 7c 09 03 a6 mtctr r0 ffc07468: 7f c4 f3 78 mr r4,r30 ffc0746c: 4e 80 04 21 bctrl ffc07470: 7c 7d 1b 78 mr r29,r3 rtems_semaphore_release (tty->osem); ffc07474: 80 7f 00 18 lwz r3,24(r31) ffc07478: 48 00 1b 91 bl ffc09008 rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } ffc0747c: 80 01 00 24 lwz r0,36(r1) ffc07480: 7f a3 eb 78 mr r3,r29 ffc07484: 83 41 00 08 lwz r26,8(r1) ffc07488: 7c 08 03 a6 mtlr r0 ffc0748c: 83 61 00 0c lwz r27,12(r1) ffc07490: 83 81 00 10 lwz r28,16(r1) ffc07494: 83 a1 00 14 lwz r29,20(r1) ffc07498: 83 c1 00 18 lwz r30,24(r1) ffc0749c: 83 e1 00 1c lwz r31,28(r1) ffc074a0: 38 21 00 20 addi r1,r1,32 ffc074a4: 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) { ffc074a8: 80 1f 00 34 lwz r0,52(r31) ffc074ac: 70 09 00 01 andi. r9,r0,1 ffc074b0: 41 82 00 70 beq- ffc07520 <== NEVER TAKEN uint32_t count = args->count; ffc074b4: 83 7e 00 14 lwz r27,20(r30) char *buffer = args->buffer; while (count--) ffc074b8: 38 00 00 00 li r0,0 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; ffc074bc: 83 5e 00 10 lwz r26,16(r30) while (count--) ffc074c0: 2f 9b 00 00 cmpwi cr7,r27,0 ffc074c4: 41 9e 00 24 beq- cr7,ffc074e8 <== NEVER TAKEN ffc074c8: 3b 80 00 00 li r28,0 oproc (*buffer++, tty); ffc074cc: 7c 7a e0 ae lbzx r3,r26,r28 ffc074d0: 7f e4 fb 78 mr r4,r31 ffc074d4: 3b 9c 00 01 addi r28,r28,1 ffc074d8: 4b ff f7 d5 bl ffc06cac return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) ffc074dc: 7f 9c d8 00 cmpw cr7,r28,r27 ffc074e0: 40 9e ff ec bne+ cr7,ffc074cc oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; ffc074e4: 80 1e 00 14 lwz r0,20(r30) ffc074e8: 90 1e 00 1c stw r0,28(r30) } rtems_semaphore_release (tty->osem); ffc074ec: 80 7f 00 18 lwz r3,24(r31) ffc074f0: 48 00 1b 19 bl ffc09008 return sc; } ffc074f4: 80 01 00 24 lwz r0,36(r1) ffc074f8: 7f a3 eb 78 mr r3,r29 ffc074fc: 83 41 00 08 lwz r26,8(r1) ffc07500: 7c 08 03 a6 mtlr r0 ffc07504: 83 61 00 0c lwz r27,12(r1) ffc07508: 83 81 00 10 lwz r28,16(r1) ffc0750c: 83 a1 00 14 lwz r29,20(r1) ffc07510: 83 c1 00 18 lwz r30,24(r1) ffc07514: 83 e1 00 1c lwz r31,28(r1) ffc07518: 38 21 00 20 addi r1,r1,32 ffc0751c: 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); ffc07520: 80 7e 00 10 lwz r3,16(r30) <== NOT EXECUTED ffc07524: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc07528: 80 9e 00 14 lwz r4,20(r30) <== NOT EXECUTED ffc0752c: 4b ff f5 f9 bl ffc06b24 <== NOT EXECUTED ffc07530: 4b ff ff b4 b ffc074e4 <== NOT EXECUTED =============================================================================== ffc1b17c : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { ffc1b17c: 94 21 ff e8 stwu r1,-24(r1) ffc1b180: 7c 08 02 a6 mflr r0 ffc1b184: 7c 64 1b 78 mr r4,r3 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); ffc1b188: 3c 60 00 00 lis r3,0 ffc1b18c: 90 01 00 1c stw r0,28(r1) ffc1b190: 38 63 72 40 addi r3,r3,29248 ffc1b194: 38 a1 00 08 addi r5,r1,8 ffc1b198: 48 00 3a c5 bl ffc1ec5c <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1b19c: 80 01 00 08 lwz r0,8(r1) ffc1b1a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc1b1a4: 41 9e 00 18 beq- cr7,ffc1b1bc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1b1a8: 80 01 00 1c lwz r0,28(r1) #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1b1ac: 38 60 00 04 li r3,4 } ffc1b1b0: 38 21 00 18 addi r1,r1,24 ffc1b1b4: 7c 08 03 a6 mtlr r0 ffc1b1b8: 4e 80 00 20 blr the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) ffc1b1bc: 80 03 00 38 lwz r0,56(r3) ffc1b1c0: 2f 80 00 04 cmpwi cr7,r0,4 ffc1b1c4: 41 9e 00 0c beq- cr7,ffc1b1d0 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1b1c8: 38 63 00 10 addi r3,r3,16 ffc1b1cc: 48 00 63 d5 bl ffc215a0 <_Watchdog_Remove> _Thread_Enable_dispatch(); ffc1b1d0: 48 00 49 51 bl ffc1fb20 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1b1d4: 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; ffc1b1d8: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1b1dc: 7c 08 03 a6 mtlr r0 ffc1b1e0: 38 21 00 18 addi r1,r1,24 ffc1b1e4: 4e 80 00 20 blr =============================================================================== ffc1b848 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1b848: 94 21 ff c8 stwu r1,-56(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc1b84c: 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 ) { ffc1b850: 7c 08 02 a6 mflr r0 ffc1b854: 93 e1 00 34 stw r31,52(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc1b858: 83 e9 28 9c lwz r31,10396(r9) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1b85c: 93 21 00 1c stw r25,28(r1) Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; ffc1b860: 3b 20 00 0e li r25,14 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1b864: 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 ) { ffc1b868: 93 61 00 24 stw r27,36(r1) ffc1b86c: 7c db 33 78 mr r27,r6 ffc1b870: 93 81 00 28 stw r28,40(r1) ffc1b874: 7c 9c 23 78 mr r28,r4 ffc1b878: 93 a1 00 2c stw r29,44(r1) ffc1b87c: 7c 7d 1b 78 mr r29,r3 ffc1b880: 93 c1 00 30 stw r30,48(r1) ffc1b884: 7c be 2b 78 mr r30,r5 ffc1b888: 90 01 00 3c stw r0,60(r1) ffc1b88c: 93 01 00 18 stw r24,24(r1) ffc1b890: 93 41 00 20 stw r26,32(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1b894: 41 9e 00 38 beq- cr7,ffc1b8cc return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc1b898: 3d 20 00 00 lis r9,0 ffc1b89c: 88 09 28 44 lbz r0,10308(r9) return RTEMS_NOT_DEFINED; ffc1b8a0: 3b 20 00 0b li r25,11 Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc1b8a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc1b8a8: 41 9e 00 24 beq- cr7,ffc1b8cc <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) ffc1b8ac: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc1b8b0: 3b 20 00 09 li r25,9 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) ffc1b8b4: 41 9e 00 18 beq- cr7,ffc1b8cc return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc1b8b8: 7c 83 23 78 mr r3,r4 ffc1b8bc: 4b ff bf 59 bl ffc17814 <_TOD_Validate> return RTEMS_INVALID_CLOCK; ffc1b8c0: 3b 20 00 14 li r25,20 return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc1b8c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc1b8c8: 40 9e 00 38 bne- cr7,ffc1b900 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1b8cc: 80 01 00 3c lwz r0,60(r1) ffc1b8d0: 7f 23 cb 78 mr r3,r25 ffc1b8d4: 83 01 00 18 lwz r24,24(r1) ffc1b8d8: 7c 08 03 a6 mtlr r0 ffc1b8dc: 83 21 00 1c lwz r25,28(r1) ffc1b8e0: 83 41 00 20 lwz r26,32(r1) ffc1b8e4: 83 61 00 24 lwz r27,36(r1) ffc1b8e8: 83 81 00 28 lwz r28,40(r1) ffc1b8ec: 83 a1 00 2c lwz r29,44(r1) ffc1b8f0: 83 c1 00 30 lwz r30,48(r1) ffc1b8f4: 83 e1 00 34 lwz r31,52(r1) ffc1b8f8: 38 21 00 38 addi r1,r1,56 ffc1b8fc: 4e 80 00 20 blr return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1b900: 7f 83 e3 78 mr r3,r28 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1b904: 3f 40 00 00 lis r26,0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1b908: 4b ff be 69 bl ffc17770 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1b90c: 80 1a 28 58 lwz r0,10328(r26) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1b910: 7c 7c 1b 78 mr r28,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1b914: 7f 83 00 40 cmplw cr7,r3,r0 ffc1b918: 40 bd ff b4 ble- cr7,ffc1b8cc ffc1b91c: 3c 60 00 00 lis r3,0 ffc1b920: 38 63 72 40 addi r3,r3,29248 ffc1b924: 7f a4 eb 78 mr r4,r29 ffc1b928: 38 a1 00 08 addi r5,r1,8 ffc1b92c: 48 00 33 31 bl ffc1ec5c <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1b930: 83 01 00 08 lwz r24,8(r1) ffc1b934: 7c 79 1b 78 mr r25,r3 ffc1b938: 2f 98 00 00 cmpwi cr7,r24,0 ffc1b93c: 40 9e 00 50 bne- cr7,ffc1b98c case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1b940: 38 63 00 10 addi r3,r3,16 ffc1b944: 48 00 5c 5d bl ffc215a0 <_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(); ffc1b948: 80 1a 28 58 lwz r0,10328(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; ffc1b94c: 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(); ffc1b950: 7f 80 e0 50 subf r28,r0,r28 (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1b954: 80 1f 00 04 lwz r0,4(r31) ffc1b958: 7f 24 cb 78 mr r4,r25 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; ffc1b95c: 91 39 00 38 stw r9,56(r25) _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 ); ffc1b960: 7f e3 fb 78 mr r3,r31 ffc1b964: 7c 09 03 a6 mtctr r0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1b968: 93 19 00 18 stw r24,24(r25) the_watchdog->routine = routine; ffc1b96c: 93 d9 00 2c stw r30,44(r25) the_watchdog->id = id; ffc1b970: 93 b9 00 30 stw r29,48(r25) the_watchdog->user_data = user_data; ffc1b974: 93 79 00 34 stw r27,52(r25) 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(); ffc1b978: 93 99 00 1c stw r28,28(r25) (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc1b97c: 3b 20 00 00 li r25,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 ); ffc1b980: 4e 80 04 21 bctrl _Thread_Enable_dispatch(); ffc1b984: 48 00 41 9d bl ffc1fb20 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc1b988: 4b ff ff 44 b ffc1b8cc #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1b98c: 3b 20 00 04 li r25,4 ffc1b990: 4b ff ff 3c b ffc1b8cc =============================================================================== ffc0ad24 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { ffc0ad24: 94 21 ff e0 stwu r1,-32(r1) ffc0ad28: 7c 08 02 a6 mflr r0 ffc0ad2c: 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) { ffc0ad30: 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 ) { ffc0ad34: 93 41 00 08 stw r26,8(r1) ffc0ad38: 7c 9a 23 78 mr r26,r4 ffc0ad3c: 93 61 00 0c stw r27,12(r1) ffc0ad40: 7c bb 2b 78 mr r27,r5 ffc0ad44: 93 c1 00 18 stw r30,24(r1) ffc0ad48: 7c 7e 1b 78 mr r30,r3 ffc0ad4c: 93 81 00 10 stw r28,16(r1) ffc0ad50: 93 a1 00 14 stw r29,20(r1) ffc0ad54: 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) { ffc0ad58: 41 82 00 3c beq- ffc0ad94 if (rtems_panic_in_progress++) ffc0ad5c: 3d 20 00 00 lis r9,0 ffc0ad60: 81 69 27 8c lwz r11,10124(r9) ffc0ad64: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0ad68: 38 0b 00 01 addi r0,r11,1 ffc0ad6c: 90 09 27 8c stw r0,10124(r9) ffc0ad70: 41 9e 00 18 beq- cr7,ffc0ad88 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0ad74: 3d 60 00 00 lis r11,0 <== NOT EXECUTED ffc0ad78: 81 4b 27 ac lwz r10,10156(r11) <== NOT EXECUTED ffc0ad7c: 38 0a 00 01 addi r0,r10,1 <== NOT EXECUTED ffc0ad80: 90 0b 27 ac stw r0,10156(r11) <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); ffc0ad84: 80 09 27 8c lwz r0,10124(r9) <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) ffc0ad88: 2f 80 00 02 cmpwi cr7,r0,2 return 0; ffc0ad8c: 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) ffc0ad90: 41 9d 00 ac bgt- cr7,ffc0ae3c <== NEVER TAKEN return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ ffc0ad94: 3f e0 00 00 lis r31,0 ffc0ad98: 81 3f 27 2c lwz r9,10028(r31) rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { int local_errno = 0; ffc0ad9c: 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 */ ffc0ada0: 80 69 00 08 lwz r3,8(r9) ffc0ada4: 48 00 ec 85 bl ffc19a28 status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ ffc0ada8: 77 c0 40 00 andis. r0,r30,16384 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; ffc0adac: 57 de 01 00 rlwinm r30,r30,0,4,0 if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ ffc0adb0: 40 82 00 ec bne- ffc0ae9c #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); ffc0adb4: 81 3f 27 2c lwz r9,10028(r31) ffc0adb8: 7f 44 d3 78 mr r4,r26 ffc0adbc: 7f 65 db 78 mr r5,r27 ffc0adc0: 80 69 00 0c lwz r3,12(r9) ffc0adc4: 48 01 53 69 bl ffc2012c if (status) ffc0adc8: 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); ffc0adcc: 7c 7d 1b 78 mr r29,r3 if (status) ffc0add0: 40 9e 00 98 bne- cr7,ffc0ae68 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { ffc0add4: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0add8: 41 9e 00 3c beq- cr7,ffc0ae14 if ((local_errno > 0) && *strerror(local_errno)) ffc0addc: 40 9d 00 18 ble- cr7,ffc0adf4 ffc0ade0: 7f 83 e3 78 mr r3,r28 ffc0ade4: 48 01 00 75 bl ffc1ae58 ffc0ade8: 88 03 00 00 lbz r0,0(r3) ffc0adec: 2f 80 00 00 cmpwi cr7,r0,0 ffc0adf0: 40 9e 00 b8 bne- cr7,ffc0aea8 <== ALWAYS TAKEN chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); ffc0adf4: 81 3f 27 2c lwz r9,10028(r31) ffc0adf8: 3c 80 ff c3 lis r4,-61 ffc0adfc: 38 84 99 e4 addi r4,r4,-26140 ffc0ae00: 80 69 00 0c lwz r3,12(r9) ffc0ae04: 7f 85 e3 78 mr r5,r28 ffc0ae08: 4c c6 31 82 crclr 4*cr1+eq ffc0ae0c: 48 00 f1 51 bl ffc19f5c ffc0ae10: 7f bd 1a 14 add r29,r29,r3 } chars_written += fprintf(stderr, "\n"); ffc0ae14: 81 3f 27 2c lwz r9,10028(r31) ffc0ae18: 3c 80 ff c3 lis r4,-61 ffc0ae1c: 38 84 93 58 addi r4,r4,-27816 ffc0ae20: 80 69 00 0c lwz r3,12(r9) ffc0ae24: 4c c6 31 82 crclr 4*cr1+eq ffc0ae28: 48 00 f1 35 bl ffc19f5c (void) fflush(stderr); ffc0ae2c: 81 3f 27 2c lwz r9,10028(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"); ffc0ae30: 7f a3 ea 14 add r29,r3,r29 (void) fflush(stderr); ffc0ae34: 80 69 00 0c lwz r3,12(r9) ffc0ae38: 48 00 eb f1 bl ffc19a28 return chars_written; } ffc0ae3c: 80 01 00 24 lwz r0,36(r1) ffc0ae40: 7f a3 eb 78 mr r3,r29 ffc0ae44: 83 41 00 08 lwz r26,8(r1) ffc0ae48: 7c 08 03 a6 mtlr r0 ffc0ae4c: 83 61 00 0c lwz r27,12(r1) ffc0ae50: 83 81 00 10 lwz r28,16(r1) ffc0ae54: 83 a1 00 14 lwz r29,20(r1) ffc0ae58: 83 c1 00 18 lwz r30,24(r1) ffc0ae5c: 83 e1 00 1c lwz r31,28(r1) ffc0ae60: 38 21 00 20 addi r1,r1,32 ffc0ae64: 4e 80 00 20 blr chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); ffc0ae68: 3d 20 00 00 lis r9,0 ffc0ae6c: 81 29 27 2c lwz r9,10028(r9) ffc0ae70: 7f c3 f3 78 mr r3,r30 ffc0ae74: 83 c9 00 0c lwz r30,12(r9) ffc0ae78: 4b ff fe 81 bl ffc0acf8 ffc0ae7c: 3c 80 ff c3 lis r4,-61 ffc0ae80: 7c 65 1b 78 mr r5,r3 ffc0ae84: 38 84 99 c4 addi r4,r4,-26172 ffc0ae88: 7f c3 f3 78 mr r3,r30 ffc0ae8c: 4c c6 31 82 crclr 4*cr1+eq ffc0ae90: 48 00 f0 cd bl ffc19f5c #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += ffc0ae94: 7f bd 1a 14 add r29,r29,r3 ffc0ae98: 4b ff ff 3c b ffc0add4 (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; ffc0ae9c: 48 00 e6 f9 bl ffc19594 <__errno> ffc0aea0: 83 83 00 00 lwz r28,0(r3) ffc0aea4: 4b ff ff 10 b ffc0adb4 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)); ffc0aea8: 81 3f 27 2c lwz r9,10028(r31) ffc0aeac: 7f 83 e3 78 mr r3,r28 ffc0aeb0: 83 c9 00 0c lwz r30,12(r9) ffc0aeb4: 48 00 ff a5 bl ffc1ae58 ffc0aeb8: 3c 80 ff c3 lis r4,-61 ffc0aebc: 7c 65 1b 78 mr r5,r3 ffc0aec0: 38 84 99 d4 addi r4,r4,-26156 ffc0aec4: 7f c3 f3 78 mr r3,r30 ffc0aec8: 4c c6 31 82 crclr 4*cr1+eq ffc0aecc: 48 00 f0 91 bl ffc19f5c ffc0aed0: 7f bd 1a 14 add r29,r29,r3 ffc0aed4: 4b ff ff 40 b ffc0ae14 =============================================================================== ffc0555c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc0555c: 94 21 ff d8 stwu r1,-40(r1) ffc05560: 7c 08 02 a6 mflr r0 ffc05564: 93 41 00 10 stw r26,16(r1) sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) ffc05568: 3f 40 cc cc lis r26,-13108 ffc0556c: 63 5a cc cd ori r26,r26,52429 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc05570: 93 81 00 18 stw r28,24(r1) int c; unsigned int i = 0; unsigned int limit = INT_MAX; ffc05574: 3f 80 7f ff lis r28,32767 ffc05578: 63 9c ff ff ori r28,r28,65535 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc0557c: 90 01 00 2c stw r0,44(r1) ffc05580: 93 01 00 08 stw r24,8(r1) ffc05584: 7c 98 23 78 mr r24,r4 ffc05588: 93 21 00 0c stw r25,12(r1) unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc0558c: 3f 20 00 00 lis r25,0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc05590: 93 61 00 14 stw r27,20(r1) limit++; continue; } sign = 1; } if (!isdigit(c)) ffc05594: 3f 60 00 00 lis r27,0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc05598: 93 a1 00 1c stw r29,28(r1) int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; ffc0559c: 3b a0 00 00 li r29,0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc055a0: 93 c1 00 20 stw r30,32(r1) int c; unsigned int i = 0; ffc055a4: 3b c0 00 00 li r30,0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc055a8: 93 e1 00 24 stw r31,36(r1) ffc055ac: 7c 7f 1b 78 mr r31,r3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc055b0: 81 3f 00 04 lwz r9,4(r31) ffc055b4: 38 09 ff ff addi r0,r9,-1 ffc055b8: 2f 80 00 00 cmpwi cr7,r0,0 ffc055bc: 90 1f 00 04 stw r0,4(r31) ffc055c0: 41 9c 00 7c blt- cr7,ffc0563c <== NEVER TAKEN ffc055c4: 81 3f 00 00 lwz r9,0(r31) ffc055c8: 88 69 00 00 lbz r3,0(r9) ffc055cc: 38 09 00 01 addi r0,r9,1 ffc055d0: 90 1f 00 00 stw r0,0(r31) if (c == ':') ffc055d4: 2f 83 00 3a cmpwi cr7,r3,58 ffc055d8: 41 9e 00 78 beq- cr7,ffc05650 break; if (sign == 0) { ffc055dc: 2f 9d 00 00 cmpwi cr7,r29,0 ffc055e0: 40 9e 00 10 bne- cr7,ffc055f0 if (c == '-') { ffc055e4: 2f 83 00 2d cmpwi cr7,r3,45 sign = -1; limit++; continue; } sign = 1; ffc055e8: 3b a0 00 01 li r29,1 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { ffc055ec: 41 9e 00 f0 beq- cr7,ffc056dc limit++; continue; } sign = 1; } if (!isdigit(c)) ffc055f0: 81 3b 26 a8 lwz r9,9896(r27) ffc055f4: 7d 29 1a 14 add r9,r9,r3 ffc055f8: 88 09 00 01 lbz r0,1(r9) ffc055fc: 70 09 00 04 andi. r9,r0,4 ffc05600: 41 82 00 a8 beq- ffc056a8 return 0; d = c - '0'; if ((i > (limit / 10)) ffc05604: 7c 1c d0 16 mulhwu r0,r28,r26 ffc05608: 54 00 e8 fe rlwinm r0,r0,29,3,31 ffc0560c: 7f 9e 00 40 cmplw cr7,r30,r0 ffc05610: 41 9d 00 98 bgt- cr7,ffc056a8 || ((i == (limit / 10)) && (d > (limit % 10)))) ffc05614: 7f 9e 00 00 cmpw cr7,r30,r0 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; ffc05618: 38 63 ff d0 addi r3,r3,-48 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) ffc0561c: 41 9e 00 7c beq- cr7,ffc05698 ffc05620: 1f de 00 0a mulli r30,r30,10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc05624: 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; ffc05628: 7f c3 f2 14 add r30,r3,r30 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc0562c: 38 09 ff ff addi r0,r9,-1 ffc05630: 2f 80 00 00 cmpwi cr7,r0,0 ffc05634: 90 1f 00 04 stw r0,4(r31) ffc05638: 40 9c ff 8c bge+ cr7,ffc055c4 <== ALWAYS TAKEN ffc0563c: 80 79 26 ac lwz r3,9900(r25) <== NOT EXECUTED ffc05640: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc05644: 48 00 fe 69 bl ffc154ac <__srget_r> <== NOT EXECUTED if (c == ':') ffc05648: 2f 83 00 3a cmpwi cr7,r3,58 <== NOT EXECUTED ffc0564c: 40 9e ff 90 bne+ cr7,ffc055dc <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) ffc05650: 2f 9d 00 00 cmpwi cr7,r29,0 return 0; ffc05654: 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) ffc05658: 41 9e 00 54 beq- cr7,ffc056ac <== NEVER TAKEN return 0; *val = i * sign; return 1; } ffc0565c: 80 01 00 2c lwz r0,44(r1) return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; ffc05660: 7f dd f1 d6 mullw r30,r29,r30 return 1; } ffc05664: 83 21 00 0c lwz r25,12(r1) ffc05668: 7c 08 03 a6 mtlr r0 i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; ffc0566c: 38 60 00 01 li r3,1 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; ffc05670: 93 d8 00 00 stw r30,0(r24) return 1; } ffc05674: 83 01 00 08 lwz r24,8(r1) ffc05678: 83 41 00 10 lwz r26,16(r1) ffc0567c: 83 61 00 14 lwz r27,20(r1) ffc05680: 83 81 00 18 lwz r28,24(r1) ffc05684: 83 a1 00 1c lwz r29,28(r1) ffc05688: 83 c1 00 20 lwz r30,32(r1) ffc0568c: 83 e1 00 24 lwz r31,36(r1) ffc05690: 38 21 00 28 addi r1,r1,40 ffc05694: 4e 80 00 20 blr } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) ffc05698: 1f de 00 0a mulli r30,r30,10 ffc0569c: 7c 1e e0 50 subf r0,r30,r28 ffc056a0: 7f 83 00 40 cmplw cr7,r3,r0 ffc056a4: 40 9d ff 80 ble+ cr7,ffc05624 <== NEVER TAKEN return 0; ffc056a8: 38 60 00 00 li r3,0 } if (sign == 0) return 0; *val = i * sign; return 1; } ffc056ac: 80 01 00 2c lwz r0,44(r1) ffc056b0: 83 01 00 08 lwz r24,8(r1) ffc056b4: 7c 08 03 a6 mtlr r0 ffc056b8: 83 21 00 0c lwz r25,12(r1) ffc056bc: 83 41 00 10 lwz r26,16(r1) ffc056c0: 83 61 00 14 lwz r27,20(r1) ffc056c4: 83 81 00 18 lwz r28,24(r1) ffc056c8: 83 a1 00 1c lwz r29,28(r1) ffc056cc: 83 c1 00 20 lwz r30,32(r1) ffc056d0: 83 e1 00 24 lwz r31,36(r1) ffc056d4: 38 21 00 28 addi r1,r1,40 ffc056d8: 4e 80 00 20 blr if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; ffc056dc: 3b 9c 00 01 addi r28,r28,1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; ffc056e0: 3b a0 ff ff li r29,-1 limit++; continue; ffc056e4: 4b ff fe cc b ffc055b0 =============================================================================== ffc056e8 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { ffc056e8: 94 21 ff e0 stwu r1,-32(r1) ffc056ec: 7c 08 02 a6 mflr r0 ffc056f0: 90 01 00 24 stw r0,36(r1) int c; *name = *bufp; ffc056f4: 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) { ffc056f8: 93 61 00 0c stw r27,12(r1) ffc056fc: 7c fb 3b 78 mr r27,r7 ffc05700: 93 81 00 10 stw r28,16(r1) int c; *name = *bufp; for (;;) { c = getc(fp); ffc05704: 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) { ffc05708: 93 a1 00 14 stw r29,20(r1) ffc0570c: 7c dd 33 78 mr r29,r6 ffc05710: 93 c1 00 18 stw r30,24(r1) ffc05714: 7c be 2b 78 mr r30,r5 ffc05718: 93 e1 00 1c stw r31,28(r1) ffc0571c: 7c 7f 1b 78 mr r31,r3 int c; *name = *bufp; ffc05720: 90 04 00 00 stw r0,0(r4) ffc05724: 48 00 00 58 b ffc0577c for (;;) { c = getc(fp); ffc05728: 81 3f 00 00 lwz r9,0(r31) ffc0572c: 88 69 00 00 lbz r3,0(r9) ffc05730: 38 09 00 01 addi r0,r9,1 ffc05734: 90 1f 00 00 stw r0,0(r31) if (c == ':') { ffc05738: 2f 83 00 3a cmpwi cr7,r3,58 if (nlFlag) return 0; break; } if (c == '\n') { ffc0573c: 2f 03 00 0a cmpwi cr6,r3,10 if (!nlFlag) return 0; break; } if (c == EOF) ffc05740: 2c 83 ff ff cmpwi cr1,r3,-1 int c; *name = *bufp; for (;;) { c = getc(fp); if (c == ':') { ffc05744: 41 9e 00 68 beq- cr7,ffc057ac if (nlFlag) return 0; break; } if (c == '\n') { ffc05748: 41 9a 00 e4 beq- cr6,ffc0582c if (!nlFlag) return 0; break; } if (c == EOF) ffc0574c: 41 86 00 b8 beq- cr1,ffc05804 return 0; if (*nleft < 2) ffc05750: 80 1d 00 00 lwz r0,0(r29) ffc05754: 2b 80 00 01 cmplwi cr7,r0,1 ffc05758: 40 9d 00 ac ble- cr7,ffc05804 return 0; **bufp = c; ffc0575c: 81 3e 00 00 lwz r9,0(r30) ffc05760: 98 69 00 00 stb r3,0(r9) ++(*bufp); ffc05764: 81 3e 00 00 lwz r9,0(r30) --(*nleft); ffc05768: 81 7d 00 00 lwz r11,0(r29) if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); ffc0576c: 39 29 00 01 addi r9,r9,1 --(*nleft); ffc05770: 38 0b ff ff addi r0,r11,-1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); ffc05774: 91 3e 00 00 stw r9,0(r30) --(*nleft); ffc05778: 90 1d 00 00 stw r0,0(r29) { int c; *name = *bufp; for (;;) { c = getc(fp); ffc0577c: 81 3f 00 04 lwz r9,4(r31) ffc05780: 38 09 ff ff addi r0,r9,-1 ffc05784: 2f 80 00 00 cmpwi cr7,r0,0 ffc05788: 90 1f 00 04 stw r0,4(r31) ffc0578c: 40 9c ff 9c bge+ cr7,ffc05728 ffc05790: 80 7c 26 ac lwz r3,9900(r28) ffc05794: 7f e4 fb 78 mr r4,r31 ffc05798: 48 00 fd 15 bl ffc154ac <__srget_r> if (c == ':') { ffc0579c: 2f 83 00 3a cmpwi cr7,r3,58 if (nlFlag) return 0; break; } if (c == '\n') { ffc057a0: 2f 03 00 0a cmpwi cr6,r3,10 if (!nlFlag) return 0; break; } if (c == EOF) ffc057a4: 2c 83 ff ff cmpwi cr1,r3,-1 int c; *name = *bufp; for (;;) { c = getc(fp); if (c == ':') { ffc057a8: 40 9e ff a0 bne+ cr7,ffc05748 <== ALWAYS TAKEN if (nlFlag) ffc057ac: 2f 9b 00 00 cmpwi cr7,r27,0 return 0; ffc057b0: 38 60 00 00 li r3,0 *name = *bufp; for (;;) { c = getc(fp); if (c == ':') { if (nlFlag) ffc057b4: 40 9e 00 54 bne- cr7,ffc05808 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ffc057b8: 81 3e 00 00 lwz r9,0(r30) ffc057bc: 38 00 00 00 li r0,0 ++(*bufp); --(*nleft); return 1; ffc057c0: 38 60 00 01 li r3,1 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ffc057c4: 98 09 00 00 stb r0,0(r9) ++(*bufp); ffc057c8: 81 3e 00 00 lwz r9,0(r30) --(*nleft); ffc057cc: 81 7d 00 00 lwz r11,0(r29) **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); ffc057d0: 39 29 00 01 addi r9,r9,1 --(*nleft); ffc057d4: 38 0b ff ff addi r0,r11,-1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); ffc057d8: 91 3e 00 00 stw r9,0(r30) --(*nleft); ffc057dc: 90 1d 00 00 stw r0,0(r29) return 1; } ffc057e0: 80 01 00 24 lwz r0,36(r1) ffc057e4: 83 61 00 0c lwz r27,12(r1) ffc057e8: 7c 08 03 a6 mtlr r0 ffc057ec: 83 81 00 10 lwz r28,16(r1) ffc057f0: 83 a1 00 14 lwz r29,20(r1) ffc057f4: 83 c1 00 18 lwz r30,24(r1) ffc057f8: 83 e1 00 1c lwz r31,28(r1) ffc057fc: 38 21 00 20 addi r1,r1,32 ffc05800: 4e 80 00 20 blr break; } if (c == EOF) return 0; if (*nleft < 2) return 0; ffc05804: 38 60 00 00 li r3,0 } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } ffc05808: 80 01 00 24 lwz r0,36(r1) ffc0580c: 83 61 00 0c lwz r27,12(r1) ffc05810: 7c 08 03 a6 mtlr r0 ffc05814: 83 81 00 10 lwz r28,16(r1) ffc05818: 83 a1 00 14 lwz r29,20(r1) ffc0581c: 83 c1 00 18 lwz r30,24(r1) ffc05820: 83 e1 00 1c lwz r31,28(r1) ffc05824: 38 21 00 20 addi r1,r1,32 ffc05828: 4e 80 00 20 blr if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) ffc0582c: 2f 9b 00 00 cmpwi cr7,r27,0 return 0; ffc05830: 38 60 00 00 li r3,0 if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) ffc05834: 41 be ff d4 beq- cr7,ffc05808 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ffc05838: 81 3e 00 00 lwz r9,0(r30) ffc0583c: 38 00 00 00 li r0,0 ++(*bufp); --(*nleft); return 1; ffc05840: 38 60 00 01 li r3,1 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ffc05844: 98 09 00 00 stb r0,0(r9) ++(*bufp); ffc05848: 81 3e 00 00 lwz r9,0(r30) --(*nleft); ffc0584c: 81 7d 00 00 lwz r11,0(r29) **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); ffc05850: 39 29 00 01 addi r9,r9,1 --(*nleft); ffc05854: 38 0b ff ff addi r0,r11,-1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); ffc05858: 91 3e 00 00 stw r9,0(r30) --(*nleft); ffc0585c: 90 1d 00 00 stw r0,0(r29) ffc05860: 4b ff ff 80 b ffc057e0 =============================================================================== ffc05864 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc05864: 94 21 ff c8 stwu r1,-56(r1) ffc05868: 7c 08 02 a6 mflr r0 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc0586c: 38 e0 00 00 li r7,0 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc05870: 93 c1 00 30 stw r30,48(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc05874: 3b c1 00 18 addi r30,r1,24 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc05878: 93 e1 00 34 stw r31,52(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc0587c: 3b e1 00 1c addi r31,r1,28 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc05880: 90 a1 00 18 stw r5,24(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc05884: 7f c5 f3 78 mr r5,r30 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc05888: 90 c1 00 1c stw r6,28(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc0588c: 7f e6 fb 78 mr r6,r31 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc05890: 93 61 00 24 stw r27,36(r1) ffc05894: 7c 9b 23 78 mr r27,r4 ffc05898: 93 81 00 28 stw r28,40(r1) ffc0589c: 7c 7c 1b 78 mr r28,r3 ffc058a0: 93 a1 00 2c stw r29,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; ffc058a4: 3b a0 00 00 li r29,0 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc058a8: 90 01 00 3c stw r0,60(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc058ac: 4b ff fe 3d bl ffc056e8 ffc058b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc058b4: 40 9e 00 2c bne- cr7,ffc058e0 grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } ffc058b8: 80 01 00 3c lwz r0,60(r1) ffc058bc: 7f a3 eb 78 mr r3,r29 ffc058c0: 83 61 00 24 lwz r27,36(r1) ffc058c4: 7c 08 03 a6 mtlr r0 ffc058c8: 83 81 00 28 lwz r28,40(r1) ffc058cc: 83 a1 00 2c lwz r29,44(r1) ffc058d0: 83 c1 00 30 lwz r30,48(r1) ffc058d4: 83 e1 00 34 lwz r31,52(r1) ffc058d8: 38 21 00 38 addi r1,r1,56 ffc058dc: 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) ffc058e0: 7f 83 e3 78 mr r3,r28 ffc058e4: 38 9b 00 04 addi r4,r27,4 ffc058e8: 7f c5 f3 78 mr r5,r30 ffc058ec: 7f e6 fb 78 mr r6,r31 ffc058f0: 38 e0 00 00 li r7,0 ffc058f4: 4b ff fd f5 bl ffc056e8 ffc058f8: 2f 83 00 00 cmpwi cr7,r3,0 ffc058fc: 41 9e ff bc beq+ cr7,ffc058b8 <== NEVER TAKEN || !scanInt(fp, &grgid) ffc05900: 7f 83 e3 78 mr r3,r28 ffc05904: 38 81 00 08 addi r4,r1,8 ffc05908: 4b ff fc 55 bl ffc0555c ffc0590c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05910: 41 9e ff a8 beq+ cr7,ffc058b8 <== NEVER TAKEN || !scanString(fp, &grmem, &buffer, &bufsize, 1)) ffc05914: 7f 83 e3 78 mr r3,r28 ffc05918: 38 81 00 0c addi r4,r1,12 ffc0591c: 7f c5 f3 78 mr r5,r30 ffc05920: 7f e6 fb 78 mr r6,r31 ffc05924: 38 e0 00 01 li r7,1 ffc05928: 4b ff fd c1 bl ffc056e8 ffc0592c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05930: 41 be ff 88 beq- cr7,ffc058b8 <== NEVER TAKEN return 0; grp->gr_gid = grgid; ffc05934: 80 01 00 08 lwz r0,8(r1) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05938: 39 20 00 17 li r9,23 ffc0593c: 81 41 00 0c lwz r10,12(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; ffc05940: b0 1b 00 08 sth r0,8(r27) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05944: 88 0a 00 00 lbz r0,0(r10) ffc05948: 2f 80 00 00 cmpwi cr7,r0,0 ffc0594c: 41 9e 00 30 beq- cr7,ffc0597c <== NEVER TAKEN ffc05950: 7d 4b 53 78 mr r11,r10 ffc05954: 39 20 00 01 li r9,1 if(*cp == ',') memcount++; ffc05958: 68 08 00 2c xori r8,r0,44 ffc0595c: 21 08 00 00 subfic r8,r8,0 ffc05960: 7d 09 01 94 addze r8,r9 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05964: 8c 0b 00 01 lbzu r0,1(r11) ffc05968: 2f 80 00 00 cmpwi cr7,r0,0 if(*cp == ',') memcount++; ffc0596c: 7d 09 43 78 mr r9,r8 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05970: 40 9e ff e8 bne+ cr7,ffc05958 ffc05974: 55 09 10 3a rlwinm r9,r8,2,0,29 ffc05978: 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)) ffc0597c: 80 01 00 1c lwz r0,28(r1) return 0; ffc05980: 3b a0 00 00 li r29,0 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) ffc05984: 7f 80 48 40 cmplw cr7,r0,r9 ffc05988: 41 bc ff 30 blt- cr7,ffc058b8 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); ffc0598c: 81 01 00 18 lwz r8,24(r1) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05990: 39 60 00 04 li r11,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); ffc05994: 39 08 00 0f addi r8,r8,15 ffc05998: 55 08 00 36 rlwinm r8,r8,0,0,27 ffc0599c: 91 1b 00 0c stw r8,12(r27) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; ffc059a0: 91 48 00 00 stw r10,0(r8) for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc059a4: 81 21 00 0c lwz r9,12(r1) ffc059a8: 88 09 00 00 lbz r0,0(r9) ffc059ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc059b0: 41 9e 00 4c beq- cr7,ffc059fc <== NEVER TAKEN } /* * Extract a single group record from the database */ static int scangr( ffc059b4: 39 29 00 01 addi r9,r9,1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc059b8: 39 60 00 01 li r11,1 if(*cp == ',') { *cp = '\0'; ffc059bc: 39 00 00 00 li r8,0 ffc059c0: 48 00 00 14 b ffc059d4 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc059c4: 88 09 00 00 lbz r0,0(r9) ffc059c8: 39 29 00 01 addi r9,r9,1 ffc059cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc059d0: 41 9e 00 24 beq- cr7,ffc059f4 if(*cp == ',') { ffc059d4: 2f 80 00 2c cmpwi cr7,r0,44 ffc059d8: 40 9e ff ec bne+ cr7,ffc059c4 *cp = '\0'; ffc059dc: 99 09 ff ff stb r8,-1(r9) grp->gr_mem[memcount++] = cp + 1; ffc059e0: 55 60 10 3a rlwinm r0,r11,2,0,29 ffc059e4: 39 6b 00 01 addi r11,r11,1 ffc059e8: 81 5b 00 0c lwz r10,12(r27) ffc059ec: 7d 2a 01 2e stwx r9,r10,r0 ffc059f0: 4b ff ff d4 b ffc059c4 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc059f4: 81 1b 00 0c lwz r8,12(r27) ffc059f8: 55 6b 10 3a rlwinm r11,r11,2,0,29 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; ffc059fc: 38 00 00 00 li r0,0 ffc05a00: 7c 08 59 2e stwx r0,r8,r11 return 1; ffc05a04: 3b a0 00 01 li r29,1 ffc05a08: 4b ff fe b0 b ffc058b8 =============================================================================== ffc05a0c : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05a0c: 94 21 ff c8 stwu r1,-56(r1) ffc05a10: 7c 08 02 a6 mflr r0 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05a14: 38 e0 00 00 li r7,0 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05a18: 93 c1 00 30 stw r30,48(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05a1c: 3b c1 00 18 addi r30,r1,24 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05a20: 93 e1 00 34 stw r31,52(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05a24: 3b e1 00 1c addi r31,r1,28 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05a28: 90 a1 00 18 stw r5,24(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05a2c: 7f c5 f3 78 mr r5,r30 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05a30: 90 c1 00 1c stw r6,28(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05a34: 7f e6 fb 78 mr r6,r31 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05a38: 93 61 00 24 stw r27,36(r1) ffc05a3c: 7c 9b 23 78 mr r27,r4 ffc05a40: 93 81 00 28 stw r28,40(r1) ffc05a44: 7c 7c 1b 78 mr r28,r3 ffc05a48: 93 a1 00 2c stw r29,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; ffc05a4c: 3b a0 00 00 li r29,0 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05a50: 90 01 00 3c stw r0,60(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05a54: 4b ff fc 95 bl ffc056e8 ffc05a58: 2f 83 00 00 cmpwi cr7,r3,0 ffc05a5c: 40 9e 00 2c bne- cr7,ffc05a88 || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } ffc05a60: 80 01 00 3c lwz r0,60(r1) ffc05a64: 7f a3 eb 78 mr r3,r29 ffc05a68: 83 61 00 24 lwz r27,36(r1) ffc05a6c: 7c 08 03 a6 mtlr r0 ffc05a70: 83 81 00 28 lwz r28,40(r1) ffc05a74: 83 a1 00 2c lwz r29,44(r1) ffc05a78: 83 c1 00 30 lwz r30,48(r1) ffc05a7c: 83 e1 00 34 lwz r31,52(r1) ffc05a80: 38 21 00 38 addi r1,r1,56 ffc05a84: 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) ffc05a88: 7f 83 e3 78 mr r3,r28 ffc05a8c: 38 9b 00 04 addi r4,r27,4 ffc05a90: 7f c5 f3 78 mr r5,r30 ffc05a94: 7f e6 fb 78 mr r6,r31 ffc05a98: 38 e0 00 00 li r7,0 ffc05a9c: 4b ff fc 4d bl ffc056e8 ffc05aa0: 2f 83 00 00 cmpwi cr7,r3,0 ffc05aa4: 41 9e ff bc beq+ cr7,ffc05a60 <== NEVER TAKEN || !scanInt(fp, &pwuid) ffc05aa8: 7f 83 e3 78 mr r3,r28 ffc05aac: 38 81 00 08 addi r4,r1,8 ffc05ab0: 4b ff fa ad bl ffc0555c ffc05ab4: 2f 83 00 00 cmpwi cr7,r3,0 ffc05ab8: 41 9e ff a8 beq+ cr7,ffc05a60 || !scanInt(fp, &pwgid) ffc05abc: 7f 83 e3 78 mr r3,r28 ffc05ac0: 38 81 00 0c addi r4,r1,12 ffc05ac4: 4b ff fa 99 bl ffc0555c ffc05ac8: 2f 83 00 00 cmpwi cr7,r3,0 ffc05acc: 41 9e ff 94 beq+ cr7,ffc05a60 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) ffc05ad0: 7f 83 e3 78 mr r3,r28 ffc05ad4: 38 9b 00 0c addi r4,r27,12 ffc05ad8: 7f c5 f3 78 mr r5,r30 ffc05adc: 7f e6 fb 78 mr r6,r31 ffc05ae0: 38 e0 00 00 li r7,0 ffc05ae4: 4b ff fc 05 bl ffc056e8 ffc05ae8: 2f 83 00 00 cmpwi cr7,r3,0 ffc05aec: 41 9e ff 74 beq+ cr7,ffc05a60 <== NEVER TAKEN || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) ffc05af0: 7f 83 e3 78 mr r3,r28 ffc05af4: 38 9b 00 10 addi r4,r27,16 ffc05af8: 7f c5 f3 78 mr r5,r30 ffc05afc: 7f e6 fb 78 mr r6,r31 ffc05b00: 38 e0 00 00 li r7,0 ffc05b04: 4b ff fb e5 bl ffc056e8 ffc05b08: 2f 83 00 00 cmpwi cr7,r3,0 ffc05b0c: 41 9e ff 54 beq+ cr7,ffc05a60 <== NEVER TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) ffc05b10: 7f 83 e3 78 mr r3,r28 ffc05b14: 38 9b 00 14 addi r4,r27,20 ffc05b18: 7f c5 f3 78 mr r5,r30 ffc05b1c: 7f e6 fb 78 mr r6,r31 ffc05b20: 38 e0 00 00 li r7,0 ffc05b24: 4b ff fb c5 bl ffc056e8 ffc05b28: 2f 83 00 00 cmpwi cr7,r3,0 ffc05b2c: 41 9e ff 34 beq+ cr7,ffc05a60 <== NEVER TAKEN || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) ffc05b30: 7f 83 e3 78 mr r3,r28 ffc05b34: 38 9b 00 18 addi r4,r27,24 ffc05b38: 7f c5 f3 78 mr r5,r30 ffc05b3c: 7f e6 fb 78 mr r6,r31 ffc05b40: 38 e0 00 01 li r7,1 ffc05b44: 4b ff fb a5 bl ffc056e8 ffc05b48: 2f 83 00 00 cmpwi cr7,r3,0 ffc05b4c: 41 be ff 14 beq- cr7,ffc05a60 return 0; pwd->pw_uid = pwuid; ffc05b50: 80 01 00 08 lwz r0,8(r1) pwd->pw_gid = pwgid; return 1; ffc05b54: 3b a0 00 01 li r29,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; ffc05b58: b0 1b 00 08 sth r0,8(r27) pwd->pw_gid = pwgid; ffc05b5c: 80 01 00 0c lwz r0,12(r1) ffc05b60: b0 1b 00 0a sth r0,10(r27) return 1; ffc05b64: 4b ff fe fc b ffc05a60 =============================================================================== ffc07374 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { ffc07374: 94 21 ff f0 stwu r1,-16(r1) ffc07378: 7c 08 02 a6 mflr r0 ffc0737c: 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)) { ffc07380: 80 04 00 3c lwz r0,60(r4) /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { ffc07384: 93 c1 00 08 stw r30,8(r1) ffc07388: 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)) { ffc0738c: 70 09 0e 78 andi. r9,r0,3704 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { ffc07390: 93 e1 00 0c stw r31,12(r1) ffc07394: 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)) { ffc07398: 40 82 00 1c bne- ffc073b4 <== ALWAYS TAKEN } else { i = iproc (c, tty); } return i; } ffc0739c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc073a0: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc073a4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc073a8: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc073ac: 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); ffc073b0: 4b ff fd d8 b ffc07188 <== 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); ffc073b4: 80 64 00 18 lwz r3,24(r4) ffc073b8: 38 a0 00 00 li r5,0 ffc073bc: 38 80 00 00 li r4,0 ffc073c0: 48 00 1a c1 bl ffc08e80 i = iproc (c, tty); ffc073c4: 7f e4 fb 78 mr r4,r31 ffc073c8: 7f c3 f3 78 mr r3,r30 ffc073cc: 4b ff fd bd bl ffc07188 ffc073d0: 7c 7e 1b 78 mr r30,r3 rtems_semaphore_release (tty->osem); ffc073d4: 80 7f 00 18 lwz r3,24(r31) ffc073d8: 48 00 1c 31 bl ffc09008 } else { i = iproc (c, tty); } return i; } ffc073dc: 80 01 00 14 lwz r0,20(r1) ffc073e0: 7f c3 f3 78 mr r3,r30 ffc073e4: 83 e1 00 0c lwz r31,12(r1) ffc073e8: 7c 08 03 a6 mtlr r0 ffc073ec: 83 c1 00 08 lwz r30,8(r1) ffc073f0: 38 21 00 10 addi r1,r1,16 ffc073f4: 4e 80 00 20 blr =============================================================================== ffc09024 : #include int statvfs (const char *path, struct statvfs *sb) { ffc09024: 94 21 ff c8 stwu r1,-56(r1) ffc09028: 7c 08 02 a6 mflr r0 ffc0902c: 93 a1 00 2c stw r29,44(r1) ffc09030: 7c 7d 1b 78 mr r29,r3 ffc09034: 90 01 00 3c stw r0,60(r1) ffc09038: 93 c1 00 30 stw r30,48(r1) ffc0903c: 7c 9e 23 78 mr r30,r4 ffc09040: 93 e1 00 34 stw r31,52(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 ) ) ffc09044: 48 00 ee a5 bl ffc17ee8 ffc09048: 3b e1 00 08 addi r31,r1,8 ffc0904c: 7c 64 1b 78 mr r4,r3 ffc09050: 38 a0 00 00 li r5,0 ffc09054: 7f a3 eb 78 mr r3,r29 ffc09058: 7f e6 fb 78 mr r6,r31 ffc0905c: 38 e0 00 01 li r7,1 ffc09060: 4b ff e5 75 bl ffc075d4 return -1; ffc09064: 3b a0 ff ff li r29,-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 ) ) ffc09068: 2f 83 00 00 cmpwi cr7,r3,0 ffc0906c: 40 be 00 3c bne+ cr7,ffc090a8 <== NEVER TAKEN return -1; mt_entry = loc.mt_entry; ffc09070: 83 a1 00 18 lwz r29,24(r1) fs_mount_root = &mt_entry->mt_fs_root; memset (sb, 0, sizeof (struct statvfs)); ffc09074: 38 80 00 00 li r4,0 ffc09078: 38 a0 00 38 li r5,56 ffc0907c: 7f c3 f3 78 mr r3,r30 ffc09080: 48 00 dc 81 bl ffc16d00 result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); ffc09084: 81 3d 00 28 lwz r9,40(r29) ffc09088: 38 7d 00 1c addi r3,r29,28 ffc0908c: 80 09 00 44 lwz r0,68(r9) ffc09090: 7f c4 f3 78 mr r4,r30 ffc09094: 7c 09 03 a6 mtctr r0 ffc09098: 4e 80 04 21 bctrl ffc0909c: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &loc ); ffc090a0: 7f e3 fb 78 mr r3,r31 ffc090a4: 4b ff e6 8d bl ffc07730 return result; } ffc090a8: 80 01 00 3c lwz r0,60(r1) ffc090ac: 7f a3 eb 78 mr r3,r29 ffc090b0: 83 c1 00 30 lwz r30,48(r1) ffc090b4: 7c 08 03 a6 mtlr r0 ffc090b8: 83 a1 00 2c lwz r29,44(r1) ffc090bc: 83 e1 00 34 lwz r31,52(r1) ffc090c0: 38 21 00 38 addi r1,r1,56 ffc090c4: 4e 80 00 20 blr =============================================================================== ffc0780c : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { ffc0780c: 94 21 ff f0 stwu r1,-16(r1) ffc07810: 7c 08 02 a6 mflr r0 ffc07814: 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; ffc07818: 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) { ffc0781c: 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 ) { ffc07820: 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) { ffc07824: 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 ) { ffc07828: 41 9e 00 30 beq- cr7,ffc07858 <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; ffc0782c: 3f e0 00 00 lis r31,0 ffc07830: 3b ff 2d 38 addi r31,r31,11576 ffc07834: 81 3f 00 0c lwz r9,12(r31) _Thread_Executing->libc_reent = this_reent; _fwalk (t->libc_reent, sync_wrapper); ffc07838: 3c 80 ff c0 lis r4,-64 ffc0783c: 38 84 78 70 addi r4,r4,30832 * 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; ffc07840: 83 c9 01 28 lwz r30,296(r9) _Thread_Executing->libc_reent = this_reent; ffc07844: 90 09 01 28 stw r0,296(r9) _fwalk (t->libc_reent, sync_wrapper); ffc07848: 80 63 01 28 lwz r3,296(r3) ffc0784c: 48 00 d5 15 bl ffc14d60 <_fwalk> _Thread_Executing->libc_reent = current_reent; ffc07850: 81 3f 00 0c lwz r9,12(r31) ffc07854: 93 c9 01 28 stw r30,296(r9) } } ffc07858: 80 01 00 14 lwz r0,20(r1) ffc0785c: 83 c1 00 08 lwz r30,8(r1) ffc07860: 7c 08 03 a6 mtlr r0 ffc07864: 83 e1 00 0c lwz r31,12(r1) ffc07868: 38 21 00 10 addi r1,r1,16 ffc0786c: 4e 80 00 20 blr =============================================================================== ffc08484 : int fd, int opt, struct termios *tp ) { switch (opt) { ffc08484: 2c 04 00 00 cmpwi r4,0 int tcsetattr( int fd, int opt, struct termios *tp ) { ffc08488: 94 21 ff f0 stwu r1,-16(r1) ffc0848c: 7c 08 02 a6 mflr r0 ffc08490: 93 c1 00 08 stw r30,8(r1) ffc08494: 7c 7e 1b 78 mr r30,r3 ffc08498: 93 e1 00 0c stw r31,12(r1) ffc0849c: 7c bf 2b 78 mr r31,r5 ffc084a0: 90 01 00 14 stw r0,20(r1) switch (opt) { ffc084a4: 41 82 00 50 beq- ffc084f4 ffc084a8: 2f 84 00 01 cmpwi cr7,r4,1 ffc084ac: 41 9e 00 2c beq- cr7,ffc084d8 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc084b0: 48 00 c7 45 bl ffc14bf4 <__errno> ffc084b4: 38 00 00 86 li r0,134 ffc084b8: 90 03 00 00 stw r0,0(r3) ffc084bc: 38 60 ff ff li r3,-1 * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } ffc084c0: 80 01 00 14 lwz r0,20(r1) ffc084c4: 83 c1 00 08 lwz r30,8(r1) ffc084c8: 7c 08 03 a6 mtlr r0 ffc084cc: 83 e1 00 0c lwz r31,12(r1) ffc084d0: 38 21 00 10 addi r1,r1,16 ffc084d4: 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) ffc084d8: 38 80 00 03 li r4,3 ffc084dc: 38 a0 00 00 li r5,0 ffc084e0: 4c c6 31 82 crclr 4*cr1+eq ffc084e4: 48 00 93 35 bl ffc11818 ffc084e8: 2f 83 00 00 cmpwi cr7,r3,0 return -1; ffc084ec: 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) ffc084f0: 41 9c 00 18 blt- cr7,ffc08508 <== NEVER TAKEN return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); ffc084f4: 7f c3 f3 78 mr r3,r30 ffc084f8: 38 80 00 02 li r4,2 ffc084fc: 7f e5 fb 78 mr r5,r31 ffc08500: 4c c6 31 82 crclr 4*cr1+eq ffc08504: 48 00 93 15 bl ffc11818 } } ffc08508: 80 01 00 14 lwz r0,20(r1) ffc0850c: 83 c1 00 08 lwz r30,8(r1) ffc08510: 7c 08 03 a6 mtlr r0 ffc08514: 83 e1 00 0c lwz r31,12(r1) ffc08518: 38 21 00 10 addi r1,r1,16 ffc0851c: 4e 80 00 20 blr =============================================================================== ffc09540 : #include int unlink( const char *path ) { ffc09540: 94 21 ff b0 stwu r1,-80(r1) ffc09544: 7c 08 02 a6 mflr r0 ffc09548: 93 e1 00 4c stw r31,76(r1) ffc0954c: 7c 7f 1b 78 mr r31,r3 ffc09550: 90 01 00 54 stw r0,84(r1) ffc09554: 93 61 00 3c stw r27,60(r1) ffc09558: 93 81 00 40 stw r28,64(r1) ffc0955c: 93 a1 00 44 stw r29,68(r1) ffc09560: 93 c1 00 48 stw r30,72(r1) /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); ffc09564: 4b ff c8 35 bl ffc05d98 if ( parentpathlen == 0 ) ffc09568: 2c 03 00 00 cmpwi r3,0 ffc0956c: 40 82 01 3c bne- ffc096a8 rtems_filesystem_get_start_loc( path, &i, &parentloc ); ffc09570: 3b c1 00 0c addi r30,r1,12 ffc09574: 7f e3 fb 78 mr r3,r31 ffc09578: 38 81 00 08 addi r4,r1,8 ffc0957c: 7f c5 f3 78 mr r5,r30 ffc09580: 4b ff dc 49 bl ffc071c8 ffc09584: 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; ffc09588: 3b 80 00 00 li r28,0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc0958c: 80 01 00 0c lwz r0,12(r1) name = path + parentpathlen; ffc09590: 7f bf ea 14 add r29,r31,r29 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc09594: 7f a3 eb 78 mr r3,r29 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc09598: 90 01 00 20 stw r0,32(r1) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc0959c: 3b e1 00 20 addi r31,r1,32 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc095a0: 80 01 00 10 lwz r0,16(r1) ffc095a4: 90 01 00 24 stw r0,36(r1) ffc095a8: 80 01 00 14 lwz r0,20(r1) ffc095ac: 90 01 00 28 stw r0,40(r1) ffc095b0: 80 01 00 18 lwz r0,24(r1) ffc095b4: 90 01 00 2c stw r0,44(r1) ffc095b8: 80 01 00 1c lwz r0,28(r1) ffc095bc: 90 01 00 30 stw r0,48(r1) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc095c0: 48 00 ef 8d bl ffc1854c ffc095c4: 7c 64 1b 78 mr r4,r3 ffc095c8: 7f a3 eb 78 mr r3,r29 ffc095cc: 4b ff c8 2d bl ffc05df8 ffc095d0: 7f bd 1a 14 add r29,r29,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc095d4: 7f a3 eb 78 mr r3,r29 ffc095d8: 48 00 ef 75 bl ffc1854c ffc095dc: 38 a0 00 00 li r5,0 ffc095e0: 7c 64 1b 78 mr r4,r3 ffc095e4: 7f e6 fb 78 mr r6,r31 ffc095e8: 7f a3 eb 78 mr r3,r29 ffc095ec: 38 e0 00 00 li r7,0 ffc095f0: 4b ff c6 81 bl ffc05c70 0, &loc, false ); if ( result != 0 ) { ffc095f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc095f8: 40 9e 00 74 bne- cr7,ffc0966c if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { ffc095fc: 81 21 00 2c lwz r9,44(r1) ffc09600: 7f e3 fb 78 mr r3,r31 ffc09604: 80 09 00 10 lwz r0,16(r9) ffc09608: 7c 09 03 a6 mtctr r0 ffc0960c: 4e 80 04 21 bctrl ffc09610: 2f 83 00 01 cmpwi cr7,r3,1 ffc09614: 41 9e 00 c8 beq- cr7,ffc096dc if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); ffc09618: 81 21 00 2c lwz r9,44(r1) ffc0961c: 7f e4 fb 78 mr r4,r31 ffc09620: 7f c3 f3 78 mr r3,r30 ffc09624: 80 09 00 0c lwz r0,12(r9) ffc09628: 7c 09 03 a6 mtctr r0 ffc0962c: 4e 80 04 21 bctrl ffc09630: 7c 7b 1b 78 mr r27,r3 rtems_filesystem_freenode( &loc ); ffc09634: 7f e3 fb 78 mr r3,r31 ffc09638: 4b ff c8 41 bl ffc05e78 if ( free_parentloc ) ffc0963c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc09640: 40 9e 00 38 bne- cr7,ffc09678 rtems_filesystem_freenode( &parentloc ); return result; } ffc09644: 80 01 00 54 lwz r0,84(r1) ffc09648: 7f 63 db 78 mr r3,r27 ffc0964c: 83 81 00 40 lwz r28,64(r1) ffc09650: 7c 08 03 a6 mtlr r0 ffc09654: 83 61 00 3c lwz r27,60(r1) ffc09658: 83 a1 00 44 lwz r29,68(r1) ffc0965c: 83 c1 00 48 lwz r30,72(r1) ffc09660: 83 e1 00 4c lwz r31,76(r1) ffc09664: 38 21 00 50 addi r1,r1,80 ffc09668: 4e 80 00 20 blr 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 ) ffc0966c: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_filesystem_freenode( &parentloc ); return -1; ffc09670: 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 ) ffc09674: 41 9e ff d0 beq+ cr7,ffc09644 <== NEVER TAKEN result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); ffc09678: 7f c3 f3 78 mr r3,r30 ffc0967c: 4b ff c7 fd bl ffc05e78 return result; } ffc09680: 80 01 00 54 lwz r0,84(r1) ffc09684: 7f 63 db 78 mr r3,r27 ffc09688: 83 81 00 40 lwz r28,64(r1) ffc0968c: 7c 08 03 a6 mtlr r0 ffc09690: 83 61 00 3c lwz r27,60(r1) ffc09694: 83 a1 00 44 lwz r29,68(r1) ffc09698: 83 c1 00 48 lwz r30,72(r1) ffc0969c: 83 e1 00 4c lwz r31,76(r1) ffc096a0: 38 21 00 50 addi r1,r1,80 ffc096a4: 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, ffc096a8: 7c 7d 1b 78 mr r29,r3 ffc096ac: 3b c1 00 0c addi r30,r1,12 ffc096b0: 7f e3 fb 78 mr r3,r31 ffc096b4: 7f a4 eb 78 mr r4,r29 ffc096b8: 38 a0 00 02 li r5,2 ffc096bc: 7f c6 f3 78 mr r6,r30 ffc096c0: 38 e0 00 00 li r7,0 ffc096c4: 4b ff c6 59 bl ffc05d1c RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) return -1; ffc096c8: 3b 60 ff ff li r27,-1 else { result = rtems_filesystem_evaluate_path( path, parentpathlen, RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) ffc096cc: 2f 83 00 00 cmpwi cr7,r3,0 ffc096d0: 40 be ff 74 bne- cr7,ffc09644 <== NEVER TAKEN return -1; free_parentloc = true; ffc096d4: 3b 80 00 01 li r28,1 ffc096d8: 4b ff fe b4 b ffc0958c rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); ffc096dc: 7f e3 fb 78 mr r3,r31 ffc096e0: 4b ff c7 99 bl ffc05e78 if ( free_parentloc ) ffc096e4: 2f 9c 00 00 cmpwi cr7,r28,0 ffc096e8: 41 be 00 0c beq+ cr7,ffc096f4 rtems_filesystem_freenode( &parentloc ); ffc096ec: 7f c3 f3 78 mr r3,r30 ffc096f0: 4b ff c7 89 bl ffc05e78 rtems_set_errno_and_return_minus_one( EISDIR ); ffc096f4: 48 00 dc b9 bl ffc173ac <__errno> ffc096f8: 38 00 00 15 li r0,21 ffc096fc: 90 03 00 00 stw r0,0(r3) ffc09700: 3b 60 ff ff li r27,-1 ffc09704: 4b ff ff 40 b ffc09644 =============================================================================== ffc096e0 : */ int unmount( const char *path ) { ffc096e0: 94 21 ff d0 stwu r1,-48(r1) ffc096e4: 7c 08 02 a6 mflr r0 ffc096e8: 93 c1 00 28 stw r30,40(r1) ffc096ec: 7c 7e 1b 78 mr r30,r3 ffc096f0: 90 01 00 34 stw r0,52(r1) ffc096f4: 93 e1 00 2c stw r31,44(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 ) ) ffc096f8: 48 00 b3 e5 bl ffc14adc ffc096fc: 3b e1 00 08 addi r31,r1,8 ffc09700: 7c 64 1b 78 mr r4,r3 ffc09704: 38 a0 00 00 li r5,0 ffc09708: 7f c3 f3 78 mr r3,r30 ffc0970c: 7f e6 fb 78 mr r6,r31 ffc09710: 38 e0 00 01 li r7,1 ffc09714: 4b ff c2 8d bl ffc059a0 ffc09718: 2f 83 00 00 cmpwi cr7,r3,0 ffc0971c: 40 9e 00 98 bne- cr7,ffc097b4 return -1; mt_entry = loc.mt_entry; ffc09720: 83 c1 00 18 lwz r30,24(r1) /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ ffc09724: 80 01 00 08 lwz r0,8(r1) ffc09728: 81 3e 00 1c lwz r9,28(r30) ffc0972c: 7f 89 00 00 cmpw cr7,r9,r0 ffc09730: 40 9e 00 a4 bne- cr7,ffc097d4 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); ffc09734: 7f e3 fb 78 mr r3,r31 ffc09738: 4b ff c3 c5 bl ffc05afc * 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 ) ffc0973c: 3d 20 00 00 lis r9,0 ffc09740: 81 29 27 3c lwz r9,10044(r9) ffc09744: 80 09 00 14 lwz r0,20(r9) ffc09748: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0974c: 41 9e 00 bc beq- cr7,ffc09808 /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, ffc09750: 80 9e 00 2c lwz r4,44(r30) ffc09754: 3c 60 ff c1 lis r3,-63 ffc09758: 38 63 96 cc addi r3,r3,-26932 ffc0975c: 4b ff cf 25 bl ffc06680 ffc09760: 2f 83 00 00 cmpwi cr7,r3,0 ffc09764: 40 9e 00 a4 bne- cr7,ffc09808 * 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 ) ffc09768: 7f c3 f3 78 mr r3,r30 ffc0976c: 4b ff c8 05 bl ffc05f70 ffc09770: 2f 83 00 01 cmpwi cr7,r3,1 ffc09774: 41 9e 00 94 beq- cr7,ffc09808 * 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 ) ffc09778: 81 3e 00 14 lwz r9,20(r30) ffc0977c: 7f c3 f3 78 mr r3,r30 return -1; ffc09780: 3b e0 ff ff li r31,-1 * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) ffc09784: 80 09 00 28 lwz r0,40(r9) ffc09788: 7c 09 03 a6 mtctr r0 ffc0978c: 4e 80 04 21 bctrl ffc09790: 2f 83 00 00 cmpwi cr7,r3,0 ffc09794: 41 9e 00 a0 beq- cr7,ffc09834 <== ALWAYS TAKEN rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } ffc09798: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc0979c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc097a0: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc097a4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc097a8: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc097ac: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc097b0: 4e 80 00 20 blr <== NOT EXECUTED ffc097b4: 80 01 00 34 lwz r0,52(r1) * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; ffc097b8: 3b e0 ff ff li r31,-1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } ffc097bc: 7f e3 fb 78 mr r3,r31 ffc097c0: 83 c1 00 28 lwz r30,40(r1) ffc097c4: 7c 08 03 a6 mtlr r0 ffc097c8: 83 e1 00 2c lwz r31,44(r1) ffc097cc: 38 21 00 30 addi r1,r1,48 ffc097d0: 4e 80 00 20 blr /* * 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 ); ffc097d4: 7f e3 fb 78 mr r3,r31 ffc097d8: 4b ff c3 25 bl ffc05afc rtems_set_errno_and_return_minus_one( EACCES ); ffc097dc: 3b e0 ff ff li r31,-1 ffc097e0: 48 00 9c 51 bl ffc13430 <__errno> ffc097e4: 38 00 00 0d li r0,13 ffc097e8: 90 03 00 00 stw r0,0(r3) rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } ffc097ec: 7f e3 fb 78 mr r3,r31 ffc097f0: 80 01 00 34 lwz r0,52(r1) ffc097f4: 83 c1 00 28 lwz r30,40(r1) ffc097f8: 7c 08 03 a6 mtlr r0 ffc097fc: 83 e1 00 2c lwz r31,44(r1) ffc09800: 38 21 00 30 addi r1,r1,48 ffc09804: 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 ); ffc09808: 48 00 9c 29 bl ffc13430 <__errno> ffc0980c: 38 00 00 10 li r0,16 ffc09810: 90 03 00 00 stw r0,0(r3) ffc09814: 3b e0 ff ff li r31,-1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } ffc09818: 7f e3 fb 78 mr r3,r31 ffc0981c: 80 01 00 34 lwz r0,52(r1) ffc09820: 83 c1 00 28 lwz r30,40(r1) ffc09824: 7c 08 03 a6 mtlr r0 ffc09828: 83 e1 00 2c lwz r31,44(r1) ffc0982c: 38 21 00 30 addi r1,r1,48 ffc09830: 4e 80 00 20 blr * 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){ ffc09834: 81 3e 00 28 lwz r9,40(r30) ffc09838: 7f c3 f3 78 mr r3,r30 ffc0983c: 80 09 00 2c lwz r0,44(r9) ffc09840: 7c 09 03 a6 mtctr r0 ffc09844: 4e 80 04 21 bctrl ffc09848: 2f 83 00 00 cmpwi cr7,r3,0 ffc0984c: 40 9e 00 58 bne- cr7,ffc098a4 <== 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 ); ffc09850: 3f e0 00 00 lis r31,0 ffc09854: 80 7f 27 c0 lwz r3,10176(r31) ffc09858: 38 80 00 00 li r4,0 ffc0985c: 38 a0 00 00 li r5,0 ffc09860: 48 00 0c a9 bl ffc0a508 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc09864: 7f c3 f3 78 mr r3,r30 ffc09868: 48 00 1a b9 bl ffc0b320 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0986c: 80 7f 27 c0 lwz r3,10176(r31) */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; ffc09870: 3b e0 00 00 li r31,0 ffc09874: 48 00 0e 1d bl ffc0a690 /* * 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 ); ffc09878: 38 7e 00 08 addi r3,r30,8 ffc0987c: 4b ff c2 81 bl ffc05afc free( mt_entry ); ffc09880: 7f c3 f3 78 mr r3,r30 ffc09884: 4b ff c2 a5 bl ffc05b28 return 0; } ffc09888: 80 01 00 34 lwz r0,52(r1) ffc0988c: 7f e3 fb 78 mr r3,r31 ffc09890: 83 c1 00 28 lwz r30,40(r1) ffc09894: 7c 08 03 a6 mtlr r0 ffc09898: 83 e1 00 2c lwz r31,44(r1) ffc0989c: 38 21 00 30 addi r1,r1,48 ffc098a0: 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 ) ffc098a4: 81 3e 00 14 lwz r9,20(r30) ffc098a8: 7f c3 f3 78 mr r3,r30 ffc098ac: 80 09 00 20 lwz r0,32(r9) <== NOT EXECUTED ffc098b0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc098b4: 4e 80 04 21 bctrl <== NOT EXECUTED ffc098b8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc098bc: 41 9e fe dc beq+ cr7,ffc09798 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); ffc098c0: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc098c4: 48 00 15 cd bl ffc0ae90 <== NOT EXECUTED =============================================================================== ffc081b8 : */ void vprintk( const char *fmt, va_list ap ) { ffc081b8: 94 21 ff a8 stwu r1,-88(r1) ffc081bc: 7d 80 00 26 mfcr r12 ffc081c0: 7c 08 02 a6 mflr r0 ffc081c4: 93 21 00 3c stw r25,60(r1) ffc081c8: 7c 99 23 78 mr r25,r4 ffc081cc: 93 e1 00 54 stw r31,84(r1) ffc081d0: 7c 7f 1b 78 mr r31,r3 ffc081d4: 90 01 00 5c stw r0,92(r1) ffc081d8: 92 a1 00 2c stw r21,44(r1) ffc081dc: 92 c1 00 30 stw r22,48(r1) ffc081e0: 92 e1 00 34 stw r23,52(r1) ffc081e4: 93 01 00 38 stw r24,56(r1) ffc081e8: 93 41 00 40 stw r26,64(r1) ffc081ec: 93 61 00 44 stw r27,68(r1) ffc081f0: 93 81 00 48 stw r28,72(r1) ffc081f4: 93 a1 00 4c stw r29,76(r1) ffc081f8: 93 c1 00 50 stw r30,80(r1) ffc081fc: 91 81 00 28 stw r12,40(r1) for (; *fmt != '\0'; fmt++) { ffc08200: 88 63 00 00 lbz r3,0(r3) ffc08204: 2f 83 00 00 cmpwi cr7,r3,0 ffc08208: 41 9e 00 f4 beq- cr7,ffc082fc <== NEVER TAKEN bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); ffc0820c: 3f 00 00 00 lis r24,0 * console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk( ffc08210: 3a c1 00 08 addi r22,r1,8 ffc08214: 3e e0 ff c2 lis r23,-62 char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { str = ""; ffc08218: 3e a0 ff c2 lis r21,-62 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { ffc0821c: 2f 83 00 25 cmpwi cr7,r3,37 ffc08220: 40 9e 00 c4 bne- cr7,ffc082e4 BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { ffc08224: 8c 7f 00 01 lbzu r3,1(r31) unsigned base = 0; unsigned width = 0; bool lflag = false; bool minus = false; bool sign = false; char lead = ' '; ffc08228: 3b 40 00 20 li r26,32 if (*fmt != '%') { BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { ffc0822c: 2f 83 00 30 cmpwi cr7,r3,48 ffc08230: 41 9e 02 14 beq- cr7,ffc08444 lead = '0'; fmt++; } if (*fmt == '-' ) { ffc08234: 2f 83 00 2d cmpwi cr7,r3,45 { for (; *fmt != '\0'; fmt++) { unsigned base = 0; unsigned width = 0; bool lflag = false; bool minus = false; ffc08238: 39 20 00 00 li r9,0 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { ffc0823c: 41 9e 01 fc beq- cr7,ffc08438 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc08240: 38 03 ff d0 addi r0,r3,-48 ffc08244: 54 00 06 3e clrlwi r0,r0,24 ffc08248: 2b 80 00 09 cmplwi cr7,r0,9 ffc0824c: 3b c0 00 00 li r30,0 ffc08250: 41 9d 00 24 bgt- cr7,ffc08274 width *= 10; ffc08254: 1f de 00 0a mulli r30,r30,10 width += ((unsigned) *fmt - '0'); ffc08258: 7f de 1a 14 add r30,r30,r3 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc0825c: 8c 7f 00 01 lbzu r3,1(r31) width *= 10; width += ((unsigned) *fmt - '0'); ffc08260: 3b de ff d0 addi r30,r30,-48 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc08264: 38 03 ff d0 addi r0,r3,-48 ffc08268: 54 00 06 3e clrlwi r0,r0,24 ffc0826c: 2b 80 00 09 cmplwi cr7,r0,9 ffc08270: 40 9d ff e4 ble+ cr7,ffc08254 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { ffc08274: 2f 83 00 6c cmpwi cr7,r3,108 ffc08278: 41 9e 02 18 beq- cr7,ffc08490 lflag = true; c = *++fmt; } if ( c == 'c' ) { ffc0827c: 2f 83 00 63 cmpwi cr7,r3,99 ffc08280: 41 9e 01 d0 beq- cr7,ffc08450 /* 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' ) { ffc08284: 2f 83 00 73 cmpwi cr7,r3,115 ffc08288: 41 9e 02 2c beq- cr7,ffc084b4 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { ffc0828c: 2f 83 00 6f cmpwi cr7,r3,111 ffc08290: 41 9e 02 18 beq- cr7,ffc084a8 <== NEVER TAKEN ffc08294: 2f 83 00 4f cmpwi cr7,r3,79 ffc08298: 41 9e 02 10 beq- cr7,ffc084a8 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || ffc0829c: 2f 83 00 69 cmpwi cr7,r3,105 ffc082a0: 41 9e 00 a0 beq- cr7,ffc08340 ffc082a4: 2f 83 00 49 cmpwi cr7,r3,73 ffc082a8: 41 9e 00 98 beq- cr7,ffc08340 ffc082ac: 2f 83 00 64 cmpwi cr7,r3,100 ffc082b0: 41 9e 00 90 beq- cr7,ffc08340 c == 'd' || c == 'D' ) { ffc082b4: 2f 83 00 44 cmpwi cr7,r3,68 ffc082b8: 41 9e 00 88 beq- cr7,ffc08340 base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { ffc082bc: 2f 83 00 75 cmpwi cr7,r3,117 ffc082c0: 41 9e 03 2c beq- cr7,ffc085ec ffc082c4: 2f 83 00 55 cmpwi cr7,r3,85 ffc082c8: 41 9e 03 24 beq- cr7,ffc085ec base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { ffc082cc: 2f 83 00 78 cmpwi cr7,r3,120 ffc082d0: 41 9e 03 28 beq- cr7,ffc085f8 ffc082d4: 2f 83 00 58 cmpwi cr7,r3,88 ffc082d8: 41 9e 03 20 beq- cr7,ffc085f8 base = 16; sign = false; } else if ( c == 'p' ) { ffc082dc: 2f 83 00 70 cmpwi cr7,r3,112 ffc082e0: 41 9e 03 18 beq- cr7,ffc085f8 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); ffc082e4: 80 18 26 9c lwz r0,9884(r24) ffc082e8: 7c 09 03 a6 mtctr r0 ffc082ec: 4e 80 04 21 bctrl void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { ffc082f0: 8c 7f 00 01 lbzu r3,1(r31) ffc082f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc082f8: 40 9e ff 24 bne+ cr7,ffc0821c sign, width, lead ); } } ffc082fc: 80 01 00 5c lwz r0,92(r1) ffc08300: 81 81 00 28 lwz r12,40(r1) ffc08304: 7c 08 03 a6 mtlr r0 ffc08308: 82 a1 00 2c lwz r21,44(r1) ffc0830c: 82 c1 00 30 lwz r22,48(r1) ffc08310: 7d 80 81 20 mtcrf 8,r12 ffc08314: 82 e1 00 34 lwz r23,52(r1) ffc08318: 83 01 00 38 lwz r24,56(r1) ffc0831c: 83 21 00 3c lwz r25,60(r1) ffc08320: 83 41 00 40 lwz r26,64(r1) ffc08324: 83 61 00 44 lwz r27,68(r1) ffc08328: 83 81 00 48 lwz r28,72(r1) ffc0832c: 83 a1 00 4c lwz r29,76(r1) ffc08330: 83 c1 00 50 lwz r30,80(r1) ffc08334: 83 e1 00 54 lwz r31,84(r1) ffc08338: 38 21 00 58 addi r1,r1,88 ffc0833c: 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; ffc08340: 39 20 00 01 li r9,1 ffc08344: 3b a0 00 0a li r29,10 BSP_output_char(c); continue; } printNum( lflag ? va_arg(ap, long) : (long) va_arg(ap, int), ffc08348: 89 79 00 00 lbz r11,0(r25) ffc0834c: 2b 8b 00 08 cmplwi cr7,r11,8 ffc08350: 40 9c 01 48 bge- cr7,ffc08498 ffc08354: 55 60 10 3a rlwinm r0,r11,2,0,29 ffc08358: 81 59 00 08 lwz r10,8(r25) ffc0835c: 39 6b 00 01 addi r11,r11,1 ffc08360: 99 79 00 00 stb r11,0(r25) ffc08364: 7d 4a 02 14 add r10,r10,r0 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { ffc08368: 2f 89 00 00 cmpwi cr7,r9,0 } else { BSP_output_char(c); continue; } printNum( ffc0836c: 83 8a 00 00 lwz r28,0(r10) unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { ffc08370: 41 9e 00 0c beq- cr7,ffc0837c ffc08374: 2f 9c 00 00 cmpwi cr7,r28,0 ffc08378: 41 9c 02 8c blt- cr7,ffc08604 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { ffc0837c: 7c 1c eb 96 divwu r0,r28,r29 ffc08380: 2f 80 00 00 cmpwi cr7,r0,0 ffc08384: 57 a7 06 3e clrlwi r7,r29,24 if (maxwidth) maxwidth--; } else { unsigned_num = (unsigned long) num; } count = 0; ffc08388: 39 20 00 00 li r9,0 while ((n = unsigned_num / base) > 0) { ffc0838c: 40 be 00 10 bne+ cr7,ffc0839c ffc08390: 48 00 02 98 b ffc08628 ffc08394: 7c 1c 03 78 mr r28,r0 ffc08398: 7d 60 5b 78 mr r0,r11 ffc0839c: 7d 60 eb 96 divwu r11,r0,r29 ffc083a0: 2f 8b 00 00 cmpwi cr7,r11,0 toPrint[count++] = (char) (unsigned_num - (n * base)); ffc083a4: 7d 07 01 d6 mullw r8,r7,r0 ffc083a8: 7d 41 4a 14 add r10,r1,r9 ffc083ac: 7f 88 e0 50 subf r28,r8,r28 ffc083b0: 9b 8a 00 08 stb r28,8(r10) ffc083b4: 39 29 00 01 addi r9,r9,1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { ffc083b8: 40 9e ff dc bne+ cr7,ffc08394 ffc083bc: 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-- ) ffc083c0: 7f 9b f0 40 cmplw cr7,r27,r30 count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; ffc083c4: 7d 21 4a 14 add r9,r1,r9 ffc083c8: 98 09 00 08 stb r0,8(r9) for (n=maxwidth ; n > count; n-- ) ffc083cc: 40 9c 00 24 bge- cr7,ffc083f0 ffc083d0: 3b 98 26 9c addi r28,r24,9884 BSP_output_char(lead); ffc083d4: 80 1c 00 00 lwz r0,0(r28) ffc083d8: 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-- ) ffc083dc: 3b de ff ff addi r30,r30,-1 BSP_output_char(lead); ffc083e0: 7c 09 03 a6 mtctr r0 ffc083e4: 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-- ) ffc083e8: 7f 9b f0 40 cmplw cr7,r27,r30 ffc083ec: 41 9c ff e8 blt+ cr7,ffc083d4 BSP_output_char(lead); for (n = 0; n < count; n++) { ffc083f0: 2f 9b 00 00 cmpwi cr7,r27,0 ffc083f4: 41 be fe fc beq- cr7,ffc082f0 <== NEVER TAKEN * console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk( ffc083f8: 7f b6 da 14 add r29,r22,r27 ffc083fc: 3b c0 00 00 li r30,0 ffc08400: 3b 98 26 9c addi r28,r24,9884 ffc08404: 3b 57 8f 58 addi r26,r23,-28840 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)])]); ffc08408: 8d 3d ff ff lbzu r9,-1(r29) toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { ffc0840c: 3b de 00 01 addi r30,r30,1 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); ffc08410: 80 1c 00 00 lwz r0,0(r28) ffc08414: 7c 7a 48 ae lbzx r3,r26,r9 ffc08418: 7c 09 03 a6 mtctr r0 ffc0841c: 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++) { ffc08420: 7f 9b f0 40 cmplw cr7,r27,r30 ffc08424: 41 9d ff e4 bgt+ cr7,ffc08408 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { ffc08428: 8c 7f 00 01 lbzu r3,1(r31) ffc0842c: 2f 83 00 00 cmpwi cr7,r3,0 ffc08430: 40 9e fd ec bne+ cr7,ffc0821c <== ALWAYS TAKEN ffc08434: 4b ff fe c8 b ffc082fc <== NOT EXECUTED lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; fmt++; ffc08438: 8c 7f 00 01 lbzu r3,1(r31) if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; ffc0843c: 39 20 00 01 li r9,1 ffc08440: 4b ff fe 00 b ffc08240 continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; ffc08444: 8c 7f 00 01 lbzu r3,1(r31) BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { lead = '0'; ffc08448: 3b 40 00 30 li r26,48 ffc0844c: 4b ff fd e8 b ffc08234 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); ffc08450: 89 39 00 00 lbz r9,0(r25) ffc08454: 2b 89 00 08 cmplwi cr7,r9,8 ffc08458: 40 9c 01 64 bge- cr7,ffc085bc <== NEVER TAKEN ffc0845c: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc08460: 81 79 00 08 lwz r11,8(r25) ffc08464: 39 29 00 01 addi r9,r9,1 ffc08468: 99 39 00 00 stb r9,0(r25) ffc0846c: 7d 6b 02 14 add r11,r11,r0 BSP_output_char(chr); ffc08470: 80 18 26 9c lwz r0,9884(r24) ffc08474: 88 6b 00 03 lbz r3,3(r11) ffc08478: 7c 09 03 a6 mtctr r0 ffc0847c: 4e 80 04 21 bctrl void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { ffc08480: 8c 7f 00 01 lbzu r3,1(r31) ffc08484: 2f 83 00 00 cmpwi cr7,r3,0 ffc08488: 40 9e fd 94 bne+ cr7,ffc0821c <== ALWAYS TAKEN ffc0848c: 4b ff fe 70 b ffc082fc <== NOT EXECUTED fmt++; } if ((c = *fmt) == 'l') { lflag = true; c = *++fmt; ffc08490: 8c 7f 00 01 lbzu r3,1(r31) ffc08494: 4b ff fd e8 b ffc0827c BSP_output_char(c); continue; } printNum( lflag ? va_arg(ap, long) : (long) va_arg(ap, int), ffc08498: 81 59 00 04 lwz r10,4(r25) ffc0849c: 38 0a 00 04 addi r0,r10,4 ffc084a0: 90 19 00 04 stw r0,4(r25) ffc084a4: 4b ff fe c4 b ffc08368 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { base = 8; sign = false; ffc084a8: 39 20 00 00 li r9,0 ffc084ac: 3b a0 00 08 li r29,8 ffc084b0: 4b ff fe 98 b ffc08348 } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); ffc084b4: 89 79 00 00 lbz r11,0(r25) ffc084b8: 2b 8b 00 08 cmplwi cr7,r11,8 ffc084bc: 40 9c 01 10 bge- cr7,ffc085cc <== NEVER TAKEN ffc084c0: 55 60 10 3a rlwinm r0,r11,2,0,29 ffc084c4: 81 59 00 08 lwz r10,8(r25) ffc084c8: 39 6b 00 01 addi r11,r11,1 ffc084cc: 99 79 00 00 stb r11,0(r25) ffc084d0: 7d 4a 02 14 add r10,r10,r0 ffc084d4: 83 6a 00 00 lwz r27,0(r10) if ( str == NULL ) { ffc084d8: 2f 9b 00 00 cmpwi cr7,r27,0 ffc084dc: 41 9e 01 08 beq- cr7,ffc085e4 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) ffc084e0: 88 1b 00 00 lbz r0,0(r27) ffc084e4: 3b a0 00 00 li r29,0 ffc084e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc084ec: 41 9e 00 14 beq- cr7,ffc08500 ffc084f0: 3b bd 00 01 addi r29,r29,1 ffc084f4: 7c 1b e8 ae lbzx r0,r27,r29 ffc084f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc084fc: 40 9e ff f4 bne+ cr7,ffc084f0 ; /* leading spaces */ if ( !minus ) ffc08500: 2e 09 00 00 cmpwi cr4,r9,0 ffc08504: 40 92 00 30 bne- cr4,ffc08534 for ( i=len ; i ffc08510: 7f ba eb 78 mr r26,r29 ffc08514: 3b 98 26 9c addi r28,r24,9884 BSP_output_char(' '); ffc08518: 80 1c 00 00 lwz r0,0(r28) ffc0851c: 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) { ffc08534: 2f 9e 00 00 cmpwi cr7,r30,0 ffc08538: 40 9e 00 10 bne- cr7,ffc08548 width = len; } /* output the string */ for ( i=0 ; i ffc08544: 7f be eb 78 mr r30,r29 ffc08548: 88 7b 00 00 lbz r3,0(r27) ffc0854c: 2f 83 00 00 cmpwi cr7,r3,0 ffc08550: 41 9e 00 30 beq- cr7,ffc08580 <== NEVER TAKEN BSP_output_char(*str); ffc08554: 80 18 26 9c lwz r0,9884(r24) ffc08558: 3b 98 26 9c addi r28,r24,9884 ffc0855c: 7c 09 03 a6 mtctr r0 ffc08560: 4e 80 04 21 bctrl ffc08564: 48 00 00 10 b ffc08574 ffc08568: 80 1c 00 00 lwz r0,0(r28) ffc0856c: 7c 09 03 a6 mtctr r0 ffc08570: 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 ) ffc08580: 41 b2 fd 70 beq- cr4,ffc082f0 for ( i=len ; i ffc0858c: 3b 98 26 9c addi r28,r24,9884 BSP_output_char(' '); ffc08590: 80 1c 00 00 lwz r0,0(r28) ffc08594: 38 60 00 20 li r3,32 for ( i=0 ; i void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { ffc085ac: 8c 7f 00 01 lbzu r3,1(r31) ffc085b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc085b4: 40 9e fc 68 bne+ cr7,ffc0821c <== ALWAYS TAKEN ffc085b8: 4b ff fd 44 b ffc082fc <== 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); ffc085bc: 81 79 00 04 lwz r11,4(r25) <== NOT EXECUTED ffc085c0: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED ffc085c4: 90 19 00 04 stw r0,4(r25) <== NOT EXECUTED ffc085c8: 4b ff fe a8 b ffc08470 <== NOT EXECUTED } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); ffc085cc: 81 59 00 04 lwz r10,4(r25) <== NOT EXECUTED ffc085d0: 38 0a 00 04 addi r0,r10,4 <== NOT EXECUTED ffc085d4: 90 19 00 04 stw r0,4(r25) <== NOT EXECUTED ffc085d8: 83 6a 00 00 lwz r27,0(r10) <== NOT EXECUTED if ( str == NULL ) { ffc085dc: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED ffc085e0: 40 9e ff 00 bne+ cr7,ffc084e0 <== NOT EXECUTED str = ""; ffc085e4: 3b 75 84 a8 addi r27,r21,-31576 ffc085e8: 4b ff fe f8 b ffc084e0 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; ffc085ec: 39 20 00 00 li r9,0 ffc085f0: 3b a0 00 0a li r29,10 ffc085f4: 4b ff fd 54 b ffc08348 } else if ( c == 'x' || c == 'X' ) { base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; ffc085f8: 39 20 00 00 li r9,0 ffc085fc: 3b a0 00 10 li r29,16 ffc08600: 4b ff fd 48 b ffc08348 unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); ffc08604: 80 18 26 9c lwz r0,9884(r24) ffc08608: 38 60 00 2d li r3,45 unsigned_num = (unsigned long) -num; ffc0860c: 7f 9c 00 d0 neg r28,r28 unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); ffc08610: 7c 09 03 a6 mtctr r0 ffc08614: 4e 80 04 21 bctrl unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; ffc08618: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0861c: 41 be fd 60 beq- cr7,ffc0837c ffc08620: 3b de ff ff addi r30,r30,-1 ffc08624: 4b ff fd 58 b ffc0837c } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { ffc08628: 7f 80 e3 78 mr r0,r28 ffc0862c: 3b 60 00 01 li r27,1 if (maxwidth) maxwidth--; } else { unsigned_num = (unsigned long) num; } count = 0; ffc08630: 39 20 00 00 li r9,0 ffc08634: 4b ff fd 8c b ffc083c0 =============================================================================== ffc17b98 : ssize_t write( int fd, const void *buffer, size_t count ) { ffc17b98: 94 21 ff f0 stwu r1,-16(r1) ffc17b9c: 7c 08 02 a6 mflr r0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc17ba0: 3d 20 00 00 lis r9,0 ssize_t write( int fd, const void *buffer, size_t count ) { ffc17ba4: 90 01 00 14 stw r0,20(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc17ba8: 80 09 26 4c lwz r0,9804(r9) ssize_t write( int fd, const void *buffer, size_t count ) { ffc17bac: 93 e1 00 0c stw r31,12(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc17bb0: 7f 83 00 40 cmplw cr7,r3,r0 ffc17bb4: 40 9c 00 8c bge- cr7,ffc17c40 iop = rtems_libio_iop( fd ); ffc17bb8: 3d 60 00 00 lis r11,0 ffc17bbc: 83 eb 27 0c lwz r31,9996(r11) ffc17bc0: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc17bc4: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open( iop ); ffc17bc8: 81 7f 00 18 lwz r11,24(r31) ffc17bcc: 71 6a 01 00 andi. r10,r11,256 ffc17bd0: 41 82 00 70 beq- ffc17c40 rtems_libio_check_buffer( buffer ); ffc17bd4: 2f 84 00 00 cmpwi cr7,r4,0 ffc17bd8: 41 9e 00 7c beq- cr7,ffc17c54 <== NEVER TAKEN rtems_libio_check_count( count ); ffc17bdc: 2f 85 00 00 cmpwi cr7,r5,0 ffc17be0: 38 60 00 00 li r3,0 ffc17be4: 41 9e 00 48 beq- cr7,ffc17c2c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc17be8: 71 60 00 04 andi. r0,r11,4 ffc17bec: 41 82 00 68 beq- ffc17c54 /* * Now process the write() request. */ rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count ); ffc17bf0: 81 3f 00 24 lwz r9,36(r31) ffc17bf4: 7f e3 fb 78 mr r3,r31 ffc17bf8: 80 09 00 0c lwz r0,12(r9) ffc17bfc: 7c 09 03 a6 mtctr r0 ffc17c00: 4e 80 04 21 bctrl if ( rc > 0 ) ffc17c04: 2c 03 00 00 cmpwi r3,0 ffc17c08: 40 81 00 24 ble- ffc17c2c iop->offset += rc; ffc17c0c: 81 7f 00 10 lwz r11,16(r31) ffc17c10: 7c 6a 1b 78 mr r10,r3 ffc17c14: 81 9f 00 14 lwz r12,20(r31) ffc17c18: 7c 69 fe 70 srawi r9,r3,31 ffc17c1c: 7d 4a 60 14 addc r10,r10,r12 ffc17c20: 7d 29 59 14 adde r9,r9,r11 ffc17c24: 91 3f 00 10 stw r9,16(r31) ffc17c28: 91 5f 00 14 stw r10,20(r31) return rc; } ffc17c2c: 80 01 00 14 lwz r0,20(r1) ffc17c30: 83 e1 00 0c lwz r31,12(r1) ffc17c34: 38 21 00 10 addi r1,r1,16 ffc17c38: 7c 08 03 a6 mtlr r0 ffc17c3c: 4e 80 00 20 blr ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); ffc17c40: 4b ff a7 1d bl ffc1235c <__errno> ffc17c44: 38 00 00 09 li r0,9 ffc17c48: 90 03 00 00 stw r0,0(r3) ffc17c4c: 38 60 ff ff li r3,-1 ffc17c50: 4b ff ff dc b ffc17c2c rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc17c54: 4b ff a7 09 bl ffc1235c <__errno> ffc17c58: 38 00 00 16 li r0,22 ffc17c5c: 90 03 00 00 stw r0,0(r3) ffc17c60: 38 60 ff ff li r3,-1 ffc17c64: 4b ff ff c8 b ffc17c2c =============================================================================== ffc09de4 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc09de4: 94 21 ff d8 stwu r1,-40(r1) ffc09de8: 7c 08 02 a6 mflr r0 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc09dec: 3d 20 00 00 lis r9,0 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc09df0: 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 ); ffc09df4: 80 09 26 4c lwz r0,9804(r9) ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc09df8: 93 61 00 14 stw r27,20(r1) ffc09dfc: 7c bb 2b 78 mr r27,r5 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc09e00: 7f 83 00 40 cmplw cr7,r3,r0 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc09e04: 93 21 00 0c stw r25,12(r1) ffc09e08: 93 41 00 10 stw r26,16(r1) ffc09e0c: 93 81 00 18 stw r28,24(r1) ffc09e10: 93 a1 00 1c stw r29,28(r1) ffc09e14: 93 c1 00 20 stw r30,32(r1) ffc09e18: 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 ); ffc09e1c: 40 9c 01 5c bge- cr7,ffc09f78 iop = rtems_libio_iop( fd ); ffc09e20: 3d 20 00 00 lis r9,0 ffc09e24: 83 29 27 0c lwz r25,9996(r9) ffc09e28: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc09e2c: 7f 39 1a 14 add r25,r25,r3 rtems_libio_check_is_open( iop ); ffc09e30: 80 19 00 18 lwz r0,24(r25) ffc09e34: 70 09 01 00 andi. r9,r0,256 ffc09e38: 41 82 01 40 beq- ffc09f78 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc09e3c: 70 09 00 04 andi. r9,r0,4 ffc09e40: 41 82 00 f8 beq- ffc09f38 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) ffc09e44: 2f 84 00 00 cmpwi cr7,r4,0 ffc09e48: 41 9e 00 f0 beq- cr7,ffc09f38 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) ffc09e4c: 2f 85 00 00 cmpwi cr7,r5,0 ffc09e50: 40 9d 00 e8 ble- cr7,ffc09f38 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc09e54: 2f 85 04 00 cmpwi cr7,r5,1024 ffc09e58: 41 9d 00 e0 bgt- cr7,ffc09f38 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc09e5c: 7c 9d 23 78 mr r29,r4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc09e60: 7c a9 03 a6 mtctr r5 ffc09e64: 7c 89 23 78 mr r9,r4 ffc09e68: 39 00 00 01 li r8,1 ffc09e6c: 39 60 00 00 li r11,0 ffc09e70: 48 00 00 08 b ffc09e78 * 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++ ) { ffc09e74: 7c 0b 03 78 mr r11,r0 /* * 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 ) ffc09e78: 80 09 00 00 lwz r0,0(r9) ffc09e7c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09e80: 41 9e 00 b8 beq- cr7,ffc09f38 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) ffc09e84: 81 49 00 04 lwz r10,4(r9) * 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++ ) { ffc09e88: 39 29 00 08 addi r9,r9,8 if ( iov[v].iov_len ) all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; ffc09e8c: 7c 0b 52 14 add r0,r11,r10 if ( total < old || total > SSIZE_MAX ) ffc09e90: 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; ffc09e94: 31 4a ff ff addic r10,r10,-1 ffc09e98: 7d 4a 51 10 subfe r10,r10,r10 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) ffc09e9c: 2f 00 7f ff cmpwi cr6,r0,32767 */ if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; ffc09ea0: 7d 08 50 38 and r8,r8,r10 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) ffc09ea4: 41 9c 00 94 blt- cr7,ffc09f38 ffc09ea8: 41 99 00 90 bgt- cr6,ffc09f38 <== NEVER TAKEN * 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++ ) { ffc09eac: 42 00 ff c8 bdnz+ ffc09e74 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { ffc09eb0: 2f 88 00 00 cmpwi cr7,r8,0 return 0; ffc09eb4: 3b 40 00 00 li r26,0 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { ffc09eb8: 40 9e 00 90 bne- cr7,ffc09f48 ffc09ebc: 3b 80 00 00 li r28,0 ffc09ec0: 48 00 00 10 b ffc09ed0 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc09ec4: 7f 9b e0 00 cmpw cr7,r27,r28 ffc09ec8: 3b bd 00 08 addi r29,r29,8 ffc09ecc: 40 9d 00 7c ble- cr7,ffc09f48 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) ffc09ed0: 80 bd 00 04 lwz r5,4(r29) } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc09ed4: 3b 9c 00 01 addi r28,r28,1 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) ffc09ed8: 2f 85 00 00 cmpwi cr7,r5,0 ffc09edc: 41 9e ff e8 beq+ cr7,ffc09ec4 <== NEVER TAKEN continue; bytes = (*iop->pathinfo.handlers->write_h)( ffc09ee0: 81 39 00 24 lwz r9,36(r25) ffc09ee4: 7f 23 cb 78 mr r3,r25 ffc09ee8: 80 9d 00 00 lwz r4,0(r29) ffc09eec: 80 09 00 0c lwz r0,12(r9) ffc09ef0: 7c 09 03 a6 mtctr r0 ffc09ef4: 4e 80 04 21 bctrl iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) ffc09ef8: 2c 03 00 00 cmpwi r3,0 ffc09efc: 41 80 00 90 blt- ffc09f8c <== NEVER TAKEN return -1; if ( bytes > 0 ) { ffc09f00: 41 82 00 28 beq- ffc09f28 <== NEVER TAKEN iop->offset += bytes; ffc09f04: 81 39 00 10 lwz r9,16(r25) ffc09f08: 7c 7f 1b 78 mr r31,r3 ffc09f0c: 81 59 00 14 lwz r10,20(r25) ffc09f10: 7c 7e fe 70 srawi r30,r3,31 total += bytes; ffc09f14: 7f 5a 1a 14 add r26,r26,r3 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; ffc09f18: 7d 4a f8 14 addc r10,r10,r31 ffc09f1c: 7d 29 f1 14 adde r9,r9,r30 ffc09f20: 91 39 00 10 stw r9,16(r25) ffc09f24: 91 59 00 14 stw r10,20(r25) total += bytes; } if (bytes != iov[ v ].iov_len) ffc09f28: 80 1d 00 04 lwz r0,4(r29) ffc09f2c: 7f 83 00 00 cmpw cr7,r3,r0 ffc09f30: 41 9e ff 94 beq+ cr7,ffc09ec4 <== ALWAYS TAKEN ffc09f34: 48 00 00 14 b ffc09f48 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc09f38: 48 00 98 41 bl ffc13778 <__errno> ffc09f3c: 38 00 00 16 li r0,22 ffc09f40: 90 03 00 00 stw r0,0(r3) ffc09f44: 3b 40 ff ff li r26,-1 if (bytes != iov[ v ].iov_len) break; } return total; } ffc09f48: 80 01 00 2c lwz r0,44(r1) ffc09f4c: 7f 43 d3 78 mr r3,r26 ffc09f50: 83 21 00 0c lwz r25,12(r1) ffc09f54: 7c 08 03 a6 mtlr r0 ffc09f58: 83 41 00 10 lwz r26,16(r1) ffc09f5c: 83 61 00 14 lwz r27,20(r1) ffc09f60: 83 81 00 18 lwz r28,24(r1) ffc09f64: 83 a1 00 1c lwz r29,28(r1) ffc09f68: 83 c1 00 20 lwz r30,32(r1) ffc09f6c: 83 e1 00 24 lwz r31,36(r1) ffc09f70: 38 21 00 28 addi r1,r1,40 ffc09f74: 4e 80 00 20 blr ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); ffc09f78: 48 00 98 01 bl ffc13778 <__errno> ffc09f7c: 38 00 00 09 li r0,9 ffc09f80: 90 03 00 00 stw r0,0(r3) ffc09f84: 3b 40 ff ff li r26,-1 ffc09f88: 4b ff ff c0 b ffc09f48 iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; ffc09f8c: 3b 40 ff ff li r26,-1 <== NOT EXECUTED ffc09f90: 4b ff ff b8 b ffc09f48 <== NOT EXECUTED