=============================================================================== ffc0e00c : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { ffc0e00c: 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; ffc0e010: 81 23 00 10 lwz r9,16(r3) switch( node->type ) { ffc0e014: 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; ffc0e018: 81 29 00 34 lwz r9,52(r9) switch( node->type ) { ffc0e01c: 2b 80 00 07 cmplwi cr7,r0,7 ffc0e020: 41 9d 00 28 bgt- cr7,ffc0e048 <== NEVER TAKEN ffc0e024: 3d 60 ff c2 lis r11,-62 ffc0e028: 39 6b f5 64 addi r11,r11,-2716 ffc0e02c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0e030: 7c 0b 00 2e lwzx r0,r11,r0 ffc0e034: 7d 60 5a 14 add r11,r0,r11 ffc0e038: 7d 69 03 a6 mtctr r11 ffc0e03c: 4e 80 04 20 bctr case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; ffc0e040: 80 09 00 0c lwz r0,12(r9) ffc0e044: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0e048: 38 60 00 00 li r3,0 ffc0e04c: 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; ffc0e050: 80 09 00 08 lwz r0,8(r9) ffc0e054: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0e058: 38 60 00 00 li r3,0 ffc0e05c: 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; ffc0e060: 3d 20 ff c2 lis r9,-62 ffc0e064: 38 09 f6 04 addi r0,r9,-2556 ffc0e068: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0e06c: 38 60 00 00 li r3,0 ffc0e070: 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; ffc0e074: 80 09 00 10 lwz r0,16(r9) ffc0e078: 90 03 00 08 stw r0,8(r3) break; } return 0; } ffc0e07c: 38 60 00 00 li r3,0 ffc0e080: 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; ffc0e084: 3d 20 ff c2 lis r9,-62 ffc0e088: 38 09 f5 94 addi r0,r9,-2668 ffc0e08c: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0e090: 38 60 00 00 li r3,0 ffc0e094: 4e 80 00 20 blr =============================================================================== ffc0dda0 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0dda0: 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 ) ffc0dda4: 7c 69 1b 79 mr. r9,r3 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0dda8: 94 21 ff e0 stwu r1,-32(r1) ffc0ddac: 7c 08 02 a6 mflr r0 ffc0ddb0: 93 61 00 0c stw r27,12(r1) /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; ffc0ddb4: 3b 60 00 00 li r27,0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0ddb8: 93 81 00 10 stw r28,16(r1) ffc0ddbc: 7c fc 3b 78 mr r28,r7 ffc0ddc0: 93 e1 00 1c stw r31,28(r1) ffc0ddc4: 7c 9f 23 78 mr r31,r4 ffc0ddc8: 90 01 00 24 stw r0,36(r1) ffc0ddcc: 93 a1 00 14 stw r29,20(r1) ffc0ddd0: 93 c1 00 18 stw r30,24(r1) ffc0ddd4: 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 ) ffc0ddd8: 41 82 00 a4 beq- ffc0de7c <== NEVER TAKEN fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && ffc0dddc: 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; ffc0dde0: 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; ffc0dde4: 83 a9 00 00 lwz r29,0(r9) fs_info = parent_loc->mt_entry->fs_info; ffc0dde8: 83 cb 00 34 lwz r30,52(r11) /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && ffc0ddec: 41 92 00 c0 beq- cr4,ffc0deac return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); ffc0ddf0: 3d 20 00 00 lis r9,0 ffc0ddf4: 81 29 27 3c lwz r9,10044(r9) ffc0ddf8: 7c a4 2b 78 mr r4,r5 ffc0ddfc: 7f e3 fb 78 mr r3,r31 ffc0de00: 80 09 00 2c lwz r0,44(r9) ffc0de04: 7c c5 00 78 andc r5,r6,r0 ffc0de08: 4b ff fe f1 bl ffc0dcf8 if ( !node ) ffc0de0c: 7c 7b 1b 79 mr. r27,r3 ffc0de10: 41 82 00 6c beq- ffc0de7c return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { ffc0de14: 2f 9f 00 01 cmpwi cr7,r31,1 ffc0de18: 41 9e 00 ac beq- cr7,ffc0dec4 rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { ffc0de1c: 2f 9f 00 03 cmpwi cr7,r31,3 ffc0de20: 41 9e 00 34 beq- cr7,ffc0de54 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { ffc0de24: 2f 9f 00 04 cmpwi cr7,r31,4 ffc0de28: 41 9e 00 2c beq- cr7,ffc0de54 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { ffc0de2c: 2f 9f 00 02 cmpwi cr7,r31,2 ffc0de30: 41 9e 00 cc beq- cr7,ffc0defc node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { ffc0de34: 2f 9f 00 06 cmpwi cr7,r31,6 ffc0de38: 41 9e 00 a8 beq- cr7,ffc0dee0 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { ffc0de3c: 2f 9f 00 05 cmpwi cr7,r31,5 ffc0de40: 41 9e 00 d0 beq- cr7,ffc0df10 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 ) { ffc0de44: 40 b2 00 18 bne+ cr4,ffc0de5c <== NEVER TAKEN node->info.fifo.pipe = NULL; ffc0de48: 38 00 00 00 li r0,0 ffc0de4c: 90 1b 00 50 stw r0,80(r27) ffc0de50: 48 00 00 0c b ffc0de5c 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; ffc0de54: 80 1c 00 00 lwz r0,0(r28) ffc0de58: 90 1b 00 50 stw r0,80(r27) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; ffc0de5c: 81 3e 00 04 lwz r9,4(r30) ffc0de60: 38 7d 00 50 addi r3,r29,80 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; ffc0de64: 93 bb 00 08 stw r29,8(r27) ffc0de68: 7f 64 db 78 mr r4,r27 node->st_ino = ++fs_info->ino_count; ffc0de6c: 38 09 00 01 addi r0,r9,1 ffc0de70: 90 1e 00 04 stw r0,4(r30) ffc0de74: 90 1b 00 38 stw r0,56(r27) ffc0de78: 4b ff c3 19 bl ffc0a190 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } ffc0de7c: 80 01 00 24 lwz r0,36(r1) ffc0de80: 7f 63 db 78 mr r3,r27 ffc0de84: 81 81 00 08 lwz r12,8(r1) ffc0de88: 7c 08 03 a6 mtlr r0 ffc0de8c: 83 61 00 0c lwz r27,12(r1) ffc0de90: 83 81 00 10 lwz r28,16(r1) ffc0de94: 7d 80 81 20 mtcrf 8,r12 ffc0de98: 83 a1 00 14 lwz r29,20(r1) ffc0de9c: 83 c1 00 18 lwz r30,24(r1) ffc0dea0: 83 e1 00 1c lwz r31,28(r1) ffc0dea4: 38 21 00 20 addi r1,r1,32 ffc0dea8: 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 && ffc0deac: 81 3e 00 10 lwz r9,16(r30) ffc0deb0: 3d 60 ff c2 lis r11,-62 ffc0deb4: 38 0b f4 fc addi r0,r11,-2820 ffc0deb8: 7f 89 00 00 cmpw cr7,r9,r0 ffc0debc: 40 9e ff 34 bne+ cr7,ffc0ddf0 ffc0dec0: 4b ff ff bc b ffc0de7c 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 ); ffc0dec4: 39 3b 00 54 addi r9,r27,84 ffc0dec8: 38 1b 00 50 addi r0,r27,80 head->next = tail; ffc0decc: 91 3b 00 50 stw r9,80(r27) head->previous = NULL; ffc0ded0: 39 20 00 00 li r9,0 ffc0ded4: 91 3b 00 54 stw r9,84(r27) tail->previous = head; ffc0ded8: 90 1b 00 58 stw r0,88(r27) ffc0dedc: 4b ff ff 80 b ffc0de5c 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; ffc0dee0: 39 40 00 00 li r10,0 ffc0dee4: 39 60 00 00 li r11,0 ffc0dee8: 91 5b 00 50 stw r10,80(r27) node->info.linearfile.direct = 0; ffc0deec: 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; ffc0def0: 91 7b 00 54 stw r11,84(r27) node->info.linearfile.direct = 0; ffc0def4: 90 1b 00 58 stw r0,88(r27) ffc0def8: 4b ff ff 64 b ffc0de5c } 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; ffc0defc: 81 3c 00 00 lwz r9,0(r28) node->info.device.minor = info->device.minor; ffc0df00: 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; ffc0df04: 91 3b 00 50 stw r9,80(r27) node->info.device.minor = info->device.minor; ffc0df08: 90 1b 00 54 stw r0,84(r27) ffc0df0c: 4b ff ff 50 b ffc0de5c } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; node->info.file.indirect = 0; ffc0df10: 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; ffc0df14: 39 40 00 00 li r10,0 node->info.file.indirect = 0; ffc0df18: 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; ffc0df1c: 39 60 00 00 li r11,0 ffc0df20: 91 5b 00 50 stw r10,80(r27) ffc0df24: 91 7b 00 54 stw r11,84(r27) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; ffc0df28: 90 1b 00 5c stw r0,92(r27) node->info.file.triply_indirect = 0; ffc0df2c: 90 1b 00 60 stw r0,96(r27) ffc0df30: 4b ff ff 2c b ffc0de5c =============================================================================== ffc07450 : */ void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { ffc07450: 94 21 ff d0 stwu r1,-48(r1) ffc07454: 7c 08 02 a6 mflr r0 ffc07458: 7d 80 00 26 mfcr r12 ffc0745c: 2e 04 00 00 cmpwi cr4,r4,0 ffc07460: 90 01 00 34 stw r0,52(r1) ffc07464: 93 61 00 1c stw r27,28(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc07468: 83 63 00 50 lwz r27,80(r3) ffc0746c: 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)); ffc07470: 3b 43 00 54 addi r26,r3,84 IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc07474: 7f 9b d0 00 cmpw cr7,r27,r26 */ void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { ffc07478: 93 a1 00 24 stw r29,36(r1) ffc0747c: 7c 9d 23 78 mr r29,r4 ffc07480: 93 01 00 10 stw r24,16(r1) ffc07484: 93 21 00 14 stw r25,20(r1) ffc07488: 93 81 00 20 stw r28,32(r1) ffc0748c: 93 c1 00 28 stw r30,40(r1) ffc07490: 93 e1 00 2c stw r31,44(r1) ffc07494: 91 81 00 0c stw r12,12(r1) IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc07498: 41 9e 00 64 beq- cr7,ffc074fc ffc0749c: 3f 80 ff c2 lis r28,-62 ffc074a0: 3b 9c 76 ec addi r28,r28,30444 ffc074a4: 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 ); ffc074a8: 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++ ) ffc074ac: 41 90 00 30 blt- cr4,ffc074dc <== NEVER TAKEN ffc074b0: 3b e0 00 00 li r31,0 ffc074b4: 3b d9 27 94 addi r30,r25,10132 fprintf(stdout, "...." ); ffc074b8: 81 3e 00 00 lwz r9,0(r30) ffc074bc: 7f 83 e3 78 mr r3,r28 ffc074c0: 38 80 00 01 li r4,1 ffc074c4: 80 c9 00 08 lwz r6,8(r9) ffc074c8: 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++ ) ffc074cc: 3b ff 00 01 addi r31,r31,1 fprintf(stdout, "...." ); ffc074d0: 48 01 1c 1d bl ffc190ec !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++ ) ffc074d4: 7f 9d f8 00 cmpw cr7,r29,r31 ffc074d8: 40 9c ff e0 bge+ cr7,ffc074b8 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); ffc074dc: 7f 63 db 78 mr r3,r27 ffc074e0: 4b ff fd e9 bl ffc072c8 if ( the_jnode->type == IMFS_DIRECTORY ) ffc074e4: 80 1b 00 4c lwz r0,76(r27) ffc074e8: 2f 80 00 01 cmpwi cr7,r0,1 ffc074ec: 41 9e 00 48 beq- cr7,ffc07534 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 ) { ffc074f0: 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 ); ffc074f4: 7f 9b d0 00 cmpw cr7,r27,r26 ffc074f8: 40 9e ff b4 bne+ cr7,ffc074ac fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } ffc074fc: 80 01 00 34 lwz r0,52(r1) ffc07500: 81 81 00 0c lwz r12,12(r1) ffc07504: 7c 08 03 a6 mtlr r0 ffc07508: 83 01 00 10 lwz r24,16(r1) ffc0750c: 83 21 00 14 lwz r25,20(r1) ffc07510: 7d 80 81 20 mtcrf 8,r12 ffc07514: 83 41 00 18 lwz r26,24(r1) ffc07518: 83 61 00 1c lwz r27,28(r1) ffc0751c: 83 81 00 20 lwz r28,32(r1) ffc07520: 83 a1 00 24 lwz r29,36(r1) ffc07524: 83 c1 00 28 lwz r30,40(r1) ffc07528: 83 e1 00 2c lwz r31,44(r1) ffc0752c: 38 21 00 30 addi r1,r1,48 ffc07530: 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 ); ffc07534: 7f 63 db 78 mr r3,r27 ffc07538: 7f 04 c3 78 mr r4,r24 ffc0753c: 4b ff ff 15 bl ffc07450 ffc07540: 4b ff ff b0 b ffc074f0 =============================================================================== ffc0e154 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0e154: 94 21 ff a8 stwu r1,-88(r1) ffc0e158: 7c 08 02 a6 mflr r0 ffc0e15c: 90 01 00 5c stw r0,92(r1) IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { ffc0e160: 54 a0 00 39 rlwinm. r0,r5,0,0,28 size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; ffc0e164: 38 00 00 00 li r0,0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0e168: 93 81 00 48 stw r28,72(r1) ffc0e16c: 7c bc 2b 78 mr r28,r5 ffc0e170: 93 a1 00 4c stw r29,76(r1) ffc0e174: 7c 7d 1b 78 mr r29,r3 ffc0e178: 93 e1 00 54 stw r31,84(r1) ffc0e17c: 7c df 33 78 mr r31,r6 ffc0e180: 93 41 00 40 stw r26,64(r1) ffc0e184: 93 61 00 44 stw r27,68(r1) ffc0e188: 93 c1 00 50 stw r30,80(r1) ffc0e18c: 90 81 00 38 stw r4,56(r1) int i = 0; ffc0e190: 90 01 00 0c stw r0,12(r1) IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { ffc0e194: 40 82 03 28 bne- ffc0e4bc <== NEVER TAKEN /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0e198: 83 c6 00 00 lwz r30,0(r6) ffc0e19c: 38 60 00 00 li r3,0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0e1a0: 3f 60 00 00 lis r27,0 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); ffc0e1a4: 7c 7d 1a 14 add r3,r29,r3 ffc0e1a8: 38 a1 00 10 addi r5,r1,16 ffc0e1ac: 38 c1 00 08 addi r6,r1,8 ffc0e1b0: 48 00 0b 7d bl ffc0ed2c pathnamelen -= len; ffc0e1b4: 80 01 00 08 lwz r0,8(r1) * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); ffc0e1b8: 7c 7a 1b 78 mr r26,r3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) ffc0e1bc: 80 7f 00 00 lwz r3,0(r31) */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; ffc0e1c0: 80 81 00 38 lwz r4,56(r1) i += len; if ( !pathloc->node_access ) ffc0e1c4: 2f 83 00 00 cmpwi cr7,r3,0 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; ffc0e1c8: 81 21 00 0c lwz r9,12(r1) */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; ffc0e1cc: 7c 80 20 50 subf r4,r0,r4 i += len; ffc0e1d0: 7c 09 02 14 add r0,r9,r0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; ffc0e1d4: 90 81 00 38 stw r4,56(r1) i += len; ffc0e1d8: 90 01 00 0c stw r0,12(r1) if ( !pathloc->node_access ) ffc0e1dc: 41 9e 02 cc beq- cr7,ffc0e4a8 <== 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 ) ffc0e1e0: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0e1e4: 40 9e 00 44 bne- cr7,ffc0e228 * 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 ) { ffc0e1e8: 80 03 00 4c lwz r0,76(r3) ffc0e1ec: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e1f0: 41 9e 01 a8 beq- cr7,ffc0e398 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0e1f4: 7f e3 fb 78 mr r3,r31 ffc0e1f8: 4b ff fe 15 bl ffc0e00c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0e1fc: 7f 84 e3 78 mr r4,r28 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0e200: 7c 7e 1b 78 mr r30,r3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0e204: 7f e3 fb 78 mr r3,r31 ffc0e208: 4b ff fe 91 bl ffc0e098 ffc0e20c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e210: 40 be 00 e4 bne+ cr7,ffc0e2f4 rtems_set_errno_and_return_minus_one( EACCES ); ffc0e214: 48 00 49 49 bl ffc12b5c <__errno> ffc0e218: 38 00 00 0d li r0,13 ffc0e21c: 90 03 00 00 stw r0,0(r3) ffc0e220: 3b c0 ff ff li r30,-1 ffc0e224: 48 00 00 d0 b ffc0e2f4 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) ffc0e228: 80 1e 00 4c lwz r0,76(r30) ffc0e22c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e230: 41 9e 00 f0 beq- cr7,ffc0e320 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0e234: 2f 9a 00 03 cmpwi cr7,r26,3 ffc0e238: 41 9e 00 28 beq- cr7,ffc0e260 ffc0e23c: 2f 9a 00 04 cmpwi cr7,r26,4 ffc0e240: 41 9e 00 a4 beq- cr7,ffc0e2e4 ffc0e244: 2f 1a 00 02 cmpwi cr6,r26,2 ffc0e248: 41 9a 00 60 beq- cr6,ffc0e2a8 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc0e24c: 41 be ff 9c beq- cr7,ffc0e1e8 <== NEVER TAKEN ffc0e250: 7c 7e 1b 78 mr r30,r3 ffc0e254: 80 81 00 38 lwz r4,56(r1) ffc0e258: 80 61 00 0c lwz r3,12(r1) ffc0e25c: 4b ff ff 48 b ffc0e1a4 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { ffc0e260: 80 03 00 4c lwz r0,76(r3) ffc0e264: 2f 80 00 03 cmpwi cr7,r0,3 ffc0e268: 41 9e 01 80 beq- cr7,ffc0e3e8 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { ffc0e26c: 2f 80 00 04 cmpwi cr7,r0,4 ffc0e270: 41 9e 02 14 beq- cr7,ffc0e484 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0e274: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e278: 40 9e 02 58 bne- cr7,ffc0e4d0 rtems_set_errno_and_return_minus_one( ENOTDIR ); /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); ffc0e27c: 38 81 00 10 addi r4,r1,16 ffc0e280: 48 00 09 a9 bl ffc0ec28 if ( !node ) ffc0e284: 7c 7e 1b 79 mr. r30,r3 ffc0e288: 41 82 02 20 beq- ffc0e4a8 * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { ffc0e28c: 80 1e 00 4c lwz r0,76(r30) ffc0e290: 80 81 00 38 lwz r4,56(r1) ffc0e294: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e298: 41 9e 00 a4 beq- cr7,ffc0e33c } /* * Set the node access to the point we have found. */ pathloc->node_access = node; ffc0e29c: 93 df 00 00 stw r30,0(r31) /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc0e2a0: 80 61 00 0c lwz r3,12(r1) ffc0e2a4: 4b ff ff 00 b ffc0e1a4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0e2a8: 81 3b 27 3c lwz r9,10044(r27) ffc0e2ac: 80 09 00 18 lwz r0,24(r9) ffc0e2b0: 7f 80 18 00 cmpw cr7,r0,r3 ffc0e2b4: 41 9e 01 24 beq- cr7,ffc0e3d8 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e2b8: 81 5f 00 10 lwz r10,16(r31) /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { ffc0e2bc: 80 0a 00 1c lwz r0,28(r10) ffc0e2c0: 7f 80 18 00 cmpw cr7,r0,r3 ffc0e2c4: 41 9e 01 3c beq- cr7,ffc0e400 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) ffc0e2c8: 83 c3 00 08 lwz r30,8(r3) ffc0e2cc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e2d0: 41 9e 02 14 beq- cr7,ffc0e4e4 rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; pathloc->node_access = node; ffc0e2d4: 93 df 00 00 stw r30,0(r31) ffc0e2d8: 80 81 00 38 lwz r4,56(r1) /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc0e2dc: 80 61 00 0c lwz r3,12(r1) ffc0e2e0: 4b ff fe c4 b ffc0e1a4 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); ffc0e2e4: 48 00 48 79 bl ffc12b5c <__errno> ffc0e2e8: 38 00 00 5b li r0,91 ffc0e2ec: 90 03 00 00 stw r0,0(r3) ffc0e2f0: 3b c0 ff ff li r30,-1 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e2f4: 80 01 00 5c lwz r0,92(r1) ffc0e2f8: 7f c3 f3 78 mr r3,r30 ffc0e2fc: 83 41 00 40 lwz r26,64(r1) ffc0e300: 7c 08 03 a6 mtlr r0 ffc0e304: 83 61 00 44 lwz r27,68(r1) ffc0e308: 83 81 00 48 lwz r28,72(r1) ffc0e30c: 83 a1 00 4c lwz r29,76(r1) ffc0e310: 83 c1 00 50 lwz r30,80(r1) ffc0e314: 83 e1 00 54 lwz r31,84(r1) ffc0e318: 38 21 00 58 addi r1,r1,88 ffc0e31c: 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 ) ) ffc0e320: 7f e3 fb 78 mr r3,r31 ffc0e324: 38 80 00 01 li r4,1 ffc0e328: 4b ff fd 71 bl ffc0e098 ffc0e32c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e330: 41 be fe e4 beq- cr7,ffc0e214 ffc0e334: 80 7f 00 00 lwz r3,0(r31) ffc0e338: 4b ff fe fc b ffc0e234 * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { ffc0e33c: 80 1e 00 5c lwz r0,92(r30) ffc0e340: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e344: 41 be ff 58 beq- cr7,ffc0e29c IMFS_skip_separator( pathname, &pathnamelen, &i); ffc0e348: 7f a3 eb 78 mr r3,r29 ffc0e34c: 38 81 00 38 addi r4,r1,56 ffc0e350: 38 a1 00 0c addi r5,r1,12 ffc0e354: 4b ff fc 31 bl ffc0df84 if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { ffc0e358: 81 21 00 0c lwz r9,12(r1) ffc0e35c: 7c 1d 48 ae lbzx r0,r29,r9 ffc0e360: 7c 7d 4a 14 add r3,r29,r9 ffc0e364: 2f 80 00 2e cmpwi cr7,r0,46 ffc0e368: 40 9e 01 8c bne- cr7,ffc0e4f4 ffc0e36c: 88 03 00 01 lbz r0,1(r3) ffc0e370: 2f 80 00 2e cmpwi cr7,r0,46 ffc0e374: 40 9e 01 80 bne- cr7,ffc0e4f4 return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; ffc0e378: 80 81 00 38 lwz r4,56(r1) *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; ffc0e37c: 39 29 00 02 addi r9,r9,2 pathnamelen -= 2; node = node->Parent; ffc0e380: 83 de 00 08 lwz r30,8(r30) return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; ffc0e384: 38 84 ff fe addi r4,r4,-2 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; ffc0e388: 91 21 00 0c stw r9,12(r1) pathnamelen -= 2; ffc0e38c: 90 81 00 38 stw r4,56(r1) } /* * Set the node access to the point we have found. */ pathloc->node_access = node; ffc0e390: 93 df 00 00 stw r30,0(r31) ffc0e394: 4b ff ff 0c b ffc0e2a0 * * 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 ) { ffc0e398: 81 43 00 5c lwz r10,92(r3) ffc0e39c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0e3a0: 41 be fe 54 beq- cr7,ffc0e1f4 <== ALWAYS TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e3a4: 81 2a 00 20 lwz r9,32(r10) <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e3a8: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e3ac: 80 0a 00 24 lwz r0,36(r10) <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e3b0: 7f e6 fb 78 mr r6,r31 <== NOT EXECUTED * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e3b4: 81 6a 00 28 lwz r11,40(r10) <== NOT EXECUTED ffc0e3b8: 81 0a 00 1c lwz r8,28(r10) <== NOT EXECUTED ffc0e3bc: 91 3f 00 04 stw r9,4(r31) <== NOT EXECUTED ffc0e3c0: 91 1f 00 00 stw r8,0(r31) <== NOT EXECUTED ffc0e3c4: 90 1f 00 08 stw r0,8(r31) <== NOT EXECUTED ffc0e3c8: 91 7f 00 0c stw r11,12(r31) <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e3cc: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e3d0: 80 0a 00 2c lwz r0,44(r10) <== NOT EXECUTED ffc0e3d4: 48 00 00 5c b ffc0e430 <== NOT EXECUTED case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0e3d8: 7c 7e 1b 78 mr r30,r3 ffc0e3dc: 80 81 00 38 lwz r4,56(r1) /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc0e3e0: 80 61 00 0c lwz r3,12(r1) ffc0e3e4: 4b ff fd c0 b ffc0e1a4 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); ffc0e3e8: 7f e3 fb 78 mr r3,r31 ffc0e3ec: 38 80 00 00 li r4,0 ffc0e3f0: 4b ff fc fd bl ffc0e0ec node = pathloc->node_access; ffc0e3f4: 80 7f 00 00 lwz r3,0(r31) ffc0e3f8: 80 03 00 4c lwz r0,76(r3) ffc0e3fc: 4b ff fe 78 b ffc0e274 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0e400: 81 2a 00 0c lwz r9,12(r10) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc0e404: 7f 85 e3 78 mr r5,r28 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0e408: 80 0a 00 10 lwz r0,16(r10) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc0e40c: 7f e6 fb 78 mr r6,r31 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0e410: 81 6a 00 14 lwz r11,20(r10) ffc0e414: 81 0a 00 08 lwz r8,8(r10) ffc0e418: 91 3f 00 04 stw r9,4(r31) ffc0e41c: 91 1f 00 00 stw r8,0(r31) ffc0e420: 90 1f 00 08 stw r0,8(r31) ffc0e424: 91 7f 00 0c stw r11,12(r31) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc0e428: 81 21 00 08 lwz r9,8(r1) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0e42c: 80 0a 00 18 lwz r0,24(r10) * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e430: 90 1f 00 10 stw r0,16(r31) return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e434: 80 61 00 0c lwz r3,12(r1) ffc0e438: 80 0b 00 00 lwz r0,0(r11) ffc0e43c: 80 81 00 38 lwz r4,56(r1) ffc0e440: 7c 69 18 50 subf r3,r9,r3 ffc0e444: 7c 7d 1a 14 add r3,r29,r3 ffc0e448: 7c 09 03 a6 mtctr r0 ffc0e44c: 7c 89 22 14 add r4,r9,r4 ffc0e450: 4e 80 04 21 bctrl if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e454: 80 01 00 5c lwz r0,92(r1) */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e458: 7c 7e 1b 78 mr r30,r3 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e45c: 83 41 00 40 lwz r26,64(r1) ffc0e460: 7c 08 03 a6 mtlr r0 ffc0e464: 7f c3 f3 78 mr r3,r30 ffc0e468: 83 61 00 44 lwz r27,68(r1) ffc0e46c: 83 81 00 48 lwz r28,72(r1) ffc0e470: 83 a1 00 4c lwz r29,76(r1) ffc0e474: 83 c1 00 50 lwz r30,80(r1) ffc0e478: 83 e1 00 54 lwz r31,84(r1) ffc0e47c: 38 21 00 58 addi r1,r1,88 ffc0e480: 4e 80 00 20 blr * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); ffc0e484: 7f e3 fb 78 mr r3,r31 ffc0e488: 38 80 00 00 li r4,0 ffc0e48c: 48 00 00 b5 bl ffc0e540 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) ffc0e490: 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 ); ffc0e494: 7c 7e 1b 78 mr r30,r3 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; ffc0e498: 80 7f 00 00 lwz r3,0(r31) if ( result == -1 ) ffc0e49c: 41 be fe 58 beq- cr7,ffc0e2f4 <== NEVER TAKEN ffc0e4a0: 80 03 00 4c lwz r0,76(r3) ffc0e4a4: 4b ff fd d0 b ffc0e274 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); ffc0e4a8: 48 00 46 b5 bl ffc12b5c <__errno> ffc0e4ac: 38 00 00 02 li r0,2 ffc0e4b0: 90 03 00 00 stw r0,0(r3) ffc0e4b4: 3b c0 ff ff li r30,-1 ffc0e4b8: 4b ff fe 3c b ffc0e2f4 char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); ffc0e4bc: 48 00 46 a1 bl ffc12b5c <__errno> <== NOT EXECUTED ffc0e4c0: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc0e4c4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0e4c8: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc0e4cc: 4b ff fe 28 b ffc0e2f4 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0e4d0: 48 00 46 8d bl ffc12b5c <__errno> ffc0e4d4: 38 00 00 14 li r0,20 ffc0e4d8: 90 03 00 00 stw r0,0(r3) ffc0e4dc: 3b c0 ff ff li r30,-1 ffc0e4e0: 4b ff fe 14 b ffc0e2f4 flags,pathloc); } } else { if ( !node->Parent ) rtems_set_errno_and_return_minus_one( ENOENT ); ffc0e4e4: 48 00 46 79 bl ffc12b5c <__errno> ffc0e4e8: 3b c0 ff ff li r30,-1 ffc0e4ec: 93 43 00 00 stw r26,0(r3) ffc0e4f0: 4b ff fe 04 b ffc0e2f4 * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e4f4: 81 3e 00 5c lwz r9,92(r30) return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0e4f8: 7f 85 e3 78 mr r5,r28 ffc0e4fc: 7f e6 fb 78 mr r6,r31 ffc0e500: 80 81 00 38 lwz r4,56(r1) * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e504: 81 69 00 28 lwz r11,40(r9) ffc0e508: 80 09 00 24 lwz r0,36(r9) ffc0e50c: 81 09 00 1c lwz r8,28(r9) ffc0e510: 81 49 00 20 lwz r10,32(r9) ffc0e514: 90 1f 00 08 stw r0,8(r31) ffc0e518: 91 1f 00 00 stw r8,0(r31) ffc0e51c: 91 5f 00 04 stw r10,4(r31) ffc0e520: 91 7f 00 0c stw r11,12(r31) return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0e524: 80 0b 00 00 lwz r0,0(r11) * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e528: 81 29 00 2c lwz r9,44(r9) return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0e52c: 7c 09 03 a6 mtctr r0 * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e530: 91 3f 00 10 stw r9,16(r31) return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0e534: 4e 80 04 21 bctrl ffc0e538: 7c 7e 1b 78 mr r30,r3 ffc0e53c: 4b ff fd b8 b ffc0e2f4 =============================================================================== ffc0e70c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0e70c: 94 21 ff a8 stwu r1,-88(r1) ffc0e710: 7c 08 02 a6 mflr r0 ffc0e714: 7d 80 00 26 mfcr r12 ffc0e718: 90 01 00 5c stw r0,92(r1) int i = 0; ffc0e71c: 38 00 00 00 li r0,0 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0e720: 93 61 00 44 stw r27,68(r1) ffc0e724: 7c bb 2b 78 mr r27,r5 ffc0e728: 93 81 00 48 stw r28,72(r1) case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0e72c: 3f 80 00 00 lis r28,0 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0e730: 93 a1 00 4c stw r29,76(r1) ffc0e734: 7c 7d 1b 78 mr r29,r3 ffc0e738: 93 c1 00 50 stw r30,80(r1) ffc0e73c: 93 e1 00 54 stw r31,84(r1) ffc0e740: 7c 9f 23 78 mr r31,r4 int i = 0; ffc0e744: 90 01 00 10 stw r0,16(r1) /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0e748: 83 c4 00 00 lwz r30,0(r4) int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0e74c: 93 41 00 40 stw r26,64(r1) ffc0e750: 91 81 00 3c stw r12,60(r1) node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); ffc0e754: 48 00 5d 35 bl ffc14488 ffc0e758: 7c 64 1b 78 mr r4,r3 ffc0e75c: 90 61 00 08 stw r3,8(r1) ffc0e760: 38 00 00 00 li r0,0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc0e764: 7c 7d 02 14 add r3,r29,r0 ffc0e768: 38 a1 00 14 addi r5,r1,20 ffc0e76c: 38 c1 00 0c addi r6,r1,12 ffc0e770: 48 00 05 bd bl ffc0ed2c pathlen -= len; ffc0e774: 80 01 00 0c lwz r0,12(r1) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc0e778: 7c 7a 1b 78 mr r26,r3 pathlen -= len; i += len; if ( !pathloc->node_access ) ffc0e77c: 80 7f 00 00 lwz r3,0(r31) */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0e780: 81 21 00 08 lwz r9,8(r1) i += len; if ( !pathloc->node_access ) ffc0e784: 2f 83 00 00 cmpwi cr7,r3,0 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; ffc0e788: 81 61 00 10 lwz r11,16(r1) */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0e78c: 7d 20 48 50 subf r9,r0,r9 i += len; ffc0e790: 7c 0b 02 14 add r0,r11,r0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0e794: 91 21 00 08 stw r9,8(r1) i += len; ffc0e798: 90 01 00 10 stw r0,16(r1) if ( !pathloc->node_access ) ffc0e79c: 41 9e 02 54 beq- cr7,ffc0e9f0 <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) ffc0e7a0: 2e 1a 00 00 cmpwi cr4,r26,0 ffc0e7a4: 40 92 00 48 bne- cr4,ffc0e7ec pathloc->node_access = node; } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); ffc0e7a8: 48 00 43 b5 bl ffc12b5c <__errno> ffc0e7ac: 38 00 00 11 li r0,17 ffc0e7b0: 90 03 00 00 stw r0,0(r3) ffc0e7b4: 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; } ffc0e7b8: 80 01 00 5c lwz r0,92(r1) ffc0e7bc: 7f c3 f3 78 mr r3,r30 ffc0e7c0: 81 81 00 3c lwz r12,60(r1) ffc0e7c4: 7c 08 03 a6 mtlr r0 ffc0e7c8: 83 41 00 40 lwz r26,64(r1) ffc0e7cc: 83 61 00 44 lwz r27,68(r1) ffc0e7d0: 7d 80 81 20 mtcrf 8,r12 ffc0e7d4: 83 81 00 48 lwz r28,72(r1) ffc0e7d8: 83 a1 00 4c lwz r29,76(r1) ffc0e7dc: 83 c1 00 50 lwz r30,80(r1) ffc0e7e0: 83 e1 00 54 lwz r31,84(r1) ffc0e7e4: 38 21 00 58 addi r1,r1,88 ffc0e7e8: 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 ) ffc0e7ec: 80 1e 00 4c lwz r0,76(r30) ffc0e7f0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e7f4: 41 9e 01 1c beq- cr7,ffc0e910 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0e7f8: 2f 9a 00 02 cmpwi cr7,r26,2 ffc0e7fc: 41 9e 00 84 beq- cr7,ffc0e880 ffc0e800: 2b 9a 00 02 cmplwi cr7,r26,2 ffc0e804: 40 9d 00 24 ble- cr7,ffc0e828 ffc0e808: 2f 9a 00 03 cmpwi cr7,r26,3 ffc0e80c: 41 9e 00 b0 beq- cr7,ffc0e8bc ffc0e810: 2f 9a 00 04 cmpwi cr7,r26,4 ffc0e814: 41 9e 00 28 beq- cr7,ffc0e83c <== ALWAYS TAKEN ffc0e818: 80 01 00 10 lwz r0,16(r1) <== NOT EXECUTED ffc0e81c: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ffc0e820: 80 81 00 08 lwz r4,8(r1) <== NOT EXECUTED ffc0e824: 4b ff ff 40 b ffc0e764 <== NOT EXECUTED ffc0e828: 41 b2 ff 80 beq- cr4,ffc0e7a8 <== NEVER TAKEN ffc0e82c: 80 01 00 10 lwz r0,16(r1) ffc0e830: 7c 7e 1b 78 mr r30,r3 ffc0e834: 80 81 00 08 lwz r4,8(r1) ffc0e838: 4b ff ff 2c b ffc0e764 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 ); ffc0e83c: 48 00 43 21 bl ffc12b5c <__errno> ffc0e840: 38 00 00 5b li r0,91 ffc0e844: 90 03 00 00 stw r0,0(r3) ffc0e848: 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; } ffc0e84c: 7f c3 f3 78 mr r3,r30 ffc0e850: 80 01 00 5c lwz r0,92(r1) ffc0e854: 81 81 00 3c lwz r12,60(r1) ffc0e858: 7c 08 03 a6 mtlr r0 ffc0e85c: 83 41 00 40 lwz r26,64(r1) ffc0e860: 83 61 00 44 lwz r27,68(r1) ffc0e864: 7d 80 81 20 mtcrf 8,r12 ffc0e868: 83 81 00 48 lwz r28,72(r1) ffc0e86c: 83 a1 00 4c lwz r29,76(r1) ffc0e870: 83 c1 00 50 lwz r30,80(r1) ffc0e874: 83 e1 00 54 lwz r31,84(r1) ffc0e878: 38 21 00 58 addi r1,r1,88 ffc0e87c: 4e 80 00 20 blr case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0e880: 81 3c 27 3c lwz r9,10044(r28) ffc0e884: 83 c9 00 18 lwz r30,24(r9) ffc0e888: 7f 9e 18 00 cmpw cr7,r30,r3 ffc0e88c: 41 9e 01 78 beq- cr7,ffc0ea04 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e890: 81 7f 00 10 lwz r11,16(r31) /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { ffc0e894: 80 0b 00 1c lwz r0,28(r11) ffc0e898: 7f 83 00 00 cmpw cr7,r3,r0 ffc0e89c: 41 9e 01 74 beq- cr7,ffc0ea10 *pathloc = pathloc->mt_entry->mt_point_node; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) ffc0e8a0: 83 c3 00 08 lwz r30,8(r3) ffc0e8a4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e8a8: 41 9e 02 14 beq- cr7,ffc0eabc rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; ffc0e8ac: 93 df 00 00 stw r30,0(r31) ffc0e8b0: 80 01 00 10 lwz r0,16(r1) ffc0e8b4: 80 81 00 08 lwz r4,8(r1) break; ffc0e8b8: 4b ff fe ac b ffc0e764 case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { ffc0e8bc: 80 03 00 4c lwz r0,76(r3) ffc0e8c0: 2f 80 00 03 cmpwi cr7,r0,3 ffc0e8c4: 41 9e 00 68 beq- cr7,ffc0e92c result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { ffc0e8c8: 2f 80 00 04 cmpwi cr7,r0,4 ffc0e8cc: 41 9e 00 60 beq- cr7,ffc0e92c if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) ffc0e8d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e8d4: 41 9e 01 d4 beq- cr7,ffc0eaa8 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0e8d8: 80 03 00 4c lwz r0,76(r3) ffc0e8dc: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e8e0: 40 9e 01 c8 bne- cr7,ffc0eaa8 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); ffc0e8e4: 38 81 00 14 addi r4,r1,20 ffc0e8e8: 48 00 03 41 bl ffc0ec28 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) ffc0e8ec: 7c 7e 1b 79 mr. r30,r3 ffc0e8f0: 41 82 00 b8 beq- ffc0e9a8 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { ffc0e8f4: 80 1e 00 4c lwz r0,76(r30) ffc0e8f8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e8fc: 41 9e 00 50 beq- cr7,ffc0e94c ffc0e900: 80 01 00 10 lwz r0,16(r1) ffc0e904: 80 81 00 08 lwz r4,8(r1) } i += 2; pathlen -= 2; node = node->Parent; } pathloc->node_access = node; ffc0e908: 93 df 00 00 stw r30,0(r31) ffc0e90c: 4b ff fe 58 b ffc0e764 * 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 ) ) ffc0e910: 7f e3 fb 78 mr r3,r31 ffc0e914: 38 80 00 01 li r4,1 ffc0e918: 4b ff f7 81 bl ffc0e098 ffc0e91c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e920: 41 9e 01 74 beq- cr7,ffc0ea94 ffc0e924: 80 7f 00 00 lwz r3,0(r31) ffc0e928: 4b ff fe d0 b ffc0e7f8 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); ffc0e92c: 7f e3 fb 78 mr r3,r31 ffc0e930: 38 80 00 00 li r4,0 ffc0e934: 4b ff fc c5 bl ffc0e5f8 if ( result == -1 ) ffc0e938: 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 ); ffc0e93c: 7c 7e 1b 78 mr r30,r3 if ( result == -1 ) ffc0e940: 41 be fe 78 beq- cr7,ffc0e7b8 <== NEVER TAKEN ffc0e944: 80 7f 00 00 lwz r3,0(r31) ffc0e948: 4b ff ff 88 b ffc0e8d0 */ if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { ffc0e94c: 80 1e 00 5c lwz r0,92(r30) ffc0e950: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e954: 41 be ff ac beq- cr7,ffc0e900 IMFS_skip_separator( path, &pathlen, &i); ffc0e958: 7f a3 eb 78 mr r3,r29 ffc0e95c: 38 81 00 08 addi r4,r1,8 ffc0e960: 38 a1 00 10 addi r5,r1,16 ffc0e964: 4b ff f6 21 bl ffc0df84 if ((path[i] != '.') || (path[i + 1] != '.')) { ffc0e968: 81 21 00 10 lwz r9,16(r1) ffc0e96c: 7c 1d 48 ae lbzx r0,r29,r9 ffc0e970: 7c 7d 4a 14 add r3,r29,r9 ffc0e974: 2f 80 00 2e cmpwi cr7,r0,46 ffc0e978: 40 9e 01 54 bne- cr7,ffc0eacc ffc0e97c: 88 03 00 01 lbz r0,1(r3) ffc0e980: 2f 80 00 2e cmpwi cr7,r0,46 ffc0e984: 40 9e 01 48 bne- cr7,ffc0eacc <== NEVER TAKEN return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; pathlen -= 2; ffc0e988: 80 81 00 08 lwz r4,8(r1) *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; ffc0e98c: 38 09 00 02 addi r0,r9,2 pathlen -= 2; node = node->Parent; ffc0e990: 83 de 00 08 lwz r30,8(r30) return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; pathlen -= 2; ffc0e994: 38 84 ff fe addi r4,r4,-2 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; ffc0e998: 90 01 00 10 stw r0,16(r1) pathlen -= 2; ffc0e99c: 90 81 00 08 stw r4,8(r1) node = node->Parent; } pathloc->node_access = node; ffc0e9a0: 93 df 00 00 stw r30,0(r31) ffc0e9a4: 4b ff fd c0 b ffc0e764 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; ffc0e9a8: 80 01 00 10 lwz r0,16(r1) ffc0e9ac: 81 21 00 0c lwz r9,12(r1) ffc0e9b0: 7d 29 00 50 subf r9,r9,r0 ffc0e9b4: 7d 3d 4a 14 add r9,r29,r9 ffc0e9b8: 91 3b 00 00 stw r9,0(r27) /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { ffc0e9bc: 7c 7d 00 ae lbzx r3,r29,r0 ffc0e9c0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e9c4: 40 be 00 20 bne+ cr7,ffc0e9e4 ffc0e9c8: 48 00 00 9c b ffc0ea64 ffc0e9cc: 81 21 00 10 lwz r9,16(r1) ffc0e9d0: 38 09 00 01 addi r0,r9,1 ffc0e9d4: 7c 7d 00 ae lbzx r3,r29,r0 ffc0e9d8: 90 01 00 10 stw r0,16(r1) ffc0e9dc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e9e0: 41 9e 00 84 beq- cr7,ffc0ea64 if ( !IMFS_is_separator( path[ i ] ) ) ffc0e9e4: 4b ff 7b 0d bl ffc064f0 ffc0e9e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e9ec: 40 9e ff e0 bne+ cr7,ffc0e9cc rtems_set_errno_and_return_minus_one( ENOENT ); ffc0e9f0: 48 00 41 6d bl ffc12b5c <__errno> ffc0e9f4: 38 00 00 02 li r0,2 ffc0e9f8: 90 03 00 00 stw r0,0(r3) ffc0e9fc: 3b c0 ff ff li r30,-1 ffc0ea00: 4b ff fd b8 b ffc0e7b8 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); ffc0ea04: 80 01 00 10 lwz r0,16(r1) ffc0ea08: 80 81 00 08 lwz r4,8(r1) ffc0ea0c: 4b ff fd 58 b ffc0e764 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0ea10: 81 2b 00 14 lwz r9,20(r11) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0ea14: 7f e4 fb 78 mr r4,r31 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0ea18: 80 0b 00 10 lwz r0,16(r11) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0ea1c: 7f 65 db 78 mr r5,r27 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0ea20: 81 0b 00 08 lwz r8,8(r11) ffc0ea24: 81 4b 00 0c lwz r10,12(r11) ffc0ea28: 91 1f 00 00 stw r8,0(r31) ffc0ea2c: 91 5f 00 04 stw r10,4(r31) ffc0ea30: 90 1f 00 08 stw r0,8(r31) ffc0ea34: 91 3f 00 0c stw r9,12(r31) ffc0ea38: 80 0b 00 18 lwz r0,24(r11) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0ea3c: 80 61 00 10 lwz r3,16(r1) ffc0ea40: 81 61 00 0c lwz r11,12(r1) if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0ea44: 90 1f 00 10 stw r0,16(r31) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0ea48: 7c 6b 18 50 subf r3,r11,r3 ffc0ea4c: 80 09 00 04 lwz r0,4(r9) ffc0ea50: 7c 7d 1a 14 add r3,r29,r3 ffc0ea54: 7c 09 03 a6 mtctr r0 ffc0ea58: 4e 80 04 21 bctrl ffc0ea5c: 7c 7e 1b 78 mr r30,r3 ffc0ea60: 4b ff fd 58 b ffc0e7b8 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0ea64: 7f e3 fb 78 mr r3,r31 ffc0ea68: 4b ff f5 a5 bl ffc0e00c /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) ffc0ea6c: 81 3f 00 00 lwz r9,0(r31) /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0ea70: 7c 7e 1b 78 mr r30,r3 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) ffc0ea74: 80 09 00 4c lwz r0,76(r9) ffc0ea78: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ea7c: 40 9e 00 2c bne- cr7,ffc0eaa8 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) ffc0ea80: 7f e3 fb 78 mr r3,r31 ffc0ea84: 38 80 00 03 li r4,3 ffc0ea88: 4b ff f6 11 bl ffc0e098 ffc0ea8c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ea90: 40 9e fd 28 bne+ cr7,ffc0e7b8 rtems_set_errno_and_return_minus_one( EACCES ); ffc0ea94: 48 00 40 c9 bl ffc12b5c <__errno> ffc0ea98: 38 00 00 0d li r0,13 ffc0ea9c: 90 03 00 00 stw r0,0(r3) ffc0eaa0: 3b c0 ff ff li r30,-1 ffc0eaa4: 4b ff fd 14 b ffc0e7b8 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0eaa8: 48 00 40 b5 bl ffc12b5c <__errno> ffc0eaac: 38 00 00 14 li r0,20 ffc0eab0: 90 03 00 00 stw r0,0(r3) ffc0eab4: 3b c0 ff ff li r30,-1 ffc0eab8: 4b ff fd 00 b ffc0e7b8 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) rtems_set_errno_and_return_minus_one( ENOENT ); ffc0eabc: 48 00 40 a1 bl ffc12b5c <__errno> ffc0eac0: 3b c0 ff ff li r30,-1 ffc0eac4: 93 43 00 00 stw r26,0(r3) ffc0eac8: 4b ff fc f0 b ffc0e7b8 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0eacc: 81 3e 00 5c lwz r9,92(r30) return (*pathloc->ops->evalformake_h)( &path[i], ffc0ead0: 7f e4 fb 78 mr r4,r31 ffc0ead4: 7f 65 db 78 mr r5,r27 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0ead8: 81 69 00 28 lwz r11,40(r9) ffc0eadc: 80 09 00 24 lwz r0,36(r9) ffc0eae0: 81 09 00 1c lwz r8,28(r9) ffc0eae4: 81 49 00 20 lwz r10,32(r9) ffc0eae8: 90 1f 00 08 stw r0,8(r31) ffc0eaec: 91 1f 00 00 stw r8,0(r31) ffc0eaf0: 91 5f 00 04 stw r10,4(r31) ffc0eaf4: 91 7f 00 0c stw r11,12(r31) return (*pathloc->ops->evalformake_h)( &path[i], ffc0eaf8: 80 0b 00 04 lwz r0,4(r11) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0eafc: 81 29 00 2c lwz r9,44(r9) return (*pathloc->ops->evalformake_h)( &path[i], ffc0eb00: 7c 09 03 a6 mtctr r0 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0eb04: 91 3f 00 10 stw r9,16(r31) return (*pathloc->ops->evalformake_h)( &path[i], ffc0eb08: 4e 80 04 21 bctrl ffc0eb0c: 7c 7e 1b 78 mr r30,r3 ffc0eb10: 4b ff fc a8 b ffc0e7b8 =============================================================================== ffc0e5f8 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0e5f8: 94 21 ff e8 stwu r1,-24(r1) ffc0e5fc: 7c 08 02 a6 mflr r0 ffc0e600: 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 ); ffc0e604: 3f a0 00 00 lis r29,0 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0e608: 93 81 00 08 stw r28,8(r1) ffc0e60c: 7c 9c 23 78 mr r28,r4 ffc0e610: 93 c1 00 10 stw r30,16(r1) ffc0e614: 7c 7e 1b 78 mr r30,r3 ffc0e618: 90 01 00 1c stw r0,28(r1) ffc0e61c: 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 ); ffc0e620: 81 3d 27 3c lwz r9,10044(r29) ffc0e624: 48 00 00 14 b ffc0e638 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) ffc0e628: 41 9a 00 90 beq- cr6,ffc0e6b8 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ffc0e62c: 39 6b ff fd addi r11,r11,-3 ffc0e630: 2b 8b 00 01 cmplwi cr7,r11,1 ffc0e634: 41 9d 00 58 bgt- cr7,ffc0e68c <== ALWAYS TAKEN /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0e638: a1 69 00 30 lhz r11,48(r9) { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; ffc0e63c: 83 fe 00 00 lwz r31,0(r30) /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0e640: 38 0b 00 01 addi r0,r11,1 ffc0e644: 54 00 04 3e clrlwi r0,r0,16 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { ffc0e648: 2b 80 00 05 cmplwi cr7,r0,5 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0e64c: b0 09 00 30 sth r0,48(r9) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { ffc0e650: 41 9d 00 84 bgt- cr7,ffc0e6d4 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) ffc0e654: 81 7f 00 4c lwz r11,76(r31) ffc0e658: 2f 8b 00 03 cmpwi cr7,r11,3 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) ffc0e65c: 2f 0b 00 04 cmpwi cr6,r11,4 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) ffc0e660: 40 9e ff c8 bne+ cr7,ffc0e628 result = IMFS_evaluate_hard_link( node, flags ); ffc0e664: 7f c3 f3 78 mr r3,r30 ffc0e668: 7f 84 e3 78 mr r4,r28 ffc0e66c: 4b ff fa 81 bl ffc0e0ec 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 ) ) ); ffc0e670: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e674: 40 9e 00 58 bne- cr7,ffc0e6cc ffc0e678: 81 7f 00 4c lwz r11,76(r31) ffc0e67c: 81 3d 27 3c lwz r9,10044(r29) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ffc0e680: 39 6b ff fd addi r11,r11,-3 ffc0e684: 2b 8b 00 01 cmplwi cr7,r11,1 ffc0e688: 40 9d ff b0 ble+ cr7,ffc0e638 <== ALWAYS TAKEN ffc0e68c: 38 60 00 00 li r3,0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; ffc0e690: 38 00 00 00 li r0,0 return result; } ffc0e694: 83 81 00 08 lwz r28,8(r1) /* * Clear link counter. */ rtems_filesystem_link_counts = 0; ffc0e698: b0 09 00 30 sth r0,48(r9) return result; } ffc0e69c: 80 01 00 1c lwz r0,28(r1) ffc0e6a0: 83 a1 00 0c lwz r29,12(r1) ffc0e6a4: 7c 08 03 a6 mtlr r0 ffc0e6a8: 83 c1 00 10 lwz r30,16(r1) ffc0e6ac: 83 e1 00 14 lwz r31,20(r1) ffc0e6b0: 38 21 00 18 addi r1,r1,24 ffc0e6b4: 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 ); ffc0e6b8: 7f c3 f3 78 mr r3,r30 ffc0e6bc: 7f 84 e3 78 mr r4,r28 ffc0e6c0: 4b ff fe 81 bl ffc0e540 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); ffc0e6c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e6c8: 41 9e ff b0 beq+ cr7,ffc0e678 ffc0e6cc: 81 3d 27 3c lwz r9,10044(r29) ffc0e6d0: 4b ff ff c0 b ffc0e690 * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; ffc0e6d4: 38 00 00 00 li r0,0 ffc0e6d8: b0 09 00 30 sth r0,48(r9) rtems_set_errno_and_return_minus_one( ELOOP ); ffc0e6dc: 48 00 44 81 bl ffc12b5c <__errno> ffc0e6e0: 38 00 00 5c li r0,92 ffc0e6e4: 90 03 00 00 stw r0,0(r3) ffc0e6e8: 38 60 ff ff li r3,-1 */ rtems_filesystem_link_counts = 0; return result; } ffc0e6ec: 80 01 00 1c lwz r0,28(r1) ffc0e6f0: 83 81 00 08 lwz r28,8(r1) ffc0e6f4: 7c 08 03 a6 mtlr r0 ffc0e6f8: 83 a1 00 0c lwz r29,12(r1) ffc0e6fc: 83 c1 00 10 lwz r30,16(r1) ffc0e700: 83 e1 00 14 lwz r31,20(r1) ffc0e704: 38 21 00 18 addi r1,r1,24 ffc0e708: 4e 80 00 20 blr =============================================================================== ffc0e098 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { ffc0e098: 7c 08 02 a6 mflr r0 ffc0e09c: 94 21 ff f8 stwu r1,-8(r1) ffc0e0a0: 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 ) ) ffc0e0a4: 54 80 00 39 rlwinm. r0,r4,0,0,28 ffc0e0a8: 40 82 00 30 bne- ffc0e0d8 <== 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 ) ffc0e0ac: 81 23 00 00 lwz r9,0(r3) */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; ffc0e0b0: 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 ) ffc0e0b4: 80 69 00 30 lwz r3,48(r9) ffc0e0b8: 7c 83 18 38 and r3,r4,r3 return 1; ffc0e0bc: 7c 83 1a 78 xor r3,r4,r3 ffc0e0c0: 7c 63 00 34 cntlzw r3,r3 ffc0e0c4: 54 63 d9 7e rlwinm r3,r3,27,5,31 return 0; } ffc0e0c8: 80 01 00 0c lwz r0,12(r1) ffc0e0cc: 38 21 00 08 addi r1,r1,8 ffc0e0d0: 7c 08 03 a6 mtlr r0 ffc0e0d4: 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 ); ffc0e0d8: 48 00 4a 85 bl ffc12b5c <__errno> <== NOT EXECUTED ffc0e0dc: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0e0e0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0e0e4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0e0e8: 4b ff ff e0 b ffc0e0c8 <== NOT EXECUTED =============================================================================== ffc0586c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc0586c: 94 21 ff f0 stwu r1,-16(r1) ffc05870: 7c 08 02 a6 mflr r0 ffc05874: 7c 68 1b 78 mr r8,r3 ffc05878: 90 01 00 14 stw r0,20(r1) ffc0587c: 93 c1 00 08 stw r30,8(r1) ffc05880: 93 e1 00 0c stw r31,12(r1) off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); ffc05884: 81 23 00 1c lwz r9,28(r3) ffc05888: 80 69 00 50 lwz r3,80(r9) ffc0588c: 48 00 c6 0d bl ffc11e98 ffc05890: 7c 7e fe 70 srawi r30,r3,31 IMFS_FIFO_RETURN(err); ffc05894: 2f 9e 00 00 cmpwi cr7,r30,0 rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); ffc05898: 7c 7f 1b 78 mr r31,r3 IMFS_FIFO_RETURN(err); ffc0589c: 41 9c 00 24 blt- cr7,ffc058c0 <== ALWAYS TAKEN } ffc058a0: 80 01 00 14 lwz r0,20(r1) ffc058a4: 7f c3 f3 78 mr r3,r30 ffc058a8: 7f e4 fb 78 mr r4,r31 ffc058ac: 83 c1 00 08 lwz r30,8(r1) ffc058b0: 7c 08 03 a6 mtlr r0 ffc058b4: 83 e1 00 0c lwz r31,12(r1) ffc058b8: 38 21 00 10 addi r1,r1,16 ffc058bc: 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); ffc058c0: 48 00 ee b1 bl ffc14770 <__errno> ffc058c4: 7c 1f 00 d0 neg r0,r31 ffc058c8: 90 03 00 00 stw r0,0(r3) ffc058cc: 3b c0 ff ff li r30,-1 ffc058d0: 3b e0 ff ff li r31,-1 ffc058d4: 4b ff ff cc b ffc058a0 =============================================================================== ffc058d8 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { ffc058d8: 94 21 ff e0 stwu r1,-32(r1) ffc058dc: 7c 08 02 a6 mflr r0 ffc058e0: 7c 66 1b 78 mr r6,r3 ffc058e4: 90 01 00 24 stw r0,36(r1) ffc058e8: 93 c1 00 18 stw r30,24(r1) ffc058ec: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *jnode = iop->pathinfo.node_access; ffc058f0: 83 e3 00 1c lwz r31,28(r3) int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); ffc058f4: 80 7f 00 50 lwz r3,80(r31) ffc058f8: 48 00 c2 a9 bl ffc11ba0 if (err > 0) { ffc058fc: 7c 7e 1b 79 mr. r30,r3 ffc05900: 40 81 00 38 ble- ffc05938 IMFS_mtime_ctime_update(jnode); ffc05904: 38 61 00 08 addi r3,r1,8 ffc05908: 38 80 00 00 li r4,0 ffc0590c: 48 00 16 dd bl ffc06fe8 ffc05910: 80 01 00 08 lwz r0,8(r1) ffc05914: 90 1f 00 44 stw r0,68(r31) ffc05918: 90 1f 00 48 stw r0,72(r31) } IMFS_FIFO_RETURN(err); } ffc0591c: 80 01 00 24 lwz r0,36(r1) ffc05920: 7f c3 f3 78 mr r3,r30 ffc05924: 83 e1 00 1c lwz r31,28(r1) ffc05928: 7c 08 03 a6 mtlr r0 ffc0592c: 83 c1 00 18 lwz r30,24(r1) ffc05930: 38 21 00 20 addi r1,r1,32 ffc05934: 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); ffc05938: 41 82 ff e4 beq+ ffc0591c <== NEVER TAKEN ffc0593c: 7f de 00 d0 neg r30,r30 ffc05940: 48 00 ee 31 bl ffc14770 <__errno> ffc05944: 93 c3 00 00 stw r30,0(r3) ffc05948: 3b c0 ff ff li r30,-1 ffc0594c: 4b ff ff d0 b ffc0591c =============================================================================== ffc0ec28 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0ec28: 94 21 ff e8 stwu r1,-24(r1) ffc0ec2c: 7c 08 02 a6 mflr r0 ffc0ec30: 93 e1 00 14 stw r31,20(r1) /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0ec34: 3f e0 ff c2 lis r31,-62 ffc0ec38: 3b ff f5 84 addi r31,r31,-2684 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0ec3c: 93 c1 00 10 stw r30,16(r1) ffc0ec40: 7c 9e 23 78 mr r30,r4 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0ec44: 7f e4 fb 78 mr r4,r31 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0ec48: 93 81 00 08 stw r28,8(r1) ffc0ec4c: 7c 7c 1b 78 mr r28,r3 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0ec50: 7f c3 f3 78 mr r3,r30 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0ec54: 90 01 00 1c stw r0,28(r1) ffc0ec58: 93 a1 00 0c stw r29,12(r1) /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0ec5c: 48 00 52 51 bl ffc13eac ffc0ec60: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ec64: 41 9e 00 54 beq- cr7,ffc0ecb8 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) ffc0ec68: 7f c3 f3 78 mr r3,r30 ffc0ec6c: 38 9f 00 04 addi r4,r31,4 ffc0ec70: 48 00 52 3d bl ffc13eac ffc0ec74: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ec78: 41 9e 00 64 beq- cr7,ffc0ecdc <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0ec7c: 83 fc 00 50 lwz r31,80(r28) RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc0ec80: 3b bc 00 54 addi r29,r28,84 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; ffc0ec84: 3b 80 00 00 li r28,0 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc0ec88: 7f 9f e8 00 cmpw cr7,r31,r29 ffc0ec8c: 40 be 00 14 bne+ cr7,ffc0eca0 ffc0ec90: 48 00 00 28 b ffc0ecb8 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { ffc0ec94: 83 ff 00 00 lwz r31,0(r31) if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc0ec98: 7f 9f e8 00 cmpw cr7,r31,r29 ffc0ec9c: 41 9e 00 68 beq- cr7,ffc0ed04 !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 ) ) ffc0eca0: 38 9f 00 0c addi r4,r31,12 ffc0eca4: 7f c3 f3 78 mr r3,r30 ffc0eca8: 48 00 52 05 bl ffc13eac ffc0ecac: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ecb0: 40 9e ff e4 bne+ cr7,ffc0ec94 ffc0ecb4: 7f fc fb 78 mr r28,r31 return the_jnode; } return 0; } ffc0ecb8: 80 01 00 1c lwz r0,28(r1) ffc0ecbc: 7f 83 e3 78 mr r3,r28 ffc0ecc0: 83 a1 00 0c lwz r29,12(r1) ffc0ecc4: 7c 08 03 a6 mtlr r0 ffc0ecc8: 83 81 00 08 lwz r28,8(r1) ffc0eccc: 83 c1 00 10 lwz r30,16(r1) ffc0ecd0: 83 e1 00 14 lwz r31,20(r1) ffc0ecd4: 38 21 00 18 addi r1,r1,24 ffc0ecd8: 4e 80 00 20 blr ffc0ecdc: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) return directory->Parent; ffc0ece0: 83 9c 00 08 lwz r28,8(r28) <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } ffc0ece4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0ece8: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc0ecec: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0ecf0: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc0ecf4: 83 81 00 08 lwz r28,8(r1) <== NOT EXECUTED ffc0ecf8: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc0ecfc: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc0ed00: 4e 80 00 20 blr <== NOT EXECUTED ffc0ed04: 80 01 00 1c lwz r0,28(r1) if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; ffc0ed08: 3b 80 00 00 li r28,0 } ffc0ed0c: 7f 83 e3 78 mr r3,r28 ffc0ed10: 83 a1 00 0c lwz r29,12(r1) ffc0ed14: 7c 08 03 a6 mtlr r0 ffc0ed18: 83 81 00 08 lwz r28,8(r1) ffc0ed1c: 83 c1 00 10 lwz r30,16(r1) ffc0ed20: 83 e1 00 14 lwz r31,20(r1) ffc0ed24: 38 21 00 18 addi r1,r1,24 ffc0ed28: 4e 80 00 20 blr =============================================================================== ffc0eb14 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0eb14: 94 21 ff d0 stwu r1,-48(r1) ffc0eb18: 7c 08 02 a6 mflr r0 ffc0eb1c: 90 01 00 34 stw r0,52(r1) * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; ffc0eb20: 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 ) { ffc0eb24: 93 c1 00 28 stw r30,40(r1) * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; ffc0eb28: 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; ffc0eb2c: 83 c3 00 1c lwz r30,28(r3) loc = temp_mt_entry->mt_fs_root; ffc0eb30: 81 63 00 24 lwz r11,36(r3) ffc0eb34: 81 23 00 28 lwz r9,40(r3) ffc0eb38: 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; ffc0eb3c: 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 ) { ffc0eb40: 93 e1 00 2c stw r31,44(r1) * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; ffc0eb44: 93 c1 00 08 stw r30,8(r1) ffc0eb48: 91 41 00 0c stw r10,12(r1) ffc0eb4c: 91 61 00 10 stw r11,16(r1) ffc0eb50: 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; ffc0eb54: 90 03 00 1c stw r0,28(r3) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc0eb58: 38 61 00 08 addi r3,r1,8 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; ffc0eb5c: 83 fe 00 08 lwz r31,8(r30) loc.node_access = (void *)jnode; ffc0eb60: 93 c1 00 08 stw r30,8(r1) IMFS_Set_handlers( &loc ); ffc0eb64: 4b ff f4 a9 bl ffc0e00c if ( jnode->type != IMFS_DIRECTORY ) { ffc0eb68: 80 1e 00 4c lwz r0,76(r30) ffc0eb6c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0eb70: 40 9e 00 60 bne- cr7,ffc0ebd0 <== NEVER TAKEN result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { ffc0eb74: 81 3e 00 50 lwz r9,80(r30) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0eb78: 38 1e 00 54 addi r0,r30,84 ffc0eb7c: 7f 89 00 00 cmpw cr7,r9,r0 ffc0eb80: 41 9e 00 50 beq- cr7,ffc0ebd0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { ffc0eb84: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0eb88: 41 9e 00 68 beq- cr7,ffc0ebf0 <== NEVER TAKEN if ( jnode->type == IMFS_DIRECTORY ) { ffc0eb8c: 80 1e 00 4c lwz r0,76(r30) ffc0eb90: 2f 80 00 01 cmpwi cr7,r0,1 ffc0eb94: 40 9e ff c4 bne+ cr7,ffc0eb58 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0eb98: 80 1e 00 50 lwz r0,80(r30) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0eb9c: 39 3e 00 54 addi r9,r30,84 if ( jnode_has_children( jnode ) ) ffc0eba0: 7f 80 48 00 cmpw cr7,r0,r9 ffc0eba4: 41 be ff b4 beq- cr7,ffc0eb58 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); ffc0eba8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ebac: 41 9e 00 44 beq- cr7,ffc0ebf0 <== NEVER TAKEN ffc0ebb0: 7c 1e 03 78 mr r30,r0 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc0ebb4: 38 61 00 08 addi r3,r1,8 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; ffc0ebb8: 83 fe 00 08 lwz r31,8(r30) loc.node_access = (void *)jnode; ffc0ebbc: 93 c1 00 08 stw r30,8(r1) IMFS_Set_handlers( &loc ); ffc0ebc0: 4b ff f4 4d bl ffc0e00c if ( jnode->type != IMFS_DIRECTORY ) { ffc0ebc4: 80 1e 00 4c lwz r0,76(r30) ffc0ebc8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ebcc: 41 be ff a8 beq- cr7,ffc0eb74 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); ffc0ebd0: 38 60 00 00 li r3,0 ffc0ebd4: 38 81 00 08 addi r4,r1,8 ffc0ebd8: 4b ff 5b 55 bl ffc0472c if (result != 0) ffc0ebdc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ebe0: 40 9e 00 2c bne- cr7,ffc0ec0c <== NEVER TAKEN return -1; jnode = next; ffc0ebe4: 7f fe fb 78 mr r30,r31 } if ( jnode != NULL ) { ffc0ebe8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0ebec: 40 9e ff a0 bne+ cr7,ffc0eb8c } } } while (jnode != NULL); return 0; } ffc0ebf0: 80 01 00 34 lwz r0,52(r1) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; ffc0ebf4: 38 60 00 00 li r3,0 } ffc0ebf8: 83 c1 00 28 lwz r30,40(r1) ffc0ebfc: 7c 08 03 a6 mtlr r0 ffc0ec00: 83 e1 00 2c lwz r31,44(r1) ffc0ec04: 38 21 00 30 addi r1,r1,48 ffc0ec08: 4e 80 00 20 blr ffc0ec0c: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; ffc0ec10: 38 60 ff ff li r3,-1 <== NOT EXECUTED } } } while (jnode != NULL); return 0; } ffc0ec14: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc0ec18: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0ec1c: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc0ec20: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc0ec24: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0ed2c : const char *path, int pathlen, char *token, int *token_len ) { ffc0ed2c: 94 21 ff e0 stwu r1,-32(r1) ffc0ed30: 7c 08 02 a6 mflr r0 ffc0ed34: 93 41 00 08 stw r26,8(r1) ffc0ed38: 7c da 33 78 mr r26,r6 ffc0ed3c: 93 81 00 10 stw r28,16(r1) register int i = 0; ffc0ed40: 3b 80 00 00 li r28,0 const char *path, int pathlen, char *token, int *token_len ) { ffc0ed44: 93 a1 00 14 stw r29,20(r1) ffc0ed48: 7c 9d 23 78 mr r29,r4 ffc0ed4c: 93 c1 00 18 stw r30,24(r1) ffc0ed50: 7c be 2b 78 mr r30,r5 ffc0ed54: 93 e1 00 1c stw r31,28(r1) ffc0ed58: 7c 7f 1b 78 mr r31,r3 ffc0ed5c: 90 01 00 24 stw r0,36(r1) ffc0ed60: 93 61 00 0c stw r27,12(r1) register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; ffc0ed64: 8b 63 00 00 lbz r27,0(r3) while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { ffc0ed68: 48 00 00 08 b ffc0ed70 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; ffc0ed6c: 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) ) { ffc0ed70: 7f 63 db 78 mr r3,r27 ffc0ed74: 4b ff 77 7d bl ffc064f0 ffc0ed78: 7f 1c e8 00 cmpw cr6,r28,r29 ffc0ed7c: 2f 83 00 00 cmpwi cr7,r3,0 token[i] = c; if ( i == IMFS_NAME_MAX ) ffc0ed80: 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) ) { ffc0ed84: 40 9e 00 40 bne- cr7,ffc0edc4 ffc0ed88: 40 98 00 3c bge- cr6,ffc0edc4 <== NEVER TAKEN token[i] = c; ffc0ed8c: 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]; ffc0ed90: 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 ) ffc0ed94: 40 86 ff d8 bne+ cr1,ffc0ed6c return IMFS_INVALID_TOKEN; ffc0ed98: 38 60 00 04 li r3,4 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } ffc0ed9c: 80 01 00 24 lwz r0,36(r1) ffc0eda0: 83 41 00 08 lwz r26,8(r1) ffc0eda4: 7c 08 03 a6 mtlr r0 ffc0eda8: 83 61 00 0c lwz r27,12(r1) ffc0edac: 83 81 00 10 lwz r28,16(r1) ffc0edb0: 83 a1 00 14 lwz r29,20(r1) ffc0edb4: 83 c1 00 18 lwz r30,24(r1) ffc0edb8: 83 e1 00 1c lwz r31,28(r1) ffc0edbc: 38 21 00 20 addi r1,r1,32 ffc0edc0: 4e 80 00 20 blr /* * Copy a seperator into token. */ if ( i == 0 ) { ffc0edc4: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0edc8: 40 9e 00 28 bne- cr7,ffc0edf0 token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0edcc: 2f 9b 00 00 cmpwi cr7,r27,0 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; ffc0edd0: 9b 7e 00 00 stb r27,0(r30) if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; ffc0edd4: 38 60 00 00 li r3,0 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0edd8: 41 9e 00 10 beq- cr7,ffc0ede8 ffc0eddc: 2f 9d 00 00 cmpwi cr7,r29,0 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; ffc0ede0: 7f 83 e3 78 mr r3,r28 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0ede4: 40 9e 00 8c bne- cr7,ffc0ee70 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0ede8: 93 9a 00 00 stw r28,0(r26) ffc0edec: 4b ff ff b0 b ffc0ed9c i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { ffc0edf0: 7d 3e e2 14 add r9,r30,r28 ffc0edf4: 88 09 ff ff lbz r0,-1(r9) ffc0edf8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0edfc: 41 9e 00 0c beq- cr7,ffc0ee08 <== NEVER TAKEN token[i] = '\0'; ffc0ee00: 38 00 00 00 li r0,0 ffc0ee04: 7c 1e e1 ae stbx r0,r30,r28 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0ee08: 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 ) ffc0ee0c: 3c 80 ff c2 lis r4,-62 ffc0ee10: 7f c3 f3 78 mr r3,r30 ffc0ee14: 38 84 f5 90 addi r4,r4,-2672 ffc0ee18: 48 00 50 95 bl ffc13eac ffc0ee1c: 2f 83 00 00 cmpwi cr7,r3,0 type = IMFS_UP_DIR; ffc0ee20: 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 ) ffc0ee24: 41 be ff 78 beq- cr7,ffc0ed9c type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) ffc0ee28: 3c 80 ff c2 lis r4,-62 ffc0ee2c: 7f c3 f3 78 mr r3,r30 ffc0ee30: 38 84 f5 8c addi r4,r4,-2676 ffc0ee34: 48 00 50 79 bl ffc13eac type = IMFS_CURRENT_DIR; } return type; } ffc0ee38: 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 ) ffc0ee3c: 30 63 ff ff addic r3,r3,-1 ffc0ee40: 7c 63 19 10 subfe r3,r3,r3 type = IMFS_CURRENT_DIR; } return type; } ffc0ee44: 83 41 00 08 lwz r26,8(r1) ffc0ee48: 7c 08 03 a6 mtlr r0 ffc0ee4c: 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 ) ffc0ee50: 54 63 00 3c rlwinm r3,r3,0,0,30 type = IMFS_CURRENT_DIR; } return type; } ffc0ee54: 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 ) ffc0ee58: 38 63 00 03 addi r3,r3,3 type = IMFS_CURRENT_DIR; } return type; } ffc0ee5c: 83 a1 00 14 lwz r29,20(r1) ffc0ee60: 83 c1 00 18 lwz r30,24(r1) ffc0ee64: 83 e1 00 1c lwz r31,28(r1) ffc0ee68: 38 21 00 20 addi r1,r1,32 ffc0ee6c: 4e 80 00 20 blr if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; ffc0ee70: 3b 80 00 01 li r28,1 type = IMFS_CURRENT_DIR; ffc0ee74: 38 60 00 01 li r3,1 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0ee78: 93 9a 00 00 stw r28,0(r26) ffc0ee7c: 4b ff ff 20 b ffc0ed9c =============================================================================== ffc0421c : 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 ) { ffc0421c: 94 21 ff e0 stwu r1,-32(r1) ffc04220: 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, ffc04224: 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 ) { ffc04228: 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, ffc0422c: 80 09 26 f8 lwz r0,9976(r9) const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { ffc04230: 93 41 00 08 stw r26,8(r1) ffc04234: 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) { ffc04238: 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 ) { ffc0423c: 93 81 00 10 stw r28,16(r1) ffc04240: 7c dc 33 78 mr r28,r6 ffc04244: 93 a1 00 14 stw r29,20(r1) ffc04248: 7c 9d 23 78 mr r29,r4 ffc0424c: 93 c1 00 18 stw r30,24(r1) ffc04250: 7c be 2b 78 mr r30,r5 ffc04254: 93 e1 00 1c stw r31,28(r1) ffc04258: 7c 7f 1b 78 mr r31,r3 ffc0425c: 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) { ffc04260: 41 9e 00 30 beq- cr7,ffc04290 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) ffc04264: 2f 80 00 0f cmpwi cr7,r0,15 ffc04268: 40 9d 00 24 ble- cr7,ffc0428c ffc0426c: 39 60 00 05 li r11,5 ffc04270: 7d 69 03 a6 mtctr r11 ffc04274: 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) { ffc04278: 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) { ffc0427c: 55 29 08 3c rlwinm r9,r9,1,0,30 if (bit_mask == requested_bytes_per_block) { ffc04280: 41 9e 00 10 beq- cr7,ffc04290 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) ffc04284: 41 9c 00 08 blt- cr7,ffc0428c <== 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) { ffc04288: 42 00 ff f0 bdnz+ ffc04278 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); ffc0428c: 38 00 00 80 li r0,128 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ffc04290: 3d 20 00 00 lis r9,0 ffc04294: 90 09 27 a4 stw r0,10148(r9) /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); ffc04298: 48 00 9c 9d bl ffc0df34 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; ffc0429c: 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(); ffc042a0: 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; ffc042a4: 38 84 f5 34 addi r4,r4,-2764 ffc042a8: 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; ffc042ac: 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(); ffc042b0: 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; ffc042b4: 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; ffc042b8: 93 bf 00 28 stw r29,40(r31) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; ffc042bc: 48 00 f5 dd bl ffc13898 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); ffc042c0: 38 60 00 01 li r3,1 ffc042c4: 38 80 00 14 li r4,20 ffc042c8: 48 00 08 d1 bl ffc04b98 if ( !fs_info ) { ffc042cc: 7c 69 1b 79 mr. r9,r3 ffc042d0: 41 82 00 60 beq- ffc04330 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc042d4: 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; ffc042d8: 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; ffc042dc: 38 00 00 01 li r0,1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc042e0: 81 4b 28 74 lwz r10,10356(r11) fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; ffc042e4: 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; ffc042e8: 90 09 00 04 stw r0,4(r9) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc042ec: 39 0a 00 01 addi r8,r10,1 ffc042f0: 91 49 00 00 stw r10,0(r9) fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; ffc042f4: 93 c9 00 08 stw r30,8(r9) fs_info->directory_handlers = directory_handlers; ffc042f8: 93 89 00 0c stw r28,12(r9) fs_info->fifo_handlers = fifo_handlers; ffc042fc: 93 49 00 10 stw r26,16(r9) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc04300: 91 0b 28 74 stw r8,10356(r11) fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; ffc04304: 90 1b 00 38 stw r0,56(r27) return 0; } ffc04308: 80 01 00 24 lwz r0,36(r1) ffc0430c: 83 41 00 08 lwz r26,8(r1) ffc04310: 7c 08 03 a6 mtlr r0 ffc04314: 83 61 00 0c lwz r27,12(r1) ffc04318: 83 81 00 10 lwz r28,16(r1) ffc0431c: 83 a1 00 14 lwz r29,20(r1) ffc04320: 83 c1 00 18 lwz r30,24(r1) ffc04324: 83 e1 00 1c lwz r31,28(r1) ffc04328: 38 21 00 20 addi r1,r1,32 ffc0432c: 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); ffc04330: 7f 63 db 78 mr r3,r27 ffc04334: 48 00 0e 69 bl ffc0519c rtems_set_errno_and_return_minus_one(ENOMEM); ffc04338: 48 00 e8 25 bl ffc12b5c <__errno> ffc0433c: 38 00 00 0c li r0,12 ffc04340: 90 03 00 00 stw r0,0(r3) ffc04344: 38 60 ff ff li r3,-1 ffc04348: 4b ff ff c0 b ffc04308 =============================================================================== ffc11544 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc11544: 94 21 ff c8 stwu r1,-56(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11548: 3d 20 00 00 lis r9,0 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc1154c: 7c 08 02 a6 mflr r0 ffc11550: 93 a1 00 2c stw r29,44(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11554: 83 a9 27 a4 lwz r29,10148(r9) */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc11558: 90 01 00 3c stw r0,60(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc1155c: 57 a9 f0 be rlwinm r9,r29,30,2,31 ffc11560: 39 69 00 01 addi r11,r9,1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc11564: 93 41 00 20 stw r26,32(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11568: 7d 6b 49 d6 mullw r11,r11,r9 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc1156c: 93 81 00 28 stw r28,40(r1) ffc11570: 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 ) ffc11574: 38 0b 00 01 addi r0,r11,1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc11578: 93 e1 00 34 stw r31,52(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc1157c: 39 60 00 00 li r11,0 ffc11580: 7f 8b 28 00 cmpw cr7,r11,r5 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc11584: 93 01 00 18 stw r24,24(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11588: 7d 20 49 d6 mullw r9,r0,r9 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc1158c: 93 21 00 1c stw r25,28(r1) ffc11590: 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 ) ffc11594: 39 29 ff ff addi r9,r9,-1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc11598: 93 61 00 24 stw r27,36(r1) ffc1159c: 7c 7f 1b 78 mr r31,r3 ffc115a0: 93 c1 00 30 stw r30,48(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc115a4: 7d 29 e9 d6 mullw r9,r9,r29 ffc115a8: 40 9d 01 78 ble- cr7,ffc11720 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 ) ffc115ac: 83 7f 00 50 lwz r27,80(r31) ffc115b0: 83 3f 00 54 lwz r25,84(r31) ffc115b4: 7f 9c d8 00 cmpw cr7,r28,r27 ffc115b8: 40 9d 00 c4 ble- cr7,ffc1167c <== ALWAYS TAKEN return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc115bc: 7f b8 fe 70 srawi r24,r29,31 ffc115c0: 7f 05 c3 78 mr r5,r24 ffc115c4: 7f a6 eb 78 mr r6,r29 ffc115c8: 7f 83 e3 78 mr r3,r28 ffc115cc: 7f 44 d3 78 mr r4,r26 ffc115d0: 48 00 ac c1 bl ffc1c290 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc115d4: 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; ffc115d8: 7c 9e 23 78 mr r30,r4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc115dc: 7f 05 c3 78 mr r5,r24 ffc115e0: 7f 24 cb 78 mr r4,r25 ffc115e4: 7f a6 eb 78 mr r6,r29 ffc115e8: 48 00 ac a9 bl ffc1c290 <__divdi3> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc115ec: 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; ffc115f0: 7c 9b 23 78 mr r27,r4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc115f4: 41 9c 00 c8 blt- cr7,ffc116bc <== NEVER TAKEN ffc115f8: 7c 9d 23 78 mr r29,r4 ffc115fc: 48 00 00 10 b ffc1160c ffc11600: 3b bd 00 01 addi r29,r29,1 ffc11604: 7f 9e e8 40 cmplw cr7,r30,r29 ffc11608: 41 9c 00 b4 blt- cr7,ffc116bc if ( IMFS_memfile_addblock( the_jnode, block ) ) { ffc1160c: 7f a4 eb 78 mr r4,r29 ffc11610: 7f e3 fb 78 mr r3,r31 ffc11614: 4b ff fc 2d bl ffc11240 ffc11618: 2f 83 00 00 cmpwi cr7,r3,0 ffc1161c: 41 9e ff e4 beq+ cr7,ffc11600 ffc11620: 48 00 00 14 b ffc11634 for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); ffc11624: 7f a4 eb 78 mr r4,r29 ffc11628: 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-- ) { ffc1162c: 3b bd ff ff addi r29,r29,-1 IMFS_memfile_remove_block( the_jnode, block ); ffc11630: 4b ff fe d9 bl ffc11508 /* * 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-- ) { ffc11634: 7f 9b e8 40 cmplw cr7,r27,r29 ffc11638: 40 9d ff ec ble+ cr7,ffc11624 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); ffc1163c: 48 00 15 21 bl ffc12b5c <__errno> ffc11640: 38 00 00 1c li r0,28 ffc11644: 90 03 00 00 stw r0,0(r3) ffc11648: 38 60 ff ff li r3,-1 the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } ffc1164c: 80 01 00 3c lwz r0,60(r1) ffc11650: 83 01 00 18 lwz r24,24(r1) ffc11654: 7c 08 03 a6 mtlr r0 ffc11658: 83 21 00 1c lwz r25,28(r1) ffc1165c: 83 41 00 20 lwz r26,32(r1) ffc11660: 83 61 00 24 lwz r27,36(r1) ffc11664: 83 81 00 28 lwz r28,40(r1) ffc11668: 83 a1 00 2c lwz r29,44(r1) ffc1166c: 83 c1 00 30 lwz r30,48(r1) ffc11670: 83 e1 00 34 lwz r31,52(r1) ffc11674: 38 21 00 38 addi r1,r1,56 ffc11678: 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 ) ffc1167c: 40 9e 00 0c bne- cr7,ffc11688 ffc11680: 7f 9a c8 40 cmplw cr7,r26,r25 ffc11684: 41 9d ff 38 bgt+ cr7,ffc115bc the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } ffc11688: 80 01 00 3c lwz r0,60(r1) /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) return 0; ffc1168c: 38 60 00 00 li r3,0 the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } ffc11690: 83 01 00 18 lwz r24,24(r1) ffc11694: 7c 08 03 a6 mtlr r0 ffc11698: 83 21 00 1c lwz r25,28(r1) ffc1169c: 83 41 00 20 lwz r26,32(r1) ffc116a0: 83 61 00 24 lwz r27,36(r1) ffc116a4: 83 81 00 28 lwz r28,40(r1) ffc116a8: 83 a1 00 2c lwz r29,44(r1) ffc116ac: 83 c1 00 30 lwz r30,48(r1) ffc116b0: 83 e1 00 34 lwz r31,52(r1) ffc116b4: 38 21 00 38 addi r1,r1,56 ffc116b8: 4e 80 00 20 blr } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc116bc: 93 9f 00 50 stw r28,80(r31) IMFS_update_ctime(the_jnode); ffc116c0: 38 80 00 00 li r4,0 ffc116c4: 38 61 00 08 addi r3,r1,8 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc116c8: 93 5f 00 54 stw r26,84(r31) IMFS_update_ctime(the_jnode); ffc116cc: 4b ff 3b 99 bl ffc05264 ffc116d0: 80 01 00 08 lwz r0,8(r1) IMFS_update_mtime(the_jnode); ffc116d4: 38 61 00 08 addi r3,r1,8 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); ffc116d8: 90 1f 00 48 stw r0,72(r31) IMFS_update_mtime(the_jnode); ffc116dc: 38 80 00 00 li r4,0 ffc116e0: 4b ff 3b 85 bl ffc05264 ffc116e4: 80 01 00 08 lwz r0,8(r1) return 0; ffc116e8: 38 60 00 00 li r3,0 } ffc116ec: 83 01 00 18 lwz r24,24(r1) * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); ffc116f0: 90 1f 00 44 stw r0,68(r31) return 0; } ffc116f4: 80 01 00 3c lwz r0,60(r1) ffc116f8: 83 21 00 1c lwz r25,28(r1) ffc116fc: 7c 08 03 a6 mtlr r0 ffc11700: 83 41 00 20 lwz r26,32(r1) ffc11704: 83 61 00 24 lwz r27,36(r1) ffc11708: 83 81 00 28 lwz r28,40(r1) ffc1170c: 83 a1 00 2c lwz r29,44(r1) ffc11710: 83 c1 00 30 lwz r30,48(r1) ffc11714: 83 e1 00 34 lwz r31,52(r1) ffc11718: 38 21 00 38 addi r1,r1,56 ffc1171c: 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 ) ffc11720: 40 9e 00 0c bne- cr7,ffc1172c <== NEVER TAKEN ffc11724: 7f 89 30 40 cmplw cr7,r9,r6 ffc11728: 41 9d fe 84 bgt+ cr7,ffc115ac rtems_set_errno_and_return_minus_one( EINVAL ); ffc1172c: 48 00 14 31 bl ffc12b5c <__errno> ffc11730: 38 00 00 16 li r0,22 ffc11734: 90 03 00 00 stw r0,0(r3) ffc11738: 38 60 ff ff li r3,-1 ffc1173c: 4b ff ff 10 b ffc1164c =============================================================================== ffc10c80 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc10c80: 94 21 ff d8 stwu r1,-40(r1) ffc10c84: 7c 08 02 a6 mflr r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc10c88: 3d 20 00 00 lis r9,0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc10c8c: 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 ) { ffc10c90: 80 09 27 a4 lwz r0,10148(r9) #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc10c94: 93 e1 00 24 stw r31,36(r1) ffc10c98: 7c 7f 1b 78 mr r31,r3 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc10c9c: 54 09 f0 be rlwinm r9,r0,30,2,31 ffc10ca0: 38 09 ff ff addi r0,r9,-1 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc10ca4: 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 ) { ffc10ca8: 7f 84 00 40 cmplw cr7,r4,r0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc10cac: 93 81 00 18 stw r28,24(r1) ffc10cb0: 93 a1 00 1c stw r29,28(r1) ffc10cb4: 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 ) { ffc10cb8: 41 9d 00 4c bgt- cr7,ffc10d04 p = info->indirect; if ( malloc_it ) { ffc10cbc: 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; ffc10cc0: 80 63 00 58 lwz r3,88(r3) if ( malloc_it ) { ffc10cc4: 40 9e 01 5c bne- cr7,ffc10e20 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) ffc10cc8: 2f 83 00 00 cmpwi cr7,r3,0 return 0; ffc10ccc: 3b c0 00 00 li r30,0 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) ffc10cd0: 41 9e 00 0c beq- cr7,ffc10cdc <== NEVER TAKEN return 0; return &info->indirect[ my_block ]; ffc10cd4: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc10cd8: 7f c3 22 14 add r30,r3,r4 /* * This means the requested block number is out of range. */ return 0; } ffc10cdc: 80 01 00 2c lwz r0,44(r1) ffc10ce0: 7f c3 f3 78 mr r3,r30 ffc10ce4: 83 61 00 14 lwz r27,20(r1) ffc10ce8: 7c 08 03 a6 mtlr r0 ffc10cec: 83 81 00 18 lwz r28,24(r1) ffc10cf0: 83 a1 00 1c lwz r29,28(r1) ffc10cf4: 83 c1 00 20 lwz r30,32(r1) ffc10cf8: 83 e1 00 24 lwz r31,36(r1) ffc10cfc: 38 21 00 28 addi r1,r1,40 ffc10d00: 4e 80 00 20 blr /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { ffc10d04: 3b 69 00 01 addi r27,r9,1 ffc10d08: 7f 7b 49 d6 mullw r27,r27,r9 ffc10d0c: 38 1b ff ff addi r0,r27,-1 ffc10d10: 7f 84 00 40 cmplw cr7,r4,r0 ffc10d14: 40 9d 00 a4 ble- cr7,ffc10db8 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc10d18: 39 7b 00 01 addi r11,r27,1 ffc10d1c: 7d 6b 49 d6 mullw r11,r11,r9 } /* * This means the requested block number is out of range. */ return 0; ffc10d20: 3b c0 00 00 li r30,0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc10d24: 38 0b ff ff addi r0,r11,-1 ffc10d28: 7f 84 00 40 cmplw cr7,r4,r0 ffc10d2c: 41 bd ff b0 bgt- cr7,ffc10cdc <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; ffc10d30: 7c 9b 20 50 subf r4,r27,r4 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; ffc10d34: 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; ffc10d38: 7d 64 4b 96 divwu r11,r4,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; ffc10d3c: 7f ab 4b 96 divwu r29,r11,r9 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { ffc10d40: 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; ffc10d44: 7f 6b 49 d6 mullw r27,r11,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ffc10d48: 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; ffc10d4c: 7f 7b 20 50 subf r27,r27,r4 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ffc10d50: 7f 89 58 50 subf r28,r9,r11 p = info->triply_indirect; if ( malloc_it ) { ffc10d54: 41 9e 01 40 beq- cr7,ffc10e94 if ( !p ) { ffc10d58: 2f 8a 00 00 cmpwi cr7,r10,0 ffc10d5c: 41 9e 01 f0 beq- cr7,ffc10f4c if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; ffc10d60: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc10d64: 7d 6a e8 2e lwzx r11,r10,r29 ffc10d68: 7f aa ea 14 add r29,r10,r29 if ( !p1 ) { ffc10d6c: 2f 8b 00 00 cmpwi cr7,r11,0 ffc10d70: 41 9e 01 c4 beq- cr7,ffc10f34 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; ffc10d74: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc10d78: 7c 6b e0 2e lwzx r3,r11,r28 ffc10d7c: 7f 8b e2 14 add r28,r11,r28 if ( !p2 ) { ffc10d80: 2f 83 00 00 cmpwi cr7,r3,0 ffc10d84: 41 9e 01 80 beq- cr7,ffc10f04 /* * This means the requested block number is out of range. */ return 0; } ffc10d88: 80 01 00 2c lwz r0,44(r1) p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; ffc10d8c: 57 7e 10 3a rlwinm r30,r27,2,0,29 ffc10d90: 7f c3 f2 14 add r30,r3,r30 /* * This means the requested block number is out of range. */ return 0; } ffc10d94: 83 61 00 14 lwz r27,20(r1) ffc10d98: 7c 08 03 a6 mtlr r0 ffc10d9c: 7f c3 f3 78 mr r3,r30 ffc10da0: 83 81 00 18 lwz r28,24(r1) ffc10da4: 83 a1 00 1c lwz r29,28(r1) ffc10da8: 83 c1 00 20 lwz r30,32(r1) ffc10dac: 83 e1 00 24 lwz r31,36(r1) ffc10db0: 38 21 00 28 addi r1,r1,40 ffc10db4: 4e 80 00 20 blr /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; ffc10db8: 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; ffc10dbc: 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; ffc10dc0: 7f a4 4b 96 divwu r29,r4,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc10dc4: 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; ffc10dc8: 7d 3d 49 d6 mullw r9,r29,r9 ffc10dcc: 7f 89 20 50 subf r28,r9,r4 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc10dd0: 41 9e 00 78 beq- cr7,ffc10e48 if ( !p ) { ffc10dd4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc10dd8: 41 9e 01 44 beq- cr7,ffc10f1c if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; ffc10ddc: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc10de0: 7c 6b e8 2e lwzx r3,r11,r29 ffc10de4: 7f ab ea 14 add r29,r11,r29 if ( !p1 ) { ffc10de8: 2f 83 00 00 cmpwi cr7,r3,0 ffc10dec: 41 9e 01 00 beq- cr7,ffc10eec /* * This means the requested block number is out of range. */ return 0; } ffc10df0: 80 01 00 2c lwz r0,44(r1) if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; ffc10df4: 57 9e 10 3a rlwinm r30,r28,2,0,29 ffc10df8: 7f c3 f2 14 add r30,r3,r30 /* * This means the requested block number is out of range. */ return 0; } ffc10dfc: 83 61 00 14 lwz r27,20(r1) ffc10e00: 7c 08 03 a6 mtlr r0 ffc10e04: 7f c3 f3 78 mr r3,r30 ffc10e08: 83 81 00 18 lwz r28,24(r1) ffc10e0c: 83 a1 00 1c lwz r29,28(r1) ffc10e10: 83 c1 00 20 lwz r30,32(r1) ffc10e14: 83 e1 00 24 lwz r31,36(r1) ffc10e18: 38 21 00 28 addi r1,r1,40 ffc10e1c: 4e 80 00 20 blr if ( my_block <= LAST_INDIRECT ) { p = info->indirect; if ( malloc_it ) { if ( !p ) { ffc10e20: 2f 83 00 00 cmpwi cr7,r3,0 ffc10e24: 40 9e fe b0 bne+ cr7,ffc10cd4 p = memfile_alloc_block(); ffc10e28: 90 81 00 08 stw r4,8(r1) ffc10e2c: 4b ff fe 11 bl ffc10c3c if ( !p ) ffc10e30: 2c 03 00 00 cmpwi r3,0 return 0; ffc10e34: 3b c0 00 00 li r30,0 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) ffc10e38: 80 81 00 08 lwz r4,8(r1) ffc10e3c: 41 a2 fe a0 beq- ffc10cdc <== NEVER TAKEN return 0; info->indirect = p; ffc10e40: 90 7f 00 58 stw r3,88(r31) ffc10e44: 4b ff fe 90 b ffc10cd4 } return (block_p *)&p1[ singly ]; } if ( !p ) ffc10e48: 2f 8b 00 00 cmpwi cr7,r11,0 return 0; ffc10e4c: 3b c0 00 00 li r30,0 } return (block_p *)&p1[ singly ]; } if ( !p ) ffc10e50: 41 be fe 8c beq- cr7,ffc10cdc <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; ffc10e54: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc10e58: 7c 0b e8 2e lwzx r0,r11,r29 if ( !p ) ffc10e5c: 2f 80 00 00 cmpwi cr7,r0,0 ffc10e60: 41 be fe 7c beq- cr7,ffc10cdc <== NEVER TAKEN return 0; return (block_p *)&p[ singly ]; ffc10e64: 57 9e 10 3a rlwinm r30,r28,2,0,29 /* * This means the requested block number is out of range. */ return 0; } ffc10e68: 83 61 00 14 lwz r27,20(r1) p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; ffc10e6c: 7f c0 f2 14 add r30,r0,r30 /* * This means the requested block number is out of range. */ return 0; } ffc10e70: 80 01 00 2c lwz r0,44(r1) ffc10e74: 7f c3 f3 78 mr r3,r30 ffc10e78: 83 81 00 18 lwz r28,24(r1) ffc10e7c: 7c 08 03 a6 mtlr r0 ffc10e80: 83 a1 00 1c lwz r29,28(r1) ffc10e84: 83 c1 00 20 lwz r30,32(r1) ffc10e88: 83 e1 00 24 lwz r31,36(r1) ffc10e8c: 38 21 00 28 addi r1,r1,40 ffc10e90: 4e 80 00 20 blr p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) ffc10e94: 2f 8a 00 00 cmpwi cr7,r10,0 ffc10e98: 41 be fe 44 beq- cr7,ffc10cdc <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; ffc10e9c: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc10ea0: 7d 6a e8 2e lwzx r11,r10,r29 if ( !p1 ) ffc10ea4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc10ea8: 41 be fe 34 beq- cr7,ffc10cdc <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; ffc10eac: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc10eb0: 7c 0b e0 2e lwzx r0,r11,r28 if ( !p2 ) ffc10eb4: 2f 80 00 00 cmpwi cr7,r0,0 ffc10eb8: 41 be fe 24 beq- cr7,ffc10cdc <== NEVER TAKEN return 0; return (block_p *)&p2[ singly ]; ffc10ebc: 57 7e 10 3a rlwinm r30,r27,2,0,29 /* * This means the requested block number is out of range. */ return 0; } ffc10ec0: 83 81 00 18 lwz r28,24(r1) p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; ffc10ec4: 7f c0 f2 14 add r30,r0,r30 /* * This means the requested block number is out of range. */ return 0; } ffc10ec8: 80 01 00 2c lwz r0,44(r1) ffc10ecc: 7f c3 f3 78 mr r3,r30 ffc10ed0: 83 61 00 14 lwz r27,20(r1) ffc10ed4: 7c 08 03 a6 mtlr r0 ffc10ed8: 83 a1 00 1c lwz r29,28(r1) ffc10edc: 83 c1 00 20 lwz r30,32(r1) ffc10ee0: 83 e1 00 24 lwz r31,36(r1) ffc10ee4: 38 21 00 28 addi r1,r1,40 ffc10ee8: 4e 80 00 20 blr info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); ffc10eec: 4b ff fd 51 bl ffc10c3c if ( !p1 ) return 0; ffc10ef0: 3b c0 00 00 li r30,0 } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) ffc10ef4: 2c 03 00 00 cmpwi r3,0 ffc10ef8: 41 a2 fd e4 beq- ffc10cdc <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; ffc10efc: 90 7d 00 00 stw r3,0(r29) ffc10f00: 4b ff fe f0 b ffc10df0 p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); ffc10f04: 4b ff fd 39 bl ffc10c3c if ( !p2 ) return 0; ffc10f08: 3b c0 00 00 li r30,0 } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) ffc10f0c: 2c 03 00 00 cmpwi r3,0 ffc10f10: 41 a2 fd cc beq- ffc10cdc <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; ffc10f14: 90 7c 00 00 stw r3,0(r28) ffc10f18: 4b ff fe 70 b ffc10d88 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc10f1c: 4b ff fd 21 bl ffc10c3c if ( !p ) return 0; ffc10f20: 3b c0 00 00 li r30,0 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) ffc10f24: 7c 6b 1b 79 mr. r11,r3 ffc10f28: 41 a2 fd b4 beq- ffc10cdc <== NEVER TAKEN return 0; info->doubly_indirect = p; ffc10f2c: 91 7f 00 5c stw r11,92(r31) ffc10f30: 4b ff fe ac b ffc10ddc info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); ffc10f34: 4b ff fd 09 bl ffc10c3c if ( !p1 ) return 0; ffc10f38: 3b c0 00 00 li r30,0 } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) ffc10f3c: 7c 6b 1b 79 mr. r11,r3 ffc10f40: 41 a2 fd 9c beq- ffc10cdc <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; ffc10f44: 91 7d 00 00 stw r11,0(r29) ffc10f48: 4b ff fe 2c b ffc10d74 p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc10f4c: 4b ff fc f1 bl ffc10c3c if ( !p ) ffc10f50: 7c 6a 1b 79 mr. r10,r3 ffc10f54: 41 a2 fd 88 beq- ffc10cdc <== NEVER TAKEN return 0; info->triply_indirect = p; ffc10f58: 91 5f 00 60 stw r10,96(r31) ffc10f5c: 4b ff fe 04 b ffc10d60 =============================================================================== ffc10f60 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc10f60: 94 21 ff c0 stwu r1,-64(r1) ffc10f64: 7c 08 02 a6 mflr r0 ffc10f68: 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) { ffc10f6c: 80 03 00 4c lwz r0,76(r3) IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc10f70: 93 81 00 30 stw r28,48(r1) ffc10f74: 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) { ffc10f78: 2f 80 00 06 cmpwi cr7,r0,6 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc10f7c: 93 a1 00 34 stw r29,52(r1) ffc10f80: 7c 7d 1b 78 mr r29,r3 ffc10f84: 93 c1 00 38 stw r30,56(r1) ffc10f88: 7c be 2b 78 mr r30,r5 ffc10f8c: 93 e1 00 3c stw r31,60(r1) ffc10f90: 7c df 33 78 mr r31,r6 ffc10f94: 92 e1 00 1c stw r23,28(r1) ffc10f98: 93 01 00 20 stw r24,32(r1) ffc10f9c: 93 21 00 24 stw r25,36(r1) ffc10fa0: 93 41 00 28 stw r26,40(r1) ffc10fa4: 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) { ffc10fa8: 41 9e 01 d0 beq- cr7,ffc11178 /* * 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 ) ffc10fac: 80 03 00 50 lwz r0,80(r3) ffc10fb0: 39 20 00 00 li r9,0 ffc10fb4: 83 43 00 54 lwz r26,84(r3) ffc10fb8: 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; ffc10fbc: 7c c0 33 78 mr r0,r6 ffc10fc0: 7d 28 32 14 add r9,r8,r6 if ( last_byte > the_jnode->info.file.size ) ffc10fc4: 40 9d 01 28 ble- cr7,ffc110ec <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; ffc10fc8: 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; ffc10fcc: 3f 20 00 00 lis r25,0 ffc10fd0: 83 79 27 a4 lwz r27,10148(r25) ffc10fd4: 7f c3 f3 78 mr r3,r30 ffc10fd8: 7f e4 fb 78 mr r4,r31 ffc10fdc: 7f 78 fe 70 srawi r24,r27,31 ffc10fe0: 7f 05 c3 78 mr r5,r24 ffc10fe4: 7f 66 db 78 mr r6,r27 ffc10fe8: 48 00 b6 e9 bl ffc1c6d0 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10fec: 7f c3 f3 78 mr r3,r30 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10ff0: 7c 97 23 78 mr r23,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc10ff4: 7f 05 c3 78 mr r5,r24 ffc10ff8: 7f e4 fb 78 mr r4,r31 ffc10ffc: 7f 66 db 78 mr r6,r27 ffc11000: 48 00 b2 91 bl ffc1c290 <__divdi3> if ( start_offset ) { ffc11004: 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; ffc11008: 7c 9e 23 78 mr r30,r4 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; ffc1100c: 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; ffc11010: 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 ) { ffc11014: 41 9e 00 50 beq- cr7,ffc11064 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 ); ffc11018: 7f a3 eb 78 mr r3,r29 ffc1101c: 38 a0 00 00 li r5,0 ffc11020: 4b ff fc 61 bl ffc10c80 if ( !block_ptr ) ffc11024: 7c 69 1b 79 mr. r9,r3 return copied; ffc11028: 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 ) ffc1102c: 41 82 00 8c beq- ffc110b8 <== 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; ffc11030: 7f 77 d8 50 subf r27,r23,r27 ffc11034: 7f 9a d8 40 cmplw cr7,r26,r27 ffc11038: 7f 5f d3 78 mr r31,r26 ffc1103c: 41 9d 01 cc bgt- cr7,ffc11208 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 ); ffc11040: 80 89 00 00 lwz r4,0(r9) ffc11044: 7f 83 e3 78 mr r3,r28 ffc11048: 7f e5 fb 78 mr r5,r31 ffc1104c: 7c 84 ba 14 add r4,r4,r23 ffc11050: 48 00 28 49 bl ffc13898 dest += to_copy; block++; my_length -= to_copy; ffc11054: 83 79 27 a4 lwz r27,10148(r25) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; ffc11058: 7f 1c fa 14 add r24,r28,r31 block++; ffc1105c: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; ffc11060: 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 ) { ffc11064: 7f 9a d8 40 cmplw cr7,r26,r27 ffc11068: 40 bc 00 20 bge+ cr7,ffc11088 ffc1106c: 48 00 00 8c b ffc110f8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc11070: 80 89 00 00 lwz r4,0(r9) dest += to_copy; block++; my_length -= to_copy; copied += to_copy; ffc11074: 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 ); ffc11078: 48 00 28 21 bl ffc13898 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc1107c: 80 19 27 a4 lwz r0,10148(r25) ffc11080: 7f 80 d0 40 cmplw cr7,r0,r26 ffc11084: 41 9d 00 74 bgt- cr7,ffc110f8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11088: 7f c4 f3 78 mr r4,r30 ffc1108c: 38 a0 00 00 li r5,0 ffc11090: 7f a3 eb 78 mr r3,r29 ffc11094: 4b ff fb ed bl ffc10c80 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; ffc11098: 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 ) ffc1109c: 7c 69 1b 79 mr. r9,r3 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc110a0: 7f 65 db 78 mr r5,r27 ffc110a4: 7f 03 c3 78 mr r3,r24 dest += to_copy; block++; ffc110a8: 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; ffc110ac: 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 ) ffc110b0: 40 82 ff c0 bne+ ffc11070 <== 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; ffc110b4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } ffc110b8: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc110bc: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc110c0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc110c4: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc110c8: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc110cc: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc110d0: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc110d4: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc110d8: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc110dc: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc110e0: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc110e4: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc110e8: 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 ) ffc110ec: 41 9e 01 0c beq- cr7,ffc111f8 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc110f0: 7d 1a 43 78 mr r26,r8 <== NOT EXECUTED ffc110f4: 4b ff fe d8 b ffc10fcc <== NOT EXECUTED /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { ffc110f8: 2f 9a 00 00 cmpwi cr7,r26,0 ffc110fc: 41 9e 00 30 beq- cr7,ffc1112c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11100: 7f a3 eb 78 mr r3,r29 ffc11104: 7f c4 f3 78 mr r4,r30 ffc11108: 38 a0 00 00 li r5,0 ffc1110c: 4b ff fb 75 bl ffc10c80 if ( !block_ptr ) ffc11110: 2c 03 00 00 cmpwi r3,0 ffc11114: 41 a2 ff a0 beq- ffc110b4 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); ffc11118: 80 83 00 00 lwz r4,0(r3) ffc1111c: 7f 45 d3 78 mr r5,r26 ffc11120: 7f 03 c3 78 mr r3,r24 ffc11124: 48 00 27 75 bl ffc13898 copied += my_length; ffc11128: 7f ff d2 14 add r31,r31,r26 } IMFS_update_atime( the_jnode ); ffc1112c: 38 61 00 08 addi r3,r1,8 ffc11130: 38 80 00 00 li r4,0 ffc11134: 4b ff 41 31 bl ffc05264 ffc11138: 80 01 00 08 lwz r0,8(r1) return copied; ffc1113c: 7f e3 fb 78 mr r3,r31 } ffc11140: 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 ); ffc11144: 90 1d 00 40 stw r0,64(r29) return copied; } ffc11148: 80 01 00 44 lwz r0,68(r1) ffc1114c: 83 01 00 20 lwz r24,32(r1) ffc11150: 7c 08 03 a6 mtlr r0 ffc11154: 83 21 00 24 lwz r25,36(r1) ffc11158: 83 41 00 28 lwz r26,40(r1) ffc1115c: 83 61 00 2c lwz r27,44(r1) ffc11160: 83 81 00 30 lwz r28,48(r1) ffc11164: 83 a1 00 34 lwz r29,52(r1) ffc11168: 83 c1 00 38 lwz r30,56(r1) ffc1116c: 83 e1 00 3c lwz r31,60(r1) ffc11170: 38 21 00 40 addi r1,r1,64 ffc11174: 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)) ffc11178: 81 43 00 50 lwz r10,80(r3) ffc1117c: 38 00 00 00 li r0,0 ffc11180: 81 63 00 54 lwz r11,84(r3) my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; ffc11184: 80 83 00 58 lwz r4,88(r3) if (my_length > (the_jnode->info.linearfile.size - start)) ffc11188: 7c ff 58 10 subfc r7,r31,r11 ffc1118c: 7c de 51 10 subfe r6,r30,r10 ffc11190: 7f 80 30 00 cmpw cr7,r0,r6 ffc11194: 40 9d 00 7c ble- cr7,ffc11210 <== ALWAYS TAKEN my_length = the_jnode->info.linearfile.size - start; ffc11198: 7f 5f 58 50 subf r26,r31,r11 memcpy(dest, &file_ptr[start], my_length); ffc1119c: 7c 84 fa 14 add r4,r4,r31 ffc111a0: 7f 45 d3 78 mr r5,r26 ffc111a4: 7f 83 e3 78 mr r3,r28 ffc111a8: 48 00 26 f1 bl ffc13898 IMFS_update_atime( the_jnode ); ffc111ac: 38 61 00 08 addi r3,r1,8 ffc111b0: 38 80 00 00 li r4,0 ffc111b4: 4b ff 40 b1 bl ffc05264 ffc111b8: 80 01 00 08 lwz r0,8(r1) return my_length; ffc111bc: 7f 43 d3 78 mr r3,r26 } IMFS_update_atime( the_jnode ); return copied; } ffc111c0: 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 ); ffc111c4: 90 1d 00 40 stw r0,64(r29) } IMFS_update_atime( the_jnode ); return copied; } ffc111c8: 80 01 00 44 lwz r0,68(r1) ffc111cc: 83 01 00 20 lwz r24,32(r1) ffc111d0: 7c 08 03 a6 mtlr r0 ffc111d4: 83 21 00 24 lwz r25,36(r1) ffc111d8: 83 41 00 28 lwz r26,40(r1) ffc111dc: 83 61 00 2c lwz r27,44(r1) ffc111e0: 83 81 00 30 lwz r28,48(r1) ffc111e4: 83 a1 00 34 lwz r29,52(r1) ffc111e8: 83 c1 00 38 lwz r30,56(r1) ffc111ec: 83 e1 00 3c lwz r31,60(r1) ffc111f0: 38 21 00 40 addi r1,r1,64 ffc111f4: 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 ) ffc111f8: 7f 89 d0 40 cmplw cr7,r9,r26 ffc111fc: 41 bd fd cc bgt- cr7,ffc10fc8 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc11200: 7d 1a 43 78 mr r26,r8 ffc11204: 4b ff fd c8 b ffc10fcc * 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; ffc11208: 7f 7f db 78 mr r31,r27 ffc1120c: 4b ff fe 34 b ffc11040 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)) ffc11210: 40 9e 00 0c bne- cr7,ffc1121c <== NEVER TAKEN ffc11214: 7f 88 38 40 cmplw cr7,r8,r7 ffc11218: 41 9d ff 80 bgt+ cr7,ffc11198 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc1121c: 7d 1a 43 78 mr r26,r8 <== NOT EXECUTED ffc11220: 4b ff ff 7c b ffc1119c <== NOT EXECUTED =============================================================================== ffc1135c : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc1135c: 94 21 ff d8 stwu r1,-40(r1) ffc11360: 7c 08 02 a6 mflr r0 ffc11364: 90 01 00 2c stw r0,44(r1) * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc11368: 80 03 00 58 lwz r0,88(r3) * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc1136c: 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; ffc11370: 3f c0 00 00 lis r30,0 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc11374: 2f 80 00 00 cmpwi cr7,r0,0 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc11378: 93 a1 00 1c stw r29,28(r1) /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; ffc1137c: 83 be 27 a4 lwz r29,10148(r30) * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc11380: 93 41 00 10 stw r26,16(r1) ffc11384: 7c 7a 1b 78 mr r26,r3 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; ffc11388: 57 bd f0 be rlwinm r29,r29,30,2,31 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc1138c: 93 21 00 0c stw r25,12(r1) ffc11390: 93 61 00 14 stw r27,20(r1) ffc11394: 93 81 00 18 stw r28,24(r1) ffc11398: 93 e1 00 24 stw r31,36(r1) * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc1139c: 41 9e 00 10 beq- cr7,ffc113ac memfile_free_blocks_in_table( &info->indirect, to_free ); ffc113a0: 38 63 00 58 addi r3,r3,88 ffc113a4: 7f a4 eb 78 mr r4,r29 ffc113a8: 4b ff ff 25 bl ffc112cc } if ( info->doubly_indirect ) { ffc113ac: 81 3a 00 5c lwz r9,92(r26) ffc113b0: 2f 89 00 00 cmpwi cr7,r9,0 ffc113b4: 41 9e 00 68 beq- cr7,ffc1141c for ( i=0 ; i <== NEVER TAKEN ffc113c4: 3f 80 00 00 lis r28,0 ffc113c8: 38 60 00 00 li r3,0 ffc113cc: 3b e0 00 00 li r31,0 ffc113d0: 3b 9c 27 a4 addi r28,r28,10148 ffc113d4: 48 00 00 08 b ffc113dc ffc113d8: 81 3a 00 5c lwz r9,92(r26) if ( info->doubly_indirect[i] ) { ffc113dc: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc113e0: 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( ffc113e8: 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] ) { ffc113ec: 2f 80 00 00 cmpwi cr7,r0,0 ffc113f0: 7c 69 1a 14 add r3,r9,r3 ffc113f4: 41 9e 00 08 beq- cr7,ffc113fc <== NEVER TAKEN memfile_free_blocks_in_table( ffc113f8: 4b ff fe d5 bl ffc112cc 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 ); ffc11410: 38 7a 00 5c addi r3,r26,92 ffc11414: 7f a4 eb 78 mr r4,r29 ffc11418: 4b ff fe b5 bl ffc112cc } if ( info->triply_indirect ) { ffc1141c: 80 7a 00 60 lwz r3,96(r26) ffc11420: 2f 83 00 00 cmpwi cr7,r3,0 ffc11424: 41 9e 00 b4 beq- cr7,ffc114d8 for ( i=0 ; i <== NEVER TAKEN p = (block_p *) info->triply_indirect[i]; ffc11434: 83 c3 00 00 lwz r30,0(r3) if ( !p ) /* ensure we have a valid pointer */ ffc11438: 2f 9e 00 00 cmpwi cr7,r30,0 ffc1143c: 41 9e 00 90 beq- cr7,ffc114cc <== NEVER TAKEN ffc11440: 3f 80 00 00 lis r28,0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc11444: 3b 20 00 00 li r25,0 if ( !p ) /* ensure we have a valid pointer */ ffc11448: 3b 60 00 00 li r27,0 ffc1144c: 3b 9c 27 a4 addi r28,r28,10148 break; for ( j=0 ; j<== NEVER TAKEN ffc11458: 38 60 00 00 li r3,0 ffc1145c: 3b e0 00 00 li r31,0 if ( p[j] ) { ffc11460: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc11464: 7c 1e 18 2e lwzx r0,r30,r3 if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; jtriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j<== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); ffc1147c: 4b ff fe 51 bl ffc112cc if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j ffc11494: 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( ffc11498: 7c 63 ca 14 add r3,r3,r25 ffc1149c: 7f a4 eb 78 mr r4,r29 ffc114a0: 4b ff fe 2d bl ffc112cc 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]; ffc114b8: 80 7a 00 60 lwz r3,96(r26) * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( ffc114bc: 57 79 10 3a rlwinm r25,r27,2,0,29 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc114c0: 7f c3 c8 2e lwzx r30,r3,r25 if ( !p ) /* ensure we have a valid pointer */ ffc114c4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc114c8: 40 9e ff 88 bne+ cr7,ffc11450 <== ALWAYS TAKEN } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( ffc114cc: 38 7a 00 60 addi r3,r26,96 ffc114d0: 7f a4 eb 78 mr r4,r29 ffc114d4: 4b ff fd f9 bl ffc112cc (block_p **)&info->triply_indirect, to_free ); } return 0; } ffc114d8: 80 01 00 2c lwz r0,44(r1) ffc114dc: 38 60 00 00 li r3,0 ffc114e0: 83 21 00 0c lwz r25,12(r1) ffc114e4: 7c 08 03 a6 mtlr r0 ffc114e8: 83 41 00 10 lwz r26,16(r1) ffc114ec: 83 61 00 14 lwz r27,20(r1) ffc114f0: 83 81 00 18 lwz r28,24(r1) ffc114f4: 83 a1 00 1c lwz r29,28(r1) ffc114f8: 83 c1 00 20 lwz r30,32(r1) ffc114fc: 83 e1 00 24 lwz r31,36(r1) ffc11500: 38 21 00 28 addi r1,r1,40 ffc11504: 4e 80 00 20 blr =============================================================================== ffc11740 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc11740: 94 21 ff c0 stwu r1,-64(r1) ffc11744: 7c 08 02 a6 mflr r0 ffc11748: 92 e1 00 1c stw r23,28(r1) ffc1174c: 7c f7 3b 78 mr r23,r7 ffc11750: 93 81 00 30 stw r28,48(r1) ffc11754: 7c bc 2b 78 mr r28,r5 ffc11758: 93 a1 00 34 stw r29,52(r1) ffc1175c: 7d 1d 43 78 mr r29,r8 ffc11760: 93 c1 00 38 stw r30,56(r1) ffc11764: 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; ffc11768: 7c c8 32 14 add r6,r8,r6 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc1176c: 93 e1 00 3c stw r31,60(r1) ffc11770: 7c 7f 1b 78 mr r31,r3 ffc11774: 90 01 00 44 stw r0,68(r1) ffc11778: 93 01 00 20 stw r24,32(r1) ffc1177c: 93 21 00 24 stw r25,36(r1) ffc11780: 93 41 00 28 stw r26,40(r1) ffc11784: 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 ) { ffc11788: 80 03 00 50 lwz r0,80(r3) ffc1178c: 2f 80 00 00 cmpwi cr7,r0,0 ffc11790: 41 9c 01 b4 blt- cr7,ffc11944 <== NEVER TAKEN ffc11794: 41 9e 01 a4 beq- cr7,ffc11938 <== ALWAYS TAKEN */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11798: 3f 40 00 00 lis r26,0 ffc1179c: 83 7a 27 a4 lwz r27,10148(r26) ffc117a0: 7f 83 e3 78 mr r3,r28 ffc117a4: 7f c4 f3 78 mr r4,r30 ffc117a8: 7f 79 fe 70 srawi r25,r27,31 ffc117ac: 7f 25 cb 78 mr r5,r25 ffc117b0: 7f 66 db 78 mr r6,r27 ffc117b4: 48 00 af 1d bl ffc1c6d0 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc117b8: 7f 83 e3 78 mr r3,r28 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc117bc: 7c 98 23 78 mr r24,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc117c0: 7f 25 cb 78 mr r5,r25 ffc117c4: 7f c4 f3 78 mr r4,r30 ffc117c8: 7f 66 db 78 mr r6,r27 ffc117cc: 48 00 aa c5 bl ffc1c290 <__divdi3> if ( start_offset ) { ffc117d0: 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; ffc117d4: 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; ffc117d8: 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 ) { ffc117dc: 40 9e 00 8c bne- cr7,ffc11868 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc117e0: 7f 9d d8 40 cmplw cr7,r29,r27 ffc117e4: 40 bc 00 20 bge+ cr7,ffc11804 ffc117e8: 48 00 00 cc b ffc118b4 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 ); ffc117ec: 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( ffc117f0: 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 ); ffc117f4: 48 00 20 a5 bl ffc13898 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc117f8: 80 1a 27 a4 lwz r0,10148(r26) ffc117fc: 7f 80 e8 40 cmplw cr7,r0,r29 ffc11800: 41 9d 00 b4 bgt- cr7,ffc118b4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11804: 7f c4 f3 78 mr r4,r30 ffc11808: 38 a0 00 00 li r5,0 ffc1180c: 7f e3 fb 78 mr r3,r31 ffc11810: 4b ff f4 71 bl ffc10c80 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; ffc11814: 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 ) ffc11818: 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 ); ffc1181c: 7e e4 bb 78 mr r4,r23 ffc11820: 7f 65 db 78 mr r5,r27 src += to_copy; ffc11824: 7e f7 da 14 add r23,r23,r27 block++; ffc11828: 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 ) ffc1182c: 40 82 ff c0 bne+ ffc117ec <== ALWAYS TAKEN } IMFS_mtime_ctime_update( the_jnode ); return copied; } ffc11830: 80 01 00 44 lwz r0,68(r1) ffc11834: 7f 83 e3 78 mr r3,r28 ffc11838: 82 e1 00 1c lwz r23,28(r1) ffc1183c: 7c 08 03 a6 mtlr r0 ffc11840: 83 01 00 20 lwz r24,32(r1) ffc11844: 83 21 00 24 lwz r25,36(r1) ffc11848: 83 41 00 28 lwz r26,40(r1) ffc1184c: 83 61 00 2c lwz r27,44(r1) ffc11850: 83 81 00 30 lwz r28,48(r1) ffc11854: 83 a1 00 34 lwz r29,52(r1) ffc11858: 83 c1 00 38 lwz r30,56(r1) ffc1185c: 83 e1 00 3c lwz r31,60(r1) ffc11860: 38 21 00 40 addi r1,r1,64 ffc11864: 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 ); ffc11868: 7f e3 fb 78 mr r3,r31 ffc1186c: 38 a0 00 00 li r5,0 ffc11870: 4b ff f4 11 bl ffc10c80 if ( !block_ptr ) return copied; ffc11874: 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 ) ffc11878: 2c 03 00 00 cmpwi r3,0 ffc1187c: 41 a2 ff b4 beq- ffc11830 <== 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; ffc11880: 7f 98 d8 50 subf r28,r24,r27 ffc11884: 7f 9c e8 40 cmplw cr7,r28,r29 ffc11888: 41 9d 00 e4 bgt- cr7,ffc1196c block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc1188c: 80 63 00 00 lwz r3,0(r3) ffc11890: 7e e4 bb 78 mr r4,r23 ffc11894: 7f 85 e3 78 mr r5,r28 ffc11898: 7c 63 c2 14 add r3,r3,r24 ffc1189c: 48 00 1f fd bl ffc13898 src += to_copy; ffc118a0: 7e f7 e2 14 add r23,r23,r28 block++; ffc118a4: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; copied += to_copy; ffc118a8: 83 7a 27 a4 lwz r27,10148(r26) ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; ffc118ac: 7f bc e8 50 subf r29,r28,r29 ffc118b0: 4b ff ff 30 b ffc117e0 * 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 ) { ffc118b4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc118b8: 41 9e 00 30 beq- cr7,ffc118e8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc118bc: 7f e3 fb 78 mr r3,r31 ffc118c0: 7f c4 f3 78 mr r4,r30 ffc118c4: 38 a0 00 00 li r5,0 ffc118c8: 4b ff f3 b9 bl ffc10c80 if ( !block_ptr ) ffc118cc: 2c 03 00 00 cmpwi r3,0 ffc118d0: 41 a2 ff 60 beq- ffc11830 <== 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 ); ffc118d4: 80 63 00 00 lwz r3,0(r3) ffc118d8: 7e e4 bb 78 mr r4,r23 ffc118dc: 7f a5 eb 78 mr r5,r29 ffc118e0: 48 00 1f b9 bl ffc13898 my_length = 0; copied += to_copy; ffc118e4: 7f 9c ea 14 add r28,r28,r29 } IMFS_mtime_ctime_update( the_jnode ); ffc118e8: 38 61 00 08 addi r3,r1,8 ffc118ec: 38 80 00 00 li r4,0 ffc118f0: 4b ff 39 75 bl ffc05264 ffc118f4: 80 01 00 08 lwz r0,8(r1) return copied; } ffc118f8: 7f 83 e3 78 mr r3,r28 ffc118fc: 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 ); ffc11900: 90 1f 00 44 stw r0,68(r31) ffc11904: 90 1f 00 48 stw r0,72(r31) return copied; } ffc11908: 80 01 00 44 lwz r0,68(r1) ffc1190c: 83 01 00 20 lwz r24,32(r1) ffc11910: 7c 08 03 a6 mtlr r0 ffc11914: 83 21 00 24 lwz r25,36(r1) ffc11918: 83 41 00 28 lwz r26,40(r1) ffc1191c: 83 61 00 2c lwz r27,44(r1) ffc11920: 83 81 00 30 lwz r28,48(r1) ffc11924: 83 a1 00 34 lwz r29,52(r1) ffc11928: 83 c1 00 38 lwz r30,56(r1) ffc1192c: 83 e1 00 3c lwz r31,60(r1) ffc11930: 38 21 00 40 addi r1,r1,64 ffc11934: 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 ) { ffc11938: 80 03 00 54 lwz r0,84(r3) ffc1193c: 7f 80 30 40 cmplw cr7,r0,r6 ffc11940: 40 9c fe 58 bge+ cr7,ffc11798 status = IMFS_memfile_extend( the_jnode, last_byte ); ffc11944: 7f e3 fb 78 mr r3,r31 ffc11948: 38 a0 00 00 li r5,0 ffc1194c: 4b ff fb f9 bl ffc11544 if ( status ) ffc11950: 2f 83 00 00 cmpwi cr7,r3,0 ffc11954: 41 9e fe 44 beq+ cr7,ffc11798 rtems_set_errno_and_return_minus_one( ENOSPC ); ffc11958: 48 00 12 05 bl ffc12b5c <__errno> ffc1195c: 38 00 00 1c li r0,28 ffc11960: 90 03 00 00 stw r0,0(r3) ffc11964: 3b 80 ff ff li r28,-1 ffc11968: 4b ff fe c8 b ffc11830 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc1196c: 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; ffc11970: 7f bc eb 78 mr r28,r29 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc11974: 7e e4 bb 78 mr r4,r23 ffc11978: 7c 63 c2 14 add r3,r3,r24 ffc1197c: 7f 85 e3 78 mr r5,r28 ffc11980: 48 00 1f 19 bl ffc13898 src += to_copy; ffc11984: 7e f7 e2 14 add r23,r23,r28 block++; ffc11988: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; copied += to_copy; ffc1198c: 83 7a 27 a4 lwz r27,10148(r26) ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; ffc11990: 7f bc e8 50 subf r29,r28,r29 ffc11994: 4b ff fe 4c b ffc117e0 =============================================================================== ffc04550 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc04550: 7c 08 02 a6 mflr r0 ffc04554: 94 21 ff f8 stwu r1,-8(r1) ffc04558: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc0455c: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc04560: 80 09 00 4c lwz r0,76(r9) ffc04564: 2f 80 00 01 cmpwi cr7,r0,1 ffc04568: 40 9e 00 1c bne- cr7,ffc04584 <== 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; ffc0456c: 90 69 00 5c stw r3,92(r9) return 0; ffc04570: 38 60 00 00 li r3,0 } ffc04574: 80 01 00 0c lwz r0,12(r1) ffc04578: 38 21 00 08 addi r1,r1,8 ffc0457c: 7c 08 03 a6 mtlr r0 ffc04580: 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 ); ffc04584: 48 00 e5 d9 bl ffc12b5c <__errno> <== NOT EXECUTED ffc04588: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc0458c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc04590: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04594: 4b ff ff e0 b ffc04574 <== NOT EXECUTED =============================================================================== ffc072c8 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc072c8: 94 21 ff f0 stwu r1,-16(r1) ffc072cc: 7c 08 02 a6 mflr r0 ffc072d0: 93 c1 00 08 stw r30,8(r1) IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc072d4: 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 ) { ffc072d8: 90 01 00 14 stw r0,20(r1) IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc072dc: 81 3e 27 94 lwz r9,10132(r30) * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc072e0: 93 e1 00 0c stw r31,12(r1) ffc072e4: 7c 7f 1b 78 mr r31,r3 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc072e8: 38 63 00 0c addi r3,r3,12 ffc072ec: 80 89 00 08 lwz r4,8(r9) ffc072f0: 48 01 0f dd bl ffc182cc switch( the_jnode->type ) { ffc072f4: 80 bf 00 4c lwz r5,76(r31) ffc072f8: 2b 85 00 07 cmplwi cr7,r5,7 ffc072fc: 40 9d 00 34 ble- cr7,ffc07330 <== ALWAYS TAKEN case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); ffc07300: 81 3e 27 94 lwz r9,10132(r30) <== NOT EXECUTED ffc07304: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc07308: 38 84 76 dc addi r4,r4,30428 <== NOT EXECUTED ffc0730c: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED ffc07310: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc07314: 48 01 0d b5 bl ffc180c8 <== NOT EXECUTED return; } puts(""); } ffc07318: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc0731c: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc07320: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc07324: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc07328: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0732c: 4e 80 00 20 blr <== NOT EXECUTED ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { ffc07330: 3d 20 ff c2 lis r9,-62 ffc07334: 39 29 76 64 addi r9,r9,30308 ffc07338: 54 a0 10 3a rlwinm r0,r5,2,0,29 ffc0733c: 7c 09 00 2e lwzx r0,r9,r0 ffc07340: 7d 20 4a 14 add r9,r0,r9 ffc07344: 7d 29 03 a6 mtctr r9 ffc07348: 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" ); ffc0734c: 81 3e 27 94 lwz r9,10132(r30) ffc07350: 3c 60 ff c2 lis r3,-62 ffc07354: 38 63 76 b4 addi r3,r3,30388 ffc07358: 80 c9 00 08 lwz r6,8(r9) ffc0735c: 38 80 00 01 li r4,1 ffc07360: 38 a0 00 13 li r5,19 ffc07364: 48 01 1d 89 bl ffc190ec default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } ffc07368: 80 01 00 14 lwz r0,20(r1) ffc0736c: 83 c1 00 08 lwz r30,8(r1) ffc07370: 7c 08 03 a6 mtlr r0 ffc07374: 83 e1 00 0c lwz r31,12(r1) ffc07378: 38 21 00 10 addi r1,r1,16 ffc0737c: 4e 80 00 20 blr case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); ffc07380: 81 3e 27 94 lwz r9,10132(r30) ffc07384: 3c 60 ff c2 lis r3,-62 ffc07388: 38 63 76 c8 addi r3,r3,30408 ffc0738c: 80 c9 00 08 lwz r6,8(r9) ffc07390: 38 80 00 01 li r4,1 ffc07394: 38 a0 00 12 li r5,18 ffc07398: 48 01 1d 55 bl ffc190ec default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } ffc0739c: 80 01 00 14 lwz r0,20(r1) ffc073a0: 83 c1 00 08 lwz r30,8(r1) ffc073a4: 7c 08 03 a6 mtlr r0 ffc073a8: 83 e1 00 0c lwz r31,12(r1) ffc073ac: 38 21 00 10 addi r1,r1,16 ffc073b0: 4e 80 00 20 blr the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", ffc073b4: 81 3e 27 94 lwz r9,10132(r30) ffc073b8: 3c 80 ff c2 lis r4,-62 ffc073bc: 80 bf 00 54 lwz r5,84(r31) ffc073c0: 38 84 76 a8 addi r4,r4,30376 ffc073c4: 80 69 00 08 lwz r3,8(r9) ffc073c8: 4c c6 31 82 crclr 4*cr1+eq ffc073cc: 48 01 0c fd bl ffc180c8 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); ffc073d0: 3c 60 ff c2 lis r3,-62 ffc073d4: 38 63 68 1c addi r3,r3,26652 ffc073d8: 48 01 2f a1 bl ffc1a378 } ffc073dc: 80 01 00 14 lwz r0,20(r1) ffc073e0: 83 c1 00 08 lwz r30,8(r1) ffc073e4: 7c 08 03 a6 mtlr r0 ffc073e8: 83 e1 00 0c lwz r31,12(r1) ffc073ec: 38 21 00 10 addi r1,r1,16 ffc073f0: 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)", ffc073f4: 81 3e 27 94 lwz r9,10132(r30) ffc073f8: 3c 80 ff c2 lis r4,-62 ffc073fc: 80 bf 00 54 lwz r5,84(r31) ffc07400: 38 84 76 98 addi r4,r4,30360 ffc07404: 80 69 00 08 lwz r3,8(r9) ffc07408: 80 df 00 58 lwz r6,88(r31) ffc0740c: 4c c6 31 82 crclr 4*cr1+eq ffc07410: 48 01 0c b9 bl ffc180c8 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; ffc07414: 4b ff ff bc b ffc073d0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); ffc07418: 81 3e 27 94 lwz r9,10132(r30) ffc0741c: 38 60 00 2f li r3,47 ffc07420: 80 89 00 08 lwz r4,8(r9) ffc07424: 48 01 0d 8d bl ffc181b0 break; ffc07428: 4b ff ff a8 b ffc073d0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", ffc0742c: 81 3e 27 94 lwz r9,10132(r30) ffc07430: 3c 80 ff c2 lis r4,-62 ffc07434: 80 bf 00 50 lwz r5,80(r31) ffc07438: 38 84 76 84 addi r4,r4,30340 ffc0743c: 80 69 00 08 lwz r3,8(r9) ffc07440: 80 df 00 54 lwz r6,84(r31) ffc07444: 4c c6 31 82 crclr 4*cr1+eq ffc07448: 48 01 0c 81 bl ffc180c8 the_jnode->info.device.major, the_jnode->info.device.minor ); break; ffc0744c: 4b ff ff 84 b ffc073d0 =============================================================================== ffc045f4 : 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 */ ) { ffc045f4: 94 21 ff e0 stwu r1,-32(r1) ffc045f8: 7c 08 02 a6 mflr r0 ffc045fc: 90 01 00 24 stw r0,36(r1) ffc04600: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; ffc04604: 83 e4 00 00 lwz r31,0(r4) strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); ffc04608: 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 */ ) { ffc0460c: 93 c1 00 18 stw r30,24(r1) ffc04610: 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 ); ffc04614: 38 7f 00 0c addi r3,r31,12 ffc04618: 38 a0 00 20 li r5,32 ffc0461c: 48 00 ff 29 bl ffc14544 if ( the_jnode->Parent != NULL ) ffc04620: 80 1f 00 08 lwz r0,8(r31) ffc04624: 2f 80 00 00 cmpwi cr7,r0,0 ffc04628: 41 9e 00 0c beq- cr7,ffc04634 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc0462c: 7f e3 fb 78 mr r3,r31 ffc04630: 48 00 5b 91 bl ffc0a1c0 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; ffc04634: 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 ); ffc04638: 7f e4 fb 78 mr r4,r31 the_jnode->Parent = new_parent; ffc0463c: 90 7f 00 08 stw r3,8(r31) ffc04640: 38 63 00 50 addi r3,r3,80 ffc04644: 48 00 5b 4d bl ffc0a190 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); ffc04648: 38 61 00 08 addi r3,r1,8 ffc0464c: 38 80 00 00 li r4,0 ffc04650: 48 00 0c 15 bl ffc05264 ffc04654: 80 01 00 08 lwz r0,8(r1) return 0; } ffc04658: 38 60 00 00 li r3,0 ffc0465c: 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 ); ffc04660: 90 1f 00 48 stw r0,72(r31) return 0; } ffc04664: 80 01 00 24 lwz r0,36(r1) ffc04668: 83 e1 00 1c lwz r31,28(r1) ffc0466c: 38 21 00 20 addi r1,r1,32 ffc04670: 7c 08 03 a6 mtlr r0 ffc04674: 4e 80 00 20 blr =============================================================================== ffc0df84 : static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { ffc0df84: 94 21 ff e8 stwu r1,-24(r1) ffc0df88: 7c 08 02 a6 mflr r0 ffc0df8c: 93 a1 00 0c stw r29,12(r1) ffc0df90: 7c bd 2b 78 mr r29,r5 ffc0df94: 93 c1 00 10 stw r30,16(r1) ffc0df98: 7c 9e 23 78 mr r30,r4 ffc0df9c: 93 e1 00 14 stw r31,20(r1) ffc0dfa0: 7c 7f 1b 78 mr r31,r3 ffc0dfa4: 90 01 00 1c stw r0,28(r1) while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ffc0dfa8: 48 00 00 34 b ffc0dfdc ffc0dfac: 81 3d 00 00 lwz r9,0(r29) ffc0dfb0: 7c 1f 48 ae lbzx r0,r31,r9 ++(*index); ffc0dfb4: 39 29 00 01 addi r9,r9,1 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ffc0dfb8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dfbc: 41 9e 00 34 beq- cr7,ffc0dff0 ffc0dfc0: 80 1e 00 00 lwz r0,0(r30) ffc0dfc4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dfc8: 41 9e 00 28 beq- cr7,ffc0dff0 <== NEVER TAKEN ++(*index); ffc0dfcc: 91 3d 00 00 stw r9,0(r29) --(*len); ffc0dfd0: 81 3e 00 00 lwz r9,0(r30) ffc0dfd4: 38 09 ff ff addi r0,r9,-1 ffc0dfd8: 90 1e 00 00 stw r0,0(r30) const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ffc0dfdc: 80 1d 00 00 lwz r0,0(r29) ffc0dfe0: 7c 7f 00 ae lbzx r3,r31,r0 ffc0dfe4: 4b ff 85 0d bl ffc064f0 ffc0dfe8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0dfec: 40 9e ff c0 bne+ cr7,ffc0dfac ++(*index); --(*len); } } ffc0dff0: 80 01 00 1c lwz r0,28(r1) ffc0dff4: 83 a1 00 0c lwz r29,12(r1) ffc0dff8: 7c 08 03 a6 mtlr r0 ffc0dffc: 83 c1 00 10 lwz r30,16(r1) ffc0e000: 83 e1 00 14 lwz r31,20(r1) ffc0e004: 38 21 00 18 addi r1,r1,24 ffc0e008: 4e 80 00 20 blr =============================================================================== ffc0efbc : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc0efbc: 94 21 ff f0 stwu r1,-16(r1) ffc0efc0: 7c 08 02 a6 mflr r0 ffc0efc4: 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; ffc0efc8: 81 23 00 00 lwz r9,0(r3) int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc0efcc: 93 e1 00 0c stw r31,12(r1) IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { ffc0efd0: 80 09 00 4c lwz r0,76(r9) ffc0efd4: 2b 80 00 07 cmplwi cr7,r0,7 ffc0efd8: 40 9d 00 28 ble- cr7,ffc0f000 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0efdc: 48 00 3b 81 bl ffc12b5c <__errno> ffc0efe0: 38 00 00 86 li r0,134 ffc0efe4: 90 03 00 00 stw r0,0(r3) ffc0efe8: 38 60 ff ff li r3,-1 buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } ffc0efec: 80 01 00 14 lwz r0,20(r1) ffc0eff0: 83 e1 00 0c lwz r31,12(r1) ffc0eff4: 38 21 00 10 addi r1,r1,16 ffc0eff8: 7c 08 03 a6 mtlr r0 ffc0effc: 4e 80 00 20 blr IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { ffc0f000: 3d 60 ff c2 lis r11,-62 ffc0f004: 39 6b f6 74 addi r11,r11,-2444 ffc0f008: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0f00c: 7c 0b 00 2e lwzx r0,r11,r0 ffc0f010: 7d 60 5a 14 add r11,r0,r11 ffc0f014: 7d 69 03 a6 mtctr r11 ffc0f018: 4e 80 04 20 bctr case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; ffc0f01c: 39 40 00 00 li r10,0 ffc0f020: 39 60 00 00 li r11,0 ffc0f024: 91 44 00 20 stw r10,32(r4) ffc0f028: 91 64 00 24 stw r11,36(r4) /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; ffc0f02c: 81 63 00 10 lwz r11,16(r3) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; ffc0f030: 3c 60 00 00 lis r3,0 ffc0f034: 80 03 26 f8 lwz r0,9976(r3) rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; ffc0f038: 38 60 00 00 li r3,0 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); ffc0f03c: 81 6b 00 34 lwz r11,52(r11) ffc0f040: 60 63 ff fe ori r3,r3,65534 buf->st_mode = the_jnode->st_mode; ffc0f044: 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 ); ffc0f048: 83 eb 00 00 lwz r31,0(r11) buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; ffc0f04c: a0 a9 00 34 lhz r5,52(r9) buf->st_ino = the_jnode->st_ino; ffc0f050: 80 c9 00 38 lwz r6,56(r9) buf->st_uid = the_jnode->st_uid; ffc0f054: a0 e9 00 3c lhz r7,60(r9) buf->st_gid = the_jnode->st_gid; ffc0f058: a1 09 00 3e lhz r8,62(r9) buf->st_atime = the_jnode->stat_atime; ffc0f05c: 81 49 00 40 lwz r10,64(r9) buf->st_mtime = the_jnode->stat_mtime; ffc0f060: 81 69 00 44 lwz r11,68(r9) buf->st_ctime = the_jnode->stat_ctime; ffc0f064: 81 29 00 48 lwz r9,72(r9) buf->st_blksize = imfs_rq_memfile_bytes_per_block; ffc0f068: 90 04 00 40 stw r0,64(r4) return 0; } ffc0f06c: 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 = ffc0f070: 90 64 00 00 stw r3,0(r4) buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; ffc0f074: 38 60 00 00 li r3,0 } ffc0f078: 7c 08 03 a6 mtlr r0 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = ffc0f07c: 93 e4 00 04 stw r31,4(r4) rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; ffc0f080: 91 84 00 0c stw r12,12(r4) buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } ffc0f084: 83 e1 00 0c lwz r31,12(r1) ffc0f088: 38 21 00 10 addi r1,r1,16 fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; ffc0f08c: b0 a4 00 10 sth r5,16(r4) buf->st_ino = the_jnode->st_ino; ffc0f090: 90 c4 00 08 stw r6,8(r4) buf->st_uid = the_jnode->st_uid; ffc0f094: b0 e4 00 12 sth r7,18(r4) buf->st_gid = the_jnode->st_gid; ffc0f098: b1 04 00 14 sth r8,20(r4) buf->st_atime = the_jnode->stat_atime; ffc0f09c: 91 44 00 28 stw r10,40(r4) buf->st_mtime = the_jnode->stat_mtime; ffc0f0a0: 91 64 00 30 stw r11,48(r4) buf->st_ctime = the_jnode->stat_ctime; ffc0f0a4: 91 24 00 38 stw r9,56(r4) buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } ffc0f0a8: 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 ); ffc0f0ac: 81 69 00 54 lwz r11,84(r9) ffc0f0b0: 80 09 00 50 lwz r0,80(r9) ffc0f0b4: 91 64 00 1c stw r11,28(r4) ffc0f0b8: 90 04 00 18 stw r0,24(r4) break; ffc0f0bc: 4b ff ff 70 b ffc0f02c case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; ffc0f0c0: 81 49 00 50 lwz r10,80(r9) ffc0f0c4: 81 69 00 54 lwz r11,84(r9) ffc0f0c8: 91 44 00 20 stw r10,32(r4) ffc0f0cc: 91 64 00 24 stw r11,36(r4) break; ffc0f0d0: 4b ff ff 5c b ffc0f02c =============================================================================== ffc0472c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { ffc0472c: 94 21 ff c8 stwu r1,-56(r1) ffc04730: 7c 08 02 a6 mflr r0 ffc04734: 90 01 00 3c stw r0,60(r1) ffc04738: 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; ffc0473c: 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 */ ) { ffc04740: 93 a1 00 2c stw r29,44(r1) ffc04744: 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 ) { ffc04748: 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 */ ) { ffc0474c: 93 e1 00 34 stw r31,52(r1) ffc04750: 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 ) { ffc04754: 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 */ ) { ffc04758: 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 ) { ffc0475c: 41 9e 00 3c beq- cr7,ffc04798 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); ffc04760: 81 3f 00 08 lwz r9,8(r31) ffc04764: 7f a3 eb 78 mr r3,r29 ffc04768: 7f e4 fb 78 mr r4,r31 ffc0476c: 80 09 00 34 lwz r0,52(r9) ffc04770: 7c 09 03 a6 mtctr r0 ffc04774: 4e 80 04 21 bctrl return result; } ffc04778: 80 01 00 3c lwz r0,60(r1) ffc0477c: 83 81 00 28 lwz r28,40(r1) ffc04780: 7c 08 03 a6 mtlr r0 ffc04784: 83 a1 00 2c lwz r29,44(r1) ffc04788: 83 c1 00 30 lwz r30,48(r1) ffc0478c: 83 e1 00 34 lwz r31,52(r1) ffc04790: 38 21 00 38 addi r1,r1,56 ffc04794: 4e 80 00 20 blr * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) ffc04798: 80 1e 00 50 lwz r0,80(r30) ffc0479c: 2f 80 00 00 cmpwi cr7,r0,0 ffc047a0: 41 9e 00 90 beq- cr7,ffc04830 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node; ffc047a4: 7c 3c 0b 78 mr r28,r1 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; ffc047a8: 81 64 00 08 lwz r11,8(r4) the_link.node_access = node->info.hard_link.link_node; ffc047ac: 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; ffc047b0: 81 24 00 0c lwz r9,12(r4) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); ffc047b4: 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; ffc047b8: 81 44 00 04 lwz r10,4(r4) ffc047bc: 80 04 00 10 lwz r0,16(r4) ffc047c0: 91 61 00 18 stw r11,24(r1) ffc047c4: 91 21 00 1c stw r9,28(r1) ffc047c8: 91 41 00 14 stw r10,20(r1) ffc047cc: 90 01 00 20 stw r0,32(r1) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); ffc047d0: 48 00 98 3d bl ffc0e00c /* * 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) ffc047d4: 81 3e 00 50 lwz r9,80(r30) ffc047d8: a1 69 00 34 lhz r11,52(r9) ffc047dc: 2f 8b 00 01 cmpwi cr7,r11,1 ffc047e0: 41 9e 00 28 beq- cr7,ffc04808 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; ffc047e4: 39 6b ff ff addi r11,r11,-1 ffc047e8: b1 69 00 34 sth r11,52(r9) IMFS_update_ctime( node->info.hard_link.link_node ); ffc047ec: 38 61 00 08 addi r3,r1,8 ffc047f0: 38 80 00 00 li r4,0 ffc047f4: 48 00 0a 71 bl ffc05264 ffc047f8: 81 3e 00 50 lwz r9,80(r30) ffc047fc: 80 01 00 08 lwz r0,8(r1) ffc04800: 90 09 00 48 stw r0,72(r9) ffc04804: 4b ff ff 5c b ffc04760 * 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 ); ffc04808: 81 21 00 18 lwz r9,24(r1) ffc0480c: 7f a3 eb 78 mr r3,r29 ffc04810: 7f 84 e3 78 mr r4,r28 ffc04814: 80 09 00 34 lwz r0,52(r9) ffc04818: 7c 09 03 a6 mtctr r0 ffc0481c: 4e 80 04 21 bctrl if ( result != 0 ) ffc04820: 2f 83 00 00 cmpwi cr7,r3,0 return -1; ffc04824: 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 ) ffc04828: 41 9e ff 38 beq+ cr7,ffc04760 ffc0482c: 4b ff ff 4c b ffc04778 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc04830: 48 00 e3 2d bl ffc12b5c <__errno> <== NOT EXECUTED ffc04834: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc04838: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0483c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04840: 4b ff ff 38 b ffc04778 <== NOT EXECUTED =============================================================================== ffc04844 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc04844: 7c 08 02 a6 mflr r0 ffc04848: 94 21 ff f8 stwu r1,-8(r1) ffc0484c: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc04850: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc04854: 80 09 00 4c lwz r0,76(r9) ffc04858: 2f 80 00 01 cmpwi cr7,r0,1 ffc0485c: 40 9e 00 2c bne- cr7,ffc04888 <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) ffc04860: 80 09 00 5c lwz r0,92(r9) ffc04864: 2f 80 00 00 cmpwi cr7,r0,0 ffc04868: 41 9e 00 34 beq- cr7,ffc0489c <== 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; ffc0486c: 38 00 00 00 li r0,0 ffc04870: 90 09 00 5c stw r0,92(r9) return 0; ffc04874: 38 60 00 00 li r3,0 } ffc04878: 80 01 00 0c lwz r0,12(r1) ffc0487c: 38 21 00 08 addi r1,r1,8 ffc04880: 7c 08 03 a6 mtlr r0 ffc04884: 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 ); ffc04888: 48 00 e2 d5 bl ffc12b5c <__errno> <== NOT EXECUTED ffc0488c: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc04890: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc04894: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04898: 4b ff ff e0 b ffc04878 <== 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 */ ffc0489c: 48 00 e2 c1 bl ffc12b5c <__errno> <== NOT EXECUTED ffc048a0: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc048a4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc048a8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc048ac: 4b ff ff cc b ffc04878 <== NOT EXECUTED =============================================================================== ffc0549c : ) { /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc0549c: 3d 20 00 00 lis r9,0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc054a0: 94 21 ff e8 stwu r1,-24(r1) ffc054a4: 7c 08 02 a6 mflr r0 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc054a8: 81 29 27 68 lwz r9,10088(r9) void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc054ac: 93 a1 00 0c stw r29,12(r1) ffc054b0: 7c 9d 23 78 mr r29,r4 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc054b4: 2f 89 00 00 cmpwi cr7,r9,0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc054b8: 93 c1 00 10 stw r30,16(r1) ffc054bc: 7c 7e 1b 78 mr r30,r3 ffc054c0: 93 e1 00 14 stw r31,20(r1) ffc054c4: 7c bf 2b 78 mr r31,r5 ffc054c8: 90 01 00 1c stw r0,28(r1) ffc054cc: 93 81 00 08 stw r28,8(r1) /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc054d0: 41 9e 00 10 beq- cr7,ffc054e0 (*rtems_malloc_statistics_helpers->initialize)(); ffc054d4: 80 09 00 00 lwz r0,0(r9) ffc054d8: 7c 09 03 a6 mtctr r0 ffc054dc: 4e 80 04 21 bctrl } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); ffc054e0: 4b ff ff 2d bl ffc0540c /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { ffc054e4: 3d 20 00 00 lis r9,0 ffc054e8: 81 29 27 64 lwz r9,10084(r9) ffc054ec: 2f 89 00 00 cmpwi cr7,r9,0 ffc054f0: 41 9e 00 24 beq- cr7,ffc05514 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( ffc054f4: 80 09 00 00 lwz r0,0(r9) ffc054f8: 7f c3 f3 78 mr r3,r30 ffc054fc: 7f e4 fb 78 mr r4,r31 ffc05500: 7c 09 03 a6 mtctr r0 heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; ffc05504: 7f be ea 14 add r29,r30,r29 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( ffc05508: 4e 80 04 21 bctrl heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; ffc0550c: 7f a3 e8 50 subf r29,r3,r29 heap_begin = new_heap_begin; ffc05510: 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 ( ffc05514: 3f 80 00 00 lis r28,0 ffc05518: 88 1c 27 6c lbz r0,10092(r28) ffc0551c: 3f e0 00 00 lis r31,0 ffc05520: 2f 80 00 00 cmpwi cr7,r0,0 ffc05524: 40 9e 00 34 bne- cr7,ffc05558 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ffc05528: 3d 20 00 00 lis r9,0 ffc0552c: 88 09 20 2c lbz r0,8236(r9) ffc05530: 2f 80 00 00 cmpwi cr7,r0,0 ffc05534: 40 9e 00 5c bne- cr7,ffc05590 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); ffc05538: 3f e0 00 00 lis r31,0 ffc0553c: 80 7f 26 ec lwz r3,9964(r31) ffc05540: 7f c4 f3 78 mr r4,r30 ffc05544: 7f a5 eb 78 mr r5,r29 ffc05548: 38 c0 00 08 li r6,8 ffc0554c: 48 00 55 01 bl ffc0aa4c <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { ffc05550: 2f 83 00 00 cmpwi cr7,r3,0 ffc05554: 41 9e 00 5c beq- cr7,ffc055b0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); ffc05558: 80 7f 26 ec lwz r3,9964(r31) ffc0555c: 3f c0 00 00 lis r30,0 ffc05560: 83 fe 2a e8 lwz r31,10984(r30) ffc05564: 48 00 62 49 bl ffc0b7ac <_Protected_heap_Get_size> } ffc05568: 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) ); ffc0556c: 7c 63 fa 14 add r3,r3,r31 } ffc05570: 83 81 00 08 lwz r28,8(r1) ffc05574: 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) ); ffc05578: 90 7e 2a e8 stw r3,10984(r30) } ffc0557c: 83 a1 00 0c lwz r29,12(r1) ffc05580: 83 c1 00 10 lwz r30,16(r1) ffc05584: 83 e1 00 14 lwz r31,20(r1) ffc05588: 38 21 00 18 addi r1,r1,24 ffc0558c: 4e 80 00 20 blr if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); ffc05590: 7f c3 f3 78 mr r3,r30 ffc05594: 38 80 00 00 li r4,0 ffc05598: 7f a5 eb 78 mr r5,r29 ffc0559c: 48 00 e3 e1 bl ffc1397c * 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 ) { ffc055a0: 88 1c 27 6c lbz r0,10092(r28) ffc055a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc055a8: 41 9e ff 90 beq+ cr7,ffc05538 <== ALWAYS TAKEN ffc055ac: 4b ff ff ac b ffc05558 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); ffc055b0: 38 60 00 1a li r3,26 ffc055b4: 48 00 47 89 bl ffc09d3c =============================================================================== ffc03ac8 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03ac8: 94 21 ff c0 stwu r1,-64(r1) ffc03acc: 7c 08 02 a6 mflr r0 ffc03ad0: 90 01 00 44 stw r0,68(r1) ffc03ad4: 93 81 00 30 stw r28,48(r1) stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); ffc03ad8: 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); ffc03adc: 80 e3 00 b8 lwz r7,184(r3) size = Stack_check_usable_stack_size(stack); ffc03ae0: 3b 9c ff 80 addi r28,r28,-128 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03ae4: 93 41 00 28 stw r26,40(r1) /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; ffc03ae8: 39 27 01 00 addi r9,r7,256 for (ebase = base + length; base < ebase; base++) ffc03aec: 57 8a 00 3a rlwinm r10,r28,0,0,29 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03af0: 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++) ffc03af4: 7d 49 52 14 add r10,r9,r10 ffc03af8: 7f 89 50 40 cmplw cr7,r9,r10 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03afc: 93 a1 00 34 stw r29,52(r1) ffc03b00: 7c 7b 1b 78 mr r27,r3 ffc03b04: 92 e1 00 1c stw r23,28(r1) high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; ffc03b08: 3b a0 00 00 li r29,0 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03b0c: 93 01 00 20 stw r24,32(r1) ffc03b10: 93 21 00 24 stw r25,36(r1) ffc03b14: 93 c1 00 38 stw r30,56(r1) ffc03b18: 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 ); ffc03b1c: 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++) ffc03b20: 40 9c 00 38 bge- cr7,ffc03b58 <== NEVER TAKEN if (*base != U32_PATTERN) ffc03b24: 81 07 01 00 lwz r8,256(r7) * Try to print out how much stack was actually used by the task. */ static void *print_context; static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( ffc03b28: 7d 2b 4b 78 mr r11,r9 * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) ffc03b2c: 6d 00 5a 5a xoris r0,r8,23130 ffc03b30: 2f 80 a5 a5 cmpwi cr7,r0,-23131 ffc03b34: 41 9e 00 14 beq- cr7,ffc03b48 <== ALWAYS TAKEN ffc03b38: 48 00 00 f8 b ffc03c30 <== NOT EXECUTED ffc03b3c: 84 0b 00 04 lwzu r0,4(r11) ffc03b40: 7f 80 40 00 cmpw cr7,r0,r8 ffc03b44: 40 9e 00 ec bne- cr7,ffc03c30 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) ffc03b48: 39 29 00 04 addi r9,r9,4 ffc03b4c: 7f 8a 48 40 cmplw cr7,r10,r9 ffc03b50: 41 9d ff ec bgt+ cr7,ffc03b3c <== 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; ffc03b54: 3b a0 00 00 li r29,0 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( ffc03b58: 3f c0 00 00 lis r30,0 ffc03b5c: 82 fb 00 08 lwz r23,8(r27) ffc03b60: 3b fe 28 50 addi r31,r30,10320 ffc03b64: 83 3e 28 50 lwz r25,10320(r30) ffc03b68: 83 1f 00 04 lwz r24,4(r31) ffc03b6c: 38 80 00 05 li r4,5 ffc03b70: 38 a1 00 08 addi r5,r1,8 ffc03b74: 7e e3 bb 78 mr r3,r23 ffc03b78: 48 00 50 1d bl ffc08b94 ffc03b7c: 3c 80 ff c2 lis r4,-62 ffc03b80: 7c 66 1b 78 mr r6,r3 ffc03b84: 7f 29 03 a6 mtctr r25 ffc03b88: 38 84 90 b4 addi r4,r4,-28492 ffc03b8c: 7e e5 bb 78 mr r5,r23 ffc03b90: 7f 03 c3 78 mr r3,r24 ffc03b94: 4c c6 31 82 crclr 4*cr1+eq ffc03b98: 4e 80 04 21 bctrl (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc03b9c: 80 db 00 b4 lwz r6,180(r27) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc03ba0: 80 1e 28 50 lwz r0,10320(r30) ffc03ba4: 3c 80 ff c2 lis r4,-62 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc03ba8: 80 bb 00 b8 lwz r5,184(r27) ffc03bac: 38 c6 ff ff addi r6,r6,-1 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc03bb0: 7c 09 03 a6 mtctr r0 ffc03bb4: 80 7f 00 04 lwz r3,4(r31) ffc03bb8: 38 84 90 c4 addi r4,r4,-28476 ffc03bbc: 7c c5 32 14 add r6,r5,r6 ffc03bc0: 7f 47 d3 78 mr r7,r26 ffc03bc4: 7f 88 e3 78 mr r8,r28 ffc03bc8: 4c c6 31 82 crclr 4*cr1+eq ffc03bcc: 4e 80 04 21 bctrl stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc03bd0: 80 1f 00 08 lwz r0,8(r31) (*print_handler)( print_context, "Unavailable\n" ); ffc03bd4: 80 7f 00 04 lwz r3,4(r31) stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc03bd8: 2f 80 00 00 cmpwi cr7,r0,0 (*print_handler)( print_context, "Unavailable\n" ); ffc03bdc: 80 1e 28 50 lwz r0,10320(r30) stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc03be0: 41 9e 00 6c beq- cr7,ffc03c4c <== NEVER TAKEN (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); ffc03be4: 3c 80 ff c2 lis r4,-62 ffc03be8: 7c 09 03 a6 mtctr r0 ffc03bec: 7f a5 eb 78 mr r5,r29 ffc03bf0: 38 84 90 f4 addi r4,r4,-28428 ffc03bf4: 4c c6 31 82 crclr 4*cr1+eq ffc03bf8: 4e 80 04 21 bctrl } } ffc03bfc: 80 01 00 44 lwz r0,68(r1) ffc03c00: 82 e1 00 1c lwz r23,28(r1) ffc03c04: 7c 08 03 a6 mtlr r0 ffc03c08: 83 01 00 20 lwz r24,32(r1) ffc03c0c: 83 21 00 24 lwz r25,36(r1) ffc03c10: 83 41 00 28 lwz r26,40(r1) ffc03c14: 83 61 00 2c lwz r27,44(r1) ffc03c18: 83 81 00 30 lwz r28,48(r1) ffc03c1c: 83 a1 00 34 lwz r29,52(r1) ffc03c20: 83 c1 00 38 lwz r30,56(r1) ffc03c24: 83 e1 00 3c lwz r31,60(r1) ffc03c28: 38 21 00 40 addi r1,r1,64 ffc03c2c: 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 ) ffc03c30: 2f 89 00 00 cmpwi cr7,r9,0 used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; ffc03c34: 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 ) ffc03c38: 41 be ff 20 beq- cr7,ffc03b58 <== NEVER TAKEN { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); ffc03c3c: 3b a7 00 80 addi r29,r7,128 size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); ffc03c40: 7f bd e2 14 add r29,r29,r28 ffc03c44: 7f a9 e8 50 subf r29,r9,r29 ffc03c48: 4b ff ff 10 b ffc03b58 current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); ffc03c4c: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03c50: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03c54: 38 84 90 e4 addi r4,r4,-28444 <== NOT EXECUTED ffc03c58: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03c5c: 4e 80 04 21 bctrl <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } ffc03c60: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc03c64: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc03c68: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03c6c: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc03c70: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc03c74: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc03c78: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc03c7c: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc03c80: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc03c84: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc03c88: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc03c8c: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc03c90: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03c94 : static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if ( Stack_check_Initialized ) ffc03c94: 3d 00 00 00 lis r8,0 <== NOT EXECUTED ffc03c98: 39 08 28 50 addi r8,r8,10320 <== NOT EXECUTED ffc03c9c: 80 08 00 08 lwz r0,8(r8) <== NOT EXECUTED ffc03ca0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc03ca4: 4c 9e 00 20 bnelr cr7 <== NOT EXECUTED ffc03ca8: 38 00 00 20 li r0,32 <== NOT EXECUTED ffc03cac: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03cb0: 3d 60 00 00 lis r11,0 <== NOT EXECUTED ffc03cb4: 3d 40 ff c2 lis r10,-62 <== NOT EXECUTED ffc03cb8: 39 6b 2a c0 addi r11,r11,10944 <== NOT EXECUTED memset((_stack)->area, BYTE_PATTERN, (_stack)->size) /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) ffc03cbc: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc03cc0: 39 4a 90 a4 addi r10,r10,-28508 <== NOT EXECUTED /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; ffc03cc4: 55 20 17 3a rlwinm r0,r9,2,28,29 <== NOT EXECUTED ffc03cc8: 7c 0a 00 2e lwzx r0,r10,r0 <== NOT EXECUTED /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { ffc03ccc: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED p[i] = pattern[ i%4 ]; ffc03cd0: 94 0b 00 04 stwu r0,4(r11) <== NOT EXECUTED /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { ffc03cd4: 42 00 ff f0 bdnz+ ffc03cc4 <== NOT EXECUTED (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); } #endif Stack_check_Initialized = 1; ffc03cd8: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc03cdc: 90 08 00 08 stw r0,8(r8) <== NOT EXECUTED ffc03ce0: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03da8 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc03da8: 94 21 ff c8 stwu r1,-56(r1) ffc03dac: 7c 08 02 a6 mflr r0 ffc03db0: 93 a1 00 2c stw r29,44(r1) ffc03db4: 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"); ffc03db8: 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) { ffc03dbc: 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"); ffc03dc0: 38 63 90 fc addi r3,r3,-28420 Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc03dc4: 93 c1 00 30 stw r30,48(r1) ffc03dc8: 93 e1 00 34 stw r31,52(r1) ffc03dcc: 7c 9f 23 78 mr r31,r4 Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); ffc03dd0: 83 dd 00 b8 lwz r30,184(r29) char name[32]; printk("BLOWN STACK!!!\n"); ffc03dd4: 4c c6 31 82 crclr 4*cr1+eq ffc03dd8: 48 00 20 61 bl ffc05e38 printk("task control block: 0x%08" PRIxPTR "\n", running); ffc03ddc: 3c 60 ff c2 lis r3,-62 ffc03de0: 38 63 91 0c addi r3,r3,-28404 ffc03de4: 7f a4 eb 78 mr r4,r29 ffc03de8: 4c c6 31 82 crclr 4*cr1+eq ffc03dec: 48 00 20 4d bl ffc05e38 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); ffc03df0: 80 9d 00 08 lwz r4,8(r29) ffc03df4: 3c 60 ff c2 lis r3,-62 ffc03df8: 38 63 91 2c addi r3,r3,-28372 ffc03dfc: 4c c6 31 82 crclr 4*cr1+eq ffc03e00: 48 00 20 39 bl ffc05e38 printk( ffc03e04: 80 9d 00 0c lwz r4,12(r29) ffc03e08: 3c 60 ff c2 lis r3,-62 ffc03e0c: 38 63 91 40 addi r3,r3,-28352 ffc03e10: 4c c6 31 82 crclr 4*cr1+eq ffc03e14: 48 00 20 25 bl ffc05e38 "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( ffc03e18: 80 7d 00 08 lwz r3,8(r29) ffc03e1c: 38 a1 00 08 addi r5,r1,8 ffc03e20: 38 80 00 20 li r4,32 ffc03e24: 48 00 4d 71 bl ffc08b94 ffc03e28: 7c 64 1b 78 mr r4,r3 ffc03e2c: 3c 60 ff c2 lis r3,-62 ffc03e30: 38 63 91 54 addi r3,r3,-28332 ffc03e34: 4c c6 31 82 crclr 4*cr1+eq ffc03e38: 48 00 20 01 bl ffc05e38 ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ffc03e3c: 80 bd 00 b8 lwz r5,184(r29) ffc03e40: 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( ffc03e44: 3c 60 ff c2 lis r3,-62 ffc03e48: 38 63 91 6c addi r3,r3,-28308 ffc03e4c: 7c c5 22 14 add r6,r5,r4 ffc03e50: 4c c6 31 82 crclr 4*cr1+eq ffc03e54: 48 00 1f e5 bl ffc05e38 "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) { ffc03e58: 2f 9f 00 00 cmpwi cr7,r31,0 ffc03e5c: 41 9e 00 0c beq- cr7,ffc03e68 <== ALWAYS TAKEN rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); ffc03e60: 38 60 00 81 li r3,129 ffc03e64: 48 00 59 41 bl ffc097a4 (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( ffc03e68: 3c 60 ff c2 lis r3,-62 ffc03e6c: 38 63 91 a0 addi r3,r3,-28256 ffc03e70: 38 80 00 80 li r4,128 ffc03e74: 38 be 00 08 addi r5,r30,8 ffc03e78: 38 de 00 88 addi r6,r30,136 ffc03e7c: 4c c6 31 82 crclr 4*cr1+eq ffc03e80: 48 00 1f b9 bl ffc05e38 ffc03e84: 4b ff ff dc b ffc03e60 =============================================================================== ffc110fc : /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); ffc110fc: 3d 20 00 00 lis r9,0 ffc11100: 80 09 20 28 lwz r0,8232(r9) ticks = microseconds / microseconds_per_tick; ffc11104: 7d 23 03 96 divwu r9,r3,r0 if ( (microseconds % microseconds_per_tick) != 0 ) ffc11108: 7c 09 01 d6 mullw r0,r9,r0 ffc1110c: 7f 83 00 00 cmpw cr7,r3,r0 ffc11110: 41 9e 00 08 beq- cr7,ffc11118 <== ALWAYS TAKEN ticks += 1; ffc11114: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED return ticks; } ffc11118: 7d 23 4b 78 mr r3,r9 ffc1111c: 4e 80 00 20 blr =============================================================================== ffc0b174 : /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick(); ffc0b174: 3d 20 00 00 lis r9,0 ffc0b178: 81 29 20 10 lwz r9,8208(r9) ffc0b17c: 3c 00 10 62 lis r0,4194 ffc0b180: 60 00 4d d3 ori r0,r0,19923 ffc0b184: 7c 09 00 16 mulhwu r0,r9,r0 ffc0b188: 54 00 d1 be rlwinm r0,r0,26,6,31 ticks = milliseconds / milliseconds_per_tick; ffc0b18c: 7d 23 03 96 divwu r9,r3,r0 if ( (milliseconds % milliseconds_per_tick) != 0 ) ffc0b190: 7c 09 01 d6 mullw r0,r9,r0 ffc0b194: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b198: 41 9e 00 08 beq- cr7,ffc0b1a0 <== ALWAYS TAKEN ticks += 1; ffc0b19c: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED return ticks; } ffc0b1a0: 7d 23 4b 78 mr r3,r9 ffc0b1a4: 4e 80 00 20 blr =============================================================================== ffc09f70 <_API_extensions_Run_postdriver>: /* * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09f70: 94 21 ff f0 stwu r1,-16(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc09f74: 3d 20 00 00 lis r9,0 ffc09f78: 7c 08 02 a6 mflr r0 ffc09f7c: 93 c1 00 08 stw r30,8(r1) ffc09f80: 3b c9 2d 80 addi r30,r9,11648 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09f84: 3b de 00 04 addi r30,r30,4 /* * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09f88: 93 e1 00 0c stw r31,12(r1) ffc09f8c: 83 e9 2d 80 lwz r31,11648(r9) ffc09f90: 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 ); ffc09f94: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09f98: 41 9e 00 1c beq- cr7,ffc09fb4 <_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)(); ffc09f9c: 80 1f 00 08 lwz r0,8(r31) ffc09fa0: 7c 09 03 a6 mtctr r0 ffc09fa4: 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 ) { ffc09fa8: 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 ); ffc09fac: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09fb0: 40 9e ff ec bne+ cr7,ffc09f9c <_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)(); } } ffc09fb4: 80 01 00 14 lwz r0,20(r1) ffc09fb8: 83 c1 00 08 lwz r30,8(r1) ffc09fbc: 7c 08 03 a6 mtlr r0 ffc09fc0: 83 e1 00 0c lwz r31,12(r1) ffc09fc4: 38 21 00 10 addi r1,r1,16 ffc09fc8: 4e 80 00 20 blr =============================================================================== ffc09fcc <_API_extensions_Run_postswitch>: /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09fcc: 94 21 ff e8 stwu r1,-24(r1) ffc09fd0: 3d 20 00 00 lis r9,0 ffc09fd4: 7c 08 02 a6 mflr r0 ffc09fd8: 93 c1 00 10 stw r30,16(r1) ffc09fdc: 3b c9 2d 80 addi r30,r9,11648 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09fe0: 3b de 00 04 addi r30,r30,4 /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09fe4: 93 e1 00 14 stw r31,20(r1) ffc09fe8: 83 e9 2d 80 lwz r31,11648(r9) ffc09fec: 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 ); ffc09ff0: 7f 9f f0 00 cmpw cr7,r31,r30 /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09ff4: 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 ); ffc09ff8: 41 9e 00 28 beq- cr7,ffc0a020 <_API_extensions_Run_postswitch+0x54><== NEVER TAKEN ffc09ffc: 3f a0 00 00 lis r29,0 ffc0a000: 3b bd 2d b8 addi r29,r29,11704 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); ffc0a004: 80 1f 00 0c lwz r0,12(r31) ffc0a008: 80 7d 00 0c lwz r3,12(r29) ffc0a00c: 7c 09 03 a6 mtctr r0 ffc0a010: 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 ) { ffc0a014: 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 ); ffc0a018: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0a01c: 40 9e ff e8 bne+ cr7,ffc0a004 <_API_extensions_Run_postswitch+0x38><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc0a020: 80 01 00 1c lwz r0,28(r1) ffc0a024: 83 a1 00 0c lwz r29,12(r1) ffc0a028: 7c 08 03 a6 mtlr r0 ffc0a02c: 83 c1 00 10 lwz r30,16(r1) ffc0a030: 83 e1 00 14 lwz r31,20(r1) ffc0a034: 38 21 00 18 addi r1,r1,24 ffc0a038: 4e 80 00 20 blr =============================================================================== ffc14f78 <_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 ) { ffc14f78: 94 21 ff e0 stwu r1,-32(r1) ffc14f7c: 7c 08 02 a6 mflr r0 ffc14f80: 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)) { ffc14f84: 70 c0 00 03 andi. r0,r6,3 { size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; ffc14f88: 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 ) { ffc14f8c: 93 81 00 10 stw r28,16(r1) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc14f90: 7c dc 33 78 mr r28,r6 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc14f94: 93 a1 00 14 stw r29,20(r1) ffc14f98: 7c 9d 23 78 mr r29,r4 ffc14f9c: 93 e1 00 1c stw r31,28(r1) ffc14fa0: 7c 7f 1b 78 mr r31,r3 ffc14fa4: 93 c1 00 18 stw r30,24(r1) size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; ffc14fa8: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; ffc14fac: 90 03 00 48 stw r0,72(r3) the_message_queue->maximum_message_size = maximum_message_size; ffc14fb0: 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)) { ffc14fb4: 41 82 00 3c beq- ffc14ff0 <_CORE_message_queue_Initialize+0x78> allocated_message_size += sizeof(uint32_t); ffc14fb8: 3b 86 00 04 addi r28,r6,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); ffc14fbc: 57 9c 00 3a rlwinm r28,r28,0,0,29 } if (allocated_message_size < maximum_message_size) ffc14fc0: 7f 86 e0 40 cmplw cr7,r6,r28 return false; ffc14fc4: 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) ffc14fc8: 40 9d 00 28 ble- cr7,ffc14ff0 <_CORE_message_queue_Initialize+0x78><== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14fcc: 80 01 00 24 lwz r0,36(r1) ffc14fd0: 7f c3 f3 78 mr r3,r30 ffc14fd4: 83 81 00 10 lwz r28,16(r1) ffc14fd8: 7c 08 03 a6 mtlr r0 ffc14fdc: 83 a1 00 14 lwz r29,20(r1) ffc14fe0: 83 c1 00 18 lwz r30,24(r1) ffc14fe4: 83 e1 00 1c lwz r31,28(r1) ffc14fe8: 38 21 00 20 addi r1,r1,32 ffc14fec: 4e 80 00 20 blr /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( ffc14ff0: 3b 9c 00 10 addi r28,r28,16 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; ffc14ff4: 7d 45 e0 16 mulhwu r10,r5,r28 ffc14ff8: 7d 65 e1 d6 mullw r11,r5,r28 if ( x > SIZE_MAX ) ffc14ffc: 2f 8a 00 00 cmpwi cr7,r10,0 */ if ( !size_t_mult32_with_overflow( (size_t) maximum_pending_messages, allocated_message_size + sizeof(CORE_message_queue_Buffer_control), &message_buffering_required ) ) return false; ffc15000: 3b c0 00 00 li r30,0 size_t *c ) { long long x = (long long)a*b; if ( x > SIZE_MAX ) ffc15004: 41 bd ff c8 bgt- cr7,ffc14fcc <_CORE_message_queue_Initialize+0x54> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc15008: 7d 63 5b 78 mr r3,r11 ffc1500c: 90 a1 00 08 stw r5,8(r1) ffc15010: 48 00 3c 35 bl ffc18c44 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) ffc15014: 2f 83 00 00 cmpwi cr7,r3,0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc15018: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); ffc1501c: 7c 64 1b 78 mr r4,r3 if (the_message_queue->message_buffers == 0) ffc15020: 80 a1 00 08 lwz r5,8(r1) ffc15024: 41 be ff a8 beq- cr7,ffc14fcc <_CORE_message_queue_Initialize+0x54> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc15028: 38 7f 00 60 addi r3,r31,96 ffc1502c: 7f 86 e3 78 mr r6,r28 ffc15030: 48 00 62 19 bl ffc1b248 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc15034: 80 9d 00 00 lwz r4,0(r29) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc15038: 38 1f 00 50 addi r0,r31,80 head->next = tail; head->previous = NULL; ffc1503c: 93 df 00 54 stw r30,84(r31) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc15040: 39 3f 00 54 addi r9,r31,84 ffc15044: 68 84 00 01 xori r4,r4,1 head->next = tail; head->previous = NULL; tail->previous = head; ffc15048: 90 1f 00 58 stw r0,88(r31) ffc1504c: 7c 84 00 34 cntlzw r4,r4 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc15050: 91 3f 00 50 stw r9,80(r31) ffc15054: 7f e3 fb 78 mr r3,r31 ffc15058: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc1505c: 38 a0 00 80 li r5,128 ffc15060: 38 c0 00 06 li r6,6 ffc15064: 48 00 2e 55 bl ffc17eb8 <_Thread_queue_Initialize> STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc15068: 80 01 00 24 lwz r0,36(r1) THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; ffc1506c: 3b c0 00 01 li r30,1 } ffc15070: 83 81 00 10 lwz r28,16(r1) ffc15074: 7c 08 03 a6 mtlr r0 ffc15078: 7f c3 f3 78 mr r3,r30 ffc1507c: 83 a1 00 14 lwz r29,20(r1) ffc15080: 83 c1 00 18 lwz r30,24(r1) ffc15084: 83 e1 00 1c lwz r31,28(r1) ffc15088: 38 21 00 20 addi r1,r1,32 ffc1508c: 4e 80 00 20 blr =============================================================================== ffc0a6e4 <_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 ) { ffc0a6e4: 94 21 ff f0 stwu r1,-16(r1) ffc0a6e8: 7c 08 02 a6 mflr r0 ffc0a6ec: 93 e1 00 0c stw r31,12(r1) ffc0a6f0: 7c 7f 1b 78 mr r31,r3 ffc0a6f4: 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)) ) { ffc0a6f8: 48 00 21 15 bl ffc0c80c <_Thread_queue_Dequeue> ffc0a6fc: 2f 83 00 00 cmpwi cr7,r3,0 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0a700: 38 60 00 00 li r3,0 if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc0a704: 41 9e 00 18 beq- cr7,ffc0a71c <_CORE_semaphore_Surrender+0x38> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0a708: 80 01 00 14 lwz r0,20(r1) ffc0a70c: 83 e1 00 0c lwz r31,12(r1) ffc0a710: 38 21 00 10 addi r1,r1,16 ffc0a714: 7c 08 03 a6 mtlr r0 ffc0a718: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0a71c: 7c 00 00 a6 mfmsr r0 ffc0a720: 7d 30 42 a6 mfsprg r9,0 ffc0a724: 7c 09 48 78 andc r9,r0,r9 ffc0a728: 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 ) ffc0a72c: 81 3f 00 48 lwz r9,72(r31) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; ffc0a730: 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 ) ffc0a734: 81 7f 00 40 lwz r11,64(r31) ffc0a738: 7f 89 58 40 cmplw cr7,r9,r11 ffc0a73c: 40 9c 00 10 bge- cr7,ffc0a74c <_CORE_semaphore_Surrender+0x68><== NEVER TAKEN the_semaphore->count += 1; ffc0a740: 39 29 00 01 addi r9,r9,1 ffc0a744: 91 3f 00 48 stw r9,72(r31) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0a748: 38 60 00 00 li r3,0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0a74c: 7c 00 01 24 mtmsr r0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0a750: 80 01 00 14 lwz r0,20(r1) ffc0a754: 83 e1 00 0c lwz r31,12(r1) ffc0a758: 38 21 00 10 addi r1,r1,16 ffc0a75c: 7c 08 03 a6 mtlr r0 ffc0a760: 4e 80 00 20 blr =============================================================================== ffc101bc <_Chain_Initialize>: Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc101bc: 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; ffc101c0: 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 ); ffc101c4: 39 43 00 04 addi r10,r3,4 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; ffc101c8: 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; ffc101cc: 7c 69 1b 78 mr r9,r3 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc101d0: 41 82 00 38 beq- ffc10208 <_Chain_Initialize+0x4c> <== NEVER TAKEN ffc101d4: 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; ffc101d8: 7c a9 03 a6 mtctr r5 Chain_Node *next = starting_address; ffc101dc: 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; ffc101e0: 7c 6b 1b 78 mr r11,r3 ffc101e4: 48 00 00 0c b ffc101f0 <_Chain_Initialize+0x34> Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc101e8: 7d 2b 4b 78 mr r11,r9 current->next = next; next->previous = current; current = next; next = (Chain_Node *) ffc101ec: 7c 09 03 78 mr r9,r0 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; ffc101f0: 91 2b 00 00 stw r9,0(r11) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( ffc101f4: 7c 09 32 14 add r0,r9,r6 head->previous = NULL; while ( count-- ) { current->next = next; next->previous = current; ffc101f8: 91 69 00 04 stw r11,4(r9) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc101fc: 42 00 ff ec bdnz+ ffc101e8 <_Chain_Initialize+0x2c> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( ffc10200: 7c c6 41 d6 mullw r6,r6,r8 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10204: 7d 24 32 14 add r9,r4,r6 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; ffc10208: 91 49 00 00 stw r10,0(r9) tail->previous = current; ffc1020c: 91 23 00 08 stw r9,8(r3) } ffc10210: 4e 80 00 20 blr =============================================================================== ffc08f08 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { ffc08f08: 94 21 ff f0 stwu r1,-16(r1) ffc08f0c: 7c 08 02 a6 mflr r0 ffc08f10: 90 01 00 14 stw r0,20(r1) ffc08f14: 93 e1 00 0c stw r31,12(r1) ffc08f18: 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 ]; ffc08f1c: 81 63 01 2c lwz r11,300(r3) option_set = (rtems_option) the_thread->Wait.option; ffc08f20: 80 c3 00 30 lwz r6,48(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc08f24: 7d 40 00 a6 mfmsr r10 ffc08f28: 7c 10 42 a6 mfsprg r0,0 ffc08f2c: 7d 40 00 78 andc r0,r10,r0 ffc08f30: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); pending_events = api->pending_events; ffc08f34: 81 2b 00 00 lwz r9,0(r11) event_condition = (rtems_event_set) the_thread->Wait.count; ffc08f38: 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 ) ) { ffc08f3c: 7c 08 48 39 and. r8,r0,r9 ffc08f40: 41 82 00 e4 beq- ffc09024 <_Event_Surrender+0x11c> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && ffc08f44: 3c e0 00 00 lis r7,0 ffc08f48: 38 e7 2d b8 addi r7,r7,11704 ffc08f4c: 80 a7 00 08 lwz r5,8(r7) ffc08f50: 2f 85 00 00 cmpwi cr7,r5,0 ffc08f54: 41 9e 00 10 beq- cr7,ffc08f64 <_Event_Surrender+0x5c> ffc08f58: 80 e7 00 0c lwz r7,12(r7) ffc08f5c: 7f 83 38 00 cmpw cr7,r3,r7 ffc08f60: 41 9e 00 78 beq- cr7,ffc08fd8 <_Event_Surrender+0xd0> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); ffc08f64: 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 ) ) { ffc08f68: 70 e5 01 00 andi. r5,r7,256 ffc08f6c: 41 82 00 b8 beq- ffc09024 <_Event_Surrender+0x11c> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc08f70: 7f 80 40 00 cmpw cr7,r0,r8 ffc08f74: 41 9e 00 0c beq- cr7,ffc08f80 <_Event_Surrender+0x78> ffc08f78: 70 c0 00 02 andi. r0,r6,2 ffc08f7c: 41 82 00 a8 beq- ffc09024 <_Event_Surrender+0x11c> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc08f80: 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) ); ffc08f84: 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; ffc08f88: 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 ); ffc08f8c: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc08f90: 90 1f 00 24 stw r0,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc08f94: 91 07 00 00 stw r8,0(r7) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc08f98: 7c 00 00 a6 mfmsr r0 ffc08f9c: 7d 40 01 24 mtmsr r10 ffc08fa0: 7c 00 01 24 mtmsr r0 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc08fa4: 80 1f 00 50 lwz r0,80(r31) ffc08fa8: 2f 80 00 02 cmpwi cr7,r0,2 ffc08fac: 41 9e 00 90 beq- cr7,ffc0903c <_Event_Surrender+0x134> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc08fb0: 7d 40 01 24 mtmsr r10 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc08fb4: 3c 80 10 03 lis r4,4099 ffc08fb8: 7f e3 fb 78 mr r3,r31 ffc08fbc: 60 84 ff f8 ori r4,r4,65528 ffc08fc0: 48 00 2f c1 bl ffc0bf80 <_Thread_Clear_state> } return; } } _ISR_Enable( level ); } ffc08fc4: 80 01 00 14 lwz r0,20(r1) ffc08fc8: 83 e1 00 0c lwz r31,12(r1) ffc08fcc: 38 21 00 10 addi r1,r1,16 ffc08fd0: 7c 08 03 a6 mtlr r0 ffc08fd4: 4e 80 00 20 blr * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc08fd8: 3c e0 00 00 lis r7,0 ffc08fdc: 80 a7 28 0c lwz r5,10252(r7) /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ffc08fe0: 2f 85 00 02 cmpwi cr7,r5,2 ffc08fe4: 41 9e 00 10 beq- cr7,ffc08ff4 <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { ffc08fe8: 80 a7 28 0c lwz r5,10252(r7) * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc08fec: 2f 85 00 01 cmpwi cr7,r5,1 ffc08ff0: 40 9e ff 74 bne+ cr7,ffc08f64 <_Event_Surrender+0x5c> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { ffc08ff4: 7f 80 40 00 cmpw cr7,r0,r8 ffc08ff8: 41 9e 00 0c beq- cr7,ffc09004 <_Event_Surrender+0xfc> ffc08ffc: 70 c0 00 02 andi. r0,r6,2 ffc09000: 41 82 00 24 beq- ffc09024 <_Event_Surrender+0x11c> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc09004: 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; ffc09008: 38 00 00 00 li r0,0 ffc0900c: 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 ); ffc09010: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc09014: 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; ffc09018: 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; ffc0901c: 91 06 00 00 stw r8,0(r6) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc09020: 90 07 28 0c stw r0,10252(r7) ffc09024: 7d 40 01 24 mtmsr r10 } return; } } _ISR_Enable( level ); } ffc09028: 80 01 00 14 lwz r0,20(r1) ffc0902c: 83 e1 00 0c lwz r31,12(r1) ffc09030: 38 21 00 10 addi r1,r1,16 ffc09034: 7c 08 03 a6 mtlr r0 ffc09038: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc0903c: 38 00 00 03 li r0,3 ffc09040: 90 1f 00 50 stw r0,80(r31) ffc09044: 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 ); ffc09048: 38 7f 00 48 addi r3,r31,72 ffc0904c: 48 00 48 51 bl ffc0d89c <_Watchdog_Remove> ffc09050: 3c 80 10 03 lis r4,4099 ffc09054: 7f e3 fb 78 mr r3,r31 ffc09058: 60 84 ff f8 ori r4,r4,65528 ffc0905c: 48 00 2f 25 bl ffc0bf80 <_Thread_Clear_state> ffc09060: 4b ff ff c8 b ffc09028 <_Event_Surrender+0x120> =============================================================================== ffc09064 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { ffc09064: 94 21 ff e8 stwu r1,-24(r1) ffc09068: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc0906c: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *ignored ) { ffc09070: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc09074: 48 00 33 d1 bl ffc0c444 <_Thread_Get> switch ( location ) { ffc09078: 80 01 00 08 lwz r0,8(r1) ffc0907c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09080: 40 9e 00 54 bne- cr7,ffc090d4 <_Event_Timeout+0x70> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc09084: 7d 20 00 a6 mfmsr r9 ffc09088: 7d 70 42 a6 mfsprg r11,0 ffc0908c: 7d 2b 58 78 andc r11,r9,r11 ffc09090: 7d 60 01 24 mtmsr r11 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc09094: 3d 60 00 00 lis r11,0 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { ffc09098: 81 6b 2d c4 lwz r11,11716(r11) _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc0909c: 90 03 00 24 stw r0,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc090a0: 7f 83 58 00 cmpw cr7,r3,r11 ffc090a4: 41 9e 00 40 beq- cr7,ffc090e4 <_Event_Timeout+0x80> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; ffc090a8: 38 00 00 06 li r0,6 ffc090ac: 90 03 00 34 stw r0,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc090b0: 7d 20 01 24 mtmsr r9 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc090b4: 3c 80 10 03 lis r4,4099 ffc090b8: 60 84 ff f8 ori r4,r4,65528 ffc090bc: 48 00 2e c5 bl ffc0bf80 <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc090c0: 3d 20 00 00 lis r9,0 ffc090c4: 81 69 27 c8 lwz r11,10184(r9) ffc090c8: 38 0b ff ff addi r0,r11,-1 ffc090cc: 90 09 27 c8 stw r0,10184(r9) return _Thread_Dispatch_disable_level; ffc090d0: 80 09 27 c8 lwz r0,10184(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc090d4: 80 01 00 1c lwz r0,28(r1) ffc090d8: 38 21 00 18 addi r1,r1,24 ffc090dc: 7c 08 03 a6 mtlr r0 ffc090e0: 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 ) ffc090e4: 3d 60 00 00 lis r11,0 ffc090e8: 80 0b 28 0c lwz r0,10252(r11) ffc090ec: 2f 80 00 01 cmpwi cr7,r0,1 ffc090f0: 40 9e ff b8 bne+ cr7,ffc090a8 <_Event_Timeout+0x44> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc090f4: 38 00 00 02 li r0,2 ffc090f8: 90 0b 28 0c stw r0,10252(r11) ffc090fc: 4b ff ff ac b ffc090a8 <_Event_Timeout+0x44> =============================================================================== ffc103e8 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc103e8: 94 21 ff e0 stwu r1,-32(r1) ffc103ec: 7c 08 02 a6 mflr r0 ffc103f0: 7d 80 00 26 mfcr r12 ffc103f4: 7c 89 23 78 mr r9,r4 ffc103f8: 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 ffc103fc: 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 ) { ffc10400: 7f 84 00 40 cmplw cr7,r4,r0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10404: 93 a1 00 14 stw r29,20(r1) ffc10408: 7c 7d 1b 78 mr r29,r3 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; ffc1040c: 80 e3 00 10 lwz r7,16(r3) uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { /* Integer overflow occured */ return NULL; ffc10410: 38 60 00 00 li r3,0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10414: 93 61 00 0c stw r27,12(r1) ffc10418: 93 81 00 10 stw r28,16(r1) ffc1041c: 93 c1 00 18 stw r30,24(r1) ffc10420: 93 e1 00 1c stw r31,28(r1) ffc10424: 91 81 00 08 stw r12,8(r1) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { ffc10428: 41 9d 00 7c bgt- cr7,ffc104a4 <_Heap_Allocate_aligned_with_boundary+0xbc> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { ffc1042c: 2e 06 00 00 cmpwi cr4,r6,0 ffc10430: 40 92 01 b8 bne- cr4,ffc105e8 <_Heap_Allocate_aligned_with_boundary+0x200> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc10434: 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 ) { ffc10438: 7f 9d 20 00 cmpw cr7,r29,r4 ffc1043c: 41 9e 01 c4 beq- cr7,ffc10600 <_Heap_Allocate_aligned_with_boundary+0x218> * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { if ( alignment == 0 ) { ffc10440: 2c 05 00 00 cmpwi r5,0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc10444: 3b c0 00 00 li r30,0 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size ffc10448: 3b 67 00 07 addi r27,r7,7 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; ffc1044c: 23 89 00 04 subfic r28,r9,4 ffc10450: 48 00 00 24 b ffc10474 <_Heap_Allocate_aligned_with_boundary+0x8c> * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { if ( alignment == 0 ) { ffc10454: 40 82 00 7c bne- ffc104d0 <_Heap_Allocate_aligned_with_boundary+0xe8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc10458: 3b e4 00 08 addi r31,r4,8 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc1045c: 2f 9f 00 00 cmpwi cr7,r31,0 ); } } /* Statistics */ ++search_count; ffc10460: 3b de 00 01 addi r30,r30,1 if ( alloc_begin != 0 ) { ffc10464: 40 9e 01 3c bne- cr7,ffc105a0 <_Heap_Allocate_aligned_with_boundary+0x1b8> break; } block = block->next; ffc10468: 80 84 00 08 lwz r4,8(r4) do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc1046c: 7f 9d 20 00 cmpw cr7,r29,r4 ffc10470: 41 9e 00 20 beq- cr7,ffc10490 <_Heap_Allocate_aligned_with_boundary+0xa8> /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { ffc10474: 81 64 00 04 lwz r11,4(r4) ffc10478: 7f 80 58 40 cmplw cr7,r0,r11 ffc1047c: 41 bc ff d8 blt- cr7,ffc10454 <_Heap_Allocate_aligned_with_boundary+0x6c> if ( alloc_begin != 0 ) { break; } block = block->next; ffc10480: 80 84 00 08 lwz r4,8(r4) ); } } /* Statistics */ ++search_count; ffc10484: 3b de 00 01 addi r30,r30,1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc10488: 7f 9d 20 00 cmpw cr7,r29,r4 ffc1048c: 40 9e ff e8 bne+ cr7,ffc10474 <_Heap_Allocate_aligned_with_boundary+0x8c> ffc10490: 3b e0 00 00 li r31,0 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { ffc10494: 80 1d 00 44 lwz r0,68(r29) ffc10498: 7f 80 f0 40 cmplw cr7,r0,r30 ffc1049c: 41 9c 01 38 blt- cr7,ffc105d4 <_Heap_Allocate_aligned_with_boundary+0x1ec> stats->max_search = search_count; } return (void *) alloc_begin; ffc104a0: 7f e3 fb 78 mr r3,r31 } ffc104a4: 80 01 00 24 lwz r0,36(r1) ffc104a8: 81 81 00 08 lwz r12,8(r1) ffc104ac: 7c 08 03 a6 mtlr r0 ffc104b0: 83 61 00 0c lwz r27,12(r1) ffc104b4: 83 81 00 10 lwz r28,16(r1) ffc104b8: 7d 80 81 20 mtcrf 8,r12 ffc104bc: 83 a1 00 14 lwz r29,20(r1) ffc104c0: 83 c1 00 18 lwz r30,24(r1) ffc104c4: 83 e1 00 1c lwz r31,28(r1) ffc104c8: 38 21 00 20 addi r1,r1,32 ffc104cc: 4e 80 00 20 blr - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc104d0: 55 6b 00 3c rlwinm r11,r11,0,0,30 ffc104d4: 80 7d 00 14 lwz r3,20(r29) uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; ffc104d8: 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; ffc104dc: 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); ffc104e0: 7f ff 2b 96 divwu r31,r31,r5 ffc104e4: 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; ffc104e8: 7d 43 d8 50 subf r10,r3,r27 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size ffc104ec: 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 ) { ffc104f0: 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; ffc104f4: 39 84 00 08 addi r12,r4,8 ffc104f8: 40 9c 00 0c bge- cr7,ffc10504 <_Heap_Allocate_aligned_with_boundary+0x11c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc104fc: 7d 6b 2b 96 divwu r11,r11,r5 ffc10500: 7f eb 29 d6 mullw r31,r11,r5 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc10504: 41 92 00 64 beq- cr4,ffc10568 <_Heap_Allocate_aligned_with_boundary+0x180> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; ffc10508: 7d 5f 4a 14 add r10,r31,r9 ffc1050c: 7d 6a 33 96 divwu r11,r10,r6 ffc10510: 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 ) { ffc10514: 7f 9f 58 40 cmplw cr7,r31,r11 ffc10518: 40 9c 00 50 bge- cr7,ffc10568 <_Heap_Allocate_aligned_with_boundary+0x180> ffc1051c: 7f 8a 58 40 cmplw cr7,r10,r11 ffc10520: 40 9d 00 48 ble- cr7,ffc10568 <_Heap_Allocate_aligned_with_boundary+0x180> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; ffc10524: 7d 0c 4a 14 add r8,r12,r9 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { ffc10528: 7f 88 58 40 cmplw cr7,r8,r11 return 0; ffc1052c: 3b e0 00 00 li r31,0 if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { ffc10530: 40 bd 00 10 ble+ cr7,ffc10540 <_Heap_Allocate_aligned_with_boundary+0x158> ffc10534: 4b ff ff 28 b ffc1045c <_Heap_Allocate_aligned_with_boundary+0x74> /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc10538: 40 99 00 30 ble- cr6,ffc10568 <_Heap_Allocate_aligned_with_boundary+0x180> if ( boundary_line < boundary_floor ) { ffc1053c: 41 85 00 a4 bgt- cr1,ffc105e0 <_Heap_Allocate_aligned_with_boundary+0x1f8><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; ffc10540: 7f e9 58 50 subf r31,r9,r11 ffc10544: 7f ff 2b 96 divwu r31,r31,r5 ffc10548: 7f ff 29 d6 mullw r31,r31,r5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; ffc1054c: 7d 5f 4a 14 add r10,r31,r9 ffc10550: 7d 6a 33 96 divwu r11,r10,r6 ffc10554: 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 ) { ffc10558: 7f 9f 58 40 cmplw cr7,r31,r11 ffc1055c: 7f 0a 58 40 cmplw cr6,r10,r11 if ( boundary_line < boundary_floor ) { ffc10560: 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 ) { ffc10564: 41 9c ff d4 blt+ cr7,ffc10538 <_Heap_Allocate_aligned_with_boundary+0x150> boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { ffc10568: 7f 8c f8 40 cmplw cr7,r12,r31 ffc1056c: 41 9d 00 74 bgt- cr7,ffc105e0 <_Heap_Allocate_aligned_with_boundary+0x1f8> ffc10570: 7d 7f 3b 96 divwu r11,r31,r7 ffc10574: 7d 6b 39 d6 mullw r11,r11,r7 ffc10578: 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; ffc1057c: 7d 6a 5a 14 add r11,r10,r11 if ( free_size >= min_block_size || free_size == 0 ) { ffc10580: 7f 83 58 40 cmplw cr7,r3,r11 ffc10584: 40 bd fe d8 ble- cr7,ffc1045c <_Heap_Allocate_aligned_with_boundary+0x74> return alloc_begin; } } return 0; ffc10588: 31 6b ff ff addic r11,r11,-1 ffc1058c: 7d 6b 59 10 subfe r11,r11,r11 ffc10590: 7f ff 58 38 and r31,r31,r11 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc10594: 2f 9f 00 00 cmpwi cr7,r31,0 ); } } /* Statistics */ ++search_count; ffc10598: 3b de 00 01 addi r30,r30,1 if ( alloc_begin != 0 ) { ffc1059c: 41 9e fe cc beq+ cr7,ffc10468 <_Heap_Allocate_aligned_with_boundary+0x80> search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc105a0: 81 7d 00 48 lwz r11,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc105a4: 7f a3 eb 78 mr r3,r29 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc105a8: 80 1d 00 4c lwz r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc105ac: 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; ffc105b0: 39 6b 00 01 addi r11,r11,1 stats->searches += search_count; ffc105b4: 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; ffc105b8: 91 7d 00 48 stw r11,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc105bc: 7d 26 4b 78 mr r6,r9 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc105c0: 90 1d 00 4c stw r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc105c4: 4b ff a6 35 bl ffc0abf8 <_Heap_Block_allocate> boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { ffc105c8: 80 1d 00 44 lwz r0,68(r29) ffc105cc: 7f 80 f0 40 cmplw cr7,r0,r30 ffc105d0: 40 bc fe d0 bge- cr7,ffc104a0 <_Heap_Allocate_aligned_with_boundary+0xb8> stats->max_search = search_count; ffc105d4: 93 dd 00 44 stw r30,68(r29) } return (void *) alloc_begin; ffc105d8: 7f e3 fb 78 mr r3,r31 ffc105dc: 4b ff fe c8 b ffc104a4 <_Heap_Allocate_aligned_with_boundary+0xbc> if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; ffc105e0: 3b e0 00 00 li r31,0 ffc105e4: 4b ff fe 78 b ffc1045c <_Heap_Allocate_aligned_with_boundary+0x74> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { ffc105e8: 7f 84 30 40 cmplw cr7,r4,r6 ffc105ec: 41 bd fe b8 bgt- cr7,ffc104a4 <_Heap_Allocate_aligned_with_boundary+0xbc> return NULL; } if ( alignment == 0 ) { ffc105f0: 2f 85 00 00 cmpwi cr7,r5,0 ffc105f4: 40 be fe 40 bne- cr7,ffc10434 <_Heap_Allocate_aligned_with_boundary+0x4c> alignment = page_size; ffc105f8: 7c e5 3b 78 mr r5,r7 ffc105fc: 4b ff fe 38 b ffc10434 <_Heap_Allocate_aligned_with_boundary+0x4c> do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc10600: 3b c0 00 00 li r30,0 ffc10604: 3b e0 00 00 li r31,0 ffc10608: 4b ff fe 8c b ffc10494 <_Heap_Allocate_aligned_with_boundary+0xac> =============================================================================== ffc101e8 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc101e8: 94 21 ff c0 stwu r1,-64(r1) ffc101ec: 7d 80 00 26 mfcr r12 ffc101f0: 7c 08 02 a6 mflr r0 ffc101f4: 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; ffc101f8: 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 ) { ffc101fc: 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 ) { ffc10200: 90 01 00 44 stw r0,68(r1) ffc10204: 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; ffc10208: 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 ) { ffc1020c: 93 c1 00 38 stw r30,56(r1) ffc10210: 7c 7e 1b 78 mr r30,r3 ffc10214: 93 01 00 20 stw r24,32(r1) ffc10218: 93 21 00 24 stw r25,36(r1) ffc1021c: 7c d9 33 78 mr r25,r6 ffc10220: 93 61 00 2c stw r27,44(r1) ffc10224: 93 81 00 30 stw r28,48(r1) ffc10228: 93 e1 00 3c stw r31,60(r1) ffc1022c: 7c 9f 23 78 mr r31,r4 Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; ffc10230: 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; ffc10234: 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 ) { ffc10238: 92 e1 00 1c stw r23,28(r1) ffc1023c: 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; ffc10240: 93 41 00 0c stw r26,12(r1) Heap_Block *extend_last_block = NULL; ffc10244: 93 41 00 08 stw r26,8(r1) uintptr_t const page_size = heap->page_size; ffc10248: 83 9e 00 10 lwz r28,16(r30) uintptr_t const min_block_size = heap->min_block_size; ffc1024c: 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; ffc10250: 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 ) { ffc10254: 40 9d 00 40 ble- cr7,ffc10294 <_Heap_Extend+0xac> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc10258: 80 01 00 44 lwz r0,68(r1) ffc1025c: 81 81 00 18 lwz r12,24(r1) ffc10260: 7c 08 03 a6 mtlr r0 ffc10264: 82 e1 00 1c lwz r23,28(r1) ffc10268: 83 01 00 20 lwz r24,32(r1) ffc1026c: 7d 81 81 20 mtcrf 24,r12 ffc10270: 83 21 00 24 lwz r25,36(r1) ffc10274: 83 41 00 28 lwz r26,40(r1) ffc10278: 83 61 00 2c lwz r27,44(r1) ffc1027c: 83 81 00 30 lwz r28,48(r1) ffc10280: 83 a1 00 34 lwz r29,52(r1) ffc10284: 83 c1 00 38 lwz r30,56(r1) ffc10288: 83 e1 00 3c lwz r31,60(r1) ffc1028c: 38 21 00 40 addi r1,r1,64 ffc10290: 4e 80 00 20 blr if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( ffc10294: 7c 83 23 78 mr r3,r4 ffc10298: 38 e1 00 0c addi r7,r1,12 ffc1029c: 7c a4 2b 78 mr r4,r5 ffc102a0: 39 01 00 08 addi r8,r1,8 ffc102a4: 7f 85 e3 78 mr r5,r28 ffc102a8: 4b ff a3 8d bl ffc0a634 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc102ac: 2f 83 00 00 cmpwi cr7,r3,0 /* For simplicity we reject extend areas that are too small */ return false; ffc102b0: 7f 43 d3 78 mr r3,r26 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc102b4: 41 be ff a4 beq- cr7,ffc10258 <_Heap_Extend+0x70> ffc102b8: 7f 69 db 78 mr r9,r27 ffc102bc: 3a e0 00 00 li r23,0 ffc102c0: 38 00 00 00 li r0,0 ffc102c4: 39 00 00 00 li r8,0 ffc102c8: 48 00 00 44 b ffc1030c <_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 ) { ffc102cc: 7f 9d 58 40 cmplw cr7,r29,r11 ffc102d0: 40 9c 00 08 bge- cr7,ffc102d8 <_Heap_Extend+0xf0> ffc102d4: 7d 20 4b 78 mr r0,r9 ffc102d8: 7d 4b e3 96 divwu r10,r11,r28 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc102dc: 7f 8b f8 00 cmpw cr7,r11,r31 ffc102e0: 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); ffc102e4: 39 4a ff f8 addi r10,r10,-8 ffc102e8: 41 9e 00 64 beq- cr7,ffc1034c <_Heap_Extend+0x164> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { ffc102ec: 7f 9f 58 40 cmplw cr7,r31,r11 ffc102f0: 40 9d 00 08 ble- cr7,ffc102f8 <_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 ) ffc102f4: 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; ffc102f8: 81 2a 00 04 lwz r9,4(r10) ffc102fc: 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); ffc10300: 7d 29 52 14 add r9,r9,r10 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc10304: 7f 9b 48 00 cmpw cr7,r27,r9 ffc10308: 41 9e 00 60 beq- cr7,ffc10368 <_Heap_Extend+0x180> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc1030c: 7f 89 d8 00 cmpw cr7,r9,r27 ffc10310: 7d 2a 4b 78 mr r10,r9 ffc10314: 41 9e 01 b8 beq- cr7,ffc104cc <_Heap_Extend+0x2e4> uintptr_t const sub_area_end = start_block->prev_size; ffc10318: 81 69 00 00 lwz r11,0(r9) Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( ffc1031c: 7f 9f 58 40 cmplw cr7,r31,r11 ffc10320: 40 9c 00 0c bge- cr7,ffc1032c <_Heap_Extend+0x144> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ffc10324: 7f 8a e8 40 cmplw cr7,r10,r29 ffc10328: 41 9c 02 28 blt- cr7,ffc10550 <_Heap_Extend+0x368> ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc1032c: 7f 8a e8 00 cmpw cr7,r10,r29 ffc10330: 40 9e ff 9c bne+ cr7,ffc102cc <_Heap_Extend+0xe4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10334: 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 ) { ffc10338: 7f 8b f8 00 cmpw cr7,r11,r31 ffc1033c: 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 ) { ffc10340: 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); ffc10344: 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 ) { ffc10348: 40 9e ff a4 bne+ cr7,ffc102ec <_Heap_Extend+0x104> <== ALWAYS TAKEN start_block->prev_size = extend_area_end; ffc1034c: 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 ) ffc10350: 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; ffc10354: 81 2a 00 04 lwz r9,4(r10) ffc10358: 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); ffc1035c: 7d 29 52 14 add r9,r9,r10 } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc10360: 7f 9b 48 00 cmpw cr7,r27,r9 ffc10364: 40 9e ff a8 bne+ cr7,ffc1030c <_Heap_Extend+0x124> <== NEVER TAKEN if ( extend_area_begin < heap->area_begin ) { ffc10368: 81 3e 00 18 lwz r9,24(r30) ffc1036c: 7f 9f 48 40 cmplw cr7,r31,r9 ffc10370: 41 9c 01 64 blt- cr7,ffc104d4 <_Heap_Extend+0x2ec> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { ffc10374: 81 3e 00 1c lwz r9,28(r30) ffc10378: 7f 9d 48 40 cmplw cr7,r29,r9 ffc1037c: 40 9d 00 08 ble- cr7,ffc10384 <_Heap_Extend+0x19c> heap->area_end = extend_area_end; ffc10380: 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 ) { ffc10384: 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; ffc10388: 81 21 00 0c lwz r9,12(r1) ffc1038c: 81 61 00 08 lwz r11,8(r1) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc10390: 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; ffc10394: 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 = ffc10398: 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; ffc1039c: 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; ffc103a0: 91 4b 00 00 stw r10,0(r11) extend_last_block->size_and_flag = 0; ffc103a4: 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 = ffc103a8: 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; ffc103ac: 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 ) { ffc103b0: 40 9d 01 58 ble- cr7,ffc10508 <_Heap_Extend+0x320> <== ALWAYS TAKEN heap->first_block = extend_first_block; ffc103b4: 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 ) { ffc103b8: 2e 08 00 00 cmpwi cr4,r8,0 ffc103bc: 41 92 01 b0 beq- cr4,ffc1056c <_Heap_Extend+0x384> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; ffc103c0: 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 ); ffc103c4: 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; ffc103c8: 7d 3f 03 96 divwu r9,r31,r0 ffc103cc: 7d 29 01 d6 mullw r9,r9,r0 if ( remainder != 0 ) { ffc103d0: 7d 29 f8 51 subf. r9,r9,r31 ffc103d4: 41 82 00 0c beq- ffc103e0 <_Heap_Extend+0x1f8> <== NEVER TAKEN return value - remainder + alignment; ffc103d8: 7f ff 02 14 add r31,r31,r0 ffc103dc: 7f e9 f8 50 subf r31,r9,r31 uintptr_t const new_first_block_begin = ffc103e0: 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; ffc103e4: 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 = ffc103e8: 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; ffc103ec: 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; ffc103f0: 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 ); ffc103f4: 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; ffc103f8: 90 04 00 04 stw r0,4(r4) _Heap_Free_block( heap, new_first_block ); ffc103fc: 4b ff fd b1 bl ffc101ac <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { ffc10400: 2d 9a 00 00 cmpwi cr3,r26,0 ffc10404: 41 8e 01 18 beq- cr3,ffc1051c <_Heap_Extend+0x334> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10408: 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, ffc1040c: 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( ffc10410: 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) ffc10414: 81 7a 00 04 lwz r11,4(r26) ffc10418: 7c 00 4b 96 divwu r0,r0,r9 ffc1041c: 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 ); ffc10420: 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) ffc10424: 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 = ffc10428: 7d 20 d2 14 add r9,r0,r26 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; ffc1042c: 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 = ffc10430: 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 ); ffc10434: 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; ffc10438: 81 3a 00 04 lwz r9,4(r26) ffc1043c: 55 29 07 fe clrlwi r9,r9,31 block->size_and_flag = size | flag; ffc10440: 7c 00 4b 78 or r0,r0,r9 ffc10444: 90 1a 00 04 stw r0,4(r26) ffc10448: 4b ff fd 65 bl ffc101ac <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc1044c: 41 92 01 0c beq- cr4,ffc10558 <_Heap_Extend+0x370> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc10450: 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 ) ffc10454: 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( ffc10458: 81 7e 00 20 lwz r11,32(r30) *extended_size_ptr = extended_size; return true; ffc1045c: 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; ffc10460: 80 09 00 04 lwz r0,4(r9) * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( ffc10464: 7d 69 58 50 subf r11,r9,r11 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc10468: 54 00 07 fe clrlwi r0,r0,31 block->size_and_flag = size | flag; ffc1046c: 7c 00 5b 78 or r0,r0,r11 ffc10470: 90 09 00 04 stw r0,4(r9) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc10474: 81 3e 00 30 lwz r9,48(r30) /* Statistics */ stats->size += extended_size; ffc10478: 80 1e 00 2c lwz r0,44(r30) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc1047c: 7f 18 48 50 subf r24,r24,r9 /* Statistics */ stats->size += extended_size; ffc10480: 7c 00 c2 14 add r0,r0,r24 ffc10484: 90 1e 00 2c stw r0,44(r30) if ( extended_size_ptr != NULL ) ffc10488: 41 be fd d0 beq- cr7,ffc10258 <_Heap_Extend+0x70> <== NEVER TAKEN *extended_size_ptr = extended_size; return true; } ffc1048c: 80 01 00 44 lwz r0,68(r1) ffc10490: 81 81 00 18 lwz r12,24(r1) ffc10494: 7c 08 03 a6 mtlr r0 /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; ffc10498: 93 19 00 00 stw r24,0(r25) return true; } ffc1049c: 7d 81 81 20 mtcrf 24,r12 ffc104a0: 82 e1 00 1c lwz r23,28(r1) ffc104a4: 83 01 00 20 lwz r24,32(r1) ffc104a8: 83 21 00 24 lwz r25,36(r1) ffc104ac: 83 41 00 28 lwz r26,40(r1) ffc104b0: 83 61 00 2c lwz r27,44(r1) ffc104b4: 83 81 00 30 lwz r28,48(r1) ffc104b8: 83 a1 00 34 lwz r29,52(r1) ffc104bc: 83 c1 00 38 lwz r30,56(r1) ffc104c0: 83 e1 00 3c lwz r31,60(r1) ffc104c4: 38 21 00 40 addi r1,r1,64 ffc104c8: 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; ffc104cc: 81 5e 00 18 lwz r10,24(r30) ffc104d0: 4b ff fe 48 b ffc10318 <_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 ) { ffc104d4: 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; ffc104d8: 81 21 00 0c lwz r9,12(r1) ffc104dc: 81 61 00 08 lwz r11,8(r1) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc104e0: 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; ffc104e4: 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 = ffc104e8: 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; ffc104ec: 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; ffc104f0: 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; ffc104f4: 91 4b 00 00 stw r10,0(r11) extend_last_block->size_and_flag = 0; ffc104f8: 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 = ffc104fc: 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; ffc10500: 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 ) { ffc10504: 41 bd fe b0 bgt- cr7,ffc103b4 <_Heap_Extend+0x1cc> <== ALWAYS TAKEN heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { ffc10508: 81 3e 00 24 lwz r9,36(r30) ffc1050c: 7f 89 58 40 cmplw cr7,r9,r11 ffc10510: 40 bc fe a8 bge- cr7,ffc103b8 <_Heap_Extend+0x1d0> heap->last_block = extend_last_block; ffc10514: 91 7e 00 24 stw r11,36(r30) ffc10518: 4b ff fe a0 b ffc103b8 <_Heap_Extend+0x1d0> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { ffc1051c: 2f 97 00 00 cmpwi cr7,r23,0 ffc10520: 41 be ff 2c beq- cr7,ffc1044c <_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; ffc10524: 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 ); ffc10528: 80 01 00 0c lwz r0,12(r1) ffc1052c: 55 29 07 fe clrlwi r9,r9,31 ffc10530: 7c 17 00 50 subf r0,r23,r0 block->size_and_flag = size | flag; ffc10534: 7d 20 03 78 or r0,r9,r0 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( ffc10538: 81 21 00 08 lwz r9,8(r1) ffc1053c: 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; ffc10540: 80 09 00 04 lwz r0,4(r9) ffc10544: 60 00 00 01 ori r0,r0,1 ffc10548: 90 09 00 04 stw r0,4(r9) ffc1054c: 4b ff ff 00 b ffc1044c <_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; ffc10550: 38 60 00 00 li r3,0 ffc10554: 4b ff fd 04 b ffc10258 <_Heap_Extend+0x70> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc10558: 40 8e fe f8 bne+ cr3,ffc10450 <_Heap_Extend+0x268> _Heap_Free_block( heap, extend_first_block ); ffc1055c: 80 81 00 0c lwz r4,12(r1) ffc10560: 7f c3 f3 78 mr r3,r30 ffc10564: 4b ff fc 49 bl ffc101ac <_Heap_Free_block> ffc10568: 4b ff fe e8 b ffc10450 <_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 ) { ffc1056c: 2f 80 00 00 cmpwi cr7,r0,0 ffc10570: 41 be fe 90 beq- cr7,ffc10400 <_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; ffc10574: 7c 0b 00 50 subf r0,r11,r0 ffc10578: 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 = ffc1057c: 90 0b 00 04 stw r0,4(r11) ffc10580: 4b ff fe 80 b ffc10400 <_Heap_Extend+0x218> =============================================================================== ffc1060c <_Heap_Free>: /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { ffc1060c: 2c 04 00 00 cmpwi r4,0 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc10610: 94 21 ff f0 stwu r1,-16(r1) ffc10614: 7c 69 1b 78 mr r9,r3 ffc10618: 93 e1 00 0c stw r31,12(r1) * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; ffc1061c: 38 60 00 01 li r3,1 /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { ffc10620: 41 82 01 44 beq- ffc10764 <_Heap_Free+0x158> ffc10624: 80 09 00 10 lwz r0,16(r9) alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; ffc10628: 38 60 00 00 li r3,0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block ffc1062c: 81 69 00 20 lwz r11,32(r9) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10630: 7c 84 03 96 divwu r4,r4,r0 ffc10634: 7c 84 01 d6 mullw r4,r4,r0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc10638: 38 84 ff f8 addi r4,r4,-8 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc1063c: 7f 84 58 40 cmplw cr7,r4,r11 ffc10640: 41 9c 01 24 blt- cr7,ffc10764 <_Heap_Free+0x158> ffc10644: 80 09 00 24 lwz r0,36(r9) ffc10648: 7f 84 00 40 cmplw cr7,r4,r0 ffc1064c: 41 9d 01 18 bgt- cr7,ffc10764 <_Heap_Free+0x158> <== NEVER TAKEN --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10650: 81 04 00 04 lwz r8,4(r4) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc10654: 55 07 00 3c rlwinm r7,r8,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc10658: 7d 47 22 14 add r10,r7,r4 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc1065c: 7f 8b 50 40 cmplw cr7,r11,r10 ffc10660: 41 9d 01 04 bgt- cr7,ffc10764 <_Heap_Free+0x158> <== NEVER TAKEN ffc10664: 7f 80 50 40 cmplw cr7,r0,r10 ffc10668: 41 9c 00 fc blt- cr7,ffc10764 <_Heap_Free+0x158> ffc1066c: 80 ca 00 04 lwz r6,4(r10) return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { ffc10670: 70 c5 00 01 andi. r5,r6,1 ffc10674: 41 82 00 f0 beq- ffc10764 <_Heap_Free+0x158> return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); ffc10678: 7f 80 50 00 cmpw cr7,r0,r10 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc1067c: 54 c5 00 3c rlwinm r5,r6,0,0,30 ffc10680: 38 c0 00 00 li r6,0 ffc10684: 41 9e 00 18 beq- cr7,ffc1069c <_Heap_Free+0x90> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10688: 7c ca 2a 14 add r6,r10,r5 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc1068c: 80 c6 00 04 lwz r6,4(r6) return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) ffc10690: 70 c3 00 01 andi. r3,r6,1 ffc10694: 7c c0 00 26 mfcr r6 ffc10698: 54 c6 1f fe rlwinm r6,r6,3,31,31 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { ffc1069c: 71 08 00 01 andi. r8,r8,1 ffc106a0: 40 82 00 6c bne- ffc1070c <_Heap_Free+0x100> uintptr_t const prev_size = block->prev_size; ffc106a4: 83 e4 00 00 lwz r31,0(r4) Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { _HAssert( false ); return( false ); ffc106a8: 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); ffc106ac: 7d 9f 20 50 subf r12,r31,r4 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc106b0: 7f 8b 60 40 cmplw cr7,r11,r12 ffc106b4: 41 9d 00 b0 bgt- cr7,ffc10764 <_Heap_Free+0x158> <== NEVER TAKEN ffc106b8: 7f 80 60 40 cmplw cr7,r0,r12 ffc106bc: 7d 03 43 78 mr r3,r8 ffc106c0: 41 9c 00 a4 blt- cr7,ffc10764 <_Heap_Free+0x158> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc106c4: 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) ) { ffc106c8: 70 0b 00 01 andi. r11,r0,1 ffc106cc: 41 82 00 98 beq- ffc10764 <_Heap_Free+0x158> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc106d0: 2f 86 00 00 cmpwi cr7,r6,0 ffc106d4: 41 9e 00 e8 beq- cr7,ffc107bc <_Heap_Free+0x1b0> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc106d8: 81 09 00 38 lwz r8,56(r9) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc106dc: 7f e7 fa 14 add r31,r7,r31 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc106e0: 81 6a 00 08 lwz r11,8(r10) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc106e4: 7c bf 2a 14 add r5,r31,r5 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc106e8: 81 4a 00 0c lwz r10,12(r10) } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc106ec: 39 08 ff ff addi r8,r8,-1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc106f0: 60 a0 00 01 ori r0,r5,1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; ffc106f4: 91 6a 00 08 stw r11,8(r10) next->prev = prev; ffc106f8: 91 4b 00 0c stw r10,12(r11) } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc106fc: 91 09 00 38 stw r8,56(r9) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10700: 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; ffc10704: 7c a5 61 2e stwx r5,r5,r12 ffc10708: 48 00 00 34 b ffc1073c <_Heap_Free+0x130> uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ ffc1070c: 2f 86 00 00 cmpwi cr7,r6,0 ffc10710: 41 9e 00 60 beq- cr7,ffc10770 <_Heap_Free+0x164> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10714: 81 6a 00 08 lwz r11,8(r10) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; ffc10718: 7c a5 3a 14 add r5,r5,r7 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc1071c: 81 4a 00 0c lwz r10,12(r10) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10720: 60 a0 00 01 ori r0,r5,1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc10724: 91 64 00 08 stw r11,8(r4) new_block->prev = prev; ffc10728: 91 44 00 0c stw r10,12(r4) next->prev = new_block; prev->next = new_block; ffc1072c: 90 8a 00 08 stw r4,8(r10) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc10730: 90 8b 00 0c stw r4,12(r11) ffc10734: 90 04 00 04 stw r0,4(r4) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc10738: 7c a5 21 2e stwx r5,r5,r4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc1073c: 81 69 00 40 lwz r11,64(r9) ++stats->frees; stats->free_size += block_size; return( true ); ffc10740: 38 60 00 01 li r3,1 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc10744: 81 09 00 50 lwz r8,80(r9) stats->free_size += block_size; ffc10748: 81 49 00 30 lwz r10,48(r9) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc1074c: 39 6b ff ff addi r11,r11,-1 ++stats->frees; ffc10750: 38 08 00 01 addi r0,r8,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc10754: 91 69 00 40 stw r11,64(r9) ++stats->frees; stats->free_size += block_size; ffc10758: 7c ea 3a 14 add r7,r10,r7 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc1075c: 90 09 00 50 stw r0,80(r9) stats->free_size += block_size; ffc10760: 90 e9 00 30 stw r7,48(r9) return( true ); } ffc10764: 83 e1 00 0c lwz r31,12(r1) ffc10768: 38 21 00 10 addi r1,r1,16 ffc1076c: 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; ffc10770: 81 09 00 38 lwz r8,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc10774: 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; ffc10778: 38 08 00 01 addi r0,r8,1 ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; ffc1077c: 91 24 00 0c stw r9,12(r4) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; ffc10780: 60 e8 00 01 ori r8,r7,1 ffc10784: 91 04 00 04 stw r8,4(r4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { ffc10788: 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; ffc1078c: 81 0a 00 04 lwz r8,4(r10) RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc10790: 81 69 00 08 lwz r11,8(r9) ffc10794: 55 08 00 3c rlwinm r8,r8,0,0,30 next_block->prev_size = block_size; ffc10798: 7c e7 21 2e stwx r7,r7,r4 new_block->next = next; ffc1079c: 91 64 00 08 stw r11,8(r4) } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc107a0: 91 0a 00 04 stw r8,4(r10) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; ffc107a4: 90 8b 00 0c stw r4,12(r11) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; ffc107a8: 90 89 00 08 stw r4,8(r9) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc107ac: 90 09 00 38 stw r0,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc107b0: 40 bd ff 8c ble- cr7,ffc1073c <_Heap_Free+0x130> stats->max_free_blocks = stats->free_blocks; ffc107b4: 90 09 00 3c stw r0,60(r9) ffc107b8: 4b ff ff 84 b ffc1073c <_Heap_Free+0x130> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; ffc107bc: 7f e7 fa 14 add r31,r7,r31 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc107c0: 63 e0 00 01 ori r0,r31,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc107c4: 7f e7 21 2e stwx r31,r7,r4 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc107c8: 90 0c 00 04 stw r0,4(r12) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc107cc: 80 0a 00 04 lwz r0,4(r10) ffc107d0: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc107d4: 90 0a 00 04 stw r0,4(r10) ffc107d8: 4b ff ff 64 b ffc1073c <_Heap_Free+0x130> =============================================================================== ffc0b39c <_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; ffc0b39c: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc0b3a0: 94 21 ff 98 stwu r1,-104(r1) ffc0b3a4: 7c 08 02 a6 mflr r0 ffc0b3a8: 92 e1 00 44 stw r23,68(r1) ffc0b3ac: 90 01 00 6c stw r0,108(r1) ffc0b3b0: 93 01 00 48 stw r24,72(r1) ffc0b3b4: 93 21 00 4c stw r25,76(r1) ffc0b3b8: 7c 99 23 78 mr r25,r4 ffc0b3bc: 93 41 00 50 stw r26,80(r1) ffc0b3c0: 93 61 00 54 stw r27,84(r1) ffc0b3c4: 93 e1 00 64 stw r31,100(r1) ffc0b3c8: 7c 7f 1b 78 mr r31,r3 ffc0b3cc: 91 c1 00 20 stw r14,32(r1) ffc0b3d0: 91 e1 00 24 stw r15,36(r1) ffc0b3d4: 92 01 00 28 stw r16,40(r1) ffc0b3d8: 92 21 00 2c stw r17,44(r1) ffc0b3dc: 92 41 00 30 stw r18,48(r1) ffc0b3e0: 92 61 00 34 stw r19,52(r1) ffc0b3e4: 92 81 00 38 stw r20,56(r1) ffc0b3e8: 92 a1 00 3c stw r21,60(r1) ffc0b3ec: 92 c1 00 40 stw r22,64(r1) ffc0b3f0: 93 81 00 58 stw r28,88(r1) ffc0b3f4: 93 a1 00 5c stw r29,92(r1) ffc0b3f8: 93 c1 00 60 stw r30,96(r1) uintptr_t const page_size = heap->page_size; ffc0b3fc: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0b400: 83 03 00 14 lwz r24,20(r3) Heap_Block *const first_block = heap->first_block; ffc0b404: 83 43 00 20 lwz r26,32(r3) Heap_Block *const last_block = heap->last_block; ffc0b408: 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; ffc0b40c: 41 9e 00 7c beq- cr7,ffc0b488 <_Heap_Walk+0xec> ffc0b410: 3d 20 ff c1 lis r9,-63 ffc0b414: 39 29 b2 9c addi r9,r9,-19812 ffc0b418: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b41c: 3d 20 00 00 lis r9,0 return true; ffc0b420: 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() ) ) { ffc0b424: 80 09 27 e0 lwz r0,10208(r9) ffc0b428: 2f 80 00 03 cmpwi cr7,r0,3 ffc0b42c: 41 9e 00 7c beq- cr7,ffc0b4a8 <_Heap_Walk+0x10c> <== ALWAYS TAKEN block = next_block; } while ( block != first_block ); return true; } ffc0b430: 80 01 00 6c lwz r0,108(r1) ffc0b434: 81 c1 00 20 lwz r14,32(r1) ffc0b438: 7c 08 03 a6 mtlr r0 ffc0b43c: 81 e1 00 24 lwz r15,36(r1) ffc0b440: 82 01 00 28 lwz r16,40(r1) ffc0b444: 82 21 00 2c lwz r17,44(r1) ffc0b448: 82 41 00 30 lwz r18,48(r1) ffc0b44c: 82 61 00 34 lwz r19,52(r1) ffc0b450: 82 81 00 38 lwz r20,56(r1) ffc0b454: 82 a1 00 3c lwz r21,60(r1) ffc0b458: 82 c1 00 40 lwz r22,64(r1) ffc0b45c: 82 e1 00 44 lwz r23,68(r1) ffc0b460: 83 01 00 48 lwz r24,72(r1) ffc0b464: 83 21 00 4c lwz r25,76(r1) ffc0b468: 83 41 00 50 lwz r26,80(r1) ffc0b46c: 83 61 00 54 lwz r27,84(r1) ffc0b470: 83 81 00 58 lwz r28,88(r1) ffc0b474: 83 a1 00 5c lwz r29,92(r1) ffc0b478: 83 c1 00 60 lwz r30,96(r1) ffc0b47c: 83 e1 00 64 lwz r31,100(r1) ffc0b480: 38 21 00 68 addi r1,r1,104 ffc0b484: 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; ffc0b488: 3d 20 ff c1 lis r9,-63 ffc0b48c: 39 29 b2 98 addi r9,r9,-19816 ffc0b490: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b494: 3d 20 00 00 lis r9,0 return true; ffc0b498: 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() ) ) { ffc0b49c: 80 09 27 e0 lwz r0,10208(r9) ffc0b4a0: 2f 80 00 03 cmpwi cr7,r0,3 ffc0b4a4: 40 9e ff 8c bne+ cr7,ffc0b430 <_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)( ffc0b4a8: 80 1f 00 0c lwz r0,12(r31) ffc0b4ac: 3c a0 ff c2 lis r5,-62 ffc0b4b0: 81 1f 00 18 lwz r8,24(r31) ffc0b4b4: 7f 23 cb 78 mr r3,r25 ffc0b4b8: 81 3f 00 1c lwz r9,28(r31) ffc0b4bc: 38 80 00 00 li r4,0 ffc0b4c0: 81 7f 00 08 lwz r11,8(r31) ffc0b4c4: 38 a5 a7 58 addi r5,r5,-22696 ffc0b4c8: 90 01 00 10 stw r0,16(r1) ffc0b4cc: 7f 66 db 78 mr r6,r27 ffc0b4d0: 7f 07 c3 78 mr r7,r24 ffc0b4d4: 80 01 00 18 lwz r0,24(r1) ffc0b4d8: 7f 4a d3 78 mr r10,r26 ffc0b4dc: 92 e1 00 08 stw r23,8(r1) ffc0b4e0: 7c 09 03 a6 mtctr r0 ffc0b4e4: 91 61 00 0c stw r11,12(r1) ffc0b4e8: 4c c6 31 82 crclr 4*cr1+eq ffc0b4ec: 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 ) { ffc0b4f0: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0b4f4: 41 9e 00 ac beq- cr7,ffc0b5a0 <_Heap_Walk+0x204> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc0b4f8: 73 67 00 07 andi. r7,r27,7 ffc0b4fc: 40 82 00 cc bne- ffc0b5c8 <_Heap_Walk+0x22c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b500: 7c 18 db 96 divwu r0,r24,r27 ffc0b504: 7c 00 d9 d6 mullw r0,r0,r27 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc0b508: 7f 98 00 00 cmpw cr7,r24,r0 ffc0b50c: 40 9e 00 e8 bne- cr7,ffc0b5f4 <_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; ffc0b510: 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; ffc0b514: 7d 20 db 96 divwu r9,r0,r27 ffc0b518: 7d 29 d9 d6 mullw r9,r9,r27 ); return false; } if ( ffc0b51c: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b520: 40 9e 01 00 bne- cr7,ffc0b620 <_Heap_Walk+0x284> block = next_block; } while ( block != first_block ); return true; } ffc0b524: 82 da 00 04 lwz r22,4(r26) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc0b528: 72 c7 00 01 andi. r7,r22,1 ffc0b52c: 41 82 01 20 beq- ffc0b64c <_Heap_Walk+0x2b0> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0b530: 81 37 00 04 lwz r9,4(r23) ffc0b534: 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); ffc0b538: 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; ffc0b53c: 80 09 00 04 lwz r0,4(r9) ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc0b540: 70 07 00 01 andi. r7,r0,1 ffc0b544: 41 82 00 34 beq- ffc0b578 <_Heap_Walk+0x1dc> ); return false; } if ( ffc0b548: 7f 9a 48 00 cmpw cr7,r26,r9 ffc0b54c: 41 9e 01 28 beq- cr7,ffc0b674 <_Heap_Walk+0x2d8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( ffc0b550: 80 01 00 18 lwz r0,24(r1) ffc0b554: 3c a0 ff c2 lis r5,-62 ffc0b558: 7f 23 cb 78 mr r3,r25 ffc0b55c: 38 80 00 01 li r4,1 ffc0b560: 7c 09 03 a6 mtctr r0 ffc0b564: 38 a5 a8 c0 addi r5,r5,-22336 ffc0b568: 4c c6 31 82 crclr 4*cr1+eq ffc0b56c: 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; ffc0b570: 38 60 00 00 li r3,0 ffc0b574: 4b ff fe bc b ffc0b430 <_Heap_Walk+0x94> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( ffc0b578: 80 01 00 18 lwz r0,24(r1) ffc0b57c: 3c a0 ff c2 lis r5,-62 ffc0b580: 7f 23 cb 78 mr r3,r25 ffc0b584: 38 80 00 01 li r4,1 ffc0b588: 7c 09 03 a6 mtctr r0 ffc0b58c: 38 a5 a8 a8 addi r5,r5,-22360 ffc0b590: 4c c6 31 82 crclr 4*cr1+eq ffc0b594: 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; ffc0b598: 38 60 00 00 li r3,0 ffc0b59c: 4b ff fe 94 b ffc0b430 <_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" ); ffc0b5a0: 80 01 00 18 lwz r0,24(r1) ffc0b5a4: 3c a0 ff c2 lis r5,-62 ffc0b5a8: 7f 23 cb 78 mr r3,r25 ffc0b5ac: 38 80 00 01 li r4,1 ffc0b5b0: 7c 09 03 a6 mtctr r0 ffc0b5b4: 38 a5 a7 ec addi r5,r5,-22548 ffc0b5b8: 4c c6 31 82 crclr 4*cr1+eq ffc0b5bc: 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; ffc0b5c0: 38 60 00 00 li r3,0 ffc0b5c4: 4b ff fe 6c b ffc0b430 <_Heap_Walk+0x94> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( ffc0b5c8: 80 01 00 18 lwz r0,24(r1) ffc0b5cc: 3c a0 ff c2 lis r5,-62 ffc0b5d0: 7f 23 cb 78 mr r3,r25 ffc0b5d4: 38 80 00 01 li r4,1 ffc0b5d8: 7c 09 03 a6 mtctr r0 ffc0b5dc: 38 a5 a8 00 addi r5,r5,-22528 ffc0b5e0: 7f 66 db 78 mr r6,r27 ffc0b5e4: 4c c6 31 82 crclr 4*cr1+eq ffc0b5e8: 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; ffc0b5ec: 38 60 00 00 li r3,0 ffc0b5f0: 4b ff fe 40 b ffc0b430 <_Heap_Walk+0x94> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( ffc0b5f4: 80 01 00 18 lwz r0,24(r1) ffc0b5f8: 3c a0 ff c2 lis r5,-62 ffc0b5fc: 7f 23 cb 78 mr r3,r25 ffc0b600: 38 80 00 01 li r4,1 ffc0b604: 7c 09 03 a6 mtctr r0 ffc0b608: 38 a5 a8 20 addi r5,r5,-22496 ffc0b60c: 7f 06 c3 78 mr r6,r24 ffc0b610: 4c c6 31 82 crclr 4*cr1+eq ffc0b614: 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; ffc0b618: 38 60 00 00 li r3,0 ffc0b61c: 4b ff fe 14 b ffc0b430 <_Heap_Walk+0x94> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc0b620: 80 01 00 18 lwz r0,24(r1) ffc0b624: 3c a0 ff c2 lis r5,-62 ffc0b628: 7f 23 cb 78 mr r3,r25 ffc0b62c: 38 80 00 01 li r4,1 ffc0b630: 7c 09 03 a6 mtctr r0 ffc0b634: 38 a5 a8 44 addi r5,r5,-22460 ffc0b638: 7f 46 d3 78 mr r6,r26 ffc0b63c: 4c c6 31 82 crclr 4*cr1+eq ffc0b640: 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; ffc0b644: 38 60 00 00 li r3,0 ffc0b648: 4b ff fd e8 b ffc0b430 <_Heap_Walk+0x94> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0b64c: 80 01 00 18 lwz r0,24(r1) ffc0b650: 3c a0 ff c2 lis r5,-62 ffc0b654: 7f 23 cb 78 mr r3,r25 ffc0b658: 38 80 00 01 li r4,1 ffc0b65c: 7c 09 03 a6 mtctr r0 ffc0b660: 38 a5 a8 78 addi r5,r5,-22408 ffc0b664: 4c c6 31 82 crclr 4*cr1+eq ffc0b668: 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; ffc0b66c: 38 60 00 00 li r3,0 ffc0b670: 4b ff fd c0 b ffc0b430 <_Heap_Walk+0x94> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0b674: 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; ffc0b678: 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 ) { ffc0b67c: 7f 9f 30 00 cmpw cr7,r31,r6 block = next_block; } while ( block != first_block ); return true; } ffc0b680: 80 1f 00 20 lwz r0,32(r31) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { ffc0b684: 41 9e 00 34 beq- cr7,ffc0b6b8 <_Heap_Walk+0x31c> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0b688: 7f 80 30 40 cmplw cr7,r0,r6 ffc0b68c: 40 9d 03 24 ble- cr7,ffc0b9b0 <_Heap_Walk+0x614> <== ALWAYS TAKEN if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( ffc0b690: 80 01 00 18 lwz r0,24(r1) ffc0b694: 3c a0 ff c2 lis r5,-62 ffc0b698: 7f 23 cb 78 mr r3,r25 ffc0b69c: 38 80 00 01 li r4,1 ffc0b6a0: 7c 09 03 a6 mtctr r0 ffc0b6a4: 38 a5 a8 f0 addi r5,r5,-22288 ffc0b6a8: 4c c6 31 82 crclr 4*cr1+eq ffc0b6ac: 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; ffc0b6b0: 38 60 00 00 li r3,0 ffc0b6b4: 4b ff fd 7c b ffc0b430 <_Heap_Walk+0x94> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b6b8: 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)( ffc0b6bc: 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)( ffc0b6c0: 3e 40 ff c2 lis r18,-62 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b6c4: 7f 5d d3 78 mr r29,r26 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b6c8: 3a 73 ab 0c addi r19,r19,-21748 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc0b6cc: 3a 94 aa f4 addi r20,r20,-21772 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)( ffc0b6d0: 3a 52 aa 50 addi r18,r18,-21936 ffc0b6d4: 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)" : "") ffc0b6d8: 3e a0 ff c2 lis r21,-62 ffc0b6dc: 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)( ffc0b6e0: 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)" : ""), ffc0b6e4: 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; ffc0b6e8: 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); ffc0b6ec: 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; ffc0b6f0: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0b6f4: 40 9d 00 34 ble- cr7,ffc0b728 <_Heap_Walk+0x38c> <== ALWAYS TAKEN Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( ffc0b6f8: 3c a0 ff c2 lis r5,-62 ffc0b6fc: 7f 23 cb 78 mr r3,r25 ffc0b700: 38 80 00 01 li r4,1 ffc0b704: 38 a5 a9 90 addi r5,r5,-22128 return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0b708: 80 01 00 18 lwz r0,24(r1) ffc0b70c: 7f a6 eb 78 mr r6,r29 ffc0b710: 7f c7 f3 78 mr r7,r30 ffc0b714: 7c 09 03 a6 mtctr r0 ffc0b718: 4c c6 31 82 crclr 4*cr1+eq ffc0b71c: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0b720: 38 60 00 00 li r3,0 ffc0b724: 4b ff fd 0c b ffc0b430 <_Heap_Walk+0x94> ffc0b728: 80 1f 00 24 lwz r0,36(r31) ffc0b72c: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0b730: 41 bc ff c8 blt- cr7,ffc0b6f8 <_Heap_Walk+0x35c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b734: 7d 3c db 96 divwu r9,r28,r27 ffc0b738: 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; ffc0b73c: 7f a0 ba 78 xor r0,r29,r23 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0b740: 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; ffc0b744: 7c 00 00 34 cntlzw r0,r0 ffc0b748: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0b74c: 68 00 00 01 xori r0,r0,1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0b750: 41 9e 00 0c beq- cr7,ffc0b75c <_Heap_Walk+0x3c0> ffc0b754: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b758: 40 9e 01 e0 bne- cr7,ffc0b938 <_Heap_Walk+0x59c> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { ffc0b75c: 7f 98 e0 40 cmplw cr7,r24,r28 ffc0b760: 40 9d 00 0c ble- cr7,ffc0b76c <_Heap_Walk+0x3d0> ffc0b764: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b768: 40 9e 02 00 bne- cr7,ffc0b968 <_Heap_Walk+0x5cc> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { ffc0b76c: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0b770: 41 9c 00 0c blt- cr7,ffc0b77c <_Heap_Walk+0x3e0> ffc0b774: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b778: 40 9e 02 24 bne- cr7,ffc0b99c <_Heap_Walk+0x600> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0b77c: 80 1e 00 04 lwz r0,4(r30) ffc0b780: 56 d6 07 fe clrlwi r22,r22,31 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0b784: 70 07 00 01 andi. r7,r0,1 ffc0b788: 41 82 00 74 beq- ffc0b7fc <_Heap_Walk+0x460> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { ffc0b78c: 2f 96 00 00 cmpwi cr7,r22,0 ffc0b790: 41 9e 00 40 beq- cr7,ffc0b7d0 <_Heap_Walk+0x434> (*printer)( ffc0b794: 80 01 00 18 lwz r0,24(r1) ffc0b798: 7f 23 cb 78 mr r3,r25 ffc0b79c: 38 80 00 00 li r4,0 ffc0b7a0: 7e 85 a3 78 mr r5,r20 ffc0b7a4: 7c 09 03 a6 mtctr r0 ffc0b7a8: 7f a6 eb 78 mr r6,r29 ffc0b7ac: 7f 87 e3 78 mr r7,r28 ffc0b7b0: 4c c6 31 82 crclr 4*cr1+eq ffc0b7b4: 4e 80 04 21 bctrl block->prev_size ); } block = next_block; } while ( block != first_block ); ffc0b7b8: 7f 9a f0 00 cmpw cr7,r26,r30 ffc0b7bc: 41 9e 01 0c beq- cr7,ffc0b8c8 <_Heap_Walk+0x52c> ffc0b7c0: 82 de 00 04 lwz r22,4(r30) ffc0b7c4: 7f dd f3 78 mr r29,r30 ffc0b7c8: 80 1f 00 20 lwz r0,32(r31) ffc0b7cc: 4b ff ff 1c b ffc0b6e8 <_Heap_Walk+0x34c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b7d0: 80 01 00 18 lwz r0,24(r1) ffc0b7d4: 7f a6 eb 78 mr r6,r29 ffc0b7d8: 7f 23 cb 78 mr r3,r25 ffc0b7dc: 81 1d 00 00 lwz r8,0(r29) ffc0b7e0: 38 80 00 00 li r4,0 ffc0b7e4: 7c 09 03 a6 mtctr r0 ffc0b7e8: 7e 65 9b 78 mr r5,r19 ffc0b7ec: 7f 87 e3 78 mr r7,r28 ffc0b7f0: 4c c6 31 82 crclr 4*cr1+eq ffc0b7f4: 4e 80 04 21 bctrl ffc0b7f8: 4b ff ff c0 b ffc0b7b8 <_Heap_Walk+0x41c> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? ffc0b7fc: 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)( ffc0b800: 81 3f 00 08 lwz r9,8(r31) return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; ffc0b804: 80 1f 00 0c lwz r0,12(r31) ffc0b808: 7f 89 40 00 cmpw cr7,r9,r8 ffc0b80c: 41 9e 00 f8 beq- cr7,ffc0b904 <_Heap_Walk+0x568> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0b810: 7f 9f 40 00 cmpw cr7,r31,r8 ffc0b814: 41 9e 01 00 beq- cr7,ffc0b914 <_Heap_Walk+0x578> ffc0b818: 39 35 aa c0 addi r9,r21,-21824 block->next, block->next == last_free_block ? ffc0b81c: 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)( ffc0b820: 7f 80 50 00 cmpw cr7,r0,r10 ffc0b824: 41 9e 00 e8 beq- cr7,ffc0b90c <_Heap_Walk+0x570> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0b828: 7f 9f 50 00 cmpw cr7,r31,r10 ffc0b82c: 41 9e 00 f0 beq- cr7,ffc0b91c <_Heap_Walk+0x580> ffc0b830: 38 15 aa c0 addi r0,r21,-21824 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)( ffc0b834: 90 01 00 08 stw r0,8(r1) ffc0b838: 7f 23 cb 78 mr r3,r25 ffc0b83c: 38 80 00 00 li r4,0 ffc0b840: 80 01 00 18 lwz r0,24(r1) ffc0b844: 7e 45 93 78 mr r5,r18 ffc0b848: 7f a6 eb 78 mr r6,r29 ffc0b84c: 7f 87 e3 78 mr r7,r28 ffc0b850: 7c 09 03 a6 mtctr r0 ffc0b854: 4c c6 31 82 crclr 4*cr1+eq ffc0b858: 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 ) { ffc0b85c: 81 1e 00 00 lwz r8,0(r30) ffc0b860: 7f 9c 40 00 cmpw cr7,r28,r8 ffc0b864: 40 9e 00 6c bne- cr7,ffc0b8d0 <_Heap_Walk+0x534> ); return false; } if ( !prev_used ) { ffc0b868: 2f 96 00 00 cmpwi cr7,r22,0 ffc0b86c: 41 9e 00 b8 beq- cr7,ffc0b924 <_Heap_Walk+0x588> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0b870: 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 ) { ffc0b874: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0b878: 41 9e 00 24 beq- cr7,ffc0b89c <_Heap_Walk+0x500> <== NEVER TAKEN if ( free_block == block ) { ffc0b87c: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0b880: 40 be 00 0c bne+ cr7,ffc0b88c <_Heap_Walk+0x4f0> ffc0b884: 4b ff ff 34 b ffc0b7b8 <_Heap_Walk+0x41c> ffc0b888: 41 ba ff 30 beq- cr6,ffc0b7b8 <_Heap_Walk+0x41c> return true; } free_block = free_block->next; ffc0b88c: 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 ) { ffc0b890: 7f 9f 48 00 cmpw cr7,r31,r9 if ( free_block == block ) { ffc0b894: 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 ) { ffc0b898: 40 9e ff f0 bne+ cr7,ffc0b888 <_Heap_Walk+0x4ec> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0b89c: 3c a0 ff c2 lis r5,-62 ffc0b8a0: 7f 23 cb 78 mr r3,r25 ffc0b8a4: 38 80 00 01 li r4,1 ffc0b8a8: 38 a5 ab 34 addi r5,r5,-21708 ffc0b8ac: 80 01 00 18 lwz r0,24(r1) ffc0b8b0: 7f a6 eb 78 mr r6,r29 ffc0b8b4: 7c 09 03 a6 mtctr r0 ffc0b8b8: 4c c6 31 82 crclr 4*cr1+eq ffc0b8bc: 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; ffc0b8c0: 38 60 00 00 li r3,0 ffc0b8c4: 4b ff fb 6c b ffc0b430 <_Heap_Walk+0x94> } block = next_block; } while ( block != first_block ); return true; ffc0b8c8: 38 60 00 01 li r3,1 ffc0b8cc: 4b ff fb 64 b ffc0b430 <_Heap_Walk+0x94> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( ffc0b8d0: 80 01 00 18 lwz r0,24(r1) ffc0b8d4: 3c a0 ff c2 lis r5,-62 ffc0b8d8: 7f 23 cb 78 mr r3,r25 ffc0b8dc: 38 80 00 01 li r4,1 ffc0b8e0: 7c 09 03 a6 mtctr r0 ffc0b8e4: 38 a5 aa 88 addi r5,r5,-21880 ffc0b8e8: 7f a6 eb 78 mr r6,r29 ffc0b8ec: 7f 87 e3 78 mr r7,r28 ffc0b8f0: 7f c9 f3 78 mr r9,r30 ffc0b8f4: 4c c6 31 82 crclr 4*cr1+eq ffc0b8f8: 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; ffc0b8fc: 38 60 00 00 li r3,0 ffc0b900: 4b ff fb 30 b ffc0b430 <_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)( ffc0b904: 39 30 a7 20 addi r9,r16,-22752 ffc0b908: 4b ff ff 14 b ffc0b81c <_Heap_Walk+0x480> ffc0b90c: 38 11 a7 3c addi r0,r17,-22724 ffc0b910: 4b ff ff 24 b ffc0b834 <_Heap_Walk+0x498> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0b914: 39 2e a7 30 addi r9,r14,-22736 ffc0b918: 4b ff ff 04 b ffc0b81c <_Heap_Walk+0x480> block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0b91c: 38 0f a7 4c addi r0,r15,-22708 ffc0b920: 4b ff ff 14 b ffc0b834 <_Heap_Walk+0x498> return false; } if ( !prev_used ) { (*printer)( ffc0b924: 3c a0 ff c2 lis r5,-62 ffc0b928: 7f 23 cb 78 mr r3,r25 ffc0b92c: 38 80 00 01 li r4,1 ffc0b930: 38 a5 aa c4 addi r5,r5,-21820 ffc0b934: 4b ff ff 78 b ffc0b8ac <_Heap_Walk+0x510> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( ffc0b938: 80 01 00 18 lwz r0,24(r1) ffc0b93c: 3c a0 ff c2 lis r5,-62 ffc0b940: 7f 23 cb 78 mr r3,r25 ffc0b944: 38 80 00 01 li r4,1 ffc0b948: 7c 09 03 a6 mtctr r0 ffc0b94c: 38 a5 a9 c0 addi r5,r5,-22080 ffc0b950: 7f a6 eb 78 mr r6,r29 ffc0b954: 7f 87 e3 78 mr r7,r28 ffc0b958: 4c c6 31 82 crclr 4*cr1+eq ffc0b95c: 4e 80 04 21 bctrl "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; ffc0b960: 38 60 00 00 li r3,0 ffc0b964: 4b ff fa cc b ffc0b430 <_Heap_Walk+0x94> } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( ffc0b968: 80 01 00 18 lwz r0,24(r1) ffc0b96c: 3c a0 ff c2 lis r5,-62 ffc0b970: 7f 23 cb 78 mr r3,r25 ffc0b974: 38 80 00 01 li r4,1 ffc0b978: 7c 09 03 a6 mtctr r0 ffc0b97c: 38 a5 a9 f0 addi r5,r5,-22032 ffc0b980: 7f a6 eb 78 mr r6,r29 ffc0b984: 7f 87 e3 78 mr r7,r28 ffc0b988: 7f 08 c3 78 mr r8,r24 ffc0b98c: 4c c6 31 82 crclr 4*cr1+eq ffc0b990: 4e 80 04 21 bctrl block, block_size, min_block_size ); return false; ffc0b994: 38 60 00 00 li r3,0 ffc0b998: 4b ff fa 98 b ffc0b430 <_Heap_Walk+0x94> } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0b99c: 3c a0 ff c2 lis r5,-62 ffc0b9a0: 7f 23 cb 78 mr r3,r25 ffc0b9a4: 38 80 00 01 li r4,1 ffc0b9a8: 38 a5 aa 1c addi r5,r5,-21988 ffc0b9ac: 4b ff fd 5c b ffc0b708 <_Heap_Walk+0x36c> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0b9b0: 81 5f 00 24 lwz r10,36(r31) ffc0b9b4: 7f 86 50 40 cmplw cr7,r6,r10 ffc0b9b8: 41 bd fc d8 bgt- cr7,ffc0b690 <_Heap_Walk+0x2f4> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0b9bc: 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; ffc0b9c0: 7d 69 43 96 divwu r11,r9,r8 ffc0b9c4: 7d 6b 41 d6 mullw r11,r11,r8 ); return false; } if ( ffc0b9c8: 7f 89 58 00 cmpw cr7,r9,r11 ffc0b9cc: 40 9e 00 d4 bne- cr7,ffc0baa0 <_Heap_Walk+0x704> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0b9d0: 81 26 00 04 lwz r9,4(r6) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b9d4: 7f eb fb 78 mr r11,r31 ffc0b9d8: 7c c5 33 78 mr r5,r6 ffc0b9dc: 55 29 00 3c rlwinm r9,r9,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0b9e0: 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; ffc0b9e4: 81 29 00 04 lwz r9,4(r9) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b9e8: 71 27 00 01 andi. r7,r9,1 ffc0b9ec: 41 a2 00 58 beq+ ffc0ba44 <_Heap_Walk+0x6a8> <== ALWAYS TAKEN ffc0b9f0: 48 00 00 88 b ffc0ba78 <_Heap_Walk+0x6dc> <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; ffc0b9f4: 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 ) { ffc0b9f8: 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; ffc0b9fc: 7f 06 00 40 cmplw cr6,r6,r0 ffc0ba00: 7c 86 50 40 cmplw cr1,r6,r10 ffc0ba04: 41 be fc b4 beq- cr7,ffc0b6b8 <_Heap_Walk+0x31c> ffc0ba08: 41 b8 fc 88 blt- cr6,ffc0b690 <_Heap_Walk+0x2f4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0ba0c: 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; ffc0ba10: 41 a5 fc 80 bgt- cr1,ffc0b690 <_Heap_Walk+0x2f4> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0ba14: 7c e9 43 96 divwu r7,r9,r8 ffc0ba18: 7c e7 41 d6 mullw r7,r7,r8 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0ba1c: 7c ab 2b 78 mr r11,r5 ); return false; } if ( ffc0ba20: 7f 89 38 00 cmpw cr7,r9,r7 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0ba24: 7c c5 33 78 mr r5,r6 ); return false; } if ( ffc0ba28: 40 9e 00 78 bne- cr7,ffc0baa0 <_Heap_Walk+0x704> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0ba2c: 81 26 00 04 lwz r9,4(r6) ffc0ba30: 55 29 00 3c rlwinm r9,r9,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0ba34: 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; ffc0ba38: 81 29 00 04 lwz r9,4(r9) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0ba3c: 71 27 00 01 andi. r7,r9,1 ffc0ba40: 40 82 00 38 bne- ffc0ba78 <_Heap_Walk+0x6dc> ); return false; } if ( free_block->prev != prev_block ) { ffc0ba44: 80 e6 00 0c lwz r7,12(r6) ffc0ba48: 7f 87 58 00 cmpw cr7,r7,r11 ffc0ba4c: 41 9e ff a8 beq+ cr7,ffc0b9f4 <_Heap_Walk+0x658> (*printer)( ffc0ba50: 80 01 00 18 lwz r0,24(r1) ffc0ba54: 3c a0 ff c2 lis r5,-62 ffc0ba58: 7f 23 cb 78 mr r3,r25 ffc0ba5c: 38 80 00 01 li r4,1 ffc0ba60: 7c 09 03 a6 mtctr r0 ffc0ba64: 38 a5 a9 5c addi r5,r5,-22180 ffc0ba68: 4c c6 31 82 crclr 4*cr1+eq ffc0ba6c: 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; ffc0ba70: 38 60 00 00 li r3,0 ffc0ba74: 4b ff f9 bc b ffc0b430 <_Heap_Walk+0x94> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( ffc0ba78: 80 01 00 18 lwz r0,24(r1) ffc0ba7c: 3c a0 ff c2 lis r5,-62 ffc0ba80: 7f 23 cb 78 mr r3,r25 ffc0ba84: 38 80 00 01 li r4,1 ffc0ba88: 7c 09 03 a6 mtctr r0 ffc0ba8c: 38 a5 a9 40 addi r5,r5,-22208 ffc0ba90: 4c c6 31 82 crclr 4*cr1+eq ffc0ba94: 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; ffc0ba98: 38 60 00 00 li r3,0 ffc0ba9c: 4b ff f9 94 b ffc0b430 <_Heap_Walk+0x94> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc0baa0: 80 01 00 18 lwz r0,24(r1) ffc0baa4: 3c a0 ff c2 lis r5,-62 ffc0baa8: 7f 23 cb 78 mr r3,r25 ffc0baac: 38 80 00 01 li r4,1 ffc0bab0: 7c 09 03 a6 mtctr r0 ffc0bab4: 38 a5 a9 10 addi r5,r5,-22256 ffc0bab8: 4c c6 31 82 crclr 4*cr1+eq ffc0babc: 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; ffc0bac0: 38 60 00 00 li r3,0 ffc0bac4: 4b ff f9 6c b ffc0b430 <_Heap_Walk+0x94> =============================================================================== ffc0b29c <_Heap_Walk_print>: static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b29c: 94 21 ff 88 stwu r1,-120(r1) ffc0b2a0: 7c 08 02 a6 mflr r0 ffc0b2a4: 93 e1 00 74 stw r31,116(r1) ffc0b2a8: 90 01 00 7c stw r0,124(r1) ffc0b2ac: 7c 60 1b 78 mr r0,r3 ffc0b2b0: 90 c1 00 1c stw r6,28(r1) ffc0b2b4: 90 e1 00 20 stw r7,32(r1) ffc0b2b8: 91 01 00 24 stw r8,36(r1) ffc0b2bc: 91 21 00 28 stw r9,40(r1) ffc0b2c0: 91 41 00 2c stw r10,44(r1) ffc0b2c4: 40 86 00 24 bne- cr1,ffc0b2e8 <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN ffc0b2c8: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0b2cc: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0b2d0: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0b2d4: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0b2d8: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0b2dc: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0b2e0: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0b2e4: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0b2e8: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b2ec: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc0b2f0: 40 9e 00 58 bne- cr7,ffc0b348 <_Heap_Walk_print+0xac> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); ffc0b2f4: 3c 60 ff c2 lis r3,-62 ffc0b2f8: 7c 04 03 78 mr r4,r0 ffc0b2fc: 38 63 a7 14 addi r3,r3,-22764 ffc0b300: 4c c6 31 82 crclr 4*cr1+eq ffc0b304: 4b ff b2 35 bl ffc06538 } va_start( ap, fmt ); ffc0b308: 38 00 00 03 li r0,3 ffc0b30c: 98 01 00 08 stb r0,8(r1) ffc0b310: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b314: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b318: 98 01 00 09 stb r0,9(r1) ffc0b31c: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b320: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b324: 90 01 00 0c stw r0,12(r1) ffc0b328: 38 01 00 10 addi r0,r1,16 ffc0b32c: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b330: 4b ff d5 95 bl ffc088c4 va_end( ap ); } ffc0b334: 80 01 00 7c lwz r0,124(r1) ffc0b338: 83 e1 00 74 lwz r31,116(r1) ffc0b33c: 38 21 00 78 addi r1,r1,120 ffc0b340: 7c 08 03 a6 mtlr r0 ffc0b344: 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 ); ffc0b348: 3c 60 ff c2 lis r3,-62 ffc0b34c: 7c 04 03 78 mr r4,r0 ffc0b350: 38 63 a7 08 addi r3,r3,-22776 ffc0b354: 4c c6 31 82 crclr 4*cr1+eq ffc0b358: 4b ff b1 e1 bl ffc06538 } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b35c: 38 00 00 03 li r0,3 ffc0b360: 98 01 00 08 stb r0,8(r1) ffc0b364: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b368: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b36c: 98 01 00 09 stb r0,9(r1) ffc0b370: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b374: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b378: 90 01 00 0c stw r0,12(r1) ffc0b37c: 38 01 00 10 addi r0,r1,16 ffc0b380: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b384: 4b ff d5 41 bl ffc088c4 va_end( ap ); } ffc0b388: 80 01 00 7c lwz r0,124(r1) ffc0b38c: 83 e1 00 74 lwz r31,116(r1) ffc0b390: 38 21 00 78 addi r1,r1,120 ffc0b394: 7c 08 03 a6 mtlr r0 ffc0b398: 4e 80 00 20 blr =============================================================================== ffc09e68 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09e68: 94 21 ff f0 stwu r1,-16(r1) ffc09e6c: 7c 08 02 a6 mflr r0 ffc09e70: 93 c1 00 08 stw r30,8(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09e74: 3f c0 00 00 lis r30,0 * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09e78: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09e7c: 80 1e 28 10 lwz r0,10256(r30) * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09e80: 93 e1 00 0c stw r31,12(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09e84: 2f 80 00 00 cmpwi cr7,r0,0 ffc09e88: 41 9e 00 2c beq- cr7,ffc09eb4 <_IO_Initialize_all_drivers+0x4c><== NEVER TAKEN ffc09e8c: 3b e0 00 00 li r31,0 ffc09e90: 3b de 28 10 addi r30,r30,10256 (void) rtems_io_initialize( major, 0, NULL ); ffc09e94: 7f e3 fb 78 mr r3,r31 ffc09e98: 38 80 00 00 li r4,0 ffc09e9c: 38 a0 00 00 li r5,0 ffc09ea0: 48 00 62 ad bl ffc1014c void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09ea4: 80 1e 00 00 lwz r0,0(r30) ffc09ea8: 3b ff 00 01 addi r31,r31,1 ffc09eac: 7f 80 f8 40 cmplw cr7,r0,r31 ffc09eb0: 41 9d ff e4 bgt+ cr7,ffc09e94 <_IO_Initialize_all_drivers+0x2c> (void) rtems_io_initialize( major, 0, NULL ); } ffc09eb4: 80 01 00 14 lwz r0,20(r1) ffc09eb8: 83 c1 00 08 lwz r30,8(r1) ffc09ebc: 7c 08 03 a6 mtlr r0 ffc09ec0: 83 e1 00 0c lwz r31,12(r1) ffc09ec4: 38 21 00 10 addi r1,r1,16 ffc09ec8: 4e 80 00 20 blr =============================================================================== ffc09d58 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { ffc09d58: 94 21 ff e0 stwu r1,-32(r1) ffc09d5c: 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; ffc09d60: 3d 20 00 00 lis r9,0 * workspace. * */ void _IO_Manager_initialization(void) { ffc09d64: 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; ffc09d68: 39 29 20 04 addi r9,r9,8196 * workspace. * */ void _IO_Manager_initialization(void) { ffc09d6c: 93 a1 00 14 stw r29,20(r1) ffc09d70: 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; ffc09d74: 83 a9 00 2c lwz r29,44(r9) rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; ffc09d78: 83 c9 00 30 lwz r30,48(r9) * workspace. * */ void _IO_Manager_initialization(void) { ffc09d7c: 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 ) ffc09d80: 7f 9e e8 40 cmplw cr7,r30,r29 * workspace. * */ void _IO_Manager_initialization(void) { ffc09d84: 93 61 00 0c stw r27,12(r1) ffc09d88: 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; ffc09d8c: 83 e9 00 34 lwz r31,52(r9) /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) ffc09d90: 40 9c 00 a4 bge- cr7,ffc09e34 <_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 ) ffc09d94: 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( ffc09d98: 7f 63 db 78 mr r3,r27 ffc09d9c: 48 00 3d 8d bl ffc0db28 <_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 *) ffc09da0: 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; ffc09da4: 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 *) ffc09da8: 90 7c 28 14 stw r3,10260(r28) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc09dac: 38 80 00 00 li r4,0 ffc09db0: 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; ffc09db4: 93 a9 28 10 stw r29,10256(r9) memset( ffc09db8: 48 00 9b c5 bl ffc1397c _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc09dbc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09dc0: 41 9e 00 50 beq- cr7,ffc09e10 <_IO_Manager_initialization+0xb8><== NEVER TAKEN ffc09dc4: 7f c9 03 a6 mtctr r30 ffc09dc8: 81 1c 28 14 lwz r8,10260(r28) ffc09dcc: 39 40 00 00 li r10,0 _IO_Driver_address_table[index] = driver_table[index]; ffc09dd0: 7f e9 fb 78 mr r9,r31 ffc09dd4: 7c a9 50 6e lwzux r5,r9,r10 ffc09dd8: 7d 68 52 14 add r11,r8,r10 ffc09ddc: 80 e9 00 08 lwz r7,8(r9) ffc09de0: 80 09 00 0c lwz r0,12(r9) ffc09de4: 80 c9 00 04 lwz r6,4(r9) ffc09de8: 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++ ) ffc09dec: 39 4a 00 18 addi r10,r10,24 _IO_Driver_address_table[index] = driver_table[index]; ffc09df0: 90 cb 00 04 stw r6,4(r11) ffc09df4: 90 eb 00 08 stw r7,8(r11) ffc09df8: 90 0b 00 0c stw r0,12(r11) ffc09dfc: 80 e9 00 10 lwz r7,16(r9) ffc09e00: 80 09 00 14 lwz r0,20(r9) ffc09e04: 90 eb 00 10 stw r7,16(r11) ffc09e08: 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++ ) ffc09e0c: 42 00 ff c4 bdnz+ ffc09dd0 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; } ffc09e10: 80 01 00 24 lwz r0,36(r1) ffc09e14: 83 61 00 0c lwz r27,12(r1) ffc09e18: 7c 08 03 a6 mtlr r0 ffc09e1c: 83 81 00 10 lwz r28,16(r1) ffc09e20: 83 a1 00 14 lwz r29,20(r1) ffc09e24: 83 c1 00 18 lwz r30,24(r1) ffc09e28: 83 e1 00 1c lwz r31,28(r1) ffc09e2c: 38 21 00 20 addi r1,r1,32 ffc09e30: 4e 80 00 20 blr ffc09e34: 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; ffc09e38: 3d 20 00 00 lis r9,0 ffc09e3c: 93 e9 28 14 stw r31,10260(r9) _IO_Number_of_drivers = number_of_drivers; ffc09e40: 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]; } ffc09e44: 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; ffc09e48: 93 c9 28 10 stw r30,10256(r9) sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } ffc09e4c: 83 61 00 0c lwz r27,12(r1) ffc09e50: 83 81 00 10 lwz r28,16(r1) ffc09e54: 83 a1 00 14 lwz r29,20(r1) ffc09e58: 83 c1 00 18 lwz r30,24(r1) ffc09e5c: 83 e1 00 1c lwz r31,28(r1) ffc09e60: 38 21 00 20 addi r1,r1,32 ffc09e64: 4e 80 00 20 blr =============================================================================== ffc0ad64 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0ad64: 94 21 ff f0 stwu r1,-16(r1) ffc0ad68: 7c 08 02 a6 mflr r0 _Internal_errors_What_happened.the_source = the_source; ffc0ad6c: 3d 60 00 00 lis r11,0 ffc0ad70: 39 2b 2c d0 addi r9,r11,11472 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0ad74: 90 01 00 14 stw r0,20(r1) ffc0ad78: 93 e1 00 0c stw r31,12(r1) ffc0ad7c: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc0ad80: 98 89 00 04 stb r4,4(r9) _Internal_errors_What_happened.the_error = the_error; ffc0ad84: 90 a9 00 08 stw r5,8(r9) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; ffc0ad88: 90 6b 2c d0 stw r3,11472(r11) _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); ffc0ad8c: 48 00 26 75 bl ffc0d400 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc0ad90: 38 00 00 05 li r0,5 ffc0ad94: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc0ad98: 7f e3 fb 78 mr r3,r31 ffc0ad9c: 90 09 28 04 stw r0,10244(r9) ffc0ada0: 4b ff 91 79 bl ffc03f18 <_BSP_Fatal_error> ffc0ada4: 48 00 00 00 b ffc0ada4 <_Internal_error_Occurred+0x40><== NOT EXECUTED =============================================================================== ffc0adbc <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0adbc: 94 21 ff f0 stwu r1,-16(r1) ffc0adc0: 7c 08 02 a6 mflr r0 ffc0adc4: 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 ) ffc0adc8: 80 03 00 18 lwz r0,24(r3) */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0adcc: 93 e1 00 0c stw r31,12(r1) ffc0add0: 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 ) ffc0add4: 2f 80 00 00 cmpwi cr7,r0,0 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0add8: 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; ffc0addc: 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 ) ffc0ade0: 41 9e 00 58 beq- cr7,ffc0ae38 <_Objects_Allocate+0x7c> <== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc0ade4: 3b df 00 20 addi r30,r31,32 ffc0ade8: 7f c3 f3 78 mr r3,r30 ffc0adec: 4b ff f3 fd bl ffc0a1e8 <_Chain_Get> if ( information->auto_extend ) { ffc0adf0: 88 1f 00 12 lbz r0,18(r31) ffc0adf4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0adf8: 41 9e 00 40 beq- cr7,ffc0ae38 <_Objects_Allocate+0x7c> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc0adfc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ae00: 41 9e 00 50 beq- cr7,ffc0ae50 <_Objects_Allocate+0x94> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0ae04: a1 63 00 0a lhz r11,10(r3) ffc0ae08: a0 1f 00 0a lhz r0,10(r31) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc0ae0c: a1 3f 00 14 lhz r9,20(r31) } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0ae10: 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--; ffc0ae14: 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; ffc0ae18: 7c 00 4b 96 divwu r0,r0,r9 information->inactive_per_block[ block ]--; ffc0ae1c: 81 3f 00 30 lwz r9,48(r31) ffc0ae20: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0ae24: 7d 49 00 2e lwzx r10,r9,r0 information->inactive--; ffc0ae28: 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 ]--; ffc0ae2c: 39 4a ff ff addi r10,r10,-1 ffc0ae30: 7d 49 01 2e stwx r10,r9,r0 information->inactive--; ffc0ae34: b1 7f 00 2c sth r11,44(r31) ); } #endif return the_object; } ffc0ae38: 80 01 00 14 lwz r0,20(r1) ffc0ae3c: 83 c1 00 08 lwz r30,8(r1) ffc0ae40: 7c 08 03 a6 mtlr r0 ffc0ae44: 83 e1 00 0c lwz r31,12(r1) ffc0ae48: 38 21 00 10 addi r1,r1,16 ffc0ae4c: 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 ); ffc0ae50: 7f e3 fb 78 mr r3,r31 ffc0ae54: 48 00 00 4d bl ffc0aea0 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc0ae58: 7f c3 f3 78 mr r3,r30 ffc0ae5c: 4b ff f3 8d bl ffc0a1e8 <_Chain_Get> } if ( the_object ) { ffc0ae60: 2c 03 00 00 cmpwi r3,0 ffc0ae64: 41 82 ff d4 beq+ ffc0ae38 <_Objects_Allocate+0x7c> ffc0ae68: 4b ff ff 9c b ffc0ae04 <_Objects_Allocate+0x48> =============================================================================== ffc0aea0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc0aea0: 94 21 ff c0 stwu r1,-64(r1) ffc0aea4: 7c 08 02 a6 mflr r0 ffc0aea8: 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 ) ffc0aeac: 81 23 00 34 lwz r9,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc0aeb0: 93 61 00 2c stw r27,44(r1) minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0aeb4: 2f 89 00 00 cmpwi cr7,r9,0 */ void _Objects_Extend_information( Objects_Information *information ) { ffc0aeb8: 93 81 00 30 stw r28,48(r1) ffc0aebc: 93 e1 00 3c stw r31,60(r1) ffc0aec0: 7c 7f 1b 78 mr r31,r3 ffc0aec4: 92 c1 00 18 stw r22,24(r1) ffc0aec8: 92 e1 00 1c stw r23,28(r1) ffc0aecc: 93 01 00 20 stw r24,32(r1) ffc0aed0: 93 21 00 24 stw r25,36(r1) ffc0aed4: 93 41 00 28 stw r26,40(r1) ffc0aed8: 93 a1 00 34 stw r29,52(r1) ffc0aedc: 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 ); ffc0aee0: a3 83 00 0a lhz r28,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0aee4: a3 63 00 10 lhz r27,16(r3) ffc0aee8: 41 9e 02 80 beq- cr7,ffc0b168 <_Objects_Extend_information+0x2c8> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc0aeec: a1 63 00 14 lhz r11,20(r3) ffc0aef0: 7e db 5b 96 divwu r22,r27,r11 for ( ; block < block_count; block++ ) { ffc0aef4: 2f 96 00 00 cmpwi cr7,r22,0 ffc0aef8: 41 9e 02 88 beq- cr7,ffc0b180 <_Objects_Extend_information+0x2e0><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { ffc0aefc: 80 09 00 00 lwz r0,0(r9) ffc0af00: 7d 6a 5b 78 mr r10,r11 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0af04: 7f 9e e3 78 mr r30,r28 index_base = minimum_index; block = 0; ffc0af08: 7e c9 03 a6 mtctr r22 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0af0c: 2f 80 00 00 cmpwi cr7,r0,0 * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0af10: 3b a0 00 00 li r29,0 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0af14: 40 be 00 14 bne+ cr7,ffc0af28 <_Objects_Extend_information+0x88><== ALWAYS TAKEN ffc0af18: 48 00 02 7c b ffc0b194 <_Objects_Extend_information+0x2f4><== NOT EXECUTED ffc0af1c: 84 09 00 04 lwzu r0,4(r9) ffc0af20: 2f 80 00 00 cmpwi cr7,r0,0 ffc0af24: 41 9e 01 f4 beq- cr7,ffc0b118 <_Objects_Extend_information+0x278> do_extend = false; break; } else index_base += information->allocation_size; ffc0af28: 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++ ) { ffc0af2c: 3b bd 00 01 addi r29,r29,1 ffc0af30: 42 00 ff ec bdnz+ ffc0af1c <_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; ffc0af34: 3b 20 00 01 li r25,1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc0af38: 7f 7b 52 14 add r27,r27,r10 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { ffc0af3c: 2b 9b ff ff cmplwi cr7,r27,65535 ffc0af40: 41 9d 01 a0 bgt- cr7,ffc0b0e0 <_Objects_Extend_information+0x240> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { ffc0af44: 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; ffc0af48: 80 7f 00 18 lwz r3,24(r31) if ( information->auto_extend ) { ffc0af4c: 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; ffc0af50: 7c 6a 19 d6 mullw r3,r10,r3 if ( information->auto_extend ) { ffc0af54: 41 9e 01 cc beq- cr7,ffc0b120 <_Objects_Extend_information+0x280> new_object_block = _Workspace_Allocate( block_size ); ffc0af58: 48 00 2b 71 bl ffc0dac8 <_Workspace_Allocate> if ( !new_object_block ) ffc0af5c: 7c 7a 1b 79 mr. r26,r3 ffc0af60: 41 82 01 80 beq- ffc0b0e0 <_Objects_Extend_information+0x240> } /* * Do we need to grow the tables? */ if ( do_extend ) { ffc0af64: 2f 99 00 00 cmpwi cr7,r25,0 ffc0af68: 41 9e 00 f4 beq- cr7,ffc0b05c <_Objects_Extend_information+0x1bc> */ /* * Up the block count and maximum */ block_count++; ffc0af6c: 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 *)) + ffc0af70: 1c 77 00 03 mulli r3,r23,3 ((maximum + minimum_index) * sizeof(Objects_Control *)); ffc0af74: 7c 7b 1a 14 add r3,r27,r3 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc0af78: 7c 63 e2 14 add r3,r3,r28 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); ffc0af7c: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0af80: 48 00 2b 49 bl ffc0dac8 <_Workspace_Allocate> if ( !object_blocks ) { ffc0af84: 7c 78 1b 79 mr. r24,r3 ffc0af88: 41 82 02 18 beq- ffc0b1a0 <_Objects_Extend_information+0x300> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0af8c: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc0af90: 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); ffc0af94: 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 ) { ffc0af98: 7f 9c 00 40 cmplw cr7,r28,r0 ffc0af9c: 7e f9 ba 14 add r23,r25,r23 ffc0afa0: 41 9c 01 8c blt- cr7,ffc0b12c <_Objects_Extend_information+0x28c> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0afa4: 2f 9c 00 00 cmpwi cr7,r28,0 local_table[ index ] = NULL; ffc0afa8: 7f 89 03 a6 mtctr r28 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0afac: 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; ffc0afb0: 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++ ) { ffc0afb4: 41 9e 00 0c beq- cr7,ffc0afc0 <_Objects_Extend_information+0x120><== NEVER TAKEN local_table[ index ] = NULL; ffc0afb8: 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++ ) { ffc0afbc: 42 00 ff fc bdnz+ ffc0afb8 <_Objects_Extend_information+0x118> ffc0afc0: 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 ); ffc0afc4: a1 7f 00 14 lhz r11,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0afc8: 38 00 00 00 li r0,0 ffc0afcc: 7c 18 b1 2e stwx r0,r24,r22 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0afd0: 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 ; ffc0afd4: 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; ffc0afd8: 7c 19 b1 2e stwx r0,r25,r22 for ( index=index_base ; ffc0afdc: 40 9c 00 30 bge- cr7,ffc0b00c <_Objects_Extend_information+0x16c><== NEVER TAKEN ffc0afe0: 38 1e 00 01 addi r0,r30,1 ffc0afe4: 7f 80 58 40 cmplw cr7,r0,r11 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc0afe8: 57 c9 10 3a rlwinm r9,r30,2,0,29 ffc0afec: 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; ffc0aff0: 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 ; ffc0aff4: 7d 29 ba 14 add r9,r9,r23 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0aff8: 7d 69 03 a6 mtctr r11 ffc0affc: 38 00 00 00 li r0,0 ffc0b000: 41 9d 01 ac bgt- cr7,ffc0b1ac <_Objects_Extend_information+0x30c><== NEVER TAKEN ffc0b004: 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 ; ffc0b008: 42 00 ff fc bdnz+ ffc0b004 <_Objects_Extend_information+0x164> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0b00c: 7c 00 00 a6 mfmsr r0 ffc0b010: 7d 30 42 a6 mfsprg r9,0 ffc0b014: 7c 09 48 78 andc r9,r0,r9 ffc0b018: 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) | ffc0b01c: 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; ffc0b020: 57 7b 04 3e clrlwi r27,r27,16 information->maximum_id = _Objects_Build_id( ffc0b024: a1 3f 00 04 lhz r9,4(r31) ffc0b028: 55 6b c0 0e rlwinm r11,r11,24,0,7 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0b02c: 80 7f 00 34 lwz r3,52(r31) ffc0b030: 65 6b 00 01 oris r11,r11,1 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; ffc0b034: 93 3f 00 30 stw r25,48(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0b038: 55 29 d8 08 rlwinm r9,r9,27,0,4 ffc0b03c: 7d 69 4b 78 or r9,r11,r9 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; ffc0b040: 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) | ffc0b044: 7d 29 db 78 or r9,r9,r27 information->inactive_per_block = inactive_per_block; information->local_table = local_table; ffc0b048: 92 ff 00 1c stw r23,28(r31) information->maximum = (Objects_Maximum) maximum; ffc0b04c: b3 7f 00 10 sth r27,16(r31) information->maximum_id = _Objects_Build_id( ffc0b050: 91 3f 00 0c stw r9,12(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0b054: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); _Workspace_Free( old_tables ); ffc0b058: 48 00 2a a5 bl ffc0dafc <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0b05c: 81 3f 00 34 lwz r9,52(r31) ffc0b060: 57 bd 10 3a rlwinm r29,r29,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0b064: a0 bf 00 14 lhz r5,20(r31) ffc0b068: 38 61 00 08 addi r3,r1,8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0b06c: 7f 49 e9 2e stwx r26,r9,r29 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b070: 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( ffc0b074: 81 3f 00 34 lwz r9,52(r31) ffc0b078: 80 df 00 18 lwz r6,24(r31) ffc0b07c: 7c 89 e8 2e lwzx r4,r9,r29 ffc0b080: 48 00 51 3d bl ffc101bc <_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 ) { ffc0b084: 48 00 00 2c b ffc0b0b0 <_Objects_Extend_information+0x210> ffc0b088: 81 7f 00 00 lwz r11,0(r31) the_object->id = _Objects_Build_id( ffc0b08c: a0 1f 00 04 lhz r0,4(r31) ffc0b090: 55 6b c0 0e rlwinm r11,r11,24,0,7 ffc0b094: 65 6b 00 01 oris r11,r11,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0b098: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc0b09c: 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) | ffc0b0a0: 7c 00 f3 78 or r0,r0,r30 ffc0b0a4: 90 09 00 08 stw r0,8(r9) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc0b0a8: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b0ac: 4b ff f0 e5 bl ffc0a190 <_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 ) { ffc0b0b0: 38 61 00 08 addi r3,r1,8 ffc0b0b4: 4b ff f1 35 bl ffc0a1e8 <_Chain_Get> ffc0b0b8: 7c 69 1b 79 mr. r9,r3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b0bc: 7f 83 e3 78 mr r3,r28 ffc0b0c0: 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 ) { ffc0b0c4: 40 82 ff c4 bne+ ffc0b088 <_Objects_Extend_information+0x1e8> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0b0c8: a1 3f 00 2c lhz r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b0cc: a0 1f 00 14 lhz r0,20(r31) ffc0b0d0: 81 7f 00 30 lwz r11,48(r31) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0b0d4: 7d 20 4a 14 add r9,r0,r9 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b0d8: 7c 0b e9 2e stwx r0,r11,r29 information->inactive = ffc0b0dc: b1 3f 00 2c sth r9,44(r31) (Objects_Maximum)(information->inactive + information->allocation_size); } ffc0b0e0: 80 01 00 44 lwz r0,68(r1) ffc0b0e4: 82 c1 00 18 lwz r22,24(r1) ffc0b0e8: 7c 08 03 a6 mtlr r0 ffc0b0ec: 82 e1 00 1c lwz r23,28(r1) ffc0b0f0: 83 01 00 20 lwz r24,32(r1) ffc0b0f4: 83 21 00 24 lwz r25,36(r1) ffc0b0f8: 83 41 00 28 lwz r26,40(r1) ffc0b0fc: 83 61 00 2c lwz r27,44(r1) ffc0b100: 83 81 00 30 lwz r28,48(r1) ffc0b104: 83 a1 00 34 lwz r29,52(r1) ffc0b108: 83 c1 00 38 lwz r30,56(r1) ffc0b10c: 83 e1 00 3c lwz r31,60(r1) ffc0b110: 38 21 00 40 addi r1,r1,64 ffc0b114: 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; ffc0b118: 3b 20 00 00 li r25,0 ffc0b11c: 4b ff fe 1c b ffc0af38 <_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 ); ffc0b120: 48 00 2a 09 bl ffc0db28 <_Workspace_Allocate_or_fatal_error> ffc0b124: 7c 7a 1b 78 mr r26,r3 ffc0b128: 4b ff fe 3c b ffc0af64 <_Objects_Extend_information+0xc4> * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc0b12c: 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, ffc0b130: 80 9f 00 34 lwz r4,52(r31) ffc0b134: 7e c5 b3 78 mr r5,r22 ffc0b138: 48 00 87 61 bl ffc13898 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc0b13c: 80 9f 00 30 lwz r4,48(r31) ffc0b140: 7e c5 b3 78 mr r5,r22 ffc0b144: 7f 23 cb 78 mr r3,r25 ffc0b148: 48 00 87 51 bl ffc13898 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0b14c: 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, ffc0b150: 80 9f 00 1c lwz r4,28(r31) ffc0b154: 7e e3 bb 78 mr r3,r23 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0b158: 7c bc 2a 14 add r5,r28,r5 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0b15c: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0b160: 48 00 87 39 bl ffc13898 ffc0b164: 4b ff fe 60 b ffc0afc4 <_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 ) ffc0b168: a1 43 00 14 lhz r10,20(r3) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0b16c: 7f 9e e3 78 mr r30,r28 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; ffc0b170: 3b 20 00 01 li r25,1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b174: 3b a0 00 00 li r29,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; ffc0b178: 3a c0 00 00 li r22,0 ffc0b17c: 4b ff fd bc b ffc0af38 <_Objects_Extend_information+0x98> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0b180: 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 ); ffc0b184: 7f 9e e3 78 mr r30,r28 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; ffc0b188: 3b 20 00 01 li r25,1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b18c: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0b190: 4b ff fd a8 b ffc0af38 <_Objects_Extend_information+0x98><== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; ffc0b194: 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; ffc0b198: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0b19c: 4b ff fd 9c b ffc0af38 <_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 ); ffc0b1a0: 7f 43 d3 78 mr r3,r26 ffc0b1a4: 48 00 29 59 bl ffc0dafc <_Workspace_Free> return; ffc0b1a8: 4b ff ff 38 b ffc0b0e0 <_Objects_Extend_information+0x240> ffc0b1ac: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc0b1b0: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED ffc0b1b4: 4b ff fe 50 b ffc0b004 <_Objects_Extend_information+0x164><== NOT EXECUTED =============================================================================== ffc0b2a4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b2a4: 94 21 ff e8 stwu r1,-24(r1) ffc0b2a8: 7c 08 02 a6 mflr r0 ffc0b2ac: 93 c1 00 10 stw r30,16(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b2b0: 7c 9e 23 79 mr. r30,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b2b4: 93 a1 00 0c stw r29,12(r1) ffc0b2b8: 7c 7d 1b 78 mr r29,r3 ffc0b2bc: 93 e1 00 14 stw r31,20(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; ffc0b2c0: 3b e0 00 00 li r31,0 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b2c4: 90 01 00 1c stw r0,28(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b2c8: 41 82 00 4c beq- ffc0b314 <_Objects_Get_information+0x70> /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); ffc0b2cc: 48 00 55 11 bl ffc107dc <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) ffc0b2d0: 2c 03 00 00 cmpwi r3,0 ffc0b2d4: 41 82 00 40 beq- ffc0b314 <_Objects_Get_information+0x70> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc0b2d8: 7f 83 f0 40 cmplw cr7,r3,r30 ffc0b2dc: 41 9c 00 38 blt- cr7,ffc0b314 <_Objects_Get_information+0x70> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc0b2e0: 3d 20 00 00 lis r9,0 ffc0b2e4: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc0b2e8: 39 29 2b e0 addi r9,r9,11232 ffc0b2ec: 7d 29 e8 2e lwzx r9,r9,r29 ffc0b2f0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b2f4: 41 9e 00 20 beq- cr7,ffc0b314 <_Objects_Get_information+0x70><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc0b2f8: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0b2fc: 7f e9 f0 2e lwzx r31,r9,r30 if ( !info ) ffc0b300: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0b304: 41 9e 00 10 beq- cr7,ffc0b314 <_Objects_Get_information+0x70><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) ffc0b308: a0 1f 00 10 lhz r0,16(r31) ffc0b30c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b310: 41 9e 00 24 beq- cr7,ffc0b334 <_Objects_Get_information+0x90> return NULL; #endif return info; } ffc0b314: 80 01 00 1c lwz r0,28(r1) ffc0b318: 7f e3 fb 78 mr r3,r31 ffc0b31c: 83 a1 00 0c lwz r29,12(r1) ffc0b320: 7c 08 03 a6 mtlr r0 ffc0b324: 83 c1 00 10 lwz r30,16(r1) ffc0b328: 83 e1 00 14 lwz r31,20(r1) ffc0b32c: 38 21 00 18 addi r1,r1,24 ffc0b330: 4e 80 00 20 blr * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; ffc0b334: 3b e0 00 00 li r31,0 ffc0b338: 4b ff ff dc b ffc0b314 <_Objects_Get_information+0x70> =============================================================================== ffc0cf70 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0cf70: 94 21 ff d8 stwu r1,-40(r1) ffc0cf74: 7c 08 02 a6 mflr r0 ffc0cf78: 93 c1 00 20 stw r30,32(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0cf7c: 7c 9e 23 79 mr. r30,r4 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0cf80: 93 e1 00 24 stw r31,36(r1) ffc0cf84: 7c bf 2b 78 mr r31,r5 ffc0cf88: 90 01 00 2c stw r0,44(r1) ffc0cf8c: 93 a1 00 1c stw r29,28(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0cf90: 41 82 00 f8 beq- ffc0d088 <_Objects_Get_name_as_string+0x118> return NULL; if ( name == NULL ) ffc0cf94: 2f 85 00 00 cmpwi cr7,r5,0 ffc0cf98: 41 9e 00 c0 beq- cr7,ffc0d058 <_Objects_Get_name_as_string+0xe8> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0cf9c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cfa0: 7c 7d 1b 78 mr r29,r3 ffc0cfa4: 41 9e 00 d4 beq- cr7,ffc0d078 <_Objects_Get_name_as_string+0x108> information = _Objects_Get_information_id( tmpId ); ffc0cfa8: 7f a3 eb 78 mr r3,r29 ffc0cfac: 4b ff fe 91 bl ffc0ce3c <_Objects_Get_information_id> if ( !information ) ffc0cfb0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cfb4: 41 9e 00 d4 beq- cr7,ffc0d088 <_Objects_Get_name_as_string+0x118> return NULL; the_object = _Objects_Get( information, tmpId, &location ); ffc0cfb8: 7f a4 eb 78 mr r4,r29 ffc0cfbc: 38 a1 00 08 addi r5,r1,8 ffc0cfc0: 48 00 00 ed bl ffc0d0ac <_Objects_Get> switch ( location ) { ffc0cfc4: 80 01 00 08 lwz r0,8(r1) ffc0cfc8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cfcc: 40 9e 00 bc bne- cr7,ffc0d088 <_Objects_Get_name_as_string+0x118> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cfd0: 34 fe ff ff addic. r7,r30,-1 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; ffc0cfd4: 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'; ffc0cfd8: 98 01 00 10 stb r0,16(r1) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cfdc: 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; ffc0cfe0: 55 60 46 3e rlwinm r0,r11,8,24,31 lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0cfe4: 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; ffc0cfe8: 98 01 00 0c stb r0,12(r1) lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0cfec: 55 6a c2 3e rlwinm r10,r11,24,8,31 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cff0: 7c e9 03 a6 mtctr r7 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0cff4: 99 01 00 0d stb r8,13(r1) lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0cff8: 99 41 00 0e stb r10,14(r1) lname[ 3 ] = (u32_name >> 0) & 0xff; ffc0cffc: 99 61 00 0f stb r11,15(r1) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d000: 41 82 00 4c beq- ffc0d04c <_Objects_Get_name_as_string+0xdc><== NEVER TAKEN ffc0d004: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d008: 41 9e 00 44 beq- cr7,ffc0d04c <_Objects_Get_name_as_string+0xdc> ffc0d00c: 3d 00 00 00 lis r8,0 lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; ffc0d010: 39 41 00 0c addi r10,r1,12 ffc0d014: 39 08 27 ac addi r8,r8,10156 ffc0d018: 48 00 00 10 b ffc0d028 <_Objects_Get_name_as_string+0xb8> } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d01c: 8c 0a 00 01 lbzu r0,1(r10) ffc0d020: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d024: 41 9e 00 28 beq- cr7,ffc0d04c <_Objects_Get_name_as_string+0xdc> *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc0d028: 81 68 00 00 lwz r11,0(r8) ffc0d02c: 7d 6b 02 14 add r11,r11,r0 ffc0d030: 89 6b 00 01 lbz r11,1(r11) ffc0d034: 71 67 00 97 andi. r7,r11,151 ffc0d038: 40 82 00 08 bne- ffc0d040 <_Objects_Get_name_as_string+0xd0> ffc0d03c: 38 00 00 2a li r0,42 ffc0d040: 98 09 00 00 stb r0,0(r9) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d044: 39 29 00 01 addi r9,r9,1 ffc0d048: 42 00 ff d4 bdnz+ ffc0d01c <_Objects_Get_name_as_string+0xac> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; ffc0d04c: 38 00 00 00 li r0,0 ffc0d050: 98 09 00 00 stb r0,0(r9) _Thread_Enable_dispatch(); ffc0d054: 48 00 10 b5 bl ffc0e108 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } ffc0d058: 80 01 00 2c lwz r0,44(r1) ffc0d05c: 7f e3 fb 78 mr r3,r31 ffc0d060: 83 a1 00 1c lwz r29,28(r1) ffc0d064: 7c 08 03 a6 mtlr r0 ffc0d068: 83 c1 00 20 lwz r30,32(r1) ffc0d06c: 83 e1 00 24 lwz r31,36(r1) ffc0d070: 38 21 00 28 addi r1,r1,40 ffc0d074: 4e 80 00 20 blr return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0d078: 3d 20 00 00 lis r9,0 ffc0d07c: 81 29 32 24 lwz r9,12836(r9) ffc0d080: 83 a9 00 08 lwz r29,8(r9) ffc0d084: 4b ff ff 24 b ffc0cfa8 <_Objects_Get_name_as_string+0x38> _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc0d088: 80 01 00 2c lwz r0,44(r1) #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; ffc0d08c: 3b e0 00 00 li r31,0 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc0d090: 7f e3 fb 78 mr r3,r31 ffc0d094: 83 a1 00 1c lwz r29,28(r1) ffc0d098: 7c 08 03 a6 mtlr r0 ffc0d09c: 83 c1 00 20 lwz r30,32(r1) ffc0d0a0: 83 e1 00 24 lwz r31,36(r1) ffc0d0a4: 38 21 00 28 addi r1,r1,40 ffc0d0a8: 4e 80 00 20 blr =============================================================================== ffc0aeec <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc0aeec: 94 21 ff e8 stwu r1,-24(r1) ffc0aef0: 7c 08 02 a6 mflr r0 ffc0aef4: 93 c1 00 10 stw r30,16(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc0aef8: 7c 7e 1b 79 mr. r30,r3 return NULL; ffc0aefc: 38 60 00 00 li r3,0 Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc0af00: 93 81 00 08 stw r28,8(r1) ffc0af04: 7c dc 33 78 mr r28,r6 ffc0af08: 93 e1 00 14 stw r31,20(r1) ffc0af0c: 7c bf 2b 78 mr r31,r5 ffc0af10: 90 01 00 1c stw r0,28(r1) ffc0af14: 93 a1 00 0c stw r29,12(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc0af18: 41 82 00 58 beq- ffc0af70 <_Objects_Get_next+0x84> return NULL; if ( !location_p ) ffc0af1c: 2f 85 00 00 cmpwi cr7,r5,0 ffc0af20: 41 9e 00 50 beq- cr7,ffc0af70 <_Objects_Get_next+0x84> return NULL; if ( !next_id_p ) ffc0af24: 2f 86 00 00 cmpwi cr7,r6,0 ffc0af28: 41 9e 00 48 beq- cr7,ffc0af70 <_Objects_Get_next+0x84> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc0af2c: 54 80 04 3e clrlwi r0,r4,16 ffc0af30: 2f 80 00 00 cmpwi cr7,r0,0 next_id = information->minimum_id; else next_id = id; ffc0af34: 7c 9d 23 78 mr r29,r4 return NULL; if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc0af38: 41 9e 00 58 beq- cr7,ffc0af90 <_Objects_Get_next+0xa4> else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0af3c: a1 3e 00 10 lhz r9,16(r30) ffc0af40: 57 a0 04 3e clrlwi r0,r29,16 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0af44: 7f a4 eb 78 mr r4,r29 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0af48: 7f 89 00 40 cmplw cr7,r9,r0 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0af4c: 7f c3 f3 78 mr r3,r30 ffc0af50: 7f e5 fb 78 mr r5,r31 next_id++; ffc0af54: 3b bd 00 01 addi r29,r29,1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0af58: 41 9c 00 5c blt- cr7,ffc0afb4 <_Objects_Get_next+0xc8> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0af5c: 48 00 00 8d bl ffc0afe8 <_Objects_Get> next_id++; } while (*location_p != OBJECTS_LOCAL); ffc0af60: 80 1f 00 00 lwz r0,0(r31) ffc0af64: 2f 80 00 00 cmpwi cr7,r0,0 ffc0af68: 40 9e ff d4 bne+ cr7,ffc0af3c <_Objects_Get_next+0x50> *next_id_p = next_id; ffc0af6c: 93 bc 00 00 stw r29,0(r28) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } ffc0af70: 80 01 00 1c lwz r0,28(r1) ffc0af74: 83 81 00 08 lwz r28,8(r1) ffc0af78: 7c 08 03 a6 mtlr r0 ffc0af7c: 83 a1 00 0c lwz r29,12(r1) ffc0af80: 83 c1 00 10 lwz r30,16(r1) ffc0af84: 83 e1 00 14 lwz r31,20(r1) ffc0af88: 38 21 00 18 addi r1,r1,24 ffc0af8c: 4e 80 00 20 blr if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id; ffc0af90: 83 be 00 08 lwz r29,8(r30) *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0af94: 7f c3 f3 78 mr r3,r30 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0af98: a1 3e 00 10 lhz r9,16(r30) *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0af9c: 7f e5 fb 78 mr r5,r31 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0afa0: 57 a0 04 3e clrlwi r0,r29,16 ffc0afa4: 7f 89 00 40 cmplw cr7,r9,r0 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0afa8: 7f a4 eb 78 mr r4,r29 next_id++; ffc0afac: 3b bd 00 01 addi r29,r29,1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0afb0: 40 9c ff ac bge+ cr7,ffc0af5c <_Objects_Get_next+0x70> <== ALWAYS TAKEN { *location_p = OBJECTS_ERROR; ffc0afb4: 38 00 00 01 li r0,1 return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } ffc0afb8: 83 a1 00 0c lwz r29,12(r1) do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; ffc0afbc: 90 1f 00 00 stw r0,0(r31) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc0afc0: 38 00 ff ff li r0,-1 return 0; ffc0afc4: 38 60 00 00 li r3,0 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc0afc8: 90 1c 00 00 stw r0,0(r28) return 0; } ffc0afcc: 80 01 00 1c lwz r0,28(r1) ffc0afd0: 83 81 00 08 lwz r28,8(r1) ffc0afd4: 7c 08 03 a6 mtlr r0 ffc0afd8: 83 c1 00 10 lwz r30,16(r1) ffc0afdc: 83 e1 00 14 lwz r31,20(r1) ffc0afe0: 38 21 00 18 addi r1,r1,24 ffc0afe4: 4e 80 00 20 blr =============================================================================== ffc0bed0 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0bed0: 94 21 ff e0 stwu r1,-32(r1) ffc0bed4: 7c 08 02 a6 mflr r0 ffc0bed8: 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; ffc0bedc: 7c 60 1b 79 mr. r0,r3 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0bee0: 93 c1 00 18 stw r30,24(r1) ffc0bee4: 7c 9e 23 78 mr r30,r4 ffc0bee8: 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; ffc0beec: 40 82 00 10 bne- ffc0befc <_Objects_Id_to_name+0x2c> ffc0bef0: 3d 20 00 00 lis r9,0 ffc0bef4: 81 29 2e 24 lwz r9,11812(r9) ffc0bef8: 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); ffc0befc: 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 ) ffc0bf00: 39 69 ff ff addi r11,r9,-1 ffc0bf04: 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; ffc0bf08: 3b e0 00 03 li r31,3 ffc0bf0c: 41 9d 00 50 bgt- cr7,ffc0bf5c <_Objects_Id_to_name+0x8c> if ( !_Objects_Information_table[ the_api ] ) ffc0bf10: 3d 60 00 00 lis r11,0 ffc0bf14: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0bf18: 39 6b 2c 40 addi r11,r11,11328 ffc0bf1c: 7d 2b 48 2e lwzx r9,r11,r9 ffc0bf20: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bf24: 41 9e 00 38 beq- cr7,ffc0bf5c <_Objects_Id_to_name+0x8c> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc0bf28: 54 0b 3e 7a rlwinm r11,r0,7,25,29 ffc0bf2c: 7c 69 58 2e lwzx r3,r9,r11 if ( !information ) ffc0bf30: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bf34: 41 9e 00 28 beq- cr7,ffc0bf5c <_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 ); ffc0bf38: 7c 04 03 78 mr r4,r0 ffc0bf3c: 38 a1 00 08 addi r5,r1,8 ffc0bf40: 4b ff fe f1 bl ffc0be30 <_Objects_Get> if ( !the_object ) ffc0bf44: 2c 03 00 00 cmpwi r3,0 ffc0bf48: 41 82 00 14 beq- ffc0bf5c <_Objects_Id_to_name+0x8c> return OBJECTS_INVALID_ID; *name = the_object->name; ffc0bf4c: 80 03 00 0c lwz r0,12(r3) _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0bf50: 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; ffc0bf54: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0bf58: 48 00 0f dd bl ffc0cf34 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc0bf5c: 80 01 00 24 lwz r0,36(r1) ffc0bf60: 7f e3 fb 78 mr r3,r31 ffc0bf64: 83 c1 00 18 lwz r30,24(r1) ffc0bf68: 7c 08 03 a6 mtlr r0 ffc0bf6c: 83 e1 00 1c lwz r31,28(r1) ffc0bf70: 38 21 00 20 addi r1,r1,32 ffc0bf74: 4e 80 00 20 blr =============================================================================== ffc0b5bc <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b5bc: 94 21 ff e8 stwu r1,-24(r1) ffc0b5c0: 7c 08 02 a6 mflr r0 ffc0b5c4: 90 01 00 1c stw r0,28(r1) ffc0b5c8: 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) / ffc0b5cc: 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 ); ffc0b5d0: a3 e3 00 0a lhz r31,10(r3) block_count = (information->maximum - index_base) / ffc0b5d4: a0 03 00 14 lhz r0,20(r3) ffc0b5d8: 7d 5f 50 50 subf r10,r31,r10 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b5dc: 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) / ffc0b5e0: 7d 4a 03 96 divwu r10,r10,r0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b5e4: 93 a1 00 0c stw r29,12(r1) ffc0b5e8: 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++ ) { ffc0b5ec: 2f 8a 00 00 cmpwi cr7,r10,0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b5f0: 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++ ) { ffc0b5f4: 41 9e 00 3c beq- cr7,ffc0b630 <_Objects_Shrink_information+0x74><== NEVER TAKEN if ( information->inactive_per_block[ block ] == ffc0b5f8: 81 63 00 30 lwz r11,48(r3) ffc0b5fc: 81 2b 00 00 lwz r9,0(r11) ffc0b600: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b604: 41 9e 00 4c beq- cr7,ffc0b650 <_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++ ) { ffc0b608: 39 20 00 00 li r9,0 ffc0b60c: 7d 49 03 a6 mtctr r10 ffc0b610: 48 00 00 18 b ffc0b628 <_Objects_Shrink_information+0x6c> if ( information->inactive_per_block[ block ] == ffc0b614: 85 4b 00 04 lwzu r10,4(r11) information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0b618: 7f ff 02 14 add r31,r31,r0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == ffc0b61c: 55 3d 10 3a rlwinm r29,r9,2,0,29 ffc0b620: 7f 80 50 00 cmpw cr7,r0,r10 ffc0b624: 41 9e 00 30 beq- cr7,ffc0b654 <_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++ ) { ffc0b628: 39 29 00 01 addi r9,r9,1 ffc0b62c: 42 00 ff e8 bdnz+ ffc0b614 <_Objects_Shrink_information+0x58> return; } index_base += information->allocation_size; } } ffc0b630: 80 01 00 1c lwz r0,28(r1) ffc0b634: 83 81 00 08 lwz r28,8(r1) ffc0b638: 7c 08 03 a6 mtlr r0 ffc0b63c: 83 a1 00 0c lwz r29,12(r1) ffc0b640: 83 c1 00 10 lwz r30,16(r1) ffc0b644: 83 e1 00 14 lwz r31,20(r1) ffc0b648: 38 21 00 18 addi r1,r1,24 ffc0b64c: 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 ] == ffc0b650: 3b a0 00 00 li r29,0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0b654: 80 7c 00 20 lwz r3,32(r28) ffc0b658: 48 00 00 10 b ffc0b668 <_Objects_Shrink_information+0xac> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0b65c: 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; ffc0b660: 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 ); ffc0b664: 41 9e 00 34 beq- cr7,ffc0b698 <_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 ); ffc0b668: 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; ffc0b66c: 83 c3 00 00 lwz r30,0(r3) if ((index >= index_base) && ffc0b670: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0b674: 41 bc ff e8 blt- cr7,ffc0b65c <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { ffc0b678: a1 3c 00 14 lhz r9,20(r28) ffc0b67c: 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) && ffc0b680: 7f 80 48 40 cmplw cr7,r0,r9 ffc0b684: 40 9c ff d8 bge+ cr7,ffc0b65c <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); ffc0b688: 4b ff eb 39 bl ffc0a1c0 <_Chain_Extract> } } while ( the_object ); ffc0b68c: 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; ffc0b690: 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 ); ffc0b694: 40 9e ff d4 bne+ cr7,ffc0b668 <_Objects_Shrink_information+0xac><== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc0b698: 81 3c 00 34 lwz r9,52(r28) ffc0b69c: 7c 69 e8 2e lwzx r3,r9,r29 ffc0b6a0: 48 00 24 5d bl ffc0dafc <_Workspace_Free> information->object_blocks[ block ] = NULL; ffc0b6a4: 81 3c 00 34 lwz r9,52(r28) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0b6a8: a1 7c 00 2c lhz r11,44(r28) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0b6ac: 7f c9 e9 2e stwx r30,r9,r29 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0b6b0: a0 1c 00 14 lhz r0,20(r28) * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; ffc0b6b4: 81 3c 00 30 lwz r9,48(r28) information->inactive -= information->allocation_size; ffc0b6b8: 7c 00 58 50 subf r0,r0,r11 return; } index_base += information->allocation_size; } } ffc0b6bc: 83 e1 00 14 lwz r31,20(r1) * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; ffc0b6c0: 7f c9 e9 2e stwx r30,r9,r29 information->inactive -= information->allocation_size; ffc0b6c4: b0 1c 00 2c sth r0,44(r28) return; } index_base += information->allocation_size; } } ffc0b6c8: 80 01 00 1c lwz r0,28(r1) ffc0b6cc: 83 81 00 08 lwz r28,8(r1) ffc0b6d0: 7c 08 03 a6 mtlr r0 ffc0b6d4: 83 a1 00 0c lwz r29,12(r1) ffc0b6d8: 83 c1 00 10 lwz r30,16(r1) ffc0b6dc: 38 21 00 18 addi r1,r1,24 ffc0b6e0: 4e 80 00 20 blr =============================================================================== ffc117b4 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc117b4: 94 21 ff e8 stwu r1,-24(r1) ffc117b8: 7c 08 02 a6 mflr r0 ffc117bc: 93 c1 00 10 stw r30,16(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; ffc117c0: 7c 9e 23 79 mr. r30,r4 */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc117c4: 93 81 00 08 stw r28,8(r1) ffc117c8: 7c 7c 1b 78 mr r28,r3 ffc117cc: 90 01 00 1c stw r0,28(r1) ffc117d0: 93 a1 00 0c stw r29,12(r1) ffc117d4: 93 e1 00 14 stw r31,20(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; ffc117d8: 41 82 01 10 beq- ffc118e8 <_RBTree_Extract_unprotected+0x134> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { ffc117dc: 80 03 00 08 lwz r0,8(r3) ffc117e0: 7f 80 f0 00 cmpw cr7,r0,r30 ffc117e4: 41 9e 01 68 beq- cr7,ffc1194c <_RBTree_Extract_unprotected+0x198> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { ffc117e8: 80 1c 00 0c lwz r0,12(r28) ffc117ec: 7f 80 f0 00 cmpw cr7,r0,r30 ffc117f0: 41 9e 01 28 beq- cr7,ffc11918 <_RBTree_Extract_unprotected+0x164> * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { ffc117f4: 83 fe 00 04 lwz r31,4(r30) ffc117f8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc117fc: 41 9e 01 38 beq- cr7,ffc11934 <_RBTree_Extract_unprotected+0x180> ffc11800: 80 1e 00 08 lwz r0,8(r30) ffc11804: 2f 80 00 00 cmpwi cr7,r0,0 ffc11808: 40 be 00 0c bne+ cr7,ffc11814 <_RBTree_Extract_unprotected+0x60> ffc1180c: 48 00 01 54 b ffc11960 <_RBTree_Extract_unprotected+0x1ac> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; ffc11810: 7c 1f 03 78 mr r31,r0 ffc11814: 80 1f 00 08 lwz r0,8(r31) ffc11818: 2f 80 00 00 cmpwi cr7,r0,0 ffc1181c: 40 9e ff f4 bne+ cr7,ffc11810 <_RBTree_Extract_unprotected+0x5c> * target's position (target is the right child of target->parent) * when target vacates it. if there is no child, then target->parent * should become NULL. This may cause the coloring to be violated. * For now we store the color of the node being deleted in victim_color. */ leaf = target->child[RBT_LEFT]; ffc11820: 83 bf 00 04 lwz r29,4(r31) if(leaf) { ffc11824: 2f 9d 00 00 cmpwi cr7,r29,0 ffc11828: 41 9e 01 a0 beq- cr7,ffc119c8 <_RBTree_Extract_unprotected+0x214> leaf->parent = target->parent; ffc1182c: 80 1f 00 00 lwz r0,0(r31) ffc11830: 90 1d 00 00 stw r0,0(r29) } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; ffc11834: 81 5f 00 00 lwz r10,0(r31) target->parent->child[dir] = leaf; /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; ffc11838: 81 7e 00 00 lwz r11,0(r30) } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; ffc1183c: 80 0a 00 04 lwz r0,4(r10) leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; ffc11840: 81 3f 00 0c lwz r9,12(r31) dir = target != target->parent->child[0]; ffc11844: 7f e0 02 78 xor r0,r31,r0 ffc11848: 7c 00 00 34 cntlzw r0,r0 ffc1184c: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc11850: 68 00 00 01 xori r0,r0,1 target->parent->child[dir] = leaf; ffc11854: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc11858: 7d 4a 02 14 add r10,r10,r0 ffc1185c: 93 aa 00 04 stw r29,4(r10) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; ffc11860: 80 0b 00 04 lwz r0,4(r11) ffc11864: 7f c0 02 78 xor r0,r30,r0 ffc11868: 7c 00 00 34 cntlzw r0,r0 ffc1186c: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc11870: 68 00 00 01 xori r0,r0,1 the_node->parent->child[dir] = target; ffc11874: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc11878: 7d 6b 02 14 add r11,r11,r0 ffc1187c: 93 eb 00 04 stw r31,4(r11) /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; ffc11880: 80 1e 00 08 lwz r0,8(r30) ffc11884: 90 1f 00 08 stw r0,8(r31) if (the_node->child[RBT_RIGHT]) ffc11888: 81 7e 00 08 lwz r11,8(r30) ffc1188c: 2f 8b 00 00 cmpwi cr7,r11,0 ffc11890: 41 9e 00 08 beq- cr7,ffc11898 <_RBTree_Extract_unprotected+0xe4><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; ffc11894: 93 eb 00 00 stw r31,0(r11) target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; ffc11898: 80 1e 00 04 lwz r0,4(r30) ffc1189c: 90 1f 00 04 stw r0,4(r31) if (the_node->child[RBT_LEFT]) ffc118a0: 81 7e 00 04 lwz r11,4(r30) ffc118a4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc118a8: 41 9e 00 08 beq- cr7,ffc118b0 <_RBTree_Extract_unprotected+0xfc> the_node->child[RBT_LEFT]->parent = target; ffc118ac: 93 eb 00 00 stw r31,0(r11) /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; ffc118b0: 81 7e 00 00 lwz r11,0(r30) target->color = the_node->color; ffc118b4: 80 1e 00 0c lwz r0,12(r30) /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; ffc118b8: 91 7f 00 00 stw r11,0(r31) target->color = the_node->color; ffc118bc: 90 1f 00 0c stw r0,12(r31) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ ffc118c0: 2f 89 00 00 cmpwi cr7,r9,0 ffc118c4: 41 9e 00 44 beq- cr7,ffc11908 <_RBTree_Extract_unprotected+0x154> /* Wipe the_node */ _RBTree_Set_off_rbtree(the_node); /* set root to black, if it exists */ if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK; ffc118c8: 81 3c 00 04 lwz r9,4(r28) */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; ffc118cc: 38 00 00 00 li r0,0 ffc118d0: 90 1e 00 08 stw r0,8(r30) ffc118d4: 2f 89 00 00 cmpwi cr7,r9,0 ffc118d8: 90 1e 00 04 stw r0,4(r30) ffc118dc: 90 1e 00 00 stw r0,0(r30) ffc118e0: 41 9e 00 08 beq- cr7,ffc118e8 <_RBTree_Extract_unprotected+0x134> ffc118e4: 90 09 00 0c stw r0,12(r9) } ffc118e8: 80 01 00 1c lwz r0,28(r1) ffc118ec: 83 81 00 08 lwz r28,8(r1) ffc118f0: 7c 08 03 a6 mtlr r0 ffc118f4: 83 a1 00 0c lwz r29,12(r1) ffc118f8: 83 c1 00 10 lwz r30,16(r1) ffc118fc: 83 e1 00 14 lwz r31,20(r1) ffc11900: 38 21 00 18 addi r1,r1,24 ffc11904: 4e 80 00 20 blr * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ if (leaf) { ffc11908: 2f 9d 00 00 cmpwi cr7,r29,0 ffc1190c: 41 be ff bc beq- cr7,ffc118c8 <_RBTree_Extract_unprotected+0x114> leaf->color = RBT_BLACK; /* case 2 */ ffc11910: 91 3d 00 0c stw r9,12(r29) ffc11914: 4b ff ff b4 b ffc118c8 <_RBTree_Extract_unprotected+0x114> the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) ffc11918: 80 1e 00 04 lwz r0,4(r30) ffc1191c: 2f 80 00 00 cmpwi cr7,r0,0 ffc11920: 41 9e 00 90 beq- cr7,ffc119b0 <_RBTree_Extract_unprotected+0x1fc> the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; ffc11924: 90 1c 00 0c stw r0,12(r28) * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { ffc11928: 83 fe 00 04 lwz r31,4(r30) ffc1192c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc11930: 40 9e fe d0 bne+ cr7,ffc11800 <_RBTree_Extract_unprotected+0x4c> * the_node's location in the tree. This may cause the coloring to be * violated. We will fix it later. * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; ffc11934: 83 be 00 08 lwz r29,8(r30) if( leaf ) { ffc11938: 2f 9d 00 00 cmpwi cr7,r29,0 ffc1193c: 40 be 00 28 bne+ cr7,ffc11964 <_RBTree_Extract_unprotected+0x1b0> leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); ffc11940: 7f c3 f3 78 mr r3,r30 ffc11944: 4b ff fb 75 bl ffc114b8 <_RBTree_Extract_validate_unprotected> ffc11948: 48 00 00 24 b ffc1196c <_RBTree_Extract_unprotected+0x1b8> if (!the_node) return; /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) ffc1194c: 80 1e 00 08 lwz r0,8(r30) ffc11950: 2f 80 00 00 cmpwi cr7,r0,0 ffc11954: 41 9e 00 44 beq- cr7,ffc11998 <_RBTree_Extract_unprotected+0x1e4> the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; ffc11958: 90 1c 00 08 stw r0,8(r28) ffc1195c: 4b ff fe 8c b ffc117e8 <_RBTree_Extract_unprotected+0x34> * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { ffc11960: 7f fd fb 78 mr r29,r31 * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; ffc11964: 80 1e 00 00 lwz r0,0(r30) ffc11968: 90 1d 00 00 stw r0,0(r29) _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; ffc1196c: 81 7e 00 00 lwz r11,0(r30) leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; ffc11970: 81 3e 00 0c lwz r9,12(r30) /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; ffc11974: 80 0b 00 04 lwz r0,4(r11) ffc11978: 7f c0 02 78 xor r0,r30,r0 ffc1197c: 7c 00 00 34 cntlzw r0,r0 ffc11980: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc11984: 68 00 00 01 xori r0,r0,1 the_node->parent->child[dir] = leaf; ffc11988: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc1198c: 7d 6b 02 14 add r11,r11,r0 ffc11990: 93 ab 00 04 stw r29,4(r11) ffc11994: 4b ff ff 2c b ffc118c0 <_RBTree_Extract_unprotected+0x10c> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; ffc11998: 81 3e 00 00 lwz r9,0(r30) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc1199c: 7f 83 48 00 cmpw cr7,r3,r9 /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; ffc119a0: 91 23 00 08 stw r9,8(r3) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc119a4: 40 9e fe 44 bne+ cr7,ffc117e8 <_RBTree_Extract_unprotected+0x34> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; ffc119a8: 90 1c 00 08 stw r0,8(r28) ffc119ac: 4b ff fe 3c b ffc117e8 <_RBTree_Extract_unprotected+0x34> /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; ffc119b0: 81 3e 00 00 lwz r9,0(r30) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc119b4: 7f 9c 48 00 cmpw cr7,r28,r9 /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; ffc119b8: 91 3c 00 0c stw r9,12(r28) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc119bc: 40 9e fe 38 bne+ cr7,ffc117f4 <_RBTree_Extract_unprotected+0x40> the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; ffc119c0: 90 1c 00 0c stw r0,12(r28) ffc119c4: 4b ff ff 64 b ffc11928 <_RBTree_Extract_unprotected+0x174> leaf = target->child[RBT_LEFT]; if(leaf) { leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); ffc119c8: 7f e3 fb 78 mr r3,r31 ffc119cc: 4b ff fa ed bl ffc114b8 <_RBTree_Extract_validate_unprotected> ffc119d0: 4b ff fe 64 b ffc11834 <_RBTree_Extract_unprotected+0x80> =============================================================================== ffc114b8 <_RBTree_Extract_validate_unprotected>: ) { RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; ffc114b8: 81 23 00 00 lwz r9,0(r3) if(!parent->parent) return; ffc114bc: 80 09 00 00 lwz r0,0(r9) ffc114c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc114c4: 4d 9e 00 20 beqlr cr7 { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) ffc114c8: 81 69 00 04 lwz r11,4(r9) ffc114cc: 7f 83 58 00 cmpw cr7,r3,r11 ffc114d0: 41 9e 02 dc beq- cr7,ffc117ac <_RBTree_Extract_validate_unprotected+0x2f4> * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; ffc114d4: 38 80 00 00 li r4,0 } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; ffc114d8: 38 e0 00 01 li r7,1 ffc114dc: 48 00 00 94 b ffc11570 <_RBTree_Extract_validate_unprotected+0xb8> if(!parent->parent) return; sibling = _RBTree_Sibling(the_node); /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { ffc114e0: 81 49 00 00 lwz r10,0(r9) ffc114e4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc114e8: 41 9e 00 94 beq- cr7,ffc1157c <_RBTree_Extract_validate_unprotected+0xc4> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc114ec: 2f 8b 00 00 cmpwi cr7,r11,0 ffc114f0: 41 9e 00 10 beq- cr7,ffc11500 <_RBTree_Extract_validate_unprotected+0x48><== NEVER TAKEN ffc114f4: 80 0b 00 0c lwz r0,12(r11) ffc114f8: 2f 80 00 01 cmpwi cr7,r0,1 ffc114fc: 41 9e 00 98 beq- cr7,ffc11594 <_RBTree_Extract_validate_unprotected+0xdc> _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && ffc11500: 81 4b 00 08 lwz r10,8(r11) ffc11504: 2f 8a 00 00 cmpwi cr7,r10,0 ffc11508: 41 9e 00 10 beq- cr7,ffc11518 <_RBTree_Extract_validate_unprotected+0x60> ffc1150c: 80 0a 00 0c lwz r0,12(r10) ffc11510: 2f 80 00 01 cmpwi cr7,r0,1 ffc11514: 41 9e 01 40 beq- cr7,ffc11654 <_RBTree_Extract_validate_unprotected+0x19c> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { ffc11518: 81 4b 00 04 lwz r10,4(r11) ffc1151c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc11520: 41 9e 00 10 beq- cr7,ffc11530 <_RBTree_Extract_validate_unprotected+0x78> ffc11524: 80 0a 00 0c lwz r0,12(r10) ffc11528: 2f 80 00 01 cmpwi cr7,r0,1 ffc1152c: 41 9e 01 28 beq- cr7,ffc11654 <_RBTree_Extract_validate_unprotected+0x19c> sibling->color = RBT_RED; ffc11530: 90 eb 00 0c stw r7,12(r11) ffc11534: 80 09 00 0c lwz r0,12(r9) ffc11538: 2f 80 00 01 cmpwi cr7,r0,1 ffc1153c: 41 9e 00 f4 beq- cr7,ffc11630 <_RBTree_Extract_validate_unprotected+0x178> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; ffc11540: 81 49 00 00 lwz r10,0(r9) RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc11544: 39 60 00 00 li r11,0 ffc11548: 2f 8a 00 00 cmpwi cr7,r10,0 ffc1154c: 41 9e 00 1c beq- cr7,ffc11568 <_RBTree_Extract_validate_unprotected+0xb0><== NEVER TAKEN if(!(the_node->parent->parent)) return NULL; ffc11550: 80 0a 00 00 lwz r0,0(r10) ffc11554: 2f 80 00 00 cmpwi cr7,r0,0 ffc11558: 41 9e 00 10 beq- cr7,ffc11568 <_RBTree_Extract_validate_unprotected+0xb0> if(the_node == the_node->parent->child[RBT_LEFT]) ffc1155c: 81 6a 00 04 lwz r11,4(r10) ffc11560: 7f 89 58 00 cmpw cr7,r9,r11 ffc11564: 41 9e 00 e8 beq- cr7,ffc1164c <_RBTree_Extract_validate_unprotected+0x194> c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; the_node->parent = c; ffc11568: 7d 23 4b 78 mr r3,r9 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc1156c: 7d 49 53 78 mr r9,r10 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc11570: 80 03 00 0c lwz r0,12(r3) ffc11574: 2f 80 00 01 cmpwi cr7,r0,1 ffc11578: 40 9e ff 68 bne+ cr7,ffc114e0 <_RBTree_Extract_validate_unprotected+0x28> sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc1157c: 81 23 00 00 lwz r9,0(r3) ffc11580: 80 09 00 00 lwz r0,0(r9) ffc11584: 2f 80 00 00 cmpwi cr7,r0,0 ffc11588: 4c be 00 20 bnelr+ cr7 ffc1158c: 90 03 00 0c stw r0,12(r3) ffc11590: 4e 80 00 20 blr * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; ffc11594: 81 09 00 04 lwz r8,4(r9) * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; ffc11598: 90 09 00 0c stw r0,12(r9) sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; ffc1159c: 7c 60 42 78 xor r0,r3,r8 ffc115a0: 7c 00 00 34 cntlzw r0,r0 * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; ffc115a4: 90 8b 00 0c stw r4,12(r11) dir = the_node != parent->child[0]; ffc115a8: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc115ac: 68 00 00 01 xori r0,r0,1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc115b0: 20 c0 00 01 subfic r6,r0,1 ffc115b4: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc115b8: 7c c9 32 14 add r6,r9,r6 ffc115bc: 81 06 00 04 lwz r8,4(r6) ffc115c0: 2f 88 00 00 cmpwi cr7,r8,0 ffc115c4: 41 9e 00 58 beq- cr7,ffc1161c <_RBTree_Extract_validate_unprotected+0x164><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc115c8: 54 0b 10 3a rlwinm r11,r0,2,0,29 ffc115cc: 7c a8 5a 14 add r5,r8,r11 ffc115d0: 81 85 00 04 lwz r12,4(r5) ffc115d4: 91 86 00 04 stw r12,4(r6) if (c->child[dir]) ffc115d8: 80 c5 00 04 lwz r6,4(r5) ffc115dc: 2f 86 00 00 cmpwi cr7,r6,0 ffc115e0: 41 9e 00 0c beq- cr7,ffc115ec <_RBTree_Extract_validate_unprotected+0x134><== NEVER TAKEN c->child[dir]->parent = the_node; ffc115e4: 91 26 00 00 stw r9,0(r6) ffc115e8: 81 49 00 00 lwz r10,0(r9) c->child[dir] = the_node; ffc115ec: 7d 68 5a 14 add r11,r8,r11 the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; ffc115f0: 91 48 00 00 stw r10,0(r8) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc115f4: 91 2b 00 04 stw r9,4(r11) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc115f8: 81 6a 00 04 lwz r11,4(r10) c->parent = the_node->parent; the_node->parent = c; ffc115fc: 91 09 00 00 stw r8,0(r9) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc11600: 7d 2b 5a 78 xor r11,r9,r11 ffc11604: 7d 6b 00 34 cntlzw r11,r11 ffc11608: 55 6b d9 7e rlwinm r11,r11,27,5,31 ffc1160c: 69 6b 00 01 xori r11,r11,1 ffc11610: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc11614: 7d 4a 5a 14 add r10,r10,r11 ffc11618: 91 0a 00 04 stw r8,4(r10) _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; ffc1161c: 68 00 00 01 xori r0,r0,1 ffc11620: 54 0b 10 3a rlwinm r11,r0,2,0,29 ffc11624: 7d 69 5a 14 add r11,r9,r11 ffc11628: 81 6b 00 04 lwz r11,4(r11) ffc1162c: 4b ff fe d4 b ffc11500 <_RBTree_Extract_validate_unprotected+0x48> /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; ffc11630: 38 00 00 00 li r0,0 ffc11634: 90 09 00 0c stw r0,12(r9) sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc11638: 81 23 00 00 lwz r9,0(r3) ffc1163c: 80 09 00 00 lwz r0,0(r9) ffc11640: 2f 80 00 00 cmpwi cr7,r0,0 ffc11644: 4c be 00 20 bnelr+ cr7 ffc11648: 4b ff ff 44 b ffc1158c <_RBTree_Extract_validate_unprotected+0xd4><== NOT EXECUTED if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; ffc1164c: 81 6a 00 08 lwz r11,8(r10) ffc11650: 4b ff ff 18 b ffc11568 <_RBTree_Extract_validate_unprotected+0xb0> * cases, either the_node is to the left or the right of the parent. * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; ffc11654: 80 09 00 04 lwz r0,4(r9) ffc11658: 7c 60 02 78 xor r0,r3,r0 ffc1165c: 7c 00 00 34 cntlzw r0,r0 ffc11660: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc11664: 68 00 00 01 xori r0,r0,1 if (!_RBTree_Is_red(sibling->child[!dir])) { ffc11668: 68 0a 00 01 xori r10,r0,1 ffc1166c: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc11670: 7d 0b 52 14 add r8,r11,r10 ffc11674: 81 08 00 04 lwz r8,4(r8) */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc11678: 2f 88 00 00 cmpwi cr7,r8,0 ffc1167c: 41 9e 00 10 beq- cr7,ffc1168c <_RBTree_Extract_validate_unprotected+0x1d4> ffc11680: 80 e8 00 0c lwz r7,12(r8) ffc11684: 2f 87 00 01 cmpwi cr7,r7,1 ffc11688: 41 9e 00 a0 beq- cr7,ffc11728 <_RBTree_Extract_validate_unprotected+0x270> sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); ffc1168c: 68 06 00 01 xori r6,r0,1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc11690: 20 e6 00 01 subfic r7,r6,1 ffc11694: 54 e7 10 3a rlwinm r7,r7,2,0,29 ffc11698: 7c eb 3a 14 add r7,r11,r7 ffc1169c: 81 07 00 04 lwz r8,4(r7) * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; ffc116a0: 54 05 10 3a rlwinm r5,r0,2,0,29 ffc116a4: 7c ab 2a 14 add r5,r11,r5 ffc116a8: 2f 88 00 00 cmpwi cr7,r8,0 ffc116ac: 80 a5 00 04 lwz r5,4(r5) * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; ffc116b0: 38 80 00 01 li r4,1 ffc116b4: 90 8b 00 0c stw r4,12(r11) sibling->child[dir]->color = RBT_BLACK; ffc116b8: 38 80 00 00 li r4,0 ffc116bc: 90 85 00 0c stw r4,12(r5) ffc116c0: 41 9e 00 58 beq- cr7,ffc11718 <_RBTree_Extract_validate_unprotected+0x260><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc116c4: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc116c8: 7c a8 32 14 add r5,r8,r6 ffc116cc: 80 85 00 04 lwz r4,4(r5) ffc116d0: 90 87 00 04 stw r4,4(r7) if (c->child[dir]) ffc116d4: 80 e5 00 04 lwz r7,4(r5) ffc116d8: 2f 87 00 00 cmpwi cr7,r7,0 ffc116dc: 41 9e 00 08 beq- cr7,ffc116e4 <_RBTree_Extract_validate_unprotected+0x22c> c->child[dir]->parent = the_node; ffc116e0: 91 67 00 00 stw r11,0(r7) c->child[dir] = the_node; ffc116e4: 7c e8 32 14 add r7,r8,r6 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc116e8: 80 cb 00 00 lwz r6,0(r11) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc116ec: 91 67 00 04 stw r11,4(r7) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc116f0: 80 e6 00 04 lwz r7,4(r6) c->parent = the_node->parent; ffc116f4: 90 c8 00 00 stw r6,0(r8) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc116f8: 7d 67 3a 78 xor r7,r11,r7 ffc116fc: 7c e7 00 34 cntlzw r7,r7 c->parent = the_node->parent; the_node->parent = c; ffc11700: 91 0b 00 00 stw r8,0(r11) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc11704: 54 e7 d9 7e rlwinm r7,r7,27,5,31 ffc11708: 68 e7 00 01 xori r7,r7,1 ffc1170c: 54 e7 10 3a rlwinm r7,r7,2,0,29 ffc11710: 7c c6 3a 14 add r6,r6,r7 ffc11714: 91 06 00 04 stw r8,4(r6) _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; ffc11718: 7d 69 52 14 add r11,r9,r10 ffc1171c: 81 6b 00 04 lwz r11,4(r11) ffc11720: 7d 4b 52 14 add r10,r11,r10 ffc11724: 81 0a 00 04 lwz r8,4(r10) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc11728: 20 c0 00 01 subfic r6,r0,1 } sibling->color = parent->color; ffc1172c: 80 a9 00 0c lwz r5,12(r9) ffc11730: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc11734: 7c c9 32 14 add r6,r9,r6 ffc11738: 90 ab 00 0c stw r5,12(r11) parent->color = RBT_BLACK; ffc1173c: 38 e0 00 00 li r7,0 ffc11740: 81 46 00 04 lwz r10,4(r6) ffc11744: 90 e9 00 0c stw r7,12(r9) ffc11748: 2f 8a 00 00 cmpwi cr7,r10,0 sibling->child[!dir]->color = RBT_BLACK; ffc1174c: 90 e8 00 0c stw r7,12(r8) ffc11750: 41 be fe 2c beq- cr7,ffc1157c <_RBTree_Extract_validate_unprotected+0xc4><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc11754: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc11758: 7d 6a 02 14 add r11,r10,r0 ffc1175c: 81 0b 00 04 lwz r8,4(r11) ffc11760: 91 06 00 04 stw r8,4(r6) if (c->child[dir]) ffc11764: 81 6b 00 04 lwz r11,4(r11) ffc11768: 2f 8b 00 00 cmpwi cr7,r11,0 ffc1176c: 41 9e 00 08 beq- cr7,ffc11774 <_RBTree_Extract_validate_unprotected+0x2bc> c->child[dir]->parent = the_node; ffc11770: 91 2b 00 00 stw r9,0(r11) c->child[dir] = the_node; ffc11774: 7d 0a 02 14 add r8,r10,r0 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc11778: 81 69 00 00 lwz r11,0(r9) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc1177c: 91 28 00 04 stw r9,4(r8) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc11780: 80 0b 00 04 lwz r0,4(r11) c->parent = the_node->parent; ffc11784: 91 6a 00 00 stw r11,0(r10) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc11788: 7d 20 02 78 xor r0,r9,r0 ffc1178c: 7c 00 00 34 cntlzw r0,r0 c->parent = the_node->parent; the_node->parent = c; ffc11790: 91 49 00 00 stw r10,0(r9) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc11794: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc11798: 68 00 00 01 xori r0,r0,1 ffc1179c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc117a0: 7d 6b 02 14 add r11,r11,r0 ffc117a4: 91 4b 00 04 stw r10,4(r11) ffc117a8: 4b ff fd d4 b ffc1157c <_RBTree_Extract_validate_unprotected+0xc4> if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; ffc117ac: 81 69 00 08 lwz r11,8(r9) ffc117b0: 4b ff fd 24 b ffc114d4 <_RBTree_Extract_validate_unprotected+0x1c> =============================================================================== ffc0c76c <_RBTree_Find>: RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { ffc0c76c: 94 21 ff e0 stwu r1,-32(r1) ffc0c770: 7c 08 02 a6 mflr r0 ffc0c774: 90 01 00 24 stw r0,36(r1) ffc0c778: 93 a1 00 14 stw r29,20(r1) ffc0c77c: 7c 9d 23 78 mr r29,r4 ffc0c780: 93 c1 00 18 stw r30,24(r1) ffc0c784: 7c 7e 1b 78 mr r30,r3 ffc0c788: 93 61 00 0c stw r27,12(r1) ffc0c78c: 93 81 00 10 stw r28,16(r1) ffc0c790: 93 e1 00 1c stw r31,28(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c794: 7f 60 00 a6 mfmsr r27 ffc0c798: 7c 10 42 a6 mfsprg r0,0 ffc0c79c: 7f 60 00 78 andc r0,r27,r0 ffc0c7a0: 7c 00 01 24 mtmsr r0 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; ffc0c7a4: 83 e3 00 04 lwz r31,4(r3) RBTree_Node* found = NULL; ffc0c7a8: 3b 80 00 00 li r28,0 int compare_result; while (iter_node) { ffc0c7ac: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0c7b0: 41 9e 00 50 beq- cr7,ffc0c800 <_RBTree_Find+0x94> <== NEVER TAKEN compare_result = the_rbtree->compare_function(the_node, iter_node); ffc0c7b4: 80 1e 00 10 lwz r0,16(r30) ffc0c7b8: 7f e4 fb 78 mr r4,r31 ffc0c7bc: 7f a3 eb 78 mr r3,r29 ffc0c7c0: 7c 09 03 a6 mtctr r0 ffc0c7c4: 4e 80 04 21 bctrl if (compare_result == 0) { ffc0c7c8: 2c 03 00 00 cmpwi r3,0 found = iter_node; if ( the_rbtree->is_unique ) break; } RBTree_Direction dir = (compare_result == 1); ffc0c7cc: 68 63 00 01 xori r3,r3,1 ffc0c7d0: 7c 63 00 34 cntlzw r3,r3 ffc0c7d4: 54 63 d9 7e rlwinm r3,r3,27,5,31 iter_node = iter_node->child[dir]; ffc0c7d8: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0c7dc: 7c 7f 1a 14 add r3,r31,r3 RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if (compare_result == 0) { ffc0c7e0: 40 82 00 14 bne- ffc0c7f4 <_RBTree_Find+0x88> found = iter_node; if ( the_rbtree->is_unique ) ffc0c7e4: 88 1e 00 14 lbz r0,20(r30) ffc0c7e8: 7f fc fb 78 mr r28,r31 ffc0c7ec: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c7f0: 40 9e 00 3c bne- cr7,ffc0c82c <_RBTree_Find+0xc0> break; } RBTree_Direction dir = (compare_result == 1); iter_node = iter_node->child[dir]; ffc0c7f4: 83 e3 00 04 lwz r31,4(r3) ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { ffc0c7f8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0c7fc: 40 9e ff b8 bne+ cr7,ffc0c7b4 <_RBTree_Find+0x48> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c800: 7f 60 01 24 mtmsr r27 return_node = NULL; _ISR_Disable( level ); return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); return return_node; } ffc0c804: 80 01 00 24 lwz r0,36(r1) ffc0c808: 7f 83 e3 78 mr r3,r28 ffc0c80c: 83 61 00 0c lwz r27,12(r1) ffc0c810: 7c 08 03 a6 mtlr r0 ffc0c814: 83 81 00 10 lwz r28,16(r1) ffc0c818: 83 a1 00 14 lwz r29,20(r1) ffc0c81c: 83 c1 00 18 lwz r30,24(r1) ffc0c820: 83 e1 00 1c lwz r31,28(r1) ffc0c824: 38 21 00 20 addi r1,r1,32 ffc0c828: 4e 80 00 20 blr compare_result = the_rbtree->compare_function(the_node, iter_node); if (compare_result == 0) { found = iter_node; if ( the_rbtree->is_unique ) ffc0c82c: 7f fc fb 78 mr r28,r31 ffc0c830: 7f 60 01 24 mtmsr r27 ffc0c834: 80 01 00 24 lwz r0,36(r1) ffc0c838: 7f 83 e3 78 mr r3,r28 ffc0c83c: 83 61 00 0c lwz r27,12(r1) ffc0c840: 7c 08 03 a6 mtlr r0 ffc0c844: 83 81 00 10 lwz r28,16(r1) ffc0c848: 83 a1 00 14 lwz r29,20(r1) ffc0c84c: 83 c1 00 18 lwz r30,24(r1) ffc0c850: 83 e1 00 1c lwz r31,28(r1) ffc0c854: 38 21 00 20 addi r1,r1,32 ffc0c858: 4e 80 00 20 blr =============================================================================== ffc0cbc8 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { ffc0cbc8: 94 21 ff e0 stwu r1,-32(r1) ffc0cbcc: 7c 08 02 a6 mflr r0 ffc0cbd0: 93 e1 00 1c stw r31,28(r1) size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; ffc0cbd4: 7c 7f 1b 79 mr. r31,r3 void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { ffc0cbd8: 93 c1 00 18 stw r30,24(r1) ffc0cbdc: 7c fe 3b 78 mr r30,r7 ffc0cbe0: 90 01 00 24 stw r0,36(r1) ffc0cbe4: 93 a1 00 14 stw r29,20(r1) ffc0cbe8: 90 c1 00 08 stw r6,8(r1) size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; ffc0cbec: 41 82 00 4c beq- ffc0cc38 <_RBTree_Initialize+0x70> <== NEVER TAKEN /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { ffc0cbf0: 2f 86 00 00 cmpwi cr7,r6,0 { the_rbtree->permanent_null = NULL; the_rbtree->root = NULL; the_rbtree->first[0] = NULL; the_rbtree->first[1] = NULL; the_rbtree->compare_function = compare_function; ffc0cbf4: 90 9f 00 10 stw r4,16(r31) RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; ffc0cbf8: 38 00 00 00 li r0,0 ffc0cbfc: 90 1f 00 00 stw r0,0(r31) the_rbtree->root = NULL; ffc0cc00: 90 1f 00 04 stw r0,4(r31) the_rbtree->first[0] = NULL; ffc0cc04: 90 1f 00 08 stw r0,8(r31) the_rbtree->first[1] = NULL; ffc0cc08: 90 1f 00 0c stw r0,12(r31) the_rbtree->compare_function = compare_function; the_rbtree->is_unique = is_unique; ffc0cc0c: 99 1f 00 14 stb r8,20(r31) ffc0cc10: 41 9e 00 28 beq- cr7,ffc0cc38 <_RBTree_Initialize+0x70> <== NEVER TAKEN /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; ffc0cc14: 7c bd 2b 78 mr r29,r5 while ( count-- ) { _RBTree_Insert(the_rbtree, next); ffc0cc18: 7f a4 eb 78 mr r4,r29 ffc0cc1c: 7f e3 fb 78 mr r3,r31 ffc0cc20: 4b ff ff 95 bl ffc0cbb4 <_RBTree_Insert> /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { ffc0cc24: 80 01 00 08 lwz r0,8(r1) * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( ffc0cc28: 7f bd f2 14 add r29,r29,r30 /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { ffc0cc2c: 35 20 ff ff addic. r9,r0,-1 ffc0cc30: 91 21 00 08 stw r9,8(r1) ffc0cc34: 40 82 ff e4 bne+ ffc0cc18 <_RBTree_Initialize+0x50> _RBTree_Insert(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } ffc0cc38: 80 01 00 24 lwz r0,36(r1) ffc0cc3c: 83 a1 00 14 lwz r29,20(r1) ffc0cc40: 7c 08 03 a6 mtlr r0 ffc0cc44: 83 c1 00 18 lwz r30,24(r1) ffc0cc48: 83 e1 00 1c lwz r31,28(r1) ffc0cc4c: 38 21 00 20 addi r1,r1,32 ffc0cc50: 4e 80 00 20 blr =============================================================================== ffc11a10 <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { ffc11a10: 94 21 ff f0 stwu r1,-16(r1) /* ensure node is on the same branch direction as parent */ if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; ffc11a14: 38 a0 00 00 li r5,0 g->color = RBT_RED; ffc11a18: 39 80 00 01 li r12,1 * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { ffc11a1c: 93 e1 00 0c stw r31,12(r1) ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } ffc11a20: 81 23 00 00 lwz r9,0(r3) */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; ffc11a24: 81 69 00 00 lwz r11,0(r9) ffc11a28: 2f 8b 00 00 cmpwi cr7,r11,0 ffc11a2c: 7d 68 5b 78 mr r8,r11 ffc11a30: 41 9e 01 70 beq- cr7,ffc11ba0 <_RBTree_Validate_insert_unprotected+0x190> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc11a34: 80 09 00 0c lwz r0,12(r9) ffc11a38: 2f 80 00 01 cmpwi cr7,r0,1 ffc11a3c: 41 9e 00 10 beq- cr7,ffc11a4c <_RBTree_Validate_insert_unprotected+0x3c> /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; } ffc11a40: 83 e1 00 0c lwz r31,12(r1) ffc11a44: 38 21 00 10 addi r1,r1,16 ffc11a48: 4e 80 00 20 blr ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(!(the_node->parent->parent->parent)) return NULL; ffc11a4c: 80 0b 00 00 lwz r0,0(r11) ffc11a50: 2f 80 00 00 cmpwi cr7,r0,0 ffc11a54: 80 0b 00 04 lwz r0,4(r11) ffc11a58: 41 9e 00 24 beq- cr7,ffc11a7c <_RBTree_Validate_insert_unprotected+0x6c><== NEVER TAKEN { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) ffc11a5c: 7f 89 00 00 cmpw cr7,r9,r0 ffc11a60: 7c 0a 03 78 mr r10,r0 ffc11a64: 41 9e 01 6c beq- cr7,ffc11bd0 <_RBTree_Validate_insert_unprotected+0x1c0> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc11a68: 2f 8a 00 00 cmpwi cr7,r10,0 ffc11a6c: 41 9e 00 10 beq- cr7,ffc11a7c <_RBTree_Validate_insert_unprotected+0x6c> ffc11a70: 80 ea 00 0c lwz r7,12(r10) ffc11a74: 2f 87 00 01 cmpwi cr7,r7,1 ffc11a78: 41 9e 01 38 beq- cr7,ffc11bb0 <_RBTree_Validate_insert_unprotected+0x1a0> the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; ffc11a7c: 81 49 00 04 lwz r10,4(r9) RBTree_Direction pdir = the_node->parent != g->child[0]; ffc11a80: 7d 20 02 78 xor r0,r9,r0 ffc11a84: 7c 00 00 34 cntlzw r0,r0 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; ffc11a88: 7c 6a 52 78 xor r10,r3,r10 ffc11a8c: 7d 4a 00 34 cntlzw r10,r10 ffc11a90: 55 4a d9 7e rlwinm r10,r10,27,5,31 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc11a94: 54 00 d9 7e rlwinm r0,r0,27,5,31 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; ffc11a98: 69 4a 00 01 xori r10,r10,1 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc11a9c: 68 00 00 01 xori r0,r0,1 /* ensure node is on the same branch direction as parent */ if (dir != pdir) { ffc11aa0: 7f 8a 00 00 cmpw cr7,r10,r0 ffc11aa4: 41 9e 01 20 beq- cr7,ffc11bc4 <_RBTree_Validate_insert_unprotected+0x1b4> RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc11aa8: 20 c0 00 01 subfic r6,r0,1 ffc11aac: 54 ca 10 3a rlwinm r10,r6,2,0,29 ffc11ab0: 7d 49 52 14 add r10,r9,r10 ffc11ab4: 80 ea 00 04 lwz r7,4(r10) ffc11ab8: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc11abc: 2f 87 00 00 cmpwi cr7,r7,0 ffc11ac0: 41 9e 00 54 beq- cr7,ffc11b14 <_RBTree_Validate_insert_unprotected+0x104><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc11ac4: 7c 87 02 14 add r4,r7,r0 ffc11ac8: 83 e4 00 04 lwz r31,4(r4) ffc11acc: 93 ea 00 04 stw r31,4(r10) if (c->child[dir]) ffc11ad0: 81 44 00 04 lwz r10,4(r4) ffc11ad4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc11ad8: 41 9e 00 0c beq- cr7,ffc11ae4 <_RBTree_Validate_insert_unprotected+0xd4> c->child[dir]->parent = the_node; ffc11adc: 91 2a 00 00 stw r9,0(r10) ffc11ae0: 81 69 00 00 lwz r11,0(r9) c->child[dir] = the_node; ffc11ae4: 7d 47 02 14 add r10,r7,r0 the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; ffc11ae8: 91 67 00 00 stw r11,0(r7) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc11aec: 91 2a 00 04 stw r9,4(r10) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc11af0: 81 4b 00 04 lwz r10,4(r11) c->parent = the_node->parent; the_node->parent = c; ffc11af4: 90 e9 00 00 stw r7,0(r9) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc11af8: 7d 2a 52 78 xor r10,r9,r10 ffc11afc: 7d 4a 00 34 cntlzw r10,r10 ffc11b00: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc11b04: 69 4a 00 01 xori r10,r10,1 ffc11b08: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc11b0c: 7d 6b 52 14 add r11,r11,r10 ffc11b10: 90 eb 00 04 stw r7,4(r11) _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; ffc11b14: 7c 63 02 14 add r3,r3,r0 ffc11b18: 80 63 00 04 lwz r3,4(r3) ffc11b1c: 81 23 00 00 lwz r9,0(r3) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc11b20: 7d 48 02 14 add r10,r8,r0 } the_node->parent->color = RBT_BLACK; ffc11b24: 90 a9 00 0c stw r5,12(r9) ffc11b28: 81 6a 00 04 lwz r11,4(r10) g->color = RBT_RED; ffc11b2c: 91 88 00 0c stw r12,12(r8) ffc11b30: 2f 8b 00 00 cmpwi cr7,r11,0 ffc11b34: 41 be fe ec beq- cr7,ffc11a20 <_RBTree_Validate_insert_unprotected+0x10><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc11b38: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc11b3c: 7d 2b 32 14 add r9,r11,r6 ffc11b40: 80 09 00 04 lwz r0,4(r9) ffc11b44: 90 0a 00 04 stw r0,4(r10) if (c->child[dir]) ffc11b48: 81 29 00 04 lwz r9,4(r9) ffc11b4c: 2f 89 00 00 cmpwi cr7,r9,0 ffc11b50: 41 9e 00 08 beq- cr7,ffc11b58 <_RBTree_Validate_insert_unprotected+0x148> c->child[dir]->parent = the_node; ffc11b54: 91 09 00 00 stw r8,0(r9) c->child[dir] = the_node; ffc11b58: 7c cb 32 14 add r6,r11,r6 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc11b5c: 81 28 00 00 lwz r9,0(r8) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc11b60: 91 06 00 04 stw r8,4(r6) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc11b64: 80 09 00 04 lwz r0,4(r9) c->parent = the_node->parent; ffc11b68: 91 2b 00 00 stw r9,0(r11) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc11b6c: 7d 00 02 78 xor r0,r8,r0 ffc11b70: 7c 00 00 34 cntlzw r0,r0 c->parent = the_node->parent; the_node->parent = c; ffc11b74: 91 68 00 00 stw r11,0(r8) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc11b78: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc11b7c: 68 00 00 01 xori r0,r0,1 ffc11b80: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc11b84: 7d 29 02 14 add r9,r9,r0 ffc11b88: 91 69 00 04 stw r11,4(r9) ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } ffc11b8c: 81 23 00 00 lwz r9,0(r3) */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; ffc11b90: 81 69 00 00 lwz r11,0(r9) ffc11b94: 2f 8b 00 00 cmpwi cr7,r11,0 ffc11b98: 7d 68 5b 78 mr r8,r11 ffc11b9c: 40 9e fe 98 bne+ cr7,ffc11a34 <_RBTree_Validate_insert_unprotected+0x24><== ALWAYS TAKEN /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; } ffc11ba0: 83 e1 00 0c lwz r31,12(r1) ffc11ba4: 38 21 00 10 addi r1,r1,16 /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc11ba8: 91 63 00 0c stw r11,12(r3) } ffc11bac: 4e 80 00 20 blr u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; ffc11bb0: 90 a9 00 0c stw r5,12(r9) u->color = RBT_BLACK; g->color = RBT_RED; ffc11bb4: 7d 63 5b 78 mr r3,r11 g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; ffc11bb8: 90 aa 00 0c stw r5,12(r10) g->color = RBT_RED; ffc11bbc: 90 eb 00 0c stw r7,12(r11) ffc11bc0: 4b ff fe 60 b ffc11a20 <_RBTree_Validate_insert_unprotected+0x10> } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { ffc11bc4: 20 ca 00 01 subfic r6,r10,1 ffc11bc8: 55 40 10 3a rlwinm r0,r10,2,0,29 ffc11bcc: 4b ff ff 54 b ffc11b20 <_RBTree_Validate_insert_unprotected+0x110> if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; ffc11bd0: 81 4b 00 08 lwz r10,8(r11) ffc11bd4: 4b ff fe 94 b ffc11a68 <_RBTree_Validate_insert_unprotected+0x58> =============================================================================== ffc098e4 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc098e4: 94 21 ff d8 stwu r1,-40(r1) ffc098e8: 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; ffc098ec: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc098f0: 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; ffc098f4: 39 29 20 44 addi r9,r9,8260 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc098f8: 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; ffc098fc: 83 e9 00 2c lwz r31,44(r9) * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09900: 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 ) ffc09904: 2f 9f 00 00 cmpwi cr7,r31,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09908: 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; ffc0990c: 83 a9 00 28 lwz r29,40(r9) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc09910: 41 9e 00 5c beq- cr7,ffc0996c <_RTEMS_tasks_Initialize_user_tasks_body+0x88> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc09914: 2f 9d 00 00 cmpwi cr7,r29,0 ffc09918: 41 9e 00 54 beq- cr7,ffc0996c <_RTEMS_tasks_Initialize_user_tasks_body+0x88><== NEVER TAKEN ffc0991c: 3b c0 00 00 li r30,0 return_value = rtems_task_create( ffc09920: 80 bf 00 04 lwz r5,4(r31) ffc09924: 39 01 00 08 addi r8,r1,8 ffc09928: 80 7f 00 00 lwz r3,0(r31) ffc0992c: 80 9f 00 08 lwz r4,8(r31) ffc09930: 80 df 00 14 lwz r6,20(r31) ffc09934: 80 ff 00 0c lwz r7,12(r31) ffc09938: 4b ff fd 0d bl ffc09644 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) ffc0993c: 7c 65 1b 79 mr. r5,r3 ffc09940: 40 82 00 48 bne- ffc09988 <_RTEMS_tasks_Initialize_user_tasks_body+0xa4> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( ffc09944: 80 bf 00 18 lwz r5,24(r31) ffc09948: 80 61 00 08 lwz r3,8(r1) ffc0994c: 80 9f 00 10 lwz r4,16(r31) ffc09950: 48 00 00 45 bl ffc09994 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) ffc09954: 7c 65 1b 79 mr. r5,r3 ffc09958: 40 82 00 30 bne- ffc09988 <_RTEMS_tasks_Initialize_user_tasks_body+0xa4> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc0995c: 3b de 00 01 addi r30,r30,1 ffc09960: 7f 9e e8 00 cmpw cr7,r30,r29 ffc09964: 3b ff 00 1c addi r31,r31,28 ffc09968: 40 9e ff b8 bne+ cr7,ffc09920 <_RTEMS_tasks_Initialize_user_tasks_body+0x3c><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } ffc0996c: 80 01 00 2c lwz r0,44(r1) ffc09970: 83 a1 00 1c lwz r29,28(r1) ffc09974: 7c 08 03 a6 mtlr r0 ffc09978: 83 c1 00 20 lwz r30,32(r1) ffc0997c: 83 e1 00 24 lwz r31,36(r1) ffc09980: 38 21 00 28 addi r1,r1,40 ffc09984: 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 ); ffc09988: 38 60 00 01 li r3,1 ffc0998c: 38 80 00 01 li r4,1 ffc09990: 48 00 13 d5 bl ffc0ad64 <_Internal_error_Occurred> =============================================================================== ffc0fe5c <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0fe5c: 94 21 ff e0 stwu r1,-32(r1) ffc0fe60: 7c 08 02 a6 mflr r0 ffc0fe64: 90 01 00 24 stw r0,36(r1) ffc0fe68: 93 e1 00 1c stw r31,28(r1) RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0fe6c: 83 e3 01 2c lwz r31,300(r3) */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0fe70: 93 c1 00 18 stw r30,24(r1) ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; if ( !api ) ffc0fe74: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0fe78: 41 9e 00 7c beq- cr7,ffc0fef4 <_RTEMS_tasks_Post_switch_extension+0x98><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0fe7c: 7c 00 00 a6 mfmsr r0 ffc0fe80: 7d 30 42 a6 mfsprg r9,0 ffc0fe84: 7c 09 48 78 andc r9,r0,r9 ffc0fe88: 7d 20 01 24 mtmsr r9 asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; asr->signals_posted = 0; ffc0fe8c: 39 20 00 00 li r9,0 */ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; ffc0fe90: 83 df 00 14 lwz r30,20(r31) asr->signals_posted = 0; ffc0fe94: 91 3f 00 14 stw r9,20(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0fe98: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ ffc0fe9c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0fea0: 41 be 00 54 beq+ cr7,ffc0fef4 <_RTEMS_tasks_Post_switch_extension+0x98> return; asr->nest_level += 1; ffc0fea4: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0fea8: 38 80 00 00 li r4,0 ffc0feac: 80 7f 00 10 lwz r3,16(r31) ffc0feb0: 60 84 ff ff ori r4,r4,65535 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc0feb4: 38 09 00 01 addi r0,r9,1 ffc0feb8: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0febc: 38 a1 00 08 addi r5,r1,8 ffc0fec0: 48 00 26 6d bl ffc1252c (*asr->handler)( signal_set ); ffc0fec4: 80 1f 00 0c lwz r0,12(r31) ffc0fec8: 7f c3 f3 78 mr r3,r30 ffc0fecc: 7c 09 03 a6 mtctr r0 ffc0fed0: 4e 80 04 21 bctrl asr->nest_level -= 1; ffc0fed4: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0fed8: 38 80 00 00 li r4,0 ffc0fedc: 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; ffc0fee0: 38 09 ff ff addi r0,r9,-1 ffc0fee4: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0fee8: 60 84 ff ff ori r4,r4,65535 ffc0feec: 38 a1 00 08 addi r5,r1,8 ffc0fef0: 48 00 26 3d bl ffc1252c } ffc0fef4: 80 01 00 24 lwz r0,36(r1) ffc0fef8: 83 c1 00 18 lwz r30,24(r1) ffc0fefc: 7c 08 03 a6 mtlr r0 ffc0ff00: 83 e1 00 1c lwz r31,28(r1) ffc0ff04: 38 21 00 20 addi r1,r1,32 ffc0ff08: 4e 80 00 20 blr =============================================================================== ffc0fdcc <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; ffc0fdcc: 81 23 01 38 lwz r9,312(r3) while (tvp) { ffc0fdd0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fdd4: 41 9e 00 24 beq- cr7,ffc0fdf8 <_RTEMS_tasks_Switch_extension+0x2c> tvp->tval = *tvp->ptr; ffc0fdd8: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->gval; ffc0fddc: 80 09 00 08 lwz r0,8(r9) * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; ffc0fde0: 81 4b 00 00 lwz r10,0(r11) ffc0fde4: 91 49 00 0c stw r10,12(r9) *tvp->ptr = tvp->gval; ffc0fde8: 90 0b 00 00 stw r0,0(r11) tvp = (rtems_task_variable_t *)tvp->next; ffc0fdec: 81 29 00 00 lwz r9,0(r9) /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { ffc0fdf0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fdf4: 40 9e ff e4 bne+ cr7,ffc0fdd8 <_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; ffc0fdf8: 81 24 01 38 lwz r9,312(r4) while (tvp) { ffc0fdfc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fe00: 4d 9e 00 20 beqlr cr7 tvp->gval = *tvp->ptr; ffc0fe04: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->tval; ffc0fe08: 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; ffc0fe0c: 81 4b 00 00 lwz r10,0(r11) ffc0fe10: 91 49 00 08 stw r10,8(r9) *tvp->ptr = tvp->tval; ffc0fe14: 90 0b 00 00 stw r0,0(r11) tvp = (rtems_task_variable_t *)tvp->next; ffc0fe18: 81 29 00 00 lwz r9,0(r9) *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { ffc0fe1c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fe20: 40 9e ff e4 bne+ cr7,ffc0fe04 <_RTEMS_tasks_Switch_extension+0x38><== NEVER TAKEN ffc0fe24: 4e 80 00 20 blr =============================================================================== ffc0a8c8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc0a8c8: 94 21 ff e0 stwu r1,-32(r1) ffc0a8cc: 7c 08 02 a6 mflr r0 ffc0a8d0: 7c 64 1b 78 mr r4,r3 ffc0a8d4: 3c 60 00 00 lis r3,0 ffc0a8d8: 90 01 00 24 stw r0,36(r1) ffc0a8dc: 38 63 2c 00 addi r3,r3,11264 ffc0a8e0: 38 a1 00 08 addi r5,r1,8 ffc0a8e4: 93 e1 00 1c stw r31,28(r1) ffc0a8e8: 48 00 27 69 bl ffc0d050 <_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 ) { ffc0a8ec: 80 01 00 08 lwz r0,8(r1) ffc0a8f0: 7c 7f 1b 78 mr r31,r3 ffc0a8f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a8f8: 40 9e 00 4c bne- cr7,ffc0a944 <_Rate_monotonic_Timeout+0x7c><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; ffc0a8fc: 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); ffc0a900: 80 03 00 10 lwz r0,16(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc0a904: 70 09 40 00 andi. r9,r0,16384 ffc0a908: 41 82 00 14 beq- ffc0a91c <_Rate_monotonic_Timeout+0x54> ffc0a90c: 81 23 00 20 lwz r9,32(r3) ffc0a910: 80 1f 00 08 lwz r0,8(r31) ffc0a914: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a918: 41 9e 00 6c beq- cr7,ffc0a984 <_Rate_monotonic_Timeout+0xbc> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { ffc0a91c: 80 1f 00 38 lwz r0,56(r31) ffc0a920: 2f 80 00 01 cmpwi cr7,r0,1 ffc0a924: 41 9e 00 34 beq- cr7,ffc0a958 <_Rate_monotonic_Timeout+0x90> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; ffc0a928: 38 00 00 04 li r0,4 ffc0a92c: 90 1f 00 38 stw r0,56(r31) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc0a930: 3d 20 00 00 lis r9,0 ffc0a934: 81 69 28 08 lwz r11,10248(r9) ffc0a938: 38 0b ff ff addi r0,r11,-1 ffc0a93c: 90 09 28 08 stw r0,10248(r9) return _Thread_Dispatch_disable_level; ffc0a940: 80 09 28 08 lwz r0,10248(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc0a944: 80 01 00 24 lwz r0,36(r1) ffc0a948: 83 e1 00 1c lwz r31,28(r1) ffc0a94c: 38 21 00 20 addi r1,r1,32 ffc0a950: 7c 08 03 a6 mtlr r0 ffc0a954: 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; ffc0a958: 38 00 00 03 li r0,3 ffc0a95c: 90 1f 00 38 stw r0,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc0a960: 7f e3 fb 78 mr r3,r31 ffc0a964: 4b ff f7 89 bl ffc0a0ec <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a968: 80 1f 00 3c lwz r0,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a96c: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a970: 90 1f 00 1c stw r0,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a974: 38 63 2d c8 addi r3,r3,11720 ffc0a978: 38 9f 00 10 addi r4,r31,16 ffc0a97c: 48 00 4b 15 bl ffc0f490 <_Watchdog_Insert> ffc0a980: 4b ff ff b0 b ffc0a930 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0a984: 3c 80 10 03 lis r4,4099 ffc0a988: 60 84 ff f8 ori r4,r4,65528 ffc0a98c: 48 00 32 99 bl ffc0dc24 <_Thread_Clear_state> ffc0a990: 4b ff ff d0 b ffc0a960 <_Rate_monotonic_Timeout+0x98> =============================================================================== ffc0c23c <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { ffc0c23c: 94 21 ff f0 stwu r1,-16(r1) ffc0c240: 7c 08 02 a6 mflr r0 ffc0c244: 93 e1 00 0c stw r31,12(r1) ffc0c248: 7c 7f 1b 78 mr r31,r3 void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); ffc0c24c: 38 60 00 18 li r3,24 #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { ffc0c250: 90 01 00 14 stw r0,20(r1) void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); ffc0c254: 48 00 25 2d bl ffc0e780 <_Workspace_Allocate> if ( sched ) { ffc0c258: 2c 03 00 00 cmpwi r3,0 ffc0c25c: 41 82 00 14 beq- ffc0c270 <_Scheduler_EDF_Allocate+0x34><== NEVER TAKEN the_thread->scheduler_info = sched; schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; ffc0c260: 38 00 00 02 li r0,2 Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); if ( sched ) { the_thread->scheduler_info = sched; ffc0c264: 90 7f 00 8c stw r3,140(r31) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; ffc0c268: 93 e3 00 00 stw r31,0(r3) schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; ffc0c26c: 90 03 00 14 stw r0,20(r3) } return sched; } ffc0c270: 80 01 00 14 lwz r0,20(r1) ffc0c274: 83 e1 00 0c lwz r31,12(r1) ffc0c278: 38 21 00 10 addi r1,r1,16 ffc0c27c: 7c 08 03 a6 mtlr r0 ffc0c280: 4e 80 00 20 blr =============================================================================== ffc0c284 <_Scheduler_EDF_Block>: #include void _Scheduler_EDF_Block( Thread_Control *the_thread ) { ffc0c284: 94 21 ff f0 stwu r1,-16(r1) ffc0c288: 7c 08 02 a6 mflr r0 ffc0c28c: 93 c1 00 08 stw r30,8(r1) RTEMS_INLINE_ROUTINE bool _Thread_Is_heir ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Heir ); ffc0c290: 3f c0 00 00 lis r30,0 ffc0c294: 3b de 2e 38 addi r30,r30,11832 ffc0c298: 90 01 00 14 stw r0,20(r1) ffc0c29c: 93 e1 00 0c stw r31,12(r1) ffc0c2a0: 7c 7f 1b 78 mr r31,r3 _Scheduler_EDF_Extract( the_thread ); ffc0c2a4: 48 00 00 bd bl ffc0c360 <_Scheduler_EDF_Extract> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) ffc0c2a8: 80 1e 00 10 lwz r0,16(r30) ffc0c2ac: 7f 9f 00 00 cmpw cr7,r31,r0 ffc0c2b0: 41 9e 00 48 beq- cr7,ffc0c2f8 <_Scheduler_EDF_Block+0x74><== ALWAYS TAKEN _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) ffc0c2b4: 80 1e 00 0c lwz r0,12(r30) ffc0c2b8: 7f 9f 00 00 cmpw cr7,r31,r0 ffc0c2bc: 41 9e 00 1c beq- cr7,ffc0c2d8 <_Scheduler_EDF_Block+0x54><== ALWAYS TAKEN _Thread_Dispatch_necessary = true; } ffc0c2c0: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc0c2c4: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc0c2c8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0c2cc: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc0c2d0: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0c2d4: 4e 80 00 20 blr <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; ffc0c2d8: 38 00 00 01 li r0,1 } ffc0c2dc: 83 e1 00 0c lwz r31,12(r1) if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; ffc0c2e0: 98 1e 00 18 stb r0,24(r30) } ffc0c2e4: 80 01 00 14 lwz r0,20(r1) ffc0c2e8: 83 c1 00 08 lwz r30,8(r1) ffc0c2ec: 38 21 00 10 addi r1,r1,16 ffc0c2f0: 7c 08 03 a6 mtlr r0 ffc0c2f4: 4e 80 00 20 blr _Scheduler_EDF_Extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); ffc0c2f8: 48 00 01 fd bl ffc0c4f4 <_Scheduler_EDF_Schedule> ffc0c2fc: 4b ff ff b8 b ffc0c2b4 <_Scheduler_EDF_Block+0x30> =============================================================================== ffc0c52c <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { ffc0c52c: 94 21 ff f0 stwu r1,-16(r1) ffc0c530: 7c 08 02 a6 mflr r0 ffc0c534: 93 e1 00 0c stw r31,12(r1) * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( ffc0c538: 3f e0 00 00 lis r31,0 ffc0c53c: 3b ff 2e 38 addi r31,r31,11832 #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { ffc0c540: 90 01 00 14 stw r0,20(r1) ffc0c544: 93 c1 00 08 stw r30,8(r1) ffc0c548: 7c 7e 1b 78 mr r30,r3 _Scheduler_EDF_Enqueue(the_thread); ffc0c54c: 4b ff fd d5 bl ffc0c320 <_Scheduler_EDF_Enqueue> ffc0c550: 3d 60 00 00 lis r11,0 * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( ffc0c554: 81 3f 00 10 lwz r9,16(r31) ffc0c558: 80 0b 21 10 lwz r0,8464(r11) ffc0c55c: 80 69 00 14 lwz r3,20(r9) ffc0c560: 80 9e 00 14 lwz r4,20(r30) ffc0c564: 7c 09 03 a6 mtctr r0 ffc0c568: 4e 80 04 21 bctrl ffc0c56c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c570: 41 9c 00 1c blt- cr7,ffc0c58c <_Scheduler_EDF_Unblock+0x60> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } ffc0c574: 80 01 00 14 lwz r0,20(r1) ffc0c578: 83 c1 00 08 lwz r30,8(r1) ffc0c57c: 7c 08 03 a6 mtlr r0 ffc0c580: 83 e1 00 0c lwz r31,12(r1) ffc0c584: 38 21 00 10 addi r1,r1,16 ffc0c588: 4e 80 00 20 blr */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0c58c: 81 3f 00 0c lwz r9,12(r31) * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; ffc0c590: 93 df 00 10 stw r30,16(r31) if ( _Thread_Executing->is_preemptible || ffc0c594: 88 09 00 74 lbz r0,116(r9) ffc0c598: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c59c: 41 9e 00 24 beq- cr7,ffc0c5c0 <_Scheduler_EDF_Unblock+0x94><== NEVER TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0c5a0: 38 00 00 01 li r0,1 ffc0c5a4: 98 1f 00 18 stb r0,24(r31) } } ffc0c5a8: 80 01 00 14 lwz r0,20(r1) ffc0c5ac: 83 c1 00 08 lwz r30,8(r1) ffc0c5b0: 7c 08 03 a6 mtlr r0 ffc0c5b4: 83 e1 00 0c lwz r31,12(r1) ffc0c5b8: 38 21 00 10 addi r1,r1,16 ffc0c5bc: 4e 80 00 20 blr */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0c5c0: 80 1e 00 14 lwz r0,20(r30) <== NOT EXECUTED ffc0c5c4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0c5c8: 40 be ff ac bne- cr7,ffc0c574 <_Scheduler_EDF_Unblock+0x48><== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0c5cc: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0c5d0: 98 1f 00 18 stb r0,24(r31) <== NOT EXECUTED ffc0c5d4: 4b ff ff d4 b ffc0c5a8 <_Scheduler_EDF_Unblock+0x7c> <== NOT EXECUTED =============================================================================== ffc0c5d8 <_Scheduler_EDF_Update>: #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { ffc0c5d8: 94 21 ff e8 stwu r1,-24(r1) ffc0c5dc: 7c 08 02 a6 mflr r0 ffc0c5e0: 90 01 00 1c stw r0,28(r1) ffc0c5e4: 93 c1 00 10 stw r30,16(r1) Scheduler_EDF_Per_thread *sched_info = ffc0c5e8: 83 c3 00 8c lwz r30,140(r3) #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { ffc0c5ec: 93 e1 00 14 stw r31,20(r1) ffc0c5f0: 7c 7f 1b 78 mr r31,r3 Scheduler_EDF_Per_thread *sched_info = (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { ffc0c5f4: 80 1e 00 14 lwz r0,20(r30) #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { ffc0c5f8: 93 a1 00 0c stw r29,12(r1) Scheduler_EDF_Per_thread *sched_info = (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { ffc0c5fc: 2f 80 00 02 cmpwi cr7,r0,2 ffc0c600: 41 9e 00 28 beq- cr7,ffc0c628 <_Scheduler_EDF_Update+0x50> the_thread->real_priority = the_thread->Start.initial_priority; the_thread->current_priority = the_thread->Start.initial_priority; sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; } if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) { ffc0c604: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c608: 41 9e 00 58 beq- cr7,ffc0c660 <_Scheduler_EDF_Update+0x88><== NEVER TAKEN if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } ffc0c60c: 80 01 00 1c lwz r0,28(r1) ffc0c610: 83 a1 00 0c lwz r29,12(r1) ffc0c614: 7c 08 03 a6 mtlr r0 ffc0c618: 83 c1 00 10 lwz r30,16(r1) ffc0c61c: 83 e1 00 14 lwz r31,20(r1) ffc0c620: 38 21 00 18 addi r1,r1,24 ffc0c624: 4e 80 00 20 blr (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); ffc0c628: 80 03 00 b0 lwz r0,176(r3) if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } ffc0c62c: 83 a1 00 0c lwz r29,12(r1) (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); ffc0c630: 64 00 80 00 oris r0,r0,32768 if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } ffc0c634: 83 e1 00 14 lwz r31,20(r1) (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); ffc0c638: 90 03 00 b0 stw r0,176(r3) the_thread->real_priority = the_thread->Start.initial_priority; ffc0c63c: 90 03 00 18 stw r0,24(r3) the_thread->current_priority = the_thread->Start.initial_priority; ffc0c640: 90 03 00 14 stw r0,20(r3) sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; ffc0c644: 38 00 00 00 li r0,0 ffc0c648: 90 1e 00 14 stw r0,20(r30) if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } ffc0c64c: 80 01 00 1c lwz r0,28(r1) ffc0c650: 83 c1 00 10 lwz r30,16(r1) ffc0c654: 38 21 00 18 addi r1,r1,24 ffc0c658: 7c 08 03 a6 mtlr r0 ffc0c65c: 4e 80 00 20 blr the_thread->current_priority = the_thread->Start.initial_priority; sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; } if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) { _RBTree_Extract(&_Scheduler_EDF_Ready_queue, the_node); ffc0c660: 3f a0 00 00 lis r29,0 <== NOT EXECUTED Thread_Control *the_thread ) { Scheduler_EDF_Per_thread *sched_info = (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); ffc0c664: 3b de 00 04 addi r30,r30,4 <== NOT EXECUTED the_thread->current_priority = the_thread->Start.initial_priority; sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; } if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) { _RBTree_Extract(&_Scheduler_EDF_Ready_queue, the_node); ffc0c668: 3b bd 2e 5c addi r29,r29,11868 <== NOT EXECUTED ffc0c66c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0c670: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc0c674: 48 00 53 61 bl ffc119d4 <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert(&_Scheduler_EDF_Ready_queue, the_node); ffc0c678: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc0c67c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0c680: 48 00 56 91 bl ffc11d10 <_RBTree_Insert> <== NOT EXECUTED _Scheduler_EDF_Schedule(); ffc0c684: 4b ff fe 71 bl ffc0c4f4 <_Scheduler_EDF_Schedule> <== NOT EXECUTED if ( _Thread_Executing != _Thread_Heir ) { ffc0c688: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0c68c: 39 29 2e 38 addi r9,r9,11832 <== NOT EXECUTED ffc0c690: 81 69 00 0c lwz r11,12(r9) <== NOT EXECUTED ffc0c694: 80 09 00 10 lwz r0,16(r9) <== NOT EXECUTED ffc0c698: 7f 8b 00 00 cmpw cr7,r11,r0 <== NOT EXECUTED ffc0c69c: 41 be ff 70 beq- cr7,ffc0c60c <_Scheduler_EDF_Update+0x34><== NOT EXECUTED if ( _Thread_Executing->is_preemptible || ffc0c6a0: 88 0b 00 74 lbz r0,116(r11) <== NOT EXECUTED ffc0c6a4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0c6a8: 40 9e 00 10 bne- cr7,ffc0c6b8 <_Scheduler_EDF_Update+0xe0><== NOT EXECUTED ffc0c6ac: 80 1f 00 14 lwz r0,20(r31) <== NOT EXECUTED ffc0c6b0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0c6b4: 40 be ff 58 bne- cr7,ffc0c60c <_Scheduler_EDF_Update+0x34><== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0c6b8: 38 00 00 01 li r0,1 <== NOT EXECUTED } } } ffc0c6bc: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED _Scheduler_EDF_Schedule(); if ( _Thread_Executing != _Thread_Heir ) { if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0c6c0: 98 09 00 18 stb r0,24(r9) <== NOT EXECUTED } } } ffc0c6c4: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc0c6c8: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc0c6cc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0c6d0: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc0c6d4: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc0c6d8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0c6dc <_Scheduler_EDF_Yield>: #include #include #include void _Scheduler_EDF_Yield(void) { ffc0c6dc: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED ffc0c6e0: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0c6e4: 93 c1 00 18 stw r30,24(r1) <== NOT EXECUTED Scheduler_EDF_Per_thread *first_info; RBTree_Node *first_node; ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0c6e8: 3f c0 00 00 lis r30,0 <== NOT EXECUTED ffc0c6ec: 3b de 2e 38 addi r30,r30,11832 <== NOT EXECUTED #include #include #include void _Scheduler_EDF_Yield(void) { ffc0c6f0: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED ffc0c6f4: 93 a1 00 14 stw r29,20(r1) <== NOT EXECUTED Scheduler_EDF_Per_thread *first_info; RBTree_Node *first_node; ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0c6f8: 83 be 00 0c lwz r29,12(r30) <== NOT EXECUTED #include #include #include void _Scheduler_EDF_Yield(void) { ffc0c6fc: 93 61 00 0c stw r27,12(r1) <== NOT EXECUTED ffc0c700: 93 81 00 10 stw r28,16(r1) <== NOT EXECUTED ffc0c704: 93 e1 00 1c stw r31,28(r1) <== NOT EXECUTED Scheduler_EDF_Per_thread *first_info; RBTree_Node *first_node; ISR_Level level; Thread_Control *executing = _Thread_Executing; Scheduler_EDF_Per_thread *executing_info = ffc0c708: 83 7d 00 8c lwz r27,140(r29) <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c70c: 7f 80 00 a6 mfmsr r28 <== NOT EXECUTED ffc0c710: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc0c714: 7f 80 00 78 andc r0,r28,r0 <== NOT EXECUTED ffc0c718: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _RBTree_Has_only_one_node( const RBTree_Control *the_rbtree ) { if(!the_rbtree) return NULL; /* TODO: expected behavior? */ return (the_rbtree->root->child[RBT_LEFT] == NULL && the_rbtree->root->child[RBT_RIGHT] == NULL); ffc0c71c: 3f e0 00 00 lis r31,0 <== NOT EXECUTED ffc0c720: 3b ff 2e 5c addi r31,r31,11868 <== NOT EXECUTED ffc0c724: 81 3f 00 04 lwz r9,4(r31) <== NOT EXECUTED ffc0c728: 80 09 00 04 lwz r0,4(r9) <== NOT EXECUTED ffc0c72c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0c730: 41 9e 00 68 beq- cr7,ffc0c798 <_Scheduler_EDF_Yield+0xbc><== NOT EXECUTED (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); ffc0c734: 3b 7b 00 04 addi r27,r27,4 <== NOT EXECUTED if ( !_RBTree_Has_only_one_node(&_Scheduler_EDF_Ready_queue) ) { /* * The RBTree has more than one node, enqueue behind the tasks * with the same priority in case there are such ones. */ _RBTree_Extract( &_Scheduler_EDF_Ready_queue, executing_node ); ffc0c738: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0c73c: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED ffc0c740: 48 00 52 95 bl ffc119d4 <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node ); ffc0c744: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0c748: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED ffc0c74c: 48 00 55 c5 bl ffc11d10 <_RBTree_Insert> <== NOT EXECUTED static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0c750: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc0c754: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED ffc0c758: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) { ffc0c75c: 80 1e 00 10 lwz r0,16(r30) <== NOT EXECUTED ffc0c760: 7f 9d 00 00 cmpw cr7,r29,r0 <== NOT EXECUTED ffc0c764: 41 9e 00 50 beq- cr7,ffc0c7b4 <_Scheduler_EDF_Yield+0xd8><== NOT EXECUTED _Thread_Heir = first_info->thread; } _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; ffc0c768: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0c76c: 98 1e 00 18 stb r0,24(r30) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c770: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED _ISR_Enable( level ); } ffc0c774: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc0c778: 83 61 00 0c lwz r27,12(r1) <== NOT EXECUTED ffc0c77c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0c780: 83 81 00 10 lwz r28,16(r1) <== NOT EXECUTED ffc0c784: 83 a1 00 14 lwz r29,20(r1) <== NOT EXECUTED ffc0c788: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc0c78c: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc0c790: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc0c794: 4e 80 00 20 blr <== NOT EXECUTED ffc0c798: 80 09 00 08 lwz r0,8(r9) <== NOT EXECUTED ffc0c79c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0c7a0: 40 9e ff 94 bne+ cr7,ffc0c734 <_Scheduler_EDF_Yield+0x58><== NOT EXECUTED _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node); _Thread_Heir = first_info->thread; } _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) ffc0c7a4: 80 1e 00 10 lwz r0,16(r30) <== NOT EXECUTED ffc0c7a8: 7f 9d 00 00 cmpw cr7,r29,r0 <== NOT EXECUTED ffc0c7ac: 40 9e ff bc bne+ cr7,ffc0c768 <_Scheduler_EDF_Yield+0x8c><== NOT EXECUTED ffc0c7b0: 4b ff ff c0 b ffc0c770 <_Scheduler_EDF_Yield+0x94> <== NOT EXECUTED _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) { first_node = _RBTree_Peek( &_Scheduler_EDF_Ready_queue, RBT_LEFT ); ffc0c7b4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0c7b8: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc0c7bc: 48 00 55 69 bl ffc11d24 <_RBTree_Peek> <== NOT EXECUTED first_info = _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node); _Thread_Heir = first_info->thread; ffc0c7c0: 80 03 ff fc lwz r0,-4(r3) <== NOT EXECUTED ffc0c7c4: 90 1e 00 10 stw r0,16(r30) <== NOT EXECUTED ffc0c7c8: 4b ff ff a0 b ffc0c768 <_Scheduler_EDF_Yield+0x8c> <== NOT EXECUTED =============================================================================== ffc0b814 <_Scheduler_priority_Block>: ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; ffc0b814: 81 63 00 8c lwz r11,140(r3) ready = sched_info->ready_chain; ffc0b818: 81 2b 00 00 lwz r9,0(r11) if ( _Chain_Has_only_one_node( ready ) ) { ffc0b81c: 81 49 00 00 lwz r10,0(r9) ffc0b820: 80 09 00 08 lwz r0,8(r9) ffc0b824: 7f 8a 00 00 cmpw cr7,r10,r0 ffc0b828: 41 9e 00 a4 beq- cr7,ffc0b8cc <_Scheduler_priority_Block+0xb8> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0b82c: 81 63 00 00 lwz r11,0(r3) previous = the_node->previous; ffc0b830: 81 23 00 04 lwz r9,4(r3) next->previous = previous; ffc0b834: 91 2b 00 04 stw r9,4(r11) previous->next = next; ffc0b838: 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 ); ffc0b83c: 3d 20 00 00 lis r9,0 ffc0b840: 39 29 2d b8 addi r9,r9,11704 { _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) ffc0b844: 80 09 00 10 lwz r0,16(r9) ffc0b848: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b84c: 41 9e 00 1c beq- cr7,ffc0b868 <_Scheduler_priority_Block+0x54> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) ffc0b850: 80 09 00 0c lwz r0,12(r9) ffc0b854: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b858: 4c be 00 20 bnelr+ cr7 _Thread_Dispatch_necessary = true; ffc0b85c: 38 00 00 01 li r0,1 ffc0b860: 98 09 00 18 stb r0,24(r9) ffc0b864: 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 ); ffc0b868: 3c a0 00 00 lis r5,0 * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( (Chain_Control *) _Scheduler.information ffc0b86c: 3d 40 00 00 lis r10,0 ffc0b870: 81 65 28 08 lwz r11,10248(r5) ffc0b874: 81 4a 20 e0 lwz r10,8416(r10) ffc0b878: 7d 66 00 34 cntlzw r6,r11 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b87c: 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 ); ffc0b880: 91 65 28 08 stw r11,10248(r5) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b884: 38 e7 2d e0 addi r7,r7,11744 ffc0b888: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0b88c: 7c 07 40 2e lwzx r0,r7,r8 ffc0b890: 7c 0b 00 34 cntlzw r11,r0 return (_Priority_Bits_index( major ) << 4) + ffc0b894: 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 ); ffc0b898: 7c 07 41 2e stwx r0,r7,r8 return (_Priority_Bits_index( major ) << 4) + ffc0b89c: 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 ] ) ) ffc0b8a0: 1d 6b 00 0c mulli r11,r11,12 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0b8a4: 7c 0a 58 2e lwzx r0,r10,r11 ffc0b8a8: 7d 0a 5a 14 add r8,r10,r11 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0b8ac: 39 68 00 04 addi r11,r8,4 ffc0b8b0: 7f 80 58 00 cmpw cr7,r0,r11 ffc0b8b4: 41 9e 00 60 beq- cr7,ffc0b914 <_Scheduler_priority_Block+0x100><== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0b8b8: 90 09 00 10 stw r0,16(r9) /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) ffc0b8bc: 80 09 00 0c lwz r0,12(r9) ffc0b8c0: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b8c4: 4c be 00 20 bnelr+ cr7 ffc0b8c8: 4b ff ff 94 b ffc0b85c <_Scheduler_priority_Block+0x48> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0b8cc: 81 4b 00 04 lwz r10,4(r11) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc0b8d0: 39 09 00 04 addi r8,r9,4 ffc0b8d4: 80 0b 00 14 lwz r0,20(r11) ffc0b8d8: 80 ea 00 00 lwz r7,0(r10) head->next = tail; ffc0b8dc: 91 09 00 00 stw r8,0(r9) head->previous = NULL; ffc0b8e0: 39 00 00 00 li r8,0 ffc0b8e4: 7c e0 00 38 and r0,r7,r0 if ( *the_priority_map->minor == 0 ) ffc0b8e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b8ec: 91 09 00 04 stw r8,4(r9) tail->previous = head; ffc0b8f0: 91 29 00 08 stw r9,8(r9) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0b8f4: 90 0a 00 00 stw r0,0(r10) if ( *the_priority_map->minor == 0 ) ffc0b8f8: 40 be ff 44 bne- cr7,ffc0b83c <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; ffc0b8fc: 3d 20 00 00 lis r9,0 ffc0b900: 80 0b 00 10 lwz r0,16(r11) ffc0b904: 81 49 28 08 lwz r10,10248(r9) ffc0b908: 7d 40 00 38 and r0,r10,r0 ffc0b90c: 90 09 28 08 stw r0,10248(r9) ffc0b910: 4b ff ff 2c b ffc0b83c <_Scheduler_priority_Block+0x28> Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0b914: 38 00 00 00 li r0,0 <== NOT EXECUTED * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0b918: 90 09 00 10 stw r0,16(r9) <== NOT EXECUTED ffc0b91c: 4b ff ff a0 b ffc0b8bc <_Scheduler_priority_Block+0xa8><== NOT EXECUTED =============================================================================== ffc0baf8 <_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 ); ffc0baf8: 3c c0 00 00 lis r6,0 * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( (Chain_Control *) _Scheduler.information ffc0bafc: 3d 60 00 00 lis r11,0 ffc0bb00: 81 26 28 08 lwz r9,10248(r6) ffc0bb04: 81 6b 20 e0 lwz r11,8416(r11) ffc0bb08: 7d 27 00 34 cntlzw r7,r9 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0bb0c: 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 ); ffc0bb10: 91 26 28 08 stw r9,10248(r6) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0bb14: 39 08 2d e0 addi r8,r8,11744 ffc0bb18: 54 ea 10 3a rlwinm r10,r7,2,0,29 ffc0bb1c: 7c 08 50 2e lwzx r0,r8,r10 ffc0bb20: 7c 06 00 34 cntlzw r6,r0 return (_Priority_Bits_index( major ) << 4) + ffc0bb24: 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 ); ffc0bb28: 7c 08 51 2e stwx r0,r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc0bb2c: 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 ] ) ) ffc0bb30: 1d 29 00 0c mulli r9,r9,12 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0bb34: 7c 0b 48 2e lwzx r0,r11,r9 ffc0bb38: 7d 4b 4a 14 add r10,r11,r9 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0bb3c: 39 2a 00 04 addi r9,r10,4 ffc0bb40: 7f 80 48 00 cmpw cr7,r0,r9 ffc0bb44: 41 9e 00 10 beq- cr7,ffc0bb54 <_Scheduler_priority_Schedule+0x5c><== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0bb48: 3d 20 00 00 lis r9,0 ffc0bb4c: 90 09 2d c8 stw r0,11720(r9) #include void _Scheduler_priority_Schedule(void) { _Scheduler_priority_Schedule_body(); } ffc0bb50: 4e 80 00 20 blr Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0bb54: 38 00 00 00 li r0,0 <== NOT EXECUTED * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0bb58: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0bb5c: 90 09 2d c8 stw r0,11720(r9) <== NOT EXECUTED ffc0bb60: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0c508 <_Scheduler_simple_Ready_queue_enqueue_first>: { Chain_Control *ready; Chain_Node *the_node; Thread_Control *current; ready = (Chain_Control *)_Scheduler.information; ffc0c508: 3d 20 00 00 lis r9,0 */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { ffc0c50c: 81 63 00 14 lwz r11,20(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0c510: 81 29 20 e0 lwz r9,8416(r9) ffc0c514: 81 29 00 00 lwz r9,0(r9) ffc0c518: 80 09 00 14 lwz r0,20(r9) ffc0c51c: 7f 80 58 40 cmplw cr7,r0,r11 ffc0c520: 40 9c 00 14 bge- cr7,ffc0c534 <_Scheduler_simple_Ready_queue_enqueue_first+0x2c> * Do NOT need to check for end of chain because there is always * at least one task on the ready chain -- the IDLE task. It can * never block, should never attempt to obtain a semaphore or mutex, * and thus will always be there. */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { ffc0c524: 81 29 00 00 lwz r9,0(r9) current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { ffc0c528: 80 09 00 14 lwz r0,20(r9) ffc0c52c: 7f 80 58 40 cmplw cr7,r0,r11 ffc0c530: 41 9c ff f4 blt+ cr7,ffc0c524 <_Scheduler_simple_Ready_queue_enqueue_first+0x1c><== NEVER TAKEN current = (Thread_Control *)current->Object.Node.previous; ffc0c534: 81 29 00 04 lwz r9,4(r9) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0c538: 81 69 00 00 lwz r11,0(r9) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0c53c: 91 23 00 04 stw r9,4(r3) before_node = after_node->next; after_node->next = the_node; ffc0c540: 90 69 00 00 stw r3,0(r9) the_node->next = before_node; before_node->previous = the_node; ffc0c544: 90 6b 00 04 stw r3,4(r11) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0c548: 91 63 00 00 stw r11,0(r3) } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } ffc0c54c: 4e 80 00 20 blr =============================================================================== ffc0a834 <_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() ); ffc0a834: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc0a838: 94 21 ff d8 stwu r1,-40(r1) ffc0a83c: 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 ); ffc0a840: 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() ); ffc0a844: 81 69 20 10 lwz r11,8208(r9) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0a848: 3d 20 00 00 lis r9,0 ffc0a84c: 81 49 27 fc lwz r10,10236(r9) /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc0a850: 38 81 00 08 addi r4,r1,8 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a854: 1d 6b 03 e8 mulli r11,r11,1000 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc0a858: 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 ); ffc0a85c: 38 63 27 d0 addi r3,r3,10192 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a860: 91 61 00 0c stw r11,12(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0a864: 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() ); ffc0a868: 39 40 00 00 li r10,0 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0a86c: 90 09 27 fc stw r0,10236(r9) { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a870: 91 41 00 08 stw r10,8(r1) * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc0a874: 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 ); ffc0a878: 48 00 28 f1 bl ffc0d168 <_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 ); ffc0a87c: 3c 60 00 00 lis r3,0 ffc0a880: 38 63 27 e0 addi r3,r3,10208 ffc0a884: 38 81 00 08 addi r4,r1,8 ffc0a888: 48 00 28 e1 bl ffc0d168 <_Timespec_Add_to> while ( seconds ) { ffc0a88c: 7c 60 1b 79 mr. r0,r3 ffc0a890: 90 01 00 18 stw r0,24(r1) ffc0a894: 41 82 00 24 beq- ffc0a8b8 <_TOD_Tickle_ticks+0x84> ffc0a898: 3f e0 00 00 lis r31,0 ffc0a89c: 3b ff 2c dc addi r31,r31,11484 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); ffc0a8a0: 7f e3 fb 78 mr r3,r31 ffc0a8a4: 48 00 30 c9 bl ffc0d96c <_Watchdog_Tickle> ffc0a8a8: 80 01 00 18 lwz r0,24(r1) ffc0a8ac: 35 20 ff ff addic. r9,r0,-1 ffc0a8b0: 91 21 00 18 stw r9,24(r1) ffc0a8b4: 40 82 ff ec bne+ ffc0a8a0 <_TOD_Tickle_ticks+0x6c> <== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } ffc0a8b8: 80 01 00 2c lwz r0,44(r1) ffc0a8bc: 83 e1 00 24 lwz r31,36(r1) ffc0a8c0: 38 21 00 28 addi r1,r1,40 ffc0a8c4: 7c 08 03 a6 mtlr r0 ffc0a8c8: 4e 80 00 20 blr =============================================================================== ffc0bde4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc0bde4: 94 21 ff e8 stwu r1,-24(r1) ffc0bde8: 7c 08 02 a6 mflr r0 ffc0bdec: 90 01 00 1c stw r0,28(r1) ffc0bdf0: 93 e1 00 14 stw r31,20(r1) ffc0bdf4: 7c 7f 1b 78 mr r31,r3 ffc0bdf8: 93 81 00 08 stw r28,8(r1) ffc0bdfc: 7c bc 2b 78 mr r28,r5 ffc0be00: 93 a1 00 0c stw r29,12(r1) ffc0be04: 93 c1 00 10 stw r30,16(r1) ffc0be08: 7c 9e 23 78 mr r30,r4 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; ffc0be0c: 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 ); ffc0be10: 48 00 11 35 bl ffc0cf44 <_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 ) ffc0be14: 80 1f 00 14 lwz r0,20(r31) ffc0be18: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0be1c: 41 9e 00 10 beq- cr7,ffc0be2c <_Thread_Change_priority+0x48> _Thread_Set_priority( the_thread, new_priority ); ffc0be20: 7f e3 fb 78 mr r3,r31 ffc0be24: 7f c4 f3 78 mr r4,r30 ffc0be28: 48 00 10 75 bl ffc0ce9c <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0be2c: 7f c0 00 a6 mfmsr r30 ffc0be30: 7c 10 42 a6 mfsprg r0,0 ffc0be34: 7f c0 00 78 andc r0,r30,r0 ffc0be38: 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; ffc0be3c: 80 1f 00 10 lwz r0,16(r31) if ( state != STATES_TRANSIENT ) { ffc0be40: 2f 80 00 04 cmpwi cr7,r0,4 ffc0be44: 41 9e 00 88 beq- cr7,ffc0becc <_Thread_Change_priority+0xe8> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc0be48: 73 a9 00 04 andi. r9,r29,4 ffc0be4c: 41 82 00 38 beq- ffc0be84 <_Thread_Change_priority+0xa0><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0be50: 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); ffc0be54: 3d 20 00 03 lis r9,3 <== NOT EXECUTED ffc0be58: 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 ) ) { ffc0be5c: 7c 0b 48 39 and. r11,r0,r9 <== NOT EXECUTED ffc0be60: 40 82 00 40 bne- ffc0bea0 <_Thread_Change_priority+0xbc><== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0be64: 80 01 00 1c lwz r0,28(r1) ffc0be68: 83 81 00 08 lwz r28,8(r1) ffc0be6c: 7c 08 03 a6 mtlr r0 ffc0be70: 83 a1 00 0c lwz r29,12(r1) ffc0be74: 83 c1 00 10 lwz r30,16(r1) ffc0be78: 83 e1 00 14 lwz r31,20(r1) ffc0be7c: 38 21 00 18 addi r1,r1,24 ffc0be80: 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); ffc0be84: 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 ); ffc0be88: 91 3f 00 10 stw r9,16(r31) ffc0be8c: 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); ffc0be90: 3d 20 00 03 lis r9,3 ffc0be94: 61 29 be e0 ori r9,r9,48864 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0be98: 7c 0b 48 39 and. r11,r0,r9 ffc0be9c: 41 82 ff c8 beq+ ffc0be64 <_Thread_Change_priority+0x80> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0bea0: 80 7f 00 44 lwz r3,68(r31) ffc0bea4: 7f e4 fb 78 mr r4,r31 ffc0bea8: 48 00 0e f9 bl ffc0cda0 <_Thread_queue_Requeue> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0beac: 80 01 00 1c lwz r0,28(r1) ffc0beb0: 83 81 00 08 lwz r28,8(r1) ffc0beb4: 7c 08 03 a6 mtlr r0 ffc0beb8: 83 a1 00 0c lwz r29,12(r1) ffc0bebc: 83 c1 00 10 lwz r30,16(r1) ffc0bec0: 83 e1 00 14 lwz r31,20(r1) ffc0bec4: 38 21 00 18 addi r1,r1,24 ffc0bec8: 4e 80 00 20 blr } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc0becc: 73 bd 00 04 andi. r29,r29,4 ffc0bed0: 41 82 00 74 beq- ffc0bf44 <_Thread_Change_priority+0x160><== ALWAYS TAKEN ffc0bed4: 3f a0 00 00 lis r29,0 <== NOT EXECUTED ffc0bed8: 3b bd 20 e0 addi r29,r29,8416 <== NOT EXECUTED static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0bedc: 7c 00 00 a6 mfmsr r0 ffc0bee0: 7f c0 01 24 mtmsr r30 ffc0bee4: 7c 00 01 24 mtmsr r0 * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); ffc0bee8: 80 1d 00 08 lwz r0,8(r29) ffc0beec: 7c 09 03 a6 mtctr r0 ffc0bef0: 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 ); ffc0bef4: 3d 20 00 00 lis r9,0 ffc0bef8: 39 29 2d b8 addi r9,r9,11704 ffc0befc: 81 69 00 0c lwz r11,12(r9) * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && ffc0bf00: 80 09 00 10 lwz r0,16(r9) ffc0bf04: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0bf08: 41 9e 00 18 beq- cr7,ffc0bf20 <_Thread_Change_priority+0x13c> ffc0bf0c: 88 0b 00 74 lbz r0,116(r11) ffc0bf10: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bf14: 41 9e 00 0c beq- cr7,ffc0bf20 <_Thread_Change_priority+0x13c> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; ffc0bf18: 38 00 00 01 li r0,1 ffc0bf1c: 98 09 00 18 stb r0,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0bf20: 7f c0 01 24 mtmsr r30 _ISR_Enable( level ); } ffc0bf24: 80 01 00 1c lwz r0,28(r1) ffc0bf28: 83 81 00 08 lwz r28,8(r1) ffc0bf2c: 7c 08 03 a6 mtlr r0 ffc0bf30: 83 a1 00 0c lwz r29,12(r1) ffc0bf34: 83 c1 00 10 lwz r30,16(r1) ffc0bf38: 83 e1 00 14 lwz r31,20(r1) ffc0bf3c: 38 21 00 18 addi r1,r1,24 ffc0bf40: 4e 80 00 20 blr * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); if ( prepend_it ) ffc0bf44: 2f 9c 00 00 cmpwi cr7,r28,0 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc0bf48: 93 bf 00 10 stw r29,16(r31) */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); ffc0bf4c: 3f a0 00 00 lis r29,0 ffc0bf50: 3b bd 20 e0 addi r29,r29,8416 if ( prepend_it ) ffc0bf54: 41 9e 00 18 beq- cr7,ffc0bf6c <_Thread_Change_priority+0x188> ffc0bf58: 80 1d 00 28 lwz r0,40(r29) ffc0bf5c: 7f e3 fb 78 mr r3,r31 ffc0bf60: 7c 09 03 a6 mtctr r0 ffc0bf64: 4e 80 04 21 bctrl ffc0bf68: 4b ff ff 74 b ffc0bedc <_Thread_Change_priority+0xf8> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); ffc0bf6c: 80 1d 00 24 lwz r0,36(r29) ffc0bf70: 7f e3 fb 78 mr r3,r31 ffc0bf74: 7c 09 03 a6 mtctr r0 ffc0bf78: 4e 80 04 21 bctrl ffc0bf7c: 4b ff ff 60 b ffc0bedc <_Thread_Change_priority+0xf8> =============================================================================== ffc0c1f8 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c1f8: 94 21 ff e8 stwu r1,-24(r1) ffc0c1fc: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c200: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c204: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c208: 48 00 02 3d bl ffc0c444 <_Thread_Get> switch ( location ) { ffc0c20c: 80 01 00 08 lwz r0,8(r1) ffc0c210: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c214: 40 9e 00 24 bne- cr7,ffc0c238 <_Thread_Delay_ended+0x40><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc0c218: 3c 80 10 00 lis r4,4096 ffc0c21c: 60 84 00 18 ori r4,r4,24 ffc0c220: 4b ff fd 61 bl ffc0bf80 <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc0c224: 3d 20 00 00 lis r9,0 ffc0c228: 81 69 27 c8 lwz r11,10184(r9) ffc0c22c: 38 0b ff ff addi r0,r11,-1 ffc0c230: 90 09 27 c8 stw r0,10184(r9) return _Thread_Dispatch_disable_level; ffc0c234: 80 09 27 c8 lwz r0,10184(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc0c238: 80 01 00 1c lwz r0,28(r1) ffc0c23c: 38 21 00 18 addi r1,r1,24 ffc0c240: 7c 08 03 a6 mtlr r0 ffc0c244: 4e 80 00 20 blr =============================================================================== ffc0c248 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0c248: 94 21 ff c8 stwu r1,-56(r1) ffc0c24c: 7c 08 02 a6 mflr r0 ffc0c250: 93 21 00 1c stw r25,28(r1) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc0c254: 3f 20 00 00 lis r25,0 ffc0c258: 81 39 27 c8 lwz r9,10184(r25) ffc0c25c: 90 01 00 3c stw r0,60(r1) ffc0c260: 38 09 00 01 addi r0,r9,1 ffc0c264: 90 19 27 c8 stw r0,10184(r25) ffc0c268: 93 01 00 18 stw r24,24(r1) return _Thread_Dispatch_disable_level; ffc0c26c: 80 19 27 c8 lwz r0,10184(r25) ffc0c270: 93 41 00 20 stw r26,32(r1) ffc0c274: 93 61 00 24 stw r27,36(r1) ffc0c278: 93 81 00 28 stw r28,40(r1) ffc0c27c: 93 a1 00 2c stw r29,44(r1) ffc0c280: 93 c1 00 30 stw r30,48(r1) ffc0c284: 93 e1 00 34 stw r31,52(r1) #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; ffc0c288: 3f a0 00 00 lis r29,0 ffc0c28c: 3b bd 2d b8 addi r29,r29,11704 ffc0c290: 83 fd 00 0c lwz r31,12(r29) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c294: 7c 00 00 a6 mfmsr r0 ffc0c298: 7d 30 42 a6 mfsprg r9,0 ffc0c29c: 7c 09 48 78 andc r9,r0,r9 ffc0c2a0: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0c2a4: 89 3d 00 18 lbz r9,24(r29) ffc0c2a8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c2ac: 41 9e 01 14 beq- cr7,ffc0c3c0 <_Thread_Dispatch+0x178> heir = _Thread_Heir; ffc0c2b0: 83 dd 00 10 lwz r30,16(r29) _Thread_Dispatch_necessary = false; ffc0c2b4: 39 20 00 00 li r9,0 ffc0c2b8: 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 ) ffc0c2bc: 7f 9f f0 00 cmpw cr7,r31,r30 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; _Thread_Executing = heir; ffc0c2c0: 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 ) ffc0c2c4: 41 9e 00 fc beq- cr7,ffc0c3c0 <_Thread_Dispatch+0x178> ffc0c2c8: 3f 80 00 00 lis r28,0 ffc0c2cc: 3b 7d 00 1c addi r27,r29,28 ffc0c2d0: 3b 9c 27 dc addi r28,r28,10204 #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c2d4: 3f 00 00 00 lis r24,0 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; ffc0c2d8: 3b 40 00 00 li r26,0 ffc0c2dc: 48 00 00 cc b ffc0c3a8 <_Thread_Dispatch+0x160> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c2e0: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc0c2e4: 38 61 00 10 addi r3,r1,16 ffc0c2e8: 48 00 40 69 bl ffc10350 <_TOD_Get_uptime> _Timestamp_Subtract( ffc0c2ec: 7f 63 db 78 mr r3,r27 ffc0c2f0: 38 81 00 10 addi r4,r1,16 ffc0c2f4: 38 a1 00 08 addi r5,r1,8 ffc0c2f8: 48 00 0e cd bl ffc0d1c4 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); ffc0c2fc: 38 81 00 08 addi r4,r1,8 ffc0c300: 38 7f 00 84 addi r3,r31,132 ffc0c304: 48 00 0e 65 bl ffc0d168 <_Timespec_Add_to> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c308: 81 3c 00 00 lwz r9,0(r28) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0c30c: 81 41 00 10 lwz r10,16(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0c310: 7f e3 fb 78 mr r3,r31 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c314: 2f 89 00 00 cmpwi cr7,r9,0 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0c318: 81 61 00 14 lwz r11,20(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0c31c: 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; ffc0c320: 91 5d 00 1c stw r10,28(r29) ffc0c324: 91 7d 00 20 stw r11,32(r29) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c328: 41 9e 00 14 beq- cr7,ffc0c33c <_Thread_Dispatch+0xf4> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc0c32c: 80 09 00 00 lwz r0,0(r9) ffc0c330: 90 1f 01 28 stw r0,296(r31) *_Thread_libc_reent = heir->libc_reent; ffc0c334: 80 1e 01 28 lwz r0,296(r30) ffc0c338: 90 09 00 00 stw r0,0(r9) } _User_extensions_Thread_switch( executing, heir ); ffc0c33c: 48 00 13 1d bl ffc0d658 <_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 ) ffc0c340: 80 1f 01 24 lwz r0,292(r31) _Context_Save_fp( &executing->fp_context ); ffc0c344: 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 ) ffc0c348: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c34c: 41 9e 00 08 beq- cr7,ffc0c354 <_Thread_Dispatch+0x10c> _Context_Save_fp( &executing->fp_context ); ffc0c350: 48 01 10 51 bl ffc1d3a0 <_CPU_Context_save_fp> #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc0c354: 38 7f 00 c4 addi r3,r31,196 ffc0c358: 38 9e 00 c4 addi r4,r30,196 ffc0c35c: 48 01 11 c5 bl ffc1d520 <_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 ) ffc0c360: 80 1f 01 24 lwz r0,292(r31) _Context_Restore_fp( &executing->fp_context ); ffc0c364: 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 ) ffc0c368: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c36c: 41 9e 00 08 beq- cr7,ffc0c374 <_Thread_Dispatch+0x12c> _Context_Restore_fp( &executing->fp_context ); ffc0c370: 48 01 10 f1 bl ffc1d460 <_CPU_Context_restore_fp> #endif #endif executing = _Thread_Executing; ffc0c374: 83 fd 00 0c lwz r31,12(r29) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c378: 7c 00 00 a6 mfmsr r0 ffc0c37c: 7d 30 42 a6 mfsprg r9,0 ffc0c380: 7c 09 48 78 andc r9,r0,r9 ffc0c384: 7d 20 01 24 mtmsr r9 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0c388: 89 3d 00 18 lbz r9,24(r29) ffc0c38c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c390: 41 9e 00 30 beq- cr7,ffc0c3c0 <_Thread_Dispatch+0x178> heir = _Thread_Heir; ffc0c394: 83 dd 00 10 lwz r30,16(r29) _Thread_Dispatch_necessary = false; ffc0c398: 9b 5d 00 18 stb r26,24(r29) /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) ffc0c39c: 7f 9e f8 00 cmpw cr7,r30,r31 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; _Thread_Executing = heir; ffc0c3a0: 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 ) ffc0c3a4: 41 9e 00 1c beq- cr7,ffc0c3c0 <_Thread_Dispatch+0x178> <== NEVER TAKEN */ #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) ffc0c3a8: 81 3e 00 7c lwz r9,124(r30) ffc0c3ac: 2f 89 00 01 cmpwi cr7,r9,1 ffc0c3b0: 40 9e ff 30 bne+ cr7,ffc0c2e0 <_Thread_Dispatch+0x98> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c3b4: 81 38 27 c4 lwz r9,10180(r24) ffc0c3b8: 91 3e 00 78 stw r9,120(r30) ffc0c3bc: 4b ff ff 24 b ffc0c2e0 <_Thread_Dispatch+0x98> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c3c0: 7c 00 01 24 mtmsr r0 * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc0c3c4: 81 39 27 c8 lwz r9,10184(r25) ffc0c3c8: 38 09 ff ff addi r0,r9,-1 ffc0c3cc: 90 19 27 c8 stw r0,10184(r25) return _Thread_Dispatch_disable_level; ffc0c3d0: 80 19 27 c8 lwz r0,10184(r25) _ISR_Enable( level ); _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); ffc0c3d4: 4b ff db f9 bl ffc09fcc <_API_extensions_Run_postswitch> } ffc0c3d8: 80 01 00 3c lwz r0,60(r1) ffc0c3dc: 83 01 00 18 lwz r24,24(r1) ffc0c3e0: 7c 08 03 a6 mtlr r0 ffc0c3e4: 83 21 00 1c lwz r25,28(r1) ffc0c3e8: 83 41 00 20 lwz r26,32(r1) ffc0c3ec: 83 61 00 24 lwz r27,36(r1) ffc0c3f0: 83 81 00 28 lwz r28,40(r1) ffc0c3f4: 83 a1 00 2c lwz r29,44(r1) ffc0c3f8: 83 c1 00 30 lwz r30,48(r1) ffc0c3fc: 83 e1 00 34 lwz r31,52(r1) ffc0c400: 38 21 00 38 addi r1,r1,56 ffc0c404: 4e 80 00 20 blr =============================================================================== ffc1298c <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc1298c: 94 21 ff f0 stwu r1,-16(r1) ffc12990: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; ffc12994: 3d 20 00 00 lis r9,0 * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc12998: 90 01 00 14 stw r0,20(r1) ffc1299c: 93 e1 00 0c stw r31,12(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; ffc129a0: 83 e9 2d c4 lwz r31,11716(r9) * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc129a4: 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; ffc129a8: 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); ffc129ac: 38 00 00 00 li r0,0 ffc129b0: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc129b4: 71 2b 00 01 andi. r11,r9,1 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; __asm__ volatile ( ffc129b8: 7d 30 42 a6 mfsprg r9,0 ffc129bc: 40 82 00 54 bne- ffc12a10 <_Thread_Handler+0x84> msr |= ppc_interrupt_get_disable_mask(); ffc129c0: 7d 20 03 78 or r0,r9,r0 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc129c4: 7c 00 01 24 mtmsr r0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; ffc129c8: 3d 20 00 00 lis r9,0 ffc129cc: 8b c9 29 80 lbz r30,10624(r9) doneConstructors = true; ffc129d0: 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 ); ffc129d4: 7f e3 fb 78 mr r3,r31 && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; doneConstructors = true; ffc129d8: 98 09 29 80 stb r0,10624(r9) /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); ffc129dc: 4b ff a9 41 bl ffc0d31c <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc129e0: 4b ff 9a 29 bl ffc0c408 <_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 (doCons) /* && (volatile void *)_init) */ { ffc129e4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc129e8: 41 9e 00 30 beq- cr7,ffc12a18 <_Thread_Handler+0x8c> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc129ec: 80 1f 00 94 lwz r0,148(r31) ffc129f0: 2f 80 00 00 cmpwi cr7,r0,0 ffc129f4: 41 9e 00 2c beq- cr7,ffc12a20 <_Thread_Handler+0x94> <== ALWAYS TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); ffc129f8: 7f e3 fb 78 mr r3,r31 ffc129fc: 4b ff a9 95 bl ffc0d390 <_User_extensions_Thread_exitted> _Internal_error_Occurred( ffc12a00: 38 60 00 00 li r3,0 ffc12a04: 38 80 00 01 li r4,1 ffc12a08: 38 a0 00 05 li r5,5 ffc12a0c: 4b ff 83 59 bl ffc0ad64 <_Internal_error_Occurred> _CPU_MSR_GET(msr); if (!(level & CPU_MODES_INTERRUPT_MASK)) { msr |= ppc_interrupt_get_disable_mask(); } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc12a10: 7c 00 48 78 andc r0,r0,r9 ffc12a14: 4b ff ff b0 b ffc129c4 <_Thread_Handler+0x38> * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (doCons) /* && (volatile void *)_init) */ { INIT_NAME (); ffc12a18: 48 00 b7 85 bl ffc1e19c <_init> ffc12a1c: 4b ff ff d0 b ffc129ec <_Thread_Handler+0x60> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc12a20: 80 1f 00 90 lwz r0,144(r31) ffc12a24: 80 7f 00 9c lwz r3,156(r31) ffc12a28: 7c 09 03 a6 mtctr r0 ffc12a2c: 4e 80 04 21 bctrl #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = ffc12a30: 90 7f 00 28 stw r3,40(r31) ffc12a34: 4b ff ff c4 b ffc129f8 <_Thread_Handler+0x6c> =============================================================================== ffc0c514 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0c514: 94 21 ff d0 stwu r1,-48(r1) ffc0c518: 7c 08 02 a6 mflr r0 ffc0c51c: 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; ffc0c520: 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 ) { ffc0c524: 90 01 00 34 stw r0,52(r1) ffc0c528: 92 e1 00 0c stw r23,12(r1) ffc0c52c: 93 01 00 10 stw r24,16(r1) ffc0c530: 7d 58 53 78 mr r24,r10 ffc0c534: 93 21 00 14 stw r25,20(r1) ffc0c538: 7d 39 4b 78 mr r25,r9 ffc0c53c: 93 41 00 18 stw r26,24(r1) ffc0c540: 7d 1a 43 78 mr r26,r8 ffc0c544: 93 61 00 1c stw r27,28(r1) ffc0c548: 7c fb 3b 78 mr r27,r7 ffc0c54c: 93 81 00 20 stw r28,32(r1) ffc0c550: 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 ); ffc0c554: 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 ) { ffc0c558: 93 a1 00 24 stw r29,36(r1) ffc0c55c: 7c dd 33 78 mr r29,r6 ffc0c560: 93 e1 00 2c stw r31,44(r1) ffc0c564: 7c 9f 23 78 mr r31,r4 ffc0c568: 81 61 00 40 lwz r11,64(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0c56c: 93 c4 01 2c stw r30,300(r4) ffc0c570: 93 c4 01 30 stw r30,304(r4) extensions_area = NULL; the_thread->libc_reent = NULL; ffc0c574: 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 ); ffc0c578: 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 ) { ffc0c57c: 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 ); ffc0c580: 48 00 0a 21 bl ffc0cfa0 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0c584: 7c 60 1b 79 mr. r0,r3 return false; /* stack allocation failed */ ffc0c588: 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 ) ffc0c58c: 41 82 01 20 beq- ffc0c6ac <_Thread_Initialize+0x198> ffc0c590: 7f 9d 00 40 cmplw cr7,r29,r0 ffc0c594: 41 9d 01 18 bgt- cr7,ffc0c6ac <_Thread_Initialize+0x198><== NEVER TAKEN /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0c598: 2f 9b 00 00 cmpwi cr7,r27,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0c59c: 81 3f 00 c0 lwz r9,192(r31) the_stack->size = size; ffc0c5a0: 90 1f 00 b4 stw r0,180(r31) extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; ffc0c5a4: 3b a0 00 00 li r29,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0c5a8: 91 3f 00 b8 stw r9,184(r31) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0c5ac: 40 9e 01 34 bne- cr7,ffc0c6e0 <_Thread_Initialize+0x1cc> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c5b0: 3f c0 00 00 lis r30,0 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; ffc0c5b4: 93 bf 01 24 stw r29,292(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0c5b8: 38 00 00 00 li r0,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c5bc: 81 3e 27 e8 lwz r9,10216(r30) if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; ffc0c5c0: 93 bf 00 bc stw r29,188(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c5c4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c5c8: 90 1f 00 50 stw r0,80(r31) the_watchdog->routine = routine; ffc0c5cc: 90 1f 00 64 stw r0,100(r31) the_watchdog->id = id; ffc0c5d0: 90 1f 00 68 stw r0,104(r31) the_watchdog->user_data = user_data; ffc0c5d4: 90 1f 00 6c stw r0,108(r31) ffc0c5d8: 40 9e 01 24 bne- cr7,ffc0c6fc <_Thread_Initialize+0x1e8> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c5dc: 91 3f 01 34 stw r9,308(r31) * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0c5e0: 3b 60 00 00 li r27,0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0c5e4: 80 01 00 38 lwz r0,56(r1) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); ffc0c5e8: 3d 20 00 00 lis r9,0 } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0c5ec: 3b c0 00 00 li r30,0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0c5f0: 9b 3f 00 a0 stb r25,160(r31) ffc0c5f4: 7f e3 fb 78 mr r3,r31 the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0c5f8: 90 1f 00 a8 stw r0,168(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0c5fc: 80 01 00 3c lwz r0,60(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; ffc0c600: 93 1f 00 a4 stw r24,164(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0c604: 90 1f 00 ac stw r0,172(r31) the_thread->current_state = STATES_DORMANT; ffc0c608: 38 00 00 01 li r0,1 ffc0c60c: 90 1f 00 10 stw r0,16(r31) ffc0c610: 80 09 20 f8 lwz r0,8440(r9) the_thread->Wait.queue = NULL; ffc0c614: 93 df 00 44 stw r30,68(r31) ffc0c618: 7c 09 03 a6 mtctr r0 the_thread->resource_count = 0; ffc0c61c: 93 df 00 1c stw r30,28(r31) the_thread->real_priority = priority; ffc0c620: 93 5f 00 18 stw r26,24(r31) the_thread->Start.initial_priority = priority; ffc0c624: 93 5f 00 b0 stw r26,176(r31) ffc0c628: 4e 80 04 21 bctrl sched =_Scheduler_Allocate( the_thread ); if ( !sched ) ffc0c62c: 7c 79 1b 79 mr. r25,r3 ffc0c630: 41 82 00 40 beq- ffc0c670 <_Thread_Initialize+0x15c> goto failed; _Thread_Set_priority( the_thread, priority ); ffc0c634: 7f e3 fb 78 mr r3,r31 ffc0c638: 7f 44 d3 78 mr r4,r26 ffc0c63c: 48 00 08 61 bl ffc0ce9c <_Thread_Set_priority> Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( ffc0c640: a0 1f 00 0a lhz r0,10(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0c644: 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 ); ffc0c648: 7f e3 fb 78 mr r3,r31 ffc0c64c: 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 ); ffc0c650: 93 df 00 84 stw r30,132(r31) ffc0c654: 93 df 00 88 stw r30,136(r31) ffc0c658: 7f e9 01 2e stwx r31,r9,r0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0c65c: 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 ); ffc0c660: 48 00 0e 31 bl ffc0d490 <_User_extensions_Thread_create> if ( extension_status ) ffc0c664: 2f 83 00 00 cmpwi cr7,r3,0 return true; ffc0c668: 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 ) ffc0c66c: 40 9e 00 40 bne- cr7,ffc0c6ac <_Thread_Initialize+0x198> return true; failed: _Workspace_Free( the_thread->libc_reent ); ffc0c670: 80 7f 01 28 lwz r3,296(r31) ffc0c674: 48 00 14 89 bl ffc0dafc <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); ffc0c678: 80 7f 01 2c lwz r3,300(r31) ffc0c67c: 48 00 14 81 bl ffc0dafc <_Workspace_Free> ffc0c680: 80 7f 01 30 lwz r3,304(r31) ffc0c684: 48 00 14 79 bl ffc0dafc <_Workspace_Free> _Workspace_Free( extensions_area ); ffc0c688: 7f 63 db 78 mr r3,r27 ffc0c68c: 48 00 14 71 bl ffc0dafc <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); ffc0c690: 7f a3 eb 78 mr r3,r29 ffc0c694: 48 00 14 69 bl ffc0dafc <_Workspace_Free> #endif _Workspace_Free( sched ); ffc0c698: 7f 23 cb 78 mr r3,r25 ffc0c69c: 48 00 14 61 bl ffc0dafc <_Workspace_Free> _Thread_Stack_Free( the_thread ); ffc0c6a0: 7f e3 fb 78 mr r3,r31 ffc0c6a4: 48 00 09 a5 bl ffc0d048 <_Thread_Stack_Free> return false; ffc0c6a8: 38 60 00 00 li r3,0 } ffc0c6ac: 80 01 00 34 lwz r0,52(r1) ffc0c6b0: 82 e1 00 0c lwz r23,12(r1) ffc0c6b4: 7c 08 03 a6 mtlr r0 ffc0c6b8: 83 01 00 10 lwz r24,16(r1) ffc0c6bc: 83 21 00 14 lwz r25,20(r1) ffc0c6c0: 83 41 00 18 lwz r26,24(r1) ffc0c6c4: 83 61 00 1c lwz r27,28(r1) ffc0c6c8: 83 81 00 20 lwz r28,32(r1) ffc0c6cc: 83 a1 00 24 lwz r29,36(r1) ffc0c6d0: 83 c1 00 28 lwz r30,40(r1) ffc0c6d4: 83 e1 00 2c lwz r31,44(r1) ffc0c6d8: 38 21 00 30 addi r1,r1,48 ffc0c6dc: 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 ); ffc0c6e0: 38 60 01 08 li r3,264 ffc0c6e4: 48 00 13 e5 bl ffc0dac8 <_Workspace_Allocate> if ( !fp_area ) ffc0c6e8: 7c 7d 1b 79 mr. r29,r3 ffc0c6ec: 40 82 fe c4 bne+ ffc0c5b0 <_Thread_Initialize+0x9c> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0c6f0: 3b 60 00 00 li r27,0 size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; ffc0c6f4: 3b 20 00 00 li r25,0 ffc0c6f8: 4b ff ff 78 b ffc0c670 <_Thread_Initialize+0x15c> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( ffc0c6fc: 39 29 00 01 addi r9,r9,1 ffc0c700: 55 23 10 3a rlwinm r3,r9,2,0,29 ffc0c704: 48 00 13 c5 bl ffc0dac8 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0c708: 7c 7b 1b 79 mr. r27,r3 ffc0c70c: 41 82 00 40 beq- ffc0c74c <_Thread_Initialize+0x238> goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c710: 93 7f 01 34 stw r27,308(r31) ffc0c714: 7f 6b db 78 mr r11,r27 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0c718: 38 00 00 00 li r0,0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c71c: 81 1e 27 e8 lwz r8,10216(r30) ffc0c720: 39 20 00 00 li r9,0 * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; ffc0c724: 39 40 00 00 li r10,0 ffc0c728: 48 00 00 08 b ffc0c730 <_Thread_Initialize+0x21c> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c72c: 81 7f 01 34 lwz r11,308(r31) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0c730: 39 29 00 01 addi r9,r9,1 ffc0c734: 7f 89 40 40 cmplw cr7,r9,r8 the_thread->extensions[i] = NULL; ffc0c738: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c73c: 7d 4b 01 2e stwx r10,r11,r0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0c740: 7d 20 4b 78 mr r0,r9 ffc0c744: 40 9d ff e8 ble+ cr7,ffc0c72c <_Thread_Initialize+0x218> ffc0c748: 4b ff fe 9c b ffc0c5e4 <_Thread_Initialize+0xd0> size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; ffc0c74c: 3b 20 00 00 li r25,0 ffc0c750: 4b ff ff 20 b ffc0c670 <_Thread_Initialize+0x15c> =============================================================================== ffc0d968 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0d968: 94 21 ff e8 stwu r1,-24(r1) ffc0d96c: 7c 08 02 a6 mflr r0 ffc0d970: 90 01 00 1c stw r0,28(r1) */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); ffc0d974: 80 03 00 10 lwz r0,16(r3) ffc0d978: 93 e1 00 14 stw r31,20(r1) ffc0d97c: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0d980: 70 09 00 01 andi. r9,r0,1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0d984: 93 c1 00 10 stw r30,16(r1) _Thread_Restart_self(); return true; } return false; ffc0d988: 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 ) ) { ffc0d98c: 41 82 00 20 beq- ffc0d9ac <_Thread_Restart+0x44> return true; } return false; } ffc0d990: 7c 03 03 78 mr r3,r0 ffc0d994: 80 01 00 1c lwz r0,28(r1) ffc0d998: 83 c1 00 10 lwz r30,16(r1) ffc0d99c: 7c 08 03 a6 mtlr r0 ffc0d9a0: 83 e1 00 14 lwz r31,20(r1) ffc0d9a4: 38 21 00 18 addi r1,r1,24 ffc0d9a8: 4e 80 00 20 blr Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0d9ac: 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 ); ffc0d9b0: 3f c0 00 00 lis r30,0 ffc0d9b4: 3b de 2d d8 addi r30,r30,11736 ffc0d9b8: 90 a1 00 0c stw r5,12(r1) ffc0d9bc: 48 00 01 05 bl ffc0dac0 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0d9c0: 7f e3 fb 78 mr r3,r31 ffc0d9c4: 80 81 00 08 lwz r4,8(r1) ffc0d9c8: 80 a1 00 0c lwz r5,12(r1) ffc0d9cc: 48 00 3d cd bl ffc11798 <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0d9d0: 7f e3 fb 78 mr r3,r31 ffc0d9d4: 48 00 3a 31 bl ffc11404 <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0d9d8: 7f e3 fb 78 mr r3,r31 ffc0d9dc: 48 00 3d 6d bl ffc11748 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); ffc0d9e0: 7f e3 fb 78 mr r3,r31 ffc0d9e4: 48 00 07 69 bl ffc0e14c <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) ffc0d9e8: 81 3e 00 0c lwz r9,12(r30) _Thread_Restart_self(); return true; ffc0d9ec: 38 00 00 01 li r0,1 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0d9f0: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0d9f4: 40 9e ff 9c bne+ cr7,ffc0d990 <_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 ) ffc0d9f8: 80 1f 01 24 lwz r0,292(r31) ffc0d9fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0da00: 41 9e 00 0c beq- cr7,ffc0da0c <_Thread_Restart+0xa4> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0da04: 38 7f 01 24 addi r3,r31,292 ffc0da08: 48 01 06 f9 bl ffc1e100 <_CPU_Context_restore_fp> #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0da0c: 80 7e 00 0c lwz r3,12(r30) ffc0da10: 38 63 00 c4 addi r3,r3,196 ffc0da14: 48 01 08 ad bl ffc1e2c0 <_CPU_Context_restore> =============================================================================== ffc0cda0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0cda0: 94 21 ff d8 stwu r1,-40(r1) ffc0cda4: 7c 08 02 a6 mflr r0 ffc0cda8: 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 ) ffc0cdac: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0cdb0: 93 c1 00 20 stw r30,32(r1) ffc0cdb4: 7c 9e 23 78 mr r30,r4 ffc0cdb8: 90 01 00 2c stw r0,44(r1) ffc0cdbc: 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 ) ffc0cdc0: 41 82 00 10 beq- ffc0cdd0 <_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 ) { ffc0cdc4: 80 1f 00 34 lwz r0,52(r31) ffc0cdc8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0cdcc: 41 9e 00 20 beq- cr7,ffc0cdec <_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 ); } } ffc0cdd0: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0cdd4: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0cdd8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0cddc: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0cde0: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0cde4: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0cde8: 4e 80 00 20 blr <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0cdec: 7f a0 00 a6 mfmsr r29 ffc0cdf0: 7d 30 42 a6 mfsprg r9,0 ffc0cdf4: 7f a9 48 78 andc r9,r29,r9 ffc0cdf8: 7d 20 01 24 mtmsr r9 ffc0cdfc: 3d 60 00 03 lis r11,3 ffc0ce00: 81 24 00 10 lwz r9,16(r4) ffc0ce04: 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 ) ) { ffc0ce08: 7d 6a 48 39 and. r10,r11,r9 ffc0ce0c: 40 82 00 24 bne- ffc0ce30 <_Thread_queue_Requeue+0x90> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0ce10: 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 ); } } ffc0ce14: 80 01 00 2c lwz r0,44(r1) ffc0ce18: 83 a1 00 1c lwz r29,28(r1) ffc0ce1c: 7c 08 03 a6 mtlr r0 ffc0ce20: 83 c1 00 20 lwz r30,32(r1) ffc0ce24: 83 e1 00 24 lwz r31,36(r1) ffc0ce28: 38 21 00 28 addi r1,r1,40 ffc0ce2c: 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; ffc0ce30: 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 ); ffc0ce34: 38 a0 00 01 li r5,1 ffc0ce38: 48 00 3b a5 bl ffc109dc <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0ce3c: 7f e3 fb 78 mr r3,r31 ffc0ce40: 7f c4 f3 78 mr r4,r30 ffc0ce44: 38 a1 00 08 addi r5,r1,8 ffc0ce48: 4b ff fc 81 bl ffc0cac8 <_Thread_queue_Enqueue_priority> ffc0ce4c: 7f a0 01 24 mtmsr r29 ffc0ce50: 4b ff ff c4 b ffc0ce14 <_Thread_queue_Requeue+0x74> =============================================================================== ffc0ce54 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0ce54: 94 21 ff e8 stwu r1,-24(r1) ffc0ce58: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0ce5c: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0ce60: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0ce64: 4b ff f5 e1 bl ffc0c444 <_Thread_Get> switch ( location ) { ffc0ce68: 80 01 00 08 lwz r0,8(r1) ffc0ce6c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ce70: 40 9e 00 1c bne- cr7,ffc0ce8c <_Thread_queue_Timeout+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); ffc0ce74: 48 00 3c 69 bl ffc10adc <_Thread_queue_Process_timeout> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc0ce78: 3d 20 00 00 lis r9,0 ffc0ce7c: 81 69 27 c8 lwz r11,10184(r9) ffc0ce80: 38 0b ff ff addi r0,r11,-1 ffc0ce84: 90 09 27 c8 stw r0,10184(r9) return _Thread_Dispatch_disable_level; ffc0ce88: 80 09 27 c8 lwz r0,10184(r9) _Thread_Unnest_dispatch(); break; } } ffc0ce8c: 80 01 00 1c lwz r0,28(r1) ffc0ce90: 38 21 00 18 addi r1,r1,24 ffc0ce94: 7c 08 03 a6 mtlr r0 ffc0ce98: 4e 80 00 20 blr =============================================================================== ffc1c4a8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1c4a8: 94 21 ff 98 stwu r1,-104(r1) ffc1c4ac: 7c 08 02 a6 mflr r0 ffc1c4b0: 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; ffc1c4b4: 3a a1 00 14 addi r21,r1,20 ffc1c4b8: 90 01 00 6c stw r0,108(r1) head->previous = NULL; ffc1c4bc: 38 00 00 00 li r0,0 ffc1c4c0: 92 e1 00 44 stw r23,68(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1c4c4: 3a e1 00 0c addi r23,r1,12 ffc1c4c8: 93 41 00 50 stw r26,80(r1) ffc1c4cc: 3b 41 00 18 addi r26,r1,24 ffc1c4d0: 93 81 00 58 stw r28,88(r1) head->previous = NULL; tail->previous = head; ffc1c4d4: 3b 81 00 08 addi r28,r1,8 ffc1c4d8: 92 81 00 38 stw r20,56(r1) ffc1c4dc: 3e 80 00 00 lis r20,0 ffc1c4e0: 3a 94 28 9c addi r20,r20,10396 ffc1c4e4: 93 01 00 48 stw r24,72(r1) ffc1c4e8: 3f 00 00 00 lis r24,0 ffc1c4ec: 3b 18 28 d0 addi r24,r24,10448 ffc1c4f0: 93 21 00 4c stw r25,76(r1) ffc1c4f4: 3f 20 00 00 lis r25,0 ffc1c4f8: 3b 39 28 b4 addi r25,r25,10420 ffc1c4fc: 93 c1 00 60 stw r30,96(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1c500: 93 41 00 14 stw r26,20(r1) head->previous = NULL; ffc1c504: 90 01 00 18 stw r0,24(r1) tail->previous = head; ffc1c508: 92 a1 00 1c stw r21,28(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1c50c: 92 e1 00 08 stw r23,8(r1) head->previous = NULL; ffc1c510: 90 01 00 0c stw r0,12(r1) tail->previous = head; ffc1c514: 93 81 00 10 stw r28,16(r1) ffc1c518: 92 01 00 28 stw r16,40(r1) ffc1c51c: 3a 03 00 08 addi r16,r3,8 ffc1c520: 92 21 00 2c stw r17,44(r1) ffc1c524: 3a 23 00 40 addi r17,r3,64 ffc1c528: 92 41 00 30 stw r18,48(r1) * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; ffc1c52c: 3a 40 00 00 li r18,0 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1c530: 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; ffc1c534: 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 ) { ffc1c538: 92 c1 00 40 stw r22,64(r1) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; ffc1c53c: 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 ) { ffc1c540: 93 61 00 54 stw r27,84(r1) ffc1c544: 3b 63 00 68 addi r27,r3,104 ffc1c548: 93 a1 00 5c stw r29,92(r1) ffc1c54c: 3b a3 00 30 addi r29,r3,48 ffc1c550: 93 e1 00 64 stw r31,100(r1) ffc1c554: 7c 7f 1b 78 mr r31,r3 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; ffc1c558: 92 bf 00 78 stw r21,120(r31) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c55c: 7f 85 e3 78 mr r5,r28 ffc1c560: 7f a3 eb 78 mr r3,r29 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1c564: 80 18 00 00 lwz r0,0(r24) /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1c568: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; ffc1c56c: 90 1f 00 3c stw r0,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c570: 7c 84 00 50 subf r4,r4,r0 ffc1c574: 48 00 57 c9 bl ffc21d3c <_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(); ffc1c578: 83 d9 00 00 lwz r30,0(r25) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1c57c: 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 ) { ffc1c580: 7f 9e 28 40 cmplw cr7,r30,r5 ffc1c584: 41 9d 00 98 bgt- cr7,ffc1c61c <_Timer_server_Body+0x174> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { ffc1c588: 41 9c 00 a8 blt- cr7,ffc1c630 <_Timer_server_Body+0x188> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; ffc1c58c: 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 ); ffc1c590: 80 7f 00 78 lwz r3,120(r31) ffc1c594: 48 00 0e 35 bl ffc1d3c8 <_Chain_Get> if ( timer == NULL ) { ffc1c598: 7c 64 1b 79 mr. r4,r3 ffc1c59c: 41 82 00 34 beq- ffc1c5d0 <_Timer_server_Body+0x128> <== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1c5a0: 80 04 00 38 lwz r0,56(r4) <== NOT EXECUTED ffc1c5a4: 2f 80 00 01 cmpwi cr7,r0,1 <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1c5a8: 2f 00 00 03 cmpwi cr6,r0,3 <== NOT EXECUTED static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1c5ac: 41 9e 00 98 beq- cr7,ffc1c644 <_Timer_server_Body+0x19c><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1c5b0: 40 9a ff e0 bne+ cr6,ffc1c590 <_Timer_server_Body+0xe8> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1c5b4: 38 84 00 10 addi r4,r4,16 <== NOT EXECUTED ffc1c5b8: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc1c5bc: 48 00 58 39 bl ffc21df4 <_Watchdog_Insert> <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1c5c0: 80 7f 00 78 lwz r3,120(r31) <== NOT EXECUTED ffc1c5c4: 48 00 0e 05 bl ffc1d3c8 <_Chain_Get> <== NOT EXECUTED if ( timer == NULL ) { ffc1c5c8: 7c 64 1b 79 mr. r4,r3 <== NOT EXECUTED ffc1c5cc: 40 82 ff d4 bne+ ffc1c5a0 <_Timer_server_Body+0xf8> <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1c5d0: 7d 20 00 a6 mfmsr r9 ffc1c5d4: 7c 10 42 a6 mfsprg r0,0 ffc1c5d8: 7d 20 00 78 andc r0,r9,r0 ffc1c5dc: 7c 00 01 24 mtmsr r0 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ffc1c5e0: 80 01 00 14 lwz r0,20(r1) ffc1c5e4: 7f 80 d0 00 cmpw cr7,r0,r26 ffc1c5e8: 41 9e 00 6c beq- cr7,ffc1c654 <_Timer_server_Body+0x1ac><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1c5ec: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1c5f0: 80 18 00 00 lwz r0,0(r24) <== NOT EXECUTED */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c5f4: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1c5f8: 80 9f 00 3c lwz r4,60(r31) <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c5fc: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc1c600: 90 1f 00 3c stw r0,60(r31) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c604: 7c 84 00 50 subf r4,r4,r0 <== NOT EXECUTED ffc1c608: 48 00 57 35 bl ffc21d3c <_Watchdog_Adjust_to_chain> <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1c60c: 83 d9 00 00 lwz r30,0(r25) <== NOT EXECUTED Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1c610: 80 bf 00 74 lwz r5,116(r31) <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { ffc1c614: 7f 9e 28 40 cmplw cr7,r30,r5 <== NOT EXECUTED ffc1c618: 40 9d ff 70 ble+ cr7,ffc1c588 <_Timer_server_Body+0xe0> <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c61c: 7c 85 f0 50 subf r4,r5,r30 ffc1c620: 7f 63 db 78 mr r3,r27 ffc1c624: 7f 85 e3 78 mr r5,r28 ffc1c628: 48 00 57 15 bl ffc21d3c <_Watchdog_Adjust_to_chain> ffc1c62c: 4b ff ff 60 b ffc1c58c <_Timer_server_Body+0xe4> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); ffc1c630: 7f 63 db 78 mr r3,r27 ffc1c634: 38 80 00 01 li r4,1 ffc1c638: 7c be 28 50 subf r5,r30,r5 ffc1c63c: 48 00 55 e5 bl ffc21c20 <_Watchdog_Adjust> ffc1c640: 4b ff ff 4c b ffc1c58c <_Timer_server_Body+0xe4> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1c644: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc1c648: 38 84 00 10 addi r4,r4,16 <== NOT EXECUTED ffc1c64c: 48 00 57 a9 bl ffc21df4 <_Watchdog_Insert> <== NOT EXECUTED ffc1c650: 4b ff ff 40 b ffc1c590 <_Timer_server_Body+0xe8> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; ffc1c654: 90 9f 00 78 stw r4,120(r31) ffc1c658: 7d 20 01 24 mtmsr r9 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { ffc1c65c: 80 01 00 08 lwz r0,8(r1) ffc1c660: 7f 80 b8 00 cmpw cr7,r0,r23 ffc1c664: 40 be 00 30 bne+ cr7,ffc1c694 <_Timer_server_Body+0x1ec> ffc1c668: 48 00 00 50 b ffc1c6b8 <_Timer_server_Body+0x210> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; ffc1c66c: 81 69 00 00 lwz r11,0(r9) head->next = new_first; new_first->previous = head; ffc1c670: 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; ffc1c674: 91 61 00 08 stw r11,8(r1) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; ffc1c678: 92 c9 00 08 stw r22,8(r9) ffc1c67c: 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 ); ffc1c680: 80 09 00 1c lwz r0,28(r9) ffc1c684: 80 69 00 20 lwz r3,32(r9) ffc1c688: 80 89 00 24 lwz r4,36(r9) ffc1c68c: 7c 09 03 a6 mtctr r0 ffc1c690: 4e 80 04 21 bctrl static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1c694: 7c 00 00 a6 mfmsr r0 ffc1c698: 7d 30 42 a6 mfsprg r9,0 ffc1c69c: 7c 09 48 78 andc r9,r0,r9 ffc1c6a0: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc1c6a4: 81 21 00 08 lwz r9,8(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) ffc1c6a8: 7f 89 b8 00 cmpw cr7,r9,r23 ffc1c6ac: 40 9e ff c0 bne+ cr7,ffc1c66c <_Timer_server_Body+0x1c4> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1c6b0: 7c 00 01 24 mtmsr r0 ffc1c6b4: 4b ff fe a4 b ffc1c558 <_Timer_server_Body+0xb0> } } else { ts->active = false; ffc1c6b8: 9a 5f 00 7c stb r18,124(r31) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc1c6bc: 80 14 00 00 lwz r0,0(r20) ffc1c6c0: 30 00 00 01 addic r0,r0,1 ffc1c6c4: 90 14 00 00 stw r0,0(r20) return _Thread_Dispatch_disable_level; ffc1c6c8: 80 14 00 00 lwz r0,0(r20) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); ffc1c6cc: 80 7f 00 00 lwz r3,0(r31) ffc1c6d0: 38 80 00 08 li r4,8 ffc1c6d4: 48 00 4c 45 bl ffc21318 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1c6d8: 7f e3 fb 78 mr r3,r31 ffc1c6dc: 4b ff fc a5 bl ffc1c380 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1c6e0: 7f e3 fb 78 mr r3,r31 ffc1c6e4: 4b ff fd 31 bl ffc1c414 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); ffc1c6e8: 48 00 40 bd bl ffc207a4 <_Thread_Enable_dispatch> ts->active = true; ffc1c6ec: 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 ); ffc1c6f0: 7e 03 83 78 mr r3,r16 ffc1c6f4: 48 00 58 c9 bl ffc21fbc <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1c6f8: 7e 23 8b 78 mr r3,r17 ffc1c6fc: 48 00 58 c1 bl ffc21fbc <_Watchdog_Remove> ffc1c700: 4b ff fe 58 b ffc1c558 <_Timer_server_Body+0xb0> =============================================================================== ffc1c704 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1c704: 94 21 ff f0 stwu r1,-16(r1) ffc1c708: 7c 08 02 a6 mflr r0 ffc1c70c: 7c 89 23 78 mr r9,r4 ffc1c710: 90 01 00 14 stw r0,20(r1) if ( ts->insert_chain == NULL ) { ffc1c714: 80 03 00 78 lwz r0,120(r3) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1c718: 93 e1 00 0c stw r31,12(r1) ffc1c71c: 7c 7f 1b 78 mr r31,r3 if ( ts->insert_chain == NULL ) { ffc1c720: 2f 80 00 00 cmpwi cr7,r0,0 ffc1c724: 41 9e 00 20 beq- cr7,ffc1c744 <_Timer_server_Schedule_operation_method+0x40><== ALWAYS TAKEN * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); ffc1c728: 80 63 00 78 lwz r3,120(r3) <== NOT EXECUTED ffc1c72c: 48 00 0c 45 bl ffc1d370 <_Chain_Append> <== NOT EXECUTED } } ffc1c730: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc1c734: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc1c738: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc1c73c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc1c740: 4e 80 00 20 blr <== NOT EXECUTED * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc1c744: 3d 60 00 00 lis r11,0 ffc1c748: 81 4b 28 9c lwz r10,10396(r11) ffc1c74c: 38 0a 00 01 addi r0,r10,1 ffc1c750: 90 0b 28 9c stw r0,10396(r11) return _Thread_Dispatch_disable_level; ffc1c754: 80 0b 28 9c lwz r0,10396(r11) * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1c758: 80 04 00 38 lwz r0,56(r4) ffc1c75c: 2f 80 00 01 cmpwi cr7,r0,1 ffc1c760: 41 9e 00 ac beq- cr7,ffc1c80c <_Timer_server_Schedule_operation_method+0x108> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1c764: 2f 80 00 03 cmpwi cr7,r0,3 ffc1c768: 41 9e 00 1c beq- cr7,ffc1c784 <_Timer_server_Schedule_operation_method+0x80> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1c76c: 48 00 40 39 bl ffc207a4 <_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 ); } } ffc1c770: 80 01 00 14 lwz r0,20(r1) ffc1c774: 83 e1 00 0c lwz r31,12(r1) ffc1c778: 38 21 00 10 addi r1,r1,16 ffc1c77c: 7c 08 03 a6 mtlr r0 ffc1c780: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1c784: 7c c0 00 a6 mfmsr r6 ffc1c788: 7c 10 42 a6 mfsprg r0,0 ffc1c78c: 7c c0 00 78 andc r0,r6,r0 ffc1c790: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc1c794: 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 ); ffc1c798: 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(); ffc1c79c: 3d 40 00 00 lis r10,0 last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1c7a0: 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(); ffc1c7a4: 80 0a 28 b4 lwz r0,10420(r10) last_snapshot = ts->TOD_watchdogs.last_snapshot; ffc1c7a8: 81 43 00 74 lwz r10,116(r3) if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1c7ac: 41 9e 00 30 beq- cr7,ffc1c7dc <_Timer_server_Schedule_operation_method+0xd8> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc1c7b0: 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; ffc1c7b4: 80 eb 00 10 lwz r7,16(r11) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; ffc1c7b8: 7d 07 52 14 add r8,r7,r10 delta_interval += delta; ffc1c7bc: 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 ) { ffc1c7c0: 40 9d 00 18 ble- cr7,ffc1c7d8 <_Timer_server_Schedule_operation_method+0xd4> /* * We advanced in time. */ delta = snapshot - last_snapshot; ffc1c7c4: 7d 4a 00 50 subf r10,r10,r0 if (delta_interval > delta) { ffc1c7c8: 7f 87 50 40 cmplw cr7,r7,r10 delta_interval -= delta; } else { delta_interval = 0; ffc1c7cc: 39 00 00 00 li r8,0 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { ffc1c7d0: 40 9d 00 08 ble- cr7,ffc1c7d8 <_Timer_server_Schedule_operation_method+0xd4><== NEVER TAKEN delta_interval -= delta; ffc1c7d4: 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; ffc1c7d8: 91 0b 00 10 stw r8,16(r11) } ts->TOD_watchdogs.last_snapshot = snapshot; ffc1c7dc: 90 1f 00 74 stw r0,116(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1c7e0: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1c7e4: 38 7f 00 68 addi r3,r31,104 ffc1c7e8: 38 89 00 10 addi r4,r9,16 ffc1c7ec: 48 00 56 09 bl ffc21df4 <_Watchdog_Insert> if ( !ts->active ) { ffc1c7f0: 88 1f 00 7c lbz r0,124(r31) ffc1c7f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc1c7f8: 40 9e ff 74 bne+ cr7,ffc1c76c <_Timer_server_Schedule_operation_method+0x68> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1c7fc: 7f e3 fb 78 mr r3,r31 ffc1c800: 4b ff fc 15 bl ffc1c414 <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); ffc1c804: 48 00 3f a1 bl ffc207a4 <_Thread_Enable_dispatch> ffc1c808: 4b ff ff 68 b ffc1c770 <_Timer_server_Schedule_operation_method+0x6c> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1c80c: 7c c0 00 a6 mfmsr r6 ffc1c810: 7c 10 42 a6 mfsprg r0,0 ffc1c814: 7c c0 00 78 andc r0,r6,r0 ffc1c818: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc1c81c: 81 63 00 30 lwz r11,48(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc1c820: 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; ffc1c824: 3d 40 00 00 lis r10,0 last_snapshot = ts->Interval_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1c828: 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; ffc1c82c: 80 0a 28 d0 lwz r0,10448(r10) last_snapshot = ts->Interval_watchdogs.last_snapshot; ffc1c830: 81 03 00 3c lwz r8,60(r3) if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1c834: 41 9e 00 20 beq- cr7,ffc1c854 <_Timer_server_Schedule_operation_method+0x150> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; ffc1c838: 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; ffc1c83c: 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; ffc1c840: 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) { ffc1c844: 7f 88 38 40 cmplw cr7,r8,r7 ffc1c848: 40 9c 00 08 bge- cr7,ffc1c850 <_Timer_server_Schedule_operation_method+0x14c> delta_interval -= delta; ffc1c84c: 7d 48 38 50 subf r10,r8,r7 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; ffc1c850: 91 4b 00 10 stw r10,16(r11) } ts->Interval_watchdogs.last_snapshot = snapshot; ffc1c854: 90 1f 00 3c stw r0,60(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1c858: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1c85c: 38 7f 00 30 addi r3,r31,48 ffc1c860: 38 89 00 10 addi r4,r9,16 ffc1c864: 48 00 55 91 bl ffc21df4 <_Watchdog_Insert> if ( !ts->active ) { ffc1c868: 88 1f 00 7c lbz r0,124(r31) ffc1c86c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1c870: 40 9e fe fc bne+ cr7,ffc1c76c <_Timer_server_Schedule_operation_method+0x68> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1c874: 7f e3 fb 78 mr r3,r31 ffc1c878: 4b ff fb 09 bl ffc1c380 <_Timer_server_Reset_interval_system_watchdog> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1c87c: 48 00 3f 29 bl ffc207a4 <_Thread_Enable_dispatch> ffc1c880: 4b ff fe f0 b ffc1c770 <_Timer_server_Schedule_operation_method+0x6c> =============================================================================== ffc0d168 <_Timespec_Add_to>: { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0d168: 81 03 00 04 lwz r8,4(r3) uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { ffc0d16c: 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; ffc0d170: 80 04 00 04 lwz r0,4(r4) uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; ffc0d174: 80 64 00 00 lwz r3,0(r4) /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0d178: 7d 08 02 14 add r8,r8,r0 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0d17c: 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 ) { ffc0d180: 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; ffc0d184: 91 09 00 04 stw r8,4(r9) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0d188: 60 00 c9 ff ori r0,r0,51711 ffc0d18c: 7f 88 00 40 cmplw cr7,r8,r0 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0d190: 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 ) { ffc0d194: 7d 0b 43 78 mr r11,r8 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0d198: 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 ) { ffc0d19c: 4c 9d 00 20 blelr cr7 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ffc0d1a0: 3d 6b c4 65 addis r11,r11,-15259 ffc0d1a4: 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 ) { ffc0d1a8: 7f 8b 00 40 cmplw cr7,r11,r0 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; ffc0d1ac: 39 4a 00 01 addi r10,r10,1 seconds++; ffc0d1b0: 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 ) { ffc0d1b4: 41 9d ff ec bgt+ cr7,ffc0d1a0 <_Timespec_Add_to+0x38> <== NEVER TAKEN ffc0d1b8: 91 69 00 04 stw r11,4(r9) ffc0d1bc: 91 49 00 00 stw r10,0(r9) time->tv_sec++; seconds++; } return seconds; } ffc0d1c0: 4e 80 00 20 blr =============================================================================== ffc0d400 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0d400: 94 21 ff e0 stwu r1,-32(r1) ffc0d404: 7c 08 02 a6 mflr r0 ffc0d408: 93 c1 00 18 stw r30,24(r1) ffc0d40c: 3f c0 00 00 lis r30,0 ffc0d410: 3b de 2d 74 addi r30,r30,11636 ffc0d414: 93 e1 00 1c stw r31,28(r1) ffc0d418: 83 fe 00 08 lwz r31,8(r30) ffc0d41c: 93 61 00 0c stw r27,12(r1) ffc0d420: 7c 7b 1b 78 mr r27,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d424: 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 ) { ffc0d428: 93 81 00 10 stw r28,16(r1) ffc0d42c: 7c 9c 23 78 mr r28,r4 ffc0d430: 93 a1 00 14 stw r29,20(r1) ffc0d434: 7c bd 2b 78 mr r29,r5 ffc0d438: 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 ); ffc0d43c: 41 9e 00 30 beq- cr7,ffc0d46c <_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 ) ffc0d440: 80 1f 00 30 lwz r0,48(r31) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d444: 7f 63 db 78 mr r3,r27 ffc0d448: 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 ) ffc0d44c: 2f 80 00 00 cmpwi cr7,r0,0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d450: 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 ) ffc0d454: 41 9e 00 0c beq- cr7,ffc0d460 <_User_extensions_Fatal+0x60> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d458: 7c 09 03 a6 mtctr r0 ffc0d45c: 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 ) { ffc0d460: 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 ); ffc0d464: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d468: 40 9e ff d8 bne+ cr7,ffc0d440 <_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 ); } } ffc0d46c: 80 01 00 24 lwz r0,36(r1) ffc0d470: 83 61 00 0c lwz r27,12(r1) ffc0d474: 7c 08 03 a6 mtlr r0 ffc0d478: 83 81 00 10 lwz r28,16(r1) ffc0d47c: 83 a1 00 14 lwz r29,20(r1) ffc0d480: 83 c1 00 18 lwz r30,24(r1) ffc0d484: 83 e1 00 1c lwz r31,28(r1) ffc0d488: 38 21 00 20 addi r1,r1,32 ffc0d48c: 4e 80 00 20 blr =============================================================================== ffc0d210 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d210: 94 21 ff e8 stwu r1,-24(r1) ffc0d214: 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; ffc0d218: 3c e0 00 00 lis r7,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d21c: 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; ffc0d220: 38 e7 20 04 addi r7,r7,8196 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0d224: 3d 00 00 00 lis r8,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d228: 93 a1 00 0c stw r29,12(r1) ffc0d22c: 3d 40 00 00 lis r10,0 ffc0d230: 39 68 2d 74 addi r11,r8,11636 uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; initial_extensions = Configuration.User_extension_table; ffc0d234: 83 a7 00 3c lwz r29,60(r7) ffc0d238: 39 2a 2c 50 addi r9,r10,11344 head->previous = NULL; ffc0d23c: 38 00 00 00 li r0,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d240: 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 ) { ffc0d244: 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; ffc0d248: 38 ab 00 04 addi r5,r11,4 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d24c: 93 81 00 08 stw r28,8(r1) ffc0d250: 38 c9 00 04 addi r6,r9,4 ffc0d254: 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; ffc0d258: 83 c7 00 38 lwz r30,56(r7) ffc0d25c: 90 a8 2d 74 stw r5,11636(r8) head->previous = NULL; ffc0d260: 90 0b 00 04 stw r0,4(r11) tail->previous = head; ffc0d264: 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; ffc0d268: 90 ca 2c 50 stw r6,11344(r10) head->previous = NULL; ffc0d26c: 90 09 00 04 stw r0,4(r9) tail->previous = head; ffc0d270: 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 ) { ffc0d274: 41 9e 00 88 beq- cr7,ffc0d2fc <_User_extensions_Handler_initialization+0xec><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ffc0d278: 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 *) ffc0d27c: 7f 83 e3 78 mr r3,r28 ffc0d280: 48 00 08 a9 bl ffc0db28 <_Workspace_Allocate_or_fatal_error> _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0d284: 38 80 00 00 li r4,0 ffc0d288: 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 *) ffc0d28c: 7c 7f 1b 78 mr r31,r3 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0d290: 48 00 66 ed bl ffc1397c extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0d294: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0d298: 41 9e 00 64 beq- cr7,ffc0d2fc <_User_extensions_Handler_initialization+0xec><== NEVER TAKEN ffc0d29c: 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; ffc0d2a0: 81 5d 00 00 lwz r10,0(r29) _User_extensions_Add_set( extension ); ffc0d2a4: 7f e3 fb 78 mr r3,r31 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0d2a8: 81 7d 00 04 lwz r11,4(r29) ffc0d2ac: 3b 9c 00 01 addi r28,r28,1 ffc0d2b0: 81 3d 00 08 lwz r9,8(r29) ffc0d2b4: 80 1d 00 0c lwz r0,12(r29) ffc0d2b8: 91 5f 00 14 stw r10,20(r31) ffc0d2bc: 91 7f 00 18 stw r11,24(r31) ffc0d2c0: 91 3f 00 1c stw r9,28(r31) ffc0d2c4: 90 1f 00 20 stw r0,32(r31) ffc0d2c8: 81 5d 00 10 lwz r10,16(r29) ffc0d2cc: 81 7d 00 14 lwz r11,20(r29) ffc0d2d0: 81 3d 00 18 lwz r9,24(r29) ffc0d2d4: 80 1d 00 1c lwz r0,28(r29) ffc0d2d8: 3b bd 00 20 addi r29,r29,32 ffc0d2dc: 91 5f 00 24 stw r10,36(r31) ffc0d2e0: 91 7f 00 28 stw r11,40(r31) ffc0d2e4: 91 3f 00 2c stw r9,44(r31) ffc0d2e8: 90 1f 00 30 stw r0,48(r31) _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; ffc0d2ec: 3b ff 00 34 addi r31,r31,52 _User_extensions_Add_set( extension ); ffc0d2f0: 48 00 38 a5 bl ffc10b94 <_User_extensions_Add_set> extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0d2f4: 7f 9c f0 00 cmpw cr7,r28,r30 ffc0d2f8: 40 9e ff a8 bne+ cr7,ffc0d2a0 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } ffc0d2fc: 80 01 00 1c lwz r0,28(r1) ffc0d300: 83 81 00 08 lwz r28,8(r1) ffc0d304: 7c 08 03 a6 mtlr r0 ffc0d308: 83 a1 00 0c lwz r29,12(r1) ffc0d30c: 83 c1 00 10 lwz r30,16(r1) ffc0d310: 83 e1 00 14 lwz r31,20(r1) ffc0d314: 38 21 00 18 addi r1,r1,24 ffc0d318: 4e 80 00 20 blr =============================================================================== ffc0d31c <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0d31c: 94 21 ff e8 stwu r1,-24(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0d320: 3d 20 00 00 lis r9,0 ffc0d324: 7c 08 02 a6 mflr r0 ffc0d328: 93 c1 00 10 stw r30,16(r1) ffc0d32c: 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 ); ffc0d330: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0d334: 93 e1 00 14 stw r31,20(r1) ffc0d338: 83 e9 2d 74 lwz r31,11636(r9) ffc0d33c: 93 a1 00 0c stw r29,12(r1) ffc0d340: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d344: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0d348: 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 ); ffc0d34c: 41 9e 00 28 beq- cr7,ffc0d374 <_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 ) ffc0d350: 80 1f 00 28 lwz r0,40(r31) (*the_extension->Callouts.thread_begin)( executing ); ffc0d354: 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 ) ffc0d358: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d35c: 41 9e 00 0c beq- cr7,ffc0d368 <_User_extensions_Thread_begin+0x4c> (*the_extension->Callouts.thread_begin)( executing ); ffc0d360: 7c 09 03 a6 mtctr r0 ffc0d364: 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 ) { ffc0d368: 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 ); ffc0d36c: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d370: 40 9e ff e0 bne+ cr7,ffc0d350 <_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 ); } } ffc0d374: 80 01 00 1c lwz r0,28(r1) ffc0d378: 83 a1 00 0c lwz r29,12(r1) ffc0d37c: 7c 08 03 a6 mtlr r0 ffc0d380: 83 c1 00 10 lwz r30,16(r1) ffc0d384: 83 e1 00 14 lwz r31,20(r1) ffc0d388: 38 21 00 18 addi r1,r1,24 ffc0d38c: 4e 80 00 20 blr =============================================================================== ffc0d490 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d490: 94 21 ff e8 stwu r1,-24(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0d494: 3d 20 00 00 lis r9,0 ffc0d498: 7c 08 02 a6 mflr r0 ffc0d49c: 93 c1 00 10 stw r30,16(r1) ffc0d4a0: 3b c9 2d 74 addi r30,r9,11636 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d4a4: 3b de 00 04 addi r30,r30,4 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d4a8: 93 e1 00 14 stw r31,20(r1) ffc0d4ac: 83 e9 2d 74 lwz r31,11636(r9) ffc0d4b0: 93 a1 00 0c stw r29,12(r1) ffc0d4b4: 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 ); ffc0d4b8: 7f 9f f0 00 cmpw cr7,r31,r30 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d4bc: 90 01 00 1c stw r0,28(r1) if ( !status ) return false; } } return true; ffc0d4c0: 38 60 00 01 li r3,1 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d4c4: 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 ); ffc0d4c8: 41 9e 00 40 beq- cr7,ffc0d508 <_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)( ffc0d4cc: 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 ) { ffc0d4d0: 80 1f 00 14 lwz r0,20(r31) status = (*the_extension->Callouts.thread_create)( ffc0d4d4: 39 3c 2d b8 addi r9,r28,11704 ffc0d4d8: 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 ) { ffc0d4dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d4e0: 41 9e 00 18 beq- cr7,ffc0d4f8 <_User_extensions_Thread_create+0x68> status = (*the_extension->Callouts.thread_create)( ffc0d4e4: 80 69 00 0c lwz r3,12(r9) ffc0d4e8: 7c 09 03 a6 mtctr r0 ffc0d4ec: 4e 80 04 21 bctrl _Thread_Executing, the_thread ); if ( !status ) ffc0d4f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d4f4: 41 9e 00 34 beq- cr7,ffc0d528 <_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 ) { ffc0d4f8: 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 ); ffc0d4fc: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d500: 40 9e ff d0 bne+ cr7,ffc0d4d0 <_User_extensions_Thread_create+0x40> if ( !status ) return false; } } return true; ffc0d504: 38 60 00 01 li r3,1 } ffc0d508: 80 01 00 1c lwz r0,28(r1) ffc0d50c: 83 81 00 08 lwz r28,8(r1) ffc0d510: 7c 08 03 a6 mtlr r0 ffc0d514: 83 a1 00 0c lwz r29,12(r1) ffc0d518: 83 c1 00 10 lwz r30,16(r1) ffc0d51c: 83 e1 00 14 lwz r31,20(r1) ffc0d520: 38 21 00 18 addi r1,r1,24 ffc0d524: 4e 80 00 20 blr ffc0d528: 80 01 00 1c lwz r0,28(r1) status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; ffc0d52c: 38 60 00 00 li r3,0 } } return true; } ffc0d530: 83 81 00 08 lwz r28,8(r1) ffc0d534: 7c 08 03 a6 mtlr r0 ffc0d538: 83 a1 00 0c lwz r29,12(r1) ffc0d53c: 83 c1 00 10 lwz r30,16(r1) ffc0d540: 83 e1 00 14 lwz r31,20(r1) ffc0d544: 38 21 00 18 addi r1,r1,24 ffc0d548: 4e 80 00 20 blr =============================================================================== ffc0d54c <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d54c: 94 21 ff e8 stwu r1,-24(r1) ffc0d550: 7c 08 02 a6 mflr r0 ffc0d554: 93 c1 00 10 stw r30,16(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; ffc0d558: 3f c0 00 00 lis r30,0 ffc0d55c: 3b de 2d 74 addi r30,r30,11636 ffc0d560: 93 e1 00 14 stw r31,20(r1) ffc0d564: 83 fe 00 08 lwz r31,8(r30) ffc0d568: 93 a1 00 0c stw r29,12(r1) ffc0d56c: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d570: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d574: 90 01 00 1c stw r0,28(r1) ffc0d578: 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 ); ffc0d57c: 41 9e 00 34 beq- cr7,ffc0d5b0 <_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)( ffc0d580: 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 ) ffc0d584: 80 1f 00 20 lwz r0,32(r31) (*the_extension->Callouts.thread_delete)( ffc0d588: 39 3c 2d b8 addi r9,r28,11704 ffc0d58c: 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 ) ffc0d590: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d594: 41 9e 00 10 beq- cr7,ffc0d5a4 <_User_extensions_Thread_delete+0x58> (*the_extension->Callouts.thread_delete)( ffc0d598: 80 69 00 0c lwz r3,12(r9) ffc0d59c: 7c 09 03 a6 mtctr r0 ffc0d5a0: 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 ) { ffc0d5a4: 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 ); ffc0d5a8: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d5ac: 40 9e ff d8 bne+ cr7,ffc0d584 <_User_extensions_Thread_delete+0x38> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } ffc0d5b0: 80 01 00 1c lwz r0,28(r1) ffc0d5b4: 83 81 00 08 lwz r28,8(r1) ffc0d5b8: 7c 08 03 a6 mtlr r0 ffc0d5bc: 83 a1 00 0c lwz r29,12(r1) ffc0d5c0: 83 c1 00 10 lwz r30,16(r1) ffc0d5c4: 83 e1 00 14 lwz r31,20(r1) ffc0d5c8: 38 21 00 18 addi r1,r1,24 ffc0d5cc: 4e 80 00 20 blr =============================================================================== ffc0d390 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0d390: 94 21 ff e8 stwu r1,-24(r1) ffc0d394: 7c 08 02 a6 mflr r0 ffc0d398: 93 c1 00 10 stw r30,16(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; ffc0d39c: 3f c0 00 00 lis r30,0 ffc0d3a0: 3b de 2d 74 addi r30,r30,11636 ffc0d3a4: 93 e1 00 14 stw r31,20(r1) ffc0d3a8: 83 fe 00 08 lwz r31,8(r30) ffc0d3ac: 93 a1 00 0c stw r29,12(r1) ffc0d3b0: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d3b4: 7f 9f f0 00 cmpw cr7,r31,r30 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0d3b8: 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 ); ffc0d3bc: 41 9e 00 28 beq- cr7,ffc0d3e4 <_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 ) ffc0d3c0: 80 1f 00 2c lwz r0,44(r31) (*the_extension->Callouts.thread_exitted)( executing ); ffc0d3c4: 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 ) ffc0d3c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d3cc: 41 9e 00 0c beq- cr7,ffc0d3d8 <_User_extensions_Thread_exitted+0x48> (*the_extension->Callouts.thread_exitted)( executing ); ffc0d3d0: 7c 09 03 a6 mtctr r0 ffc0d3d4: 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 ) { ffc0d3d8: 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 ); ffc0d3dc: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d3e0: 40 9e ff e0 bne+ cr7,ffc0d3c0 <_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 ); } } ffc0d3e4: 80 01 00 1c lwz r0,28(r1) ffc0d3e8: 83 a1 00 0c lwz r29,12(r1) ffc0d3ec: 7c 08 03 a6 mtlr r0 ffc0d3f0: 83 c1 00 10 lwz r30,16(r1) ffc0d3f4: 83 e1 00 14 lwz r31,20(r1) ffc0d3f8: 38 21 00 18 addi r1,r1,24 ffc0d3fc: 4e 80 00 20 blr =============================================================================== ffc0e14c <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e14c: 94 21 ff e8 stwu r1,-24(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0e150: 3d 20 00 00 lis r9,0 ffc0e154: 7c 08 02 a6 mflr r0 ffc0e158: 93 c1 00 10 stw r30,16(r1) ffc0e15c: 3b c9 2d 94 addi r30,r9,11668 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e160: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e164: 93 e1 00 14 stw r31,20(r1) ffc0e168: 83 e9 2d 94 lwz r31,11668(r9) ffc0e16c: 93 a1 00 0c stw r29,12(r1) ffc0e170: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e174: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e178: 90 01 00 1c stw r0,28(r1) ffc0e17c: 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 ); ffc0e180: 41 9e 00 34 beq- cr7,ffc0e1b4 <_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)( ffc0e184: 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 ) ffc0e188: 80 1f 00 1c lwz r0,28(r31) (*the_extension->Callouts.thread_restart)( ffc0e18c: 39 3c 2d d8 addi r9,r28,11736 ffc0e190: 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 ) ffc0e194: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e198: 41 9e 00 10 beq- cr7,ffc0e1a8 <_User_extensions_Thread_restart+0x5c> (*the_extension->Callouts.thread_restart)( ffc0e19c: 80 69 00 0c lwz r3,12(r9) ffc0e1a0: 7c 09 03 a6 mtctr r0 ffc0e1a4: 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 ) { ffc0e1a8: 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 ); ffc0e1ac: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0e1b0: 40 9e ff d8 bne+ cr7,ffc0e188 <_User_extensions_Thread_restart+0x3c> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0e1b4: 80 01 00 1c lwz r0,28(r1) ffc0e1b8: 83 81 00 08 lwz r28,8(r1) ffc0e1bc: 7c 08 03 a6 mtlr r0 ffc0e1c0: 83 a1 00 0c lwz r29,12(r1) ffc0e1c4: 83 c1 00 10 lwz r30,16(r1) ffc0e1c8: 83 e1 00 14 lwz r31,20(r1) ffc0e1cc: 38 21 00 18 addi r1,r1,24 ffc0e1d0: 4e 80 00 20 blr =============================================================================== ffc0d5d0 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d5d0: 94 21 ff e8 stwu r1,-24(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0d5d4: 3d 20 00 00 lis r9,0 ffc0d5d8: 7c 08 02 a6 mflr r0 ffc0d5dc: 93 c1 00 10 stw r30,16(r1) ffc0d5e0: 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 ); ffc0d5e4: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d5e8: 93 e1 00 14 stw r31,20(r1) ffc0d5ec: 83 e9 2d 74 lwz r31,11636(r9) ffc0d5f0: 93 a1 00 0c stw r29,12(r1) ffc0d5f4: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d5f8: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d5fc: 90 01 00 1c stw r0,28(r1) ffc0d600: 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 ); ffc0d604: 41 9e 00 34 beq- cr7,ffc0d638 <_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)( ffc0d608: 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 ) ffc0d60c: 80 1f 00 18 lwz r0,24(r31) (*the_extension->Callouts.thread_start)( ffc0d610: 39 3c 2d b8 addi r9,r28,11704 ffc0d614: 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 ) ffc0d618: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d61c: 41 9e 00 10 beq- cr7,ffc0d62c <_User_extensions_Thread_start+0x5c> (*the_extension->Callouts.thread_start)( ffc0d620: 80 69 00 0c lwz r3,12(r9) ffc0d624: 7c 09 03 a6 mtctr r0 ffc0d628: 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 ) { ffc0d62c: 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 ); ffc0d630: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d634: 40 9e ff d8 bne+ cr7,ffc0d60c <_User_extensions_Thread_start+0x3c> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0d638: 80 01 00 1c lwz r0,28(r1) ffc0d63c: 83 81 00 08 lwz r28,8(r1) ffc0d640: 7c 08 03 a6 mtlr r0 ffc0d644: 83 a1 00 0c lwz r29,12(r1) ffc0d648: 83 c1 00 10 lwz r30,16(r1) ffc0d64c: 83 e1 00 14 lwz r31,20(r1) ffc0d650: 38 21 00 18 addi r1,r1,24 ffc0d654: 4e 80 00 20 blr =============================================================================== ffc0d658 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d658: 94 21 ff e8 stwu r1,-24(r1) ffc0d65c: 3d 20 00 00 lis r9,0 ffc0d660: 7c 08 02 a6 mflr r0 ffc0d664: 93 c1 00 10 stw r30,16(r1) ffc0d668: 3b c9 2c 50 addi r30,r9,11344 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d66c: 3b de 00 04 addi r30,r30,4 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d670: 93 e1 00 14 stw r31,20(r1) ffc0d674: 83 e9 2c 50 lwz r31,11344(r9) ffc0d678: 93 81 00 08 stw r28,8(r1) ffc0d67c: 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 ); ffc0d680: 7f 9f f0 00 cmpw cr7,r31,r30 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d684: 93 a1 00 0c stw r29,12(r1) ffc0d688: 7c 9d 23 78 mr r29,r4 ffc0d68c: 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 ); ffc0d690: 41 9e 00 24 beq- cr7,ffc0d6b4 <_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 ); ffc0d694: 80 1f 00 08 lwz r0,8(r31) ffc0d698: 7f 83 e3 78 mr r3,r28 ffc0d69c: 7f a4 eb 78 mr r4,r29 ffc0d6a0: 7c 09 03 a6 mtctr r0 ffc0d6a4: 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 ) { ffc0d6a8: 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 ); ffc0d6ac: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d6b0: 40 9e ff e4 bne+ cr7,ffc0d694 <_User_extensions_Thread_switch+0x3c> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0d6b4: 80 01 00 1c lwz r0,28(r1) ffc0d6b8: 83 81 00 08 lwz r28,8(r1) ffc0d6bc: 7c 08 03 a6 mtlr r0 ffc0d6c0: 83 a1 00 0c lwz r29,12(r1) ffc0d6c4: 83 c1 00 10 lwz r30,16(r1) ffc0d6c8: 83 e1 00 14 lwz r31,20(r1) ffc0d6cc: 38 21 00 18 addi r1,r1,24 ffc0d6d0: 4e 80 00 20 blr =============================================================================== ffc0f538 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0f538: 94 21 ff e0 stwu r1,-32(r1) ffc0f53c: 7c 08 02 a6 mflr r0 ffc0f540: 90 01 00 24 stw r0,36(r1) ffc0f544: 93 c1 00 18 stw r30,24(r1) ffc0f548: 7c be 2b 78 mr r30,r5 ffc0f54c: 93 e1 00 1c stw r31,28(r1) ffc0f550: 7c 7f 1b 78 mr r31,r3 ffc0f554: 93 61 00 0c stw r27,12(r1) ffc0f558: 93 81 00 10 stw r28,16(r1) ffc0f55c: 93 a1 00 14 stw r29,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f560: 7c 00 00 a6 mfmsr r0 ffc0f564: 7d 30 42 a6 mfsprg r9,0 ffc0f568: 7c 09 48 78 andc r9,r0,r9 ffc0f56c: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0f570: 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 ); ffc0f574: 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 ) ) { ffc0f578: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0f57c: 41 9e 00 68 beq- cr7,ffc0f5e4 <_Watchdog_Adjust+0xac> switch ( direction ) { ffc0f580: 2f 84 00 00 cmpwi cr7,r4,0 ffc0f584: 40 9e 00 88 bne- cr7,ffc0f60c <_Watchdog_Adjust+0xd4> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f588: 2f 85 00 00 cmpwi cr7,r5,0 ffc0f58c: 41 9e 00 58 beq- cr7,ffc0f5e4 <_Watchdog_Adjust+0xac> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f590: 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; ffc0f594: 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 ) { ffc0f598: 7f 85 e8 40 cmplw cr7,r5,r29 ffc0f59c: 40 bc 00 18 bge+ cr7,ffc0f5b4 <_Watchdog_Adjust+0x7c> <== ALWAYS TAKEN ffc0f5a0: 48 00 00 a8 b ffc0f648 <_Watchdog_Adjust+0x110> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f5a4: 41 82 00 40 beq- ffc0f5e4 <_Watchdog_Adjust+0xac> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f5a8: 83 a9 00 10 lwz r29,16(r9) ffc0f5ac: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0f5b0: 41 9d 00 98 bgt- cr7,ffc0f648 <_Watchdog_Adjust+0x110> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0f5b4: 93 69 00 10 stw r27,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0f5b8: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0f5bc: 7f e3 fb 78 mr r3,r31 ffc0f5c0: 48 00 03 2d bl ffc0f8ec <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f5c4: 7c 00 00 a6 mfmsr r0 ffc0f5c8: 7d 30 42 a6 mfsprg r9,0 ffc0f5cc: 7c 09 48 78 andc r9,r0,r9 ffc0f5d0: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0f5d4: 81 3f 00 00 lwz r9,0(r31) switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f5d8: 7f dd f0 51 subf. r30,r29,r30 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0f5dc: 7f 9c 48 00 cmpw cr7,r28,r9 ffc0f5e0: 40 9e ff c4 bne+ cr7,ffc0f5a4 <_Watchdog_Adjust+0x6c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0f5e4: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0f5e8: 80 01 00 24 lwz r0,36(r1) ffc0f5ec: 83 61 00 0c lwz r27,12(r1) ffc0f5f0: 7c 08 03 a6 mtlr r0 ffc0f5f4: 83 81 00 10 lwz r28,16(r1) ffc0f5f8: 83 a1 00 14 lwz r29,20(r1) ffc0f5fc: 83 c1 00 18 lwz r30,24(r1) ffc0f600: 83 e1 00 1c lwz r31,28(r1) ffc0f604: 38 21 00 20 addi r1,r1,32 ffc0f608: 4e 80 00 20 blr * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0f60c: 2f 84 00 01 cmpwi cr7,r4,1 ffc0f610: 40 9e ff d4 bne+ cr7,ffc0f5e4 <_Watchdog_Adjust+0xac> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0f614: 81 69 00 10 lwz r11,16(r9) ffc0f618: 7f cb 2a 14 add r30,r11,r5 ffc0f61c: 93 c9 00 10 stw r30,16(r9) ffc0f620: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0f624: 80 01 00 24 lwz r0,36(r1) ffc0f628: 83 61 00 0c lwz r27,12(r1) ffc0f62c: 7c 08 03 a6 mtlr r0 ffc0f630: 83 81 00 10 lwz r28,16(r1) ffc0f634: 83 a1 00 14 lwz r29,20(r1) ffc0f638: 83 c1 00 18 lwz r30,24(r1) ffc0f63c: 83 e1 00 1c lwz r31,28(r1) ffc0f640: 38 21 00 20 addi r1,r1,32 ffc0f644: 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; ffc0f648: 7f de e8 50 subf r30,r30,r29 ffc0f64c: 93 c9 00 10 stw r30,16(r9) break; ffc0f650: 4b ff ff 94 b ffc0f5e4 <_Watchdog_Adjust+0xac> =============================================================================== ffc0d6d4 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; ffc0d6d4: 3d 20 00 00 lis r9,0 ffc0d6d8: 80 09 2d c0 lwz r0,11712(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d6dc: 7d 00 00 a6 mfmsr r8 ffc0d6e0: 7d 30 42 a6 mfsprg r9,0 ffc0d6e4: 7d 09 48 78 andc r9,r8,r9 ffc0d6e8: 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 ) { ffc0d6ec: 81 24 00 08 lwz r9,8(r4) ffc0d6f0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d6f4: 40 9e 01 04 bne- cr7,ffc0d7f8 <_Watchdog_Insert+0x124> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; ffc0d6f8: 3c c0 00 00 lis r6,0 ffc0d6fc: 81 26 27 f8 lwz r9,10232(r6) if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; ffc0d700: 39 60 00 01 li r11,1 ffc0d704: 91 64 00 08 stw r11,8(r4) ffc0d708: 3c a0 00 00 lis r5,0 _Watchdog_Sync_count++; ffc0d70c: 39 29 00 01 addi r9,r9,1 ffc0d710: 91 26 27 f8 stw r9,10232(r6) restart: delta_interval = the_watchdog->initial; ffc0d714: 81 24 00 0c lwz r9,12(r4) ffc0d718: 81 63 00 00 lwz r11,0(r3) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d71c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d720: 41 9e 00 98 beq- cr7,ffc0d7b8 <_Watchdog_Insert+0xe4> ffc0d724: 81 4b 00 00 lwz r10,0(r11) ffc0d728: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d72c: 41 9e 00 8c beq- cr7,ffc0d7b8 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0d730: 81 4b 00 10 lwz r10,16(r11) ffc0d734: 7f 89 50 40 cmplw cr7,r9,r10 ffc0d738: 41 9c 00 c8 blt- cr7,ffc0d800 <_Watchdog_Insert+0x12c> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0d73c: 7c e0 00 a6 mfmsr r7 ffc0d740: 7d 00 01 24 mtmsr r8 ffc0d744: 7c e0 01 24 mtmsr r7 delta_interval -= after->delta_interval; _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d748: 80 e4 00 08 lwz r7,8(r4) ffc0d74c: 2f 87 00 01 cmpwi cr7,r7,1 ffc0d750: 40 9e 00 98 bne- cr7,ffc0d7e8 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d754: 81 85 27 f0 lwz r12,10224(r5) ffc0d758: 38 e5 27 f0 addi r7,r5,10224 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0d75c: 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 ) { ffc0d760: 7f 80 60 40 cmplw cr7,r0,r12 ffc0d764: 40 bc 00 48 bge+ cr7,ffc0d7ac <_Watchdog_Insert+0xd8> ffc0d768: 48 00 00 d4 b ffc0d83c <_Watchdog_Insert+0x168> for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d76c: 81 4b 00 00 lwz r10,0(r11) ffc0d770: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d774: 41 9e 00 44 beq- cr7,ffc0d7b8 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0d778: 81 4b 00 10 lwz r10,16(r11) ffc0d77c: 7f 8a 48 40 cmplw cr7,r10,r9 ffc0d780: 41 9d 00 80 bgt- cr7,ffc0d800 <_Watchdog_Insert+0x12c> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0d784: 7d 2a 48 50 subf r9,r10,r9 ffc0d788: 7d 40 00 a6 mfmsr r10 ffc0d78c: 7d 00 01 24 mtmsr r8 ffc0d790: 7d 40 01 24 mtmsr r10 _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d794: 81 44 00 08 lwz r10,8(r4) ffc0d798: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0d79c: 40 9e 00 4c bne- cr7,ffc0d7e8 <_Watchdog_Insert+0x114> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d7a0: 81 47 00 00 lwz r10,0(r7) ffc0d7a4: 7f 80 50 40 cmplw cr7,r0,r10 ffc0d7a8: 41 9c 00 94 blt- cr7,ffc0d83c <_Watchdog_Insert+0x168> <== NEVER TAKEN for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d7ac: 2f 89 00 00 cmpwi cr7,r9,0 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } ffc0d7b0: 81 6b 00 00 lwz r11,0(r11) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d7b4: 40 9e ff b8 bne+ cr7,ffc0d76c <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0d7b8: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d7bc: 3c e0 00 00 lis r7,0 ffc0d7c0: 80 e7 27 fc lwz r7,10236(r7) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; ffc0d7c4: 38 60 00 02 li r3,2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0d7c8: 81 4b 00 00 lwz r10,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0d7cc: 91 64 00 04 stw r11,4(r4) ffc0d7d0: 90 64 00 08 stw r3,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0d7d4: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0d7d8: 90 8b 00 00 stw r4,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0d7dc: 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; ffc0d7e0: 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; ffc0d7e4: 90 e4 00 14 stw r7,20(r4) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; ffc0d7e8: 90 05 27 f0 stw r0,10224(r5) _Watchdog_Sync_count--; ffc0d7ec: 81 26 27 f8 lwz r9,10232(r6) ffc0d7f0: 38 09 ff ff addi r0,r9,-1 ffc0d7f4: 90 06 27 f8 stw r0,10232(r6) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d7f8: 7d 00 01 24 mtmsr r8 ffc0d7fc: 4e 80 00 20 blr if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; ffc0d800: 7d 49 50 50 subf r10,r9,r10 ffc0d804: 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; ffc0d808: 3c e0 00 00 lis r7,0 ffc0d80c: 38 60 00 02 li r3,2 _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0d810: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d814: 80 e7 27 fc lwz r7,10236(r7) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0d818: 81 4b 00 00 lwz r10,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0d81c: 91 64 00 04 stw r11,4(r4) ffc0d820: 90 64 00 08 stw r3,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0d824: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0d828: 90 8b 00 00 stw r4,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0d82c: 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; ffc0d830: 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; ffc0d834: 90 e4 00 14 stw r7,20(r4) ffc0d838: 4b ff ff b0 b ffc0d7e8 <_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; ffc0d83c: 90 05 27 f0 stw r0,10224(r5) goto restart; ffc0d840: 4b ff fe d4 b ffc0d714 <_Watchdog_Insert+0x40> =============================================================================== ffc0d89c <_Watchdog_Remove>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d89c: 7d 20 00 a6 mfmsr r9 ffc0d8a0: 7c 10 42 a6 mfsprg r0,0 ffc0d8a4: 7d 20 00 78 andc r0,r9,r0 ffc0d8a8: 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; ffc0d8ac: 80 03 00 08 lwz r0,8(r3) switch ( previous_state ) { ffc0d8b0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d8b4: 41 9e 00 98 beq- cr7,ffc0d94c <_Watchdog_Remove+0xb0> ffc0d8b8: 2b 80 00 01 cmplwi cr7,r0,1 ffc0d8bc: 40 9c 00 1c bge- cr7,ffc0d8d8 <_Watchdog_Remove+0x3c> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d8c0: 3d 60 00 00 lis r11,0 ffc0d8c4: 81 6b 27 fc lwz r11,10236(r11) ffc0d8c8: 91 63 00 18 stw r11,24(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d8cc: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d8d0: 7c 03 03 78 mr r3,r0 ffc0d8d4: 4e 80 00 20 blr Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { ffc0d8d8: 2b 80 00 03 cmplwi cr7,r0,3 ffc0d8dc: 41 bd ff e4 bgt- cr7,ffc0d8c0 <_Watchdog_Remove+0x24> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0d8e0: 39 60 00 00 li r11,0 ffc0d8e4: 91 63 00 08 stw r11,8(r3) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } ffc0d8e8: 81 63 00 00 lwz r11,0(r3) case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0d8ec: 81 4b 00 00 lwz r10,0(r11) ffc0d8f0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d8f4: 41 9e 00 14 beq- cr7,ffc0d908 <_Watchdog_Remove+0x6c> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0d8f8: 81 0b 00 10 lwz r8,16(r11) ffc0d8fc: 81 43 00 10 lwz r10,16(r3) ffc0d900: 7d 48 52 14 add r10,r8,r10 ffc0d904: 91 4b 00 10 stw r10,16(r11) if ( _Watchdog_Sync_count ) ffc0d908: 3d 40 00 00 lis r10,0 ffc0d90c: 81 4a 27 f8 lwz r10,10232(r10) ffc0d910: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d914: 41 9e 00 14 beq- cr7,ffc0d928 <_Watchdog_Remove+0x8c> _Watchdog_Sync_level = _ISR_Nest_level; ffc0d918: 3d 40 00 00 lis r10,0 ffc0d91c: 81 0a 2d c0 lwz r8,11712(r10) ffc0d920: 3d 40 00 00 lis r10,0 ffc0d924: 91 0a 27 f0 stw r8,10224(r10) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0d928: 81 43 00 04 lwz r10,4(r3) next->previous = previous; ffc0d92c: 91 4b 00 04 stw r10,4(r11) previous->next = next; ffc0d930: 91 6a 00 00 stw r11,0(r10) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d934: 3d 60 00 00 lis r11,0 ffc0d938: 81 6b 27 fc lwz r11,10236(r11) ffc0d93c: 91 63 00 18 stw r11,24(r3) ffc0d940: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d944: 7c 03 03 78 mr r3,r0 ffc0d948: 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; ffc0d94c: 39 60 00 00 li r11,0 ffc0d950: 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; ffc0d954: 3d 60 00 00 lis r11,0 ffc0d958: 81 6b 27 fc lwz r11,10236(r11) ffc0d95c: 91 63 00 18 stw r11,24(r3) ffc0d960: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d964: 7c 03 03 78 mr r3,r0 ffc0d968: 4e 80 00 20 blr =============================================================================== ffc0ec90 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0ec90: 94 21 ff e8 stwu r1,-24(r1) ffc0ec94: 7c 08 02 a6 mflr r0 ffc0ec98: 93 c1 00 10 stw r30,16(r1) ffc0ec9c: 7c 7e 1b 78 mr r30,r3 ffc0eca0: 93 e1 00 14 stw r31,20(r1) ffc0eca4: 7c 9f 23 78 mr r31,r4 ffc0eca8: 90 01 00 1c stw r0,28(r1) ffc0ecac: 93 81 00 08 stw r28,8(r1) ffc0ecb0: 93 a1 00 0c stw r29,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0ecb4: 7f a0 00 a6 mfmsr r29 ffc0ecb8: 7c 10 42 a6 mfsprg r0,0 ffc0ecbc: 7f a0 00 78 andc r0,r29,r0 ffc0ecc0: 7c 00 01 24 mtmsr r0 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0ecc4: 3c 60 ff c2 lis r3,-62 ffc0ecc8: 7f e5 fb 78 mr r5,r31 ffc0eccc: 38 63 16 4c addi r3,r3,5708 ffc0ecd0: 7f c4 f3 78 mr r4,r30 ffc0ecd4: 4c c6 31 82 crclr 4*cr1+eq ffc0ecd8: 4b ff 81 31 bl ffc06e08 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0ecdc: 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 ); ffc0ece0: 3b ff 00 04 addi r31,r31,4 if ( !_Chain_Is_empty( header ) ) { ffc0ece4: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0ece8: 41 9e 00 54 beq- cr7,ffc0ed3c <_Watchdog_Report_chain+0xac> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0ecec: 7f 84 e3 78 mr r4,r28 ffc0ecf0: 38 60 00 00 li r3,0 ffc0ecf4: 48 00 00 5d bl ffc0ed50 <_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 ) ffc0ecf8: 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 ) ; ffc0ecfc: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0ed00: 40 9e ff ec bne+ cr7,ffc0ecec <_Watchdog_Report_chain+0x5c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0ed04: 3c 60 ff c2 lis r3,-62 ffc0ed08: 38 63 16 64 addi r3,r3,5732 ffc0ed0c: 7f c4 f3 78 mr r4,r30 ffc0ed10: 4c c6 31 82 crclr 4*cr1+eq ffc0ed14: 4b ff 80 f5 bl ffc06e08 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0ed18: 7f a0 01 24 mtmsr r29 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0ed1c: 80 01 00 1c lwz r0,28(r1) ffc0ed20: 83 81 00 08 lwz r28,8(r1) ffc0ed24: 7c 08 03 a6 mtlr r0 ffc0ed28: 83 a1 00 0c lwz r29,12(r1) ffc0ed2c: 83 c1 00 10 lwz r30,16(r1) ffc0ed30: 83 e1 00 14 lwz r31,20(r1) ffc0ed34: 38 21 00 18 addi r1,r1,24 ffc0ed38: 4e 80 00 20 blr _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); ffc0ed3c: 3c 60 ff c2 lis r3,-62 ffc0ed40: 38 63 16 74 addi r3,r3,5748 ffc0ed44: 4c c6 31 82 crclr 4*cr1+eq ffc0ed48: 4b ff 80 c1 bl ffc06e08 ffc0ed4c: 4b ff ff cc b ffc0ed18 <_Watchdog_Report_chain+0x88> =============================================================================== ffc0d96c <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { ffc0d96c: 94 21 ff e8 stwu r1,-24(r1) ffc0d970: 7c 08 02 a6 mflr r0 ffc0d974: 90 01 00 1c stw r0,28(r1) ffc0d978: 93 e1 00 14 stw r31,20(r1) ffc0d97c: 7c 7f 1b 78 mr r31,r3 ffc0d980: 93 81 00 08 stw r28,8(r1) ffc0d984: 93 a1 00 0c stw r29,12(r1) ffc0d988: 93 c1 00 10 stw r30,16(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d98c: 7f 80 00 a6 mfmsr r28 ffc0d990: 7c 10 42 a6 mfsprg r0,0 ffc0d994: 7f 80 00 78 andc r0,r28,r0 ffc0d998: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0d99c: 83 a3 00 00 lwz r29,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 ); ffc0d9a0: 3b c3 00 04 addi r30,r3,4 * volatile data - till, 2003/7 */ _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0d9a4: 7f 9d f0 00 cmpw cr7,r29,r30 ffc0d9a8: 41 9e 00 20 beq- cr7,ffc0d9c8 <_Watchdog_Tickle+0x5c> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { ffc0d9ac: 81 3d 00 10 lwz r9,16(r29) ffc0d9b0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d9b4: 41 9e 00 74 beq- cr7,ffc0da28 <_Watchdog_Tickle+0xbc> the_watchdog->delta_interval--; ffc0d9b8: 39 29 ff ff addi r9,r9,-1 if ( the_watchdog->delta_interval != 0 ) ffc0d9bc: 2f 89 00 00 cmpwi cr7,r9,0 * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { the_watchdog->delta_interval--; ffc0d9c0: 91 3d 00 10 stw r9,16(r29) if ( the_watchdog->delta_interval != 0 ) ffc0d9c4: 41 be 00 64 beq+ cr7,ffc0da28 <_Watchdog_Tickle+0xbc> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d9c8: 7f 80 01 24 mtmsr r28 } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } ffc0d9cc: 80 01 00 1c lwz r0,28(r1) ffc0d9d0: 83 81 00 08 lwz r28,8(r1) ffc0d9d4: 7c 08 03 a6 mtlr r0 ffc0d9d8: 83 a1 00 0c lwz r29,12(r1) ffc0d9dc: 83 c1 00 10 lwz r30,16(r1) ffc0d9e0: 83 e1 00 14 lwz r31,20(r1) ffc0d9e4: 38 21 00 18 addi r1,r1,24 ffc0d9e8: 4e 80 00 20 blr _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( ffc0d9ec: 80 1d 00 1c lwz r0,28(r29) ffc0d9f0: 80 7d 00 20 lwz r3,32(r29) ffc0d9f4: 80 9d 00 24 lwz r4,36(r29) ffc0d9f8: 7c 09 03 a6 mtctr r0 ffc0d9fc: 4e 80 04 21 bctrl static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0da00: 7f 80 00 a6 mfmsr r28 ffc0da04: 7c 10 42 a6 mfsprg r0,0 ffc0da08: 7f 80 00 78 andc r0,r28,r0 ffc0da0c: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0da10: 83 bf 00 00 lwz r29,0(r31) _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); ffc0da14: 7f 9e e8 00 cmpw cr7,r30,r29 ffc0da18: 41 be ff b0 beq- cr7,ffc0d9c8 <_Watchdog_Tickle+0x5c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && ffc0da1c: 80 1d 00 10 lwz r0,16(r29) ffc0da20: 2f 80 00 00 cmpwi cr7,r0,0 ffc0da24: 40 be ff a4 bne- cr7,ffc0d9c8 <_Watchdog_Tickle+0x5c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); ffc0da28: 7f a3 eb 78 mr r3,r29 ffc0da2c: 4b ff fe 71 bl ffc0d89c <_Watchdog_Remove> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0da30: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); switch( watchdog_state ) { ffc0da34: 2f 83 00 02 cmpwi cr7,r3,2 ffc0da38: 40 9e ff c8 bne+ cr7,ffc0da00 <_Watchdog_Tickle+0x94> <== NEVER TAKEN ffc0da3c: 4b ff ff b0 b ffc0d9ec <_Watchdog_Tickle+0x80> =============================================================================== ffc1d7e0 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } ffc1d7e0: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc1d7e4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc1857c <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { ffc1857c: 94 21 ff c8 stwu r1,-56(r1) ffc18580: 7c 08 02 a6 mflr r0 ffc18584: 93 e1 00 34 stw r31,52(r1) uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) ffc18588: 7c df 33 79 mr. r31,r6 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { ffc1858c: 90 01 00 3c stw r0,60(r1) int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; ffc18590: 38 00 00 00 li r0,0 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { ffc18594: 93 41 00 20 stw r26,32(r1) ffc18598: 7c fa 3b 78 mr r26,r7 ffc1859c: 93 61 00 24 stw r27,36(r1) ffc185a0: 93 c1 00 30 stw r30,48(r1) int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; ffc185a4: 3b c0 00 00 li r30,0 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { ffc185a8: 93 21 00 1c stw r25,28(r1) ffc185ac: 93 81 00 28 stw r28,40(r1) ffc185b0: 93 a1 00 2c stw r29,44(r1) int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ffc185b4: 83 63 00 34 lwz r27,52(r3) ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; ffc185b8: 90 01 00 08 stw r0,8(r1) uint32_t c = 0; while (count > 0) ffc185bc: 41 82 00 70 beq- ffc1862c <_fat_block_read+0xb0> <== NEVER TAKEN ffc185c0: 7c bc 2b 78 mr r28,r5 ffc185c4: 7c 9d 23 78 mr r29,r4 ffc185c8: 48 00 00 3c b ffc18604 <_fat_block_read+0x88> { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); ffc185cc: a3 3b 00 00 lhz r25,0(r27) memcpy((buff + cmpltd), (block->buffer + ofs), c); ffc185d0: 81 21 00 08 lwz r9,8(r1) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); ffc185d4: 7f 3c c8 50 subf r25,r28,r25 ffc185d8: 7f 99 f8 40 cmplw cr7,r25,r31 ffc185dc: 40 9d 00 08 ble- cr7,ffc185e4 <_fat_block_read+0x68> ffc185e0: 7f f9 fb 78 mr r25,r31 memcpy((buff + cmpltd), (block->buffer + ofs), c); ffc185e4: 80 89 00 24 lwz r4,36(r9) ffc185e8: 7f 25 cb 78 mr r5,r25 count -= c; cmpltd += c; ffc185ec: 7f d9 f2 14 add r30,r25,r30 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); ffc185f0: 7c 84 e2 14 add r4,r4,r28 ffc185f4: 48 00 b8 21 bl ffc23e14 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) ffc185f8: 7f f9 f8 51 subf. r31,r25,r31 memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; ofs = 0; ffc185fc: 3b 80 00 00 li r28,0 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) ffc18600: 41 82 00 2c beq- ffc1862c <_fat_block_read+0xb0> { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); ffc18604: 7f a4 eb 78 mr r4,r29 ffc18608: 38 a0 00 01 li r5,1 ffc1860c: 38 c1 00 08 addi r6,r1,8 ffc18610: 7f 63 db 78 mr r3,r27 ffc18614: 4b ff fb 7d bl ffc18190 c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; ffc18618: 3b bd 00 01 addi r29,r29,1 uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) ffc1861c: 2f 83 00 00 cmpwi cr7,r3,0 return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); ffc18620: 7c 7a f2 14 add r3,r26,r30 uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) ffc18624: 41 9e ff a8 beq+ cr7,ffc185cc <_fat_block_read+0x50> <== ALWAYS TAKEN return -1; ffc18628: 3b c0 ff ff li r30,-1 <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } ffc1862c: 80 01 00 3c lwz r0,60(r1) ffc18630: 7f c3 f3 78 mr r3,r30 ffc18634: 83 21 00 1c lwz r25,28(r1) ffc18638: 7c 08 03 a6 mtlr r0 ffc1863c: 83 41 00 20 lwz r26,32(r1) ffc18640: 83 61 00 24 lwz r27,36(r1) ffc18644: 83 81 00 28 lwz r28,40(r1) ffc18648: 83 a1 00 2c lwz r29,44(r1) ffc1864c: 83 c1 00 30 lwz r30,48(r1) ffc18650: 83 e1 00 34 lwz r31,52(r1) ffc18654: 38 21 00 38 addi r1,r1,56 ffc18658: 4e 80 00 20 blr =============================================================================== ffc18780 <_fat_block_release>: int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); ffc18780: 80 63 00 34 lwz r3,52(r3) <== NOT EXECUTED ffc18784: 4b ff fc 54 b ffc183d8 <== NOT EXECUTED =============================================================================== ffc1865c <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { ffc1865c: 94 21 ff c8 stwu r1,-56(r1) ffc18660: 7c 08 02 a6 mflr r0 ffc18664: 93 e1 00 34 stw r31,52(r1) uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) ffc18668: 7c df 33 79 mr. r31,r6 rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { ffc1866c: 90 01 00 3c stw r0,60(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; ffc18670: 38 00 00 00 li r0,0 rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { ffc18674: 93 21 00 1c stw r25,28(r1) ffc18678: 7c f9 3b 78 mr r25,r7 ffc1867c: 93 61 00 24 stw r27,36(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; ffc18680: 3b 60 00 00 li r27,0 rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { ffc18684: 93 81 00 28 stw r28,40(r1) ffc18688: 93 01 00 18 stw r24,24(r1) ffc1868c: 93 41 00 20 stw r26,32(r1) ffc18690: 93 a1 00 2c stw r29,44(r1) ffc18694: 93 c1 00 30 stw r30,48(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc18698: 83 83 00 34 lwz r28,52(r3) ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; ffc1869c: 90 01 00 08 stw r0,8(r1) uint32_t c = 0; while(count > 0) ffc186a0: 41 82 00 ac beq- ffc1874c <_fat_block_write+0xf0> <== NEVER TAKEN ffc186a4: 7c ba 2b 78 mr r26,r5 ffc186a8: 7c 9d 23 78 mr r29,r4 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; ffc186ac: 3b 00 00 01 li r24,1 ffc186b0: 48 00 00 40 b ffc186f0 <_fat_block_write+0x94> c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); ffc186b4: 4b ff fa dd bl ffc18190 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ffc186b8: 3b bd 00 01 addi r29,r29,1 if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) ffc186bc: 2f 83 00 00 cmpwi cr7,r3,0 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); ffc186c0: 7c 99 da 14 add r4,r25,r27 ffc186c4: 7f c5 f3 78 mr r5,r30 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; ffc186c8: 7f 7e da 14 add r27,r30,r27 if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) ffc186cc: 40 9e 00 7c bne- cr7,ffc18748 <_fat_block_write+0xec> <== NEVER TAKEN return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); ffc186d0: 81 21 00 08 lwz r9,8(r1) ffc186d4: 80 69 00 24 lwz r3,36(r9) ffc186d8: 7c 63 d2 14 add r3,r3,r26 ffc186dc: 48 00 b7 39 bl ffc23e14 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) ffc186e0: 7f fe f8 51 subf. r31,r30,r31 ffc186e4: 9b 1c 00 84 stb r24,132(r28) fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ofs = 0; ffc186e8: 3b 40 00 00 li r26,0 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) ffc186ec: 41 82 00 60 beq- ffc1874c <_fat_block_write+0xf0> { c = MIN(count, (fs_info->vol.bps - ofs)); ffc186f0: a0 1c 00 00 lhz r0,0(r28) if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); ffc186f4: 7f a4 eb 78 mr r4,r29 ffc186f8: 38 a0 00 01 li r5,1 rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); ffc186fc: 7f da 00 50 subf r30,r26,r0 ffc18700: 7f 9e f8 40 cmplw cr7,r30,r31 if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); ffc18704: 38 c1 00 08 addi r6,r1,8 ffc18708: 7f 83 e3 78 mr r3,r28 rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); ffc1870c: 40 9d 00 08 ble- cr7,ffc18714 <_fat_block_write+0xb8> ffc18710: 7f fe fb 78 mr r30,r31 if (c == fs_info->vol.bps) ffc18714: 7f 80 f0 00 cmpw cr7,r0,r30 ffc18718: 40 9e ff 9c bne+ cr7,ffc186b4 <_fat_block_write+0x58> rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); ffc1871c: 7f a4 eb 78 mr r4,r29 ffc18720: 38 a0 00 02 li r5,2 ffc18724: 7f 83 e3 78 mr r3,r28 ffc18728: 38 c1 00 08 addi r6,r1,8 ffc1872c: 4b ff fa 65 bl ffc18190 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ffc18730: 3b bd 00 01 addi r29,r29,1 if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) ffc18734: 2f 83 00 00 cmpwi cr7,r3,0 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); ffc18738: 7c 99 da 14 add r4,r25,r27 ffc1873c: 7f c5 f3 78 mr r5,r30 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; ffc18740: 7f 7e da 14 add r27,r30,r27 if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) ffc18744: 41 9e ff 8c beq+ cr7,ffc186d0 <_fat_block_write+0x74> <== ALWAYS TAKEN return -1; ffc18748: 3b 60 ff ff li r27,-1 <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } ffc1874c: 80 01 00 3c lwz r0,60(r1) ffc18750: 7f 63 db 78 mr r3,r27 ffc18754: 83 01 00 18 lwz r24,24(r1) ffc18758: 7c 08 03 a6 mtlr r0 ffc1875c: 83 21 00 1c lwz r25,28(r1) ffc18760: 83 41 00 20 lwz r26,32(r1) ffc18764: 83 61 00 24 lwz r27,36(r1) ffc18768: 83 81 00 28 lwz r28,40(r1) ffc1876c: 83 a1 00 2c lwz r29,44(r1) ffc18770: 83 c1 00 30 lwz r30,48(r1) ffc18774: 83 e1 00 34 lwz r31,52(r1) ffc18778: 38 21 00 38 addi r1,r1,56 ffc1877c: 4e 80 00 20 blr =============================================================================== ffc05300 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); ffc05300: 4b ff ff 64 b ffc05264 <== NOT EXECUTED =============================================================================== ffc24544 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc24544: 94 21 ff 90 stwu r1,-112(r1) ffc24548: 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 ); ffc2454c: 7c 83 23 78 mr r3,r4 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc24550: 93 61 00 5c stw r27,92(r1) ffc24554: 7c bb 2b 78 mr r27,r5 ffc24558: 93 a1 00 64 stw r29,100(r1) ffc2455c: 93 c1 00 68 stw r30,104(r1) */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc24560: 3b c1 00 24 addi r30,r1,36 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc24564: 93 e1 00 6c stw r31,108(r1) ffc24568: 7c 9f 23 78 mr r31,r4 ffc2456c: 90 01 00 74 stw r0,116(r1) ffc24570: 93 41 00 58 stw r26,88(r1) ffc24574: 93 81 00 60 stw r28,96(r1) /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); ffc24578: 4b fe 2c f1 bl ffc07268 if ( old_parent_pathlen == 0 ) ffc2457c: 7c 7d 1b 79 mr. r29,r3 rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc24580: 7f e3 fb 78 mr r3,r31 * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) ffc24584: 40 82 00 c4 bne- ffc24648 <_rename_r+0x104> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc24588: 38 81 00 0c addi r4,r1,12 ffc2458c: 7f c5 f3 78 mr r5,r30 ffc24590: 4b fe 4b f9 bl ffc09188 ffc24594: 3b a0 00 00 li r29,0 rtems_filesystem_location_info_t old_parent_loc; rtems_filesystem_location_info_t new_parent_loc; int i; int result; const char *name; bool free_old_parentloc = false; ffc24598: 3b 80 00 00 li r28,0 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; ffc2459c: 80 01 00 24 lwz r0,36(r1) name = old + old_parent_pathlen; ffc245a0: 7f ff ea 14 add r31,r31,r29 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc245a4: 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; ffc245a8: 93 e1 00 08 stw r31,8(r1) /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; ffc245ac: 90 01 00 38 stw r0,56(r1) ffc245b0: 80 01 00 28 lwz r0,40(r1) ffc245b4: 90 01 00 3c stw r0,60(r1) ffc245b8: 80 01 00 2c lwz r0,44(r1) ffc245bc: 90 01 00 40 stw r0,64(r1) ffc245c0: 80 01 00 30 lwz r0,48(r1) ffc245c4: 90 01 00 44 stw r0,68(r1) ffc245c8: 80 01 00 34 lwz r0,52(r1) ffc245cc: 90 01 00 48 stw r0,72(r1) name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc245d0: 4b ff 2a 79 bl ffc17048 ffc245d4: 7c 64 1b 78 mr r4,r3 ffc245d8: 7f e3 fb 78 mr r3,r31 ffc245dc: 4b fe 2c ed bl ffc072c8 ffc245e0: 7f ff 1a 14 add r31,r31,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc245e4: 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 ) ); ffc245e8: 93 e1 00 08 stw r31,8(r1) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc245ec: 4b ff 2a 5d bl ffc17048 ffc245f0: 38 a0 00 00 li r5,0 ffc245f4: 7c 64 1b 78 mr r4,r3 ffc245f8: 38 c1 00 38 addi r6,r1,56 ffc245fc: 7f e3 fb 78 mr r3,r31 ffc24600: 38 e0 00 00 li r7,0 ffc24604: 4b fe 2b 3d bl ffc07140 0, &old_loc, false ); if ( result != 0 ) { ffc24608: 2f 83 00 00 cmpwi cr7,r3,0 ffc2460c: 41 9e 00 98 beq- cr7,ffc246a4 <_rename_r+0x160> if ( free_old_parentloc ) ffc24610: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_filesystem_freenode( &old_parent_loc ); return -1; ffc24614: 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 ) ffc24618: 40 9e 00 58 bne- cr7,ffc24670 <_rename_r+0x12c> if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } ffc2461c: 80 01 00 74 lwz r0,116(r1) ffc24620: 7f 43 d3 78 mr r3,r26 ffc24624: 83 61 00 5c lwz r27,92(r1) ffc24628: 7c 08 03 a6 mtlr r0 ffc2462c: 83 41 00 58 lwz r26,88(r1) ffc24630: 83 81 00 60 lwz r28,96(r1) ffc24634: 83 a1 00 64 lwz r29,100(r1) ffc24638: 83 c1 00 68 lwz r30,104(r1) ffc2463c: 83 e1 00 6c lwz r31,108(r1) ffc24640: 38 21 00 70 addi r1,r1,112 ffc24644: 4e 80 00 20 blr old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, ffc24648: 7f a4 eb 78 mr r4,r29 ffc2464c: 38 a0 00 02 li r5,2 ffc24650: 7f c6 f3 78 mr r6,r30 ffc24654: 38 e0 00 00 li r7,0 ffc24658: 4b fe 2b 95 bl ffc071ec RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) return -1; ffc2465c: 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 ) ffc24660: 2f 83 00 00 cmpwi cr7,r3,0 ffc24664: 40 be ff b8 bne- cr7,ffc2461c <_rename_r+0xd8> <== NEVER TAKEN return -1; free_old_parentloc = true; ffc24668: 3b 80 00 01 li r28,1 ffc2466c: 4b ff ff 30 b ffc2459c <_rename_r+0x58> result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); ffc24670: 7f c3 f3 78 mr r3,r30 ffc24674: 4b fe 2e 59 bl ffc074cc if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } ffc24678: 80 01 00 74 lwz r0,116(r1) ffc2467c: 7f 43 d3 78 mr r3,r26 ffc24680: 83 61 00 5c lwz r27,92(r1) ffc24684: 7c 08 03 a6 mtlr r0 ffc24688: 83 41 00 58 lwz r26,88(r1) ffc2468c: 83 81 00 60 lwz r28,96(r1) ffc24690: 83 a1 00 64 lwz r29,100(r1) ffc24694: 83 c1 00 68 lwz r30,104(r1) ffc24698: 83 e1 00 6c lwz r31,108(r1) ffc2469c: 38 21 00 70 addi r1,r1,112 ffc246a0: 4e 80 00 20 blr /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); ffc246a4: 7f 63 db 78 mr r3,r27 ffc246a8: 38 81 00 0c addi r4,r1,12 ffc246ac: 38 a1 00 10 addi r5,r1,16 ffc246b0: 4b fe 4a d9 bl ffc09188 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); ffc246b4: 81 21 00 1c lwz r9,28(r1) ffc246b8: 80 61 00 0c lwz r3,12(r1) ffc246bc: 38 81 00 10 addi r4,r1,16 ffc246c0: 80 09 00 04 lwz r0,4(r9) ffc246c4: 38 a1 00 08 addi r5,r1,8 ffc246c8: 7c 7b 1a 14 add r3,r27,r3 ffc246cc: 7c 09 03 a6 mtctr r0 ffc246d0: 4e 80 04 21 bctrl if ( result != 0 ) { ffc246d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc246d8: 40 9e 00 c0 bne- cr7,ffc24798 <_rename_r+0x254> /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { ffc246dc: 80 01 00 20 lwz r0,32(r1) ffc246e0: 81 21 00 34 lwz r9,52(r1) ffc246e4: 7f 89 00 00 cmpw cr7,r9,r0 ffc246e8: 40 9e 00 78 bne- cr7,ffc24760 <_rename_r+0x21c> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); ffc246ec: 81 21 00 1c lwz r9,28(r1) ffc246f0: 38 81 00 38 addi r4,r1,56 ffc246f4: 38 a1 00 10 addi r5,r1,16 ffc246f8: 80 c1 00 08 lwz r6,8(r1) ffc246fc: 80 09 00 40 lwz r0,64(r9) ffc24700: 7f c3 f3 78 mr r3,r30 ffc24704: 7c 09 03 a6 mtctr r0 ffc24708: 4e 80 04 21 bctrl ffc2470c: 7c 7a 1b 78 mr r26,r3 rtems_filesystem_freenode( &new_parent_loc ); ffc24710: 38 61 00 10 addi r3,r1,16 ffc24714: 4b fe 2d b9 bl ffc074cc if ( free_old_parentloc ) ffc24718: 2f 9c 00 00 cmpwi cr7,r28,0 ffc2471c: 40 9e 00 38 bne- cr7,ffc24754 <_rename_r+0x210> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); ffc24720: 38 61 00 38 addi r3,r1,56 ffc24724: 4b fe 2d a9 bl ffc074cc return result; } ffc24728: 80 01 00 74 lwz r0,116(r1) ffc2472c: 7f 43 d3 78 mr r3,r26 ffc24730: 83 61 00 5c lwz r27,92(r1) ffc24734: 7c 08 03 a6 mtlr r0 ffc24738: 83 41 00 58 lwz r26,88(r1) ffc2473c: 83 81 00 60 lwz r28,96(r1) ffc24740: 83 a1 00 64 lwz r29,100(r1) ffc24744: 83 c1 00 68 lwz r30,104(r1) ffc24748: 83 e1 00 6c lwz r31,108(r1) ffc2474c: 38 21 00 70 addi r1,r1,112 ffc24750: 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 ); ffc24754: 7f c3 f3 78 mr r3,r30 ffc24758: 4b fe 2d 75 bl ffc074cc ffc2475c: 4b ff ff c4 b ffc24720 <_rename_r+0x1dc> * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); ffc24760: 38 61 00 10 addi r3,r1,16 ffc24764: 4b fe 2d 69 bl ffc074cc if ( free_old_parentloc ) ffc24768: 2f 9c 00 00 cmpwi cr7,r28,0 ffc2476c: 40 9e 00 20 bne- cr7,ffc2478c <_rename_r+0x248> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); ffc24770: 38 61 00 38 addi r3,r1,56 ffc24774: 4b fe 2d 59 bl ffc074cc rtems_set_errno_and_return_minus_one( EXDEV ); ffc24778: 3b 40 ff ff li r26,-1 ffc2477c: 4b ff 10 81 bl ffc157fc <__errno> ffc24780: 38 00 00 12 li r0,18 ffc24784: 90 03 00 00 stw r0,0(r3) ffc24788: 4b ff fe 94 b ffc2461c <_rename_r+0xd8> */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); ffc2478c: 7f c3 f3 78 mr r3,r30 ffc24790: 4b fe 2d 3d bl ffc074cc ffc24794: 4b ff ff dc b ffc24770 <_rename_r+0x22c> rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); ffc24798: 38 61 00 10 addi r3,r1,16 ffc2479c: 4b fe 2d 31 bl ffc074cc if ( free_old_parentloc ) ffc247a0: 2f 9c 00 00 cmpwi cr7,r28,0 ffc247a4: 41 be 00 0c beq+ cr7,ffc247b0 <_rename_r+0x26c> rtems_filesystem_freenode( &old_parent_loc ); ffc247a8: 7f c3 f3 78 mr r3,r30 ffc247ac: 4b fe 2d 21 bl ffc074cc rtems_filesystem_freenode( &old_loc ); ffc247b0: 38 61 00 38 addi r3,r1,56 ffc247b4: 4b fe 2d 19 bl ffc074cc return -1; ffc247b8: 3b 40 ff ff li r26,-1 ffc247bc: 4b ff fe 60 b ffc2461c <_rename_r+0xd8> =============================================================================== ffc06fa0 : #include int chroot( const char *pathname ) { ffc06fa0: 94 21 ff c8 stwu r1,-56(r1) ffc06fa4: 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) { ffc06fa8: 3d 20 00 00 lis r9,0 #include int chroot( const char *pathname ) { ffc06fac: 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) { ffc06fb0: 3f e0 00 00 lis r31,0 #include int chroot( const char *pathname ) { ffc06fb4: 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) { ffc06fb8: 83 df 27 1c lwz r30,10012(r31) #include int chroot( const char *pathname ) { ffc06fbc: 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) { ffc06fc0: 38 09 2a f8 addi r0,r9,11000 ffc06fc4: 7f 9e 00 00 cmpw cr7,r30,r0 #include int chroot( const char *pathname ) { ffc06fc8: 93 a1 00 2c stw r29,44(r1) ffc06fcc: 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) { ffc06fd0: 41 9e 00 90 beq- cr7,ffc07060 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); ffc06fd4: 7f a3 eb 78 mr r3,r29 ffc06fd8: 4b ff fe e9 bl ffc06ec0 if (result) { ffc06fdc: 2f 83 00 00 cmpwi cr7,r3,0 ffc06fe0: 40 9e 00 a4 bne- cr7,ffc07084 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { ffc06fe4: 3c 60 ff c2 lis r3,-62 ffc06fe8: 38 63 54 8c addi r3,r3,21644 ffc06fec: 38 80 00 01 li r4,1 ffc06ff0: 38 a0 00 00 li r5,0 ffc06ff4: 38 c1 00 08 addi r6,r1,8 ffc06ff8: 38 e0 00 00 li r7,0 ffc06ffc: 48 00 01 f1 bl ffc071ec ffc07000: 2f 83 00 00 cmpwi cr7,r3,0 ffc07004: 40 9e 00 80 bne- cr7,ffc07084 <== 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); ffc07008: 80 7f 27 1c lwz r3,10012(r31) ffc0700c: 38 63 00 18 addi r3,r3,24 ffc07010: 48 00 04 bd bl ffc074cc rtems_filesystem_root = loc; ffc07014: 81 3f 27 1c lwz r9,10012(r31) ffc07018: 80 01 00 08 lwz r0,8(r1) return 0; ffc0701c: 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; ffc07020: 90 09 00 18 stw r0,24(r9) ffc07024: 80 01 00 0c lwz r0,12(r1) ffc07028: 90 09 00 1c stw r0,28(r9) ffc0702c: 80 01 00 10 lwz r0,16(r1) ffc07030: 90 09 00 20 stw r0,32(r9) ffc07034: 80 01 00 14 lwz r0,20(r1) ffc07038: 90 09 00 24 stw r0,36(r9) ffc0703c: 80 01 00 18 lwz r0,24(r1) ffc07040: 90 09 00 28 stw r0,40(r9) return 0; } ffc07044: 80 01 00 3c lwz r0,60(r1) ffc07048: 83 a1 00 2c lwz r29,44(r1) ffc0704c: 7c 08 03 a6 mtlr r0 ffc07050: 83 c1 00 30 lwz r30,48(r1) ffc07054: 83 e1 00 34 lwz r31,52(r1) ffc07058: 38 21 00 38 addi r1,r1,56 ffc0705c: 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*/ ffc07060: 48 00 1b b5 bl ffc08c14 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ ffc07064: 80 1f 27 1c lwz r0,10012(r31) ffc07068: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0706c: 40 9e ff 68 bne+ cr7,ffc06fd4 rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc07070: 48 00 e7 8d bl ffc157fc <__errno> ffc07074: 38 00 00 86 li r0,134 ffc07078: 90 03 00 00 stw r0,0(r3) ffc0707c: 38 60 ff ff li r3,-1 ffc07080: 4b ff ff c4 b ffc07044 } /* 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 ); ffc07084: 48 00 e7 79 bl ffc157fc <__errno> ffc07088: 7c 7f 1b 78 mr r31,r3 ffc0708c: 48 00 e7 71 bl ffc157fc <__errno> ffc07090: 80 03 00 00 lwz r0,0(r3) ffc07094: 38 60 ff ff li r3,-1 ffc07098: 90 1f 00 00 stw r0,0(r31) ffc0709c: 4b ff ff a8 b ffc07044 =============================================================================== ffc04508 : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { ffc04508: 94 21 ff d0 stwu r1,-48(r1) ffc0450c: 7c 08 02 a6 mflr r0 ffc04510: 93 a1 00 24 stw r29,36(r1) rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { ffc04514: 3f a0 00 00 lis r29,0 return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { ffc04518: 93 81 00 20 stw r28,32(r1) rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { ffc0451c: 83 9d 28 70 lwz r28,10352(r29) return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { ffc04520: 92 e1 00 0c stw r23,12(r1) rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { ffc04524: 3a fd 28 70 addi r23,r29,10352 ffc04528: 7f 83 e0 40 cmplw cr7,r3,r28 return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { ffc0452c: 93 41 00 18 stw r26,24(r1) ffc04530: 7c da 33 78 mr r26,r6 ffc04534: 93 61 00 1c stw r27,28(r1) ffc04538: 7c bb 2b 78 mr r27,r5 ffc0453c: 93 c1 00 28 stw r30,40(r1) ffc04540: 7c 9e 23 78 mr r30,r4 ffc04544: 93 e1 00 2c stw r31,44(r1) ffc04548: 7c 7f 1b 78 mr r31,r3 ffc0454c: 90 01 00 34 stw r0,52(r1) ffc04550: 92 c1 00 08 stw r22,8(r1) ffc04554: 93 01 00 10 stw r24,16(r1) ffc04558: 93 21 00 14 stw r25,20(r1) rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { ffc0455c: 40 9c 00 d4 bge- cr7,ffc04630 ffc04560: 83 37 00 04 lwz r25,4(r23) memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { ffc04564: 57 e0 18 38 rlwinm r0,r31,3,0,28 ffc04568: 7f 99 00 2e lwzx r28,r25,r0 ffc0456c: 7f 39 02 14 add r25,r25,r0 ffc04570: 83 19 00 04 lwz r24,4(r25) ffc04574: 2f 9c 00 00 cmpwi cr7,r28,0 ffc04578: 41 9e 00 68 beq- cr7,ffc045e0 ffc0457c: 7f 9e c0 40 cmplw cr7,r30,r24 ffc04580: 40 9c 00 60 bge- cr7,ffc045e0 <== NEVER TAKEN memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; disktab [major].size = new_size; } return disktab [major].minor + minor; ffc04584: 57 c0 10 3a rlwinm r0,r30,2,0,29 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { ffc04588: 7f bc 02 15 add. r29,r28,r0 return RTEMS_NO_MEMORY; ffc0458c: 3a c0 00 1a li r22,26 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { ffc04590: 41 82 00 14 beq- ffc045a4 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { ffc04594: 7c 1c 00 2e lwzx r0,r28,r0 return RTEMS_RESOURCE_IN_USE; ffc04598: 3a c0 00 0c li r22,12 if (dd_entry == NULL) { return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { ffc0459c: 2f 80 00 00 cmpwi cr7,r0,0 ffc045a0: 41 9e 00 f4 beq- cr7,ffc04694 *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } ffc045a4: 80 01 00 34 lwz r0,52(r1) ffc045a8: 7e c3 b3 78 mr r3,r22 ffc045ac: 82 e1 00 0c lwz r23,12(r1) ffc045b0: 7c 08 03 a6 mtlr r0 ffc045b4: 82 c1 00 08 lwz r22,8(r1) ffc045b8: 83 01 00 10 lwz r24,16(r1) ffc045bc: 83 21 00 14 lwz r25,20(r1) ffc045c0: 83 41 00 18 lwz r26,24(r1) ffc045c4: 83 61 00 1c lwz r27,28(r1) ffc045c8: 83 81 00 20 lwz r28,32(r1) ffc045cc: 83 a1 00 24 lwz r29,36(r1) ffc045d0: 83 c1 00 28 lwz r30,40(r1) ffc045d4: 83 e1 00 2c lwz r31,44(r1) ffc045d8: 38 21 00 30 addi r1,r1,48 ffc045dc: 4e 80 00 20 blr if (disktab [major].minor == NULL || minor >= disktab[major].size) { rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; rtems_device_minor_number new_size = 0; if (old_size == 0) { ffc045e0: 2f 98 00 00 cmpwi cr7,r24,0 new_size = DISKTAB_INITIAL_SIZE; ffc045e4: 3b a0 00 08 li r29,8 if (disktab [major].minor == NULL || minor >= disktab[major].size) { rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; rtems_device_minor_number new_size = 0; if (old_size == 0) { ffc045e8: 40 9e 00 9c bne- cr7,ffc04684 <== NEVER TAKEN new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; } if (minor >= new_size) { ffc045ec: 7f 9e e8 40 cmplw cr7,r30,r29 ffc045f0: 40 9c 00 8c bge- cr7,ffc0467c new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); ffc045f4: 7f 83 e3 78 mr r3,r28 ffc045f8: 57 a4 10 3a rlwinm r4,r29,2,0,29 ffc045fc: 48 00 28 fd bl ffc06ef8 rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { return RTEMS_NO_MEMORY; ffc04600: 3a c0 00 1a li r22,26 if (minor >= new_size) { new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); if (table == NULL) { ffc04604: 7c 7c 1b 79 mr. r28,r3 ffc04608: 41 a2 ff 9c beq- ffc045a4 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); ffc0460c: 7c b8 e8 50 subf r5,r24,r29 ffc04610: 57 03 10 3a rlwinm r3,r24,2,0,29 ffc04614: 7c 7c 1a 14 add r3,r28,r3 ffc04618: 38 80 00 00 li r4,0 ffc0461c: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc04620: 48 01 39 e1 bl ffc18000 disktab [major].minor = table; ffc04624: 93 99 00 00 stw r28,0(r25) disktab [major].size = new_size; ffc04628: 93 b9 00 04 stw r29,4(r25) ffc0462c: 4b ff ff 58 b ffc04584 rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; ffc04630: 57 98 08 3c rlwinm r24,r28,1,0,30 if (major >= new_size) { ffc04634: 7f 83 c0 40 cmplw cr7,r3,r24 rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; ffc04638: 80 77 00 04 lwz r3,4(r23) rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; if (major >= new_size) { ffc0463c: 41 9c 00 08 blt- cr7,ffc04644 <== NEVER TAKEN new_size = major + 1; ffc04640: 3b 1f 00 01 addi r24,r31,1 } table = realloc(table, new_size * sizeof(*table)); ffc04644: 57 04 18 38 rlwinm r4,r24,3,0,28 ffc04648: 48 00 28 b1 bl ffc06ef8 rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { return RTEMS_NO_MEMORY; ffc0464c: 3a c0 00 1a li r22,26 if (major >= new_size) { new_size = major + 1; } table = realloc(table, new_size * sizeof(*table)); if (table == NULL) { ffc04650: 7c 79 1b 79 mr. r25,r3 ffc04654: 41 a2 ff 50 beq- ffc045a4 <== ALWAYS TAKEN return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); ffc04658: 7c bc c0 50 subf r5,r28,r24 <== NOT EXECUTED ffc0465c: 57 83 18 38 rlwinm r3,r28,3,0,28 <== NOT EXECUTED ffc04660: 7c 79 1a 14 add r3,r25,r3 <== NOT EXECUTED ffc04664: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc04668: 54 a5 18 38 rlwinm r5,r5,3,0,28 <== NOT EXECUTED ffc0466c: 48 01 39 95 bl ffc18000 <== NOT EXECUTED disktab = table; ffc04670: 93 37 00 04 stw r25,4(r23) <== NOT EXECUTED disktab_size = new_size; ffc04674: 93 1d 28 70 stw r24,10352(r29) <== NOT EXECUTED ffc04678: 4b ff fe ec b ffc04564 <== NOT EXECUTED new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; } if (minor >= new_size) { new_size = minor + 1; ffc0467c: 3b be 00 01 addi r29,r30,1 ffc04680: 4b ff ff 74 b ffc045f4 rtems_device_minor_number new_size = 0; if (old_size == 0) { new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; ffc04684: 57 1d 08 3c rlwinm r29,r24,1,0,30 <== NOT EXECUTED } if (minor >= new_size) { ffc04688: 7f 9e e8 40 cmplw cr7,r30,r29 <== NOT EXECUTED ffc0468c: 41 bc ff 68 blt- cr7,ffc045f4 <== NOT EXECUTED ffc04690: 4b ff ff ec b ffc0467c <== NOT EXECUTED if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); ffc04694: 38 60 00 38 li r3,56 ffc04698: 48 00 1a a1 bl ffc06138 if (dd == NULL) { return RTEMS_NO_MEMORY; ffc0469c: 3a c0 00 1a li r22,26 if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); if (dd == NULL) { ffc046a0: 7c 7c 1b 79 mr. r28,r3 ffc046a4: 41 a2 ff 00 beq- ffc045a4 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { ffc046a8: 2f 9b 00 00 cmpwi cr7,r27,0 ffc046ac: 41 9e 00 5c beq- cr7,ffc04708 alloc_name = strdup(name); ffc046b0: 7f 63 db 78 mr r3,r27 ffc046b4: 48 01 3d 21 bl ffc183d4 if (alloc_name == NULL) { ffc046b8: 2f 83 00 00 cmpwi cr7,r3,0 if (dd == NULL) { return RTEMS_NO_MEMORY; } if (name != NULL) { alloc_name = strdup(name); ffc046bc: 7c 7b 1b 78 mr r27,r3 ffc046c0: 7c 79 1b 78 mr r25,r3 if (alloc_name == NULL) { ffc046c4: 41 9e 00 64 beq- cr7,ffc04728 <== NEVER TAKEN return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { ffc046c8: 38 80 61 ff li r4,25087 ffc046cc: 7f e5 fb 78 mr r5,r31 ffc046d0: 7f c6 f3 78 mr r6,r30 ffc046d4: 48 00 1b c5 bl ffc06298 ffc046d8: 2f 83 00 00 cmpwi cr7,r3,0 ffc046dc: 41 9c 00 34 blt- cr7,ffc04710 <== NEVER TAKEN } } dd->dev = dev; dd->name = alloc_name; dd->uses = 0; ffc046e0: 38 00 00 00 li r0,0 free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; ffc046e4: 93 fc 00 00 stw r31,0(r28) dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; ffc046e8: 3a c0 00 00 li r22,0 free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; ffc046ec: 93 dc 00 04 stw r30,4(r28) dd->name = alloc_name; ffc046f0: 93 3c 00 10 stw r25,16(r28) dd->uses = 0; ffc046f4: 90 1c 00 14 stw r0,20(r28) dd->deleted = false; ffc046f8: 98 1c 00 30 stb r0,48(r28) *dd_entry = dd; ffc046fc: 93 9d 00 00 stw r28,0(r29) *dd_ptr = dd; ffc04700: 93 9a 00 00 stw r28,0(r26) return RTEMS_SUCCESSFUL; ffc04704: 4b ff fe a0 b ffc045a4 static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; ffc04708: 3b 20 00 00 li r25,0 ffc0470c: 4b ff ff d4 b ffc046e0 } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); ffc04710: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc04714: 48 00 16 09 bl ffc05d1c <== NOT EXECUTED free(dd); ffc04718: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0471c: 48 00 16 01 bl ffc05d1c <== NOT EXECUTED return RTEMS_UNSATISFIED; ffc04720: 3a c0 00 0d li r22,13 <== NOT EXECUTED ffc04724: 4b ff fe 80 b ffc045a4 <== NOT EXECUTED if (name != NULL) { alloc_name = strdup(name); if (alloc_name == NULL) { free(dd); ffc04728: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0472c: 48 00 15 f1 bl ffc05d1c <== NOT EXECUTED return RTEMS_NO_MEMORY; ffc04730: 4b ff fe 74 b ffc045a4 <== NOT EXECUTED =============================================================================== ffc0db08 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0db08: 94 21 ff d8 stwu r1,-40(r1) ffc0db0c: 7c 08 02 a6 mflr r0 ffc0db10: 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 ) ) ffc0db14: 54 a0 00 39 rlwinm. r0,r5,0,0,28 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0db18: 93 01 00 08 stw r24,8(r1) ffc0db1c: 7c d8 33 78 mr r24,r6 ffc0db20: 93 c1 00 20 stw r30,32(r1) ffc0db24: 7c 7e 1b 78 mr r30,r3 ffc0db28: 93 e1 00 24 stw r31,36(r1) ffc0db2c: 7c 9f 23 78 mr r31,r4 ffc0db30: 93 21 00 0c stw r25,12(r1) ffc0db34: 93 41 00 10 stw r26,16(r1) ffc0db38: 93 61 00 14 stw r27,20(r1) ffc0db3c: 93 81 00 18 stw r28,24(r1) ffc0db40: 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 ) ) ffc0db44: 40 82 01 0c bne- ffc0dc50 <== 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; ffc0db48: 83 66 00 00 lwz r27,0(r6) if (!device_name_table) ffc0db4c: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0db50: 41 9e 01 14 beq- cr7,ffc0dc64 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { ffc0db54: 3d 20 00 00 lis r9,0 ffc0db58: 83 49 27 38 lwz r26,10040(r9) ffc0db5c: 38 00 00 00 li r0,0 * handlers. */ extern rtems_filesystem_file_handlers_r devFS_file_handlers; int devFS_evaluate_path( ffc0db60: 3b a0 00 00 li r29,0 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { ffc0db64: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0db68: 41 9e 00 4c beq- cr7,ffc0dbb4 <== NEVER TAKEN if (!device_name_table[i].device_name) ffc0db6c: 1c 00 00 14 mulli r0,r0,20 ffc0db70: 7f 9b 00 2e lwzx r28,r27,r0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0db74: 7f c3 f3 78 mr r3,r30 ffc0db78: 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) ffc0db7c: 2f 9c 00 00 cmpwi cr7,r28,0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0db80: 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++) { ffc0db84: 3b bd 00 01 addi r29,r29,1 if (!device_name_table[i].device_name) ffc0db88: 7f 3b 02 14 add r25,r27,r0 ffc0db8c: 41 9e 00 1c beq- cr7,ffc0dba8 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0db90: 48 00 32 fd bl ffc10e8c ffc0db94: 2f 83 00 00 cmpwi cr7,r3,0 ffc0db98: 40 9e 00 10 bne- cr7,ffc0dba8 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') ffc0db9c: 7c 1c f8 ae lbzx r0,r28,r31 ffc0dba0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dba4: 41 9e 00 50 beq- cr7,ffc0dbf4 <== 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++) { ffc0dba8: 7f 9d d0 00 cmpw cr7,r29,r26 ffc0dbac: 7f a0 eb 78 mr r0,r29 ffc0dbb0: 40 9e ff bc bne+ cr7,ffc0db6c pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); ffc0dbb4: 48 00 20 b5 bl ffc0fc68 <__errno> ffc0dbb8: 38 00 00 02 li r0,2 ffc0dbbc: 90 03 00 00 stw r0,0(r3) ffc0dbc0: 38 60 ff ff li r3,-1 } ffc0dbc4: 80 01 00 2c lwz r0,44(r1) ffc0dbc8: 83 01 00 08 lwz r24,8(r1) ffc0dbcc: 7c 08 03 a6 mtlr r0 ffc0dbd0: 83 21 00 0c lwz r25,12(r1) ffc0dbd4: 83 41 00 10 lwz r26,16(r1) ffc0dbd8: 83 61 00 14 lwz r27,20(r1) ffc0dbdc: 83 81 00 18 lwz r28,24(r1) ffc0dbe0: 83 a1 00 1c lwz r29,28(r1) ffc0dbe4: 83 c1 00 20 lwz r30,32(r1) ffc0dbe8: 83 e1 00 24 lwz r31,36(r1) ffc0dbec: 38 21 00 28 addi r1,r1,40 ffc0dbf0: 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; ffc0dbf4: 3d 20 00 00 lis r9,0 ffc0dbf8: 81 29 27 74 lwz r9,10100(r9) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; ffc0dbfc: 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; ffc0dc00: 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; ffc0dc04: 3d 20 00 00 lis r9,0 ffc0dc08: 39 29 21 84 addi r9,r9,8580 ffc0dc0c: 91 38 00 08 stw r9,8(r24) pathloc->ops = &devFS_ops; ffc0dc10: 3d 20 00 00 lis r9,0 ffc0dc14: 39 29 21 bc addi r9,r9,8636 ffc0dc18: 91 38 00 0c stw r9,12(r24) pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0dc1c: 90 18 00 10 stw r0,16(r24) return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0dc20: 80 01 00 2c lwz r0,44(r1) ffc0dc24: 83 01 00 08 lwz r24,8(r1) ffc0dc28: 7c 08 03 a6 mtlr r0 ffc0dc2c: 83 21 00 0c lwz r25,12(r1) ffc0dc30: 83 41 00 10 lwz r26,16(r1) ffc0dc34: 83 61 00 14 lwz r27,20(r1) ffc0dc38: 83 81 00 18 lwz r28,24(r1) ffc0dc3c: 83 a1 00 1c lwz r29,28(r1) ffc0dc40: 83 c1 00 20 lwz r30,32(r1) ffc0dc44: 83 e1 00 24 lwz r31,36(r1) ffc0dc48: 38 21 00 28 addi r1,r1,40 ffc0dc4c: 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 ); ffc0dc50: 48 00 20 19 bl ffc0fc68 <__errno> <== NOT EXECUTED ffc0dc54: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0dc58: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0dc5c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0dc60: 4b ff ff c0 b ffc0dc20 <== 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 ); ffc0dc64: 48 00 20 05 bl ffc0fc68 <__errno> ffc0dc68: 38 00 00 0e li r0,14 ffc0dc6c: 90 03 00 00 stw r0,0(r3) ffc0dc70: 38 60 ff ff li r3,-1 ffc0dc74: 4b ff ff ac b ffc0dc20 =============================================================================== ffc047c8 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { ffc047c8: 94 21 ff d8 stwu r1,-40(r1) ffc047cc: 7c 08 02 a6 mflr r0 ffc047d0: 93 81 00 18 stw r28,24(r1) ffc047d4: 7c dc 33 78 mr r28,r6 ffc047d8: 93 a1 00 1c stw r29,28(r1) ffc047dc: 7c bd 2b 78 mr r29,r5 ffc047e0: 93 c1 00 20 stw r30,32(r1) ffc047e4: 7c 9e 23 78 mr r30,r4 ffc047e8: 93 e1 00 24 stw r31,36(r1) ffc047ec: 7c 7f 1b 78 mr r31,r3 ffc047f0: 90 01 00 2c stw r0,44(r1) ffc047f4: 93 01 00 08 stw r24,8(r1) ffc047f8: 93 21 00 0c stw r25,12(r1) ffc047fc: 93 41 00 10 stw r26,16(r1) ffc04800: 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') && ffc04804: 88 03 00 00 lbz r0,0(r3) ffc04808: 2f 80 00 64 cmpwi cr7,r0,100 ffc0480c: 41 9e 01 40 beq- cr7,ffc0494c (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) ffc04810: 57 c0 04 26 rlwinm r0,r30,0,16,19 ffc04814: 2f 80 60 00 cmpwi cr7,r0,24576 ffc04818: 41 9e 00 0c beq- cr7,ffc04824 ffc0481c: 2f 80 20 00 cmpwi cr7,r0,8192 ffc04820: 40 9e 01 58 bne- cr7,ffc04978 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; ffc04824: 83 47 00 00 lwz r26,0(r7) if (!device_name_table) ffc04828: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0482c: 41 9e 01 74 beq- cr7,ffc049a0 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ ffc04830: 3d 20 00 00 lis r9,0 ffc04834: 83 29 27 38 lwz r25,10040(r9) ffc04838: 2f 99 00 00 cmpwi cr7,r25,0 ffc0483c: 41 9e 01 50 beq- cr7,ffc0498c ffc04840: 38 00 00 00 li r0,0 #include #include #include "devfs.h" int devFS_mknod( ffc04844: 3b 00 ff ff li r24,-1 ffc04848: 3b 60 00 00 li r27,0 ffc0484c: 48 00 00 20 b ffc0486c 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) ffc04850: 48 00 c4 b9 bl ffc10d08 ffc04854: 2f 83 00 00 cmpwi cr7,r3,0 ffc04858: 41 9e 00 b4 beq- cr7,ffc0490c /* 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++){ ffc0485c: 3b 7b 00 01 addi r27,r27,1 ffc04860: 7f 9b c8 00 cmpw cr7,r27,r25 ffc04864: 7f 60 db 78 mr r0,r27 ffc04868: 41 9e 00 30 beq- cr7,ffc04898 if (device_name_table[i].device_name == NULL) ffc0486c: 1c 00 00 14 mulli r0,r0,20 ffc04870: 7c 1a 00 2e lwzx r0,r26,r0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc04874: 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) ffc04878: 2f 80 00 00 cmpwi cr7,r0,0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc0487c: 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) ffc04880: 40 9e ff d0 bne+ cr7,ffc04850 ffc04884: 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++){ ffc04888: 3b 7b 00 01 addi r27,r27,1 ffc0488c: 7f 9b c8 00 cmpw cr7,r27,r25 ffc04890: 7f 60 db 78 mr r0,r27 ffc04894: 40 9e ff d8 bne+ cr7,ffc0486c else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) ffc04898: 2f 98 ff ff cmpwi cr7,r24,-1 ffc0489c: 41 9e 00 f0 beq- cr7,ffc0498c <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc048a0: 7f 60 00 a6 mfmsr r27 ffc048a4: 7c 10 42 a6 mfsprg r0,0 ffc048a8: 7f 60 00 78 andc r0,r27,r0 ffc048ac: 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; ffc048b0: 1f 18 00 14 mulli r24,r24,20 ffc048b4: 7f fa c1 2e stwx r31,r26,r24 device_name_table[slot].device_name_length = strlen(path); ffc048b8: 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; ffc048bc: 7f 5a c2 14 add r26,r26,r24 device_name_table[slot].device_name_length = strlen(path); ffc048c0: 48 00 c5 11 bl ffc10dd0 device_name_table[slot].major = major; ffc048c4: 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); ffc048c8: 90 7a 00 04 stw r3,4(r26) device_name_table[slot].major = major; device_name_table[slot].minor = minor; ffc048cc: 93 9a 00 0c stw r28,12(r26) device_name_table[slot].mode = mode; ffc048d0: 93 da 00 10 stw r30,16(r26) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc048d4: 7f 60 01 24 mtmsr r27 _ISR_Enable(level); return 0; ffc048d8: 38 60 00 00 li r3,0 } ffc048dc: 80 01 00 2c lwz r0,44(r1) ffc048e0: 83 01 00 08 lwz r24,8(r1) ffc048e4: 7c 08 03 a6 mtlr r0 ffc048e8: 83 21 00 0c lwz r25,12(r1) ffc048ec: 83 41 00 10 lwz r26,16(r1) ffc048f0: 83 61 00 14 lwz r27,20(r1) ffc048f4: 83 81 00 18 lwz r28,24(r1) ffc048f8: 83 a1 00 1c lwz r29,28(r1) ffc048fc: 83 c1 00 20 lwz r30,32(r1) ffc04900: 83 e1 00 24 lwz r31,36(r1) ffc04904: 38 21 00 28 addi r1,r1,40 ffc04908: 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 ); ffc0490c: 48 00 b3 5d bl ffc0fc68 <__errno> ffc04910: 38 00 00 11 li r0,17 ffc04914: 90 03 00 00 stw r0,0(r3) ffc04918: 38 60 ff ff li r3,-1 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } ffc0491c: 80 01 00 2c lwz r0,44(r1) ffc04920: 83 01 00 08 lwz r24,8(r1) ffc04924: 7c 08 03 a6 mtlr r0 ffc04928: 83 21 00 0c lwz r25,12(r1) ffc0492c: 83 41 00 10 lwz r26,16(r1) ffc04930: 83 61 00 14 lwz r27,20(r1) ffc04934: 83 81 00 18 lwz r28,24(r1) ffc04938: 83 a1 00 1c lwz r29,28(r1) ffc0493c: 83 c1 00 20 lwz r30,32(r1) ffc04940: 83 e1 00 24 lwz r31,36(r1) ffc04944: 38 21 00 28 addi r1,r1,40 ffc04948: 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') && ffc0494c: 88 03 00 01 lbz r0,1(r3) ffc04950: 2f 80 00 65 cmpwi cr7,r0,101 ffc04954: 40 9e fe bc bne+ cr7,ffc04810 <== NEVER TAKEN ffc04958: 88 03 00 02 lbz r0,2(r3) ffc0495c: 2f 80 00 76 cmpwi cr7,r0,118 ffc04960: 40 9e fe b0 bne+ cr7,ffc04810 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) ffc04964: 88 03 00 03 lbz r0,3(r3) return 0; ffc04968: 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')) ffc0496c: 2f 80 00 00 cmpwi cr7,r0,0 ffc04970: 40 9e fe a0 bne+ cr7,ffc04810 ffc04974: 4b ff ff 68 b ffc048dc 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 ); ffc04978: 48 00 b2 f1 bl ffc0fc68 <__errno> ffc0497c: 38 00 00 16 li r0,22 ffc04980: 90 03 00 00 stw r0,0(r3) ffc04984: 38 60 ff ff li r3,-1 ffc04988: 4b ff ff 54 b ffc048dc 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 ); ffc0498c: 48 00 b2 dd bl ffc0fc68 <__errno> ffc04990: 38 00 00 0c li r0,12 ffc04994: 90 03 00 00 stw r0,0(r3) ffc04998: 38 60 ff ff li r3,-1 ffc0499c: 4b ff ff 40 b ffc048dc 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 ); ffc049a0: 48 00 b2 c9 bl ffc0fc68 <__errno> ffc049a4: 38 00 00 0e li r0,14 ffc049a8: 90 03 00 00 stw r0,0(r3) ffc049ac: 38 60 ff ff li r3,-1 ffc049b0: 4b ff ff 2c b ffc048dc =============================================================================== ffc04458 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { ffc04458: 94 21 ff f0 stwu r1,-16(r1) ffc0445c: 7c 08 02 a6 mflr r0 rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc04460: 38 80 00 00 li r4,0 */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { ffc04464: 90 01 00 14 stw r0,20(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc04468: 38 a0 00 00 li r5,0 */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { ffc0446c: 93 e1 00 0c stw r31,12(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc04470: 3f e0 00 00 lis r31,0 ffc04474: 3b ff 28 70 addi r31,r31,10352 ffc04478: 80 7f 00 08 lwz r3,8(r31) ffc0447c: 48 00 5d 19 bl ffc0a194 if (sc == RTEMS_SUCCESSFUL) { ffc04480: 2f 83 00 00 cmpwi cr7,r3,0 diskdevs_protected = true; return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; ffc04484: 38 60 00 16 li r3,22 disk_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc == RTEMS_SUCCESSFUL) { ffc04488: 41 9e 00 18 beq- cr7,ffc044a0 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } ffc0448c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc04490: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc04494: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc04498: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0449c: 4e 80 00 20 blr <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc == RTEMS_SUCCESSFUL) { diskdevs_protected = true; ffc044a0: 38 00 00 01 li r0,1 ffc044a4: 98 1f 00 0c stb r0,12(r31) return RTEMS_SUCCESSFUL; ffc044a8: 38 60 00 00 li r3,0 } else { return RTEMS_NOT_CONFIGURED; } } ffc044ac: 80 01 00 14 lwz r0,20(r1) ffc044b0: 83 e1 00 0c lwz r31,12(r1) ffc044b4: 38 21 00 10 addi r1,r1,16 ffc044b8: 7c 08 03 a6 mtlr r0 ffc044bc: 4e 80 00 20 blr =============================================================================== ffc044c0 : static void disk_unlock(void) { ffc044c0: 94 21 ff f8 stwu r1,-8(r1) ffc044c4: 7c 08 02 a6 mflr r0 rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; ffc044c8: 3d 20 00 00 lis r9,0 } } static void disk_unlock(void) { ffc044cc: 90 01 00 0c stw r0,12(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; ffc044d0: 39 29 28 70 addi r9,r9,10352 ffc044d4: 38 00 00 00 li r0,0 sc = rtems_semaphore_release(diskdevs_mutex); ffc044d8: 80 69 00 08 lwz r3,8(r9) static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; ffc044dc: 98 09 00 0c stb r0,12(r9) sc = rtems_semaphore_release(diskdevs_mutex); ffc044e0: 48 00 5e 41 bl ffc0a320 if (sc != RTEMS_SUCCESSFUL) { ffc044e4: 2f 83 00 00 cmpwi cr7,r3,0 ffc044e8: 40 9e 00 14 bne- cr7,ffc044fc <== NEVER TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); } } ffc044ec: 80 01 00 0c lwz r0,12(r1) ffc044f0: 38 21 00 08 addi r1,r1,8 ffc044f4: 7c 08 03 a6 mtlr r0 ffc044f8: 4e 80 00 20 blr diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); if (sc != RTEMS_SUCCESSFUL) { /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); ffc044fc: 3c 60 de ad lis r3,-8531 <== NOT EXECUTED ffc04500: 60 63 be ef ori r3,r3,48879 <== NOT EXECUTED ffc04504: 48 00 65 a9 bl ffc0aaac <== NOT EXECUTED =============================================================================== ffc06568 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) ffc06568: 94 21 ff f0 stwu r1,-16(r1) ffc0656c: 7c 08 02 a6 mflr r0 ffc06570: 90 01 00 14 stw r0,20(r1) ffc06574: 93 e1 00 0c stw r31,12(r1) ffc06578: 7c 7f 1b 78 mr r31,r3 ffc0657c: 93 c1 00 08 stw r30,8(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc06580: 7c 00 00 a6 mfmsr r0 ffc06584: 7d 30 42 a6 mfsprg r9,0 ffc06588: 7c 09 48 78 andc r9,r0,r9 ffc0658c: 7d 20 01 24 mtmsr r9 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { ffc06590: 81 63 00 84 lwz r11,132(r3) ffc06594: 81 23 00 80 lwz r9,128(r3) ffc06598: 7f 8b 48 00 cmpw cr7,r11,r9 ffc0659c: 41 9e 00 48 beq- cr7,ffc065e4 <== ALWAYS TAKEN tty->rawOutBufState = rob_wait; ffc065a0: 3b c0 00 02 li r30,2 <== NOT EXECUTED ffc065a4: 93 df 00 94 stw r30,148(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc065a8: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( ffc065ac: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc065b0: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc065b4: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc065b8: 48 00 2e 21 bl ffc093d8 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc065bc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc065c0: 40 9e 00 40 bne- cr7,ffc06600 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc065c4: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc065c8: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc065cc: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc065d0: 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) { ffc065d4: 81 7f 00 84 lwz r11,132(r31) <== NOT EXECUTED ffc065d8: 81 3f 00 80 lwz r9,128(r31) <== NOT EXECUTED ffc065dc: 7f 8b 48 00 cmpw cr7,r11,r9 <== NOT EXECUTED ffc065e0: 40 9e ff c4 bne+ cr7,ffc065a4 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc065e4: 7c 00 01 24 mtmsr r0 rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); } } ffc065e8: 80 01 00 14 lwz r0,20(r1) ffc065ec: 83 c1 00 08 lwz r30,8(r1) ffc065f0: 7c 08 03 a6 mtlr r0 ffc065f4: 83 e1 00 0c lwz r31,12(r1) ffc065f8: 38 21 00 10 addi r1,r1,16 ffc065fc: 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); ffc06600: 48 00 37 3d bl ffc09d3c <== NOT EXECUTED =============================================================================== ffc0743c : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { ffc0743c: 94 21 ff e0 stwu r1,-32(r1) ffc07440: 7c 08 02 a6 mflr r0 ffc07444: 90 01 00 24 stw r0,36(r1) if ((tty->termios.c_lflag & ECHOCTL) && ffc07448: 81 24 00 3c lwz r9,60(r4) /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { ffc0744c: 93 e1 00 1c stw r31,28(r1) ffc07450: 7c 9f 23 78 mr r31,r4 if ((tty->termios.c_lflag & ECHOCTL) && ffc07454: 71 20 02 00 andi. r0,r9,512 ffc07458: 41 82 00 2c beq- ffc07484 <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { ffc0745c: 3d 20 00 00 lis r9,0 ffc07460: 81 29 27 44 lwz r9,10052(r9) ffc07464: 7d 29 1a 14 add r9,r9,r3 ffc07468: 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) && ffc0746c: 70 09 00 20 andi. r9,r0,32 ffc07470: 41 82 00 14 beq- ffc07484 iscntrl(c) && (c != '\t') && (c != '\n')) { ffc07474: 2f 83 00 09 cmpwi cr7,r3,9 ffc07478: 41 9e 00 0c beq- cr7,ffc07484 ffc0747c: 2f 83 00 0a cmpwi cr7,r3,10 ffc07480: 40 9e 00 20 bne- cr7,ffc074a0 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); ffc07484: 7f e4 fb 78 mr r4,r31 ffc07488: 4b ff fe 29 bl ffc072b0 } } ffc0748c: 80 01 00 24 lwz r0,36(r1) ffc07490: 83 e1 00 1c lwz r31,28(r1) ffc07494: 38 21 00 20 addi r1,r1,32 ffc07498: 7c 08 03 a6 mtlr r0 ffc0749c: 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; ffc074a0: 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] = '^'; ffc074a4: 39 20 00 5e li r9,94 echobuf[1] = c ^ 0x40; ffc074a8: 98 01 00 09 stb r0,9(r1) rtems_termios_puts (echobuf, 2, tty); ffc074ac: 38 61 00 08 addi r3,r1,8 ffc074b0: 7f e5 fb 78 mr r5,r31 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; ffc074b4: 99 21 00 08 stb r9,8(r1) echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); ffc074b8: 38 80 00 02 li r4,2 ffc074bc: 4b ff fc 45 bl ffc07100 tty->column += 2; ffc074c0: 81 3f 00 28 lwz r9,40(r31) ffc074c4: 38 09 00 02 addi r0,r9,2 ffc074c8: 90 1f 00 28 stw r0,40(r31) } else { oproc (c, tty); } } ffc074cc: 80 01 00 24 lwz r0,36(r1) ffc074d0: 83 e1 00 1c lwz r31,28(r1) ffc074d4: 38 21 00 20 addi r1,r1,32 ffc074d8: 7c 08 03 a6 mtlr r0 ffc074dc: 4e 80 00 20 blr =============================================================================== ffc06158 : void endgrent(void) { if (group_fp != NULL) ffc06158: 3d 20 00 00 lis r9,0 fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc0615c: 94 21 ff f8 stwu r1,-8(r1) ffc06160: 7c 08 02 a6 mflr r0 if (group_fp != NULL) ffc06164: 80 69 2a 1c lwz r3,10780(r9) fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc06168: 90 01 00 0c stw r0,12(r1) if (group_fp != NULL) ffc0616c: 2f 83 00 00 cmpwi cr7,r3,0 ffc06170: 41 9e 00 08 beq- cr7,ffc06178 <== NEVER TAKEN fclose(group_fp); ffc06174: 48 00 d8 ed bl ffc13a60 } ffc06178: 80 01 00 0c lwz r0,12(r1) ffc0617c: 38 21 00 08 addi r1,r1,8 ffc06180: 7c 08 03 a6 mtlr r0 ffc06184: 4e 80 00 20 blr =============================================================================== ffc05f8c : void endpwent(void) { if (passwd_fp != NULL) ffc05f8c: 3d 20 00 00 lis r9,0 fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc05f90: 94 21 ff f8 stwu r1,-8(r1) ffc05f94: 7c 08 02 a6 mflr r0 if (passwd_fp != NULL) ffc05f98: 80 69 29 40 lwz r3,10560(r9) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc05f9c: 90 01 00 0c stw r0,12(r1) if (passwd_fp != NULL) ffc05fa0: 2f 83 00 00 cmpwi cr7,r3,0 ffc05fa4: 41 9e 00 08 beq- cr7,ffc05fac <== NEVER TAKEN fclose(passwd_fp); ffc05fa8: 48 00 da b9 bl ffc13a60 } ffc05fac: 80 01 00 0c lwz r0,12(r1) ffc05fb0: 38 21 00 08 addi r1,r1,8 ffc05fb4: 7c 08 03 a6 mtlr r0 ffc05fb8: 4e 80 00 20 blr =============================================================================== ffc074e0 : * 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) { ffc074e0: 94 21 ff d8 stwu r1,-40(r1) ffc074e4: 7c 08 02 a6 mflr r0 ffc074e8: 7d 80 00 26 mfcr r12 ffc074ec: 90 01 00 2c stw r0,44(r1) if (tty->ccount == 0) ffc074f0: 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) { ffc074f4: 93 e1 00 24 stw r31,36(r1) ffc074f8: 7c 7f 1b 78 mr r31,r3 if (tty->ccount == 0) ffc074fc: 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) { ffc07500: 93 41 00 10 stw r26,16(r1) ffc07504: 93 61 00 14 stw r27,20(r1) ffc07508: 93 81 00 18 stw r28,24(r1) ffc0750c: 93 a1 00 1c stw r29,28(r1) ffc07510: 93 c1 00 20 stw r30,32(r1) ffc07514: 91 81 00 0c stw r12,12(r1) if (tty->ccount == 0) ffc07518: 41 9e 00 9c beq- cr7,ffc075b4 return; if (lineFlag) { ffc0751c: 2e 04 00 00 cmpwi cr4,r4,0 if (!(tty->termios.c_lflag & ECHO)) { ffc07520: 80 03 00 3c lwz r0,60(r3) ffc07524: 54 0b 07 38 rlwinm r11,r0,0,28,28 static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { ffc07528: 40 92 00 80 bne- cr4,ffc075a8 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc0752c: 3f 60 ff c2 lis r27,-62 ffc07530: 3f a0 ff c2 lis r29,-62 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc07534: 3f 80 00 00 lis r28,0 rtems_termios_puts ("\b \b", 3, tty); ffc07538: 3b 7b f4 58 addi r27,r27,-2984 ffc0753c: 3b bd f4 54 addi r29,r29,-2988 } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { ffc07540: 2f 8b 00 00 cmpwi cr7,r11,0 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; ffc07544: 81 5f 00 1c lwz r10,28(r31) ffc07548: 39 29 ff ff addi r9,r9,-1 ffc0754c: 91 3f 00 20 stw r9,32(r31) ffc07550: 7f ca 48 ae lbzx r30,r10,r9 if (tty->termios.c_lflag & ECHO) { ffc07554: 41 9e 00 38 beq- cr7,ffc0758c <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { ffc07558: 40 92 00 0c bne- cr4,ffc07564 ffc0755c: 70 0b 00 10 andi. r11,r0,16 ffc07560: 41 82 01 e4 beq- ffc07744 <== NEVER TAKEN echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { ffc07564: 2f 9e 00 09 cmpwi cr7,r30,9 ffc07568: 41 9e 00 e4 beq- cr7,ffc0764c rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc0756c: 81 3c 27 44 lwz r9,10052(r28) ffc07570: 3b de 00 01 addi r30,r30,1 ffc07574: 7f 7a db 78 mr r26,r27 ffc07578: 7d 29 f0 ae lbzx r9,r9,r30 ffc0757c: 71 2b 00 20 andi. r11,r9,32 ffc07580: 41 82 00 a4 beq- ffc07624 <== ALWAYS TAKEN ffc07584: 70 09 02 00 andi. r9,r0,512 <== NOT EXECUTED ffc07588: 40 82 00 5c bne- ffc075e4 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) ffc0758c: 41 92 00 28 beq- cr4,ffc075b4 echo ('\n', tty); return; } } while (tty->ccount) { ffc07590: 81 3f 00 20 lwz r9,32(r31) ffc07594: 2f 89 00 00 cmpwi cr7,r9,0 ffc07598: 41 9e 00 1c beq- cr7,ffc075b4 } 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); ffc0759c: 80 1f 00 3c lwz r0,60(r31) ffc075a0: 54 0b 07 38 rlwinm r11,r0,0,28,28 ffc075a4: 4b ff ff 9c b ffc07540 erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { ffc075a8: 70 0b 00 08 andi. r11,r0,8 ffc075ac: 40 a2 01 3c bne+ ffc076e8 <== ALWAYS TAKEN tty->ccount = 0; ffc075b0: 91 63 00 20 stw r11,32(r3) <== NOT EXECUTED } } if (!lineFlag) break; } } ffc075b4: 80 01 00 2c lwz r0,44(r1) ffc075b8: 81 81 00 0c lwz r12,12(r1) ffc075bc: 7c 08 03 a6 mtlr r0 ffc075c0: 83 41 00 10 lwz r26,16(r1) ffc075c4: 83 61 00 14 lwz r27,20(r1) ffc075c8: 7d 80 81 20 mtcrf 8,r12 ffc075cc: 83 81 00 18 lwz r28,24(r1) ffc075d0: 83 a1 00 1c lwz r29,28(r1) ffc075d4: 83 c1 00 20 lwz r30,32(r1) ffc075d8: 83 e1 00 24 lwz r31,36(r1) ffc075dc: 38 21 00 28 addi r1,r1,40 ffc075e0: 4e 80 00 20 blr tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc075e4: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc075e8: 38 80 00 03 li r4,3 <== NOT EXECUTED ffc075ec: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc075f0: 4b ff fb 11 bl ffc07100 <== NOT EXECUTED if (tty->column) ffc075f4: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED ffc075f8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc075fc: 41 9e 00 0c beq- cr7,ffc07608 <== NOT EXECUTED tty->column--; ffc07600: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc07604: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { ffc07608: 81 3c 27 44 lwz r9,10052(r28) <== NOT EXECUTED ffc0760c: 7c 09 f0 ae lbzx r0,r9,r30 <== NOT EXECUTED ffc07610: 70 0b 00 20 andi. r11,r0,32 <== NOT EXECUTED ffc07614: 41 82 00 10 beq- ffc07624 <== NOT EXECUTED ffc07618: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED ffc0761c: 70 09 02 00 andi. r9,r0,512 <== NOT EXECUTED ffc07620: 41 a2 ff 6c beq- ffc0758c <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); ffc07624: 7f 43 d3 78 mr r3,r26 ffc07628: 38 80 00 03 li r4,3 ffc0762c: 7f e5 fb 78 mr r5,r31 ffc07630: 4b ff fa d1 bl ffc07100 if (tty->column) ffc07634: 81 3f 00 28 lwz r9,40(r31) ffc07638: 2f 89 00 00 cmpwi cr7,r9,0 ffc0763c: 41 be ff 50 beq- cr7,ffc0758c <== NEVER TAKEN tty->column--; ffc07640: 39 29 ff ff addi r9,r9,-1 ffc07644: 91 3f 00 28 stw r9,40(r31) ffc07648: 4b ff ff 44 b ffc0758c int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc0764c: 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; ffc07650: 83 df 00 2c lwz r30,44(r31) int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc07654: 41 9e 00 44 beq- cr7,ffc07698 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) ffc07658: 7d 29 03 a6 mtctr r9 ffc0765c: 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)) { ffc07660: 81 1c 27 44 lwz r8,10052(r28) if (tty->termios.c_lflag & ECHOCTL) ffc07664: 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; ffc07668: 39 60 00 00 li r11,0 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; ffc0766c: 7c 0a 58 ae lbzx r0,r10,r11 ffc07670: 39 6b 00 01 addi r11,r11,1 if (c == '\t') { ffc07674: 2f 80 00 09 cmpwi cr7,r0,9 col = (col | 7) + 1; } else if (iscntrl (c)) { ffc07678: 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') { ffc0767c: 41 9e 00 5c beq- cr7,ffc076d8 col = (col | 7) + 1; } else if (iscntrl (c)) { ffc07680: 88 09 00 01 lbz r0,1(r9) ffc07684: 70 09 00 20 andi. r9,r0,32 ffc07688: 41 82 00 44 beq- ffc076cc <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) ffc0768c: 41 9a 00 08 beq- cr6,ffc07694 <== NOT EXECUTED col += 2; ffc07690: 3b de 00 02 addi r30,r30,2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc07694: 42 00 ff d8 bdnz+ ffc0766c <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { ffc07698: 80 1f 00 28 lwz r0,40(r31) ffc0769c: 7f 9e 00 00 cmpw cr7,r30,r0 ffc076a0: 40 bc fe ec bge- cr7,ffc0758c <== NEVER TAKEN rtems_termios_puts ("\b", 1, tty); ffc076a4: 7f a3 eb 78 mr r3,r29 ffc076a8: 38 80 00 01 li r4,1 ffc076ac: 7f e5 fb 78 mr r5,r31 ffc076b0: 4b ff fa 51 bl ffc07100 tty->column--; ffc076b4: 81 3f 00 28 lwz r9,40(r31) ffc076b8: 38 09 ff ff addi r0,r9,-1 } /* * Back up over the tab */ while (tty->column > col) { ffc076bc: 7f 80 f0 00 cmpw cr7,r0,r30 rtems_termios_puts ("\b", 1, tty); tty->column--; ffc076c0: 90 1f 00 28 stw r0,40(r31) } /* * Back up over the tab */ while (tty->column > col) { ffc076c4: 41 9d ff e0 bgt+ cr7,ffc076a4 ffc076c8: 4b ff fe c4 b ffc0758c col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; ffc076cc: 3b de 00 01 addi r30,r30,1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc076d0: 42 00 ff 9c bdnz+ ffc0766c ffc076d4: 4b ff ff c4 b ffc07698 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; ffc076d8: 63 de 00 07 ori r30,r30,7 ffc076dc: 3b de 00 01 addi r30,r30,1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc076e0: 42 00 ff 8c bdnz+ ffc0766c ffc076e4: 4b ff ff b4 b ffc07698 <== NOT EXECUTED if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { ffc076e8: 70 0a 00 10 andi. r10,r0,16 ffc076ec: 40 82 fe 40 bne+ ffc0752c <== ALWAYS TAKEN tty->ccount = 0; ffc076f0: 91 43 00 20 stw r10,32(r3) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); ffc076f4: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED ffc076f8: 88 63 00 44 lbz r3,68(r3) <== NOT EXECUTED ffc076fc: 4b ff fd 41 bl ffc0743c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) ffc07700: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED echo ('\n', tty); ffc07704: 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) ffc07708: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc0770c: 41 82 fe a8 beq+ ffc075b4 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc07710: 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); ffc07714: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc07718: 81 81 00 0c lwz r12,12(r1) <== NOT EXECUTED ffc0771c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc07720: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc07724: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc07728: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc0772c: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc07730: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc07734: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc07738: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0773c: 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); ffc07740: 4b ff fc fc b ffc0743c <== NOT EXECUTED } } if (!lineFlag) break; } } ffc07744: 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); ffc07748: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc0774c: 81 81 00 0c lwz r12,12(r1) <== NOT EXECUTED ffc07750: 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); ffc07754: 88 7f 00 43 lbz r3,67(r31) <== NOT EXECUTED } } if (!lineFlag) break; } } ffc07758: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc0775c: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc07760: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc07764: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc07768: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0776c: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc07770: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc07774: 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); ffc07778: 4b ff fc c4 b ffc0743c <== NOT EXECUTED =============================================================================== ffc18190 : #include "fat_fat_operations.h" int fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type, rtems_bdbuf_buffer **buf) { ffc18190: 94 21 ff d0 stwu r1,-48(r1) ffc18194: 7c 08 02 a6 mflr r0 ffc18198: 7d 80 00 26 mfcr r12 ffc1819c: 93 61 00 1c stw r27,28(r1) ffc181a0: 7c db 33 78 mr r27,r6 ffc181a4: 93 81 00 20 stw r28,32(r1) ffc181a8: 7c bc 2b 78 mr r28,r5 ffc181ac: 93 a1 00 24 stw r29,36(r1) ffc181b0: 7c 9d 23 78 mr r29,r4 ffc181b4: 93 e1 00 2c stw r31,44(r1) ffc181b8: 7c 7f 1b 78 mr r31,r3 ffc181bc: 90 01 00 34 stw r0,52(r1) ffc181c0: 93 c1 00 28 stw r30,40(r1) ffc181c4: 91 81 00 18 stw r12,24(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) ffc181c8: 88 03 00 85 lbz r0,133(r3) ffc181cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc181d0: 41 9e 01 70 beq- cr7,ffc18340 ffc181d4: 80 03 00 80 lwz r0,128(r3) fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && ffc181d8: 39 20 00 00 li r9,0 ffc181dc: a1 7f 00 14 lhz r11,20(r31) ffc181e0: 7f 8b 00 40 cmplw cr7,r11,r0 ffc181e4: 40 9d 01 a4 ble- cr7,ffc18388 <== ALWAYS TAKEN (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) ffc181e8: 7f 9d 00 00 cmpw cr7,r29,r0 ffc181ec: 41 9e 01 1c beq- cr7,ffc18308 { if (fs_info->c.modified) ffc181f0: 8b df 00 84 lbz r30,132(r31) ffc181f4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc181f8: 41 9e 00 cc beq- cr7,ffc182c4 { if (sec_of_fat && !fs_info->vol.mirror) ffc181fc: 2e 09 00 00 cmpwi cr4,r9,0 ffc18200: 41 92 00 10 beq- cr4,ffc18210 <== ALWAYS TAKEN ffc18204: 88 1f 00 48 lbz r0,72(r31) <== NOT EXECUTED ffc18208: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc1820c: 41 9e 01 98 beq- cr7,ffc183a4 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); ffc18210: 80 7f 00 88 lwz r3,136(r31) ffc18214: 4b ff e1 d5 bl ffc163e8 fs_info->c.state = FAT_CACHE_EMPTY; ffc18218: 38 00 00 00 li r0,0 fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) ffc1821c: 2f 83 00 00 cmpwi cr7,r3,0 if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; ffc18220: 98 1f 00 85 stb r0,133(r31) fs_info->c.modified = 0; ffc18224: 98 1f 00 84 stb r0,132(r31) if (sc != RTEMS_SUCCESSFUL) ffc18228: 40 9e 01 9c bne- cr7,ffc183c4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) ffc1822c: 41 92 00 ac beq- cr4,ffc182d8 <== ALWAYS TAKEN ffc18230: 88 1f 00 48 lbz r0,72(r31) <== NOT EXECUTED ffc18234: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc18238: 40 9e 00 a0 bne- cr7,ffc182d8 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc1823c: 88 1f 00 09 lbz r0,9(r31) <== NOT EXECUTED ffc18240: 2b 80 00 01 cmplwi cr7,r0,1 <== NOT EXECUTED ffc18244: 40 9d 00 94 ble- cr7,ffc182d8 <== NOT EXECUTED ffc18248: 3b c0 00 01 li r30,1 <== NOT EXECUTED ffc1824c: 48 00 00 3c b ffc18288 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); ffc18250: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc18254: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); ffc18258: 80 9f 00 8c lwz r4,140(r31) <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc1825c: 57 de 06 3e clrlwi r30,r30,24 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); ffc18260: a0 bf 00 00 lhz r5,0(r31) <== NOT EXECUTED ffc18264: 80 69 00 24 lwz r3,36(r9) <== NOT EXECUTED ffc18268: 48 00 bb ad bl ffc23e14 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); ffc1826c: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED ffc18270: 4b ff e1 79 bl ffc163e8 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) ffc18274: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc18278: 40 9e 00 38 bne- cr7,ffc182b0 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc1827c: 88 1f 00 09 lbz r0,9(r31) <== NOT EXECUTED ffc18280: 7f 80 f0 40 cmplw cr7,r0,r30 <== NOT EXECUTED ffc18284: 40 9d 00 54 ble- cr7,ffc182d8 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc18288: 80 bf 00 18 lwz r5,24(r31) <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, ffc1828c: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc18290: 80 1f 00 80 lwz r0,128(r31) <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc18294: 7c be 29 d6 mullw r5,r30,r5 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, ffc18298: 80 7f 00 58 lwz r3,88(r31) <== NOT EXECUTED ffc1829c: 80 9f 00 5c lwz r4,92(r31) <== NOT EXECUTED ffc182a0: 7c a5 02 14 add r5,r5,r0 <== NOT EXECUTED ffc182a4: 4b ff db bd bl ffc15e60 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) ffc182a8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc182ac: 41 9e ff a4 beq+ cr7,ffc18250 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); ffc182b0: 48 00 ad 31 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc182b4: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc182b8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc182bc: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc182c0: 48 00 00 54 b ffc18314 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); ffc182c4: 80 7f 00 88 lwz r3,136(r31) ffc182c8: 4b ff e0 19 bl ffc162e0 fs_info->c.state = FAT_CACHE_EMPTY; ffc182cc: 9b df 00 85 stb r30,133(r31) if (sc != RTEMS_SUCCESSFUL) ffc182d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc182d4: 40 9e 00 f0 bne- cr7,ffc183c4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) ffc182d8: 2f 9c 00 01 cmpwi cr7,r28,1 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); ffc182dc: 80 7f 00 58 lwz r3,88(r31) ffc182e0: 80 9f 00 5c lwz r4,92(r31) ffc182e4: 7f a5 eb 78 mr r5,r29 ffc182e8: 38 df 00 88 addi r6,r31,136 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) ffc182ec: 41 9e 00 d0 beq- cr7,ffc183bc sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); ffc182f0: 4b ff db 71 bl ffc15e60 if (sc != RTEMS_SUCCESSFUL) ffc182f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc182f8: 40 9e 00 cc bne- cr7,ffc183c4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; ffc182fc: 38 00 00 01 li r0,1 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; ffc18300: 93 bf 00 80 stw r29,128(r31) fs_info->c.state = FAT_CACHE_ACTUAL; ffc18304: 98 1f 00 85 stb r0,133(r31) } *buf = fs_info->c.buf; ffc18308: 80 1f 00 88 lwz r0,136(r31) return RC_OK; ffc1830c: 38 60 00 00 li r3,0 if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; } *buf = fs_info->c.buf; ffc18310: 90 1b 00 00 stw r0,0(r27) return RC_OK; } ffc18314: 80 01 00 34 lwz r0,52(r1) ffc18318: 81 81 00 18 lwz r12,24(r1) ffc1831c: 7c 08 03 a6 mtlr r0 ffc18320: 83 61 00 1c lwz r27,28(r1) ffc18324: 83 81 00 20 lwz r28,32(r1) ffc18328: 7d 80 81 20 mtcrf 8,r12 ffc1832c: 83 a1 00 24 lwz r29,36(r1) ffc18330: 83 c1 00 28 lwz r30,40(r1) ffc18334: 83 e1 00 2c lwz r31,44(r1) ffc18338: 38 21 00 30 addi r1,r1,48 ffc1833c: 4e 80 00 20 blr bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) ffc18340: 2f 9c 00 01 cmpwi cr7,r28,1 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); ffc18344: 80 63 00 58 lwz r3,88(r3) ffc18348: 80 9f 00 5c lwz r4,92(r31) ffc1834c: 7f a5 eb 78 mr r5,r29 ffc18350: 38 df 00 88 addi r6,r31,136 bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) ffc18354: 41 9e 00 48 beq- cr7,ffc1839c sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); ffc18358: 4b ff db 09 bl ffc15e60 if (sc != RTEMS_SUCCESSFUL) ffc1835c: 2f 83 00 00 cmpwi cr7,r3,0 ffc18360: 40 9e 00 64 bne- cr7,ffc183c4 <== NEVER TAKEN fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && ffc18364: a1 7f 00 14 lhz r11,20(r31) sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; ffc18368: 7f a0 eb 78 mr r0,r29 ffc1836c: 39 20 00 01 li r9,1 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; ffc18370: 93 bf 00 80 stw r29,128(r31) fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && ffc18374: 7f 8b 00 40 cmplw cr7,r11,r0 sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; ffc18378: 99 3f 00 85 stb r9,133(r31) } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && ffc1837c: 39 20 00 00 li r9,0 else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.modified = 0; ffc18380: 98 7f 00 84 stb r3,132(r31) fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && ffc18384: 41 bd fe 64 bgt- cr7,ffc181e8 <== NEVER TAKEN ffc18388: 81 3f 00 1c lwz r9,28(r31) ffc1838c: 7d 29 00 10 subfc r9,r9,r0 ffc18390: 7d 29 49 10 subfe r9,r9,r9 ffc18394: 7d 29 00 d0 neg r9,r9 ffc18398: 4b ff fe 50 b ffc181e8 if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); ffc1839c: 4b ff db e9 bl ffc15f84 ffc183a0: 4b ff ff bc b ffc1835c if (fs_info->c.blk_num != blk) { if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, ffc183a4: 81 3f 00 88 lwz r9,136(r31) <== NOT EXECUTED ffc183a8: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc183ac: 80 89 00 24 lwz r4,36(r9) <== NOT EXECUTED ffc183b0: a0 bf 00 00 lhz r5,0(r31) <== NOT EXECUTED ffc183b4: 48 00 ba 61 bl ffc23e14 <== NOT EXECUTED ffc183b8: 4b ff fe 58 b ffc18210 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); ffc183bc: 4b ff db c9 bl ffc15f84 ffc183c0: 4b ff ff 34 b ffc182f4 else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); ffc183c4: 48 00 ac 1d bl ffc22fe0 <__errno> <== NOT EXECUTED ffc183c8: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc183cc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc183d0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc183d4: 4b ff ff 40 b ffc18314 <== NOT EXECUTED =============================================================================== ffc183d8 : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { ffc183d8: 94 21 ff d8 stwu r1,-40(r1) ffc183dc: 7c 08 02 a6 mflr r0 ffc183e0: 7d 80 00 26 mfcr r12 ffc183e4: 93 e1 00 24 stw r31,36(r1) ffc183e8: 7c 7f 1b 78 mr r31,r3 ffc183ec: 90 01 00 2c stw r0,44(r1) ffc183f0: 93 c1 00 20 stw r30,32(r1) ffc183f4: 91 81 00 1c stw r12,28(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) ffc183f8: 88 03 00 85 lbz r0,133(r3) return RC_OK; ffc183fc: 38 60 00 00 li r3,0 { rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) ffc18400: 2f 80 00 00 cmpwi cr7,r0,0 ffc18404: 41 9e 00 f0 beq- cr7,ffc184f4 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && ffc18408: 81 3f 00 80 lwz r9,128(r31) ffc1840c: 38 00 00 00 li r0,0 ffc18410: a1 7f 00 14 lhz r11,20(r31) ffc18414: 7f 89 58 40 cmplw cr7,r9,r11 ffc18418: 41 9c 00 14 blt- cr7,ffc1842c <== NEVER TAKEN *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) ffc1841c: 80 1f 00 1c lwz r0,28(r31) ffc18420: 7c 00 48 10 subfc r0,r0,r9 ffc18424: 7c 00 01 10 subfe r0,r0,r0 ffc18428: 7c 00 00 d0 neg r0,r0 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) ffc1842c: 89 3f 00 84 lbz r9,132(r31) ffc18430: 2f 89 00 00 cmpwi cr7,r9,0 ffc18434: 41 9e 00 e0 beq- cr7,ffc18514 { if (sec_of_fat && !fs_info->vol.mirror) ffc18438: 2e 00 00 00 cmpwi cr4,r0,0 ffc1843c: 41 92 00 10 beq- cr4,ffc1844c ffc18440: 88 1f 00 48 lbz r0,72(r31) ffc18444: 2f 80 00 00 cmpwi cr7,r0,0 ffc18448: 41 9e 01 08 beq- cr7,ffc18550 <== ALWAYS TAKEN memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); ffc1844c: 80 7f 00 88 lwz r3,136(r31) ffc18450: 4b ff df 99 bl ffc163e8 if (sc != RTEMS_SUCCESSFUL) ffc18454: 2c 03 00 00 cmpwi r3,0 ffc18458: 40 82 01 10 bne- ffc18568 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; ffc1845c: 98 7f 00 84 stb r3,132(r31) if (sec_of_fat && !fs_info->vol.mirror) ffc18460: 41 92 00 c4 beq- cr4,ffc18524 ffc18464: 88 1f 00 48 lbz r0,72(r31) ffc18468: 2f 80 00 00 cmpwi cr7,r0,0 ffc1846c: 40 9e 00 b8 bne- cr7,ffc18524 <== NEVER TAKEN { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc18470: 88 1f 00 09 lbz r0,9(r31) ffc18474: 2b 80 00 01 cmplwi cr7,r0,1 ffc18478: 40 9d 00 ac ble- cr7,ffc18524 <== NEVER TAKEN ffc1847c: 3b c0 00 01 li r30,1 ffc18480: 48 00 00 3c b ffc184bc fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); ffc18484: 81 21 00 08 lwz r9,8(r1) if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc18488: 3b de 00 01 addi r30,r30,1 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); ffc1848c: 80 9f 00 8c lwz r4,140(r31) if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc18490: 57 de 06 3e clrlwi r30,r30,24 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); ffc18494: a0 bf 00 00 lhz r5,0(r31) ffc18498: 80 69 00 24 lwz r3,36(r9) ffc1849c: 48 00 b9 79 bl ffc23e14 sc = rtems_bdbuf_release_modified(b); ffc184a0: 80 61 00 08 lwz r3,8(r1) ffc184a4: 4b ff df 45 bl ffc163e8 if ( sc != RTEMS_SUCCESSFUL) ffc184a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc184ac: 40 9e 00 38 bne- cr7,ffc184e4 <== NEVER TAKEN if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc184b0: 88 1f 00 09 lbz r0,9(r31) ffc184b4: 7f 80 f0 40 cmplw cr7,r0,r30 ffc184b8: 40 9d 00 6c ble- cr7,ffc18524 <== ALWAYS TAKEN { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc184bc: 80 bf 00 18 lwz r5,24(r31) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, ffc184c0: 38 c1 00 08 addi r6,r1,8 ffc184c4: 80 1f 00 80 lwz r0,128(r31) fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc184c8: 7c be 29 d6 mullw r5,r30,r5 { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, ffc184cc: 80 7f 00 58 lwz r3,88(r31) ffc184d0: 80 9f 00 5c lwz r4,92(r31) ffc184d4: 7c a5 02 14 add r5,r5,r0 ffc184d8: 4b ff d9 89 bl ffc15e60 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) ffc184dc: 2f 83 00 00 cmpwi cr7,r3,0 ffc184e0: 41 9e ff a4 beq+ cr7,ffc18484 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); ffc184e4: 48 00 aa fd bl ffc22fe0 <__errno> <== NOT EXECUTED ffc184e8: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc184ec: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc184f0: 38 60 ff ff li r3,-1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } ffc184f4: 80 01 00 2c lwz r0,44(r1) ffc184f8: 81 81 00 1c lwz r12,28(r1) ffc184fc: 7c 08 03 a6 mtlr r0 ffc18500: 83 c1 00 20 lwz r30,32(r1) ffc18504: 83 e1 00 24 lwz r31,36(r1) ffc18508: 7d 80 81 20 mtcrf 8,r12 ffc1850c: 38 21 00 28 addi r1,r1,40 ffc18510: 4e 80 00 20 blr } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); ffc18514: 80 7f 00 88 lwz r3,136(r31) ffc18518: 4b ff dd c9 bl ffc162e0 if (sc != RTEMS_SUCCESSFUL) ffc1851c: 2f 83 00 00 cmpwi cr7,r3,0 ffc18520: 40 9e 00 48 bne- cr7,ffc18568 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; ffc18524: 38 00 00 00 li r0,0 ffc18528: 98 1f 00 85 stb r0,133(r31) return RC_OK; ffc1852c: 38 60 00 00 li r3,0 } ffc18530: 80 01 00 2c lwz r0,44(r1) ffc18534: 81 81 00 1c lwz r12,28(r1) ffc18538: 7c 08 03 a6 mtlr r0 ffc1853c: 83 c1 00 20 lwz r30,32(r1) ffc18540: 83 e1 00 24 lwz r31,36(r1) ffc18544: 7d 80 81 20 mtcrf 8,r12 ffc18548: 38 21 00 28 addi r1,r1,40 ffc1854c: 4e 80 00 20 blr (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); ffc18550: 81 3f 00 88 lwz r9,136(r31) ffc18554: 80 7f 00 8c lwz r3,140(r31) ffc18558: 80 89 00 24 lwz r4,36(r9) ffc1855c: a0 bf 00 00 lhz r5,0(r31) ffc18560: 48 00 b8 b5 bl ffc23e14 ffc18564: 4b ff fe e8 b ffc1844c } else { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); ffc18568: 48 00 aa 79 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc1856c: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc18570: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc18574: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc18578: 4b ff ff 7c b ffc184f4 <== NOT EXECUTED =============================================================================== ffc18788 : uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc18788: 2c 04 00 00 cmpwi r4,0 <== NOT EXECUTED rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { fat_fs_info_t *fs_info = mt_entry->fs_info; ffc1878c: 81 23 00 34 lwz r9,52(r3) <== NOT EXECUTED fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { ffc18790: 7c a7 2b 78 mr r7,r5 <== NOT EXECUTED ffc18794: 40 82 00 10 bne- ffc187a4 <== NOT EXECUTED ffc18798: 88 09 00 0a lbz r0,10(r9) <== NOT EXECUTED ffc1879c: 70 0b 00 03 andi. r11,r0,3 <== NOT EXECUTED ffc187a0: 40 82 00 2c bne- ffc187cc <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc187a4: 89 69 00 05 lbz r11,5(r9) <== NOT EXECUTED ffc187a8: 38 84 ff fe addi r4,r4,-2 <== NOT EXECUTED ffc187ac: 80 09 00 30 lwz r0,48(r9) <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, ffc187b0: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc187b4: 7c 84 58 30 slw r4,r4,r11 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); ffc187b8: 88 c9 00 04 lbz r6,4(r9) <== NOT EXECUTED ffc187bc: 7c 84 02 14 add r4,r4,r0 <== NOT EXECUTED ffc187c0: 88 09 00 02 lbz r0,2(r9) <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, ffc187c4: 7c c6 00 30 slw r6,r6,r0 <== NOT EXECUTED ffc187c8: 4b ff fd b4 b ffc1857c <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); ffc187cc: 88 c9 00 04 lbz r6,4(r9) <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, ffc187d0: 38 a0 00 00 li r5,0 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); ffc187d4: 88 09 00 02 lbz r0,2(r9) <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; ffc187d8: 80 89 00 1c lwz r4,28(r9) <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, ffc187dc: 7c c6 00 30 slw r6,r6,r0 <== NOT EXECUTED ffc187e0: 4b ff fd 9c b ffc1857c <_fat_block_read> <== NOT EXECUTED =============================================================================== ffc187e4 : uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc187e4: 2c 04 00 00 cmpwi r4,0 rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { fat_fs_info_t *fs_info = mt_entry->fs_info; ffc187e8: 81 23 00 34 lwz r9,52(r3) fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { ffc187ec: 7c a7 2b 78 mr r7,r5 ffc187f0: 40 82 00 10 bne- ffc18800 <== ALWAYS TAKEN ffc187f4: 88 09 00 0a lbz r0,10(r9) <== NOT EXECUTED ffc187f8: 70 0b 00 03 andi. r11,r0,3 <== NOT EXECUTED ffc187fc: 40 82 00 2c bne- ffc18828 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc18800: 89 69 00 05 lbz r11,5(r9) ffc18804: 38 84 ff fe addi r4,r4,-2 ffc18808: 80 09 00 30 lwz r0,48(r9) fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, ffc1880c: 38 a0 00 00 li r5,0 ffc18810: 7c 84 58 30 slw r4,r4,r11 fs_info->vol.spc << fs_info->vol.sec_log2, buff); ffc18814: 88 c9 00 04 lbz r6,4(r9) ffc18818: 7c 84 02 14 add r4,r4,r0 ffc1881c: 88 09 00 02 lbz r0,2(r9) fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, ffc18820: 7c c6 00 30 slw r6,r6,r0 ffc18824: 4b ff fe 38 b ffc1865c <_fat_block_write> fs_info->vol.spc << fs_info->vol.sec_log2, buff); ffc18828: 88 c9 00 04 lbz r6,4(r9) <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, ffc1882c: 38 a0 00 00 li r5,0 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); ffc18830: 88 09 00 02 lbz r0,2(r9) <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; ffc18834: 80 89 00 1c lwz r4,28(r9) <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, ffc18838: 7c c6 00 30 slw r6,r6,r0 <== NOT EXECUTED ffc1883c: 4b ff fe 20 b ffc1865c <_fat_block_write> <== NOT EXECUTED =============================================================================== ffc18adc : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { ffc18adc: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc18ae0: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc18ae4: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED ffc18ae8: 93 c1 00 20 stw r30,32(r1) <== NOT EXECUTED ffc18aec: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ffc18af0: 93 e1 00 24 stw r31,36(r1) <== NOT EXECUTED ffc18af4: 93 a1 00 1c stw r29,28(r1) <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; ffc18af8: 83 e3 00 34 lwz r31,52(r3) <== NOT EXECUTED uint32_t value ) { uint32_t swapped; __asm__ volatile("rlwimi %0,%1,8,24,31;" ffc18afc: 50 80 46 3e rlwimi r0,r4,8,24,31 <== NOT EXECUTED ffc18b00: 50 80 c4 2e rlwimi r0,r4,24,16,23 <== NOT EXECUTED ffc18b04: 50 80 42 1e rlwimi r0,r4,8,8,15 <== NOT EXECUTED ffc18b08: 50 80 c0 0e rlwimi r0,r4,24,0,7 <== NOT EXECUTED uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); ffc18b0c: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc18b10: 50 a0 46 3e rlwimi r0,r5,8,24,31 <== NOT EXECUTED ffc18b14: 50 a0 c4 2e rlwimi r0,r5,24,16,23 <== NOT EXECUTED ffc18b18: 50 a0 42 1e rlwimi r0,r5,8,8,15 <== NOT EXECUTED ffc18b1c: 50 a0 c0 0e rlwimi r0,r5,24,0,7 <== NOT EXECUTED le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, ffc18b20: a0 9f 00 3c lhz r4,60(r31) <== NOT EXECUTED ffc18b24: 38 a0 01 e8 li r5,488 <== NOT EXECUTED ffc18b28: 38 c0 00 04 li r6,4 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ffc18b2c: 90 01 00 08 stw r0,8(r1) <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, ffc18b30: 38 e1 00 0c addi r7,r1,12 <== NOT EXECUTED ffc18b34: 4b ff fb 29 bl ffc1865c <_fat_block_write> <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, ffc18b38: a0 9f 00 3c lhz r4,60(r31) <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, ffc18b3c: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, ffc18b40: 38 a0 01 ec li r5,492 <== NOT EXECUTED ffc18b44: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc18b48: 38 c0 00 04 li r6,4 <== NOT EXECUTED ffc18b4c: 38 e1 00 08 addi r7,r1,8 <== NOT EXECUTED ffc18b50: 4b ff fb 0d bl ffc1865c <_fat_block_write> <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) ffc18b54: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED return -1; ffc18b58: 38 00 ff ff li r0,-1 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) ffc18b5c: 41 9c 00 08 blt- cr7,ffc18b64 <== NOT EXECUTED return -1; ffc18b60: 7c 60 fe 70 srawi r0,r3,31 <== NOT EXECUTED return RC_OK; } ffc18b64: 7c 03 03 78 mr r3,r0 <== NOT EXECUTED ffc18b68: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc18b6c: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc18b70: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18b74: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc18b78: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc18b7c: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc18b80: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc17758 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc17758: 94 21 ff e8 stwu r1,-24(r1) ffc1775c: 7c 08 02 a6 mflr r0 ffc17760: 90 01 00 1c stw r0,28(r1) /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) ffc17764: 81 24 00 08 lwz r9,8(r4) int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc17768: 93 a1 00 0c stw r29,12(r1) /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) ffc1776c: 2b 89 00 01 cmplwi cr7,r9,1 int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc17770: 93 c1 00 10 stw r30,16(r1) ffc17774: 7c 7e 1b 78 mr r30,r3 ffc17778: 93 e1 00 14 stw r31,20(r1) ffc1777c: 7c 9f 23 78 mr r31,r4 ffc17780: 93 81 00 08 stw r28,8(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc17784: 83 a3 00 34 lwz r29,52(r3) /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) ffc17788: 40 9d 00 30 ble- cr7,ffc177b8 { fat_fd->links_num--; ffc1778c: 39 29 ff ff addi r9,r9,-1 ffc17790: 91 24 00 08 stw r9,8(r4) return rc; ffc17794: 38 60 00 00 li r3,0 * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } ffc17798: 80 01 00 1c lwz r0,28(r1) ffc1779c: 83 81 00 08 lwz r28,8(r1) ffc177a0: 7c 08 03 a6 mtlr r0 ffc177a4: 83 a1 00 0c lwz r29,12(r1) ffc177a8: 83 c1 00 10 lwz r30,16(r1) ffc177ac: 83 e1 00 14 lwz r31,20(r1) ffc177b0: 38 21 00 18 addi r1,r1,24 ffc177b4: 4e 80 00 20 blr return rc; } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) ffc177b8: 88 04 00 30 lbz r0,48(r4) ffc177bc: 70 1c 00 01 andi. r28,r0,1 ffc177c0: 41 82 00 3c beq- ffc177fc <== ALWAYS TAKEN { rc = fat_file_truncate(mt_entry, fat_fd, 0); ffc177c4: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc177c8: 4b ff fe 29 bl ffc175f0 <== NOT EXECUTED if ( rc != RC_OK ) ffc177cc: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc177d0: 40 82 ff c8 bne+ ffc17798 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc177d4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc177d8: 4b ff 6f a5 bl ffc0e77c <_Chain_Extract> <== NOT EXECUTED return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) ffc177dc: 80 9f 00 0c lwz r4,12(r31) <== NOT EXECUTED ffc177e0: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc177e4: 48 00 12 e1 bl ffc18ac4 <== NOT EXECUTED ffc177e8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc177ec: 40 9e 00 58 bne- cr7,ffc17844 <== NOT EXECUTED fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); ffc177f0: 7f e3 fb 78 mr r3,r31 ffc177f4: 4b ff 0c ed bl ffc084e0 ffc177f8: 48 00 00 18 b ffc17810 free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) ffc177fc: 80 84 00 0c lwz r4,12(r4) ffc17800: 48 00 12 c5 bl ffc18ac4 ffc17804: 2f 83 00 00 cmpwi cr7,r3,0 ffc17808: 41 9e 00 30 beq- cr7,ffc17838 <== ALWAYS TAKEN { fat_fd->links_num = 0; ffc1780c: 93 9f 00 08 stw r28,8(r31) <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); ffc17810: 7f a3 eb 78 mr r3,r29 ffc17814: 48 00 0b c5 bl ffc183d8 return rc; } ffc17818: 80 01 00 1c lwz r0,28(r1) ffc1781c: 83 81 00 08 lwz r28,8(r1) ffc17820: 7c 08 03 a6 mtlr r0 ffc17824: 83 a1 00 0c lwz r29,12(r1) ffc17828: 83 c1 00 10 lwz r30,16(r1) ffc1782c: 83 e1 00 14 lwz r31,20(r1) ffc17830: 38 21 00 18 addi r1,r1,24 ffc17834: 4e 80 00 20 blr ffc17838: 7f e3 fb 78 mr r3,r31 ffc1783c: 4b ff 6f 41 bl ffc0e77c <_Chain_Extract> ffc17840: 4b ff ff b0 b ffc177f0 return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) fat_free_unique_ino(mt_entry, fat_fd->ino); ffc17844: 80 9f 00 0c lwz r4,12(r31) <== NOT EXECUTED ffc17848: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc1784c: 48 00 12 49 bl ffc18a94 <== NOT EXECUTED ffc17850: 4b ff ff a0 b ffc177f0 <== NOT EXECUTED =============================================================================== ffc17f08 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc17f08: 94 21 ff d0 stwu r1,-48(r1) <== NOT EXECUTED ffc17f0c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc17f10: 90 01 00 34 stw r0,52(r1) <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) ffc17f14: 81 24 00 18 lwz r9,24(r4) <== NOT EXECUTED ) { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; ffc17f18: 80 04 00 1c lwz r0,28(r4) <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) ffc17f1c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc17f20: 93 61 00 1c stw r27,28(r1) <== NOT EXECUTED ffc17f24: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; ffc17f28: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; ffc17f2c: 38 00 00 00 li r0,0 <== NOT EXECUTED int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc17f30: 93 81 00 20 stw r28,32(r1) <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) return RC_OK; ffc17f34: 3b 80 00 00 li r28,0 <== NOT EXECUTED int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc17f38: 93 c1 00 28 stw r30,40(r1) <== NOT EXECUTED ffc17f3c: 93 a1 00 24 stw r29,36(r1) <== NOT EXECUTED ffc17f40: 93 e1 00 2c stw r31,44(r1) <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc17f44: 83 c3 00 34 lwz r30,52(r3) <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; ffc17f48: 90 01 00 08 stw r0,8(r1) <== NOT EXECUTED uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) ffc17f4c: 40 9e 00 2c bne- cr7,ffc17f78 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } ffc17f50: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc17f54: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc17f58: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc17f5c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc17f60: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc17f64: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc17f68: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc17f6c: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc17f70: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc17f74: 4e 80 00 20 blr <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); ffc17f78: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc17f7c: 48 00 04 5d bl ffc183d8 <== NOT EXECUTED if (rc != RC_OK) ffc17f80: 7c 7c 1b 79 mr. r28,r3 <== NOT EXECUTED ffc17f84: 40 a2 ff cc bne- ffc17f50 <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc17f88: 80 81 00 0c lwz r4,12(r1) <== NOT EXECUTED ffc17f8c: 81 3e 00 0c lwz r9,12(r30) <== NOT EXECUTED ffc17f90: 80 1e 00 10 lwz r0,16(r30) <== NOT EXECUTED ffc17f94: 7c 89 48 38 and r9,r4,r9 <== NOT EXECUTED ffc17f98: 7f 89 00 40 cmplw cr7,r9,r0 <== NOT EXECUTED ffc17f9c: 40 bc ff b4 bge- cr7,ffc17f50 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc17fa0: 2f 84 00 00 cmpwi cr7,r4,0 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc17fa4: 81 3b 00 34 lwz r9,52(r27) <== NOT EXECUTED ffc17fa8: 41 9e 00 a0 beq- cr7,ffc18048 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17fac: 89 69 00 05 lbz r11,5(r9) <== NOT EXECUTED ffc17fb0: 3b a4 ff fe addi r29,r4,-2 <== NOT EXECUTED ffc17fb4: 80 09 00 30 lwz r0,48(r9) <== NOT EXECUTED ffc17fb8: 7f bd 58 30 slw r29,r29,r11 <== NOT EXECUTED ffc17fbc: 7f bd 02 14 add r29,r29,r0 <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) ffc17fc0: 88 1e 00 04 lbz r0,4(r30) <== NOT EXECUTED ffc17fc4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc17fc8: 41 9e 00 98 beq- cr7,ffc18060 <== NOT EXECUTED ffc17fcc: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc17fd0: 48 00 00 20 b ffc17ff0 <== NOT EXECUTED /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); ffc17fd4: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED ffc17fd8: 4b ff e4 b9 bl ffc16490 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) ffc17fdc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc17fe0: 40 9e 00 30 bne- cr7,ffc18010 <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) ffc17fe4: 88 1e 00 04 lbz r0,4(r30) <== NOT EXECUTED ffc17fe8: 7f 80 f8 40 cmplw cr7,r0,r31 <== NOT EXECUTED ffc17fec: 40 9d 00 70 ble- cr7,ffc1805c <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); ffc17ff0: 80 7e 00 58 lwz r3,88(r30) <== NOT EXECUTED ffc17ff4: 7c bf ea 14 add r5,r31,r29 <== NOT EXECUTED ffc17ff8: 80 9e 00 5c lwz r4,92(r30) <== NOT EXECUTED ffc17ffc: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) ffc18000: 3b ff 00 01 addi r31,r31,1 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); ffc18004: 4b ff df 81 bl ffc15f84 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) ffc18008: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc1800c: 41 9e ff c8 beq+ cr7,ffc17fd4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); ffc18010: 48 00 af d1 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc18014: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc18018: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1801c: 3b 80 ff ff li r28,-1 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } ffc18020: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc18024: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc18028: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc1802c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18030: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc18034: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc18038: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc1803c: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc18040: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc18044: 4e 80 00 20 blr <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc18048: 88 09 00 0a lbz r0,10(r9) <== NOT EXECUTED ffc1804c: 70 0b 00 03 andi. r11,r0,3 <== NOT EXECUTED ffc18050: 41 a2 ff 5c beq- ffc17fac <== NOT EXECUTED return fs_info->vol.rdir_loc; ffc18054: 83 a9 00 1c lwz r29,28(r9) <== NOT EXECUTED ffc18058: 4b ff ff 68 b ffc17fc0 <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) ffc1805c: 80 81 00 0c lwz r4,12(r1) <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc18060: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc18064: 38 a1 00 0c addi r5,r1,12 <== NOT EXECUTED ffc18068: 48 00 8f a5 bl ffc2100c <== NOT EXECUTED if ( rc != RC_OK ) ffc1806c: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc18070: 41 82 ff 18 beq+ ffc17f88 <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc18074: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED ffc18078: 4b ff fe d8 b ffc17f50 <== NOT EXECUTED =============================================================================== ffc17958 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { ffc17958: 94 21 ff c0 stwu r1,-64(r1) ffc1795c: 7c 08 02 a6 mflr r0 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; ffc17960: 39 20 00 00 li r9,0 rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { ffc17964: 90 01 00 44 stw r0,68(r1) ffc17968: 93 41 00 28 stw r26,40(r1) ffc1796c: 7c da 33 78 mr r26,r6 ffc17970: 93 61 00 2c stw r27,44(r1) ffc17974: 93 81 00 30 stw r28,48(r1) ffc17978: 7c 7c 1b 78 mr r28,r3 ffc1797c: 93 a1 00 34 stw r29,52(r1) uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; ffc17980: 3b a0 00 00 li r29,0 rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { ffc17984: 93 c1 00 38 stw r30,56(r1) ffc17988: 7c 9e 23 78 mr r30,r4 ffc1798c: 93 e1 00 3c stw r31,60(r1) ffc17990: 7c bf 2b 78 mr r31,r5 ffc17994: 92 e1 00 1c stw r23,28(r1) ffc17998: 93 01 00 20 stw r24,32(r1) ffc1799c: 93 21 00 24 stw r25,36(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc179a0: 83 63 00 34 lwz r27,52(r3) uint32_t old_last_cl; uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; ffc179a4: 90 ba 00 00 stw r5,0(r26) if (new_length <= fat_fd->fat_file_size) ffc179a8: 80 04 00 18 lwz r0,24(r4) uint32_t *a_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; ffc179ac: 91 21 00 14 stw r9,20(r1) uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) ffc179b0: 7f 85 00 40 cmplw cr7,r5,r0 fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; ffc179b4: 91 21 00 0c stw r9,12(r1) uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) ffc179b8: 40 9d 00 e4 ble- cr7,ffc17a9c return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc179bc: 81 24 00 20 lwz r9,32(r4) ffc179c0: 2f 89 00 01 cmpwi cr7,r9,1 ffc179c4: 41 9e 01 10 beq- cr7,ffc17ad4 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - ffc179c8: a1 7b 00 06 lhz r11,6(r27) (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; ffc179cc: 7e e0 f8 50 subf r23,r0,r31 * if in last cluster allocated for the file there is enough room to * handle extention (hence we don't need to add even one cluster to the * file ) - return */ if (bytes2add == 0) return RC_OK; ffc179d0: 3b a0 00 00 li r29,0 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & ffc179d4: 39 2b ff ff addi r9,r11,-1 ffc179d8: 7d 39 00 38 and r25,r9,r0 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - ffc179dc: 7f 39 58 50 subf r25,r25,r11 ffc179e0: 7f 39 48 38 and r25,r25,r9 (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; if (bytes2add > bytes_remain) ffc179e4: 7f 99 b8 40 cmplw cr7,r25,r23 ffc179e8: 40 9c 00 b4 bge- cr7,ffc17a9c /* * if in last cluster allocated for the file there is enough room to * handle extention (hence we don't need to add even one cluster to the * file ) - return */ if (bytes2add == 0) ffc179ec: 7e f9 b8 51 subf. r23,r25,r23 ffc179f0: 41 82 00 ac beq- ffc17a9c <== NEVER TAKEN return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; ffc179f4: 88 1b 00 08 lbz r0,8(r27) ffc179f8: 3b 17 ff ff addi r24,r23,-1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, ffc179fc: 7f 83 e3 78 mr r3,r28 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; ffc17a00: 7f 18 04 30 srw r24,r24,r0 ffc17a04: 3b 18 00 01 addi r24,r24,1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, ffc17a08: 38 81 00 14 addi r4,r1,20 ffc17a0c: 7f 05 c3 78 mr r5,r24 ffc17a10: 38 c1 00 08 addi r6,r1,8 ffc17a14: 38 e1 00 0c addi r7,r1,12 ffc17a18: 48 00 9d 09 bl ffc21720 &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) ffc17a1c: 7c 7d 1b 79 mr. r29,r3 ffc17a20: 40 82 00 7c bne- ffc17a9c <== NEVER TAKEN return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) ffc17a24: 80 01 00 08 lwz r0,8(r1) ffc17a28: 7f 29 03 79 or. r9,r25,r0 ffc17a2c: 41 82 00 c0 beq- ffc17aec <== NEVER TAKEN rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) ffc17a30: 7f 98 00 00 cmpw cr7,r24,r0 ffc17a34: 41 9e 00 2c beq- cr7,ffc17a60 <== ALWAYS TAKEN *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - ffc17a38: 89 7b 00 08 lbz r11,8(r27) <== NOT EXECUTED ffc17a3c: 7c 0a 00 f8 not r10,r0 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); ffc17a40: a1 3b 00 06 lhz r9,6(r27) <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - ffc17a44: 7f 0a c2 14 add r24,r10,r24 <== NOT EXECUTED ffc17a48: 7f 18 58 30 slw r24,r24,r11 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); ffc17a4c: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - ffc17a50: 7f 18 f8 50 subf r24,r24,r31 <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); ffc17a54: 7e f7 48 38 and r23,r23,r9 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - ffc17a58: 7e f7 c0 50 subf r23,r23,r24 <== NOT EXECUTED if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - ffc17a5c: 92 fa 00 00 stw r23,0(r26) <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) ffc17a60: 80 de 00 18 lwz r6,24(r30) ffc17a64: 2f 86 00 00 cmpwi cr7,r6,0 ffc17a68: 40 9e 00 98 bne- cr7,ffc17b00 { fat_fd->map.disk_cln = fat_fd->cln = chain; ffc17a6c: 81 21 00 14 lwz r9,20(r1) fat_fd->map.file_cln = 0; ffc17a70: 90 de 00 34 stw r6,52(r30) (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) { fat_fd->map.disk_cln = fat_fd->cln = chain; ffc17a74: 91 3e 00 1c stw r9,28(r30) ffc17a78: 91 3e 00 38 stw r9,56(r30) } fat_buf_release(fs_info); } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) ffc17a7c: 2f 80 00 00 cmpwi cr7,r0,0 ffc17a80: 41 9e 00 18 beq- cr7,ffc17a98 <== NEVER TAKEN { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) ffc17a84: 80 1e 00 10 lwz r0,16(r30) ffc17a88: 2f 80 00 01 cmpwi cr7,r0,1 } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) { fat_fd->map.last_cln = last_cl; ffc17a8c: 80 01 00 0c lwz r0,12(r1) ffc17a90: 90 1e 00 3c stw r0,60(r30) if (fat_fd->fat_file_type == FAT_DIRECTORY) ffc17a94: 41 9e 00 dc beq- cr7,ffc17b70 return rc; } } } fat_fd->fat_file_size = new_length; ffc17a98: 93 fe 00 18 stw r31,24(r30) return RC_OK; } ffc17a9c: 80 01 00 44 lwz r0,68(r1) ffc17aa0: 7f a3 eb 78 mr r3,r29 ffc17aa4: 82 e1 00 1c lwz r23,28(r1) ffc17aa8: 7c 08 03 a6 mtlr r0 ffc17aac: 83 01 00 20 lwz r24,32(r1) ffc17ab0: 83 21 00 24 lwz r25,36(r1) ffc17ab4: 83 41 00 28 lwz r26,40(r1) ffc17ab8: 83 61 00 2c lwz r27,44(r1) ffc17abc: 83 81 00 30 lwz r28,48(r1) ffc17ac0: 83 a1 00 34 lwz r29,52(r1) ffc17ac4: 83 c1 00 38 lwz r30,56(r1) ffc17ac8: 83 e1 00 3c lwz r31,60(r1) ffc17acc: 38 21 00 40 addi r1,r1,64 ffc17ad0: 4e 80 00 20 blr *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc17ad4: 81 24 00 24 lwz r9,36(r4) <== NOT EXECUTED ffc17ad8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc17adc: 40 be fe ec bne- cr7,ffc179c8 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc17ae0: 89 3b 00 0a lbz r9,10(r27) <== NOT EXECUTED *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc17ae4: 71 2b 00 03 andi. r11,r9,3 <== NOT EXECUTED ffc17ae8: 41 82 fe e0 beq+ ffc179c8 <== NOT EXECUTED if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); ffc17aec: 48 00 b4 f5 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc17af0: 38 00 00 1c li r0,28 <== NOT EXECUTED ffc17af4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc17af8: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc17afc: 4b ff ff a0 b ffc17a9c <== NOT EXECUTED fat_fd->map.disk_cln = fat_fd->cln = chain; fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) ffc17b00: 80 9e 00 3c lwz r4,60(r30) ffc17b04: 2f 84 ff ff cmpwi cr7,r4,-1 ffc17b08: 41 9e 00 2c beq- cr7,ffc17b34 <== NEVER TAKEN { old_last_cl = fat_fd->map.last_cln; ffc17b0c: 90 81 00 10 stw r4,16(r1) fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); ffc17b10: 80 a1 00 14 lwz r5,20(r1) ffc17b14: 7f 83 e3 78 mr r3,r28 ffc17b18: 48 00 97 59 bl ffc21270 if ( rc != RC_OK ) ffc17b1c: 7c 7a 1b 79 mr. r26,r3 ffc17b20: 40 82 00 3c bne- ffc17b5c <== NEVER TAKEN { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); ffc17b24: 7f 63 db 78 mr r3,r27 ffc17b28: 48 00 08 b1 bl ffc183d8 ffc17b2c: 80 01 00 08 lwz r0,8(r1) ffc17b30: 4b ff ff 4c b ffc17a7c { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, ffc17b34: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc17b38: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc17b3c: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc17b40: 38 c6 ff ff addi r6,r6,-1 <== NOT EXECUTED ffc17b44: 38 e1 00 10 addi r7,r1,16 <== NOT EXECUTED ffc17b48: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc17b4c: 4b ff fd 09 bl ffc17854 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(mt_entry, chain); return rc; ffc17b50: 80 81 00 10 lwz r4,16(r1) <== NOT EXECUTED } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) ffc17b54: 7c 7a 1b 79 mr. r26,r3 <== NOT EXECUTED ffc17b58: 41 82 ff b8 beq+ ffc17b10 <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(mt_entry, chain); ffc17b5c: 80 81 00 14 lwz r4,20(r1) <== NOT EXECUTED ffc17b60: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED return rc; ffc17b64: 7f 5d d3 78 mr r29,r26 <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(mt_entry, chain); ffc17b68: 48 00 9a 6d bl ffc215d4 <== NOT EXECUTED return rc; ffc17b6c: 4b ff ff 30 b ffc17a9c <== NOT EXECUTED if (cls_added != 0) { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); ffc17b70: 80 81 00 14 lwz r4,20(r1) ffc17b74: 7f 83 e3 78 mr r3,r28 ffc17b78: 48 00 0c c9 bl ffc18840 if ( rc != RC_OK ) ffc17b7c: 7c 7b 1b 79 mr. r27,r3 ffc17b80: 41 82 ff 18 beq+ ffc17a98 <== ALWAYS TAKEN { fat_free_fat_clusters_chain(mt_entry, chain); ffc17b84: 80 81 00 14 lwz r4,20(r1) <== NOT EXECUTED ffc17b88: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED return rc; ffc17b8c: 7f 7d db 78 mr r29,r27 <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(mt_entry, chain); ffc17b90: 48 00 9a 45 bl ffc215d4 <== NOT EXECUTED return rc; ffc17b94: 4b ff ff 08 b ffc17a9c <== NOT EXECUTED =============================================================================== ffc17854 : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { ffc17854: 94 21 ff d0 stwu r1,-48(r1) ffc17858: 7c 08 02 a6 mflr r0 uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) ffc1785c: 2f 85 00 01 cmpwi cr7,r5,1 fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { ffc17860: 90 01 00 34 stw r0,52(r1) uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); ffc17864: 7c 29 0b 78 mr r9,r1 ffc17868: 38 01 00 38 addi r0,r1,56 fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { ffc1786c: 90 c1 00 1c stw r6,28(r1) ffc17870: 90 e1 00 20 stw r7,32(r1) ffc17874: 93 c1 00 28 stw r30,40(r1) ffc17878: 93 e1 00 2c stw r31,44(r1) uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); ffc1787c: 94 09 00 10 stwu r0,16(r9) int cmd, ...) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; ffc17880: 38 00 00 00 li r0,0 ffc17884: 90 01 00 08 stw r0,8(r1) uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); ffc17888: 38 00 00 03 li r0,3 fat_file_fd_t *fat_fd, int cmd, ...) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc1788c: 81 63 00 34 lwz r11,52(r3) uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); ffc17890: 98 01 00 0c stb r0,12(r1) ffc17894: 91 21 00 14 stw r9,20(r1) switch (cmd) ffc17898: 41 9e 00 2c beq- cr7,ffc178c4 <== ALWAYS TAKEN *ret = cur_cln; break; default: errno = EINVAL; ffc1789c: 48 00 b7 45 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc178a0: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc178a4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED rc = -1; ffc178a8: 38 60 ff ff li r3,-1 <== NOT EXECUTED break; } va_end(ap); return rc; } ffc178ac: 80 01 00 34 lwz r0,52(r1) ffc178b0: 83 c1 00 28 lwz r30,40(r1) ffc178b4: 7c 08 03 a6 mtlr r0 ffc178b8: 83 e1 00 2c lwz r31,44(r1) ffc178bc: 38 21 00 30 addi r1,r1,48 ffc178c0: 4e 80 00 20 blr va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ffc178c4: 80 09 00 0c lwz r0,12(r9) ret = va_arg(ap, uint32_t *); ffc178c8: 3b c0 00 05 li r30,5 /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { ffc178cc: 81 44 00 18 lwz r10,24(r4) switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); ffc178d0: 9b c1 00 0c stb r30,12(r1) /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { ffc178d4: 7f 8a 00 40 cmplw cr7,r10,r0 switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); ffc178d8: 83 e9 00 10 lwz r31,16(r9) /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { ffc178dc: 40 9d 00 6c ble- cr7,ffc17948 <== NEVER TAKEN va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc178e0: 81 24 00 20 lwz r9,32(r4) ffc178e4: 2f 89 00 01 cmpwi cr7,r9,1 ffc178e8: 41 9e 00 3c beq- cr7,ffc17924 *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; ffc178ec: 88 ab 00 08 lbz r5,8(r11) rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); ffc178f0: 38 c1 00 08 addi r6,r1,8 ffc178f4: 7c 05 2c 30 srw r5,r0,r5 ffc178f8: 4b ff f6 29 bl ffc16f20 if ( rc != RC_OK ) ffc178fc: 7c 83 23 79 mr. r3,r4 ffc17900: 40 a2 ff ac bne- ffc178ac <== NEVER TAKEN break; *ret = cur_cln; ffc17904: 80 01 00 08 lwz r0,8(r1) rc = -1; break; } va_end(ap); return rc; } ffc17908: 83 c1 00 28 lwz r30,40(r1) rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if ( rc != RC_OK ) break; *ret = cur_cln; ffc1790c: 90 1f 00 00 stw r0,0(r31) rc = -1; break; } va_end(ap); return rc; } ffc17910: 80 01 00 34 lwz r0,52(r1) ffc17914: 83 e1 00 2c lwz r31,44(r1) ffc17918: 38 21 00 30 addi r1,r1,48 ffc1791c: 7c 08 03 a6 mtlr r0 ffc17920: 4e 80 00 20 blr if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc17924: 81 24 00 24 lwz r9,36(r4) ffc17928: 2f 89 00 00 cmpwi cr7,r9,0 ffc1792c: 40 be ff c0 bne- cr7,ffc178ec <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc17930: 89 4b 00 0a lbz r10,10(r11) if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc17934: 71 48 00 03 andi. r8,r10,3 ffc17938: 41 a2 ff b4 beq- ffc178ec <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; ffc1793c: 91 3f 00 00 stw r9,0(r31) rc = RC_OK; ffc17940: 38 60 00 00 li r3,0 break; ffc17944: 4b ff ff 68 b ffc178ac ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); ffc17948: 48 00 b6 99 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc1794c: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED ffc17950: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc17954: 4b ff ff 58 b ffc178ac <== NOT EXECUTED =============================================================================== ffc16f20 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { ffc16f20: 94 21 ff d0 stwu r1,-48(r1) ffc16f24: 7c 08 02 a6 mflr r0 ffc16f28: 90 01 00 34 stw r0,52(r1) ffc16f2c: 93 61 00 1c stw r27,28(r1) int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) ffc16f30: 83 64 00 34 lwz r27,52(r4) rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { ffc16f34: 93 41 00 18 stw r26,24(r1) ffc16f38: 7c da 33 78 mr r26,r6 int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) ffc16f3c: 7f 9b 28 00 cmpw cr7,r27,r5 rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { ffc16f40: 93 a1 00 24 stw r29,36(r1) ffc16f44: 7c 9d 23 78 mr r29,r4 ffc16f48: 93 c1 00 28 stw r30,40(r1) ffc16f4c: 7c be 2b 78 mr r30,r5 ffc16f50: 93 e1 00 2c stw r31,44(r1) ffc16f54: 7c 7f 1b 78 mr r31,r3 ffc16f58: 93 81 00 20 stw r28,32(r1) int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) ffc16f5c: 41 9e 00 d8 beq- cr7,ffc17034 <== ALWAYS TAKEN { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) ffc16f60: 7f 9b 28 40 cmplw cr7,r27,r5 <== NOT EXECUTED ffc16f64: 41 9c 00 7c blt- cr7,ffc16fe0 <== NOT EXECUTED cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; ffc16f68: 80 84 00 1c lwz r4,28(r4) <== NOT EXECUTED ffc16f6c: 7c bb 2b 78 mr r27,r5 <== NOT EXECUTED ffc16f70: 90 81 00 08 stw r4,8(r1) <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) ffc16f74: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED ffc16f78: 41 9e 00 78 beq- cr7,ffc16ff0 <== NOT EXECUTED ffc16f7c: 3b 80 00 00 li r28,0 <== NOT EXECUTED ffc16f80: 48 00 00 0c b ffc16f8c <== NOT EXECUTED ffc16f84: 80 81 00 08 lwz r4,8(r1) <== NOT EXECUTED ffc16f88: 41 9e 00 68 beq- cr7,ffc16ff0 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc16f8c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc16f90: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED ffc16f94: 48 00 a0 79 bl ffc2100c <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) ffc16f98: 3b 9c 00 01 addi r28,r28,1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) ffc16f9c: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) ffc16fa0: 7f 9c d8 00 cmpw cr7,r28,r27 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) ffc16fa4: 41 82 ff e0 beq+ ffc16f84 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc16fa8: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED /* skip over the clusters */ for (i = 0; i < count; i++) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ffc16fac: 7c 6b 1b 78 mr r11,r3 <== NOT EXECUTED ffc16fb0: 7c 6a fe 70 srawi r10,r3,31 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc16fb4: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc16fb8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc16fbc: 7d 43 53 78 mr r3,r10 <== NOT EXECUTED ffc16fc0: 7d 64 5b 78 mr r4,r11 <== NOT EXECUTED ffc16fc4: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc16fc8: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc16fcc: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc16fd0: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc16fd4: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc16fd8: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc16fdc: 4e 80 00 20 blr <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; ffc16fe0: 80 84 00 38 lwz r4,56(r4) <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; ffc16fe4: 7f 7b 28 50 subf r27,r27,r5 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; ffc16fe8: 90 81 00 08 stw r4,8(r1) <== NOT EXECUTED ffc16fec: 4b ff ff 88 b ffc16f74 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc16ff0: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; ffc16ff4: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc16ff8: 39 60 00 00 li r11,0 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; ffc16ffc: 93 dd 00 34 stw r30,52(r29) <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc17000: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc17004: 7d 43 53 78 mr r3,r10 <== NOT EXECUTED return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; ffc17008: 90 9d 00 38 stw r4,56(r29) <== NOT EXECUTED *disk_cln = cur_cln; } return RC_OK; } ffc1700c: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; ffc17010: 90 9a 00 00 stw r4,0(r26) <== NOT EXECUTED } return RC_OK; } ffc17014: 7d 64 5b 78 mr r4,r11 <== NOT EXECUTED ffc17018: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc1701c: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc17020: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc17024: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc17028: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc1702c: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc17030: 4e 80 00 20 blr <== NOT EXECUTED ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; ffc17034: 80 04 00 38 lwz r0,56(r4) fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; ffc17038: 39 40 00 00 li r10,0 ffc1703c: 39 60 00 00 li r11,0 } ffc17040: 83 41 00 18 lwz r26,24(r1) ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; ffc17044: 90 06 00 00 stw r0,0(r6) fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc17048: 7d 43 53 78 mr r3,r10 ffc1704c: 7d 64 5b 78 mr r4,r11 ffc17050: 80 01 00 34 lwz r0,52(r1) ffc17054: 83 61 00 1c lwz r27,28(r1) ffc17058: 7c 08 03 a6 mtlr r0 ffc1705c: 83 81 00 20 lwz r28,32(r1) ffc17060: 83 a1 00 24 lwz r29,36(r1) ffc17064: 83 c1 00 28 lwz r30,40(r1) ffc17068: 83 e1 00 2c lwz r31,44(r1) ffc1706c: 38 21 00 30 addi r1,r1,48 ffc17070: 4e 80 00 20 blr =============================================================================== ffc17e40 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc17e40: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc17e44: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; ffc17e48: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc17e4c: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc17e50: 81 24 00 20 lwz r9,32(r4) <== NOT EXECUTED ffc17e54: 93 c1 00 10 stw r30,16(r1) <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) ffc17e58: 2f 89 00 01 cmpwi cr7,r9,1 <== NOT EXECUTED ffc17e5c: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED ffc17e60: 7c 9f 23 78 mr r31,r4 <== NOT EXECUTED ffc17e64: 93 a1 00 0c stw r29,12(r1) <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; ffc17e68: 83 c3 00 34 lwz r30,52(r3) <== NOT EXECUTED ffc17e6c: 41 9e 00 28 beq- cr7,ffc17e94 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc17e70: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc17e74: 41 9e 00 80 beq- cr7,ffc17ef4 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17e78: 89 7e 00 05 lbz r11,5(r30) <== NOT EXECUTED ffc17e7c: 39 29 ff fe addi r9,r9,-2 <== NOT EXECUTED ffc17e80: 80 1e 00 30 lwz r0,48(r30) <== NOT EXECUTED ffc17e84: 7d 2b 58 30 slw r11,r9,r11 <== NOT EXECUTED ffc17e88: 7d 6b 02 14 add r11,r11,r0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << ffc17e8c: 88 1e 00 03 lbz r0,3(r30) <== NOT EXECUTED ffc17e90: 7d 6b 00 30 slw r11,r11,r0 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc17e94: 80 1f 00 24 lwz r0,36(r31) <== NOT EXECUTED ffc17e98: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc17e9c: 54 1d ba 7e rlwinm r29,r0,23,9,31 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + ffc17ea0: 7f ab ea 14 add r29,r11,r29 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); ffc17ea4: 54 00 df 3e rlwinm r0,r0,27,28,31 <== NOT EXECUTED fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc17ea8: 57 bd 20 36 rlwinm r29,r29,4,0,27 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + ffc17eac: 7f bd 02 14 add r29,r29,r0 <== NOT EXECUTED ffc17eb0: 4b ff 68 cd bl ffc0e77c <_Chain_Extract> <== NOT EXECUTED */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); ffc17eb4: 57 a0 07 fe clrlwi r0,r29,31 <== NOT EXECUTED ffc17eb8: 80 7e 00 6c lwz r3,108(r30) <== NOT EXECUTED ffc17ebc: 1c 00 00 0c mulli r0,r0,12 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); ffc17ec0: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc17ec4: 7c 63 02 14 add r3,r3,r0 <== NOT EXECUTED ffc17ec8: 4b ff 68 85 bl ffc0e74c <_Chain_Append> <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; ffc17ecc: 88 1f 00 30 lbz r0,48(r31) <== NOT EXECUTED ffc17ed0: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED ffc17ed4: 98 1f 00 30 stb r0,48(r31) <== NOT EXECUTED } ffc17ed8: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc17edc: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc17ee0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc17ee4: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc17ee8: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc17eec: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc17ef0: 4e 80 00 20 blr <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc17ef4: 88 1e 00 0a lbz r0,10(r30) <== NOT EXECUTED ffc17ef8: 70 0b 00 03 andi. r11,r0,3 <== NOT EXECUTED ffc17efc: 41 a2 ff 7c beq- ffc17e78 <== NOT EXECUTED return fs_info->vol.rdir_loc; ffc17f00: 81 7e 00 1c lwz r11,28(r30) <== NOT EXECUTED ffc17f04: 4b ff ff 88 b ffc17e8c <== NOT EXECUTED =============================================================================== ffc17074 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { ffc17074: 94 21 ff d8 stwu r1,-40(r1) ffc17078: 7c 08 02 a6 mflr r0 ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; ffc1707c: 39 60 00 01 li r11,1 ffc17080: 90 01 00 2c stw r0,44(r1) static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + ffc17084: 81 24 00 00 lwz r9,0(r4) ffc17088: 93 21 00 0c stw r25,12(r1) ffc1708c: 7c 79 1b 78 mr r25,r3 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) ffc17090: 2f 89 00 01 cmpwi cr7,r9,1 ffc17094: 93 41 00 10 stw r26,16(r1) ffc17098: 7c ba 2b 78 mr r26,r5 ffc1709c: 93 81 00 18 stw r28,24(r1) ffc170a0: 7c 9c 23 78 mr r28,r4 ffc170a4: 93 e1 00 24 stw r31,36(r1) ffc170a8: 93 01 00 08 stw r24,8(r1) ffc170ac: 93 61 00 14 stw r27,20(r1) ffc170b0: 93 a1 00 1c stw r29,28(r1) ffc170b4: 93 c1 00 20 stw r30,32(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc170b8: 83 e3 00 34 lwz r31,52(r3) ffc170bc: 41 9e 00 28 beq- cr7,ffc170e4 uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc170c0: 2f 89 00 00 cmpwi cr7,r9,0 ffc170c4: 41 9e 01 a4 beq- cr7,ffc17268 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc170c8: 89 7f 00 05 lbz r11,5(r31) ffc170cc: 39 29 ff fe addi r9,r9,-2 ffc170d0: 80 1f 00 30 lwz r0,48(r31) ffc170d4: 7d 2b 58 30 slw r11,r9,r11 ffc170d8: 7d 6b 02 14 add r11,r11,r0 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << ffc170dc: 88 1f 00 03 lbz r0,3(r31) ffc170e0: 7d 6b 00 30 slw r11,r11,r0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc170e4: 80 1c 00 04 lwz r0,4(r28) uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); ffc170e8: 81 3f 00 68 lwz r9,104(r31) ffc170ec: 54 1e ba 7e rlwinm r30,r0,23,9,31 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + ffc170f0: 7f cb f2 14 add r30,r11,r30 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc170f4: 57 de 20 36 rlwinm r30,r30,4,0,27 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); ffc170f8: 54 00 df 3e rlwinm r0,r0,27,28,31 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + ffc170fc: 7f de 02 14 add r30,r30,r0 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; ffc17100: 57 db 07 fe clrlwi r27,r30,31 rtems_chain_node *the_node = rtems_chain_first(hash + mod); ffc17104: 1f 7b 00 0c mulli r27,r27,12 ffc17108: 7d 09 da 14 add r8,r9,r27 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc1710c: 7d 29 d8 2e lwzx r9,r9,r27 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc17110: 39 08 00 04 addi r8,r8,4 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) ffc17114: 7f 89 40 00 cmpw cr7,r9,r8 ffc17118: 41 9e 00 64 beq- cr7,ffc1717c ffc1711c: 81 69 00 20 lwz r11,32(r9) ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; ffc17120: 39 40 00 01 li r10,1 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) ffc17124: 2f 8b 00 01 cmpwi cr7,r11,1 uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc17128: 2f 0b 00 00 cmpwi cr6,r11,0 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc1712c: 39 6b ff fe addi r11,r11,-2 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) ffc17130: 41 9e 00 20 beq- cr7,ffc17150 uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc17134: 40 9a 00 dc bne- cr6,ffc17210 ffc17138: 88 1f 00 0a lbz r0,10(r31) ffc1713c: 70 0a 00 03 andi. r10,r0,3 ffc17140: 41 82 00 d0 beq- ffc17210 <== NEVER TAKEN return fs_info->vol.rdir_loc; ffc17144: 81 5f 00 1c lwz r10,28(r31) fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << ffc17148: 88 1f 00 03 lbz r0,3(r31) ffc1714c: 7d 4a 00 30 slw r10,r10,r0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc17150: 80 09 00 24 lwz r0,36(r9) ffc17154: 54 0b ba 7e rlwinm r11,r0,23,9,31 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + ffc17158: 7d 4a 5a 14 add r10,r10,r11 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc1715c: 55 4a 20 36 rlwinm r10,r10,4,0,27 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); ffc17160: 54 00 df 3e rlwinm r0,r0,27,28,31 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + ffc17164: 7c 0a 02 14 add r0,r10,r0 { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) ffc17168: 7f 9e 00 00 cmpw cr7,r30,r0 ffc1716c: 41 9e 00 b8 beq- cr7,ffc17224 { *ret = (void *)the_node; return 0; } } the_node = the_node->next; ffc17170: 81 29 00 00 lwz r9,0(r9) ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) ffc17174: 7f 89 40 00 cmpw cr7,r9,r8 ffc17178: 40 9e ff a4 bne+ cr7,ffc1711c uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); ffc1717c: 81 3f 00 6c lwz r9,108(r31) fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) ffc17180: 2c 9e 00 00 cmpwi cr1,r30,0 uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); ffc17184: 7d 09 da 14 add r8,r9,r27 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc17188: 7d 29 d8 2e lwzx r9,r9,r27 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc1718c: 39 08 00 04 addi r8,r8,4 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) ffc17190: 7f 89 40 00 cmpw cr7,r9,r8 ffc17194: 40 be 00 4c bne+ cr7,ffc171e0 <== NEVER TAKEN ffc17198: 48 00 01 a8 b ffc17340 uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc1719c: 88 1f 00 0a lbz r0,10(r31) <== NOT EXECUTED ffc171a0: 70 0a 00 03 andi. r10,r0,3 <== NOT EXECUTED ffc171a4: 41 82 00 58 beq- ffc171fc <== NOT EXECUTED return fs_info->vol.rdir_loc; ffc171a8: 81 5f 00 1c lwz r10,28(r31) <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << ffc171ac: 88 1f 00 03 lbz r0,3(r31) <== NOT EXECUTED ffc171b0: 7d 4a 00 30 slw r10,r10,r0 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc171b4: 80 09 00 24 lwz r0,36(r9) <== NOT EXECUTED ffc171b8: 54 0b ba 7e rlwinm r11,r0,23,9,31 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + ffc171bc: 7d 4a 5a 14 add r10,r10,r11 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc171c0: 55 4a 20 36 rlwinm r10,r10,4,0,27 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); ffc171c4: 54 00 df 3e rlwinm r0,r0,27,28,31 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + ffc171c8: 7c 0a 02 14 add r0,r10,r0 <== NOT EXECUTED { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) ffc171cc: 7f 9e 00 00 cmpw cr7,r30,r0 <== NOT EXECUTED ffc171d0: 41 9e 00 ac beq- cr7,ffc1727c <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; ffc171d4: 81 29 00 00 lwz r9,0(r9) <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) ffc171d8: 7f 89 40 00 cmpw cr7,r9,r8 <== NOT EXECUTED ffc171dc: 41 9e 01 64 beq- cr7,ffc17340 <== NOT EXECUTED ffc171e0: 81 69 00 20 lwz r11,32(r9) <== NOT EXECUTED ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; ffc171e4: 39 40 00 01 li r10,1 <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) ffc171e8: 2f 8b 00 01 cmpwi cr7,r11,1 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc171ec: 2f 0b 00 00 cmpwi cr6,r11,0 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc171f0: 39 6b ff fe addi r11,r11,-2 <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) ffc171f4: 41 be ff c0 beq- cr7,ffc171b4 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc171f8: 41 ba ff a4 beq- cr6,ffc1719c <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc171fc: 89 5f 00 05 lbz r10,5(r31) <== NOT EXECUTED ffc17200: 80 1f 00 30 lwz r0,48(r31) <== NOT EXECUTED ffc17204: 7d 6a 50 30 slw r10,r11,r10 <== NOT EXECUTED ffc17208: 7d 4a 02 14 add r10,r10,r0 <== NOT EXECUTED ffc1720c: 4b ff ff a0 b ffc171ac <== NOT EXECUTED ffc17210: 89 5f 00 05 lbz r10,5(r31) ffc17214: 80 1f 00 30 lwz r0,48(r31) ffc17218: 7d 6a 50 30 slw r10,r11,r10 ffc1721c: 7d 4a 02 14 add r10,r10,r0 ffc17220: 4b ff ff 28 b ffc17148 rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; ffc17224: 81 69 00 08 lwz r11,8(r9) return rc; ffc17228: 38 60 00 00 li r3,0 /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; ffc1722c: 91 3a 00 00 stw r9,0(r26) lfat_fd->links_num++; ffc17230: 38 0b 00 01 addi r0,r11,1 ffc17234: 90 09 00 08 stw r0,8(r9) * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } ffc17238: 80 01 00 2c lwz r0,44(r1) ffc1723c: 83 01 00 08 lwz r24,8(r1) ffc17240: 7c 08 03 a6 mtlr r0 ffc17244: 83 21 00 0c lwz r25,12(r1) ffc17248: 83 41 00 10 lwz r26,16(r1) ffc1724c: 83 61 00 14 lwz r27,20(r1) ffc17250: 83 81 00 18 lwz r28,24(r1) ffc17254: 83 a1 00 1c lwz r29,28(r1) ffc17258: 83 c1 00 20 lwz r30,32(r1) ffc1725c: 83 e1 00 24 lwz r31,36(r1) ffc17260: 38 21 00 28 addi r1,r1,40 ffc17264: 4e 80 00 20 blr uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc17268: 88 1f 00 0a lbz r0,10(r31) ffc1726c: 70 0a 00 03 andi. r10,r0,3 ffc17270: 41 a2 fe 58 beq- ffc170c8 <== NEVER TAKEN return fs_info->vol.rdir_loc; ffc17274: 81 7f 00 1c lwz r11,28(r31) ffc17278: 4b ff fe 64 b ffc170dc fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) ffc1727c: 41 86 00 10 beq- cr1,ffc1728c <== NOT EXECUTED ffc17280: 80 09 00 0c lwz r0,12(r9) <== NOT EXECUTED ffc17284: 7f 9e 00 00 cmpw cr7,r30,r0 <== NOT EXECUTED ffc17288: 40 9e ff 4c bne+ cr7,ffc171d4 <== NOT EXECUTED { *ret = (void *)the_node; return 0; ffc1728c: 3b 00 00 00 li r24,0 <== NOT EXECUTED } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); ffc17290: 38 60 00 44 li r3,68 ffc17294: 4b ff 1b 59 bl ffc08dec if ( lfat_fd == NULL ) ffc17298: 2f 83 00 00 cmpwi cr7,r3,0 } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); ffc1729c: 90 7a 00 00 stw r3,0(r26) ffc172a0: 7c 7d 1b 78 mr r29,r3 if ( lfat_fd == NULL ) ffc172a4: 41 9e 00 c0 beq- cr7,ffc17364 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); ffc172a8: 38 80 00 00 li r4,0 ffc172ac: 38 a0 00 44 li r5,68 ffc172b0: 48 00 cc 49 bl ffc23ef8 lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) ffc172b4: 2f 98 00 00 cmpwi cr7,r24,0 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; ffc172b8: 89 1d 00 30 lbz r8,48(r29) if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; ffc172bc: 38 e0 00 01 li r7,1 lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; ffc172c0: 81 5c 00 00 lwz r10,0(r28) ffc172c4: 81 7c 00 04 lwz r11,4(r28) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; ffc172c8: 55 08 00 3c rlwinm r8,r8,0,0,30 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; ffc172cc: 81 3c 00 08 lwz r9,8(r28) ffc172d0: 80 1c 00 0c lwz r0,12(r28) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; ffc172d4: 99 1d 00 30 stb r8,48(r29) lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; ffc172d8: 39 00 ff ff li r8,-1 if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; ffc172dc: 90 fd 00 08 stw r7,8(r29) lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; ffc172e0: 91 1d 00 3c stw r8,60(r29) lfat_fd->dir_pos = *dir_pos; ffc172e4: 91 5d 00 20 stw r10,32(r29) ffc172e8: 91 7d 00 24 stw r11,36(r29) ffc172ec: 91 3d 00 28 stw r9,40(r29) ffc172f0: 90 1d 00 2c stw r0,44(r29) if ( rc != RC_OK ) ffc172f4: 41 9e 00 54 beq- cr7,ffc17348 <== NEVER TAKEN lfat_fd->ino = key; ffc172f8: 93 dd 00 0c stw r30,12(r29) */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); ffc172fc: 80 7f 00 68 lwz r3,104(r31) ffc17300: 7f a4 eb 78 mr r4,r29 ffc17304: 7c 63 da 14 add r3,r3,r27 ffc17308: 4b ff 74 45 bl ffc0e74c <_Chain_Append> * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } ffc1730c: 80 01 00 2c lwz r0,44(r1) /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; ffc17310: 38 60 00 00 li r3,0 } ffc17314: 83 01 00 08 lwz r24,8(r1) ffc17318: 7c 08 03 a6 mtlr r0 ffc1731c: 83 21 00 0c lwz r25,12(r1) ffc17320: 83 41 00 10 lwz r26,16(r1) ffc17324: 83 61 00 14 lwz r27,20(r1) ffc17328: 83 81 00 18 lwz r28,24(r1) ffc1732c: 83 a1 00 1c lwz r29,28(r1) ffc17330: 83 c1 00 20 lwz r30,32(r1) ffc17334: 83 e1 00 24 lwz r31,36(r1) ffc17338: 38 21 00 28 addi r1,r1,40 ffc1733c: 4e 80 00 20 blr return 0; } } the_node = the_node->next; } return -1; ffc17340: 3b 00 ff ff li r24,-1 ffc17344: 4b ff ff 4c b ffc17290 if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); ffc17348: 7f 23 cb 78 mr r3,r25 <== NOT EXECUTED ffc1734c: 48 00 16 21 bl ffc1896c <== NOT EXECUTED if ( lfat_fd->ino == 0 ) ffc17350: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); ffc17354: 90 7d 00 0c stw r3,12(r29) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) ffc17358: 40 9e ff a4 bne+ cr7,ffc172fc <== NOT EXECUTED { free((*fat_fd)); ffc1735c: 80 7a 00 00 lwz r3,0(r26) <== NOT EXECUTED ffc17360: 4b ff 11 81 bl ffc084e0 <== NOT EXECUTED /* * XXX: kernel resource is unsufficient, but not the memory, * but there is no suitable errno :( */ rtems_set_errno_and_return_minus_one( ENOMEM ); ffc17364: 48 00 bc 7d bl ffc22fe0 <__errno> ffc17368: 38 00 00 0c li r0,12 ffc1736c: 90 03 00 00 stw r0,0(r3) ffc17370: 38 60 ff ff li r3,-1 ffc17374: 4b ff fe c4 b ffc17238 =============================================================================== ffc17390 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc17390: 94 21 ff c0 stwu r1,-64(r1) ffc17394: 7c 08 02 a6 mflr r0 ffc17398: 93 e1 00 3c stw r31,60(r1) uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) ffc1739c: 7c df 33 79 mr. r31,r6 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc173a0: 90 01 00 44 stw r0,68(r1) int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; ffc173a4: 38 00 00 00 li r0,0 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc173a8: 93 21 00 24 stw r25,36(r1) ffc173ac: 7c f9 3b 78 mr r25,r7 ffc173b0: 93 41 00 28 stw r26,40(r1) ffc173b4: 7c 9a 23 78 mr r26,r4 ffc173b8: 93 81 00 30 stw r28,48(r1) ffc173bc: 93 a1 00 34 stw r29,52(r1) ffc173c0: 7c 7d 1b 78 mr r29,r3 ffc173c4: 93 c1 00 38 stw r30,56(r1) ffc173c8: 7c be 2b 78 mr r30,r5 int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc173cc: 83 83 00 34 lwz r28,52(r3) uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) return cmpltd; ffc173d0: 38 60 00 00 li r3,0 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc173d4: 92 c1 00 18 stw r22,24(r1) ffc173d8: 92 e1 00 1c stw r23,28(r1) ffc173dc: 93 01 00 20 stw r24,32(r1) ffc173e0: 93 61 00 2c stw r27,44(r1) int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; ffc173e4: 90 01 00 08 stw r0,8(r1) uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) ffc173e8: 41 82 01 48 beq- ffc17530 <== NEVER TAKEN /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) ffc173ec: 81 24 00 18 lwz r9,24(r4) ffc173f0: 7f 89 28 40 cmplw cr7,r9,r5 ffc173f4: 40 9d 01 3c ble- cr7,ffc17530 <== NEVER TAKEN return FAT_EOF; if ((count > fat_fd->fat_file_size) || ffc173f8: 7f 9f 48 40 cmplw cr7,r31,r9 ffc173fc: 40 9d 01 6c ble- cr7,ffc17568 <== ALWAYS TAKEN (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; ffc17400: 7f fe 48 50 subf r31,r30,r9 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc17404: 80 1a 00 20 lwz r0,32(r26) ffc17408: 2f 80 00 01 cmpwi cr7,r0,1 ffc1740c: 41 9e 01 6c beq- cr7,ffc17578 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc17410: 8b 1c 00 08 lbz r24,8(r28) save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); ffc17414: 7f a3 eb 78 mr r3,r29 ffc17418: 7f 44 d3 78 mr r4,r26 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); ffc1741c: a2 fc 00 06 lhz r23,6(r28) return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc17420: 7f d8 c4 30 srw r24,r30,r24 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); ffc17424: 7f 05 c3 78 mr r5,r24 ffc17428: 38 c1 00 08 addi r6,r1,8 ffc1742c: 4b ff fa f5 bl ffc16f20 if (rc != RC_OK) ffc17430: 7c 83 23 79 mr. r3,r4 ffc17434: 40 82 00 fc bne- ffc17530 <== NEVER TAKEN return rc; while (count > 0) ffc17438: 2f 9f 00 00 cmpwi cr7,r31,0 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); ffc1743c: 3a f7 ff ff addi r23,r23,-1 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc17440: 3a c0 00 00 li r22,0 ffc17444: 3b 60 00 00 li r27,0 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); ffc17448: 7f d7 b8 38 and r23,r30,r23 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc1744c: 41 9e 00 c8 beq- cr7,ffc17514 <== NEVER TAKEN cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) ffc17450: 88 1c 00 02 lbz r0,2(r28) return rc; while (count > 0) ffc17454: 7e e9 bb 78 mr r9,r23 cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) ffc17458: a0 bc 00 00 lhz r5,0(r28) return rc; while (count > 0) ffc1745c: 3b 60 00 00 li r27,0 ffc17460: 48 00 00 74 b ffc174d4 uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc17464: 89 4b 00 0a lbz r10,10(r11) <== NOT EXECUTED ffc17468: 71 48 00 03 andi. r8,r10,3 <== NOT EXECUTED ffc1746c: 41 82 00 90 beq- ffc174fc <== NOT EXECUTED return fs_info->vol.rdir_loc; ffc17470: 80 8b 00 1c lwz r4,28(r11) <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); ffc17474: 7d 20 04 30 srw r0,r9,r0 byte = ofs & (fs_info->vol.bps - 1); ffc17478: 38 a5 ff ff addi r5,r5,-1 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); ffc1747c: 7c a5 48 38 and r5,r5,r9 ffc17480: 7c f9 da 14 add r7,r25,r27 ffc17484: 7c 84 02 14 add r4,r4,r0 ffc17488: 7f c6 f3 78 mr r6,r30 ffc1748c: 7f a3 eb 78 mr r3,r29 ffc17490: 48 00 10 ed bl ffc1857c <_fat_block_read> if ( ret < 0 ) return -1; count -= c; cmpltd += c; ffc17494: 7f 7b f2 14 add r27,r27,r30 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) ffc17498: 2f 83 00 00 cmpwi cr7,r3,0 return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc1749c: 38 a1 00 08 addi r5,r1,8 ffc174a0: 7f a3 eb 78 mr r3,r29 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) ffc174a4: 41 9c 01 2c blt- cr7,ffc175d0 <== NEVER TAKEN return -1; count -= c; cmpltd += c; save_cln = cur_cln; ffc174a8: 82 c1 00 08 lwz r22,8(r1) rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc174ac: 7f fe f8 50 subf r31,r30,r31 return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc174b0: 7e c4 b3 78 mr r4,r22 ffc174b4: 48 00 9b 59 bl ffc2100c rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc174b8: 2f 9f 00 00 cmpwi cr7,r31,0 count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) ffc174bc: 2c 03 00 00 cmpwi r3,0 return rc; ofs = 0; ffc174c0: 39 20 00 00 li r9,0 count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) ffc174c4: 40 82 00 6c bne- ffc17530 <== NEVER TAKEN rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc174c8: 41 9e 00 48 beq- cr7,ffc17510 <== ALWAYS TAKEN ffc174cc: 88 1c 00 02 lbz r0,2(r28) <== NOT EXECUTED ffc174d0: a0 bc 00 00 lhz r5,0(r28) <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); ffc174d4: a3 dc 00 06 lhz r30,6(r28) sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); ffc174d8: 80 81 00 08 lwz r4,8(r1) if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); ffc174dc: 7f c9 f0 50 subf r30,r9,r30 ffc174e0: 7f 1e f8 40 cmplw cr6,r30,r31 uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc174e4: 2f 84 00 00 cmpwi cr7,r4,0 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc174e8: 38 84 ff fe addi r4,r4,-2 ffc174ec: 40 99 00 08 ble- cr6,ffc174f4 ffc174f0: 7f fe fb 78 mr r30,r31 fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc174f4: 81 7d 00 34 lwz r11,52(r29) uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc174f8: 41 be ff 6c beq- cr7,ffc17464 <== NEVER TAKEN return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc174fc: 89 4b 00 05 lbz r10,5(r11) ffc17500: 81 6b 00 30 lwz r11,48(r11) ffc17504: 7c 84 50 30 slw r4,r4,r10 ffc17508: 7c 84 5a 14 add r4,r4,r11 ffc1750c: 4b ff ff 68 b ffc17474 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ofs = 0; ffc17510: 7f 63 db 78 mr r3,r27 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); ffc17514: 88 1c 00 08 lbz r0,8(r28) ffc17518: 3a f7 ff ff addi r23,r23,-1 ffc1751c: 7f 77 da 14 add r27,r23,r27 fat_fd->map.disk_cln = save_cln; ffc17520: 92 da 00 38 stw r22,56(r26) } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); ffc17524: 7f 7b 04 30 srw r27,r27,r0 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ffc17528: 7f 1b c2 14 add r24,r27,r24 ffc1752c: 93 1a 00 34 stw r24,52(r26) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } ffc17530: 80 01 00 44 lwz r0,68(r1) ffc17534: 82 c1 00 18 lwz r22,24(r1) ffc17538: 7c 08 03 a6 mtlr r0 ffc1753c: 82 e1 00 1c lwz r23,28(r1) ffc17540: 83 01 00 20 lwz r24,32(r1) ffc17544: 83 21 00 24 lwz r25,36(r1) ffc17548: 83 41 00 28 lwz r26,40(r1) ffc1754c: 83 61 00 2c lwz r27,44(r1) ffc17550: 83 81 00 30 lwz r28,48(r1) ffc17554: 83 a1 00 34 lwz r29,52(r1) ffc17558: 83 c1 00 38 lwz r30,56(r1) ffc1755c: 83 e1 00 3c lwz r31,60(r1) ffc17560: 38 21 00 40 addi r1,r1,64 ffc17564: 4e 80 00 20 blr */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) ffc17568: 7c 1f 48 50 subf r0,r31,r9 * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || ffc1756c: 7f 85 00 40 cmplw cr7,r5,r0 ffc17570: 40 bd fe 94 ble- cr7,ffc17404 <== ALWAYS TAKEN ffc17574: 4b ff fe 8c b ffc17400 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc17578: 80 1a 00 24 lwz r0,36(r26) ffc1757c: 2f 80 00 00 cmpwi cr7,r0,0 ffc17580: 40 be fe 90 bne- cr7,ffc17410 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc17584: 88 1c 00 0a lbz r0,10(r28) if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc17588: 70 08 00 03 andi. r8,r0,3 ffc1758c: 41 a2 fe 84 beq- ffc17410 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); ffc17590: 81 3a 00 1c lwz r9,28(r26) uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc17594: 2f 89 00 00 cmpwi cr7,r9,0 ffc17598: 40 9e 00 40 bne- cr7,ffc175d8 <== NEVER TAKEN return fs_info->vol.rdir_loc; ffc1759c: 80 9c 00 1c lwz r4,28(r28) sec += (start >> fs_info->vol.sec_log2); ffc175a0: 88 1c 00 02 lbz r0,2(r28) byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); ffc175a4: 7f a3 eb 78 mr r3,r29 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ffc175a8: a0 bc 00 00 lhz r5,0(r28) ret = _fat_block_read(mt_entry, sec, byte, count, buf); ffc175ac: 7f e6 fb 78 mr r6,r31 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); ffc175b0: 7f c0 04 30 srw r0,r30,r0 byte = start & (fs_info->vol.bps - 1); ffc175b4: 38 a5 ff ff addi r5,r5,-1 ret = _fat_block_read(mt_entry, sec, byte, count, buf); ffc175b8: 7c 84 02 14 add r4,r4,r0 ffc175bc: 7f c5 28 38 and r5,r30,r5 ffc175c0: 7f 27 cb 78 mr r7,r25 ffc175c4: 48 00 0f b9 bl ffc1857c <_fat_block_read> if ( ret < 0 ) ffc175c8: 2c 03 00 00 cmpwi r3,0 ffc175cc: 40 80 ff 64 bge+ ffc17530 <== ALWAYS TAKEN sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; ffc175d0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc175d4: 4b ff ff 5c b ffc17530 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc175d8: 89 7c 00 05 lbz r11,5(r28) <== NOT EXECUTED ffc175dc: 38 89 ff fe addi r4,r9,-2 <== NOT EXECUTED ffc175e0: 80 1c 00 30 lwz r0,48(r28) <== NOT EXECUTED ffc175e4: 7c 84 58 30 slw r4,r4,r11 <== NOT EXECUTED ffc175e8: 7c 84 02 14 add r4,r4,r0 <== NOT EXECUTED ffc175ec: 4b ff ff b4 b ffc175a0 <== NOT EXECUTED =============================================================================== ffc1807c : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc1807c: 94 21 ff d8 stwu r1,-40(r1) ffc18080: 7c 08 02 a6 mflr r0 ffc18084: 90 01 00 2c stw r0,44(r1) fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc18088: 80 04 00 20 lwz r0,32(r4) int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc1808c: 93 a1 00 1c stw r29,28(r1) fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc18090: 2f 80 00 01 cmpwi cr7,r0,1 fat_file_fd_t *fat_fd ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; ffc18094: 83 a4 00 1c lwz r29,28(r4) int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc18098: 93 81 00 18 stw r28,24(r1) ffc1809c: 7c 7c 1b 78 mr r28,r3 ffc180a0: 93 c1 00 20 stw r30,32(r1) ffc180a4: 7c 9e 23 78 mr r30,r4 ffc180a8: 93 e1 00 24 stw r31,36(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; ffc180ac: 93 a1 00 08 stw r29,8(r1) rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc180b0: 83 e3 00 34 lwz r31,52(r3) uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc180b4: 41 9e 00 b4 beq- cr7,ffc18168 <== NEVER TAKEN return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc180b8: 81 3f 00 0c lwz r9,12(r31) ffc180bc: 80 1f 00 10 lwz r0,16(r31) ffc180c0: 7f a9 48 38 and r9,r29,r9 ffc180c4: 7f 89 00 40 cmplw cr7,r9,r0 { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; ffc180c8: 38 00 00 00 li r0,0 ffc180cc: 90 1e 00 18 stw r0,24(r30) while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc180d0: 41 bc 00 34 blt+ cr7,ffc18104 <== ALWAYS TAKEN ffc180d4: 48 00 00 68 b ffc1813c <== NOT EXECUTED ffc180d8: 81 7f 00 0c lwz r11,12(r31) ffc180dc: 80 01 00 08 lwz r0,8(r1) ffc180e0: 81 3f 00 10 lwz r9,16(r31) ffc180e4: 7c 0b 58 38 and r11,r0,r11 ffc180e8: 7f 8b 48 40 cmplw cr7,r11,r9 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; ffc180ec: a1 3f 00 06 lhz r9,6(r31) ffc180f0: 81 7e 00 18 lwz r11,24(r30) ffc180f4: 7d 2b 4a 14 add r9,r11,r9 ffc180f8: 91 3e 00 18 stw r9,24(r30) return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc180fc: 40 9c 00 44 bge- cr7,ffc18140 <== ALWAYS TAKEN ffc18100: 7c 1d 03 78 mr r29,r0 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc18104: 7f a4 eb 78 mr r4,r29 ffc18108: 7f 83 e3 78 mr r3,r28 ffc1810c: 38 a1 00 08 addi r5,r1,8 ffc18110: 48 00 8e fd bl ffc2100c if ( rc != RC_OK ) ffc18114: 2c 03 00 00 cmpwi r3,0 ffc18118: 41 82 ff c0 beq+ ffc180d8 <== ALWAYS TAKEN fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } ffc1811c: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc18120: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc18124: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18128: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc1812c: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc18130: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc18134: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc18138: 4e 80 00 20 blr <== NOT EXECUTED ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; ffc1813c: 3b a0 00 00 li r29,0 <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } ffc18140: 80 01 00 2c lwz r0,44(r1) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; ffc18144: 38 60 00 00 li r3,0 if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; ffc18148: 93 be 00 3c stw r29,60(r30) return rc; } ffc1814c: 7c 08 03 a6 mtlr r0 ffc18150: 83 81 00 18 lwz r28,24(r1) ffc18154: 83 a1 00 1c lwz r29,28(r1) ffc18158: 83 c1 00 20 lwz r30,32(r1) ffc1815c: 83 e1 00 24 lwz r31,36(r1) ffc18160: 38 21 00 28 addi r1,r1,40 ffc18164: 4e 80 00 20 blr fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc18168: 80 04 00 24 lwz r0,36(r4) <== NOT EXECUTED ffc1816c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc18170: 40 be ff 48 bne- cr7,ffc180b8 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc18174: 88 1f 00 0a lbz r0,10(r31) <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc18178: 70 09 00 03 andi. r9,r0,3 <== NOT EXECUTED ffc1817c: 41 82 ff 3c beq+ ffc180b8 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; ffc18180: 80 1f 00 28 lwz r0,40(r31) <== NOT EXECUTED return rc; ffc18184: 38 60 00 00 li r3,0 <== NOT EXECUTED /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; ffc18188: 90 04 00 18 stw r0,24(r4) <== NOT EXECUTED return rc; ffc1818c: 4b ff ff 90 b ffc1811c <== NOT EXECUTED =============================================================================== ffc175f0 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { ffc175f0: 94 21 ff d8 stwu r1,-40(r1) ffc175f4: 7c 08 02 a6 mflr r0 ffc175f8: 7d 80 00 26 mfcr r12 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; ffc175fc: 39 60 00 00 li r11,0 fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { ffc17600: 90 01 00 2c stw r0,44(r1) uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) ffc17604: 80 04 00 18 lwz r0,24(r4) uint32_t new_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; ffc17608: 91 61 00 0c stw r11,12(r1) uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; ffc1760c: 39 60 ff ff li r11,-1 if ( new_length >= fat_fd->fat_file_size ) ffc17610: 7f 80 28 40 cmplw cr7,r0,r5 fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { ffc17614: 93 c1 00 20 stw r30,32(r1) ffc17618: 7c 9e 23 78 mr r30,r4 ffc1761c: 93 e1 00 24 stw r31,36(r1) ffc17620: 7c 7f 1b 78 mr r31,r3 ffc17624: 93 a1 00 1c stw r29,28(r1) ffc17628: 91 81 00 18 stw r12,24(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc1762c: 81 23 00 34 lwz r9,52(r3) uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; ffc17630: 91 61 00 08 stw r11,8(r1) if ( new_length >= fat_fd->fat_file_size ) ffc17634: 40 9d 00 90 ble- cr7,ffc176c4 <== NEVER TAKEN return rc; assert(fat_fd->fat_file_size); ffc17638: 2f 80 00 00 cmpwi cr7,r0,0 ffc1763c: 41 9e 00 fc beq- cr7,ffc17738 <== NEVER TAKEN cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; ffc17640: a3 a9 00 06 lhz r29,6(r9) ffc17644: 89 29 00 08 lbz r9,8(r9) ffc17648: 3b bd ff ff addi r29,r29,-1 ffc1764c: 7f bd 2a 14 add r29,r29,r5 ffc17650: 7f bd 4c 30 srw r29,r29,r9 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) ffc17654: 7f a9 48 30 slw r9,r29,r9 ffc17658: 7f 80 48 40 cmplw cr7,r0,r9 return RC_OK; ffc1765c: 38 00 00 00 li r0,0 assert(fat_fd->fat_file_size); cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) ffc17660: 40 9d 00 3c ble- cr7,ffc1769c <== NEVER TAKEN return RC_OK; if (cl_start != 0) ffc17664: 2e 1d 00 00 cmpwi cr4,r29,0 ffc17668: 41 92 00 18 beq- cr4,ffc17680 <== ALWAYS TAKEN { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); ffc1766c: 38 bd ff ff addi r5,r29,-1 <== NOT EXECUTED ffc17670: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc17674: 4b ff f8 ad bl ffc16f20 <== NOT EXECUTED if (rc != RC_OK) ffc17678: 7c 80 23 79 mr. r0,r4 <== NOT EXECUTED ffc1767c: 40 82 00 20 bne- ffc1769c <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); ffc17680: 7f e3 fb 78 mr r3,r31 ffc17684: 7f c4 f3 78 mr r4,r30 ffc17688: 7f a5 eb 78 mr r5,r29 ffc1768c: 38 c1 00 0c addi r6,r1,12 ffc17690: 4b ff f8 91 bl ffc16f20 if (rc != RC_OK) ffc17694: 7c 80 23 79 mr. r0,r4 ffc17698: 41 82 00 58 beq- ffc176f0 <== ALWAYS TAKEN fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; } return RC_OK; } ffc1769c: 7c 03 03 78 mr r3,r0 ffc176a0: 80 01 00 2c lwz r0,44(r1) ffc176a4: 81 81 00 18 lwz r12,24(r1) ffc176a8: 7c 08 03 a6 mtlr r0 ffc176ac: 83 a1 00 1c lwz r29,28(r1) ffc176b0: 83 c1 00 20 lwz r30,32(r1) ffc176b4: 7d 80 81 20 mtcrf 8,r12 ffc176b8: 83 e1 00 24 lwz r31,36(r1) ffc176bc: 38 21 00 28 addi r1,r1,40 ffc176c0: 4e 80 00 20 blr uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) return rc; ffc176c4: 38 00 00 00 li r0,0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; } return RC_OK; } ffc176c8: 81 81 00 18 lwz r12,24(r1) <== NOT EXECUTED ffc176cc: 7c 03 03 78 mr r3,r0 <== NOT EXECUTED ffc176d0: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc176d4: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc176d8: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc176dc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc176e0: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc176e4: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc176e8: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc176ec: 4e 80 00 20 blr <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); ffc176f0: 80 81 00 0c lwz r4,12(r1) ffc176f4: 7f e3 fb 78 mr r3,r31 ffc176f8: 48 00 9e dd bl ffc215d4 if (rc != RC_OK) ffc176fc: 7c 60 1b 79 mr. r0,r3 ffc17700: 40 a2 ff 9c bne- ffc1769c <== NEVER TAKEN return rc; if (cl_start != 0) ffc17704: 41 92 ff 98 beq+ cr4,ffc1769c <== ALWAYS TAKEN { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); ffc17708: 80 81 00 08 lwz r4,8(r1) <== NOT EXECUTED ffc1770c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc17710: 38 a0 ff ff li r5,-1 <== NOT EXECUTED ffc17714: 48 00 9b 5d bl ffc21270 <== NOT EXECUTED if ( rc != RC_OK ) ffc17718: 7c 60 1b 79 mr. r0,r3 <== NOT EXECUTED ffc1771c: 40 a2 ff 80 bne- ffc1769c <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; ffc17720: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; ffc17724: 3b bd ff ff addi r29,r29,-1 <== NOT EXECUTED ffc17728: 93 be 00 34 stw r29,52(r30) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; ffc1772c: 91 3e 00 38 stw r9,56(r30) <== NOT EXECUTED fat_fd->map.last_cln = new_last_cln; ffc17730: 91 3e 00 3c stw r9,60(r30) <== NOT EXECUTED ffc17734: 4b ff ff 68 b ffc1769c <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); ffc17738: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc1773c: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc17740: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc17744: 38 63 3e b8 addi r3,r3,16056 <== NOT EXECUTED ffc17748: 38 80 02 6d li r4,621 <== NOT EXECUTED ffc1774c: 38 a5 3e a4 addi r5,r5,16036 <== NOT EXECUTED ffc17750: 38 c6 3f 00 addi r6,r6,16128 <== NOT EXECUTED ffc17754: 4b ff 05 3d bl ffc07c90 <__assert_func> <== NOT EXECUTED =============================================================================== ffc17b98 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc17b98: 94 21 ff c0 stwu r1,-64(r1) ffc17b9c: 7c 08 02 a6 mflr r0 uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) return cmpltd; ffc17ba0: 39 20 00 00 li r9,0 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc17ba4: 93 e1 00 3c stw r31,60(r1) uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) ffc17ba8: 7c df 33 79 mr. r31,r6 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc17bac: 90 01 00 44 stw r0,68(r1) int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; ffc17bb0: 38 00 00 00 li r0,0 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc17bb4: 93 21 00 24 stw r25,36(r1) ffc17bb8: 7c f9 3b 78 mr r25,r7 ffc17bbc: 93 61 00 2c stw r27,44(r1) ffc17bc0: 7c 9b 23 78 mr r27,r4 ffc17bc4: 93 81 00 30 stw r28,48(r1) ffc17bc8: 7c bc 2b 78 mr r28,r5 ffc17bcc: 93 a1 00 34 stw r29,52(r1) ffc17bd0: 93 c1 00 38 stw r30,56(r1) ffc17bd4: 7c 7e 1b 78 mr r30,r3 ffc17bd8: 92 c1 00 18 stw r22,24(r1) ffc17bdc: 92 e1 00 1c stw r23,28(r1) ffc17be0: 93 01 00 20 stw r24,32(r1) ffc17be4: 93 41 00 28 stw r26,40(r1) int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc17be8: 83 a3 00 34 lwz r29,52(r3) uint32_t cmpltd = 0; uint32_t cur_cln = 0; ffc17bec: 90 01 00 0c stw r0,12(r1) uint32_t cl_start = 0; uint32_t ofs = 0; uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; ffc17bf0: 90 01 00 08 stw r0,8(r1) if ( count == 0 ) ffc17bf4: 41 82 01 74 beq- ffc17d68 <== NEVER TAKEN return cmpltd; if ( start > fat_fd->fat_file_size ) ffc17bf8: 80 04 00 18 lwz r0,24(r4) ffc17bfc: 7f 80 28 40 cmplw cr7,r0,r5 ffc17c00: 41 9c 02 14 blt- cr7,ffc17e14 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || ffc17c04: 80 04 00 14 lwz r0,20(r4) ffc17c08: 7f 9f 00 40 cmplw cr7,r31,r0 ffc17c0c: 41 9d 02 08 bgt- cr7,ffc17e14 <== NEVER TAKEN (start > fat_fd->size_limit - count)) ffc17c10: 7c 1f 00 50 subf r0,r31,r0 return cmpltd; if ( start > fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || ffc17c14: 7f 85 00 40 cmplw cr7,r5,r0 ffc17c18: 41 9d 01 fc bgt- cr7,ffc17e14 <== NEVER TAKEN (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); ffc17c1c: 7f 5f 2a 14 add r26,r31,r5 ffc17c20: 7f 45 d3 78 mr r5,r26 ffc17c24: 38 c1 00 08 addi r6,r1,8 ffc17c28: 4b ff fd 31 bl ffc17958 if (rc != RC_OK) ffc17c2c: 7c 69 1b 79 mr. r9,r3 ffc17c30: 40 82 01 38 bne- ffc17d68 <== NEVER TAKEN /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) ffc17c34: 80 01 00 08 lwz r0,8(r1) ffc17c38: 7f 9a 00 00 cmpw cr7,r26,r0 ffc17c3c: 41 9e 00 08 beq- cr7,ffc17c44 <== ALWAYS TAKEN count = c - start; ffc17c40: 7f fc 00 50 subf r31,r28,r0 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc17c44: 80 1b 00 20 lwz r0,32(r27) ffc17c48: 2f 80 00 01 cmpwi cr7,r0,1 ffc17c4c: 41 9e 01 58 beq- cr7,ffc17da4 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc17c50: 8b 1d 00 08 lbz r24,8(r29) save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); ffc17c54: 7f c3 f3 78 mr r3,r30 ffc17c58: 7f 64 db 78 mr r4,r27 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); ffc17c5c: a3 5d 00 06 lhz r26,6(r29) return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc17c60: 7f 98 c4 30 srw r24,r28,r24 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); ffc17c64: 7f 05 c3 78 mr r5,r24 ffc17c68: 38 c1 00 0c addi r6,r1,12 ffc17c6c: 4b ff f2 b5 bl ffc16f20 if (rc != RC_OK) ffc17c70: 7c 89 23 79 mr. r9,r4 ffc17c74: 40 82 00 f4 bne- ffc17d68 <== NEVER TAKEN return rc; while (count > 0) ffc17c78: 2f 9f 00 00 cmpwi cr7,r31,0 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); ffc17c7c: 3b 5a ff ff addi r26,r26,-1 ffc17c80: 7f 9c d0 38 and r28,r28,r26 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc17c84: 3a c0 00 00 li r22,0 ffc17c88: 7f 8b e3 78 mr r11,r28 ffc17c8c: 3b 40 00 00 li r26,0 ffc17c90: 40 be 00 78 bne+ cr7,ffc17d08 <== ALWAYS TAKEN ffc17c94: 48 00 00 b8 b ffc17d4c <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc17c98: 88 09 00 0a lbz r0,10(r9) <== NOT EXECUTED ffc17c9c: 70 0a 00 03 andi. r10,r0,3 <== NOT EXECUTED ffc17ca0: 41 82 00 94 beq- ffc17d34 <== NOT EXECUTED return fs_info->vol.rdir_loc; ffc17ca4: 80 89 00 1c lwz r4,28(r9) <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); ffc17ca8: 88 1d 00 02 lbz r0,2(r29) byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); ffc17cac: 7c f9 d2 14 add r7,r25,r26 { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ffc17cb0: a0 bd 00 00 lhz r5,0(r29) ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); ffc17cb4: 7f c3 f3 78 mr r3,r30 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); ffc17cb8: 7d 60 04 30 srw r0,r11,r0 byte = ofs & (fs_info->vol.bps - 1); ffc17cbc: 38 a5 ff ff addi r5,r5,-1 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); ffc17cc0: 7d 65 28 38 and r5,r11,r5 ffc17cc4: 7c 84 02 14 add r4,r4,r0 ffc17cc8: 48 00 09 95 bl ffc1865c <_fat_block_write> return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc17ccc: 38 a1 00 0c addi r5,r1,12 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) ffc17cd0: 2f 83 00 00 cmpwi cr7,r3,0 return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc17cd4: 7f c3 f3 78 mr r3,r30 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) ffc17cd8: 41 9c 01 34 blt- cr7,ffc17e0c <== NEVER TAKEN return -1; count -= c; cmpltd += c; save_cln = cur_cln; ffc17cdc: 82 c1 00 0c lwz r22,12(r1) ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; ffc17ce0: 82 e1 00 08 lwz r23,8(r1) cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc17ce4: 7e c4 b3 78 mr r4,r22 ffc17ce8: 48 00 93 25 bl ffc2100c rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc17cec: 7f f7 f8 50 subf r31,r23,r31 count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) ffc17cf0: 7c 69 1b 79 mr. r9,r3 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc17cf4: 2f 9f 00 00 cmpwi cr7,r31,0 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; ffc17cf8: 7f 5a ba 14 add r26,r26,r23 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ofs = 0; ffc17cfc: 39 60 00 00 li r11,0 count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) ffc17d00: 40 82 00 68 bne- ffc17d68 <== NEVER TAKEN rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc17d04: 41 9e 00 44 beq- cr7,ffc17d48 { c = MIN(count, (fs_info->vol.bpc - ofs)); ffc17d08: a0 dd 00 06 lhz r6,6(r29) sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); ffc17d0c: 80 81 00 0c lwz r4,12(r1) if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); ffc17d10: 7c cb 30 50 subf r6,r11,r6 ffc17d14: 7f 06 f8 40 cmplw cr6,r6,r31 uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc17d18: 2f 84 00 00 cmpwi cr7,r4,0 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17d1c: 38 84 ff fe addi r4,r4,-2 ffc17d20: 40 99 00 08 ble- cr6,ffc17d28 ffc17d24: 7f e6 fb 78 mr r6,r31 fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc17d28: 81 3e 00 34 lwz r9,52(r30) if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); ffc17d2c: 90 c1 00 08 stw r6,8(r1) uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc17d30: 41 be ff 68 beq- cr7,ffc17c98 <== NEVER TAKEN return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17d34: 89 49 00 05 lbz r10,5(r9) ffc17d38: 80 09 00 30 lwz r0,48(r9) ffc17d3c: 7c 84 50 30 slw r4,r4,r10 ffc17d40: 7c 84 02 14 add r4,r4,r0 ffc17d44: 4b ff ff 64 b ffc17ca8 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc17d48: 7f 49 d3 78 mr r9,r26 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); ffc17d4c: 88 1d 00 08 lbz r0,8(r29) ffc17d50: 3b 9c ff ff addi r28,r28,-1 ffc17d54: 7f 5c d2 14 add r26,r28,r26 fat_fd->map.disk_cln = save_cln; ffc17d58: 92 db 00 38 stw r22,56(r27) } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); ffc17d5c: 7f 5a 04 30 srw r26,r26,r0 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ffc17d60: 7f 1a c2 14 add r24,r26,r24 ffc17d64: 93 1b 00 34 stw r24,52(r27) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } ffc17d68: 80 01 00 44 lwz r0,68(r1) ffc17d6c: 7d 23 4b 78 mr r3,r9 ffc17d70: 82 c1 00 18 lwz r22,24(r1) ffc17d74: 7c 08 03 a6 mtlr r0 ffc17d78: 82 e1 00 1c lwz r23,28(r1) ffc17d7c: 83 01 00 20 lwz r24,32(r1) ffc17d80: 83 21 00 24 lwz r25,36(r1) ffc17d84: 83 41 00 28 lwz r26,40(r1) ffc17d88: 83 61 00 2c lwz r27,44(r1) ffc17d8c: 83 81 00 30 lwz r28,48(r1) ffc17d90: 83 a1 00 34 lwz r29,52(r1) ffc17d94: 83 c1 00 38 lwz r30,56(r1) ffc17d98: 83 e1 00 3c lwz r31,60(r1) ffc17d9c: 38 21 00 40 addi r1,r1,64 ffc17da0: 4e 80 00 20 blr * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc17da4: 80 1b 00 24 lwz r0,36(r27) ffc17da8: 2f 80 00 00 cmpwi cr7,r0,0 ffc17dac: 40 be fe a4 bne- cr7,ffc17c50 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc17db0: 88 1d 00 0a lbz r0,10(r29) * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc17db4: 70 09 00 03 andi. r9,r0,3 ffc17db8: 41 a2 fe 98 beq- ffc17c50 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); ffc17dbc: 81 7b 00 1c lwz r11,28(r27) fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc17dc0: 81 3e 00 34 lwz r9,52(r30) uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc17dc4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc17dc8: 40 9e 00 60 bne- cr7,ffc17e28 <== NEVER TAKEN ffc17dcc: 88 09 00 0a lbz r0,10(r9) ffc17dd0: 70 0a 00 03 andi. r10,r0,3 ffc17dd4: 41 82 00 54 beq- ffc17e28 <== NEVER TAKEN return fs_info->vol.rdir_loc; ffc17dd8: 80 89 00 1c lwz r4,28(r9) if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); ffc17ddc: 88 1d 00 02 lbz r0,2(r29) byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); ffc17de0: 7f c3 f3 78 mr r3,r30 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ffc17de4: a0 bd 00 00 lhz r5,0(r29) ret = _fat_block_write(mt_entry, sec, byte, count, buf); ffc17de8: 7f e6 fb 78 mr r6,r31 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); ffc17dec: 7f 80 04 30 srw r0,r28,r0 byte = start & (fs_info->vol.bps - 1); ffc17df0: 38 a5 ff ff addi r5,r5,-1 ret = _fat_block_write(mt_entry, sec, byte, count, buf); ffc17df4: 7c 84 02 14 add r4,r4,r0 ffc17df8: 7f 85 28 38 and r5,r28,r5 ffc17dfc: 7f 27 cb 78 mr r7,r25 ffc17e00: 48 00 08 5d bl ffc1865c <_fat_block_write> if ( ret < 0 ) ffc17e04: 7c 69 1b 79 mr. r9,r3 ffc17e08: 40 80 ff 60 bge+ ffc17d68 <== ALWAYS TAKEN sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; ffc17e0c: 39 20 ff ff li r9,-1 <== NOT EXECUTED ffc17e10: 4b ff ff 58 b ffc17d68 <== NOT EXECUTED if ( start > fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); ffc17e14: 48 00 b1 cd bl ffc22fe0 <__errno> <== NOT EXECUTED ffc17e18: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc17e1c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc17e20: 39 20 ff ff li r9,-1 <== NOT EXECUTED ffc17e24: 4b ff ff 44 b ffc17d68 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17e28: 89 49 00 05 lbz r10,5(r9) <== NOT EXECUTED ffc17e2c: 38 8b ff fe addi r4,r11,-2 <== NOT EXECUTED ffc17e30: 80 09 00 30 lwz r0,48(r9) <== NOT EXECUTED ffc17e34: 7c 84 50 30 slw r4,r4,r10 <== NOT EXECUTED ffc17e38: 7c 84 02 14 add r4,r4,r0 <== NOT EXECUTED ffc17e3c: 4b ff ff a0 b ffc17ddc <== NOT EXECUTED =============================================================================== ffc215d4 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { ffc215d4: 94 21 ff d0 stwu r1,-48(r1) ffc215d8: 7c 08 02 a6 mflr r0 ffc215dc: 90 01 00 34 stw r0,52(r1) ffc215e0: 93 c1 00 28 stw r30,40(r1) int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc215e4: 83 c3 00 34 lwz r30,52(r3) int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { ffc215e8: 93 41 00 18 stw r26,24(r1) ffc215ec: 7c 9a 23 78 mr r26,r4 fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc215f0: 81 3e 00 0c lwz r9,12(r30) ffc215f4: 80 1e 00 10 lwz r0,16(r30) ffc215f8: 7c 89 48 38 and r9,r4,r9 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { ffc215fc: 93 a1 00 24 stw r29,36(r1) fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc21600: 7f 89 00 40 cmplw cr7,r9,r0 ) { int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; ffc21604: 38 00 00 00 li r0,0 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { ffc21608: 93 61 00 1c stw r27,28(r1) ffc2160c: 7c 7d 1b 78 mr r29,r3 ffc21610: 93 81 00 20 stw r28,32(r1) ffc21614: 93 e1 00 2c stw r31,44(r1) int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; ffc21618: 90 01 00 08 stw r0,8(r1) uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc2161c: 40 9c 00 ac bge- cr7,ffc216c8 <== NEVER TAKEN ffc21620: 7c 9f 23 78 mr r31,r4 ffc21624: 3b 80 00 00 li r28,0 ffc21628: 3b 60 00 00 li r27,0 ffc2162c: 48 00 00 30 b ffc2165c fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); ffc21630: 4b ff fc 41 bl ffc21270 if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; ffc21634: 3b 9c 00 01 addi r28,r28,1 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) ffc21638: 2c 03 00 00 cmpwi r3,0 rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; ffc2163c: 83 e1 00 08 lwz r31,8(r1) fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) ffc21640: 41 82 00 08 beq- ffc21648 <== ALWAYS TAKEN ffc21644: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc21648: 81 3e 00 0c lwz r9,12(r30) ffc2164c: 80 1e 00 10 lwz r0,16(r30) ffc21650: 7f e9 48 38 and r9,r31,r9 ffc21654: 7f 89 00 40 cmplw cr7,r9,r0 ffc21658: 40 9c 00 78 bge- cr7,ffc216d0 <== ALWAYS TAKEN { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); ffc2165c: 7f e4 fb 78 mr r4,r31 ffc21660: 38 a1 00 08 addi r5,r1,8 ffc21664: 7f a3 eb 78 mr r3,r29 ffc21668: 4b ff f9 a5 bl ffc2100c fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); ffc2166c: 7f e4 fb 78 mr r4,r31 uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); if ( rc != RC_OK ) ffc21670: 7c 7f 1b 79 mr. r31,r3 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); ffc21674: 38 a0 00 00 li r5,0 ffc21678: 7f a3 eb 78 mr r3,r29 uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); if ( rc != RC_OK ) ffc2167c: 41 82 ff b4 beq+ ffc21630 <== ALWAYS TAKEN { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc21680: 80 1e 00 40 lwz r0,64(r30) <== NOT EXECUTED ffc21684: 2f 80 ff ff cmpwi cr7,r0,-1 <== NOT EXECUTED ffc21688: 41 9e 00 0c beq- cr7,ffc21694 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; ffc2168c: 7c 1c 02 14 add r0,r28,r0 <== NOT EXECUTED ffc21690: 90 1e 00 40 stw r0,64(r30) <== NOT EXECUTED fat_buf_release(fs_info); ffc21694: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc21698: 4b ff 6d 41 bl ffc183d8 <== NOT EXECUTED fat_buf_release(fs_info); if (rc1 != RC_OK) return rc1; return RC_OK; } ffc2169c: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc216a0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc216a4: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc216a8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc216ac: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc216b0: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc216b4: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc216b8: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc216bc: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc216c0: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc216c4: 4e 80 00 20 blr <== NOT EXECUTED { int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; ffc216c8: 3b 80 00 00 li r28,0 <== NOT EXECUTED fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; ffc216cc: 3b 60 00 00 li r27,0 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc216d0: 80 1e 00 40 lwz r0,64(r30) freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; ffc216d4: 93 5e 00 44 stw r26,68(r30) if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc216d8: 2f 80 ff ff cmpwi cr7,r0,-1 ffc216dc: 41 9e 00 0c beq- cr7,ffc216e8 <== ALWAYS TAKEN fs_info->vol.free_cls += freed_cls_cnt; ffc216e0: 7c 1c 02 14 add r0,r28,r0 <== NOT EXECUTED ffc216e4: 90 1e 00 40 stw r0,64(r30) <== NOT EXECUTED fat_buf_release(fs_info); ffc216e8: 7f c3 f3 78 mr r3,r30 ffc216ec: 4b ff 6c ed bl ffc183d8 if (rc1 != RC_OK) return rc1; return RC_OK; } ffc216f0: 80 01 00 34 lwz r0,52(r1) fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) fs_info->vol.free_cls += freed_cls_cnt; fat_buf_release(fs_info); ffc216f4: 7f 7f db 78 mr r31,r27 if (rc1 != RC_OK) return rc1; return RC_OK; } ffc216f8: 83 41 00 18 lwz r26,24(r1) ffc216fc: 7c 08 03 a6 mtlr r0 ffc21700: 7f e3 fb 78 mr r3,r31 ffc21704: 83 61 00 1c lwz r27,28(r1) ffc21708: 83 81 00 20 lwz r28,32(r1) ffc2170c: 83 a1 00 24 lwz r29,36(r1) ffc21710: 83 c1 00 28 lwz r30,40(r1) ffc21714: 83 e1 00 2c lwz r31,44(r1) ffc21718: 38 21 00 30 addi r1,r1,48 ffc2171c: 4e 80 00 20 blr =============================================================================== ffc18a94 : fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { fat_fs_info_t *fs_info = mt_entry->fs_info; ffc18a94: 81 23 00 34 lwz r9,52(r3) <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); ffc18a98: 39 00 ff fe li r8,-2 <== NOT EXECUTED ffc18a9c: 80 09 00 7c lwz r0,124(r9) <== NOT EXECUTED ffc18aa0: 81 29 00 70 lwz r9,112(r9) <== NOT EXECUTED ffc18aa4: 7c 00 20 50 subf r0,r0,r4 <== NOT EXECUTED ffc18aa8: 54 0b e8 fe rlwinm r11,r0,29,3,31 <== NOT EXECUTED ffc18aac: 7d 49 58 ae lbzx r10,r9,r11 <== NOT EXECUTED ffc18ab0: 54 00 07 7e clrlwi r0,r0,29 <== NOT EXECUTED ffc18ab4: 5d 00 00 3e rotlw r0,r8,r0 <== NOT EXECUTED ffc18ab8: 7c 00 50 38 and r0,r0,r10 <== NOT EXECUTED ffc18abc: 7c 09 59 ae stbx r0,r9,r11 <== NOT EXECUTED } ffc18ac0: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc2100c : rtems_bdbuf_buffer *block0 = NULL; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) ffc2100c: 2b 84 00 01 cmplwi cr7,r4,1 fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { ffc21010: 94 21 ff c8 stwu r1,-56(r1) ffc21014: 7c 08 02 a6 mflr r0 ffc21018: 93 41 00 20 stw r26,32(r1) ffc2101c: 7c ba 2b 78 mr r26,r5 ffc21020: 90 01 00 3c stw r0,60(r1) int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; rtems_bdbuf_buffer *block0 = NULL; ffc21024: 38 00 00 00 li r0,0 fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { ffc21028: 93 c1 00 30 stw r30,48(r1) ffc2102c: 7c 9e 23 78 mr r30,r4 ffc21030: 93 e1 00 34 stw r31,52(r1) ffc21034: 93 21 00 1c stw r25,28(r1) ffc21038: 93 61 00 24 stw r27,36(r1) ffc2103c: 93 81 00 28 stw r28,40(r1) ffc21040: 93 a1 00 2c stw r29,44(r1) int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ffc21044: 83 e3 00 34 lwz r31,52(r3) rtems_bdbuf_buffer *block0 = NULL; ffc21048: 90 01 00 08 stw r0,8(r1) uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) ffc2104c: 40 9d 00 80 ble- cr7,ffc210cc <== NEVER TAKEN ffc21050: 81 3f 00 34 lwz r9,52(r31) ffc21054: 38 09 00 01 addi r0,r9,1 ffc21058: 7f 84 00 40 cmplw cr7,r4,r0 ffc2105c: 41 9d 00 70 bgt- cr7,ffc210cc <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + ffc21060: 88 1f 00 0a lbz r0,10(r31) ffc21064: 70 09 00 01 andi. r9,r0,1 ffc21068: 40 82 00 a4 bne- ffc2110c <== ALWAYS TAKEN ffc2106c: 70 09 00 02 andi. r9,r0,2 <== NOT EXECUTED ffc21070: 8b 7f 00 02 lbz r27,2(r31) <== NOT EXECUTED ffc21074: 41 82 00 b4 beq- ffc21128 <== NOT EXECUTED ffc21078: 54 9d 08 3c rlwinm r29,r4,1,0,30 <== NOT EXECUTED ffc2107c: 80 1f 00 4c lwz r0,76(r31) <== NOT EXECUTED ffc21080: 7f bb dc 30 srw r27,r29,r27 <== NOT EXECUTED ffc21084: 7f 7b 02 14 add r27,r27,r0 <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); ffc21088: 7f e3 fb 78 mr r3,r31 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); ffc2108c: a3 3f 00 00 lhz r25,0(r31) rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); ffc21090: 7f 64 db 78 mr r4,r27 ffc21094: 38 a0 00 01 li r5,1 ffc21098: 38 c1 00 08 addi r6,r1,8 ffc2109c: 4b ff 70 f5 bl ffc18190 if (rc != RC_OK) ffc210a0: 7c 7c 1b 79 mr. r28,r3 ffc210a4: 40 82 00 38 bne- ffc210dc <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) ffc210a8: 88 1f 00 0a lbz r0,10(r31) if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); ffc210ac: 3b 39 ff ff addi r25,r25,-1 ffc210b0: 7f bd c8 38 and r29,r29,r25 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) ffc210b4: 2f 80 00 02 cmpwi cr7,r0,2 ffc210b8: 41 9e 00 84 beq- cr7,ffc2113c <== NEVER TAKEN ffc210bc: 2f 80 00 04 cmpwi cr7,r0,4 ffc210c0: 41 9e 01 10 beq- cr7,ffc211d0 <== NEVER TAKEN ffc210c4: 2f 80 00 01 cmpwi cr7,r0,1 ffc210c8: 41 9e 00 c0 beq- cr7,ffc21188 <== ALWAYS TAKEN *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); ffc210cc: 48 00 1f 15 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc210d0: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc210d4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc210d8: 3b 80 ff ff li r28,-1 <== NOT EXECUTED break; } return RC_OK; } ffc210dc: 80 01 00 3c lwz r0,60(r1) ffc210e0: 7f 83 e3 78 mr r3,r28 ffc210e4: 83 21 00 1c lwz r25,28(r1) ffc210e8: 7c 08 03 a6 mtlr r0 ffc210ec: 83 41 00 20 lwz r26,32(r1) ffc210f0: 83 61 00 24 lwz r27,36(r1) ffc210f4: 83 81 00 28 lwz r28,40(r1) ffc210f8: 83 a1 00 2c lwz r29,44(r1) ffc210fc: 83 c1 00 30 lwz r30,48(r1) ffc21100: 83 e1 00 34 lwz r31,52(r1) ffc21104: 38 21 00 38 addi r1,r1,56 ffc21108: 4e 80 00 20 blr /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + ffc2110c: 54 9d f8 7e rlwinm r29,r4,31,1,31 ffc21110: 8b 7f 00 02 lbz r27,2(r31) ffc21114: 7f bd 22 14 add r29,r29,r4 ffc21118: 80 1f 00 4c lwz r0,76(r31) ffc2111c: 7f bb dc 30 srw r27,r29,r27 ffc21120: 7f 7b 02 14 add r27,r27,r0 ffc21124: 4b ff ff 64 b ffc21088 ffc21128: 54 9d 10 3a rlwinm r29,r4,2,0,29 <== NOT EXECUTED ffc2112c: 80 1f 00 4c lwz r0,76(r31) <== NOT EXECUTED ffc21130: 7f bb dc 30 srw r27,r29,r27 <== NOT EXECUTED ffc21134: 7f 7b 02 14 add r27,r27,r0 <== NOT EXECUTED ffc21138: 4b ff ff 50 b ffc21088 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); ffc2113c: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc21140: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc21144: 83 21 00 1c lwz r25,28(r1) <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); ffc21148: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc2114c: 83 61 00 24 lwz r27,36(r1) <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); ffc21150: 7c 09 ea 2e lhzx r0,r9,r29 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc21154: 83 81 00 28 lwz r28,40(r1) <== NOT EXECUTED *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); ffc21158: 54 09 c2 3e rlwinm r9,r0,24,8,31 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc2115c: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); ffc21160: 54 00 44 2e rlwinm r0,r0,8,16,23 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc21164: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); ffc21168: 7d 20 03 78 or r0,r9,r0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc2116c: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); ffc21170: 90 1a 00 00 stw r0,0(r26) <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc21174: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc21178: 83 41 00 20 lwz r26,32(r1) <== NOT EXECUTED ffc2117c: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc21180: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc21184: 4e 80 00 20 blr <== NOT EXECUTED /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) ffc21188: a1 3f 00 00 lhz r9,0(r31) ffc2118c: 38 09 ff ff addi r0,r9,-1 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); ffc21190: 81 21 00 08 lwz r9,8(r1) if ( ofs == (fs_info->vol.bps - 1) ) ffc21194: 7f 80 e8 00 cmpw cr7,r0,r29 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); ffc21198: 81 29 00 24 lwz r9,36(r9) ffc2119c: 7c 09 e8 ae lbzx r0,r9,r29 ffc211a0: 90 1a 00 00 stw r0,0(r26) if ( ofs == (fs_info->vol.bps - 1) ) ffc211a4: 41 9e 00 88 beq- cr7,ffc2122c <== NEVER TAKEN *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; ffc211a8: 7f a9 ea 14 add r29,r9,r29 ffc211ac: 89 3d 00 01 lbz r9,1(r29) ffc211b0: 55 29 40 2e rlwinm r9,r9,8,0,23 ffc211b4: 7d 20 03 78 or r0,r9,r0 ffc211b8: 90 1a 00 00 stw r0,0(r26) } if ( FAT_CLUSTER_IS_ODD(cln) ) ffc211bc: 73 c9 00 01 andi. r9,r30,1 ffc211c0: 41 82 00 60 beq- ffc21220 *ret_val = (*ret_val) >> FAT12_SHIFT; ffc211c4: 54 00 e1 3e rlwinm r0,r0,28,4,31 ffc211c8: 90 1a 00 00 stw r0,0(r26) ffc211cc: 4b ff ff 10 b ffc210dc *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); ffc211d0: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc211d4: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED ffc211d8: 7d 29 e8 2e lwzx r9,r9,r29 <== NOT EXECUTED ffc211dc: 51 20 46 3e rlwimi r0,r9,8,24,31 <== NOT EXECUTED ffc211e0: 51 20 c4 2e rlwimi r0,r9,24,16,23 <== NOT EXECUTED ffc211e4: 51 20 42 1e rlwimi r0,r9,8,8,15 <== NOT EXECUTED ffc211e8: 51 20 c0 0e rlwimi r0,r9,24,0,7 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); ffc211ec: 90 1a 00 00 stw r0,0(r26) <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc211f0: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc211f4: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc211f8: 83 21 00 1c lwz r25,28(r1) <== NOT EXECUTED ffc211fc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc21200: 83 41 00 20 lwz r26,32(r1) <== NOT EXECUTED ffc21204: 83 61 00 24 lwz r27,36(r1) <== NOT EXECUTED ffc21208: 83 81 00 28 lwz r28,40(r1) <== NOT EXECUTED ffc2120c: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED ffc21210: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED ffc21214: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED ffc21218: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc2121c: 4e 80 00 20 blr <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; ffc21220: 54 00 05 3e clrlwi r0,r0,20 ffc21224: 90 1a 00 00 stw r0,0(r26) ffc21228: 4b ff fe b4 b ffc210dc * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, ffc2122c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc21230: 38 9b 00 01 addi r4,r27,1 <== NOT EXECUTED ffc21234: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc21238: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc2123c: 4b ff 6f 55 bl ffc18190 <== NOT EXECUTED &block0); if (rc != RC_OK) ffc21240: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc21244: 40 82 00 24 bne- ffc21268 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; ffc21248: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc2124c: 80 1a 00 00 lwz r0,0(r26) <== NOT EXECUTED ffc21250: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED ffc21254: 89 29 00 00 lbz r9,0(r9) <== NOT EXECUTED ffc21258: 55 29 40 2e rlwinm r9,r9,8,0,23 <== NOT EXECUTED ffc2125c: 7d 20 03 78 or r0,r9,r0 <== NOT EXECUTED ffc21260: 90 1a 00 00 stw r0,0(r26) <== NOT EXECUTED ffc21264: 4b ff ff 58 b ffc211bc <== NOT EXECUTED *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) ffc21268: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED ffc2126c: 4b ff fe 70 b ffc210dc <== NOT EXECUTED =============================================================================== ffc1896c : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { ffc1896c: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc18970: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc18974: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc18978: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; ffc1897c: 83 e3 00 34 lwz r31,52(r3) <== NOT EXECUTED * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { ffc18980: 93 a1 00 0c stw r29,12(r1) <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) ffc18984: 3f a0 0f ff lis r29,4095 <== NOT EXECUTED ffc18988: 63 bd ff ff ori r29,r29,65535 <== NOT EXECUTED * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { register fat_fs_info_t *fs_info = mt_entry->fs_info; ffc1898c: 80 df 00 78 lwz r6,120(r31) <== NOT EXECUTED * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { ffc18990: 93 c1 00 10 stw r30,16(r1) <== NOT EXECUTED while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) ffc18994: 3b c0 00 00 li r30,0 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) ffc18998: 2f 86 00 00 cmpwi cr7,r6,0 <== NOT EXECUTED ffc1899c: 41 9e 00 a0 beq- cr7,ffc18a3c <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) ffc189a0: 81 3f 00 74 lwz r9,116(r31) <== NOT EXECUTED ffc189a4: 81 7f 00 70 lwz r11,112(r31) <== NOT EXECUTED ffc189a8: 55 20 e8 fe rlwinm r0,r9,29,3,31 <== NOT EXECUTED ffc189ac: 7d 4b 00 ae lbzx r10,r11,r0 <== NOT EXECUTED ffc189b0: 55 28 07 7e clrlwi r8,r9,29 <== NOT EXECUTED ffc189b4: 7c 0b 02 14 add r0,r11,r0 <== NOT EXECUTED ffc189b8: 7d 47 46 30 sraw r7,r10,r8 <== NOT EXECUTED ffc189bc: 70 e5 00 01 andi. r5,r7,1 <== NOT EXECUTED ffc189c0: 41 82 00 40 beq- ffc18a00 <== NOT EXECUTED FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; ffc189c4: 7c c9 03 a6 mtctr r6 <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; ffc189c8: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) ffc189cc: 7f 89 30 40 cmplw cr7,r9,r6 <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; ffc189d0: 91 3f 00 74 stw r9,116(r31) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) ffc189d4: 41 9c 00 08 blt- cr7,ffc189dc <== NOT EXECUTED fs_info->index = 0; ffc189d8: 93 df 00 74 stw r30,116(r31) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) ffc189dc: 42 40 00 60 bdz- ffc18a3c <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) ffc189e0: 81 3f 00 74 lwz r9,116(r31) <== NOT EXECUTED ffc189e4: 55 20 e8 fe rlwinm r0,r9,29,3,31 <== NOT EXECUTED ffc189e8: 7d 4b 00 ae lbzx r10,r11,r0 <== NOT EXECUTED ffc189ec: 55 28 07 7e clrlwi r8,r9,29 <== NOT EXECUTED ffc189f0: 7c 0b 02 14 add r0,r11,r0 <== NOT EXECUTED ffc189f4: 7d 47 46 30 sraw r7,r10,r8 <== NOT EXECUTED ffc189f8: 70 e5 00 01 andi. r5,r7,1 <== NOT EXECUTED ffc189fc: 40 82 ff cc bne+ ffc189c8 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); ffc18a00: 39 20 00 01 li r9,1 <== NOT EXECUTED ffc18a04: 7d 28 40 30 slw r8,r9,r8 <== NOT EXECUTED ffc18a08: 7d 0a 53 78 or r10,r8,r10 <== NOT EXECUTED ffc18a0c: 7c 09 03 78 mr r9,r0 <== NOT EXECUTED ffc18a10: 99 49 00 00 stb r10,0(r9) <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); ffc18a14: 80 1f 00 7c lwz r0,124(r31) <== NOT EXECUTED ffc18a18: 80 7f 00 74 lwz r3,116(r31) <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } ffc18a1c: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); ffc18a20: 7c 63 02 14 add r3,r3,r0 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } ffc18a24: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc18a28: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc18a2c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18a30: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc18a34: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc18a38: 4e 80 00 20 blr <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) ffc18a3c: 80 1f 00 7c lwz r0,124(r31) <== NOT EXECUTED ffc18a40: 54 c4 08 3c rlwinm r4,r6,1,0,30 <== NOT EXECUTED ffc18a44: 7c 00 e8 50 subf r0,r0,r29 <== NOT EXECUTED ffc18a48: 7f 84 00 40 cmplw cr7,r4,r0 <== NOT EXECUTED ffc18a4c: 41 9c 00 24 blt- cr7,ffc18a70 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } ffc18a50: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; ffc18a54: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc18a58: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc18a5c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18a60: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc18a64: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc18a68: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc18a6c: 4e 80 00 20 blr <== NOT EXECUTED fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; ffc18a70: 90 9f 00 78 stw r4,120(r31) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); ffc18a74: 80 7f 00 70 lwz r3,112(r31) <== NOT EXECUTED ffc18a78: 4b ff 14 89 bl ffc09f00 <== NOT EXECUTED if (fs_info->uino != NULL) ffc18a7c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); ffc18a80: 90 7f 00 70 stw r3,112(r31) <== NOT EXECUTED if (fs_info->uino != NULL) ffc18a84: 41 9e ff cc beq+ cr7,ffc18a50 <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; ffc18a88: 80 df 00 78 lwz r6,120(r31) <== NOT EXECUTED ffc18a8c: 90 df 00 74 stw r6,116(r31) <== NOT EXECUTED ffc18a90: 4b ff ff 08 b ffc18998 <== NOT EXECUTED =============================================================================== ffc18840 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { ffc18840: 94 21 ff d8 stwu r1,-40(r1) ffc18844: 7c 08 02 a6 mflr r0 ffc18848: 90 01 00 2c stw r0,44(r1) ffc1884c: 93 c1 00 20 stw r30,32(r1) int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; ffc18850: 83 c3 00 34 lwz r30,52(r3) int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { ffc18854: 93 a1 00 1c stw r29,28(r1) ffc18858: 7c 7d 1b 78 mr r29,r3 ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); ffc1885c: a0 7e 00 06 lhz r3,6(r30) int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { ffc18860: 93 e1 00 24 stw r31,36(r1) ffc18864: 7c 9f 23 78 mr r31,r4 ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); ffc18868: 38 80 00 01 li r4,1 int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { ffc1886c: 93 81 00 18 stw r28,24(r1) int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; ffc18870: 93 e1 00 08 stw r31,8(r1) char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); ffc18874: 4b fe f5 bd bl ffc07e30 if ( buf == NULL ) ffc18878: 7c 7c 1b 79 mr. r28,r3 ffc1887c: 40 a2 00 0c bne+ ffc18888 <== ALWAYS TAKEN ffc18880: 48 00 00 d8 b ffc18958 <== NOT EXECUTED free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) ffc18884: 83 e1 00 08 lwz r31,8(r1) buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc18888: 81 3e 00 0c lwz r9,12(r30) { ret = fat_cluster_write(mt_entry, cur_cln, buf); ffc1888c: 7f e4 fb 78 mr r4,r31 buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc18890: 80 1e 00 10 lwz r0,16(r30) { ret = fat_cluster_write(mt_entry, cur_cln, buf); ffc18894: 7f 85 e3 78 mr r5,r28 buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc18898: 7f ff 48 38 and r31,r31,r9 ffc1889c: 7f 9f 00 40 cmplw cr7,r31,r0 { ret = fat_cluster_write(mt_entry, cur_cln, buf); ffc188a0: 7f a3 eb 78 mr r3,r29 buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc188a4: 40 9c 00 54 bge- cr7,ffc188f8 { ret = fat_cluster_write(mt_entry, cur_cln, buf); ffc188a8: 4b ff ff 3d bl ffc187e4 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc188ac: 38 a1 00 08 addi r5,r1,8 rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) ffc188b0: 2f 83 ff ff cmpwi cr7,r3,-1 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc188b4: 7f a3 eb 78 mr r3,r29 rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) ffc188b8: 41 9e 00 70 beq- cr7,ffc18928 <== NEVER TAKEN { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc188bc: 80 81 00 08 lwz r4,8(r1) ffc188c0: 48 00 87 4d bl ffc2100c if ( rc != RC_OK ) ffc188c4: 7c 7f 1b 79 mr. r31,r3 ffc188c8: 41 82 ff bc beq+ ffc18884 <== ALWAYS TAKEN { free(buf); ffc188cc: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc188d0: 4b fe fc 11 bl ffc084e0 <== NOT EXECUTED } } free(buf); return rc; } ffc188d4: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc188d8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc188dc: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc188e0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc188e4: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc188e8: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc188ec: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc188f0: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc188f4: 4e 80 00 20 blr <== NOT EXECUTED free(buf); return rc; } } free(buf); ffc188f8: 7f 83 e3 78 mr r3,r28 ffc188fc: 4b fe fb e5 bl ffc084e0 return rc; } ffc18900: 80 01 00 2c lwz r0,44(r1) return rc; } } free(buf); return rc; ffc18904: 3b e0 00 00 li r31,0 } ffc18908: 83 81 00 18 lwz r28,24(r1) ffc1890c: 7c 08 03 a6 mtlr r0 ffc18910: 7f e3 fb 78 mr r3,r31 ffc18914: 83 a1 00 1c lwz r29,28(r1) ffc18918: 83 c1 00 20 lwz r30,32(r1) ffc1891c: 83 e1 00 24 lwz r31,36(r1) ffc18920: 38 21 00 28 addi r1,r1,40 ffc18924: 4e 80 00 20 blr while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) { free(buf); ffc18928: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc1892c: 4b fe fb b5 bl ffc084e0 <== NOT EXECUTED } } free(buf); return rc; } ffc18930: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) { free(buf); return -1; ffc18934: 3b e0 ff ff li r31,-1 <== NOT EXECUTED } } free(buf); return rc; } ffc18938: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc1893c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18940: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc18944: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc18948: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc1894c: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc18950: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc18954: 4e 80 00 20 blr <== NOT EXECUTED uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); ffc18958: 48 00 a6 89 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc1895c: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc18960: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc18964: 3b e0 ff ff li r31,-1 <== NOT EXECUTED ffc18968: 4b ff ff 6c b ffc188d4 <== NOT EXECUTED =============================================================================== ffc18cb4 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { ffc18cb4: 94 21 ff 20 stwu r1,-224(r1) ffc18cb8: 7c 08 02 a6 mflr r0 ffc18cbc: 90 01 00 e4 stw r0,228(r1) ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); ffc18cc0: 38 81 00 18 addi r4,r1,24 char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; ffc18cc4: 38 00 00 00 li r0,0 * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { ffc18cc8: 93 c1 00 d8 stw r30,216(r1) ffc18ccc: 7c 7e 1b 78 mr r30,r3 ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); ffc18cd0: 80 63 00 70 lwz r3,112(r3) * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { ffc18cd4: 93 a1 00 d4 stw r29,212(r1) ffc18cd8: 93 e1 00 dc stw r31,220(r1) ffc18cdc: 91 c1 00 98 stw r14,152(r1) ffc18ce0: 91 e1 00 9c stw r15,156(r1) ffc18ce4: 92 01 00 a0 stw r16,160(r1) ffc18ce8: 92 21 00 a4 stw r17,164(r1) ffc18cec: 92 41 00 a8 stw r18,168(r1) ffc18cf0: 92 61 00 ac stw r19,172(r1) ffc18cf4: 92 81 00 b0 stw r20,176(r1) ffc18cf8: 92 a1 00 b4 stw r21,180(r1) ffc18cfc: 92 c1 00 b8 stw r22,184(r1) ffc18d00: 92 e1 00 bc stw r23,188(r1) ffc18d04: 93 01 00 c0 stw r24,192(r1) ffc18d08: 93 21 00 c4 stw r25,196(r1) ffc18d0c: 93 41 00 c8 stw r26,200(r1) ffc18d10: 93 61 00 cc stw r27,204(r1) ffc18d14: 93 81 00 d0 stw r28,208(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc18d18: 83 fe 00 34 lwz r31,52(r30) char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; ffc18d1c: 90 01 00 08 stw r0,8(r1) rc = stat(mt_entry->dev, &stat_buf); ffc18d20: 4b ff 15 4d bl ffc0a26c if (rc == -1) ffc18d24: 2f 83 ff ff cmpwi cr7,r3,-1 ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); ffc18d28: 7c 7d 1b 78 mr r29,r3 if (rc == -1) ffc18d2c: 41 9e 03 d8 beq- cr7,ffc19104 <== NEVER TAKEN return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) ffc18d30: 80 01 00 24 lwz r0,36(r1) ffc18d34: 54 00 04 26 rlwinm r0,r0,0,16,19 ffc18d38: 2f 80 60 00 cmpwi cr7,r0,24576 ffc18d3c: 40 9e 06 34 bne- cr7,ffc19370 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); ffc18d40: 80 61 00 30 lwz r3,48(r1) ffc18d44: 80 81 00 34 lwz r4,52(r1) ffc18d48: 4b fe e2 c9 bl ffc07010 if (vol->dd == NULL) ffc18d4c: 2f 83 00 00 cmpwi cr7,r3,0 /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); ffc18d50: 90 7f 00 60 stw r3,96(r31) if (vol->dd == NULL) ffc18d54: 41 9e 06 90 beq- cr7,ffc193e4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; ffc18d58: 80 61 00 30 lwz r3,48(r1) /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); ffc18d5c: 38 a0 00 00 li r5,0 /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); if (vol->dd == NULL) rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; ffc18d60: 80 81 00 34 lwz r4,52(r1) /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); ffc18d64: 38 c1 00 08 addi r6,r1,8 /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); if (vol->dd == NULL) rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; ffc18d68: 90 7f 00 58 stw r3,88(r31) ffc18d6c: 90 9f 00 5c stw r4,92(r31) /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); ffc18d70: 4b ff d2 15 bl ffc15f84 if (sc != RTEMS_SUCCESSFUL) ffc18d74: 2f 83 00 00 cmpwi cr7,r3,0 ffc18d78: 40 9e 06 64 bne- cr7,ffc193dc <== NEVER TAKEN { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); ffc18d7c: 80 61 00 08 lwz r3,8(r1) ffc18d80: 81 23 00 24 lwz r9,36(r3) ffc18d84: 88 09 00 20 lbz r0,32(r9) ffc18d88: 89 49 00 21 lbz r10,33(r9) ffc18d8c: 89 69 00 22 lbz r11,34(r9) ffc18d90: 90 01 00 68 stw r0,104(r1) ffc18d94: 91 41 00 6c stw r10,108(r1) ffc18d98: 88 09 00 23 lbz r0,35(r9) ffc18d9c: 89 49 00 28 lbz r10,40(r9) ffc18da0: 91 61 00 70 stw r11,112(r1) ffc18da4: 90 01 00 74 stw r0,116(r1) ffc18da8: 89 69 00 2c lbz r11,44(r9) ffc18dac: 88 09 00 2d lbz r0,45(r9) ffc18db0: 91 41 00 78 stw r10,120(r1) ffc18db4: 89 49 00 2e lbz r10,46(r9) ffc18db8: 8b 69 00 0b lbz r27,11(r9) ffc18dbc: 8b 49 00 0c lbz r26,12(r9) ffc18dc0: 8b a9 00 0d lbz r29,13(r9) ffc18dc4: 8b 29 00 0e lbz r25,14(r9) ffc18dc8: 8b 09 00 0f lbz r24,15(r9) ffc18dcc: 8b 89 00 10 lbz r28,16(r9) ffc18dd0: 8a e9 00 11 lbz r23,17(r9) ffc18dd4: 8a c9 00 12 lbz r22,18(r9) ffc18dd8: 8a a9 00 13 lbz r21,19(r9) ffc18ddc: 8a 89 00 14 lbz r20,20(r9) ffc18de0: 8a 69 00 16 lbz r19,22(r9) ffc18de4: 8a 49 00 17 lbz r18,23(r9) ffc18de8: 89 e9 00 24 lbz r15,36(r9) ffc18dec: 89 c9 00 25 lbz r14,37(r9) ffc18df0: 8a 29 00 26 lbz r17,38(r9) ffc18df4: 8a 09 00 27 lbz r16,39(r9) ffc18df8: 91 61 00 88 stw r11,136(r1) ffc18dfc: 90 01 00 8c stw r0,140(r1) ffc18e00: 91 41 00 90 stw r10,144(r1) ffc18e04: 89 69 00 2f lbz r11,47(r9) ffc18e08: 88 09 00 30 lbz r0,48(r9) ffc18e0c: 89 29 00 31 lbz r9,49(r9) ffc18e10: 91 61 00 84 stw r11,132(r1) ffc18e14: 90 01 00 7c stw r0,124(r1) ffc18e18: 91 21 00 80 stw r9,128(r1) sc = rtems_bdbuf_release( block); ffc18e1c: 4b ff d4 c5 bl ffc162e0 if (sc != RTEMS_SUCCESSFUL) ffc18e20: 2c 03 00 00 cmpwi r3,0 ffc18e24: 40 82 05 d4 bne- ffc193f8 <== NEVER TAKEN rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); ffc18e28: 57 5a 40 2e rlwinm r26,r26,8,0,23 ffc18e2c: 7f 5b db 78 or r27,r26,r27 if ( (vol->bps != 512) && ffc18e30: 2f 9b 02 00 cmpwi cr7,r27,512 rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); ffc18e34: b3 7f 00 00 sth r27,0(r31) if ( (vol->bps != 512) && ffc18e38: 41 9e 05 00 beq- cr7,ffc19338 <== ALWAYS TAKEN ffc18e3c: 2f 9b 04 00 cmpwi cr7,r27,1024 <== NOT EXECUTED ffc18e40: 41 9e 00 14 beq- cr7,ffc18e54 <== NOT EXECUTED (vol->bps != 1024) && ffc18e44: 2f 9b 08 00 cmpwi cr7,r27,2048 <== NOT EXECUTED ffc18e48: 41 9e 00 0c beq- cr7,ffc18e54 <== NOT EXECUTED (vol->bps != 2048) && ffc18e4c: 2f 9b 10 00 cmpwi cr7,r27,4096 <== NOT EXECUTED ffc18e50: 40 9e 05 3c bne- cr7,ffc1938c <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; ffc18e54: 57 60 ba 7e rlwinm r0,r27,23,9,31 <== NOT EXECUTED ffc18e58: 39 20 00 01 li r9,1 <== NOT EXECUTED ffc18e5c: 48 00 00 08 b ffc18e64 <== NOT EXECUTED ffc18e60: 7d 69 5b 78 mr r9,r11 <== NOT EXECUTED i >>= 1, vol->sec_mul++); ffc18e64: 7c 00 0e 70 srawi r0,r0,1 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; ffc18e68: 70 0a 00 01 andi. r10,r0,1 <== NOT EXECUTED i >>= 1, vol->sec_mul++); ffc18e6c: 39 69 00 01 addi r11,r9,1 <== NOT EXECUTED ffc18e70: 55 6b 06 3e clrlwi r11,r11,24 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; ffc18e74: 41 82 ff ec beq+ ffc18e60 <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; ffc18e78: 73 6b 00 01 andi. r11,r27,1 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; ffc18e7c: 99 3f 00 03 stb r9,3(r31) <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; ffc18e80: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc18e84: 98 1f 00 02 stb r0,2(r31) <== NOT EXECUTED ffc18e88: 40 82 00 2c bne- ffc18eb4 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; ffc18e8c: 7f 60 db 78 mr r0,r27 ffc18e90: 39 20 00 01 li r9,1 ffc18e94: 48 00 00 08 b ffc18e9c i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; ffc18e98: 7d 69 5b 78 mr r9,r11 i >>= 1, vol->sec_log2++); ffc18e9c: 7c 00 0e 70 srawi r0,r0,1 rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; ffc18ea0: 70 0a 00 01 andi. r10,r0,1 i >>= 1, vol->sec_log2++); ffc18ea4: 39 69 00 01 addi r11,r9,1 ffc18ea8: 55 6b 06 3e clrlwi r11,r11,24 rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; ffc18eac: 41 82 ff ec beq+ ffc18e98 ffc18eb0: 99 3f 00 02 stb r9,2(r31) vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) ffc18eb4: 2f 9d 00 00 cmpwi cr7,r29,0 for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); ffc18eb8: 9b bf 00 04 stb r29,4(r31) /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) ffc18ebc: 41 9e 04 d0 beq- cr7,ffc1938c <== NEVER TAKEN { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; ffc18ec0: 73 ab 00 01 andi. r11,r29,1 ffc18ec4: 38 00 00 00 li r0,0 ffc18ec8: 98 1f 00 05 stb r0,5(r31) ffc18ecc: 7f a9 eb 78 mr r9,r29 ffc18ed0: 39 60 00 00 li r11,0 ffc18ed4: 40 82 00 28 bne- ffc18efc <== NEVER TAKEN ffc18ed8: 39 60 00 01 li r11,1 ffc18edc: 48 00 00 08 b ffc18ee4 ffc18ee0: 7c 0b 03 78 mr r11,r0 <== NOT EXECUTED i >>= 1, vol->spc_log2++); ffc18ee4: 7d 29 0e 70 srawi r9,r9,1 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; ffc18ee8: 71 20 00 01 andi. r0,r9,1 i >>= 1, vol->spc_log2++); ffc18eec: 38 0b 00 01 addi r0,r11,1 ffc18ef0: 54 00 06 3e clrlwi r0,r0,24 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; ffc18ef4: 41 82 ff ec beq+ ffc18ee0 <== NEVER TAKEN ffc18ef8: 99 7f 00 05 stb r11,5(r31) i >>= 1, vol->spc_log2++); /* * "bytes per cluster" value greater than 32K is invalid */ if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT) ffc18efc: 7f 6b 58 30 slw r11,r27,r11 ffc18f00: 55 60 04 3e clrlwi r0,r11,16 ffc18f04: 2b 80 80 00 cmplwi cr7,r0,32768 ffc18f08: b0 1f 00 06 sth r0,6(r31) ffc18f0c: 41 9d 04 80 bgt- cr7,ffc1938c <== NEVER TAKEN { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; ffc18f10: 70 09 00 01 andi. r9,r0,1 ffc18f14: 39 20 00 00 li r9,0 ffc18f18: 99 3f 00 08 stb r9,8(r31) ffc18f1c: 40 82 00 28 bne- ffc18f44 <== NEVER TAKEN ffc18f20: 39 20 00 01 li r9,1 ffc18f24: 48 00 00 08 b ffc18f2c ffc18f28: 7d 69 5b 78 mr r9,r11 i >>= 1, vol->bpc_log2++); ffc18f2c: 7c 00 0e 70 srawi r0,r0,1 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; ffc18f30: 70 0a 00 01 andi. r10,r0,1 i >>= 1, vol->bpc_log2++); ffc18f34: 39 69 00 01 addi r11,r9,1 ffc18f38: 55 6b 06 3e clrlwi r11,r11,24 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; ffc18f3c: 41 82 ff ec beq+ ffc18f28 ffc18f40: 99 3f 00 08 stb r9,8(r31) i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); ffc18f44: 56 d6 40 2e rlwinm r22,r22,8,0,23 } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); ffc18f48: 9b 9f 00 09 stb r28,9(r31) vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); ffc18f4c: 7e d7 bb 78 or r23,r22,r23 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / ffc18f50: 38 1b ff ff addi r0,r27,-1 i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); ffc18f54: b2 ff 00 20 sth r23,32(r31) /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / ffc18f58: 56 e9 28 34 rlwinm r9,r23,5,0,26 ffc18f5c: 7c 09 02 14 add r0,r9,r0 ffc18f60: 7f 60 db d6 divw r27,r0,r27 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; ffc18f64: 88 1f 00 02 lbz r0,2(r31) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) ffc18f68: 56 52 40 2e rlwinm r18,r18,8,0,23 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / ffc18f6c: 93 7f 00 24 stw r27,36(r31) vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) ffc18f70: 7e 53 9b 78 or r19,r18,r19 ffc18f74: 7e 73 07 35 extsh. r19,r19 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); ffc18f78: 57 18 40 2e rlwinm r24,r24,8,0,23 ffc18f7c: 7f 19 cb 78 or r25,r24,r25 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; ffc18f80: 7f 60 00 30 slw r0,r27,r0 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); ffc18f84: b3 3f 00 14 sth r25,20(r31) /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; ffc18f88: 90 1f 00 28 stw r0,40(r31) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) ffc18f8c: 41 82 03 8c beq- ffc19318 <== NEVER TAKEN vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); ffc18f90: 56 73 04 3e clrlwi r19,r19,16 ffc18f94: 92 7f 00 18 stw r19,24(r31) vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) ffc18f98: 56 94 40 2e rlwinm r20,r20,8,0,23 ffc18f9c: 7e 95 ab 78 or r21,r20,r21 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + ffc18fa0: 7f 93 e1 d6 mullw r28,r19,r28 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) ffc18fa4: 7e b5 07 35 extsh. r21,r21 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + ffc18fa8: 7f 9c ca 14 add r28,r28,r25 ffc18fac: 7f 7c da 14 add r27,r28,r27 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; ffc18fb0: 93 9f 00 1c stw r28,28(r31) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + ffc18fb4: 93 7f 00 30 stw r27,48(r31) vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) ffc18fb8: 41 82 03 30 beq- ffc192e8 <== NEVER TAKEN vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); ffc18fbc: 56 b5 04 3e clrlwi r21,r21,16 ffc18fc0: 92 bf 00 2c stw r21,44(r31) else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); data_secs = vol->tot_secs - vol->data_fsec; ffc18fc4: 7f 7b a8 50 subf r27,r27,r21 vol->data_cls = data_secs / vol->spc; ffc18fc8: 7f bb eb 96 divwu r29,r27,r29 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) ffc18fcc: 2b 9d 0f f4 cmplwi cr7,r29,4084 else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; ffc18fd0: 93 bf 00 34 stw r29,52(r31) /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) ffc18fd4: 41 9d 01 8c bgt- cr7,ffc19160 <== NEVER TAKEN { vol->type = FAT_FAT12; ffc18fd8: 38 00 00 01 li r0,1 ffc18fdc: 98 1f 00 0a stb r0,10(r31) vol->mask = FAT_FAT12_MASK; ffc18fe0: 38 00 0f ff li r0,4095 ffc18fe4: 90 1f 00 0c stw r0,12(r31) vol->eoc_val = FAT_FAT12_EOC; ffc18fe8: 38 00 0f f8 li r0,4088 ffc18fec: 90 1f 00 10 stw r0,16(r31) } } } else { vol->rdir_cl = 0; ffc18ff0: 38 00 00 00 li r0,0 vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; ffc18ff4: 39 20 ff ff li r9,-1 } } } else { vol->rdir_cl = 0; ffc18ff8: 90 1f 00 38 stw r0,56(r31) vol->mirror = 0; ffc18ffc: 98 1f 00 48 stb r0,72(r31) vol->afat = 0; ffc19000: 98 1f 00 50 stb r0,80(r31) vol->free_cls = 0xFFFFFFFF; ffc19004: 91 3f 00 40 stw r9,64(r31) vol->next_cl = 0xFFFFFFFF; ffc19008: 91 3f 00 44 stw r9,68(r31) int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); ffc1900c: 80 7e 00 34 lwz r3,52(r30) ffc19010: 4b ff f3 c9 bl ffc183d8 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; ffc19014: 89 7f 00 50 lbz r11,80(r31) ffc19018: 80 1f 00 18 lwz r0,24(r31) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); ffc1901c: 38 60 00 02 li r3,2 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; ffc19020: a1 3f 00 14 lhz r9,20(r31) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); ffc19024: 38 80 00 0c li r4,12 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; ffc19028: 7c 0b 01 d6 mullw r0,r11,r0 ffc1902c: 7c 00 4a 14 add r0,r0,r9 ffc19030: 90 1f 00 4c stw r0,76(r31) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); ffc19034: 4b fe ed fd bl ffc07e30 if ( fs_info->vhash == NULL ) ffc19038: 2f 83 00 00 cmpwi cr7,r3,0 _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); ffc1903c: 90 7f 00 68 stw r3,104(r31) ffc19040: 7c 69 1b 78 mr r9,r3 if ( fs_info->vhash == NULL ) ffc19044: 41 9e 04 10 beq- cr7,ffc19454 <== 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 ); ffc19048: 39 43 00 04 addi r10,r3,4 head->next = tail; head->previous = NULL; tail->previous = head; ffc1904c: 91 29 00 08 stw r9,8(r9) 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 ); ffc19050: 38 03 00 0c addi r0,r3,12 ffc19054: 39 63 00 10 addi r11,r3,16 head->next = tail; ffc19058: 91 49 00 00 stw r10,0(r9) head->previous = NULL; ffc1905c: 3b c0 00 00 li r30,0 ffc19060: 93 c9 00 04 stw r30,4(r9) } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); ffc19064: 38 60 00 02 li r3,2 ffc19068: 38 80 00 0c li r4,12 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1906c: 91 69 00 0c stw r11,12(r9) head->previous = NULL; ffc19070: 93 c9 00 10 stw r30,16(r9) tail->previous = head; ffc19074: 90 09 00 14 stw r0,20(r9) ffc19078: 4b fe ed b9 bl ffc07e30 if ( fs_info->rhash == NULL ) ffc1907c: 2f 83 00 00 cmpwi cr7,r3,0 } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); ffc19080: 90 7f 00 6c stw r3,108(r31) ffc19084: 7c 69 1b 78 mr r9,r3 if ( fs_info->rhash == NULL ) ffc19088: 41 9e 03 bc beq- cr7,ffc19444 <== 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 ); ffc1908c: 39 43 00 04 addi r10,r3,4 head->next = tail; head->previous = NULL; ffc19090: 93 c3 00 04 stw r30,4(r3) 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 ); ffc19094: 38 03 00 0c addi r0,r3,12 ffc19098: 39 63 00 10 addi r11,r3,16 head->next = tail; ffc1909c: 91 43 00 00 stw r10,0(r3) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); ffc190a0: 38 80 00 01 li r4,1 ffc190a4: 91 69 00 0c stw r11,12(r9) rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; ffc190a8: 39 60 01 00 li r11,256 fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); ffc190ac: 38 60 01 00 li r3,256 head->previous = NULL; tail->previous = head; ffc190b0: 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; head->previous = NULL; ffc190b4: 93 c9 00 10 stw r30,16(r9) tail->previous = head; ffc190b8: 90 09 00 14 stw r0,20(r9) } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; ffc190bc: 81 3f 00 2c lwz r9,44(r31) ffc190c0: 88 1f 00 03 lbz r0,3(r31) rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; ffc190c4: 91 7f 00 78 stw r11,120(r31) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; ffc190c8: 7d 20 00 30 slw r0,r9,r0 ffc190cc: 54 00 20 36 rlwinm r0,r0,4,0,27 fs_info->index = 0; ffc190d0: 93 df 00 74 stw r30,116(r31) } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; ffc190d4: 90 1f 00 7c stw r0,124(r31) fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); ffc190d8: 4b fe ed 59 bl ffc07e30 if ( fs_info->uino == NULL ) ffc190dc: 2f 83 00 00 cmpwi cr7,r3,0 rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); ffc190e0: 90 7f 00 70 stw r3,112(r31) if ( fs_info->uino == NULL ) ffc190e4: 41 9e 03 30 beq- cr7,ffc19414 <== NEVER TAKEN rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); ffc190e8: a0 7f 00 00 lhz r3,0(r31) ffc190ec: 38 80 00 01 li r4,1 free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; ffc190f0: 3b a0 00 00 li r29,0 rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); ffc190f4: 4b fe ed 3d bl ffc07e30 if (fs_info->sec_buf == NULL) ffc190f8: 2f 83 00 00 cmpwi cr7,r3,0 rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); ffc190fc: 90 7f 00 8c stw r3,140(r31) if (fs_info->sec_buf == NULL) ffc19100: 41 9e 02 a8 beq- cr7,ffc193a8 <== NEVER TAKEN free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } ffc19104: 80 01 00 e4 lwz r0,228(r1) ffc19108: 7f a3 eb 78 mr r3,r29 ffc1910c: 81 c1 00 98 lwz r14,152(r1) ffc19110: 7c 08 03 a6 mtlr r0 ffc19114: 81 e1 00 9c lwz r15,156(r1) ffc19118: 82 01 00 a0 lwz r16,160(r1) ffc1911c: 82 21 00 a4 lwz r17,164(r1) ffc19120: 82 41 00 a8 lwz r18,168(r1) ffc19124: 82 61 00 ac lwz r19,172(r1) ffc19128: 82 81 00 b0 lwz r20,176(r1) ffc1912c: 82 a1 00 b4 lwz r21,180(r1) ffc19130: 82 c1 00 b8 lwz r22,184(r1) ffc19134: 82 e1 00 bc lwz r23,188(r1) ffc19138: 83 01 00 c0 lwz r24,192(r1) ffc1913c: 83 21 00 c4 lwz r25,196(r1) ffc19140: 83 41 00 c8 lwz r26,200(r1) ffc19144: 83 61 00 cc lwz r27,204(r1) ffc19148: 83 81 00 d0 lwz r28,208(r1) ffc1914c: 83 a1 00 d4 lwz r29,212(r1) ffc19150: 83 c1 00 d8 lwz r30,216(r1) ffc19154: 83 e1 00 dc lwz r31,220(r1) ffc19158: 38 21 00 e0 addi r1,r1,224 ffc1915c: 4e 80 00 20 blr vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) ffc19160: 2b 9d ff f4 cmplwi cr7,r29,65524 <== NOT EXECUTED ffc19164: 40 9d 01 e0 ble- cr7,ffc19344 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); ffc19168: 81 41 00 8c lwz r10,140(r1) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; ffc1916c: 81 21 00 78 lwz r9,120(r1) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); ffc19170: 55 4b 40 2e rlwinm r11,r10,8,0,23 <== NOT EXECUTED ffc19174: 81 41 00 90 lwz r10,144(r1) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; ffc19178: 55 20 00 30 rlwinm r0,r9,0,0,24 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); ffc1917c: 55 49 80 1e rlwinm r9,r10,16,0,15 <== NOT EXECUTED ffc19180: 81 41 00 84 lwz r10,132(r1) <== NOT EXECUTED ffc19184: 7d 6b 4b 78 or r11,r11,r9 <== NOT EXECUTED ffc19188: 81 21 00 88 lwz r9,136(r1) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; ffc1918c: 54 00 06 3e clrlwi r0,r0,24 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); ffc19190: 7d 6b 4b 78 or r11,r11,r9 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; ffc19194: 98 1f 00 48 stb r0,72(r31) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); ffc19198: 55 49 c0 0e rlwinm r9,r10,24,0,7 <== NOT EXECUTED ffc1919c: 7d 69 4b 78 or r9,r11,r9 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) ffc191a0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); ffc191a4: 91 3f 00 38 stw r9,56(r31) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; ffc191a8: 39 60 00 04 li r11,4 <== NOT EXECUTED ffc191ac: 99 7f 00 0a stb r11,10(r31) <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; ffc191b0: 3d 60 0f ff lis r11,4095 <== NOT EXECUTED ffc191b4: 61 6b ff ff ori r11,r11,65535 <== NOT EXECUTED ffc191b8: 91 7f 00 0c stw r11,12(r31) <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; ffc191bc: 3d 60 0f ff lis r11,4095 <== NOT EXECUTED ffc191c0: 61 6b ff f8 ori r11,r11,65528 <== NOT EXECUTED ffc191c4: 91 7f 00 10 stw r11,16(r31) <== NOT EXECUTED if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) ffc191c8: 41 9e 01 a0 beq- cr7,ffc19368 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; ffc191cc: 81 61 00 78 lwz r11,120(r1) <== NOT EXECUTED ffc191d0: 55 60 07 3e clrlwi r0,r11,28 <== NOT EXECUTED ffc191d4: 98 1f 00 50 stb r0,80(r31) <== NOT EXECUTED else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); ffc191d8: 80 01 00 80 lwz r0,128(r1) <== NOT EXECUTED ffc191dc: 81 21 00 7c lwz r9,124(r1) <== NOT EXECUTED ffc191e0: 54 04 40 2e rlwinm r4,r0,8,0,23 <== NOT EXECUTED ffc191e4: 7c 84 4b 78 or r4,r4,r9 <== NOT EXECUTED if( vol->info_sec == 0 ) ffc191e8: 2f 84 00 00 cmpwi cr7,r4,0 <== NOT EXECUTED if (vol->mirror) vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); ffc191ec: b0 9f 00 3c sth r4,60(r31) <== NOT EXECUTED if( vol->info_sec == 0 ) ffc191f0: 41 9e 01 9c beq- cr7,ffc1938c <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, ffc191f4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc191f8: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc191fc: 38 c0 00 04 li r6,4 <== NOT EXECUTED ffc19200: 38 e1 00 0c addi r7,r1,12 <== NOT EXECUTED ffc19204: 4b ff f3 79 bl ffc1857c <_fat_block_read> <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) ffc19208: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc1920c: 41 9c 02 28 blt- cr7,ffc19434 <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != ffc19210: 89 41 00 0d lbz r10,13(r1) <== NOT EXECUTED ffc19214: 89 21 00 0e lbz r9,14(r1) <== NOT EXECUTED ffc19218: 55 4a 40 2e rlwinm r10,r10,8,0,23 <== NOT EXECUTED ffc1921c: 89 61 00 0c lbz r11,12(r1) <== NOT EXECUTED ffc19220: 55 29 80 1e rlwinm r9,r9,16,0,15 <== NOT EXECUTED ffc19224: 88 01 00 0f lbz r0,15(r1) <== NOT EXECUTED ffc19228: 7d 49 4b 78 or r9,r10,r9 <== NOT EXECUTED ffc1922c: 54 00 c0 0e rlwinm r0,r0,24,0,7 <== NOT EXECUTED ffc19230: 7d 29 5b 78 or r9,r9,r11 <== NOT EXECUTED ffc19234: 7d 29 03 78 or r9,r9,r0 <== NOT EXECUTED ffc19238: 6d 20 41 61 xoris r0,r9,16737 <== NOT EXECUTED ffc1923c: 2f 80 52 52 cmpwi cr7,r0,21074 <== NOT EXECUTED ffc19240: 40 9e 01 44 bne- cr7,ffc19384 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, ffc19244: a0 9f 00 3c lhz r4,60(r31) <== NOT EXECUTED ffc19248: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc1924c: 38 a0 01 e4 li r5,484 <== NOT EXECUTED ffc19250: 38 c0 00 0c li r6,12 <== NOT EXECUTED ffc19254: 38 e1 00 0c addi r7,r1,12 <== NOT EXECUTED ffc19258: 4b ff f3 25 bl ffc1857c <_fat_block_read> <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) ffc1925c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc19260: 41 9c 01 cc blt- cr7,ffc1942c <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc19264: 88 a1 00 11 lbz r5,17(r1) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, ffc19268: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc1926c: 89 41 00 12 lbz r10,18(r1) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, ffc19270: 38 80 ff ff li r4,-1 <== NOT EXECUTED rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc19274: 88 c1 00 15 lbz r6,21(r1) <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc19278: 54 a5 40 2e rlwinm r5,r5,8,0,23 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc1927c: 89 61 00 16 lbz r11,22(r1) <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc19280: 55 4a 80 1e rlwinm r10,r10,16,0,15 <== NOT EXECUTED ffc19284: 88 e1 00 10 lbz r7,16(r1) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc19288: 54 c6 40 2e rlwinm r6,r6,8,0,23 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc1928c: 89 21 00 13 lbz r9,19(r1) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc19290: 55 6b 80 1e rlwinm r11,r11,16,0,15 <== NOT EXECUTED ffc19294: 89 01 00 14 lbz r8,20(r1) <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc19298: 7c aa 53 78 or r10,r5,r10 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc1929c: 88 01 00 17 lbz r0,23(r1) <== NOT EXECUTED ffc192a0: 7c cb 5b 78 or r11,r6,r11 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc192a4: 7d 4a 3b 78 or r10,r10,r7 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc192a8: 7d 6b 43 78 or r11,r11,r8 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc192ac: 55 29 c0 0e rlwinm r9,r9,24,0,7 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc192b0: 54 00 c0 0e rlwinm r0,r0,24,0,7 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc192b4: 7d 49 4b 78 or r9,r10,r9 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc192b8: 7d 60 03 78 or r0,r11,r0 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc192bc: 91 3f 00 40 stw r9,64(r31) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, ffc192c0: 38 a0 ff ff li r5,-1 <== NOT EXECUTED rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc192c4: 90 1f 00 44 stw r0,68(r31) <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, ffc192c8: 4b ff f8 15 bl ffc18adc <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) ffc192cc: 7c 7d 1b 79 mr. r29,r3 <== NOT EXECUTED ffc192d0: 41 82 fd 3c beq+ ffc1900c <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); ffc192d4: 80 7e 00 34 lwz r3,52(r30) <== NOT EXECUTED ffc192d8: 4b ff f1 01 bl ffc183d8 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 0xFFFFFFFF); if ( rc != RC_OK ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); ffc192dc: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc192e0: 4b fe dd e5 bl ffc070c4 <== NOT EXECUTED return rc; ffc192e4: 4b ff fe 20 b ffc19104 <== NOT EXECUTED vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); ffc192e8: 81 61 00 6c lwz r11,108(r1) <== NOT EXECUTED ffc192ec: 81 21 00 70 lwz r9,112(r1) <== NOT EXECUTED ffc192f0: 55 75 40 2e rlwinm r21,r11,8,0,23 <== NOT EXECUTED ffc192f4: 81 41 00 68 lwz r10,104(r1) <== NOT EXECUTED ffc192f8: 55 20 80 1e rlwinm r0,r9,16,0,15 <== NOT EXECUTED ffc192fc: 81 61 00 74 lwz r11,116(r1) <== NOT EXECUTED ffc19300: 7e b5 03 78 or r21,r21,r0 <== NOT EXECUTED ffc19304: 7e b5 53 78 or r21,r21,r10 <== NOT EXECUTED ffc19308: 55 60 c0 0e rlwinm r0,r11,24,0,7 <== NOT EXECUTED ffc1930c: 7e b5 03 78 or r21,r21,r0 <== NOT EXECUTED ffc19310: 92 bf 00 2c stw r21,44(r31) <== NOT EXECUTED ffc19314: 4b ff fc b0 b ffc18fc4 <== NOT EXECUTED vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); ffc19318: 55 d3 40 2e rlwinm r19,r14,8,0,23 <== NOT EXECUTED ffc1931c: 56 31 80 1e rlwinm r17,r17,16,0,15 <== NOT EXECUTED ffc19320: 7e 73 8b 78 or r19,r19,r17 <== NOT EXECUTED ffc19324: 7e 73 7b 78 or r19,r19,r15 <== NOT EXECUTED ffc19328: 56 10 c0 0e rlwinm r16,r16,24,0,7 <== NOT EXECUTED ffc1932c: 7e 73 83 78 or r19,r19,r16 <== NOT EXECUTED ffc19330: 92 7f 00 18 stw r19,24(r31) <== NOT EXECUTED ffc19334: 4b ff fc 64 b ffc18f98 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; ffc19338: 98 7f 00 03 stb r3,3(r31) i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; ffc1933c: 3b 60 02 00 li r27,512 ffc19340: 4b ff fb 4c b ffc18e8c } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; ffc19344: 38 00 00 02 li r0,2 <== NOT EXECUTED ffc19348: 98 1f 00 0a stb r0,10(r31) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; ffc1934c: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc19350: 60 00 ff ff ori r0,r0,65535 <== NOT EXECUTED ffc19354: 90 1f 00 0c stw r0,12(r31) <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; ffc19358: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc1935c: 60 00 ff f8 ori r0,r0,65528 <== NOT EXECUTED ffc19360: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED ffc19364: 4b ff fc 8c b ffc18ff0 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; else vol->afat = 0; ffc19368: 98 1f 00 50 stb r0,80(r31) <== NOT EXECUTED ffc1936c: 4b ff fe 6c b ffc191d8 <== NOT EXECUTED if (rc == -1) return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); ffc19370: 48 00 9c 71 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc19374: 38 00 00 19 li r0,25 <== NOT EXECUTED ffc19378: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1937c: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc19380: 4b ff fd 84 b ffc19104 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); ffc19384: 80 7e 00 34 lwz r3,52(r30) <== NOT EXECUTED ffc19388: 4b ff f0 51 bl ffc183d8 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); ffc1938c: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); ffc19390: 3b a0 ff ff li r29,-1 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); ffc19394: 4b fe dd 31 bl ffc070c4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); ffc19398: 48 00 9c 49 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc1939c: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc193a0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc193a4: 4b ff fd 60 b ffc19104 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); if (fs_info->sec_buf == NULL) { rtems_disk_release(vol->dd); ffc193a8: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc193ac: 4b fe dd 19 bl ffc070c4 <== NOT EXECUTED free(fs_info->vhash); ffc193b0: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc193b4: 4b fe f1 2d bl ffc084e0 <== NOT EXECUTED free(fs_info->rhash); ffc193b8: 80 7f 00 6c lwz r3,108(r31) <== NOT EXECUTED ffc193bc: 4b fe f1 25 bl ffc084e0 <== NOT EXECUTED free(fs_info->uino); ffc193c0: 80 7f 00 70 lwz r3,112(r31) <== NOT EXECUTED ffc193c4: 4b fe f1 1d bl ffc084e0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); ffc193c8: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc193cc: 48 00 9c 15 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc193d0: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc193d4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc193d8: 4b ff fd 2c b ffc19104 <== NOT EXECUTED /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); if (sc != RTEMS_SUCCESSFUL) { rtems_disk_release(vol->dd); ffc193dc: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc193e0: 4b fe dc e5 bl ffc070c4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO); ffc193e4: 48 00 9b fd bl ffc22fe0 <__errno> <== NOT EXECUTED ffc193e8: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc193ec: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc193f0: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc193f4: 4b ff fd 10 b ffc19104 <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { rtems_disk_release(vol->dd); ffc193f8: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); ffc193fc: 3b a0 ff ff li r29,-1 <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { rtems_disk_release(vol->dd); ffc19400: 4b fe dc c5 bl ffc070c4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); ffc19404: 48 00 9b dd bl ffc22fe0 <__errno> <== NOT EXECUTED ffc19408: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc1940c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc19410: 4b ff fc f4 b ffc19104 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); if ( fs_info->uino == NULL ) { rtems_disk_release(vol->dd); ffc19414: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc19418: 4b fe dc ad bl ffc070c4 <== NOT EXECUTED free(fs_info->vhash); ffc1941c: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc19420: 4b fe f0 c1 bl ffc084e0 <== NOT EXECUTED free(fs_info->rhash); ffc19424: 80 7f 00 6c lwz r3,108(r31) <== NOT EXECUTED ffc19428: 4b ff ff 9c b ffc193c4 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); ffc1942c: 80 7e 00 34 lwz r3,52(r30) <== NOT EXECUTED ffc19430: 4b ff ef a9 bl ffc183d8 <== NOT EXECUTED ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); ffc19434: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED return -1; ffc19438: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); ffc1943c: 4b fe dc 89 bl ffc070c4 <== NOT EXECUTED return -1; ffc19440: 4b ff fc c4 b ffc19104 <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { rtems_disk_release(vol->dd); ffc19444: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc19448: 4b fe dc 7d bl ffc070c4 <== NOT EXECUTED free(fs_info->vhash); ffc1944c: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc19450: 4b ff ff 74 b ffc193c4 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { rtems_disk_release(vol->dd); ffc19454: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); ffc19458: 3b a0 ff ff li r29,-1 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { rtems_disk_release(vol->dd); ffc1945c: 4b fe dc 69 bl ffc070c4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); ffc19460: 48 00 9b 81 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc19464: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc19468: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1946c: 4b ff fc 98 b ffc19104 <== NOT EXECUTED =============================================================================== ffc21720 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc21720: 94 21 ff b8 stwu r1,-72(r1) ffc21724: 7c 08 02 a6 mflr r0 ffc21728: 93 c1 00 40 stw r30,64(r1) uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; if (count == 0) ffc2172c: 7c be 2b 79 mr. r30,r5 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc21730: 90 01 00 4c stw r0,76(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; ffc21734: 38 00 00 00 li r0,0 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc21738: 93 a1 00 3c stw r29,60(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc2173c: 83 a3 00 34 lwz r29,52(r3) uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc21740: 92 a1 00 1c stw r21,28(r1) ffc21744: 7c f5 3b 78 mr r21,r7 ffc21748: 92 e1 00 24 stw r23,36(r1) uint32_t i = 2; *cls_added = 0; if (count == 0) return rc; ffc2174c: 3a e0 00 00 li r23,0 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc21750: 93 01 00 28 stw r24,40(r1) ffc21754: 93 61 00 34 stw r27,52(r1) ffc21758: 7c 9b 23 78 mr r27,r4 ffc2175c: 93 81 00 38 stw r28,56(r1) ffc21760: 7c dc 33 78 mr r28,r6 ffc21764: 93 e1 00 44 stw r31,68(r1) ffc21768: 7c 7f 1b 78 mr r31,r3 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; ffc2176c: 83 1d 00 34 lwz r24,52(r29) uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc21770: 92 81 00 18 stw r20,24(r1) ffc21774: 92 c1 00 20 stw r22,32(r1) ffc21778: 93 21 00 2c stw r25,44(r1) ffc2177c: 93 41 00 30 stw r26,48(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; ffc21780: 90 01 00 08 stw r0,8(r1) uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; ffc21784: 90 06 00 00 stw r0,0(r6) if (count == 0) ffc21788: 41 82 01 00 beq- ffc21888 <== NEVER TAKEN return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) ffc2178c: 83 5d 00 44 lwz r26,68(r29) ffc21790: 2f 9a ff ff cmpwi cr7,r26,-1 ffc21794: 41 9e 01 38 beq- cr7,ffc218cc int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; ffc21798: 3b 18 00 02 addi r24,r24,2 /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) ffc2179c: 2b 98 00 02 cmplwi cr7,r24,2 ffc217a0: 40 9d 01 34 ble- cr7,ffc218d4 <== NEVER TAKEN ffc217a4: 3b 20 00 02 li r25,2 ffc217a8: 3a c0 00 00 li r22,0 ffc217ac: 48 00 00 54 b ffc21800 * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; ffc217b0: 93 5b 00 00 stw r26,0(r27) rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); ffc217b4: 7f e3 fb 78 mr r3,r31 ffc217b8: 7f 44 d3 78 mr r4,r26 ffc217bc: 38 a0 ff ff li r5,-1 ffc217c0: 4b ff fa b1 bl ffc21270 if ( rc != RC_OK ) ffc217c4: 2c 03 00 00 cmpwi r3,0 ffc217c8: 40 82 01 88 bne- ffc21950 <== NEVER TAKEN return rc; } } save_cln = cl4find; (*cls_added)++; ffc217cc: 81 3c 00 00 lwz r9,0(r28) ffc217d0: 38 09 00 01 addi r0,r9,1 /* have we satisfied request ? */ if (*cls_added == count) ffc217d4: 7f 9e 00 00 cmpw cr7,r30,r0 return rc; } } save_cln = cl4find; (*cls_added)++; ffc217d8: 90 1c 00 00 stw r0,0(r28) /* have we satisfied request ? */ if (*cls_added == count) ffc217dc: 41 9e 01 48 beq- cr7,ffc21924 <== ALWAYS TAKEN ffc217e0: 7f 56 d3 78 mr r22,r26 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; ffc217e4: 3b 5a 00 01 addi r26,r26,1 if (cl4find >= data_cls_val) ffc217e8: 7f 98 d0 40 cmplw cr7,r24,r26 *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; ffc217ec: 3b 39 00 01 addi r25,r25,1 cl4find++; if (cl4find >= data_cls_val) ffc217f0: 41 9d 00 08 bgt- cr7,ffc217f8 <== ALWAYS TAKEN cl4find = 2; ffc217f4: 3b 40 00 02 li r26,2 <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) ffc217f8: 7f 98 c8 40 cmplw cr7,r24,r25 ffc217fc: 40 9d 00 dc ble- cr7,ffc218d8 <== NEVER TAKEN { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); ffc21800: 7f e3 fb 78 mr r3,r31 ffc21804: 7f 44 d3 78 mr r4,r26 ffc21808: 38 a1 00 08 addi r5,r1,8 ffc2180c: 4b ff f8 01 bl ffc2100c if ( rc != RC_OK ) ffc21810: 7c 77 1b 79 mr. r23,r3 ffc21814: 40 82 00 f4 bne- ffc21908 <== NEVER TAKEN if (*cls_added != 0) fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) ffc21818: 80 01 00 08 lwz r0,8(r1) ffc2181c: 2f 80 00 00 cmpwi cr7,r0,0 ffc21820: 40 be ff c4 bne- cr7,ffc217e4 /* * We are enforced to process allocation of the first free cluster * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) ffc21824: 80 1c 00 00 lwz r0,0(r28) ffc21828: 2f 80 00 00 cmpwi cr7,r0,0 ffc2182c: 41 be ff 84 beq- cr7,ffc217b0 <== ALWAYS TAKEN } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); ffc21830: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc21834: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED ffc21838: 38 a0 ff ff li r5,-1 <== NOT EXECUTED ffc2183c: 4b ff fa 35 bl ffc21270 <== NOT EXECUTED if ( rc != RC_OK ) ffc21840: 7c 74 1b 79 mr. r20,r3 <== NOT EXECUTED ffc21844: 40 82 01 14 bne- ffc21958 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); ffc21848: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED ffc2184c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc21850: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED ffc21854: 4b ff fa 1d bl ffc21270 <== NOT EXECUTED if ( rc != RC_OK ) ffc21858: 7c 76 1b 79 mr. r22,r3 <== NOT EXECUTED ffc2185c: 41 82 ff 70 beq+ ffc217cc <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc21860: 80 9b 00 00 lwz r4,0(r27) <== NOT EXECUTED ffc21864: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); ffc21868: 7e d7 b3 78 mr r23,r22 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc2186c: 4b ff fd 69 bl ffc215d4 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); ffc21870: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED ffc21874: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc21878: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc2187c: 4b ff f9 f5 bl ffc21270 <== NOT EXECUTED fat_buf_release(fs_info); ffc21880: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc21884: 4b ff 6b 55 bl ffc183d8 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } ffc21888: 80 01 00 4c lwz r0,76(r1) ffc2188c: 7e e3 bb 78 mr r3,r23 ffc21890: 82 81 00 18 lwz r20,24(r1) ffc21894: 7c 08 03 a6 mtlr r0 ffc21898: 82 a1 00 1c lwz r21,28(r1) ffc2189c: 82 c1 00 20 lwz r22,32(r1) ffc218a0: 82 e1 00 24 lwz r23,36(r1) ffc218a4: 83 01 00 28 lwz r24,40(r1) ffc218a8: 83 21 00 2c lwz r25,44(r1) ffc218ac: 83 41 00 30 lwz r26,48(r1) ffc218b0: 83 61 00 34 lwz r27,52(r1) ffc218b4: 83 81 00 38 lwz r28,56(r1) ffc218b8: 83 a1 00 3c lwz r29,60(r1) ffc218bc: 83 c1 00 40 lwz r30,64(r1) ffc218c0: 83 e1 00 44 lwz r31,68(r1) ffc218c4: 38 21 00 48 addi r1,r1,72 ffc218c8: 4e 80 00 20 blr uint32_t *last_cl ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; ffc218cc: 3b 40 00 02 li r26,2 ffc218d0: 4b ff fe c8 b ffc21798 /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) ffc218d4: 3a c0 00 00 li r22,0 <== NOT EXECUTED if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) ffc218d8: 80 1d 00 40 lwz r0,64(r29) <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; ffc218dc: 92 dd 00 44 stw r22,68(r29) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) ffc218e0: 2f 80 ff ff cmpwi cr7,r0,-1 <== NOT EXECUTED ffc218e4: 41 9e 00 10 beq- cr7,ffc218f4 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); ffc218e8: 81 3c 00 00 lwz r9,0(r28) <== NOT EXECUTED ffc218ec: 7c 09 00 50 subf r0,r9,r0 <== NOT EXECUTED ffc218f0: 90 1d 00 40 stw r0,64(r29) <== NOT EXECUTED *last_cl = save_cln; ffc218f4: 92 d5 00 00 stw r22,0(r21) <== NOT EXECUTED fat_buf_release(fs_info); ffc218f8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED return RC_OK; ffc218fc: 3a e0 00 00 li r23,0 <== NOT EXECUTED fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); ffc21900: 4b ff 6a d9 bl ffc183d8 <== NOT EXECUTED return RC_OK; ffc21904: 4b ff ff 84 b ffc21888 <== NOT EXECUTED while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); if ( rc != RC_OK ) { if (*cls_added != 0) ffc21908: 80 1c 00 00 lwz r0,0(r28) <== NOT EXECUTED ffc2190c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc21910: 41 9e ff 78 beq+ cr7,ffc21888 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc21914: 80 9b 00 00 lwz r4,0(r27) <== NOT EXECUTED ffc21918: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc2191c: 4b ff fc b9 bl ffc215d4 <== NOT EXECUTED ffc21920: 4b ff ff 68 b ffc21888 <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) ffc21924: 80 1d 00 40 lwz r0,64(r29) (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; ffc21928: 93 5d 00 44 stw r26,68(r29) if (fs_info->vol.free_cls != 0xFFFFFFFF) ffc2192c: 2f 80 ff ff cmpwi cr7,r0,-1 ffc21930: 41 9e 00 10 beq- cr7,ffc21940 <== ALWAYS TAKEN fs_info->vol.free_cls -= (*cls_added); ffc21934: 81 3c 00 00 lwz r9,0(r28) <== NOT EXECUTED ffc21938: 7c 09 00 50 subf r0,r9,r0 <== NOT EXECUTED ffc2193c: 90 1d 00 40 stw r0,64(r29) <== NOT EXECUTED *last_cl = save_cln; ffc21940: 93 55 00 00 stw r26,0(r21) fat_buf_release(fs_info); ffc21944: 7f a3 eb 78 mr r3,r29 ffc21948: 4b ff 6a 91 bl ffc183d8 return rc; ffc2194c: 4b ff ff 3c b ffc21888 * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); ffc21950: 7c 77 1b 78 mr r23,r3 <== NOT EXECUTED ffc21954: 4b ff ff 34 b ffc21888 <== NOT EXECUTED /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc21958: 80 9b 00 00 lwz r4,0(r27) <== NOT EXECUTED ffc2195c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); ffc21960: 7e 97 a3 78 mr r23,r20 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc21964: 4b ff fc 71 bl ffc215d4 <== NOT EXECUTED return rc; ffc21968: 4b ff ff 20 b ffc21888 <== NOT EXECUTED =============================================================================== ffc21270 : uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) ffc21270: 2b 84 00 01 cmplwi cr7,r4,1 fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { ffc21274: 94 21 ff c8 stwu r1,-56(r1) ffc21278: 7c 08 02 a6 mflr r0 ffc2127c: 93 21 00 1c stw r25,28(r1) ffc21280: 7c b9 2b 78 mr r25,r5 ffc21284: 90 01 00 3c stw r0,60(r1) fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; ffc21288: 38 00 00 00 li r0,0 fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { ffc2128c: 93 c1 00 30 stw r30,48(r1) ffc21290: 7c 9e 23 78 mr r30,r4 ffc21294: 93 e1 00 34 stw r31,52(r1) ffc21298: 93 41 00 20 stw r26,32(r1) ffc2129c: 93 61 00 24 stw r27,36(r1) ffc212a0: 93 81 00 28 stw r28,40(r1) ffc212a4: 93 a1 00 2c stw r29,44(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc212a8: 83 e3 00 34 lwz r31,52(r3) uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; ffc212ac: 90 01 00 08 stw r0,8(r1) /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) ffc212b0: 40 9d 00 80 ble- cr7,ffc21330 <== NEVER TAKEN ffc212b4: 81 3f 00 34 lwz r9,52(r31) ffc212b8: 38 09 00 01 addi r0,r9,1 ffc212bc: 7f 84 00 40 cmplw cr7,r4,r0 ffc212c0: 41 9d 00 70 bgt- cr7,ffc21330 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + ffc212c4: 88 1f 00 0a lbz r0,10(r31) ffc212c8: 70 09 00 01 andi. r9,r0,1 ffc212cc: 40 82 00 a0 bne- ffc2136c <== ALWAYS TAKEN ffc212d0: 70 09 00 02 andi. r9,r0,2 <== NOT EXECUTED ffc212d4: 8b 7f 00 02 lbz r27,2(r31) <== NOT EXECUTED ffc212d8: 41 82 00 b0 beq- ffc21388 <== NOT EXECUTED ffc212dc: 54 9d 08 3c rlwinm r29,r4,1,0,30 <== NOT EXECUTED ffc212e0: 80 1f 00 4c lwz r0,76(r31) <== NOT EXECUTED ffc212e4: 7f bb dc 30 srw r27,r29,r27 <== NOT EXECUTED ffc212e8: 7f 7b 02 14 add r27,r27,r0 <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); ffc212ec: 7f e3 fb 78 mr r3,r31 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); ffc212f0: a3 5f 00 00 lhz r26,0(r31) rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); ffc212f4: 7f 64 db 78 mr r4,r27 ffc212f8: 38 a0 00 01 li r5,1 ffc212fc: 38 c1 00 08 addi r6,r1,8 ffc21300: 4b ff 6e 91 bl ffc18190 if (rc != RC_OK) ffc21304: 2c 03 00 00 cmpwi r3,0 ffc21308: 40 82 00 38 bne- ffc21340 <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) ffc2130c: 8b 9f 00 0a lbz r28,10(r31) if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); ffc21310: 3b 5a ff ff addi r26,r26,-1 ffc21314: 7f bd d0 38 and r29,r29,r26 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) ffc21318: 2f 9c 00 02 cmpwi cr7,r28,2 ffc2131c: 41 9e 00 80 beq- cr7,ffc2139c <== NEVER TAKEN ffc21320: 2f 9c 00 04 cmpwi cr7,r28,4 ffc21324: 41 9e 01 64 beq- cr7,ffc21488 <== NEVER TAKEN ffc21328: 2f 9c 00 01 cmpwi cr7,r28,1 ffc2132c: 41 9e 00 c0 beq- cr7,ffc213ec <== ALWAYS TAKEN fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); ffc21330: 48 00 1c b1 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc21334: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc21338: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc2133c: 38 60 ff ff li r3,-1 <== NOT EXECUTED break; } return RC_OK; } ffc21340: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc21344: 83 21 00 1c lwz r25,28(r1) <== NOT EXECUTED ffc21348: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc2134c: 83 41 00 20 lwz r26,32(r1) <== NOT EXECUTED ffc21350: 83 61 00 24 lwz r27,36(r1) <== NOT EXECUTED ffc21354: 83 81 00 28 lwz r28,40(r1) <== NOT EXECUTED ffc21358: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED ffc2135c: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED ffc21360: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED ffc21364: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc21368: 4e 80 00 20 blr <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + ffc2136c: 54 9d f8 7e rlwinm r29,r4,31,1,31 ffc21370: 8b 7f 00 02 lbz r27,2(r31) ffc21374: 7f bd 22 14 add r29,r29,r4 ffc21378: 80 1f 00 4c lwz r0,76(r31) ffc2137c: 7f bb dc 30 srw r27,r29,r27 ffc21380: 7f 7b 02 14 add r27,r27,r0 ffc21384: 4b ff ff 68 b ffc212ec ffc21388: 54 9d 10 3a rlwinm r29,r4,2,0,29 <== NOT EXECUTED ffc2138c: 80 1f 00 4c lwz r0,76(r31) <== NOT EXECUTED ffc21390: 7f bb dc 30 srw r27,r29,r27 <== NOT EXECUTED ffc21394: 7f 7b 02 14 add r27,r27,r0 <== NOT EXECUTED ffc21398: 4b ff ff 54 b ffc212ec <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = ffc2139c: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); ffc213a0: 57 39 04 3e clrlwi r25,r25,16 <== NOT EXECUTED ffc213a4: 57 20 40 2e rlwinm r0,r25,8,0,23 <== NOT EXECUTED break; } return RC_OK; } ffc213a8: 83 41 00 20 lwz r26,32(r1) <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = ffc213ac: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); ffc213b0: 57 39 c2 3e rlwinm r25,r25,24,8,31 <== NOT EXECUTED ffc213b4: 7c 19 cb 78 or r25,r0,r25 <== NOT EXECUTED break; } return RC_OK; } ffc213b8: 83 61 00 24 lwz r27,36(r1) <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; ffc213bc: 38 00 00 01 li r0,1 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = ffc213c0: 7f 29 eb 2e sthx r25,r9,r29 <== NOT EXECUTED ffc213c4: 98 1f 00 84 stb r0,132(r31) <== NOT EXECUTED break; } return RC_OK; } ffc213c8: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc213cc: 83 21 00 1c lwz r25,28(r1) <== NOT EXECUTED ffc213d0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc213d4: 83 81 00 28 lwz r28,40(r1) <== NOT EXECUTED ffc213d8: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED ffc213dc: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED ffc213e0: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED ffc213e4: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc213e8: 4e 80 00 20 blr <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) ffc213ec: 73 c0 00 01 andi. r0,r30,1 ffc213f0: 41 82 01 0c beq- ffc214fc { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; ffc213f4: 81 21 00 08 lwz r9,8(r1) switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; ffc213f8: 57 39 24 36 rlwinm r25,r25,4,16,27 *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; ffc213fc: 81 29 00 24 lwz r9,36(r9) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = ffc21400: 7c 09 e8 ae lbzx r0,r9,r29 ffc21404: 54 00 07 3e clrlwi r0,r0,28 ffc21408: 7c 09 e9 ae stbx r0,r9,r29 (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | ffc2140c: 81 21 00 08 lwz r9,8(r1) ffc21410: 81 29 00 24 lwz r9,36(r9) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = ffc21414: 7c 09 e8 ae lbzx r0,r9,r29 ffc21418: 7c 00 cb 78 or r0,r0,r25 ffc2141c: 7c 09 e9 ae stbx r0,r9,r29 (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) ffc21420: a1 3f 00 00 lhz r9,0(r31) ffc21424: 9b 9f 00 84 stb r28,132(r31) ffc21428: 38 09 ff ff addi r0,r9,-1 ffc2142c: 7f 80 e8 00 cmpw cr7,r0,r29 ffc21430: 41 9e 01 24 beq- cr7,ffc21554 <== NEVER TAKEN fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; ffc21434: 81 21 00 08 lwz r9,8(r1) ffc21438: 3b bd 00 01 addi r29,r29,1 *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); ffc2143c: 57 39 c2 3e rlwinm r25,r25,24,8,31 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; ffc21440: 81 29 00 24 lwz r9,36(r9) ffc21444: 7c 69 e9 ae stbx r3,r9,r29 { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | ffc21448: 81 21 00 08 lwz r9,8(r1) ffc2144c: 81 29 00 24 lwz r9,36(r9) else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = ffc21450: 7c 09 e8 ae lbzx r0,r9,r29 ffc21454: 7c 19 cb 78 or r25,r0,r25 ffc21458: 7f 29 e9 ae stbx r25,r9,r29 break; } return RC_OK; } ffc2145c: 80 01 00 3c lwz r0,60(r1) ffc21460: 83 21 00 1c lwz r25,28(r1) ffc21464: 7c 08 03 a6 mtlr r0 ffc21468: 83 41 00 20 lwz r26,32(r1) ffc2146c: 83 61 00 24 lwz r27,36(r1) ffc21470: 83 81 00 28 lwz r28,40(r1) ffc21474: 83 a1 00 2c lwz r29,44(r1) ffc21478: 83 c1 00 30 lwz r30,48(r1) ffc2147c: 83 e1 00 34 lwz r31,52(r1) ffc21480: 38 21 00 38 addi r1,r1,56 ffc21484: 4e 80 00 20 blr (uint16_t )(CT_LE_W(in_val)); fat_buf_mark_modified(fs_info); break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); ffc21488: 57 39 01 3e clrlwi r25,r25,4 <== NOT EXECUTED ffc2148c: 53 2b 46 3e rlwimi r11,r25,8,24,31 <== NOT EXECUTED ffc21490: 53 2b c4 2e rlwimi r11,r25,24,16,23 <== NOT EXECUTED ffc21494: 53 2b 42 1e rlwimi r11,r25,8,8,15 <== NOT EXECUTED ffc21498: 53 2b c0 0e rlwimi r11,r25,24,0,7 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); ffc2149c: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc214a0: 3c 00 f0 00 lis r0,-4096 <== NOT EXECUTED ffc214a4: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED ffc214a8: 50 0a 46 3e rlwimi r10,r0,8,24,31 <== NOT EXECUTED ffc214ac: 50 0a c4 2e rlwimi r10,r0,24,16,23 <== NOT EXECUTED ffc214b0: 50 0a 42 1e rlwimi r10,r0,8,8,15 <== NOT EXECUTED ffc214b4: 50 0a c0 0e rlwimi r10,r0,24,0,7 <== NOT EXECUTED ffc214b8: 7c 09 e8 2e lwzx r0,r9,r29 <== NOT EXECUTED break; } return RC_OK; } ffc214bc: 83 21 00 1c lwz r25,28(r1) <== NOT EXECUTED case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); ffc214c0: 7d 40 00 38 and r0,r10,r0 <== NOT EXECUTED break; } return RC_OK; } ffc214c4: 83 41 00 20 lwz r26,32(r1) <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); ffc214c8: 7c 00 5b 78 or r0,r0,r11 <== NOT EXECUTED break; } return RC_OK; } ffc214cc: 83 61 00 24 lwz r27,36(r1) <== NOT EXECUTED fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = ffc214d0: 7c 09 e9 2e stwx r0,r9,r29 <== NOT EXECUTED ffc214d4: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc214d8: 98 1f 00 84 stb r0,132(r31) <== NOT EXECUTED break; } return RC_OK; } ffc214dc: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc214e0: 83 81 00 28 lwz r28,40(r1) <== NOT EXECUTED ffc214e4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc214e8: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED ffc214ec: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED ffc214f0: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED ffc214f4: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc214f8: 4e 80 00 20 blr <== NOT EXECUTED } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; ffc214fc: 81 21 00 08 lwz r9,8(r1) (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; ffc21500: 57 39 05 3e clrlwi r25,r25,20 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; ffc21504: 81 29 00 24 lwz r9,36(r9) ffc21508: 7c 69 e9 ae stbx r3,r9,r29 *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | ffc2150c: 81 21 00 08 lwz r9,8(r1) ffc21510: 81 29 00 24 lwz r9,36(r9) else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = ffc21514: 7c 09 e8 ae lbzx r0,r9,r29 ffc21518: 7c 00 cb 78 or r0,r0,r25 ffc2151c: 7c 09 e9 ae stbx r0,r9,r29 (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) ffc21520: a1 3f 00 00 lhz r9,0(r31) ffc21524: 9b 9f 00 84 stb r28,132(r31) ffc21528: 38 09 ff ff addi r0,r9,-1 ffc2152c: 7f 80 e8 00 cmpw cr7,r0,r29 ffc21530: 41 9e 00 6c beq- cr7,ffc2159c <== NEVER TAKEN fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; ffc21534: 81 21 00 08 lwz r9,8(r1) ffc21538: 3b bd 00 01 addi r29,r29,1 *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); ffc2153c: 57 39 c2 3e rlwinm r25,r25,24,8,31 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; ffc21540: 81 29 00 24 lwz r9,36(r9) fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = ffc21544: 7c 09 e8 ae lbzx r0,r9,r29 ffc21548: 54 00 00 36 rlwinm r0,r0,0,0,27 ffc2154c: 7c 09 e9 ae stbx r0,r9,r29 ffc21550: 4b ff fe f8 b ffc21448 fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, ffc21554: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc21558: 38 9b 00 01 addi r4,r27,1 <== NOT EXECUTED ffc2155c: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc21560: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc21564: 4b ff 6c 2d bl ffc18190 <== NOT EXECUTED &block0); if (rc != RC_OK) ffc21568: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc2156c: 40 a2 fd d4 bne- ffc21340 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; ffc21570: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); ffc21574: 57 39 c2 3e rlwinm r25,r25,24,8,31 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; ffc21578: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED ffc2157c: 98 69 00 00 stb r3,0(r9) <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | ffc21580: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc21584: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = ffc21588: 88 09 00 00 lbz r0,0(r9) <== NOT EXECUTED ffc2158c: 7f 20 03 78 or r0,r25,r0 <== NOT EXECUTED ffc21590: 98 09 00 00 stb r0,0(r9) <== NOT EXECUTED ffc21594: 9b 9f 00 84 stb r28,132(r31) <== NOT EXECUTED ffc21598: 4b ff fd a8 b ffc21340 <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, ffc2159c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc215a0: 38 9b 00 01 addi r4,r27,1 <== NOT EXECUTED ffc215a4: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc215a8: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc215ac: 4b ff 6b e5 bl ffc18190 <== NOT EXECUTED &block0); if (rc != RC_OK) ffc215b0: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc215b4: 40 a2 fd 8c bne- ffc21340 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; ffc215b8: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); ffc215bc: 57 39 c2 3e rlwinm r25,r25,24,8,31 <== NOT EXECUTED &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; ffc215c0: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = ffc215c4: 88 09 00 00 lbz r0,0(r9) <== NOT EXECUTED ffc215c8: 54 00 00 36 rlwinm r0,r0,0,0,27 <== NOT EXECUTED ffc215cc: 98 09 00 00 stb r0,0(r9) <== NOT EXECUTED ffc215d0: 4b ff ff b0 b ffc21580 <== NOT EXECUTED =============================================================================== ffc18b84 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { ffc18b84: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc18b88: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc18b8c: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc18b90: 93 c1 00 10 stw r30,16(r1) <== NOT EXECUTED int rc = RC_OK; ffc18b94: 3b c0 00 00 li r30,0 <== NOT EXECUTED * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { ffc18b98: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED ffc18b9c: 93 81 00 08 stw r28,8(r1) <== NOT EXECUTED ffc18ba0: 93 a1 00 0c stw r29,12(r1) <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc18ba4: 83 e3 00 34 lwz r31,52(r3) <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) ffc18ba8: 88 1f 00 0a lbz r0,10(r31) <== NOT EXECUTED ffc18bac: 70 09 00 04 andi. r9,r0,4 <== NOT EXECUTED ffc18bb0: 40 82 00 e0 bne- ffc18c90 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; } fat_buf_release(fs_info); ffc18bb4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc18bb8: 4b ff f8 21 bl ffc183d8 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) ffc18bbc: 80 7f 00 58 lwz r3,88(r31) <== NOT EXECUTED ffc18bc0: 80 9f 00 5c lwz r4,92(r31) <== NOT EXECUTED ffc18bc4: 4b ff da 51 bl ffc16614 <== NOT EXECUTED ffc18bc8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc18bcc: 40 9e 00 e0 bne- cr7,ffc18cac <== NOT EXECUTED rc = -1; ffc18bd0: 3b 80 00 00 li r28,0 <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; ffc18bd4: 83 bf 00 68 lwz r29,104(r31) <== NOT EXECUTED ffc18bd8: 7f bd e2 14 add r29,r29,r28 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) ffc18bdc: 48 00 00 08 b ffc18be4 <== NOT EXECUTED free(node); ffc18be0: 4b fe f9 01 bl ffc084e0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); ffc18be4: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc18be8: 4b ff 5b bd bl ffc0e7a4 <_Chain_Get> <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) ffc18bec: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc18bf0: 40 9e ff f0 bne+ cr7,ffc18be0 <== NOT EXECUTED fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) ffc18bf4: 2f 9c 00 0c cmpwi cr7,r28,12 <== NOT EXECUTED ffc18bf8: 3b 9c 00 0c addi r28,r28,12 <== NOT EXECUTED ffc18bfc: 40 be ff d8 bne- cr7,ffc18bd4 <== NOT EXECUTED ffc18c00: 3b 80 00 00 li r28,0 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; ffc18c04: 83 bf 00 6c lwz r29,108(r31) <== NOT EXECUTED ffc18c08: 7f bd e2 14 add r29,r29,r28 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) ffc18c0c: 48 00 00 08 b ffc18c14 <== NOT EXECUTED free(node); ffc18c10: 4b fe f8 d1 bl ffc084e0 <== NOT EXECUTED ffc18c14: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc18c18: 4b ff 5b 8d bl ffc0e7a4 <_Chain_Get> <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) ffc18c1c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc18c20: 40 9e ff f0 bne+ cr7,ffc18c10 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) ffc18c24: 2f 9c 00 0c cmpwi cr7,r28,12 <== NOT EXECUTED ffc18c28: 3b 9c 00 0c addi r28,r28,12 <== NOT EXECUTED ffc18c2c: 40 be ff d8 bne- cr7,ffc18c04 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); ffc18c30: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc18c34: 4b fe f8 ad bl ffc084e0 <== NOT EXECUTED free(fs_info->rhash); ffc18c38: 80 7f 00 6c lwz r3,108(r31) <== NOT EXECUTED ffc18c3c: 4b fe f8 a5 bl ffc084e0 <== NOT EXECUTED free(fs_info->uino); ffc18c40: 80 7f 00 70 lwz r3,112(r31) <== NOT EXECUTED ffc18c44: 4b fe f8 9d bl ffc084e0 <== NOT EXECUTED free(fs_info->sec_buf); ffc18c48: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc18c4c: 4b fe f8 95 bl ffc084e0 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); ffc18c50: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc18c54: 4b fe e4 71 bl ffc070c4 <== NOT EXECUTED if (rc) ffc18c58: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED ffc18c5c: 41 be 00 10 beq+ cr7,ffc18c6c <== NOT EXECUTED errno = EIO; ffc18c60: 48 00 a3 81 bl ffc22fe0 <__errno> <== NOT EXECUTED ffc18c64: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc18c68: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED return rc; } ffc18c6c: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc18c70: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc18c74: 83 81 00 08 lwz r28,8(r1) <== NOT EXECUTED ffc18c78: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18c7c: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc18c80: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc18c84: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc18c88: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc18c8c: 4e 80 00 20 blr <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, ffc18c90: 80 9f 00 40 lwz r4,64(r31) <== NOT EXECUTED ffc18c94: 80 bf 00 44 lwz r5,68(r31) <== NOT EXECUTED ffc18c98: 4b ff fe 45 bl ffc18adc <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) ffc18c9c: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED ffc18ca0: 41 a2 ff 14 beq- ffc18bb4 <== NOT EXECUTED rc = -1; ffc18ca4: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc18ca8: 4b ff ff 0c b ffc18bb4 <== NOT EXECUTED } fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) rc = -1; ffc18cac: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc18cb0: 4b ff ff 20 b ffc18bd0 <== NOT EXECUTED =============================================================================== ffc1eabc : int fcntl( int fd, int cmd, ... ) { ffc1eabc: 94 21 ff c8 stwu r1,-56(r1) ffc1eac0: 7c 08 02 a6 mflr r0 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc1eac4: 3d 20 00 00 lis r9,0 int fcntl( int fd, int cmd, ... ) { ffc1eac8: 90 01 00 3c stw r0,60(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc1eacc: 80 09 26 dc lwz r0,9948(r9) ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc1ead0: 39 20 00 02 li r9,2 ffc1ead4: 99 21 00 08 stb r9,8(r1) ffc1ead8: 39 21 00 40 addi r9,r1,64 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc1eadc: 7f 83 00 40 cmplw cr7,r3,r0 ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc1eae0: 91 21 00 0c stw r9,12(r1) ffc1eae4: 39 21 00 10 addi r9,r1,16 int fcntl( int fd, int cmd, ... ) { ffc1eae8: 93 c1 00 30 stw r30,48(r1) ffc1eaec: 93 e1 00 34 stw r31,52(r1) ffc1eaf0: 90 a1 00 18 stw r5,24(r1) ffc1eaf4: 90 c1 00 1c stw r6,28(r1) ffc1eaf8: 90 e1 00 20 stw r7,32(r1) int ret; va_list ap; va_start( ap, cmd ); ffc1eafc: 91 21 00 10 stw r9,16(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc1eb00: 40 9c 02 08 bge- cr7,ffc1ed08 iop = rtems_libio_iop( fd ); ffc1eb04: 3f e0 00 00 lis r31,0 ffc1eb08: 81 7f 27 88 lwz r11,10120(r31) ffc1eb0c: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc1eb10: 7f cb 1a 14 add r30,r11,r3 rtems_libio_check_is_open(iop); ffc1eb14: 80 7e 00 18 lwz r3,24(r30) ffc1eb18: 70 69 01 00 andi. r9,r3,256 ffc1eb1c: 41 82 01 ec beq- ffc1ed08 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc1eb20: 2b 84 00 09 cmplwi cr7,r4,9 ffc1eb24: 40 9d 00 30 ble- cr7,ffc1eb54 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; ffc1eb28: 4b ff 4d 89 bl ffc138b0 <__errno> ffc1eb2c: 38 00 00 16 li r0,22 ffc1eb30: 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; ffc1eb34: 3b e0 ff ff li r31,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc1eb38: 80 01 00 3c lwz r0,60(r1) ffc1eb3c: 7f e3 fb 78 mr r3,r31 ffc1eb40: 83 c1 00 30 lwz r30,48(r1) ffc1eb44: 7c 08 03 a6 mtlr r0 ffc1eb48: 83 e1 00 34 lwz r31,52(r1) ffc1eb4c: 38 21 00 38 addi r1,r1,56 ffc1eb50: 4e 80 00 20 blr /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc1eb54: 3d 20 ff c2 lis r9,-62 ffc1eb58: 39 29 1f 84 addi r9,r9,8068 ffc1eb5c: 54 8a 10 3a rlwinm r10,r4,2,0,29 ffc1eb60: 7d 49 50 2e lwzx r10,r9,r10 ffc1eb64: 7d 2a 4a 14 add r9,r10,r9 ffc1eb68: 7d 29 03 a6 mtctr r9 ffc1eb6c: 4e 80 04 20 bctr errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; ffc1eb70: 4b ff 4d 41 bl ffc138b0 <__errno> ffc1eb74: 38 00 00 86 li r0,134 ffc1eb78: 90 03 00 00 stw r0,0(r3) ffc1eb7c: 4b ff ff b8 b ffc1eb34 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 ) ); ffc1eb80: 89 21 00 08 lbz r9,8(r1) ffc1eb84: 2b 89 00 07 cmplwi cr7,r9,7 ffc1eb88: 40 9d 01 68 ble- cr7,ffc1ecf0 <== ALWAYS TAKEN ffc1eb8c: 81 61 00 0c lwz r11,12(r1) <== NOT EXECUTED ffc1eb90: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED ffc1eb94: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc1eb98: 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; ffc1eb9c: 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 ) ); ffc1eba0: 90 81 00 28 stw r4,40(r1) ffc1eba4: 4b fe 6f e5 bl ffc05b88 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); ffc1eba8: 39 20 fd fe li r9,-514 ffc1ebac: 80 1e 00 18 lwz r0,24(r30) ffc1ebb0: 70 63 02 01 andi. r3,r3,513 ffc1ebb4: 80 81 00 28 lwz r4,40(r1) ffc1ebb8: 7d 20 00 38 and r0,r9,r0 ffc1ebbc: 7c 60 03 78 or r0,r3,r0 ffc1ebc0: 90 1e 00 18 stw r0,24(r30) ffc1ebc4: 48 00 00 1c b ffc1ebe0 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); ffc1ebc8: 90 81 00 28 stw r4,40(r1) ffc1ebcc: 4b fe 70 1d bl ffc05be8 ffc1ebd0: 7c 7f 1b 78 mr r31,r3 ffc1ebd4: 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) { ffc1ebd8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc1ebdc: 41 bc ff 5c blt- cr7,ffc1eb38 <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); ffc1ebe0: 81 3e 00 24 lwz r9,36(r30) ffc1ebe4: 7c 83 23 78 mr r3,r4 ffc1ebe8: 7f c4 f3 78 mr r4,r30 ffc1ebec: 80 09 00 30 lwz r0,48(r9) ffc1ebf0: 7c 09 03 a6 mtctr r0 ffc1ebf4: 4e 80 04 21 bctrl if (err) { ffc1ebf8: 7c 7e 1b 79 mr. r30,r3 ffc1ebfc: 41 82 ff 3c beq+ ffc1eb38 <== ALWAYS TAKEN errno = err; ffc1ec00: 4b ff 4c b1 bl ffc138b0 <__errno> <== NOT EXECUTED ffc1ec04: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED ffc1ec08: 4b ff ff 2c b ffc1eb34 <== 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 ) ) ffc1ec0c: 89 21 00 08 lbz r9,8(r1) ffc1ec10: 2b 89 00 07 cmplwi cr7,r9,7 ffc1ec14: 41 9d 00 cc bgt- cr7,ffc1ece0 <== NEVER TAKEN ffc1ec18: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc1ec1c: 81 61 00 10 lwz r11,16(r1) ffc1ec20: 39 29 00 01 addi r9,r9,1 ffc1ec24: 99 21 00 08 stb r9,8(r1) ffc1ec28: 7d 6b 02 14 add r11,r11,r0 ffc1ec2c: 80 0b 00 00 lwz r0,0(r11) ffc1ec30: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ec34: 41 9e 00 e8 beq- cr7,ffc1ed1c iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; ffc1ec38: 60 63 08 00 ori r3,r3,2048 ffc1ec3c: 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; ffc1ec40: 3b e0 00 00 li r31,0 ffc1ec44: 4b ff ff 9c b ffc1ebe0 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); ffc1ec48: 54 7f af fe rlwinm r31,r3,21,31,31 ffc1ec4c: 4b ff ff 94 b ffc1ebe0 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc1ec50: 89 21 00 08 lbz r9,8(r1) ffc1ec54: 2b 89 00 07 cmplwi cr7,r9,7 ffc1ec58: 41 9d 00 78 bgt- cr7,ffc1ecd0 <== NEVER TAKEN ffc1ec5c: 55 2a 10 3a rlwinm r10,r9,2,0,29 ffc1ec60: 81 01 00 10 lwz r8,16(r1) ffc1ec64: 39 29 00 01 addi r9,r9,1 ffc1ec68: 99 21 00 08 stb r9,8(r1) ffc1ec6c: 7d 48 52 14 add r10,r8,r10 ffc1ec70: 81 4a 00 00 lwz r10,0(r10) if ( fd2 ) ffc1ec74: 2f 8a 00 00 cmpwi cr7,r10,0 ffc1ec78: 41 9e 00 b4 beq- cr7,ffc1ed2c diop = rtems_libio_iop( fd2 ); ffc1ec7c: 7f 80 50 40 cmplw cr7,r0,r10 ffc1ec80: 3b e0 00 00 li r31,0 ffc1ec84: 39 20 00 00 li r9,0 ffc1ec88: 40 9d 00 10 ble- cr7,ffc1ec98 <== NEVER TAKEN ffc1ec8c: 55 49 30 32 rlwinm r9,r10,6,0,25 ffc1ec90: 7d 2b 4a 14 add r9,r11,r9 ffc1ec94: 7d 3f 4b 78 mr r31,r9 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc1ec98: 80 1e 00 28 lwz r0,40(r30) ret = (int) (diop - rtems_libio_iops); ffc1ec9c: 7f eb f8 50 subf r31,r11,r31 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc1eca0: 80 fe 00 1c lwz r7,28(r30) ret = (int) (diop - rtems_libio_iops); ffc1eca4: 7f ff 36 70 srawi r31,r31,6 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc1eca8: 81 1e 00 20 lwz r8,32(r30) ffc1ecac: 81 5e 00 24 lwz r10,36(r30) ffc1ecb0: 90 e9 00 1c stw r7,28(r9) ffc1ecb4: 91 09 00 20 stw r8,32(r9) ffc1ecb8: 91 49 00 24 stw r10,36(r9) ffc1ecbc: 90 09 00 28 stw r0,40(r9) ffc1ecc0: 80 1e 00 2c lwz r0,44(r30) ret = -1; break; } } diop->flags = iop->flags; ffc1ecc4: 90 69 00 18 stw r3,24(r9) diop->pathinfo = iop->pathinfo; ffc1ecc8: 90 09 00 2c stw r0,44(r9) ffc1eccc: 4b ff ff 0c b ffc1ebd8 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc1ecd0: 81 41 00 0c lwz r10,12(r1) <== NOT EXECUTED ffc1ecd4: 39 2a 00 04 addi r9,r10,4 <== NOT EXECUTED ffc1ecd8: 91 21 00 0c stw r9,12(r1) <== NOT EXECUTED ffc1ecdc: 4b ff ff 94 b ffc1ec70 <== 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 ) ) ffc1ece0: 81 61 00 0c lwz r11,12(r1) <== NOT EXECUTED ffc1ece4: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED ffc1ece8: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc1ecec: 4b ff ff 40 b ffc1ec2c <== 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 ) ); ffc1ecf0: 81 61 00 10 lwz r11,16(r1) ffc1ecf4: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc1ecf8: 39 29 00 01 addi r9,r9,1 ffc1ecfc: 7d 6b 02 14 add r11,r11,r0 ffc1ed00: 99 21 00 08 stb r9,8(r1) ffc1ed04: 4b ff fe 94 b ffc1eb98 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); ffc1ed08: 4b ff 4b a9 bl ffc138b0 <__errno> ffc1ed0c: 38 00 00 09 li r0,9 ffc1ed10: 90 03 00 00 stw r0,0(r3) ffc1ed14: 3b e0 ff ff li r31,-1 ffc1ed18: 4b ff fe 20 b ffc1eb38 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; ffc1ed1c: 54 63 05 66 rlwinm r3,r3,0,21,19 ffc1ed20: 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; ffc1ed24: 3b e0 00 00 li r31,0 ffc1ed28: 4b ff fe b8 b ffc1ebe0 fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); ffc1ed2c: 90 81 00 28 stw r4,40(r1) ffc1ed30: 4b fe 6f 09 bl ffc05c38 if ( diop == 0 ) { ffc1ed34: 7c 69 1b 79 mr. r9,r3 ffc1ed38: 80 81 00 28 lwz r4,40(r1) ffc1ed3c: 41 a2 fd f8 beq- ffc1eb34 <== NEVER TAKEN ffc1ed40: 81 7f 27 88 lwz r11,10120(r31) ffc1ed44: 7d 3f 4b 78 mr r31,r9 ffc1ed48: 80 7e 00 18 lwz r3,24(r30) ffc1ed4c: 4b ff ff 4c b ffc1ec98 =============================================================================== ffc1154c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc1154c: 94 21 ff d0 stwu r1,-48(r1) ffc11550: 7c 08 02 a6 mflr r0 ffc11554: 93 e1 00 2c stw r31,44(r1) static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc11558: 3f e0 00 00 lis r31,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc1155c: 90 01 00 34 stw r0,52(r1) static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc11560: 80 1f 29 60 lwz r0,10592(r31) */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11564: 93 61 00 1c stw r27,28(r1) static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc11568: 3b 7f 29 60 addi r27,r31,10592 ffc1156c: 2f 80 00 00 cmpwi cr7,r0,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11570: 93 81 00 20 stw r28,32(r1) ffc11574: 7c 9c 23 78 mr r28,r4 ffc11578: 93 c1 00 28 stw r30,40(r1) ffc1157c: 7c 7e 1b 78 mr r30,r3 ffc11580: 93 a1 00 24 stw r29,36(r1) static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc11584: 41 9e 00 c0 beq- cr7,ffc11644 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc11588: 7c 03 03 78 mr r3,r0 ffc1158c: 38 80 00 00 li r4,0 ffc11590: 38 a0 00 00 li r5,0 ffc11594: 4b ff a2 1d bl ffc0b7b0 } if (sc == RTEMS_SUCCESSFUL) { ffc11598: 3b 60 ff f4 li r27,-12 ffc1159c: 2f 83 00 00 cmpwi cr7,r3,0 ffc115a0: 40 9e 00 7c bne- cr7,ffc1161c <== NEVER TAKEN err = pipe_lock(); if (err) return err; pipe = *pipep; ffc115a4: 83 be 00 00 lwz r29,0(r30) if (pipe == NULL) { ffc115a8: 2f 9d 00 00 cmpwi cr7,r29,0 ffc115ac: 41 9e 02 30 beq- cr7,ffc117dc err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc115b0: 80 7d 00 28 lwz r3,40(r29) ffc115b4: 38 80 00 00 li r4,0 ffc115b8: 38 a0 00 00 li r5,0 ffc115bc: 4b ff a1 f5 bl ffc0b7b0 err = -EINTR; ffc115c0: 3b 60 ff fc li r27,-4 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc115c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc115c8: 40 9e 00 08 bne- cr7,ffc115d0 <== NEVER TAKEN ffc115cc: 3b 60 00 00 li r27,0 err = -EINTR; if (*pipep == NULL) { ffc115d0: 80 1e 00 00 lwz r0,0(r30) ffc115d4: 2f 80 00 00 cmpwi cr7,r0,0 ffc115d8: 41 9e 02 d0 beq- cr7,ffc118a8 static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); ffc115dc: 80 7f 29 60 lwz r3,10592(r31) ffc115e0: 4b ff a3 5d bl ffc0b93c pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) ffc115e4: 2f 9b 00 00 cmpwi cr7,r27,0 ffc115e8: 40 9e 00 34 bne- cr7,ffc1161c <== NEVER TAKEN return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { ffc115ec: 80 1c 00 18 lwz r0,24(r28) int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; ffc115f0: 83 fe 00 00 lwz r31,0(r30) switch (LIBIO_ACCMODE(iop)) { ffc115f4: 54 00 07 7c rlwinm r0,r0,0,29,30 ffc115f8: 2f 80 00 04 cmpwi cr7,r0,4 ffc115fc: 41 9e 00 78 beq- cr7,ffc11674 ffc11600: 2f 80 00 06 cmpwi cr7,r0,6 ffc11604: 41 9e 01 88 beq- cr7,ffc1178c ffc11608: 2f 80 00 02 cmpwi cr7,r0,2 ffc1160c: 41 9e 00 fc beq- cr7,ffc11708 <== ALWAYS TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); ffc11610: 80 7f 00 28 lwz r3,40(r31) return 0; ffc11614: 3b 60 00 00 li r27,0 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); ffc11618: 4b ff a3 25 bl ffc0b93c return 0; out_error: pipe_release(pipep, iop); return err; } ffc1161c: 80 01 00 34 lwz r0,52(r1) ffc11620: 7f 63 db 78 mr r3,r27 ffc11624: 83 81 00 20 lwz r28,32(r1) ffc11628: 7c 08 03 a6 mtlr r0 ffc1162c: 83 61 00 1c lwz r27,28(r1) ffc11630: 83 a1 00 24 lwz r29,36(r1) ffc11634: 83 c1 00 28 lwz r30,40(r1) ffc11638: 83 e1 00 2c lwz r31,44(r1) ffc1163c: 38 21 00 30 addi r1,r1,48 ffc11640: 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 ); ffc11644: 3f a0 00 00 lis r29,0 ffc11648: 80 7d 27 90 lwz r3,10128(r29) ffc1164c: 38 80 00 00 li r4,0 ffc11650: 38 a0 00 00 li r5,0 ffc11654: 4b ff a1 5d bl ffc0b7b0 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { ffc11658: 80 1f 29 60 lwz r0,10592(r31) ffc1165c: 2f 80 00 00 cmpwi cr7,r0,0 ffc11660: 41 9e 02 60 beq- cr7,ffc118c0 <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc11664: 80 7d 27 90 lwz r3,10128(r29) <== NOT EXECUTED ffc11668: 4b ff a2 d5 bl ffc0b93c <== NOT EXECUTED ffc1166c: 80 1f 29 60 lwz r0,10592(r31) <== NOT EXECUTED ffc11670: 4b ff ff 18 b ffc11588 <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc11674: 81 3f 00 14 lwz r9,20(r31) } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc11678: 81 7f 00 24 lwz r11,36(r31) if (pipe->Writers ++ == 0) ffc1167c: 2f 89 00 00 cmpwi cr7,r9,0 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc11680: 38 0b 00 01 addi r0,r11,1 if (pipe->Writers ++ == 0) ffc11684: 39 29 00 01 addi r9,r9,1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc11688: 90 1f 00 24 stw r0,36(r31) if (pipe->Writers ++ == 0) ffc1168c: 91 3f 00 14 stw r9,20(r31) ffc11690: 41 9e 02 8c beq- cr7,ffc1191c <== ALWAYS TAKEN PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { ffc11694: 80 1f 00 10 lwz r0,16(r31) ffc11698: 2f 80 00 00 cmpwi cr7,r0,0 ffc1169c: 40 be ff 74 bne- cr7,ffc11610 ffc116a0: 80 1c 00 18 lwz r0,24(r28) ffc116a4: 70 09 00 01 andi. r9,r0,1 ffc116a8: 40 82 02 b8 bne- ffc11960 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; ffc116ac: 83 bf 00 20 lwz r29,32(r31) ffc116b0: 48 00 00 20 b ffc116d0 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) ffc116b4: 80 7f 00 28 lwz r3,40(r31) ffc116b8: 4b ff a0 f9 bl ffc0b7b0 ffc116bc: 2f 83 00 00 cmpwi cr7,r3,0 ffc116c0: 40 9e 00 34 bne- cr7,ffc116f4 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); ffc116c4: 80 1f 00 20 lwz r0,32(r31) ffc116c8: 7f 80 e8 00 cmpw cr7,r0,r29 ffc116cc: 40 be ff 44 bne- cr7,ffc11610 <== ALWAYS TAKEN if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); ffc116d0: 80 7f 00 28 lwz r3,40(r31) ffc116d4: 4b ff a2 69 bl ffc0b93c if (! PIPE_WRITEWAIT(pipe)) ffc116d8: 80 7f 00 30 lwz r3,48(r31) ffc116dc: 38 80 00 00 li r4,0 ffc116e0: 48 00 17 ad bl ffc12e8c goto out_error; if (! PIPE_LOCK(pipe)) ffc116e4: 38 80 00 00 li r4,0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc116e8: 2f 83 00 00 cmpwi cr7,r3,0 goto out_error; if (! PIPE_LOCK(pipe)) ffc116ec: 38 a0 00 00 li r5,0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc116f0: 41 9e ff c4 beq+ cr7,ffc116b4 <== ALWAYS TAKEN goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; ffc116f4: 3b 60 ff fc li r27,-4 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); ffc116f8: 7f c3 f3 78 mr r3,r30 ffc116fc: 7f 84 e3 78 mr r4,r28 ffc11700: 4b ff fc f5 bl ffc113f4 return err; ffc11704: 4b ff ff 18 b ffc1161c pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc11708: 81 3f 00 10 lwz r9,16(r31) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc1170c: 81 7f 00 20 lwz r11,32(r31) if (pipe->Readers ++ == 0) ffc11710: 2f 89 00 00 cmpwi cr7,r9,0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc11714: 38 0b 00 01 addi r0,r11,1 if (pipe->Readers ++ == 0) ffc11718: 39 29 00 01 addi r9,r9,1 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc1171c: 90 1f 00 20 stw r0,32(r31) if (pipe->Readers ++ == 0) ffc11720: 91 3f 00 10 stw r9,16(r31) ffc11724: 41 9e 01 d8 beq- cr7,ffc118fc <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { ffc11728: 80 1f 00 14 lwz r0,20(r31) ffc1172c: 2f 80 00 00 cmpwi cr7,r0,0 ffc11730: 40 be fe e0 bne- cr7,ffc11610 /* Not an error */ if (LIBIO_NODELAY(iop)) ffc11734: 80 1c 00 18 lwz r0,24(r28) ffc11738: 70 09 00 01 andi. r9,r0,1 ffc1173c: 40 a2 fe d4 bne- ffc11610 break; prevCounter = pipe->writerCounter; ffc11740: 83 bf 00 24 lwz r29,36(r31) ffc11744: 48 00 00 20 b ffc11764 /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) ffc11748: 80 7f 00 28 lwz r3,40(r31) ffc1174c: 4b ff a0 65 bl ffc0b7b0 ffc11750: 2f 83 00 00 cmpwi cr7,r3,0 ffc11754: 40 be ff a0 bne- cr7,ffc116f4 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); ffc11758: 80 1f 00 24 lwz r0,36(r31) ffc1175c: 7f 80 e8 00 cmpw cr7,r0,r29 ffc11760: 40 be fe b0 bne- cr7,ffc11610 <== ALWAYS TAKEN prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); ffc11764: 80 7f 00 28 lwz r3,40(r31) ffc11768: 4b ff a1 d5 bl ffc0b93c if (! PIPE_READWAIT(pipe)) ffc1176c: 80 7f 00 2c lwz r3,44(r31) ffc11770: 38 80 00 00 li r4,0 ffc11774: 48 00 17 19 bl ffc12e8c goto out_error; if (! PIPE_LOCK(pipe)) ffc11778: 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)) ffc1177c: 2f 83 00 00 cmpwi cr7,r3,0 goto out_error; if (! PIPE_LOCK(pipe)) ffc11780: 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)) ffc11784: 41 9e ff c4 beq+ cr7,ffc11748 <== ALWAYS TAKEN ffc11788: 4b ff ff 6c b ffc116f4 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc1178c: 81 3f 00 10 lwz r9,16(r31) } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc11790: 81 7f 00 20 lwz r11,32(r31) if (pipe->Readers ++ == 0) ffc11794: 2f 89 00 00 cmpwi cr7,r9,0 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc11798: 38 0b 00 01 addi r0,r11,1 if (pipe->Readers ++ == 0) ffc1179c: 39 29 00 01 addi r9,r9,1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc117a0: 90 1f 00 20 stw r0,32(r31) if (pipe->Readers ++ == 0) ffc117a4: 91 3f 00 10 stw r9,16(r31) ffc117a8: 41 9e 01 64 beq- cr7,ffc1190c <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc117ac: 81 3f 00 14 lwz r9,20(r31) case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc117b0: 81 7f 00 24 lwz r11,36(r31) if (pipe->Writers ++ == 0) ffc117b4: 2f 89 00 00 cmpwi cr7,r9,0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc117b8: 38 0b 00 01 addi r0,r11,1 if (pipe->Writers ++ == 0) ffc117bc: 39 29 00 01 addi r9,r9,1 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 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: 40 9e fe 48 bne+ cr7,ffc11610 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); ffc117cc: 80 7f 00 2c lwz r3,44(r31) ffc117d0: 38 81 00 08 addi r4,r1,8 ffc117d4: 48 00 16 25 bl ffc12df8 ffc117d8: 4b ff fe 38 b ffc11610 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ffc117dc: 38 60 00 34 li r3,52 ffc117e0: 4b ff 60 f5 bl ffc078d4 if (pipe == NULL) ffc117e4: 7c 7d 1b 79 mr. r29,r3 ffc117e8: 41 82 01 a8 beq- ffc11990 return err; memset(pipe, 0, sizeof(pipe_control_t)); ffc117ec: 38 80 00 00 li r4,0 ffc117f0: 38 a0 00 34 li r5,52 ffc117f4: 48 00 47 b1 bl ffc15fa4 pipe->Size = PIPE_BUF; ffc117f8: 38 00 02 00 li r0,512 ffc117fc: 90 1d 00 04 stw r0,4(r29) pipe->Buffer = malloc(pipe->Size); ffc11800: 38 60 02 00 li r3,512 ffc11804: 4b ff 60 d1 bl ffc078d4 if (! pipe->Buffer) ffc11808: 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); ffc1180c: 90 7d 00 00 stw r3,0(r29) if (! pipe->Buffer) ffc11810: 41 9e 01 78 beq- cr7,ffc11988 <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), ffc11814: 3f 60 00 00 lis r27,0 ffc11818: 88 7b 21 bd lbz r3,8637(r27) if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( ffc1181c: 38 80 00 00 li r4,0 ffc11820: 38 a0 00 00 li r5,0 ffc11824: 64 63 50 49 oris r3,r3,20553 ffc11828: 60 63 72 00 ori r3,r3,29184 ffc1182c: 38 dd 00 2c addi r6,r29,44 ffc11830: 48 00 13 e9 bl ffc12c18 ffc11834: 2f 83 00 00 cmpwi cr7,r3,0 ffc11838: 40 9e 01 48 bne- cr7,ffc11980 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), ffc1183c: 88 7b 21 bd lbz r3,8637(r27) if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( ffc11840: 38 80 00 00 li r4,0 ffc11844: 38 a0 00 00 li r5,0 ffc11848: 64 63 50 49 oris r3,r3,20553 ffc1184c: 60 63 77 00 ori r3,r3,30464 ffc11850: 38 dd 00 30 addi r6,r29,48 ffc11854: 48 00 13 c5 bl ffc12c18 ffc11858: 2f 83 00 00 cmpwi cr7,r3,0 ffc1185c: 40 9e 01 1c bne- cr7,ffc11978 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, ffc11860: 88 7b 21 bd lbz r3,8637(r27) if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( ffc11864: 38 80 00 01 li r4,1 ffc11868: 38 a0 00 10 li r5,16 ffc1186c: 64 63 50 49 oris r3,r3,20553 ffc11870: 60 63 73 00 ori r3,r3,29440 ffc11874: 38 c0 00 00 li r6,0 ffc11878: 38 fd 00 28 addi r7,r29,40 ffc1187c: 4b ff 9c 5d bl ffc0b4d8 ffc11880: 2f 83 00 00 cmpwi cr7,r3,0 ffc11884: 40 9e 00 ec bne- cr7,ffc11970 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') ffc11888: 89 3b 21 bd lbz r9,8637(r27) ffc1188c: 2f 89 00 7a cmpwi cr7,r9,122 ffc11890: 39 29 00 01 addi r9,r9,1 ffc11894: 99 3b 21 bd stb r9,8637(r27) ffc11898: 40 9e fd 18 bne+ cr7,ffc115b0 c = 'a'; ffc1189c: 38 00 00 61 li r0,97 ffc118a0: 98 1b 21 bd stb r0,8637(r27) ffc118a4: 4b ff fd 0c b ffc115b0 if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) ffc118a8: 2f 9b 00 00 cmpwi cr7,r27,0 ffc118ac: 40 9e 00 80 bne- cr7,ffc1192c <== NEVER TAKEN pipe_free(pipe); else *pipep = pipe; ffc118b0: 93 be 00 00 stw r29,0(r30) static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); ffc118b4: 80 7f 29 60 lwz r3,10592(r31) ffc118b8: 4b ff a0 85 bl ffc0b93c ffc118bc: 4b ff fd 30 b ffc115ec if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( ffc118c0: 3c 60 50 49 lis r3,20553 ffc118c4: 7f 67 db 78 mr r7,r27 ffc118c8: 38 80 00 01 li r4,1 ffc118cc: 38 a0 00 54 li r5,84 ffc118d0: 38 c0 00 00 li r6,0 ffc118d4: 60 63 50 45 ori r3,r3,20549 ffc118d8: 4b ff 9c 01 bl ffc0b4d8 ffc118dc: 7c 7b 1b 78 mr r27,r3 ffc118e0: 80 7d 27 90 lwz r3,10128(r29) ffc118e4: 4b ff a0 59 bl ffc0b93c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { ffc118e8: 2f 9b 00 00 cmpwi cr7,r27,0 ffc118ec: 3b 60 ff f4 li r27,-12 ffc118f0: 40 9e fd 2c bne+ cr7,ffc1161c ffc118f4: 80 1f 29 60 lwz r0,10592(r31) ffc118f8: 4b ff fc 90 b ffc11588 switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); ffc118fc: 80 7f 00 30 lwz r3,48(r31) ffc11900: 38 81 00 08 addi r4,r1,8 ffc11904: 48 00 14 f5 bl ffc12df8 ffc11908: 4b ff fe 20 b ffc11728 break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); ffc1190c: 80 7f 00 30 lwz r3,48(r31) ffc11910: 38 81 00 08 addi r4,r1,8 ffc11914: 48 00 14 e5 bl ffc12df8 ffc11918: 4b ff fe 94 b ffc117ac case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); ffc1191c: 80 7f 00 2c lwz r3,44(r31) ffc11920: 38 81 00 08 addi r4,r1,8 ffc11924: 48 00 14 d5 bl ffc12df8 ffc11928: 4b ff fd 6c b ffc11694 /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); ffc1192c: 80 7d 00 2c lwz r3,44(r29) <== NOT EXECUTED ffc11930: 48 00 13 fd bl ffc12d2c <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); ffc11934: 80 7d 00 30 lwz r3,48(r29) <== NOT EXECUTED ffc11938: 48 00 13 f5 bl ffc12d2c <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); ffc1193c: 80 7d 00 28 lwz r3,40(r29) <== NOT EXECUTED ffc11940: 4b ff 9d 95 bl ffc0b6d4 <== NOT EXECUTED free(pipe->Buffer); ffc11944: 80 7d 00 00 lwz r3,0(r29) <== NOT EXECUTED ffc11948: 4b ff 55 d9 bl ffc06f20 <== NOT EXECUTED free(pipe); ffc1194c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc11950: 4b ff 55 d1 bl ffc06f20 <== NOT EXECUTED static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); ffc11954: 80 7f 29 60 lwz r3,10592(r31) ffc11958: 4b ff 9f e5 bl ffc0b93c ffc1195c: 4b ff fc c0 b ffc1161c if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); ffc11960: 80 7f 00 28 lwz r3,40(r31) err = -ENXIO; ffc11964: 3b 60 ff fa li r27,-6 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); ffc11968: 4b ff 9f d5 bl ffc0b93c err = -ENXIO; goto out_error; ffc1196c: 4b ff fd 8c b ffc116f8 if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); ffc11970: 80 7d 00 30 lwz r3,48(r29) ffc11974: 48 00 13 b9 bl ffc12d2c err_wbar: rtems_barrier_delete(pipe->readBarrier); ffc11978: 80 7d 00 2c lwz r3,44(r29) ffc1197c: 48 00 13 b1 bl ffc12d2c err_rbar: free(pipe->Buffer); ffc11980: 80 7d 00 00 lwz r3,0(r29) ffc11984: 4b ff 55 9d bl ffc06f20 err_buf: free(pipe); ffc11988: 7f a3 eb 78 mr r3,r29 ffc1198c: 4b ff 55 95 bl ffc06f20 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { ffc11990: 3b 60 ff f4 li r27,-12 ffc11994: 4b ff ff c0 b ffc11954 =============================================================================== ffc05b10 : long fpathconf( int fd, int name ) { ffc05b10: 7c 08 02 a6 mflr r0 ffc05b14: 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); ffc05b18: 3d 20 00 00 lis r9,0 long fpathconf( int fd, int name ) { ffc05b1c: 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); ffc05b20: 80 09 26 dc lwz r0,9948(r9) ffc05b24: 7f 83 00 40 cmplw cr7,r3,r0 ffc05b28: 40 9c 00 c8 bge- cr7,ffc05bf0 iop = rtems_libio_iop(fd); ffc05b2c: 3d 20 00 00 lis r9,0 ffc05b30: 80 09 27 88 lwz r0,10120(r9) ffc05b34: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc05b38: 7c 60 1a 14 add r3,r0,r3 rtems_libio_check_is_open(iop); ffc05b3c: 80 03 00 18 lwz r0,24(r3) ffc05b40: 70 09 01 00 andi. r9,r0,256 ffc05b44: 41 82 00 ac beq- ffc05bf0 <== NEVER TAKEN * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { ffc05b48: 2b 84 00 0b cmplwi cr7,r4,11 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; ffc05b4c: 81 23 00 2c lwz r9,44(r3) switch ( name ) { ffc05b50: 40 9d 00 24 ble- cr7,ffc05b74 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc05b54: 48 00 dd f1 bl ffc13944 <__errno> ffc05b58: 38 00 00 16 li r0,22 ffc05b5c: 90 03 00 00 stw r0,0(r3) ffc05b60: 38 60 ff ff li r3,-1 break; } return return_value; } ffc05b64: 80 01 00 0c lwz r0,12(r1) ffc05b68: 38 21 00 08 addi r1,r1,8 ffc05b6c: 7c 08 03 a6 mtlr r0 ffc05b70: 4e 80 00 20 blr * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { ffc05b74: 3d 60 ff c2 lis r11,-62 ffc05b78: 39 6b b3 98 addi r11,r11,-19560 ffc05b7c: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc05b80: 7c 0b 20 2e lwzx r0,r11,r4 ffc05b84: 7d 60 5a 14 add r11,r0,r11 ffc05b88: 7d 69 03 a6 mtctr r11 ffc05b8c: 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; ffc05b90: 80 69 00 5c lwz r3,92(r9) break; ffc05b94: 4b ff ff d0 b ffc05b64 break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; ffc05b98: 80 69 00 50 lwz r3,80(r9) break; ffc05b9c: 4b ff ff c8 b ffc05b64 break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; ffc05ba0: 80 69 00 64 lwz r3,100(r9) break; ffc05ba4: 4b ff ff c0 b ffc05b64 break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; ffc05ba8: 80 69 00 58 lwz r3,88(r9) break; ffc05bac: 4b ff ff b8 b ffc05b64 break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; ffc05bb0: 80 69 00 54 lwz r3,84(r9) break; ffc05bb4: 4b ff ff b0 b ffc05b64 break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; ffc05bb8: 80 69 00 4c lwz r3,76(r9) break; ffc05bbc: 4b ff ff a8 b ffc05b64 break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; ffc05bc0: 80 69 00 48 lwz r3,72(r9) break; ffc05bc4: 4b ff ff a0 b ffc05b64 break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; ffc05bc8: 80 69 00 44 lwz r3,68(r9) break; ffc05bcc: 4b ff ff 98 b ffc05b64 break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; ffc05bd0: 80 69 00 40 lwz r3,64(r9) break; ffc05bd4: 4b ff ff 90 b ffc05b64 switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; ffc05bd8: 80 69 00 3c lwz r3,60(r9) break; ffc05bdc: 4b ff ff 88 b ffc05b64 the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; ffc05be0: 80 69 00 38 lwz r3,56(r9) break; ffc05be4: 4b ff ff 80 b ffc05b64 break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; ffc05be8: 80 69 00 60 lwz r3,96(r9) break; ffc05bec: 4b ff ff 78 b ffc05b64 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); ffc05bf0: 48 00 dd 55 bl ffc13944 <__errno> ffc05bf4: 38 00 00 09 li r0,9 ffc05bf8: 90 03 00 00 stw r0,0(r3) ffc05bfc: 38 60 ff ff li r3,-1 ffc05c00: 4b ff ff 64 b ffc05b64 =============================================================================== ffc0519c : #include void free( void *ptr ) { ffc0519c: 94 21 ff f0 stwu r1,-16(r1) ffc051a0: 7c 08 02 a6 mflr r0 MSBUMP(free_calls, 1); ffc051a4: 3d 20 00 00 lis r9,0 #include void free( void *ptr ) { ffc051a8: 90 01 00 14 stw r0,20(r1) MSBUMP(free_calls, 1); ffc051ac: 39 29 2a e8 addi r9,r9,10984 #include void free( void *ptr ) { ffc051b0: 93 e1 00 0c stw r31,12(r1) MSBUMP(free_calls, 1); if ( !ptr ) ffc051b4: 7c 7f 1b 79 mr. r31,r3 void free( void *ptr ) { MSBUMP(free_calls, 1); ffc051b8: 81 69 00 0c lwz r11,12(r9) #include void free( void *ptr ) { ffc051bc: 93 c1 00 08 stw r30,8(r1) MSBUMP(free_calls, 1); ffc051c0: 38 0b 00 01 addi r0,r11,1 ffc051c4: 90 09 00 0c stw r0,12(r9) if ( !ptr ) ffc051c8: 41 82 00 6c beq- ffc05234 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc051cc: 3d 20 00 00 lis r9,0 ffc051d0: 80 09 28 04 lwz r0,10244(r9) ffc051d4: 2f 80 00 03 cmpwi cr7,r0,3 ffc051d8: 41 9e 00 74 beq- cr7,ffc0524c <== ALWAYS TAKEN } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc051dc: 3d 20 00 00 lis r9,0 ffc051e0: 81 29 27 68 lwz r9,10088(r9) ffc051e4: 2f 89 00 00 cmpwi cr7,r9,0 ffc051e8: 41 9e 00 14 beq- cr7,ffc051fc (*rtems_malloc_statistics_helpers->at_free)(ptr); ffc051ec: 80 09 00 08 lwz r0,8(r9) ffc051f0: 7f e3 fb 78 mr r3,r31 ffc051f4: 7c 09 03 a6 mtctr r0 ffc051f8: 4e 80 04 21 bctrl if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { ffc051fc: 3f c0 00 00 lis r30,0 ffc05200: 80 7e 26 ec lwz r3,9964(r30) ffc05204: 7f e4 fb 78 mr r4,r31 ffc05208: 48 00 65 49 bl ffc0b750 <_Protected_heap_Free> ffc0520c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05210: 40 be 00 24 bne+ cr7,ffc05234 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, ffc05214: 81 3e 26 ec lwz r9,9964(r30) */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ffc05218: 3c 60 ff c2 lis r3,-62 ffc0521c: 38 63 f3 d8 addi r3,r3,-3112 ffc05220: 80 a9 00 18 lwz r5,24(r9) ffc05224: 7f e4 fb 78 mr r4,r31 ffc05228: 80 c9 00 1c lwz r6,28(r9) ffc0522c: 4c c6 31 82 crclr 4*cr1+eq ffc05230: 48 00 11 7d bl ffc063ac RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } ffc05234: 80 01 00 14 lwz r0,20(r1) ffc05238: 83 c1 00 08 lwz r30,8(r1) ffc0523c: 7c 08 03 a6 mtlr r0 ffc05240: 83 e1 00 0c lwz r31,12(r1) ffc05244: 38 21 00 10 addi r1,r1,16 ffc05248: 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() ) { ffc0524c: 48 00 01 99 bl ffc053e4 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc05250: 2f 83 00 00 cmpwi cr7,r3,0 ffc05254: 40 9e ff 88 bne+ cr7,ffc051dc !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); ffc05258: 7f e3 fb 78 mr r3,r31 ffc0525c: 48 00 02 15 bl ffc05470 return; ffc05260: 4b ff ff d4 b ffc05234 =============================================================================== ffc08bc4 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc08bc4: 94 21 ff f0 stwu r1,-16(r1) ffc08bc8: 7c 08 02 a6 mflr r0 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc08bcc: 3d 20 00 00 lis r9,0 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc08bd0: 90 01 00 14 stw r0,20(r1) rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc08bd4: 38 09 2a f8 addi r0,r9,11000 ffc08bd8: 7f 83 00 00 cmpw cr7,r3,r0 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc08bdc: 93 e1 00 0c stw r31,12(r1) ffc08be0: 7c 7f 1b 78 mr r31,r3 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc08be4: 41 9e 00 1c beq- cr7,ffc08c00 <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); ffc08be8: 38 63 00 04 addi r3,r3,4 ffc08bec: 4b ff e8 e1 bl ffc074cc rtems_filesystem_freenode( &env->root_directory); ffc08bf0: 38 7f 00 18 addi r3,r31,24 ffc08bf4: 4b ff e8 d9 bl ffc074cc free(env); ffc08bf8: 7f e3 fb 78 mr r3,r31 ffc08bfc: 4b ff e8 fd bl ffc074f8 } } ffc08c00: 80 01 00 14 lwz r0,20(r1) ffc08c04: 83 e1 00 0c lwz r31,12(r1) ffc08c08: 38 21 00 10 addi r1,r1,16 ffc08c0c: 7c 08 03 a6 mtlr r0 ffc08c10: 4e 80 00 20 blr =============================================================================== ffc04360 : rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major < disktab_size && disktab != NULL) { ffc04360: 3d 20 00 00 lis r9,0 ffc04364: 80 09 28 70 lwz r0,10352(r9) return dd; } } return NULL; ffc04368: 39 60 00 00 li r11,0 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major < disktab_size && disktab != NULL) { ffc0436c: 39 29 28 70 addi r9,r9,10352 ffc04370: 7f 80 18 40 cmplw cr7,r0,r3 ffc04374: 40 9d 00 60 ble- cr7,ffc043d4 <== NEVER TAKEN ffc04378: 81 29 00 04 lwz r9,4(r9) ffc0437c: 2f 89 00 00 cmpwi cr7,r9,0 ffc04380: 41 9e 00 54 beq- cr7,ffc043d4 <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; ffc04384: 54 63 18 38 rlwinm r3,r3,3,0,28 ffc04388: 7d 49 1a 14 add r10,r9,r3 if (minor < dtab->size && dtab->minor != NULL) { ffc0438c: 80 0a 00 04 lwz r0,4(r10) ffc04390: 7f 80 20 40 cmplw cr7,r0,r4 ffc04394: 40 9d 00 40 ble- cr7,ffc043d4 <== NEVER TAKEN ffc04398: 7d 29 18 2e lwzx r9,r9,r3 ffc0439c: 2f 89 00 00 cmpwi cr7,r9,0 ffc043a0: 41 9e 00 34 beq- cr7,ffc043d4 <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; ffc043a4: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc043a8: 7d 69 20 2e lwzx r11,r9,r4 if (dd != NULL && !lookup_only) { ffc043ac: 2f 8b 00 00 cmpwi cr7,r11,0 ffc043b0: 41 9e 00 24 beq- cr7,ffc043d4 ffc043b4: 2f 85 00 00 cmpwi cr7,r5,0 ffc043b8: 40 9e 00 1c bne- cr7,ffc043d4 if (!dd->deleted) { ffc043bc: 88 0b 00 30 lbz r0,48(r11) ffc043c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc043c4: 40 9e 00 18 bne- cr7,ffc043dc ++dd->uses; ffc043c8: 81 2b 00 14 lwz r9,20(r11) ffc043cc: 38 09 00 01 addi r0,r9,1 ffc043d0: 90 0b 00 14 stw r0,20(r11) return dd; } } return NULL; } ffc043d4: 7d 63 5b 78 mr r3,r11 ffc043d8: 4e 80 00 20 blr if (dd != NULL && !lookup_only) { if (!dd->deleted) { ++dd->uses; } else { dd = NULL; ffc043dc: 39 60 00 00 li r11,0 return dd; } } return NULL; } ffc043e0: 7d 63 5b 78 mr r3,r11 ffc043e4: 4e 80 00 20 blr =============================================================================== ffc1ee44 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc1ee44: 94 21 ff c8 stwu r1,-56(r1) ffc1ee48: 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 ); ffc1ee4c: 3d 20 00 00 lis r9,0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc1ee50: 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 ); ffc1ee54: 80 09 26 dc lwz r0,9948(r9) int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc1ee58: 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 ); ffc1ee5c: 3b a0 00 00 li r29,0 ffc1ee60: 7f 83 00 40 cmplw cr7,r3,r0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc1ee64: 93 c1 00 30 stw r30,48(r1) ffc1ee68: 7c 9e 23 78 mr r30,r4 ffc1ee6c: 93 e1 00 34 stw r31,52(r1) ffc1ee70: 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 ); ffc1ee74: 40 9c 00 14 bge- cr7,ffc1ee88 <== NEVER TAKEN ffc1ee78: 3d 20 00 00 lis r9,0 ffc1ee7c: 83 a9 27 88 lwz r29,10120(r9) ffc1ee80: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc1ee84: 7f bd 1a 14 add r29,r29,r3 /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc1ee88: 81 3d 00 28 lwz r9,40(r29) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc1ee8c: 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; ffc1ee90: 80 1d 00 2c lwz r0,44(r29) ffc1ee94: 81 1d 00 1c lwz r8,28(r29) ffc1ee98: 81 5d 00 20 lwz r10,32(r29) ffc1ee9c: 81 7d 00 24 lwz r11,36(r29) ffc1eea0: 90 01 00 18 stw r0,24(r1) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc1eea4: 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; ffc1eea8: 91 01 00 08 stw r8,8(r1) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc1eeac: 7c 09 03 a6 mtctr r0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc1eeb0: 91 41 00 0c stw r10,12(r1) ffc1eeb4: 91 61 00 10 stw r11,16(r1) ffc1eeb8: 91 21 00 14 stw r9,20(r1) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc1eebc: 4e 80 04 21 bctrl ffc1eec0: 2f 83 00 01 cmpwi cr7,r3,1 ffc1eec4: 40 9e 00 3c bne- cr7,ffc1ef00 /* * 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 ); ffc1eec8: 81 3d 00 24 lwz r9,36(r29) ffc1eecc: 7f a3 eb 78 mr r3,r29 ffc1eed0: 7f c4 f3 78 mr r4,r30 ffc1eed4: 80 09 00 08 lwz r0,8(r9) ffc1eed8: 7f e5 fb 78 mr r5,r31 ffc1eedc: 7c 09 03 a6 mtctr r0 ffc1eee0: 4e 80 04 21 bctrl } ffc1eee4: 80 01 00 3c lwz r0,60(r1) ffc1eee8: 83 a1 00 2c lwz r29,44(r1) ffc1eeec: 7c 08 03 a6 mtlr r0 ffc1eef0: 83 c1 00 30 lwz r30,48(r1) ffc1eef4: 83 e1 00 34 lwz r31,52(r1) ffc1eef8: 38 21 00 38 addi r1,r1,56 ffc1eefc: 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 ); ffc1ef00: 4b ff 49 b1 bl ffc138b0 <__errno> ffc1ef04: 38 00 00 14 li r0,20 ffc1ef08: 90 03 00 00 stw r0,0(r3) ffc1ef0c: 38 60 ff ff li r3,-1 ffc1ef10: 4b ff ff d4 b ffc1eee4 =============================================================================== ffc05264 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc05264: 94 21 ff e0 stwu r1,-32(r1) ffc05268: 7c 08 02 a6 mflr r0 ffc0526c: 93 e1 00 1c stw r31,28(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) ffc05270: 7c 7f 1b 79 mr. r31,r3 */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc05274: 90 01 00 24 stw r0,36(r1) ffc05278: 93 c1 00 18 stw r30,24(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) ffc0527c: 41 82 00 64 beq- ffc052e0 <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc05280: 7f c0 00 a6 mfmsr r30 ffc05284: 7c 10 42 a6 mfsprg r0,0 ffc05288: 7f c0 00 78 andc r0,r30,r0 ffc0528c: 7c 00 01 24 mtmsr r0 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); ffc05290: 38 61 00 08 addi r3,r1,8 ffc05294: 48 00 54 d1 bl ffc0a764 <_TOD_Get> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc05298: 7f c0 01 24 mtmsr r30 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; ffc0529c: 3d 20 10 62 lis r9,4194 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; ffc052a0: 80 01 00 0c lwz r0,12(r1) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; ffc052a4: 61 29 4d d3 ori r9,r9,19923 ffc052a8: 7d 20 48 96 mulhw r9,r0,r9 ffc052ac: 7c 00 fe 70 srawi r0,r0,31 ffc052b0: 7d 29 36 70 srawi r9,r9,6 ffc052b4: 7c 00 48 50 subf r0,r0,r9 time->tv_sec = now.tv_sec; ffc052b8: 81 21 00 08 lwz r9,8(r1) time->tv_usec = useconds; ffc052bc: 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; ffc052c0: 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; ffc052c4: 91 3f 00 00 stw r9,0(r31) } ffc052c8: 80 01 00 24 lwz r0,36(r1) ffc052cc: 83 c1 00 18 lwz r30,24(r1) ffc052d0: 7c 08 03 a6 mtlr r0 ffc052d4: 83 e1 00 1c lwz r31,28(r1) ffc052d8: 38 21 00 20 addi r1,r1,32 ffc052dc: 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 ); ffc052e0: 48 00 d8 7d bl ffc12b5c <__errno> <== NOT EXECUTED ffc052e4: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc052e8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc052ec: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc052f0: 4b ff ff d8 b ffc052c8 <== NOT EXECUTED =============================================================================== ffc11fa4 : 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 ) ffc11fa4: 81 23 00 1c lwz r9,28(r3) return -1; /* It wasn't a directory --> return error */ ffc11fa8: 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 ) ffc11fac: 81 29 00 4c lwz r9,76(r9) ffc11fb0: 2f 89 00 01 cmpwi cr7,r9,1 ffc11fb4: 40 9e 00 18 bne- cr7,ffc11fcc <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; ffc11fb8: 39 40 00 00 li r10,0 ffc11fbc: 39 60 00 00 li r11,0 ffc11fc0: 91 43 00 10 stw r10,16(r3) return 0; ffc11fc4: 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; ffc11fc8: 91 63 00 14 stw r11,20(r3) return 0; } ffc11fcc: 7c 03 03 78 mr r3,r0 ffc11fd0: 4e 80 00 20 blr =============================================================================== ffc11fd4 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc11fd4: 94 21 fe b0 stwu r1,-336(r1) ffc11fd8: 7c 08 02 a6 mflr r0 ffc11fdc: 90 01 01 54 stw r0,340(r1) ffc11fe0: 93 81 01 40 stw r28,320(r1) int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; ffc11fe4: 83 83 00 1c lwz r28,28(r3) ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc11fe8: 93 c1 01 48 stw r30,328(r1) */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc11fec: 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 ); ffc11ff0: 3b 9c 00 54 addi r28,r28,84 ffc11ff4: 93 01 01 30 stw r24,304(r1) ffc11ff8: 7c 98 23 78 mr r24,r4 struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) ffc11ffc: 7f 9e e0 00 cmpw cr7,r30,r28 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc12000: 93 21 01 34 stw r25,308(r1) ffc12004: 7c 79 1b 78 mr r25,r3 ffc12008: 93 41 01 38 stw r26,312(r1) the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) return 0; ffc1200c: 3b 40 00 00 li r26,0 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc12010: 92 c1 01 28 stw r22,296(r1) ffc12014: 92 e1 01 2c stw r23,300(r1) ffc12018: 93 61 01 3c stw r27,316(r1) ffc1201c: 93 a1 01 44 stw r29,324(r1) ffc12020: 93 e1 01 4c stw r31,332(r1) struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) ffc12024: 41 9e 00 c8 beq- cr7,ffc120ec 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); ffc12028: 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; ffc1202c: 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); ffc12030: 54 a5 e8 fe rlwinm r5,r5,29,3,31 ffc12034: 63 7b ea 0f ori r27,r27,59919 ffc12038: 7f 65 d8 16 mulhwu r27,r5,r27 ffc1203c: 57 7b f8 7e rlwinm r27,r27,31,1,31 ffc12040: 1f 7b 01 18 mulli r27,r27,280 /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc12044: 7f 7b ea 15 add. r27,r27,r29 ffc12048: 40 81 00 a4 ble- ffc120ec <== 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 ) ){ ffc1204c: 3b e0 00 00 li r31,0 } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); ffc12050: 3a e0 01 18 li r23,280 ffc12054: 48 00 00 1c b ffc12070 * 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( ffc12058: 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; ffc1205c: 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 ( ffc12060: 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 ) ){ ffc12064: 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 ( ffc12068: 40 9d 00 84 ble- cr7,ffc120ec <== 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 ) ){ ffc1206c: 41 9a 00 80 beq- cr6,ffc120ec /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { ffc12070: 7f 9d f8 00 cmpw cr7,r29,r31 ffc12074: 41 9d ff e4 bgt+ cr7,ffc12058 /* 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; ffc12078: 80 1e 00 38 lwz r0,56(r30) tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc1207c: 3a de 00 0c addi r22,r30,12 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; ffc12080: 7f e9 fe 70 srawi r9,r31,31 ffc12084: 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 ); ffc12088: 7e c3 b3 78 mr r3,r22 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; ffc1208c: 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( ffc12090: 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; ffc12094: 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 ); ffc12098: b2 e1 00 18 sth r23,24(r1) the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc1209c: 48 00 23 ed bl ffc14488 strcpy( tmp_dirent.d_name, the_jnode->name ); ffc120a0: 7e c4 b3 78 mr r4,r22 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc120a4: b0 61 00 1a sth r3,26(r1) strcpy( tmp_dirent.d_name, the_jnode->name ); ffc120a8: 38 61 00 1c addi r3,r1,28 ffc120ac: 48 00 1e c9 bl ffc13f74 memcpy( ffc120b0: 7c 78 d2 14 add r3,r24,r26 ffc120b4: 38 81 00 08 addi r4,r1,8 ffc120b8: 38 a0 01 18 li r5,280 ffc120bc: 48 00 17 dd bl ffc13898 /* 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 ( ffc120c0: 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); ffc120c4: 81 59 00 10 lwz r10,16(r25) bytes_transferred = bytes_transferred + sizeof( struct dirent ); ffc120c8: 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); ffc120cc: 81 79 00 14 lwz r11,20(r25) bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; ffc120d0: 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); ffc120d4: 31 6b 01 18 addic r11,r11,280 ffc120d8: 7d 4a 01 94 addze r10,r10 ffc120dc: 91 59 00 10 stw r10,16(r25) for ( current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ ffc120e0: 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); ffc120e4: 91 79 00 14 stw r11,20(r25) /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc120e8: 41 9d ff 84 bgt+ cr7,ffc1206c <== NEVER TAKEN the_node = the_node->next; } /* Success */ return bytes_transferred; } ffc120ec: 80 01 01 54 lwz r0,340(r1) ffc120f0: 7f 43 d3 78 mr r3,r26 ffc120f4: 82 c1 01 28 lwz r22,296(r1) ffc120f8: 7c 08 03 a6 mtlr r0 ffc120fc: 82 e1 01 2c lwz r23,300(r1) ffc12100: 83 01 01 30 lwz r24,304(r1) ffc12104: 83 21 01 34 lwz r25,308(r1) ffc12108: 83 41 01 38 lwz r26,312(r1) ffc1210c: 83 61 01 3c lwz r27,316(r1) ffc12110: 83 81 01 40 lwz r28,320(r1) ffc12114: 83 a1 01 44 lwz r29,324(r1) ffc12118: 83 c1 01 48 lwz r30,328(r1) ffc1211c: 83 e1 01 4c lwz r31,332(r1) ffc12120: 38 21 01 50 addi r1,r1,336 ffc12124: 4e 80 00 20 blr =============================================================================== ffc12294 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { ffc12294: 94 21 ff f0 stwu r1,-16(r1) ffc12298: 7c 08 02 a6 mflr r0 ffc1229c: 93 e1 00 0c stw r31,12(r1) ffc122a0: 90 01 00 14 stw r0,20(r1) IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; ffc122a4: 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 ) ) ffc122a8: 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 ); ffc122ac: 38 1f 00 54 addi r0,r31,84 ffc122b0: 7f 89 00 00 cmpw cr7,r9,r0 ffc122b4: 40 9e 00 6c bne- cr7,ffc12320 static inline bool rtems_filesystem_is_root_location( const rtems_filesystem_location_info_t *loc ) { return loc->mt_entry->mt_fs_root.node_access == loc->node_access; ffc122b8: 81 24 00 10 lwz r9,16(r4) /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) ffc122bc: 80 09 00 1c lwz r0,28(r9) ffc122c0: 7f 9f 00 00 cmpw cr7,r31,r0 ffc122c4: 41 9e 00 38 beq- cr7,ffc122fc /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) ffc122c8: 80 1f 00 5c lwz r0,92(r31) ffc122cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc122d0: 40 9e 00 2c bne- cr7,ffc122fc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); ffc122d4: 7f e3 fb 78 mr r3,r31 ffc122d8: 4b ff cb a9 bl ffc0ee80 IMFS_check_node_remove( the_jnode ); ffc122dc: 7f e3 fb 78 mr r3,r31 ffc122e0: 4b ff cc 01 bl ffc0eee0 return 0; ffc122e4: 38 60 00 00 li r3,0 } ffc122e8: 80 01 00 14 lwz r0,20(r1) ffc122ec: 83 e1 00 0c lwz r31,12(r1) ffc122f0: 38 21 00 10 addi r1,r1,16 ffc122f4: 7c 08 03 a6 mtlr r0 ffc122f8: 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 ); ffc122fc: 48 00 08 61 bl ffc12b5c <__errno> ffc12300: 38 00 00 10 li r0,16 ffc12304: 90 03 00 00 stw r0,0(r3) ffc12308: 38 60 ff ff li r3,-1 IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } ffc1230c: 80 01 00 14 lwz r0,20(r1) ffc12310: 83 e1 00 0c lwz r31,12(r1) ffc12314: 38 21 00 10 addi r1,r1,16 ffc12318: 7c 08 03 a6 mtlr r0 ffc1231c: 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 ); ffc12320: 48 00 08 3d bl ffc12b5c <__errno> ffc12324: 38 00 00 5a li r0,90 ffc12328: 90 03 00 00 stw r0,0(r3) ffc1232c: 38 60 ff ff li r3,-1 ffc12330: 4b ff ff b8 b ffc122e8 =============================================================================== ffc05a20 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05a20: 94 21 ff f0 stwu r1,-16(r1) ffc05a24: 7c 08 02 a6 mflr r0 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05a28: 3d 20 00 00 lis r9,0 /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05a2c: 90 01 00 14 stw r0,20(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05a30: 88 09 28 58 lbz r0,10328(r9) /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05a34: 93 c1 00 08 stw r30,8(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05a38: 2f 80 00 00 cmpwi cr7,r0,0 /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05a3c: 93 e1 00 0c stw r31,12(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05a40: 41 9e 00 1c beq- cr7,ffc05a5c fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } ffc05a44: 80 01 00 14 lwz r0,20(r1) ffc05a48: 83 c1 00 08 lwz r30,8(r1) ffc05a4c: 7c 08 03 a6 mtlr r0 ffc05a50: 83 e1 00 0c lwz r31,12(r1) ffc05a54: 38 21 00 10 addi r1,r1,16 ffc05a58: 4e 80 00 20 blr static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc05a5c: 3c 60 ff c2 lis r3,-62 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc05a60: 3f c0 ff c2 lis r30,-62 ffc05a64: 3f e0 ff c2 lis r31,-62 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; ffc05a68: 38 00 00 01 li r0,1 mkdir("/etc", 0777); ffc05a6c: 38 80 01 ff li r4,511 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; ffc05a70: 98 09 28 58 stb r0,10328(r9) mkdir("/etc", 0777); ffc05a74: 38 63 b3 94 addi r3,r3,-19564 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc05a78: 3b de b3 9c addi r30,r30,-19556 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc05a7c: 48 00 0b ad bl ffc06628 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc05a80: 3b ff b3 a8 addi r31,r31,-19544 ffc05a84: 7f c3 f3 78 mr r3,r30 ffc05a88: 7f e4 fb 78 mr r4,r31 ffc05a8c: 48 00 e9 7d bl ffc14408 ffc05a90: 2f 83 00 00 cmpwi cr7,r3,0 ffc05a94: 41 9e 00 7c beq- cr7,ffc05b10 } 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); ffc05a98: 48 00 df c9 bl ffc13a60 } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { ffc05a9c: 3f c0 ff c2 lis r30,-62 ffc05aa0: 3b de b4 18 addi r30,r30,-19432 ffc05aa4: 7f c3 f3 78 mr r3,r30 ffc05aa8: 7f e4 fb 78 mr r4,r31 ffc05aac: 48 00 e9 5d bl ffc14408 ffc05ab0: 2f 83 00 00 cmpwi cr7,r3,0 ffc05ab4: 41 9e 00 20 beq- cr7,ffc05ad4 } 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); ffc05ab8: 48 00 df a9 bl ffc13a60 } } ffc05abc: 80 01 00 14 lwz r0,20(r1) ffc05ac0: 83 c1 00 08 lwz r30,8(r1) ffc05ac4: 7c 08 03 a6 mtlr r0 ffc05ac8: 83 e1 00 0c lwz r31,12(r1) ffc05acc: 38 21 00 10 addi r1,r1,16 ffc05ad0: 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) { ffc05ad4: 3c 80 ff c2 lis r4,-62 ffc05ad8: 7f c3 f3 78 mr r3,r30 ffc05adc: 38 84 b3 ac addi r4,r4,-19540 ffc05ae0: 48 00 e9 29 bl ffc14408 ffc05ae4: 7c 7f 1b 79 mr. r31,r3 ffc05ae8: 41 a2 ff 5c beq- ffc05a44 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" ffc05aec: 3c 60 ff c2 lis r3,-62 ffc05af0: 38 80 00 01 li r4,1 ffc05af4: 38 a0 00 2a li r5,42 ffc05af8: 7f e6 fb 78 mr r6,r31 ffc05afc: 38 63 b4 24 addi r3,r3,-19420 ffc05b00: 48 00 f1 c5 bl ffc14cc4 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); ffc05b04: 7f e3 fb 78 mr r3,r31 ffc05b08: 48 00 df 59 bl ffc13a60 ffc05b0c: 4b ff ff b0 b ffc05abc * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { ffc05b10: 3c 80 ff c2 lis r4,-62 ffc05b14: 7f c3 f3 78 mr r3,r30 ffc05b18: 38 84 b3 ac addi r4,r4,-19540 ffc05b1c: 48 00 e8 ed bl ffc14408 ffc05b20: 7c 7e 1b 79 mr. r30,r3 ffc05b24: 41 a2 ff 78 beq- ffc05a9c <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" ffc05b28: 3c 60 ff c2 lis r3,-62 ffc05b2c: 38 63 b3 b0 addi r3,r3,-19536 ffc05b30: 38 80 00 01 li r4,1 ffc05b34: 38 a0 00 66 li r5,102 ffc05b38: 7f c6 f3 78 mr r6,r30 ffc05b3c: 48 00 f1 89 bl ffc14cc4 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); ffc05b40: 7f c3 f3 78 mr r3,r30 ffc05b44: 4b ff ff 54 b ffc05a98 =============================================================================== ffc0777c : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc0777c: 94 21 ff f0 stwu r1,-16(r1) ffc07780: 7c 08 02 a6 mflr r0 ffc07784: 90 01 00 14 stw r0,20(r1) if (tty->termios.c_iflag & ISTRIP) ffc07788: 80 04 00 30 lwz r0,48(r4) /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc0778c: 93 c1 00 08 stw r30,8(r1) ffc07790: 7c 9e 23 78 mr r30,r4 if (tty->termios.c_iflag & ISTRIP) ffc07794: 70 09 00 20 andi. r9,r0,32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc07798: 93 e1 00 0c stw r31,12(r1) ffc0779c: 7c 7f 1b 78 mr r31,r3 if (tty->termios.c_iflag & ISTRIP) ffc077a0: 41 82 00 08 beq- ffc077a8 <== ALWAYS TAKEN c &= 0x7f; ffc077a4: 54 7f 06 7e clrlwi r31,r3,25 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) ffc077a8: 70 0b 02 00 andi. r11,r0,512 ffc077ac: 41 82 00 28 beq- ffc077d4 c = tolower (c); ffc077b0: 3d 20 00 00 lis r9,0 ffc077b4: 81 69 27 44 lwz r11,10052(r9) ffc077b8: 7f e9 fb 78 mr r9,r31 ffc077bc: 7f eb fa 14 add r31,r11,r31 ffc077c0: 89 7f 00 01 lbz r11,1(r31) ffc077c4: 55 6b 07 be clrlwi r11,r11,30 ffc077c8: 2f 8b 00 01 cmpwi cr7,r11,1 ffc077cc: 41 9e 01 14 beq- cr7,ffc078e0 ffc077d0: 55 3f 06 3e clrlwi r31,r9,24 if (c == '\r') { ffc077d4: 2f 9f 00 0d cmpwi cr7,r31,13 ffc077d8: 41 9e 00 68 beq- cr7,ffc07840 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)) { ffc077dc: 2f 9f 00 0a cmpwi cr7,r31,10 ffc077e0: 41 9e 00 f0 beq- cr7,ffc078d0 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { ffc077e4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc077e8: 40 9e 00 70 bne- cr7,ffc07858 <== ALWAYS TAKEN } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { ffc077ec: 3d 20 00 00 lis r9,0 ffc077f0: 81 69 21 b8 lwz r11,8632(r9) if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; ffc077f4: 38 60 00 00 li r3,0 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { ffc077f8: 81 3e 00 20 lwz r9,32(r30) ffc077fc: 38 0b ff ff addi r0,r11,-1 ffc07800: 7f 89 00 00 cmpw cr7,r9,r0 ffc07804: 40 9c 00 24 bge- cr7,ffc07828 <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) ffc07808: 80 1e 00 3c lwz r0,60(r30) ffc0780c: 70 0b 00 08 andi. r11,r0,8 ffc07810: 40 82 00 d8 bne- ffc078e8 <== ALWAYS TAKEN echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc07814: 81 7e 00 1c lwz r11,28(r30) ffc07818: 38 09 00 01 addi r0,r9,1 } return 0; ffc0781c: 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; ffc07820: 7f eb 49 ae stbx r31,r11,r9 ffc07824: 90 1e 00 20 stw r0,32(r30) } return 0; } ffc07828: 80 01 00 14 lwz r0,20(r1) ffc0782c: 83 c1 00 08 lwz r30,8(r1) ffc07830: 7c 08 03 a6 mtlr r0 ffc07834: 83 e1 00 0c lwz r31,12(r1) ffc07838: 38 21 00 10 addi r1,r1,16 ffc0783c: 4e 80 00 20 blr if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) ffc07840: 70 09 00 80 andi. r9,r0,128 return 0; ffc07844: 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) ffc07848: 40 a2 ff e0 bne- ffc07828 <== NEVER TAKEN return 0; if (tty->termios.c_iflag & ICRNL) ffc0784c: 70 0b 01 00 andi. r11,r0,256 ffc07850: 41 82 00 08 beq- ffc07858 <== NEVER TAKEN c = '\n'; ffc07854: 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)) { ffc07858: 80 1e 00 3c lwz r0,60(r30) ffc0785c: 70 0b 00 02 andi. r11,r0,2 ffc07860: 41 a2 ff 8c beq- ffc077ec if (c == tty->termios.c_cc[VERASE]) { ffc07864: 89 3e 00 43 lbz r9,67(r30) ffc07868: 7f 89 f8 00 cmpw cr7,r9,r31 ffc0786c: 41 9e 00 e8 beq- cr7,ffc07954 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { ffc07870: 89 3e 00 44 lbz r9,68(r30) ffc07874: 7f 89 f8 00 cmpw cr7,r9,r31 ffc07878: 41 9e 00 94 beq- cr7,ffc0790c erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { ffc0787c: 89 3e 00 45 lbz r9,69(r30) return 1; ffc07880: 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]) { ffc07884: 7f 89 f8 00 cmpw cr7,r9,r31 ffc07888: 41 be ff a0 beq- cr7,ffc07828 <== NEVER TAKEN return 1; } else if (c == '\n') { ffc0788c: 2f 9f 00 0a cmpwi cr7,r31,10 ffc07890: 41 9e 00 90 beq- cr7,ffc07920 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]) || ffc07894: 89 3e 00 4c lbz r9,76(r30) ffc07898: 7f 89 f8 00 cmpw cr7,r9,r31 ffc0789c: 41 9e 00 10 beq- cr7,ffc078ac <== NEVER TAKEN ffc078a0: 89 3e 00 51 lbz r9,81(r30) ffc078a4: 7f 89 f8 00 cmpw cr7,r9,r31 ffc078a8: 40 9e ff 44 bne+ cr7,ffc077ec <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) ffc078ac: 70 0b 00 08 andi. r11,r0,8 <== NOT EXECUTED ffc078b0: 40 82 00 4c bne- ffc078fc <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc078b4: 81 3e 00 20 lwz r9,32(r30) <== NOT EXECUTED return 1; ffc078b8: 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; ffc078bc: 81 7e 00 1c lwz r11,28(r30) <== NOT EXECUTED ffc078c0: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED ffc078c4: 7f eb 49 ae stbx r31,r11,r9 <== NOT EXECUTED ffc078c8: 90 1e 00 20 stw r0,32(r30) <== NOT EXECUTED return 1; ffc078cc: 4b ff ff 5c b ffc07828 <== 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)) { ffc078d0: 70 09 00 40 andi. r9,r0,64 ffc078d4: 41 a2 ff 84 beq- ffc07858 <== ALWAYS TAKEN c = '\r'; ffc078d8: 3b e0 00 0d li r31,13 <== NOT EXECUTED ffc078dc: 4b ff ff 7c b ffc07858 <== NOT EXECUTED { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); ffc078e0: 39 29 00 20 addi r9,r9,32 ffc078e4: 4b ff fe ec b ffc077d0 /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); ffc078e8: 7f e3 fb 78 mr r3,r31 ffc078ec: 7f c4 f3 78 mr r4,r30 ffc078f0: 4b ff fb 4d bl ffc0743c ffc078f4: 81 3e 00 20 lwz r9,32(r30) ffc078f8: 4b ff ff 1c b ffc07814 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); ffc078fc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc07900: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc07904: 4b ff fb 39 bl ffc0743c <== NOT EXECUTED ffc07908: 4b ff ff ac b ffc078b4 <== 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); ffc0790c: 7f c3 f3 78 mr r3,r30 ffc07910: 38 80 00 01 li r4,1 ffc07914: 4b ff fb cd bl ffc074e0 return 0; ffc07918: 38 60 00 00 li r3,0 ffc0791c: 4b ff ff 0c b ffc07828 } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) ffc07920: 70 09 00 48 andi. r9,r0,72 ffc07924: 41 a2 00 10 beq+ ffc07934 <== NEVER TAKEN echo (c, tty); ffc07928: 38 60 00 0a li r3,10 ffc0792c: 7f c4 f3 78 mr r4,r30 ffc07930: 4b ff fb 0d bl ffc0743c tty->cbuf[tty->ccount++] = c; ffc07934: 81 3e 00 20 lwz r9,32(r30) ffc07938: 39 40 00 0a li r10,10 ffc0793c: 81 7e 00 1c lwz r11,28(r30) return 1; ffc07940: 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; ffc07944: 38 09 00 01 addi r0,r9,1 ffc07948: 7d 4b 49 ae stbx r10,r11,r9 ffc0794c: 90 1e 00 20 stw r0,32(r30) return 1; ffc07950: 4b ff fe d8 b ffc07828 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); ffc07954: 7f c3 f3 78 mr r3,r30 ffc07958: 38 80 00 00 li r4,0 ffc0795c: 4b ff fb 85 bl ffc074e0 return 0; ffc07960: 38 60 00 00 li r3,0 ffc07964: 4b ff fe c4 b ffc07828 =============================================================================== ffc1d7d0 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } ffc1d7d0: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc1d7d4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05c70 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc05c70: 94 21 ff f0 stwu r1,-16(r1) ffc05c74: 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())) ffc05c78: 3d 20 00 00 lis r9,0 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc05c7c: 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())) ffc05c80: 80 09 28 04 lwz r0,10244(r9) extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc05c84: 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())) ffc05c88: 2f 80 00 03 cmpwi cr7,r0,3 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc05c8c: 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())) ffc05c90: 41 9e 00 1c beq- cr7,ffc05cac <== ALWAYS TAKEN */ fclose (stdin); fclose (stdout); fclose (stderr); } ffc05c94: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc05c98: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc05c9c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05ca0: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc05ca4: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc05ca8: 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) { ffc05cac: 3f e0 00 00 lis r31,0 ffc05cb0: 3d 20 00 00 lis r9,0 ffc05cb4: 80 1f 27 4c lwz r0,10060(r31) ffc05cb8: 83 c9 27 48 lwz r30,10056(r9) ffc05cbc: 7f 80 f0 00 cmpw cr7,r0,r30 ffc05cc0: 41 9e 00 10 beq- cr7,ffc05cd0 _wrapup_reent(_global_impure_ptr); ffc05cc4: 7f c3 f3 78 mr r3,r30 ffc05cc8: 48 00 df a9 bl ffc13c70 <_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; ffc05ccc: 93 df 27 4c stw r30,10060(r31) * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); ffc05cd0: 80 7e 00 04 lwz r3,4(r30) ffc05cd4: 48 00 d0 15 bl ffc12ce8 fclose (stdout); ffc05cd8: 81 3f 27 4c lwz r9,10060(r31) ffc05cdc: 80 69 00 08 lwz r3,8(r9) ffc05ce0: 48 00 d0 09 bl ffc12ce8 fclose (stderr); ffc05ce4: 81 3f 27 4c lwz r9,10060(r31) ffc05ce8: 80 69 00 0c lwz r3,12(r9) ffc05cec: 48 00 cf fd bl ffc12ce8 } ffc05cf0: 80 01 00 14 lwz r0,20(r1) ffc05cf4: 83 c1 00 08 lwz r30,8(r1) ffc05cf8: 7c 08 03 a6 mtlr r0 ffc05cfc: 83 e1 00 0c lwz r31,12(r1) ffc05d00: 38 21 00 10 addi r1,r1,16 ffc05d04: 4e 80 00 20 blr =============================================================================== ffc055b8 : #include "malloc_p.h" void *malloc( size_t size ) { ffc055b8: 94 21 ff f0 stwu r1,-16(r1) ffc055bc: 7c 08 02 a6 mflr r0 void *return_this; MSBUMP(malloc_calls, 1); ffc055c0: 3d 20 00 00 lis r9,0 #include "malloc_p.h" void *malloc( size_t size ) { ffc055c4: 90 01 00 14 stw r0,20(r1) void *return_this; MSBUMP(malloc_calls, 1); ffc055c8: 39 29 2a e8 addi r9,r9,10984 ffc055cc: 81 69 00 04 lwz r11,4(r9) #include "malloc_p.h" void *malloc( size_t size ) { ffc055d0: 93 c1 00 08 stw r30,8(r1) /* * Validate the parameters */ if ( !size ) return (void *) 0; ffc055d4: 3b c0 00 00 li r30,0 size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); ffc055d8: 39 6b 00 01 addi r11,r11,1 #include "malloc_p.h" void *malloc( size_t size ) { ffc055dc: 93 e1 00 0c stw r31,12(r1) ffc055e0: 7c 7f 1b 78 mr r31,r3 void *return_this; MSBUMP(malloc_calls, 1); ffc055e4: 91 69 00 04 stw r11,4(r9) /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); ffc055e8: 4b ff fe 45 bl ffc0542c /* * Validate the parameters */ if ( !size ) ffc055ec: 2f 9f 00 00 cmpwi cr7,r31,0 ffc055f0: 41 9e 00 74 beq- cr7,ffc05664 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc055f4: 3d 20 00 00 lis r9,0 ffc055f8: 80 09 28 04 lwz r0,10244(r9) ffc055fc: 2f 80 00 03 cmpwi cr7,r0,3 ffc05600: 41 9e 00 80 beq- cr7,ffc05680 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc05604: 3d 20 00 00 lis r9,0 ffc05608: 80 69 26 ec lwz r3,9964(r9) ffc0560c: 7f e4 fb 78 mr r4,r31 ffc05610: 38 a0 00 00 li r5,0 ffc05614: 38 c0 00 00 li r6,0 ffc05618: 48 00 60 cd bl ffc0b6e4 <_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 ) { ffc0561c: 7c 7e 1b 79 mr. r30,r3 ffc05620: 41 82 00 8c beq- ffc056ac <== NEVER TAKEN } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) ffc05624: 3d 20 00 00 lis r9,0 ffc05628: 80 09 27 60 lwz r0,10080(r9) ffc0562c: 2f 80 00 00 cmpwi cr7,r0,0 ffc05630: 41 9e 00 14 beq- cr7,ffc05644 (*rtems_malloc_dirty_helper)( return_this, size ); ffc05634: 7f c3 f3 78 mr r3,r30 ffc05638: 7c 09 03 a6 mtctr r0 ffc0563c: 7f e4 fb 78 mr r4,r31 ffc05640: 4e 80 04 21 bctrl /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc05644: 3d 20 00 00 lis r9,0 ffc05648: 81 29 27 68 lwz r9,10088(r9) ffc0564c: 2f 89 00 00 cmpwi cr7,r9,0 ffc05650: 41 9e 00 14 beq- cr7,ffc05664 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); ffc05654: 80 09 00 04 lwz r0,4(r9) ffc05658: 7f c3 f3 78 mr r3,r30 ffc0565c: 7c 09 03 a6 mtctr r0 ffc05660: 4e 80 04 21 bctrl return return_this; } ffc05664: 80 01 00 14 lwz r0,20(r1) ffc05668: 7f c3 f3 78 mr r3,r30 ffc0566c: 83 e1 00 0c lwz r31,12(r1) ffc05670: 7c 08 03 a6 mtlr r0 ffc05674: 83 c1 00 08 lwz r30,8(r1) ffc05678: 38 21 00 10 addi r1,r1,16 ffc0567c: 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() ) ffc05680: 4b ff fd 65 bl ffc053e4 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc05684: 2f 83 00 00 cmpwi cr7,r3,0 ffc05688: 41 be ff dc beq- cr7,ffc05664 <== NEVER TAKEN ffc0568c: 3d 20 00 00 lis r9,0 ffc05690: 80 69 26 ec lwz r3,9964(r9) ffc05694: 7f e4 fb 78 mr r4,r31 ffc05698: 38 a0 00 00 li r5,0 ffc0569c: 38 c0 00 00 li r6,0 ffc056a0: 48 00 60 45 bl ffc0b6e4 <_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 ) { ffc056a4: 7c 7e 1b 79 mr. r30,r3 ffc056a8: 40 82 ff 7c bne+ ffc05624 if (rtems_malloc_sbrk_helpers) ffc056ac: 3d 20 00 00 lis r9,0 ffc056b0: 81 29 27 64 lwz r9,10084(r9) ffc056b4: 2f 89 00 00 cmpwi cr7,r9,0 ffc056b8: 41 9e 00 24 beq- cr7,ffc056dc return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); ffc056bc: 80 09 00 04 lwz r0,4(r9) ffc056c0: 7f e3 fb 78 mr r3,r31 ffc056c4: 7c 09 03 a6 mtctr r0 ffc056c8: 4e 80 04 21 bctrl if ( !return_this ) { ffc056cc: 2c 03 00 00 cmpwi r3,0 ffc056d0: 41 82 00 0c beq- ffc056dc <== ALWAYS TAKEN ffc056d4: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ffc056d8: 4b ff ff 4c b ffc05624 <== NOT EXECUTED errno = ENOMEM; ffc056dc: 48 00 d4 81 bl ffc12b5c <__errno> ffc056e0: 38 00 00 0c li r0,12 ffc056e4: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc056e8: 4b ff ff 7c b ffc05664 =============================================================================== ffc0530c : * 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; ffc0530c: 3d 20 00 00 lis r9,0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc05310: 94 21 ff e8 stwu r1,-24(r1) ffc05314: 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; ffc05318: 81 29 27 9c lwz r9,10140(r9) } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc0531c: 93 a1 00 0c stw r29,12(r1) ffc05320: 7c 7d 1b 78 mr r29,r3 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) ffc05324: 2f 89 00 00 cmpwi cr7,r9,0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc05328: 93 c1 00 10 stw r30,16(r1) */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; ffc0532c: 3b c0 00 00 li r30,0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc05330: 90 01 00 1c stw r0,28(r1) ffc05334: 93 81 00 08 stw r28,8(r1) ffc05338: 93 e1 00 14 stw r31,20(r1) * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) ffc0533c: 41 9e 00 64 beq- cr7,ffc053a0 <== NEVER TAKEN return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); ffc05340: 7f e3 4a 14 add r31,r3,r9 ffc05344: 7f ff 4b 96 divwu r31,r31,r9 ffc05348: 7f ff 49 d6 mullw r31,r31,r9 starting_address = (void *) sbrk(the_size); ffc0534c: 7f e3 fb 78 mr r3,r31 ffc05350: 4b ff b0 a5 bl ffc003f4 if ( starting_address == (void*) -1 ) ffc05354: 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); ffc05358: 7c 64 1b 78 mr r4,r3 if ( starting_address == (void*) -1 ) ffc0535c: 41 9e 00 44 beq- cr7,ffc053a0 return (void *) 0; if ( !_Protected_heap_Extend( ffc05360: 3f 80 00 00 lis r28,0 ffc05364: 80 7c 26 cc lwz r3,9932(r28) ffc05368: 7f e5 fb 78 mr r5,r31 ffc0536c: 48 00 60 35 bl ffc0b3a0 <_Protected_heap_Extend> ffc05370: 2f 83 00 00 cmpwi cr7,r3,0 ffc05374: 41 9e 00 50 beq- cr7,ffc053c4 sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); ffc05378: 3d 20 00 00 lis r9,0 ffc0537c: 80 7c 26 cc lwz r3,9932(r28) ffc05380: 80 09 2c 28 lwz r0,11304(r9) ffc05384: 7f a4 eb 78 mr r4,r29 ffc05388: 38 a0 00 00 li r5,0 ffc0538c: 7c 1f 02 14 add r0,r31,r0 ffc05390: 38 c0 00 00 li r6,0 ffc05394: 90 09 2c 28 stw r0,11304(r9) ffc05398: 48 00 5f 9d bl ffc0b334 <_Protected_heap_Allocate_aligned_with_boundary> ffc0539c: 7c 7e 1b 78 mr r30,r3 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } ffc053a0: 80 01 00 1c lwz r0,28(r1) ffc053a4: 7f c3 f3 78 mr r3,r30 ffc053a8: 83 81 00 08 lwz r28,8(r1) ffc053ac: 7c 08 03 a6 mtlr r0 ffc053b0: 83 a1 00 0c lwz r29,12(r1) ffc053b4: 83 c1 00 10 lwz r30,16(r1) ffc053b8: 83 e1 00 14 lwz r31,20(r1) ffc053bc: 38 21 00 18 addi r1,r1,24 ffc053c0: 4e 80 00 20 blr if ( starting_address == (void*) -1 ) return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); ffc053c4: 7c 7f 00 d0 neg r3,r31 ffc053c8: 4b ff b0 2d bl ffc003f4 errno = ENOMEM; ffc053cc: 48 00 d6 e1 bl ffc12aac <__errno> ffc053d0: 38 00 00 0c li r0,12 ffc053d4: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc053d8: 4b ff ff c8 b ffc053a0 =============================================================================== ffc053dc : * If the starting address is 0 then we are to attempt to * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { ffc053dc: 2c 03 00 00 cmpwi r3,0 void *malloc_sbrk_initialize( void *starting_address, size_t length ) { ffc053e0: 94 21 ff f8 stwu r1,-8(r1) ffc053e4: 7c 08 02 a6 mflr r0 uintptr_t old_address; uintptr_t uaddress; RTEMS_Malloc_Sbrk_amount = length; ffc053e8: 3d 20 00 00 lis r9,0 ffc053ec: 90 89 27 9c stw r4,10140(r9) void *malloc_sbrk_initialize( void *starting_address, size_t length ) { ffc053f0: 90 01 00 0c stw r0,12(r1) * If the starting address is 0 then we are to attempt to * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { ffc053f4: 41 82 00 14 beq- ffc05408 } starting_address = (void *)uaddress; } return starting_address; } ffc053f8: 80 01 00 0c lwz r0,12(r1) ffc053fc: 38 21 00 08 addi r1,r1,8 ffc05400: 7c 08 03 a6 mtlr r0 ffc05404: 4e 80 00 20 blr * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { uaddress = (uintptr_t)sbrk(length); ffc05408: 7c 83 23 78 mr r3,r4 ffc0540c: 4b ff af e9 bl ffc003f4 if (uaddress == (uintptr_t) -1) { ffc05410: 2f 83 ff ff cmpwi cr7,r3,-1 ffc05414: 41 9e 00 18 beq- cr7,ffc0542c <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { ffc05418: 70 60 00 07 andi. r0,r3,7 <== NOT EXECUTED ffc0541c: 41 a2 ff dc beq- ffc053f8 <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); ffc05420: 38 63 00 08 addi r3,r3,8 <== NOT EXECUTED ffc05424: 54 63 00 38 rlwinm r3,r3,0,0,28 <== NOT EXECUTED ffc05428: 4b ff ff d0 b ffc053f8 <== NOT EXECUTED if (!starting_address) { uaddress = (uintptr_t)sbrk(length); if (uaddress == (uintptr_t) -1) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); ffc0542c: 38 60 00 1a li r3,26 ffc05430: 48 00 45 5d bl ffc0998c =============================================================================== ffc112cc : */ void memfile_free_blocks_in_table( block_p **block_table, int entries ) { ffc112cc: 94 21 ff e0 stwu r1,-32(r1) ffc112d0: 7c 08 02 a6 mflr r0 ffc112d4: 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( ffc112fc: 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] ); ffc11318: 4b ff ff 85 bl ffc1129c b[i] = 0; ffc1131c: 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 ffc11328: 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 ); ffc1132c: 4b ff ff 71 bl ffc1129c *block_table = 0; ffc11330: 38 00 00 00 li r0,0 ffc11334: 90 1b 00 00 stw r0,0(r27) } ffc11338: 80 01 00 24 lwz r0,36(r1) ffc1133c: 83 61 00 0c lwz r27,12(r1) ffc11340: 7c 08 03 a6 mtlr r0 ffc11344: 83 81 00 10 lwz r28,16(r1) ffc11348: 83 a1 00 14 lwz r29,20(r1) ffc1134c: 83 c1 00 18 lwz r30,24(r1) ffc11350: 83 e1 00 1c lwz r31,28(r1) ffc11354: 38 21 00 20 addi r1,r1,32 ffc11358: 4e 80 00 20 blr =============================================================================== ffc11ad4 : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { ffc11ad4: 94 21 ff e0 stwu r1,-32(r1) ffc11ad8: 7c 08 02 a6 mflr r0 ffc11adc: 7c 69 1b 78 mr r9,r3 ffc11ae0: 90 01 00 24 stw r0,36(r1) ffc11ae4: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc11ae8: 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 ) ffc11aec: 80 1f 00 50 lwz r0,80(r31) ffc11af0: 7f 80 28 00 cmpw cr7,r0,r5 ffc11af4: 41 9c 00 50 blt- cr7,ffc11b44 <== NEVER TAKEN ffc11af8: 41 9e 00 40 beq- cr7,ffc11b38 /* * 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; ffc11afc: 90 bf 00 50 stw r5,80(r31) iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); ffc11b00: 38 61 00 08 addi r3,r1,8 ffc11b04: 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; ffc11b08: 90 df 00 54 stw r6,84(r31) iop->size = the_jnode->info.file.size; ffc11b0c: 90 a9 00 08 stw r5,8(r9) ffc11b10: 90 c9 00 0c stw r6,12(r9) IMFS_update_atime( the_jnode ); ffc11b14: 4b ff 37 51 bl ffc05264 ffc11b18: 80 01 00 08 lwz r0,8(r1) return 0; ffc11b1c: 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 ); ffc11b20: 90 1f 00 40 stw r0,64(r31) return 0; } ffc11b24: 80 01 00 24 lwz r0,36(r1) ffc11b28: 83 e1 00 1c lwz r31,28(r1) ffc11b2c: 38 21 00 20 addi r1,r1,32 ffc11b30: 7c 08 03 a6 mtlr r0 ffc11b34: 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 ) ffc11b38: 80 1f 00 54 lwz r0,84(r31) ffc11b3c: 7f 80 30 40 cmplw cr7,r0,r6 ffc11b40: 40 9c ff bc bge+ cr7,ffc11afc return IMFS_memfile_extend( the_jnode, length ); ffc11b44: 7f e3 fb 78 mr r3,r31 ffc11b48: 4b ff f9 fd bl ffc11544 iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } ffc11b4c: 80 01 00 24 lwz r0,36(r1) ffc11b50: 83 e1 00 1c lwz r31,28(r1) ffc11b54: 38 21 00 20 addi r1,r1,32 ffc11b58: 7c 08 03 a6 mtlr r0 ffc11b5c: 4e 80 00 20 blr =============================================================================== ffc11b60 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc11b60: 94 21 ff f0 stwu r1,-16(r1) ffc11b64: 7c 08 02 a6 mflr r0 ffc11b68: 90 01 00 14 stw r0,20(r1) ffc11b6c: 93 c1 00 08 stw r30,8(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc11b70: 83 c3 00 1c lwz r30,28(r3) rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc11b74: 93 e1 00 0c stw r31,12(r1) ffc11b78: 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) { ffc11b7c: 80 1e 00 4c lwz r0,76(r30) ffc11b80: 2f 80 00 06 cmpwi cr7,r0,6 ffc11b84: 41 9e 00 54 beq- cr7,ffc11bd8 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 )) ffc11b88: 80 a3 00 10 lwz r5,16(r3) ffc11b8c: 80 c3 00 14 lwz r6,20(r3) ffc11b90: 7f c3 f3 78 mr r3,r30 ffc11b94: 4b ff f9 b1 bl ffc11544 ffc11b98: 2f 83 00 00 cmpwi cr7,r3,0 ffc11b9c: 40 9e 00 90 bne- cr7,ffc11c2c rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; ffc11ba0: 81 1e 00 50 lwz r8,80(r30) ffc11ba4: 81 3e 00 54 lwz r9,84(r30) ffc11ba8: 81 5f 00 10 lwz r10,16(r31) ffc11bac: 81 7f 00 14 lwz r11,20(r31) ffc11bb0: 91 1f 00 08 stw r8,8(r31) ffc11bb4: 91 3f 00 0c stw r9,12(r31) } return iop->offset; } ffc11bb8: 80 01 00 14 lwz r0,20(r1) ffc11bbc: 7d 43 53 78 mr r3,r10 ffc11bc0: 7d 64 5b 78 mr r4,r11 ffc11bc4: 83 c1 00 08 lwz r30,8(r1) ffc11bc8: 7c 08 03 a6 mtlr r0 ffc11bcc: 83 e1 00 0c lwz r31,12(r1) ffc11bd0: 38 21 00 10 addi r1,r1,16 ffc11bd4: 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) ffc11bd8: 81 43 00 10 lwz r10,16(r3) ffc11bdc: 80 1e 00 50 lwz r0,80(r30) ffc11be0: 81 63 00 14 lwz r11,20(r3) ffc11be4: 7f 8a 00 00 cmpw cr7,r10,r0 ffc11be8: 81 3e 00 54 lwz r9,84(r30) ffc11bec: 41 9d 00 10 bgt- cr7,ffc11bfc <== NEVER TAKEN ffc11bf0: 40 be ff c8 bne- cr7,ffc11bb8 <== NEVER TAKEN ffc11bf4: 7f 8b 48 40 cmplw cr7,r11,r9 ffc11bf8: 40 bd ff c0 ble- cr7,ffc11bb8 <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; ffc11bfc: 7c 0a 03 78 mr r10,r0 <== NOT EXECUTED ffc11c00: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED ffc11c04: 7d 2b 4b 78 mr r11,r9 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } ffc11c08: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc11c0c: 7d 43 53 78 mr r3,r10 <== NOT EXECUTED the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; ffc11c10: 91 3f 00 14 stw r9,20(r31) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } ffc11c14: 7d 64 5b 78 mr r4,r11 <== NOT EXECUTED ffc11c18: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc11c1c: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc11c20: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc11c24: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc11c28: 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 ); ffc11c2c: 48 00 0f 31 bl ffc12b5c <__errno> ffc11c30: 38 00 00 1c li r0,28 ffc11c34: 90 03 00 00 stw r0,0(r3) ffc11c38: 39 40 ff ff li r10,-1 ffc11c3c: 39 60 ff ff li r11,-1 ffc11c40: 4b ff ff 78 b ffc11bb8 =============================================================================== ffc119f4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc119f4: 94 21 ff f0 stwu r1,-16(r1) ffc119f8: 7c 08 02 a6 mflr r0 ffc119fc: 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)) ffc11a00: 80 03 00 18 lwz r0,24(r3) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc11a04: 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)) ffc11a08: 70 09 02 04 andi. r9,r0,516 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc11a0c: 93 e1 00 0c stw r31,12(r1) ffc11a10: 7c 7f 1b 78 mr r31,r3 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc11a14: 83 c3 00 1c lwz r30,28(r3) /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc11a18: 41 82 00 10 beq- ffc11a28 && (the_jnode->type == IMFS_LINEAR_FILE)) { ffc11a1c: 81 3e 00 4c lwz r9,76(r30) ffc11a20: 2f 89 00 06 cmpwi cr7,r9,6 ffc11a24: 41 9e 00 4c beq- cr7,ffc11a70 <== 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)) ffc11a28: 81 5e 00 50 lwz r10,80(r30) ffc11a2c: 81 7e 00 54 lwz r11,84(r30) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) ffc11a30: 70 09 02 00 andi. r9,r0,512 ffc11a34: 40 82 00 28 bne- ffc11a5c iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; ffc11a38: 91 5f 00 08 stw r10,8(r31) return 0; ffc11a3c: 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; ffc11a40: 91 7f 00 0c stw r11,12(r31) return 0; } ffc11a44: 80 01 00 14 lwz r0,20(r1) ffc11a48: 83 c1 00 08 lwz r30,8(r1) ffc11a4c: 7c 08 03 a6 mtlr r0 ffc11a50: 83 e1 00 0c lwz r31,12(r1) ffc11a54: 38 21 00 10 addi r1,r1,16 ffc11a58: 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; ffc11a5c: 91 5f 00 10 stw r10,16(r31) ffc11a60: 91 7f 00 14 stw r11,20(r31) ffc11a64: 81 5e 00 50 lwz r10,80(r30) ffc11a68: 81 7e 00 54 lwz r11,84(r30) ffc11a6c: 4b ff ff cc b ffc11a38 /* * 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; ffc11a70: 81 1e 00 54 lwz r8,84(r30) <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; ffc11a74: 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; ffc11a78: 39 20 00 05 li r9,5 <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; ffc11a7c: 80 fe 00 58 lwz r7,88(r30) <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) ffc11a80: 2f 88 00 00 cmpwi cr7,r8,0 <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; ffc11a84: 91 3e 00 4c stw r9,76(r30) <== NOT EXECUTED the_jnode->info.file.size = 0; ffc11a88: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc11a8c: 39 60 00 00 li r11,0 <== NOT EXECUTED ffc11a90: 91 5e 00 50 stw r10,80(r30) <== NOT EXECUTED ffc11a94: 91 7e 00 54 stw r11,84(r30) <== NOT EXECUTED the_jnode->info.file.indirect = 0; ffc11a98: 90 1e 00 58 stw r0,88(r30) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; ffc11a9c: 90 1e 00 5c stw r0,92(r30) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; ffc11aa0: 90 1e 00 60 stw r0,96(r30) <== NOT EXECUTED if ((count != 0) ffc11aa4: 40 9e 00 0c bne- cr7,ffc11ab0 <== NOT EXECUTED ffc11aa8: 80 03 00 18 lwz r0,24(r3) <== NOT EXECUTED ffc11aac: 4b ff ff 84 b ffc11a30 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) ffc11ab0: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc11ab4: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc11ab8: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc11abc: 4b ff fc 85 bl ffc11740 <== NOT EXECUTED ffc11ac0: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED return -1; ffc11ac4: 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)) ffc11ac8: 41 be ff 7c beq- cr7,ffc11a44 <== NOT EXECUTED ffc11acc: 80 1f 00 18 lwz r0,24(r31) <== NOT EXECUTED ffc11ad0: 4b ff ff 58 b ffc11a28 <== NOT EXECUTED =============================================================================== ffc05718 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { ffc05718: 94 21 ff c8 stwu r1,-56(r1) ffc0571c: 7c 08 02 a6 mflr r0 ffc05720: 90 01 00 3c stw r0,60(r1) int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) ffc05724: 54 80 04 26 rlwinm r0,r4,0,16,19 ffc05728: 2f 80 40 00 cmpwi cr7,r0,16384 int mknod( const char *pathname, mode_t mode, dev_t dev ) { ffc0572c: 93 81 00 28 stw r28,40(r1) ffc05730: 7c bc 2b 78 mr r28,r5 ffc05734: 93 a1 00 2c stw r29,44(r1) ffc05738: 7c dd 33 78 mr r29,r6 ffc0573c: 93 c1 00 30 stw r30,48(r1) ffc05740: 7c 9e 23 78 mr r30,r4 ffc05744: 93 e1 00 34 stw r31,52(r1) ffc05748: 7c 7f 1b 78 mr r31,r3 int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) ffc0574c: 41 9e 00 44 beq- cr7,ffc05790 ffc05750: 2b 80 40 00 cmplwi cr7,r0,16384 ffc05754: 40 9d 00 2c ble- cr7,ffc05780 ffc05758: 2f 80 60 00 cmpwi cr7,r0,24576 ffc0575c: 41 9e 00 34 beq- cr7,ffc05790 ffc05760: 6c 09 ff ff xoris r9,r0,65535 ffc05764: 2f 89 80 00 cmpwi cr7,r9,-32768 ffc05768: 41 9e 00 28 beq- cr7,ffc05790 <== ALWAYS TAKEN case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc0576c: 48 00 d3 f1 bl ffc12b5c <__errno> ffc05770: 38 00 00 16 li r0,22 ffc05774: 90 03 00 00 stw r0,0(r3) ffc05778: 3b e0 ff ff li r31,-1 ffc0577c: 48 00 00 80 b ffc057fc int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) ffc05780: 2f 80 10 00 cmpwi cr7,r0,4096 ffc05784: 41 9e 00 0c beq- cr7,ffc05790 ffc05788: 2f 80 20 00 cmpwi cr7,r0,8192 ffc0578c: 40 9e ff e0 bne+ cr7,ffc0576c break; default: rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); ffc05790: 7f e3 fb 78 mr r3,r31 ffc05794: 38 81 00 0c addi r4,r1,12 ffc05798: 38 a1 00 10 addi r5,r1,16 ffc0579c: 48 00 0c 95 bl ffc06430 result = (*temp_loc.ops->evalformake_h)( ffc057a0: 81 21 00 1c lwz r9,28(r1) ffc057a4: 80 61 00 0c lwz r3,12(r1) ffc057a8: 38 81 00 10 addi r4,r1,16 ffc057ac: 80 09 00 04 lwz r0,4(r9) ffc057b0: 38 a1 00 08 addi r5,r1,8 ffc057b4: 7c 7f 1a 14 add r3,r31,r3 ffc057b8: 7c 09 03 a6 mtctr r0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) return -1; ffc057bc: 3b e0 ff ff li r31,-1 rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); result = (*temp_loc.ops->evalformake_h)( ffc057c0: 4e 80 04 21 bctrl &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) ffc057c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc057c8: 40 9e 00 34 bne- cr7,ffc057fc return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); ffc057cc: 81 21 00 1c lwz r9,28(r1) ffc057d0: 7f c4 f3 78 mr r4,r30 ffc057d4: 80 61 00 08 lwz r3,8(r1) ffc057d8: 7f 85 e3 78 mr r5,r28 ffc057dc: 80 09 00 14 lwz r0,20(r9) ffc057e0: 7f a6 eb 78 mr r6,r29 ffc057e4: 38 e1 00 10 addi r7,r1,16 ffc057e8: 7c 09 03 a6 mtctr r0 ffc057ec: 4e 80 04 21 bctrl ffc057f0: 7c 7f 1b 78 mr r31,r3 rtems_filesystem_freenode( &temp_loc ); ffc057f4: 38 61 00 10 addi r3,r1,16 ffc057f8: 4b ff f9 79 bl ffc05170 return result; } ffc057fc: 80 01 00 3c lwz r0,60(r1) ffc05800: 7f e3 fb 78 mr r3,r31 ffc05804: 83 81 00 28 lwz r28,40(r1) ffc05808: 7c 08 03 a6 mtlr r0 ffc0580c: 83 a1 00 2c lwz r29,44(r1) ffc05810: 83 c1 00 30 lwz r30,48(r1) ffc05814: 83 e1 00 34 lwz r31,52(r1) ffc05818: 38 21 00 38 addi r1,r1,56 ffc0581c: 4e 80 00 20 blr =============================================================================== ffc058ec : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc058ec: 7d 80 00 26 mfcr r12 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && ffc058f0: 2b 86 00 01 cmplwi cr7,r6,1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc058f4: 94 21 ff a0 stwu r1,-96(r1) ffc058f8: 7c 08 02 a6 mflr r0 ffc058fc: 93 01 00 40 stw r24,64(r1) ffc05900: 7c b8 2b 78 mr r24,r5 ffc05904: 93 41 00 48 stw r26,72(r1) ffc05908: 7c da 33 78 mr r26,r6 ffc0590c: 93 61 00 4c stw r27,76(r1) ffc05910: 7c 7b 1b 78 mr r27,r3 ffc05914: 93 81 00 50 stw r28,80(r1) ffc05918: 7c 9c 23 78 mr r28,r4 ffc0591c: 93 c1 00 58 stw r30,88(r1) ffc05920: 7c fe 3b 78 mr r30,r7 ffc05924: 90 01 00 64 stw r0,100(r1) ffc05928: 92 61 00 2c stw r19,44(r1) ffc0592c: 92 81 00 30 stw r20,48(r1) ffc05930: 92 a1 00 34 stw r21,52(r1) ffc05934: 92 c1 00 38 stw r22,56(r1) ffc05938: 92 e1 00 3c stw r23,60(r1) ffc0593c: 93 21 00 44 stw r25,68(r1) ffc05940: 93 a1 00 54 stw r29,84(r1) ffc05944: 93 e1 00 5c stw r31,92(r1) ffc05948: 91 81 00 28 stw r12,40(r1) /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && ffc0594c: 41 9d 02 38 bgt- cr7,ffc05b84 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); ffc05950: 7c a3 2b 78 mr r3,r5 ffc05954: 48 00 9f 35 bl ffc0f888 if ( !mount_h ) ffc05958: 7c 7d 1b 79 mr. r29,r3 ffc0595c: 41 82 02 28 beq- ffc05b84 { 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; ffc05960: 7f 80 00 34 cntlzw r0,r28 ffc05964: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc05968: 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 : "/"; ffc0596c: 2e 00 00 00 cmpwi cr4,r0,0 ffc05970: 41 92 02 00 beq- cr4,ffc05b70 * 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( ffc05974: 7f 83 e3 78 mr r3,r28 ffc05978: 48 00 eb 11 bl ffc14488 ffc0597c: 7f 93 e3 78 mr r19,r28 ffc05980: 7c 74 1b 78 mr r20,r3 ffc05984: 3a c3 00 01 addi r22,r3,1 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; ffc05988: 7f 03 c3 78 mr r3,r24 ffc0598c: 48 00 ea fd bl ffc14488 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; ffc05990: 2f 9b 00 00 cmpwi cr7,r27,0 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; ffc05994: 7c 75 1b 78 mr r21,r3 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; ffc05998: 3b 20 00 00 li r25,0 ffc0599c: 41 9e 00 10 beq- cr7,ffc059ac ffc059a0: 7f 63 db 78 mr r3,r27 ffc059a4: 48 00 ea e5 bl ffc14488 ffc059a8: 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; ffc059ac: 7c 95 b2 14 add r4,r21,r22 ffc059b0: 38 84 00 75 addi r4,r4,117 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); ffc059b4: 38 60 00 01 li r3,1 ffc059b8: 7c 84 ca 14 add r4,r4,r25 ffc059bc: 4b ff f1 dd bl ffc04b98 if ( mt_entry != NULL ) { ffc059c0: 7c 7f 1b 79 mr. r31,r3 ffc059c4: 41 82 01 98 beq- ffc05b5c <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); ffc059c8: 3a ff 00 74 addi r23,r31,116 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; ffc059cc: 3a b5 00 01 addi r21,r21,1 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); ffc059d0: 7f 04 c3 78 mr r4,r24 ffc059d4: 7e a5 ab 78 mr r5,r21 ffc059d8: 7e e3 bb 78 mr r3,r23 ffc059dc: 48 00 de bd bl ffc13898 mt_entry->type = str; str += filesystemtype_size; ffc059e0: 7f 17 aa 14 add r24,r23,r21 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; ffc059e4: 92 ff 00 6c stw r23,108(r31) str += filesystemtype_size; memcpy( str, source_or_null, source_size ); ffc059e8: 7f 25 cb 78 mr r5,r25 ffc059ec: 7f 64 db 78 mr r4,r27 ffc059f0: 7f 03 c3 78 mr r3,r24 ffc059f4: 48 00 de a5 bl ffc13898 mt_entry->dev = str; str += source_size; ffc059f8: 7f 38 ca 14 add r25,r24,r25 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; ffc059fc: 93 1f 00 70 stw r24,112(r31) str += source_size; memcpy( str, target, target_size ); ffc05a00: 7e 64 9b 78 mr r4,r19 ffc05a04: 7e c5 b3 78 mr r5,r22 ffc05a08: 7f 23 cb 78 mr r3,r25 ffc05a0c: 48 00 de 8d bl ffc13898 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; ffc05a10: 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; ffc05a14: 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; ffc05a18: 38 7f 00 38 addi r3,r31,56 ffc05a1c: 38 84 f4 10 addi r4,r4,-3056 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; ffc05a20: 93 ff 00 2c stw r31,44(r31) mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; ffc05a24: 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; ffc05a28: 93 5f 00 30 stw r26,48(r31) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; ffc05a2c: 48 00 de 6d bl ffc13898 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { ffc05a30: 40 92 00 80 bne- cr4,ffc05ab0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc05a34: 3d 20 00 00 lis r9,0 ffc05a38: 39 69 21 a4 addi r11,r9,8612 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { ffc05a3c: 81 29 21 a4 lwz r9,8612(r9) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc05a40: 38 0b 00 04 addi r0,r11,4 ffc05a44: 7f 89 00 00 cmpw cr7,r9,r0 ffc05a48: 41 9e 00 c0 beq- cr7,ffc05b08 <== ALWAYS TAKEN errno = EINVAL; ffc05a4c: 48 00 d1 11 bl ffc12b5c <__errno> <== NOT EXECUTED ffc05a50: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc05a54: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); ffc05a58: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05a5c: 4b ff f7 41 bl ffc0519c <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; ffc05a60: 38 60 ff ff li r3,-1 <== NOT EXECUTED } ffc05a64: 80 01 00 64 lwz r0,100(r1) ffc05a68: 81 81 00 28 lwz r12,40(r1) ffc05a6c: 7c 08 03 a6 mtlr r0 ffc05a70: 82 61 00 2c lwz r19,44(r1) ffc05a74: 82 81 00 30 lwz r20,48(r1) ffc05a78: 7d 80 81 20 mtcrf 8,r12 ffc05a7c: 82 a1 00 34 lwz r21,52(r1) ffc05a80: 82 c1 00 38 lwz r22,56(r1) ffc05a84: 82 e1 00 3c lwz r23,60(r1) ffc05a88: 83 01 00 40 lwz r24,64(r1) ffc05a8c: 83 21 00 44 lwz r25,68(r1) ffc05a90: 83 41 00 48 lwz r26,72(r1) ffc05a94: 83 61 00 4c lwz r27,76(r1) ffc05a98: 83 81 00 50 lwz r28,80(r1) ffc05a9c: 83 a1 00 54 lwz r29,84(r1) ffc05aa0: 83 c1 00 58 lwz r30,88(r1) ffc05aa4: 83 e1 00 5c lwz r31,92(r1) ffc05aa8: 38 21 00 60 addi r1,r1,96 ffc05aac: 4e 80 00 20 blr * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( ffc05ab0: 7f 83 e3 78 mr r3,r28 ffc05ab4: 7e 84 a3 78 mr r4,r20 ffc05ab8: 38 a0 00 07 li r5,7 ffc05abc: 38 c1 00 08 addi r6,r1,8 ffc05ac0: 38 e0 00 01 li r7,1 ffc05ac4: 4b ff f5 51 bl ffc05014 ffc05ac8: 2f 83 ff ff cmpwi cr7,r3,-1 ffc05acc: 41 be ff 8c beq- cr7,ffc05a58 <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { ffc05ad0: 81 21 00 14 lwz r9,20(r1) ffc05ad4: 38 61 00 08 addi r3,r1,8 ffc05ad8: 80 09 00 10 lwz r0,16(r9) ffc05adc: 7c 09 03 a6 mtctr r0 ffc05ae0: 4e 80 04 21 bctrl ffc05ae4: 2f 83 00 01 cmpwi cr7,r3,1 ffc05ae8: 41 9e 01 20 beq- cr7,ffc05c08 errno = ENOTDIR; ffc05aec: 48 00 d0 71 bl ffc12b5c <__errno> ffc05af0: 38 00 00 14 li r0,20 ffc05af4: 90 03 00 00 stw r0,0(r3) return 0; cleanup_and_bail: free( mt_entry ); ffc05af8: 7f e3 fb 78 mr r3,r31 ffc05afc: 4b ff f6 a1 bl ffc0519c ffc05b00: 3b 81 00 08 addi r28,r1,8 ffc05b04: 48 00 00 48 b ffc05b4c ) { 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; ffc05b08: 3b 80 00 00 li r28,0 * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { ffc05b0c: 7f e3 fb 78 mr r3,r31 ffc05b10: 7f a9 03 a6 mtctr r29 ffc05b14: 7f c4 f3 78 mr r4,r30 ffc05b18: 4e 80 04 21 bctrl ffc05b1c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05b20: 41 9e 00 78 beq- cr7,ffc05b98 /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); ffc05b24: 81 21 00 14 lwz r9,20(r1) ffc05b28: 7f e3 fb 78 mr r3,r31 ffc05b2c: 80 09 00 28 lwz r0,40(r9) ffc05b30: 7c 09 03 a6 mtctr r0 ffc05b34: 4e 80 04 21 bctrl return 0; cleanup_and_bail: free( mt_entry ); ffc05b38: 7f e3 fb 78 mr r3,r31 ffc05b3c: 4b ff f6 61 bl ffc0519c if ( loc_to_free ) ffc05b40: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_filesystem_freenode( loc_to_free ); return -1; ffc05b44: 38 60 ff ff li r3,-1 cleanup_and_bail: free( mt_entry ); if ( loc_to_free ) ffc05b48: 41 be ff 1c beq- cr7,ffc05a64 <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); ffc05b4c: 7f 83 e3 78 mr r3,r28 ffc05b50: 4b ff f6 21 bl ffc05170 return -1; ffc05b54: 38 60 ff ff li r3,-1 ffc05b58: 4b ff ff 0c b ffc05a64 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); ffc05b5c: 48 00 d0 01 bl ffc12b5c <__errno> <== NOT EXECUTED ffc05b60: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc05b64: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05b68: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05b6c: 4b ff fe f8 b ffc05a64 <== 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 : "/"; ffc05b70: 3e 60 ff c2 lis r19,-62 ffc05b74: 3a c0 00 02 li r22,2 ffc05b78: 3a 80 00 01 li r20,1 ffc05b7c: 3a 73 ef 20 addi r19,r19,-4320 ffc05b80: 4b ff fe 08 b ffc05988 /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc05b84: 48 00 cf d9 bl ffc12b5c <__errno> ffc05b88: 38 00 00 16 li r0,22 ffc05b8c: 90 03 00 00 stw r0,0(r3) ffc05b90: 38 60 ff ff li r3,-1 ffc05b94: 4b ff fe d0 b ffc05a64 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 ); ffc05b98: 3f c0 00 00 lis r30,0 ffc05b9c: 80 7e 27 b4 lwz r3,10164(r30) ffc05ba0: 38 80 00 00 li r4,0 ffc05ba4: 38 a0 00 00 li r5,0 ffc05ba8: 48 00 38 31 bl ffc093d8 /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); ffc05bac: 3c 60 00 00 lis r3,0 ffc05bb0: 38 63 21 a4 addi r3,r3,8612 ffc05bb4: 7f e4 fb 78 mr r4,r31 ffc05bb8: 48 00 45 d9 bl ffc0a190 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc05bbc: 80 7e 27 b4 lwz r3,10164(r30) ffc05bc0: 48 00 39 a5 bl ffc09564 rtems_libio_unlock(); if ( !has_target ) ffc05bc4: 40 92 00 3c bne- cr4,ffc05c00 rtems_filesystem_root = mt_entry->mt_fs_root; ffc05bc8: 3d 20 00 00 lis r9,0 ffc05bcc: 80 ff 00 1c lwz r7,28(r31) ffc05bd0: 81 29 27 3c lwz r9,10044(r9) return 0; ffc05bd4: 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; ffc05bd8: 81 1f 00 20 lwz r8,32(r31) ffc05bdc: 81 5f 00 24 lwz r10,36(r31) ffc05be0: 81 7f 00 28 lwz r11,40(r31) ffc05be4: 80 1f 00 2c lwz r0,44(r31) ffc05be8: 90 e9 00 18 stw r7,24(r9) ffc05bec: 91 09 00 1c stw r8,28(r9) ffc05bf0: 91 49 00 20 stw r10,32(r9) ffc05bf4: 91 69 00 24 stw r11,36(r9) ffc05bf8: 90 09 00 28 stw r0,40(r9) ffc05bfc: 4b ff fe 68 b ffc05a64 return 0; ffc05c00: 38 60 00 00 li r3,0 ffc05c04: 4b ff fe 60 b ffc05a64 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { ffc05c08: 80 81 00 08 lwz r4,8(r1) ffc05c0c: 3c 60 ff c0 lis r3,-64 ffc05c10: 38 63 58 20 addi r3,r3,22560 ffc05c14: 4b ff fc 21 bl ffc05834 ffc05c18: 2f 83 00 00 cmpwi cr7,r3,0 ffc05c1c: 41 9e 00 14 beq- cr7,ffc05c30 errno = EBUSY; ffc05c20: 48 00 cf 3d bl ffc12b5c <__errno> ffc05c24: 38 00 00 10 li r0,16 ffc05c28: 90 03 00 00 stw r0,0(r3) goto cleanup_and_bail; ffc05c2c: 4b ff fe cc b ffc05af8 * 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; ffc05c30: 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 ) ) { ffc05c34: 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; ffc05c38: 81 21 00 14 lwz r9,20(r1) if ( has_target ) { if ( rtems_filesystem_evaluate_path( target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) goto cleanup_and_bail; loc_to_free = &loc; ffc05c3c: 3b 81 00 08 addi r28,r1,8 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; ffc05c40: 90 1f 00 08 stw r0,8(r31) mt_entry->mt_point_node.handlers = loc.handlers; ffc05c44: 80 01 00 10 lwz r0,16(r1) mt_entry->mt_point_node.ops = loc.ops; ffc05c48: 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; ffc05c4c: 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; ffc05c50: 80 01 00 18 lwz r0,24(r1) ffc05c54: 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 ) ) { ffc05c58: 80 09 00 20 lwz r0,32(r9) ffc05c5c: 7c 09 03 a6 mtctr r0 ffc05c60: 4e 80 04 21 bctrl ffc05c64: 2f 83 00 00 cmpwi cr7,r3,0 ffc05c68: 41 be fe a4 beq- cr7,ffc05b0c <== ALWAYS TAKEN ffc05c6c: 4b ff fe 8c b ffc05af8 <== NOT EXECUTED =============================================================================== ffc05758 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc05758: 94 21 ff e0 stwu r1,-32(r1) ffc0575c: 7c 08 02 a6 mflr r0 ffc05760: 93 e1 00 1c stw r31,28(r1) int rv = -1; if (target != NULL) { ffc05764: 7c 9f 23 79 mr. r31,r4 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc05768: 93 61 00 0c stw r27,12(r1) ffc0576c: 7c bb 2b 78 mr r27,r5 ffc05770: 93 81 00 10 stw r28,16(r1) ffc05774: 7c dc 33 78 mr r28,r6 ffc05778: 93 a1 00 14 stw r29,20(r1) ffc0577c: 7c fd 3b 78 mr r29,r7 ffc05780: 93 c1 00 18 stw r30,24(r1) ffc05784: 7c 7e 1b 78 mr r30,r3 ffc05788: 90 01 00 24 stw r0,36(r1) int rv = -1; if (target != NULL) { ffc0578c: 41 82 00 78 beq- ffc05804 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); ffc05790: 7f e3 fb 78 mr r3,r31 ffc05794: 38 80 01 ff li r4,511 ffc05798: 48 00 0b d9 bl ffc06370 if (rv == 0) { ffc0579c: 2c 03 00 00 cmpwi r3,0 ffc057a0: 41 82 00 28 beq- ffc057c8 <== ALWAYS TAKEN } else { errno = EINVAL; } return rv; } ffc057a4: 80 01 00 24 lwz r0,36(r1) ffc057a8: 83 61 00 0c lwz r27,12(r1) ffc057ac: 7c 08 03 a6 mtlr r0 ffc057b0: 83 81 00 10 lwz r28,16(r1) ffc057b4: 83 a1 00 14 lwz r29,20(r1) ffc057b8: 83 c1 00 18 lwz r30,24(r1) ffc057bc: 83 e1 00 1c lwz r31,28(r1) ffc057c0: 38 21 00 20 addi r1,r1,32 ffc057c4: 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( ffc057c8: 7f c3 f3 78 mr r3,r30 ffc057cc: 7f e4 fb 78 mr r4,r31 ffc057d0: 7f 65 db 78 mr r5,r27 ffc057d4: 7f 86 e3 78 mr r6,r28 ffc057d8: 7f a7 eb 78 mr r7,r29 ffc057dc: 48 00 01 09 bl ffc058e4 } else { errno = EINVAL; } return rv; } 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 options, data ); } } else { errno = EINVAL; ffc05804: 48 00 ce f1 bl ffc126f4 <__errno> ffc05808: 38 00 00 16 li r0,22 ffc0580c: 90 03 00 00 stw r0,0(r3) const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; ffc05810: 38 60 ff ff li r3,-1 ffc05814: 4b ff ff 90 b ffc057a4 =============================================================================== ffc1d8a8 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1d8a8: 94 21 ff 28 stwu r1,-216(r1) ffc1d8ac: 7c 08 02 a6 mflr r0 ffc1d8b0: 7d 80 00 26 mfcr r12 ffc1d8b4: 90 01 00 dc stw r0,220(r1) fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; ffc1d8b8: 38 00 ff ff li r0,-1 int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; ffc1d8bc: 81 23 00 10 lwz r9,16(r3) msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1d8c0: 93 21 00 bc stw r25,188(r1) int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; ffc1d8c4: 3b 20 00 00 li r25,0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1d8c8: 93 41 00 c0 stw r26,192(r1) ffc1d8cc: 7c ba 2b 78 mr r26,r5 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); ffc1d8d0: 38 a0 00 40 li r5,64 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1d8d4: 93 61 00 c4 stw r27,196(r1) ffc1d8d8: 7c db 33 78 mr r27,r6 ffc1d8dc: 93 c1 00 d0 stw r30,208(r1) ffc1d8e0: 7c 9e 23 78 mr r30,r4 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); ffc1d8e4: 38 80 00 00 li r4,0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1d8e8: 93 e1 00 d4 stw r31,212(r1) ffc1d8ec: 7c 7f 1b 78 mr r31,r3 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); ffc1d8f0: 38 61 00 60 addi r3,r1,96 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1d8f4: 91 81 00 ac stw r12,172(r1) ffc1d8f8: 90 01 00 18 stw r0,24(r1) dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; ffc1d8fc: 90 01 00 1c stw r0,28(r1) ffc1d900: 92 c1 00 b0 stw r22,176(r1) *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; /* set up last write date and time */ time_ret = time(NULL); if ( time_ret == -1 ) return -1; ffc1d904: 3a c0 ff ff li r22,-1 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1d908: 92 e1 00 b4 stw r23,180(r1) ffc1d90c: 7d 17 43 78 mr r23,r8 ffc1d910: 93 01 00 b8 stw r24,184(r1) ffc1d914: 93 81 00 c8 stw r28,200(r1) ffc1d918: 93 a1 00 cc stw r29,204(r1) int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; ffc1d91c: 83 9f 00 00 lwz r28,0(r31) mode_t mode, const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; ffc1d920: 83 a9 00 34 lwz r29,52(r9) fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; ffc1d924: 93 21 00 0c stw r25,12(r1) time_t time_ret = 0; uint16_t time_val = 0; ffc1d928: b3 21 00 0a sth r25,10(r1) uint16_t date = 0; ffc1d92c: b3 21 00 08 sth r25,8(r1) static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; ffc1d930: 93 21 00 10 stw r25,16(r1) dir_pos->sname.ofs = 0; ffc1d934: 93 21 00 14 stw r25,20(r1) uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); ffc1d938: 93 21 00 40 stw r25,64(r1) ffc1d93c: 93 21 00 44 stw r25,68(r1) ffc1d940: 93 21 00 48 stw r25,72(r1) ffc1d944: 93 21 00 4c stw r25,76(r1) ffc1d948: 93 21 00 50 stw r25,80(r1) ffc1d94c: 93 21 00 54 stw r25,84(r1) ffc1d950: 93 21 00 58 stw r25,88(r1) ffc1d954: 93 21 00 5c stw r25,92(r1) memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); ffc1d958: 48 00 65 a1 bl ffc23ef8 name_type = msdos_long_to_short (name, name_len, ffc1d95c: 7f 64 db 78 mr r4,r27 ffc1d960: 38 a1 00 40 addi r5,r1,64 ffc1d964: 38 c0 00 0b li r6,11 ffc1d968: 7f 43 d3 78 mr r3,r26 ffc1d96c: 48 00 13 e5 bl ffc1ed50 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; ffc1d970: 38 00 00 00 li r0,0 fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); name_type = msdos_long_to_short (name, name_len, ffc1d974: 7c 78 1b 78 mr r24,r3 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; ffc1d978: 98 01 00 4c stb r0,76(r1) /* set up last write date and time */ time_ret = time(NULL); ffc1d97c: 38 60 00 00 li r3,0 ffc1d980: 48 00 9e 21 bl ffc277a0