=============================================================================== ffc0e17c : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { ffc0e17c: 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; ffc0e180: 81 23 00 10 lwz r9,16(r3) switch( node->type ) { ffc0e184: 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; ffc0e188: 81 29 00 34 lwz r9,52(r9) switch( node->type ) { ffc0e18c: 2b 80 00 07 cmplwi cr7,r0,7 ffc0e190: 41 9d 00 28 bgt- cr7,ffc0e1b8 <== NEVER TAKEN ffc0e194: 3d 60 ff c2 lis r11,-62 ffc0e198: 39 6b 0d 48 addi r11,r11,3400 ffc0e19c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0e1a0: 7c 0b 00 2e lwzx r0,r11,r0 ffc0e1a4: 7d 60 5a 14 add r11,r0,r11 ffc0e1a8: 7d 69 03 a6 mtctr r11 ffc0e1ac: 4e 80 04 20 bctr case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; ffc0e1b0: 80 09 00 0c lwz r0,12(r9) ffc0e1b4: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0e1b8: 38 60 00 00 li r3,0 ffc0e1bc: 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; ffc0e1c0: 80 09 00 08 lwz r0,8(r9) ffc0e1c4: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0e1c8: 38 60 00 00 li r3,0 ffc0e1cc: 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; ffc0e1d0: 3d 20 ff c2 lis r9,-62 ffc0e1d4: 38 09 0d e8 addi r0,r9,3560 ffc0e1d8: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0e1dc: 38 60 00 00 li r3,0 ffc0e1e0: 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; ffc0e1e4: 80 09 00 10 lwz r0,16(r9) ffc0e1e8: 90 03 00 08 stw r0,8(r3) break; } return 0; } ffc0e1ec: 38 60 00 00 li r3,0 ffc0e1f0: 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; ffc0e1f4: 3d 20 ff c2 lis r9,-62 ffc0e1f8: 38 09 0d 78 addi r0,r9,3448 ffc0e1fc: 90 03 00 08 stw r0,8(r3) loc->handlers = fs_info->fifo_handlers; break; } return 0; } ffc0e200: 38 60 00 00 li r3,0 ffc0e204: 4e 80 00 20 blr =============================================================================== ffc0ddd8 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { ffc0ddd8: 94 21 ff d8 stwu r1,-40(r1) ffc0dddc: 7c 08 02 a6 mflr r0 ffc0dde0: 90 01 00 2c stw r0,44(r1) ffc0dde4: 93 e1 00 24 stw r31,36(r1) IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; ffc0dde8: 83 e3 00 00 lwz r31,0(r3) int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { ffc0ddec: 93 a1 00 1c stw r29,28(r1) ffc0ddf0: 7c bd 2b 78 mr r29,r5 ffc0ddf4: 93 c1 00 20 stw r30,32(r1) ffc0ddf8: 7c 9e 23 78 mr r30,r4 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); ffc0ddfc: 48 00 17 65 bl ffc0f560 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) ffc0de00: a0 1f 00 3c lhz r0,60(r31) ffc0de04: 7f 80 18 00 cmpw cr7,r0,r3 ffc0de08: 41 9e 00 0c beq- cr7,ffc0de14 ffc0de0c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0de10: 40 9e 00 40 bne- cr7,ffc0de50 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; ffc0de14: b3 df 00 3c sth r30,60(r31) jnode->st_gid = group; IMFS_update_ctime( jnode ); ffc0de18: 38 61 00 08 addi r3,r1,8 ffc0de1c: 38 80 00 00 li r4,0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; jnode->st_gid = group; ffc0de20: b3 bf 00 3e sth r29,62(r31) IMFS_update_ctime( jnode ); ffc0de24: 4b ff 74 41 bl ffc05264 ffc0de28: 80 01 00 08 lwz r0,8(r1) return 0; ffc0de2c: 38 60 00 00 li r3,0 #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); ffc0de30: 90 1f 00 48 stw r0,72(r31) return 0; } ffc0de34: 80 01 00 2c lwz r0,44(r1) ffc0de38: 83 a1 00 1c lwz r29,28(r1) ffc0de3c: 7c 08 03 a6 mtlr r0 ffc0de40: 83 c1 00 20 lwz r30,32(r1) ffc0de44: 83 e1 00 24 lwz r31,36(r1) ffc0de48: 38 21 00 28 addi r1,r1,40 ffc0de4c: 4e 80 00 20 blr #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); ffc0de50: 48 00 5f 3d bl ffc13d8c <__errno> ffc0de54: 38 00 00 01 li r0,1 ffc0de58: 90 03 00 00 stw r0,0(r3) ffc0de5c: 38 60 ff ff li r3,-1 ffc0de60: 4b ff ff d4 b ffc0de34 =============================================================================== ffc0df10 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0df10: 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 ) ffc0df14: 7c 69 1b 79 mr. r9,r3 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0df18: 94 21 ff e0 stwu r1,-32(r1) ffc0df1c: 7c 08 02 a6 mflr r0 ffc0df20: 93 61 00 0c stw r27,12(r1) /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; ffc0df24: 3b 60 00 00 li r27,0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0df28: 93 81 00 10 stw r28,16(r1) ffc0df2c: 7c fc 3b 78 mr r28,r7 ffc0df30: 93 e1 00 1c stw r31,28(r1) ffc0df34: 7c 9f 23 78 mr r31,r4 ffc0df38: 90 01 00 24 stw r0,36(r1) ffc0df3c: 93 a1 00 14 stw r29,20(r1) ffc0df40: 93 c1 00 18 stw r30,24(r1) ffc0df44: 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 ) ffc0df48: 41 82 00 a4 beq- ffc0dfec <== NEVER TAKEN fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && ffc0df4c: 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; ffc0df50: 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; ffc0df54: 83 a9 00 00 lwz r29,0(r9) fs_info = parent_loc->mt_entry->fs_info; ffc0df58: 83 cb 00 34 lwz r30,52(r11) /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && ffc0df5c: 41 92 00 c0 beq- cr4,ffc0e01c return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); ffc0df60: 3d 20 00 00 lis r9,0 ffc0df64: 81 29 27 7c lwz r9,10108(r9) ffc0df68: 7c a4 2b 78 mr r4,r5 ffc0df6c: 7f e3 fb 78 mr r3,r31 ffc0df70: 80 09 00 2c lwz r0,44(r9) ffc0df74: 7c c5 00 78 andc r5,r6,r0 ffc0df78: 4b ff fe ed bl ffc0de64 if ( !node ) ffc0df7c: 7c 7b 1b 79 mr. r27,r3 ffc0df80: 41 82 00 6c beq- ffc0dfec return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { ffc0df84: 2f 9f 00 01 cmpwi cr7,r31,1 ffc0df88: 41 9e 00 ac beq- cr7,ffc0e034 rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { ffc0df8c: 2f 9f 00 03 cmpwi cr7,r31,3 ffc0df90: 41 9e 00 34 beq- cr7,ffc0dfc4 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { ffc0df94: 2f 9f 00 04 cmpwi cr7,r31,4 ffc0df98: 41 9e 00 2c beq- cr7,ffc0dfc4 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { ffc0df9c: 2f 9f 00 02 cmpwi cr7,r31,2 ffc0dfa0: 41 9e 00 cc beq- cr7,ffc0e06c node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { ffc0dfa4: 2f 9f 00 06 cmpwi cr7,r31,6 ffc0dfa8: 41 9e 00 a8 beq- cr7,ffc0e050 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { ffc0dfac: 2f 9f 00 05 cmpwi cr7,r31,5 ffc0dfb0: 41 9e 00 d0 beq- cr7,ffc0e080 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 ) { ffc0dfb4: 40 b2 00 18 bne+ cr4,ffc0dfcc <== NEVER TAKEN node->info.fifo.pipe = NULL; ffc0dfb8: 38 00 00 00 li r0,0 ffc0dfbc: 90 1b 00 50 stw r0,80(r27) ffc0dfc0: 48 00 00 0c b ffc0dfcc 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; ffc0dfc4: 80 1c 00 00 lwz r0,0(r28) ffc0dfc8: 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; ffc0dfcc: 81 3e 00 04 lwz r9,4(r30) ffc0dfd0: 38 7d 00 50 addi r3,r29,80 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; ffc0dfd4: 93 bb 00 08 stw r29,8(r27) ffc0dfd8: 7f 64 db 78 mr r4,r27 node->st_ino = ++fs_info->ino_count; ffc0dfdc: 38 09 00 01 addi r0,r9,1 ffc0dfe0: 90 1e 00 04 stw r0,4(r30) ffc0dfe4: 90 1b 00 38 stw r0,56(r27) ffc0dfe8: 4b ff c2 05 bl ffc0a1ec <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } ffc0dfec: 80 01 00 24 lwz r0,36(r1) ffc0dff0: 7f 63 db 78 mr r3,r27 ffc0dff4: 81 81 00 08 lwz r12,8(r1) ffc0dff8: 7c 08 03 a6 mtlr r0 ffc0dffc: 83 61 00 0c lwz r27,12(r1) ffc0e000: 83 81 00 10 lwz r28,16(r1) ffc0e004: 7d 80 81 20 mtcrf 8,r12 ffc0e008: 83 a1 00 14 lwz r29,20(r1) ffc0e00c: 83 c1 00 18 lwz r30,24(r1) ffc0e010: 83 e1 00 1c lwz r31,28(r1) ffc0e014: 38 21 00 20 addi r1,r1,32 ffc0e018: 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 && ffc0e01c: 81 3e 00 10 lwz r9,16(r30) ffc0e020: 3d 60 ff c2 lis r11,-62 ffc0e024: 38 0b 0c e0 addi r0,r11,3296 ffc0e028: 7f 89 00 00 cmpw cr7,r9,r0 ffc0e02c: 40 9e ff 34 bne+ cr7,ffc0df60 ffc0e030: 4b ff ff bc b ffc0dfec 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 ); ffc0e034: 39 3b 00 54 addi r9,r27,84 ffc0e038: 38 1b 00 50 addi r0,r27,80 head->next = tail; ffc0e03c: 91 3b 00 50 stw r9,80(r27) head->previous = NULL; ffc0e040: 39 20 00 00 li r9,0 ffc0e044: 91 3b 00 54 stw r9,84(r27) tail->previous = head; ffc0e048: 90 1b 00 58 stw r0,88(r27) ffc0e04c: 4b ff ff 80 b ffc0dfcc 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; ffc0e050: 39 40 00 00 li r10,0 ffc0e054: 39 60 00 00 li r11,0 ffc0e058: 91 5b 00 50 stw r10,80(r27) node->info.linearfile.direct = 0; ffc0e05c: 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; ffc0e060: 91 7b 00 54 stw r11,84(r27) node->info.linearfile.direct = 0; ffc0e064: 90 1b 00 58 stw r0,88(r27) ffc0e068: 4b ff ff 64 b ffc0dfcc } 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; ffc0e06c: 81 3c 00 00 lwz r9,0(r28) node->info.device.minor = info->device.minor; ffc0e070: 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; ffc0e074: 91 3b 00 50 stw r9,80(r27) node->info.device.minor = info->device.minor; ffc0e078: 90 1b 00 54 stw r0,84(r27) ffc0e07c: 4b ff ff 50 b ffc0dfcc } 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; ffc0e080: 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; ffc0e084: 39 40 00 00 li r10,0 node->info.file.indirect = 0; ffc0e088: 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; ffc0e08c: 39 60 00 00 li r11,0 ffc0e090: 91 5b 00 50 stw r10,80(r27) ffc0e094: 91 7b 00 54 stw r11,84(r27) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; ffc0e098: 90 1b 00 5c stw r0,92(r27) node->info.file.triply_indirect = 0; ffc0e09c: 90 1b 00 60 stw r0,96(r27) ffc0e0a0: 4b ff ff 2c b ffc0dfcc =============================================================================== 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 c3 lis r28,-61 ffc074a0: 3b 9c 8e cc addi r28,r28,-28980 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 d4 addi r30,r25,10196 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 2e 4d bl ffc1a31c !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 =============================================================================== ffc0e310 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0e310: 94 21 ff a8 stwu r1,-88(r1) ffc0e314: 7c 08 02 a6 mflr r0 ffc0e318: 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 ) ) { ffc0e31c: 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; ffc0e320: 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 */ ) { ffc0e324: 93 81 00 48 stw r28,72(r1) ffc0e328: 7c bc 2b 78 mr r28,r5 ffc0e32c: 93 a1 00 4c stw r29,76(r1) ffc0e330: 7c 7d 1b 78 mr r29,r3 ffc0e334: 93 e1 00 54 stw r31,84(r1) ffc0e338: 7c df 33 78 mr r31,r6 ffc0e33c: 93 41 00 40 stw r26,64(r1) ffc0e340: 93 61 00 44 stw r27,68(r1) ffc0e344: 93 c1 00 50 stw r30,80(r1) ffc0e348: 90 81 00 38 stw r4,56(r1) int i = 0; ffc0e34c: 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 ) ) { ffc0e350: 40 82 03 28 bne- ffc0e678 <== NEVER TAKEN /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0e354: 83 c6 00 00 lwz r30,0(r6) ffc0e358: 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 ) ffc0e35c: 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 ); ffc0e360: 7c 7d 1a 14 add r3,r29,r3 ffc0e364: 38 a1 00 10 addi r5,r1,16 ffc0e368: 38 c1 00 08 addi r6,r1,8 ffc0e36c: 48 00 0b 7d bl ffc0eee8 pathnamelen -= len; ffc0e370: 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 ); ffc0e374: 7c 7a 1b 78 mr r26,r3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) ffc0e378: 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; ffc0e37c: 80 81 00 38 lwz r4,56(r1) i += len; if ( !pathloc->node_access ) ffc0e380: 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; ffc0e384: 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; ffc0e388: 7c 80 20 50 subf r4,r0,r4 i += len; ffc0e38c: 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; ffc0e390: 90 81 00 38 stw r4,56(r1) i += len; ffc0e394: 90 01 00 0c stw r0,12(r1) if ( !pathloc->node_access ) ffc0e398: 41 9e 02 cc beq- cr7,ffc0e664 <== 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 ) ffc0e39c: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0e3a0: 40 9e 00 44 bne- cr7,ffc0e3e4 * 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 ) { ffc0e3a4: 80 03 00 4c lwz r0,76(r3) ffc0e3a8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e3ac: 41 9e 01 a8 beq- cr7,ffc0e554 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0e3b0: 7f e3 fb 78 mr r3,r31 ffc0e3b4: 4b ff fd c9 bl ffc0e17c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0e3b8: 7f 84 e3 78 mr r4,r28 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0e3bc: 7c 7e 1b 78 mr r30,r3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0e3c0: 7f e3 fb 78 mr r3,r31 ffc0e3c4: 4b ff fe 45 bl ffc0e208 ffc0e3c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e3cc: 40 be 00 e4 bne+ cr7,ffc0e4b0 rtems_set_errno_and_return_minus_one( EACCES ); ffc0e3d0: 48 00 59 bd bl ffc13d8c <__errno> ffc0e3d4: 38 00 00 0d li r0,13 ffc0e3d8: 90 03 00 00 stw r0,0(r3) ffc0e3dc: 3b c0 ff ff li r30,-1 ffc0e3e0: 48 00 00 d0 b ffc0e4b0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) ffc0e3e4: 80 1e 00 4c lwz r0,76(r30) ffc0e3e8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e3ec: 41 9e 00 f0 beq- cr7,ffc0e4dc if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0e3f0: 2f 9a 00 03 cmpwi cr7,r26,3 ffc0e3f4: 41 9e 00 28 beq- cr7,ffc0e41c ffc0e3f8: 2f 9a 00 04 cmpwi cr7,r26,4 ffc0e3fc: 41 9e 00 a4 beq- cr7,ffc0e4a0 ffc0e400: 2f 1a 00 02 cmpwi cr6,r26,2 ffc0e404: 41 9a 00 60 beq- cr6,ffc0e464 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc0e408: 41 be ff 9c beq- cr7,ffc0e3a4 <== NEVER TAKEN ffc0e40c: 7c 7e 1b 78 mr r30,r3 ffc0e410: 80 81 00 38 lwz r4,56(r1) ffc0e414: 80 61 00 0c lwz r3,12(r1) ffc0e418: 4b ff ff 48 b ffc0e360 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { ffc0e41c: 80 03 00 4c lwz r0,76(r3) ffc0e420: 2f 80 00 03 cmpwi cr7,r0,3 ffc0e424: 41 9e 01 80 beq- cr7,ffc0e5a4 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { ffc0e428: 2f 80 00 04 cmpwi cr7,r0,4 ffc0e42c: 41 9e 02 14 beq- cr7,ffc0e640 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0e430: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e434: 40 9e 02 58 bne- cr7,ffc0e68c rtems_set_errno_and_return_minus_one( ENOTDIR ); /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); ffc0e438: 38 81 00 10 addi r4,r1,16 ffc0e43c: 48 00 09 a9 bl ffc0ede4 if ( !node ) ffc0e440: 7c 7e 1b 79 mr. r30,r3 ffc0e444: 41 82 02 20 beq- ffc0e664 * 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 )) { ffc0e448: 80 1e 00 4c lwz r0,76(r30) ffc0e44c: 80 81 00 38 lwz r4,56(r1) ffc0e450: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e454: 41 9e 00 a4 beq- cr7,ffc0e4f8 } /* * Set the node access to the point we have found. */ pathloc->node_access = node; ffc0e458: 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) ) { ffc0e45c: 80 61 00 0c lwz r3,12(r1) ffc0e460: 4b ff ff 00 b ffc0e360 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0e464: 81 3b 27 7c lwz r9,10108(r27) ffc0e468: 80 09 00 18 lwz r0,24(r9) ffc0e46c: 7f 80 18 00 cmpw cr7,r0,r3 ffc0e470: 41 9e 01 24 beq- cr7,ffc0e594 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e474: 81 5f 00 10 lwz r10,16(r31) /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { ffc0e478: 80 0a 00 1c lwz r0,28(r10) ffc0e47c: 7f 80 18 00 cmpw cr7,r0,r3 ffc0e480: 41 9e 01 3c beq- cr7,ffc0e5bc pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) ffc0e484: 83 c3 00 08 lwz r30,8(r3) ffc0e488: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e48c: 41 9e 02 14 beq- cr7,ffc0e6a0 rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; pathloc->node_access = node; ffc0e490: 93 df 00 00 stw r30,0(r31) ffc0e494: 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) ) { ffc0e498: 80 61 00 0c lwz r3,12(r1) ffc0e49c: 4b ff fe c4 b ffc0e360 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); ffc0e4a0: 48 00 58 ed bl ffc13d8c <__errno> ffc0e4a4: 38 00 00 5b li r0,91 ffc0e4a8: 90 03 00 00 stw r0,0(r3) ffc0e4ac: 3b c0 ff ff li r30,-1 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e4b0: 80 01 00 5c lwz r0,92(r1) ffc0e4b4: 7f c3 f3 78 mr r3,r30 ffc0e4b8: 83 41 00 40 lwz r26,64(r1) ffc0e4bc: 7c 08 03 a6 mtlr r0 ffc0e4c0: 83 61 00 44 lwz r27,68(r1) ffc0e4c4: 83 81 00 48 lwz r28,72(r1) ffc0e4c8: 83 a1 00 4c lwz r29,76(r1) ffc0e4cc: 83 c1 00 50 lwz r30,80(r1) ffc0e4d0: 83 e1 00 54 lwz r31,84(r1) ffc0e4d4: 38 21 00 58 addi r1,r1,88 ffc0e4d8: 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 ) ) ffc0e4dc: 7f e3 fb 78 mr r3,r31 ffc0e4e0: 38 80 00 01 li r4,1 ffc0e4e4: 4b ff fd 25 bl ffc0e208 ffc0e4e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e4ec: 41 be fe e4 beq- cr7,ffc0e3d0 ffc0e4f0: 80 7f 00 00 lwz r3,0(r31) ffc0e4f4: 4b ff fe fc b ffc0e3f0 * 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 )) { ffc0e4f8: 80 1e 00 5c lwz r0,92(r30) ffc0e4fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e500: 41 be ff 58 beq- cr7,ffc0e458 IMFS_skip_separator( pathname, &pathnamelen, &i); ffc0e504: 7f a3 eb 78 mr r3,r29 ffc0e508: 38 81 00 38 addi r4,r1,56 ffc0e50c: 38 a1 00 0c addi r5,r1,12 ffc0e510: 4b ff fb e5 bl ffc0e0f4 if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { ffc0e514: 81 21 00 0c lwz r9,12(r1) ffc0e518: 7c 1d 48 ae lbzx r0,r29,r9 ffc0e51c: 7c 7d 4a 14 add r3,r29,r9 ffc0e520: 2f 80 00 2e cmpwi cr7,r0,46 ffc0e524: 40 9e 01 8c bne- cr7,ffc0e6b0 ffc0e528: 88 03 00 01 lbz r0,1(r3) ffc0e52c: 2f 80 00 2e cmpwi cr7,r0,46 ffc0e530: 40 9e 01 80 bne- cr7,ffc0e6b0 return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; ffc0e534: 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; ffc0e538: 39 29 00 02 addi r9,r9,2 pathnamelen -= 2; node = node->Parent; ffc0e53c: 83 de 00 08 lwz r30,8(r30) return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; ffc0e540: 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; ffc0e544: 91 21 00 0c stw r9,12(r1) pathnamelen -= 2; ffc0e548: 90 81 00 38 stw r4,56(r1) } /* * Set the node access to the point we have found. */ pathloc->node_access = node; ffc0e54c: 93 df 00 00 stw r30,0(r31) ffc0e550: 4b ff ff 0c b ffc0e45c * * 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 ) { ffc0e554: 81 43 00 5c lwz r10,92(r3) ffc0e558: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0e55c: 41 be fe 54 beq- cr7,ffc0e3b0 <== ALWAYS TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0e560: 81 2a 00 20 lwz r9,32(r10) <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e564: 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; ffc0e568: 80 0a 00 24 lwz r0,36(r10) <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e56c: 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; ffc0e570: 81 6a 00 28 lwz r11,40(r10) <== NOT EXECUTED ffc0e574: 81 0a 00 1c lwz r8,28(r10) <== NOT EXECUTED ffc0e578: 91 3f 00 04 stw r9,4(r31) <== NOT EXECUTED ffc0e57c: 91 1f 00 00 stw r8,0(r31) <== NOT EXECUTED ffc0e580: 90 1f 00 08 stw r0,8(r31) <== NOT EXECUTED ffc0e584: 91 7f 00 0c stw r11,12(r31) <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e588: 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; ffc0e58c: 80 0a 00 2c lwz r0,44(r10) <== NOT EXECUTED ffc0e590: 48 00 00 5c b ffc0e5ec <== 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 ) ffc0e594: 7c 7e 1b 78 mr r30,r3 ffc0e598: 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) ) { ffc0e59c: 80 61 00 0c lwz r3,12(r1) ffc0e5a0: 4b ff fd c0 b ffc0e360 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); ffc0e5a4: 7f e3 fb 78 mr r3,r31 ffc0e5a8: 38 80 00 00 li r4,0 ffc0e5ac: 4b ff fc fd bl ffc0e2a8 node = pathloc->node_access; ffc0e5b0: 80 7f 00 00 lwz r3,0(r31) ffc0e5b4: 80 03 00 4c lwz r0,76(r3) ffc0e5b8: 4b ff fe 78 b ffc0e430 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0e5bc: 81 2a 00 0c lwz r9,12(r10) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc0e5c0: 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; ffc0e5c4: 80 0a 00 10 lwz r0,16(r10) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc0e5c8: 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; ffc0e5cc: 81 6a 00 14 lwz r11,20(r10) ffc0e5d0: 81 0a 00 08 lwz r8,8(r10) ffc0e5d4: 91 3f 00 04 stw r9,4(r31) ffc0e5d8: 91 1f 00 00 stw r8,0(r31) ffc0e5dc: 90 1f 00 08 stw r0,8(r31) ffc0e5e0: 91 7f 00 0c stw r11,12(r31) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc0e5e4: 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; ffc0e5e8: 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; ffc0e5ec: 90 1f 00 10 stw r0,16(r31) return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0e5f0: 80 61 00 0c lwz r3,12(r1) ffc0e5f4: 80 0b 00 00 lwz r0,0(r11) ffc0e5f8: 80 81 00 38 lwz r4,56(r1) ffc0e5fc: 7c 69 18 50 subf r3,r9,r3 ffc0e600: 7c 7d 1a 14 add r3,r29,r3 ffc0e604: 7c 09 03 a6 mtctr r0 ffc0e608: 7c 89 22 14 add r4,r9,r4 ffc0e60c: 4e 80 04 21 bctrl if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e610: 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], ffc0e614: 7c 7e 1b 78 mr r30,r3 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0e618: 83 41 00 40 lwz r26,64(r1) ffc0e61c: 7c 08 03 a6 mtlr r0 ffc0e620: 7f c3 f3 78 mr r3,r30 ffc0e624: 83 61 00 44 lwz r27,68(r1) ffc0e628: 83 81 00 48 lwz r28,72(r1) ffc0e62c: 83 a1 00 4c lwz r29,76(r1) ffc0e630: 83 c1 00 50 lwz r30,80(r1) ffc0e634: 83 e1 00 54 lwz r31,84(r1) ffc0e638: 38 21 00 58 addi r1,r1,88 ffc0e63c: 4e 80 00 20 blr * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); ffc0e640: 7f e3 fb 78 mr r3,r31 ffc0e644: 38 80 00 00 li r4,0 ffc0e648: 48 00 00 b5 bl ffc0e6fc /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) ffc0e64c: 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 ); ffc0e650: 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; ffc0e654: 80 7f 00 00 lwz r3,0(r31) if ( result == -1 ) ffc0e658: 41 be fe 58 beq- cr7,ffc0e4b0 <== NEVER TAKEN ffc0e65c: 80 03 00 4c lwz r0,76(r3) ffc0e660: 4b ff fd d0 b ffc0e430 /* * 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 ); ffc0e664: 48 00 57 29 bl ffc13d8c <__errno> ffc0e668: 38 00 00 02 li r0,2 ffc0e66c: 90 03 00 00 stw r0,0(r3) ffc0e670: 3b c0 ff ff li r30,-1 ffc0e674: 4b ff fe 3c b ffc0e4b0 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 ); ffc0e678: 48 00 57 15 bl ffc13d8c <__errno> <== NOT EXECUTED ffc0e67c: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc0e680: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0e684: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc0e688: 4b ff fe 28 b ffc0e4b0 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0e68c: 48 00 57 01 bl ffc13d8c <__errno> ffc0e690: 38 00 00 14 li r0,20 ffc0e694: 90 03 00 00 stw r0,0(r3) ffc0e698: 3b c0 ff ff li r30,-1 ffc0e69c: 4b ff fe 14 b ffc0e4b0 flags,pathloc); } } else { if ( !node->Parent ) rtems_set_errno_and_return_minus_one( ENOENT ); ffc0e6a0: 48 00 56 ed bl ffc13d8c <__errno> ffc0e6a4: 3b c0 ff ff li r30,-1 ffc0e6a8: 93 43 00 00 stw r26,0(r3) ffc0e6ac: 4b ff fe 04 b ffc0e4b0 * 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; ffc0e6b0: 81 3e 00 5c lwz r9,92(r30) return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0e6b4: 7f 85 e3 78 mr r5,r28 ffc0e6b8: 7f e6 fb 78 mr r6,r31 ffc0e6bc: 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; ffc0e6c0: 81 69 00 28 lwz r11,40(r9) ffc0e6c4: 80 09 00 24 lwz r0,36(r9) ffc0e6c8: 81 09 00 1c lwz r8,28(r9) ffc0e6cc: 81 49 00 20 lwz r10,32(r9) ffc0e6d0: 90 1f 00 08 stw r0,8(r31) ffc0e6d4: 91 1f 00 00 stw r8,0(r31) ffc0e6d8: 91 5f 00 04 stw r10,4(r31) ffc0e6dc: 91 7f 00 0c stw r11,12(r31) return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0e6e0: 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; ffc0e6e4: 81 29 00 2c lwz r9,44(r9) return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0e6e8: 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; ffc0e6ec: 91 3f 00 10 stw r9,16(r31) return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0e6f0: 4e 80 04 21 bctrl ffc0e6f4: 7c 7e 1b 78 mr r30,r3 ffc0e6f8: 4b ff fd b8 b ffc0e4b0 =============================================================================== ffc0e8c8 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0e8c8: 94 21 ff a8 stwu r1,-88(r1) ffc0e8cc: 7c 08 02 a6 mflr r0 ffc0e8d0: 7d 80 00 26 mfcr r12 ffc0e8d4: 90 01 00 5c stw r0,92(r1) int i = 0; ffc0e8d8: 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 */ ) { ffc0e8dc: 93 61 00 44 stw r27,68(r1) ffc0e8e0: 7c bb 2b 78 mr r27,r5 ffc0e8e4: 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 ) ffc0e8e8: 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 */ ) { ffc0e8ec: 93 a1 00 4c stw r29,76(r1) ffc0e8f0: 7c 7d 1b 78 mr r29,r3 ffc0e8f4: 93 c1 00 50 stw r30,80(r1) ffc0e8f8: 93 e1 00 54 stw r31,84(r1) ffc0e8fc: 7c 9f 23 78 mr r31,r4 int i = 0; ffc0e900: 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; ffc0e904: 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 */ ) { ffc0e908: 93 41 00 40 stw r26,64(r1) ffc0e90c: 91 81 00 3c stw r12,60(r1) node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); ffc0e910: 48 00 6d a9 bl ffc156b8 ffc0e914: 7c 64 1b 78 mr r4,r3 ffc0e918: 90 61 00 08 stw r3,8(r1) ffc0e91c: 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 ); ffc0e920: 7c 7d 02 14 add r3,r29,r0 ffc0e924: 38 a1 00 14 addi r5,r1,20 ffc0e928: 38 c1 00 0c addi r6,r1,12 ffc0e92c: 48 00 05 bd bl ffc0eee8 pathlen -= len; ffc0e930: 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 ); ffc0e934: 7c 7a 1b 78 mr r26,r3 pathlen -= len; i += len; if ( !pathloc->node_access ) ffc0e938: 80 7f 00 00 lwz r3,0(r31) */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0e93c: 81 21 00 08 lwz r9,8(r1) i += len; if ( !pathloc->node_access ) ffc0e940: 2f 83 00 00 cmpwi cr7,r3,0 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; ffc0e944: 81 61 00 10 lwz r11,16(r1) */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0e948: 7d 20 48 50 subf r9,r0,r9 i += len; ffc0e94c: 7c 0b 02 14 add r0,r11,r0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0e950: 91 21 00 08 stw r9,8(r1) i += len; ffc0e954: 90 01 00 10 stw r0,16(r1) if ( !pathloc->node_access ) ffc0e958: 41 9e 02 54 beq- cr7,ffc0ebac <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) ffc0e95c: 2e 1a 00 00 cmpwi cr4,r26,0 ffc0e960: 40 92 00 48 bne- cr4,ffc0e9a8 pathloc->node_access = node; } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); ffc0e964: 48 00 54 29 bl ffc13d8c <__errno> ffc0e968: 38 00 00 11 li r0,17 ffc0e96c: 90 03 00 00 stw r0,0(r3) ffc0e970: 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; } ffc0e974: 80 01 00 5c lwz r0,92(r1) ffc0e978: 7f c3 f3 78 mr r3,r30 ffc0e97c: 81 81 00 3c lwz r12,60(r1) ffc0e980: 7c 08 03 a6 mtlr r0 ffc0e984: 83 41 00 40 lwz r26,64(r1) ffc0e988: 83 61 00 44 lwz r27,68(r1) ffc0e98c: 7d 80 81 20 mtcrf 8,r12 ffc0e990: 83 81 00 48 lwz r28,72(r1) ffc0e994: 83 a1 00 4c lwz r29,76(r1) ffc0e998: 83 c1 00 50 lwz r30,80(r1) ffc0e99c: 83 e1 00 54 lwz r31,84(r1) ffc0e9a0: 38 21 00 58 addi r1,r1,88 ffc0e9a4: 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 ) ffc0e9a8: 80 1e 00 4c lwz r0,76(r30) ffc0e9ac: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e9b0: 41 9e 01 1c beq- cr7,ffc0eacc if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0e9b4: 2f 9a 00 02 cmpwi cr7,r26,2 ffc0e9b8: 41 9e 00 84 beq- cr7,ffc0ea3c ffc0e9bc: 2b 9a 00 02 cmplwi cr7,r26,2 ffc0e9c0: 40 9d 00 24 ble- cr7,ffc0e9e4 ffc0e9c4: 2f 9a 00 03 cmpwi cr7,r26,3 ffc0e9c8: 41 9e 00 b0 beq- cr7,ffc0ea78 ffc0e9cc: 2f 9a 00 04 cmpwi cr7,r26,4 ffc0e9d0: 41 9e 00 28 beq- cr7,ffc0e9f8 <== ALWAYS TAKEN ffc0e9d4: 80 01 00 10 lwz r0,16(r1) <== NOT EXECUTED ffc0e9d8: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ffc0e9dc: 80 81 00 08 lwz r4,8(r1) <== NOT EXECUTED ffc0e9e0: 4b ff ff 40 b ffc0e920 <== NOT EXECUTED ffc0e9e4: 41 b2 ff 80 beq- cr4,ffc0e964 <== NEVER TAKEN ffc0e9e8: 80 01 00 10 lwz r0,16(r1) ffc0e9ec: 7c 7e 1b 78 mr r30,r3 ffc0e9f0: 80 81 00 08 lwz r4,8(r1) ffc0e9f4: 4b ff ff 2c b ffc0e920 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 ); ffc0e9f8: 48 00 53 95 bl ffc13d8c <__errno> ffc0e9fc: 38 00 00 5b li r0,91 ffc0ea00: 90 03 00 00 stw r0,0(r3) ffc0ea04: 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; } ffc0ea08: 7f c3 f3 78 mr r3,r30 ffc0ea0c: 80 01 00 5c lwz r0,92(r1) ffc0ea10: 81 81 00 3c lwz r12,60(r1) ffc0ea14: 7c 08 03 a6 mtlr r0 ffc0ea18: 83 41 00 40 lwz r26,64(r1) ffc0ea1c: 83 61 00 44 lwz r27,68(r1) ffc0ea20: 7d 80 81 20 mtcrf 8,r12 ffc0ea24: 83 81 00 48 lwz r28,72(r1) ffc0ea28: 83 a1 00 4c lwz r29,76(r1) ffc0ea2c: 83 c1 00 50 lwz r30,80(r1) ffc0ea30: 83 e1 00 54 lwz r31,84(r1) ffc0ea34: 38 21 00 58 addi r1,r1,88 ffc0ea38: 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 ) ffc0ea3c: 81 3c 27 7c lwz r9,10108(r28) ffc0ea40: 83 c9 00 18 lwz r30,24(r9) ffc0ea44: 7f 9e 18 00 cmpw cr7,r30,r3 ffc0ea48: 41 9e 01 78 beq- cr7,ffc0ebc0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0ea4c: 81 7f 00 10 lwz r11,16(r31) /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { ffc0ea50: 80 0b 00 1c lwz r0,28(r11) ffc0ea54: 7f 83 00 00 cmpw cr7,r3,r0 ffc0ea58: 41 9e 01 74 beq- cr7,ffc0ebcc *pathloc = pathloc->mt_entry->mt_point_node; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) ffc0ea5c: 83 c3 00 08 lwz r30,8(r3) ffc0ea60: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0ea64: 41 9e 02 14 beq- cr7,ffc0ec78 rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; ffc0ea68: 93 df 00 00 stw r30,0(r31) ffc0ea6c: 80 01 00 10 lwz r0,16(r1) ffc0ea70: 80 81 00 08 lwz r4,8(r1) break; ffc0ea74: 4b ff fe ac b ffc0e920 case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { ffc0ea78: 80 03 00 4c lwz r0,76(r3) ffc0ea7c: 2f 80 00 03 cmpwi cr7,r0,3 ffc0ea80: 41 9e 00 68 beq- cr7,ffc0eae8 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { ffc0ea84: 2f 80 00 04 cmpwi cr7,r0,4 ffc0ea88: 41 9e 00 60 beq- cr7,ffc0eae8 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) ffc0ea8c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ea90: 41 9e 01 d4 beq- cr7,ffc0ec64 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0ea94: 80 03 00 4c lwz r0,76(r3) ffc0ea98: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ea9c: 40 9e 01 c8 bne- cr7,ffc0ec64 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); ffc0eaa0: 38 81 00 14 addi r4,r1,20 ffc0eaa4: 48 00 03 41 bl ffc0ede4 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) ffc0eaa8: 7c 7e 1b 79 mr. r30,r3 ffc0eaac: 41 82 00 b8 beq- ffc0eb64 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { ffc0eab0: 80 1e 00 4c lwz r0,76(r30) ffc0eab4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0eab8: 41 9e 00 50 beq- cr7,ffc0eb08 ffc0eabc: 80 01 00 10 lwz r0,16(r1) ffc0eac0: 80 81 00 08 lwz r4,8(r1) } i += 2; pathlen -= 2; node = node->Parent; } pathloc->node_access = node; ffc0eac4: 93 df 00 00 stw r30,0(r31) ffc0eac8: 4b ff fe 58 b ffc0e920 * 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 ) ) ffc0eacc: 7f e3 fb 78 mr r3,r31 ffc0ead0: 38 80 00 01 li r4,1 ffc0ead4: 4b ff f7 35 bl ffc0e208 ffc0ead8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0eadc: 41 9e 01 74 beq- cr7,ffc0ec50 ffc0eae0: 80 7f 00 00 lwz r3,0(r31) ffc0eae4: 4b ff fe d0 b ffc0e9b4 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); ffc0eae8: 7f e3 fb 78 mr r3,r31 ffc0eaec: 38 80 00 00 li r4,0 ffc0eaf0: 4b ff fc c5 bl ffc0e7b4 if ( result == -1 ) ffc0eaf4: 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 ); ffc0eaf8: 7c 7e 1b 78 mr r30,r3 if ( result == -1 ) ffc0eafc: 41 be fe 78 beq- cr7,ffc0e974 <== NEVER TAKEN ffc0eb00: 80 7f 00 00 lwz r3,0(r31) ffc0eb04: 4b ff ff 88 b ffc0ea8c */ if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { ffc0eb08: 80 1e 00 5c lwz r0,92(r30) ffc0eb0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0eb10: 41 be ff ac beq- cr7,ffc0eabc IMFS_skip_separator( path, &pathlen, &i); ffc0eb14: 7f a3 eb 78 mr r3,r29 ffc0eb18: 38 81 00 08 addi r4,r1,8 ffc0eb1c: 38 a1 00 10 addi r5,r1,16 ffc0eb20: 4b ff f5 d5 bl ffc0e0f4 if ((path[i] != '.') || (path[i + 1] != '.')) { ffc0eb24: 81 21 00 10 lwz r9,16(r1) ffc0eb28: 7c 1d 48 ae lbzx r0,r29,r9 ffc0eb2c: 7c 7d 4a 14 add r3,r29,r9 ffc0eb30: 2f 80 00 2e cmpwi cr7,r0,46 ffc0eb34: 40 9e 01 54 bne- cr7,ffc0ec88 ffc0eb38: 88 03 00 01 lbz r0,1(r3) ffc0eb3c: 2f 80 00 2e cmpwi cr7,r0,46 ffc0eb40: 40 9e 01 48 bne- cr7,ffc0ec88 <== NEVER TAKEN return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; pathlen -= 2; ffc0eb44: 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; ffc0eb48: 38 09 00 02 addi r0,r9,2 pathlen -= 2; node = node->Parent; ffc0eb4c: 83 de 00 08 lwz r30,8(r30) return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; pathlen -= 2; ffc0eb50: 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; ffc0eb54: 90 01 00 10 stw r0,16(r1) pathlen -= 2; ffc0eb58: 90 81 00 08 stw r4,8(r1) node = node->Parent; } pathloc->node_access = node; ffc0eb5c: 93 df 00 00 stw r30,0(r31) ffc0eb60: 4b ff fd c0 b ffc0e920 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; ffc0eb64: 80 01 00 10 lwz r0,16(r1) ffc0eb68: 81 21 00 0c lwz r9,12(r1) ffc0eb6c: 7d 29 00 50 subf r9,r9,r0 ffc0eb70: 7d 3d 4a 14 add r9,r29,r9 ffc0eb74: 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++) { ffc0eb78: 7c 7d 00 ae lbzx r3,r29,r0 ffc0eb7c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0eb80: 40 be 00 20 bne+ cr7,ffc0eba0 ffc0eb84: 48 00 00 9c b ffc0ec20 ffc0eb88: 81 21 00 10 lwz r9,16(r1) ffc0eb8c: 38 09 00 01 addi r0,r9,1 ffc0eb90: 7c 7d 00 ae lbzx r3,r29,r0 ffc0eb94: 90 01 00 10 stw r0,16(r1) ffc0eb98: 2f 83 00 00 cmpwi cr7,r3,0 ffc0eb9c: 41 9e 00 84 beq- cr7,ffc0ec20 if ( !IMFS_is_separator( path[ i ] ) ) ffc0eba0: 4b ff 79 51 bl ffc064f0 ffc0eba4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0eba8: 40 9e ff e0 bne+ cr7,ffc0eb88 rtems_set_errno_and_return_minus_one( ENOENT ); ffc0ebac: 48 00 51 e1 bl ffc13d8c <__errno> ffc0ebb0: 38 00 00 02 li r0,2 ffc0ebb4: 90 03 00 00 stw r0,0(r3) ffc0ebb8: 3b c0 ff ff li r30,-1 ffc0ebbc: 4b ff fd b8 b ffc0e974 /* * 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 ); ffc0ebc0: 80 01 00 10 lwz r0,16(r1) ffc0ebc4: 80 81 00 08 lwz r4,8(r1) ffc0ebc8: 4b ff fd 58 b ffc0e920 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0ebcc: 81 2b 00 14 lwz r9,20(r11) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0ebd0: 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; ffc0ebd4: 80 0b 00 10 lwz r0,16(r11) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0ebd8: 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; ffc0ebdc: 81 0b 00 08 lwz r8,8(r11) ffc0ebe0: 81 4b 00 0c lwz r10,12(r11) ffc0ebe4: 91 1f 00 00 stw r8,0(r31) ffc0ebe8: 91 5f 00 04 stw r10,4(r31) ffc0ebec: 90 1f 00 08 stw r0,8(r31) ffc0ebf0: 91 3f 00 0c stw r9,12(r31) ffc0ebf4: 80 0b 00 18 lwz r0,24(r11) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0ebf8: 80 61 00 10 lwz r3,16(r1) ffc0ebfc: 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; ffc0ec00: 90 1f 00 10 stw r0,16(r31) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0ec04: 7c 6b 18 50 subf r3,r11,r3 ffc0ec08: 80 09 00 04 lwz r0,4(r9) ffc0ec0c: 7c 7d 1a 14 add r3,r29,r3 ffc0ec10: 7c 09 03 a6 mtctr r0 ffc0ec14: 4e 80 04 21 bctrl ffc0ec18: 7c 7e 1b 78 mr r30,r3 ffc0ec1c: 4b ff fd 58 b ffc0e974 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0ec20: 7f e3 fb 78 mr r3,r31 ffc0ec24: 4b ff f5 59 bl ffc0e17c /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) ffc0ec28: 81 3f 00 00 lwz r9,0(r31) /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0ec2c: 7c 7e 1b 78 mr r30,r3 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) ffc0ec30: 80 09 00 4c lwz r0,76(r9) ffc0ec34: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ec38: 40 9e 00 2c bne- cr7,ffc0ec64 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) ffc0ec3c: 7f e3 fb 78 mr r3,r31 ffc0ec40: 38 80 00 03 li r4,3 ffc0ec44: 4b ff f5 c5 bl ffc0e208 ffc0ec48: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ec4c: 40 9e fd 28 bne+ cr7,ffc0e974 rtems_set_errno_and_return_minus_one( EACCES ); ffc0ec50: 48 00 51 3d bl ffc13d8c <__errno> ffc0ec54: 38 00 00 0d li r0,13 ffc0ec58: 90 03 00 00 stw r0,0(r3) ffc0ec5c: 3b c0 ff ff li r30,-1 ffc0ec60: 4b ff fd 14 b ffc0e974 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0ec64: 48 00 51 29 bl ffc13d8c <__errno> ffc0ec68: 38 00 00 14 li r0,20 ffc0ec6c: 90 03 00 00 stw r0,0(r3) ffc0ec70: 3b c0 ff ff li r30,-1 ffc0ec74: 4b ff fd 00 b ffc0e974 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) rtems_set_errno_and_return_minus_one( ENOENT ); ffc0ec78: 48 00 51 15 bl ffc13d8c <__errno> ffc0ec7c: 3b c0 ff ff li r30,-1 ffc0ec80: 93 43 00 00 stw r26,0(r3) ffc0ec84: 4b ff fc f0 b ffc0e974 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; ffc0ec88: 81 3e 00 5c lwz r9,92(r30) return (*pathloc->ops->evalformake_h)( &path[i], ffc0ec8c: 7f e4 fb 78 mr r4,r31 ffc0ec90: 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; ffc0ec94: 81 69 00 28 lwz r11,40(r9) ffc0ec98: 80 09 00 24 lwz r0,36(r9) ffc0ec9c: 81 09 00 1c lwz r8,28(r9) ffc0eca0: 81 49 00 20 lwz r10,32(r9) ffc0eca4: 90 1f 00 08 stw r0,8(r31) ffc0eca8: 91 1f 00 00 stw r8,0(r31) ffc0ecac: 91 5f 00 04 stw r10,4(r31) ffc0ecb0: 91 7f 00 0c stw r11,12(r31) return (*pathloc->ops->evalformake_h)( &path[i], ffc0ecb4: 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; ffc0ecb8: 81 29 00 2c lwz r9,44(r9) return (*pathloc->ops->evalformake_h)( &path[i], ffc0ecbc: 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; ffc0ecc0: 91 3f 00 10 stw r9,16(r31) return (*pathloc->ops->evalformake_h)( &path[i], ffc0ecc4: 4e 80 04 21 bctrl ffc0ecc8: 7c 7e 1b 78 mr r30,r3 ffc0eccc: 4b ff fc a8 b ffc0e974 =============================================================================== ffc0e7b4 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0e7b4: 94 21 ff e8 stwu r1,-24(r1) ffc0e7b8: 7c 08 02 a6 mflr r0 ffc0e7bc: 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 ); ffc0e7c0: 3f a0 00 00 lis r29,0 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0e7c4: 93 81 00 08 stw r28,8(r1) ffc0e7c8: 7c 9c 23 78 mr r28,r4 ffc0e7cc: 93 c1 00 10 stw r30,16(r1) ffc0e7d0: 7c 7e 1b 78 mr r30,r3 ffc0e7d4: 90 01 00 1c stw r0,28(r1) ffc0e7d8: 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 ); ffc0e7dc: 81 3d 27 7c lwz r9,10108(r29) ffc0e7e0: 48 00 00 14 b ffc0e7f4 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) ffc0e7e4: 41 9a 00 90 beq- cr6,ffc0e874 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ffc0e7e8: 39 6b ff fd addi r11,r11,-3 ffc0e7ec: 2b 8b 00 01 cmplwi cr7,r11,1 ffc0e7f0: 41 9d 00 58 bgt- cr7,ffc0e848 <== ALWAYS TAKEN /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0e7f4: a1 69 00 30 lhz r11,48(r9) { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; ffc0e7f8: 83 fe 00 00 lwz r31,0(r30) /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0e7fc: 38 0b 00 01 addi r0,r11,1 ffc0e800: 54 00 04 3e clrlwi r0,r0,16 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { ffc0e804: 2b 80 00 05 cmplwi cr7,r0,5 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0e808: b0 09 00 30 sth r0,48(r9) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { ffc0e80c: 41 9d 00 84 bgt- cr7,ffc0e890 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) ffc0e810: 81 7f 00 4c lwz r11,76(r31) ffc0e814: 2f 8b 00 03 cmpwi cr7,r11,3 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) ffc0e818: 2f 0b 00 04 cmpwi cr6,r11,4 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) ffc0e81c: 40 9e ff c8 bne+ cr7,ffc0e7e4 result = IMFS_evaluate_hard_link( node, flags ); ffc0e820: 7f c3 f3 78 mr r3,r30 ffc0e824: 7f 84 e3 78 mr r4,r28 ffc0e828: 4b ff fa 81 bl ffc0e2a8 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 ) ) ); ffc0e82c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e830: 40 9e 00 58 bne- cr7,ffc0e888 ffc0e834: 81 7f 00 4c lwz r11,76(r31) ffc0e838: 81 3d 27 7c lwz r9,10108(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 ) || ffc0e83c: 39 6b ff fd addi r11,r11,-3 ffc0e840: 2b 8b 00 01 cmplwi cr7,r11,1 ffc0e844: 40 9d ff b0 ble+ cr7,ffc0e7f4 <== ALWAYS TAKEN ffc0e848: 38 60 00 00 li r3,0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; ffc0e84c: 38 00 00 00 li r0,0 return result; } ffc0e850: 83 81 00 08 lwz r28,8(r1) /* * Clear link counter. */ rtems_filesystem_link_counts = 0; ffc0e854: b0 09 00 30 sth r0,48(r9) return result; } ffc0e858: 80 01 00 1c lwz r0,28(r1) ffc0e85c: 83 a1 00 0c lwz r29,12(r1) ffc0e860: 7c 08 03 a6 mtlr r0 ffc0e864: 83 c1 00 10 lwz r30,16(r1) ffc0e868: 83 e1 00 14 lwz r31,20(r1) ffc0e86c: 38 21 00 18 addi r1,r1,24 ffc0e870: 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 ); ffc0e874: 7f c3 f3 78 mr r3,r30 ffc0e878: 7f 84 e3 78 mr r4,r28 ffc0e87c: 4b ff fe 81 bl ffc0e6fc } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); ffc0e880: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e884: 41 9e ff b0 beq+ cr7,ffc0e834 ffc0e888: 81 3d 27 7c lwz r9,10108(r29) ffc0e88c: 4b ff ff c0 b ffc0e84c * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; ffc0e890: 38 00 00 00 li r0,0 ffc0e894: b0 09 00 30 sth r0,48(r9) rtems_set_errno_and_return_minus_one( ELOOP ); ffc0e898: 48 00 54 f5 bl ffc13d8c <__errno> ffc0e89c: 38 00 00 5c li r0,92 ffc0e8a0: 90 03 00 00 stw r0,0(r3) ffc0e8a4: 38 60 ff ff li r3,-1 */ rtems_filesystem_link_counts = 0; return result; } ffc0e8a8: 80 01 00 1c lwz r0,28(r1) ffc0e8ac: 83 81 00 08 lwz r28,8(r1) ffc0e8b0: 7c 08 03 a6 mtlr r0 ffc0e8b4: 83 a1 00 0c lwz r29,12(r1) ffc0e8b8: 83 c1 00 10 lwz r30,16(r1) ffc0e8bc: 83 e1 00 14 lwz r31,20(r1) ffc0e8c0: 38 21 00 18 addi r1,r1,24 ffc0e8c4: 4e 80 00 20 blr =============================================================================== ffc0e208 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { ffc0e208: 94 21 ff e8 stwu r1,-24(r1) ffc0e20c: 7c 08 02 a6 mflr r0 ffc0e210: 90 01 00 1c stw r0,28(r1) uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) ffc0e214: 54 80 00 39 rlwinm. r0,r4,0,0,28 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { ffc0e218: 93 c1 00 10 stw r30,16(r1) ffc0e21c: 7c 9e 23 78 mr r30,r4 ffc0e220: 93 a1 00 0c stw r29,12(r1) ffc0e224: 93 e1 00 14 stw r31,20(r1) uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) ffc0e228: 40 82 00 6c bne- ffc0e294 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; ffc0e22c: 83 e3 00 00 lwz r31,0(r3) #if defined(RTEMS_POSIX_API) st_uid = geteuid(); ffc0e230: 48 00 13 31 bl ffc0f560 ffc0e234: 7c 7d 1b 78 mr r29,r3 st_gid = getegid(); ffc0e238: 48 00 13 19 bl ffc0f550 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) ffc0e23c: a0 1f 00 3c lhz r0,60(r31) ffc0e240: 7f 80 e8 00 cmpw cr7,r0,r29 ffc0e244: 41 9e 00 40 beq- cr7,ffc0e284 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) ffc0e248: a0 1f 00 3e lhz r0,62(r31) ffc0e24c: 7f 80 18 00 cmpw cr7,r0,r3 ffc0e250: 41 9e 00 3c beq- cr7,ffc0e28c /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) ffc0e254: 80 7f 00 30 lwz r3,48(r31) ffc0e258: 7f c3 18 38 and r3,r30,r3 return 1; ffc0e25c: 7f c3 1a 78 xor r3,r30,r3 ffc0e260: 7c 63 00 34 cntlzw r3,r3 ffc0e264: 54 63 d9 7e rlwinm r3,r3,27,5,31 return 0; } ffc0e268: 80 01 00 1c lwz r0,28(r1) ffc0e26c: 83 a1 00 0c lwz r29,12(r1) ffc0e270: 7c 08 03 a6 mtlr r0 ffc0e274: 83 c1 00 10 lwz r30,16(r1) ffc0e278: 83 e1 00 14 lwz r31,20(r1) ffc0e27c: 38 21 00 18 addi r1,r1,24 ffc0e280: 4e 80 00 20 blr */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; ffc0e284: 57 de 30 32 rlwinm r30,r30,6,0,25 ffc0e288: 4b ff ff cc b ffc0e254 else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3; ffc0e28c: 57 de 18 38 rlwinm r30,r30,3,0,28 ffc0e290: 4b ff ff c4 b ffc0e254 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 ); ffc0e294: 48 00 5a f9 bl ffc13d8c <__errno> <== NOT EXECUTED ffc0e298: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0e29c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0e2a0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0e2a4: 4b ff ff c4 b ffc0e268 <== NOT EXECUTED =============================================================================== ffc12f5c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { ffc12f5c: 94 21 ff e0 stwu r1,-32(r1) ffc12f60: 7c 08 02 a6 mflr r0 ffc12f64: 90 01 00 24 stw r0,36(r1) ffc12f68: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; ffc12f6c: 83 e3 00 00 lwz r31,0(r3) int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { ffc12f70: 93 c1 00 18 stw r30,24(r1) ffc12f74: 7c 9e 23 78 mr r30,r4 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); ffc12f78: 4b ff c5 e9 bl ffc0f560 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) ffc12f7c: a0 1f 00 3c lhz r0,60(r31) ffc12f80: 7f 80 18 00 cmpw cr7,r0,r3 ffc12f84: 41 9e 00 0c beq- cr7,ffc12f90 ffc12f88: 2f 83 00 00 cmpwi cr7,r3,0 ffc12f8c: 40 9e 00 48 bne- cr7,ffc12fd4 <== ALWAYS TAKEN /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); ffc12f90: 80 1f 00 30 lwz r0,48(r31) jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); ffc12f94: 57 de 05 3e clrlwi r30,r30,20 IMFS_update_ctime( jnode ); ffc12f98: 38 61 00 08 addi r3,r1,8 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); ffc12f9c: 54 00 00 26 rlwinm r0,r0,0,0,19 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); ffc12fa0: 7f de 03 78 or r30,r30,r0 ffc12fa4: 93 df 00 30 stw r30,48(r31) IMFS_update_ctime( jnode ); ffc12fa8: 38 80 00 00 li r4,0 ffc12fac: 4b ff 22 b9 bl ffc05264 ffc12fb0: 80 01 00 08 lwz r0,8(r1) return 0; ffc12fb4: 38 60 00 00 li r3,0 */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); ffc12fb8: 90 1f 00 48 stw r0,72(r31) return 0; } ffc12fbc: 80 01 00 24 lwz r0,36(r1) ffc12fc0: 83 c1 00 18 lwz r30,24(r1) ffc12fc4: 7c 08 03 a6 mtlr r0 ffc12fc8: 83 e1 00 1c lwz r31,28(r1) ffc12fcc: 38 21 00 20 addi r1,r1,32 ffc12fd0: 4e 80 00 20 blr */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); ffc12fd4: 48 00 0d b9 bl ffc13d8c <__errno> ffc12fd8: 38 00 00 01 li r0,1 ffc12fdc: 90 03 00 00 stw r0,0(r3) ffc12fe0: 38 60 ff ff li r3,-1 ffc12fe4: 4b ff ff d8 b ffc12fbc =============================================================================== ffc059cc : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc059cc: 94 21 ff f0 stwu r1,-16(r1) ffc059d0: 7c 08 02 a6 mflr r0 ffc059d4: 7c 68 1b 78 mr r8,r3 ffc059d8: 90 01 00 14 stw r0,20(r1) ffc059dc: 93 c1 00 08 stw r30,8(r1) ffc059e0: 93 e1 00 0c stw r31,12(r1) off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); ffc059e4: 81 23 00 1c lwz r9,28(r3) ffc059e8: 80 69 00 50 lwz r3,80(r9) ffc059ec: 48 00 c7 bd bl ffc121a8 ffc059f0: 7c 7e fe 70 srawi r30,r3,31 IMFS_FIFO_RETURN(err); ffc059f4: 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); ffc059f8: 7c 7f 1b 78 mr r31,r3 IMFS_FIFO_RETURN(err); ffc059fc: 41 9c 00 24 blt- cr7,ffc05a20 <== ALWAYS TAKEN } ffc05a00: 80 01 00 14 lwz r0,20(r1) ffc05a04: 7f c3 f3 78 mr r3,r30 ffc05a08: 7f e4 fb 78 mr r4,r31 ffc05a0c: 83 c1 00 08 lwz r30,8(r1) ffc05a10: 7c 08 03 a6 mtlr r0 ffc05a14: 83 e1 00 0c lwz r31,12(r1) ffc05a18: 38 21 00 10 addi r1,r1,16 ffc05a1c: 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); ffc05a20: 48 01 06 a1 bl ffc160c0 <__errno> ffc05a24: 7c 1f 00 d0 neg r0,r31 ffc05a28: 90 03 00 00 stw r0,0(r3) ffc05a2c: 3b c0 ff ff li r30,-1 ffc05a30: 3b e0 ff ff li r31,-1 ffc05a34: 4b ff ff cc b ffc05a00 =============================================================================== ffc05a38 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { ffc05a38: 94 21 ff e0 stwu r1,-32(r1) ffc05a3c: 7c 08 02 a6 mflr r0 ffc05a40: 7c 66 1b 78 mr r6,r3 ffc05a44: 90 01 00 24 stw r0,36(r1) ffc05a48: 93 c1 00 18 stw r30,24(r1) ffc05a4c: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *jnode = iop->pathinfo.node_access; ffc05a50: 83 e3 00 1c lwz r31,28(r3) int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); ffc05a54: 80 7f 00 50 lwz r3,80(r31) ffc05a58: 48 00 c4 41 bl ffc11e98 if (err > 0) { ffc05a5c: 7c 7e 1b 79 mr. r30,r3 ffc05a60: 40 81 00 38 ble- ffc05a98 IMFS_mtime_ctime_update(jnode); ffc05a64: 38 61 00 08 addi r3,r1,8 ffc05a68: 38 80 00 00 li r4,0 ffc05a6c: 48 00 16 fd bl ffc07168 ffc05a70: 80 01 00 08 lwz r0,8(r1) ffc05a74: 90 1f 00 44 stw r0,68(r31) ffc05a78: 90 1f 00 48 stw r0,72(r31) } IMFS_FIFO_RETURN(err); } ffc05a7c: 80 01 00 24 lwz r0,36(r1) ffc05a80: 7f c3 f3 78 mr r3,r30 ffc05a84: 83 e1 00 1c lwz r31,28(r1) ffc05a88: 7c 08 03 a6 mtlr r0 ffc05a8c: 83 c1 00 18 lwz r30,24(r1) ffc05a90: 38 21 00 20 addi r1,r1,32 ffc05a94: 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); ffc05a98: 41 82 ff e4 beq+ ffc05a7c <== NEVER TAKEN ffc05a9c: 7f de 00 d0 neg r30,r30 ffc05aa0: 48 01 06 21 bl ffc160c0 <__errno> ffc05aa4: 93 c3 00 00 stw r30,0(r3) ffc05aa8: 3b c0 ff ff li r30,-1 ffc05aac: 4b ff ff d0 b ffc05a7c =============================================================================== ffc0ede4 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0ede4: 94 21 ff e8 stwu r1,-24(r1) ffc0ede8: 7c 08 02 a6 mflr r0 ffc0edec: 93 e1 00 14 stw r31,20(r1) /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0edf0: 3f e0 ff c2 lis r31,-62 ffc0edf4: 3b ff 0d 68 addi r31,r31,3432 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0edf8: 93 c1 00 10 stw r30,16(r1) ffc0edfc: 7c 9e 23 78 mr r30,r4 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0ee00: 7f e4 fb 78 mr r4,r31 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0ee04: 93 81 00 08 stw r28,8(r1) ffc0ee08: 7c 7c 1b 78 mr r28,r3 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0ee0c: 7f c3 f3 78 mr r3,r30 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0ee10: 90 01 00 1c stw r0,28(r1) ffc0ee14: 93 a1 00 0c stw r29,12(r1) /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0ee18: 48 00 62 c5 bl ffc150dc ffc0ee1c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ee20: 41 9e 00 54 beq- cr7,ffc0ee74 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) ffc0ee24: 7f c3 f3 78 mr r3,r30 ffc0ee28: 38 9f 00 04 addi r4,r31,4 ffc0ee2c: 48 00 62 b1 bl ffc150dc ffc0ee30: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ee34: 41 9e 00 64 beq- cr7,ffc0ee98 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0ee38: 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)); ffc0ee3c: 3b bc 00 54 addi r29,r28,84 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; ffc0ee40: 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 ); ffc0ee44: 7f 9f e8 00 cmpw cr7,r31,r29 ffc0ee48: 40 be 00 14 bne+ cr7,ffc0ee5c ffc0ee4c: 48 00 00 28 b ffc0ee74 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { ffc0ee50: 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 ); ffc0ee54: 7f 9f e8 00 cmpw cr7,r31,r29 ffc0ee58: 41 9e 00 68 beq- cr7,ffc0eec0 !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 ) ) ffc0ee5c: 38 9f 00 0c addi r4,r31,12 ffc0ee60: 7f c3 f3 78 mr r3,r30 ffc0ee64: 48 00 62 79 bl ffc150dc ffc0ee68: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ee6c: 40 9e ff e4 bne+ cr7,ffc0ee50 ffc0ee70: 7f fc fb 78 mr r28,r31 return the_jnode; } return 0; } ffc0ee74: 80 01 00 1c lwz r0,28(r1) ffc0ee78: 7f 83 e3 78 mr r3,r28 ffc0ee7c: 83 a1 00 0c lwz r29,12(r1) ffc0ee80: 7c 08 03 a6 mtlr r0 ffc0ee84: 83 81 00 08 lwz r28,8(r1) ffc0ee88: 83 c1 00 10 lwz r30,16(r1) ffc0ee8c: 83 e1 00 14 lwz r31,20(r1) ffc0ee90: 38 21 00 18 addi r1,r1,24 ffc0ee94: 4e 80 00 20 blr ffc0ee98: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) return directory->Parent; ffc0ee9c: 83 9c 00 08 lwz r28,8(r28) <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } ffc0eea0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0eea4: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc0eea8: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0eeac: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc0eeb0: 83 81 00 08 lwz r28,8(r1) <== NOT EXECUTED ffc0eeb4: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc0eeb8: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc0eebc: 4e 80 00 20 blr <== NOT EXECUTED ffc0eec0: 80 01 00 1c lwz r0,28(r1) if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; ffc0eec4: 3b 80 00 00 li r28,0 } ffc0eec8: 7f 83 e3 78 mr r3,r28 ffc0eecc: 83 a1 00 0c lwz r29,12(r1) ffc0eed0: 7c 08 03 a6 mtlr r0 ffc0eed4: 83 81 00 08 lwz r28,8(r1) ffc0eed8: 83 c1 00 10 lwz r30,16(r1) ffc0eedc: 83 e1 00 14 lwz r31,20(r1) ffc0eee0: 38 21 00 18 addi r1,r1,24 ffc0eee4: 4e 80 00 20 blr =============================================================================== ffc0ecd0 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0ecd0: 94 21 ff d0 stwu r1,-48(r1) ffc0ecd4: 7c 08 02 a6 mflr r0 ffc0ecd8: 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; ffc0ecdc: 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 ) { ffc0ece0: 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; ffc0ece4: 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; ffc0ece8: 83 c3 00 1c lwz r30,28(r3) loc = temp_mt_entry->mt_fs_root; ffc0ecec: 81 63 00 24 lwz r11,36(r3) ffc0ecf0: 81 23 00 28 lwz r9,40(r3) ffc0ecf4: 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; ffc0ecf8: 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 ) { ffc0ecfc: 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; ffc0ed00: 93 c1 00 08 stw r30,8(r1) ffc0ed04: 91 41 00 0c stw r10,12(r1) ffc0ed08: 91 61 00 10 stw r11,16(r1) ffc0ed0c: 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; ffc0ed10: 90 03 00 1c stw r0,28(r3) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc0ed14: 38 61 00 08 addi r3,r1,8 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; ffc0ed18: 83 fe 00 08 lwz r31,8(r30) loc.node_access = (void *)jnode; ffc0ed1c: 93 c1 00 08 stw r30,8(r1) IMFS_Set_handlers( &loc ); ffc0ed20: 4b ff f4 5d bl ffc0e17c if ( jnode->type != IMFS_DIRECTORY ) { ffc0ed24: 80 1e 00 4c lwz r0,76(r30) ffc0ed28: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ed2c: 40 9e 00 60 bne- cr7,ffc0ed8c <== NEVER TAKEN result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { ffc0ed30: 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 ); ffc0ed34: 38 1e 00 54 addi r0,r30,84 ffc0ed38: 7f 89 00 00 cmpw cr7,r9,r0 ffc0ed3c: 41 9e 00 50 beq- cr7,ffc0ed8c result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { ffc0ed40: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0ed44: 41 9e 00 68 beq- cr7,ffc0edac <== NEVER TAKEN if ( jnode->type == IMFS_DIRECTORY ) { ffc0ed48: 80 1e 00 4c lwz r0,76(r30) ffc0ed4c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ed50: 40 9e ff c4 bne+ cr7,ffc0ed14 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0ed54: 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 ); ffc0ed58: 39 3e 00 54 addi r9,r30,84 if ( jnode_has_children( jnode ) ) ffc0ed5c: 7f 80 48 00 cmpw cr7,r0,r9 ffc0ed60: 41 be ff b4 beq- cr7,ffc0ed14 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); ffc0ed64: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ed68: 41 9e 00 44 beq- cr7,ffc0edac <== NEVER TAKEN ffc0ed6c: 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 ); ffc0ed70: 38 61 00 08 addi r3,r1,8 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; ffc0ed74: 83 fe 00 08 lwz r31,8(r30) loc.node_access = (void *)jnode; ffc0ed78: 93 c1 00 08 stw r30,8(r1) IMFS_Set_handlers( &loc ); ffc0ed7c: 4b ff f4 01 bl ffc0e17c if ( jnode->type != IMFS_DIRECTORY ) { ffc0ed80: 80 1e 00 4c lwz r0,76(r30) ffc0ed84: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ed88: 41 be ff a8 beq- cr7,ffc0ed30 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); ffc0ed8c: 38 60 00 00 li r3,0 ffc0ed90: 38 81 00 08 addi r4,r1,8 ffc0ed94: 4b ff 59 99 bl ffc0472c if (result != 0) ffc0ed98: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ed9c: 40 9e 00 2c bne- cr7,ffc0edc8 <== NEVER TAKEN return -1; jnode = next; ffc0eda0: 7f fe fb 78 mr r30,r31 } if ( jnode != NULL ) { ffc0eda4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0eda8: 40 9e ff a0 bne+ cr7,ffc0ed48 } } } while (jnode != NULL); return 0; } ffc0edac: 80 01 00 34 lwz r0,52(r1) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; ffc0edb0: 38 60 00 00 li r3,0 } ffc0edb4: 83 c1 00 28 lwz r30,40(r1) ffc0edb8: 7c 08 03 a6 mtlr r0 ffc0edbc: 83 e1 00 2c lwz r31,44(r1) ffc0edc0: 38 21 00 30 addi r1,r1,48 ffc0edc4: 4e 80 00 20 blr ffc0edc8: 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; ffc0edcc: 38 60 ff ff li r3,-1 <== NOT EXECUTED } } } while (jnode != NULL); return 0; } ffc0edd0: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc0edd4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0edd8: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc0eddc: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc0ede0: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0eee8 : const char *path, int pathlen, char *token, int *token_len ) { ffc0eee8: 94 21 ff e0 stwu r1,-32(r1) ffc0eeec: 7c 08 02 a6 mflr r0 ffc0eef0: 93 41 00 08 stw r26,8(r1) ffc0eef4: 7c da 33 78 mr r26,r6 ffc0eef8: 93 81 00 10 stw r28,16(r1) register int i = 0; ffc0eefc: 3b 80 00 00 li r28,0 const char *path, int pathlen, char *token, int *token_len ) { ffc0ef00: 93 a1 00 14 stw r29,20(r1) ffc0ef04: 7c 9d 23 78 mr r29,r4 ffc0ef08: 93 c1 00 18 stw r30,24(r1) ffc0ef0c: 7c be 2b 78 mr r30,r5 ffc0ef10: 93 e1 00 1c stw r31,28(r1) ffc0ef14: 7c 7f 1b 78 mr r31,r3 ffc0ef18: 90 01 00 24 stw r0,36(r1) ffc0ef1c: 93 61 00 0c stw r27,12(r1) register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; ffc0ef20: 8b 63 00 00 lbz r27,0(r3) while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { ffc0ef24: 48 00 00 08 b ffc0ef2c return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; ffc0ef28: 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) ) { ffc0ef2c: 7f 63 db 78 mr r3,r27 ffc0ef30: 4b ff 75 c1 bl ffc064f0 ffc0ef34: 7f 1c e8 00 cmpw cr6,r28,r29 ffc0ef38: 2f 83 00 00 cmpwi cr7,r3,0 token[i] = c; if ( i == IMFS_NAME_MAX ) ffc0ef3c: 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) ) { ffc0ef40: 40 9e 00 40 bne- cr7,ffc0ef80 ffc0ef44: 40 98 00 3c bge- cr6,ffc0ef80 <== NEVER TAKEN token[i] = c; ffc0ef48: 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]; ffc0ef4c: 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 ) ffc0ef50: 40 86 ff d8 bne+ cr1,ffc0ef28 return IMFS_INVALID_TOKEN; ffc0ef54: 38 60 00 04 li r3,4 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } ffc0ef58: 80 01 00 24 lwz r0,36(r1) ffc0ef5c: 83 41 00 08 lwz r26,8(r1) ffc0ef60: 7c 08 03 a6 mtlr r0 ffc0ef64: 83 61 00 0c lwz r27,12(r1) ffc0ef68: 83 81 00 10 lwz r28,16(r1) ffc0ef6c: 83 a1 00 14 lwz r29,20(r1) ffc0ef70: 83 c1 00 18 lwz r30,24(r1) ffc0ef74: 83 e1 00 1c lwz r31,28(r1) ffc0ef78: 38 21 00 20 addi r1,r1,32 ffc0ef7c: 4e 80 00 20 blr /* * Copy a seperator into token. */ if ( i == 0 ) { ffc0ef80: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0ef84: 40 9e 00 28 bne- cr7,ffc0efac token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0ef88: 2f 9b 00 00 cmpwi cr7,r27,0 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; ffc0ef8c: 9b 7e 00 00 stb r27,0(r30) if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; ffc0ef90: 38 60 00 00 li r3,0 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0ef94: 41 9e 00 10 beq- cr7,ffc0efa4 ffc0ef98: 2f 9d 00 00 cmpwi cr7,r29,0 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; ffc0ef9c: 7f 83 e3 78 mr r3,r28 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0efa0: 40 9e 00 8c bne- cr7,ffc0f02c /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0efa4: 93 9a 00 00 stw r28,0(r26) ffc0efa8: 4b ff ff b0 b ffc0ef58 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { ffc0efac: 7d 3e e2 14 add r9,r30,r28 ffc0efb0: 88 09 ff ff lbz r0,-1(r9) ffc0efb4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0efb8: 41 9e 00 0c beq- cr7,ffc0efc4 <== NEVER TAKEN token[i] = '\0'; ffc0efbc: 38 00 00 00 li r0,0 ffc0efc0: 7c 1e e1 ae stbx r0,r30,r28 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0efc4: 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 ) ffc0efc8: 3c 80 ff c2 lis r4,-62 ffc0efcc: 7f c3 f3 78 mr r3,r30 ffc0efd0: 38 84 0d 74 addi r4,r4,3444 ffc0efd4: 48 00 61 09 bl ffc150dc ffc0efd8: 2f 83 00 00 cmpwi cr7,r3,0 type = IMFS_UP_DIR; ffc0efdc: 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 ) ffc0efe0: 41 be ff 78 beq- cr7,ffc0ef58 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) ffc0efe4: 3c 80 ff c2 lis r4,-62 ffc0efe8: 7f c3 f3 78 mr r3,r30 ffc0efec: 38 84 0d 70 addi r4,r4,3440 ffc0eff0: 48 00 60 ed bl ffc150dc type = IMFS_CURRENT_DIR; } return type; } ffc0eff4: 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 ) ffc0eff8: 30 63 ff ff addic r3,r3,-1 ffc0effc: 7c 63 19 10 subfe r3,r3,r3 type = IMFS_CURRENT_DIR; } return type; } ffc0f000: 83 41 00 08 lwz r26,8(r1) ffc0f004: 7c 08 03 a6 mtlr r0 ffc0f008: 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 ) ffc0f00c: 54 63 00 3c rlwinm r3,r3,0,0,30 type = IMFS_CURRENT_DIR; } return type; } ffc0f010: 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 ) ffc0f014: 38 63 00 03 addi r3,r3,3 type = IMFS_CURRENT_DIR; } return type; } ffc0f018: 83 a1 00 14 lwz r29,20(r1) ffc0f01c: 83 c1 00 18 lwz r30,24(r1) ffc0f020: 83 e1 00 1c lwz r31,28(r1) ffc0f024: 38 21 00 20 addi r1,r1,32 ffc0f028: 4e 80 00 20 blr if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; ffc0f02c: 3b 80 00 01 li r28,1 type = IMFS_CURRENT_DIR; ffc0f030: 38 60 00 01 li r3,1 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0f034: 93 9a 00 00 stw r28,0(r26) ffc0f038: 4b ff ff 20 b ffc0ef58 =============================================================================== 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 27 38 lwz r0,10040(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 e8 stw r0,10216(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 9e 0d bl ffc0e0a4 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 0d 18 addi r4,r4,3352 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 01 08 0d bl ffc14ac8 /* * 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 ec lwz r10,10476(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 ec stw r8,10476(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 fa 55 bl ffc13d8c <__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 =============================================================================== ffc1216c : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc1216c: 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 ) ffc12170: 3d 20 00 00 lis r9,0 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc12174: 7c 08 02 a6 mflr r0 ffc12178: 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 ) ffc1217c: 83 a9 27 e8 lwz r29,10216(r9) */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc12180: 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 ) ffc12184: 57 a9 f0 be rlwinm r9,r29,30,2,31 ffc12188: 39 69 00 01 addi r11,r9,1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc1218c: 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 ) ffc12190: 7d 6b 49 d6 mullw r11,r11,r9 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc12194: 93 81 00 28 stw r28,40(r1) ffc12198: 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 ) ffc1219c: 38 0b 00 01 addi r0,r11,1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc121a0: 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 ) ffc121a4: 39 60 00 00 li r11,0 ffc121a8: 7f 8b 28 00 cmpw cr7,r11,r5 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc121ac: 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 ) ffc121b0: 7d 20 49 d6 mullw r9,r0,r9 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc121b4: 93 21 00 1c stw r25,28(r1) ffc121b8: 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 ) ffc121bc: 39 29 ff ff addi r9,r9,-1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc121c0: 93 61 00 24 stw r27,36(r1) ffc121c4: 7c 7f 1b 78 mr r31,r3 ffc121c8: 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 ) ffc121cc: 7d 29 e9 d6 mullw r9,r9,r29 ffc121d0: 40 9d 01 78 ble- cr7,ffc12348 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 ) ffc121d4: 83 7f 00 50 lwz r27,80(r31) ffc121d8: 83 3f 00 54 lwz r25,84(r31) ffc121dc: 7f 9c d8 00 cmpw cr7,r28,r27 ffc121e0: 40 9d 00 c4 ble- cr7,ffc122a4 <== ALWAYS TAKEN return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc121e4: 7f b8 fe 70 srawi r24,r29,31 ffc121e8: 7f 05 c3 78 mr r5,r24 ffc121ec: 7f a6 eb 78 mr r6,r29 ffc121f0: 7f 83 e3 78 mr r3,r28 ffc121f4: 7f 44 d3 78 mr r4,r26 ffc121f8: 48 00 b2 c9 bl ffc1d4c0 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc121fc: 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; ffc12200: 7c 9e 23 78 mr r30,r4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc12204: 7f 05 c3 78 mr r5,r24 ffc12208: 7f 24 cb 78 mr r4,r25 ffc1220c: 7f a6 eb 78 mr r6,r29 ffc12210: 48 00 b2 b1 bl ffc1d4c0 <__divdi3> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc12214: 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; ffc12218: 7c 9b 23 78 mr r27,r4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc1221c: 41 9c 00 c8 blt- cr7,ffc122e4 <== NEVER TAKEN ffc12220: 7c 9d 23 78 mr r29,r4 ffc12224: 48 00 00 10 b ffc12234 ffc12228: 3b bd 00 01 addi r29,r29,1 ffc1222c: 7f 9e e8 40 cmplw cr7,r30,r29 ffc12230: 41 9c 00 b4 blt- cr7,ffc122e4 if ( IMFS_memfile_addblock( the_jnode, block ) ) { ffc12234: 7f a4 eb 78 mr r4,r29 ffc12238: 7f e3 fb 78 mr r3,r31 ffc1223c: 4b ff fc 2d bl ffc11e68 ffc12240: 2f 83 00 00 cmpwi cr7,r3,0 ffc12244: 41 9e ff e4 beq+ cr7,ffc12228 ffc12248: 48 00 00 14 b ffc1225c for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); ffc1224c: 7f a4 eb 78 mr r4,r29 ffc12250: 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-- ) { ffc12254: 3b bd ff ff addi r29,r29,-1 IMFS_memfile_remove_block( the_jnode, block ); ffc12258: 4b ff fe d9 bl ffc12130 /* * 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-- ) { ffc1225c: 7f 9b e8 40 cmplw cr7,r27,r29 ffc12260: 40 9d ff ec ble+ cr7,ffc1224c IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); ffc12264: 48 00 1b 29 bl ffc13d8c <__errno> ffc12268: 38 00 00 1c li r0,28 ffc1226c: 90 03 00 00 stw r0,0(r3) ffc12270: 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; } ffc12274: 80 01 00 3c lwz r0,60(r1) ffc12278: 83 01 00 18 lwz r24,24(r1) ffc1227c: 7c 08 03 a6 mtlr r0 ffc12280: 83 21 00 1c lwz r25,28(r1) ffc12284: 83 41 00 20 lwz r26,32(r1) ffc12288: 83 61 00 24 lwz r27,36(r1) ffc1228c: 83 81 00 28 lwz r28,40(r1) ffc12290: 83 a1 00 2c lwz r29,44(r1) ffc12294: 83 c1 00 30 lwz r30,48(r1) ffc12298: 83 e1 00 34 lwz r31,52(r1) ffc1229c: 38 21 00 38 addi r1,r1,56 ffc122a0: 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 ) ffc122a4: 40 9e 00 0c bne- cr7,ffc122b0 ffc122a8: 7f 9a c8 40 cmplw cr7,r26,r25 ffc122ac: 41 9d ff 38 bgt+ cr7,ffc121e4 the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } ffc122b0: 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; ffc122b4: 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; } ffc122b8: 83 01 00 18 lwz r24,24(r1) ffc122bc: 7c 08 03 a6 mtlr r0 ffc122c0: 83 21 00 1c lwz r25,28(r1) ffc122c4: 83 41 00 20 lwz r26,32(r1) ffc122c8: 83 61 00 24 lwz r27,36(r1) ffc122cc: 83 81 00 28 lwz r28,40(r1) ffc122d0: 83 a1 00 2c lwz r29,44(r1) ffc122d4: 83 c1 00 30 lwz r30,48(r1) ffc122d8: 83 e1 00 34 lwz r31,52(r1) ffc122dc: 38 21 00 38 addi r1,r1,56 ffc122e0: 4e 80 00 20 blr } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc122e4: 93 9f 00 50 stw r28,80(r31) IMFS_update_ctime(the_jnode); ffc122e8: 38 80 00 00 li r4,0 ffc122ec: 38 61 00 08 addi r3,r1,8 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc122f0: 93 5f 00 54 stw r26,84(r31) IMFS_update_ctime(the_jnode); ffc122f4: 4b ff 2f 71 bl ffc05264 ffc122f8: 80 01 00 08 lwz r0,8(r1) IMFS_update_mtime(the_jnode); ffc122fc: 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); ffc12300: 90 1f 00 48 stw r0,72(r31) IMFS_update_mtime(the_jnode); ffc12304: 38 80 00 00 li r4,0 ffc12308: 4b ff 2f 5d bl ffc05264 ffc1230c: 80 01 00 08 lwz r0,8(r1) return 0; ffc12310: 38 60 00 00 li r3,0 } ffc12314: 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); ffc12318: 90 1f 00 44 stw r0,68(r31) return 0; } ffc1231c: 80 01 00 3c lwz r0,60(r1) ffc12320: 83 21 00 1c lwz r25,28(r1) ffc12324: 7c 08 03 a6 mtlr r0 ffc12328: 83 41 00 20 lwz r26,32(r1) ffc1232c: 83 61 00 24 lwz r27,36(r1) ffc12330: 83 81 00 28 lwz r28,40(r1) ffc12334: 83 a1 00 2c lwz r29,44(r1) ffc12338: 83 c1 00 30 lwz r30,48(r1) ffc1233c: 83 e1 00 34 lwz r31,52(r1) ffc12340: 38 21 00 38 addi r1,r1,56 ffc12344: 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 ) ffc12348: 40 9e 00 0c bne- cr7,ffc12354 <== NEVER TAKEN ffc1234c: 7f 89 30 40 cmplw cr7,r9,r6 ffc12350: 41 9d fe 84 bgt+ cr7,ffc121d4 rtems_set_errno_and_return_minus_one( EINVAL ); ffc12354: 48 00 1a 39 bl ffc13d8c <__errno> ffc12358: 38 00 00 16 li r0,22 ffc1235c: 90 03 00 00 stw r0,0(r3) ffc12360: 38 60 ff ff li r3,-1 ffc12364: 4b ff ff 10 b ffc12274 =============================================================================== ffc118a8 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc118a8: 94 21 ff d8 stwu r1,-40(r1) ffc118ac: 7c 08 02 a6 mflr r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc118b0: 3d 20 00 00 lis r9,0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc118b4: 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 ) { ffc118b8: 80 09 27 e8 lwz r0,10216(r9) #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc118bc: 93 e1 00 24 stw r31,36(r1) ffc118c0: 7c 7f 1b 78 mr r31,r3 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc118c4: 54 09 f0 be rlwinm r9,r0,30,2,31 ffc118c8: 38 09 ff ff addi r0,r9,-1 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc118cc: 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 ) { ffc118d0: 7f 84 00 40 cmplw cr7,r4,r0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc118d4: 93 81 00 18 stw r28,24(r1) ffc118d8: 93 a1 00 1c stw r29,28(r1) ffc118dc: 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 ) { ffc118e0: 41 9d 00 4c bgt- cr7,ffc1192c p = info->indirect; if ( malloc_it ) { ffc118e4: 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; ffc118e8: 80 63 00 58 lwz r3,88(r3) if ( malloc_it ) { ffc118ec: 40 9e 01 5c bne- cr7,ffc11a48 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) ffc118f0: 2f 83 00 00 cmpwi cr7,r3,0 return 0; ffc118f4: 3b c0 00 00 li r30,0 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) ffc118f8: 41 9e 00 0c beq- cr7,ffc11904 <== NEVER TAKEN return 0; return &info->indirect[ my_block ]; ffc118fc: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc11900: 7f c3 22 14 add r30,r3,r4 /* * This means the requested block number is out of range. */ return 0; } ffc11904: 80 01 00 2c lwz r0,44(r1) ffc11908: 7f c3 f3 78 mr r3,r30 ffc1190c: 83 61 00 14 lwz r27,20(r1) ffc11910: 7c 08 03 a6 mtlr r0 ffc11914: 83 81 00 18 lwz r28,24(r1) ffc11918: 83 a1 00 1c lwz r29,28(r1) ffc1191c: 83 c1 00 20 lwz r30,32(r1) ffc11920: 83 e1 00 24 lwz r31,36(r1) ffc11924: 38 21 00 28 addi r1,r1,40 ffc11928: 4e 80 00 20 blr /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { ffc1192c: 3b 69 00 01 addi r27,r9,1 ffc11930: 7f 7b 49 d6 mullw r27,r27,r9 ffc11934: 38 1b ff ff addi r0,r27,-1 ffc11938: 7f 84 00 40 cmplw cr7,r4,r0 ffc1193c: 40 9d 00 a4 ble- cr7,ffc119e0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc11940: 39 7b 00 01 addi r11,r27,1 ffc11944: 7d 6b 49 d6 mullw r11,r11,r9 } /* * This means the requested block number is out of range. */ return 0; ffc11948: 3b c0 00 00 li r30,0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc1194c: 38 0b ff ff addi r0,r11,-1 ffc11950: 7f 84 00 40 cmplw cr7,r4,r0 ffc11954: 41 bd ff b0 bgt- cr7,ffc11904 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; ffc11958: 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; ffc1195c: 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; ffc11960: 7d 64 4b 96 divwu r11,r4,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; ffc11964: 7f ab 4b 96 divwu r29,r11,r9 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { ffc11968: 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; ffc1196c: 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; ffc11970: 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; ffc11974: 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; ffc11978: 7f 89 58 50 subf r28,r9,r11 p = info->triply_indirect; if ( malloc_it ) { ffc1197c: 41 9e 01 40 beq- cr7,ffc11abc if ( !p ) { ffc11980: 2f 8a 00 00 cmpwi cr7,r10,0 ffc11984: 41 9e 01 f0 beq- cr7,ffc11b74 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; ffc11988: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc1198c: 7d 6a e8 2e lwzx r11,r10,r29 ffc11990: 7f aa ea 14 add r29,r10,r29 if ( !p1 ) { ffc11994: 2f 8b 00 00 cmpwi cr7,r11,0 ffc11998: 41 9e 01 c4 beq- cr7,ffc11b5c if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; ffc1199c: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc119a0: 7c 6b e0 2e lwzx r3,r11,r28 ffc119a4: 7f 8b e2 14 add r28,r11,r28 if ( !p2 ) { ffc119a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc119ac: 41 9e 01 80 beq- cr7,ffc11b2c /* * This means the requested block number is out of range. */ return 0; } ffc119b0: 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 ]; ffc119b4: 57 7e 10 3a rlwinm r30,r27,2,0,29 ffc119b8: 7f c3 f2 14 add r30,r3,r30 /* * This means the requested block number is out of range. */ return 0; } ffc119bc: 83 61 00 14 lwz r27,20(r1) ffc119c0: 7c 08 03 a6 mtlr r0 ffc119c4: 7f c3 f3 78 mr r3,r30 ffc119c8: 83 81 00 18 lwz r28,24(r1) ffc119cc: 83 a1 00 1c lwz r29,28(r1) ffc119d0: 83 c1 00 20 lwz r30,32(r1) ffc119d4: 83 e1 00 24 lwz r31,36(r1) ffc119d8: 38 21 00 28 addi r1,r1,40 ffc119dc: 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; ffc119e0: 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; ffc119e4: 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; ffc119e8: 7f a4 4b 96 divwu r29,r4,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc119ec: 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; ffc119f0: 7d 3d 49 d6 mullw r9,r29,r9 ffc119f4: 7f 89 20 50 subf r28,r9,r4 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc119f8: 41 9e 00 78 beq- cr7,ffc11a70 if ( !p ) { ffc119fc: 2f 8b 00 00 cmpwi cr7,r11,0 ffc11a00: 41 9e 01 44 beq- cr7,ffc11b44 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; ffc11a04: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc11a08: 7c 6b e8 2e lwzx r3,r11,r29 ffc11a0c: 7f ab ea 14 add r29,r11,r29 if ( !p1 ) { ffc11a10: 2f 83 00 00 cmpwi cr7,r3,0 ffc11a14: 41 9e 01 00 beq- cr7,ffc11b14 /* * This means the requested block number is out of range. */ return 0; } ffc11a18: 80 01 00 2c lwz r0,44(r1) if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; ffc11a1c: 57 9e 10 3a rlwinm r30,r28,2,0,29 ffc11a20: 7f c3 f2 14 add r30,r3,r30 /* * This means the requested block number is out of range. */ return 0; } ffc11a24: 83 61 00 14 lwz r27,20(r1) ffc11a28: 7c 08 03 a6 mtlr r0 ffc11a2c: 7f c3 f3 78 mr r3,r30 ffc11a30: 83 81 00 18 lwz r28,24(r1) ffc11a34: 83 a1 00 1c lwz r29,28(r1) ffc11a38: 83 c1 00 20 lwz r30,32(r1) ffc11a3c: 83 e1 00 24 lwz r31,36(r1) ffc11a40: 38 21 00 28 addi r1,r1,40 ffc11a44: 4e 80 00 20 blr if ( my_block <= LAST_INDIRECT ) { p = info->indirect; if ( malloc_it ) { if ( !p ) { ffc11a48: 2f 83 00 00 cmpwi cr7,r3,0 ffc11a4c: 40 9e fe b0 bne+ cr7,ffc118fc p = memfile_alloc_block(); ffc11a50: 90 81 00 08 stw r4,8(r1) ffc11a54: 4b ff fe 11 bl ffc11864 if ( !p ) ffc11a58: 2c 03 00 00 cmpwi r3,0 return 0; ffc11a5c: 3b c0 00 00 li r30,0 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) ffc11a60: 80 81 00 08 lwz r4,8(r1) ffc11a64: 41 a2 fe a0 beq- ffc11904 <== NEVER TAKEN return 0; info->indirect = p; ffc11a68: 90 7f 00 58 stw r3,88(r31) ffc11a6c: 4b ff fe 90 b ffc118fc } return (block_p *)&p1[ singly ]; } if ( !p ) ffc11a70: 2f 8b 00 00 cmpwi cr7,r11,0 return 0; ffc11a74: 3b c0 00 00 li r30,0 } return (block_p *)&p1[ singly ]; } if ( !p ) ffc11a78: 41 be fe 8c beq- cr7,ffc11904 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; ffc11a7c: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc11a80: 7c 0b e8 2e lwzx r0,r11,r29 if ( !p ) ffc11a84: 2f 80 00 00 cmpwi cr7,r0,0 ffc11a88: 41 be fe 7c beq- cr7,ffc11904 <== NEVER TAKEN return 0; return (block_p *)&p[ singly ]; ffc11a8c: 57 9e 10 3a rlwinm r30,r28,2,0,29 /* * This means the requested block number is out of range. */ return 0; } ffc11a90: 83 61 00 14 lwz r27,20(r1) p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; ffc11a94: 7f c0 f2 14 add r30,r0,r30 /* * This means the requested block number is out of range. */ return 0; } ffc11a98: 80 01 00 2c lwz r0,44(r1) ffc11a9c: 7f c3 f3 78 mr r3,r30 ffc11aa0: 83 81 00 18 lwz r28,24(r1) ffc11aa4: 7c 08 03 a6 mtlr r0 ffc11aa8: 83 a1 00 1c lwz r29,28(r1) ffc11aac: 83 c1 00 20 lwz r30,32(r1) ffc11ab0: 83 e1 00 24 lwz r31,36(r1) ffc11ab4: 38 21 00 28 addi r1,r1,40 ffc11ab8: 4e 80 00 20 blr p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) ffc11abc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc11ac0: 41 be fe 44 beq- cr7,ffc11904 <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; ffc11ac4: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc11ac8: 7d 6a e8 2e lwzx r11,r10,r29 if ( !p1 ) ffc11acc: 2f 8b 00 00 cmpwi cr7,r11,0 ffc11ad0: 41 be fe 34 beq- cr7,ffc11904 <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; ffc11ad4: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc11ad8: 7c 0b e0 2e lwzx r0,r11,r28 if ( !p2 ) ffc11adc: 2f 80 00 00 cmpwi cr7,r0,0 ffc11ae0: 41 be fe 24 beq- cr7,ffc11904 <== NEVER TAKEN return 0; return (block_p *)&p2[ singly ]; ffc11ae4: 57 7e 10 3a rlwinm r30,r27,2,0,29 /* * This means the requested block number is out of range. */ return 0; } ffc11ae8: 83 81 00 18 lwz r28,24(r1) p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; ffc11aec: 7f c0 f2 14 add r30,r0,r30 /* * This means the requested block number is out of range. */ return 0; } ffc11af0: 80 01 00 2c lwz r0,44(r1) ffc11af4: 7f c3 f3 78 mr r3,r30 ffc11af8: 83 61 00 14 lwz r27,20(r1) ffc11afc: 7c 08 03 a6 mtlr r0 ffc11b00: 83 a1 00 1c lwz r29,28(r1) ffc11b04: 83 c1 00 20 lwz r30,32(r1) ffc11b08: 83 e1 00 24 lwz r31,36(r1) ffc11b0c: 38 21 00 28 addi r1,r1,40 ffc11b10: 4e 80 00 20 blr info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); ffc11b14: 4b ff fd 51 bl ffc11864 if ( !p1 ) return 0; ffc11b18: 3b c0 00 00 li r30,0 } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) ffc11b1c: 2c 03 00 00 cmpwi r3,0 ffc11b20: 41 a2 fd e4 beq- ffc11904 <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; ffc11b24: 90 7d 00 00 stw r3,0(r29) ffc11b28: 4b ff fe f0 b ffc11a18 p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); ffc11b2c: 4b ff fd 39 bl ffc11864 if ( !p2 ) return 0; ffc11b30: 3b c0 00 00 li r30,0 } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) ffc11b34: 2c 03 00 00 cmpwi r3,0 ffc11b38: 41 a2 fd cc beq- ffc11904 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; ffc11b3c: 90 7c 00 00 stw r3,0(r28) ffc11b40: 4b ff fe 70 b ffc119b0 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc11b44: 4b ff fd 21 bl ffc11864 if ( !p ) return 0; ffc11b48: 3b c0 00 00 li r30,0 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) ffc11b4c: 7c 6b 1b 79 mr. r11,r3 ffc11b50: 41 a2 fd b4 beq- ffc11904 <== NEVER TAKEN return 0; info->doubly_indirect = p; ffc11b54: 91 7f 00 5c stw r11,92(r31) ffc11b58: 4b ff fe ac b ffc11a04 info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); ffc11b5c: 4b ff fd 09 bl ffc11864 if ( !p1 ) return 0; ffc11b60: 3b c0 00 00 li r30,0 } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) ffc11b64: 7c 6b 1b 79 mr. r11,r3 ffc11b68: 41 a2 fd 9c beq- ffc11904 <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; ffc11b6c: 91 7d 00 00 stw r11,0(r29) ffc11b70: 4b ff fe 2c b ffc1199c p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc11b74: 4b ff fc f1 bl ffc11864 if ( !p ) ffc11b78: 7c 6a 1b 79 mr. r10,r3 ffc11b7c: 41 a2 fd 88 beq- ffc11904 <== NEVER TAKEN return 0; info->triply_indirect = p; ffc11b80: 91 5f 00 60 stw r10,96(r31) ffc11b84: 4b ff fe 04 b ffc11988 =============================================================================== ffc11b88 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc11b88: 94 21 ff c0 stwu r1,-64(r1) ffc11b8c: 7c 08 02 a6 mflr r0 ffc11b90: 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) { ffc11b94: 80 03 00 4c lwz r0,76(r3) IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc11b98: 93 81 00 30 stw r28,48(r1) ffc11b9c: 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) { ffc11ba0: 2f 80 00 06 cmpwi cr7,r0,6 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc11ba4: 93 a1 00 34 stw r29,52(r1) ffc11ba8: 7c 7d 1b 78 mr r29,r3 ffc11bac: 93 c1 00 38 stw r30,56(r1) ffc11bb0: 7c be 2b 78 mr r30,r5 ffc11bb4: 93 e1 00 3c stw r31,60(r1) ffc11bb8: 7c df 33 78 mr r31,r6 ffc11bbc: 92 e1 00 1c stw r23,28(r1) ffc11bc0: 93 01 00 20 stw r24,32(r1) ffc11bc4: 93 21 00 24 stw r25,36(r1) ffc11bc8: 93 41 00 28 stw r26,40(r1) ffc11bcc: 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) { ffc11bd0: 41 9e 01 d0 beq- cr7,ffc11da0 /* * 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 ) ffc11bd4: 80 03 00 50 lwz r0,80(r3) ffc11bd8: 39 20 00 00 li r9,0 ffc11bdc: 83 43 00 54 lwz r26,84(r3) ffc11be0: 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; ffc11be4: 7c c0 33 78 mr r0,r6 ffc11be8: 7d 28 32 14 add r9,r8,r6 if ( last_byte > the_jnode->info.file.size ) ffc11bec: 40 9d 01 28 ble- cr7,ffc11d14 <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; ffc11bf0: 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; ffc11bf4: 3f 20 00 00 lis r25,0 ffc11bf8: 83 79 27 e8 lwz r27,10216(r25) ffc11bfc: 7f c3 f3 78 mr r3,r30 ffc11c00: 7f e4 fb 78 mr r4,r31 ffc11c04: 7f 78 fe 70 srawi r24,r27,31 ffc11c08: 7f 05 c3 78 mr r5,r24 ffc11c0c: 7f 66 db 78 mr r6,r27 ffc11c10: 48 00 bc f1 bl ffc1d900 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11c14: 7f c3 f3 78 mr r3,r30 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11c18: 7c 97 23 78 mr r23,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11c1c: 7f 05 c3 78 mr r5,r24 ffc11c20: 7f e4 fb 78 mr r4,r31 ffc11c24: 7f 66 db 78 mr r6,r27 ffc11c28: 48 00 b8 99 bl ffc1d4c0 <__divdi3> if ( start_offset ) { ffc11c2c: 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; ffc11c30: 7c 9e 23 78 mr r30,r4 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; ffc11c34: 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; ffc11c38: 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 ) { ffc11c3c: 41 9e 00 50 beq- cr7,ffc11c8c 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 ); ffc11c40: 7f a3 eb 78 mr r3,r29 ffc11c44: 38 a0 00 00 li r5,0 ffc11c48: 4b ff fc 61 bl ffc118a8 if ( !block_ptr ) ffc11c4c: 7c 69 1b 79 mr. r9,r3 return copied; ffc11c50: 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 ) ffc11c54: 41 82 00 8c beq- ffc11ce0 <== 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; ffc11c58: 7f 77 d8 50 subf r27,r23,r27 ffc11c5c: 7f 9a d8 40 cmplw cr7,r26,r27 ffc11c60: 7f 5f d3 78 mr r31,r26 ffc11c64: 41 9d 01 cc bgt- cr7,ffc11e30 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 ); ffc11c68: 80 89 00 00 lwz r4,0(r9) ffc11c6c: 7f 83 e3 78 mr r3,r28 ffc11c70: 7f e5 fb 78 mr r5,r31 ffc11c74: 7c 84 ba 14 add r4,r4,r23 ffc11c78: 48 00 2e 51 bl ffc14ac8 dest += to_copy; block++; my_length -= to_copy; ffc11c7c: 83 79 27 e8 lwz r27,10216(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; ffc11c80: 7f 1c fa 14 add r24,r28,r31 block++; ffc11c84: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; ffc11c88: 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 ) { ffc11c8c: 7f 9a d8 40 cmplw cr7,r26,r27 ffc11c90: 40 bc 00 20 bge+ cr7,ffc11cb0 ffc11c94: 48 00 00 8c b ffc11d20 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc11c98: 80 89 00 00 lwz r4,0(r9) dest += to_copy; block++; my_length -= to_copy; copied += to_copy; ffc11c9c: 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 ); ffc11ca0: 48 00 2e 29 bl ffc14ac8 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc11ca4: 80 19 27 e8 lwz r0,10216(r25) ffc11ca8: 7f 80 d0 40 cmplw cr7,r0,r26 ffc11cac: 41 9d 00 74 bgt- cr7,ffc11d20 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11cb0: 7f c4 f3 78 mr r4,r30 ffc11cb4: 38 a0 00 00 li r5,0 ffc11cb8: 7f a3 eb 78 mr r3,r29 ffc11cbc: 4b ff fb ed bl ffc118a8 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; ffc11cc0: 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 ) ffc11cc4: 7c 69 1b 79 mr. r9,r3 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc11cc8: 7f 65 db 78 mr r5,r27 ffc11ccc: 7f 03 c3 78 mr r3,r24 dest += to_copy; block++; ffc11cd0: 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; ffc11cd4: 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 ) ffc11cd8: 40 82 ff c0 bne+ ffc11c98 <== 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; ffc11cdc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } ffc11ce0: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc11ce4: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc11ce8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc11cec: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc11cf0: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc11cf4: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc11cf8: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc11cfc: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc11d00: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc11d04: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc11d08: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc11d0c: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc11d10: 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 ) ffc11d14: 41 9e 01 0c beq- cr7,ffc11e20 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc11d18: 7d 1a 43 78 mr r26,r8 <== NOT EXECUTED ffc11d1c: 4b ff fe d8 b ffc11bf4 <== NOT EXECUTED /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { ffc11d20: 2f 9a 00 00 cmpwi cr7,r26,0 ffc11d24: 41 9e 00 30 beq- cr7,ffc11d54 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11d28: 7f a3 eb 78 mr r3,r29 ffc11d2c: 7f c4 f3 78 mr r4,r30 ffc11d30: 38 a0 00 00 li r5,0 ffc11d34: 4b ff fb 75 bl ffc118a8 if ( !block_ptr ) ffc11d38: 2c 03 00 00 cmpwi r3,0 ffc11d3c: 41 a2 ff a0 beq- ffc11cdc <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); ffc11d40: 80 83 00 00 lwz r4,0(r3) ffc11d44: 7f 45 d3 78 mr r5,r26 ffc11d48: 7f 03 c3 78 mr r3,r24 ffc11d4c: 48 00 2d 7d bl ffc14ac8 copied += my_length; ffc11d50: 7f ff d2 14 add r31,r31,r26 } IMFS_update_atime( the_jnode ); ffc11d54: 38 61 00 08 addi r3,r1,8 ffc11d58: 38 80 00 00 li r4,0 ffc11d5c: 4b ff 35 09 bl ffc05264 ffc11d60: 80 01 00 08 lwz r0,8(r1) return copied; ffc11d64: 7f e3 fb 78 mr r3,r31 } ffc11d68: 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 ); ffc11d6c: 90 1d 00 40 stw r0,64(r29) return copied; } ffc11d70: 80 01 00 44 lwz r0,68(r1) ffc11d74: 83 01 00 20 lwz r24,32(r1) ffc11d78: 7c 08 03 a6 mtlr r0 ffc11d7c: 83 21 00 24 lwz r25,36(r1) ffc11d80: 83 41 00 28 lwz r26,40(r1) ffc11d84: 83 61 00 2c lwz r27,44(r1) ffc11d88: 83 81 00 30 lwz r28,48(r1) ffc11d8c: 83 a1 00 34 lwz r29,52(r1) ffc11d90: 83 c1 00 38 lwz r30,56(r1) ffc11d94: 83 e1 00 3c lwz r31,60(r1) ffc11d98: 38 21 00 40 addi r1,r1,64 ffc11d9c: 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)) ffc11da0: 81 43 00 50 lwz r10,80(r3) ffc11da4: 38 00 00 00 li r0,0 ffc11da8: 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; ffc11dac: 80 83 00 58 lwz r4,88(r3) if (my_length > (the_jnode->info.linearfile.size - start)) ffc11db0: 7c ff 58 10 subfc r7,r31,r11 ffc11db4: 7c de 51 10 subfe r6,r30,r10 ffc11db8: 7f 80 30 00 cmpw cr7,r0,r6 ffc11dbc: 40 9d 00 7c ble- cr7,ffc11e38 <== ALWAYS TAKEN my_length = the_jnode->info.linearfile.size - start; ffc11dc0: 7f 5f 58 50 subf r26,r31,r11 memcpy(dest, &file_ptr[start], my_length); ffc11dc4: 7c 84 fa 14 add r4,r4,r31 ffc11dc8: 7f 45 d3 78 mr r5,r26 ffc11dcc: 7f 83 e3 78 mr r3,r28 ffc11dd0: 48 00 2c f9 bl ffc14ac8 IMFS_update_atime( the_jnode ); ffc11dd4: 38 61 00 08 addi r3,r1,8 ffc11dd8: 38 80 00 00 li r4,0 ffc11ddc: 4b ff 34 89 bl ffc05264 ffc11de0: 80 01 00 08 lwz r0,8(r1) return my_length; ffc11de4: 7f 43 d3 78 mr r3,r26 } IMFS_update_atime( the_jnode ); return copied; } ffc11de8: 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 ); ffc11dec: 90 1d 00 40 stw r0,64(r29) } IMFS_update_atime( the_jnode ); return copied; } ffc11df0: 80 01 00 44 lwz r0,68(r1) ffc11df4: 83 01 00 20 lwz r24,32(r1) ffc11df8: 7c 08 03 a6 mtlr r0 ffc11dfc: 83 21 00 24 lwz r25,36(r1) ffc11e00: 83 41 00 28 lwz r26,40(r1) ffc11e04: 83 61 00 2c lwz r27,44(r1) ffc11e08: 83 81 00 30 lwz r28,48(r1) ffc11e0c: 83 a1 00 34 lwz r29,52(r1) ffc11e10: 83 c1 00 38 lwz r30,56(r1) ffc11e14: 83 e1 00 3c lwz r31,60(r1) ffc11e18: 38 21 00 40 addi r1,r1,64 ffc11e1c: 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 ) ffc11e20: 7f 89 d0 40 cmplw cr7,r9,r26 ffc11e24: 41 bd fd cc bgt- cr7,ffc11bf0 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc11e28: 7d 1a 43 78 mr r26,r8 ffc11e2c: 4b ff fd c8 b ffc11bf4 * 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; ffc11e30: 7f 7f db 78 mr r31,r27 ffc11e34: 4b ff fe 34 b ffc11c68 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)) ffc11e38: 40 9e 00 0c bne- cr7,ffc11e44 <== NEVER TAKEN ffc11e3c: 7f 88 38 40 cmplw cr7,r8,r7 ffc11e40: 41 9d ff 80 bgt+ cr7,ffc11dc0 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc11e44: 7d 1a 43 78 mr r26,r8 <== NOT EXECUTED ffc11e48: 4b ff ff 7c b ffc11dc4 <== NOT EXECUTED =============================================================================== ffc11f84 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc11f84: 94 21 ff d8 stwu r1,-40(r1) ffc11f88: 7c 08 02 a6 mflr r0 ffc11f8c: 90 01 00 2c stw r0,44(r1) * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc11f90: 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 ) { ffc11f94: 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; ffc11f98: 3f c0 00 00 lis r30,0 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc11f9c: 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 ) { ffc11fa0: 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; ffc11fa4: 83 be 27 e8 lwz r29,10216(r30) * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc11fa8: 93 41 00 10 stw r26,16(r1) ffc11fac: 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; ffc11fb0: 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 ) { ffc11fb4: 93 21 00 0c stw r25,12(r1) ffc11fb8: 93 61 00 14 stw r27,20(r1) ffc11fbc: 93 81 00 18 stw r28,24(r1) ffc11fc0: 93 e1 00 24 stw r31,36(r1) * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc11fc4: 41 9e 00 10 beq- cr7,ffc11fd4 memfile_free_blocks_in_table( &info->indirect, to_free ); ffc11fc8: 38 63 00 58 addi r3,r3,88 ffc11fcc: 7f a4 eb 78 mr r4,r29 ffc11fd0: 4b ff ff 25 bl ffc11ef4 } if ( info->doubly_indirect ) { ffc11fd4: 81 3a 00 5c lwz r9,92(r26) ffc11fd8: 2f 89 00 00 cmpwi cr7,r9,0 ffc11fdc: 41 9e 00 68 beq- cr7,ffc12044 for ( i=0 ; i <== NEVER TAKEN ffc11fec: 3f 80 00 00 lis r28,0 ffc11ff0: 38 60 00 00 li r3,0 ffc11ff4: 3b e0 00 00 li r31,0 ffc11ff8: 3b 9c 27 e8 addi r28,r28,10216 ffc11ffc: 48 00 00 08 b ffc12004 ffc12000: 81 3a 00 5c lwz r9,92(r26) if ( info->doubly_indirect[i] ) { ffc12004: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc12008: 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( ffc12010: 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] ) { ffc12014: 2f 80 00 00 cmpwi cr7,r0,0 ffc12018: 7c 69 1a 14 add r3,r9,r3 ffc1201c: 41 9e 00 08 beq- cr7,ffc12024 <== NEVER TAKEN memfile_free_blocks_in_table( ffc12020: 4b ff fe d5 bl ffc11ef4 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 ); ffc12038: 38 7a 00 5c addi r3,r26,92 ffc1203c: 7f a4 eb 78 mr r4,r29 ffc12040: 4b ff fe b5 bl ffc11ef4 } if ( info->triply_indirect ) { ffc12044: 80 7a 00 60 lwz r3,96(r26) ffc12048: 2f 83 00 00 cmpwi cr7,r3,0 ffc1204c: 41 9e 00 b4 beq- cr7,ffc12100 for ( i=0 ; i <== NEVER TAKEN p = (block_p *) info->triply_indirect[i]; ffc1205c: 83 c3 00 00 lwz r30,0(r3) if ( !p ) /* ensure we have a valid pointer */ ffc12060: 2f 9e 00 00 cmpwi cr7,r30,0 ffc12064: 41 9e 00 90 beq- cr7,ffc120f4 <== NEVER TAKEN ffc12068: 3f 80 00 00 lis r28,0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc1206c: 3b 20 00 00 li r25,0 if ( !p ) /* ensure we have a valid pointer */ ffc12070: 3b 60 00 00 li r27,0 ffc12074: 3b 9c 27 e8 addi r28,r28,10216 break; for ( j=0 ; j<== NEVER TAKEN ffc12080: 38 60 00 00 li r3,0 ffc12084: 3b e0 00 00 li r31,0 if ( p[j] ) { ffc12088: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc1208c: 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); ffc120a4: 4b ff fe 51 bl ffc11ef4 if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j ffc120bc: 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( ffc120c0: 7c 63 ca 14 add r3,r3,r25 ffc120c4: 7f a4 eb 78 mr r4,r29 ffc120c8: 4b ff fe 2d bl ffc11ef4 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]; ffc120e0: 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( ffc120e4: 57 79 10 3a rlwinm r25,r27,2,0,29 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc120e8: 7f c3 c8 2e lwzx r30,r3,r25 if ( !p ) /* ensure we have a valid pointer */ ffc120ec: 2f 9e 00 00 cmpwi cr7,r30,0 ffc120f0: 40 9e ff 88 bne+ cr7,ffc12078 <== ALWAYS TAKEN } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( ffc120f4: 38 7a 00 60 addi r3,r26,96 ffc120f8: 7f a4 eb 78 mr r4,r29 ffc120fc: 4b ff fd f9 bl ffc11ef4 (block_p **)&info->triply_indirect, to_free ); } return 0; } ffc12100: 80 01 00 2c lwz r0,44(r1) ffc12104: 38 60 00 00 li r3,0 ffc12108: 83 21 00 0c lwz r25,12(r1) ffc1210c: 7c 08 03 a6 mtlr r0 ffc12110: 83 41 00 10 lwz r26,16(r1) ffc12114: 83 61 00 14 lwz r27,20(r1) ffc12118: 83 81 00 18 lwz r28,24(r1) ffc1211c: 83 a1 00 1c lwz r29,28(r1) ffc12120: 83 c1 00 20 lwz r30,32(r1) ffc12124: 83 e1 00 24 lwz r31,36(r1) ffc12128: 38 21 00 28 addi r1,r1,40 ffc1212c: 4e 80 00 20 blr =============================================================================== ffc12368 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc12368: 94 21 ff c0 stwu r1,-64(r1) ffc1236c: 7c 08 02 a6 mflr r0 ffc12370: 92 e1 00 1c stw r23,28(r1) ffc12374: 7c f7 3b 78 mr r23,r7 ffc12378: 93 81 00 30 stw r28,48(r1) ffc1237c: 7c bc 2b 78 mr r28,r5 ffc12380: 93 a1 00 34 stw r29,52(r1) ffc12384: 7d 1d 43 78 mr r29,r8 ffc12388: 93 c1 00 38 stw r30,56(r1) ffc1238c: 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; ffc12390: 7c c8 32 14 add r6,r8,r6 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc12394: 93 e1 00 3c stw r31,60(r1) ffc12398: 7c 7f 1b 78 mr r31,r3 ffc1239c: 90 01 00 44 stw r0,68(r1) ffc123a0: 93 01 00 20 stw r24,32(r1) ffc123a4: 93 21 00 24 stw r25,36(r1) ffc123a8: 93 41 00 28 stw r26,40(r1) ffc123ac: 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 ) { ffc123b0: 80 03 00 50 lwz r0,80(r3) ffc123b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc123b8: 41 9c 01 b4 blt- cr7,ffc1256c <== NEVER TAKEN ffc123bc: 41 9e 01 a4 beq- cr7,ffc12560 <== ALWAYS TAKEN */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc123c0: 3f 40 00 00 lis r26,0 ffc123c4: 83 7a 27 e8 lwz r27,10216(r26) ffc123c8: 7f 83 e3 78 mr r3,r28 ffc123cc: 7f c4 f3 78 mr r4,r30 ffc123d0: 7f 79 fe 70 srawi r25,r27,31 ffc123d4: 7f 25 cb 78 mr r5,r25 ffc123d8: 7f 66 db 78 mr r6,r27 ffc123dc: 48 00 b5 25 bl ffc1d900 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc123e0: 7f 83 e3 78 mr r3,r28 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc123e4: 7c 98 23 78 mr r24,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc123e8: 7f 25 cb 78 mr r5,r25 ffc123ec: 7f c4 f3 78 mr r4,r30 ffc123f0: 7f 66 db 78 mr r6,r27 ffc123f4: 48 00 b0 cd bl ffc1d4c0 <__divdi3> if ( start_offset ) { ffc123f8: 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; ffc123fc: 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; ffc12400: 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 ) { ffc12404: 40 9e 00 8c bne- cr7,ffc12490 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc12408: 7f 9d d8 40 cmplw cr7,r29,r27 ffc1240c: 40 bc 00 20 bge+ cr7,ffc1242c ffc12410: 48 00 00 cc b ffc124dc 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 ); ffc12414: 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( ffc12418: 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 ); ffc1241c: 48 00 26 ad bl ffc14ac8 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc12420: 80 1a 27 e8 lwz r0,10216(r26) ffc12424: 7f 80 e8 40 cmplw cr7,r0,r29 ffc12428: 41 9d 00 b4 bgt- cr7,ffc124dc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc1242c: 7f c4 f3 78 mr r4,r30 ffc12430: 38 a0 00 00 li r5,0 ffc12434: 7f e3 fb 78 mr r3,r31 ffc12438: 4b ff f4 71 bl ffc118a8 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; ffc1243c: 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 ) ffc12440: 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 ); ffc12444: 7e e4 bb 78 mr r4,r23 ffc12448: 7f 65 db 78 mr r5,r27 src += to_copy; ffc1244c: 7e f7 da 14 add r23,r23,r27 block++; ffc12450: 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 ) ffc12454: 40 82 ff c0 bne+ ffc12414 <== ALWAYS TAKEN } IMFS_mtime_ctime_update( the_jnode ); return copied; } ffc12458: 80 01 00 44 lwz r0,68(r1) ffc1245c: 7f 83 e3 78 mr r3,r28 ffc12460: 82 e1 00 1c lwz r23,28(r1) ffc12464: 7c 08 03 a6 mtlr r0 ffc12468: 83 01 00 20 lwz r24,32(r1) ffc1246c: 83 21 00 24 lwz r25,36(r1) ffc12470: 83 41 00 28 lwz r26,40(r1) ffc12474: 83 61 00 2c lwz r27,44(r1) ffc12478: 83 81 00 30 lwz r28,48(r1) ffc1247c: 83 a1 00 34 lwz r29,52(r1) ffc12480: 83 c1 00 38 lwz r30,56(r1) ffc12484: 83 e1 00 3c lwz r31,60(r1) ffc12488: 38 21 00 40 addi r1,r1,64 ffc1248c: 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 ); ffc12490: 7f e3 fb 78 mr r3,r31 ffc12494: 38 a0 00 00 li r5,0 ffc12498: 4b ff f4 11 bl ffc118a8 if ( !block_ptr ) return copied; ffc1249c: 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 ) ffc124a0: 2c 03 00 00 cmpwi r3,0 ffc124a4: 41 a2 ff b4 beq- ffc12458 <== 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; ffc124a8: 7f 98 d8 50 subf r28,r24,r27 ffc124ac: 7f 9c e8 40 cmplw cr7,r28,r29 ffc124b0: 41 9d 00 e4 bgt- cr7,ffc12594 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc124b4: 80 63 00 00 lwz r3,0(r3) ffc124b8: 7e e4 bb 78 mr r4,r23 ffc124bc: 7f 85 e3 78 mr r5,r28 ffc124c0: 7c 63 c2 14 add r3,r3,r24 ffc124c4: 48 00 26 05 bl ffc14ac8 src += to_copy; ffc124c8: 7e f7 e2 14 add r23,r23,r28 block++; ffc124cc: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; copied += to_copy; ffc124d0: 83 7a 27 e8 lwz r27,10216(r26) ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; ffc124d4: 7f bc e8 50 subf r29,r28,r29 ffc124d8: 4b ff ff 30 b ffc12408 * 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 ) { ffc124dc: 2f 9d 00 00 cmpwi cr7,r29,0 ffc124e0: 41 9e 00 30 beq- cr7,ffc12510 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc124e4: 7f e3 fb 78 mr r3,r31 ffc124e8: 7f c4 f3 78 mr r4,r30 ffc124ec: 38 a0 00 00 li r5,0 ffc124f0: 4b ff f3 b9 bl ffc118a8 if ( !block_ptr ) ffc124f4: 2c 03 00 00 cmpwi r3,0 ffc124f8: 41 a2 ff 60 beq- ffc12458 <== 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 ); ffc124fc: 80 63 00 00 lwz r3,0(r3) ffc12500: 7e e4 bb 78 mr r4,r23 ffc12504: 7f a5 eb 78 mr r5,r29 ffc12508: 48 00 25 c1 bl ffc14ac8 my_length = 0; copied += to_copy; ffc1250c: 7f 9c ea 14 add r28,r28,r29 } IMFS_mtime_ctime_update( the_jnode ); ffc12510: 38 61 00 08 addi r3,r1,8 ffc12514: 38 80 00 00 li r4,0 ffc12518: 4b ff 2d 4d bl ffc05264 ffc1251c: 80 01 00 08 lwz r0,8(r1) return copied; } ffc12520: 7f 83 e3 78 mr r3,r28 ffc12524: 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 ); ffc12528: 90 1f 00 44 stw r0,68(r31) ffc1252c: 90 1f 00 48 stw r0,72(r31) return copied; } ffc12530: 80 01 00 44 lwz r0,68(r1) ffc12534: 83 01 00 20 lwz r24,32(r1) ffc12538: 7c 08 03 a6 mtlr r0 ffc1253c: 83 21 00 24 lwz r25,36(r1) ffc12540: 83 41 00 28 lwz r26,40(r1) ffc12544: 83 61 00 2c lwz r27,44(r1) ffc12548: 83 81 00 30 lwz r28,48(r1) ffc1254c: 83 a1 00 34 lwz r29,52(r1) ffc12550: 83 c1 00 38 lwz r30,56(r1) ffc12554: 83 e1 00 3c lwz r31,60(r1) ffc12558: 38 21 00 40 addi r1,r1,64 ffc1255c: 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 ) { ffc12560: 80 03 00 54 lwz r0,84(r3) ffc12564: 7f 80 30 40 cmplw cr7,r0,r6 ffc12568: 40 9c fe 58 bge+ cr7,ffc123c0 status = IMFS_memfile_extend( the_jnode, last_byte ); ffc1256c: 7f e3 fb 78 mr r3,r31 ffc12570: 38 a0 00 00 li r5,0 ffc12574: 4b ff fb f9 bl ffc1216c if ( status ) ffc12578: 2f 83 00 00 cmpwi cr7,r3,0 ffc1257c: 41 9e fe 44 beq+ cr7,ffc123c0 rtems_set_errno_and_return_minus_one( ENOSPC ); ffc12580: 48 00 18 0d bl ffc13d8c <__errno> ffc12584: 38 00 00 1c li r0,28 ffc12588: 90 03 00 00 stw r0,0(r3) ffc1258c: 3b 80 ff ff li r28,-1 ffc12590: 4b ff fe c8 b ffc12458 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc12594: 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; ffc12598: 7f bc eb 78 mr r28,r29 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc1259c: 7e e4 bb 78 mr r4,r23 ffc125a0: 7c 63 c2 14 add r3,r3,r24 ffc125a4: 7f 85 e3 78 mr r5,r28 ffc125a8: 48 00 25 21 bl ffc14ac8 src += to_copy; ffc125ac: 7e f7 e2 14 add r23,r23,r28 block++; ffc125b0: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; copied += to_copy; ffc125b4: 83 7a 27 e8 lwz r27,10216(r26) ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; ffc125b8: 7f bc e8 50 subf r29,r28,r29 ffc125bc: 4b ff fe 4c b ffc12408 =============================================================================== 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 f8 09 bl ffc13d8c <__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 d4 lwz r9,10196(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 22 0d bl ffc194fc 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 d4 lwz r9,10196(r30) <== NOT EXECUTED ffc07304: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc07308: 38 84 8e bc addi r4,r4,-28996 <== 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 1f e5 bl ffc192f8 <== 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 c3 lis r9,-61 ffc07334: 39 29 8e 44 addi r9,r9,-29116 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 d4 lwz r9,10196(r30) ffc07350: 3c 60 ff c3 lis r3,-61 ffc07354: 38 63 8e 94 addi r3,r3,-29036 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 2f b9 bl ffc1a31c 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 d4 lwz r9,10196(r30) ffc07384: 3c 60 ff c3 lis r3,-61 ffc07388: 38 63 8e a8 addi r3,r3,-29016 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 2f 85 bl ffc1a31c 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 d4 lwz r9,10196(r30) ffc073b8: 3c 80 ff c3 lis r4,-61 ffc073bc: 80 bf 00 54 lwz r5,84(r31) ffc073c0: 38 84 8e 88 addi r4,r4,-29048 ffc073c4: 80 69 00 08 lwz r3,8(r9) ffc073c8: 4c c6 31 82 crclr 4*cr1+eq ffc073cc: 48 01 1f 2d bl ffc192f8 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); ffc073d0: 3c 60 ff c2 lis r3,-62 ffc073d4: 38 63 7f fc addi r3,r3,32764 ffc073d8: 48 01 41 d1 bl ffc1b5a8 } 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 d4 lwz r9,10196(r30) ffc073f8: 3c 80 ff c3 lis r4,-61 ffc073fc: 80 bf 00 54 lwz r5,84(r31) ffc07400: 38 84 8e 78 addi r4,r4,-29064 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 1e e9 bl ffc192f8 (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 d4 lwz r9,10196(r30) ffc0741c: 38 60 00 2f li r3,47 ffc07420: 80 89 00 08 lwz r4,8(r9) ffc07424: 48 01 1f bd bl ffc193e0 break; ffc07428: 4b ff ff a8 b ffc073d0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", ffc0742c: 81 3e 27 d4 lwz r9,10196(r30) ffc07430: 3c 80 ff c3 lis r4,-61 ffc07434: 80 bf 00 50 lwz r5,80(r31) ffc07438: 38 84 8e 64 addi r4,r4,-29084 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 1e b1 bl ffc192f8 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 01 11 59 bl ffc15774 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 ed bl ffc0a21c <_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 a9 bl ffc0a1ec <_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 =============================================================================== ffc0e0f4 : static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { ffc0e0f4: 94 21 ff e8 stwu r1,-24(r1) ffc0e0f8: 7c 08 02 a6 mflr r0 ffc0e0fc: 93 a1 00 0c stw r29,12(r1) ffc0e100: 7c bd 2b 78 mr r29,r5 ffc0e104: 93 c1 00 10 stw r30,16(r1) ffc0e108: 7c 9e 23 78 mr r30,r4 ffc0e10c: 93 e1 00 14 stw r31,20(r1) ffc0e110: 7c 7f 1b 78 mr r31,r3 ffc0e114: 90 01 00 1c stw r0,28(r1) while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ffc0e118: 48 00 00 34 b ffc0e14c ffc0e11c: 81 3d 00 00 lwz r9,0(r29) ffc0e120: 7c 1f 48 ae lbzx r0,r31,r9 ++(*index); ffc0e124: 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 ) { ffc0e128: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e12c: 41 9e 00 34 beq- cr7,ffc0e160 ffc0e130: 80 1e 00 00 lwz r0,0(r30) ffc0e134: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e138: 41 9e 00 28 beq- cr7,ffc0e160 <== NEVER TAKEN ++(*index); ffc0e13c: 91 3d 00 00 stw r9,0(r29) --(*len); ffc0e140: 81 3e 00 00 lwz r9,0(r30) ffc0e144: 38 09 ff ff addi r0,r9,-1 ffc0e148: 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 ) { ffc0e14c: 80 1d 00 00 lwz r0,0(r29) ffc0e150: 7c 7f 00 ae lbzx r3,r31,r0 ffc0e154: 4b ff 83 9d bl ffc064f0 ffc0e158: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e15c: 40 9e ff c0 bne+ cr7,ffc0e11c ++(*index); --(*len); } } ffc0e160: 80 01 00 1c lwz r0,28(r1) ffc0e164: 83 a1 00 0c lwz r29,12(r1) ffc0e168: 7c 08 03 a6 mtlr r0 ffc0e16c: 83 c1 00 10 lwz r30,16(r1) ffc0e170: 83 e1 00 14 lwz r31,20(r1) ffc0e174: 38 21 00 18 addi r1,r1,24 ffc0e178: 4e 80 00 20 blr =============================================================================== ffc0f178 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc0f178: 94 21 ff f0 stwu r1,-16(r1) ffc0f17c: 7c 08 02 a6 mflr r0 ffc0f180: 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; ffc0f184: 81 23 00 00 lwz r9,0(r3) int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc0f188: 93 e1 00 0c stw r31,12(r1) IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { ffc0f18c: 80 09 00 4c lwz r0,76(r9) ffc0f190: 2b 80 00 07 cmplwi cr7,r0,7 ffc0f194: 40 9d 00 28 ble- cr7,ffc0f1bc <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0f198: 48 00 4b f5 bl ffc13d8c <__errno> ffc0f19c: 38 00 00 86 li r0,134 ffc0f1a0: 90 03 00 00 stw r0,0(r3) ffc0f1a4: 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; } ffc0f1a8: 80 01 00 14 lwz r0,20(r1) ffc0f1ac: 83 e1 00 0c lwz r31,12(r1) ffc0f1b0: 38 21 00 10 addi r1,r1,16 ffc0f1b4: 7c 08 03 a6 mtlr r0 ffc0f1b8: 4e 80 00 20 blr IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { ffc0f1bc: 3d 60 ff c2 lis r11,-62 ffc0f1c0: 39 6b 0e 58 addi r11,r11,3672 ffc0f1c4: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0f1c8: 7c 0b 00 2e lwzx r0,r11,r0 ffc0f1cc: 7d 60 5a 14 add r11,r0,r11 ffc0f1d0: 7d 69 03 a6 mtctr r11 ffc0f1d4: 4e 80 04 20 bctr case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; ffc0f1d8: 39 40 00 00 li r10,0 ffc0f1dc: 39 60 00 00 li r11,0 ffc0f1e0: 91 44 00 20 stw r10,32(r4) ffc0f1e4: 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; ffc0f1e8: 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; ffc0f1ec: 3c 60 00 00 lis r3,0 ffc0f1f0: 80 03 27 38 lwz r0,10040(r3) rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; ffc0f1f4: 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 ); ffc0f1f8: 81 6b 00 34 lwz r11,52(r11) ffc0f1fc: 60 63 ff fe ori r3,r3,65534 buf->st_mode = the_jnode->st_mode; ffc0f200: 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 ); ffc0f204: 83 eb 00 00 lwz r31,0(r11) buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; ffc0f208: a0 a9 00 34 lhz r5,52(r9) buf->st_ino = the_jnode->st_ino; ffc0f20c: 80 c9 00 38 lwz r6,56(r9) buf->st_uid = the_jnode->st_uid; ffc0f210: a0 e9 00 3c lhz r7,60(r9) buf->st_gid = the_jnode->st_gid; ffc0f214: a1 09 00 3e lhz r8,62(r9) buf->st_atime = the_jnode->stat_atime; ffc0f218: 81 49 00 40 lwz r10,64(r9) buf->st_mtime = the_jnode->stat_mtime; ffc0f21c: 81 69 00 44 lwz r11,68(r9) buf->st_ctime = the_jnode->stat_ctime; ffc0f220: 81 29 00 48 lwz r9,72(r9) buf->st_blksize = imfs_rq_memfile_bytes_per_block; ffc0f224: 90 04 00 40 stw r0,64(r4) return 0; } ffc0f228: 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 = ffc0f22c: 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; ffc0f230: 38 60 00 00 li r3,0 } ffc0f234: 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 = ffc0f238: 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; ffc0f23c: 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; } ffc0f240: 83 e1 00 0c lwz r31,12(r1) ffc0f244: 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; ffc0f248: b0 a4 00 10 sth r5,16(r4) buf->st_ino = the_jnode->st_ino; ffc0f24c: 90 c4 00 08 stw r6,8(r4) buf->st_uid = the_jnode->st_uid; ffc0f250: b0 e4 00 12 sth r7,18(r4) buf->st_gid = the_jnode->st_gid; ffc0f254: b1 04 00 14 sth r8,20(r4) buf->st_atime = the_jnode->stat_atime; ffc0f258: 91 44 00 28 stw r10,40(r4) buf->st_mtime = the_jnode->stat_mtime; ffc0f25c: 91 64 00 30 stw r11,48(r4) buf->st_ctime = the_jnode->stat_ctime; ffc0f260: 91 24 00 38 stw r9,56(r4) buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } ffc0f264: 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 ); ffc0f268: 81 69 00 54 lwz r11,84(r9) ffc0f26c: 80 09 00 50 lwz r0,80(r9) ffc0f270: 91 64 00 1c stw r11,28(r4) ffc0f274: 90 04 00 18 stw r0,24(r4) break; ffc0f278: 4b ff ff 70 b ffc0f1e8 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; ffc0f27c: 81 49 00 50 lwz r10,80(r9) ffc0f280: 81 69 00 54 lwz r11,84(r9) ffc0f284: 91 44 00 20 stw r10,32(r4) ffc0f288: 91 64 00 24 stw r11,36(r4) break; ffc0f28c: 4b ff ff 5c b ffc0f1e8 =============================================================================== 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 99 ad bl ffc0e17c /* * 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 f5 5d bl ffc13d8c <__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 f5 05 bl ffc13d8c <__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 f4 f1 bl ffc13d8c <__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 ac lwz r9,10156(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 a8 lwz r9,10152(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 b0 lbz r0,10160(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 27 2c lwz r3,10028(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 5d bl ffc0aaa8 <_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 27 2c lwz r3,10028(r31) ffc0555c: 3f c0 00 00 lis r30,0 ffc05560: 83 fe 2b 60 lwz r31,11104(r30) ffc05564: 48 00 62 f5 bl ffc0b858 <_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 2b 60 stw r3,11104(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 f6 11 bl ffc14bac * 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 b0 lbz r0,10160(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 8d bl ffc09d40 =============================================================================== ffc04758 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc04758: 94 21 ff c0 stwu r1,-64(r1) ffc0475c: 7c 08 02 a6 mflr r0 ffc04760: 90 01 00 44 stw r0,68(r1) ffc04764: 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); ffc04768: 83 83 00 b8 lwz r28,184(r3) { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); ffc0476c: 80 e3 00 bc lwz r7,188(r3) size = Stack_check_usable_stack_size(stack); ffc04770: 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 ) { ffc04774: 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; ffc04778: 39 27 01 00 addi r9,r7,256 for (ebase = base + length; base < ebase; base++) ffc0477c: 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 ) { ffc04780: 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++) ffc04784: 7d 49 52 14 add r10,r9,r10 ffc04788: 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 ) { ffc0478c: 93 a1 00 34 stw r29,52(r1) ffc04790: 7c 7b 1b 78 mr r27,r3 ffc04794: 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; ffc04798: 3b a0 00 00 li r29,0 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc0479c: 93 01 00 20 stw r24,32(r1) ffc047a0: 93 21 00 24 stw r25,36(r1) ffc047a4: 93 c1 00 38 stw r30,56(r1) ffc047a8: 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 ); ffc047ac: 83 43 00 c8 lwz r26,200(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++) ffc047b0: 40 9c 00 38 bge- cr7,ffc047e8 <== NEVER TAKEN if (*base != U32_PATTERN) ffc047b4: 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( ffc047b8: 7d 2b 4b 78 mr r11,r9 * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) ffc047bc: 6d 00 5a 5a xoris r0,r8,23130 ffc047c0: 2f 80 a5 a5 cmpwi cr7,r0,-23131 ffc047c4: 41 9e 00 14 beq- cr7,ffc047d8 <== ALWAYS TAKEN ffc047c8: 48 00 00 f8 b ffc048c0 <== NOT EXECUTED ffc047cc: 84 0b 00 04 lwzu r0,4(r11) ffc047d0: 7f 80 40 00 cmpw cr7,r0,r8 ffc047d4: 40 9e 00 ec bne- cr7,ffc048c0 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) ffc047d8: 39 29 00 04 addi r9,r9,4 ffc047dc: 7f 8a 48 40 cmplw cr7,r10,r9 ffc047e0: 41 9d ff ec bgt+ cr7,ffc047cc <== 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; ffc047e4: 3b a0 00 00 li r29,0 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( ffc047e8: 3f c0 00 00 lis r30,0 ffc047ec: 82 fb 00 08 lwz r23,8(r27) ffc047f0: 3b fe 28 f4 addi r31,r30,10484 ffc047f4: 83 3e 28 f4 lwz r25,10484(r30) ffc047f8: 83 1f 00 04 lwz r24,4(r31) ffc047fc: 38 80 00 05 li r4,5 ffc04800: 38 a1 00 08 addi r5,r1,8 ffc04804: 7e e3 bb 78 mr r3,r23 ffc04808: 48 00 79 45 bl ffc0c14c ffc0480c: 3c 80 ff c2 lis r4,-62 ffc04810: 7c 66 1b 78 mr r6,r3 ffc04814: 7f 29 03 a6 mtctr r25 ffc04818: 38 84 dc 1c addi r4,r4,-9188 ffc0481c: 7e e5 bb 78 mr r5,r23 ffc04820: 7f 03 c3 78 mr r3,r24 ffc04824: 4c c6 31 82 crclr 4*cr1+eq ffc04828: 4e 80 04 21 bctrl (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc0482c: 80 db 00 b8 lwz r6,184(r27) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc04830: 80 1e 28 f4 lwz r0,10484(r30) ffc04834: 3c 80 ff c2 lis r4,-62 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc04838: 80 bb 00 bc lwz r5,188(r27) ffc0483c: 38 c6 ff ff addi r6,r6,-1 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc04840: 7c 09 03 a6 mtctr r0 ffc04844: 80 7f 00 04 lwz r3,4(r31) ffc04848: 38 84 dc 2c addi r4,r4,-9172 ffc0484c: 7c c5 32 14 add r6,r5,r6 ffc04850: 7f 47 d3 78 mr r7,r26 ffc04854: 7f 88 e3 78 mr r8,r28 ffc04858: 4c c6 31 82 crclr 4*cr1+eq ffc0485c: 4e 80 04 21 bctrl stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc04860: 80 1f 00 08 lwz r0,8(r31) (*print_handler)( print_context, "Unavailable\n" ); ffc04864: 80 7f 00 04 lwz r3,4(r31) stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc04868: 2f 80 00 00 cmpwi cr7,r0,0 (*print_handler)( print_context, "Unavailable\n" ); ffc0486c: 80 1e 28 f4 lwz r0,10484(r30) stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc04870: 41 9e 00 6c beq- cr7,ffc048dc <== NEVER TAKEN (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); ffc04874: 3c 80 ff c2 lis r4,-62 ffc04878: 7c 09 03 a6 mtctr r0 ffc0487c: 7f a5 eb 78 mr r5,r29 ffc04880: 38 84 dc 5c addi r4,r4,-9124 ffc04884: 4c c6 31 82 crclr 4*cr1+eq ffc04888: 4e 80 04 21 bctrl } } ffc0488c: 80 01 00 44 lwz r0,68(r1) ffc04890: 82 e1 00 1c lwz r23,28(r1) ffc04894: 7c 08 03 a6 mtlr r0 ffc04898: 83 01 00 20 lwz r24,32(r1) ffc0489c: 83 21 00 24 lwz r25,36(r1) ffc048a0: 83 41 00 28 lwz r26,40(r1) ffc048a4: 83 61 00 2c lwz r27,44(r1) ffc048a8: 83 81 00 30 lwz r28,48(r1) ffc048ac: 83 a1 00 34 lwz r29,52(r1) ffc048b0: 83 c1 00 38 lwz r30,56(r1) ffc048b4: 83 e1 00 3c lwz r31,60(r1) ffc048b8: 38 21 00 40 addi r1,r1,64 ffc048bc: 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 ) ffc048c0: 2f 89 00 00 cmpwi cr7,r9,0 used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; ffc048c4: 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 ) ffc048c8: 41 be ff 20 beq- cr7,ffc047e8 <== NEVER TAKEN { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); ffc048cc: 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 ); ffc048d0: 7f bd e2 14 add r29,r29,r28 ffc048d4: 7f a9 e8 50 subf r29,r9,r29 ffc048d8: 4b ff ff 10 b ffc047e8 current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); ffc048dc: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc048e0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc048e4: 38 84 dc 4c addi r4,r4,-9140 <== NOT EXECUTED ffc048e8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc048ec: 4e 80 04 21 bctrl <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } ffc048f0: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc048f4: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc048f8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc048fc: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc04900: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc04904: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc04908: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc0490c: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc04910: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc04914: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc04918: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc0491c: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc04920: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc04924 : static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if ( Stack_check_Initialized ) ffc04924: 3d 00 00 00 lis r8,0 <== NOT EXECUTED ffc04928: 39 08 28 f4 addi r8,r8,10484 <== NOT EXECUTED ffc0492c: 80 08 00 08 lwz r0,8(r8) <== NOT EXECUTED ffc04930: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc04934: 4c 9e 00 20 bnelr cr7 <== NOT EXECUTED ffc04938: 38 00 00 20 li r0,32 <== NOT EXECUTED ffc0493c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc04940: 3d 60 00 00 lis r11,0 <== NOT EXECUTED ffc04944: 3d 40 ff c2 lis r10,-62 <== NOT EXECUTED ffc04948: 39 6b 2b 64 addi r11,r11,11108 <== NOT EXECUTED memset((_stack)->area, BYTE_PATTERN, (_stack)->size) /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) ffc0494c: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc04950: 39 4a dc 0c addi r10,r10,-9204 <== 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 ]; ffc04954: 55 20 17 3a rlwinm r0,r9,2,28,29 <== NOT EXECUTED ffc04958: 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++ ) { ffc0495c: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED p[i] = pattern[ i%4 ]; ffc04960: 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++ ) { ffc04964: 42 00 ff f0 bdnz+ ffc04954 <== NOT EXECUTED (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); } #endif Stack_check_Initialized = 1; ffc04968: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0496c: 90 08 00 08 stw r0,8(r8) <== NOT EXECUTED ffc04970: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc04a38 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc04a38: 94 21 ff c8 stwu r1,-56(r1) ffc04a3c: 7c 08 02 a6 mflr r0 ffc04a40: 93 a1 00 2c stw r29,44(r1) ffc04a44: 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"); ffc04a48: 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) { ffc04a4c: 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"); ffc04a50: 38 63 dc 64 addi r3,r3,-9116 Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc04a54: 93 c1 00 30 stw r30,48(r1) ffc04a58: 93 e1 00 34 stw r31,52(r1) ffc04a5c: 7c 9f 23 78 mr r31,r4 Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); ffc04a60: 83 dd 00 bc lwz r30,188(r29) char name[32]; printk("BLOWN STACK!!!\n"); ffc04a64: 4c c6 31 82 crclr 4*cr1+eq ffc04a68: 48 00 25 95 bl ffc06ffc printk("task control block: 0x%08" PRIxPTR "\n", running); ffc04a6c: 3c 60 ff c2 lis r3,-62 ffc04a70: 38 63 dc 74 addi r3,r3,-9100 ffc04a74: 7f a4 eb 78 mr r4,r29 ffc04a78: 4c c6 31 82 crclr 4*cr1+eq ffc04a7c: 48 00 25 81 bl ffc06ffc printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); ffc04a80: 80 9d 00 08 lwz r4,8(r29) ffc04a84: 3c 60 ff c2 lis r3,-62 ffc04a88: 38 63 dc 94 addi r3,r3,-9068 ffc04a8c: 4c c6 31 82 crclr 4*cr1+eq ffc04a90: 48 00 25 6d bl ffc06ffc printk( ffc04a94: 80 9d 00 0c lwz r4,12(r29) ffc04a98: 3c 60 ff c2 lis r3,-62 ffc04a9c: 38 63 dc a8 addi r3,r3,-9048 ffc04aa0: 4c c6 31 82 crclr 4*cr1+eq ffc04aa4: 48 00 25 59 bl ffc06ffc "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( ffc04aa8: 80 7d 00 08 lwz r3,8(r29) ffc04aac: 38 a1 00 08 addi r5,r1,8 ffc04ab0: 38 80 00 20 li r4,32 ffc04ab4: 48 00 76 99 bl ffc0c14c ffc04ab8: 7c 64 1b 78 mr r4,r3 ffc04abc: 3c 60 ff c2 lis r3,-62 ffc04ac0: 38 63 dc bc addi r3,r3,-9028 ffc04ac4: 4c c6 31 82 crclr 4*cr1+eq ffc04ac8: 48 00 25 35 bl ffc06ffc ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ffc04acc: 80 bd 00 bc lwz r5,188(r29) ffc04ad0: 80 9d 00 b8 lwz r4,184(r29) ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( ffc04ad4: 3c 60 ff c2 lis r3,-62 ffc04ad8: 38 63 dc d4 addi r3,r3,-9004 ffc04adc: 7c c5 22 14 add r6,r5,r4 ffc04ae0: 4c c6 31 82 crclr 4*cr1+eq ffc04ae4: 48 00 25 19 bl ffc06ffc "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) { ffc04ae8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc04aec: 41 9e 00 0c beq- cr7,ffc04af8 <== ALWAYS TAKEN rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); ffc04af0: 38 60 00 81 li r3,129 ffc04af4: 48 00 81 bd bl ffc0ccb0 (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( ffc04af8: 3c 60 ff c2 lis r3,-62 ffc04afc: 38 63 dd 08 addi r3,r3,-8952 ffc04b00: 38 80 00 80 li r4,128 ffc04b04: 38 be 00 08 addi r5,r30,8 ffc04b08: 38 de 00 88 addi r6,r30,136 ffc04b0c: 4c c6 31 82 crclr 4*cr1+eq ffc04b10: 48 00 24 ed bl ffc06ffc ffc04b14: 4b ff ff dc b ffc04af0 =============================================================================== ffc11158 : /** * 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(); ffc11158: 3d 20 00 00 lis r9,0 ffc1115c: 80 09 20 28 lwz r0,8232(r9) ticks = microseconds / microseconds_per_tick; ffc11160: 7d 23 03 96 divwu r9,r3,r0 if ( (microseconds % microseconds_per_tick) != 0 ) ffc11164: 7c 09 01 d6 mullw r0,r9,r0 ffc11168: 7f 83 00 00 cmpw cr7,r3,r0 ffc1116c: 41 9e 00 08 beq- cr7,ffc11174 <== ALWAYS TAKEN ticks += 1; ffc11170: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED return ticks; } ffc11174: 7d 23 4b 78 mr r3,r9 ffc11178: 4e 80 00 20 blr =============================================================================== ffc0b1d0 : /** * 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(); ffc0b1d0: 3d 20 00 00 lis r9,0 ffc0b1d4: 81 29 20 10 lwz r9,8208(r9) ffc0b1d8: 3c 00 10 62 lis r0,4194 ffc0b1dc: 60 00 4d d3 ori r0,r0,19923 ffc0b1e0: 7c 09 00 16 mulhwu r0,r9,r0 ffc0b1e4: 54 00 d1 be rlwinm r0,r0,26,6,31 ticks = milliseconds / milliseconds_per_tick; ffc0b1e8: 7d 23 03 96 divwu r9,r3,r0 if ( (milliseconds % milliseconds_per_tick) != 0 ) ffc0b1ec: 7c 09 01 d6 mullw r0,r9,r0 ffc0b1f0: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b1f4: 41 9e 00 08 beq- cr7,ffc0b1fc <== ALWAYS TAKEN ticks += 1; ffc0b1f8: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED return ticks; } ffc0b1fc: 7d 23 4b 78 mr r3,r9 ffc0b200: 4e 80 00 20 blr =============================================================================== ffc09fcc <_API_extensions_Run_postdriver>: /* * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09fcc: 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; ffc09fd0: 3d 20 00 00 lis r9,0 ffc09fd4: 7c 08 02 a6 mflr r0 ffc09fd8: 93 c1 00 08 stw r30,8(r1) ffc09fdc: 3b c9 2e 00 addi r30,r9,11776 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_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09fe4: 93 e1 00 0c stw r31,12(r1) ffc09fe8: 83 e9 2e 00 lwz r31,11776(r9) ffc09fec: 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 ); ffc09ff0: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09ff4: 41 9e 00 1c beq- cr7,ffc0a010 <_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)(); ffc09ff8: 80 1f 00 08 lwz r0,8(r31) ffc09ffc: 7c 09 03 a6 mtctr r0 ffc0a000: 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 ) { ffc0a004: 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 ); ffc0a008: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0a00c: 40 9e ff ec bne+ cr7,ffc09ff8 <_API_extensions_Run_postdriver+0x2c> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } ffc0a010: 80 01 00 14 lwz r0,20(r1) ffc0a014: 83 c1 00 08 lwz r30,8(r1) ffc0a018: 7c 08 03 a6 mtlr r0 ffc0a01c: 83 e1 00 0c lwz r31,12(r1) ffc0a020: 38 21 00 10 addi r1,r1,16 ffc0a024: 4e 80 00 20 blr =============================================================================== ffc0a028 <_API_extensions_Run_postswitch>: /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc0a028: 94 21 ff e8 stwu r1,-24(r1) ffc0a02c: 3d 20 00 00 lis r9,0 ffc0a030: 7c 08 02 a6 mflr r0 ffc0a034: 93 c1 00 10 stw r30,16(r1) ffc0a038: 3b c9 2e 00 addi r30,r9,11776 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc0a03c: 3b de 00 04 addi r30,r30,4 /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc0a040: 93 e1 00 14 stw r31,20(r1) ffc0a044: 83 e9 2e 00 lwz r31,11776(r9) ffc0a048: 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 ); ffc0a04c: 7f 9f f0 00 cmpw cr7,r31,r30 /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc0a050: 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 ); ffc0a054: 41 9e 00 28 beq- cr7,ffc0a07c <_API_extensions_Run_postswitch+0x54><== NEVER TAKEN ffc0a058: 3f a0 00 00 lis r29,0 ffc0a05c: 3b bd 31 44 addi r29,r29,12612 !_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 ); ffc0a060: 80 1f 00 0c lwz r0,12(r31) ffc0a064: 80 7d 00 0c lwz r3,12(r29) ffc0a068: 7c 09 03 a6 mtctr r0 ffc0a06c: 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 ) { ffc0a070: 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 ); ffc0a074: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0a078: 40 9e ff e8 bne+ cr7,ffc0a060 <_API_extensions_Run_postswitch+0x38> the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc0a07c: 80 01 00 1c lwz r0,28(r1) ffc0a080: 83 a1 00 0c lwz r29,12(r1) ffc0a084: 7c 08 03 a6 mtlr r0 ffc0a088: 83 c1 00 10 lwz r30,16(r1) ffc0a08c: 83 e1 00 14 lwz r31,20(r1) ffc0a090: 38 21 00 18 addi r1,r1,24 ffc0a094: 4e 80 00 20 blr =============================================================================== ffc0ca58 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ffc0ca58: 94 21 ff f0 stwu r1,-16(r1) ffc0ca5c: 7c 08 02 a6 mflr r0 ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0ca60: 3d 20 00 00 lis r9,0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ffc0ca64: 90 01 00 14 stw r0,20(r1) ffc0ca68: 93 e1 00 0c stw r31,12(r1) ffc0ca6c: 7c 7f 1b 78 mr r31,r3 ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0ca70: 81 29 31 30 lwz r9,12592(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0ca74: 7d 60 00 a6 mfmsr r11 ffc0ca78: 7c 10 42 a6 mfsprg r0,0 ffc0ca7c: 7d 60 00 78 andc r0,r11,r0 ffc0ca80: 7c 00 01 24 mtmsr r0 * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ ffc0ca84: 80 03 00 44 lwz r0,68(r3) ffc0ca88: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ca8c: 41 9e 00 cc beq- cr7,ffc0cb58 <_CORE_RWLock_Release+0x100> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { ffc0ca90: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ca94: 41 9e 00 94 beq- cr7,ffc0cb28 <_CORE_RWLock_Release+0xd0> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; ffc0ca98: 38 00 00 00 li r0,0 ffc0ca9c: 90 09 00 34 stw r0,52(r9) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; ffc0caa0: 90 1f 00 44 stw r0,68(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0caa4: 7d 60 01 24 mtmsr r11 _ISR_Enable( level ); next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); ffc0caa8: 7f e3 fb 78 mr r3,r31 ffc0caac: 48 00 23 b9 bl ffc0ee64 <_Thread_queue_Dequeue> if ( next ) { ffc0cab0: 2c 03 00 00 cmpwi r3,0 ffc0cab4: 41 82 00 5c beq- ffc0cb10 <_CORE_RWLock_Release+0xb8> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { ffc0cab8: 80 03 00 30 lwz r0,48(r3) ffc0cabc: 2f 80 00 01 cmpwi cr7,r0,1 ffc0cac0: 41 9e 00 bc beq- cr7,ffc0cb7c <_CORE_RWLock_Release+0x124> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; ffc0cac4: 81 3f 00 48 lwz r9,72(r31) ffc0cac8: 38 09 00 01 addi r0,r9,1 ffc0cacc: 90 1f 00 48 stw r0,72(r31) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; ffc0cad0: 38 00 00 01 li r0,1 ffc0cad4: 90 1f 00 44 stw r0,68(r31) ffc0cad8: 48 00 00 20 b ffc0caf8 <_CORE_RWLock_Release+0xa0> /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || ffc0cadc: 80 09 00 30 lwz r0,48(r9) ffc0cae0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0cae4: 41 9e 00 2c beq- cr7,ffc0cb10 <_CORE_RWLock_Release+0xb8><== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; ffc0cae8: 81 3f 00 48 lwz r9,72(r31) ffc0caec: 38 09 00 01 addi r0,r9,1 ffc0caf0: 90 1f 00 48 stw r0,72(r31) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); ffc0caf4: 48 00 28 11 bl ffc0f304 <_Thread_queue_Extract> /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); ffc0caf8: 7f e3 fb 78 mr r3,r31 ffc0cafc: 48 00 29 91 bl ffc0f48c <_Thread_queue_First> if ( !next || ffc0cb00: 7c 69 1b 79 mr. r9,r3 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); ffc0cb04: 7f e3 fb 78 mr r3,r31 ffc0cb08: 7d 24 4b 78 mr r4,r9 /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || ffc0cb0c: 40 82 ff d0 bne+ ffc0cadc <_CORE_RWLock_Release+0x84> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0cb10: 80 01 00 14 lwz r0,20(r1) ffc0cb14: 38 60 00 00 li r3,0 ffc0cb18: 83 e1 00 0c lwz r31,12(r1) ffc0cb1c: 38 21 00 10 addi r1,r1,16 ffc0cb20: 7c 08 03 a6 mtlr r0 ffc0cb24: 4e 80 00 20 blr _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; ffc0cb28: 81 43 00 48 lwz r10,72(r3) ffc0cb2c: 38 0a ff ff addi r0,r10,-1 if ( the_rwlock->number_of_readers != 0 ) { ffc0cb30: 2f 80 00 00 cmpwi cr7,r0,0 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; ffc0cb34: 90 03 00 48 stw r0,72(r3) if ( the_rwlock->number_of_readers != 0 ) { ffc0cb38: 41 9e ff 60 beq+ cr7,ffc0ca98 <_CORE_RWLock_Release+0x40> ffc0cb3c: 7d 60 01 24 mtmsr r11 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0cb40: 80 01 00 14 lwz r0,20(r1) ffc0cb44: 38 60 00 00 li r3,0 ffc0cb48: 83 e1 00 0c lwz r31,12(r1) ffc0cb4c: 38 21 00 10 addi r1,r1,16 ffc0cb50: 7c 08 03 a6 mtlr r0 ffc0cb54: 4e 80 00 20 blr ffc0cb58: 7d 60 01 24 mtmsr r11 */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; ffc0cb5c: 38 00 00 02 li r0,2 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0cb60: 83 e1 00 0c lwz r31,12(r1) */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; ffc0cb64: 90 09 00 34 stw r0,52(r9) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0cb68: 38 60 00 00 li r3,0 ffc0cb6c: 80 01 00 14 lwz r0,20(r1) ffc0cb70: 38 21 00 10 addi r1,r1,16 ffc0cb74: 7c 08 03 a6 mtlr r0 ffc0cb78: 4e 80 00 20 blr next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; ffc0cb7c: 38 00 00 02 li r0,2 ffc0cb80: 90 1f 00 44 stw r0,68(r31) return CORE_RWLOCK_SUCCESSFUL; ffc0cb84: 4b ff ff 8c b ffc0cb10 <_CORE_RWLock_Release+0xb8> =============================================================================== ffc0cb88 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { ffc0cb88: 94 21 ff e8 stwu r1,-24(r1) ffc0cb8c: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0cb90: 38 81 00 08 addi r4,r1,8 void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { ffc0cb94: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0cb98: 48 00 1e c9 bl ffc0ea60 <_Thread_Get> switch ( location ) { ffc0cb9c: 80 01 00 08 lwz r0,8(r1) ffc0cba0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cba4: 40 9e 00 1c bne- cr7,ffc0cbc0 <_CORE_RWLock_Timeout+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); ffc0cba8: 48 00 2a 25 bl ffc0f5cc <_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--; ffc0cbac: 3d 20 00 00 lis r9,0 ffc0cbb0: 81 69 28 34 lwz r11,10292(r9) ffc0cbb4: 38 0b ff ff addi r0,r11,-1 ffc0cbb8: 90 09 28 34 stw r0,10292(r9) return _Thread_Dispatch_disable_level; ffc0cbbc: 80 09 28 34 lwz r0,10292(r9) _Thread_Unnest_dispatch(); break; } } ffc0cbc0: 80 01 00 1c lwz r0,28(r1) ffc0cbc4: 38 21 00 18 addi r1,r1,24 ffc0cbc8: 7c 08 03 a6 mtlr r0 ffc0cbcc: 4e 80 00 20 blr =============================================================================== ffc14fd4 <_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 ) { ffc14fd4: 94 21 ff e0 stwu r1,-32(r1) ffc14fd8: 7c 08 02 a6 mflr r0 ffc14fdc: 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)) { ffc14fe0: 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; ffc14fe4: 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 ) { ffc14fe8: 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)) { ffc14fec: 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 ) { ffc14ff0: 93 a1 00 14 stw r29,20(r1) ffc14ff4: 7c 9d 23 78 mr r29,r4 ffc14ff8: 93 e1 00 1c stw r31,28(r1) ffc14ffc: 7c 7f 1b 78 mr r31,r3 ffc15000: 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; ffc15004: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; ffc15008: 90 03 00 48 stw r0,72(r3) the_message_queue->maximum_message_size = maximum_message_size; ffc1500c: 90 c3 00 4c stw r6,76(r3) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; ffc15010: 90 03 00 60 stw r0,96(r3) the_message_queue->notify_argument = the_argument; ffc15014: 90 03 00 64 stw r0,100(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)) { ffc15018: 41 82 00 3c beq- ffc15054 <_CORE_message_queue_Initialize+0x80> allocated_message_size += sizeof(uint32_t); ffc1501c: 3b 86 00 04 addi r28,r6,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); ffc15020: 57 9c 00 3a rlwinm r28,r28,0,0,29 } if (allocated_message_size < maximum_message_size) ffc15024: 7f 86 e0 40 cmplw cr7,r6,r28 return false; ffc15028: 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) ffc1502c: 40 9d 00 28 ble- cr7,ffc15054 <_CORE_message_queue_Initialize+0x80><== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc15030: 80 01 00 24 lwz r0,36(r1) ffc15034: 7f c3 f3 78 mr r3,r30 ffc15038: 83 81 00 10 lwz r28,16(r1) ffc1503c: 7c 08 03 a6 mtlr r0 ffc15040: 83 a1 00 14 lwz r29,20(r1) ffc15044: 83 c1 00 18 lwz r30,24(r1) ffc15048: 83 e1 00 1c lwz r31,28(r1) ffc1504c: 38 21 00 20 addi r1,r1,32 ffc15050: 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( ffc15054: 3b 9c 00 14 addi r28,r28,20 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; ffc15058: 7d 45 e0 16 mulhwu r10,r5,r28 ffc1505c: 7d 65 e1 d6 mullw r11,r5,r28 if ( x > SIZE_MAX ) ffc15060: 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; ffc15064: 3b c0 00 00 li r30,0 size_t *c ) { long long x = (long long)a*b; if ( x > SIZE_MAX ) ffc15068: 41 bd ff c8 bgt- cr7,ffc15030 <_CORE_message_queue_Initialize+0x5c> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc1506c: 7d 63 5b 78 mr r3,r11 ffc15070: 90 a1 00 08 stw r5,8(r1) ffc15074: 48 00 3e 15 bl ffc18e88 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) ffc15078: 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 *) ffc1507c: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); ffc15080: 7c 64 1b 78 mr r4,r3 if (the_message_queue->message_buffers == 0) ffc15084: 80 a1 00 08 lwz r5,8(r1) ffc15088: 41 be ff a8 beq- cr7,ffc15030 <_CORE_message_queue_Initialize+0x5c> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc1508c: 38 7f 00 68 addi r3,r31,104 ffc15090: 7f 86 e3 78 mr r6,r28 ffc15094: 48 00 6e 5d bl ffc1bef0 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc15098: 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 ); ffc1509c: 38 1f 00 50 addi r0,r31,80 head->next = tail; head->previous = NULL; ffc150a0: 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 ); ffc150a4: 39 3f 00 54 addi r9,r31,84 ffc150a8: 68 84 00 01 xori r4,r4,1 head->next = tail; head->previous = NULL; tail->previous = head; ffc150ac: 90 1f 00 58 stw r0,88(r31) ffc150b0: 7c 84 00 34 cntlzw r4,r4 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc150b4: 91 3f 00 50 stw r9,80(r31) ffc150b8: 7f e3 fb 78 mr r3,r31 ffc150bc: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc150c0: 38 a0 00 80 li r5,128 ffc150c4: 38 c0 00 06 li r6,6 ffc150c8: 48 00 30 29 bl ffc180f0 <_Thread_queue_Initialize> STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc150cc: 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; ffc150d0: 3b c0 00 01 li r30,1 } ffc150d4: 83 81 00 10 lwz r28,16(r1) ffc150d8: 7c 08 03 a6 mtlr r0 ffc150dc: 7f c3 f3 78 mr r3,r30 ffc150e0: 83 a1 00 14 lwz r29,20(r1) ffc150e4: 83 c1 00 18 lwz r30,24(r1) ffc150e8: 83 e1 00 1c lwz r31,28(r1) ffc150ec: 38 21 00 20 addi r1,r1,32 ffc150f0: 4e 80 00 20 blr =============================================================================== ffc0a740 <_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 ) { ffc0a740: 94 21 ff f0 stwu r1,-16(r1) ffc0a744: 7c 08 02 a6 mflr r0 ffc0a748: 93 e1 00 0c stw r31,12(r1) ffc0a74c: 7c 7f 1b 78 mr r31,r3 ffc0a750: 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)) ) { ffc0a754: 48 00 21 d5 bl ffc0c928 <_Thread_queue_Dequeue> ffc0a758: 2f 83 00 00 cmpwi cr7,r3,0 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0a75c: 38 60 00 00 li r3,0 if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc0a760: 41 9e 00 18 beq- cr7,ffc0a778 <_CORE_semaphore_Surrender+0x38> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0a764: 80 01 00 14 lwz r0,20(r1) ffc0a768: 83 e1 00 0c lwz r31,12(r1) ffc0a76c: 38 21 00 10 addi r1,r1,16 ffc0a770: 7c 08 03 a6 mtlr r0 ffc0a774: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0a778: 7c 00 00 a6 mfmsr r0 ffc0a77c: 7d 30 42 a6 mfsprg r9,0 ffc0a780: 7c 09 48 78 andc r9,r0,r9 ffc0a784: 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 ) ffc0a788: 81 3f 00 48 lwz r9,72(r31) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; ffc0a78c: 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 ) ffc0a790: 81 7f 00 40 lwz r11,64(r31) ffc0a794: 7f 89 58 40 cmplw cr7,r9,r11 ffc0a798: 40 9c 00 10 bge- cr7,ffc0a7a8 <_CORE_semaphore_Surrender+0x68><== NEVER TAKEN the_semaphore->count += 1; ffc0a79c: 39 29 00 01 addi r9,r9,1 ffc0a7a0: 91 3f 00 48 stw r9,72(r31) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0a7a4: 38 60 00 00 li r3,0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0a7a8: 7c 00 01 24 mtmsr r0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0a7ac: 80 01 00 14 lwz r0,20(r1) ffc0a7b0: 83 e1 00 0c lwz r31,12(r1) ffc0a7b4: 38 21 00 10 addi r1,r1,16 ffc0a7b8: 7c 08 03 a6 mtlr r0 ffc0a7bc: 4e 80 00 20 blr =============================================================================== ffc10d48 <_Chain_Initialize>: Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10d48: 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; ffc10d4c: 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 ); ffc10d50: 39 43 00 04 addi r10,r3,4 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; ffc10d54: 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; ffc10d58: 7c 69 1b 78 mr r9,r3 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10d5c: 41 82 00 38 beq- ffc10d94 <_Chain_Initialize+0x4c> <== NEVER TAKEN ffc10d60: 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; ffc10d64: 7c a9 03 a6 mtctr r5 Chain_Node *next = starting_address; ffc10d68: 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; ffc10d6c: 7c 6b 1b 78 mr r11,r3 ffc10d70: 48 00 00 0c b ffc10d7c <_Chain_Initialize+0x34> Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10d74: 7d 2b 4b 78 mr r11,r9 current->next = next; next->previous = current; current = next; next = (Chain_Node *) ffc10d78: 7c 09 03 78 mr r9,r0 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; ffc10d7c: 91 2b 00 00 stw r9,0(r11) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( ffc10d80: 7c 09 32 14 add r0,r9,r6 head->previous = NULL; while ( count-- ) { current->next = next; next->previous = current; ffc10d84: 91 69 00 04 stw r11,4(r9) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10d88: 42 00 ff ec bdnz+ ffc10d74 <_Chain_Initialize+0x2c> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( ffc10d8c: 7c c6 41 d6 mullw r6,r6,r8 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10d90: 7d 24 32 14 add r9,r4,r6 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; ffc10d94: 91 49 00 00 stw r10,0(r9) tail->previous = current; ffc10d98: 91 23 00 08 stw r9,8(r3) } ffc10d9c: 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 30 lwz r11,304(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 31 44 addi r7,r7,12612 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 30 a1 bl ffc0c060 <_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 54 lwz r5,10324(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 54 lwz r5,10324(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 54 stw r0,10324(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 49 79 bl ffc0d9c4 <_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 30 05 bl ffc0c060 <_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 34 b1 bl ffc0c524 <_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 31 50 lwz r11,12624(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 2f a5 bl ffc0c060 <_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 28 0c lwz r11,10252(r9) ffc090c8: 38 0b ff ff addi r0,r11,-1 ffc090cc: 90 09 28 0c stw r0,10252(r9) return _Thread_Dispatch_disable_level; ffc090d0: 80 09 28 0c lwz r0,10252(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 54 lwz r0,10324(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 54 stw r0,10324(r11) ffc090fc: 4b ff ff ac b ffc090a8 <_Event_Timeout+0x44> =============================================================================== ffc10f94 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10f94: 94 21 ff e0 stwu r1,-32(r1) ffc10f98: 7c 08 02 a6 mflr r0 ffc10f9c: 7d 80 00 26 mfcr r12 ffc10fa0: 7c 89 23 78 mr r9,r4 ffc10fa4: 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 ffc10fa8: 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 ) { ffc10fac: 7f 84 00 40 cmplw cr7,r4,r0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10fb0: 93 a1 00 14 stw r29,20(r1) ffc10fb4: 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; ffc10fb8: 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; ffc10fbc: 38 60 00 00 li r3,0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10fc0: 93 61 00 0c stw r27,12(r1) ffc10fc4: 93 81 00 10 stw r28,16(r1) ffc10fc8: 93 c1 00 18 stw r30,24(r1) ffc10fcc: 93 e1 00 1c stw r31,28(r1) ffc10fd0: 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 ) { ffc10fd4: 41 9d 00 7c bgt- cr7,ffc11050 <_Heap_Allocate_aligned_with_boundary+0xbc> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { ffc10fd8: 2e 06 00 00 cmpwi cr4,r6,0 ffc10fdc: 40 92 01 b8 bne- cr4,ffc11194 <_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; ffc10fe0: 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 ) { ffc10fe4: 7f 9d 20 00 cmpw cr7,r29,r4 ffc10fe8: 41 9e 01 c4 beq- cr7,ffc111ac <_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 ) { ffc10fec: 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 ) { ffc10ff0: 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 ffc10ff4: 3b 67 00 07 addi r27,r7,7 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; ffc10ff8: 23 89 00 04 subfic r28,r9,4 ffc10ffc: 48 00 00 24 b ffc11020 <_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 ) { ffc11000: 40 82 00 7c bne- ffc1107c <_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; ffc11004: 3b e4 00 08 addi r31,r4,8 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc11008: 2f 9f 00 00 cmpwi cr7,r31,0 ); } } /* Statistics */ ++search_count; ffc1100c: 3b de 00 01 addi r30,r30,1 if ( alloc_begin != 0 ) { ffc11010: 40 9e 01 3c bne- cr7,ffc1114c <_Heap_Allocate_aligned_with_boundary+0x1b8> break; } block = block->next; ffc11014: 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 ) { ffc11018: 7f 9d 20 00 cmpw cr7,r29,r4 ffc1101c: 41 9e 00 20 beq- cr7,ffc1103c <_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 ) { ffc11020: 81 64 00 04 lwz r11,4(r4) ffc11024: 7f 80 58 40 cmplw cr7,r0,r11 ffc11028: 41 bc ff d8 blt- cr7,ffc11000 <_Heap_Allocate_aligned_with_boundary+0x6c> if ( alloc_begin != 0 ) { break; } block = block->next; ffc1102c: 80 84 00 08 lwz r4,8(r4) ); } } /* Statistics */ ++search_count; ffc11030: 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 ) { ffc11034: 7f 9d 20 00 cmpw cr7,r29,r4 ffc11038: 40 9e ff e8 bne+ cr7,ffc11020 <_Heap_Allocate_aligned_with_boundary+0x8c> ffc1103c: 3b e0 00 00 li r31,0 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { ffc11040: 80 1d 00 44 lwz r0,68(r29) ffc11044: 7f 80 f0 40 cmplw cr7,r0,r30 ffc11048: 41 9c 01 38 blt- cr7,ffc11180 <_Heap_Allocate_aligned_with_boundary+0x1ec> stats->max_search = search_count; } return (void *) alloc_begin; ffc1104c: 7f e3 fb 78 mr r3,r31 } ffc11050: 80 01 00 24 lwz r0,36(r1) ffc11054: 81 81 00 08 lwz r12,8(r1) ffc11058: 7c 08 03 a6 mtlr r0 ffc1105c: 83 61 00 0c lwz r27,12(r1) ffc11060: 83 81 00 10 lwz r28,16(r1) ffc11064: 7d 80 81 20 mtcrf 8,r12 ffc11068: 83 a1 00 14 lwz r29,20(r1) ffc1106c: 83 c1 00 18 lwz r30,24(r1) ffc11070: 83 e1 00 1c lwz r31,28(r1) ffc11074: 38 21 00 20 addi r1,r1,32 ffc11078: 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; ffc1107c: 55 6b 00 3c rlwinm r11,r11,0,0,30 ffc11080: 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; ffc11084: 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; ffc11088: 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); ffc1108c: 7f ff 2b 96 divwu r31,r31,r5 ffc11090: 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; ffc11094: 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 ffc11098: 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 ) { ffc1109c: 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; ffc110a0: 39 84 00 08 addi r12,r4,8 ffc110a4: 40 9c 00 0c bge- cr7,ffc110b0 <_Heap_Allocate_aligned_with_boundary+0x11c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc110a8: 7d 6b 2b 96 divwu r11,r11,r5 ffc110ac: 7f eb 29 d6 mullw r31,r11,r5 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc110b0: 41 92 00 64 beq- cr4,ffc11114 <_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; ffc110b4: 7d 5f 4a 14 add r10,r31,r9 ffc110b8: 7d 6a 33 96 divwu r11,r10,r6 ffc110bc: 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 ) { ffc110c0: 7f 9f 58 40 cmplw cr7,r31,r11 ffc110c4: 40 9c 00 50 bge- cr7,ffc11114 <_Heap_Allocate_aligned_with_boundary+0x180> ffc110c8: 7f 8a 58 40 cmplw cr7,r10,r11 ffc110cc: 40 9d 00 48 ble- cr7,ffc11114 <_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; ffc110d0: 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 ) { ffc110d4: 7f 88 58 40 cmplw cr7,r8,r11 return 0; ffc110d8: 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 ) { ffc110dc: 40 bd 00 10 ble+ cr7,ffc110ec <_Heap_Allocate_aligned_with_boundary+0x158> ffc110e0: 4b ff ff 28 b ffc11008 <_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 ) { ffc110e4: 40 99 00 30 ble- cr6,ffc11114 <_Heap_Allocate_aligned_with_boundary+0x180> if ( boundary_line < boundary_floor ) { ffc110e8: 41 85 00 a4 bgt- cr1,ffc1118c <_Heap_Allocate_aligned_with_boundary+0x1f8><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; ffc110ec: 7f e9 58 50 subf r31,r9,r11 ffc110f0: 7f ff 2b 96 divwu r31,r31,r5 ffc110f4: 7f ff 29 d6 mullw r31,r31,r5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; ffc110f8: 7d 5f 4a 14 add r10,r31,r9 ffc110fc: 7d 6a 33 96 divwu r11,r10,r6 ffc11100: 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 ) { ffc11104: 7f 9f 58 40 cmplw cr7,r31,r11 ffc11108: 7f 0a 58 40 cmplw cr6,r10,r11 if ( boundary_line < boundary_floor ) { ffc1110c: 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 ) { ffc11110: 41 9c ff d4 blt+ cr7,ffc110e4 <_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 ) { ffc11114: 7f 8c f8 40 cmplw cr7,r12,r31 ffc11118: 41 9d 00 74 bgt- cr7,ffc1118c <_Heap_Allocate_aligned_with_boundary+0x1f8> ffc1111c: 7d 7f 3b 96 divwu r11,r31,r7 ffc11120: 7d 6b 39 d6 mullw r11,r11,r7 ffc11124: 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; ffc11128: 7d 6a 5a 14 add r11,r10,r11 if ( free_size >= min_block_size || free_size == 0 ) { ffc1112c: 7f 83 58 40 cmplw cr7,r3,r11 ffc11130: 40 bd fe d8 ble- cr7,ffc11008 <_Heap_Allocate_aligned_with_boundary+0x74> return alloc_begin; } } return 0; ffc11134: 31 6b ff ff addic r11,r11,-1 ffc11138: 7d 6b 59 10 subfe r11,r11,r11 ffc1113c: 7f ff 58 38 and r31,r31,r11 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc11140: 2f 9f 00 00 cmpwi cr7,r31,0 ); } } /* Statistics */ ++search_count; ffc11144: 3b de 00 01 addi r30,r30,1 if ( alloc_begin != 0 ) { ffc11148: 41 9e fe cc beq+ cr7,ffc11014 <_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; ffc1114c: 81 7d 00 48 lwz r11,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc11150: 7f a3 eb 78 mr r3,r29 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc11154: 80 1d 00 4c lwz r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc11158: 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; ffc1115c: 39 6b 00 01 addi r11,r11,1 stats->searches += search_count; ffc11160: 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; ffc11164: 91 7d 00 48 stw r11,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc11168: 7d 26 4b 78 mr r6,r9 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc1116c: 90 1d 00 4c stw r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc11170: 4b ff 9a e5 bl ffc0ac54 <_Heap_Block_allocate> boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { ffc11174: 80 1d 00 44 lwz r0,68(r29) ffc11178: 7f 80 f0 40 cmplw cr7,r0,r30 ffc1117c: 40 bc fe d0 bge- cr7,ffc1104c <_Heap_Allocate_aligned_with_boundary+0xb8> stats->max_search = search_count; ffc11180: 93 dd 00 44 stw r30,68(r29) } return (void *) alloc_begin; ffc11184: 7f e3 fb 78 mr r3,r31 ffc11188: 4b ff fe c8 b ffc11050 <_Heap_Allocate_aligned_with_boundary+0xbc> if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; ffc1118c: 3b e0 00 00 li r31,0 ffc11190: 4b ff fe 78 b ffc11008 <_Heap_Allocate_aligned_with_boundary+0x74> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { ffc11194: 7f 84 30 40 cmplw cr7,r4,r6 ffc11198: 41 bd fe b8 bgt- cr7,ffc11050 <_Heap_Allocate_aligned_with_boundary+0xbc> return NULL; } if ( alignment == 0 ) { ffc1119c: 2f 85 00 00 cmpwi cr7,r5,0 ffc111a0: 40 be fe 40 bne- cr7,ffc10fe0 <_Heap_Allocate_aligned_with_boundary+0x4c> alignment = page_size; ffc111a4: 7c e5 3b 78 mr r5,r7 ffc111a8: 4b ff fe 38 b ffc10fe0 <_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 ) { ffc111ac: 3b c0 00 00 li r30,0 ffc111b0: 3b e0 00 00 li r31,0 ffc111b4: 4b ff fe 8c b ffc11040 <_Heap_Allocate_aligned_with_boundary+0xac> =============================================================================== ffc10d94 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc10d94: 94 21 ff c0 stwu r1,-64(r1) ffc10d98: 7d 80 00 26 mfcr r12 ffc10d9c: 7c 08 02 a6 mflr r0 ffc10da0: 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; ffc10da4: 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 ) { ffc10da8: 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 ) { ffc10dac: 90 01 00 44 stw r0,68(r1) ffc10db0: 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; ffc10db4: 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 ) { ffc10db8: 93 c1 00 38 stw r30,56(r1) ffc10dbc: 7c 7e 1b 78 mr r30,r3 ffc10dc0: 93 01 00 20 stw r24,32(r1) ffc10dc4: 93 21 00 24 stw r25,36(r1) ffc10dc8: 7c d9 33 78 mr r25,r6 ffc10dcc: 93 61 00 2c stw r27,44(r1) ffc10dd0: 93 81 00 30 stw r28,48(r1) ffc10dd4: 93 e1 00 3c stw r31,60(r1) ffc10dd8: 7c 9f 23 78 mr r31,r4 Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; ffc10ddc: 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; ffc10de0: 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 ) { ffc10de4: 92 e1 00 1c stw r23,28(r1) ffc10de8: 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; ffc10dec: 93 41 00 0c stw r26,12(r1) Heap_Block *extend_last_block = NULL; ffc10df0: 93 41 00 08 stw r26,8(r1) uintptr_t const page_size = heap->page_size; ffc10df4: 83 9e 00 10 lwz r28,16(r30) uintptr_t const min_block_size = heap->min_block_size; ffc10df8: 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; ffc10dfc: 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 ) { ffc10e00: 40 9d 00 40 ble- cr7,ffc10e40 <_Heap_Extend+0xac> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc10e04: 80 01 00 44 lwz r0,68(r1) ffc10e08: 81 81 00 18 lwz r12,24(r1) ffc10e0c: 7c 08 03 a6 mtlr r0 ffc10e10: 82 e1 00 1c lwz r23,28(r1) ffc10e14: 83 01 00 20 lwz r24,32(r1) ffc10e18: 7d 81 81 20 mtcrf 24,r12 ffc10e1c: 83 21 00 24 lwz r25,36(r1) ffc10e20: 83 41 00 28 lwz r26,40(r1) ffc10e24: 83 61 00 2c lwz r27,44(r1) ffc10e28: 83 81 00 30 lwz r28,48(r1) ffc10e2c: 83 a1 00 34 lwz r29,52(r1) ffc10e30: 83 c1 00 38 lwz r30,56(r1) ffc10e34: 83 e1 00 3c lwz r31,60(r1) ffc10e38: 38 21 00 40 addi r1,r1,64 ffc10e3c: 4e 80 00 20 blr if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( ffc10e40: 7c 83 23 78 mr r3,r4 ffc10e44: 38 e1 00 0c addi r7,r1,12 ffc10e48: 7c a4 2b 78 mr r4,r5 ffc10e4c: 39 01 00 08 addi r8,r1,8 ffc10e50: 7f 85 e3 78 mr r5,r28 ffc10e54: 4b ff 98 3d bl ffc0a690 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc10e58: 2f 83 00 00 cmpwi cr7,r3,0 /* For simplicity we reject extend areas that are too small */ return false; ffc10e5c: 7f 43 d3 78 mr r3,r26 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc10e60: 41 be ff a4 beq- cr7,ffc10e04 <_Heap_Extend+0x70> ffc10e64: 7f 69 db 78 mr r9,r27 ffc10e68: 3a e0 00 00 li r23,0 ffc10e6c: 38 00 00 00 li r0,0 ffc10e70: 39 00 00 00 li r8,0 ffc10e74: 48 00 00 44 b ffc10eb8 <_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 ) { ffc10e78: 7f 9d 58 40 cmplw cr7,r29,r11 ffc10e7c: 40 9c 00 08 bge- cr7,ffc10e84 <_Heap_Extend+0xf0> ffc10e80: 7d 20 4b 78 mr r0,r9 ffc10e84: 7d 4b e3 96 divwu r10,r11,r28 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc10e88: 7f 8b f8 00 cmpw cr7,r11,r31 ffc10e8c: 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); ffc10e90: 39 4a ff f8 addi r10,r10,-8 ffc10e94: 41 9e 00 64 beq- cr7,ffc10ef8 <_Heap_Extend+0x164> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { ffc10e98: 7f 9f 58 40 cmplw cr7,r31,r11 ffc10e9c: 40 9d 00 08 ble- cr7,ffc10ea4 <_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 ) ffc10ea0: 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; ffc10ea4: 81 2a 00 04 lwz r9,4(r10) ffc10ea8: 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); ffc10eac: 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 ); ffc10eb0: 7f 9b 48 00 cmpw cr7,r27,r9 ffc10eb4: 41 9e 00 60 beq- cr7,ffc10f14 <_Heap_Extend+0x180> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc10eb8: 7f 89 d8 00 cmpw cr7,r9,r27 ffc10ebc: 7d 2a 4b 78 mr r10,r9 ffc10ec0: 41 9e 01 b8 beq- cr7,ffc11078 <_Heap_Extend+0x2e4> uintptr_t const sub_area_end = start_block->prev_size; ffc10ec4: 81 69 00 00 lwz r11,0(r9) Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( ffc10ec8: 7f 9f 58 40 cmplw cr7,r31,r11 ffc10ecc: 40 9c 00 0c bge- cr7,ffc10ed8 <_Heap_Extend+0x144> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ffc10ed0: 7f 8a e8 40 cmplw cr7,r10,r29 ffc10ed4: 41 9c 02 28 blt- cr7,ffc110fc <_Heap_Extend+0x368> ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc10ed8: 7f 8a e8 00 cmpw cr7,r10,r29 ffc10edc: 40 9e ff 9c bne+ cr7,ffc10e78 <_Heap_Extend+0xe4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10ee0: 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 ) { ffc10ee4: 7f 8b f8 00 cmpw cr7,r11,r31 ffc10ee8: 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 ) { ffc10eec: 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); ffc10ef0: 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 ) { ffc10ef4: 40 9e ff a4 bne+ cr7,ffc10e98 <_Heap_Extend+0x104> <== ALWAYS TAKEN start_block->prev_size = extend_area_end; ffc10ef8: 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 ) ffc10efc: 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; ffc10f00: 81 2a 00 04 lwz r9,4(r10) ffc10f04: 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); ffc10f08: 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 ); ffc10f0c: 7f 9b 48 00 cmpw cr7,r27,r9 ffc10f10: 40 9e ff a8 bne+ cr7,ffc10eb8 <_Heap_Extend+0x124> <== NEVER TAKEN if ( extend_area_begin < heap->area_begin ) { ffc10f14: 81 3e 00 18 lwz r9,24(r30) ffc10f18: 7f 9f 48 40 cmplw cr7,r31,r9 ffc10f1c: 41 9c 01 64 blt- cr7,ffc11080 <_Heap_Extend+0x2ec> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { ffc10f20: 81 3e 00 1c lwz r9,28(r30) ffc10f24: 7f 9d 48 40 cmplw cr7,r29,r9 ffc10f28: 40 9d 00 08 ble- cr7,ffc10f30 <_Heap_Extend+0x19c> heap->area_end = extend_area_end; ffc10f2c: 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 ) { ffc10f30: 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; ffc10f34: 81 21 00 0c lwz r9,12(r1) ffc10f38: 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 ) { ffc10f3c: 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; ffc10f40: 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 = ffc10f44: 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; ffc10f48: 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; ffc10f4c: 91 4b 00 00 stw r10,0(r11) extend_last_block->size_and_flag = 0; ffc10f50: 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 = ffc10f54: 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; ffc10f58: 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 ) { ffc10f5c: 40 9d 01 58 ble- cr7,ffc110b4 <_Heap_Extend+0x320> <== ALWAYS TAKEN heap->first_block = extend_first_block; ffc10f60: 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 ) { ffc10f64: 2e 08 00 00 cmpwi cr4,r8,0 ffc10f68: 41 92 01 b0 beq- cr4,ffc11118 <_Heap_Extend+0x384> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; ffc10f6c: 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 ); ffc10f70: 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; ffc10f74: 7d 3f 03 96 divwu r9,r31,r0 ffc10f78: 7d 29 01 d6 mullw r9,r9,r0 if ( remainder != 0 ) { ffc10f7c: 7d 29 f8 51 subf. r9,r9,r31 ffc10f80: 41 82 00 0c beq- ffc10f8c <_Heap_Extend+0x1f8> <== NEVER TAKEN return value - remainder + alignment; ffc10f84: 7f ff 02 14 add r31,r31,r0 ffc10f88: 7f e9 f8 50 subf r31,r9,r31 uintptr_t const new_first_block_begin = ffc10f8c: 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; ffc10f90: 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 = ffc10f94: 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; ffc10f98: 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; ffc10f9c: 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 ); ffc10fa0: 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; ffc10fa4: 90 04 00 04 stw r0,4(r4) _Heap_Free_block( heap, new_first_block ); ffc10fa8: 4b ff fd b1 bl ffc10d58 <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { ffc10fac: 2d 9a 00 00 cmpwi cr3,r26,0 ffc10fb0: 41 8e 01 18 beq- cr3,ffc110c8 <_Heap_Extend+0x334> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10fb4: 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, ffc10fb8: 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( ffc10fbc: 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) ffc10fc0: 81 7a 00 04 lwz r11,4(r26) ffc10fc4: 7c 00 4b 96 divwu r0,r0,r9 ffc10fc8: 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 ); ffc10fcc: 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) ffc10fd0: 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 = ffc10fd4: 7d 20 d2 14 add r9,r0,r26 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; ffc10fd8: 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 = ffc10fdc: 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 ); ffc10fe0: 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; ffc10fe4: 81 3a 00 04 lwz r9,4(r26) ffc10fe8: 55 29 07 fe clrlwi r9,r9,31 block->size_and_flag = size | flag; ffc10fec: 7c 00 4b 78 or r0,r0,r9 ffc10ff0: 90 1a 00 04 stw r0,4(r26) ffc10ff4: 4b ff fd 65 bl ffc10d58 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc10ff8: 41 92 01 0c beq- cr4,ffc11104 <_Heap_Extend+0x370> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc10ffc: 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 ) ffc11000: 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( ffc11004: 81 7e 00 20 lwz r11,32(r30) *extended_size_ptr = extended_size; return true; ffc11008: 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; ffc1100c: 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( ffc11010: 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; ffc11014: 54 00 07 fe clrlwi r0,r0,31 block->size_and_flag = size | flag; ffc11018: 7c 00 5b 78 or r0,r0,r11 ffc1101c: 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; ffc11020: 81 3e 00 30 lwz r9,48(r30) /* Statistics */ stats->size += extended_size; ffc11024: 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; ffc11028: 7f 18 48 50 subf r24,r24,r9 /* Statistics */ stats->size += extended_size; ffc1102c: 7c 00 c2 14 add r0,r0,r24 ffc11030: 90 1e 00 2c stw r0,44(r30) if ( extended_size_ptr != NULL ) ffc11034: 41 be fd d0 beq- cr7,ffc10e04 <_Heap_Extend+0x70> <== NEVER TAKEN *extended_size_ptr = extended_size; return true; } ffc11038: 80 01 00 44 lwz r0,68(r1) ffc1103c: 81 81 00 18 lwz r12,24(r1) ffc11040: 7c 08 03 a6 mtlr r0 /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; ffc11044: 93 19 00 00 stw r24,0(r25) return true; } ffc11048: 7d 81 81 20 mtcrf 24,r12 ffc1104c: 82 e1 00 1c lwz r23,28(r1) ffc11050: 83 01 00 20 lwz r24,32(r1) ffc11054: 83 21 00 24 lwz r25,36(r1) ffc11058: 83 41 00 28 lwz r26,40(r1) ffc1105c: 83 61 00 2c lwz r27,44(r1) ffc11060: 83 81 00 30 lwz r28,48(r1) ffc11064: 83 a1 00 34 lwz r29,52(r1) ffc11068: 83 c1 00 38 lwz r30,56(r1) ffc1106c: 83 e1 00 3c lwz r31,60(r1) ffc11070: 38 21 00 40 addi r1,r1,64 ffc11074: 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; ffc11078: 81 5e 00 18 lwz r10,24(r30) ffc1107c: 4b ff fe 48 b ffc10ec4 <_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 ) { ffc11080: 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; ffc11084: 81 21 00 0c lwz r9,12(r1) ffc11088: 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 ) { ffc1108c: 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; ffc11090: 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 = ffc11094: 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; ffc11098: 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; ffc1109c: 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; ffc110a0: 91 4b 00 00 stw r10,0(r11) extend_last_block->size_and_flag = 0; ffc110a4: 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 = ffc110a8: 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; ffc110ac: 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 ) { ffc110b0: 41 bd fe b0 bgt- cr7,ffc10f60 <_Heap_Extend+0x1cc> <== ALWAYS TAKEN heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { ffc110b4: 81 3e 00 24 lwz r9,36(r30) ffc110b8: 7f 89 58 40 cmplw cr7,r9,r11 ffc110bc: 40 bc fe a8 bge- cr7,ffc10f64 <_Heap_Extend+0x1d0> heap->last_block = extend_last_block; ffc110c0: 91 7e 00 24 stw r11,36(r30) ffc110c4: 4b ff fe a0 b ffc10f64 <_Heap_Extend+0x1d0> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { ffc110c8: 2f 97 00 00 cmpwi cr7,r23,0 ffc110cc: 41 be ff 2c beq- cr7,ffc10ff8 <_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; ffc110d0: 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 ); ffc110d4: 80 01 00 0c lwz r0,12(r1) ffc110d8: 55 29 07 fe clrlwi r9,r9,31 ffc110dc: 7c 17 00 50 subf r0,r23,r0 block->size_and_flag = size | flag; ffc110e0: 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( ffc110e4: 81 21 00 08 lwz r9,8(r1) ffc110e8: 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; ffc110ec: 80 09 00 04 lwz r0,4(r9) ffc110f0: 60 00 00 01 ori r0,r0,1 ffc110f4: 90 09 00 04 stw r0,4(r9) ffc110f8: 4b ff ff 00 b ffc10ff8 <_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; ffc110fc: 38 60 00 00 li r3,0 ffc11100: 4b ff fd 04 b ffc10e04 <_Heap_Extend+0x70> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc11104: 40 8e fe f8 bne+ cr3,ffc10ffc <_Heap_Extend+0x268> _Heap_Free_block( heap, extend_first_block ); ffc11108: 80 81 00 0c lwz r4,12(r1) ffc1110c: 7f c3 f3 78 mr r3,r30 ffc11110: 4b ff fc 49 bl ffc10d58 <_Heap_Free_block> ffc11114: 4b ff fe e8 b ffc10ffc <_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 ) { ffc11118: 2f 80 00 00 cmpwi cr7,r0,0 ffc1111c: 41 be fe 90 beq- cr7,ffc10fac <_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; ffc11120: 7c 0b 00 50 subf r0,r11,r0 ffc11124: 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 = ffc11128: 90 0b 00 04 stw r0,4(r11) ffc1112c: 4b ff fe 80 b ffc10fac <_Heap_Extend+0x218> =============================================================================== ffc111b8 <_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 ) { ffc111b8: 2c 04 00 00 cmpwi r4,0 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc111bc: 94 21 ff f0 stwu r1,-16(r1) ffc111c0: 7c 69 1b 78 mr r9,r3 ffc111c4: 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; ffc111c8: 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 ) { ffc111cc: 41 82 01 44 beq- ffc11310 <_Heap_Free+0x158> ffc111d0: 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; ffc111d4: 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 ffc111d8: 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); ffc111dc: 7c 84 03 96 divwu r4,r4,r0 ffc111e0: 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); ffc111e4: 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; ffc111e8: 7f 84 58 40 cmplw cr7,r4,r11 ffc111ec: 41 9c 01 24 blt- cr7,ffc11310 <_Heap_Free+0x158> ffc111f0: 80 09 00 24 lwz r0,36(r9) ffc111f4: 7f 84 00 40 cmplw cr7,r4,r0 ffc111f8: 41 9d 01 18 bgt- cr7,ffc11310 <_Heap_Free+0x158> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc111fc: 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; ffc11200: 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); ffc11204: 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; ffc11208: 7f 8b 50 40 cmplw cr7,r11,r10 ffc1120c: 41 9d 01 04 bgt- cr7,ffc11310 <_Heap_Free+0x158> <== NEVER TAKEN ffc11210: 7f 80 50 40 cmplw cr7,r0,r10 ffc11214: 41 9c 00 fc blt- cr7,ffc11310 <_Heap_Free+0x158> ffc11218: 80 ca 00 04 lwz r6,4(r10) return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { ffc1121c: 70 c5 00 01 andi. r5,r6,1 ffc11220: 41 82 00 f0 beq- ffc11310 <_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 )); ffc11224: 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; ffc11228: 54 c5 00 3c rlwinm r5,r6,0,0,30 ffc1122c: 38 c0 00 00 li r6,0 ffc11230: 41 9e 00 18 beq- cr7,ffc11248 <_Heap_Free+0x90> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc11234: 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; ffc11238: 80 c6 00 04 lwz r6,4(r6) return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) ffc1123c: 70 c3 00 01 andi. r3,r6,1 ffc11240: 7c c0 00 26 mfcr r6 ffc11244: 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 ) ) { ffc11248: 71 08 00 01 andi. r8,r8,1 ffc1124c: 40 82 00 6c bne- ffc112b8 <_Heap_Free+0x100> uintptr_t const prev_size = block->prev_size; ffc11250: 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 ); ffc11254: 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); ffc11258: 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; ffc1125c: 7f 8b 60 40 cmplw cr7,r11,r12 ffc11260: 41 9d 00 b0 bgt- cr7,ffc11310 <_Heap_Free+0x158> <== NEVER TAKEN ffc11264: 7f 80 60 40 cmplw cr7,r0,r12 ffc11268: 7d 03 43 78 mr r3,r8 ffc1126c: 41 9c 00 a4 blt- cr7,ffc11310 <_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; ffc11270: 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) ) { ffc11274: 70 0b 00 01 andi. r11,r0,1 ffc11278: 41 82 00 98 beq- ffc11310 <_Heap_Free+0x158> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc1127c: 2f 86 00 00 cmpwi cr7,r6,0 ffc11280: 41 9e 00 e8 beq- cr7,ffc11368 <_Heap_Free+0x1b0> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc11284: 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; ffc11288: 7f e7 fa 14 add r31,r7,r31 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc1128c: 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; ffc11290: 7c bf 2a 14 add r5,r31,r5 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc11294: 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; ffc11298: 39 08 ff ff addi r8,r8,-1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc1129c: 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; ffc112a0: 91 6a 00 08 stw r11,8(r10) next->prev = prev; ffc112a4: 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; ffc112a8: 91 09 00 38 stw r8,56(r9) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc112ac: 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; ffc112b0: 7c a5 61 2e stwx r5,r5,r12 ffc112b4: 48 00 00 34 b ffc112e8 <_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 */ ffc112b8: 2f 86 00 00 cmpwi cr7,r6,0 ffc112bc: 41 9e 00 60 beq- cr7,ffc1131c <_Heap_Free+0x164> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc112c0: 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; ffc112c4: 7c a5 3a 14 add r5,r5,r7 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc112c8: 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; ffc112cc: 60 a0 00 01 ori r0,r5,1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc112d0: 91 64 00 08 stw r11,8(r4) new_block->prev = prev; ffc112d4: 91 44 00 0c stw r10,12(r4) next->prev = new_block; prev->next = new_block; ffc112d8: 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; ffc112dc: 90 8b 00 0c stw r4,12(r11) ffc112e0: 90 04 00 04 stw r0,4(r4) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc112e4: 7c a5 21 2e stwx r5,r5,r4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc112e8: 81 69 00 40 lwz r11,64(r9) ++stats->frees; stats->free_size += block_size; return( true ); ffc112ec: 38 60 00 01 li r3,1 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc112f0: 81 09 00 50 lwz r8,80(r9) stats->free_size += block_size; ffc112f4: 81 49 00 30 lwz r10,48(r9) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc112f8: 39 6b ff ff addi r11,r11,-1 ++stats->frees; ffc112fc: 38 08 00 01 addi r0,r8,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc11300: 91 69 00 40 stw r11,64(r9) ++stats->frees; stats->free_size += block_size; ffc11304: 7c ea 3a 14 add r7,r10,r7 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc11308: 90 09 00 50 stw r0,80(r9) stats->free_size += block_size; ffc1130c: 90 e9 00 30 stw r7,48(r9) return( true ); } ffc11310: 83 e1 00 0c lwz r31,12(r1) ffc11314: 38 21 00 10 addi r1,r1,16 ffc11318: 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; ffc1131c: 81 09 00 38 lwz r8,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc11320: 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; ffc11324: 38 08 00 01 addi r0,r8,1 ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; ffc11328: 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; ffc1132c: 60 e8 00 01 ori r8,r7,1 ffc11330: 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 ) { ffc11334: 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; ffc11338: 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; ffc1133c: 81 69 00 08 lwz r11,8(r9) ffc11340: 55 08 00 3c rlwinm r8,r8,0,0,30 next_block->prev_size = block_size; ffc11344: 7c e7 21 2e stwx r7,r7,r4 new_block->next = next; ffc11348: 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; ffc1134c: 91 0a 00 04 stw r8,4(r10) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; ffc11350: 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; ffc11354: 90 89 00 08 stw r4,8(r9) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc11358: 90 09 00 38 stw r0,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc1135c: 40 bd ff 8c ble- cr7,ffc112e8 <_Heap_Free+0x130> stats->max_free_blocks = stats->free_blocks; ffc11360: 90 09 00 3c stw r0,60(r9) ffc11364: 4b ff ff 84 b ffc112e8 <_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; ffc11368: 7f e7 fa 14 add r31,r7,r31 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc1136c: 63 e0 00 01 ori r0,r31,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc11370: 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; ffc11374: 90 0c 00 04 stw r0,4(r12) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc11378: 80 0a 00 04 lwz r0,4(r10) ffc1137c: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc11380: 90 0a 00 04 stw r0,4(r10) ffc11384: 4b ff ff 64 b ffc112e8 <_Heap_Free+0x130> =============================================================================== ffc0b3f8 <_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; ffc0b3f8: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc0b3fc: 94 21 ff 98 stwu r1,-104(r1) ffc0b400: 7c 08 02 a6 mflr r0 ffc0b404: 92 e1 00 44 stw r23,68(r1) ffc0b408: 90 01 00 6c stw r0,108(r1) ffc0b40c: 93 01 00 48 stw r24,72(r1) ffc0b410: 93 21 00 4c stw r25,76(r1) ffc0b414: 7c 99 23 78 mr r25,r4 ffc0b418: 93 41 00 50 stw r26,80(r1) ffc0b41c: 93 61 00 54 stw r27,84(r1) ffc0b420: 93 e1 00 64 stw r31,100(r1) ffc0b424: 7c 7f 1b 78 mr r31,r3 ffc0b428: 91 c1 00 20 stw r14,32(r1) ffc0b42c: 91 e1 00 24 stw r15,36(r1) ffc0b430: 92 01 00 28 stw r16,40(r1) ffc0b434: 92 21 00 2c stw r17,44(r1) ffc0b438: 92 41 00 30 stw r18,48(r1) ffc0b43c: 92 61 00 34 stw r19,52(r1) ffc0b440: 92 81 00 38 stw r20,56(r1) ffc0b444: 92 a1 00 3c stw r21,60(r1) ffc0b448: 92 c1 00 40 stw r22,64(r1) ffc0b44c: 93 81 00 58 stw r28,88(r1) ffc0b450: 93 a1 00 5c stw r29,92(r1) ffc0b454: 93 c1 00 60 stw r30,96(r1) uintptr_t const page_size = heap->page_size; ffc0b458: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0b45c: 83 03 00 14 lwz r24,20(r3) Heap_Block *const first_block = heap->first_block; ffc0b460: 83 43 00 20 lwz r26,32(r3) Heap_Block *const last_block = heap->last_block; ffc0b464: 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; ffc0b468: 41 9e 00 7c beq- cr7,ffc0b4e4 <_Heap_Walk+0xec> ffc0b46c: 3d 20 ff c1 lis r9,-63 ffc0b470: 39 29 b2 f8 addi r9,r9,-19720 ffc0b474: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b478: 3d 20 00 00 lis r9,0 return true; ffc0b47c: 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() ) ) { ffc0b480: 80 09 28 24 lwz r0,10276(r9) ffc0b484: 2f 80 00 03 cmpwi cr7,r0,3 ffc0b488: 41 9e 00 7c beq- cr7,ffc0b504 <_Heap_Walk+0x10c> <== ALWAYS TAKEN block = next_block; } while ( block != first_block ); return true; } ffc0b48c: 80 01 00 6c lwz r0,108(r1) ffc0b490: 81 c1 00 20 lwz r14,32(r1) ffc0b494: 7c 08 03 a6 mtlr r0 ffc0b498: 81 e1 00 24 lwz r15,36(r1) ffc0b49c: 82 01 00 28 lwz r16,40(r1) ffc0b4a0: 82 21 00 2c lwz r17,44(r1) ffc0b4a4: 82 41 00 30 lwz r18,48(r1) ffc0b4a8: 82 61 00 34 lwz r19,52(r1) ffc0b4ac: 82 81 00 38 lwz r20,56(r1) ffc0b4b0: 82 a1 00 3c lwz r21,60(r1) ffc0b4b4: 82 c1 00 40 lwz r22,64(r1) ffc0b4b8: 82 e1 00 44 lwz r23,68(r1) ffc0b4bc: 83 01 00 48 lwz r24,72(r1) ffc0b4c0: 83 21 00 4c lwz r25,76(r1) ffc0b4c4: 83 41 00 50 lwz r26,80(r1) ffc0b4c8: 83 61 00 54 lwz r27,84(r1) ffc0b4cc: 83 81 00 58 lwz r28,88(r1) ffc0b4d0: 83 a1 00 5c lwz r29,92(r1) ffc0b4d4: 83 c1 00 60 lwz r30,96(r1) ffc0b4d8: 83 e1 00 64 lwz r31,100(r1) ffc0b4dc: 38 21 00 68 addi r1,r1,104 ffc0b4e0: 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; ffc0b4e4: 3d 20 ff c1 lis r9,-63 ffc0b4e8: 39 29 b2 f4 addi r9,r9,-19724 ffc0b4ec: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b4f0: 3d 20 00 00 lis r9,0 return true; ffc0b4f4: 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() ) ) { ffc0b4f8: 80 09 28 24 lwz r0,10276(r9) ffc0b4fc: 2f 80 00 03 cmpwi cr7,r0,3 ffc0b500: 40 9e ff 8c bne+ cr7,ffc0b48c <_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)( ffc0b504: 80 1f 00 0c lwz r0,12(r31) ffc0b508: 3c a0 ff c2 lis r5,-62 ffc0b50c: 81 1f 00 18 lwz r8,24(r31) ffc0b510: 7f 23 cb 78 mr r3,r25 ffc0b514: 81 3f 00 1c lwz r9,28(r31) ffc0b518: 38 80 00 00 li r4,0 ffc0b51c: 81 7f 00 08 lwz r11,8(r31) ffc0b520: 38 a5 b9 9c addi r5,r5,-18020 ffc0b524: 90 01 00 10 stw r0,16(r1) ffc0b528: 7f 66 db 78 mr r6,r27 ffc0b52c: 7f 07 c3 78 mr r7,r24 ffc0b530: 80 01 00 18 lwz r0,24(r1) ffc0b534: 7f 4a d3 78 mr r10,r26 ffc0b538: 92 e1 00 08 stw r23,8(r1) ffc0b53c: 7c 09 03 a6 mtctr r0 ffc0b540: 91 61 00 0c stw r11,12(r1) ffc0b544: 4c c6 31 82 crclr 4*cr1+eq ffc0b548: 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 ) { ffc0b54c: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0b550: 41 9e 00 ac beq- cr7,ffc0b5fc <_Heap_Walk+0x204> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc0b554: 73 67 00 07 andi. r7,r27,7 ffc0b558: 40 82 00 cc bne- ffc0b624 <_Heap_Walk+0x22c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b55c: 7c 18 db 96 divwu r0,r24,r27 ffc0b560: 7c 00 d9 d6 mullw r0,r0,r27 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc0b564: 7f 98 00 00 cmpw cr7,r24,r0 ffc0b568: 40 9e 00 e8 bne- cr7,ffc0b650 <_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; ffc0b56c: 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; ffc0b570: 7d 20 db 96 divwu r9,r0,r27 ffc0b574: 7d 29 d9 d6 mullw r9,r9,r27 ); return false; } if ( ffc0b578: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b57c: 40 9e 01 00 bne- cr7,ffc0b67c <_Heap_Walk+0x284> block = next_block; } while ( block != first_block ); return true; } ffc0b580: 82 da 00 04 lwz r22,4(r26) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc0b584: 72 c7 00 01 andi. r7,r22,1 ffc0b588: 41 82 01 20 beq- ffc0b6a8 <_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; ffc0b58c: 81 37 00 04 lwz r9,4(r23) ffc0b590: 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); ffc0b594: 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; ffc0b598: 80 09 00 04 lwz r0,4(r9) ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc0b59c: 70 07 00 01 andi. r7,r0,1 ffc0b5a0: 41 82 00 34 beq- ffc0b5d4 <_Heap_Walk+0x1dc> ); return false; } if ( ffc0b5a4: 7f 9a 48 00 cmpw cr7,r26,r9 ffc0b5a8: 41 9e 01 28 beq- cr7,ffc0b6d0 <_Heap_Walk+0x2d8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( ffc0b5ac: 80 01 00 18 lwz r0,24(r1) ffc0b5b0: 3c a0 ff c2 lis r5,-62 ffc0b5b4: 7f 23 cb 78 mr r3,r25 ffc0b5b8: 38 80 00 01 li r4,1 ffc0b5bc: 7c 09 03 a6 mtctr r0 ffc0b5c0: 38 a5 bb 04 addi r5,r5,-17660 ffc0b5c4: 4c c6 31 82 crclr 4*cr1+eq ffc0b5c8: 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; ffc0b5cc: 38 60 00 00 li r3,0 ffc0b5d0: 4b ff fe bc b ffc0b48c <_Heap_Walk+0x94> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( ffc0b5d4: 80 01 00 18 lwz r0,24(r1) ffc0b5d8: 3c a0 ff c2 lis r5,-62 ffc0b5dc: 7f 23 cb 78 mr r3,r25 ffc0b5e0: 38 80 00 01 li r4,1 ffc0b5e4: 7c 09 03 a6 mtctr r0 ffc0b5e8: 38 a5 ba ec addi r5,r5,-17684 ffc0b5ec: 4c c6 31 82 crclr 4*cr1+eq ffc0b5f0: 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; ffc0b5f4: 38 60 00 00 li r3,0 ffc0b5f8: 4b ff fe 94 b ffc0b48c <_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" ); ffc0b5fc: 80 01 00 18 lwz r0,24(r1) ffc0b600: 3c a0 ff c2 lis r5,-62 ffc0b604: 7f 23 cb 78 mr r3,r25 ffc0b608: 38 80 00 01 li r4,1 ffc0b60c: 7c 09 03 a6 mtctr r0 ffc0b610: 38 a5 ba 30 addi r5,r5,-17872 ffc0b614: 4c c6 31 82 crclr 4*cr1+eq ffc0b618: 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; ffc0b61c: 38 60 00 00 li r3,0 ffc0b620: 4b ff fe 6c b ffc0b48c <_Heap_Walk+0x94> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( ffc0b624: 80 01 00 18 lwz r0,24(r1) ffc0b628: 3c a0 ff c2 lis r5,-62 ffc0b62c: 7f 23 cb 78 mr r3,r25 ffc0b630: 38 80 00 01 li r4,1 ffc0b634: 7c 09 03 a6 mtctr r0 ffc0b638: 38 a5 ba 44 addi r5,r5,-17852 ffc0b63c: 7f 66 db 78 mr r6,r27 ffc0b640: 4c c6 31 82 crclr 4*cr1+eq ffc0b644: 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; ffc0b648: 38 60 00 00 li r3,0 ffc0b64c: 4b ff fe 40 b ffc0b48c <_Heap_Walk+0x94> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( ffc0b650: 80 01 00 18 lwz r0,24(r1) ffc0b654: 3c a0 ff c2 lis r5,-62 ffc0b658: 7f 23 cb 78 mr r3,r25 ffc0b65c: 38 80 00 01 li r4,1 ffc0b660: 7c 09 03 a6 mtctr r0 ffc0b664: 38 a5 ba 64 addi r5,r5,-17820 ffc0b668: 7f 06 c3 78 mr r6,r24 ffc0b66c: 4c c6 31 82 crclr 4*cr1+eq ffc0b670: 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; ffc0b674: 38 60 00 00 li r3,0 ffc0b678: 4b ff fe 14 b ffc0b48c <_Heap_Walk+0x94> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc0b67c: 80 01 00 18 lwz r0,24(r1) ffc0b680: 3c a0 ff c2 lis r5,-62 ffc0b684: 7f 23 cb 78 mr r3,r25 ffc0b688: 38 80 00 01 li r4,1 ffc0b68c: 7c 09 03 a6 mtctr r0 ffc0b690: 38 a5 ba 88 addi r5,r5,-17784 ffc0b694: 7f 46 d3 78 mr r6,r26 ffc0b698: 4c c6 31 82 crclr 4*cr1+eq ffc0b69c: 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; ffc0b6a0: 38 60 00 00 li r3,0 ffc0b6a4: 4b ff fd e8 b ffc0b48c <_Heap_Walk+0x94> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0b6a8: 80 01 00 18 lwz r0,24(r1) ffc0b6ac: 3c a0 ff c2 lis r5,-62 ffc0b6b0: 7f 23 cb 78 mr r3,r25 ffc0b6b4: 38 80 00 01 li r4,1 ffc0b6b8: 7c 09 03 a6 mtctr r0 ffc0b6bc: 38 a5 ba bc addi r5,r5,-17732 ffc0b6c0: 4c c6 31 82 crclr 4*cr1+eq ffc0b6c4: 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; ffc0b6c8: 38 60 00 00 li r3,0 ffc0b6cc: 4b ff fd c0 b ffc0b48c <_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; ffc0b6d0: 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; ffc0b6d4: 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 ) { ffc0b6d8: 7f 9f 30 00 cmpw cr7,r31,r6 block = next_block; } while ( block != first_block ); return true; } ffc0b6dc: 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 ) { ffc0b6e0: 41 9e 00 34 beq- cr7,ffc0b714 <_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; ffc0b6e4: 7f 80 30 40 cmplw cr7,r0,r6 ffc0b6e8: 40 9d 03 24 ble- cr7,ffc0ba0c <_Heap_Walk+0x614> <== ALWAYS TAKEN if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( ffc0b6ec: 80 01 00 18 lwz r0,24(r1) ffc0b6f0: 3c a0 ff c2 lis r5,-62 ffc0b6f4: 7f 23 cb 78 mr r3,r25 ffc0b6f8: 38 80 00 01 li r4,1 ffc0b6fc: 7c 09 03 a6 mtctr r0 ffc0b700: 38 a5 bb 34 addi r5,r5,-17612 ffc0b704: 4c c6 31 82 crclr 4*cr1+eq ffc0b708: 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; ffc0b70c: 38 60 00 00 li r3,0 ffc0b710: 4b ff fd 7c b ffc0b48c <_Heap_Walk+0x94> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b714: 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)( ffc0b718: 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)( ffc0b71c: 3e 40 ff c2 lis r18,-62 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b720: 7f 5d d3 78 mr r29,r26 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b724: 3a 73 bd 50 addi r19,r19,-17072 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc0b728: 3a 94 bd 38 addi r20,r20,-17096 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)( ffc0b72c: 3a 52 bc 94 addi r18,r18,-17260 ffc0b730: 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)" : "") ffc0b734: 3e a0 ff c2 lis r21,-62 ffc0b738: 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)( ffc0b73c: 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)" : ""), ffc0b740: 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; ffc0b744: 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); ffc0b748: 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; ffc0b74c: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0b750: 40 9d 00 34 ble- cr7,ffc0b784 <_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)( ffc0b754: 3c a0 ff c2 lis r5,-62 ffc0b758: 7f 23 cb 78 mr r3,r25 ffc0b75c: 38 80 00 01 li r4,1 ffc0b760: 38 a5 bb d4 addi r5,r5,-17452 return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0b764: 80 01 00 18 lwz r0,24(r1) ffc0b768: 7f a6 eb 78 mr r6,r29 ffc0b76c: 7f c7 f3 78 mr r7,r30 ffc0b770: 7c 09 03 a6 mtctr r0 ffc0b774: 4c c6 31 82 crclr 4*cr1+eq ffc0b778: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0b77c: 38 60 00 00 li r3,0 ffc0b780: 4b ff fd 0c b ffc0b48c <_Heap_Walk+0x94> ffc0b784: 80 1f 00 24 lwz r0,36(r31) ffc0b788: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0b78c: 41 bc ff c8 blt- cr7,ffc0b754 <_Heap_Walk+0x35c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b790: 7d 3c db 96 divwu r9,r28,r27 ffc0b794: 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; ffc0b798: 7f a0 ba 78 xor r0,r29,r23 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0b79c: 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; ffc0b7a0: 7c 00 00 34 cntlzw r0,r0 ffc0b7a4: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0b7a8: 68 00 00 01 xori r0,r0,1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0b7ac: 41 9e 00 0c beq- cr7,ffc0b7b8 <_Heap_Walk+0x3c0> ffc0b7b0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b7b4: 40 9e 01 e0 bne- cr7,ffc0b994 <_Heap_Walk+0x59c> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { ffc0b7b8: 7f 98 e0 40 cmplw cr7,r24,r28 ffc0b7bc: 40 9d 00 0c ble- cr7,ffc0b7c8 <_Heap_Walk+0x3d0> ffc0b7c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b7c4: 40 9e 02 00 bne- cr7,ffc0b9c4 <_Heap_Walk+0x5cc> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { ffc0b7c8: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0b7cc: 41 9c 00 0c blt- cr7,ffc0b7d8 <_Heap_Walk+0x3e0> ffc0b7d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b7d4: 40 9e 02 24 bne- cr7,ffc0b9f8 <_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; ffc0b7d8: 80 1e 00 04 lwz r0,4(r30) ffc0b7dc: 56 d6 07 fe clrlwi r22,r22,31 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0b7e0: 70 07 00 01 andi. r7,r0,1 ffc0b7e4: 41 82 00 74 beq- ffc0b858 <_Heap_Walk+0x460> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { ffc0b7e8: 2f 96 00 00 cmpwi cr7,r22,0 ffc0b7ec: 41 9e 00 40 beq- cr7,ffc0b82c <_Heap_Walk+0x434> (*printer)( ffc0b7f0: 80 01 00 18 lwz r0,24(r1) ffc0b7f4: 7f 23 cb 78 mr r3,r25 ffc0b7f8: 38 80 00 00 li r4,0 ffc0b7fc: 7e 85 a3 78 mr r5,r20 ffc0b800: 7c 09 03 a6 mtctr r0 ffc0b804: 7f a6 eb 78 mr r6,r29 ffc0b808: 7f 87 e3 78 mr r7,r28 ffc0b80c: 4c c6 31 82 crclr 4*cr1+eq ffc0b810: 4e 80 04 21 bctrl block->prev_size ); } block = next_block; } while ( block != first_block ); ffc0b814: 7f 9a f0 00 cmpw cr7,r26,r30 ffc0b818: 41 9e 01 0c beq- cr7,ffc0b924 <_Heap_Walk+0x52c> ffc0b81c: 82 de 00 04 lwz r22,4(r30) ffc0b820: 7f dd f3 78 mr r29,r30 ffc0b824: 80 1f 00 20 lwz r0,32(r31) ffc0b828: 4b ff ff 1c b ffc0b744 <_Heap_Walk+0x34c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b82c: 80 01 00 18 lwz r0,24(r1) ffc0b830: 7f a6 eb 78 mr r6,r29 ffc0b834: 7f 23 cb 78 mr r3,r25 ffc0b838: 81 1d 00 00 lwz r8,0(r29) ffc0b83c: 38 80 00 00 li r4,0 ffc0b840: 7c 09 03 a6 mtctr r0 ffc0b844: 7e 65 9b 78 mr r5,r19 ffc0b848: 7f 87 e3 78 mr r7,r28 ffc0b84c: 4c c6 31 82 crclr 4*cr1+eq ffc0b850: 4e 80 04 21 bctrl ffc0b854: 4b ff ff c0 b ffc0b814 <_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 ? ffc0b858: 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)( ffc0b85c: 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; ffc0b860: 80 1f 00 0c lwz r0,12(r31) ffc0b864: 7f 89 40 00 cmpw cr7,r9,r8 ffc0b868: 41 9e 00 f8 beq- cr7,ffc0b960 <_Heap_Walk+0x568> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0b86c: 7f 9f 40 00 cmpw cr7,r31,r8 ffc0b870: 41 9e 01 00 beq- cr7,ffc0b970 <_Heap_Walk+0x578> ffc0b874: 39 35 bd 04 addi r9,r21,-17148 block->next, block->next == last_free_block ? ffc0b878: 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)( ffc0b87c: 7f 80 50 00 cmpw cr7,r0,r10 ffc0b880: 41 9e 00 e8 beq- cr7,ffc0b968 <_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)" : "") ffc0b884: 7f 9f 50 00 cmpw cr7,r31,r10 ffc0b888: 41 9e 00 f0 beq- cr7,ffc0b978 <_Heap_Walk+0x580> ffc0b88c: 38 15 bd 04 addi r0,r21,-17148 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)( ffc0b890: 90 01 00 08 stw r0,8(r1) ffc0b894: 7f 23 cb 78 mr r3,r25 ffc0b898: 38 80 00 00 li r4,0 ffc0b89c: 80 01 00 18 lwz r0,24(r1) ffc0b8a0: 7e 45 93 78 mr r5,r18 ffc0b8a4: 7f a6 eb 78 mr r6,r29 ffc0b8a8: 7f 87 e3 78 mr r7,r28 ffc0b8ac: 7c 09 03 a6 mtctr r0 ffc0b8b0: 4c c6 31 82 crclr 4*cr1+eq ffc0b8b4: 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 ) { ffc0b8b8: 81 1e 00 00 lwz r8,0(r30) ffc0b8bc: 7f 9c 40 00 cmpw cr7,r28,r8 ffc0b8c0: 40 9e 00 6c bne- cr7,ffc0b92c <_Heap_Walk+0x534> ); return false; } if ( !prev_used ) { ffc0b8c4: 2f 96 00 00 cmpwi cr7,r22,0 ffc0b8c8: 41 9e 00 b8 beq- cr7,ffc0b980 <_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; ffc0b8cc: 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 ) { ffc0b8d0: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0b8d4: 41 9e 00 24 beq- cr7,ffc0b8f8 <_Heap_Walk+0x500> <== NEVER TAKEN if ( free_block == block ) { ffc0b8d8: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0b8dc: 40 be 00 0c bne+ cr7,ffc0b8e8 <_Heap_Walk+0x4f0> ffc0b8e0: 4b ff ff 34 b ffc0b814 <_Heap_Walk+0x41c> ffc0b8e4: 41 ba ff 30 beq- cr6,ffc0b814 <_Heap_Walk+0x41c> return true; } free_block = free_block->next; ffc0b8e8: 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 ) { ffc0b8ec: 7f 9f 48 00 cmpw cr7,r31,r9 if ( free_block == block ) { ffc0b8f0: 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 ) { ffc0b8f4: 40 9e ff f0 bne+ cr7,ffc0b8e4 <_Heap_Walk+0x4ec> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0b8f8: 3c a0 ff c2 lis r5,-62 ffc0b8fc: 7f 23 cb 78 mr r3,r25 ffc0b900: 38 80 00 01 li r4,1 ffc0b904: 38 a5 bd 78 addi r5,r5,-17032 ffc0b908: 80 01 00 18 lwz r0,24(r1) ffc0b90c: 7f a6 eb 78 mr r6,r29 ffc0b910: 7c 09 03 a6 mtctr r0 ffc0b914: 4c c6 31 82 crclr 4*cr1+eq ffc0b918: 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; ffc0b91c: 38 60 00 00 li r3,0 ffc0b920: 4b ff fb 6c b ffc0b48c <_Heap_Walk+0x94> } block = next_block; } while ( block != first_block ); return true; ffc0b924: 38 60 00 01 li r3,1 ffc0b928: 4b ff fb 64 b ffc0b48c <_Heap_Walk+0x94> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( ffc0b92c: 80 01 00 18 lwz r0,24(r1) ffc0b930: 3c a0 ff c2 lis r5,-62 ffc0b934: 7f 23 cb 78 mr r3,r25 ffc0b938: 38 80 00 01 li r4,1 ffc0b93c: 7c 09 03 a6 mtctr r0 ffc0b940: 38 a5 bc cc addi r5,r5,-17204 ffc0b944: 7f a6 eb 78 mr r6,r29 ffc0b948: 7f 87 e3 78 mr r7,r28 ffc0b94c: 7f c9 f3 78 mr r9,r30 ffc0b950: 4c c6 31 82 crclr 4*cr1+eq ffc0b954: 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; ffc0b958: 38 60 00 00 li r3,0 ffc0b95c: 4b ff fb 30 b ffc0b48c <_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)( ffc0b960: 39 30 b9 64 addi r9,r16,-18076 ffc0b964: 4b ff ff 14 b ffc0b878 <_Heap_Walk+0x480> ffc0b968: 38 11 b9 80 addi r0,r17,-18048 ffc0b96c: 4b ff ff 24 b ffc0b890 <_Heap_Walk+0x498> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0b970: 39 2e b9 74 addi r9,r14,-18060 ffc0b974: 4b ff ff 04 b ffc0b878 <_Heap_Walk+0x480> block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0b978: 38 0f b9 90 addi r0,r15,-18032 ffc0b97c: 4b ff ff 14 b ffc0b890 <_Heap_Walk+0x498> return false; } if ( !prev_used ) { (*printer)( ffc0b980: 3c a0 ff c2 lis r5,-62 ffc0b984: 7f 23 cb 78 mr r3,r25 ffc0b988: 38 80 00 01 li r4,1 ffc0b98c: 38 a5 bd 08 addi r5,r5,-17144 ffc0b990: 4b ff ff 78 b ffc0b908 <_Heap_Walk+0x510> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( ffc0b994: 80 01 00 18 lwz r0,24(r1) ffc0b998: 3c a0 ff c2 lis r5,-62 ffc0b99c: 7f 23 cb 78 mr r3,r25 ffc0b9a0: 38 80 00 01 li r4,1 ffc0b9a4: 7c 09 03 a6 mtctr r0 ffc0b9a8: 38 a5 bc 04 addi r5,r5,-17404 ffc0b9ac: 7f a6 eb 78 mr r6,r29 ffc0b9b0: 7f 87 e3 78 mr r7,r28 ffc0b9b4: 4c c6 31 82 crclr 4*cr1+eq ffc0b9b8: 4e 80 04 21 bctrl "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; ffc0b9bc: 38 60 00 00 li r3,0 ffc0b9c0: 4b ff fa cc b ffc0b48c <_Heap_Walk+0x94> } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( ffc0b9c4: 80 01 00 18 lwz r0,24(r1) ffc0b9c8: 3c a0 ff c2 lis r5,-62 ffc0b9cc: 7f 23 cb 78 mr r3,r25 ffc0b9d0: 38 80 00 01 li r4,1 ffc0b9d4: 7c 09 03 a6 mtctr r0 ffc0b9d8: 38 a5 bc 34 addi r5,r5,-17356 ffc0b9dc: 7f a6 eb 78 mr r6,r29 ffc0b9e0: 7f 87 e3 78 mr r7,r28 ffc0b9e4: 7f 08 c3 78 mr r8,r24 ffc0b9e8: 4c c6 31 82 crclr 4*cr1+eq ffc0b9ec: 4e 80 04 21 bctrl block, block_size, min_block_size ); return false; ffc0b9f0: 38 60 00 00 li r3,0 ffc0b9f4: 4b ff fa 98 b ffc0b48c <_Heap_Walk+0x94> } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0b9f8: 3c a0 ff c2 lis r5,-62 ffc0b9fc: 7f 23 cb 78 mr r3,r25 ffc0ba00: 38 80 00 01 li r4,1 ffc0ba04: 38 a5 bc 60 addi r5,r5,-17312 ffc0ba08: 4b ff fd 5c b ffc0b764 <_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; ffc0ba0c: 81 5f 00 24 lwz r10,36(r31) ffc0ba10: 7f 86 50 40 cmplw cr7,r6,r10 ffc0ba14: 41 bd fc d8 bgt- cr7,ffc0b6ec <_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; ffc0ba18: 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; ffc0ba1c: 7d 69 43 96 divwu r11,r9,r8 ffc0ba20: 7d 6b 41 d6 mullw r11,r11,r8 ); return false; } if ( ffc0ba24: 7f 89 58 00 cmpw cr7,r9,r11 ffc0ba28: 40 9e 00 d4 bne- cr7,ffc0bafc <_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; ffc0ba2c: 81 26 00 04 lwz r9,4(r6) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0ba30: 7f eb fb 78 mr r11,r31 ffc0ba34: 7c c5 33 78 mr r5,r6 ffc0ba38: 55 29 00 3c rlwinm r9,r9,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0ba3c: 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; ffc0ba40: 81 29 00 04 lwz r9,4(r9) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0ba44: 71 27 00 01 andi. r7,r9,1 ffc0ba48: 41 a2 00 58 beq+ ffc0baa0 <_Heap_Walk+0x6a8> <== ALWAYS TAKEN ffc0ba4c: 48 00 00 88 b ffc0bad4 <_Heap_Walk+0x6dc> <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; ffc0ba50: 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 ) { ffc0ba54: 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; ffc0ba58: 7f 06 00 40 cmplw cr6,r6,r0 ffc0ba5c: 7c 86 50 40 cmplw cr1,r6,r10 ffc0ba60: 41 be fc b4 beq- cr7,ffc0b714 <_Heap_Walk+0x31c> ffc0ba64: 41 b8 fc 88 blt- cr6,ffc0b6ec <_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; ffc0ba68: 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; ffc0ba6c: 41 a5 fc 80 bgt- cr1,ffc0b6ec <_Heap_Walk+0x2f4> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0ba70: 7c e9 43 96 divwu r7,r9,r8 ffc0ba74: 7c e7 41 d6 mullw r7,r7,r8 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0ba78: 7c ab 2b 78 mr r11,r5 ); return false; } if ( ffc0ba7c: 7f 89 38 00 cmpw cr7,r9,r7 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0ba80: 7c c5 33 78 mr r5,r6 ); return false; } if ( ffc0ba84: 40 9e 00 78 bne- cr7,ffc0bafc <_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; ffc0ba88: 81 26 00 04 lwz r9,4(r6) ffc0ba8c: 55 29 00 3c rlwinm r9,r9,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0ba90: 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; ffc0ba94: 81 29 00 04 lwz r9,4(r9) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0ba98: 71 27 00 01 andi. r7,r9,1 ffc0ba9c: 40 82 00 38 bne- ffc0bad4 <_Heap_Walk+0x6dc> ); return false; } if ( free_block->prev != prev_block ) { ffc0baa0: 80 e6 00 0c lwz r7,12(r6) ffc0baa4: 7f 87 58 00 cmpw cr7,r7,r11 ffc0baa8: 41 9e ff a8 beq+ cr7,ffc0ba50 <_Heap_Walk+0x658> (*printer)( ffc0baac: 80 01 00 18 lwz r0,24(r1) ffc0bab0: 3c a0 ff c2 lis r5,-62 ffc0bab4: 7f 23 cb 78 mr r3,r25 ffc0bab8: 38 80 00 01 li r4,1 ffc0babc: 7c 09 03 a6 mtctr r0 ffc0bac0: 38 a5 bb a0 addi r5,r5,-17504 ffc0bac4: 4c c6 31 82 crclr 4*cr1+eq ffc0bac8: 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; ffc0bacc: 38 60 00 00 li r3,0 ffc0bad0: 4b ff f9 bc b ffc0b48c <_Heap_Walk+0x94> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( ffc0bad4: 80 01 00 18 lwz r0,24(r1) ffc0bad8: 3c a0 ff c2 lis r5,-62 ffc0badc: 7f 23 cb 78 mr r3,r25 ffc0bae0: 38 80 00 01 li r4,1 ffc0bae4: 7c 09 03 a6 mtctr r0 ffc0bae8: 38 a5 bb 84 addi r5,r5,-17532 ffc0baec: 4c c6 31 82 crclr 4*cr1+eq ffc0baf0: 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; ffc0baf4: 38 60 00 00 li r3,0 ffc0baf8: 4b ff f9 94 b ffc0b48c <_Heap_Walk+0x94> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc0bafc: 80 01 00 18 lwz r0,24(r1) ffc0bb00: 3c a0 ff c2 lis r5,-62 ffc0bb04: 7f 23 cb 78 mr r3,r25 ffc0bb08: 38 80 00 01 li r4,1 ffc0bb0c: 7c 09 03 a6 mtctr r0 ffc0bb10: 38 a5 bb 54 addi r5,r5,-17580 ffc0bb14: 4c c6 31 82 crclr 4*cr1+eq ffc0bb18: 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; ffc0bb1c: 38 60 00 00 li r3,0 ffc0bb20: 4b ff f9 6c b ffc0b48c <_Heap_Walk+0x94> =============================================================================== ffc0b2f8 <_Heap_Walk_print>: static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b2f8: 94 21 ff 88 stwu r1,-120(r1) ffc0b2fc: 7c 08 02 a6 mflr r0 ffc0b300: 93 e1 00 74 stw r31,116(r1) ffc0b304: 90 01 00 7c stw r0,124(r1) ffc0b308: 7c 60 1b 78 mr r0,r3 ffc0b30c: 90 c1 00 1c stw r6,28(r1) ffc0b310: 90 e1 00 20 stw r7,32(r1) ffc0b314: 91 01 00 24 stw r8,36(r1) ffc0b318: 91 21 00 28 stw r9,40(r1) ffc0b31c: 91 41 00 2c stw r10,44(r1) ffc0b320: 40 86 00 24 bne- cr1,ffc0b344 <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN ffc0b324: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0b328: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0b32c: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0b330: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0b334: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0b338: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0b33c: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0b340: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0b344: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b348: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc0b34c: 40 9e 00 58 bne- cr7,ffc0b3a4 <_Heap_Walk_print+0xac> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); ffc0b350: 3c 60 ff c2 lis r3,-62 ffc0b354: 7c 04 03 78 mr r4,r0 ffc0b358: 38 63 b9 58 addi r3,r3,-18088 ffc0b35c: 4c c6 31 82 crclr 4*cr1+eq ffc0b360: 4b ff b1 d9 bl ffc06538 } va_start( ap, fmt ); ffc0b364: 38 00 00 03 li r0,3 ffc0b368: 98 01 00 08 stb r0,8(r1) ffc0b36c: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b370: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b374: 98 01 00 09 stb r0,9(r1) ffc0b378: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b37c: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b380: 90 01 00 0c stw r0,12(r1) ffc0b384: 38 01 00 10 addi r0,r1,16 ffc0b388: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b38c: 4b ff d5 39 bl ffc088c4 va_end( ap ); } ffc0b390: 80 01 00 7c lwz r0,124(r1) ffc0b394: 83 e1 00 74 lwz r31,116(r1) ffc0b398: 38 21 00 78 addi r1,r1,120 ffc0b39c: 7c 08 03 a6 mtlr r0 ffc0b3a0: 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 ); ffc0b3a4: 3c 60 ff c2 lis r3,-62 ffc0b3a8: 7c 04 03 78 mr r4,r0 ffc0b3ac: 38 63 b9 4c addi r3,r3,-18100 ffc0b3b0: 4c c6 31 82 crclr 4*cr1+eq ffc0b3b4: 4b ff b1 85 bl ffc06538 } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b3b8: 38 00 00 03 li r0,3 ffc0b3bc: 98 01 00 08 stb r0,8(r1) ffc0b3c0: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b3c4: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b3c8: 98 01 00 09 stb r0,9(r1) ffc0b3cc: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b3d0: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b3d4: 90 01 00 0c stw r0,12(r1) ffc0b3d8: 38 01 00 10 addi r0,r1,16 ffc0b3dc: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b3e0: 4b ff d4 e5 bl ffc088c4 va_end( ap ); } ffc0b3e4: 80 01 00 7c lwz r0,124(r1) ffc0b3e8: 83 e1 00 74 lwz r31,116(r1) ffc0b3ec: 38 21 00 78 addi r1,r1,120 ffc0b3f0: 7c 08 03 a6 mtlr r0 ffc0b3f4: 4e 80 00 20 blr =============================================================================== ffc09e6c <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09e6c: 94 21 ff f0 stwu r1,-16(r1) ffc09e70: 7c 08 02 a6 mflr r0 ffc09e74: 93 c1 00 08 stw r30,8(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09e78: 3f c0 00 00 lis r30,0 * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09e7c: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09e80: 80 1e 28 58 lwz r0,10328(r30) * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09e84: 93 e1 00 0c stw r31,12(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09e88: 2f 80 00 00 cmpwi cr7,r0,0 ffc09e8c: 41 9e 00 2c beq- cr7,ffc09eb8 <_IO_Initialize_all_drivers+0x4c><== NEVER TAKEN ffc09e90: 3b e0 00 00 li r31,0 ffc09e94: 3b de 28 58 addi r30,r30,10328 (void) rtems_io_initialize( major, 0, NULL ); ffc09e98: 7f e3 fb 78 mr r3,r31 ffc09e9c: 38 80 00 00 li r4,0 ffc09ea0: 38 a0 00 00 li r5,0 ffc09ea4: 48 00 6e 35 bl ffc10cd8 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09ea8: 80 1e 00 00 lwz r0,0(r30) ffc09eac: 3b ff 00 01 addi r31,r31,1 ffc09eb0: 7f 80 f8 40 cmplw cr7,r0,r31 ffc09eb4: 41 9d ff e4 bgt+ cr7,ffc09e98 <_IO_Initialize_all_drivers+0x2c> (void) rtems_io_initialize( major, 0, NULL ); } ffc09eb8: 80 01 00 14 lwz r0,20(r1) ffc09ebc: 83 c1 00 08 lwz r30,8(r1) ffc09ec0: 7c 08 03 a6 mtlr r0 ffc09ec4: 83 e1 00 0c lwz r31,12(r1) ffc09ec8: 38 21 00 10 addi r1,r1,16 ffc09ecc: 4e 80 00 20 blr =============================================================================== ffc09d5c <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { ffc09d5c: 94 21 ff e0 stwu r1,-32(r1) ffc09d60: 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; ffc09d64: 3d 20 00 00 lis r9,0 * workspace. * */ void _IO_Manager_initialization(void) { ffc09d68: 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; ffc09d6c: 39 29 20 04 addi r9,r9,8196 * workspace. * */ void _IO_Manager_initialization(void) { ffc09d70: 93 a1 00 14 stw r29,20(r1) ffc09d74: 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; ffc09d78: 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; ffc09d7c: 83 c9 00 30 lwz r30,48(r9) * workspace. * */ void _IO_Manager_initialization(void) { ffc09d80: 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 ) ffc09d84: 7f 9e e8 40 cmplw cr7,r30,r29 * workspace. * */ void _IO_Manager_initialization(void) { ffc09d88: 93 61 00 0c stw r27,12(r1) ffc09d8c: 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; ffc09d90: 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 ) ffc09d94: 40 9c 00 a4 bge- cr7,ffc09e38 <_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 ) ffc09d98: 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( ffc09d9c: 7f 63 db 78 mr r3,r27 ffc09da0: 48 00 3e b1 bl ffc0dc50 <_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 *) ffc09da4: 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; ffc09da8: 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 *) ffc09dac: 90 7c 28 5c stw r3,10332(r28) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc09db0: 38 80 00 00 li r4,0 ffc09db4: 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; ffc09db8: 93 a9 28 58 stw r29,10328(r9) memset( ffc09dbc: 48 00 ad f1 bl ffc14bac _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc09dc0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09dc4: 41 9e 00 50 beq- cr7,ffc09e14 <_IO_Manager_initialization+0xb8><== NEVER TAKEN ffc09dc8: 7f c9 03 a6 mtctr r30 ffc09dcc: 81 1c 28 5c lwz r8,10332(r28) ffc09dd0: 39 40 00 00 li r10,0 _IO_Driver_address_table[index] = driver_table[index]; ffc09dd4: 7f e9 fb 78 mr r9,r31 ffc09dd8: 7c a9 50 6e lwzux r5,r9,r10 ffc09ddc: 7d 68 52 14 add r11,r8,r10 ffc09de0: 80 e9 00 08 lwz r7,8(r9) ffc09de4: 80 09 00 0c lwz r0,12(r9) ffc09de8: 80 c9 00 04 lwz r6,4(r9) ffc09dec: 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++ ) ffc09df0: 39 4a 00 18 addi r10,r10,24 _IO_Driver_address_table[index] = driver_table[index]; ffc09df4: 90 cb 00 04 stw r6,4(r11) ffc09df8: 90 eb 00 08 stw r7,8(r11) ffc09dfc: 90 0b 00 0c stw r0,12(r11) ffc09e00: 80 e9 00 10 lwz r7,16(r9) ffc09e04: 80 09 00 14 lwz r0,20(r9) ffc09e08: 90 eb 00 10 stw r7,16(r11) ffc09e0c: 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++ ) ffc09e10: 42 00 ff c4 bdnz+ ffc09dd4 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; } ffc09e14: 80 01 00 24 lwz r0,36(r1) ffc09e18: 83 61 00 0c lwz r27,12(r1) ffc09e1c: 7c 08 03 a6 mtlr r0 ffc09e20: 83 81 00 10 lwz r28,16(r1) ffc09e24: 83 a1 00 14 lwz r29,20(r1) ffc09e28: 83 c1 00 18 lwz r30,24(r1) ffc09e2c: 83 e1 00 1c lwz r31,28(r1) ffc09e30: 38 21 00 20 addi r1,r1,32 ffc09e34: 4e 80 00 20 blr ffc09e38: 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; ffc09e3c: 3d 20 00 00 lis r9,0 ffc09e40: 93 e9 28 5c stw r31,10332(r9) _IO_Number_of_drivers = number_of_drivers; ffc09e44: 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]; } ffc09e48: 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; ffc09e4c: 93 c9 28 58 stw r30,10328(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]; } ffc09e50: 83 61 00 0c lwz r27,12(r1) ffc09e54: 83 81 00 10 lwz r28,16(r1) ffc09e58: 83 a1 00 14 lwz r29,20(r1) ffc09e5c: 83 c1 00 18 lwz r30,24(r1) ffc09e60: 83 e1 00 1c lwz r31,28(r1) ffc09e64: 38 21 00 20 addi r1,r1,32 ffc09e68: 4e 80 00 20 blr =============================================================================== ffc0adc0 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0adc0: 94 21 ff f0 stwu r1,-16(r1) ffc0adc4: 7c 08 02 a6 mflr r0 _Internal_errors_What_happened.the_source = the_source; ffc0adc8: 3d 60 00 00 lis r11,0 ffc0adcc: 39 2b 2d 50 addi r9,r11,11600 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0add0: 90 01 00 14 stw r0,20(r1) ffc0add4: 93 e1 00 0c stw r31,12(r1) ffc0add8: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc0addc: 98 89 00 04 stb r4,4(r9) _Internal_errors_What_happened.the_error = the_error; ffc0ade0: 90 a9 00 08 stw r5,8(r9) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; ffc0ade4: 90 6b 2d 50 stw r3,11600(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 ); ffc0ade8: 48 00 27 41 bl ffc0d528 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc0adec: 38 00 00 05 li r0,5 ffc0adf0: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc0adf4: 7f e3 fb 78 mr r3,r31 ffc0adf8: 90 09 28 48 stw r0,10312(r9) ffc0adfc: 4b ff 91 1d bl ffc03f18 <_BSP_Fatal_error> ffc0ae00: 48 00 00 00 b ffc0ae00 <_Internal_error_Occurred+0x40><== NOT EXECUTED =============================================================================== ffc0ae18 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0ae18: 94 21 ff f0 stwu r1,-16(r1) ffc0ae1c: 7c 08 02 a6 mflr r0 ffc0ae20: 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 ) ffc0ae24: 80 03 00 18 lwz r0,24(r3) */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0ae28: 93 e1 00 0c stw r31,12(r1) ffc0ae2c: 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 ) ffc0ae30: 2f 80 00 00 cmpwi cr7,r0,0 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0ae34: 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; ffc0ae38: 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 ) ffc0ae3c: 41 9e 00 58 beq- cr7,ffc0ae94 <_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 ); ffc0ae40: 3b df 00 20 addi r30,r31,32 ffc0ae44: 7f c3 f3 78 mr r3,r30 ffc0ae48: 4b ff f3 fd bl ffc0a244 <_Chain_Get> if ( information->auto_extend ) { ffc0ae4c: 88 1f 00 12 lbz r0,18(r31) ffc0ae50: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ae54: 41 9e 00 40 beq- cr7,ffc0ae94 <_Objects_Allocate+0x7c> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc0ae58: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ae5c: 41 9e 00 50 beq- cr7,ffc0aeac <_Objects_Allocate+0x94> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0ae60: a1 63 00 0a lhz r11,10(r3) ffc0ae64: a0 1f 00 0a lhz r0,10(r31) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc0ae68: a1 3f 00 14 lhz r9,20(r31) } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0ae6c: 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--; ffc0ae70: 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; ffc0ae74: 7c 00 4b 96 divwu r0,r0,r9 information->inactive_per_block[ block ]--; ffc0ae78: 81 3f 00 30 lwz r9,48(r31) ffc0ae7c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0ae80: 7d 49 00 2e lwzx r10,r9,r0 information->inactive--; ffc0ae84: 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 ]--; ffc0ae88: 39 4a ff ff addi r10,r10,-1 ffc0ae8c: 7d 49 01 2e stwx r10,r9,r0 information->inactive--; ffc0ae90: b1 7f 00 2c sth r11,44(r31) ); } #endif return the_object; } ffc0ae94: 80 01 00 14 lwz r0,20(r1) ffc0ae98: 83 c1 00 08 lwz r30,8(r1) ffc0ae9c: 7c 08 03 a6 mtlr r0 ffc0aea0: 83 e1 00 0c lwz r31,12(r1) ffc0aea4: 38 21 00 10 addi r1,r1,16 ffc0aea8: 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 ); ffc0aeac: 7f e3 fb 78 mr r3,r31 ffc0aeb0: 48 00 00 4d bl ffc0aefc <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc0aeb4: 7f c3 f3 78 mr r3,r30 ffc0aeb8: 4b ff f3 8d bl ffc0a244 <_Chain_Get> } if ( the_object ) { ffc0aebc: 2c 03 00 00 cmpwi r3,0 ffc0aec0: 41 82 ff d4 beq+ ffc0ae94 <_Objects_Allocate+0x7c> ffc0aec4: 4b ff ff 9c b ffc0ae60 <_Objects_Allocate+0x48> =============================================================================== ffc0aefc <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc0aefc: 94 21 ff c0 stwu r1,-64(r1) ffc0af00: 7c 08 02 a6 mflr r0 ffc0af04: 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 ) ffc0af08: 81 23 00 34 lwz r9,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc0af0c: 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 ) ffc0af10: 2f 89 00 00 cmpwi cr7,r9,0 */ void _Objects_Extend_information( Objects_Information *information ) { ffc0af14: 93 81 00 30 stw r28,48(r1) ffc0af18: 93 e1 00 3c stw r31,60(r1) ffc0af1c: 7c 7f 1b 78 mr r31,r3 ffc0af20: 92 c1 00 18 stw r22,24(r1) ffc0af24: 92 e1 00 1c stw r23,28(r1) ffc0af28: 93 01 00 20 stw r24,32(r1) ffc0af2c: 93 21 00 24 stw r25,36(r1) ffc0af30: 93 41 00 28 stw r26,40(r1) ffc0af34: 93 a1 00 34 stw r29,52(r1) ffc0af38: 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 ); ffc0af3c: a3 83 00 0a lhz r28,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0af40: a3 63 00 10 lhz r27,16(r3) ffc0af44: 41 9e 02 80 beq- cr7,ffc0b1c4 <_Objects_Extend_information+0x2c8> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc0af48: a1 63 00 14 lhz r11,20(r3) ffc0af4c: 7e db 5b 96 divwu r22,r27,r11 for ( ; block < block_count; block++ ) { ffc0af50: 2f 96 00 00 cmpwi cr7,r22,0 ffc0af54: 41 9e 02 88 beq- cr7,ffc0b1dc <_Objects_Extend_information+0x2e0><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { ffc0af58: 80 09 00 00 lwz r0,0(r9) ffc0af5c: 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 ); ffc0af60: 7f 9e e3 78 mr r30,r28 index_base = minimum_index; block = 0; ffc0af64: 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 ) { ffc0af68: 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; ffc0af6c: 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 ) { ffc0af70: 40 be 00 14 bne+ cr7,ffc0af84 <_Objects_Extend_information+0x88><== ALWAYS TAKEN ffc0af74: 48 00 02 7c b ffc0b1f0 <_Objects_Extend_information+0x2f4><== NOT EXECUTED ffc0af78: 84 09 00 04 lwzu r0,4(r9) ffc0af7c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0af80: 41 9e 01 f4 beq- cr7,ffc0b174 <_Objects_Extend_information+0x278> do_extend = false; break; } else index_base += information->allocation_size; ffc0af84: 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++ ) { ffc0af88: 3b bd 00 01 addi r29,r29,1 ffc0af8c: 42 00 ff ec bdnz+ ffc0af78 <_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; ffc0af90: 3b 20 00 01 li r25,1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc0af94: 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 ) { ffc0af98: 2b 9b ff ff cmplwi cr7,r27,65535 ffc0af9c: 41 9d 01 a0 bgt- cr7,ffc0b13c <_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 ) { ffc0afa0: 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; ffc0afa4: 80 7f 00 18 lwz r3,24(r31) if ( information->auto_extend ) { ffc0afa8: 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; ffc0afac: 7c 6a 19 d6 mullw r3,r10,r3 if ( information->auto_extend ) { ffc0afb0: 41 9e 01 cc beq- cr7,ffc0b17c <_Objects_Extend_information+0x280> new_object_block = _Workspace_Allocate( block_size ); ffc0afb4: 48 00 2c 3d bl ffc0dbf0 <_Workspace_Allocate> if ( !new_object_block ) ffc0afb8: 7c 7a 1b 79 mr. r26,r3 ffc0afbc: 41 82 01 80 beq- ffc0b13c <_Objects_Extend_information+0x240> } /* * Do we need to grow the tables? */ if ( do_extend ) { ffc0afc0: 2f 99 00 00 cmpwi cr7,r25,0 ffc0afc4: 41 9e 00 f4 beq- cr7,ffc0b0b8 <_Objects_Extend_information+0x1bc> */ /* * Up the block count and maximum */ block_count++; ffc0afc8: 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 *)) + ffc0afcc: 1c 77 00 03 mulli r3,r23,3 ((maximum + minimum_index) * sizeof(Objects_Control *)); ffc0afd0: 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 *)) + ffc0afd4: 7c 63 e2 14 add r3,r3,r28 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); ffc0afd8: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0afdc: 48 00 2c 15 bl ffc0dbf0 <_Workspace_Allocate> if ( !object_blocks ) { ffc0afe0: 7c 78 1b 79 mr. r24,r3 ffc0afe4: 41 82 02 18 beq- ffc0b1fc <_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 ) { ffc0afe8: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc0afec: 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); ffc0aff0: 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 ) { ffc0aff4: 7f 9c 00 40 cmplw cr7,r28,r0 ffc0aff8: 7e f9 ba 14 add r23,r25,r23 ffc0affc: 41 9c 01 8c blt- cr7,ffc0b188 <_Objects_Extend_information+0x28c> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0b000: 2f 9c 00 00 cmpwi cr7,r28,0 local_table[ index ] = NULL; ffc0b004: 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, ffc0b008: 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; ffc0b00c: 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++ ) { ffc0b010: 41 9e 00 0c beq- cr7,ffc0b01c <_Objects_Extend_information+0x120><== NEVER TAKEN local_table[ index ] = NULL; ffc0b014: 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++ ) { ffc0b018: 42 00 ff fc bdnz+ ffc0b014 <_Objects_Extend_information+0x118> ffc0b01c: 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 ); ffc0b020: a1 7f 00 14 lhz r11,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0b024: 38 00 00 00 li r0,0 ffc0b028: 7c 18 b1 2e stwx r0,r24,r22 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0b02c: 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 ; ffc0b030: 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; ffc0b034: 7c 19 b1 2e stwx r0,r25,r22 for ( index=index_base ; ffc0b038: 40 9c 00 30 bge- cr7,ffc0b068 <_Objects_Extend_information+0x16c><== NEVER TAKEN ffc0b03c: 38 1e 00 01 addi r0,r30,1 ffc0b040: 7f 80 58 40 cmplw cr7,r0,r11 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc0b044: 57 c9 10 3a rlwinm r9,r30,2,0,29 ffc0b048: 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; ffc0b04c: 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 ; ffc0b050: 7d 29 ba 14 add r9,r9,r23 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0b054: 7d 69 03 a6 mtctr r11 ffc0b058: 38 00 00 00 li r0,0 ffc0b05c: 41 9d 01 ac bgt- cr7,ffc0b208 <_Objects_Extend_information+0x30c><== NEVER TAKEN ffc0b060: 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 ; ffc0b064: 42 00 ff fc bdnz+ ffc0b060 <_Objects_Extend_information+0x164> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0b068: 7c 00 00 a6 mfmsr r0 ffc0b06c: 7d 30 42 a6 mfsprg r9,0 ffc0b070: 7c 09 48 78 andc r9,r0,r9 ffc0b074: 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) | ffc0b078: 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; ffc0b07c: 57 7b 04 3e clrlwi r27,r27,16 information->maximum_id = _Objects_Build_id( ffc0b080: a1 3f 00 04 lhz r9,4(r31) ffc0b084: 55 6b c0 0e rlwinm r11,r11,24,0,7 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0b088: 80 7f 00 34 lwz r3,52(r31) ffc0b08c: 65 6b 00 01 oris r11,r11,1 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; ffc0b090: 93 3f 00 30 stw r25,48(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0b094: 55 29 d8 08 rlwinm r9,r9,27,0,4 ffc0b098: 7d 69 4b 78 or r9,r11,r9 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; ffc0b09c: 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) | ffc0b0a0: 7d 29 db 78 or r9,r9,r27 information->inactive_per_block = inactive_per_block; information->local_table = local_table; ffc0b0a4: 92 ff 00 1c stw r23,28(r31) information->maximum = (Objects_Maximum) maximum; ffc0b0a8: b3 7f 00 10 sth r27,16(r31) information->maximum_id = _Objects_Build_id( ffc0b0ac: 91 3f 00 0c stw r9,12(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0b0b0: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); _Workspace_Free( old_tables ); ffc0b0b4: 48 00 2b 71 bl ffc0dc24 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0b0b8: 81 3f 00 34 lwz r9,52(r31) ffc0b0bc: 57 bd 10 3a rlwinm r29,r29,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0b0c0: a0 bf 00 14 lhz r5,20(r31) ffc0b0c4: 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; ffc0b0c8: 7f 49 e9 2e stwx r26,r9,r29 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b0cc: 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( ffc0b0d0: 81 3f 00 34 lwz r9,52(r31) ffc0b0d4: 80 df 00 18 lwz r6,24(r31) ffc0b0d8: 7c 89 e8 2e lwzx r4,r9,r29 ffc0b0dc: 48 00 5c 6d bl ffc10d48 <_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 ) { ffc0b0e0: 48 00 00 2c b ffc0b10c <_Objects_Extend_information+0x210> ffc0b0e4: 81 7f 00 00 lwz r11,0(r31) the_object->id = _Objects_Build_id( ffc0b0e8: a0 1f 00 04 lhz r0,4(r31) ffc0b0ec: 55 6b c0 0e rlwinm r11,r11,24,0,7 ffc0b0f0: 65 6b 00 01 oris r11,r11,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0b0f4: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc0b0f8: 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) | ffc0b0fc: 7c 00 f3 78 or r0,r0,r30 ffc0b100: 90 09 00 08 stw r0,8(r9) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc0b104: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b108: 4b ff f0 e5 bl ffc0a1ec <_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 ) { ffc0b10c: 38 61 00 08 addi r3,r1,8 ffc0b110: 4b ff f1 35 bl ffc0a244 <_Chain_Get> ffc0b114: 7c 69 1b 79 mr. r9,r3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b118: 7f 83 e3 78 mr r3,r28 ffc0b11c: 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 ) { ffc0b120: 40 82 ff c4 bne+ ffc0b0e4 <_Objects_Extend_information+0x1e8> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0b124: a1 3f 00 2c lhz r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b128: a0 1f 00 14 lhz r0,20(r31) ffc0b12c: 81 7f 00 30 lwz r11,48(r31) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0b130: 7d 20 4a 14 add r9,r0,r9 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b134: 7c 0b e9 2e stwx r0,r11,r29 information->inactive = ffc0b138: b1 3f 00 2c sth r9,44(r31) (Objects_Maximum)(information->inactive + information->allocation_size); } ffc0b13c: 80 01 00 44 lwz r0,68(r1) ffc0b140: 82 c1 00 18 lwz r22,24(r1) ffc0b144: 7c 08 03 a6 mtlr r0 ffc0b148: 82 e1 00 1c lwz r23,28(r1) ffc0b14c: 83 01 00 20 lwz r24,32(r1) ffc0b150: 83 21 00 24 lwz r25,36(r1) ffc0b154: 83 41 00 28 lwz r26,40(r1) ffc0b158: 83 61 00 2c lwz r27,44(r1) ffc0b15c: 83 81 00 30 lwz r28,48(r1) ffc0b160: 83 a1 00 34 lwz r29,52(r1) ffc0b164: 83 c1 00 38 lwz r30,56(r1) ffc0b168: 83 e1 00 3c lwz r31,60(r1) ffc0b16c: 38 21 00 40 addi r1,r1,64 ffc0b170: 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; ffc0b174: 3b 20 00 00 li r25,0 ffc0b178: 4b ff fe 1c b ffc0af94 <_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 ); ffc0b17c: 48 00 2a d5 bl ffc0dc50 <_Workspace_Allocate_or_fatal_error> ffc0b180: 7c 7a 1b 78 mr r26,r3 ffc0b184: 4b ff fe 3c b ffc0afc0 <_Objects_Extend_information+0xc4> * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc0b188: 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, ffc0b18c: 80 9f 00 34 lwz r4,52(r31) ffc0b190: 7e c5 b3 78 mr r5,r22 ffc0b194: 48 00 99 35 bl ffc14ac8 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc0b198: 80 9f 00 30 lwz r4,48(r31) ffc0b19c: 7e c5 b3 78 mr r5,r22 ffc0b1a0: 7f 23 cb 78 mr r3,r25 ffc0b1a4: 48 00 99 25 bl ffc14ac8 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0b1a8: 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, ffc0b1ac: 80 9f 00 1c lwz r4,28(r31) ffc0b1b0: 7e e3 bb 78 mr r3,r23 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0b1b4: 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, ffc0b1b8: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0b1bc: 48 00 99 0d bl ffc14ac8 ffc0b1c0: 4b ff fe 60 b ffc0b020 <_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 ) ffc0b1c4: 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 ); ffc0b1c8: 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; ffc0b1cc: 3b 20 00 01 li r25,1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b1d0: 3b a0 00 00 li r29,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; ffc0b1d4: 3a c0 00 00 li r22,0 ffc0b1d8: 4b ff fd bc b ffc0af94 <_Objects_Extend_information+0x98> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0b1dc: 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 ); ffc0b1e0: 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; ffc0b1e4: 3b 20 00 01 li r25,1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b1e8: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0b1ec: 4b ff fd a8 b ffc0af94 <_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; ffc0b1f0: 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; ffc0b1f4: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0b1f8: 4b ff fd 9c b ffc0af94 <_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 ); ffc0b1fc: 7f 43 d3 78 mr r3,r26 ffc0b200: 48 00 2a 25 bl ffc0dc24 <_Workspace_Free> return; ffc0b204: 4b ff ff 38 b ffc0b13c <_Objects_Extend_information+0x240> ffc0b208: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc0b20c: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED ffc0b210: 4b ff fe 50 b ffc0b060 <_Objects_Extend_information+0x164><== NOT EXECUTED =============================================================================== ffc0b300 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b300: 94 21 ff e8 stwu r1,-24(r1) ffc0b304: 7c 08 02 a6 mflr r0 ffc0b308: 93 c1 00 10 stw r30,16(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b30c: 7c 9e 23 79 mr. r30,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b310: 93 a1 00 0c stw r29,12(r1) ffc0b314: 7c 7d 1b 78 mr r29,r3 ffc0b318: 93 e1 00 14 stw r31,20(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; ffc0b31c: 3b e0 00 00 li r31,0 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b320: 90 01 00 1c stw r0,28(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b324: 41 82 00 4c beq- ffc0b370 <_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 ); ffc0b328: 48 00 60 61 bl ffc11388 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) ffc0b32c: 2c 03 00 00 cmpwi r3,0 ffc0b330: 41 82 00 40 beq- ffc0b370 <_Objects_Get_information+0x70> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc0b334: 7f 83 f0 40 cmplw cr7,r3,r30 ffc0b338: 41 9c 00 38 blt- cr7,ffc0b370 <_Objects_Get_information+0x70> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc0b33c: 3d 20 00 00 lis r9,0 ffc0b340: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc0b344: 39 29 2c 60 addi r9,r9,11360 ffc0b348: 7d 29 e8 2e lwzx r9,r9,r29 ffc0b34c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b350: 41 9e 00 20 beq- cr7,ffc0b370 <_Objects_Get_information+0x70><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc0b354: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0b358: 7f e9 f0 2e lwzx r31,r9,r30 if ( !info ) ffc0b35c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0b360: 41 9e 00 10 beq- cr7,ffc0b370 <_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 ) ffc0b364: a0 1f 00 10 lhz r0,16(r31) ffc0b368: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b36c: 41 9e 00 24 beq- cr7,ffc0b390 <_Objects_Get_information+0x90> return NULL; #endif return info; } ffc0b370: 80 01 00 1c lwz r0,28(r1) ffc0b374: 7f e3 fb 78 mr r3,r31 ffc0b378: 83 a1 00 0c lwz r29,12(r1) ffc0b37c: 7c 08 03 a6 mtlr r0 ffc0b380: 83 c1 00 10 lwz r30,16(r1) ffc0b384: 83 e1 00 14 lwz r31,20(r1) ffc0b388: 38 21 00 18 addi r1,r1,24 ffc0b38c: 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; ffc0b390: 3b e0 00 00 li r31,0 ffc0b394: 4b ff ff dc b ffc0b370 <_Objects_Get_information+0x70> =============================================================================== ffc0cfbc <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0cfbc: 94 21 ff d8 stwu r1,-40(r1) ffc0cfc0: 7c 08 02 a6 mflr r0 ffc0cfc4: 93 c1 00 20 stw r30,32(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0cfc8: 7c 9e 23 79 mr. r30,r4 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0cfcc: 93 e1 00 24 stw r31,36(r1) ffc0cfd0: 7c bf 2b 78 mr r31,r5 ffc0cfd4: 90 01 00 2c stw r0,44(r1) ffc0cfd8: 93 81 00 18 stw r28,24(r1) ffc0cfdc: 93 a1 00 1c stw r29,28(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0cfe0: 41 82 01 0c beq- ffc0d0ec <_Objects_Get_name_as_string+0x130> return NULL; if ( name == NULL ) ffc0cfe4: 2f 85 00 00 cmpwi cr7,r5,0 ffc0cfe8: 41 9e 00 d0 beq- cr7,ffc0d0b8 <_Objects_Get_name_as_string+0xfc> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0cfec: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cff0: 7c 7c 1b 78 mr r28,r3 ffc0cff4: 41 9e 00 e8 beq- cr7,ffc0d0dc <_Objects_Get_name_as_string+0x120> information = _Objects_Get_information_id( tmpId ); ffc0cff8: 7f 83 e3 78 mr r3,r28 ffc0cffc: 4b ff fe 8d bl ffc0ce88 <_Objects_Get_information_id> if ( !information ) ffc0d000: 7c 7d 1b 79 mr. r29,r3 ffc0d004: 41 82 00 e8 beq- ffc0d0ec <_Objects_Get_name_as_string+0x130> return NULL; the_object = _Objects_Get( information, tmpId, &location ); ffc0d008: 7f 84 e3 78 mr r4,r28 ffc0d00c: 38 a1 00 08 addi r5,r1,8 ffc0d010: 48 00 01 25 bl ffc0d134 <_Objects_Get> switch ( location ) { ffc0d014: 80 01 00 08 lwz r0,8(r1) ffc0d018: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d01c: 40 9e 00 d0 bne- cr7,ffc0d0ec <_Objects_Get_name_as_string+0x130> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { ffc0d020: 88 1d 00 38 lbz r0,56(r29) ffc0d024: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d028: 40 9e 00 ec bne- cr7,ffc0d114 <_Objects_Get_name_as_string+0x158> s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; ffc0d02c: 81 23 00 0c lwz r9,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'; ffc0d030: 98 01 00 10 stb r0,16(r1) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0d034: 55 2b 84 3e rlwinm r11,r9,16,16,31 lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0d038: 55 20 c2 3e rlwinm r0,r9,24,8,31 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0d03c: 99 61 00 0d stb r11,13(r1) } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc0d040: 55 2a 46 3e rlwinm r10,r9,8,24,31 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0d044: 98 01 00 0e stb r0,14(r1) lname[ 3 ] = (u32_name >> 0) & 0xff; ffc0d048: 99 21 00 0f stb r9,15(r1) } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc0d04c: 99 41 00 0c stb r10,12(r1) lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; ffc0d050: 39 41 00 0c addi r10,r1,12 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d054: 34 1e ff ff addic. r0,r30,-1 ffc0d058: 7f e9 fb 78 mr r9,r31 ffc0d05c: 7c 09 03 a6 mtctr r0 ffc0d060: 41 82 00 4c beq- ffc0d0ac <_Objects_Get_name_as_string+0xf0><== NEVER TAKEN ffc0d064: 88 0a 00 00 lbz r0,0(r10) ffc0d068: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d06c: 41 9e 00 40 beq- cr7,ffc0d0ac <_Objects_Get_name_as_string+0xf0> ffc0d070: 3d 00 00 00 lis r8,0 ffc0d074: 39 08 27 ec addi r8,r8,10220 ffc0d078: 48 00 00 10 b ffc0d088 <_Objects_Get_name_as_string+0xcc> ffc0d07c: 8c 0a 00 01 lbzu r0,1(r10) ffc0d080: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d084: 41 9e 00 28 beq- cr7,ffc0d0ac <_Objects_Get_name_as_string+0xf0> *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc0d088: 81 68 00 00 lwz r11,0(r8) ffc0d08c: 7d 6b 02 14 add r11,r11,r0 ffc0d090: 89 6b 00 01 lbz r11,1(r11) ffc0d094: 71 67 00 97 andi. r7,r11,151 ffc0d098: 40 82 00 08 bne- ffc0d0a0 <_Objects_Get_name_as_string+0xe4> ffc0d09c: 38 00 00 2a li r0,42 ffc0d0a0: 98 09 00 00 stb r0,0(r9) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0d0a4: 39 29 00 01 addi r9,r9,1 ffc0d0a8: 42 00 ff d4 bdnz+ ffc0d07c <_Objects_Get_name_as_string+0xc0> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; ffc0d0ac: 38 00 00 00 li r0,0 ffc0d0b0: 98 09 00 00 stb r0,0(r9) _Thread_Enable_dispatch(); ffc0d0b4: 48 00 11 61 bl ffc0e214 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } ffc0d0b8: 80 01 00 2c lwz r0,44(r1) ffc0d0bc: 7f e3 fb 78 mr r3,r31 ffc0d0c0: 83 81 00 18 lwz r28,24(r1) ffc0d0c4: 7c 08 03 a6 mtlr r0 ffc0d0c8: 83 a1 00 1c lwz r29,28(r1) ffc0d0cc: 83 c1 00 20 lwz r30,32(r1) ffc0d0d0: 83 e1 00 24 lwz r31,36(r1) ffc0d0d4: 38 21 00 28 addi r1,r1,40 ffc0d0d8: 4e 80 00 20 blr return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0d0dc: 3d 20 00 00 lis r9,0 ffc0d0e0: 81 29 35 b0 lwz r9,13744(r9) ffc0d0e4: 83 89 00 08 lwz r28,8(r9) ffc0d0e8: 4b ff ff 10 b ffc0cff8 <_Objects_Get_name_as_string+0x3c> _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc0d0ec: 80 01 00 2c lwz r0,44(r1) #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; ffc0d0f0: 3b e0 00 00 li r31,0 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc0d0f4: 7f e3 fb 78 mr r3,r31 ffc0d0f8: 83 81 00 18 lwz r28,24(r1) ffc0d0fc: 7c 08 03 a6 mtlr r0 ffc0d100: 83 a1 00 1c lwz r29,28(r1) ffc0d104: 83 c1 00 20 lwz r30,32(r1) ffc0d108: 83 e1 00 24 lwz r31,36(r1) ffc0d10c: 38 21 00 28 addi r1,r1,40 ffc0d110: 4e 80 00 20 blr case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { s = the_object->name.name_p; ffc0d114: 81 43 00 0c lwz r10,12(r3) lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { ffc0d118: 7f e9 fb 78 mr r9,r31 ffc0d11c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d120: 40 9e ff 34 bne+ cr7,ffc0d054 <_Objects_Get_name_as_string+0x98> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; ffc0d124: 38 00 00 00 li r0,0 ffc0d128: 98 09 00 00 stb r0,0(r9) _Thread_Enable_dispatch(); ffc0d12c: 48 00 10 e9 bl ffc0e214 <_Thread_Enable_dispatch> ffc0d130: 4b ff ff 88 b ffc0d0b8 <_Objects_Get_name_as_string+0xfc> =============================================================================== ffc0af48 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc0af48: 94 21 ff e8 stwu r1,-24(r1) ffc0af4c: 7c 08 02 a6 mflr r0 ffc0af50: 93 c1 00 10 stw r30,16(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc0af54: 7c 7e 1b 79 mr. r30,r3 return NULL; ffc0af58: 38 60 00 00 li r3,0 Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc0af5c: 93 81 00 08 stw r28,8(r1) ffc0af60: 7c dc 33 78 mr r28,r6 ffc0af64: 93 e1 00 14 stw r31,20(r1) ffc0af68: 7c bf 2b 78 mr r31,r5 ffc0af6c: 90 01 00 1c stw r0,28(r1) ffc0af70: 93 a1 00 0c stw r29,12(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc0af74: 41 82 00 58 beq- ffc0afcc <_Objects_Get_next+0x84> return NULL; if ( !location_p ) ffc0af78: 2f 85 00 00 cmpwi cr7,r5,0 ffc0af7c: 41 9e 00 50 beq- cr7,ffc0afcc <_Objects_Get_next+0x84> return NULL; if ( !next_id_p ) ffc0af80: 2f 86 00 00 cmpwi cr7,r6,0 ffc0af84: 41 9e 00 48 beq- cr7,ffc0afcc <_Objects_Get_next+0x84> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc0af88: 54 80 04 3e clrlwi r0,r4,16 ffc0af8c: 2f 80 00 00 cmpwi cr7,r0,0 next_id = information->minimum_id; else next_id = id; ffc0af90: 7c 9d 23 78 mr r29,r4 return NULL; if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc0af94: 41 9e 00 58 beq- cr7,ffc0afec <_Objects_Get_next+0xa4> 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) ffc0af9c: 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); ffc0afa0: 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) 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 c3 f3 78 mr r3,r30 ffc0afac: 7f e5 fb 78 mr r5,r31 next_id++; ffc0afb0: 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) ffc0afb4: 41 9c 00 5c blt- cr7,ffc0b010 <_Objects_Get_next+0xc8> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0afb8: 48 00 00 8d bl ffc0b044 <_Objects_Get> next_id++; } while (*location_p != OBJECTS_LOCAL); ffc0afbc: 80 1f 00 00 lwz r0,0(r31) ffc0afc0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0afc4: 40 9e ff d4 bne+ cr7,ffc0af98 <_Objects_Get_next+0x50> *next_id_p = next_id; ffc0afc8: 93 bc 00 00 stw r29,0(r28) return object; final: *next_id_p = OBJECTS_ID_FINAL; 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 a1 00 0c lwz r29,12(r1) ffc0afdc: 83 c1 00 10 lwz r30,16(r1) ffc0afe0: 83 e1 00 14 lwz r31,20(r1) ffc0afe4: 38 21 00 18 addi r1,r1,24 ffc0afe8: 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; ffc0afec: 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); ffc0aff0: 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) ffc0aff4: 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); ffc0aff8: 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) ffc0affc: 57 a0 04 3e clrlwi r0,r29,16 ffc0b000: 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); ffc0b004: 7f a4 eb 78 mr r4,r29 next_id++; ffc0b008: 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) ffc0b00c: 40 9c ff ac bge+ cr7,ffc0afb8 <_Objects_Get_next+0x70> <== ALWAYS TAKEN { *location_p = OBJECTS_ERROR; ffc0b010: 38 00 00 01 li r0,1 return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } ffc0b014: 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; ffc0b018: 90 1f 00 00 stw r0,0(r31) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc0b01c: 38 00 ff ff li r0,-1 return 0; ffc0b020: 38 60 00 00 li r3,0 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc0b024: 90 1c 00 00 stw r0,0(r28) return 0; } ffc0b028: 80 01 00 1c lwz r0,28(r1) ffc0b02c: 83 81 00 08 lwz r28,8(r1) ffc0b030: 7c 08 03 a6 mtlr r0 ffc0b034: 83 c1 00 10 lwz r30,16(r1) ffc0b038: 83 e1 00 14 lwz r31,20(r1) ffc0b03c: 38 21 00 18 addi r1,r1,24 ffc0b040: 4e 80 00 20 blr =============================================================================== ffc0bf2c <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0bf2c: 94 21 ff e0 stwu r1,-32(r1) ffc0bf30: 7c 08 02 a6 mflr r0 ffc0bf34: 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; ffc0bf38: 7c 60 1b 79 mr. r0,r3 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0bf3c: 93 c1 00 18 stw r30,24(r1) ffc0bf40: 7c 9e 23 78 mr r30,r4 ffc0bf44: 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; ffc0bf48: 40 82 00 10 bne- ffc0bf58 <_Objects_Id_to_name+0x2c> ffc0bf4c: 3d 20 00 00 lis r9,0 ffc0bf50: 81 29 31 b0 lwz r9,12720(r9) ffc0bf54: 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); ffc0bf58: 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 ) ffc0bf5c: 39 69 ff ff addi r11,r9,-1 ffc0bf60: 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; ffc0bf64: 3b e0 00 03 li r31,3 ffc0bf68: 41 9d 00 38 bgt- cr7,ffc0bfa0 <_Objects_Id_to_name+0x74> if ( !_Objects_Information_table[ the_api ] ) ffc0bf6c: 3d 60 00 00 lis r11,0 ffc0bf70: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0bf74: 39 6b 2c c0 addi r11,r11,11456 ffc0bf78: 7d 2b 48 2e lwzx r9,r11,r9 ffc0bf7c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bf80: 41 9e 00 20 beq- cr7,ffc0bfa0 <_Objects_Id_to_name+0x74> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc0bf84: 54 0b 3e 7a rlwinm r11,r0,7,25,29 ffc0bf88: 7c 69 58 2e lwzx r3,r9,r11 if ( !information ) ffc0bf8c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bf90: 41 9e 00 10 beq- cr7,ffc0bfa0 <_Objects_Id_to_name+0x74><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) ffc0bf94: 89 23 00 38 lbz r9,56(r3) ffc0bf98: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bf9c: 41 9e 00 20 beq- cr7,ffc0bfbc <_Objects_Id_to_name+0x90><== ALWAYS TAKEN return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc0bfa0: 80 01 00 24 lwz r0,36(r1) ffc0bfa4: 7f e3 fb 78 mr r3,r31 ffc0bfa8: 83 c1 00 18 lwz r30,24(r1) ffc0bfac: 7c 08 03 a6 mtlr r0 ffc0bfb0: 83 e1 00 1c lwz r31,28(r1) ffc0bfb4: 38 21 00 20 addi r1,r1,32 ffc0bfb8: 4e 80 00 20 blr #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 ); ffc0bfbc: 7c 04 03 78 mr r4,r0 ffc0bfc0: 38 a1 00 08 addi r5,r1,8 ffc0bfc4: 4b ff fe c9 bl ffc0be8c <_Objects_Get> if ( !the_object ) ffc0bfc8: 2c 03 00 00 cmpwi r3,0 ffc0bfcc: 41 a2 ff d4 beq- ffc0bfa0 <_Objects_Id_to_name+0x74> return OBJECTS_INVALID_ID; *name = the_object->name; ffc0bfd0: 80 03 00 0c lwz r0,12(r3) _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0bfd4: 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; ffc0bfd8: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0bfdc: 48 00 10 49 bl ffc0d024 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0bfe0: 4b ff ff c0 b ffc0bfa0 <_Objects_Id_to_name+0x74> =============================================================================== ffc0b668 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b668: 94 21 ff e8 stwu r1,-24(r1) ffc0b66c: 7c 08 02 a6 mflr r0 ffc0b670: 90 01 00 1c stw r0,28(r1) ffc0b674: 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) / ffc0b678: 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 ); ffc0b67c: a3 e3 00 0a lhz r31,10(r3) block_count = (information->maximum - index_base) / ffc0b680: a0 03 00 14 lhz r0,20(r3) ffc0b684: 7d 5f 50 50 subf r10,r31,r10 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b688: 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) / ffc0b68c: 7d 4a 03 96 divwu r10,r10,r0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b690: 93 a1 00 0c stw r29,12(r1) ffc0b694: 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++ ) { ffc0b698: 2f 8a 00 00 cmpwi cr7,r10,0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b69c: 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++ ) { ffc0b6a0: 41 9e 00 3c beq- cr7,ffc0b6dc <_Objects_Shrink_information+0x74><== NEVER TAKEN if ( information->inactive_per_block[ block ] == ffc0b6a4: 81 63 00 30 lwz r11,48(r3) ffc0b6a8: 81 2b 00 00 lwz r9,0(r11) ffc0b6ac: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b6b0: 41 9e 00 4c beq- cr7,ffc0b6fc <_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++ ) { ffc0b6b4: 39 20 00 00 li r9,0 ffc0b6b8: 7d 49 03 a6 mtctr r10 ffc0b6bc: 48 00 00 18 b ffc0b6d4 <_Objects_Shrink_information+0x6c> if ( information->inactive_per_block[ block ] == ffc0b6c0: 85 4b 00 04 lwzu r10,4(r11) information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0b6c4: 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 ] == ffc0b6c8: 55 3d 10 3a rlwinm r29,r9,2,0,29 ffc0b6cc: 7f 80 50 00 cmpw cr7,r0,r10 ffc0b6d0: 41 9e 00 30 beq- cr7,ffc0b700 <_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++ ) { ffc0b6d4: 39 29 00 01 addi r9,r9,1 ffc0b6d8: 42 00 ff e8 bdnz+ ffc0b6c0 <_Objects_Shrink_information+0x58> return; } index_base += information->allocation_size; } } ffc0b6dc: 80 01 00 1c lwz r0,28(r1) ffc0b6e0: 83 81 00 08 lwz r28,8(r1) ffc0b6e4: 7c 08 03 a6 mtlr r0 ffc0b6e8: 83 a1 00 0c lwz r29,12(r1) ffc0b6ec: 83 c1 00 10 lwz r30,16(r1) ffc0b6f0: 83 e1 00 14 lwz r31,20(r1) ffc0b6f4: 38 21 00 18 addi r1,r1,24 ffc0b6f8: 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 ] == ffc0b6fc: 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; ffc0b700: 80 7c 00 20 lwz r3,32(r28) ffc0b704: 48 00 00 10 b ffc0b714 <_Objects_Shrink_information+0xac> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0b708: 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; ffc0b70c: 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 ); ffc0b710: 41 9e 00 34 beq- cr7,ffc0b744 <_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 ); ffc0b714: 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; ffc0b718: 83 c3 00 00 lwz r30,0(r3) if ((index >= index_base) && ffc0b71c: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0b720: 41 bc ff e8 blt- cr7,ffc0b708 <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { ffc0b724: a1 3c 00 14 lhz r9,20(r28) ffc0b728: 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) && ffc0b72c: 7f 80 48 40 cmplw cr7,r0,r9 ffc0b730: 40 9c ff d8 bge+ cr7,ffc0b708 <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); ffc0b734: 4b ff ea e9 bl ffc0a21c <_Chain_Extract> } } while ( the_object ); ffc0b738: 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; ffc0b73c: 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 ); ffc0b740: 40 9e ff d4 bne+ cr7,ffc0b714 <_Objects_Shrink_information+0xac><== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc0b744: 81 3c 00 34 lwz r9,52(r28) ffc0b748: 7c 69 e8 2e lwzx r3,r9,r29 ffc0b74c: 48 00 24 d9 bl ffc0dc24 <_Workspace_Free> information->object_blocks[ block ] = NULL; ffc0b750: 81 3c 00 34 lwz r9,52(r28) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0b754: 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; ffc0b758: 7f c9 e9 2e stwx r30,r9,r29 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0b75c: 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; ffc0b760: 81 3c 00 30 lwz r9,48(r28) information->inactive -= information->allocation_size; ffc0b764: 7c 00 58 50 subf r0,r0,r11 return; } index_base += information->allocation_size; } } ffc0b768: 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; ffc0b76c: 7f c9 e9 2e stwx r30,r9,r29 information->inactive -= information->allocation_size; ffc0b770: b0 1c 00 2c sth r0,44(r28) return; } index_base += information->allocation_size; } } ffc0b774: 80 01 00 1c lwz r0,28(r1) ffc0b778: 83 81 00 08 lwz r28,8(r1) ffc0b77c: 7c 08 03 a6 mtlr r0 ffc0b780: 83 a1 00 0c lwz r29,12(r1) ffc0b784: 83 c1 00 10 lwz r30,16(r1) ffc0b788: 38 21 00 18 addi r1,r1,24 ffc0b78c: 4e 80 00 20 blr =============================================================================== ffc0b4e0 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { ffc0b4e0: 94 21 ff e0 stwu r1,-32(r1) ffc0b4e4: 7c 08 02 a6 mflr r0 ffc0b4e8: 90 01 00 24 stw r0,36(r1) /* * Make sure there is always a value returned. */ *ticks_out = 0; ffc0b4ec: 38 00 00 00 li r0,0 */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { ffc0b4f0: 93 c1 00 18 stw r30,24(r1) ffc0b4f4: 7c 7e 1b 78 mr r30,r3 ffc0b4f8: 93 e1 00 1c stw r31,28(r1) ffc0b4fc: 7c 9f 23 78 mr r31,r4 /* * Make sure there is always a value returned. */ *ticks_out = 0; ffc0b500: 90 04 00 00 stw r0,0(r4) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) ffc0b504: 48 00 53 99 bl ffc1089c <_Timespec_Is_valid> ffc0b508: 2f 83 00 00 cmpwi cr7,r3,0 return POSIX_ABSOLUTE_TIMEOUT_INVALID; ffc0b50c: 38 60 00 00 li r3,0 *ticks_out = 0; /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) ffc0b510: 40 9e 00 1c bne- cr7,ffc0b52c <_POSIX_Absolute_timeout_to_ticks+0x4c> /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } ffc0b514: 80 01 00 24 lwz r0,36(r1) ffc0b518: 83 c1 00 18 lwz r30,24(r1) ffc0b51c: 7c 08 03 a6 mtlr r0 ffc0b520: 83 e1 00 1c lwz r31,28(r1) ffc0b524: 38 21 00 20 addi r1,r1,32 ffc0b528: 4e 80 00 20 blr return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); ffc0b52c: 38 61 00 10 addi r3,r1,16 ffc0b530: 48 00 27 69 bl ffc0dc98 <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) ffc0b534: 7f c3 f3 78 mr r3,r30 ffc0b538: 38 81 00 10 addi r4,r1,16 ffc0b53c: 48 00 53 9d bl ffc108d8 <_Timespec_Less_than> ffc0b540: 2f 83 00 00 cmpwi cr7,r3,0 return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; ffc0b544: 38 60 00 01 li r3,1 /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); if ( _Timespec_Less_than( abstime, ¤t_time ) ) ffc0b548: 40 9e ff cc bne+ cr7,ffc0b514 <_POSIX_Absolute_timeout_to_ticks+0x34> return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; /* * How long until the requested absolute time? */ _Timespec_Subtract( ¤t_time, abstime, &difference ); ffc0b54c: 7f c4 f3 78 mr r4,r30 ffc0b550: 38 a1 00 08 addi r5,r1,8 ffc0b554: 38 61 00 10 addi r3,r1,16 ffc0b558: 48 00 53 bd bl ffc10914 <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); ffc0b55c: 38 61 00 08 addi r3,r1,8 ffc0b560: 48 00 54 01 bl ffc10960 <_Timespec_To_ticks> /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) ffc0b564: 2f 83 00 00 cmpwi cr7,r3,0 _Timespec_Subtract( ¤t_time, abstime, &difference ); /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); ffc0b568: 90 7f 00 00 stw r3,0(r31) /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; ffc0b56c: 38 60 00 03 li r3,3 /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) ffc0b570: 40 be ff a4 bne- cr7,ffc0b514 <_POSIX_Absolute_timeout_to_ticks+0x34><== ALWAYS TAKEN return POSIX_ABSOLUTE_TIMEOUT_IS_NOW; ffc0b574: 38 60 00 02 li r3,2 <== NOT EXECUTED ffc0b578: 4b ff ff 9c b ffc0b514 <_POSIX_Absolute_timeout_to_ticks+0x34><== NOT EXECUTED =============================================================================== ffc13228 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { ffc13228: 94 21 ff e0 stwu r1,-32(r1) ffc1322c: 7c 08 02 a6 mflr r0 ffc13230: 90 01 00 24 stw r0,36(r1) ffc13234: 93 81 00 10 stw r28,16(r1) Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); ffc13238: 83 83 00 08 lwz r28,8(r3) */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { ffc1323c: 93 61 00 0c stw r27,12(r1) for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; ffc13240: 57 9b 56 fa rlwinm r27,r28,10,27,29 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { ffc13244: 93 c1 00 18 stw r30,24(r1) ffc13248: 3f c0 00 00 lis r30,0 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; ffc1324c: 57 9c 13 ba rlwinm r28,r28,2,14,29 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { ffc13250: 93 a1 00 14 stw r29,20(r1) ffc13254: 3b de 30 24 addi r30,r30,12324 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; ffc13258: 3b 7b 00 10 addi r27,r27,16 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { ffc1325c: 93 e1 00 1c stw r31,28(r1) ffc13260: 93 41 00 08 stw r26,8(r1) if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; if ( value != NULL ) { key->Values [ thread_api ][ thread_index ] = NULL; ffc13264: 3b 40 00 00 li r26,0 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; ffc13268: a3 fe 00 10 lhz r31,16(r30) done = true; for ( index = 1 ; index <= max ; ++index ) { ffc1326c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc13270: 40 9e 00 2c bne- cr7,ffc1329c <_POSIX_Keys_Run_destructors+0x74> done = false; } } } } } ffc13274: 80 01 00 24 lwz r0,36(r1) ffc13278: 83 41 00 08 lwz r26,8(r1) ffc1327c: 7c 08 03 a6 mtlr r0 ffc13280: 83 61 00 0c lwz r27,12(r1) ffc13284: 83 81 00 10 lwz r28,16(r1) ffc13288: 83 a1 00 14 lwz r29,20(r1) ffc1328c: 83 c1 00 18 lwz r30,24(r1) ffc13290: 83 e1 00 1c lwz r31,28(r1) ffc13294: 38 21 00 20 addi r1,r1,32 ffc13298: 4e 80 00 20 blr Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { ffc1329c: 3b a0 00 01 li r29,1 ffc132a0: 38 00 00 01 li r0,1 POSIX_Keys_Control *key = (POSIX_Keys_Control *) ffc132a4: 81 7e 00 1c lwz r11,28(r30) ffc132a8: 57 a9 10 3a rlwinm r9,r29,2,0,29 ffc132ac: 7d 2b 48 2e lwzx r9,r11,r9 _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { ffc132b0: 2f 89 00 00 cmpwi cr7,r9,0 void *value = key->Values [ thread_api ][ thread_index ]; ffc132b4: 7d 69 da 14 add r11,r9,r27 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { ffc132b8: 41 9e 00 34 beq- cr7,ffc132ec <_POSIX_Keys_Run_destructors+0xc4> ffc132bc: 81 49 00 10 lwz r10,16(r9) ffc132c0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc132c4: 41 9e 00 28 beq- cr7,ffc132ec <_POSIX_Keys_Run_destructors+0xc4> void *value = key->Values [ thread_api ][ thread_index ]; ffc132c8: 81 6b 00 04 lwz r11,4(r11) ffc132cc: 7c 6b e0 2e lwzx r3,r11,r28 if ( value != NULL ) { ffc132d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc132d4: 41 9e 00 18 beq- cr7,ffc132ec <_POSIX_Keys_Run_destructors+0xc4><== ALWAYS TAKEN key->Values [ thread_api ][ thread_index ] = NULL; ffc132d8: 7f 4b e1 2e stwx r26,r11,r28 <== NOT EXECUTED (*key->destructor)( value ); ffc132dc: 80 09 00 10 lwz r0,16(r9) <== NOT EXECUTED ffc132e0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc132e4: 4e 80 04 21 bctrl <== NOT EXECUTED done = false; ffc132e8: 38 00 00 00 li r0,0 <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { ffc132ec: 3b bd 00 01 addi r29,r29,1 ffc132f0: 57 bd 04 3e clrlwi r29,r29,16 ffc132f4: 7f 9f e8 40 cmplw cr7,r31,r29 ffc132f8: 40 bc ff ac bge- cr7,ffc132a4 <_POSIX_Keys_Run_destructors+0x7c> * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { ffc132fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc13300: 41 9e ff 68 beq+ cr7,ffc13268 <_POSIX_Keys_Run_destructors+0x40><== NEVER TAKEN ffc13304: 4b ff ff 70 b ffc13274 <_POSIX_Keys_Run_destructors+0x4c> =============================================================================== ffc0ef8c <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { ffc0ef8c: 94 21 ff d0 stwu r1,-48(r1) ffc0ef90: 7c 08 02 a6 mflr r0 ffc0ef94: 93 e1 00 2c stw r31,44(r1) ffc0ef98: 7c 7f 1b 78 mr r31,r3 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( ffc0ef9c: 3c 60 00 00 lis r3,0 ffc0efa0: 93 81 00 20 stw r28,32(r1) ffc0efa4: 38 63 36 18 addi r3,r3,13848 ffc0efa8: 7c 9c 23 78 mr r28,r4 ffc0efac: 93 a1 00 24 stw r29,36(r1) ffc0efb0: 7f e4 fb 78 mr r4,r31 ffc0efb4: 7c bd 2b 78 mr r29,r5 ffc0efb8: 38 a1 00 0c addi r5,r1,12 ffc0efbc: 90 01 00 34 stw r0,52(r1) ffc0efc0: 93 41 00 18 stw r26,24(r1) ffc0efc4: 7c fa 3b 78 mr r26,r7 ffc0efc8: 93 61 00 1c stw r27,28(r1) ffc0efcc: 7d 1b 43 78 mr r27,r8 ffc0efd0: 93 c1 00 28 stw r30,40(r1) ffc0efd4: 7c de 33 78 mr r30,r6 ffc0efd8: 48 00 41 7d bl ffc13154 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { ffc0efdc: 80 01 00 0c lwz r0,12(r1) ffc0efe0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0efe4: 41 9e 00 3c beq- cr7,ffc0f020 <_POSIX_Message_queue_Receive_support+0x94> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); ffc0efe8: 48 00 d4 45 bl ffc1c42c <__errno> ffc0efec: 38 00 00 09 li r0,9 ffc0eff0: 90 03 00 00 stw r0,0(r3) ffc0eff4: 38 60 ff ff li r3,-1 } ffc0eff8: 80 01 00 34 lwz r0,52(r1) ffc0effc: 83 41 00 18 lwz r26,24(r1) ffc0f000: 7c 08 03 a6 mtlr r0 ffc0f004: 83 61 00 1c lwz r27,28(r1) ffc0f008: 83 81 00 20 lwz r28,32(r1) ffc0f00c: 83 a1 00 24 lwz r29,36(r1) ffc0f010: 83 c1 00 28 lwz r30,40(r1) ffc0f014: 83 e1 00 2c lwz r31,44(r1) ffc0f018: 38 21 00 30 addi r1,r1,48 ffc0f01c: 4e 80 00 20 blr the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { ffc0f020: 80 03 00 14 lwz r0,20(r3) ffc0f024: 54 09 07 be clrlwi r9,r0,30 ffc0f028: 2f 89 00 01 cmpwi cr7,r9,1 ffc0f02c: 41 9e 00 c4 beq- cr7,ffc0f0f0 <_POSIX_Message_queue_Receive_support+0x164> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; ffc0f030: 80 63 00 10 lwz r3,16(r3) if ( msg_len < the_mq->Message_queue.maximum_message_size ) { ffc0f034: 81 23 00 68 lwz r9,104(r3) ffc0f038: 7f 89 e8 40 cmplw cr7,r9,r29 ffc0f03c: 41 9d 00 9c bgt- cr7,ffc0f0d8 <_POSIX_Message_queue_Receive_support+0x14c> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0f040: 2f 9a 00 00 cmpwi cr7,r26,0 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; ffc0f044: 39 20 ff ff li r9,-1 ffc0f048: 91 21 00 08 stw r9,8(r1) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0f04c: 38 e0 00 00 li r7,0 ffc0f050: 40 9e 00 78 bne- cr7,ffc0f0c8 <_POSIX_Message_queue_Receive_support+0x13c> do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( ffc0f054: 7f e4 fb 78 mr r4,r31 ffc0f058: 38 63 00 1c addi r3,r3,28 ffc0f05c: 7f 85 e3 78 mr r5,r28 ffc0f060: 38 c1 00 08 addi r6,r1,8 ffc0f064: 7f 68 db 78 mr r8,r27 ffc0f068: 48 00 2b d5 bl ffc11c3c <_CORE_message_queue_Seize> ); _Thread_Enable_dispatch(); if (msg_prio) { *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count ffc0f06c: 3f e0 00 00 lis r31,0 &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); ffc0f070: 48 00 52 85 bl ffc142f4 <_Thread_Enable_dispatch> if (msg_prio) { ffc0f074: 2f 9e 00 00 cmpwi cr7,r30,0 *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count ffc0f078: 3b ff 36 84 addi r31,r31,13956 ffc0f07c: 81 3f 00 0c lwz r9,12(r31) do_wait, timeout ); _Thread_Enable_dispatch(); if (msg_prio) { ffc0f080: 41 9e 00 18 beq- cr7,ffc0f098 <_POSIX_Message_queue_Receive_support+0x10c><== NEVER TAKEN RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return ((priority >= 0) ? priority : -priority); ffc0f084: 80 09 00 24 lwz r0,36(r9) ffc0f088: 7c 0b fe 70 srawi r11,r0,31 ffc0f08c: 7d 60 02 78 xor r0,r11,r0 ffc0f090: 7c 0b 00 50 subf r0,r11,r0 *msg_prio = _POSIX_Message_queue_Priority_from_core( ffc0f094: 90 1e 00 00 stw r0,0(r30) _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) ffc0f098: 80 09 00 34 lwz r0,52(r9) return length_out; ffc0f09c: 80 61 00 08 lwz r3,8(r1) *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) ffc0f0a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f0a4: 41 9e ff 54 beq+ cr7,ffc0eff8 <_POSIX_Message_queue_Receive_support+0x6c> return length_out; rtems_set_errno_and_return_minus_one( ffc0f0a8: 48 00 d3 85 bl ffc1c42c <__errno> ffc0f0ac: 81 3f 00 0c lwz r9,12(r31) ffc0f0b0: 7c 7e 1b 78 mr r30,r3 ffc0f0b4: 80 69 00 34 lwz r3,52(r9) ffc0f0b8: 48 00 03 99 bl ffc0f450 <_POSIX_Message_queue_Translate_core_message_queue_return_code> ffc0f0bc: 90 7e 00 00 stw r3,0(r30) ffc0f0c0: 38 60 ff ff li r3,-1 ffc0f0c4: 4b ff ff 34 b ffc0eff8 <_POSIX_Message_queue_Receive_support+0x6c> /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; ffc0f0c8: 70 09 40 00 andi. r9,r0,16384 ffc0f0cc: 7c e0 00 26 mfcr r7 ffc0f0d0: 54 e7 1f fe rlwinm r7,r7,3,31,31 ffc0f0d4: 4b ff ff 80 b ffc0f054 <_POSIX_Message_queue_Receive_support+0xc8> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); ffc0f0d8: 48 00 52 1d bl ffc142f4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); ffc0f0dc: 48 00 d3 51 bl ffc1c42c <__errno> ffc0f0e0: 38 00 00 7a li r0,122 ffc0f0e4: 90 03 00 00 stw r0,0(r3) ffc0f0e8: 38 60 ff ff li r3,-1 ffc0f0ec: 4b ff ff 0c b ffc0eff8 <_POSIX_Message_queue_Receive_support+0x6c> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); ffc0f0f0: 48 00 52 05 bl ffc142f4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); ffc0f0f4: 48 00 d3 39 bl ffc1c42c <__errno> ffc0f0f8: 38 00 00 09 li r0,9 ffc0f0fc: 90 03 00 00 stw r0,0(r3) ffc0f100: 38 60 ff ff li r3,-1 ffc0f104: 4b ff fe f4 b ffc0eff8 <_POSIX_Message_queue_Receive_support+0x6c> =============================================================================== ffc0f130 <_POSIX_Message_queue_Send_support>: /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) ffc0f130: 2b 86 00 20 cmplwi cr7,r6,32 size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { ffc0f134: 94 21 ff d0 stwu r1,-48(r1) ffc0f138: 7c 08 02 a6 mflr r0 ffc0f13c: 93 41 00 18 stw r26,24(r1) ffc0f140: 7c fa 3b 78 mr r26,r7 ffc0f144: 93 61 00 1c stw r27,28(r1) ffc0f148: 7c 9b 23 78 mr r27,r4 ffc0f14c: 93 81 00 20 stw r28,32(r1) ffc0f150: 7c bc 2b 78 mr r28,r5 ffc0f154: 93 a1 00 24 stw r29,36(r1) ffc0f158: 7c 7d 1b 78 mr r29,r3 ffc0f15c: 93 c1 00 28 stw r30,40(r1) ffc0f160: 7c de 33 78 mr r30,r6 ffc0f164: 93 e1 00 2c stw r31,44(r1) ffc0f168: 7d 1f 43 78 mr r31,r8 ffc0f16c: 90 01 00 34 stw r0,52(r1) /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) ffc0f170: 41 9d 01 04 bgt- cr7,ffc0f274 <_POSIX_Message_queue_Send_support+0x144> RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( ffc0f174: 3c 60 00 00 lis r3,0 ffc0f178: 38 63 36 18 addi r3,r3,13848 ffc0f17c: 7f a4 eb 78 mr r4,r29 ffc0f180: 38 a1 00 08 addi r5,r1,8 ffc0f184: 48 00 3f d1 bl ffc13154 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { ffc0f188: 80 01 00 08 lwz r0,8(r1) ffc0f18c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f190: 40 9e 00 d0 bne- cr7,ffc0f260 <_POSIX_Message_queue_Send_support+0x130> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { ffc0f194: 80 03 00 14 lwz r0,20(r3) ffc0f198: 70 09 00 03 andi. r9,r0,3 ffc0f19c: 41 82 00 ec beq- ffc0f288 <_POSIX_Message_queue_Send_support+0x158> the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0f1a0: 2f 9a 00 00 cmpwi cr7,r26,0 if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; ffc0f1a4: 81 63 00 10 lwz r11,16(r3) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0f1a8: 39 20 00 00 li r9,0 ffc0f1ac: 40 9e 00 68 bne- cr7,ffc0f214 <_POSIX_Message_queue_Send_support+0xe4> do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( ffc0f1b0: 7f ea fb 78 mr r10,r31 ffc0f1b4: 7f 64 db 78 mr r4,r27 ffc0f1b8: 7f 85 e3 78 mr r5,r28 ffc0f1bc: 7f a6 eb 78 mr r6,r29 ffc0f1c0: 38 e0 00 00 li r7,0 ffc0f1c4: 7d 1e 00 d0 neg r8,r30 ffc0f1c8: 38 6b 00 1c addi r3,r11,28 ffc0f1cc: 48 00 2c 05 bl ffc11dd0 <_CORE_message_queue_Submit> ffc0f1d0: 7c 7f 1b 78 mr r31,r3 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); ffc0f1d4: 48 00 51 21 bl ffc142f4 <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) ffc0f1d8: 2f 9f 00 07 cmpwi cr7,r31,7 ffc0f1dc: 41 9e 00 74 beq- cr7,ffc0f250 <_POSIX_Message_queue_Send_support+0x120><== NEVER TAKEN msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) ffc0f1e0: 2f 9f 00 00 cmpwi cr7,r31,0 return msg_status; ffc0f1e4: 38 60 00 00 li r3,0 */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) ffc0f1e8: 40 9e 00 b8 bne- cr7,ffc0f2a0 <_POSIX_Message_queue_Send_support+0x170> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } ffc0f1ec: 80 01 00 34 lwz r0,52(r1) ffc0f1f0: 83 41 00 18 lwz r26,24(r1) ffc0f1f4: 7c 08 03 a6 mtlr r0 ffc0f1f8: 83 61 00 1c lwz r27,28(r1) ffc0f1fc: 83 81 00 20 lwz r28,32(r1) ffc0f200: 83 a1 00 24 lwz r29,36(r1) ffc0f204: 83 c1 00 28 lwz r30,40(r1) ffc0f208: 83 e1 00 2c lwz r31,44(r1) ffc0f20c: 38 21 00 30 addi r1,r1,48 ffc0f210: 4e 80 00 20 blr /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; ffc0f214: 70 09 40 00 andi. r9,r0,16384 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( ffc0f218: 7f ea fb 78 mr r10,r31 ffc0f21c: 7f 64 db 78 mr r4,r27 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; ffc0f220: 7d 20 00 26 mfcr r9 ffc0f224: 55 29 1f fe rlwinm r9,r9,3,31,31 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( ffc0f228: 7f 85 e3 78 mr r5,r28 ffc0f22c: 7f a6 eb 78 mr r6,r29 ffc0f230: 38 e0 00 00 li r7,0 ffc0f234: 7d 1e 00 d0 neg r8,r30 ffc0f238: 38 6b 00 1c addi r3,r11,28 ffc0f23c: 48 00 2b 95 bl ffc11dd0 <_CORE_message_queue_Submit> ffc0f240: 7c 7f 1b 78 mr r31,r3 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); ffc0f244: 48 00 50 b1 bl ffc142f4 <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) ffc0f248: 2f 9f 00 07 cmpwi cr7,r31,7 ffc0f24c: 40 9e ff 94 bne+ cr7,ffc0f1e0 <_POSIX_Message_queue_Send_support+0xb0> msg_status = _Thread_Executing->Wait.return_code; ffc0f250: 3d 20 00 00 lis r9,0 ffc0f254: 81 29 36 90 lwz r9,13968(r9) ffc0f258: 83 e9 00 34 lwz r31,52(r9) ffc0f25c: 4b ff ff 84 b ffc0f1e0 <_POSIX_Message_queue_Send_support+0xb0> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); ffc0f260: 48 00 d1 cd bl ffc1c42c <__errno> ffc0f264: 38 00 00 09 li r0,9 ffc0f268: 90 03 00 00 stw r0,0(r3) ffc0f26c: 38 60 ff ff li r3,-1 ffc0f270: 4b ff ff 7c b ffc0f1ec <_POSIX_Message_queue_Send_support+0xbc> * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc0f274: 48 00 d1 b9 bl ffc1c42c <__errno> ffc0f278: 38 00 00 16 li r0,22 ffc0f27c: 90 03 00 00 stw r0,0(r3) ffc0f280: 38 60 ff ff li r3,-1 ffc0f284: 4b ff ff 68 b ffc0f1ec <_POSIX_Message_queue_Send_support+0xbc> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); ffc0f288: 48 00 50 6d bl ffc142f4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); ffc0f28c: 48 00 d1 a1 bl ffc1c42c <__errno> ffc0f290: 38 00 00 09 li r0,9 ffc0f294: 90 03 00 00 stw r0,0(r3) ffc0f298: 38 60 ff ff li r3,-1 ffc0f29c: 4b ff ff 50 b ffc0f1ec <_POSIX_Message_queue_Send_support+0xbc> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( ffc0f2a0: 48 00 d1 8d bl ffc1c42c <__errno> ffc0f2a4: 7c 7e 1b 78 mr r30,r3 ffc0f2a8: 7f e3 fb 78 mr r3,r31 ffc0f2ac: 48 00 01 a5 bl ffc0f450 <_POSIX_Message_queue_Translate_core_message_queue_return_code> ffc0f2b0: 90 7e 00 00 stw r3,0(r30) ffc0f2b4: 38 60 ff ff li r3,-1 ffc0f2b8: 4b ff ff 34 b ffc0f1ec <_POSIX_Message_queue_Send_support+0xbc> =============================================================================== ffc0fae0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { ffc0fae0: 7c 08 02 a6 mflr r0 ffc0fae4: 94 21 ff f8 stwu r1,-8(r1) ffc0fae8: 90 01 00 0c stw r0,12(r1) POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0faec: 81 23 01 34 lwz r9,308(r3) if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && ffc0faf0: 80 09 00 d8 lwz r0,216(r9) ffc0faf4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0faf8: 40 9e 00 10 bne- cr7,ffc0fb08 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28><== NEVER TAKEN ffc0fafc: 80 09 00 dc lwz r0,220(r9) ffc0fb00: 2f 80 00 01 cmpwi cr7,r0,1 ffc0fb04: 41 9e 00 18 beq- cr7,ffc0fb1c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x3c> thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); ffc0fb08: 4b ff c8 81 bl ffc0c388 <_Thread_Enable_dispatch> } ffc0fb0c: 80 01 00 0c lwz r0,12(r1) ffc0fb10: 38 21 00 08 addi r1,r1,8 ffc0fb14: 7c 08 03 a6 mtlr r0 ffc0fb18: 4e 80 00 20 blr POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && ffc0fb1c: 80 09 00 e0 lwz r0,224(r9) ffc0fb20: 2f 80 00 00 cmpwi cr7,r0,0 ffc0fb24: 41 9e ff e4 beq+ cr7,ffc0fb08 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc0fb28: 3d 20 00 00 lis r9,0 ffc0fb2c: 81 69 28 14 lwz r11,10260(r9) thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); ffc0fb30: 38 80 ff ff li r4,-1 ffc0fb34: 38 0b ff ff addi r0,r11,-1 ffc0fb38: 90 09 28 14 stw r0,10260(r9) return _Thread_Dispatch_disable_level; ffc0fb3c: 80 09 28 14 lwz r0,10260(r9) ffc0fb40: 48 00 08 7d bl ffc103bc <_POSIX_Thread_Exit> ffc0fb44: 4b ff ff c8 b ffc0fb0c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x2c> =============================================================================== ffc1137c <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { ffc1137c: 94 21 ff e0 stwu r1,-32(r1) ffc11380: 7c 08 02 a6 mflr r0 ffc11384: 93 c1 00 18 stw r30,24(r1) ffc11388: 7c 7e 1b 78 mr r30,r3 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) ffc1138c: 80 64 00 00 lwz r3,0(r4) int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { ffc11390: 93 61 00 0c stw r27,12(r1) ffc11394: 7c db 33 78 mr r27,r6 ffc11398: 93 81 00 10 stw r28,16(r1) if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) return EINVAL; ffc1139c: 3b 80 00 16 li r28,22 int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { ffc113a0: 93 a1 00 14 stw r29,20(r1) ffc113a4: 7c bd 2b 78 mr r29,r5 ffc113a8: 93 e1 00 1c stw r31,28(r1) ffc113ac: 7c 9f 23 78 mr r31,r4 ffc113b0: 90 01 00 24 stw r0,36(r1) if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) ffc113b4: 4b ff ff a5 bl ffc11358 <_POSIX_Priority_Is_valid> ffc113b8: 2f 83 00 00 cmpwi cr7,r3,0 ffc113bc: 40 9e 00 2c bne- cr7,ffc113e8 <_POSIX_Thread_Translate_sched_param+0x6c><== ALWAYS TAKEN *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } ffc113c0: 80 01 00 24 lwz r0,36(r1) ffc113c4: 7f 83 e3 78 mr r3,r28 ffc113c8: 83 61 00 0c lwz r27,12(r1) ffc113cc: 7c 08 03 a6 mtlr r0 ffc113d0: 83 81 00 10 lwz r28,16(r1) ffc113d4: 83 a1 00 14 lwz r29,20(r1) ffc113d8: 83 c1 00 18 lwz r30,24(r1) ffc113dc: 83 e1 00 1c lwz r31,28(r1) ffc113e0: 38 21 00 20 addi r1,r1,32 ffc113e4: 4e 80 00 20 blr return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { ffc113e8: 2f 9e 00 00 cmpwi cr7,r30,0 ) { if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc113ec: 38 00 00 00 li r0,0 ffc113f0: 90 1d 00 00 stw r0,0(r29) *budget_callout = NULL; ffc113f4: 90 1b 00 00 stw r0,0(r27) if ( policy == SCHED_OTHER ) { ffc113f8: 41 9e 00 a4 beq- cr7,ffc1149c <_POSIX_Thread_Translate_sched_param+0x120> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { ffc113fc: 2f 9e 00 01 cmpwi cr7,r30,1 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; ffc11400: 3b 80 00 00 li r28,0 if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { ffc11404: 41 be ff bc beq- cr7,ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { ffc11408: 2f 9e 00 02 cmpwi cr7,r30,2 ffc1140c: 41 9e 00 c4 beq- cr7,ffc114d0 <_POSIX_Thread_Translate_sched_param+0x154> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { ffc11410: 2f 9e 00 04 cmpwi cr7,r30,4 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; ffc11414: 3b 80 00 16 li r28,22 if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { ffc11418: 40 9e ff a8 bne+ cr7,ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44> if ( (param->sched_ss_repl_period.tv_sec == 0) && ffc1141c: 80 1f 00 08 lwz r0,8(r31) ffc11420: 2f 80 00 00 cmpwi cr7,r0,0 ffc11424: 40 9e 00 10 bne- cr7,ffc11434 <_POSIX_Thread_Translate_sched_param+0xb8> ffc11428: 80 1f 00 0c lwz r0,12(r31) ffc1142c: 2f 80 00 00 cmpwi cr7,r0,0 ffc11430: 41 9e ff 90 beq+ cr7,ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44> (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && ffc11434: 80 1f 00 10 lwz r0,16(r31) ffc11438: 2f 80 00 00 cmpwi cr7,r0,0 ffc1143c: 40 9e 00 14 bne- cr7,ffc11450 <_POSIX_Thread_Translate_sched_param+0xd4> ffc11440: 80 1f 00 14 lwz r0,20(r31) (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; ffc11444: 3b 80 00 16 li r28,22 if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && ffc11448: 2f 80 00 00 cmpwi cr7,r0,0 ffc1144c: 41 9e ff 74 beq+ cr7,ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44> (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < ffc11450: 38 7f 00 08 addi r3,r31,8 ffc11454: 4b ff cf 09 bl ffc0e35c <_Timespec_To_ticks> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; ffc11458: 3b 80 00 16 li r28,22 if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < ffc1145c: 7c 7e 1b 78 mr r30,r3 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) ffc11460: 38 7f 00 10 addi r3,r31,16 ffc11464: 4b ff ce f9 bl ffc0e35c <_Timespec_To_ticks> if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < ffc11468: 7f 9e 18 40 cmplw cr7,r30,r3 ffc1146c: 41 9c ff 54 blt+ cr7,ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) ffc11470: 80 7f 00 04 lwz r3,4(r31) ffc11474: 4b ff fe e5 bl ffc11358 <_POSIX_Priority_Is_valid> ffc11478: 2f 83 00 00 cmpwi cr7,r3,0 ffc1147c: 41 9e ff 44 beq+ cr7,ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; ffc11480: 38 00 00 03 li r0,3 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc11484: 3d 20 ff c1 lis r9,-63 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; ffc11488: 90 1d 00 00 stw r0,0(r29) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc1148c: 38 09 97 7c addi r0,r9,-26756 return 0; ffc11490: 3b 80 00 00 li r28,0 if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc11494: 90 1b 00 00 stw r0,0(r27) return 0; ffc11498: 4b ff ff 28 b ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc1149c: 38 00 00 01 li r0,1 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } ffc114a0: 83 61 00 0c lwz r27,12(r1) *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc114a4: 90 1d 00 00 stw r0,0(r29) return 0; ffc114a8: 3b 80 00 00 li r28,0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } ffc114ac: 7f 83 e3 78 mr r3,r28 ffc114b0: 80 01 00 24 lwz r0,36(r1) ffc114b4: 83 81 00 10 lwz r28,16(r1) ffc114b8: 7c 08 03 a6 mtlr r0 ffc114bc: 83 a1 00 14 lwz r29,20(r1) ffc114c0: 83 c1 00 18 lwz r30,24(r1) ffc114c4: 83 e1 00 1c lwz r31,28(r1) ffc114c8: 38 21 00 20 addi r1,r1,32 ffc114cc: 4e 80 00 20 blr *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; ffc114d0: 93 dd 00 00 stw r30,0(r29) return 0; ffc114d4: 4b ff fe ec b ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44> =============================================================================== ffc10274 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { ffc10274: 94 21 ff e8 stwu r1,-24(r1) ffc10278: 7c 08 02 a6 mflr r0 api = deleted->API_Extensions[ THREAD_API_POSIX ]; /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); ffc1027c: 7c 83 23 78 mr r3,r4 */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { ffc10280: 93 81 00 08 stw r28,8(r1) ffc10284: 93 a1 00 0c stw r29,12(r1) ffc10288: 7c 9d 23 78 mr r29,r4 Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; ffc1028c: 83 84 01 34 lwz r28,308(r4) */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { ffc10290: 90 01 00 1c stw r0,28(r1) ffc10294: 93 c1 00 10 stw r30,16(r1) ffc10298: 93 e1 00 14 stw r31,20(r1) api = deleted->API_Extensions[ THREAD_API_POSIX ]; /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); ffc1029c: 48 00 2e f1 bl ffc1318c <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); ffc102a0: 7f a3 eb 78 mr r3,r29 ffc102a4: 48 00 2f 85 bl ffc13228 <_POSIX_Keys_Run_destructors> ffc102a8: 3b fc 00 44 addi r31,r28,68 /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; ffc102ac: 83 dd 00 28 lwz r30,40(r29) while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) ffc102b0: 48 00 00 0c b ffc102bc <_POSIX_Threads_Delete_extension+0x48> *(void **)the_thread->Wait.return_argument = value_ptr; ffc102b4: 81 23 00 28 lwz r9,40(r3) <== NOT EXECUTED ffc102b8: 93 c9 00 00 stw r30,0(r9) <== NOT EXECUTED /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) ffc102bc: 7f e3 fb 78 mr r3,r31 ffc102c0: 4b ff c6 69 bl ffc0c928 <_Thread_queue_Dequeue> ffc102c4: 2c 03 00 00 cmpwi r3,0 ffc102c8: 40 82 ff ec bne+ ffc102b4 <_POSIX_Threads_Delete_extension+0x40><== NEVER TAKEN *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) ffc102cc: 80 1c 00 84 lwz r0,132(r28) ffc102d0: 2f 80 00 04 cmpwi cr7,r0,4 ffc102d4: 41 9e 00 34 beq- cr7,ffc10308 <_POSIX_Threads_Delete_extension+0x94> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; ffc102d8: 38 00 00 00 li r0,0 ffc102dc: 90 1d 01 34 stw r0,308(r29) _Workspace_Free( api ); ffc102e0: 7f 83 e3 78 mr r3,r28 ffc102e4: 4b ff d9 41 bl ffc0dc24 <_Workspace_Free> } ffc102e8: 80 01 00 1c lwz r0,28(r1) ffc102ec: 83 81 00 08 lwz r28,8(r1) ffc102f0: 7c 08 03 a6 mtlr r0 ffc102f4: 83 a1 00 0c lwz r29,12(r1) ffc102f8: 83 c1 00 10 lwz r30,16(r1) ffc102fc: 83 e1 00 14 lwz r31,20(r1) ffc10300: 38 21 00 18 addi r1,r1,24 ffc10304: 4e 80 00 20 blr while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); ffc10308: 38 7c 00 a8 addi r3,r28,168 ffc1030c: 4b ff d6 b9 bl ffc0d9c4 <_Watchdog_Remove> deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; ffc10310: 38 00 00 00 li r0,0 ffc10314: 90 1d 01 34 stw r0,308(r29) _Workspace_Free( api ); ffc10318: 7f 83 e3 78 mr r3,r28 ffc1031c: 4b ff d9 09 bl ffc0dc24 <_Workspace_Free> } ffc10320: 80 01 00 1c lwz r0,28(r1) ffc10324: 83 81 00 08 lwz r28,8(r1) ffc10328: 7c 08 03 a6 mtlr r0 ffc1032c: 83 a1 00 0c lwz r29,12(r1) ffc10330: 83 c1 00 10 lwz r30,16(r1) ffc10334: 83 e1 00 14 lwz r31,20(r1) ffc10338: 38 21 00 18 addi r1,r1,24 ffc1033c: 4e 80 00 20 blr =============================================================================== ffc10230 <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { ffc10230: 7c 08 02 a6 mflr r0 ffc10234: 94 21 ff f8 stwu r1,-8(r1) ffc10238: 90 01 00 0c stw r0,12(r1) */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc1023c: 88 03 00 08 lbz r0,8(r3) ffc10240: 54 00 07 7e clrlwi r0,r0,29 /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) ffc10244: 2f 80 00 03 cmpwi cr7,r0,3 ffc10248: 41 9e 00 14 beq- cr7,ffc1025c <_POSIX_Threads_Exitted_extension+0x2c> pthread_exit( executing->Wait.return_argument ); } ffc1024c: 80 01 00 0c lwz r0,12(r1) ffc10250: 38 21 00 08 addi r1,r1,8 ffc10254: 7c 08 03 a6 mtlr r0 ffc10258: 4e 80 00 20 blr /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) pthread_exit( executing->Wait.return_argument ); ffc1025c: 80 63 00 28 lwz r3,40(r3) ffc10260: 48 00 34 45 bl ffc136a4 } ffc10264: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc10268: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc1026c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc10270: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0935c <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc0935c: 94 21 ff 98 stwu r1,-104(r1) ffc09360: 7c 08 02 a6 mflr r0 uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; ffc09364: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc09368: 90 01 00 6c stw r0,108(r1) uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; ffc0936c: 39 29 20 44 addi r9,r9,8260 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc09370: 93 e1 00 64 stw r31,100(r1) uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; ffc09374: 83 e9 00 34 lwz r31,52(r9) * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc09378: 93 a1 00 5c stw r29,92(r1) pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; maximum = Configuration_POSIX_API.number_of_initialization_threads; if ( !user_threads || maximum == 0 ) ffc0937c: 2f 9f 00 00 cmpwi cr7,r31,0 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc09380: 93 c1 00 60 stw r30,96(r1) posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; maximum = Configuration_POSIX_API.number_of_initialization_threads; ffc09384: 83 a9 00 30 lwz r29,48(r9) if ( !user_threads || maximum == 0 ) ffc09388: 41 9e 00 5c beq- cr7,ffc093e4 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN ffc0938c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc09390: 41 9e 00 54 beq- cr7,ffc093e4 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN ffc09394: 3b c0 00 00 li r30,0 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); ffc09398: 38 61 00 0c addi r3,r1,12 ffc0939c: 48 00 81 3d bl ffc114d8 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); ffc093a0: 38 80 00 02 li r4,2 ffc093a4: 38 61 00 0c addi r3,r1,12 ffc093a8: 48 00 81 71 bl ffc11518 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); ffc093ac: 80 9f 00 04 lwz r4,4(r31) ffc093b0: 38 61 00 0c addi r3,r1,12 ffc093b4: 48 00 81 99 bl ffc1154c status = pthread_create( ffc093b8: 80 bf 00 00 lwz r5,0(r31) ffc093bc: 38 61 00 08 addi r3,r1,8 ffc093c0: 38 81 00 0c addi r4,r1,12 ffc093c4: 38 c0 00 00 li r6,0 ffc093c8: 4b ff fb 3d bl ffc08f04 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) ffc093cc: 7c 65 1b 79 mr. r5,r3 ffc093d0: 40 82 00 30 bne- ffc09400 <_POSIX_Threads_Initialize_user_threads_body+0xa4> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { ffc093d4: 3b de 00 01 addi r30,r30,1 ffc093d8: 7f 9d f0 00 cmpw cr7,r29,r30 ffc093dc: 3b ff 00 08 addi r31,r31,8 ffc093e0: 40 9e ff b8 bne+ cr7,ffc09398 <_POSIX_Threads_Initialize_user_threads_body+0x3c><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } ffc093e4: 80 01 00 6c lwz r0,108(r1) ffc093e8: 83 a1 00 5c lwz r29,92(r1) ffc093ec: 7c 08 03 a6 mtlr r0 ffc093f0: 83 c1 00 60 lwz r30,96(r1) ffc093f4: 83 e1 00 64 lwz r31,100(r1) ffc093f8: 38 21 00 68 addi r1,r1,104 ffc093fc: 4e 80 00 20 blr &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); ffc09400: 38 60 00 02 li r3,2 ffc09404: 38 80 00 01 li r4,1 ffc09408: 48 00 29 91 bl ffc0bd98 <_Internal_error_Occurred> =============================================================================== ffc104a4 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { ffc104a4: 94 21 ff f0 stwu r1,-16(r1) ffc104a8: 7c 08 02 a6 mflr r0 ffc104ac: 90 01 00 14 stw r0,20(r1) ffc104b0: 93 e1 00 0c stw r31,12(r1) Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc104b4: 83 e4 01 34 lwz r31,308(r4) */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { ffc104b8: 93 c1 00 08 stw r30,8(r1) ffc104bc: 7c 9e 23 78 mr r30,r4 the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); ffc104c0: 38 7f 00 98 addi r3,r31,152 ffc104c4: 48 00 12 7d bl ffc11740 <_Timespec_To_ticks> */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc104c8: 80 1e 00 1c lwz r0,28(r30) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); ffc104cc: 3d 20 00 00 lis r9,0 ffc104d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc104d4: 88 89 27 24 lbz r4,10020(r9) ffc104d8: 80 1f 00 88 lwz r0,136(r31) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; ffc104dc: 90 7e 00 78 stw r3,120(r30) ffc104e0: 7c 80 20 50 subf r4,r0,r4 new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; ffc104e4: 90 9e 00 18 stw r4,24(r30) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc104e8: 40 9e 00 10 bne- cr7,ffc104f8 <_POSIX_Threads_Sporadic_budget_TSR+0x54><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { ffc104ec: 80 1e 00 14 lwz r0,20(r30) ffc104f0: 7f 80 20 40 cmplw cr7,r0,r4 ffc104f4: 41 9d 00 38 bgt- cr7,ffc1052c <_POSIX_Threads_Sporadic_budget_TSR+0x88> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); ffc104f8: 38 7f 00 90 addi r3,r31,144 ffc104fc: 48 00 12 45 bl ffc11740 <_Timespec_To_ticks> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc10500: 38 9f 00 a8 addi r4,r31,168 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc10504: 90 7f 00 b4 stw r3,180(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc10508: 3c 60 00 00 lis r3,0 ffc1050c: 38 63 2d 68 addi r3,r3,11624 ffc10510: 4b ff d2 ed bl ffc0d7fc <_Watchdog_Insert> _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } ffc10514: 80 01 00 14 lwz r0,20(r1) ffc10518: 83 c1 00 08 lwz r30,8(r1) ffc1051c: 7c 08 03 a6 mtlr r0 ffc10520: 83 e1 00 0c lwz r31,12(r1) ffc10524: 38 21 00 10 addi r1,r1,16 ffc10528: 4e 80 00 20 blr if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); ffc1052c: 7f c3 f3 78 mr r3,r30 ffc10530: 38 a0 00 01 li r5,1 ffc10534: 4b ff b9 91 bl ffc0bec4 <_Thread_Change_priority> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); ffc10538: 38 7f 00 90 addi r3,r31,144 ffc1053c: 48 00 12 05 bl ffc11740 <_Timespec_To_ticks> ffc10540: 38 9f 00 a8 addi r4,r31,168 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc10544: 90 7f 00 b4 stw r3,180(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc10548: 3c 60 00 00 lis r3,0 ffc1054c: 38 63 2d 68 addi r3,r3,11624 ffc10550: 4b ff d2 ad bl ffc0d7fc <_Watchdog_Insert> _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } ffc10554: 80 01 00 14 lwz r0,20(r1) ffc10558: 83 c1 00 08 lwz r30,8(r1) ffc1055c: 7c 08 03 a6 mtlr r0 ffc10560: 83 e1 00 0c lwz r31,12(r1) ffc10564: 38 21 00 10 addi r1,r1,16 ffc10568: 4e 80 00 20 blr =============================================================================== ffc1056c <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { ffc1056c: 7c 08 02 a6 mflr r0 ffc10570: 94 21 ff f8 stwu r1,-8(r1) ffc10574: 90 01 00 0c stw r0,12(r1) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc10578: 80 03 00 1c lwz r0,28(r3) ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc1057c: 81 63 01 34 lwz r11,308(r3) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc10580: 2f 80 00 00 cmpwi cr7,r0,0 ffc10584: 80 0b 00 8c lwz r0,140(r11) ffc10588: 3d 60 00 00 lis r11,0 ffc1058c: 88 8b 27 24 lbz r4,10020(r11) ffc10590: 7c 80 20 50 subf r4,r0,r4 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ ffc10594: 38 00 ff ff li r0,-1 new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; ffc10598: 90 83 00 18 stw r4,24(r3) /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ ffc1059c: 90 03 00 78 stw r0,120(r3) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc105a0: 40 9e 00 10 bne- cr7,ffc105b0 <_POSIX_Threads_Sporadic_budget_callout+0x44><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { ffc105a4: 80 03 00 14 lwz r0,20(r3) ffc105a8: 7f 80 20 40 cmplw cr7,r0,r4 ffc105ac: 41 9c 00 14 blt- cr7,ffc105c0 <_POSIX_Threads_Sporadic_budget_callout+0x54><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } ffc105b0: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc105b4: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc105b8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc105bc: 4e 80 00 20 blr <== NOT EXECUTED * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); ffc105c0: 38 a0 00 01 li r5,1 ffc105c4: 4b ff b9 01 bl ffc0bec4 <_Thread_Change_priority> #if 0 printk( "lower priority\n" ); #endif } } } ffc105c8: 80 01 00 0c lwz r0,12(r1) ffc105cc: 38 21 00 08 addi r1,r1,8 ffc105d0: 7c 08 03 a6 mtlr r0 ffc105d4: 4e 80 00 20 blr =============================================================================== ffc1318c <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { ffc1318c: 94 21 ff e8 stwu r1,-24(r1) ffc13190: 7c 08 02 a6 mflr r0 ffc13194: 90 01 00 1c stw r0,28(r1) ffc13198: 93 c1 00 10 stw r30,16(r1) POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc1319c: 83 c3 01 34 lwz r30,308(r3) #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { ffc131a0: 93 a1 00 0c stw r29,12(r1) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc131a4: 3b be 00 e8 addi r29,r30,232 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { ffc131a8: 80 1e 00 e4 lwz r0,228(r30) #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { ffc131ac: 93 e1 00 14 stw r31,20(r1) handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { ffc131b0: 7f 80 e8 00 cmpw cr7,r0,r29 thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; ffc131b4: 38 00 00 01 li r0,1 ffc131b8: 90 1e 00 d8 stw r0,216(r30) while ( !_Chain_Is_empty( handler_stack ) ) { ffc131bc: 41 9e 00 50 beq- cr7,ffc1320c <_POSIX_Threads_cancel_run+0x80> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc131c0: 7c 00 00 a6 mfmsr r0 ffc131c4: 7d 30 42 a6 mfsprg r9,0 ffc131c8: 7c 09 48 78 andc r9,r0,r9 ffc131cc: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); handler = (POSIX_Cancel_Handler_control *) ffc131d0: 83 fe 00 ec lwz r31,236(r30) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc131d4: 81 7f 00 00 lwz r11,0(r31) previous = the_node->previous; ffc131d8: 81 3f 00 04 lwz r9,4(r31) next->previous = previous; ffc131dc: 91 2b 00 04 stw r9,4(r11) previous->next = next; ffc131e0: 91 69 00 00 stw r11,0(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc131e4: 7c 00 01 24 mtmsr r0 _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); (*handler->routine)( handler->arg ); ffc131e8: 80 1f 00 08 lwz r0,8(r31) ffc131ec: 80 7f 00 0c lwz r3,12(r31) ffc131f0: 7c 09 03 a6 mtctr r0 ffc131f4: 4e 80 04 21 bctrl _Workspace_Free( handler ); ffc131f8: 7f e3 fb 78 mr r3,r31 ffc131fc: 4b ff aa 29 bl ffc0dc24 <_Workspace_Free> handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { ffc13200: 80 1e 00 e4 lwz r0,228(r30) ffc13204: 7f 80 e8 00 cmpw cr7,r0,r29 ffc13208: 40 9e ff b8 bne+ cr7,ffc131c0 <_POSIX_Threads_cancel_run+0x34><== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } ffc1320c: 80 01 00 1c lwz r0,28(r1) ffc13210: 83 a1 00 0c lwz r29,12(r1) ffc13214: 7c 08 03 a6 mtlr r0 ffc13218: 83 c1 00 10 lwz r30,16(r1) ffc1321c: 83 e1 00 14 lwz r31,20(r1) ffc13220: 38 21 00 18 addi r1,r1,24 ffc13224: 4e 80 00 20 blr =============================================================================== ffc090d8 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc090d8: 94 21 ff f0 stwu r1,-16(r1) ffc090dc: 7c 08 02 a6 mflr r0 ffc090e0: 90 01 00 14 stw r0,20(r1) /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc090e4: 80 04 00 54 lwz r0,84(r4) bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc090e8: 81 24 00 68 lwz r9,104(r4) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc090ec: 2f 80 00 00 cmpwi cr7,r0,0 * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc090f0: 93 e1 00 0c stw r31,12(r1) bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc090f4: 38 09 00 01 addi r0,r9,1 * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc090f8: 7c 9f 23 78 mr r31,r4 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc090fc: 90 04 00 68 stw r0,104(r4) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc09100: 40 9e 00 40 bne- cr7,ffc09140 <_POSIX_Timer_TSR+0x68> ffc09104: 80 04 00 58 lwz r0,88(r4) ffc09108: 2f 80 00 00 cmpwi cr7,r0,0 ffc0910c: 40 9e 00 34 bne- cr7,ffc09140 <_POSIX_Timer_TSR+0x68> <== ALWAYS TAKEN /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; ffc09110: 38 00 00 04 li r0,4 <== NOT EXECUTED ffc09114: 98 04 00 3c stb r0,60(r4) <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { ffc09118: 80 7f 00 38 lwz r3,56(r31) ffc0911c: 80 9f 00 44 lwz r4,68(r31) ffc09120: 48 00 79 5d bl ffc10a7c } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; ffc09124: 38 00 00 00 li r0,0 ffc09128: 90 1f 00 68 stw r0,104(r31) } ffc0912c: 80 01 00 14 lwz r0,20(r1) ffc09130: 83 e1 00 0c lwz r31,12(r1) ffc09134: 38 21 00 10 addi r1,r1,16 ffc09138: 7c 08 03 a6 mtlr r0 ffc0913c: 4e 80 00 20 blr ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( ffc09140: 80 9f 00 64 lwz r4,100(r31) ffc09144: 3c c0 ff c1 lis r6,-63 ffc09148: 80 bf 00 08 lwz r5,8(r31) ffc0914c: 38 7f 00 10 addi r3,r31,16 ffc09150: 38 c6 90 d8 addi r6,r6,-28456 ffc09154: 7f e7 fb 78 mr r7,r31 ffc09158: 48 00 7f 31 bl ffc11088 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) ffc0915c: 2f 83 00 00 cmpwi cr7,r3,0 ffc09160: 41 9e ff cc beq+ cr7,ffc0912c <_POSIX_Timer_TSR+0x54> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); ffc09164: 38 7f 00 6c addi r3,r31,108 ffc09168: 48 00 1d e5 bl ffc0af4c <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc0916c: 38 00 00 03 li r0,3 ffc09170: 98 1f 00 3c stb r0,60(r31) ffc09174: 4b ff ff a4 b ffc09118 <_POSIX_Timer_TSR+0x40> =============================================================================== ffc13308 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc13308: 94 21 ff 98 stwu r1,-104(r1) ffc1330c: 7c 08 02 a6 mflr r0 ffc13310: 7c a6 2b 78 mr r6,r5 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc13314: 38 e0 00 01 li r7,1 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc13318: 93 c1 00 60 stw r30,96(r1) siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc1331c: 38 a1 00 08 addi r5,r1,8 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc13320: 93 e1 00 64 stw r31,100(r1) ffc13324: 7c 9e 23 78 mr r30,r4 ffc13328: 7c 7f 1b 78 mr r31,r3 ffc1332c: 90 01 00 6c stw r0,108(r1) ffc13330: 93 21 00 4c stw r25,76(r1) ffc13334: 93 41 00 50 stw r26,80(r1) ffc13338: 93 61 00 54 stw r27,84(r1) ffc1333c: 93 81 00 58 stw r28,88(r1) ffc13340: 93 a1 00 5c stw r29,92(r1) siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc13344: 48 00 00 cd bl ffc13410 <_POSIX_signals_Clear_signals> ffc13348: 2f 83 00 00 cmpwi cr7,r3,0 is_global, true ) ) return false; ffc1334c: 38 60 00 00 li r3,0 { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc13350: 41 9e 00 80 beq- cr7,ffc133d0 <_POSIX_signals_Check_signal+0xc8> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) ffc13354: 1f 9e 00 0c mulli r28,r30,12 ffc13358: 3f 60 00 00 lis r27,0 ffc1335c: 3b 7b 31 c0 addi r27,r27,12736 ffc13360: 7d 3b e2 14 add r9,r27,r28 ffc13364: 83 a9 00 08 lwz r29,8(r9) ffc13368: 2f 9d 00 01 cmpwi cr7,r29,1 ffc1336c: 41 9e 00 64 beq- cr7,ffc133d0 <_POSIX_signals_Check_signal+0xc8><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; ffc13370: 83 5f 00 d0 lwz r26,208(r31) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, ffc13374: 3f 20 00 00 lis r25,0 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; ffc13378: 80 09 00 04 lwz r0,4(r9) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, ffc1337c: 3b 39 31 44 addi r25,r25,12612 ffc13380: 80 99 00 0c lwz r4,12(r25) ffc13384: 38 61 00 14 addi r3,r1,20 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; ffc13388: 7c 00 d3 78 or r0,r0,r26 ffc1338c: 90 1f 00 d0 stw r0,208(r31) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, ffc13390: 38 84 00 20 addi r4,r4,32 ffc13394: 38 a0 00 28 li r5,40 ffc13398: 48 00 17 31 bl ffc14ac8 sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { ffc1339c: 7c 1b e0 2e lwzx r0,r27,r28 case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( ffc133a0: 7f c3 f3 78 mr r3,r30 sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { ffc133a4: 2f 80 00 02 cmpwi cr7,r0,2 ffc133a8: 41 9e 00 54 beq- cr7,ffc133fc <_POSIX_signals_Check_signal+0xf4> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); ffc133ac: 7f a9 03 a6 mtctr r29 ffc133b0: 4e 80 04 21 bctrl } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, ffc133b4: 80 79 00 0c lwz r3,12(r25) ffc133b8: 38 81 00 14 addi r4,r1,20 ffc133bc: 38 a0 00 28 li r5,40 ffc133c0: 38 63 00 20 addi r3,r3,32 ffc133c4: 48 00 17 05 bl ffc14ac8 sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; ffc133c8: 93 5f 00 d0 stw r26,208(r31) return true; ffc133cc: 38 60 00 01 li r3,1 } ffc133d0: 80 01 00 6c lwz r0,108(r1) ffc133d4: 83 21 00 4c lwz r25,76(r1) ffc133d8: 7c 08 03 a6 mtlr r0 ffc133dc: 83 41 00 50 lwz r26,80(r1) ffc133e0: 83 61 00 54 lwz r27,84(r1) ffc133e4: 83 81 00 58 lwz r28,88(r1) ffc133e8: 83 a1 00 5c lwz r29,92(r1) ffc133ec: 83 c1 00 60 lwz r30,96(r1) ffc133f0: 83 e1 00 64 lwz r31,100(r1) ffc133f4: 38 21 00 68 addi r1,r1,104 ffc133f8: 4e 80 00 20 blr /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( ffc133fc: 38 81 00 08 addi r4,r1,8 ffc13400: 7f a9 03 a6 mtctr r29 ffc13404: 38 a0 00 00 li r5,0 ffc13408: 4e 80 04 21 bctrl signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; ffc1340c: 4b ff ff a8 b ffc133b4 <_POSIX_signals_Check_signal+0xac> =============================================================================== ffc13d00 <_POSIX_signals_Clear_process_signals>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc13d00: 7d 60 00 a6 mfmsr r11 ffc13d04: 7c 10 42 a6 mfsprg r0,0 ffc13d08: 7d 60 00 78 andc r0,r11,r0 ffc13d0c: 7c 00 01 24 mtmsr r0 mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { ffc13d10: 3d 20 00 00 lis r9,0 ffc13d14: 1c 03 00 0c mulli r0,r3,12 ffc13d18: 39 29 31 c0 addi r9,r9,12736 ffc13d1c: 7d 29 00 2e lwzx r9,r9,r0 ffc13d20: 2f 89 00 02 cmpwi cr7,r9,2 ffc13d24: 41 9e 00 28 beq- cr7,ffc13d4c <_POSIX_signals_Clear_process_signals+0x4c> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; ffc13d28: 3d 20 00 00 lis r9,0 ffc13d2c: 80 09 28 50 lwz r0,10320(r9) ffc13d30: 39 40 ff fe li r10,-2 ffc13d34: 38 63 ff ff addi r3,r3,-1 ffc13d38: 5d 43 18 3e rotlw r3,r10,r3 ffc13d3c: 7c 63 00 38 and r3,r3,r0 ffc13d40: 90 69 28 50 stw r3,10320(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc13d44: 7d 60 01 24 mtmsr r11 } _ISR_Enable( level ); } ffc13d48: 4e 80 00 20 blr ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) ffc13d4c: 3d 20 00 00 lis r9,0 ffc13d50: 39 29 33 b4 addi r9,r9,13236 ffc13d54: 7d 40 4a 14 add r10,r0,r9 ffc13d58: 7d 29 00 2e lwzx r9,r9,r0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc13d5c: 38 0a 00 04 addi r0,r10,4 ffc13d60: 7f 89 00 00 cmpw cr7,r9,r0 ffc13d64: 41 be ff c4 beq- cr7,ffc13d28 <_POSIX_signals_Clear_process_signals+0x28><== ALWAYS TAKEN ffc13d68: 7d 60 01 24 mtmsr r11 <== NOT EXECUTED } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); } ffc13d6c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc09d90 <_POSIX_signals_Get_lowest>: ffc09d90: 38 00 00 05 li r0,5 ffc09d94: 7c 09 03 a6 mtctr r0 sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc09d98: 39 20 00 1b li r9,27 ffc09d9c: 39 60 00 01 li r11,1 #include #include #include #include int _POSIX_signals_Get_lowest( ffc09da0: 38 09 ff ff addi r0,r9,-1 ffc09da4: 7d 60 00 30 slw r0,r11,r0 ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc09da8: 7c 0a 18 39 and. r10,r0,r3 ffc09dac: 40 82 00 38 bne- ffc09de4 <_POSIX_signals_Get_lowest+0x54><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc09db0: 39 29 00 01 addi r9,r9,1 ffc09db4: 42 00 ff ec bdnz+ ffc09da0 <_POSIX_signals_Get_lowest+0x10> ffc09db8: 38 00 00 1a li r0,26 ffc09dbc: 39 20 00 01 li r9,1 ffc09dc0: 7c 09 03 a6 mtctr r0 ffc09dc4: 39 60 00 01 li r11,1 ffc09dc8: 48 00 00 0c b ffc09dd4 <_POSIX_signals_Get_lowest+0x44> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { ffc09dcc: 39 29 00 01 addi r9,r9,1 ffc09dd0: 42 40 00 14 bdz- ffc09de4 <_POSIX_signals_Get_lowest+0x54> #include #include #include #include int _POSIX_signals_Get_lowest( ffc09dd4: 38 09 ff ff addi r0,r9,-1 ffc09dd8: 7d 60 00 30 slw r0,r11,r0 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc09ddc: 7c 0a 18 39 and. r10,r0,r3 ffc09de0: 41 82 ff ec beq+ ffc09dcc <_POSIX_signals_Get_lowest+0x3c> * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } ffc09de4: 7d 23 4b 78 mr r3,r9 ffc09de8: 4e 80 00 20 blr =============================================================================== ffc0ff74 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { ffc0ff74: 94 21 ff e0 stwu r1,-32(r1) ffc0ff78: 7c 08 02 a6 mflr r0 ffc0ff7c: 90 01 00 24 stw r0,36(r1) ffc0ff80: 93 c1 00 18 stw r30,24(r1) POSIX_API_Control *api; int signo; ISR_Level level; int hold_errno; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0ff84: 83 c3 01 34 lwz r30,308(r3) */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { ffc0ff88: 93 81 00 10 stw r28,16(r1) /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; ffc0ff8c: 3f 80 00 00 lis r28,0 /* * api may be NULL in case of a thread close in progress */ if ( !api ) ffc0ff90: 2f 9e 00 00 cmpwi cr7,r30,0 /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; ffc0ff94: 3b 9c 31 44 addi r28,r28,12612 */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { ffc0ff98: 93 61 00 0c stw r27,12(r1) /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; ffc0ff9c: 81 3c 00 0c lwz r9,12(r28) */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { ffc0ffa0: 93 a1 00 14 stw r29,20(r1) ffc0ffa4: 93 e1 00 1c stw r31,28(r1) /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; ffc0ffa8: 83 69 00 34 lwz r27,52(r9) /* * api may be NULL in case of a thread close in progress */ if ( !api ) ffc0ffac: 41 9e 00 cc beq- cr7,ffc10078 <_POSIX_signals_Post_switch_extension+0x104> ffc0ffb0: 3f a0 00 00 lis r29,0 ffc0ffb4: 3b bd 28 50 addi r29,r29,10320 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0ffb8: 7c 00 00 a6 mfmsr r0 ffc0ffbc: 7d 30 42 a6 mfsprg r9,0 ffc0ffc0: 7c 09 48 78 andc r9,r0,r9 ffc0ffc4: 7d 20 01 24 mtmsr r9 * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0ffc8: 81 5d 00 00 lwz r10,0(r29) ffc0ffcc: 81 3e 00 d4 lwz r9,212(r30) * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0ffd0: 81 7e 00 d0 lwz r11,208(r30) (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0ffd4: 7d 49 4b 78 or r9,r10,r9 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0ffd8: 7c 00 01 24 mtmsr r0 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0ffdc: 7d 2a 58 79 andc. r10,r9,r11 ffc0ffe0: 41 82 00 90 beq- ffc10070 <_POSIX_signals_Post_switch_extension+0xfc> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc0ffe4: 3b e0 00 1b li r31,27 _POSIX_signals_Check_signal( api, signo, false ); ffc0ffe8: 7f e4 fb 78 mr r4,r31 ffc0ffec: 38 a0 00 00 li r5,0 ffc0fff0: 7f c3 f3 78 mr r3,r30 ffc0fff4: 48 00 33 15 bl ffc13308 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); ffc0fff8: 7f e4 fb 78 mr r4,r31 ffc0fffc: 7f c3 f3 78 mr r3,r30 ffc10000: 38 a0 00 01 li r5,1 ffc10004: 48 00 33 05 bl ffc13308 <_POSIX_signals_Check_signal> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc10008: 2f 9f 00 1f cmpwi cr7,r31,31 ffc1000c: 3b ff 00 01 addi r31,r31,1 ffc10010: 40 9e ff d8 bne+ cr7,ffc0ffe8 <_POSIX_signals_Post_switch_extension+0x74> ffc10014: 3b e0 00 01 li r31,1 _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); ffc10018: 7f e4 fb 78 mr r4,r31 ffc1001c: 38 a0 00 00 li r5,0 ffc10020: 7f c3 f3 78 mr r3,r30 ffc10024: 48 00 32 e5 bl ffc13308 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); ffc10028: 7f e4 fb 78 mr r4,r31 ffc1002c: 7f c3 f3 78 mr r3,r30 ffc10030: 38 a0 00 01 li r5,1 ffc10034: 48 00 32 d5 bl ffc13308 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { ffc10038: 2f 9f 00 1a cmpwi cr7,r31,26 ffc1003c: 3b ff 00 01 addi r31,r31,1 ffc10040: 40 9e ff d8 bne+ cr7,ffc10018 <_POSIX_signals_Post_switch_extension+0xa4> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc10044: 7c 00 00 a6 mfmsr r0 ffc10048: 7d 30 42 a6 mfsprg r9,0 ffc1004c: 7c 09 48 78 andc r9,r0,r9 ffc10050: 7d 20 01 24 mtmsr r9 * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { ffc10054: 81 5d 00 00 lwz r10,0(r29) ffc10058: 81 3e 00 d4 lwz r9,212(r30) * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc1005c: 81 7e 00 d0 lwz r11,208(r30) (api->signals_pending | _POSIX_signals_Pending)) ) { ffc10060: 7d 49 4b 78 or r9,r10,r9 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc10064: 7c 00 01 24 mtmsr r0 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc10068: 7d 2a 58 79 andc. r10,r9,r11 ffc1006c: 40 82 ff 78 bne+ ffc0ffe4 <_POSIX_signals_Post_switch_extension+0x70><== NEVER TAKEN _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } _Thread_Executing->Wait.return_code = hold_errno; ffc10070: 81 3c 00 0c lwz r9,12(r28) ffc10074: 93 69 00 34 stw r27,52(r9) } ffc10078: 80 01 00 24 lwz r0,36(r1) ffc1007c: 83 61 00 0c lwz r27,12(r1) ffc10080: 7c 08 03 a6 mtlr r0 ffc10084: 83 81 00 10 lwz r28,16(r1) ffc10088: 83 a1 00 14 lwz r29,20(r1) ffc1008c: 83 c1 00 18 lwz r30,24(r1) ffc10090: 83 e1 00 1c lwz r31,28(r1) ffc10094: 38 21 00 20 addi r1,r1,32 ffc10098: 4e 80 00 20 blr =============================================================================== ffc1f298 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc1f298: 94 21 ff f0 stwu r1,-16(r1) ffc1f29c: 7c 08 02 a6 mflr r0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc1f2a0: 3d 20 10 00 lis r9,4096 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc1f2a4: 90 01 00 14 stw r0,20(r1) /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc1f2a8: 61 29 80 00 ori r9,r9,32768 ffc1f2ac: 80 03 00 10 lwz r0,16(r3) bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc1f2b0: 93 e1 00 0c stw r31,12(r1) ffc1f2b4: 7c 7f 1b 78 mr r31,r3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc1f2b8: 7c 0b 48 38 and r11,r0,r9 ffc1f2bc: 7f 8b 48 00 cmpw cr7,r11,r9 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc1f2c0: 93 c1 00 08 stw r30,8(r1) ffc1f2c4: 39 64 ff ff addi r11,r4,-1 ffc1f2c8: 39 20 00 01 li r9,1 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc1f2cc: 81 43 01 34 lwz r10,308(r3) ffc1f2d0: 7d 2b 58 30 slw r11,r9,r11 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc1f2d4: 41 9e 00 70 beq- cr7,ffc1f344 <_POSIX_signals_Unblock_thread+0xac> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { ffc1f2d8: 81 4a 00 d0 lwz r10,208(r10) } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; ffc1f2dc: 3b c0 00 00 li r30,0 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { ffc1f2e0: 7d 68 50 79 andc. r8,r11,r10 ffc1f2e4: 41 82 00 44 beq- ffc1f328 <_POSIX_signals_Unblock_thread+0x90> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { ffc1f2e8: 74 0b 10 00 andis. r11,r0,4096 ffc1f2ec: 41 82 00 b8 beq- ffc1f3a4 <_POSIX_signals_Unblock_thread+0x10c> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); ffc1f2f0: 3d 20 00 03 lis r9,3 ffc1f2f4: 61 29 be e0 ori r9,r9,48864 the_thread->Wait.return_code = EINTR; /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) ffc1f2f8: 7c 08 48 39 and. r8,r0,r9 * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { the_thread->Wait.return_code = EINTR; ffc1f2fc: 39 20 00 04 li r9,4 ffc1f300: 91 23 00 34 stw r9,52(r3) /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) ffc1f304: 40 82 00 e4 bne- ffc1f3e8 <_POSIX_signals_Unblock_thread+0x150> _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { ffc1f308: 70 09 00 08 andi. r9,r0,8 ffc1f30c: 41 a2 00 1c beq+ ffc1f328 <_POSIX_signals_Unblock_thread+0x90><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); ffc1f310: 38 63 00 48 addi r3,r3,72 ffc1f314: 4b fe e6 b1 bl ffc0d9c4 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc1f318: 3c 80 10 03 lis r4,4099 ffc1f31c: 7f e3 fb 78 mr r3,r31 ffc1f320: 60 84 ff f8 ori r4,r4,65528 ffc1f324: 4b fe cd 3d bl ffc0c060 <_Thread_Clear_state> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } ffc1f328: 80 01 00 14 lwz r0,20(r1) ffc1f32c: 7f c3 f3 78 mr r3,r30 ffc1f330: 83 e1 00 0c lwz r31,12(r1) ffc1f334: 7c 08 03 a6 mtlr r0 ffc1f338: 83 c1 00 08 lwz r30,8(r1) ffc1f33c: 38 21 00 10 addi r1,r1,16 ffc1f340: 4e 80 00 20 blr * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { ffc1f344: 80 03 00 30 lwz r0,48(r3) ffc1f348: 7d 68 00 39 and. r8,r11,r0 ffc1f34c: 41 82 00 88 beq- ffc1f3d4 <_POSIX_signals_Unblock_thread+0x13c> the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { ffc1f350: 2f 85 00 00 cmpwi cr7,r5,0 if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; ffc1f354: 81 3f 00 28 lwz r9,40(r31) */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; ffc1f358: 38 00 00 04 li r0,4 ffc1f35c: 90 1f 00 34 stw r0,52(r31) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { ffc1f360: 41 9e 00 90 beq- cr7,ffc1f3f0 <_POSIX_signals_Unblock_thread+0x158> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; ffc1f364: 81 45 00 00 lwz r10,0(r5) ffc1f368: 81 65 00 04 lwz r11,4(r5) ffc1f36c: 80 05 00 08 lwz r0,8(r5) ffc1f370: 91 49 00 00 stw r10,0(r9) ffc1f374: 91 69 00 04 stw r11,4(r9) ffc1f378: 90 09 00 08 stw r0,8(r9) } _Thread_queue_Extract_with_proxy( the_thread ); ffc1f37c: 7f e3 fb 78 mr r3,r31 ffc1f380: 4b fe da 49 bl ffc0cdc8 <_Thread_queue_Extract_with_proxy> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } ffc1f384: 80 01 00 14 lwz r0,20(r1) } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); return true; ffc1f388: 3b c0 00 01 li r30,1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } ffc1f38c: 83 e1 00 0c lwz r31,12(r1) ffc1f390: 7c 08 03 a6 mtlr r0 ffc1f394: 7f c3 f3 78 mr r3,r30 ffc1f398: 83 c1 00 08 lwz r30,8(r1) ffc1f39c: 38 21 00 10 addi r1,r1,16 ffc1f3a0: 4e 80 00 20 blr else if ( _States_Is_delaying(the_thread->current_state) ) { (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { ffc1f3a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc1f3a8: 40 be ff 80 bne- cr7,ffc1f328 <_POSIX_signals_Unblock_thread+0x90><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc1f3ac: 3d 60 00 00 lis r11,0 ffc1f3b0: 39 6b 31 44 addi r11,r11,12612 ffc1f3b4: 80 0b 00 08 lwz r0,8(r11) ffc1f3b8: 2f 80 00 00 cmpwi cr7,r0,0 ffc1f3bc: 41 be ff 6c beq- cr7,ffc1f328 <_POSIX_signals_Unblock_thread+0x90> ffc1f3c0: 80 0b 00 0c lwz r0,12(r11) ffc1f3c4: 7f 83 00 00 cmpw cr7,r3,r0 ffc1f3c8: 40 9e ff 60 bne+ cr7,ffc1f328 <_POSIX_signals_Unblock_thread+0x90><== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc1f3cc: 99 2b 00 18 stb r9,24(r11) ffc1f3d0: 4b ff ff 58 b ffc1f328 <_POSIX_signals_Unblock_thread+0x90> * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { ffc1f3d4: 80 0a 00 d0 lwz r0,208(r10) /* * This should only be reached via pthread_kill(). */ return false; ffc1f3d8: 3b c0 00 00 li r30,0 * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { ffc1f3dc: 7d 69 00 79 andc. r9,r11,r0 ffc1f3e0: 40 82 ff 70 bne+ ffc1f350 <_POSIX_signals_Unblock_thread+0xb8> ffc1f3e4: 4b ff ff 44 b ffc1f328 <_POSIX_signals_Unblock_thread+0x90> /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); ffc1f3e8: 4b fe d9 e1 bl ffc0cdc8 <_Thread_queue_Extract_with_proxy> ffc1f3ec: 4b ff ff 3c b ffc1f328 <_POSIX_signals_Unblock_thread+0x90> the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; ffc1f3f0: 38 00 00 01 li r0,1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; ffc1f3f4: 90 89 00 00 stw r4,0(r9) the_info->si_code = SI_USER; ffc1f3f8: 90 09 00 04 stw r0,4(r9) the_info->si_value.sival_int = 0; ffc1f3fc: 90 a9 00 08 stw r5,8(r9) ffc1f400: 4b ff ff 7c b ffc1f37c <_POSIX_signals_Unblock_thread+0xe4> =============================================================================== ffc12360 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc12360: 94 21 ff e8 stwu r1,-24(r1) ffc12364: 7c 08 02 a6 mflr r0 ffc12368: 93 c1 00 10 stw r30,16(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; ffc1236c: 7c 9e 23 79 mr. r30,r4 */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc12370: 93 81 00 08 stw r28,8(r1) ffc12374: 7c 7c 1b 78 mr r28,r3 ffc12378: 90 01 00 1c stw r0,28(r1) ffc1237c: 93 a1 00 0c stw r29,12(r1) ffc12380: 93 e1 00 14 stw r31,20(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; ffc12384: 41 82 01 10 beq- ffc12494 <_RBTree_Extract_unprotected+0x134> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { ffc12388: 80 03 00 08 lwz r0,8(r3) ffc1238c: 7f 80 f0 00 cmpw cr7,r0,r30 ffc12390: 41 9e 01 68 beq- cr7,ffc124f8 <_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]) { ffc12394: 80 1c 00 0c lwz r0,12(r28) ffc12398: 7f 80 f0 00 cmpw cr7,r0,r30 ffc1239c: 41 9e 01 28 beq- cr7,ffc124c4 <_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]) { ffc123a0: 83 fe 00 04 lwz r31,4(r30) ffc123a4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc123a8: 41 9e 01 38 beq- cr7,ffc124e0 <_RBTree_Extract_unprotected+0x180> ffc123ac: 80 1e 00 08 lwz r0,8(r30) ffc123b0: 2f 80 00 00 cmpwi cr7,r0,0 ffc123b4: 40 be 00 0c bne+ cr7,ffc123c0 <_RBTree_Extract_unprotected+0x60> ffc123b8: 48 00 01 54 b ffc1250c <_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]; ffc123bc: 7c 1f 03 78 mr r31,r0 ffc123c0: 80 1f 00 08 lwz r0,8(r31) ffc123c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc123c8: 40 9e ff f4 bne+ cr7,ffc123bc <_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]; ffc123cc: 83 bf 00 04 lwz r29,4(r31) if(leaf) { ffc123d0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc123d4: 41 9e 01 a0 beq- cr7,ffc12574 <_RBTree_Extract_unprotected+0x214> leaf->parent = target->parent; ffc123d8: 80 1f 00 00 lwz r0,0(r31) ffc123dc: 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]; ffc123e0: 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]; ffc123e4: 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]; ffc123e8: 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; ffc123ec: 81 3f 00 0c lwz r9,12(r31) dir = target != target->parent->child[0]; ffc123f0: 7f e0 02 78 xor r0,r31,r0 ffc123f4: 7c 00 00 34 cntlzw r0,r0 ffc123f8: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc123fc: 68 00 00 01 xori r0,r0,1 target->parent->child[dir] = leaf; ffc12400: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc12404: 7d 4a 02 14 add r10,r10,r0 ffc12408: 93 aa 00 04 stw r29,4(r10) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; ffc1240c: 80 0b 00 04 lwz r0,4(r11) ffc12410: 7f c0 02 78 xor r0,r30,r0 ffc12414: 7c 00 00 34 cntlzw r0,r0 ffc12418: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc1241c: 68 00 00 01 xori r0,r0,1 the_node->parent->child[dir] = target; ffc12420: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc12424: 7d 6b 02 14 add r11,r11,r0 ffc12428: 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]; ffc1242c: 80 1e 00 08 lwz r0,8(r30) ffc12430: 90 1f 00 08 stw r0,8(r31) if (the_node->child[RBT_RIGHT]) ffc12434: 81 7e 00 08 lwz r11,8(r30) ffc12438: 2f 8b 00 00 cmpwi cr7,r11,0 ffc1243c: 41 9e 00 08 beq- cr7,ffc12444 <_RBTree_Extract_unprotected+0xe4><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; ffc12440: 93 eb 00 00 stw r31,0(r11) target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; ffc12444: 80 1e 00 04 lwz r0,4(r30) ffc12448: 90 1f 00 04 stw r0,4(r31) if (the_node->child[RBT_LEFT]) ffc1244c: 81 7e 00 04 lwz r11,4(r30) ffc12450: 2f 8b 00 00 cmpwi cr7,r11,0 ffc12454: 41 9e 00 08 beq- cr7,ffc1245c <_RBTree_Extract_unprotected+0xfc> the_node->child[RBT_LEFT]->parent = target; ffc12458: 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; ffc1245c: 81 7e 00 00 lwz r11,0(r30) target->color = the_node->color; ffc12460: 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; ffc12464: 91 7f 00 00 stw r11,0(r31) target->color = the_node->color; ffc12468: 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 */ ffc1246c: 2f 89 00 00 cmpwi cr7,r9,0 ffc12470: 41 9e 00 44 beq- cr7,ffc124b4 <_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; ffc12474: 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; ffc12478: 38 00 00 00 li r0,0 ffc1247c: 90 1e 00 08 stw r0,8(r30) ffc12480: 2f 89 00 00 cmpwi cr7,r9,0 ffc12484: 90 1e 00 04 stw r0,4(r30) ffc12488: 90 1e 00 00 stw r0,0(r30) ffc1248c: 41 9e 00 08 beq- cr7,ffc12494 <_RBTree_Extract_unprotected+0x134> ffc12490: 90 09 00 0c stw r0,12(r9) } ffc12494: 80 01 00 1c lwz r0,28(r1) ffc12498: 83 81 00 08 lwz r28,8(r1) ffc1249c: 7c 08 03 a6 mtlr r0 ffc124a0: 83 a1 00 0c lwz r29,12(r1) ffc124a4: 83 c1 00 10 lwz r30,16(r1) ffc124a8: 83 e1 00 14 lwz r31,20(r1) ffc124ac: 38 21 00 18 addi r1,r1,24 ffc124b0: 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) { ffc124b4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc124b8: 41 be ff bc beq- cr7,ffc12474 <_RBTree_Extract_unprotected+0x114> leaf->color = RBT_BLACK; /* case 2 */ ffc124bc: 91 3d 00 0c stw r9,12(r29) ffc124c0: 4b ff ff b4 b ffc12474 <_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]) ffc124c4: 80 1e 00 04 lwz r0,4(r30) ffc124c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc124cc: 41 9e 00 90 beq- cr7,ffc1255c <_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; ffc124d0: 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]) { ffc124d4: 83 fe 00 04 lwz r31,4(r30) ffc124d8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc124dc: 40 9e fe d0 bne+ cr7,ffc123ac <_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]; ffc124e0: 83 be 00 08 lwz r29,8(r30) if( leaf ) { ffc124e4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc124e8: 40 be 00 28 bne+ cr7,ffc12510 <_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); ffc124ec: 7f c3 f3 78 mr r3,r30 ffc124f0: 4b ff fb 75 bl ffc12064 <_RBTree_Extract_validate_unprotected> ffc124f4: 48 00 00 24 b ffc12518 <_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]) ffc124f8: 80 1e 00 08 lwz r0,8(r30) ffc124fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc12500: 41 9e 00 44 beq- cr7,ffc12544 <_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; ffc12504: 90 1c 00 08 stw r0,8(r28) ffc12508: 4b ff fe 8c b ffc12394 <_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]) { ffc1250c: 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; ffc12510: 80 1e 00 00 lwz r0,0(r30) ffc12514: 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]; ffc12518: 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; ffc1251c: 81 3e 00 0c lwz r9,12(r30) /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; ffc12520: 80 0b 00 04 lwz r0,4(r11) ffc12524: 7f c0 02 78 xor r0,r30,r0 ffc12528: 7c 00 00 34 cntlzw r0,r0 ffc1252c: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc12530: 68 00 00 01 xori r0,r0,1 the_node->parent->child[dir] = leaf; ffc12534: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc12538: 7d 6b 02 14 add r11,r11,r0 ffc1253c: 93 ab 00 04 stw r29,4(r11) ffc12540: 4b ff ff 2c b ffc1246c <_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; ffc12544: 81 3e 00 00 lwz r9,0(r30) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc12548: 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; ffc1254c: 91 23 00 08 stw r9,8(r3) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc12550: 40 9e fe 44 bne+ cr7,ffc12394 <_RBTree_Extract_unprotected+0x34> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; ffc12554: 90 1c 00 08 stw r0,8(r28) ffc12558: 4b ff fe 3c b ffc12394 <_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; ffc1255c: 81 3e 00 00 lwz r9,0(r30) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc12560: 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; ffc12564: 91 3c 00 0c stw r9,12(r28) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc12568: 40 9e fe 38 bne+ cr7,ffc123a0 <_RBTree_Extract_unprotected+0x40> the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; ffc1256c: 90 1c 00 0c stw r0,12(r28) ffc12570: 4b ff ff 64 b ffc124d4 <_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); ffc12574: 7f e3 fb 78 mr r3,r31 ffc12578: 4b ff fa ed bl ffc12064 <_RBTree_Extract_validate_unprotected> ffc1257c: 4b ff fe 64 b ffc123e0 <_RBTree_Extract_unprotected+0x80> =============================================================================== ffc12064 <_RBTree_Extract_validate_unprotected>: ) { RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; ffc12064: 81 23 00 00 lwz r9,0(r3) if(!parent->parent) return; ffc12068: 80 09 00 00 lwz r0,0(r9) ffc1206c: 2f 80 00 00 cmpwi cr7,r0,0 ffc12070: 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]) ffc12074: 81 69 00 04 lwz r11,4(r9) ffc12078: 7f 83 58 00 cmpw cr7,r3,r11 ffc1207c: 41 9e 02 dc beq- cr7,ffc12358 <_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; ffc12080: 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; ffc12084: 38 e0 00 01 li r7,1 ffc12088: 48 00 00 94 b ffc1211c <_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) { ffc1208c: 81 49 00 00 lwz r10,0(r9) ffc12090: 2f 8a 00 00 cmpwi cr7,r10,0 ffc12094: 41 9e 00 94 beq- cr7,ffc12128 <_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); ffc12098: 2f 8b 00 00 cmpwi cr7,r11,0 ffc1209c: 41 9e 00 10 beq- cr7,ffc120ac <_RBTree_Extract_validate_unprotected+0x48><== NEVER TAKEN ffc120a0: 80 0b 00 0c lwz r0,12(r11) ffc120a4: 2f 80 00 01 cmpwi cr7,r0,1 ffc120a8: 41 9e 00 98 beq- cr7,ffc12140 <_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]) && ffc120ac: 81 4b 00 08 lwz r10,8(r11) ffc120b0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc120b4: 41 9e 00 10 beq- cr7,ffc120c4 <_RBTree_Extract_validate_unprotected+0x60> ffc120b8: 80 0a 00 0c lwz r0,12(r10) ffc120bc: 2f 80 00 01 cmpwi cr7,r0,1 ffc120c0: 41 9e 01 40 beq- cr7,ffc12200 <_RBTree_Extract_validate_unprotected+0x19c> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { ffc120c4: 81 4b 00 04 lwz r10,4(r11) ffc120c8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc120cc: 41 9e 00 10 beq- cr7,ffc120dc <_RBTree_Extract_validate_unprotected+0x78> ffc120d0: 80 0a 00 0c lwz r0,12(r10) ffc120d4: 2f 80 00 01 cmpwi cr7,r0,1 ffc120d8: 41 9e 01 28 beq- cr7,ffc12200 <_RBTree_Extract_validate_unprotected+0x19c> sibling->color = RBT_RED; ffc120dc: 90 eb 00 0c stw r7,12(r11) ffc120e0: 80 09 00 0c lwz r0,12(r9) ffc120e4: 2f 80 00 01 cmpwi cr7,r0,1 ffc120e8: 41 9e 00 f4 beq- cr7,ffc121dc <_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; ffc120ec: 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; ffc120f0: 39 60 00 00 li r11,0 ffc120f4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc120f8: 41 9e 00 1c beq- cr7,ffc12114 <_RBTree_Extract_validate_unprotected+0xb0><== NEVER TAKEN if(!(the_node->parent->parent)) return NULL; ffc120fc: 80 0a 00 00 lwz r0,0(r10) ffc12100: 2f 80 00 00 cmpwi cr7,r0,0 ffc12104: 41 9e 00 10 beq- cr7,ffc12114 <_RBTree_Extract_validate_unprotected+0xb0> if(the_node == the_node->parent->child[RBT_LEFT]) ffc12108: 81 6a 00 04 lwz r11,4(r10) ffc1210c: 7f 89 58 00 cmpw cr7,r9,r11 ffc12110: 41 9e 00 e8 beq- cr7,ffc121f8 <_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; ffc12114: 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; ffc12118: 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); ffc1211c: 80 03 00 0c lwz r0,12(r3) ffc12120: 2f 80 00 01 cmpwi cr7,r0,1 ffc12124: 40 9e ff 68 bne+ cr7,ffc1208c <_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; ffc12128: 81 23 00 00 lwz r9,0(r3) ffc1212c: 80 09 00 00 lwz r0,0(r9) ffc12130: 2f 80 00 00 cmpwi cr7,r0,0 ffc12134: 4c be 00 20 bnelr+ cr7 ffc12138: 90 03 00 0c stw r0,12(r3) ffc1213c: 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]; ffc12140: 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; ffc12144: 90 09 00 0c stw r0,12(r9) sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; ffc12148: 7c 60 42 78 xor r0,r3,r8 ffc1214c: 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; ffc12150: 90 8b 00 0c stw r4,12(r11) dir = the_node != parent->child[0]; ffc12154: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc12158: 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; ffc1215c: 20 c0 00 01 subfic r6,r0,1 ffc12160: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc12164: 7c c9 32 14 add r6,r9,r6 ffc12168: 81 06 00 04 lwz r8,4(r6) ffc1216c: 2f 88 00 00 cmpwi cr7,r8,0 ffc12170: 41 9e 00 58 beq- cr7,ffc121c8 <_RBTree_Extract_validate_unprotected+0x164><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc12174: 54 0b 10 3a rlwinm r11,r0,2,0,29 ffc12178: 7c a8 5a 14 add r5,r8,r11 ffc1217c: 81 85 00 04 lwz r12,4(r5) ffc12180: 91 86 00 04 stw r12,4(r6) if (c->child[dir]) ffc12184: 80 c5 00 04 lwz r6,4(r5) ffc12188: 2f 86 00 00 cmpwi cr7,r6,0 ffc1218c: 41 9e 00 0c beq- cr7,ffc12198 <_RBTree_Extract_validate_unprotected+0x134><== NEVER TAKEN c->child[dir]->parent = the_node; ffc12190: 91 26 00 00 stw r9,0(r6) ffc12194: 81 49 00 00 lwz r10,0(r9) c->child[dir] = the_node; ffc12198: 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; ffc1219c: 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; ffc121a0: 91 2b 00 04 stw r9,4(r11) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc121a4: 81 6a 00 04 lwz r11,4(r10) c->parent = the_node->parent; the_node->parent = c; ffc121a8: 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; ffc121ac: 7d 2b 5a 78 xor r11,r9,r11 ffc121b0: 7d 6b 00 34 cntlzw r11,r11 ffc121b4: 55 6b d9 7e rlwinm r11,r11,27,5,31 ffc121b8: 69 6b 00 01 xori r11,r11,1 ffc121bc: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc121c0: 7d 4a 5a 14 add r10,r10,r11 ffc121c4: 91 0a 00 04 stw r8,4(r10) _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; ffc121c8: 68 00 00 01 xori r0,r0,1 ffc121cc: 54 0b 10 3a rlwinm r11,r0,2,0,29 ffc121d0: 7d 69 5a 14 add r11,r9,r11 ffc121d4: 81 6b 00 04 lwz r11,4(r11) ffc121d8: 4b ff fe d4 b ffc120ac <_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; ffc121dc: 38 00 00 00 li r0,0 ffc121e0: 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; ffc121e4: 81 23 00 00 lwz r9,0(r3) ffc121e8: 80 09 00 00 lwz r0,0(r9) ffc121ec: 2f 80 00 00 cmpwi cr7,r0,0 ffc121f0: 4c be 00 20 bnelr+ cr7 ffc121f4: 4b ff ff 44 b ffc12138 <_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]; ffc121f8: 81 6a 00 08 lwz r11,8(r10) ffc121fc: 4b ff ff 18 b ffc12114 <_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]; ffc12200: 80 09 00 04 lwz r0,4(r9) ffc12204: 7c 60 02 78 xor r0,r3,r0 ffc12208: 7c 00 00 34 cntlzw r0,r0 ffc1220c: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc12210: 68 00 00 01 xori r0,r0,1 if (!_RBTree_Is_red(sibling->child[!dir])) { ffc12214: 68 0a 00 01 xori r10,r0,1 ffc12218: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc1221c: 7d 0b 52 14 add r8,r11,r10 ffc12220: 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); ffc12224: 2f 88 00 00 cmpwi cr7,r8,0 ffc12228: 41 9e 00 10 beq- cr7,ffc12238 <_RBTree_Extract_validate_unprotected+0x1d4> ffc1222c: 80 e8 00 0c lwz r7,12(r8) ffc12230: 2f 87 00 01 cmpwi cr7,r7,1 ffc12234: 41 9e 00 a0 beq- cr7,ffc122d4 <_RBTree_Extract_validate_unprotected+0x270> sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); ffc12238: 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; ffc1223c: 20 e6 00 01 subfic r7,r6,1 ffc12240: 54 e7 10 3a rlwinm r7,r7,2,0,29 ffc12244: 7c eb 3a 14 add r7,r11,r7 ffc12248: 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; ffc1224c: 54 05 10 3a rlwinm r5,r0,2,0,29 ffc12250: 7c ab 2a 14 add r5,r11,r5 ffc12254: 2f 88 00 00 cmpwi cr7,r8,0 ffc12258: 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; ffc1225c: 38 80 00 01 li r4,1 ffc12260: 90 8b 00 0c stw r4,12(r11) sibling->child[dir]->color = RBT_BLACK; ffc12264: 38 80 00 00 li r4,0 ffc12268: 90 85 00 0c stw r4,12(r5) ffc1226c: 41 9e 00 58 beq- cr7,ffc122c4 <_RBTree_Extract_validate_unprotected+0x260><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc12270: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc12274: 7c a8 32 14 add r5,r8,r6 ffc12278: 80 85 00 04 lwz r4,4(r5) ffc1227c: 90 87 00 04 stw r4,4(r7) if (c->child[dir]) ffc12280: 80 e5 00 04 lwz r7,4(r5) ffc12284: 2f 87 00 00 cmpwi cr7,r7,0 ffc12288: 41 9e 00 08 beq- cr7,ffc12290 <_RBTree_Extract_validate_unprotected+0x22c> c->child[dir]->parent = the_node; ffc1228c: 91 67 00 00 stw r11,0(r7) c->child[dir] = the_node; ffc12290: 7c e8 32 14 add r7,r8,r6 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc12294: 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; ffc12298: 91 67 00 04 stw r11,4(r7) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc1229c: 80 e6 00 04 lwz r7,4(r6) c->parent = the_node->parent; ffc122a0: 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; ffc122a4: 7d 67 3a 78 xor r7,r11,r7 ffc122a8: 7c e7 00 34 cntlzw r7,r7 c->parent = the_node->parent; the_node->parent = c; ffc122ac: 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; ffc122b0: 54 e7 d9 7e rlwinm r7,r7,27,5,31 ffc122b4: 68 e7 00 01 xori r7,r7,1 ffc122b8: 54 e7 10 3a rlwinm r7,r7,2,0,29 ffc122bc: 7c c6 3a 14 add r6,r6,r7 ffc122c0: 91 06 00 04 stw r8,4(r6) _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; ffc122c4: 7d 69 52 14 add r11,r9,r10 ffc122c8: 81 6b 00 04 lwz r11,4(r11) ffc122cc: 7d 4b 52 14 add r10,r11,r10 ffc122d0: 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; ffc122d4: 20 c0 00 01 subfic r6,r0,1 } sibling->color = parent->color; ffc122d8: 80 a9 00 0c lwz r5,12(r9) ffc122dc: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc122e0: 7c c9 32 14 add r6,r9,r6 ffc122e4: 90 ab 00 0c stw r5,12(r11) parent->color = RBT_BLACK; ffc122e8: 38 e0 00 00 li r7,0 ffc122ec: 81 46 00 04 lwz r10,4(r6) ffc122f0: 90 e9 00 0c stw r7,12(r9) ffc122f4: 2f 8a 00 00 cmpwi cr7,r10,0 sibling->child[!dir]->color = RBT_BLACK; ffc122f8: 90 e8 00 0c stw r7,12(r8) ffc122fc: 41 be fe 2c beq- cr7,ffc12128 <_RBTree_Extract_validate_unprotected+0xc4><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc12300: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc12304: 7d 6a 02 14 add r11,r10,r0 ffc12308: 81 0b 00 04 lwz r8,4(r11) ffc1230c: 91 06 00 04 stw r8,4(r6) if (c->child[dir]) ffc12310: 81 6b 00 04 lwz r11,4(r11) ffc12314: 2f 8b 00 00 cmpwi cr7,r11,0 ffc12318: 41 9e 00 08 beq- cr7,ffc12320 <_RBTree_Extract_validate_unprotected+0x2bc> c->child[dir]->parent = the_node; ffc1231c: 91 2b 00 00 stw r9,0(r11) c->child[dir] = the_node; ffc12320: 7d 0a 02 14 add r8,r10,r0 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc12324: 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; ffc12328: 91 28 00 04 stw r9,4(r8) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc1232c: 80 0b 00 04 lwz r0,4(r11) c->parent = the_node->parent; ffc12330: 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; ffc12334: 7d 20 02 78 xor r0,r9,r0 ffc12338: 7c 00 00 34 cntlzw r0,r0 c->parent = the_node->parent; the_node->parent = c; ffc1233c: 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; ffc12340: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc12344: 68 00 00 01 xori r0,r0,1 ffc12348: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc1234c: 7d 6b 02 14 add r11,r11,r0 ffc12350: 91 4b 00 04 stw r10,4(r11) ffc12354: 4b ff fd d4 b ffc12128 <_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]; ffc12358: 81 69 00 08 lwz r11,8(r9) ffc1235c: 4b ff fd 24 b ffc12080 <_RBTree_Extract_validate_unprotected+0x1c> =============================================================================== ffc0c818 <_RBTree_Find>: RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { ffc0c818: 94 21 ff e0 stwu r1,-32(r1) ffc0c81c: 7c 08 02 a6 mflr r0 ffc0c820: 90 01 00 24 stw r0,36(r1) ffc0c824: 93 a1 00 14 stw r29,20(r1) ffc0c828: 7c 9d 23 78 mr r29,r4 ffc0c82c: 93 c1 00 18 stw r30,24(r1) ffc0c830: 7c 7e 1b 78 mr r30,r3 ffc0c834: 93 61 00 0c stw r27,12(r1) ffc0c838: 93 81 00 10 stw r28,16(r1) ffc0c83c: 93 e1 00 1c stw r31,28(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c840: 7f 60 00 a6 mfmsr r27 ffc0c844: 7c 10 42 a6 mfsprg r0,0 ffc0c848: 7f 60 00 78 andc r0,r27,r0 ffc0c84c: 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; ffc0c850: 83 e3 00 04 lwz r31,4(r3) RBTree_Node* found = NULL; ffc0c854: 3b 80 00 00 li r28,0 int compare_result; while (iter_node) { ffc0c858: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0c85c: 41 9e 00 50 beq- cr7,ffc0c8ac <_RBTree_Find+0x94> <== NEVER TAKEN compare_result = the_rbtree->compare_function(the_node, iter_node); ffc0c860: 80 1e 00 10 lwz r0,16(r30) ffc0c864: 7f e4 fb 78 mr r4,r31 ffc0c868: 7f a3 eb 78 mr r3,r29 ffc0c86c: 7c 09 03 a6 mtctr r0 ffc0c870: 4e 80 04 21 bctrl if (compare_result == 0) { ffc0c874: 2c 03 00 00 cmpwi r3,0 found = iter_node; if ( the_rbtree->is_unique ) break; } RBTree_Direction dir = (compare_result == 1); ffc0c878: 68 63 00 01 xori r3,r3,1 ffc0c87c: 7c 63 00 34 cntlzw r3,r3 ffc0c880: 54 63 d9 7e rlwinm r3,r3,27,5,31 iter_node = iter_node->child[dir]; ffc0c884: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0c888: 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) { ffc0c88c: 40 82 00 14 bne- ffc0c8a0 <_RBTree_Find+0x88> found = iter_node; if ( the_rbtree->is_unique ) ffc0c890: 88 1e 00 14 lbz r0,20(r30) ffc0c894: 7f fc fb 78 mr r28,r31 ffc0c898: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c89c: 40 9e 00 3c bne- cr7,ffc0c8d8 <_RBTree_Find+0xc0> break; } RBTree_Direction dir = (compare_result == 1); iter_node = iter_node->child[dir]; ffc0c8a0: 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) { ffc0c8a4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0c8a8: 40 9e ff b8 bne+ cr7,ffc0c860 <_RBTree_Find+0x48> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c8ac: 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; } ffc0c8b0: 80 01 00 24 lwz r0,36(r1) ffc0c8b4: 7f 83 e3 78 mr r3,r28 ffc0c8b8: 83 61 00 0c lwz r27,12(r1) ffc0c8bc: 7c 08 03 a6 mtlr r0 ffc0c8c0: 83 81 00 10 lwz r28,16(r1) ffc0c8c4: 83 a1 00 14 lwz r29,20(r1) ffc0c8c8: 83 c1 00 18 lwz r30,24(r1) ffc0c8cc: 83 e1 00 1c lwz r31,28(r1) ffc0c8d0: 38 21 00 20 addi r1,r1,32 ffc0c8d4: 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 ) ffc0c8d8: 7f fc fb 78 mr r28,r31 ffc0c8dc: 7f 60 01 24 mtmsr r27 ffc0c8e0: 80 01 00 24 lwz r0,36(r1) ffc0c8e4: 7f 83 e3 78 mr r3,r28 ffc0c8e8: 83 61 00 0c lwz r27,12(r1) ffc0c8ec: 7c 08 03 a6 mtlr r0 ffc0c8f0: 83 81 00 10 lwz r28,16(r1) ffc0c8f4: 83 a1 00 14 lwz r29,20(r1) ffc0c8f8: 83 c1 00 18 lwz r30,24(r1) ffc0c8fc: 83 e1 00 1c lwz r31,28(r1) ffc0c900: 38 21 00 20 addi r1,r1,32 ffc0c904: 4e 80 00 20 blr =============================================================================== ffc0cc74 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { ffc0cc74: 94 21 ff e0 stwu r1,-32(r1) ffc0cc78: 7c 08 02 a6 mflr r0 ffc0cc7c: 93 e1 00 1c stw r31,28(r1) size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; ffc0cc80: 7c 7f 1b 79 mr. r31,r3 void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { ffc0cc84: 93 c1 00 18 stw r30,24(r1) ffc0cc88: 7c fe 3b 78 mr r30,r7 ffc0cc8c: 90 01 00 24 stw r0,36(r1) ffc0cc90: 93 a1 00 14 stw r29,20(r1) ffc0cc94: 90 c1 00 08 stw r6,8(r1) size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; ffc0cc98: 41 82 00 4c beq- ffc0cce4 <_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-- ) { ffc0cc9c: 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; ffc0cca0: 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; ffc0cca4: 38 00 00 00 li r0,0 ffc0cca8: 90 1f 00 00 stw r0,0(r31) the_rbtree->root = NULL; ffc0ccac: 90 1f 00 04 stw r0,4(r31) the_rbtree->first[0] = NULL; ffc0ccb0: 90 1f 00 08 stw r0,8(r31) the_rbtree->first[1] = NULL; ffc0ccb4: 90 1f 00 0c stw r0,12(r31) the_rbtree->compare_function = compare_function; the_rbtree->is_unique = is_unique; ffc0ccb8: 99 1f 00 14 stb r8,20(r31) ffc0ccbc: 41 9e 00 28 beq- cr7,ffc0cce4 <_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; ffc0ccc0: 7c bd 2b 78 mr r29,r5 while ( count-- ) { _RBTree_Insert(the_rbtree, next); ffc0ccc4: 7f a4 eb 78 mr r4,r29 ffc0ccc8: 7f e3 fb 78 mr r3,r31 ffc0cccc: 4b ff ff 95 bl ffc0cc60 <_RBTree_Insert> /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { ffc0ccd0: 80 01 00 08 lwz r0,8(r1) * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( ffc0ccd4: 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-- ) { ffc0ccd8: 35 20 ff ff addic. r9,r0,-1 ffc0ccdc: 91 21 00 08 stw r9,8(r1) ffc0cce0: 40 82 ff e4 bne+ ffc0ccc4 <_RBTree_Initialize+0x50> _RBTree_Insert(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } ffc0cce4: 80 01 00 24 lwz r0,36(r1) ffc0cce8: 83 a1 00 14 lwz r29,20(r1) ffc0ccec: 7c 08 03 a6 mtlr r0 ffc0ccf0: 83 c1 00 18 lwz r30,24(r1) ffc0ccf4: 83 e1 00 1c lwz r31,28(r1) ffc0ccf8: 38 21 00 20 addi r1,r1,32 ffc0ccfc: 4e 80 00 20 blr =============================================================================== ffc125bc <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { ffc125bc: 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; ffc125c0: 38 a0 00 00 li r5,0 g->color = RBT_RED; ffc125c4: 39 80 00 01 li r12,1 * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { ffc125c8: 93 e1 00 0c stw r31,12(r1) ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } ffc125cc: 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; ffc125d0: 81 69 00 00 lwz r11,0(r9) ffc125d4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc125d8: 7d 68 5b 78 mr r8,r11 ffc125dc: 41 9e 01 70 beq- cr7,ffc1274c <_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); ffc125e0: 80 09 00 0c lwz r0,12(r9) ffc125e4: 2f 80 00 01 cmpwi cr7,r0,1 ffc125e8: 41 9e 00 10 beq- cr7,ffc125f8 <_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; } ffc125ec: 83 e1 00 0c lwz r31,12(r1) ffc125f0: 38 21 00 10 addi r1,r1,16 ffc125f4: 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; ffc125f8: 80 0b 00 00 lwz r0,0(r11) ffc125fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc12600: 80 0b 00 04 lwz r0,4(r11) ffc12604: 41 9e 00 24 beq- cr7,ffc12628 <_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]) ffc12608: 7f 89 00 00 cmpw cr7,r9,r0 ffc1260c: 7c 0a 03 78 mr r10,r0 ffc12610: 41 9e 01 6c beq- cr7,ffc1277c <_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); ffc12614: 2f 8a 00 00 cmpwi cr7,r10,0 ffc12618: 41 9e 00 10 beq- cr7,ffc12628 <_RBTree_Validate_insert_unprotected+0x6c> ffc1261c: 80 ea 00 0c lwz r7,12(r10) ffc12620: 2f 87 00 01 cmpwi cr7,r7,1 ffc12624: 41 9e 01 38 beq- cr7,ffc1275c <_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]; ffc12628: 81 49 00 04 lwz r10,4(r9) RBTree_Direction pdir = the_node->parent != g->child[0]; ffc1262c: 7d 20 02 78 xor r0,r9,r0 ffc12630: 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]; ffc12634: 7c 6a 52 78 xor r10,r3,r10 ffc12638: 7d 4a 00 34 cntlzw r10,r10 ffc1263c: 55 4a d9 7e rlwinm r10,r10,27,5,31 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc12640: 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]; ffc12644: 69 4a 00 01 xori r10,r10,1 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc12648: 68 00 00 01 xori r0,r0,1 /* ensure node is on the same branch direction as parent */ if (dir != pdir) { ffc1264c: 7f 8a 00 00 cmpw cr7,r10,r0 ffc12650: 41 9e 01 20 beq- cr7,ffc12770 <_RBTree_Validate_insert_unprotected+0x1b4> RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc12654: 20 c0 00 01 subfic r6,r0,1 ffc12658: 54 ca 10 3a rlwinm r10,r6,2,0,29 ffc1265c: 7d 49 52 14 add r10,r9,r10 ffc12660: 80 ea 00 04 lwz r7,4(r10) ffc12664: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc12668: 2f 87 00 00 cmpwi cr7,r7,0 ffc1266c: 41 9e 00 54 beq- cr7,ffc126c0 <_RBTree_Validate_insert_unprotected+0x104><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc12670: 7c 87 02 14 add r4,r7,r0 ffc12674: 83 e4 00 04 lwz r31,4(r4) ffc12678: 93 ea 00 04 stw r31,4(r10) if (c->child[dir]) ffc1267c: 81 44 00 04 lwz r10,4(r4) ffc12680: 2f 8a 00 00 cmpwi cr7,r10,0 ffc12684: 41 9e 00 0c beq- cr7,ffc12690 <_RBTree_Validate_insert_unprotected+0xd4> c->child[dir]->parent = the_node; ffc12688: 91 2a 00 00 stw r9,0(r10) ffc1268c: 81 69 00 00 lwz r11,0(r9) c->child[dir] = the_node; ffc12690: 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; ffc12694: 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; ffc12698: 91 2a 00 04 stw r9,4(r10) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc1269c: 81 4b 00 04 lwz r10,4(r11) c->parent = the_node->parent; the_node->parent = c; ffc126a0: 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; ffc126a4: 7d 2a 52 78 xor r10,r9,r10 ffc126a8: 7d 4a 00 34 cntlzw r10,r10 ffc126ac: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc126b0: 69 4a 00 01 xori r10,r10,1 ffc126b4: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc126b8: 7d 6b 52 14 add r11,r11,r10 ffc126bc: 90 eb 00 04 stw r7,4(r11) _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; ffc126c0: 7c 63 02 14 add r3,r3,r0 ffc126c4: 80 63 00 04 lwz r3,4(r3) ffc126c8: 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; ffc126cc: 7d 48 02 14 add r10,r8,r0 } the_node->parent->color = RBT_BLACK; ffc126d0: 90 a9 00 0c stw r5,12(r9) ffc126d4: 81 6a 00 04 lwz r11,4(r10) g->color = RBT_RED; ffc126d8: 91 88 00 0c stw r12,12(r8) ffc126dc: 2f 8b 00 00 cmpwi cr7,r11,0 ffc126e0: 41 be fe ec beq- cr7,ffc125cc <_RBTree_Validate_insert_unprotected+0x10><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc126e4: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc126e8: 7d 2b 32 14 add r9,r11,r6 ffc126ec: 80 09 00 04 lwz r0,4(r9) ffc126f0: 90 0a 00 04 stw r0,4(r10) if (c->child[dir]) ffc126f4: 81 29 00 04 lwz r9,4(r9) ffc126f8: 2f 89 00 00 cmpwi cr7,r9,0 ffc126fc: 41 9e 00 08 beq- cr7,ffc12704 <_RBTree_Validate_insert_unprotected+0x148> c->child[dir]->parent = the_node; ffc12700: 91 09 00 00 stw r8,0(r9) c->child[dir] = the_node; ffc12704: 7c cb 32 14 add r6,r11,r6 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc12708: 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; ffc1270c: 91 06 00 04 stw r8,4(r6) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc12710: 80 09 00 04 lwz r0,4(r9) c->parent = the_node->parent; ffc12714: 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; ffc12718: 7d 00 02 78 xor r0,r8,r0 ffc1271c: 7c 00 00 34 cntlzw r0,r0 c->parent = the_node->parent; the_node->parent = c; ffc12720: 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; ffc12724: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc12728: 68 00 00 01 xori r0,r0,1 ffc1272c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc12730: 7d 29 02 14 add r9,r9,r0 ffc12734: 91 69 00 04 stw r11,4(r9) ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } ffc12738: 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; ffc1273c: 81 69 00 00 lwz r11,0(r9) ffc12740: 2f 8b 00 00 cmpwi cr7,r11,0 ffc12744: 7d 68 5b 78 mr r8,r11 ffc12748: 40 9e fe 98 bne+ cr7,ffc125e0 <_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; } ffc1274c: 83 e1 00 0c lwz r31,12(r1) ffc12750: 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; ffc12754: 91 63 00 0c stw r11,12(r3) } ffc12758: 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; ffc1275c: 90 a9 00 0c stw r5,12(r9) u->color = RBT_BLACK; g->color = RBT_RED; ffc12760: 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; ffc12764: 90 aa 00 0c stw r5,12(r10) g->color = RBT_RED; ffc12768: 90 eb 00 0c stw r7,12(r11) ffc1276c: 4b ff fe 60 b ffc125cc <_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) { ffc12770: 20 ca 00 01 subfic r6,r10,1 ffc12774: 55 40 10 3a rlwinm r0,r10,2,0,29 ffc12778: 4b ff ff 54 b ffc126cc <_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]; ffc1277c: 81 4b 00 08 lwz r10,8(r11) ffc12780: 4b ff fe 94 b ffc12614 <_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 14 31 bl ffc0adc0 <_Internal_error_Occurred> =============================================================================== ffc10958 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; ffc10958: 81 23 01 3c lwz r9,316(r3) while (tvp) { ffc1095c: 2f 89 00 00 cmpwi cr7,r9,0 ffc10960: 41 9e 00 24 beq- cr7,ffc10984 <_RTEMS_tasks_Switch_extension+0x2c> tvp->tval = *tvp->ptr; ffc10964: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->gval; ffc10968: 80 09 00 08 lwz r0,8(r9) * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; ffc1096c: 81 4b 00 00 lwz r10,0(r11) ffc10970: 91 49 00 0c stw r10,12(r9) *tvp->ptr = tvp->gval; ffc10974: 90 0b 00 00 stw r0,0(r11) tvp = (rtems_task_variable_t *)tvp->next; ffc10978: 81 29 00 00 lwz r9,0(r9) /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { ffc1097c: 2f 89 00 00 cmpwi cr7,r9,0 ffc10980: 40 9e ff e4 bne+ cr7,ffc10964 <_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; ffc10984: 81 24 01 3c lwz r9,316(r4) while (tvp) { ffc10988: 2f 89 00 00 cmpwi cr7,r9,0 ffc1098c: 4d 9e 00 20 beqlr cr7 tvp->gval = *tvp->ptr; ffc10990: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->tval; ffc10994: 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; ffc10998: 81 4b 00 00 lwz r10,0(r11) ffc1099c: 91 49 00 08 stw r10,8(r9) *tvp->ptr = tvp->tval; ffc109a0: 90 0b 00 00 stw r0,0(r11) tvp = (rtems_task_variable_t *)tvp->next; ffc109a4: 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) { ffc109a8: 2f 89 00 00 cmpwi cr7,r9,0 ffc109ac: 40 9e ff e4 bne+ cr7,ffc10990 <_RTEMS_tasks_Switch_extension+0x38><== NEVER TAKEN ffc109b0: 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 98 addi r3,r3,11416 ffc0a8e0: 38 a1 00 08 addi r5,r1,8 ffc0a8e4: 93 e1 00 1c stw r31,28(r1) ffc0a8e8: 48 00 28 01 bl ffc0d0e8 <_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 6c lwz r11,10348(r9) ffc0a938: 38 0b ff ff addi r0,r11,-1 ffc0a93c: 90 09 28 6c stw r0,10348(r9) return _Thread_Dispatch_disable_level; ffc0a940: 80 09 28 6c lwz r0,10348(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 2e 68 addi r3,r3,11880 ffc0a978: 38 9f 00 10 addi r4,r31,16 ffc0a97c: 48 00 4c 79 bl ffc0f5f4 <_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 33 b5 bl ffc0dd40 <_Thread_Clear_state> ffc0a990: 4b ff ff d0 b ffc0a960 <_Rate_monotonic_Timeout+0x98> =============================================================================== ffc0c2e8 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { ffc0c2e8: 94 21 ff f0 stwu r1,-16(r1) ffc0c2ec: 7c 08 02 a6 mflr r0 ffc0c2f0: 93 e1 00 0c stw r31,12(r1) ffc0c2f4: 7c 7f 1b 78 mr r31,r3 void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); ffc0c2f8: 38 60 00 18 li r3,24 #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { ffc0c2fc: 90 01 00 14 stw r0,20(r1) void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); ffc0c300: 48 00 25 a9 bl ffc0e8a8 <_Workspace_Allocate> if ( sched ) { ffc0c304: 2c 03 00 00 cmpwi r3,0 ffc0c308: 41 82 00 14 beq- ffc0c31c <_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; ffc0c30c: 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; ffc0c310: 90 7f 00 8c stw r3,140(r31) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; ffc0c314: 93 e3 00 00 stw r31,0(r3) schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; ffc0c318: 90 03 00 14 stw r0,20(r3) } return sched; } ffc0c31c: 80 01 00 14 lwz r0,20(r1) ffc0c320: 83 e1 00 0c lwz r31,12(r1) ffc0c324: 38 21 00 10 addi r1,r1,16 ffc0c328: 7c 08 03 a6 mtlr r0 ffc0c32c: 4e 80 00 20 blr =============================================================================== ffc0c330 <_Scheduler_EDF_Block>: #include void _Scheduler_EDF_Block( Thread_Control *the_thread ) { ffc0c330: 94 21 ff f0 stwu r1,-16(r1) ffc0c334: 7c 08 02 a6 mflr r0 ffc0c338: 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 ); ffc0c33c: 3f c0 00 00 lis r30,0 ffc0c340: 3b de 31 c4 addi r30,r30,12740 ffc0c344: 90 01 00 14 stw r0,20(r1) ffc0c348: 93 e1 00 0c stw r31,12(r1) ffc0c34c: 7c 7f 1b 78 mr r31,r3 _Scheduler_EDF_Extract( the_thread ); ffc0c350: 48 00 00 bd bl ffc0c40c <_Scheduler_EDF_Extract> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) ffc0c354: 80 1e 00 10 lwz r0,16(r30) ffc0c358: 7f 9f 00 00 cmpw cr7,r31,r0 ffc0c35c: 41 9e 00 48 beq- cr7,ffc0c3a4 <_Scheduler_EDF_Block+0x74><== ALWAYS TAKEN _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) ffc0c360: 80 1e 00 0c lwz r0,12(r30) ffc0c364: 7f 9f 00 00 cmpw cr7,r31,r0 ffc0c368: 41 9e 00 1c beq- cr7,ffc0c384 <_Scheduler_EDF_Block+0x54><== ALWAYS TAKEN _Thread_Dispatch_necessary = true; } ffc0c36c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc0c370: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc0c374: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0c378: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc0c37c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0c380: 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; ffc0c384: 38 00 00 01 li r0,1 } ffc0c388: 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; ffc0c38c: 98 1e 00 18 stb r0,24(r30) } ffc0c390: 80 01 00 14 lwz r0,20(r1) ffc0c394: 83 c1 00 08 lwz r30,8(r1) ffc0c398: 38 21 00 10 addi r1,r1,16 ffc0c39c: 7c 08 03 a6 mtlr r0 ffc0c3a0: 4e 80 00 20 blr _Scheduler_EDF_Extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); ffc0c3a4: 48 00 01 fd bl ffc0c5a0 <_Scheduler_EDF_Schedule> ffc0c3a8: 4b ff ff b8 b ffc0c360 <_Scheduler_EDF_Block+0x30> =============================================================================== ffc0c5d8 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { ffc0c5d8: 94 21 ff f0 stwu r1,-16(r1) ffc0c5dc: 7c 08 02 a6 mflr r0 ffc0c5e0: 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( ffc0c5e4: 3f e0 00 00 lis r31,0 ffc0c5e8: 3b ff 31 c4 addi r31,r31,12740 #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { ffc0c5ec: 90 01 00 14 stw r0,20(r1) ffc0c5f0: 93 c1 00 08 stw r30,8(r1) ffc0c5f4: 7c 7e 1b 78 mr r30,r3 _Scheduler_EDF_Enqueue(the_thread); ffc0c5f8: 4b ff fd d5 bl ffc0c3cc <_Scheduler_EDF_Enqueue> ffc0c5fc: 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( ffc0c600: 81 3f 00 10 lwz r9,16(r31) ffc0c604: 80 0b 21 10 lwz r0,8464(r11) ffc0c608: 80 69 00 14 lwz r3,20(r9) ffc0c60c: 80 9e 00 14 lwz r4,20(r30) ffc0c610: 7c 09 03 a6 mtctr r0 ffc0c614: 4e 80 04 21 bctrl ffc0c618: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c61c: 41 9c 00 1c blt- cr7,ffc0c638 <_Scheduler_EDF_Unblock+0x60> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } ffc0c620: 80 01 00 14 lwz r0,20(r1) ffc0c624: 83 c1 00 08 lwz r30,8(r1) ffc0c628: 7c 08 03 a6 mtlr r0 ffc0c62c: 83 e1 00 0c lwz r31,12(r1) ffc0c630: 38 21 00 10 addi r1,r1,16 ffc0c634: 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 || ffc0c638: 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; ffc0c63c: 93 df 00 10 stw r30,16(r31) if ( _Thread_Executing->is_preemptible || ffc0c640: 88 09 00 74 lbz r0,116(r9) ffc0c644: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c648: 41 9e 00 24 beq- cr7,ffc0c66c <_Scheduler_EDF_Unblock+0x94><== NEVER TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0c64c: 38 00 00 01 li r0,1 ffc0c650: 98 1f 00 18 stb r0,24(r31) } } ffc0c654: 80 01 00 14 lwz r0,20(r1) ffc0c658: 83 c1 00 08 lwz r30,8(r1) ffc0c65c: 7c 08 03 a6 mtlr r0 ffc0c660: 83 e1 00 0c lwz r31,12(r1) ffc0c664: 38 21 00 10 addi r1,r1,16 ffc0c668: 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 || ffc0c66c: 80 1e 00 14 lwz r0,20(r30) <== NOT EXECUTED ffc0c670: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0c674: 40 be ff ac bne- cr7,ffc0c620 <_Scheduler_EDF_Unblock+0x48><== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0c678: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0c67c: 98 1f 00 18 stb r0,24(r31) <== NOT EXECUTED ffc0c680: 4b ff ff d4 b ffc0c654 <_Scheduler_EDF_Unblock+0x7c> <== NOT EXECUTED =============================================================================== ffc0c684 <_Scheduler_EDF_Update>: #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { ffc0c684: 94 21 ff e8 stwu r1,-24(r1) ffc0c688: 7c 08 02 a6 mflr r0 ffc0c68c: 90 01 00 1c stw r0,28(r1) ffc0c690: 93 c1 00 10 stw r30,16(r1) Scheduler_EDF_Per_thread *sched_info = ffc0c694: 83 c3 00 8c lwz r30,140(r3) #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { ffc0c698: 93 e1 00 14 stw r31,20(r1) ffc0c69c: 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) { ffc0c6a0: 80 1e 00 14 lwz r0,20(r30) #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { ffc0c6a4: 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) { ffc0c6a8: 2f 80 00 02 cmpwi cr7,r0,2 ffc0c6ac: 41 9e 00 28 beq- cr7,ffc0c6d4 <_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 ) { ffc0c6b0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c6b4: 41 9e 00 58 beq- cr7,ffc0c70c <_Scheduler_EDF_Update+0x88><== NEVER TAKEN if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } ffc0c6b8: 80 01 00 1c lwz r0,28(r1) ffc0c6bc: 83 a1 00 0c lwz r29,12(r1) ffc0c6c0: 7c 08 03 a6 mtlr r0 ffc0c6c4: 83 c1 00 10 lwz r30,16(r1) ffc0c6c8: 83 e1 00 14 lwz r31,20(r1) ffc0c6cc: 38 21 00 18 addi r1,r1,24 ffc0c6d0: 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); ffc0c6d4: 80 03 00 b0 lwz r0,176(r3) if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } ffc0c6d8: 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); ffc0c6dc: 64 00 80 00 oris r0,r0,32768 if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } ffc0c6e0: 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); ffc0c6e4: 90 03 00 b0 stw r0,176(r3) the_thread->real_priority = the_thread->Start.initial_priority; ffc0c6e8: 90 03 00 18 stw r0,24(r3) the_thread->current_priority = the_thread->Start.initial_priority; ffc0c6ec: 90 03 00 14 stw r0,20(r3) sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; ffc0c6f0: 38 00 00 00 li r0,0 ffc0c6f4: 90 1e 00 14 stw r0,20(r30) if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } ffc0c6f8: 80 01 00 1c lwz r0,28(r1) ffc0c6fc: 83 c1 00 10 lwz r30,16(r1) ffc0c700: 38 21 00 18 addi r1,r1,24 ffc0c704: 7c 08 03 a6 mtlr r0 ffc0c708: 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); ffc0c70c: 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); ffc0c710: 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); ffc0c714: 3b bd 31 e8 addi r29,r29,12776 <== NOT EXECUTED ffc0c718: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0c71c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc0c720: 48 00 5e 61 bl ffc12580 <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert(&_Scheduler_EDF_Ready_queue, the_node); ffc0c724: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc0c728: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0c72c: 48 00 61 91 bl ffc128bc <_RBTree_Insert> <== NOT EXECUTED _Scheduler_EDF_Schedule(); ffc0c730: 4b ff fe 71 bl ffc0c5a0 <_Scheduler_EDF_Schedule> <== NOT EXECUTED if ( _Thread_Executing != _Thread_Heir ) { ffc0c734: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0c738: 39 29 31 c4 addi r9,r9,12740 <== NOT EXECUTED ffc0c73c: 81 69 00 0c lwz r11,12(r9) <== NOT EXECUTED ffc0c740: 80 09 00 10 lwz r0,16(r9) <== NOT EXECUTED ffc0c744: 7f 8b 00 00 cmpw cr7,r11,r0 <== NOT EXECUTED ffc0c748: 41 be ff 70 beq- cr7,ffc0c6b8 <_Scheduler_EDF_Update+0x34><== NOT EXECUTED if ( _Thread_Executing->is_preemptible || ffc0c74c: 88 0b 00 74 lbz r0,116(r11) <== NOT EXECUTED ffc0c750: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0c754: 40 9e 00 10 bne- cr7,ffc0c764 <_Scheduler_EDF_Update+0xe0><== NOT EXECUTED ffc0c758: 80 1f 00 14 lwz r0,20(r31) <== NOT EXECUTED ffc0c75c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0c760: 40 be ff 58 bne- cr7,ffc0c6b8 <_Scheduler_EDF_Update+0x34><== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0c764: 38 00 00 01 li r0,1 <== NOT EXECUTED } } } ffc0c768: 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; ffc0c76c: 98 09 00 18 stb r0,24(r9) <== NOT EXECUTED } } } ffc0c770: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc0c774: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc0c778: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0c77c: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc0c780: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc0c784: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0c788 <_Scheduler_EDF_Yield>: #include #include #include void _Scheduler_EDF_Yield(void) { ffc0c788: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED ffc0c78c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0c790: 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; ffc0c794: 3f c0 00 00 lis r30,0 <== NOT EXECUTED ffc0c798: 3b de 31 c4 addi r30,r30,12740 <== NOT EXECUTED #include #include #include void _Scheduler_EDF_Yield(void) { ffc0c79c: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED ffc0c7a0: 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; ffc0c7a4: 83 be 00 0c lwz r29,12(r30) <== NOT EXECUTED #include #include #include void _Scheduler_EDF_Yield(void) { ffc0c7a8: 93 61 00 0c stw r27,12(r1) <== NOT EXECUTED ffc0c7ac: 93 81 00 10 stw r28,16(r1) <== NOT EXECUTED ffc0c7b0: 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 = ffc0c7b4: 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 ( ffc0c7b8: 7f 80 00 a6 mfmsr r28 <== NOT EXECUTED ffc0c7bc: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc0c7c0: 7f 80 00 78 andc r0,r28,r0 <== NOT EXECUTED ffc0c7c4: 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); ffc0c7c8: 3f e0 00 00 lis r31,0 <== NOT EXECUTED ffc0c7cc: 3b ff 31 e8 addi r31,r31,12776 <== NOT EXECUTED ffc0c7d0: 81 3f 00 04 lwz r9,4(r31) <== NOT EXECUTED ffc0c7d4: 80 09 00 04 lwz r0,4(r9) <== NOT EXECUTED ffc0c7d8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0c7dc: 41 9e 00 68 beq- cr7,ffc0c844 <_Scheduler_EDF_Yield+0xbc><== NOT EXECUTED (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); ffc0c7e0: 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 ); ffc0c7e4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0c7e8: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED ffc0c7ec: 48 00 5d 95 bl ffc12580 <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node ); ffc0c7f0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0c7f4: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED ffc0c7f8: 48 00 60 c5 bl ffc128bc <_RBTree_Insert> <== NOT EXECUTED static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0c7fc: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc0c800: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED ffc0c804: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) { ffc0c808: 80 1e 00 10 lwz r0,16(r30) <== NOT EXECUTED ffc0c80c: 7f 9d 00 00 cmpw cr7,r29,r0 <== NOT EXECUTED ffc0c810: 41 9e 00 50 beq- cr7,ffc0c860 <_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; ffc0c814: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0c818: 98 1e 00 18 stb r0,24(r30) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c81c: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED _ISR_Enable( level ); } ffc0c820: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc0c824: 83 61 00 0c lwz r27,12(r1) <== NOT EXECUTED ffc0c828: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0c82c: 83 81 00 10 lwz r28,16(r1) <== NOT EXECUTED ffc0c830: 83 a1 00 14 lwz r29,20(r1) <== NOT EXECUTED ffc0c834: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc0c838: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc0c83c: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc0c840: 4e 80 00 20 blr <== NOT EXECUTED ffc0c844: 80 09 00 08 lwz r0,8(r9) <== NOT EXECUTED ffc0c848: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0c84c: 40 9e ff 94 bne+ cr7,ffc0c7e0 <_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 ) ) ffc0c850: 80 1e 00 10 lwz r0,16(r30) <== NOT EXECUTED ffc0c854: 7f 9d 00 00 cmpw cr7,r29,r0 <== NOT EXECUTED ffc0c858: 40 9e ff bc bne+ cr7,ffc0c814 <_Scheduler_EDF_Yield+0x8c><== NOT EXECUTED ffc0c85c: 4b ff ff c0 b ffc0c81c <_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 ); ffc0c860: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0c864: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc0c868: 48 00 60 69 bl ffc128d0 <_RBTree_Peek> <== NOT EXECUTED first_info = _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node); _Thread_Heir = first_info->thread; ffc0c86c: 80 03 ff fc lwz r0,-4(r3) <== NOT EXECUTED ffc0c870: 90 1e 00 10 stw r0,16(r30) <== NOT EXECUTED ffc0c874: 4b ff ff a0 b ffc0c814 <_Scheduler_EDF_Yield+0x8c> <== NOT EXECUTED =============================================================================== ffc0b8c0 <_Scheduler_priority_Block>: ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; ffc0b8c0: 81 63 00 8c lwz r11,140(r3) ready = sched_info->ready_chain; ffc0b8c4: 81 2b 00 00 lwz r9,0(r11) if ( _Chain_Has_only_one_node( ready ) ) { ffc0b8c8: 81 49 00 00 lwz r10,0(r9) ffc0b8cc: 80 09 00 08 lwz r0,8(r9) ffc0b8d0: 7f 8a 00 00 cmpw cr7,r10,r0 ffc0b8d4: 41 9e 00 a4 beq- cr7,ffc0b978 <_Scheduler_priority_Block+0xb8> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0b8d8: 81 63 00 00 lwz r11,0(r3) previous = the_node->previous; ffc0b8dc: 81 23 00 04 lwz r9,4(r3) next->previous = previous; ffc0b8e0: 91 2b 00 04 stw r9,4(r11) previous->next = next; ffc0b8e4: 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 ); ffc0b8e8: 3d 20 00 00 lis r9,0 ffc0b8ec: 39 29 31 44 addi r9,r9,12612 { _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) ffc0b8f0: 80 09 00 10 lwz r0,16(r9) ffc0b8f4: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b8f8: 41 9e 00 1c beq- cr7,ffc0b914 <_Scheduler_priority_Block+0x54> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) ffc0b8fc: 80 09 00 0c lwz r0,12(r9) ffc0b900: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b904: 4c be 00 20 bnelr+ cr7 _Thread_Dispatch_necessary = true; ffc0b908: 38 00 00 01 li r0,1 ffc0b90c: 98 09 00 18 stb r0,24(r9) ffc0b910: 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 ); ffc0b914: 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 ffc0b918: 3d 40 00 00 lis r10,0 ffc0b91c: 81 65 28 4c lwz r11,10316(r5) ffc0b920: 81 4a 20 e0 lwz r10,8416(r10) ffc0b924: 7d 66 00 34 cntlzw r6,r11 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b928: 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 ); ffc0b92c: 91 65 28 4c stw r11,10316(r5) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b930: 38 e7 31 80 addi r7,r7,12672 ffc0b934: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0b938: 7c 07 40 2e lwzx r0,r7,r8 ffc0b93c: 7c 0b 00 34 cntlzw r11,r0 return (_Priority_Bits_index( major ) << 4) + ffc0b940: 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 ); ffc0b944: 7c 07 41 2e stwx r0,r7,r8 return (_Priority_Bits_index( major ) << 4) + ffc0b948: 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 ] ) ) ffc0b94c: 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; ffc0b950: 7c 0a 58 2e lwzx r0,r10,r11 ffc0b954: 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 ); ffc0b958: 39 68 00 04 addi r11,r8,4 ffc0b95c: 7f 80 58 00 cmpw cr7,r0,r11 ffc0b960: 41 9e 00 60 beq- cr7,ffc0b9c0 <_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( ffc0b964: 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 ) ) ffc0b968: 80 09 00 0c lwz r0,12(r9) ffc0b96c: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b970: 4c be 00 20 bnelr+ cr7 ffc0b974: 4b ff ff 94 b ffc0b908 <_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; ffc0b978: 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 ); ffc0b97c: 39 09 00 04 addi r8,r9,4 ffc0b980: 80 0b 00 14 lwz r0,20(r11) ffc0b984: 80 ea 00 00 lwz r7,0(r10) head->next = tail; ffc0b988: 91 09 00 00 stw r8,0(r9) head->previous = NULL; ffc0b98c: 39 00 00 00 li r8,0 ffc0b990: 7c e0 00 38 and r0,r7,r0 if ( *the_priority_map->minor == 0 ) ffc0b994: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b998: 91 09 00 04 stw r8,4(r9) tail->previous = head; ffc0b99c: 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; ffc0b9a0: 90 0a 00 00 stw r0,0(r10) if ( *the_priority_map->minor == 0 ) ffc0b9a4: 40 be ff 44 bne- cr7,ffc0b8e8 <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; ffc0b9a8: 3d 20 00 00 lis r9,0 ffc0b9ac: 80 0b 00 10 lwz r0,16(r11) ffc0b9b0: 81 49 28 4c lwz r10,10316(r9) ffc0b9b4: 7d 40 00 38 and r0,r10,r0 ffc0b9b8: 90 09 28 4c stw r0,10316(r9) ffc0b9bc: 4b ff ff 2c b ffc0b8e8 <_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; ffc0b9c0: 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( ffc0b9c4: 90 09 00 10 stw r0,16(r9) <== NOT EXECUTED ffc0b9c8: 4b ff ff a0 b ffc0b968 <_Scheduler_priority_Block+0xa8><== NOT EXECUTED =============================================================================== ffc0bba4 <_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 ); ffc0bba4: 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 ffc0bba8: 3d 60 00 00 lis r11,0 ffc0bbac: 81 26 28 4c lwz r9,10316(r6) ffc0bbb0: 81 6b 20 e0 lwz r11,8416(r11) ffc0bbb4: 7d 27 00 34 cntlzw r7,r9 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0bbb8: 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 ); ffc0bbbc: 91 26 28 4c stw r9,10316(r6) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0bbc0: 39 08 31 80 addi r8,r8,12672 ffc0bbc4: 54 ea 10 3a rlwinm r10,r7,2,0,29 ffc0bbc8: 7c 08 50 2e lwzx r0,r8,r10 ffc0bbcc: 7c 06 00 34 cntlzw r6,r0 return (_Priority_Bits_index( major ) << 4) + ffc0bbd0: 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 ); ffc0bbd4: 7c 08 51 2e stwx r0,r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc0bbd8: 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 ] ) ) ffc0bbdc: 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; ffc0bbe0: 7c 0b 48 2e lwzx r0,r11,r9 ffc0bbe4: 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 ); ffc0bbe8: 39 2a 00 04 addi r9,r10,4 ffc0bbec: 7f 80 48 00 cmpw cr7,r0,r9 ffc0bbf0: 41 9e 00 10 beq- cr7,ffc0bc00 <_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( ffc0bbf4: 3d 20 00 00 lis r9,0 ffc0bbf8: 90 09 31 54 stw r0,12628(r9) #include void _Scheduler_priority_Schedule(void) { _Scheduler_priority_Schedule_body(); } ffc0bbfc: 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; ffc0bc00: 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( ffc0bc04: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0bc08: 90 09 31 54 stw r0,12628(r9) <== NOT EXECUTED ffc0bc0c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0bc10 <_Scheduler_priority_Tick>: #include #include void _Scheduler_priority_Tick( void ) { ffc0bc10: 7c 08 02 a6 mflr r0 ffc0bc14: 94 21 ff f0 stwu r1,-16(r1) Thread_Control *executing; executing = _Thread_Executing; ffc0bc18: 3d 20 00 00 lis r9,0 #include #include void _Scheduler_priority_Tick( void ) { ffc0bc1c: 90 01 00 14 stw r0,20(r1) Thread_Control *executing; executing = _Thread_Executing; ffc0bc20: 80 69 31 50 lwz r3,12624(r9) /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) ffc0bc24: 88 03 00 74 lbz r0,116(r3) ffc0bc28: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bc2c: 41 9e 00 2c beq- cr7,ffc0bc58 <_Scheduler_priority_Tick+0x48> return; if ( !_States_Is_ready( executing->current_state ) ) ffc0bc30: 80 03 00 10 lwz r0,16(r3) ffc0bc34: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bc38: 40 9e 00 20 bne- cr7,ffc0bc58 <_Scheduler_priority_Tick+0x48> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { ffc0bc3c: 80 03 00 7c lwz r0,124(r3) ffc0bc40: 2b 80 00 01 cmplwi cr7,r0,1 ffc0bc44: 41 9c 00 14 blt- cr7,ffc0bc58 <_Scheduler_priority_Tick+0x48> ffc0bc48: 2b 80 00 02 cmplwi cr7,r0,2 ffc0bc4c: 40 9d 00 40 ble- cr7,ffc0bc8c <_Scheduler_priority_Tick+0x7c> ffc0bc50: 2f 80 00 03 cmpwi cr7,r0,3 ffc0bc54: 41 9e 00 14 beq- cr7,ffc0bc68 <_Scheduler_priority_Tick+0x58><== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } ffc0bc58: 80 01 00 14 lwz r0,20(r1) ffc0bc5c: 38 21 00 10 addi r1,r1,16 ffc0bc60: 7c 08 03 a6 mtlr r0 ffc0bc64: 4e 80 00 20 blr } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) ffc0bc68: 81 23 00 78 lwz r9,120(r3) ffc0bc6c: 38 09 ff ff addi r0,r9,-1 ffc0bc70: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bc74: 90 03 00 78 stw r0,120(r3) ffc0bc78: 40 9e ff e0 bne+ cr7,ffc0bc58 <_Scheduler_priority_Tick+0x48> (*executing->budget_callout)( executing ); ffc0bc7c: 80 03 00 80 lwz r0,128(r3) ffc0bc80: 7c 09 03 a6 mtctr r0 ffc0bc84: 4e 80 04 21 bctrl ffc0bc88: 4b ff ff d0 b ffc0bc58 <_Scheduler_priority_Tick+0x48> case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { ffc0bc8c: 81 23 00 78 lwz r9,120(r3) ffc0bc90: 38 09 ff ff addi r0,r9,-1 ffc0bc94: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bc98: 90 03 00 78 stw r0,120(r3) ffc0bc9c: 41 9d ff bc bgt+ cr7,ffc0bc58 <_Scheduler_priority_Tick+0x48> * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); ffc0bca0: 3d 20 00 00 lis r9,0 ffc0bca4: 90 61 00 08 stw r3,8(r1) ffc0bca8: 80 09 20 ec lwz r0,8428(r9) ffc0bcac: 7c 09 03 a6 mtctr r0 ffc0bcb0: 4e 80 04 21 bctrl * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield(); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0bcb4: 3d 20 00 00 lis r9,0 ffc0bcb8: 80 09 28 08 lwz r0,10248(r9) ffc0bcbc: 80 61 00 08 lwz r3,8(r1) ffc0bcc0: 90 03 00 78 stw r0,120(r3) ffc0bcc4: 4b ff ff 94 b ffc0bc58 <_Scheduler_priority_Tick+0x48> =============================================================================== ffc0c5e8 <_Scheduler_simple_Ready_queue_enqueue_first>: { Chain_Control *ready; Chain_Node *the_node; Thread_Control *current; ready = (Chain_Control *)_Scheduler.information; ffc0c5e8: 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 ) { ffc0c5ec: 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; ffc0c5f0: 81 29 20 e0 lwz r9,8416(r9) ffc0c5f4: 81 29 00 00 lwz r9,0(r9) ffc0c5f8: 80 09 00 14 lwz r0,20(r9) ffc0c5fc: 7f 80 58 40 cmplw cr7,r0,r11 ffc0c600: 40 9c 00 14 bge- cr7,ffc0c614 <_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 ) { ffc0c604: 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 ) { ffc0c608: 80 09 00 14 lwz r0,20(r9) ffc0c60c: 7f 80 58 40 cmplw cr7,r0,r11 ffc0c610: 41 9c ff f4 blt+ cr7,ffc0c604 <_Scheduler_simple_Ready_queue_enqueue_first+0x1c><== NEVER TAKEN current = (Thread_Control *)current->Object.Node.previous; ffc0c614: 81 29 00 04 lwz r9,4(r9) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0c618: 81 69 00 00 lwz r11,0(r9) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0c61c: 91 23 00 04 stw r9,4(r3) before_node = after_node->next; after_node->next = the_node; ffc0c620: 90 69 00 00 stw r3,0(r9) the_node->next = before_node; before_node->previous = the_node; ffc0c624: 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; ffc0c628: 91 63 00 00 stw r11,0(r3) } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } ffc0c62c: 4e 80 00 20 blr =============================================================================== ffc0bec4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc0bec4: 94 21 ff e8 stwu r1,-24(r1) ffc0bec8: 7c 08 02 a6 mflr r0 ffc0becc: 90 01 00 1c stw r0,28(r1) ffc0bed0: 93 e1 00 14 stw r31,20(r1) ffc0bed4: 7c 7f 1b 78 mr r31,r3 ffc0bed8: 93 81 00 08 stw r28,8(r1) ffc0bedc: 7c bc 2b 78 mr r28,r5 ffc0bee0: 93 a1 00 0c stw r29,12(r1) ffc0bee4: 93 c1 00 10 stw r30,16(r1) ffc0bee8: 7c 9e 23 78 mr r30,r4 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; ffc0beec: 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 ); ffc0bef0: 48 00 11 71 bl ffc0d060 <_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 ) ffc0bef4: 80 1f 00 14 lwz r0,20(r31) ffc0bef8: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0befc: 41 9e 00 10 beq- cr7,ffc0bf0c <_Thread_Change_priority+0x48> _Thread_Set_priority( the_thread, new_priority ); ffc0bf00: 7f e3 fb 78 mr r3,r31 ffc0bf04: 7f c4 f3 78 mr r4,r30 ffc0bf08: 48 00 10 b1 bl ffc0cfb8 <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0bf0c: 7f c0 00 a6 mfmsr r30 ffc0bf10: 7c 10 42 a6 mfsprg r0,0 ffc0bf14: 7f c0 00 78 andc r0,r30,r0 ffc0bf18: 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; ffc0bf1c: 80 1f 00 10 lwz r0,16(r31) if ( state != STATES_TRANSIENT ) { ffc0bf20: 2f 80 00 04 cmpwi cr7,r0,4 ffc0bf24: 41 9e 00 88 beq- cr7,ffc0bfac <_Thread_Change_priority+0xe8> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc0bf28: 73 a9 00 04 andi. r9,r29,4 ffc0bf2c: 41 82 00 38 beq- ffc0bf64 <_Thread_Change_priority+0xa0><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0bf30: 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); ffc0bf34: 3d 20 00 03 lis r9,3 <== NOT EXECUTED ffc0bf38: 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 ) ) { ffc0bf3c: 7c 0b 48 39 and. r11,r0,r9 <== NOT EXECUTED ffc0bf40: 40 82 00 40 bne- ffc0bf80 <_Thread_Change_priority+0xbc><== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0bf44: 80 01 00 1c lwz r0,28(r1) ffc0bf48: 83 81 00 08 lwz r28,8(r1) ffc0bf4c: 7c 08 03 a6 mtlr r0 ffc0bf50: 83 a1 00 0c lwz r29,12(r1) ffc0bf54: 83 c1 00 10 lwz r30,16(r1) ffc0bf58: 83 e1 00 14 lwz r31,20(r1) ffc0bf5c: 38 21 00 18 addi r1,r1,24 ffc0bf60: 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); ffc0bf64: 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 ); ffc0bf68: 91 3f 00 10 stw r9,16(r31) ffc0bf6c: 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); ffc0bf70: 3d 20 00 03 lis r9,3 ffc0bf74: 61 29 be e0 ori r9,r9,48864 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0bf78: 7c 0b 48 39 and. r11,r0,r9 ffc0bf7c: 41 82 ff c8 beq+ ffc0bf44 <_Thread_Change_priority+0x80> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0bf80: 80 7f 00 44 lwz r3,68(r31) ffc0bf84: 7f e4 fb 78 mr r4,r31 ffc0bf88: 48 00 0f 35 bl ffc0cebc <_Thread_queue_Requeue> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0bf8c: 80 01 00 1c lwz r0,28(r1) ffc0bf90: 83 81 00 08 lwz r28,8(r1) ffc0bf94: 7c 08 03 a6 mtlr r0 ffc0bf98: 83 a1 00 0c lwz r29,12(r1) ffc0bf9c: 83 c1 00 10 lwz r30,16(r1) ffc0bfa0: 83 e1 00 14 lwz r31,20(r1) ffc0bfa4: 38 21 00 18 addi r1,r1,24 ffc0bfa8: 4e 80 00 20 blr } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc0bfac: 73 bd 00 04 andi. r29,r29,4 ffc0bfb0: 41 82 00 74 beq- ffc0c024 <_Thread_Change_priority+0x160><== ALWAYS TAKEN ffc0bfb4: 3f a0 00 00 lis r29,0 <== NOT EXECUTED ffc0bfb8: 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 ( ffc0bfbc: 7c 00 00 a6 mfmsr r0 ffc0bfc0: 7f c0 01 24 mtmsr r30 ffc0bfc4: 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(); ffc0bfc8: 80 1d 00 08 lwz r0,8(r29) ffc0bfcc: 7c 09 03 a6 mtctr r0 ffc0bfd0: 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 ); ffc0bfd4: 3d 20 00 00 lis r9,0 ffc0bfd8: 39 29 31 44 addi r9,r9,12612 ffc0bfdc: 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() && ffc0bfe0: 80 09 00 10 lwz r0,16(r9) ffc0bfe4: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0bfe8: 41 9e 00 18 beq- cr7,ffc0c000 <_Thread_Change_priority+0x13c> ffc0bfec: 88 0b 00 74 lbz r0,116(r11) ffc0bff0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bff4: 41 9e 00 0c beq- cr7,ffc0c000 <_Thread_Change_priority+0x13c> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; ffc0bff8: 38 00 00 01 li r0,1 ffc0bffc: 98 09 00 18 stb r0,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c000: 7f c0 01 24 mtmsr r30 _ISR_Enable( level ); } ffc0c004: 80 01 00 1c lwz r0,28(r1) ffc0c008: 83 81 00 08 lwz r28,8(r1) ffc0c00c: 7c 08 03 a6 mtlr r0 ffc0c010: 83 a1 00 0c lwz r29,12(r1) ffc0c014: 83 c1 00 10 lwz r30,16(r1) ffc0c018: 83 e1 00 14 lwz r31,20(r1) ffc0c01c: 38 21 00 18 addi r1,r1,24 ffc0c020: 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 ) ffc0c024: 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 ); ffc0c028: 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 ); ffc0c02c: 3f a0 00 00 lis r29,0 ffc0c030: 3b bd 20 e0 addi r29,r29,8416 if ( prepend_it ) ffc0c034: 41 9e 00 18 beq- cr7,ffc0c04c <_Thread_Change_priority+0x188> ffc0c038: 80 1d 00 28 lwz r0,40(r29) ffc0c03c: 7f e3 fb 78 mr r3,r31 ffc0c040: 7c 09 03 a6 mtctr r0 ffc0c044: 4e 80 04 21 bctrl ffc0c048: 4b ff ff 74 b ffc0bfbc <_Thread_Change_priority+0xf8> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); ffc0c04c: 80 1d 00 24 lwz r0,36(r29) ffc0c050: 7f e3 fb 78 mr r3,r31 ffc0c054: 7c 09 03 a6 mtctr r0 ffc0c058: 4e 80 04 21 bctrl ffc0c05c: 4b ff ff 60 b ffc0bfbc <_Thread_Change_priority+0xf8> =============================================================================== ffc0c2d8 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c2d8: 94 21 ff e8 stwu r1,-24(r1) ffc0c2dc: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c2e0: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c2e4: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c2e8: 48 00 02 3d bl ffc0c524 <_Thread_Get> switch ( location ) { ffc0c2ec: 80 01 00 08 lwz r0,8(r1) ffc0c2f0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c2f4: 40 9e 00 24 bne- cr7,ffc0c318 <_Thread_Delay_ended+0x40><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc0c2f8: 3c 80 10 00 lis r4,4096 ffc0c2fc: 60 84 00 18 ori r4,r4,24 ffc0c300: 4b ff fd 61 bl ffc0c060 <_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--; ffc0c304: 3d 20 00 00 lis r9,0 ffc0c308: 81 69 28 0c lwz r11,10252(r9) ffc0c30c: 38 0b ff ff addi r0,r11,-1 ffc0c310: 90 09 28 0c stw r0,10252(r9) return _Thread_Dispatch_disable_level; ffc0c314: 80 09 28 0c lwz r0,10252(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc0c318: 80 01 00 1c lwz r0,28(r1) ffc0c31c: 38 21 00 18 addi r1,r1,24 ffc0c320: 7c 08 03 a6 mtlr r0 ffc0c324: 4e 80 00 20 blr =============================================================================== ffc0c328 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0c328: 94 21 ff c8 stwu r1,-56(r1) ffc0c32c: 7c 08 02 a6 mflr r0 ffc0c330: 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++; ffc0c334: 3f 20 00 00 lis r25,0 ffc0c338: 81 39 28 0c lwz r9,10252(r25) ffc0c33c: 90 01 00 3c stw r0,60(r1) ffc0c340: 38 09 00 01 addi r0,r9,1 ffc0c344: 90 19 28 0c stw r0,10252(r25) ffc0c348: 93 01 00 18 stw r24,24(r1) return _Thread_Dispatch_disable_level; ffc0c34c: 80 19 28 0c lwz r0,10252(r25) ffc0c350: 93 41 00 20 stw r26,32(r1) ffc0c354: 93 61 00 24 stw r27,36(r1) ffc0c358: 93 81 00 28 stw r28,40(r1) ffc0c35c: 93 a1 00 2c stw r29,44(r1) ffc0c360: 93 c1 00 30 stw r30,48(r1) ffc0c364: 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; ffc0c368: 3f a0 00 00 lis r29,0 ffc0c36c: 3b bd 31 44 addi r29,r29,12612 ffc0c370: 83 fd 00 0c lwz r31,12(r29) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c374: 7c 00 00 a6 mfmsr r0 ffc0c378: 7d 30 42 a6 mfsprg r9,0 ffc0c37c: 7c 09 48 78 andc r9,r0,r9 ffc0c380: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0c384: 89 3d 00 18 lbz r9,24(r29) ffc0c388: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c38c: 41 9e 01 14 beq- cr7,ffc0c4a0 <_Thread_Dispatch+0x178> heir = _Thread_Heir; ffc0c390: 83 dd 00 10 lwz r30,16(r29) _Thread_Dispatch_necessary = false; ffc0c394: 39 20 00 00 li r9,0 ffc0c398: 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 ) ffc0c39c: 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; 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 fc beq- cr7,ffc0c4a0 <_Thread_Dispatch+0x178> ffc0c3a8: 3f 80 00 00 lis r28,0 ffc0c3ac: 3b 7d 00 1c addi r27,r29,28 ffc0c3b0: 3b 9c 28 20 addi r28,r28,10272 #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; ffc0c3b4: 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; ffc0c3b8: 3b 40 00 00 li r26,0 ffc0c3bc: 48 00 00 cc b ffc0c488 <_Thread_Dispatch+0x160> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c3c0: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc0c3c4: 38 61 00 10 addi r3,r1,16 ffc0c3c8: 48 00 4b 35 bl ffc10efc <_TOD_Get_uptime> _Timestamp_Subtract( ffc0c3cc: 7f 63 db 78 mr r3,r27 ffc0c3d0: 38 81 00 10 addi r4,r1,16 ffc0c3d4: 38 a1 00 08 addi r5,r1,8 ffc0c3d8: 48 00 0f 15 bl ffc0d2ec <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); ffc0c3dc: 38 81 00 08 addi r4,r1,8 ffc0c3e0: 38 7f 00 84 addi r3,r31,132 ffc0c3e4: 48 00 0e ad bl ffc0d290 <_Timespec_Add_to> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c3e8: 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; ffc0c3ec: 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 ); ffc0c3f0: 7f e3 fb 78 mr r3,r31 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c3f4: 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; ffc0c3f8: 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 ); ffc0c3fc: 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; ffc0c400: 91 5d 00 1c stw r10,28(r29) ffc0c404: 91 7d 00 20 stw r11,32(r29) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c408: 41 9e 00 14 beq- cr7,ffc0c41c <_Thread_Dispatch+0xf4> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc0c40c: 80 09 00 00 lwz r0,0(r9) ffc0c410: 90 1f 01 2c stw r0,300(r31) *_Thread_libc_reent = heir->libc_reent; ffc0c414: 80 1e 01 2c lwz r0,300(r30) ffc0c418: 90 09 00 00 stw r0,0(r9) } _User_extensions_Thread_switch( executing, heir ); ffc0c41c: 48 00 13 65 bl ffc0d780 <_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 ) ffc0c420: 80 1f 01 28 lwz r0,296(r31) _Context_Save_fp( &executing->fp_context ); ffc0c424: 38 7f 01 28 addi r3,r31,296 * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0c428: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c42c: 41 9e 00 08 beq- cr7,ffc0c434 <_Thread_Dispatch+0x10c> _Context_Save_fp( &executing->fp_context ); ffc0c430: 48 01 21 91 bl ffc1e5c0 <_CPU_Context_save_fp> #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc0c434: 38 7f 00 c8 addi r3,r31,200 ffc0c438: 38 9e 00 c8 addi r4,r30,200 ffc0c43c: 48 01 23 05 bl ffc1e740 <_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 ) ffc0c440: 80 1f 01 28 lwz r0,296(r31) _Context_Restore_fp( &executing->fp_context ); ffc0c444: 38 7f 01 28 addi r3,r31,296 _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); _Thread_Allocated_fp = executing; } #else if ( executing->fp_context != NULL ) ffc0c448: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c44c: 41 9e 00 08 beq- cr7,ffc0c454 <_Thread_Dispatch+0x12c> _Context_Restore_fp( &executing->fp_context ); ffc0c450: 48 01 22 31 bl ffc1e680 <_CPU_Context_restore_fp> #endif #endif executing = _Thread_Executing; ffc0c454: 83 fd 00 0c lwz r31,12(r29) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c458: 7c 00 00 a6 mfmsr r0 ffc0c45c: 7d 30 42 a6 mfsprg r9,0 ffc0c460: 7c 09 48 78 andc r9,r0,r9 ffc0c464: 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 ) { ffc0c468: 89 3d 00 18 lbz r9,24(r29) ffc0c46c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c470: 41 9e 00 30 beq- cr7,ffc0c4a0 <_Thread_Dispatch+0x178> heir = _Thread_Heir; ffc0c474: 83 dd 00 10 lwz r30,16(r29) _Thread_Dispatch_necessary = false; ffc0c478: 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 ) ffc0c47c: 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; ffc0c480: 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 ) ffc0c484: 41 9e 00 1c beq- cr7,ffc0c4a0 <_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 ) ffc0c488: 81 3e 00 7c lwz r9,124(r30) ffc0c48c: 2f 89 00 01 cmpwi cr7,r9,1 ffc0c490: 40 9e ff 30 bne+ cr7,ffc0c3c0 <_Thread_Dispatch+0x98> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c494: 81 38 28 08 lwz r9,10248(r24) ffc0c498: 91 3e 00 78 stw r9,120(r30) ffc0c49c: 4b ff ff 24 b ffc0c3c0 <_Thread_Dispatch+0x98> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c4a0: 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--; ffc0c4a4: 81 39 28 0c lwz r9,10252(r25) ffc0c4a8: 38 09 ff ff addi r0,r9,-1 ffc0c4ac: 90 19 28 0c stw r0,10252(r25) return _Thread_Dispatch_disable_level; ffc0c4b0: 80 19 28 0c lwz r0,10252(r25) _ISR_Enable( level ); _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); ffc0c4b4: 4b ff db 75 bl ffc0a028 <_API_extensions_Run_postswitch> } ffc0c4b8: 80 01 00 3c lwz r0,60(r1) ffc0c4bc: 83 01 00 18 lwz r24,24(r1) ffc0c4c0: 7c 08 03 a6 mtlr r0 ffc0c4c4: 83 21 00 1c lwz r25,28(r1) ffc0c4c8: 83 41 00 20 lwz r26,32(r1) ffc0c4cc: 83 61 00 24 lwz r27,36(r1) ffc0c4d0: 83 81 00 28 lwz r28,40(r1) ffc0c4d4: 83 a1 00 2c lwz r29,44(r1) ffc0c4d8: 83 c1 00 30 lwz r30,48(r1) ffc0c4dc: 83 e1 00 34 lwz r31,52(r1) ffc0c4e0: 38 21 00 38 addi r1,r1,56 ffc0c4e4: 4e 80 00 20 blr =============================================================================== ffc13b2c <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc13b2c: 94 21 ff f0 stwu r1,-16(r1) ffc13b30: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; ffc13b34: 3d 20 00 00 lis r9,0 * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc13b38: 90 01 00 14 stw r0,20(r1) ffc13b3c: 93 e1 00 0c stw r31,12(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; ffc13b40: 83 e9 31 50 lwz r31,12624(r9) * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc13b44: 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; ffc13b48: 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); ffc13b4c: 38 00 00 00 li r0,0 ffc13b50: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc13b54: 71 2b 00 01 andi. r11,r9,1 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; __asm__ volatile ( ffc13b58: 7d 30 42 a6 mfsprg r9,0 ffc13b5c: 40 82 00 5c bne- ffc13bb8 <_Thread_Handler+0x8c> msr |= ppc_interrupt_get_disable_mask(); ffc13b60: 7d 20 03 78 or r0,r9,r0 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc13b64: 7c 00 01 24 mtmsr r0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; ffc13b68: 3d 20 00 00 lis r9,0 ffc13b6c: 8b c9 29 f8 lbz r30,10744(r9) doneConstructors = true; ffc13b70: 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 ); ffc13b74: 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; ffc13b78: 98 09 29 f8 stb r0,10744(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 ); ffc13b7c: 4b ff 98 c9 bl ffc0d444 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc13b80: 4b ff 89 69 bl ffc0c4e8 <_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) */ { ffc13b84: 2f 9e 00 00 cmpwi cr7,r30,0 ffc13b88: 41 9e 00 38 beq- cr7,ffc13bc0 <_Thread_Handler+0x94> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc13b8c: 80 1f 00 94 lwz r0,148(r31) ffc13b90: 2f 80 00 00 cmpwi cr7,r0,0 ffc13b94: 41 9e 00 34 beq- cr7,ffc13bc8 <_Thread_Handler+0x9c> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { ffc13b98: 2f 80 00 01 cmpwi cr7,r0,1 ffc13b9c: 41 9e 00 44 beq- cr7,ffc13be0 <_Thread_Handler+0xb4> <== 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 ); ffc13ba0: 7f e3 fb 78 mr r3,r31 ffc13ba4: 4b ff 99 15 bl ffc0d4b8 <_User_extensions_Thread_exitted> _Internal_error_Occurred( ffc13ba8: 38 60 00 00 li r3,0 ffc13bac: 38 80 00 01 li r4,1 ffc13bb0: 38 a0 00 05 li r5,5 ffc13bb4: 4b ff 72 0d bl ffc0adc0 <_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(); ffc13bb8: 7c 00 48 78 andc r0,r0,r9 ffc13bbc: 4b ff ff a8 b ffc13b64 <_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 (); ffc13bc0: 48 00 bd bd bl ffc1f97c <_init> ffc13bc4: 4b ff ff c8 b ffc13b8c <_Thread_Handler+0x60> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc13bc8: 80 1f 00 90 lwz r0,144(r31) ffc13bcc: 80 7f 00 9c lwz r3,156(r31) ffc13bd0: 7c 09 03 a6 mtctr r0 ffc13bd4: 4e 80 04 21 bctrl #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = ffc13bd8: 90 7f 00 28 stw r3,40(r31) ffc13bdc: 4b ff ff c4 b ffc13ba0 <_Thread_Handler+0x74> ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( ffc13be0: 80 1f 00 90 lwz r0,144(r31) ffc13be4: 80 7f 00 98 lwz r3,152(r31) ffc13be8: 7c 09 03 a6 mtctr r0 ffc13bec: 4e 80 04 21 bctrl executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = ffc13bf0: 90 7f 00 28 stw r3,40(r31) ffc13bf4: 4b ff ff ac b ffc13ba0 <_Thread_Handler+0x74> =============================================================================== ffc0c5f4 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0c5f4: 94 21 ff c8 stwu r1,-56(r1) ffc0c5f8: 7c 08 02 a6 mflr r0 ffc0c5fc: 93 c1 00 30 stw r30,48(r1) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { ffc0c600: 7c be 2b 79 mr. r30,r5 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0c604: 90 01 00 3c stw r0,60(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0c608: 38 00 00 00 li r0,0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0c60c: 93 61 00 24 stw r27,36(r1) ffc0c610: 7d 3b 4b 78 mr r27,r9 ffc0c614: 81 21 00 48 lwz r9,72(r1) ffc0c618: 92 e1 00 14 stw r23,20(r1) ffc0c61c: 93 21 00 1c stw r25,28(r1) ffc0c620: 7d 59 53 78 mr r25,r10 ffc0c624: 93 81 00 28 stw r28,40(r1) ffc0c628: 7d 1c 43 78 mr r28,r8 ffc0c62c: 93 a1 00 2c stw r29,44(r1) ffc0c630: 7c 7d 1b 78 mr r29,r3 ffc0c634: 93 e1 00 34 stw r31,52(r1) ffc0c638: 7c 9f 23 78 mr r31,r4 ffc0c63c: 93 01 00 18 stw r24,24(r1) ffc0c640: 93 41 00 20 stw r26,32(r1) ffc0c644: 82 e9 00 00 lwz r23,0(r9) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0c648: 90 04 01 30 stw r0,304(r4) ffc0c64c: 90 04 01 34 stw r0,308(r4) extensions_area = NULL; the_thread->libc_reent = NULL; ffc0c650: 90 04 01 2c stw r0,300(r4) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { ffc0c654: 41 82 01 d0 beq- ffc0c824 <_Thread_Initialize+0x230> stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; ffc0c658: 98 04 00 b4 stb r0,180(r4) ffc0c65c: 7c c0 33 78 mr r0,r6 /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0c660: 2f 87 00 00 cmpwi cr7,r7,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0c664: 93 df 00 bc stw r30,188(r31) extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; ffc0c668: 3b 40 00 00 li r26,0 the_stack->size = size; ffc0c66c: 90 1f 00 b8 stw r0,184(r31) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0c670: 40 9e 01 48 bne- cr7,ffc0c7b8 <_Thread_Initialize+0x1c4> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c674: 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; ffc0c678: 93 5f 01 28 stw r26,296(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0c67c: 38 00 00 00 li r0,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c680: 81 3e 28 2c lwz r9,10284(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; ffc0c684: 93 5f 00 c0 stw r26,192(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c688: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c68c: 90 1f 00 50 stw r0,80(r31) the_watchdog->routine = routine; ffc0c690: 90 1f 00 64 stw r0,100(r31) the_watchdog->id = id; ffc0c694: 90 1f 00 68 stw r0,104(r31) the_watchdog->user_data = user_data; ffc0c698: 90 1f 00 6c stw r0,108(r31) ffc0c69c: 40 9e 01 38 bne- cr7,ffc0c7d4 <_Thread_Initialize+0x1e0> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c6a0: 91 3f 01 38 stw r9,312(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; ffc0c6a4: 3b 00 00 00 li r24,0 the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { ffc0c6a8: 2f 99 00 02 cmpwi cr7,r25,2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0c6ac: 80 01 00 40 lwz r0,64(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0c6b0: 9b 7f 00 a0 stb r27,160(r31) the_thread->Start.budget_algorithm = budget_algorithm; ffc0c6b4: 93 3f 00 a4 stw r25,164(r31) the_thread->Start.budget_callout = budget_callout; ffc0c6b8: 90 1f 00 a8 stw r0,168(r31) switch ( budget_algorithm ) { ffc0c6bc: 40 be 00 10 bne+ cr7,ffc0c6cc <_Thread_Initialize+0xd8> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c6c0: 3d 20 00 00 lis r9,0 ffc0c6c4: 80 09 28 08 lwz r0,10248(r9) ffc0c6c8: 90 1f 00 78 stw r0,120(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0c6cc: 80 01 00 44 lwz r0,68(r1) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); ffc0c6d0: 3d 20 00 00 lis r9,0 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0c6d4: 3b c0 00 00 li r30,0 the_thread->resource_count = 0; the_thread->real_priority = priority; ffc0c6d8: 93 9f 00 18 stw r28,24(r31) ffc0c6dc: 7f e3 fb 78 mr r3,r31 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0c6e0: 90 1f 00 ac stw r0,172(r31) the_thread->current_state = STATES_DORMANT; ffc0c6e4: 38 00 00 01 li r0,1 ffc0c6e8: 90 1f 00 10 stw r0,16(r31) ffc0c6ec: 80 09 20 f8 lwz r0,8440(r9) the_thread->Wait.queue = NULL; ffc0c6f0: 93 df 00 44 stw r30,68(r31) ffc0c6f4: 7c 09 03 a6 mtctr r0 the_thread->resource_count = 0; ffc0c6f8: 93 df 00 1c stw r30,28(r31) the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; ffc0c6fc: 93 9f 00 b0 stw r28,176(r31) ffc0c700: 4e 80 04 21 bctrl sched =_Scheduler_Allocate( the_thread ); if ( !sched ) ffc0c704: 7c 7b 1b 79 mr. r27,r3 ffc0c708: 41 82 00 40 beq- ffc0c748 <_Thread_Initialize+0x154> goto failed; _Thread_Set_priority( the_thread, priority ); ffc0c70c: 7f e3 fb 78 mr r3,r31 ffc0c710: 7f 84 e3 78 mr r4,r28 ffc0c714: 48 00 08 a5 bl ffc0cfb8 <_Thread_Set_priority> Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( ffc0c718: a0 1f 00 0a lhz r0,10(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0c71c: 81 3d 00 1c lwz r9,28(r29) * 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 ); ffc0c720: 7f e3 fb 78 mr r3,r31 ffc0c724: 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 ); ffc0c728: 93 df 00 84 stw r30,132(r31) ffc0c72c: 93 df 00 88 stw r30,136(r31) ffc0c730: 7f e9 01 2e stwx r31,r9,r0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0c734: 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 ); ffc0c738: 48 00 0e 81 bl ffc0d5b8 <_User_extensions_Thread_create> if ( extension_status ) ffc0c73c: 2f 83 00 00 cmpwi cr7,r3,0 return true; ffc0c740: 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 ) ffc0c744: 40 9e 00 40 bne- cr7,ffc0c784 <_Thread_Initialize+0x190> return true; failed: _Workspace_Free( the_thread->libc_reent ); ffc0c748: 80 7f 01 2c lwz r3,300(r31) ffc0c74c: 48 00 14 d9 bl ffc0dc24 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); ffc0c750: 80 7f 01 30 lwz r3,304(r31) ffc0c754: 48 00 14 d1 bl ffc0dc24 <_Workspace_Free> ffc0c758: 80 7f 01 34 lwz r3,308(r31) ffc0c75c: 48 00 14 c9 bl ffc0dc24 <_Workspace_Free> _Workspace_Free( extensions_area ); ffc0c760: 7f 03 c3 78 mr r3,r24 ffc0c764: 48 00 14 c1 bl ffc0dc24 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); ffc0c768: 7f 43 d3 78 mr r3,r26 ffc0c76c: 48 00 14 b9 bl ffc0dc24 <_Workspace_Free> #endif _Workspace_Free( sched ); ffc0c770: 7f 63 db 78 mr r3,r27 ffc0c774: 48 00 14 b1 bl ffc0dc24 <_Workspace_Free> _Thread_Stack_Free( the_thread ); ffc0c778: 7f e3 fb 78 mr r3,r31 ffc0c77c: 48 00 09 e9 bl ffc0d164 <_Thread_Stack_Free> return false; ffc0c780: 38 60 00 00 li r3,0 } ffc0c784: 80 01 00 3c lwz r0,60(r1) ffc0c788: 82 e1 00 14 lwz r23,20(r1) ffc0c78c: 7c 08 03 a6 mtlr r0 ffc0c790: 83 01 00 18 lwz r24,24(r1) ffc0c794: 83 21 00 1c lwz r25,28(r1) ffc0c798: 83 41 00 20 lwz r26,32(r1) ffc0c79c: 83 61 00 24 lwz r27,36(r1) ffc0c7a0: 83 81 00 28 lwz r28,40(r1) ffc0c7a4: 83 a1 00 2c lwz r29,44(r1) ffc0c7a8: 83 c1 00 30 lwz r30,48(r1) ffc0c7ac: 83 e1 00 34 lwz r31,52(r1) ffc0c7b0: 38 21 00 38 addi r1,r1,56 ffc0c7b4: 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 ); ffc0c7b8: 38 60 01 08 li r3,264 ffc0c7bc: 48 00 14 35 bl ffc0dbf0 <_Workspace_Allocate> if ( !fp_area ) ffc0c7c0: 7c 7a 1b 79 mr. r26,r3 ffc0c7c4: 40 82 fe b0 bne+ ffc0c674 <_Thread_Initialize+0x80> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0c7c8: 3b 00 00 00 li r24,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; ffc0c7cc: 3b 60 00 00 li r27,0 ffc0c7d0: 4b ff ff 78 b ffc0c748 <_Thread_Initialize+0x154> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( ffc0c7d4: 39 29 00 01 addi r9,r9,1 ffc0c7d8: 55 23 10 3a rlwinm r3,r9,2,0,29 ffc0c7dc: 48 00 14 15 bl ffc0dbf0 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0c7e0: 7c 78 1b 79 mr. r24,r3 ffc0c7e4: 41 82 00 84 beq- ffc0c868 <_Thread_Initialize+0x274> goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c7e8: 93 1f 01 38 stw r24,312(r31) ffc0c7ec: 7f 0b c3 78 mr r11,r24 * 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++ ) ffc0c7f0: 38 00 00 00 li r0,0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c7f4: 81 1e 28 2c lwz r8,10284(r30) ffc0c7f8: 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; ffc0c7fc: 39 40 00 00 li r10,0 ffc0c800: 48 00 00 08 b ffc0c808 <_Thread_Initialize+0x214> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c804: 81 7f 01 38 lwz r11,312(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++ ) ffc0c808: 39 29 00 01 addi r9,r9,1 ffc0c80c: 7f 89 40 40 cmplw cr7,r9,r8 the_thread->extensions[i] = NULL; ffc0c810: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c814: 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++ ) ffc0c818: 7d 20 4b 78 mr r0,r9 ffc0c81c: 40 9d ff e8 ble+ cr7,ffc0c804 <_Thread_Initialize+0x210> ffc0c820: 4b ff fe 88 b ffc0c6a8 <_Thread_Initialize+0xb4> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0c824: 7c 83 23 78 mr r3,r4 ffc0c828: 90 c1 00 08 stw r6,8(r1) ffc0c82c: 7c c4 33 78 mr r4,r6 ffc0c830: 90 e1 00 0c stw r7,12(r1) ffc0c834: 48 00 08 89 bl ffc0d0bc <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0c838: 7c 60 1b 79 mr. r0,r3 ffc0c83c: 80 c1 00 08 lwz r6,8(r1) return false; /* stack allocation failed */ ffc0c840: 38 60 00 00 li r3,0 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0c844: 80 e1 00 0c lwz r7,12(r1) ffc0c848: 41 a2 ff 3c beq- ffc0c784 <_Thread_Initialize+0x190> ffc0c84c: 7f 86 00 40 cmplw cr7,r6,r0 return false; /* stack allocation failed */ ffc0c850: 7f c3 f3 78 mr r3,r30 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0c854: 41 bd ff 30 bgt- cr7,ffc0c784 <_Thread_Initialize+0x190><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; ffc0c858: 39 20 00 01 li r9,1 if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; ffc0c85c: 83 df 00 c4 lwz r30,196(r31) the_thread->Start.core_allocated_stack = true; ffc0c860: 99 3f 00 b4 stb r9,180(r31) ffc0c864: 4b ff fd fc b ffc0c660 <_Thread_Initialize+0x6c> 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; ffc0c868: 3b 60 00 00 li r27,0 ffc0c86c: 4b ff fe dc b ffc0c748 <_Thread_Initialize+0x154> =============================================================================== ffc0da84 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0da84: 94 21 ff e8 stwu r1,-24(r1) ffc0da88: 7c 08 02 a6 mflr r0 ffc0da8c: 90 01 00 1c stw r0,28(r1) */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); ffc0da90: 80 03 00 10 lwz r0,16(r3) ffc0da94: 93 e1 00 14 stw r31,20(r1) ffc0da98: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0da9c: 70 09 00 01 andi. r9,r0,1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0daa0: 93 c1 00 10 stw r30,16(r1) _Thread_Restart_self(); return true; } return false; ffc0daa4: 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 ) ) { ffc0daa8: 41 82 00 20 beq- ffc0dac8 <_Thread_Restart+0x44> return true; } return false; } ffc0daac: 7c 03 03 78 mr r3,r0 ffc0dab0: 80 01 00 1c lwz r0,28(r1) ffc0dab4: 83 c1 00 10 lwz r30,16(r1) ffc0dab8: 7c 08 03 a6 mtlr r0 ffc0dabc: 83 e1 00 14 lwz r31,20(r1) ffc0dac0: 38 21 00 18 addi r1,r1,24 ffc0dac4: 4e 80 00 20 blr Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0dac8: 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 ); ffc0dacc: 3f c0 00 00 lis r30,0 ffc0dad0: 3b de 31 64 addi r30,r30,12644 ffc0dad4: 90 a1 00 0c stw r5,12(r1) ffc0dad8: 48 00 01 05 bl ffc0dbdc <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0dadc: 7f e3 fb 78 mr r3,r31 ffc0dae0: 80 81 00 08 lwz r4,8(r1) ffc0dae4: 80 a1 00 0c lwz r5,12(r1) ffc0dae8: 48 00 48 5d bl ffc12344 <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0daec: 7f e3 fb 78 mr r3,r31 ffc0daf0: 48 00 44 c1 bl ffc11fb0 <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0daf4: 7f e3 fb 78 mr r3,r31 ffc0daf8: 48 00 47 fd bl ffc122f4 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); ffc0dafc: 7f e3 fb 78 mr r3,r31 ffc0db00: 48 00 07 75 bl ffc0e274 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) ffc0db04: 81 3e 00 0c lwz r9,12(r30) _Thread_Restart_self(); return true; ffc0db08: 38 00 00 01 li r0,1 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0db0c: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0db10: 40 9e ff 9c bne+ cr7,ffc0daac <_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 ) ffc0db14: 80 1f 01 28 lwz r0,296(r31) ffc0db18: 2f 80 00 00 cmpwi cr7,r0,0 ffc0db1c: 41 9e 00 0c beq- cr7,ffc0db28 <_Thread_Restart+0xa4> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0db20: 38 7f 01 28 addi r3,r31,296 ffc0db24: 48 01 17 fd bl ffc1f320 <_CPU_Context_restore_fp> #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0db28: 80 7e 00 0c lwz r3,12(r30) ffc0db2c: 38 63 00 c8 addi r3,r3,200 ffc0db30: 48 01 19 b1 bl ffc1f4e0 <_CPU_Context_restore> =============================================================================== ffc0d164 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { ffc0d164: 7c 08 02 a6 mflr r0 ffc0d168: 94 21 ff f8 stwu r1,-8(r1) ffc0d16c: 90 01 00 0c stw r0,12(r1) #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) ffc0d170: 88 03 00 b4 lbz r0,180(r3) ffc0d174: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d178: 41 9e 00 20 beq- cr7,ffc0d198 <_Thread_Stack_Free+0x34> <== NEVER TAKEN * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) ffc0d17c: 3d 20 00 00 lis r9,0 (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); ffc0d180: 80 63 00 bc lwz r3,188(r3) * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) ffc0d184: 80 09 20 28 lwz r0,8232(r9) ffc0d188: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d18c: 41 9e 00 1c beq- cr7,ffc0d1a8 <_Thread_Stack_Free+0x44> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); ffc0d190: 7c 09 03 a6 mtctr r0 ffc0d194: 4e 80 04 21 bctrl else _Workspace_Free( the_thread->Start.Initial_stack.area ); } ffc0d198: 80 01 00 0c lwz r0,12(r1) ffc0d19c: 38 21 00 08 addi r1,r1,8 ffc0d1a0: 7c 08 03 a6 mtlr r0 ffc0d1a4: 4e 80 00 20 blr */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); ffc0d1a8: 48 00 0a 7d bl ffc0dc24 <_Workspace_Free> } ffc0d1ac: 80 01 00 0c lwz r0,12(r1) ffc0d1b0: 38 21 00 08 addi r1,r1,8 ffc0d1b4: 7c 08 03 a6 mtlr r0 ffc0d1b8: 4e 80 00 20 blr =============================================================================== ffc11688 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { ffc11688: 7c 08 02 a6 mflr r0 ffc1168c: 94 21 ff f8 stwu r1,-8(r1) ffc11690: 7c 64 1b 78 mr r4,r3 ffc11694: 90 01 00 0c stw r0,12(r1) Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; ffc11698: 80 63 00 44 lwz r3,68(r3) * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && ffc1169c: 80 03 00 30 lwz r0,48(r3) ffc116a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc116a4: 41 9e 00 14 beq- cr7,ffc116b8 <_Thread_queue_Process_timeout+0x30> RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc116a8: 3d 20 00 00 lis r9,0 ffc116ac: 81 29 31 50 lwz r9,12624(r9) ffc116b0: 7f 84 48 00 cmpw cr7,r4,r9 ffc116b4: 41 9e 00 20 beq- cr7,ffc116d4 <_Thread_queue_Process_timeout+0x4c><== ALWAYS TAKEN if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ffc116b8: 80 03 00 3c lwz r0,60(r3) ffc116bc: 90 04 00 34 stw r0,52(r4) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); ffc116c0: 4b ff fe 85 bl ffc11544 <_Thread_queue_Extract> } } ffc116c4: 80 01 00 0c lwz r0,12(r1) ffc116c8: 38 21 00 08 addi r1,r1,8 ffc116cc: 7c 08 03 a6 mtlr r0 ffc116d0: 4e 80 00 20 blr * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { ffc116d4: 2f 80 00 03 cmpwi cr7,r0,3 ffc116d8: 41 be ff ec beq- cr7,ffc116c4 <_Thread_queue_Process_timeout+0x3c> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ffc116dc: 80 03 00 3c lwz r0,60(r3) ffc116e0: 90 04 00 34 stw r0,52(r4) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc116e4: 38 00 00 02 li r0,2 ffc116e8: 90 03 00 30 stw r0,48(r3) ffc116ec: 4b ff ff d8 b ffc116c4 <_Thread_queue_Process_timeout+0x3c> =============================================================================== ffc0cebc <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0cebc: 94 21 ff d8 stwu r1,-40(r1) ffc0cec0: 7c 08 02 a6 mflr r0 ffc0cec4: 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 ) ffc0cec8: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0cecc: 93 c1 00 20 stw r30,32(r1) ffc0ced0: 7c 9e 23 78 mr r30,r4 ffc0ced4: 90 01 00 2c stw r0,44(r1) ffc0ced8: 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 ) ffc0cedc: 41 82 00 10 beq- ffc0ceec <_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 ) { ffc0cee0: 80 1f 00 34 lwz r0,52(r31) ffc0cee4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0cee8: 41 9e 00 20 beq- cr7,ffc0cf08 <_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 ); } } ffc0ceec: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0cef0: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0cef4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0cef8: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0cefc: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0cf00: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0cf04: 4e 80 00 20 blr <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0cf08: 7f a0 00 a6 mfmsr r29 ffc0cf0c: 7d 30 42 a6 mfsprg r9,0 ffc0cf10: 7f a9 48 78 andc r9,r29,r9 ffc0cf14: 7d 20 01 24 mtmsr r9 ffc0cf18: 3d 60 00 03 lis r11,3 ffc0cf1c: 81 24 00 10 lwz r9,16(r4) ffc0cf20: 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 ) ) { ffc0cf24: 7d 6a 48 39 and. r10,r11,r9 ffc0cf28: 40 82 00 24 bne- ffc0cf4c <_Thread_queue_Requeue+0x90> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0cf2c: 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 ); } } ffc0cf30: 80 01 00 2c lwz r0,44(r1) ffc0cf34: 83 a1 00 1c lwz r29,28(r1) ffc0cf38: 7c 08 03 a6 mtlr r0 ffc0cf3c: 83 c1 00 20 lwz r30,32(r1) ffc0cf40: 83 e1 00 24 lwz r31,36(r1) ffc0cf44: 38 21 00 28 addi r1,r1,40 ffc0cf48: 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; ffc0cf4c: 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 ); ffc0cf50: 38 a0 00 01 li r5,1 ffc0cf54: 48 00 46 35 bl ffc11588 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0cf58: 7f e3 fb 78 mr r3,r31 ffc0cf5c: 7f c4 f3 78 mr r4,r30 ffc0cf60: 38 a1 00 08 addi r5,r1,8 ffc0cf64: 4b ff fc 81 bl ffc0cbe4 <_Thread_queue_Enqueue_priority> ffc0cf68: 7f a0 01 24 mtmsr r29 ffc0cf6c: 4b ff ff c4 b ffc0cf30 <_Thread_queue_Requeue+0x74> =============================================================================== ffc0cf70 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0cf70: 94 21 ff e8 stwu r1,-24(r1) ffc0cf74: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0cf78: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0cf7c: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0cf80: 4b ff f5 a5 bl ffc0c524 <_Thread_Get> switch ( location ) { ffc0cf84: 80 01 00 08 lwz r0,8(r1) ffc0cf88: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cf8c: 40 9e 00 1c bne- cr7,ffc0cfa8 <_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 ); ffc0cf90: 48 00 46 f9 bl ffc11688 <_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--; ffc0cf94: 3d 20 00 00 lis r9,0 ffc0cf98: 81 69 28 0c lwz r11,10252(r9) ffc0cf9c: 38 0b ff ff addi r0,r11,-1 ffc0cfa0: 90 09 28 0c stw r0,10252(r9) return _Thread_Dispatch_disable_level; ffc0cfa4: 80 09 28 0c lwz r0,10252(r9) _Thread_Unnest_dispatch(); break; } } ffc0cfa8: 80 01 00 1c lwz r0,28(r1) ffc0cfac: 38 21 00 18 addi r1,r1,24 ffc0cfb0: 7c 08 03 a6 mtlr r0 ffc0cfb4: 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 e0 addi r20,r20,10464 ffc1c4e4: 93 01 00 48 stw r24,72(r1) ffc1c4e8: 3f 00 00 00 lis r24,0 ffc1c4ec: 3b 18 29 14 addi r24,r24,10516 ffc1c4f0: 93 21 00 4c stw r25,76(r1) ffc1c4f4: 3f 20 00 00 lis r25,0 ffc1c4f8: 3b 39 28 f8 addi r25,r25,10488 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 5a 0d bl ffc21f80 <_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 91 bl ffc1d424 <_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 5a 7d bl ffc22038 <_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 61 bl ffc1d424 <_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 59 79 bl ffc21f80 <_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 59 59 bl ffc21f80 <_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 58 29 bl ffc21e64 <_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 59 ed bl ffc22038 <_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 4e 7d bl ffc21550 <_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 42 b9 bl ffc209a0 <_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 5b 0d bl ffc22200 <_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 5b 05 bl ffc22200 <_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 a1 bl ffc1d3cc <_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 e0 lwz r10,10464(r11) ffc1c74c: 38 0a 00 01 addi r0,r10,1 ffc1c750: 90 0b 28 e0 stw r0,10464(r11) return _Thread_Dispatch_disable_level; ffc1c754: 80 0b 28 e0 lwz r0,10464(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 42 35 bl ffc209a0 <_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 f8 lwz r0,10488(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 58 4d bl ffc22038 <_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 41 9d bl ffc209a0 <_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 29 14 lwz r0,10516(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 57 d5 bl ffc22038 <_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 41 25 bl ffc209a0 <_Thread_Enable_dispatch> ffc1c880: 4b ff fe f0 b ffc1c770 <_Timer_server_Schedule_operation_method+0x6c> =============================================================================== ffc0d528 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0d528: 94 21 ff e0 stwu r1,-32(r1) ffc0d52c: 7c 08 02 a6 mflr r0 ffc0d530: 93 c1 00 18 stw r30,24(r1) ffc0d534: 3f c0 00 00 lis r30,0 ffc0d538: 3b de 2d f4 addi r30,r30,11764 ffc0d53c: 93 e1 00 1c stw r31,28(r1) ffc0d540: 83 fe 00 08 lwz r31,8(r30) ffc0d544: 93 61 00 0c stw r27,12(r1) ffc0d548: 7c 7b 1b 78 mr r27,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d54c: 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 ) { ffc0d550: 93 81 00 10 stw r28,16(r1) ffc0d554: 7c 9c 23 78 mr r28,r4 ffc0d558: 93 a1 00 14 stw r29,20(r1) ffc0d55c: 7c bd 2b 78 mr r29,r5 ffc0d560: 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 ); ffc0d564: 41 9e 00 30 beq- cr7,ffc0d594 <_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 ) ffc0d568: 80 1f 00 30 lwz r0,48(r31) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d56c: 7f 63 db 78 mr r3,r27 ffc0d570: 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 ) ffc0d574: 2f 80 00 00 cmpwi cr7,r0,0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d578: 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 ) ffc0d57c: 41 9e 00 0c beq- cr7,ffc0d588 <_User_extensions_Fatal+0x60> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d580: 7c 09 03 a6 mtctr r0 ffc0d584: 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 ) { ffc0d588: 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 ); ffc0d58c: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d590: 40 9e ff d8 bne+ cr7,ffc0d568 <_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 ); } } ffc0d594: 80 01 00 24 lwz r0,36(r1) ffc0d598: 83 61 00 0c lwz r27,12(r1) ffc0d59c: 7c 08 03 a6 mtlr r0 ffc0d5a0: 83 81 00 10 lwz r28,16(r1) ffc0d5a4: 83 a1 00 14 lwz r29,20(r1) ffc0d5a8: 83 c1 00 18 lwz r30,24(r1) ffc0d5ac: 83 e1 00 1c lwz r31,28(r1) ffc0d5b0: 38 21 00 20 addi r1,r1,32 ffc0d5b4: 4e 80 00 20 blr =============================================================================== ffc0d338 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d338: 94 21 ff e8 stwu r1,-24(r1) ffc0d33c: 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; ffc0d340: 3c e0 00 00 lis r7,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d344: 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; ffc0d348: 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; ffc0d34c: 3d 00 00 00 lis r8,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d350: 93 a1 00 0c stw r29,12(r1) ffc0d354: 3d 40 00 00 lis r10,0 ffc0d358: 39 68 2d f4 addi r11,r8,11764 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; ffc0d35c: 83 a7 00 3c lwz r29,60(r7) ffc0d360: 39 2a 2c d0 addi r9,r10,11472 head->previous = NULL; ffc0d364: 38 00 00 00 li r0,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d368: 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 ) { ffc0d36c: 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; ffc0d370: 38 ab 00 04 addi r5,r11,4 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d374: 93 81 00 08 stw r28,8(r1) ffc0d378: 38 c9 00 04 addi r6,r9,4 ffc0d37c: 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; ffc0d380: 83 c7 00 38 lwz r30,56(r7) ffc0d384: 90 a8 2d f4 stw r5,11764(r8) head->previous = NULL; ffc0d388: 90 0b 00 04 stw r0,4(r11) tail->previous = head; ffc0d38c: 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; ffc0d390: 90 ca 2c d0 stw r6,11472(r10) head->previous = NULL; ffc0d394: 90 09 00 04 stw r0,4(r9) tail->previous = head; ffc0d398: 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 ) { ffc0d39c: 41 9e 00 88 beq- cr7,ffc0d424 <_User_extensions_Handler_initialization+0xec><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ffc0d3a0: 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 *) ffc0d3a4: 7f 83 e3 78 mr r3,r28 ffc0d3a8: 48 00 08 a9 bl ffc0dc50 <_Workspace_Allocate_or_fatal_error> _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0d3ac: 38 80 00 00 li r4,0 ffc0d3b0: 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 *) ffc0d3b4: 7c 7f 1b 78 mr r31,r3 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0d3b8: 48 00 77 f5 bl ffc14bac extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0d3bc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0d3c0: 41 9e 00 64 beq- cr7,ffc0d424 <_User_extensions_Handler_initialization+0xec><== NEVER TAKEN ffc0d3c4: 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; ffc0d3c8: 81 5d 00 00 lwz r10,0(r29) _User_extensions_Add_set( extension ); ffc0d3cc: 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; ffc0d3d0: 81 7d 00 04 lwz r11,4(r29) ffc0d3d4: 3b 9c 00 01 addi r28,r28,1 ffc0d3d8: 81 3d 00 08 lwz r9,8(r29) ffc0d3dc: 80 1d 00 0c lwz r0,12(r29) ffc0d3e0: 91 5f 00 14 stw r10,20(r31) ffc0d3e4: 91 7f 00 18 stw r11,24(r31) ffc0d3e8: 91 3f 00 1c stw r9,28(r31) ffc0d3ec: 90 1f 00 20 stw r0,32(r31) ffc0d3f0: 81 5d 00 10 lwz r10,16(r29) ffc0d3f4: 81 7d 00 14 lwz r11,20(r29) ffc0d3f8: 81 3d 00 18 lwz r9,24(r29) ffc0d3fc: 80 1d 00 1c lwz r0,28(r29) ffc0d400: 3b bd 00 20 addi r29,r29,32 ffc0d404: 91 5f 00 24 stw r10,36(r31) ffc0d408: 91 7f 00 28 stw r11,40(r31) ffc0d40c: 91 3f 00 2c stw r9,44(r31) ffc0d410: 90 1f 00 30 stw r0,48(r31) _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; ffc0d414: 3b ff 00 34 addi r31,r31,52 _User_extensions_Add_set( extension ); ffc0d418: 48 00 43 a5 bl ffc117bc <_User_extensions_Add_set> extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0d41c: 7f 9c f0 00 cmpw cr7,r28,r30 ffc0d420: 40 9e ff a8 bne+ cr7,ffc0d3c8 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } ffc0d424: 80 01 00 1c lwz r0,28(r1) ffc0d428: 83 81 00 08 lwz r28,8(r1) ffc0d42c: 7c 08 03 a6 mtlr r0 ffc0d430: 83 a1 00 0c lwz r29,12(r1) ffc0d434: 83 c1 00 10 lwz r30,16(r1) ffc0d438: 83 e1 00 14 lwz r31,20(r1) ffc0d43c: 38 21 00 18 addi r1,r1,24 ffc0d440: 4e 80 00 20 blr =============================================================================== ffc0d444 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0d444: 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; ffc0d448: 3d 20 00 00 lis r9,0 ffc0d44c: 7c 08 02 a6 mflr r0 ffc0d450: 93 c1 00 10 stw r30,16(r1) ffc0d454: 3b c9 2d f4 addi r30,r9,11764 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d458: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0d45c: 93 e1 00 14 stw r31,20(r1) ffc0d460: 83 e9 2d f4 lwz r31,11764(r9) ffc0d464: 93 a1 00 0c stw r29,12(r1) ffc0d468: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d46c: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0d470: 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 ); ffc0d474: 41 9e 00 28 beq- cr7,ffc0d49c <_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 ) ffc0d478: 80 1f 00 28 lwz r0,40(r31) (*the_extension->Callouts.thread_begin)( executing ); ffc0d47c: 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 ) ffc0d480: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d484: 41 9e 00 0c beq- cr7,ffc0d490 <_User_extensions_Thread_begin+0x4c> (*the_extension->Callouts.thread_begin)( executing ); ffc0d488: 7c 09 03 a6 mtctr r0 ffc0d48c: 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 ) { ffc0d490: 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 ); ffc0d494: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d498: 40 9e ff e0 bne+ cr7,ffc0d478 <_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 ); } } ffc0d49c: 80 01 00 1c lwz r0,28(r1) ffc0d4a0: 83 a1 00 0c lwz r29,12(r1) ffc0d4a4: 7c 08 03 a6 mtlr r0 ffc0d4a8: 83 c1 00 10 lwz r30,16(r1) ffc0d4ac: 83 e1 00 14 lwz r31,20(r1) ffc0d4b0: 38 21 00 18 addi r1,r1,24 ffc0d4b4: 4e 80 00 20 blr =============================================================================== ffc0d5b8 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d5b8: 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; ffc0d5bc: 3d 20 00 00 lis r9,0 ffc0d5c0: 7c 08 02 a6 mflr r0 ffc0d5c4: 93 c1 00 10 stw r30,16(r1) ffc0d5c8: 3b c9 2d f4 addi r30,r9,11764 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d5cc: 3b de 00 04 addi r30,r30,4 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d5d0: 93 e1 00 14 stw r31,20(r1) ffc0d5d4: 83 e9 2d f4 lwz r31,11764(r9) ffc0d5d8: 93 a1 00 0c stw r29,12(r1) ffc0d5dc: 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 ); ffc0d5e0: 7f 9f f0 00 cmpw cr7,r31,r30 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d5e4: 90 01 00 1c stw r0,28(r1) if ( !status ) return false; } } return true; ffc0d5e8: 38 60 00 01 li r3,1 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d5ec: 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 ); ffc0d5f0: 41 9e 00 40 beq- cr7,ffc0d630 <_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)( ffc0d5f4: 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 ) { ffc0d5f8: 80 1f 00 14 lwz r0,20(r31) status = (*the_extension->Callouts.thread_create)( ffc0d5fc: 39 3c 31 44 addi r9,r28,12612 ffc0d600: 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 ) { ffc0d604: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d608: 41 9e 00 18 beq- cr7,ffc0d620 <_User_extensions_Thread_create+0x68> status = (*the_extension->Callouts.thread_create)( ffc0d60c: 80 69 00 0c lwz r3,12(r9) ffc0d610: 7c 09 03 a6 mtctr r0 ffc0d614: 4e 80 04 21 bctrl _Thread_Executing, the_thread ); if ( !status ) ffc0d618: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d61c: 41 9e 00 34 beq- cr7,ffc0d650 <_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 ) { ffc0d620: 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 ); ffc0d624: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d628: 40 9e ff d0 bne+ cr7,ffc0d5f8 <_User_extensions_Thread_create+0x40> if ( !status ) return false; } } return true; ffc0d62c: 38 60 00 01 li r3,1 } ffc0d630: 80 01 00 1c lwz r0,28(r1) ffc0d634: 83 81 00 08 lwz r28,8(r1) ffc0d638: 7c 08 03 a6 mtlr r0 ffc0d63c: 83 a1 00 0c lwz r29,12(r1) ffc0d640: 83 c1 00 10 lwz r30,16(r1) ffc0d644: 83 e1 00 14 lwz r31,20(r1) ffc0d648: 38 21 00 18 addi r1,r1,24 ffc0d64c: 4e 80 00 20 blr ffc0d650: 80 01 00 1c lwz r0,28(r1) status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; ffc0d654: 38 60 00 00 li r3,0 } } return true; } ffc0d658: 83 81 00 08 lwz r28,8(r1) ffc0d65c: 7c 08 03 a6 mtlr r0 ffc0d660: 83 a1 00 0c lwz r29,12(r1) ffc0d664: 83 c1 00 10 lwz r30,16(r1) ffc0d668: 83 e1 00 14 lwz r31,20(r1) ffc0d66c: 38 21 00 18 addi r1,r1,24 ffc0d670: 4e 80 00 20 blr =============================================================================== ffc0d674 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d674: 94 21 ff e8 stwu r1,-24(r1) ffc0d678: 7c 08 02 a6 mflr r0 ffc0d67c: 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; ffc0d680: 3f c0 00 00 lis r30,0 ffc0d684: 3b de 2d f4 addi r30,r30,11764 ffc0d688: 93 e1 00 14 stw r31,20(r1) ffc0d68c: 83 fe 00 08 lwz r31,8(r30) ffc0d690: 93 a1 00 0c stw r29,12(r1) ffc0d694: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d698: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d69c: 90 01 00 1c stw r0,28(r1) ffc0d6a0: 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 ); ffc0d6a4: 41 9e 00 34 beq- cr7,ffc0d6d8 <_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)( ffc0d6a8: 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 ) ffc0d6ac: 80 1f 00 20 lwz r0,32(r31) (*the_extension->Callouts.thread_delete)( ffc0d6b0: 39 3c 31 44 addi r9,r28,12612 ffc0d6b4: 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 ) ffc0d6b8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d6bc: 41 9e 00 10 beq- cr7,ffc0d6cc <_User_extensions_Thread_delete+0x58> (*the_extension->Callouts.thread_delete)( ffc0d6c0: 80 69 00 0c lwz r3,12(r9) ffc0d6c4: 7c 09 03 a6 mtctr r0 ffc0d6c8: 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 ) { ffc0d6cc: 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 ); ffc0d6d0: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d6d4: 40 9e ff d8 bne+ cr7,ffc0d6ac <_User_extensions_Thread_delete+0x38> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } ffc0d6d8: 80 01 00 1c lwz r0,28(r1) ffc0d6dc: 83 81 00 08 lwz r28,8(r1) ffc0d6e0: 7c 08 03 a6 mtlr r0 ffc0d6e4: 83 a1 00 0c lwz r29,12(r1) ffc0d6e8: 83 c1 00 10 lwz r30,16(r1) ffc0d6ec: 83 e1 00 14 lwz r31,20(r1) ffc0d6f0: 38 21 00 18 addi r1,r1,24 ffc0d6f4: 4e 80 00 20 blr =============================================================================== ffc0d4b8 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0d4b8: 94 21 ff e8 stwu r1,-24(r1) ffc0d4bc: 7c 08 02 a6 mflr r0 ffc0d4c0: 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; ffc0d4c4: 3f c0 00 00 lis r30,0 ffc0d4c8: 3b de 2d f4 addi r30,r30,11764 ffc0d4cc: 93 e1 00 14 stw r31,20(r1) ffc0d4d0: 83 fe 00 08 lwz r31,8(r30) ffc0d4d4: 93 a1 00 0c stw r29,12(r1) ffc0d4d8: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d4dc: 7f 9f f0 00 cmpw cr7,r31,r30 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0d4e0: 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 ); ffc0d4e4: 41 9e 00 28 beq- cr7,ffc0d50c <_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 ) ffc0d4e8: 80 1f 00 2c lwz r0,44(r31) (*the_extension->Callouts.thread_exitted)( executing ); ffc0d4ec: 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 ) ffc0d4f0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d4f4: 41 9e 00 0c beq- cr7,ffc0d500 <_User_extensions_Thread_exitted+0x48> (*the_extension->Callouts.thread_exitted)( executing ); ffc0d4f8: 7c 09 03 a6 mtctr r0 ffc0d4fc: 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 ) { ffc0d500: 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 ); ffc0d504: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d508: 40 9e ff e0 bne+ cr7,ffc0d4e8 <_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 ); } } ffc0d50c: 80 01 00 1c lwz r0,28(r1) ffc0d510: 83 a1 00 0c lwz r29,12(r1) ffc0d514: 7c 08 03 a6 mtlr r0 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 =============================================================================== ffc0e274 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e274: 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; ffc0e278: 3d 20 00 00 lis r9,0 ffc0e27c: 7c 08 02 a6 mflr r0 ffc0e280: 93 c1 00 10 stw r30,16(r1) ffc0e284: 3b c9 2e 14 addi r30,r9,11796 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e288: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e28c: 93 e1 00 14 stw r31,20(r1) ffc0e290: 83 e9 2e 14 lwz r31,11796(r9) ffc0e294: 93 a1 00 0c stw r29,12(r1) ffc0e298: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e29c: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e2a0: 90 01 00 1c stw r0,28(r1) ffc0e2a4: 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 ); ffc0e2a8: 41 9e 00 34 beq- cr7,ffc0e2dc <_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)( ffc0e2ac: 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 ) ffc0e2b0: 80 1f 00 1c lwz r0,28(r31) (*the_extension->Callouts.thread_restart)( ffc0e2b4: 39 3c 31 64 addi r9,r28,12644 ffc0e2b8: 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 ) ffc0e2bc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e2c0: 41 9e 00 10 beq- cr7,ffc0e2d0 <_User_extensions_Thread_restart+0x5c> (*the_extension->Callouts.thread_restart)( ffc0e2c4: 80 69 00 0c lwz r3,12(r9) ffc0e2c8: 7c 09 03 a6 mtctr r0 ffc0e2cc: 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 ) { ffc0e2d0: 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 ); ffc0e2d4: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0e2d8: 40 9e ff d8 bne+ cr7,ffc0e2b0 <_User_extensions_Thread_restart+0x3c> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0e2dc: 80 01 00 1c lwz r0,28(r1) ffc0e2e0: 83 81 00 08 lwz r28,8(r1) ffc0e2e4: 7c 08 03 a6 mtlr r0 ffc0e2e8: 83 a1 00 0c lwz r29,12(r1) ffc0e2ec: 83 c1 00 10 lwz r30,16(r1) ffc0e2f0: 83 e1 00 14 lwz r31,20(r1) ffc0e2f4: 38 21 00 18 addi r1,r1,24 ffc0e2f8: 4e 80 00 20 blr =============================================================================== ffc0d6f8 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d6f8: 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; ffc0d6fc: 3d 20 00 00 lis r9,0 ffc0d700: 7c 08 02 a6 mflr r0 ffc0d704: 93 c1 00 10 stw r30,16(r1) ffc0d708: 3b c9 2d f4 addi r30,r9,11764 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d70c: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d710: 93 e1 00 14 stw r31,20(r1) ffc0d714: 83 e9 2d f4 lwz r31,11764(r9) ffc0d718: 93 a1 00 0c stw r29,12(r1) ffc0d71c: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d720: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d724: 90 01 00 1c stw r0,28(r1) ffc0d728: 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 ); ffc0d72c: 41 9e 00 34 beq- cr7,ffc0d760 <_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)( ffc0d730: 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 ) ffc0d734: 80 1f 00 18 lwz r0,24(r31) (*the_extension->Callouts.thread_start)( ffc0d738: 39 3c 31 44 addi r9,r28,12612 ffc0d73c: 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 ) ffc0d740: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d744: 41 9e 00 10 beq- cr7,ffc0d754 <_User_extensions_Thread_start+0x5c> (*the_extension->Callouts.thread_start)( ffc0d748: 80 69 00 0c lwz r3,12(r9) ffc0d74c: 7c 09 03 a6 mtctr r0 ffc0d750: 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 ) { ffc0d754: 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 ); ffc0d758: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d75c: 40 9e ff d8 bne+ cr7,ffc0d734 <_User_extensions_Thread_start+0x3c> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0d760: 80 01 00 1c lwz r0,28(r1) ffc0d764: 83 81 00 08 lwz r28,8(r1) ffc0d768: 7c 08 03 a6 mtlr r0 ffc0d76c: 83 a1 00 0c lwz r29,12(r1) ffc0d770: 83 c1 00 10 lwz r30,16(r1) ffc0d774: 83 e1 00 14 lwz r31,20(r1) ffc0d778: 38 21 00 18 addi r1,r1,24 ffc0d77c: 4e 80 00 20 blr =============================================================================== ffc0d780 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d780: 94 21 ff e8 stwu r1,-24(r1) ffc0d784: 3d 20 00 00 lis r9,0 ffc0d788: 7c 08 02 a6 mflr r0 ffc0d78c: 93 c1 00 10 stw r30,16(r1) ffc0d790: 3b c9 2c d0 addi r30,r9,11472 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d794: 3b de 00 04 addi r30,r30,4 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d798: 93 e1 00 14 stw r31,20(r1) ffc0d79c: 83 e9 2c d0 lwz r31,11472(r9) ffc0d7a0: 93 81 00 08 stw r28,8(r1) ffc0d7a4: 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 ); ffc0d7a8: 7f 9f f0 00 cmpw cr7,r31,r30 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d7ac: 93 a1 00 0c stw r29,12(r1) ffc0d7b0: 7c 9d 23 78 mr r29,r4 ffc0d7b4: 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 ); ffc0d7b8: 41 9e 00 24 beq- cr7,ffc0d7dc <_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 ); ffc0d7bc: 80 1f 00 08 lwz r0,8(r31) ffc0d7c0: 7f 83 e3 78 mr r3,r28 ffc0d7c4: 7f a4 eb 78 mr r4,r29 ffc0d7c8: 7c 09 03 a6 mtctr r0 ffc0d7cc: 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 ) { ffc0d7d0: 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 ); ffc0d7d4: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d7d8: 40 9e ff e4 bne+ cr7,ffc0d7bc <_User_extensions_Thread_switch+0x3c> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0d7dc: 80 01 00 1c lwz r0,28(r1) ffc0d7e0: 83 81 00 08 lwz r28,8(r1) ffc0d7e4: 7c 08 03 a6 mtlr r0 ffc0d7e8: 83 a1 00 0c lwz r29,12(r1) ffc0d7ec: 83 c1 00 10 lwz r30,16(r1) ffc0d7f0: 83 e1 00 14 lwz r31,20(r1) ffc0d7f4: 38 21 00 18 addi r1,r1,24 ffc0d7f8: 4e 80 00 20 blr =============================================================================== ffc0f68c <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0f68c: 94 21 ff e0 stwu r1,-32(r1) ffc0f690: 7c 08 02 a6 mflr r0 ffc0f694: 90 01 00 24 stw r0,36(r1) ffc0f698: 93 c1 00 18 stw r30,24(r1) ffc0f69c: 7c be 2b 78 mr r30,r5 ffc0f6a0: 93 e1 00 1c stw r31,28(r1) ffc0f6a4: 7c 7f 1b 78 mr r31,r3 ffc0f6a8: 93 61 00 0c stw r27,12(r1) ffc0f6ac: 93 81 00 10 stw r28,16(r1) ffc0f6b0: 93 a1 00 14 stw r29,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f6b4: 7c 00 00 a6 mfmsr r0 ffc0f6b8: 7d 30 42 a6 mfsprg r9,0 ffc0f6bc: 7c 09 48 78 andc r9,r0,r9 ffc0f6c0: 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; ffc0f6c4: 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 ); ffc0f6c8: 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 ) ) { ffc0f6cc: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0f6d0: 41 9e 00 68 beq- cr7,ffc0f738 <_Watchdog_Adjust+0xac> switch ( direction ) { ffc0f6d4: 2f 84 00 00 cmpwi cr7,r4,0 ffc0f6d8: 40 9e 00 88 bne- cr7,ffc0f760 <_Watchdog_Adjust+0xd4> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f6dc: 2f 85 00 00 cmpwi cr7,r5,0 ffc0f6e0: 41 9e 00 58 beq- cr7,ffc0f738 <_Watchdog_Adjust+0xac> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f6e4: 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; ffc0f6e8: 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 ) { ffc0f6ec: 7f 85 e8 40 cmplw cr7,r5,r29 ffc0f6f0: 40 bc 00 18 bge+ cr7,ffc0f708 <_Watchdog_Adjust+0x7c> <== ALWAYS TAKEN ffc0f6f4: 48 00 00 a8 b ffc0f79c <_Watchdog_Adjust+0x110> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f6f8: 41 82 00 40 beq- ffc0f738 <_Watchdog_Adjust+0xac> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f6fc: 83 a9 00 10 lwz r29,16(r9) ffc0f700: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0f704: 41 9d 00 98 bgt- cr7,ffc0f79c <_Watchdog_Adjust+0x110> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0f708: 93 69 00 10 stw r27,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0f70c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0f710: 7f e3 fb 78 mr r3,r31 ffc0f714: 48 00 03 2d bl ffc0fa40 <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f718: 7c 00 00 a6 mfmsr r0 ffc0f71c: 7d 30 42 a6 mfsprg r9,0 ffc0f720: 7c 09 48 78 andc r9,r0,r9 ffc0f724: 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; ffc0f728: 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 ) { ffc0f72c: 7f dd f0 51 subf. r30,r29,r30 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0f730: 7f 9c 48 00 cmpw cr7,r28,r9 ffc0f734: 40 9e ff c4 bne+ cr7,ffc0f6f8 <_Watchdog_Adjust+0x6c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0f738: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0f73c: 80 01 00 24 lwz r0,36(r1) ffc0f740: 83 61 00 0c lwz r27,12(r1) ffc0f744: 7c 08 03 a6 mtlr r0 ffc0f748: 83 81 00 10 lwz r28,16(r1) ffc0f74c: 83 a1 00 14 lwz r29,20(r1) ffc0f750: 83 c1 00 18 lwz r30,24(r1) ffc0f754: 83 e1 00 1c lwz r31,28(r1) ffc0f758: 38 21 00 20 addi r1,r1,32 ffc0f75c: 4e 80 00 20 blr * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0f760: 2f 84 00 01 cmpwi cr7,r4,1 ffc0f764: 40 9e ff d4 bne+ cr7,ffc0f738 <_Watchdog_Adjust+0xac> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0f768: 81 69 00 10 lwz r11,16(r9) ffc0f76c: 7f cb 2a 14 add r30,r11,r5 ffc0f770: 93 c9 00 10 stw r30,16(r9) ffc0f774: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0f778: 80 01 00 24 lwz r0,36(r1) ffc0f77c: 83 61 00 0c lwz r27,12(r1) ffc0f780: 7c 08 03 a6 mtlr r0 ffc0f784: 83 81 00 10 lwz r28,16(r1) ffc0f788: 83 a1 00 14 lwz r29,20(r1) ffc0f78c: 83 c1 00 18 lwz r30,24(r1) ffc0f790: 83 e1 00 1c lwz r31,28(r1) ffc0f794: 38 21 00 20 addi r1,r1,32 ffc0f798: 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; ffc0f79c: 7f de e8 50 subf r30,r30,r29 ffc0f7a0: 93 c9 00 10 stw r30,16(r9) break; ffc0f7a4: 4b ff ff 94 b ffc0f738 <_Watchdog_Adjust+0xac> =============================================================================== ffc0d7fc <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; ffc0d7fc: 3d 20 00 00 lis r9,0 ffc0d800: 80 09 31 4c lwz r0,12620(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d804: 7d 00 00 a6 mfmsr r8 ffc0d808: 7d 30 42 a6 mfsprg r9,0 ffc0d80c: 7d 09 48 78 andc r9,r8,r9 ffc0d810: 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 ) { ffc0d814: 81 24 00 08 lwz r9,8(r4) ffc0d818: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d81c: 40 9e 01 04 bne- cr7,ffc0d920 <_Watchdog_Insert+0x124> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; ffc0d820: 3c c0 00 00 lis r6,0 ffc0d824: 81 26 28 3c lwz r9,10300(r6) if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; ffc0d828: 39 60 00 01 li r11,1 ffc0d82c: 91 64 00 08 stw r11,8(r4) ffc0d830: 3c a0 00 00 lis r5,0 _Watchdog_Sync_count++; ffc0d834: 39 29 00 01 addi r9,r9,1 ffc0d838: 91 26 28 3c stw r9,10300(r6) restart: delta_interval = the_watchdog->initial; ffc0d83c: 81 24 00 0c lwz r9,12(r4) ffc0d840: 81 63 00 00 lwz r11,0(r3) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d844: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d848: 41 9e 00 98 beq- cr7,ffc0d8e0 <_Watchdog_Insert+0xe4> ffc0d84c: 81 4b 00 00 lwz r10,0(r11) ffc0d850: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d854: 41 9e 00 8c beq- cr7,ffc0d8e0 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0d858: 81 4b 00 10 lwz r10,16(r11) ffc0d85c: 7f 89 50 40 cmplw cr7,r9,r10 ffc0d860: 41 9c 00 c8 blt- cr7,ffc0d928 <_Watchdog_Insert+0x12c> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0d864: 7c e0 00 a6 mfmsr r7 ffc0d868: 7d 00 01 24 mtmsr r8 ffc0d86c: 7c e0 01 24 mtmsr r7 delta_interval -= after->delta_interval; _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d870: 80 e4 00 08 lwz r7,8(r4) ffc0d874: 2f 87 00 01 cmpwi cr7,r7,1 ffc0d878: 40 9e 00 98 bne- cr7,ffc0d910 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d87c: 81 85 28 34 lwz r12,10292(r5) ffc0d880: 38 e5 28 34 addi r7,r5,10292 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0d884: 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 ) { ffc0d888: 7f 80 60 40 cmplw cr7,r0,r12 ffc0d88c: 40 bc 00 48 bge+ cr7,ffc0d8d4 <_Watchdog_Insert+0xd8> ffc0d890: 48 00 00 d4 b ffc0d964 <_Watchdog_Insert+0x168> for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d894: 81 4b 00 00 lwz r10,0(r11) ffc0d898: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d89c: 41 9e 00 44 beq- cr7,ffc0d8e0 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0d8a0: 81 4b 00 10 lwz r10,16(r11) ffc0d8a4: 7f 8a 48 40 cmplw cr7,r10,r9 ffc0d8a8: 41 9d 00 80 bgt- cr7,ffc0d928 <_Watchdog_Insert+0x12c> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0d8ac: 7d 2a 48 50 subf r9,r10,r9 ffc0d8b0: 7d 40 00 a6 mfmsr r10 ffc0d8b4: 7d 00 01 24 mtmsr r8 ffc0d8b8: 7d 40 01 24 mtmsr r10 _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d8bc: 81 44 00 08 lwz r10,8(r4) ffc0d8c0: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0d8c4: 40 9e 00 4c bne- cr7,ffc0d910 <_Watchdog_Insert+0x114> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d8c8: 81 47 00 00 lwz r10,0(r7) ffc0d8cc: 7f 80 50 40 cmplw cr7,r0,r10 ffc0d8d0: 41 9c 00 94 blt- cr7,ffc0d964 <_Watchdog_Insert+0x168> <== NEVER TAKEN for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d8d4: 2f 89 00 00 cmpwi cr7,r9,0 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } ffc0d8d8: 81 6b 00 00 lwz r11,0(r11) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d8dc: 40 9e ff b8 bne+ cr7,ffc0d894 <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0d8e0: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d8e4: 3c e0 00 00 lis r7,0 ffc0d8e8: 80 e7 28 40 lwz r7,10304(r7) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; ffc0d8ec: 38 60 00 02 li r3,2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0d8f0: 81 4b 00 00 lwz r10,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0d8f4: 91 64 00 04 stw r11,4(r4) ffc0d8f8: 90 64 00 08 stw r3,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0d8fc: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0d900: 90 8b 00 00 stw r4,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0d904: 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; ffc0d908: 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; ffc0d90c: 90 e4 00 14 stw r7,20(r4) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; ffc0d910: 90 05 28 34 stw r0,10292(r5) _Watchdog_Sync_count--; ffc0d914: 81 26 28 3c lwz r9,10300(r6) ffc0d918: 38 09 ff ff addi r0,r9,-1 ffc0d91c: 90 06 28 3c stw r0,10300(r6) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d920: 7d 00 01 24 mtmsr r8 ffc0d924: 4e 80 00 20 blr if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; ffc0d928: 7d 49 50 50 subf r10,r9,r10 ffc0d92c: 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; ffc0d930: 3c e0 00 00 lis r7,0 ffc0d934: 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 ); ffc0d938: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d93c: 80 e7 28 40 lwz r7,10304(r7) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0d940: 81 4b 00 00 lwz r10,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0d944: 91 64 00 04 stw r11,4(r4) ffc0d948: 90 64 00 08 stw r3,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0d94c: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0d950: 90 8b 00 00 stw r4,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0d954: 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; ffc0d958: 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; ffc0d95c: 90 e4 00 14 stw r7,20(r4) ffc0d960: 4b ff ff b0 b ffc0d910 <_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; ffc0d964: 90 05 28 34 stw r0,10292(r5) goto restart; ffc0d968: 4b ff fe d4 b ffc0d83c <_Watchdog_Insert+0x40> =============================================================================== ffc0d9c4 <_Watchdog_Remove>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d9c4: 7d 20 00 a6 mfmsr r9 ffc0d9c8: 7c 10 42 a6 mfsprg r0,0 ffc0d9cc: 7d 20 00 78 andc r0,r9,r0 ffc0d9d0: 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; ffc0d9d4: 80 03 00 08 lwz r0,8(r3) switch ( previous_state ) { ffc0d9d8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d9dc: 41 9e 00 98 beq- cr7,ffc0da74 <_Watchdog_Remove+0xb0> ffc0d9e0: 2b 80 00 01 cmplwi cr7,r0,1 ffc0d9e4: 40 9c 00 1c bge- cr7,ffc0da00 <_Watchdog_Remove+0x3c> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d9e8: 3d 60 00 00 lis r11,0 ffc0d9ec: 81 6b 28 40 lwz r11,10304(r11) ffc0d9f0: 91 63 00 18 stw r11,24(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d9f4: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d9f8: 7c 03 03 78 mr r3,r0 ffc0d9fc: 4e 80 00 20 blr Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { ffc0da00: 2b 80 00 03 cmplwi cr7,r0,3 ffc0da04: 41 bd ff e4 bgt- cr7,ffc0d9e8 <_Watchdog_Remove+0x24> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0da08: 39 60 00 00 li r11,0 ffc0da0c: 91 63 00 08 stw r11,8(r3) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } ffc0da10: 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) ) ffc0da14: 81 4b 00 00 lwz r10,0(r11) ffc0da18: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0da1c: 41 9e 00 14 beq- cr7,ffc0da30 <_Watchdog_Remove+0x6c> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0da20: 81 0b 00 10 lwz r8,16(r11) ffc0da24: 81 43 00 10 lwz r10,16(r3) ffc0da28: 7d 48 52 14 add r10,r8,r10 ffc0da2c: 91 4b 00 10 stw r10,16(r11) if ( _Watchdog_Sync_count ) ffc0da30: 3d 40 00 00 lis r10,0 ffc0da34: 81 4a 28 3c lwz r10,10300(r10) ffc0da38: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0da3c: 41 9e 00 14 beq- cr7,ffc0da50 <_Watchdog_Remove+0x8c> _Watchdog_Sync_level = _ISR_Nest_level; ffc0da40: 3d 40 00 00 lis r10,0 ffc0da44: 81 0a 31 4c lwz r8,12620(r10) ffc0da48: 3d 40 00 00 lis r10,0 ffc0da4c: 91 0a 28 34 stw r8,10292(r10) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0da50: 81 43 00 04 lwz r10,4(r3) next->previous = previous; ffc0da54: 91 4b 00 04 stw r10,4(r11) previous->next = next; ffc0da58: 91 6a 00 00 stw r11,0(r10) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0da5c: 3d 60 00 00 lis r11,0 ffc0da60: 81 6b 28 40 lwz r11,10304(r11) ffc0da64: 91 63 00 18 stw r11,24(r3) ffc0da68: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0da6c: 7c 03 03 78 mr r3,r0 ffc0da70: 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; ffc0da74: 39 60 00 00 li r11,0 ffc0da78: 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; ffc0da7c: 3d 60 00 00 lis r11,0 ffc0da80: 81 6b 28 40 lwz r11,10304(r11) ffc0da84: 91 63 00 18 stw r11,24(r3) ffc0da88: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0da8c: 7c 03 03 78 mr r3,r0 ffc0da90: 4e 80 00 20 blr =============================================================================== ffc0edb8 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0edb8: 94 21 ff e8 stwu r1,-24(r1) ffc0edbc: 7c 08 02 a6 mflr r0 ffc0edc0: 93 c1 00 10 stw r30,16(r1) ffc0edc4: 7c 7e 1b 78 mr r30,r3 ffc0edc8: 93 e1 00 14 stw r31,20(r1) ffc0edcc: 7c 9f 23 78 mr r31,r4 ffc0edd0: 90 01 00 1c stw r0,28(r1) ffc0edd4: 93 81 00 08 stw r28,8(r1) ffc0edd8: 93 a1 00 0c stw r29,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0eddc: 7f a0 00 a6 mfmsr r29 ffc0ede0: 7c 10 42 a6 mfsprg r0,0 ffc0ede4: 7f a0 00 78 andc r0,r29,r0 ffc0ede8: 7c 00 01 24 mtmsr r0 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0edec: 3c 60 ff c2 lis r3,-62 ffc0edf0: 7f e5 fb 78 mr r5,r31 ffc0edf4: 38 63 2e 30 addi r3,r3,11824 ffc0edf8: 7f c4 f3 78 mr r4,r30 ffc0edfc: 4c c6 31 82 crclr 4*cr1+eq ffc0ee00: 4b ff 80 09 bl ffc06e08 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0ee04: 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 ); ffc0ee08: 3b ff 00 04 addi r31,r31,4 if ( !_Chain_Is_empty( header ) ) { ffc0ee0c: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0ee10: 41 9e 00 54 beq- cr7,ffc0ee64 <_Watchdog_Report_chain+0xac> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0ee14: 7f 84 e3 78 mr r4,r28 ffc0ee18: 38 60 00 00 li r3,0 ffc0ee1c: 48 00 00 5d bl ffc0ee78 <_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 ) ffc0ee20: 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 ) ; ffc0ee24: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0ee28: 40 9e ff ec bne+ cr7,ffc0ee14 <_Watchdog_Report_chain+0x5c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0ee2c: 3c 60 ff c2 lis r3,-62 ffc0ee30: 38 63 2e 48 addi r3,r3,11848 ffc0ee34: 7f c4 f3 78 mr r4,r30 ffc0ee38: 4c c6 31 82 crclr 4*cr1+eq ffc0ee3c: 4b ff 7f cd bl ffc06e08 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0ee40: 7f a0 01 24 mtmsr r29 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0ee44: 80 01 00 1c lwz r0,28(r1) ffc0ee48: 83 81 00 08 lwz r28,8(r1) ffc0ee4c: 7c 08 03 a6 mtlr r0 ffc0ee50: 83 a1 00 0c lwz r29,12(r1) ffc0ee54: 83 c1 00 10 lwz r30,16(r1) ffc0ee58: 83 e1 00 14 lwz r31,20(r1) ffc0ee5c: 38 21 00 18 addi r1,r1,24 ffc0ee60: 4e 80 00 20 blr _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); ffc0ee64: 3c 60 ff c2 lis r3,-62 ffc0ee68: 38 63 2e 58 addi r3,r3,11864 ffc0ee6c: 4c c6 31 82 crclr 4*cr1+eq ffc0ee70: 4b ff 7f 99 bl ffc06e08 ffc0ee74: 4b ff ff cc b ffc0ee40 <_Watchdog_Report_chain+0x88> =============================================================================== ffc0da94 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { ffc0da94: 94 21 ff e8 stwu r1,-24(r1) ffc0da98: 7c 08 02 a6 mflr r0 ffc0da9c: 90 01 00 1c stw r0,28(r1) ffc0daa0: 93 e1 00 14 stw r31,20(r1) ffc0daa4: 7c 7f 1b 78 mr r31,r3 ffc0daa8: 93 81 00 08 stw r28,8(r1) ffc0daac: 93 a1 00 0c stw r29,12(r1) ffc0dab0: 93 c1 00 10 stw r30,16(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0dab4: 7f 80 00 a6 mfmsr r28 ffc0dab8: 7c 10 42 a6 mfsprg r0,0 ffc0dabc: 7f 80 00 78 andc r0,r28,r0 ffc0dac0: 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; ffc0dac4: 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 ); ffc0dac8: 3b c3 00 04 addi r30,r3,4 * volatile data - till, 2003/7 */ _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0dacc: 7f 9d f0 00 cmpw cr7,r29,r30 ffc0dad0: 41 9e 00 20 beq- cr7,ffc0daf0 <_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) { ffc0dad4: 81 3d 00 10 lwz r9,16(r29) ffc0dad8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0dadc: 41 9e 00 74 beq- cr7,ffc0db50 <_Watchdog_Tickle+0xbc> the_watchdog->delta_interval--; ffc0dae0: 39 29 ff ff addi r9,r9,-1 if ( the_watchdog->delta_interval != 0 ) ffc0dae4: 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--; ffc0dae8: 91 3d 00 10 stw r9,16(r29) if ( the_watchdog->delta_interval != 0 ) ffc0daec: 41 be 00 64 beq+ cr7,ffc0db50 <_Watchdog_Tickle+0xbc> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0daf0: 7f 80 01 24 mtmsr r28 } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } ffc0daf4: 80 01 00 1c lwz r0,28(r1) ffc0daf8: 83 81 00 08 lwz r28,8(r1) ffc0dafc: 7c 08 03 a6 mtlr r0 ffc0db00: 83 a1 00 0c lwz r29,12(r1) ffc0db04: 83 c1 00 10 lwz r30,16(r1) ffc0db08: 83 e1 00 14 lwz r31,20(r1) ffc0db0c: 38 21 00 18 addi r1,r1,24 ffc0db10: 4e 80 00 20 blr _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( ffc0db14: 80 1d 00 1c lwz r0,28(r29) ffc0db18: 80 7d 00 20 lwz r3,32(r29) ffc0db1c: 80 9d 00 24 lwz r4,36(r29) ffc0db20: 7c 09 03 a6 mtctr r0 ffc0db24: 4e 80 04 21 bctrl static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0db28: 7f 80 00 a6 mfmsr r28 ffc0db2c: 7c 10 42 a6 mfsprg r0,0 ffc0db30: 7f 80 00 78 andc r0,r28,r0 ffc0db34: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0db38: 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) ); ffc0db3c: 7f 9e e8 00 cmpw cr7,r30,r29 ffc0db40: 41 be ff b0 beq- cr7,ffc0daf0 <_Watchdog_Tickle+0x5c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && ffc0db44: 80 1d 00 10 lwz r0,16(r29) ffc0db48: 2f 80 00 00 cmpwi cr7,r0,0 ffc0db4c: 40 be ff a4 bne- cr7,ffc0daf0 <_Watchdog_Tickle+0x5c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); ffc0db50: 7f a3 eb 78 mr r3,r29 ffc0db54: 4b ff fe 71 bl ffc0d9c4 <_Watchdog_Remove> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0db58: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); switch( watchdog_state ) { ffc0db5c: 2f 83 00 02 cmpwi cr7,r3,2 ffc0db60: 40 9e ff c8 bne+ cr7,ffc0db28 <_Watchdog_Tickle+0x94> <== NEVER TAKEN ffc0db64: 4b ff ff b0 b ffc0db14 <_Watchdog_Tickle+0x80> =============================================================================== ffc186a4 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { ffc186a4: 94 21 ff c8 stwu r1,-56(r1) ffc186a8: 7c 08 02 a6 mflr r0 ffc186ac: 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) ffc186b0: 7c df 33 79 mr. r31,r6 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { ffc186b4: 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; ffc186b8: 38 00 00 00 li r0,0 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { ffc186bc: 93 41 00 20 stw r26,32(r1) ffc186c0: 7c fa 3b 78 mr r26,r7 ffc186c4: 93 61 00 24 stw r27,36(r1) ffc186c8: 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; ffc186cc: 3b c0 00 00 li r30,0 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { ffc186d0: 93 21 00 1c stw r25,28(r1) ffc186d4: 93 81 00 28 stw r28,40(r1) ffc186d8: 93 a1 00 2c stw r29,44(r1) int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ffc186dc: 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; ffc186e0: 90 01 00 08 stw r0,8(r1) uint32_t c = 0; while (count > 0) ffc186e4: 41 82 00 70 beq- ffc18754 <_fat_block_read+0xb0> <== NEVER TAKEN ffc186e8: 7c bc 2b 78 mr r28,r5 ffc186ec: 7c 9d 23 78 mr r29,r4 ffc186f0: 48 00 00 3c b ffc1872c <_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)); ffc186f4: a3 3b 00 00 lhz r25,0(r27) memcpy((buff + cmpltd), (block->buffer + ofs), c); ffc186f8: 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)); ffc186fc: 7f 3c c8 50 subf r25,r28,r25 ffc18700: 7f 99 f8 40 cmplw cr7,r25,r31 ffc18704: 40 9d 00 08 ble- cr7,ffc1870c <_fat_block_read+0x68> ffc18708: 7f f9 fb 78 mr r25,r31 memcpy((buff + cmpltd), (block->buffer + ofs), c); ffc1870c: 80 89 00 24 lwz r4,36(r9) ffc18710: 7f 25 cb 78 mr r5,r25 count -= c; cmpltd += c; ffc18714: 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); ffc18718: 7c 84 e2 14 add r4,r4,r28 ffc1871c: 48 00 c9 29 bl ffc25044 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) ffc18720: 7f f9 f8 51 subf. r31,r25,r31 memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; ofs = 0; ffc18724: 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) ffc18728: 41 82 00 2c beq- ffc18754 <_fat_block_read+0xb0> { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); ffc1872c: 7f a4 eb 78 mr r4,r29 ffc18730: 38 a0 00 01 li r5,1 ffc18734: 38 c1 00 08 addi r6,r1,8 ffc18738: 7f 63 db 78 mr r3,r27 ffc1873c: 4b ff fb 7d bl ffc182b8 c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; ffc18740: 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) ffc18744: 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); ffc18748: 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) ffc1874c: 41 9e ff a8 beq+ cr7,ffc186f4 <_fat_block_read+0x50> <== ALWAYS TAKEN return -1; ffc18750: 3b c0 ff ff li r30,-1 <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } ffc18754: 80 01 00 3c lwz r0,60(r1) ffc18758: 7f c3 f3 78 mr r3,r30 ffc1875c: 83 21 00 1c lwz r25,28(r1) ffc18760: 7c 08 03 a6 mtlr r0 ffc18764: 83 41 00 20 lwz r26,32(r1) ffc18768: 83 61 00 24 lwz r27,36(r1) ffc1876c: 83 81 00 28 lwz r28,40(r1) ffc18770: 83 a1 00 2c lwz r29,44(r1) ffc18774: 83 c1 00 30 lwz r30,48(r1) ffc18778: 83 e1 00 34 lwz r31,52(r1) ffc1877c: 38 21 00 38 addi r1,r1,56 ffc18780: 4e 80 00 20 blr =============================================================================== ffc188a8 <_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); ffc188a8: 80 63 00 34 lwz r3,52(r3) <== NOT EXECUTED ffc188ac: 4b ff fc 54 b ffc18500 <== NOT EXECUTED =============================================================================== ffc18784 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { ffc18784: 94 21 ff c8 stwu r1,-56(r1) ffc18788: 7c 08 02 a6 mflr r0 ffc1878c: 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) ffc18790: 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) { ffc18794: 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; ffc18798: 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) { ffc1879c: 93 21 00 1c stw r25,28(r1) ffc187a0: 7c f9 3b 78 mr r25,r7 ffc187a4: 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; ffc187a8: 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) { ffc187ac: 93 81 00 28 stw r28,40(r1) ffc187b0: 93 01 00 18 stw r24,24(r1) ffc187b4: 93 41 00 20 stw r26,32(r1) ffc187b8: 93 a1 00 2c stw r29,44(r1) ffc187bc: 93 c1 00 30 stw r30,48(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc187c0: 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; ffc187c4: 90 01 00 08 stw r0,8(r1) uint32_t c = 0; while(count > 0) ffc187c8: 41 82 00 ac beq- ffc18874 <_fat_block_write+0xf0> <== NEVER TAKEN ffc187cc: 7c ba 2b 78 mr r26,r5 ffc187d0: 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; ffc187d4: 3b 00 00 01 li r24,1 ffc187d8: 48 00 00 40 b ffc18818 <_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); ffc187dc: 4b ff fa dd bl ffc182b8 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ffc187e0: 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) ffc187e4: 2f 83 00 00 cmpwi cr7,r3,0 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); ffc187e8: 7c 99 da 14 add r4,r25,r27 ffc187ec: 7f c5 f3 78 mr r5,r30 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; ffc187f0: 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) ffc187f4: 40 9e 00 7c bne- cr7,ffc18870 <_fat_block_write+0xec> <== NEVER TAKEN return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); ffc187f8: 81 21 00 08 lwz r9,8(r1) ffc187fc: 80 69 00 24 lwz r3,36(r9) ffc18800: 7c 63 d2 14 add r3,r3,r26 ffc18804: 48 00 c8 41 bl ffc25044 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) ffc18808: 7f fe f8 51 subf. r31,r30,r31 ffc1880c: 9b 1c 00 84 stb r24,132(r28) fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ofs = 0; ffc18810: 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) ffc18814: 41 82 00 60 beq- ffc18874 <_fat_block_write+0xf0> { c = MIN(count, (fs_info->vol.bps - ofs)); ffc18818: 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); ffc1881c: 7f a4 eb 78 mr r4,r29 ffc18820: 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)); ffc18824: 7f da 00 50 subf r30,r26,r0 ffc18828: 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); ffc1882c: 38 c1 00 08 addi r6,r1,8 ffc18830: 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)); ffc18834: 40 9d 00 08 ble- cr7,ffc1883c <_fat_block_write+0xb8> ffc18838: 7f fe fb 78 mr r30,r31 if (c == fs_info->vol.bps) ffc1883c: 7f 80 f0 00 cmpw cr7,r0,r30 ffc18840: 40 9e ff 9c bne+ cr7,ffc187dc <_fat_block_write+0x58> rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); ffc18844: 7f a4 eb 78 mr r4,r29 ffc18848: 38 a0 00 02 li r5,2 ffc1884c: 7f 83 e3 78 mr r3,r28 ffc18850: 38 c1 00 08 addi r6,r1,8 ffc18854: 4b ff fa 65 bl ffc182b8 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ffc18858: 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) ffc1885c: 2f 83 00 00 cmpwi cr7,r3,0 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); ffc18860: 7c 99 da 14 add r4,r25,r27 ffc18864: 7f c5 f3 78 mr r5,r30 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; ffc18868: 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) ffc1886c: 41 9e ff 8c beq+ cr7,ffc187f8 <_fat_block_write+0x74> <== ALWAYS TAKEN return -1; ffc18870: 3b 60 ff ff li r27,-1 <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } ffc18874: 80 01 00 3c lwz r0,60(r1) ffc18878: 7f 63 db 78 mr r3,r27 ffc1887c: 83 01 00 18 lwz r24,24(r1) ffc18880: 7c 08 03 a6 mtlr r0 ffc18884: 83 21 00 1c lwz r25,28(r1) ffc18888: 83 41 00 20 lwz r26,32(r1) ffc1888c: 83 61 00 24 lwz r27,36(r1) ffc18890: 83 81 00 28 lwz r28,40(r1) ffc18894: 83 a1 00 2c lwz r29,44(r1) ffc18898: 83 c1 00 30 lwz r30,48(r1) ffc1889c: 83 e1 00 34 lwz r31,52(r1) ffc188a0: 38 21 00 38 addi r1,r1,56 ffc188a4: 4e 80 00 20 blr =============================================================================== ffc25764 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc25764: 94 21 ff 90 stwu r1,-112(r1) ffc25768: 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 ); ffc2576c: 7c 83 23 78 mr r3,r4 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc25770: 93 61 00 5c stw r27,92(r1) ffc25774: 7c bb 2b 78 mr r27,r5 ffc25778: 93 a1 00 64 stw r29,100(r1) ffc2577c: 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 ); ffc25780: 3b c1 00 24 addi r30,r1,36 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc25784: 93 e1 00 6c stw r31,108(r1) ffc25788: 7c 9f 23 78 mr r31,r4 ffc2578c: 90 01 00 74 stw r0,116(r1) ffc25790: 93 41 00 58 stw r26,88(r1) ffc25794: 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 ); ffc25798: 4b fe 1a d1 bl ffc07268 if ( old_parent_pathlen == 0 ) ffc2579c: 7c 7d 1b 79 mr. r29,r3 rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc257a0: 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 ) ffc257a4: 40 82 00 c4 bne- ffc25868 <_rename_r+0x104> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc257a8: 38 81 00 0c addi r4,r1,12 ffc257ac: 7f c5 f3 78 mr r5,r30 ffc257b0: 4b fe 39 d9 bl ffc09188 ffc257b4: 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; ffc257b8: 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; ffc257bc: 80 01 00 24 lwz r0,36(r1) name = old + old_parent_pathlen; ffc257c0: 7f ff ea 14 add r31,r31,r29 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc257c4: 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; ffc257c8: 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; ffc257cc: 90 01 00 38 stw r0,56(r1) ffc257d0: 80 01 00 28 lwz r0,40(r1) ffc257d4: 90 01 00 3c stw r0,60(r1) ffc257d8: 80 01 00 2c lwz r0,44(r1) ffc257dc: 90 01 00 40 stw r0,64(r1) ffc257e0: 80 01 00 30 lwz r0,48(r1) ffc257e4: 90 01 00 44 stw r0,68(r1) ffc257e8: 80 01 00 34 lwz r0,52(r1) ffc257ec: 90 01 00 48 stw r0,72(r1) name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc257f0: 4b ff 2a 89 bl ffc18278 ffc257f4: 7c 64 1b 78 mr r4,r3 ffc257f8: 7f e3 fb 78 mr r3,r31 ffc257fc: 4b fe 1a cd bl ffc072c8 ffc25800: 7f ff 1a 14 add r31,r31,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc25804: 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 ) ); ffc25808: 93 e1 00 08 stw r31,8(r1) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc2580c: 4b ff 2a 6d bl ffc18278 ffc25810: 38 a0 00 00 li r5,0 ffc25814: 7c 64 1b 78 mr r4,r3 ffc25818: 38 c1 00 38 addi r6,r1,56 ffc2581c: 7f e3 fb 78 mr r3,r31 ffc25820: 38 e0 00 00 li r7,0 ffc25824: 4b fe 19 1d bl ffc07140 0, &old_loc, false ); if ( result != 0 ) { ffc25828: 2f 83 00 00 cmpwi cr7,r3,0 ffc2582c: 41 9e 00 98 beq- cr7,ffc258c4 <_rename_r+0x160> if ( free_old_parentloc ) ffc25830: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_filesystem_freenode( &old_parent_loc ); return -1; ffc25834: 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 ) ffc25838: 40 9e 00 58 bne- cr7,ffc25890 <_rename_r+0x12c> if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } ffc2583c: 80 01 00 74 lwz r0,116(r1) ffc25840: 7f 43 d3 78 mr r3,r26 ffc25844: 83 61 00 5c lwz r27,92(r1) ffc25848: 7c 08 03 a6 mtlr r0 ffc2584c: 83 41 00 58 lwz r26,88(r1) ffc25850: 83 81 00 60 lwz r28,96(r1) ffc25854: 83 a1 00 64 lwz r29,100(r1) ffc25858: 83 c1 00 68 lwz r30,104(r1) ffc2585c: 83 e1 00 6c lwz r31,108(r1) ffc25860: 38 21 00 70 addi r1,r1,112 ffc25864: 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, ffc25868: 7f a4 eb 78 mr r4,r29 ffc2586c: 38 a0 00 02 li r5,2 ffc25870: 7f c6 f3 78 mr r6,r30 ffc25874: 38 e0 00 00 li r7,0 ffc25878: 4b fe 19 75 bl ffc071ec RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) return -1; ffc2587c: 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 ) ffc25880: 2f 83 00 00 cmpwi cr7,r3,0 ffc25884: 40 be ff b8 bne- cr7,ffc2583c <_rename_r+0xd8> <== NEVER TAKEN return -1; free_old_parentloc = true; ffc25888: 3b 80 00 01 li r28,1 ffc2588c: 4b ff ff 30 b ffc257bc <_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 ); ffc25890: 7f c3 f3 78 mr r3,r30 ffc25894: 4b fe 1c 39 bl ffc074cc if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } ffc25898: 80 01 00 74 lwz r0,116(r1) ffc2589c: 7f 43 d3 78 mr r3,r26 ffc258a0: 83 61 00 5c lwz r27,92(r1) ffc258a4: 7c 08 03 a6 mtlr r0 ffc258a8: 83 41 00 58 lwz r26,88(r1) ffc258ac: 83 81 00 60 lwz r28,96(r1) ffc258b0: 83 a1 00 64 lwz r29,100(r1) ffc258b4: 83 c1 00 68 lwz r30,104(r1) ffc258b8: 83 e1 00 6c lwz r31,108(r1) ffc258bc: 38 21 00 70 addi r1,r1,112 ffc258c0: 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 ); ffc258c4: 7f 63 db 78 mr r3,r27 ffc258c8: 38 81 00 0c addi r4,r1,12 ffc258cc: 38 a1 00 10 addi r5,r1,16 ffc258d0: 4b fe 38 b9 bl ffc09188 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); ffc258d4: 81 21 00 1c lwz r9,28(r1) ffc258d8: 80 61 00 0c lwz r3,12(r1) ffc258dc: 38 81 00 10 addi r4,r1,16 ffc258e0: 80 09 00 04 lwz r0,4(r9) ffc258e4: 38 a1 00 08 addi r5,r1,8 ffc258e8: 7c 7b 1a 14 add r3,r27,r3 ffc258ec: 7c 09 03 a6 mtctr r0 ffc258f0: 4e 80 04 21 bctrl if ( result != 0 ) { ffc258f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc258f8: 40 9e 00 c0 bne- cr7,ffc259b8 <_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 ) { ffc258fc: 80 01 00 20 lwz r0,32(r1) ffc25900: 81 21 00 34 lwz r9,52(r1) ffc25904: 7f 89 00 00 cmpw cr7,r9,r0 ffc25908: 40 9e 00 78 bne- cr7,ffc25980 <_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 ); ffc2590c: 81 21 00 1c lwz r9,28(r1) ffc25910: 38 81 00 38 addi r4,r1,56 ffc25914: 38 a1 00 10 addi r5,r1,16 ffc25918: 80 c1 00 08 lwz r6,8(r1) ffc2591c: 80 09 00 40 lwz r0,64(r9) ffc25920: 7f c3 f3 78 mr r3,r30 ffc25924: 7c 09 03 a6 mtctr r0 ffc25928: 4e 80 04 21 bctrl ffc2592c: 7c 7a 1b 78 mr r26,r3 rtems_filesystem_freenode( &new_parent_loc ); ffc25930: 38 61 00 10 addi r3,r1,16 ffc25934: 4b fe 1b 99 bl ffc074cc if ( free_old_parentloc ) ffc25938: 2f 9c 00 00 cmpwi cr7,r28,0 ffc2593c: 40 9e 00 38 bne- cr7,ffc25974 <_rename_r+0x210> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); ffc25940: 38 61 00 38 addi r3,r1,56 ffc25944: 4b fe 1b 89 bl ffc074cc return result; } ffc25948: 80 01 00 74 lwz r0,116(r1) ffc2594c: 7f 43 d3 78 mr r3,r26 ffc25950: 83 61 00 5c lwz r27,92(r1) ffc25954: 7c 08 03 a6 mtlr r0 ffc25958: 83 41 00 58 lwz r26,88(r1) ffc2595c: 83 81 00 60 lwz r28,96(r1) ffc25960: 83 a1 00 64 lwz r29,100(r1) ffc25964: 83 c1 00 68 lwz r30,104(r1) ffc25968: 83 e1 00 6c lwz r31,108(r1) ffc2596c: 38 21 00 70 addi r1,r1,112 ffc25970: 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 ); ffc25974: 7f c3 f3 78 mr r3,r30 ffc25978: 4b fe 1b 55 bl ffc074cc ffc2597c: 4b ff ff c4 b ffc25940 <_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 ); ffc25980: 38 61 00 10 addi r3,r1,16 ffc25984: 4b fe 1b 49 bl ffc074cc if ( free_old_parentloc ) ffc25988: 2f 9c 00 00 cmpwi cr7,r28,0 ffc2598c: 40 9e 00 20 bne- cr7,ffc259ac <_rename_r+0x248> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); ffc25990: 38 61 00 38 addi r3,r1,56 ffc25994: 4b fe 1b 39 bl ffc074cc rtems_set_errno_and_return_minus_one( EXDEV ); ffc25998: 3b 40 ff ff li r26,-1 ffc2599c: 4b ff 10 91 bl ffc16a2c <__errno> ffc259a0: 38 00 00 12 li r0,18 ffc259a4: 90 03 00 00 stw r0,0(r3) ffc259a8: 4b ff fe 94 b ffc2583c <_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 ); ffc259ac: 7f c3 f3 78 mr r3,r30 ffc259b0: 4b fe 1b 1d bl ffc074cc ffc259b4: 4b ff ff dc b ffc25990 <_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 ); ffc259b8: 38 61 00 10 addi r3,r1,16 ffc259bc: 4b fe 1b 11 bl ffc074cc if ( free_old_parentloc ) ffc259c0: 2f 9c 00 00 cmpwi cr7,r28,0 ffc259c4: 41 be 00 0c beq+ cr7,ffc259d0 <_rename_r+0x26c> rtems_filesystem_freenode( &old_parent_loc ); ffc259c8: 7f c3 f3 78 mr r3,r30 ffc259cc: 4b fe 1b 01 bl ffc074cc rtems_filesystem_freenode( &old_loc ); ffc259d0: 38 61 00 38 addi r3,r1,56 ffc259d4: 4b fe 1a f9 bl ffc074cc return -1; ffc259d8: 3b 40 ff ff li r26,-1 ffc259dc: 4b ff fe 60 b ffc2583c <_rename_r+0xd8> =============================================================================== ffc08da8 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { ffc08da8: 94 21 ff d8 stwu r1,-40(r1) ffc08dac: 7d 80 00 26 mfcr r12 ffc08db0: 7c 08 02 a6 mflr r0 ffc08db4: 93 e1 00 24 stw r31,36(r1) long adjustment; /* * Simple validations */ if ( !delta ) ffc08db8: 7c 7f 1b 79 mr. r31,r3 int adjtime( struct timeval *delta, struct timeval *olddelta ) { ffc08dbc: 93 c1 00 20 stw r30,32(r1) ffc08dc0: 7c 9e 23 78 mr r30,r4 ffc08dc4: 90 01 00 2c stw r0,44(r1) ffc08dc8: 91 81 00 1c stw r12,28(r1) long adjustment; /* * Simple validations */ if ( !delta ) ffc08dcc: 41 82 01 70 beq- ffc08f3c rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) ffc08dd0: 81 3f 00 04 lwz r9,4(r31) ffc08dd4: 3c 00 00 0f lis r0,15 ffc08dd8: 60 00 42 3f ori r0,r0,16959 ffc08ddc: 7f 89 00 40 cmplw cr7,r9,r0 ffc08de0: 41 9d 01 5c bgt- cr7,ffc08f3c rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { ffc08de4: 2e 04 00 00 cmpwi cr4,r4,0 ffc08de8: 41 92 00 14 beq- cr4,ffc08dfc olddelta->tv_sec = 0; ffc08dec: 38 00 00 00 li r0,0 olddelta->tv_usec = 0; ffc08df0: 90 04 00 04 stw r0,4(r4) if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0; ffc08df4: 90 04 00 00 stw r0,0(r4) olddelta->tv_usec = 0; ffc08df8: 81 3f 00 04 lwz r9,4(r31) } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); ffc08dfc: 80 1f 00 00 lwz r0,0(r31) adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) return 0; ffc08e00: 38 60 00 00 li r3,0 olddelta->tv_sec = 0; olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); ffc08e04: 54 0a 40 2e rlwinm r10,r0,8,0,23 ffc08e08: 54 0b 18 38 rlwinm r11,r0,3,0,28 ffc08e0c: 7d 6b 50 50 subf r11,r11,r10 ffc08e10: 55 6a 30 32 rlwinm r10,r11,6,0,25 ffc08e14: 7d 6b 50 50 subf r11,r11,r10 ffc08e18: 7c 0b 02 14 add r0,r11,r0 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) ffc08e1c: 3d 60 00 00 lis r11,0 olddelta->tv_sec = 0; olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); ffc08e20: 54 00 30 32 rlwinm r0,r0,6,0,25 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) ffc08e24: 81 4b 20 10 lwz r10,8208(r11) olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); adjustment += delta->tv_usec; ffc08e28: 7d 20 4a 14 add r9,r0,r9 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) ffc08e2c: 7f 89 50 40 cmplw cr7,r9,r10 ffc08e30: 40 9c 00 24 bge- cr7,ffc08e54 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } ffc08e34: 80 01 00 2c lwz r0,44(r1) ffc08e38: 81 81 00 1c lwz r12,28(r1) ffc08e3c: 7c 08 03 a6 mtlr r0 ffc08e40: 83 c1 00 20 lwz r30,32(r1) ffc08e44: 83 e1 00 24 lwz r31,36(r1) ffc08e48: 7d 80 81 20 mtcrf 8,r12 ffc08e4c: 38 21 00 28 addi r1,r1,40 ffc08e50: 4e 80 00 20 blr * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc08e54: 3d 20 00 00 lis r9,0 ffc08e58: 81 69 29 28 lwz r11,10536(r9) ffc08e5c: 38 0b 00 01 addi r0,r11,1 ffc08e60: 90 09 29 28 stw r0,10536(r9) return _Thread_Dispatch_disable_level; ffc08e64: 80 09 29 28 lwz r0,10536(r9) * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); ffc08e68: 38 61 00 08 addi r3,r1,8 ffc08e6c: 48 00 1f 6d bl ffc0add8 <_TOD_Get> ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc08e70: 81 3f 00 04 lwz r9,4(r31) ffc08e74: 80 01 00 0c lwz r0,12(r1) ffc08e78: 1d 29 03 e8 mulli r9,r9,1000 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ffc08e7c: 81 41 00 08 lwz r10,8(r1) ffc08e80: 81 7f 00 00 lwz r11,0(r31) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc08e84: 7d 29 02 14 add r9,r9,r0 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc08e88: 3c 00 3b 9a lis r0,15258 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc08e8c: 91 21 00 0c stw r9,12(r1) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc08e90: 60 00 c9 ff ori r0,r0,51711 ffc08e94: 7f 89 00 40 cmplw cr7,r9,r0 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ffc08e98: 7d 6a 5a 14 add r11,r10,r11 ffc08e9c: 91 61 00 08 stw r11,8(r1) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc08ea0: 40 9d 00 20 ble- cr7,ffc08ec0 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ffc08ea4: 3d 29 c4 65 addis r9,r9,-15259 ffc08ea8: 39 29 36 00 addi r9,r9,13824 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc08eac: 7f 89 00 40 cmplw cr7,r9,r0 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; ffc08eb0: 39 6b 00 01 addi r11,r11,1 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc08eb4: 41 9d ff f0 bgt+ cr7,ffc08ea4 <== NEVER TAKEN ffc08eb8: 91 21 00 0c stw r9,12(r1) ffc08ebc: 91 61 00 08 stw r11,8(r1) ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ffc08ec0: 3c 00 c4 65 lis r0,-15259 ffc08ec4: 60 00 36 00 ori r0,r0,13824 ffc08ec8: 7f 89 00 40 cmplw cr7,r9,r0 ffc08ecc: 41 9d 00 24 bgt- cr7,ffc08ef0 <== NEVER TAKEN ffc08ed0: 81 61 00 08 lwz r11,8(r1) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ffc08ed4: 3d 29 3b 9b addis r9,r9,15259 ffc08ed8: 39 29 ca 00 addi r9,r9,-13824 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ffc08edc: 7f 89 00 40 cmplw cr7,r9,r0 ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; ffc08ee0: 39 6b ff ff addi r11,r11,-1 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ffc08ee4: 40 9d ff f0 ble+ cr7,ffc08ed4 ffc08ee8: 91 21 00 0c stw r9,12(r1) ffc08eec: 91 61 00 08 stw r11,8(r1) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); ffc08ef0: 38 61 00 08 addi r3,r1,8 ffc08ef4: 48 00 1f b5 bl ffc0aea8 <_TOD_Set> _Thread_Enable_dispatch(); ffc08ef8: 48 00 3c e1 bl ffc0cbd8 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) ffc08efc: 41 92 00 38 beq- cr4,ffc08f34 *olddelta = *delta; return 0; } ffc08f00: 80 01 00 2c lwz r0,44(r1) /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; ffc08f04: 38 60 00 00 li r3,0 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; ffc08f08: 81 5f 00 00 lwz r10,0(r31) return 0; } ffc08f0c: 7c 08 03 a6 mtlr r0 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; ffc08f10: 81 7f 00 04 lwz r11,4(r31) return 0; } ffc08f14: 81 81 00 1c lwz r12,28(r1) _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; ffc08f18: 91 5e 00 00 stw r10,0(r30) return 0; } ffc08f1c: 7d 80 81 20 mtcrf 8,r12 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; ffc08f20: 91 7e 00 04 stw r11,4(r30) return 0; } ffc08f24: 83 e1 00 24 lwz r31,36(r1) ffc08f28: 83 c1 00 20 lwz r30,32(r1) ffc08f2c: 38 21 00 28 addi r1,r1,40 ffc08f30: 4e 80 00 20 blr /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; ffc08f34: 38 60 00 00 li r3,0 ffc08f38: 4b ff fe fc b ffc08e34 */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc08f3c: 48 00 b5 ed bl ffc14528 <__errno> ffc08f40: 38 00 00 16 li r0,22 ffc08f44: 90 03 00 00 stw r0,0(r3) ffc08f48: 38 60 ff ff li r3,-1 ffc08f4c: 4b ff fe e8 b ffc08e34 =============================================================================== ffc098b0 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { ffc098b0: 94 21 ff e8 stwu r1,-24(r1) ffc098b4: 7c 08 02 a6 mflr r0 ffc098b8: 93 e1 00 14 stw r31,20(r1) rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); ffc098bc: 3f e0 00 00 lis r31,0 ffc098c0: 3b ff 2c 70 addi r31,r31,11376 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { ffc098c4: 93 a1 00 0c stw r29,12(r1) ffc098c8: 7c 7d 1b 78 mr r29,r3 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); ffc098cc: 7f e3 fb 78 mr r3,r31 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { ffc098d0: 90 01 00 1c stw r0,28(r1) ffc098d4: 93 c1 00 10 stw r30,16(r1) ffc098d8: 7c 9e 23 78 mr r30,r4 ffc098dc: 93 81 00 08 stw r28,8(r1) rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); ffc098e0: 48 00 16 45 bl ffc0af24 if (fcntl (fildes, F_GETFD) < 0) { ffc098e4: 7f a3 eb 78 mr r3,r29 ffc098e8: 38 80 00 01 li r4,1 ffc098ec: 4c c6 31 82 crclr 4*cr1+eq ffc098f0: 48 00 8f 75 bl ffc12864 ffc098f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc098f8: 41 9c 01 bc blt- cr7,ffc09ab4 pthread_mutex_unlock(&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EBADF); } /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { ffc098fc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09900: 41 9e 01 08 beq- cr7,ffc09a08 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { ffc09904: 83 9e 00 00 lwz r28,0(r30) ffc09908: 7f 9c e8 00 cmpw cr7,r28,r29 ffc0990c: 40 9e 00 e0 bne- cr7,ffc099ec pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); ffc09910: 38 7f 00 48 addi r3,r31,72 ffc09914: 7f 84 e3 78 mr r4,r28 ffc09918: 38 a0 00 00 li r5,0 ffc0991c: 48 00 03 bd bl ffc09cd8 if (r_chain == NULL) { ffc09920: 7c 7d 1b 79 mr. r29,r3 ffc09924: 41 82 00 54 beq- ffc09978 return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); ffc09928: 3b 9d 00 1c addi r28,r29,28 ffc0992c: 7f 83 e3 78 mr r3,r28 ffc09930: 48 00 15 f5 bl ffc0af24 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); ffc09934: 7f c4 f3 78 mr r4,r30 ffc09938: 38 7d 00 08 addi r3,r29,8 ffc0993c: 48 00 09 19 bl ffc0a254 ffc09940: 7c 7e 1b 78 mr r30,r3 pthread_mutex_unlock (&r_chain->mutex); ffc09944: 7f 83 e3 78 mr r3,r28 ffc09948: 48 00 16 a9 bl ffc0aff0 pthread_mutex_unlock (&aio_request_queue.mutex); ffc0994c: 7f e3 fb 78 mr r3,r31 ffc09950: 48 00 16 a1 bl ffc0aff0 return result; } return AIO_ALLDONE; } ffc09954: 80 01 00 1c lwz r0,28(r1) ffc09958: 7f c3 f3 78 mr r3,r30 ffc0995c: 83 81 00 08 lwz r28,8(r1) ffc09960: 7c 08 03 a6 mtlr r0 ffc09964: 83 a1 00 0c lwz r29,12(r1) ffc09968: 83 c1 00 10 lwz r30,16(r1) ffc0996c: 83 e1 00 14 lwz r31,20(r1) ffc09970: 38 21 00 18 addi r1,r1,24 ffc09974: 4e 80 00 20 blr rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { ffc09978: 81 3f 00 54 lwz r9,84(r31) ffc0997c: 38 1f 00 58 addi r0,r31,88 ffc09980: 7f 89 00 00 cmpw cr7,r9,r0 ffc09984: 41 9e 00 58 beq- cr7,ffc099dc <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); ffc09988: 38 7f 00 54 addi r3,r31,84 ffc0998c: 7f 84 e3 78 mr r4,r28 ffc09990: 38 a0 00 00 li r5,0 ffc09994: 48 00 03 45 bl ffc09cd8 if (r_chain == NULL) { ffc09998: 2c 03 00 00 cmpwi r3,0 ffc0999c: 41 82 00 50 beq- ffc099ec rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); ffc099a0: 7f c4 f3 78 mr r4,r30 ffc099a4: 38 63 00 08 addi r3,r3,8 ffc099a8: 48 00 08 ad bl ffc0a254 ffc099ac: 7c 7e 1b 78 mr r30,r3 pthread_mutex_unlock (&aio_request_queue.mutex); ffc099b0: 7f e3 fb 78 mr r3,r31 ffc099b4: 48 00 16 3d bl ffc0aff0 pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } ffc099b8: 80 01 00 1c lwz r0,28(r1) ffc099bc: 7f c3 f3 78 mr r3,r30 ffc099c0: 83 81 00 08 lwz r28,8(r1) ffc099c4: 7c 08 03 a6 mtlr r0 ffc099c8: 83 a1 00 0c lwz r29,12(r1) ffc099cc: 83 c1 00 10 lwz r30,16(r1) ffc099d0: 83 e1 00 14 lwz r31,20(r1) ffc099d4: 38 21 00 18 addi r1,r1,24 ffc099d8: 4e 80 00 20 blr result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } else { pthread_mutex_unlock (&aio_request_queue.mutex); ffc099dc: 7f e3 fb 78 mr r3,r31 ffc099e0: 48 00 16 11 bl ffc0aff0 return AIO_ALLDONE; ffc099e4: 3b c0 00 02 li r30,2 ffc099e8: 4b ff ff 6c b ffc09954 r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock (&aio_request_queue.mutex); ffc099ec: 7f e3 fb 78 mr r3,r31 ffc099f0: 48 00 16 01 bl ffc0aff0 rtems_set_errno_and_return_minus_one (EINVAL); ffc099f4: 3b c0 ff ff li r30,-1 ffc099f8: 48 00 d2 d1 bl ffc16cc8 <__errno> ffc099fc: 38 00 00 16 li r0,22 ffc09a00: 90 03 00 00 stw r0,0(r3) ffc09a04: 4b ff ff 50 b ffc09954 /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); ffc09a08: 38 7f 00 48 addi r3,r31,72 ffc09a0c: 7f a4 eb 78 mr r4,r29 ffc09a10: 38 a0 00 00 li r5,0 ffc09a14: 48 00 02 c5 bl ffc09cd8 if (r_chain == NULL) { ffc09a18: 7c 7e 1b 79 mr. r30,r3 ffc09a1c: 41 82 00 38 beq- ffc09a54 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); ffc09a20: 3b be 00 1c addi r29,r30,28 ffc09a24: 7f a3 eb 78 mr r3,r29 ffc09a28: 48 00 14 fd bl ffc0af24 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc09a2c: 7f c3 f3 78 mr r3,r30 ffc09a30: 48 00 37 5d bl ffc0d18c <_Chain_Extract> rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); ffc09a34: 7f c3 f3 78 mr r3,r30 ffc09a38: 48 00 07 95 bl ffc0a1cc pthread_mutex_unlock (&r_chain->mutex); ffc09a3c: 7f a3 eb 78 mr r3,r29 ffc09a40: 48 00 15 b1 bl ffc0aff0 pthread_mutex_unlock (&aio_request_queue.mutex); ffc09a44: 7f e3 fb 78 mr r3,r31 ffc09a48: 48 00 15 a9 bl ffc0aff0 return AIO_CANCELED; ffc09a4c: 3b c0 00 00 li r30,0 ffc09a50: 4b ff ff 04 b ffc09954 r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { ffc09a54: 81 3f 00 54 lwz r9,84(r31) ffc09a58: 38 1f 00 58 addi r0,r31,88 ffc09a5c: 7f 89 00 00 cmpw cr7,r9,r0 ffc09a60: 41 be ff 7c beq- cr7,ffc099dc <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); ffc09a64: 38 7f 00 54 addi r3,r31,84 ffc09a68: 7f a4 eb 78 mr r4,r29 ffc09a6c: 38 a0 00 00 li r5,0 ffc09a70: 48 00 02 69 bl ffc09cd8 if (r_chain == NULL) { ffc09a74: 7c 7e 1b 79 mr. r30,r3 ffc09a78: 41 a2 ff 64 beq- ffc099dc AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); ffc09a7c: 3b be 00 1c addi r29,r30,28 ffc09a80: 48 00 37 0d bl ffc0d18c <_Chain_Extract> } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); ffc09a84: 7f c3 f3 78 mr r3,r30 ffc09a88: 48 00 07 45 bl ffc0a1cc pthread_mutex_destroy (&r_chain->mutex); ffc09a8c: 7f a3 eb 78 mr r3,r29 ffc09a90: 48 00 11 49 bl ffc0abd8 pthread_cond_destroy (&r_chain->mutex); ffc09a94: 7f a3 eb 78 mr r3,r29 ffc09a98: 48 00 0c 89 bl ffc0a720 free (r_chain); ffc09a9c: 7f c3 f3 78 mr r3,r30 ffc09aa0: 4b ff bf 71 bl ffc05a10 pthread_mutex_unlock (&aio_request_queue.mutex); ffc09aa4: 7f e3 fb 78 mr r3,r31 ffc09aa8: 48 00 15 49 bl ffc0aff0 return AIO_CANCELED; ffc09aac: 3b c0 00 00 li r30,0 ffc09ab0: 4b ff fe a4 b ffc09954 int result; pthread_mutex_lock (&aio_request_queue.mutex); if (fcntl (fildes, F_GETFD) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); ffc09ab4: 7f e3 fb 78 mr r3,r31 ffc09ab8: 48 00 15 39 bl ffc0aff0 rtems_set_errno_and_return_minus_one (EBADF); ffc09abc: 3b c0 ff ff li r30,-1 ffc09ac0: 48 00 d2 09 bl ffc16cc8 <__errno> ffc09ac4: 38 00 00 09 li r0,9 ffc09ac8: 90 03 00 00 stw r0,0(r3) ffc09acc: 4b ff fe 88 b ffc09954 =============================================================================== ffc09ad8 : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) ffc09ad8: 2f 83 20 00 cmpwi cr7,r3,8192 int aio_fsync( int op, struct aiocb *aiocbp ) { ffc09adc: 94 21 ff f0 stwu r1,-16(r1) ffc09ae0: 7c 08 02 a6 mflr r0 ffc09ae4: 93 c1 00 08 stw r30,8(r1) rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); ffc09ae8: 3b c0 00 16 li r30,22 int aio_fsync( int op, struct aiocb *aiocbp ) { ffc09aec: 93 e1 00 0c stw r31,12(r1) ffc09af0: 7c 9f 23 78 mr r31,r4 ffc09af4: 90 01 00 14 stw r0,20(r1) rtems_aio_request *req; int mode; if (op != O_SYNC) ffc09af8: 40 9e 00 64 bne- cr7,ffc09b5c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc09afc: 80 64 00 00 lwz r3,0(r4) ffc09b00: 38 80 00 03 li r4,3 ffc09b04: 4c c6 31 82 crclr 4*cr1+eq ffc09b08: 48 00 8d 5d bl ffc12864 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc09b0c: 54 63 07 be clrlwi r3,r3,30 ffc09b10: 38 63 ff ff addi r3,r3,-1 ffc09b14: 2b 83 00 01 cmplwi cr7,r3,1 ffc09b18: 41 9d 00 40 bgt- cr7,ffc09b58 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); ffc09b1c: 38 60 00 18 li r3,24 ffc09b20: 4b ff c6 95 bl ffc061b4 if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc09b24: 3b c0 00 0b li r30,11 mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) ffc09b28: 7c 69 1b 79 mr. r9,r3 ffc09b2c: 41 82 00 30 beq- ffc09b5c <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; ffc09b30: 38 00 00 03 li r0,3 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; ffc09b34: 93 e9 00 14 stw r31,20(r9) req->aiocbp->aio_lio_opcode = LIO_SYNC; ffc09b38: 90 1f 00 30 stw r0,48(r31) return rtems_aio_enqueue (req); ffc09b3c: 48 00 07 ad bl ffc0a2e8 } ffc09b40: 80 01 00 14 lwz r0,20(r1) ffc09b44: 83 c1 00 08 lwz r30,8(r1) ffc09b48: 7c 08 03 a6 mtlr r0 ffc09b4c: 83 e1 00 0c lwz r31,12(r1) ffc09b50: 38 21 00 10 addi r1,r1,16 ffc09b54: 4e 80 00 20 blr if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc09b58: 3b c0 00 09 li r30,9 ffc09b5c: 38 00 ff ff li r0,-1 ffc09b60: 93 df 00 34 stw r30,52(r31) ffc09b64: 90 1f 00 38 stw r0,56(r31) ffc09b68: 48 00 d1 61 bl ffc16cc8 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } ffc09b6c: 80 01 00 14 lwz r0,20(r1) if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc09b70: 93 c3 00 00 stw r30,0(r3) ffc09b74: 38 60 ff ff li r3,-1 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } ffc09b78: 7c 08 03 a6 mtlr r0 ffc09b7c: 83 c1 00 08 lwz r30,8(r1) ffc09b80: 83 e1 00 0c lwz r31,12(r1) ffc09b84: 38 21 00 10 addi r1,r1,16 ffc09b88: 4e 80 00 20 blr =============================================================================== ffc0a518 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { ffc0a518: 94 21 ff f0 stwu r1,-16(r1) ffc0a51c: 7c 08 02 a6 mflr r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a520: 38 80 00 03 li r4,3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { ffc0a524: 90 01 00 14 stw r0,20(r1) ffc0a528: 93 e1 00 0c stw r31,12(r1) ffc0a52c: 7c 7f 1b 78 mr r31,r3 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a530: 80 63 00 00 lwz r3,0(r3) * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { ffc0a534: 93 c1 00 08 stw r30,8(r1) rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a538: 4c c6 31 82 crclr 4*cr1+eq ffc0a53c: 48 00 83 29 bl ffc12864 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc0a540: 70 63 00 03 andi. r3,r3,3 ffc0a544: 41 82 00 10 beq- ffc0a554 <== NEVER TAKEN ffc0a548: 2f 83 00 02 cmpwi cr7,r3,2 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc0a54c: 3b c0 00 09 li r30,9 { rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc0a550: 40 9e 00 5c bne- cr7,ffc0a5ac rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) ffc0a554: 80 1f 00 18 lwz r0,24(r31) ffc0a558: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a55c: 40 9e 00 4c bne- cr7,ffc0a5a8 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) ffc0a560: 80 1f 00 08 lwz r0,8(r31) ffc0a564: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a568: 41 9c 00 40 blt- cr7,ffc0a5a8 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); ffc0a56c: 38 60 00 18 li r3,24 ffc0a570: 4b ff bc 45 bl ffc061b4 if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc0a574: 3b c0 00 0b li r30,11 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) ffc0a578: 7c 69 1b 79 mr. r9,r3 ffc0a57c: 41 82 00 30 beq- ffc0a5ac <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; ffc0a580: 38 00 00 01 li r0,1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; ffc0a584: 93 e9 00 14 stw r31,20(r9) req->aiocbp->aio_lio_opcode = LIO_READ; ffc0a588: 90 1f 00 30 stw r0,48(r31) return rtems_aio_enqueue (req); ffc0a58c: 4b ff fd 5d bl ffc0a2e8 } ffc0a590: 80 01 00 14 lwz r0,20(r1) ffc0a594: 83 c1 00 08 lwz r30,8(r1) ffc0a598: 7c 08 03 a6 mtlr r0 ffc0a59c: 83 e1 00 0c lwz r31,12(r1) ffc0a5a0: 38 21 00 10 addi r1,r1,16 ffc0a5a4: 4e 80 00 20 blr mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); ffc0a5a8: 3b c0 00 16 li r30,22 ffc0a5ac: 38 00 ff ff li r0,-1 ffc0a5b0: 93 df 00 34 stw r30,52(r31) ffc0a5b4: 90 1f 00 38 stw r0,56(r31) ffc0a5b8: 48 00 c7 11 bl ffc16cc8 <__errno> ffc0a5bc: 93 c3 00 00 stw r30,0(r3) ffc0a5c0: 38 60 ff ff li r3,-1 ffc0a5c4: 4b ff ff cc b ffc0a590 =============================================================================== ffc0a5d0 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { ffc0a5d0: 94 21 ff f0 stwu r1,-16(r1) ffc0a5d4: 7c 08 02 a6 mflr r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a5d8: 38 80 00 03 li r4,3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { ffc0a5dc: 90 01 00 14 stw r0,20(r1) ffc0a5e0: 93 e1 00 0c stw r31,12(r1) ffc0a5e4: 7c 7f 1b 78 mr r31,r3 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a5e8: 80 63 00 00 lwz r3,0(r3) * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { ffc0a5ec: 93 c1 00 08 stw r30,8(r1) rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc0a5f0: 3b c0 00 09 li r30,9 aio_write (struct aiocb *aiocbp) { rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a5f4: 4c c6 31 82 crclr 4*cr1+eq ffc0a5f8: 48 00 82 6d bl ffc12864 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc0a5fc: 54 63 07 be clrlwi r3,r3,30 ffc0a600: 38 63 ff ff addi r3,r3,-1 ffc0a604: 2b 83 00 01 cmplwi cr7,r3,1 ffc0a608: 41 9d 00 5c bgt- cr7,ffc0a664 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) ffc0a60c: 80 1f 00 18 lwz r0,24(r31) ffc0a610: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a614: 40 9e 00 4c bne- cr7,ffc0a660 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) ffc0a618: 80 1f 00 08 lwz r0,8(r31) ffc0a61c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a620: 41 9c 00 40 blt- cr7,ffc0a660 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); ffc0a624: 38 60 00 18 li r3,24 ffc0a628: 4b ff bb 8d bl ffc061b4 if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc0a62c: 3b c0 00 0b li r30,11 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) ffc0a630: 7c 69 1b 79 mr. r9,r3 ffc0a634: 41 82 00 30 beq- ffc0a664 <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; ffc0a638: 38 00 00 02 li r0,2 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; ffc0a63c: 93 e9 00 14 stw r31,20(r9) req->aiocbp->aio_lio_opcode = LIO_WRITE; ffc0a640: 90 1f 00 30 stw r0,48(r31) return rtems_aio_enqueue (req); ffc0a644: 4b ff fc a5 bl ffc0a2e8 } ffc0a648: 80 01 00 14 lwz r0,20(r1) ffc0a64c: 83 c1 00 08 lwz r30,8(r1) ffc0a650: 7c 08 03 a6 mtlr r0 ffc0a654: 83 e1 00 0c lwz r31,12(r1) ffc0a658: 38 21 00 10 addi r1,r1,16 ffc0a65c: 4e 80 00 20 blr mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); ffc0a660: 3b c0 00 16 li r30,22 ffc0a664: 38 00 ff ff li r0,-1 ffc0a668: 93 df 00 34 stw r30,52(r31) ffc0a66c: 90 1f 00 38 stw r0,56(r31) ffc0a670: 48 00 c6 59 bl ffc16cc8 <__errno> ffc0a674: 93 c3 00 00 stw r30,0(r3) ffc0a678: 38 60 ff ff li r3,-1 ffc0a67c: 4b ff ff cc b ffc0a648 =============================================================================== 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 5c lwz r30,10076(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 2b 70 addi r0,r9,11120 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 66 ac addi r3,r3,26284 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 5c lwz r3,10076(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 5c lwz r9,10076(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 5c lwz r0,10076(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 f9 bd bl ffc16a2c <__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 f9 a9 bl ffc16a2c <__errno> ffc07088: 7c 7f 1b 78 mr r31,r3 ffc0708c: 48 00 f9 a1 bl ffc16a2c <__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 =============================================================================== ffc08be8 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { if ( !tp ) ffc08be8: 2c 04 00 00 cmpwi r4,0 int clock_gettime( clockid_t clock_id, struct timespec *tp ) { ffc08bec: 94 21 ff f8 stwu r1,-8(r1) ffc08bf0: 7c 08 02 a6 mflr r0 ffc08bf4: 90 01 00 0c stw r0,12(r1) if ( !tp ) ffc08bf8: 41 82 00 24 beq- ffc08c1c rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { ffc08bfc: 2f 83 00 01 cmpwi cr7,r3,1 ffc08c00: 41 9e 00 78 beq- cr7,ffc08c78 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { ffc08c04: 2f 83 00 04 cmpwi cr7,r3,4 ffc08c08: 41 9e 00 54 beq- cr7,ffc08c5c <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { ffc08c0c: 2f 83 00 02 cmpwi cr7,r3,2 ffc08c10: 41 9e 00 4c beq- cr7,ffc08c5c return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) ffc08c14: 2f 83 00 03 cmpwi cr7,r3,3 ffc08c18: 41 9e 00 24 beq- cr7,ffc08c3c rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); ffc08c1c: 48 00 c0 95 bl ffc14cb0 <__errno> ffc08c20: 38 00 00 16 li r0,22 ffc08c24: 90 03 00 00 stw r0,0(r3) ffc08c28: 38 60 ff ff li r3,-1 return 0; } ffc08c2c: 80 01 00 0c lwz r0,12(r1) ffc08c30: 38 21 00 08 addi r1,r1,8 ffc08c34: 7c 08 03 a6 mtlr r0 ffc08c38: 4e 80 00 20 blr } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); ffc08c3c: 48 00 c0 75 bl ffc14cb0 <__errno> ffc08c40: 38 00 00 58 li r0,88 ffc08c44: 90 03 00 00 stw r0,0(r3) ffc08c48: 38 60 ff ff li r3,-1 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08c4c: 80 01 00 0c lwz r0,12(r1) ffc08c50: 38 21 00 08 addi r1,r1,8 ffc08c54: 7c 08 03 a6 mtlr r0 ffc08c58: 4e 80 00 20 blr } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { _TOD_Get_uptime_as_timespec( tp ); ffc08c5c: 7c 83 23 78 mr r3,r4 ffc08c60: 48 00 29 45 bl ffc0b5a4 <_TOD_Get_uptime_as_timespec> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08c64: 80 01 00 0c lwz r0,12(r1) #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { _TOD_Get_uptime_as_timespec( tp ); return 0; ffc08c68: 38 60 00 00 li r3,0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08c6c: 7c 08 03 a6 mtlr r0 ffc08c70: 38 21 00 08 addi r1,r1,8 ffc08c74: 4e 80 00 20 blr { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); ffc08c78: 7c 83 23 78 mr r3,r4 ffc08c7c: 48 00 28 91 bl ffc0b50c <_TOD_Get> return 0; ffc08c80: 38 60 00 00 li r3,0 ffc08c84: 4b ff ff a8 b ffc08c2c =============================================================================== ffc08c88 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { if ( !tp ) ffc08c88: 2c 04 00 00 cmpwi r4,0 int clock_settime( clockid_t clock_id, const struct timespec *tp ) { ffc08c8c: 94 21 ff f8 stwu r1,-8(r1) ffc08c90: 7c 08 02 a6 mflr r0 ffc08c94: 90 01 00 0c stw r0,12(r1) if ( !tp ) ffc08c98: 41 82 00 1c beq- ffc08cb4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { ffc08c9c: 2f 83 00 01 cmpwi cr7,r3,1 ffc08ca0: 41 9e 00 34 beq- cr7,ffc08cd4 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) ffc08ca4: 2f 83 00 02 cmpwi cr7,r3,2 ffc08ca8: 41 9e 00 74 beq- cr7,ffc08d1c rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) ffc08cac: 2f 83 00 03 cmpwi cr7,r3,3 ffc08cb0: 41 9e 00 6c beq- cr7,ffc08d1c rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); ffc08cb4: 48 00 bf fd bl ffc14cb0 <__errno> ffc08cb8: 38 00 00 16 li r0,22 ffc08cbc: 90 03 00 00 stw r0,0(r3) ffc08cc0: 38 60 ff ff li r3,-1 return 0; } ffc08cc4: 80 01 00 0c lwz r0,12(r1) ffc08cc8: 38 21 00 08 addi r1,r1,8 ffc08ccc: 7c 08 03 a6 mtlr r0 ffc08cd0: 4e 80 00 20 blr { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) ffc08cd4: 81 24 00 00 lwz r9,0(r4) ffc08cd8: 3c 00 21 da lis r0,8666 ffc08cdc: 60 00 e4 ff ori r0,r0,58623 ffc08ce0: 7f 89 00 40 cmplw cr7,r9,r0 ffc08ce4: 40 bd ff d0 ble- cr7,ffc08cb4 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc08ce8: 3d 20 00 00 lis r9,0 ffc08cec: 81 69 28 78 lwz r11,10360(r9) ffc08cf0: 38 0b 00 01 addi r0,r11,1 ffc08cf4: 90 09 28 78 stw r0,10360(r9) return _Thread_Dispatch_disable_level; ffc08cf8: 80 09 28 78 lwz r0,10360(r9) rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); ffc08cfc: 7c 83 23 78 mr r3,r4 ffc08d00: 48 00 29 1d bl ffc0b61c <_TOD_Set> _Thread_Enable_dispatch(); ffc08d04: 48 00 46 49 bl ffc0d34c <_Thread_Enable_dispatch> #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08d08: 80 01 00 0c lwz r0,12(r1) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; ffc08d0c: 38 60 00 00 li r3,0 } ffc08d10: 7c 08 03 a6 mtlr r0 ffc08d14: 38 21 00 08 addi r1,r1,8 ffc08d18: 4e 80 00 20 blr else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); ffc08d1c: 48 00 bf 95 bl ffc14cb0 <__errno> ffc08d20: 38 00 00 58 li r0,88 ffc08d24: 90 03 00 00 stw r0,0(r3) ffc08d28: 38 60 ff ff li r3,-1 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08d2c: 80 01 00 0c lwz r0,12(r1) ffc08d30: 38 21 00 08 addi r1,r1,8 ffc08d34: 7c 08 03 a6 mtlr r0 ffc08d38: 4e 80 00 20 blr =============================================================================== 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 e8 lwz r28,10472(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 e8 addi r23,r29,10472 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 4c 11 bl ffc19230 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 4b c5 bl ffc19230 <== NOT EXECUTED disktab = table; ffc04670: 93 37 00 04 stw r25,4(r23) <== NOT EXECUTED disktab_size = new_size; ffc04674: 93 1d 28 e8 stw r24,10472(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 4f 51 bl ffc19604 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 =============================================================================== ffc0dc30 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0dc30: 94 21 ff d8 stwu r1,-40(r1) ffc0dc34: 7c 08 02 a6 mflr r0 ffc0dc38: 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 ) ) ffc0dc3c: 54 a0 00 39 rlwinm. r0,r5,0,0,28 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0dc40: 93 01 00 08 stw r24,8(r1) ffc0dc44: 7c d8 33 78 mr r24,r6 ffc0dc48: 93 c1 00 20 stw r30,32(r1) ffc0dc4c: 7c 7e 1b 78 mr r30,r3 ffc0dc50: 93 e1 00 24 stw r31,36(r1) ffc0dc54: 7c 9f 23 78 mr r31,r4 ffc0dc58: 93 21 00 0c stw r25,12(r1) ffc0dc5c: 93 41 00 10 stw r26,16(r1) ffc0dc60: 93 61 00 14 stw r27,20(r1) ffc0dc64: 93 81 00 18 stw r28,24(r1) ffc0dc68: 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 ) ) ffc0dc6c: 40 82 01 0c bne- ffc0dd78 <== 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; ffc0dc70: 83 66 00 00 lwz r27,0(r6) if (!device_name_table) ffc0dc74: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0dc78: 41 9e 01 14 beq- cr7,ffc0dd8c rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { ffc0dc7c: 3d 20 00 00 lis r9,0 ffc0dc80: 83 49 27 78 lwz r26,10104(r9) ffc0dc84: 38 00 00 00 li r0,0 * handlers. */ extern rtems_filesystem_file_handlers_r devFS_file_handlers; int devFS_evaluate_path( ffc0dc88: 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++) { ffc0dc8c: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0dc90: 41 9e 00 4c beq- cr7,ffc0dcdc <== NEVER TAKEN if (!device_name_table[i].device_name) ffc0dc94: 1c 00 00 14 mulli r0,r0,20 ffc0dc98: 7f 9b 00 2e lwzx r28,r27,r0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0dc9c: 7f c3 f3 78 mr r3,r30 ffc0dca0: 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) ffc0dca4: 2f 9c 00 00 cmpwi cr7,r28,0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0dca8: 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++) { ffc0dcac: 3b bd 00 01 addi r29,r29,1 if (!device_name_table[i].device_name) ffc0dcb0: 7f 3b 02 14 add r25,r27,r0 ffc0dcb4: 41 9e 00 1c beq- cr7,ffc0dcd0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0dcb8: 48 00 43 19 bl ffc11fd0 ffc0dcbc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0dcc0: 40 9e 00 10 bne- cr7,ffc0dcd0 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') ffc0dcc4: 7c 1c f8 ae lbzx r0,r28,r31 ffc0dcc8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dccc: 41 9e 00 50 beq- cr7,ffc0dd1c <== 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++) { ffc0dcd0: 7f 9d d0 00 cmpw cr7,r29,r26 ffc0dcd4: 7f a0 eb 78 mr r0,r29 ffc0dcd8: 40 9e ff bc bne+ cr7,ffc0dc94 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); ffc0dcdc: 48 00 30 d1 bl ffc10dac <__errno> ffc0dce0: 38 00 00 02 li r0,2 ffc0dce4: 90 03 00 00 stw r0,0(r3) ffc0dce8: 38 60 ff ff li r3,-1 } ffc0dcec: 80 01 00 2c lwz r0,44(r1) ffc0dcf0: 83 01 00 08 lwz r24,8(r1) ffc0dcf4: 7c 08 03 a6 mtlr r0 ffc0dcf8: 83 21 00 0c lwz r25,12(r1) ffc0dcfc: 83 41 00 10 lwz r26,16(r1) ffc0dd00: 83 61 00 14 lwz r27,20(r1) ffc0dd04: 83 81 00 18 lwz r28,24(r1) ffc0dd08: 83 a1 00 1c lwz r29,28(r1) ffc0dd0c: 83 c1 00 20 lwz r30,32(r1) ffc0dd10: 83 e1 00 24 lwz r31,36(r1) ffc0dd14: 38 21 00 28 addi r1,r1,40 ffc0dd18: 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; ffc0dd1c: 3d 20 00 00 lis r9,0 ffc0dd20: 81 29 27 b4 lwz r9,10164(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]; ffc0dd24: 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; ffc0dd28: 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; ffc0dd2c: 3d 20 00 00 lis r9,0 ffc0dd30: 39 29 21 84 addi r9,r9,8580 ffc0dd34: 91 38 00 08 stw r9,8(r24) pathloc->ops = &devFS_ops; ffc0dd38: 3d 20 00 00 lis r9,0 ffc0dd3c: 39 29 21 bc addi r9,r9,8636 ffc0dd40: 91 38 00 0c stw r9,12(r24) pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0dd44: 90 18 00 10 stw r0,16(r24) return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0dd48: 80 01 00 2c lwz r0,44(r1) ffc0dd4c: 83 01 00 08 lwz r24,8(r1) ffc0dd50: 7c 08 03 a6 mtlr r0 ffc0dd54: 83 21 00 0c lwz r25,12(r1) ffc0dd58: 83 41 00 10 lwz r26,16(r1) ffc0dd5c: 83 61 00 14 lwz r27,20(r1) ffc0dd60: 83 81 00 18 lwz r28,24(r1) ffc0dd64: 83 a1 00 1c lwz r29,28(r1) ffc0dd68: 83 c1 00 20 lwz r30,32(r1) ffc0dd6c: 83 e1 00 24 lwz r31,36(r1) ffc0dd70: 38 21 00 28 addi r1,r1,40 ffc0dd74: 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 ); ffc0dd78: 48 00 30 35 bl ffc10dac <__errno> <== NOT EXECUTED ffc0dd7c: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0dd80: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0dd84: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0dd88: 4b ff ff c0 b ffc0dd48 <== 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 ); ffc0dd8c: 48 00 30 21 bl ffc10dac <__errno> ffc0dd90: 38 00 00 0e li r0,14 ffc0dd94: 90 03 00 00 stw r0,0(r3) ffc0dd98: 38 60 ff ff li r3,-1 ffc0dd9c: 4b ff ff ac b ffc0dd48 =============================================================================== 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 78 lwz r25,10104(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 d5 fd bl ffc11e4c 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 d6 55 bl ffc11f14 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 c4 a1 bl ffc10dac <__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 c4 35 bl ffc10dac <__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 c4 21 bl ffc10dac <__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 c4 0d bl ffc10dac <__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 e8 addi r31,r31,10472 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 e8 addi r9,r9,10472 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 ad bl ffc0aab0 <== 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 41 bl ffc09d40 <== 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 84 lwz r9,10116(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 94 lwz r3,10900(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 ea fd bl ffc14c70 } 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 b8 lwz r3,10680(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 ec c9 bl ffc14c70 } 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 0c 38 addi r27,r27,3128 ffc0753c: 3b bd 0c 34 addi r29,r29,3124 } 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 84 lwz r9,10116(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 84 lwz r9,10116(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 84 lwz r8,10116(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 =============================================================================== ffc182b8 : #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) { ffc182b8: 94 21 ff d0 stwu r1,-48(r1) ffc182bc: 7c 08 02 a6 mflr r0 ffc182c0: 7d 80 00 26 mfcr r12 ffc182c4: 93 61 00 1c stw r27,28(r1) ffc182c8: 7c db 33 78 mr r27,r6 ffc182cc: 93 81 00 20 stw r28,32(r1) ffc182d0: 7c bc 2b 78 mr r28,r5 ffc182d4: 93 a1 00 24 stw r29,36(r1) ffc182d8: 7c 9d 23 78 mr r29,r4 ffc182dc: 93 e1 00 2c stw r31,44(r1) ffc182e0: 7c 7f 1b 78 mr r31,r3 ffc182e4: 90 01 00 34 stw r0,52(r1) ffc182e8: 93 c1 00 28 stw r30,40(r1) ffc182ec: 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) ffc182f0: 88 03 00 85 lbz r0,133(r3) ffc182f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc182f8: 41 9e 01 70 beq- cr7,ffc18468 ffc182fc: 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) && ffc18300: 39 20 00 00 li r9,0 ffc18304: a1 7f 00 14 lhz r11,20(r31) ffc18308: 7f 8b 00 40 cmplw cr7,r11,r0 ffc1830c: 40 9d 01 a4 ble- cr7,ffc184b0 <== ALWAYS TAKEN (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) ffc18310: 7f 9d 00 00 cmpw cr7,r29,r0 ffc18314: 41 9e 01 1c beq- cr7,ffc18430 { if (fs_info->c.modified) ffc18318: 8b df 00 84 lbz r30,132(r31) ffc1831c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc18320: 41 9e 00 cc beq- cr7,ffc183ec { if (sec_of_fat && !fs_info->vol.mirror) ffc18324: 2e 09 00 00 cmpwi cr4,r9,0 ffc18328: 41 92 00 10 beq- cr4,ffc18338 <== ALWAYS TAKEN ffc1832c: 88 1f 00 48 lbz r0,72(r31) <== NOT EXECUTED ffc18330: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc18334: 41 9e 01 98 beq- cr7,ffc184cc <== 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); ffc18338: 80 7f 00 88 lwz r3,136(r31) ffc1833c: 4b ff e1 d5 bl ffc16510 fs_info->c.state = FAT_CACHE_EMPTY; ffc18340: 38 00 00 00 li r0,0 fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) ffc18344: 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; ffc18348: 98 1f 00 85 stb r0,133(r31) fs_info->c.modified = 0; ffc1834c: 98 1f 00 84 stb r0,132(r31) if (sc != RTEMS_SUCCESSFUL) ffc18350: 40 9e 01 9c bne- cr7,ffc184ec <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) ffc18354: 41 92 00 ac beq- cr4,ffc18400 <== ALWAYS TAKEN ffc18358: 88 1f 00 48 lbz r0,72(r31) <== NOT EXECUTED ffc1835c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc18360: 40 9e 00 a0 bne- cr7,ffc18400 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc18364: 88 1f 00 09 lbz r0,9(r31) <== NOT EXECUTED ffc18368: 2b 80 00 01 cmplwi cr7,r0,1 <== NOT EXECUTED ffc1836c: 40 9d 00 94 ble- cr7,ffc18400 <== NOT EXECUTED ffc18370: 3b c0 00 01 li r30,1 <== NOT EXECUTED ffc18374: 48 00 00 3c b ffc183b0 <== 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); ffc18378: 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++) ffc1837c: 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); ffc18380: 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++) ffc18384: 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); ffc18388: a0 bf 00 00 lhz r5,0(r31) <== NOT EXECUTED ffc1838c: 80 69 00 24 lwz r3,36(r9) <== NOT EXECUTED ffc18390: 48 00 cc b5 bl ffc25044 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); ffc18394: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED ffc18398: 4b ff e1 79 bl ffc16510 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) ffc1839c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc183a0: 40 9e 00 38 bne- cr7,ffc183d8 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc183a4: 88 1f 00 09 lbz r0,9(r31) <== NOT EXECUTED ffc183a8: 7f 80 f0 40 cmplw cr7,r0,r30 <== NOT EXECUTED ffc183ac: 40 9d 00 54 ble- cr7,ffc18400 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc183b0: 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, ffc183b4: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc183b8: 80 1f 00 80 lwz r0,128(r31) <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc183bc: 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, ffc183c0: 80 7f 00 58 lwz r3,88(r31) <== NOT EXECUTED ffc183c4: 80 9f 00 5c lwz r4,92(r31) <== NOT EXECUTED ffc183c8: 7c a5 02 14 add r5,r5,r0 <== NOT EXECUTED ffc183cc: 4b ff db bd bl ffc15f88 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) ffc183d0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc183d4: 41 9e ff a4 beq+ cr7,ffc18378 <== 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); ffc183d8: 48 00 be 39 bl ffc24210 <__errno> <== NOT EXECUTED ffc183dc: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc183e0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc183e4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc183e8: 48 00 00 54 b ffc1843c <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); ffc183ec: 80 7f 00 88 lwz r3,136(r31) ffc183f0: 4b ff e0 19 bl ffc16408 fs_info->c.state = FAT_CACHE_EMPTY; ffc183f4: 9b df 00 85 stb r30,133(r31) if (sc != RTEMS_SUCCESSFUL) ffc183f8: 2f 83 00 00 cmpwi cr7,r3,0 ffc183fc: 40 9e 00 f0 bne- cr7,ffc184ec <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) ffc18400: 2f 9c 00 01 cmpwi cr7,r28,1 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); ffc18404: 80 7f 00 58 lwz r3,88(r31) ffc18408: 80 9f 00 5c lwz r4,92(r31) ffc1840c: 7f a5 eb 78 mr r5,r29 ffc18410: 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) ffc18414: 41 9e 00 d0 beq- cr7,ffc184e4 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); ffc18418: 4b ff db 71 bl ffc15f88 if (sc != RTEMS_SUCCESSFUL) ffc1841c: 2f 83 00 00 cmpwi cr7,r3,0 ffc18420: 40 9e 00 cc bne- cr7,ffc184ec <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; ffc18424: 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; ffc18428: 93 bf 00 80 stw r29,128(r31) fs_info->c.state = FAT_CACHE_ACTUAL; ffc1842c: 98 1f 00 85 stb r0,133(r31) } *buf = fs_info->c.buf; ffc18430: 80 1f 00 88 lwz r0,136(r31) return RC_OK; ffc18434: 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; ffc18438: 90 1b 00 00 stw r0,0(r27) return RC_OK; } ffc1843c: 80 01 00 34 lwz r0,52(r1) ffc18440: 81 81 00 18 lwz r12,24(r1) ffc18444: 7c 08 03 a6 mtlr r0 ffc18448: 83 61 00 1c lwz r27,28(r1) ffc1844c: 83 81 00 20 lwz r28,32(r1) ffc18450: 7d 80 81 20 mtcrf 8,r12 ffc18454: 83 a1 00 24 lwz r29,36(r1) ffc18458: 83 c1 00 28 lwz r30,40(r1) ffc1845c: 83 e1 00 2c lwz r31,44(r1) ffc18460: 38 21 00 30 addi r1,r1,48 ffc18464: 4e 80 00 20 blr bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) ffc18468: 2f 9c 00 01 cmpwi cr7,r28,1 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); ffc1846c: 80 63 00 58 lwz r3,88(r3) ffc18470: 80 9f 00 5c lwz r4,92(r31) ffc18474: 7f a5 eb 78 mr r5,r29 ffc18478: 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) ffc1847c: 41 9e 00 48 beq- cr7,ffc184c4 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); ffc18480: 4b ff db 09 bl ffc15f88 if (sc != RTEMS_SUCCESSFUL) ffc18484: 2f 83 00 00 cmpwi cr7,r3,0 ffc18488: 40 9e 00 64 bne- cr7,ffc184ec <== 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) && ffc1848c: 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; ffc18490: 7f a0 eb 78 mr r0,r29 ffc18494: 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; ffc18498: 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) && ffc1849c: 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; ffc184a0: 99 3f 00 85 stb r9,133(r31) } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && ffc184a4: 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; ffc184a8: 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) && ffc184ac: 41 bd fe 64 bgt- cr7,ffc18310 <== NEVER TAKEN ffc184b0: 81 3f 00 1c lwz r9,28(r31) ffc184b4: 7d 29 00 10 subfc r9,r9,r0 ffc184b8: 7d 29 49 10 subfe r9,r9,r9 ffc184bc: 7d 29 00 d0 neg r9,r9 ffc184c0: 4b ff fe 50 b ffc18310 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); ffc184c4: 4b ff db e9 bl ffc160ac ffc184c8: 4b ff ff bc b ffc18484 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, ffc184cc: 81 3f 00 88 lwz r9,136(r31) <== NOT EXECUTED ffc184d0: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc184d4: 80 89 00 24 lwz r4,36(r9) <== NOT EXECUTED ffc184d8: a0 bf 00 00 lhz r5,0(r31) <== NOT EXECUTED ffc184dc: 48 00 cb 69 bl ffc25044 <== NOT EXECUTED ffc184e0: 4b ff fe 58 b ffc18338 <== 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); ffc184e4: 4b ff db c9 bl ffc160ac ffc184e8: 4b ff ff 34 b ffc1841c 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); ffc184ec: 48 00 bd 25 bl ffc24210 <__errno> <== NOT EXECUTED ffc184f0: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc184f4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc184f8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc184fc: 4b ff ff 40 b ffc1843c <== NOT EXECUTED =============================================================================== ffc18500 : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { ffc18500: 94 21 ff d8 stwu r1,-40(r1) ffc18504: 7c 08 02 a6 mflr r0 ffc18508: 7d 80 00 26 mfcr r12 ffc1850c: 93 e1 00 24 stw r31,36(r1) ffc18510: 7c 7f 1b 78 mr r31,r3 ffc18514: 90 01 00 2c stw r0,44(r1) ffc18518: 93 c1 00 20 stw r30,32(r1) ffc1851c: 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) ffc18520: 88 03 00 85 lbz r0,133(r3) return RC_OK; ffc18524: 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) ffc18528: 2f 80 00 00 cmpwi cr7,r0,0 ffc1852c: 41 9e 00 f0 beq- cr7,ffc1861c return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && ffc18530: 81 3f 00 80 lwz r9,128(r31) ffc18534: 38 00 00 00 li r0,0 ffc18538: a1 7f 00 14 lhz r11,20(r31) ffc1853c: 7f 89 58 40 cmplw cr7,r9,r11 ffc18540: 41 9c 00 14 blt- cr7,ffc18554 <== NEVER TAKEN *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) ffc18544: 80 1f 00 1c lwz r0,28(r31) ffc18548: 7c 00 48 10 subfc r0,r0,r9 ffc1854c: 7c 00 01 10 subfe r0,r0,r0 ffc18550: 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) ffc18554: 89 3f 00 84 lbz r9,132(r31) ffc18558: 2f 89 00 00 cmpwi cr7,r9,0 ffc1855c: 41 9e 00 e0 beq- cr7,ffc1863c { if (sec_of_fat && !fs_info->vol.mirror) ffc18560: 2e 00 00 00 cmpwi cr4,r0,0 ffc18564: 41 92 00 10 beq- cr4,ffc18574 ffc18568: 88 1f 00 48 lbz r0,72(r31) ffc1856c: 2f 80 00 00 cmpwi cr7,r0,0 ffc18570: 41 9e 01 08 beq- cr7,ffc18678 <== 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); ffc18574: 80 7f 00 88 lwz r3,136(r31) ffc18578: 4b ff df 99 bl ffc16510 if (sc != RTEMS_SUCCESSFUL) ffc1857c: 2c 03 00 00 cmpwi r3,0 ffc18580: 40 82 01 10 bne- ffc18690 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; ffc18584: 98 7f 00 84 stb r3,132(r31) if (sec_of_fat && !fs_info->vol.mirror) ffc18588: 41 92 00 c4 beq- cr4,ffc1864c ffc1858c: 88 1f 00 48 lbz r0,72(r31) ffc18590: 2f 80 00 00 cmpwi cr7,r0,0 ffc18594: 40 9e 00 b8 bne- cr7,ffc1864c <== NEVER TAKEN { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc18598: 88 1f 00 09 lbz r0,9(r31) ffc1859c: 2b 80 00 01 cmplwi cr7,r0,1 ffc185a0: 40 9d 00 ac ble- cr7,ffc1864c <== NEVER TAKEN ffc185a4: 3b c0 00 01 li r30,1 ffc185a8: 48 00 00 3c b ffc185e4 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); ffc185ac: 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++) ffc185b0: 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); ffc185b4: 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++) ffc185b8: 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); ffc185bc: a0 bf 00 00 lhz r5,0(r31) ffc185c0: 80 69 00 24 lwz r3,36(r9) ffc185c4: 48 00 ca 81 bl ffc25044 sc = rtems_bdbuf_release_modified(b); ffc185c8: 80 61 00 08 lwz r3,8(r1) ffc185cc: 4b ff df 45 bl ffc16510 if ( sc != RTEMS_SUCCESSFUL) ffc185d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc185d4: 40 9e 00 38 bne- cr7,ffc1860c <== NEVER TAKEN if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc185d8: 88 1f 00 09 lbz r0,9(r31) ffc185dc: 7f 80 f0 40 cmplw cr7,r0,r30 ffc185e0: 40 9d 00 6c ble- cr7,ffc1864c <== ALWAYS TAKEN { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc185e4: 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, ffc185e8: 38 c1 00 08 addi r6,r1,8 ffc185ec: 80 1f 00 80 lwz r0,128(r31) fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc185f0: 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, ffc185f4: 80 7f 00 58 lwz r3,88(r31) ffc185f8: 80 9f 00 5c lwz r4,92(r31) ffc185fc: 7c a5 02 14 add r5,r5,r0 ffc18600: 4b ff d9 89 bl ffc15f88 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) ffc18604: 2f 83 00 00 cmpwi cr7,r3,0 ffc18608: 41 9e ff a4 beq+ cr7,ffc185ac <== 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); ffc1860c: 48 00 bc 05 bl ffc24210 <__errno> <== NOT EXECUTED ffc18610: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc18614: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc18618: 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; } ffc1861c: 80 01 00 2c lwz r0,44(r1) ffc18620: 81 81 00 1c lwz r12,28(r1) ffc18624: 7c 08 03 a6 mtlr r0 ffc18628: 83 c1 00 20 lwz r30,32(r1) ffc1862c: 83 e1 00 24 lwz r31,36(r1) ffc18630: 7d 80 81 20 mtcrf 8,r12 ffc18634: 38 21 00 28 addi r1,r1,40 ffc18638: 4e 80 00 20 blr } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); ffc1863c: 80 7f 00 88 lwz r3,136(r31) ffc18640: 4b ff dd c9 bl ffc16408 if (sc != RTEMS_SUCCESSFUL) ffc18644: 2f 83 00 00 cmpwi cr7,r3,0 ffc18648: 40 9e 00 48 bne- cr7,ffc18690 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; ffc1864c: 38 00 00 00 li r0,0 ffc18650: 98 1f 00 85 stb r0,133(r31) return RC_OK; ffc18654: 38 60 00 00 li r3,0 } ffc18658: 80 01 00 2c lwz r0,44(r1) ffc1865c: 81 81 00 1c lwz r12,28(r1) ffc18660: 7c 08 03 a6 mtlr r0 ffc18664: 83 c1 00 20 lwz r30,32(r1) ffc18668: 83 e1 00 24 lwz r31,36(r1) ffc1866c: 7d 80 81 20 mtcrf 8,r12 ffc18670: 38 21 00 28 addi r1,r1,40 ffc18674: 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); ffc18678: 81 3f 00 88 lwz r9,136(r31) ffc1867c: 80 7f 00 8c lwz r3,140(r31) ffc18680: 80 89 00 24 lwz r4,36(r9) ffc18684: a0 bf 00 00 lhz r5,0(r31) ffc18688: 48 00 c9 bd bl ffc25044 ffc1868c: 4b ff fe e8 b ffc18574 } else { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); ffc18690: 48 00 bb 81 bl ffc24210 <__errno> <== NOT EXECUTED ffc18694: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc18698: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1869c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc186a0: 4b ff ff 7c b ffc1861c <== NOT EXECUTED =============================================================================== ffc188b0 : 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)) ) ffc188b0: 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; ffc188b4: 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 ) { ffc188b8: 7c a7 2b 78 mr r7,r5 <== NOT EXECUTED ffc188bc: 40 82 00 10 bne- ffc188cc <== NOT EXECUTED ffc188c0: 88 09 00 0a lbz r0,10(r9) <== NOT EXECUTED ffc188c4: 70 0b 00 03 andi. r11,r0,3 <== NOT EXECUTED ffc188c8: 40 82 00 2c bne- ffc188f4 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc188cc: 89 69 00 05 lbz r11,5(r9) <== NOT EXECUTED ffc188d0: 38 84 ff fe addi r4,r4,-2 <== NOT EXECUTED ffc188d4: 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, ffc188d8: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc188dc: 7c 84 58 30 slw r4,r4,r11 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); ffc188e0: 88 c9 00 04 lbz r6,4(r9) <== NOT EXECUTED ffc188e4: 7c 84 02 14 add r4,r4,r0 <== NOT EXECUTED ffc188e8: 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, ffc188ec: 7c c6 00 30 slw r6,r6,r0 <== NOT EXECUTED ffc188f0: 4b ff fd b4 b ffc186a4 <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); ffc188f4: 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, ffc188f8: 38 a0 00 00 li r5,0 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); ffc188fc: 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; ffc18900: 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, ffc18904: 7c c6 00 30 slw r6,r6,r0 <== NOT EXECUTED ffc18908: 4b ff fd 9c b ffc186a4 <_fat_block_read> <== NOT EXECUTED =============================================================================== ffc1890c : 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)) ) ffc1890c: 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; ffc18910: 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 ) { ffc18914: 7c a7 2b 78 mr r7,r5 ffc18918: 40 82 00 10 bne- ffc18928 <== ALWAYS TAKEN ffc1891c: 88 09 00 0a lbz r0,10(r9) <== NOT EXECUTED ffc18920: 70 0b 00 03 andi. r11,r0,3 <== NOT EXECUTED ffc18924: 40 82 00 2c bne- ffc18950 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc18928: 89 69 00 05 lbz r11,5(r9) ffc1892c: 38 84 ff fe addi r4,r4,-2 ffc18930: 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, ffc18934: 38 a0 00 00 li r5,0 ffc18938: 7c 84 58 30 slw r4,r4,r11 fs_info->vol.spc << fs_info->vol.sec_log2, buff); ffc1893c: 88 c9 00 04 lbz r6,4(r9) ffc18940: 7c 84 02 14 add r4,r4,r0 ffc18944: 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, ffc18948: 7c c6 00 30 slw r6,r6,r0 ffc1894c: 4b ff fe 38 b ffc18784 <_fat_block_write> fs_info->vol.spc << fs_info->vol.sec_log2, buff); ffc18950: 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, ffc18954: 38 a0 00 00 li r5,0 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); ffc18958: 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; ffc1895c: 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, ffc18960: 7c c6 00 30 slw r6,r6,r0 <== NOT EXECUTED ffc18964: 4b ff fe 20 b ffc18784 <_fat_block_write> <== NOT EXECUTED =============================================================================== ffc18c04 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { ffc18c04: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc18c08: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc18c0c: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED ffc18c10: 93 c1 00 20 stw r30,32(r1) <== NOT EXECUTED ffc18c14: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ffc18c18: 93 e1 00 24 stw r31,36(r1) <== NOT EXECUTED ffc18c1c: 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; ffc18c20: 83 e3 00 34 lwz r31,52(r3) <== NOT EXECUTED uint32_t value ) { uint32_t swapped; __asm__ volatile("rlwimi %0,%1,8,24,31;" ffc18c24: 50 80 46 3e rlwimi r0,r4,8,24,31 <== NOT EXECUTED ffc18c28: 50 80 c4 2e rlwimi r0,r4,24,16,23 <== NOT EXECUTED ffc18c2c: 50 80 42 1e rlwimi r0,r4,8,8,15 <== NOT EXECUTED ffc18c30: 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); ffc18c34: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc18c38: 50 a0 46 3e rlwimi r0,r5,8,24,31 <== NOT EXECUTED ffc18c3c: 50 a0 c4 2e rlwimi r0,r5,24,16,23 <== NOT EXECUTED ffc18c40: 50 a0 42 1e rlwimi r0,r5,8,8,15 <== NOT EXECUTED ffc18c44: 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, ffc18c48: a0 9f 00 3c lhz r4,60(r31) <== NOT EXECUTED ffc18c4c: 38 a0 01 e8 li r5,488 <== NOT EXECUTED ffc18c50: 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); ffc18c54: 90 01 00 08 stw r0,8(r1) <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, ffc18c58: 38 e1 00 0c addi r7,r1,12 <== NOT EXECUTED ffc18c5c: 4b ff fb 29 bl ffc18784 <_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, ffc18c60: 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, ffc18c64: 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, ffc18c68: 38 a0 01 ec li r5,492 <== NOT EXECUTED ffc18c6c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc18c70: 38 c0 00 04 li r6,4 <== NOT EXECUTED ffc18c74: 38 e1 00 08 addi r7,r1,8 <== NOT EXECUTED ffc18c78: 4b ff fb 0d bl ffc18784 <_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) ) ffc18c7c: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED return -1; ffc18c80: 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) ) ffc18c84: 41 9c 00 08 blt- cr7,ffc18c8c <== NOT EXECUTED return -1; ffc18c88: 7c 60 fe 70 srawi r0,r3,31 <== NOT EXECUTED return RC_OK; } ffc18c8c: 7c 03 03 78 mr r3,r0 <== NOT EXECUTED ffc18c90: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc18c94: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc18c98: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18c9c: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc18ca0: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc18ca4: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc18ca8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc17880 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc17880: 94 21 ff e8 stwu r1,-24(r1) ffc17884: 7c 08 02 a6 mflr r0 ffc17888: 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) ffc1788c: 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 ) { ffc17890: 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) ffc17894: 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 ) { ffc17898: 93 c1 00 10 stw r30,16(r1) ffc1789c: 7c 7e 1b 78 mr r30,r3 ffc178a0: 93 e1 00 14 stw r31,20(r1) ffc178a4: 7c 9f 23 78 mr r31,r4 ffc178a8: 93 81 00 08 stw r28,8(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc178ac: 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) ffc178b0: 40 9d 00 30 ble- cr7,ffc178e0 { fat_fd->links_num--; ffc178b4: 39 29 ff ff addi r9,r9,-1 ffc178b8: 91 24 00 08 stw r9,8(r4) return rc; ffc178bc: 38 60 00 00 li r3,0 * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } ffc178c0: 80 01 00 1c lwz r0,28(r1) ffc178c4: 83 81 00 08 lwz r28,8(r1) ffc178c8: 7c 08 03 a6 mtlr r0 ffc178cc: 83 a1 00 0c lwz r29,12(r1) ffc178d0: 83 c1 00 10 lwz r30,16(r1) ffc178d4: 83 e1 00 14 lwz r31,20(r1) ffc178d8: 38 21 00 18 addi r1,r1,24 ffc178dc: 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) ffc178e0: 88 04 00 30 lbz r0,48(r4) ffc178e4: 70 1c 00 01 andi. r28,r0,1 ffc178e8: 41 82 00 3c beq- ffc17924 <== ALWAYS TAKEN { rc = fat_file_truncate(mt_entry, fat_fd, 0); ffc178ec: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc178f0: 4b ff fe 29 bl ffc17718 <== NOT EXECUTED if ( rc != RC_OK ) ffc178f4: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc178f8: 40 82 ff c8 bne+ ffc178c0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc178fc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc17900: 4b ff 6e d9 bl ffc0e7d8 <_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) ) ffc17904: 80 9f 00 0c lwz r4,12(r31) <== NOT EXECUTED ffc17908: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc1790c: 48 00 12 e1 bl ffc18bec <== NOT EXECUTED ffc17910: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc17914: 40 9e 00 58 bne- cr7,ffc1796c <== NOT EXECUTED fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); ffc17918: 7f e3 fb 78 mr r3,r31 ffc1791c: 4b ff 0b c5 bl ffc084e0 ffc17920: 48 00 00 18 b ffc17938 free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) ffc17924: 80 84 00 0c lwz r4,12(r4) ffc17928: 48 00 12 c5 bl ffc18bec ffc1792c: 2f 83 00 00 cmpwi cr7,r3,0 ffc17930: 41 9e 00 30 beq- cr7,ffc17960 <== ALWAYS TAKEN { fat_fd->links_num = 0; ffc17934: 93 9f 00 08 stw r28,8(r31) <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); ffc17938: 7f a3 eb 78 mr r3,r29 ffc1793c: 48 00 0b c5 bl ffc18500 return rc; } ffc17940: 80 01 00 1c lwz r0,28(r1) ffc17944: 83 81 00 08 lwz r28,8(r1) ffc17948: 7c 08 03 a6 mtlr r0 ffc1794c: 83 a1 00 0c lwz r29,12(r1) ffc17950: 83 c1 00 10 lwz r30,16(r1) ffc17954: 83 e1 00 14 lwz r31,20(r1) ffc17958: 38 21 00 18 addi r1,r1,24 ffc1795c: 4e 80 00 20 blr ffc17960: 7f e3 fb 78 mr r3,r31 ffc17964: 4b ff 6e 75 bl ffc0e7d8 <_Chain_Extract> ffc17968: 4b ff ff b0 b ffc17918 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); ffc1796c: 80 9f 00 0c lwz r4,12(r31) <== NOT EXECUTED ffc17970: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc17974: 48 00 12 49 bl ffc18bbc <== NOT EXECUTED ffc17978: 4b ff ff a0 b ffc17918 <== NOT EXECUTED =============================================================================== ffc18030 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc18030: 94 21 ff d0 stwu r1,-48(r1) <== NOT EXECUTED ffc18034: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc18038: 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) ffc1803c: 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; ffc18040: 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) ffc18044: 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 ) { ffc18048: 93 61 00 1c stw r27,28(r1) <== NOT EXECUTED ffc1804c: 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; ffc18050: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; ffc18054: 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 ) { ffc18058: 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; ffc1805c: 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 ) { ffc18060: 93 c1 00 28 stw r30,40(r1) <== NOT EXECUTED ffc18064: 93 a1 00 24 stw r29,36(r1) <== NOT EXECUTED ffc18068: 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; ffc1806c: 83 c3 00 34 lwz r30,52(r3) <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; ffc18070: 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) ffc18074: 40 9e 00 2c bne- cr7,ffc180a0 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } ffc18078: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc1807c: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc18080: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc18084: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18088: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc1808c: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc18090: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc18094: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc18098: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc1809c: 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); ffc180a0: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc180a4: 48 00 04 5d bl ffc18500 <== NOT EXECUTED if (rc != RC_OK) ffc180a8: 7c 7c 1b 79 mr. r28,r3 <== NOT EXECUTED ffc180ac: 40 a2 ff cc bne- ffc18078 <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc180b0: 80 81 00 0c lwz r4,12(r1) <== NOT EXECUTED ffc180b4: 81 3e 00 0c lwz r9,12(r30) <== NOT EXECUTED ffc180b8: 80 1e 00 10 lwz r0,16(r30) <== NOT EXECUTED ffc180bc: 7c 89 48 38 and r9,r4,r9 <== NOT EXECUTED ffc180c0: 7f 89 00 40 cmplw cr7,r9,r0 <== NOT EXECUTED ffc180c4: 40 bc ff b4 bge- cr7,ffc18078 <== 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)) ) ffc180c8: 2f 84 00 00 cmpwi cr7,r4,0 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc180cc: 81 3b 00 34 lwz r9,52(r27) <== NOT EXECUTED ffc180d0: 41 9e 00 a0 beq- cr7,ffc18170 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc180d4: 89 69 00 05 lbz r11,5(r9) <== NOT EXECUTED ffc180d8: 3b a4 ff fe addi r29,r4,-2 <== NOT EXECUTED ffc180dc: 80 09 00 30 lwz r0,48(r9) <== NOT EXECUTED ffc180e0: 7f bd 58 30 slw r29,r29,r11 <== NOT EXECUTED ffc180e4: 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++ ) ffc180e8: 88 1e 00 04 lbz r0,4(r30) <== NOT EXECUTED ffc180ec: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc180f0: 41 9e 00 98 beq- cr7,ffc18188 <== NOT EXECUTED ffc180f4: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc180f8: 48 00 00 20 b ffc18118 <== 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); ffc180fc: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED ffc18100: 4b ff e4 b9 bl ffc165b8 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) ffc18104: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc18108: 40 9e 00 30 bne- cr7,ffc18138 <== 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++ ) ffc1810c: 88 1e 00 04 lbz r0,4(r30) <== NOT EXECUTED ffc18110: 7f 80 f8 40 cmplw cr7,r0,r31 <== NOT EXECUTED ffc18114: 40 9d 00 70 ble- cr7,ffc18184 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); ffc18118: 80 7e 00 58 lwz r3,88(r30) <== NOT EXECUTED ffc1811c: 7c bf ea 14 add r5,r31,r29 <== NOT EXECUTED ffc18120: 80 9e 00 5c lwz r4,92(r30) <== NOT EXECUTED ffc18124: 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++ ) ffc18128: 3b ff 00 01 addi r31,r31,1 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); ffc1812c: 4b ff df 81 bl ffc160ac <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) ffc18130: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc18134: 41 9e ff c8 beq+ cr7,ffc180fc <== 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 ); ffc18138: 48 00 c0 d9 bl ffc24210 <__errno> <== NOT EXECUTED ffc1813c: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc18140: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc18144: 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; } ffc18148: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc1814c: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc18150: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc18154: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18158: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc1815c: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc18160: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc18164: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc18168: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc1816c: 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)) ) ffc18170: 88 09 00 0a lbz r0,10(r9) <== NOT EXECUTED ffc18174: 70 0b 00 03 andi. r11,r0,3 <== NOT EXECUTED ffc18178: 41 a2 ff 5c beq- ffc180d4 <== NOT EXECUTED return fs_info->vol.rdir_loc; ffc1817c: 83 a9 00 1c lwz r29,28(r9) <== NOT EXECUTED ffc18180: 4b ff ff 68 b ffc180e8 <== 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++ ) ffc18184: 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); ffc18188: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc1818c: 38 a1 00 0c addi r5,r1,12 <== NOT EXECUTED ffc18190: 48 00 9a a5 bl ffc21c34 <== NOT EXECUTED if ( rc != RC_OK ) ffc18194: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc18198: 41 82 ff 18 beq+ ffc180b0 <== 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); ffc1819c: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED ffc181a0: 4b ff fe d8 b ffc18078 <== NOT EXECUTED =============================================================================== ffc17a80 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { ffc17a80: 94 21 ff c0 stwu r1,-64(r1) ffc17a84: 7c 08 02 a6 mflr r0 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; ffc17a88: 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 ) { ffc17a8c: 90 01 00 44 stw r0,68(r1) ffc17a90: 93 41 00 28 stw r26,40(r1) ffc17a94: 7c da 33 78 mr r26,r6 ffc17a98: 93 61 00 2c stw r27,44(r1) ffc17a9c: 93 81 00 30 stw r28,48(r1) ffc17aa0: 7c 7c 1b 78 mr r28,r3 ffc17aa4: 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; ffc17aa8: 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 ) { ffc17aac: 93 c1 00 38 stw r30,56(r1) ffc17ab0: 7c 9e 23 78 mr r30,r4 ffc17ab4: 93 e1 00 3c stw r31,60(r1) ffc17ab8: 7c bf 2b 78 mr r31,r5 ffc17abc: 92 e1 00 1c stw r23,28(r1) ffc17ac0: 93 01 00 20 stw r24,32(r1) ffc17ac4: 93 21 00 24 stw r25,36(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc17ac8: 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; ffc17acc: 90 ba 00 00 stw r5,0(r26) if (new_length <= fat_fd->fat_file_size) ffc17ad0: 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; ffc17ad4: 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) ffc17ad8: 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; ffc17adc: 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) ffc17ae0: 40 9d 00 e4 ble- cr7,ffc17bc4 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc17ae4: 81 24 00 20 lwz r9,32(r4) ffc17ae8: 2f 89 00 01 cmpwi cr7,r9,1 ffc17aec: 41 9e 01 10 beq- cr7,ffc17bfc <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - ffc17af0: 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; ffc17af4: 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; ffc17af8: 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))) & ffc17afc: 39 2b ff ff addi r9,r11,-1 ffc17b00: 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 - ffc17b04: 7f 39 58 50 subf r25,r25,r11 ffc17b08: 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) ffc17b0c: 7f 99 b8 40 cmplw cr7,r25,r23 ffc17b10: 40 9c 00 b4 bge- cr7,ffc17bc4 /* * 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) ffc17b14: 7e f9 b8 51 subf. r23,r25,r23 ffc17b18: 41 82 00 ac beq- ffc17bc4 <== NEVER TAKEN return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; ffc17b1c: 88 1b 00 08 lbz r0,8(r27) ffc17b20: 3b 17 ff ff addi r24,r23,-1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, ffc17b24: 7f 83 e3 78 mr r3,r28 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; ffc17b28: 7f 18 04 30 srw r24,r24,r0 ffc17b2c: 3b 18 00 01 addi r24,r24,1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, ffc17b30: 38 81 00 14 addi r4,r1,20 ffc17b34: 7f 05 c3 78 mr r5,r24 ffc17b38: 38 c1 00 08 addi r6,r1,8 ffc17b3c: 38 e1 00 0c addi r7,r1,12 ffc17b40: 48 00 a8 09 bl ffc22348 &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) ffc17b44: 7c 7d 1b 79 mr. r29,r3 ffc17b48: 40 82 00 7c bne- ffc17bc4 <== NEVER TAKEN return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) ffc17b4c: 80 01 00 08 lwz r0,8(r1) ffc17b50: 7f 29 03 79 or. r9,r25,r0 ffc17b54: 41 82 00 c0 beq- ffc17c14 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) ffc17b58: 7f 98 00 00 cmpw cr7,r24,r0 ffc17b5c: 41 9e 00 2c beq- cr7,ffc17b88 <== ALWAYS TAKEN *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - ffc17b60: 89 7b 00 08 lbz r11,8(r27) <== NOT EXECUTED ffc17b64: 7c 0a 00 f8 not r10,r0 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); ffc17b68: 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) - ffc17b6c: 7f 0a c2 14 add r24,r10,r24 <== NOT EXECUTED ffc17b70: 7f 18 58 30 slw r24,r24,r11 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); ffc17b74: 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 - ffc17b78: 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)); ffc17b7c: 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) - ffc17b80: 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 - ffc17b84: 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 ) ffc17b88: 80 de 00 18 lwz r6,24(r30) ffc17b8c: 2f 86 00 00 cmpwi cr7,r6,0 ffc17b90: 40 9e 00 98 bne- cr7,ffc17c28 { fat_fd->map.disk_cln = fat_fd->cln = chain; ffc17b94: 81 21 00 14 lwz r9,20(r1) fat_fd->map.file_cln = 0; ffc17b98: 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; ffc17b9c: 91 3e 00 1c stw r9,28(r30) ffc17ba0: 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) ffc17ba4: 2f 80 00 00 cmpwi cr7,r0,0 ffc17ba8: 41 9e 00 18 beq- cr7,ffc17bc0 <== NEVER TAKEN { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) ffc17bac: 80 1e 00 10 lwz r0,16(r30) ffc17bb0: 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; ffc17bb4: 80 01 00 0c lwz r0,12(r1) ffc17bb8: 90 1e 00 3c stw r0,60(r30) if (fat_fd->fat_file_type == FAT_DIRECTORY) ffc17bbc: 41 9e 00 dc beq- cr7,ffc17c98 return rc; } } } fat_fd->fat_file_size = new_length; ffc17bc0: 93 fe 00 18 stw r31,24(r30) return RC_OK; } ffc17bc4: 80 01 00 44 lwz r0,68(r1) ffc17bc8: 7f a3 eb 78 mr r3,r29 ffc17bcc: 82 e1 00 1c lwz r23,28(r1) ffc17bd0: 7c 08 03 a6 mtlr r0 ffc17bd4: 83 01 00 20 lwz r24,32(r1) ffc17bd8: 83 21 00 24 lwz r25,36(r1) ffc17bdc: 83 41 00 28 lwz r26,40(r1) ffc17be0: 83 61 00 2c lwz r27,44(r1) ffc17be4: 83 81 00 30 lwz r28,48(r1) ffc17be8: 83 a1 00 34 lwz r29,52(r1) ffc17bec: 83 c1 00 38 lwz r30,56(r1) ffc17bf0: 83 e1 00 3c lwz r31,60(r1) ffc17bf4: 38 21 00 40 addi r1,r1,64 ffc17bf8: 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)) && ffc17bfc: 81 24 00 24 lwz r9,36(r4) <== NOT EXECUTED ffc17c00: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc17c04: 40 be fe ec bne- cr7,ffc17af0 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc17c08: 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)) && ffc17c0c: 71 2b 00 03 andi. r11,r9,3 <== NOT EXECUTED ffc17c10: 41 82 fe e0 beq+ ffc17af0 <== 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); ffc17c14: 48 00 c5 fd bl ffc24210 <__errno> <== NOT EXECUTED ffc17c18: 38 00 00 1c li r0,28 <== NOT EXECUTED ffc17c1c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc17c20: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc17c24: 4b ff ff a0 b ffc17bc4 <== 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) ffc17c28: 80 9e 00 3c lwz r4,60(r30) ffc17c2c: 2f 84 ff ff cmpwi cr7,r4,-1 ffc17c30: 41 9e 00 2c beq- cr7,ffc17c5c <== NEVER TAKEN { old_last_cl = fat_fd->map.last_cln; ffc17c34: 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); ffc17c38: 80 a1 00 14 lwz r5,20(r1) ffc17c3c: 7f 83 e3 78 mr r3,r28 ffc17c40: 48 00 a2 59 bl ffc21e98 if ( rc != RC_OK ) ffc17c44: 7c 7a 1b 79 mr. r26,r3 ffc17c48: 40 82 00 3c bne- ffc17c84 <== NEVER TAKEN { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); ffc17c4c: 7f 63 db 78 mr r3,r27 ffc17c50: 48 00 08 b1 bl ffc18500 ffc17c54: 80 01 00 08 lwz r0,8(r1) ffc17c58: 4b ff ff 4c b ffc17ba4 { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, ffc17c5c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc17c60: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc17c64: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc17c68: 38 c6 ff ff addi r6,r6,-1 <== NOT EXECUTED ffc17c6c: 38 e1 00 10 addi r7,r1,16 <== NOT EXECUTED ffc17c70: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc17c74: 4b ff fd 09 bl ffc1797c <== 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; ffc17c78: 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 ) ffc17c7c: 7c 7a 1b 79 mr. r26,r3 <== NOT EXECUTED ffc17c80: 41 82 ff b8 beq+ ffc17c38 <== 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); ffc17c84: 80 81 00 14 lwz r4,20(r1) <== NOT EXECUTED ffc17c88: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED return rc; ffc17c8c: 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); ffc17c90: 48 00 a5 6d bl ffc221fc <== NOT EXECUTED return rc; ffc17c94: 4b ff ff 30 b ffc17bc4 <== 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); ffc17c98: 80 81 00 14 lwz r4,20(r1) ffc17c9c: 7f 83 e3 78 mr r3,r28 ffc17ca0: 48 00 0c c9 bl ffc18968 if ( rc != RC_OK ) ffc17ca4: 7c 7b 1b 79 mr. r27,r3 ffc17ca8: 41 82 ff 18 beq+ ffc17bc0 <== ALWAYS TAKEN { fat_free_fat_clusters_chain(mt_entry, chain); ffc17cac: 80 81 00 14 lwz r4,20(r1) <== NOT EXECUTED ffc17cb0: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED return rc; ffc17cb4: 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); ffc17cb8: 48 00 a5 45 bl ffc221fc <== NOT EXECUTED return rc; ffc17cbc: 4b ff ff 08 b ffc17bc4 <== NOT EXECUTED =============================================================================== ffc1797c : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { ffc1797c: 94 21 ff d0 stwu r1,-48(r1) ffc17980: 7c 08 02 a6 mflr r0 uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) ffc17984: 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, ...) { ffc17988: 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); ffc1798c: 7c 29 0b 78 mr r9,r1 ffc17990: 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, ...) { ffc17994: 90 c1 00 1c stw r6,28(r1) ffc17998: 90 e1 00 20 stw r7,32(r1) ffc1799c: 93 c1 00 28 stw r30,40(r1) ffc179a0: 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); ffc179a4: 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; ffc179a8: 38 00 00 00 li r0,0 ffc179ac: 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); ffc179b0: 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; ffc179b4: 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); ffc179b8: 98 01 00 0c stb r0,12(r1) ffc179bc: 91 21 00 14 stw r9,20(r1) switch (cmd) ffc179c0: 41 9e 00 2c beq- cr7,ffc179ec <== ALWAYS TAKEN *ret = cur_cln; break; default: errno = EINVAL; ffc179c4: 48 00 c8 4d bl ffc24210 <__errno> <== NOT EXECUTED ffc179c8: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc179cc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED rc = -1; ffc179d0: 38 60 ff ff li r3,-1 <== NOT EXECUTED break; } va_end(ap); return rc; } ffc179d4: 80 01 00 34 lwz r0,52(r1) ffc179d8: 83 c1 00 28 lwz r30,40(r1) ffc179dc: 7c 08 03 a6 mtlr r0 ffc179e0: 83 e1 00 2c lwz r31,44(r1) ffc179e4: 38 21 00 30 addi r1,r1,48 ffc179e8: 4e 80 00 20 blr va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ffc179ec: 80 09 00 0c lwz r0,12(r9) ret = va_arg(ap, uint32_t *); ffc179f0: 3b c0 00 05 li r30,5 /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { ffc179f4: 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 *); ffc179f8: 9b c1 00 0c stb r30,12(r1) /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { ffc179fc: 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 *); ffc17a00: 83 e9 00 10 lwz r31,16(r9) /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { ffc17a04: 40 9d 00 6c ble- cr7,ffc17a70 <== NEVER TAKEN va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc17a08: 81 24 00 20 lwz r9,32(r4) ffc17a0c: 2f 89 00 01 cmpwi cr7,r9,1 ffc17a10: 41 9e 00 3c beq- cr7,ffc17a4c *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; ffc17a14: 88 ab 00 08 lbz r5,8(r11) rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); ffc17a18: 38 c1 00 08 addi r6,r1,8 ffc17a1c: 7c 05 2c 30 srw r5,r0,r5 ffc17a20: 4b ff f6 29 bl ffc17048 if ( rc != RC_OK ) ffc17a24: 7c 83 23 79 mr. r3,r4 ffc17a28: 40 a2 ff ac bne- ffc179d4 <== NEVER TAKEN break; *ret = cur_cln; ffc17a2c: 80 01 00 08 lwz r0,8(r1) rc = -1; break; } va_end(ap); return rc; } ffc17a30: 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; ffc17a34: 90 1f 00 00 stw r0,0(r31) rc = -1; break; } va_end(ap); return rc; } ffc17a38: 80 01 00 34 lwz r0,52(r1) ffc17a3c: 83 e1 00 2c lwz r31,44(r1) ffc17a40: 38 21 00 30 addi r1,r1,48 ffc17a44: 7c 08 03 a6 mtlr r0 ffc17a48: 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)) && ffc17a4c: 81 24 00 24 lwz r9,36(r4) ffc17a50: 2f 89 00 00 cmpwi cr7,r9,0 ffc17a54: 40 be ff c0 bne- cr7,ffc17a14 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc17a58: 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)) && ffc17a5c: 71 48 00 03 andi. r8,r10,3 ffc17a60: 41 a2 ff b4 beq- ffc17a14 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; ffc17a64: 91 3f 00 00 stw r9,0(r31) rc = RC_OK; ffc17a68: 38 60 00 00 li r3,0 break; ffc17a6c: 4b ff ff 68 b ffc179d4 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 ); ffc17a70: 48 00 c7 a1 bl ffc24210 <__errno> <== NOT EXECUTED ffc17a74: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED ffc17a78: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc17a7c: 4b ff ff 58 b ffc179d4 <== NOT EXECUTED =============================================================================== ffc17048 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { ffc17048: 94 21 ff d0 stwu r1,-48(r1) ffc1704c: 7c 08 02 a6 mflr r0 ffc17050: 90 01 00 34 stw r0,52(r1) ffc17054: 93 61 00 1c stw r27,28(r1) int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) ffc17058: 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 ) { ffc1705c: 93 41 00 18 stw r26,24(r1) ffc17060: 7c da 33 78 mr r26,r6 int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) ffc17064: 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 ) { ffc17068: 93 a1 00 24 stw r29,36(r1) ffc1706c: 7c 9d 23 78 mr r29,r4 ffc17070: 93 c1 00 28 stw r30,40(r1) ffc17074: 7c be 2b 78 mr r30,r5 ffc17078: 93 e1 00 2c stw r31,44(r1) ffc1707c: 7c 7f 1b 78 mr r31,r3 ffc17080: 93 81 00 20 stw r28,32(r1) int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) ffc17084: 41 9e 00 d8 beq- cr7,ffc1715c <== ALWAYS TAKEN { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) ffc17088: 7f 9b 28 40 cmplw cr7,r27,r5 <== NOT EXECUTED ffc1708c: 41 9c 00 7c blt- cr7,ffc17108 <== NOT EXECUTED cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; ffc17090: 80 84 00 1c lwz r4,28(r4) <== NOT EXECUTED ffc17094: 7c bb 2b 78 mr r27,r5 <== NOT EXECUTED ffc17098: 90 81 00 08 stw r4,8(r1) <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) ffc1709c: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED ffc170a0: 41 9e 00 78 beq- cr7,ffc17118 <== NOT EXECUTED ffc170a4: 3b 80 00 00 li r28,0 <== NOT EXECUTED ffc170a8: 48 00 00 0c b ffc170b4 <== NOT EXECUTED ffc170ac: 80 81 00 08 lwz r4,8(r1) <== NOT EXECUTED ffc170b0: 41 9e 00 68 beq- cr7,ffc17118 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc170b4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc170b8: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED ffc170bc: 48 00 ab 79 bl ffc21c34 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) ffc170c0: 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 ) ffc170c4: 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++) ffc170c8: 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 ) ffc170cc: 41 82 ff e0 beq+ ffc170ac <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc170d0: 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; ffc170d4: 7c 6b 1b 78 mr r11,r3 <== NOT EXECUTED ffc170d8: 7c 6a fe 70 srawi r10,r3,31 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc170dc: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc170e0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc170e4: 7d 43 53 78 mr r3,r10 <== NOT EXECUTED ffc170e8: 7d 64 5b 78 mr r4,r11 <== NOT EXECUTED ffc170ec: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc170f0: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc170f4: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc170f8: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc170fc: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc17100: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc17104: 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; ffc17108: 80 84 00 38 lwz r4,56(r4) <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; ffc1710c: 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; ffc17110: 90 81 00 08 stw r4,8(r1) <== NOT EXECUTED ffc17114: 4b ff ff 88 b ffc1709c <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc17118: 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; ffc1711c: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc17120: 39 60 00 00 li r11,0 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; ffc17124: 93 dd 00 34 stw r30,52(r29) <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc17128: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc1712c: 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; ffc17130: 90 9d 00 38 stw r4,56(r29) <== NOT EXECUTED *disk_cln = cur_cln; } return RC_OK; } ffc17134: 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; ffc17138: 90 9a 00 00 stw r4,0(r26) <== NOT EXECUTED } return RC_OK; } ffc1713c: 7d 64 5b 78 mr r4,r11 <== NOT EXECUTED ffc17140: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc17144: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc17148: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc1714c: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc17150: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc17154: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc17158: 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; ffc1715c: 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; ffc17160: 39 40 00 00 li r10,0 ffc17164: 39 60 00 00 li r11,0 } ffc17168: 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; ffc1716c: 90 06 00 00 stw r0,0(r6) fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc17170: 7d 43 53 78 mr r3,r10 ffc17174: 7d 64 5b 78 mr r4,r11 ffc17178: 80 01 00 34 lwz r0,52(r1) ffc1717c: 83 61 00 1c lwz r27,28(r1) ffc17180: 7c 08 03 a6 mtlr r0 ffc17184: 83 81 00 20 lwz r28,32(r1) ffc17188: 83 a1 00 24 lwz r29,36(r1) ffc1718c: 83 c1 00 28 lwz r30,40(r1) ffc17190: 83 e1 00 2c lwz r31,44(r1) ffc17194: 38 21 00 30 addi r1,r1,48 ffc17198: 4e 80 00 20 blr =============================================================================== ffc17f68 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc17f68: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc17f6c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; ffc17f70: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc17f74: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc17f78: 81 24 00 20 lwz r9,32(r4) <== NOT EXECUTED ffc17f7c: 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) ffc17f80: 2f 89 00 01 cmpwi cr7,r9,1 <== NOT EXECUTED ffc17f84: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED ffc17f88: 7c 9f 23 78 mr r31,r4 <== NOT EXECUTED ffc17f8c: 93 a1 00 0c stw r29,12(r1) <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; ffc17f90: 83 c3 00 34 lwz r30,52(r3) <== NOT EXECUTED ffc17f94: 41 9e 00 28 beq- cr7,ffc17fbc <== 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)) ) ffc17f98: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc17f9c: 41 9e 00 80 beq- cr7,ffc1801c <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17fa0: 89 7e 00 05 lbz r11,5(r30) <== NOT EXECUTED ffc17fa4: 39 29 ff fe addi r9,r9,-2 <== NOT EXECUTED ffc17fa8: 80 1e 00 30 lwz r0,48(r30) <== NOT EXECUTED ffc17fac: 7d 2b 58 30 slw r11,r9,r11 <== NOT EXECUTED ffc17fb0: 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) << ffc17fb4: 88 1e 00 03 lbz r0,3(r30) <== NOT EXECUTED ffc17fb8: 7d 6b 00 30 slw r11,r11,r0 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc17fbc: 80 1f 00 24 lwz r0,36(r31) <== NOT EXECUTED ffc17fc0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc17fc4: 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) + ffc17fc8: 7f ab ea 14 add r29,r11,r29 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); ffc17fcc: 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) + ffc17fd0: 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) + ffc17fd4: 7f bd 02 14 add r29,r29,r0 <== NOT EXECUTED ffc17fd8: 4b ff 68 01 bl ffc0e7d8 <_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); ffc17fdc: 57 a0 07 fe clrlwi r0,r29,31 <== NOT EXECUTED ffc17fe0: 80 7e 00 6c lwz r3,108(r30) <== NOT EXECUTED ffc17fe4: 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 ); ffc17fe8: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc17fec: 7c 63 02 14 add r3,r3,r0 <== NOT EXECUTED ffc17ff0: 4b ff 67 b9 bl ffc0e7a8 <_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; ffc17ff4: 88 1f 00 30 lbz r0,48(r31) <== NOT EXECUTED ffc17ff8: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED ffc17ffc: 98 1f 00 30 stb r0,48(r31) <== NOT EXECUTED } ffc18000: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc18004: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc18008: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc1800c: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc18010: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc18014: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc18018: 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)) ) ffc1801c: 88 1e 00 0a lbz r0,10(r30) <== NOT EXECUTED ffc18020: 70 0b 00 03 andi. r11,r0,3 <== NOT EXECUTED ffc18024: 41 a2 ff 7c beq- ffc17fa0 <== NOT EXECUTED return fs_info->vol.rdir_loc; ffc18028: 81 7e 00 1c lwz r11,28(r30) <== NOT EXECUTED ffc1802c: 4b ff ff 88 b ffc17fb4 <== NOT EXECUTED =============================================================================== ffc1719c : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { ffc1719c: 94 21 ff d8 stwu r1,-40(r1) ffc171a0: 7c 08 02 a6 mflr r0 ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; ffc171a4: 39 60 00 01 li r11,1 ffc171a8: 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) + ffc171ac: 81 24 00 00 lwz r9,0(r4) ffc171b0: 93 21 00 0c stw r25,12(r1) ffc171b4: 7c 79 1b 78 mr r25,r3 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) ffc171b8: 2f 89 00 01 cmpwi cr7,r9,1 ffc171bc: 93 41 00 10 stw r26,16(r1) ffc171c0: 7c ba 2b 78 mr r26,r5 ffc171c4: 93 81 00 18 stw r28,24(r1) ffc171c8: 7c 9c 23 78 mr r28,r4 ffc171cc: 93 e1 00 24 stw r31,36(r1) ffc171d0: 93 01 00 08 stw r24,8(r1) ffc171d4: 93 61 00 14 stw r27,20(r1) ffc171d8: 93 a1 00 1c stw r29,28(r1) ffc171dc: 93 c1 00 20 stw r30,32(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc171e0: 83 e3 00 34 lwz r31,52(r3) ffc171e4: 41 9e 00 28 beq- cr7,ffc1720c 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)) ) ffc171e8: 2f 89 00 00 cmpwi cr7,r9,0 ffc171ec: 41 9e 01 a4 beq- cr7,ffc17390 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc171f0: 89 7f 00 05 lbz r11,5(r31) ffc171f4: 39 29 ff fe addi r9,r9,-2 ffc171f8: 80 1f 00 30 lwz r0,48(r31) ffc171fc: 7d 2b 58 30 slw r11,r9,r11 ffc17200: 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) << ffc17204: 88 1f 00 03 lbz r0,3(r31) ffc17208: 7d 6b 00 30 slw r11,r11,r0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc1720c: 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); ffc17210: 81 3f 00 68 lwz r9,104(r31) ffc17214: 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) + ffc17218: 7f cb f2 14 add r30,r11,r30 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc1721c: 57 de 20 36 rlwinm r30,r30,4,0,27 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); ffc17220: 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) + ffc17224: 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; ffc17228: 57 db 07 fe clrlwi r27,r30,31 rtems_chain_node *the_node = rtems_chain_first(hash + mod); ffc1722c: 1f 7b 00 0c mulli r27,r27,12 ffc17230: 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; ffc17234: 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)); ffc17238: 39 08 00 04 addi r8,r8,4 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) ffc1723c: 7f 89 40 00 cmpw cr7,r9,r8 ffc17240: 41 9e 00 64 beq- cr7,ffc172a4 ffc17244: 81 69 00 20 lwz r11,32(r9) ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; ffc17248: 39 40 00 01 li r10,1 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) ffc1724c: 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)) ) ffc17250: 2f 0b 00 00 cmpwi cr6,r11,0 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17254: 39 6b ff fe addi r11,r11,-2 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) ffc17258: 41 9e 00 20 beq- cr7,ffc17278 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)) ) ffc1725c: 40 9a 00 dc bne- cr6,ffc17338 ffc17260: 88 1f 00 0a lbz r0,10(r31) ffc17264: 70 0a 00 03 andi. r10,r0,3 ffc17268: 41 82 00 d0 beq- ffc17338 <== NEVER TAKEN return fs_info->vol.rdir_loc; ffc1726c: 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) << ffc17270: 88 1f 00 03 lbz r0,3(r31) ffc17274: 7d 4a 00 30 slw r10,r10,r0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc17278: 80 09 00 24 lwz r0,36(r9) ffc1727c: 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) + ffc17280: 7d 4a 5a 14 add r10,r10,r11 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc17284: 55 4a 20 36 rlwinm r10,r10,4,0,27 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); ffc17288: 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) + ffc1728c: 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) ffc17290: 7f 9e 00 00 cmpw cr7,r30,r0 ffc17294: 41 9e 00 b8 beq- cr7,ffc1734c { *ret = (void *)the_node; return 0; } } the_node = the_node->next; ffc17298: 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) ; ) ffc1729c: 7f 89 40 00 cmpw cr7,r9,r8 ffc172a0: 40 9e ff a4 bne+ cr7,ffc17244 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); ffc172a4: 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) ) ffc172a8: 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); ffc172ac: 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; ffc172b0: 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)); ffc172b4: 39 08 00 04 addi r8,r8,4 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) ffc172b8: 7f 89 40 00 cmpw cr7,r9,r8 ffc172bc: 40 be 00 4c bne+ cr7,ffc17308 <== NEVER TAKEN ffc172c0: 48 00 01 a8 b ffc17468 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)) ) ffc172c4: 88 1f 00 0a lbz r0,10(r31) <== NOT EXECUTED ffc172c8: 70 0a 00 03 andi. r10,r0,3 <== NOT EXECUTED ffc172cc: 41 82 00 58 beq- ffc17324 <== NOT EXECUTED return fs_info->vol.rdir_loc; ffc172d0: 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) << ffc172d4: 88 1f 00 03 lbz r0,3(r31) <== NOT EXECUTED ffc172d8: 7d 4a 00 30 slw r10,r10,r0 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc172dc: 80 09 00 24 lwz r0,36(r9) <== NOT EXECUTED ffc172e0: 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) + ffc172e4: 7d 4a 5a 14 add r10,r10,r11 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc172e8: 55 4a 20 36 rlwinm r10,r10,4,0,27 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); ffc172ec: 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) + ffc172f0: 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) ffc172f4: 7f 9e 00 00 cmpw cr7,r30,r0 <== NOT EXECUTED ffc172f8: 41 9e 00 ac beq- cr7,ffc173a4 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; ffc172fc: 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) ; ) ffc17300: 7f 89 40 00 cmpw cr7,r9,r8 <== NOT EXECUTED ffc17304: 41 9e 01 64 beq- cr7,ffc17468 <== NOT EXECUTED ffc17308: 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; ffc1730c: 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) ffc17310: 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)) ) ffc17314: 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) + ffc17318: 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) ffc1731c: 41 be ff c0 beq- cr7,ffc172dc <== 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)) ) ffc17320: 41 ba ff a4 beq- cr6,ffc172c4 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17324: 89 5f 00 05 lbz r10,5(r31) <== NOT EXECUTED ffc17328: 80 1f 00 30 lwz r0,48(r31) <== NOT EXECUTED ffc1732c: 7d 6a 50 30 slw r10,r11,r10 <== NOT EXECUTED ffc17330: 7d 4a 02 14 add r10,r10,r0 <== NOT EXECUTED ffc17334: 4b ff ff a0 b ffc172d4 <== NOT EXECUTED ffc17338: 89 5f 00 05 lbz r10,5(r31) ffc1733c: 80 1f 00 30 lwz r0,48(r31) ffc17340: 7d 6a 50 30 slw r10,r11,r10 ffc17344: 7d 4a 02 14 add r10,r10,r0 ffc17348: 4b ff ff 28 b ffc17270 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++; ffc1734c: 81 69 00 08 lwz r11,8(r9) return rc; ffc17350: 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; ffc17354: 91 3a 00 00 stw r9,0(r26) lfat_fd->links_num++; ffc17358: 38 0b 00 01 addi r0,r11,1 ffc1735c: 90 09 00 08 stw r0,8(r9) * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } ffc17360: 80 01 00 2c lwz r0,44(r1) ffc17364: 83 01 00 08 lwz r24,8(r1) ffc17368: 7c 08 03 a6 mtlr r0 ffc1736c: 83 21 00 0c lwz r25,12(r1) ffc17370: 83 41 00 10 lwz r26,16(r1) ffc17374: 83 61 00 14 lwz r27,20(r1) ffc17378: 83 81 00 18 lwz r28,24(r1) ffc1737c: 83 a1 00 1c lwz r29,28(r1) ffc17380: 83 c1 00 20 lwz r30,32(r1) ffc17384: 83 e1 00 24 lwz r31,36(r1) ffc17388: 38 21 00 28 addi r1,r1,40 ffc1738c: 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)) ) ffc17390: 88 1f 00 0a lbz r0,10(r31) ffc17394: 70 0a 00 03 andi. r10,r0,3 ffc17398: 41 a2 fe 58 beq- ffc171f0 <== NEVER TAKEN return fs_info->vol.rdir_loc; ffc1739c: 81 7f 00 1c lwz r11,28(r31) ffc173a0: 4b ff fe 64 b ffc17204 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) ) ffc173a4: 41 86 00 10 beq- cr1,ffc173b4 <== NOT EXECUTED ffc173a8: 80 09 00 0c lwz r0,12(r9) <== NOT EXECUTED ffc173ac: 7f 9e 00 00 cmpw cr7,r30,r0 <== NOT EXECUTED ffc173b0: 40 9e ff 4c bne+ cr7,ffc172fc <== NOT EXECUTED { *ret = (void *)the_node; return 0; ffc173b4: 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)); ffc173b8: 38 60 00 44 li r3,68 ffc173bc: 4b ff 1a 31 bl ffc08dec if ( lfat_fd == NULL ) ffc173c0: 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)); ffc173c4: 90 7a 00 00 stw r3,0(r26) ffc173c8: 7c 7d 1b 78 mr r29,r3 if ( lfat_fd == NULL ) ffc173cc: 41 9e 00 c0 beq- cr7,ffc1748c rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); ffc173d0: 38 80 00 00 li r4,0 ffc173d4: 38 a0 00 44 li r5,68 ffc173d8: 48 00 dd 51 bl ffc25128 lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) ffc173dc: 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; ffc173e0: 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; ffc173e4: 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; ffc173e8: 81 5c 00 00 lwz r10,0(r28) ffc173ec: 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; ffc173f0: 55 08 00 3c rlwinm r8,r8,0,0,30 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; ffc173f4: 81 3c 00 08 lwz r9,8(r28) ffc173f8: 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; ffc173fc: 99 1d 00 30 stb r8,48(r29) lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; ffc17400: 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; ffc17404: 90 fd 00 08 stw r7,8(r29) lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; ffc17408: 91 1d 00 3c stw r8,60(r29) lfat_fd->dir_pos = *dir_pos; ffc1740c: 91 5d 00 20 stw r10,32(r29) ffc17410: 91 7d 00 24 stw r11,36(r29) ffc17414: 91 3d 00 28 stw r9,40(r29) ffc17418: 90 1d 00 2c stw r0,44(r29) if ( rc != RC_OK ) ffc1741c: 41 9e 00 54 beq- cr7,ffc17470 <== NEVER TAKEN lfat_fd->ino = key; ffc17420: 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); ffc17424: 80 7f 00 68 lwz r3,104(r31) ffc17428: 7f a4 eb 78 mr r4,r29 ffc1742c: 7c 63 da 14 add r3,r3,r27 ffc17430: 4b ff 73 79 bl ffc0e7a8 <_Chain_Append> * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } ffc17434: 80 01 00 2c lwz r0,44(r1) /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; ffc17438: 38 60 00 00 li r3,0 } ffc1743c: 83 01 00 08 lwz r24,8(r1) ffc17440: 7c 08 03 a6 mtlr r0 ffc17444: 83 21 00 0c lwz r25,12(r1) ffc17448: 83 41 00 10 lwz r26,16(r1) ffc1744c: 83 61 00 14 lwz r27,20(r1) ffc17450: 83 81 00 18 lwz r28,24(r1) ffc17454: 83 a1 00 1c lwz r29,28(r1) ffc17458: 83 c1 00 20 lwz r30,32(r1) ffc1745c: 83 e1 00 24 lwz r31,36(r1) ffc17460: 38 21 00 28 addi r1,r1,40 ffc17464: 4e 80 00 20 blr return 0; } } the_node = the_node->next; } return -1; ffc17468: 3b 00 ff ff li r24,-1 ffc1746c: 4b ff ff 4c b ffc173b8 if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); ffc17470: 7f 23 cb 78 mr r3,r25 <== NOT EXECUTED ffc17474: 48 00 16 21 bl ffc18a94 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) ffc17478: 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); ffc1747c: 90 7d 00 0c stw r3,12(r29) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) ffc17480: 40 9e ff a4 bne+ cr7,ffc17424 <== NOT EXECUTED { free((*fat_fd)); ffc17484: 80 7a 00 00 lwz r3,0(r26) <== NOT EXECUTED ffc17488: 4b ff 10 59 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 ); ffc1748c: 48 00 cd 85 bl ffc24210 <__errno> ffc17490: 38 00 00 0c li r0,12 ffc17494: 90 03 00 00 stw r0,0(r3) ffc17498: 38 60 ff ff li r3,-1 ffc1749c: 4b ff fe c4 b ffc17360 =============================================================================== ffc174b8 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc174b8: 94 21 ff c0 stwu r1,-64(r1) ffc174bc: 7c 08 02 a6 mflr r0 ffc174c0: 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) ffc174c4: 7c df 33 79 mr. r31,r6 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc174c8: 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; ffc174cc: 38 00 00 00 li r0,0 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc174d0: 93 21 00 24 stw r25,36(r1) ffc174d4: 7c f9 3b 78 mr r25,r7 ffc174d8: 93 41 00 28 stw r26,40(r1) ffc174dc: 7c 9a 23 78 mr r26,r4 ffc174e0: 93 81 00 30 stw r28,48(r1) ffc174e4: 93 a1 00 34 stw r29,52(r1) ffc174e8: 7c 7d 1b 78 mr r29,r3 ffc174ec: 93 c1 00 38 stw r30,56(r1) ffc174f0: 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; ffc174f4: 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; ffc174f8: 38 60 00 00 li r3,0 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc174fc: 92 c1 00 18 stw r22,24(r1) ffc17500: 92 e1 00 1c stw r23,28(r1) ffc17504: 93 01 00 20 stw r24,32(r1) ffc17508: 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; ffc1750c: 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) ffc17510: 41 82 01 48 beq- ffc17658 <== NEVER TAKEN /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) ffc17514: 81 24 00 18 lwz r9,24(r4) ffc17518: 7f 89 28 40 cmplw cr7,r9,r5 ffc1751c: 40 9d 01 3c ble- cr7,ffc17658 <== NEVER TAKEN return FAT_EOF; if ((count > fat_fd->fat_file_size) || ffc17520: 7f 9f 48 40 cmplw cr7,r31,r9 ffc17524: 40 9d 01 6c ble- cr7,ffc17690 <== ALWAYS TAKEN (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; ffc17528: 7f fe 48 50 subf r31,r30,r9 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc1752c: 80 1a 00 20 lwz r0,32(r26) ffc17530: 2f 80 00 01 cmpwi cr7,r0,1 ffc17534: 41 9e 01 6c beq- cr7,ffc176a0 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc17538: 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); ffc1753c: 7f a3 eb 78 mr r3,r29 ffc17540: 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); ffc17544: a2 fc 00 06 lhz r23,6(r28) return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc17548: 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); ffc1754c: 7f 05 c3 78 mr r5,r24 ffc17550: 38 c1 00 08 addi r6,r1,8 ffc17554: 4b ff fa f5 bl ffc17048 if (rc != RC_OK) ffc17558: 7c 83 23 79 mr. r3,r4 ffc1755c: 40 82 00 fc bne- ffc17658 <== NEVER TAKEN return rc; while (count > 0) ffc17560: 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); ffc17564: 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) ffc17568: 3a c0 00 00 li r22,0 ffc1756c: 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); ffc17570: 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) ffc17574: 41 9e 00 c8 beq- cr7,ffc1763c <== 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) ffc17578: 88 1c 00 02 lbz r0,2(r28) return rc; while (count > 0) ffc1757c: 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) ffc17580: a0 bc 00 00 lhz r5,0(r28) return rc; while (count > 0) ffc17584: 3b 60 00 00 li r27,0 ffc17588: 48 00 00 74 b ffc175fc 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)) ) ffc1758c: 89 4b 00 0a lbz r10,10(r11) <== NOT EXECUTED ffc17590: 71 48 00 03 andi. r8,r10,3 <== NOT EXECUTED ffc17594: 41 82 00 90 beq- ffc17624 <== NOT EXECUTED return fs_info->vol.rdir_loc; ffc17598: 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); ffc1759c: 7d 20 04 30 srw r0,r9,r0 byte = ofs & (fs_info->vol.bps - 1); ffc175a0: 38 a5 ff ff addi r5,r5,-1 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); ffc175a4: 7c a5 48 38 and r5,r5,r9 ffc175a8: 7c f9 da 14 add r7,r25,r27 ffc175ac: 7c 84 02 14 add r4,r4,r0 ffc175b0: 7f c6 f3 78 mr r6,r30 ffc175b4: 7f a3 eb 78 mr r3,r29 ffc175b8: 48 00 10 ed bl ffc186a4 <_fat_block_read> if ( ret < 0 ) return -1; count -= c; cmpltd += c; ffc175bc: 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 ) ffc175c0: 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); ffc175c4: 38 a1 00 08 addi r5,r1,8 ffc175c8: 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 ) ffc175cc: 41 9c 01 2c blt- cr7,ffc176f8 <== NEVER TAKEN return -1; count -= c; cmpltd += c; save_cln = cur_cln; ffc175d0: 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) ffc175d4: 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); ffc175d8: 7e c4 b3 78 mr r4,r22 ffc175dc: 48 00 a6 59 bl ffc21c34 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc175e0: 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 ) ffc175e4: 2c 03 00 00 cmpwi r3,0 return rc; ofs = 0; ffc175e8: 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 ) ffc175ec: 40 82 00 6c bne- ffc17658 <== NEVER TAKEN rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc175f0: 41 9e 00 48 beq- cr7,ffc17638 <== ALWAYS TAKEN ffc175f4: 88 1c 00 02 lbz r0,2(r28) <== NOT EXECUTED ffc175f8: a0 bc 00 00 lhz r5,0(r28) <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); ffc175fc: a3 dc 00 06 lhz r30,6(r28) sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); ffc17600: 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)); ffc17604: 7f c9 f0 50 subf r30,r9,r30 ffc17608: 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)) ) ffc1760c: 2f 84 00 00 cmpwi cr7,r4,0 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17610: 38 84 ff fe addi r4,r4,-2 ffc17614: 40 99 00 08 ble- cr6,ffc1761c ffc17618: 7f fe fb 78 mr r30,r31 fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc1761c: 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)) ) ffc17620: 41 be ff 6c beq- cr7,ffc1758c <== NEVER TAKEN return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17624: 89 4b 00 05 lbz r10,5(r11) ffc17628: 81 6b 00 30 lwz r11,48(r11) ffc1762c: 7c 84 50 30 slw r4,r4,r10 ffc17630: 7c 84 5a 14 add r4,r4,r11 ffc17634: 4b ff ff 68 b ffc1759c save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ofs = 0; ffc17638: 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); ffc1763c: 88 1c 00 08 lbz r0,8(r28) ffc17640: 3a f7 ff ff addi r23,r23,-1 ffc17644: 7f 77 da 14 add r27,r23,r27 fat_fd->map.disk_cln = save_cln; ffc17648: 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); ffc1764c: 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 + ffc17650: 7f 1b c2 14 add r24,r27,r24 ffc17654: 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; } ffc17658: 80 01 00 44 lwz r0,68(r1) ffc1765c: 82 c1 00 18 lwz r22,24(r1) ffc17660: 7c 08 03 a6 mtlr r0 ffc17664: 82 e1 00 1c lwz r23,28(r1) ffc17668: 83 01 00 20 lwz r24,32(r1) ffc1766c: 83 21 00 24 lwz r25,36(r1) ffc17670: 83 41 00 28 lwz r26,40(r1) ffc17674: 83 61 00 2c lwz r27,44(r1) ffc17678: 83 81 00 30 lwz r28,48(r1) ffc1767c: 83 a1 00 34 lwz r29,52(r1) ffc17680: 83 c1 00 38 lwz r30,56(r1) ffc17684: 83 e1 00 3c lwz r31,60(r1) ffc17688: 38 21 00 40 addi r1,r1,64 ffc1768c: 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)) ffc17690: 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) || ffc17694: 7f 85 00 40 cmplw cr7,r5,r0 ffc17698: 40 bd fe 94 ble- cr7,ffc1752c <== ALWAYS TAKEN ffc1769c: 4b ff fe 8c b ffc17528 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc176a0: 80 1a 00 24 lwz r0,36(r26) ffc176a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc176a8: 40 be fe 90 bne- cr7,ffc17538 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc176ac: 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)) && ffc176b0: 70 08 00 03 andi. r8,r0,3 ffc176b4: 41 a2 fe 84 beq- ffc17538 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); ffc176b8: 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)) ) ffc176bc: 2f 89 00 00 cmpwi cr7,r9,0 ffc176c0: 40 9e 00 40 bne- cr7,ffc17700 <== NEVER TAKEN return fs_info->vol.rdir_loc; ffc176c4: 80 9c 00 1c lwz r4,28(r28) sec += (start >> fs_info->vol.sec_log2); ffc176c8: 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); ffc176cc: 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); ffc176d0: a0 bc 00 00 lhz r5,0(r28) ret = _fat_block_read(mt_entry, sec, byte, count, buf); ffc176d4: 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); ffc176d8: 7f c0 04 30 srw r0,r30,r0 byte = start & (fs_info->vol.bps - 1); ffc176dc: 38 a5 ff ff addi r5,r5,-1 ret = _fat_block_read(mt_entry, sec, byte, count, buf); ffc176e0: 7c 84 02 14 add r4,r4,r0 ffc176e4: 7f c5 28 38 and r5,r30,r5 ffc176e8: 7f 27 cb 78 mr r7,r25 ffc176ec: 48 00 0f b9 bl ffc186a4 <_fat_block_read> if ( ret < 0 ) ffc176f0: 2c 03 00 00 cmpwi r3,0 ffc176f4: 40 80 ff 64 bge+ ffc17658 <== 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; ffc176f8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc176fc: 4b ff ff 5c b ffc17658 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17700: 89 7c 00 05 lbz r11,5(r28) <== NOT EXECUTED ffc17704: 38 89 ff fe addi r4,r9,-2 <== NOT EXECUTED ffc17708: 80 1c 00 30 lwz r0,48(r28) <== NOT EXECUTED ffc1770c: 7c 84 58 30 slw r4,r4,r11 <== NOT EXECUTED ffc17710: 7c 84 02 14 add r4,r4,r0 <== NOT EXECUTED ffc17714: 4b ff ff b4 b ffc176c8 <== NOT EXECUTED =============================================================================== ffc181a4 : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc181a4: 94 21 ff d8 stwu r1,-40(r1) ffc181a8: 7c 08 02 a6 mflr r0 ffc181ac: 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)) && ffc181b0: 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 ) { ffc181b4: 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)) && ffc181b8: 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; ffc181bc: 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 ) { ffc181c0: 93 81 00 18 stw r28,24(r1) ffc181c4: 7c 7c 1b 78 mr r28,r3 ffc181c8: 93 c1 00 20 stw r30,32(r1) ffc181cc: 7c 9e 23 78 mr r30,r4 ffc181d0: 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; ffc181d4: 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; ffc181d8: 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)) && ffc181dc: 41 9e 00 b4 beq- cr7,ffc18290 <== NEVER TAKEN return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc181e0: 81 3f 00 0c lwz r9,12(r31) ffc181e4: 80 1f 00 10 lwz r0,16(r31) ffc181e8: 7f a9 48 38 and r9,r29,r9 ffc181ec: 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; ffc181f0: 38 00 00 00 li r0,0 ffc181f4: 90 1e 00 18 stw r0,24(r30) while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc181f8: 41 bc 00 34 blt+ cr7,ffc1822c <== ALWAYS TAKEN ffc181fc: 48 00 00 68 b ffc18264 <== NOT EXECUTED ffc18200: 81 7f 00 0c lwz r11,12(r31) ffc18204: 80 01 00 08 lwz r0,8(r1) ffc18208: 81 3f 00 10 lwz r9,16(r31) ffc1820c: 7c 0b 58 38 and r11,r0,r11 ffc18210: 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; ffc18214: a1 3f 00 06 lhz r9,6(r31) ffc18218: 81 7e 00 18 lwz r11,24(r30) ffc1821c: 7d 2b 4a 14 add r9,r11,r9 ffc18220: 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) ffc18224: 40 9c 00 44 bge- cr7,ffc18268 <== ALWAYS TAKEN ffc18228: 7c 1d 03 78 mr r29,r0 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc1822c: 7f a4 eb 78 mr r4,r29 ffc18230: 7f 83 e3 78 mr r3,r28 ffc18234: 38 a1 00 08 addi r5,r1,8 ffc18238: 48 00 99 fd bl ffc21c34 if ( rc != RC_OK ) ffc1823c: 2c 03 00 00 cmpwi r3,0 ffc18240: 41 82 ff c0 beq+ ffc18200 <== ALWAYS TAKEN fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } ffc18244: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc18248: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc1824c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18250: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc18254: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc18258: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc1825c: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc18260: 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; ffc18264: 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; } ffc18268: 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; ffc1826c: 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; ffc18270: 93 be 00 3c stw r29,60(r30) return rc; } ffc18274: 7c 08 03 a6 mtlr r0 ffc18278: 83 81 00 18 lwz r28,24(r1) ffc1827c: 83 a1 00 1c lwz r29,28(r1) ffc18280: 83 c1 00 20 lwz r30,32(r1) ffc18284: 83 e1 00 24 lwz r31,36(r1) ffc18288: 38 21 00 28 addi r1,r1,40 ffc1828c: 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)) && ffc18290: 80 04 00 24 lwz r0,36(r4) <== NOT EXECUTED ffc18294: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc18298: 40 be ff 48 bne- cr7,ffc181e0 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc1829c: 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)) && ffc182a0: 70 09 00 03 andi. r9,r0,3 <== NOT EXECUTED ffc182a4: 41 82 ff 3c beq+ ffc181e0 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; ffc182a8: 80 1f 00 28 lwz r0,40(r31) <== NOT EXECUTED return rc; ffc182ac: 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; ffc182b0: 90 04 00 18 stw r0,24(r4) <== NOT EXECUTED return rc; ffc182b4: 4b ff ff 90 b ffc18244 <== NOT EXECUTED =============================================================================== ffc17718 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { ffc17718: 94 21 ff d8 stwu r1,-40(r1) ffc1771c: 7c 08 02 a6 mflr r0 ffc17720: 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; ffc17724: 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 ) { ffc17728: 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 ) ffc1772c: 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; ffc17730: 91 61 00 0c stw r11,12(r1) uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; ffc17734: 39 60 ff ff li r11,-1 if ( new_length >= fat_fd->fat_file_size ) ffc17738: 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 ) { ffc1773c: 93 c1 00 20 stw r30,32(r1) ffc17740: 7c 9e 23 78 mr r30,r4 ffc17744: 93 e1 00 24 stw r31,36(r1) ffc17748: 7c 7f 1b 78 mr r31,r3 ffc1774c: 93 a1 00 1c stw r29,28(r1) ffc17750: 91 81 00 18 stw r12,24(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc17754: 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; ffc17758: 91 61 00 08 stw r11,8(r1) if ( new_length >= fat_fd->fat_file_size ) ffc1775c: 40 9d 00 90 ble- cr7,ffc177ec <== NEVER TAKEN return rc; assert(fat_fd->fat_file_size); ffc17760: 2f 80 00 00 cmpwi cr7,r0,0 ffc17764: 41 9e 00 fc beq- cr7,ffc17860 <== NEVER TAKEN cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; ffc17768: a3 a9 00 06 lhz r29,6(r9) ffc1776c: 89 29 00 08 lbz r9,8(r9) ffc17770: 3b bd ff ff addi r29,r29,-1 ffc17774: 7f bd 2a 14 add r29,r29,r5 ffc17778: 7f bd 4c 30 srw r29,r29,r9 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) ffc1777c: 7f a9 48 30 slw r9,r29,r9 ffc17780: 7f 80 48 40 cmplw cr7,r0,r9 return RC_OK; ffc17784: 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) ffc17788: 40 9d 00 3c ble- cr7,ffc177c4 <== NEVER TAKEN return RC_OK; if (cl_start != 0) ffc1778c: 2e 1d 00 00 cmpwi cr4,r29,0 ffc17790: 41 92 00 18 beq- cr4,ffc177a8 <== ALWAYS TAKEN { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); ffc17794: 38 bd ff ff addi r5,r29,-1 <== NOT EXECUTED ffc17798: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc1779c: 4b ff f8 ad bl ffc17048 <== NOT EXECUTED if (rc != RC_OK) ffc177a0: 7c 80 23 79 mr. r0,r4 <== NOT EXECUTED ffc177a4: 40 82 00 20 bne- ffc177c4 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); ffc177a8: 7f e3 fb 78 mr r3,r31 ffc177ac: 7f c4 f3 78 mr r4,r30 ffc177b0: 7f a5 eb 78 mr r5,r29 ffc177b4: 38 c1 00 0c addi r6,r1,12 ffc177b8: 4b ff f8 91 bl ffc17048 if (rc != RC_OK) ffc177bc: 7c 80 23 79 mr. r0,r4 ffc177c0: 41 82 00 58 beq- ffc17818 <== 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; } ffc177c4: 7c 03 03 78 mr r3,r0 ffc177c8: 80 01 00 2c lwz r0,44(r1) ffc177cc: 81 81 00 18 lwz r12,24(r1) ffc177d0: 7c 08 03 a6 mtlr r0 ffc177d4: 83 a1 00 1c lwz r29,28(r1) ffc177d8: 83 c1 00 20 lwz r30,32(r1) ffc177dc: 7d 80 81 20 mtcrf 8,r12 ffc177e0: 83 e1 00 24 lwz r31,36(r1) ffc177e4: 38 21 00 28 addi r1,r1,40 ffc177e8: 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; ffc177ec: 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; } ffc177f0: 81 81 00 18 lwz r12,24(r1) <== NOT EXECUTED ffc177f4: 7c 03 03 78 mr r3,r0 <== NOT EXECUTED ffc177f8: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc177fc: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc17800: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc17804: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc17808: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc1780c: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc17810: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc17814: 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); ffc17818: 80 81 00 0c lwz r4,12(r1) ffc1781c: 7f e3 fb 78 mr r3,r31 ffc17820: 48 00 a9 dd bl ffc221fc if (rc != RC_OK) ffc17824: 7c 60 1b 79 mr. r0,r3 ffc17828: 40 a2 ff 9c bne- ffc177c4 <== NEVER TAKEN return rc; if (cl_start != 0) ffc1782c: 41 92 ff 98 beq+ cr4,ffc177c4 <== ALWAYS TAKEN { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); ffc17830: 80 81 00 08 lwz r4,8(r1) <== NOT EXECUTED ffc17834: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc17838: 38 a0 ff ff li r5,-1 <== NOT EXECUTED ffc1783c: 48 00 a6 5d bl ffc21e98 <== NOT EXECUTED if ( rc != RC_OK ) ffc17840: 7c 60 1b 79 mr. r0,r3 <== NOT EXECUTED ffc17844: 40 a2 ff 80 bne- ffc177c4 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; ffc17848: 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; ffc1784c: 3b bd ff ff addi r29,r29,-1 <== NOT EXECUTED ffc17850: 93 be 00 34 stw r29,52(r30) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; ffc17854: 91 3e 00 38 stw r9,56(r30) <== NOT EXECUTED fat_fd->map.last_cln = new_last_cln; ffc17858: 91 3e 00 3c stw r9,60(r30) <== NOT EXECUTED ffc1785c: 4b ff ff 68 b ffc177c4 <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); ffc17860: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc17864: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc17868: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc1786c: 38 63 50 fc addi r3,r3,20732 <== NOT EXECUTED ffc17870: 38 80 02 6d li r4,621 <== NOT EXECUTED ffc17874: 38 a5 50 e8 addi r5,r5,20712 <== NOT EXECUTED ffc17878: 38 c6 51 44 addi r6,r6,20804 <== NOT EXECUTED ffc1787c: 4b ff 04 15 bl ffc07c90 <__assert_func> <== NOT EXECUTED =============================================================================== ffc17cc0 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc17cc0: 94 21 ff c0 stwu r1,-64(r1) ffc17cc4: 7c 08 02 a6 mflr r0 uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) return cmpltd; ffc17cc8: 39 20 00 00 li r9,0 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc17ccc: 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 ) ffc17cd0: 7c df 33 79 mr. r31,r6 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc17cd4: 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; ffc17cd8: 38 00 00 00 li r0,0 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc17cdc: 93 21 00 24 stw r25,36(r1) ffc17ce0: 7c f9 3b 78 mr r25,r7 ffc17ce4: 93 61 00 2c stw r27,44(r1) ffc17ce8: 7c 9b 23 78 mr r27,r4 ffc17cec: 93 81 00 30 stw r28,48(r1) ffc17cf0: 7c bc 2b 78 mr r28,r5 ffc17cf4: 93 a1 00 34 stw r29,52(r1) ffc17cf8: 93 c1 00 38 stw r30,56(r1) ffc17cfc: 7c 7e 1b 78 mr r30,r3 ffc17d00: 92 c1 00 18 stw r22,24(r1) ffc17d04: 92 e1 00 1c stw r23,28(r1) ffc17d08: 93 01 00 20 stw r24,32(r1) ffc17d0c: 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; ffc17d10: 83 a3 00 34 lwz r29,52(r3) uint32_t cmpltd = 0; uint32_t cur_cln = 0; ffc17d14: 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; ffc17d18: 90 01 00 08 stw r0,8(r1) if ( count == 0 ) ffc17d1c: 41 82 01 74 beq- ffc17e90 <== NEVER TAKEN return cmpltd; if ( start > fat_fd->fat_file_size ) ffc17d20: 80 04 00 18 lwz r0,24(r4) ffc17d24: 7f 80 28 40 cmplw cr7,r0,r5 ffc17d28: 41 9c 02 14 blt- cr7,ffc17f3c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || ffc17d2c: 80 04 00 14 lwz r0,20(r4) ffc17d30: 7f 9f 00 40 cmplw cr7,r31,r0 ffc17d34: 41 9d 02 08 bgt- cr7,ffc17f3c <== NEVER TAKEN (start > fat_fd->size_limit - count)) ffc17d38: 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) || ffc17d3c: 7f 85 00 40 cmplw cr7,r5,r0 ffc17d40: 41 9d 01 fc bgt- cr7,ffc17f3c <== 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); ffc17d44: 7f 5f 2a 14 add r26,r31,r5 ffc17d48: 7f 45 d3 78 mr r5,r26 ffc17d4c: 38 c1 00 08 addi r6,r1,8 ffc17d50: 4b ff fd 31 bl ffc17a80 if (rc != RC_OK) ffc17d54: 7c 69 1b 79 mr. r9,r3 ffc17d58: 40 82 01 38 bne- ffc17e90 <== NEVER TAKEN /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) ffc17d5c: 80 01 00 08 lwz r0,8(r1) ffc17d60: 7f 9a 00 00 cmpw cr7,r26,r0 ffc17d64: 41 9e 00 08 beq- cr7,ffc17d6c <== ALWAYS TAKEN count = c - start; ffc17d68: 7f fc 00 50 subf r31,r28,r0 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc17d6c: 80 1b 00 20 lwz r0,32(r27) ffc17d70: 2f 80 00 01 cmpwi cr7,r0,1 ffc17d74: 41 9e 01 58 beq- cr7,ffc17ecc return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc17d78: 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); ffc17d7c: 7f c3 f3 78 mr r3,r30 ffc17d80: 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); ffc17d84: a3 5d 00 06 lhz r26,6(r29) return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc17d88: 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); ffc17d8c: 7f 05 c3 78 mr r5,r24 ffc17d90: 38 c1 00 0c addi r6,r1,12 ffc17d94: 4b ff f2 b5 bl ffc17048 if (rc != RC_OK) ffc17d98: 7c 89 23 79 mr. r9,r4 ffc17d9c: 40 82 00 f4 bne- ffc17e90 <== NEVER TAKEN return rc; while (count > 0) ffc17da0: 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); ffc17da4: 3b 5a ff ff addi r26,r26,-1 ffc17da8: 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) ffc17dac: 3a c0 00 00 li r22,0 ffc17db0: 7f 8b e3 78 mr r11,r28 ffc17db4: 3b 40 00 00 li r26,0 ffc17db8: 40 be 00 78 bne+ cr7,ffc17e30 <== ALWAYS TAKEN ffc17dbc: 48 00 00 b8 b ffc17e74 <== 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)) ) ffc17dc0: 88 09 00 0a lbz r0,10(r9) <== NOT EXECUTED ffc17dc4: 70 0a 00 03 andi. r10,r0,3 <== NOT EXECUTED ffc17dc8: 41 82 00 94 beq- ffc17e5c <== NOT EXECUTED return fs_info->vol.rdir_loc; ffc17dcc: 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); ffc17dd0: 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); ffc17dd4: 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); ffc17dd8: a0 bd 00 00 lhz r5,0(r29) ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); ffc17ddc: 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); ffc17de0: 7d 60 04 30 srw r0,r11,r0 byte = ofs & (fs_info->vol.bps - 1); ffc17de4: 38 a5 ff ff addi r5,r5,-1 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); ffc17de8: 7d 65 28 38 and r5,r11,r5 ffc17dec: 7c 84 02 14 add r4,r4,r0 ffc17df0: 48 00 09 95 bl ffc18784 <_fat_block_write> return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc17df4: 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 ) ffc17df8: 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); ffc17dfc: 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 ) ffc17e00: 41 9c 01 34 blt- cr7,ffc17f34 <== NEVER TAKEN return -1; count -= c; cmpltd += c; save_cln = cur_cln; ffc17e04: 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; ffc17e08: 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); ffc17e0c: 7e c4 b3 78 mr r4,r22 ffc17e10: 48 00 9e 25 bl ffc21c34 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc17e14: 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 ) ffc17e18: 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) ffc17e1c: 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; ffc17e20: 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; ffc17e24: 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 ) ffc17e28: 40 82 00 68 bne- ffc17e90 <== NEVER TAKEN rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc17e2c: 41 9e 00 44 beq- cr7,ffc17e70 { c = MIN(count, (fs_info->vol.bpc - ofs)); ffc17e30: a0 dd 00 06 lhz r6,6(r29) sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); ffc17e34: 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)); ffc17e38: 7c cb 30 50 subf r6,r11,r6 ffc17e3c: 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)) ) ffc17e40: 2f 84 00 00 cmpwi cr7,r4,0 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17e44: 38 84 ff fe addi r4,r4,-2 ffc17e48: 40 99 00 08 ble- cr6,ffc17e50 ffc17e4c: 7f e6 fb 78 mr r6,r31 fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc17e50: 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)); ffc17e54: 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)) ) ffc17e58: 41 be ff 68 beq- cr7,ffc17dc0 <== NEVER TAKEN return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17e5c: 89 49 00 05 lbz r10,5(r9) ffc17e60: 80 09 00 30 lwz r0,48(r9) ffc17e64: 7c 84 50 30 slw r4,r4,r10 ffc17e68: 7c 84 02 14 add r4,r4,r0 ffc17e6c: 4b ff ff 64 b ffc17dd0 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc17e70: 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); ffc17e74: 88 1d 00 08 lbz r0,8(r29) ffc17e78: 3b 9c ff ff addi r28,r28,-1 ffc17e7c: 7f 5c d2 14 add r26,r28,r26 fat_fd->map.disk_cln = save_cln; ffc17e80: 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); ffc17e84: 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 + ffc17e88: 7f 1a c2 14 add r24,r26,r24 ffc17e8c: 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; } ffc17e90: 80 01 00 44 lwz r0,68(r1) ffc17e94: 7d 23 4b 78 mr r3,r9 ffc17e98: 82 c1 00 18 lwz r22,24(r1) ffc17e9c: 7c 08 03 a6 mtlr r0 ffc17ea0: 82 e1 00 1c lwz r23,28(r1) ffc17ea4: 83 01 00 20 lwz r24,32(r1) ffc17ea8: 83 21 00 24 lwz r25,36(r1) ffc17eac: 83 41 00 28 lwz r26,40(r1) ffc17eb0: 83 61 00 2c lwz r27,44(r1) ffc17eb4: 83 81 00 30 lwz r28,48(r1) ffc17eb8: 83 a1 00 34 lwz r29,52(r1) ffc17ebc: 83 c1 00 38 lwz r30,56(r1) ffc17ec0: 83 e1 00 3c lwz r31,60(r1) ffc17ec4: 38 21 00 40 addi r1,r1,64 ffc17ec8: 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)) && ffc17ecc: 80 1b 00 24 lwz r0,36(r27) ffc17ed0: 2f 80 00 00 cmpwi cr7,r0,0 ffc17ed4: 40 be fe a4 bne- cr7,ffc17d78 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc17ed8: 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)) && ffc17edc: 70 09 00 03 andi. r9,r0,3 ffc17ee0: 41 a2 fe 98 beq- ffc17d78 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); ffc17ee4: 81 7b 00 1c lwz r11,28(r27) fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc17ee8: 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)) ) ffc17eec: 2f 8b 00 00 cmpwi cr7,r11,0 ffc17ef0: 40 9e 00 60 bne- cr7,ffc17f50 <== NEVER TAKEN ffc17ef4: 88 09 00 0a lbz r0,10(r9) ffc17ef8: 70 0a 00 03 andi. r10,r0,3 ffc17efc: 41 82 00 54 beq- ffc17f50 <== NEVER TAKEN return fs_info->vol.rdir_loc; ffc17f00: 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); ffc17f04: 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); ffc17f08: 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); ffc17f0c: a0 bd 00 00 lhz r5,0(r29) ret = _fat_block_write(mt_entry, sec, byte, count, buf); ffc17f10: 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); ffc17f14: 7f 80 04 30 srw r0,r28,r0 byte = start & (fs_info->vol.bps - 1); ffc17f18: 38 a5 ff ff addi r5,r5,-1 ret = _fat_block_write(mt_entry, sec, byte, count, buf); ffc17f1c: 7c 84 02 14 add r4,r4,r0 ffc17f20: 7f 85 28 38 and r5,r28,r5 ffc17f24: 7f 27 cb 78 mr r7,r25 ffc17f28: 48 00 08 5d bl ffc18784 <_fat_block_write> if ( ret < 0 ) ffc17f2c: 7c 69 1b 79 mr. r9,r3 ffc17f30: 40 80 ff 60 bge+ ffc17e90 <== 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; ffc17f34: 39 20 ff ff li r9,-1 <== NOT EXECUTED ffc17f38: 4b ff ff 58 b ffc17e90 <== 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 ); ffc17f3c: 48 00 c2 d5 bl ffc24210 <__errno> <== NOT EXECUTED ffc17f40: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc17f44: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc17f48: 39 20 ff ff li r9,-1 <== NOT EXECUTED ffc17f4c: 4b ff ff 44 b ffc17e90 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc17f50: 89 49 00 05 lbz r10,5(r9) <== NOT EXECUTED ffc17f54: 38 8b ff fe addi r4,r11,-2 <== NOT EXECUTED ffc17f58: 80 09 00 30 lwz r0,48(r9) <== NOT EXECUTED ffc17f5c: 7c 84 50 30 slw r4,r4,r10 <== NOT EXECUTED ffc17f60: 7c 84 02 14 add r4,r4,r0 <== NOT EXECUTED ffc17f64: 4b ff ff a0 b ffc17f04 <== NOT EXECUTED =============================================================================== ffc221fc : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { ffc221fc: 94 21 ff d0 stwu r1,-48(r1) ffc22200: 7c 08 02 a6 mflr r0 ffc22204: 90 01 00 34 stw r0,52(r1) ffc22208: 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; ffc2220c: 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 ) { ffc22210: 93 41 00 18 stw r26,24(r1) ffc22214: 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) ffc22218: 81 3e 00 0c lwz r9,12(r30) ffc2221c: 80 1e 00 10 lwz r0,16(r30) ffc22220: 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 ) { ffc22224: 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) ffc22228: 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; ffc2222c: 38 00 00 00 li r0,0 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { ffc22230: 93 61 00 1c stw r27,28(r1) ffc22234: 7c 7d 1b 78 mr r29,r3 ffc22238: 93 81 00 20 stw r28,32(r1) ffc2223c: 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; ffc22240: 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) ffc22244: 40 9c 00 ac bge- cr7,ffc222f0 <== NEVER TAKEN ffc22248: 7c 9f 23 78 mr r31,r4 ffc2224c: 3b 80 00 00 li r28,0 ffc22250: 3b 60 00 00 li r27,0 ffc22254: 48 00 00 30 b ffc22284 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); ffc22258: 4b ff fc 41 bl ffc21e98 if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; ffc2225c: 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 ) ffc22260: 2c 03 00 00 cmpwi r3,0 rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; ffc22264: 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 ) ffc22268: 41 82 00 08 beq- ffc22270 <== ALWAYS TAKEN ffc2226c: 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) ffc22270: 81 3e 00 0c lwz r9,12(r30) ffc22274: 80 1e 00 10 lwz r0,16(r30) ffc22278: 7f e9 48 38 and r9,r31,r9 ffc2227c: 7f 89 00 40 cmplw cr7,r9,r0 ffc22280: 40 9c 00 78 bge- cr7,ffc222f8 <== ALWAYS TAKEN { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); ffc22284: 7f e4 fb 78 mr r4,r31 ffc22288: 38 a1 00 08 addi r5,r1,8 ffc2228c: 7f a3 eb 78 mr r3,r29 ffc22290: 4b ff f9 a5 bl ffc21c34 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); ffc22294: 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 ) ffc22298: 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); ffc2229c: 38 a0 00 00 li r5,0 ffc222a0: 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 ) ffc222a4: 41 82 ff b4 beq+ ffc22258 <== ALWAYS TAKEN { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc222a8: 80 1e 00 40 lwz r0,64(r30) <== NOT EXECUTED ffc222ac: 2f 80 ff ff cmpwi cr7,r0,-1 <== NOT EXECUTED ffc222b0: 41 9e 00 0c beq- cr7,ffc222bc <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; ffc222b4: 7c 1c 02 14 add r0,r28,r0 <== NOT EXECUTED ffc222b8: 90 1e 00 40 stw r0,64(r30) <== NOT EXECUTED fat_buf_release(fs_info); ffc222bc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc222c0: 4b ff 62 41 bl ffc18500 <== NOT EXECUTED fat_buf_release(fs_info); if (rc1 != RC_OK) return rc1; return RC_OK; } ffc222c4: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc222c8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc222cc: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc222d0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc222d4: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc222d8: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc222dc: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc222e0: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc222e4: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc222e8: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc222ec: 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; ffc222f0: 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; ffc222f4: 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) ffc222f8: 80 1e 00 40 lwz r0,64(r30) freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; ffc222fc: 93 5e 00 44 stw r26,68(r30) if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc22300: 2f 80 ff ff cmpwi cr7,r0,-1 ffc22304: 41 9e 00 0c beq- cr7,ffc22310 <== ALWAYS TAKEN fs_info->vol.free_cls += freed_cls_cnt; ffc22308: 7c 1c 02 14 add r0,r28,r0 <== NOT EXECUTED ffc2230c: 90 1e 00 40 stw r0,64(r30) <== NOT EXECUTED fat_buf_release(fs_info); ffc22310: 7f c3 f3 78 mr r3,r30 ffc22314: 4b ff 61 ed bl ffc18500 if (rc1 != RC_OK) return rc1; return RC_OK; } ffc22318: 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); ffc2231c: 7f 7f db 78 mr r31,r27 if (rc1 != RC_OK) return rc1; return RC_OK; } ffc22320: 83 41 00 18 lwz r26,24(r1) ffc22324: 7c 08 03 a6 mtlr r0 ffc22328: 7f e3 fb 78 mr r3,r31 ffc2232c: 83 61 00 1c lwz r27,28(r1) ffc22330: 83 81 00 20 lwz r28,32(r1) ffc22334: 83 a1 00 24 lwz r29,36(r1) ffc22338: 83 c1 00 28 lwz r30,40(r1) ffc2233c: 83 e1 00 2c lwz r31,44(r1) ffc22340: 38 21 00 30 addi r1,r1,48 ffc22344: 4e 80 00 20 blr =============================================================================== ffc18bbc : 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; ffc18bbc: 81 23 00 34 lwz r9,52(r3) <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); ffc18bc0: 39 00 ff fe li r8,-2 <== NOT EXECUTED ffc18bc4: 80 09 00 7c lwz r0,124(r9) <== NOT EXECUTED ffc18bc8: 81 29 00 70 lwz r9,112(r9) <== NOT EXECUTED ffc18bcc: 7c 00 20 50 subf r0,r0,r4 <== NOT EXECUTED ffc18bd0: 54 0b e8 fe rlwinm r11,r0,29,3,31 <== NOT EXECUTED ffc18bd4: 7d 49 58 ae lbzx r10,r9,r11 <== NOT EXECUTED ffc18bd8: 54 00 07 7e clrlwi r0,r0,29 <== NOT EXECUTED ffc18bdc: 5d 00 00 3e rotlw r0,r8,r0 <== NOT EXECUTED ffc18be0: 7c 00 50 38 and r0,r0,r10 <== NOT EXECUTED ffc18be4: 7c 09 59 ae stbx r0,r9,r11 <== NOT EXECUTED } ffc18be8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc21c34 : 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)) ) ffc21c34: 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 ) { ffc21c38: 94 21 ff c8 stwu r1,-56(r1) ffc21c3c: 7c 08 02 a6 mflr r0 ffc21c40: 93 41 00 20 stw r26,32(r1) ffc21c44: 7c ba 2b 78 mr r26,r5 ffc21c48: 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; ffc21c4c: 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 ) { ffc21c50: 93 c1 00 30 stw r30,48(r1) ffc21c54: 7c 9e 23 78 mr r30,r4 ffc21c58: 93 e1 00 34 stw r31,52(r1) ffc21c5c: 93 21 00 1c stw r25,28(r1) ffc21c60: 93 61 00 24 stw r27,36(r1) ffc21c64: 93 81 00 28 stw r28,40(r1) ffc21c68: 93 a1 00 2c stw r29,44(r1) int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ffc21c6c: 83 e3 00 34 lwz r31,52(r3) rtems_bdbuf_buffer *block0 = NULL; ffc21c70: 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)) ) ffc21c74: 40 9d 00 80 ble- cr7,ffc21cf4 <== NEVER TAKEN ffc21c78: 81 3f 00 34 lwz r9,52(r31) ffc21c7c: 38 09 00 01 addi r0,r9,1 ffc21c80: 7f 84 00 40 cmplw cr7,r4,r0 ffc21c84: 41 9d 00 70 bgt- cr7,ffc21cf4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + ffc21c88: 88 1f 00 0a lbz r0,10(r31) ffc21c8c: 70 09 00 01 andi. r9,r0,1 ffc21c90: 40 82 00 a4 bne- ffc21d34 <== ALWAYS TAKEN ffc21c94: 70 09 00 02 andi. r9,r0,2 <== NOT EXECUTED ffc21c98: 8b 7f 00 02 lbz r27,2(r31) <== NOT EXECUTED ffc21c9c: 41 82 00 b4 beq- ffc21d50 <== NOT EXECUTED ffc21ca0: 54 9d 08 3c rlwinm r29,r4,1,0,30 <== NOT EXECUTED ffc21ca4: 80 1f 00 4c lwz r0,76(r31) <== NOT EXECUTED ffc21ca8: 7f bb dc 30 srw r27,r29,r27 <== NOT EXECUTED ffc21cac: 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); ffc21cb0: 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); ffc21cb4: a3 3f 00 00 lhz r25,0(r31) rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); ffc21cb8: 7f 64 db 78 mr r4,r27 ffc21cbc: 38 a0 00 01 li r5,1 ffc21cc0: 38 c1 00 08 addi r6,r1,8 ffc21cc4: 4b ff 65 f5 bl ffc182b8 if (rc != RC_OK) ffc21cc8: 7c 7c 1b 79 mr. r28,r3 ffc21ccc: 40 82 00 38 bne- ffc21d04 <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) ffc21cd0: 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); ffc21cd4: 3b 39 ff ff addi r25,r25,-1 ffc21cd8: 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 ) ffc21cdc: 2f 80 00 02 cmpwi cr7,r0,2 ffc21ce0: 41 9e 00 84 beq- cr7,ffc21d64 <== NEVER TAKEN ffc21ce4: 2f 80 00 04 cmpwi cr7,r0,4 ffc21ce8: 41 9e 01 10 beq- cr7,ffc21df8 <== NEVER TAKEN ffc21cec: 2f 80 00 01 cmpwi cr7,r0,1 ffc21cf0: 41 9e 00 c0 beq- cr7,ffc21db0 <== 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); ffc21cf4: 48 00 25 1d bl ffc24210 <__errno> <== NOT EXECUTED ffc21cf8: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc21cfc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc21d00: 3b 80 ff ff li r28,-1 <== NOT EXECUTED break; } return RC_OK; } ffc21d04: 80 01 00 3c lwz r0,60(r1) ffc21d08: 7f 83 e3 78 mr r3,r28 ffc21d0c: 83 21 00 1c lwz r25,28(r1) ffc21d10: 7c 08 03 a6 mtlr r0 ffc21d14: 83 41 00 20 lwz r26,32(r1) ffc21d18: 83 61 00 24 lwz r27,36(r1) ffc21d1c: 83 81 00 28 lwz r28,40(r1) ffc21d20: 83 a1 00 2c lwz r29,44(r1) ffc21d24: 83 c1 00 30 lwz r30,48(r1) ffc21d28: 83 e1 00 34 lwz r31,52(r1) ffc21d2c: 38 21 00 38 addi r1,r1,56 ffc21d30: 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) + ffc21d34: 54 9d f8 7e rlwinm r29,r4,31,1,31 ffc21d38: 8b 7f 00 02 lbz r27,2(r31) ffc21d3c: 7f bd 22 14 add r29,r29,r4 ffc21d40: 80 1f 00 4c lwz r0,76(r31) ffc21d44: 7f bb dc 30 srw r27,r29,r27 ffc21d48: 7f 7b 02 14 add r27,r27,r0 ffc21d4c: 4b ff ff 64 b ffc21cb0 ffc21d50: 54 9d 10 3a rlwinm r29,r4,2,0,29 <== NOT EXECUTED ffc21d54: 80 1f 00 4c lwz r0,76(r31) <== NOT EXECUTED ffc21d58: 7f bb dc 30 srw r27,r29,r27 <== NOT EXECUTED ffc21d5c: 7f 7b 02 14 add r27,r27,r0 <== NOT EXECUTED ffc21d60: 4b ff ff 50 b ffc21cb0 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); ffc21d64: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc21d68: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc21d6c: 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)); ffc21d70: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc21d74: 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)); ffc21d78: 7c 09 ea 2e lhzx r0,r9,r29 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc21d7c: 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); ffc21d80: 54 09 c2 3e rlwinm r9,r0,24,8,31 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc21d84: 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); ffc21d88: 54 00 44 2e rlwinm r0,r0,8,16,23 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc21d8c: 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); ffc21d90: 7d 20 03 78 or r0,r9,r0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc21d94: 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); ffc21d98: 90 1a 00 00 stw r0,0(r26) <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc21d9c: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc21da0: 83 41 00 20 lwz r26,32(r1) <== NOT EXECUTED ffc21da4: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc21da8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc21dac: 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) ) ffc21db0: a1 3f 00 00 lhz r9,0(r31) ffc21db4: 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))); ffc21db8: 81 21 00 08 lwz r9,8(r1) if ( ofs == (fs_info->vol.bps - 1) ) ffc21dbc: 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))); ffc21dc0: 81 29 00 24 lwz r9,36(r9) ffc21dc4: 7c 09 e8 ae lbzx r0,r9,r29 ffc21dc8: 90 1a 00 00 stw r0,0(r26) if ( ofs == (fs_info->vol.bps - 1) ) ffc21dcc: 41 9e 00 88 beq- cr7,ffc21e54 <== NEVER TAKEN *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; ffc21dd0: 7f a9 ea 14 add r29,r9,r29 ffc21dd4: 89 3d 00 01 lbz r9,1(r29) ffc21dd8: 55 29 40 2e rlwinm r9,r9,8,0,23 ffc21ddc: 7d 20 03 78 or r0,r9,r0 ffc21de0: 90 1a 00 00 stw r0,0(r26) } if ( FAT_CLUSTER_IS_ODD(cln) ) ffc21de4: 73 c9 00 01 andi. r9,r30,1 ffc21de8: 41 82 00 60 beq- ffc21e48 *ret_val = (*ret_val) >> FAT12_SHIFT; ffc21dec: 54 00 e1 3e rlwinm r0,r0,28,4,31 ffc21df0: 90 1a 00 00 stw r0,0(r26) ffc21df4: 4b ff ff 10 b ffc21d04 *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)); ffc21df8: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc21dfc: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED ffc21e00: 7d 29 e8 2e lwzx r9,r9,r29 <== NOT EXECUTED ffc21e04: 51 20 46 3e rlwimi r0,r9,8,24,31 <== NOT EXECUTED ffc21e08: 51 20 c4 2e rlwimi r0,r9,24,16,23 <== NOT EXECUTED ffc21e0c: 51 20 42 1e rlwimi r0,r9,8,8,15 <== NOT EXECUTED ffc21e10: 51 20 c0 0e rlwimi r0,r9,24,0,7 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); ffc21e14: 90 1a 00 00 stw r0,0(r26) <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc21e18: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc21e1c: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc21e20: 83 21 00 1c lwz r25,28(r1) <== NOT EXECUTED ffc21e24: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc21e28: 83 41 00 20 lwz r26,32(r1) <== NOT EXECUTED ffc21e2c: 83 61 00 24 lwz r27,36(r1) <== NOT EXECUTED ffc21e30: 83 81 00 28 lwz r28,40(r1) <== NOT EXECUTED ffc21e34: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED ffc21e38: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED ffc21e3c: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED ffc21e40: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc21e44: 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; ffc21e48: 54 00 05 3e clrlwi r0,r0,20 ffc21e4c: 90 1a 00 00 stw r0,0(r26) ffc21e50: 4b ff fe b4 b ffc21d04 * 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, ffc21e54: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc21e58: 38 9b 00 01 addi r4,r27,1 <== NOT EXECUTED ffc21e5c: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc21e60: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc21e64: 4b ff 64 55 bl ffc182b8 <== NOT EXECUTED &block0); if (rc != RC_OK) ffc21e68: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc21e6c: 40 82 00 24 bne- ffc21e90 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; ffc21e70: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc21e74: 80 1a 00 00 lwz r0,0(r26) <== NOT EXECUTED ffc21e78: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED ffc21e7c: 89 29 00 00 lbz r9,0(r9) <== NOT EXECUTED ffc21e80: 55 29 40 2e rlwinm r9,r9,8,0,23 <== NOT EXECUTED ffc21e84: 7d 20 03 78 or r0,r9,r0 <== NOT EXECUTED ffc21e88: 90 1a 00 00 stw r0,0(r26) <== NOT EXECUTED ffc21e8c: 4b ff ff 58 b ffc21de4 <== 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) ffc21e90: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED ffc21e94: 4b ff fe 70 b ffc21d04 <== NOT EXECUTED =============================================================================== ffc18a94 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { ffc18a94: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc18a98: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc18a9c: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc18aa0: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; ffc18aa4: 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) { ffc18aa8: 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)) ffc18aac: 3f a0 0f ff lis r29,4095 <== NOT EXECUTED ffc18ab0: 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; ffc18ab4: 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) { ffc18ab8: 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)) ffc18abc: 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++) ffc18ac0: 2f 86 00 00 cmpwi cr7,r6,0 <== NOT EXECUTED ffc18ac4: 41 9e 00 a0 beq- cr7,ffc18b64 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) ffc18ac8: 81 3f 00 74 lwz r9,116(r31) <== NOT EXECUTED ffc18acc: 81 7f 00 70 lwz r11,112(r31) <== NOT EXECUTED ffc18ad0: 55 20 e8 fe rlwinm r0,r9,29,3,31 <== NOT EXECUTED ffc18ad4: 7d 4b 00 ae lbzx r10,r11,r0 <== NOT EXECUTED ffc18ad8: 55 28 07 7e clrlwi r8,r9,29 <== NOT EXECUTED ffc18adc: 7c 0b 02 14 add r0,r11,r0 <== NOT EXECUTED ffc18ae0: 7d 47 46 30 sraw r7,r10,r8 <== NOT EXECUTED ffc18ae4: 70 e5 00 01 andi. r5,r7,1 <== NOT EXECUTED ffc18ae8: 41 82 00 40 beq- ffc18b28 <== 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; ffc18aec: 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++; ffc18af0: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) ffc18af4: 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++; ffc18af8: 91 3f 00 74 stw r9,116(r31) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) ffc18afc: 41 9c 00 08 blt- cr7,ffc18b04 <== NOT EXECUTED fs_info->index = 0; ffc18b00: 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++) ffc18b04: 42 40 00 60 bdz- ffc18b64 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) ffc18b08: 81 3f 00 74 lwz r9,116(r31) <== NOT EXECUTED ffc18b0c: 55 20 e8 fe rlwinm r0,r9,29,3,31 <== NOT EXECUTED ffc18b10: 7d 4b 00 ae lbzx r10,r11,r0 <== NOT EXECUTED ffc18b14: 55 28 07 7e clrlwi r8,r9,29 <== NOT EXECUTED ffc18b18: 7c 0b 02 14 add r0,r11,r0 <== NOT EXECUTED ffc18b1c: 7d 47 46 30 sraw r7,r10,r8 <== NOT EXECUTED ffc18b20: 70 e5 00 01 andi. r5,r7,1 <== NOT EXECUTED ffc18b24: 40 82 ff cc bne+ ffc18af0 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); ffc18b28: 39 20 00 01 li r9,1 <== NOT EXECUTED ffc18b2c: 7d 28 40 30 slw r8,r9,r8 <== NOT EXECUTED ffc18b30: 7d 0a 53 78 or r10,r8,r10 <== NOT EXECUTED ffc18b34: 7c 09 03 78 mr r9,r0 <== NOT EXECUTED ffc18b38: 99 49 00 00 stb r10,0(r9) <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); ffc18b3c: 80 1f 00 7c lwz r0,124(r31) <== NOT EXECUTED ffc18b40: 80 7f 00 74 lwz r3,116(r31) <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } ffc18b44: 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); ffc18b48: 7c 63 02 14 add r3,r3,r0 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } ffc18b4c: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc18b50: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc18b54: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18b58: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc18b5c: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc18b60: 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)) ffc18b64: 80 1f 00 7c lwz r0,124(r31) <== NOT EXECUTED ffc18b68: 54 c4 08 3c rlwinm r4,r6,1,0,30 <== NOT EXECUTED ffc18b6c: 7c 00 e8 50 subf r0,r0,r29 <== NOT EXECUTED ffc18b70: 7f 84 00 40 cmplw cr7,r4,r0 <== NOT EXECUTED ffc18b74: 41 9c 00 24 blt- cr7,ffc18b98 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } ffc18b78: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; ffc18b7c: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc18b80: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc18b84: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18b88: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc18b8c: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc18b90: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc18b94: 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; ffc18b98: 90 9f 00 78 stw r4,120(r31) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); ffc18b9c: 80 7f 00 70 lwz r3,112(r31) <== NOT EXECUTED ffc18ba0: 4b ff 13 61 bl ffc09f00 <== NOT EXECUTED if (fs_info->uino != NULL) ffc18ba4: 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); ffc18ba8: 90 7f 00 70 stw r3,112(r31) <== NOT EXECUTED if (fs_info->uino != NULL) ffc18bac: 41 9e ff cc beq+ cr7,ffc18b78 <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; ffc18bb0: 80 df 00 78 lwz r6,120(r31) <== NOT EXECUTED ffc18bb4: 90 df 00 74 stw r6,116(r31) <== NOT EXECUTED ffc18bb8: 4b ff ff 08 b ffc18ac0 <== NOT EXECUTED =============================================================================== ffc18968 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { ffc18968: 94 21 ff d8 stwu r1,-40(r1) ffc1896c: 7c 08 02 a6 mflr r0 ffc18970: 90 01 00 2c stw r0,44(r1) ffc18974: 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; ffc18978: 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 ) { ffc1897c: 93 a1 00 1c stw r29,28(r1) ffc18980: 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)); ffc18984: 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 ) { ffc18988: 93 e1 00 24 stw r31,36(r1) ffc1898c: 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)); ffc18990: 38 80 00 01 li r4,1 int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { ffc18994: 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; ffc18998: 93 e1 00 08 stw r31,8(r1) char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); ffc1899c: 4b fe f4 95 bl ffc07e30 if ( buf == NULL ) ffc189a0: 7c 7c 1b 79 mr. r28,r3 ffc189a4: 40 a2 00 0c bne+ ffc189b0 <== ALWAYS TAKEN ffc189a8: 48 00 00 d8 b ffc18a80 <== NOT EXECUTED free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) ffc189ac: 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) ffc189b0: 81 3e 00 0c lwz r9,12(r30) { ret = fat_cluster_write(mt_entry, cur_cln, buf); ffc189b4: 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) ffc189b8: 80 1e 00 10 lwz r0,16(r30) { ret = fat_cluster_write(mt_entry, cur_cln, buf); ffc189bc: 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) ffc189c0: 7f ff 48 38 and r31,r31,r9 ffc189c4: 7f 9f 00 40 cmplw cr7,r31,r0 { ret = fat_cluster_write(mt_entry, cur_cln, buf); ffc189c8: 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) ffc189cc: 40 9c 00 54 bge- cr7,ffc18a20 { ret = fat_cluster_write(mt_entry, cur_cln, buf); ffc189d0: 4b ff ff 3d bl ffc1890c { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc189d4: 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 ) ffc189d8: 2f 83 ff ff cmpwi cr7,r3,-1 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc189dc: 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 ) ffc189e0: 41 9e 00 70 beq- cr7,ffc18a50 <== NEVER TAKEN { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc189e4: 80 81 00 08 lwz r4,8(r1) ffc189e8: 48 00 92 4d bl ffc21c34 if ( rc != RC_OK ) ffc189ec: 7c 7f 1b 79 mr. r31,r3 ffc189f0: 41 82 ff bc beq+ ffc189ac <== ALWAYS TAKEN { free(buf); ffc189f4: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc189f8: 4b fe fa e9 bl ffc084e0 <== NOT EXECUTED } } free(buf); return rc; } ffc189fc: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc18a00: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc18a04: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc18a08: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18a0c: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc18a10: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc18a14: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc18a18: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc18a1c: 4e 80 00 20 blr <== NOT EXECUTED free(buf); return rc; } } free(buf); ffc18a20: 7f 83 e3 78 mr r3,r28 ffc18a24: 4b fe fa bd bl ffc084e0 return rc; } ffc18a28: 80 01 00 2c lwz r0,44(r1) return rc; } } free(buf); return rc; ffc18a2c: 3b e0 00 00 li r31,0 } ffc18a30: 83 81 00 18 lwz r28,24(r1) ffc18a34: 7c 08 03 a6 mtlr r0 ffc18a38: 7f e3 fb 78 mr r3,r31 ffc18a3c: 83 a1 00 1c lwz r29,28(r1) ffc18a40: 83 c1 00 20 lwz r30,32(r1) ffc18a44: 83 e1 00 24 lwz r31,36(r1) ffc18a48: 38 21 00 28 addi r1,r1,40 ffc18a4c: 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); ffc18a50: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc18a54: 4b fe fa 8d bl ffc084e0 <== NOT EXECUTED } } free(buf); return rc; } ffc18a58: 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; ffc18a5c: 3b e0 ff ff li r31,-1 <== NOT EXECUTED } } free(buf); return rc; } ffc18a60: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc18a64: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18a68: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc18a6c: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc18a70: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc18a74: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc18a78: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc18a7c: 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 ); ffc18a80: 48 00 b7 91 bl ffc24210 <__errno> <== NOT EXECUTED ffc18a84: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc18a88: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc18a8c: 3b e0 ff ff li r31,-1 <== NOT EXECUTED ffc18a90: 4b ff ff 6c b ffc189fc <== NOT EXECUTED =============================================================================== ffc18ddc : * 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) { ffc18ddc: 94 21 ff 20 stwu r1,-224(r1) ffc18de0: 7c 08 02 a6 mflr r0 ffc18de4: 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); ffc18de8: 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; ffc18dec: 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) { ffc18df0: 93 c1 00 d8 stw r30,216(r1) ffc18df4: 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); ffc18df8: 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) { ffc18dfc: 93 a1 00 d4 stw r29,212(r1) ffc18e00: 93 e1 00 dc stw r31,220(r1) ffc18e04: 91 c1 00 98 stw r14,152(r1) ffc18e08: 91 e1 00 9c stw r15,156(r1) ffc18e0c: 92 01 00 a0 stw r16,160(r1) ffc18e10: 92 21 00 a4 stw r17,164(r1) ffc18e14: 92 41 00 a8 stw r18,168(r1) ffc18e18: 92 61 00 ac stw r19,172(r1) ffc18e1c: 92 81 00 b0 stw r20,176(r1) ffc18e20: 92 a1 00 b4 stw r21,180(r1) ffc18e24: 92 c1 00 b8 stw r22,184(r1) ffc18e28: 92 e1 00 bc stw r23,188(r1) ffc18e2c: 93 01 00 c0 stw r24,192(r1) ffc18e30: 93 21 00 c4 stw r25,196(r1) ffc18e34: 93 41 00 c8 stw r26,200(r1) ffc18e38: 93 61 00 cc stw r27,204(r1) ffc18e3c: 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; ffc18e40: 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; ffc18e44: 90 01 00 08 stw r0,8(r1) rc = stat(mt_entry->dev, &stat_buf); ffc18e48: 4b ff 14 25 bl ffc0a26c if (rc == -1) ffc18e4c: 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); ffc18e50: 7c 7d 1b 78 mr r29,r3 if (rc == -1) ffc18e54: 41 9e 03 d8 beq- cr7,ffc1922c <== NEVER TAKEN return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) ffc18e58: 80 01 00 24 lwz r0,36(r1) ffc18e5c: 54 00 04 26 rlwinm r0,r0,0,16,19 ffc18e60: 2f 80 60 00 cmpwi cr7,r0,24576 ffc18e64: 40 9e 06 34 bne- cr7,ffc19498 <== 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); ffc18e68: 80 61 00 30 lwz r3,48(r1) ffc18e6c: 80 81 00 34 lwz r4,52(r1) ffc18e70: 4b fe e1 a1 bl ffc07010 if (vol->dd == NULL) ffc18e74: 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); ffc18e78: 90 7f 00 60 stw r3,96(r31) if (vol->dd == NULL) ffc18e7c: 41 9e 06 90 beq- cr7,ffc1950c <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; ffc18e80: 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); ffc18e84: 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; ffc18e88: 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); ffc18e8c: 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; ffc18e90: 90 7f 00 58 stw r3,88(r31) ffc18e94: 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); ffc18e98: 4b ff d2 15 bl ffc160ac if (sc != RTEMS_SUCCESSFUL) ffc18e9c: 2f 83 00 00 cmpwi cr7,r3,0 ffc18ea0: 40 9e 06 64 bne- cr7,ffc19504 <== NEVER TAKEN { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); ffc18ea4: 80 61 00 08 lwz r3,8(r1) ffc18ea8: 81 23 00 24 lwz r9,36(r3) ffc18eac: 88 09 00 20 lbz r0,32(r9) ffc18eb0: 89 49 00 21 lbz r10,33(r9) ffc18eb4: 89 69 00 22 lbz r11,34(r9) ffc18eb8: 90 01 00 68 stw r0,104(r1) ffc18ebc: 91 41 00 6c stw r10,108(r1) ffc18ec0: 88 09 00 23 lbz r0,35(r9) ffc18ec4: 89 49 00 28 lbz r10,40(r9) ffc18ec8: 91 61 00 70 stw r11,112(r1) ffc18ecc: 90 01 00 74 stw r0,116(r1) ffc18ed0: 89 69 00 2c lbz r11,44(r9) ffc18ed4: 88 09 00 2d lbz r0,45(r9) ffc18ed8: 91 41 00 78 stw r10,120(r1) ffc18edc: 89 49 00 2e lbz r10,46(r9) ffc18ee0: 8b 69 00 0b lbz r27,11(r9) ffc18ee4: 8b 49 00 0c lbz r26,12(r9) ffc18ee8: 8b a9 00 0d lbz r29,13(r9) ffc18eec: 8b 29 00 0e lbz r25,14(r9) ffc18ef0: 8b 09 00 0f lbz r24,15(r9) ffc18ef4: 8b 89 00 10 lbz r28,16(r9) ffc18ef8: 8a e9 00 11 lbz r23,17(r9) ffc18efc: 8a c9 00 12 lbz r22,18(r9) ffc18f00: 8a a9 00 13 lbz r21,19(r9) ffc18f04: 8a 89 00 14 lbz r20,20(r9) ffc18f08: 8a 69 00 16 lbz r19,22(r9) ffc18f0c: 8a 49 00 17 lbz r18,23(r9) ffc18f10: 89 e9 00 24 lbz r15,36(r9) ffc18f14: 89 c9 00 25 lbz r14,37(r9) ffc18f18: 8a 29 00 26 lbz r17,38(r9) ffc18f1c: 8a 09 00 27 lbz r16,39(r9) ffc18f20: 91 61 00 88 stw r11,136(r1) ffc18f24: 90 01 00 8c stw r0,140(r1) ffc18f28: 91 41 00 90 stw r10,144(r1) ffc18f2c: 89 69 00 2f lbz r11,47(r9) ffc18f30: 88 09 00 30 lbz r0,48(r9) ffc18f34: 89 29 00 31 lbz r9,49(r9) ffc18f38: 91 61 00 84 stw r11,132(r1) ffc18f3c: 90 01 00 7c stw r0,124(r1) ffc18f40: 91 21 00 80 stw r9,128(r1) sc = rtems_bdbuf_release( block); ffc18f44: 4b ff d4 c5 bl ffc16408 if (sc != RTEMS_SUCCESSFUL) ffc18f48: 2c 03 00 00 cmpwi r3,0 ffc18f4c: 40 82 05 d4 bne- ffc19520 <== 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); ffc18f50: 57 5a 40 2e rlwinm r26,r26,8,0,23 ffc18f54: 7f 5b db 78 or r27,r26,r27 if ( (vol->bps != 512) && ffc18f58: 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); ffc18f5c: b3 7f 00 00 sth r27,0(r31) if ( (vol->bps != 512) && ffc18f60: 41 9e 05 00 beq- cr7,ffc19460 <== ALWAYS TAKEN ffc18f64: 2f 9b 04 00 cmpwi cr7,r27,1024 <== NOT EXECUTED ffc18f68: 41 9e 00 14 beq- cr7,ffc18f7c <== NOT EXECUTED (vol->bps != 1024) && ffc18f6c: 2f 9b 08 00 cmpwi cr7,r27,2048 <== NOT EXECUTED ffc18f70: 41 9e 00 0c beq- cr7,ffc18f7c <== NOT EXECUTED (vol->bps != 2048) && ffc18f74: 2f 9b 10 00 cmpwi cr7,r27,4096 <== NOT EXECUTED ffc18f78: 40 9e 05 3c bne- cr7,ffc194b4 <== 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; ffc18f7c: 57 60 ba 7e rlwinm r0,r27,23,9,31 <== NOT EXECUTED ffc18f80: 39 20 00 01 li r9,1 <== NOT EXECUTED ffc18f84: 48 00 00 08 b ffc18f8c <== NOT EXECUTED ffc18f88: 7d 69 5b 78 mr r9,r11 <== NOT EXECUTED i >>= 1, vol->sec_mul++); ffc18f8c: 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; ffc18f90: 70 0a 00 01 andi. r10,r0,1 <== NOT EXECUTED i >>= 1, vol->sec_mul++); ffc18f94: 39 69 00 01 addi r11,r9,1 <== NOT EXECUTED ffc18f98: 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; ffc18f9c: 41 82 ff ec beq+ ffc18f88 <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; ffc18fa0: 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; ffc18fa4: 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; ffc18fa8: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc18fac: 98 1f 00 02 stb r0,2(r31) <== NOT EXECUTED ffc18fb0: 40 82 00 2c bne- ffc18fdc <== 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; ffc18fb4: 7f 60 db 78 mr r0,r27 ffc18fb8: 39 20 00 01 li r9,1 ffc18fbc: 48 00 00 08 b ffc18fc4 i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; ffc18fc0: 7d 69 5b 78 mr r9,r11 i >>= 1, vol->sec_log2++); ffc18fc4: 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; ffc18fc8: 70 0a 00 01 andi. r10,r0,1 i >>= 1, vol->sec_log2++); ffc18fcc: 39 69 00 01 addi r11,r9,1 ffc18fd0: 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; ffc18fd4: 41 82 ff ec beq+ ffc18fc0 ffc18fd8: 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) ffc18fdc: 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); ffc18fe0: 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) ffc18fe4: 41 9e 04 d0 beq- cr7,ffc194b4 <== 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; ffc18fe8: 73 ab 00 01 andi. r11,r29,1 ffc18fec: 38 00 00 00 li r0,0 ffc18ff0: 98 1f 00 05 stb r0,5(r31) ffc18ff4: 7f a9 eb 78 mr r9,r29 ffc18ff8: 39 60 00 00 li r11,0 ffc18ffc: 40 82 00 28 bne- ffc19024 <== NEVER TAKEN ffc19000: 39 60 00 01 li r11,1 ffc19004: 48 00 00 08 b ffc1900c ffc19008: 7c 0b 03 78 mr r11,r0 <== NOT EXECUTED i >>= 1, vol->spc_log2++); ffc1900c: 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; ffc19010: 71 20 00 01 andi. r0,r9,1 i >>= 1, vol->spc_log2++); ffc19014: 38 0b 00 01 addi r0,r11,1 ffc19018: 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; ffc1901c: 41 82 ff ec beq+ ffc19008 <== NEVER TAKEN ffc19020: 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) ffc19024: 7f 6b 58 30 slw r11,r27,r11 ffc19028: 55 60 04 3e clrlwi r0,r11,16 ffc1902c: 2b 80 80 00 cmplwi cr7,r0,32768 ffc19030: b0 1f 00 06 sth r0,6(r31) ffc19034: 41 9d 04 80 bgt- cr7,ffc194b4 <== 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; ffc19038: 70 09 00 01 andi. r9,r0,1 ffc1903c: 39 20 00 00 li r9,0 ffc19040: 99 3f 00 08 stb r9,8(r31) ffc19044: 40 82 00 28 bne- ffc1906c <== NEVER TAKEN ffc19048: 39 20 00 01 li r9,1 ffc1904c: 48 00 00 08 b ffc19054 ffc19050: 7d 69 5b 78 mr r9,r11 i >>= 1, vol->bpc_log2++); ffc19054: 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; ffc19058: 70 0a 00 01 andi. r10,r0,1 i >>= 1, vol->bpc_log2++); ffc1905c: 39 69 00 01 addi r11,r9,1 ffc19060: 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; ffc19064: 41 82 ff ec beq+ ffc19050 ffc19068: 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); ffc1906c: 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); ffc19070: 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); ffc19074: 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)) / ffc19078: 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); ffc1907c: 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)) / ffc19080: 56 e9 28 34 rlwinm r9,r23,5,0,26 ffc19084: 7c 09 02 14 add r0,r9,r0 ffc19088: 7f 60 db d6 divw r27,r0,r27 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; ffc1908c: 88 1f 00 02 lbz r0,2(r31) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) ffc19090: 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)) / ffc19094: 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) ffc19098: 7e 53 9b 78 or r19,r18,r19 ffc1909c: 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); ffc190a0: 57 18 40 2e rlwinm r24,r24,8,0,23 ffc190a4: 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; ffc190a8: 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); ffc190ac: 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; ffc190b0: 90 1f 00 28 stw r0,40(r31) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) ffc190b4: 41 82 03 8c beq- ffc19440 <== NEVER TAKEN vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); ffc190b8: 56 73 04 3e clrlwi r19,r19,16 ffc190bc: 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) ffc190c0: 56 94 40 2e rlwinm r20,r20,8,0,23 ffc190c4: 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 + ffc190c8: 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) ffc190cc: 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 + ffc190d0: 7f 9c ca 14 add r28,r28,r25 ffc190d4: 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; ffc190d8: 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 + ffc190dc: 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) ffc190e0: 41 82 03 30 beq- ffc19410 <== NEVER TAKEN vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); ffc190e4: 56 b5 04 3e clrlwi r21,r21,16 ffc190e8: 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; ffc190ec: 7f 7b a8 50 subf r27,r27,r21 vol->data_cls = data_secs / vol->spc; ffc190f0: 7f bb eb 96 divwu r29,r27,r29 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) ffc190f4: 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; ffc190f8: 93 bf 00 34 stw r29,52(r31) /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) ffc190fc: 41 9d 01 8c bgt- cr7,ffc19288 <== NEVER TAKEN { vol->type = FAT_FAT12; ffc19100: 38 00 00 01 li r0,1 ffc19104: 98 1f 00 0a stb r0,10(r31) vol->mask = FAT_FAT12_MASK; ffc19108: 38 00 0f ff li r0,4095 ffc1910c: 90 1f 00 0c stw r0,12(r31) vol->eoc_val = FAT_FAT12_EOC; ffc19110: 38 00 0f f8 li r0,4088 ffc19114: 90 1f 00 10 stw r0,16(r31) } } } else { vol->rdir_cl = 0; ffc19118: 38 00 00 00 li r0,0 vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; ffc1911c: 39 20 ff ff li r9,-1 } } } else { vol->rdir_cl = 0; ffc19120: 90 1f 00 38 stw r0,56(r31) vol->mirror = 0; ffc19124: 98 1f 00 48 stb r0,72(r31) vol->afat = 0; ffc19128: 98 1f 00 50 stb r0,80(r31) vol->free_cls = 0xFFFFFFFF; ffc1912c: 91 3f 00 40 stw r9,64(r31) vol->next_cl = 0xFFFFFFFF; ffc19130: 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); ffc19134: 80 7e 00 34 lwz r3,52(r30) ffc19138: 4b ff f3 c9 bl ffc18500 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; ffc1913c: 89 7f 00 50 lbz r11,80(r31) ffc19140: 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)); ffc19144: 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; ffc19148: 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)); ffc1914c: 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; ffc19150: 7c 0b 01 d6 mullw r0,r11,r0 ffc19154: 7c 00 4a 14 add r0,r0,r9 ffc19158: 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)); ffc1915c: 4b fe ec d5 bl ffc07e30 if ( fs_info->vhash == NULL ) ffc19160: 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)); ffc19164: 90 7f 00 68 stw r3,104(r31) ffc19168: 7c 69 1b 78 mr r9,r3 if ( fs_info->vhash == NULL ) ffc1916c: 41 9e 04 10 beq- cr7,ffc1957c <== 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 ); ffc19170: 39 43 00 04 addi r10,r3,4 head->next = tail; head->previous = NULL; tail->previous = head; ffc19174: 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 ); ffc19178: 38 03 00 0c addi r0,r3,12 ffc1917c: 39 63 00 10 addi r11,r3,16 head->next = tail; ffc19180: 91 49 00 00 stw r10,0(r9) head->previous = NULL; ffc19184: 3b c0 00 00 li r30,0 ffc19188: 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)); ffc1918c: 38 60 00 02 li r3,2 ffc19190: 38 80 00 0c li r4,12 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc19194: 91 69 00 0c stw r11,12(r9) head->previous = NULL; ffc19198: 93 c9 00 10 stw r30,16(r9) tail->previous = head; ffc1919c: 90 09 00 14 stw r0,20(r9) ffc191a0: 4b fe ec 91 bl ffc07e30 if ( fs_info->rhash == NULL ) ffc191a4: 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)); ffc191a8: 90 7f 00 6c stw r3,108(r31) ffc191ac: 7c 69 1b 78 mr r9,r3 if ( fs_info->rhash == NULL ) ffc191b0: 41 9e 03 bc beq- cr7,ffc1956c <== 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 ); ffc191b4: 39 43 00 04 addi r10,r3,4 head->next = tail; head->previous = NULL; ffc191b8: 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 ); ffc191bc: 38 03 00 0c addi r0,r3,12 ffc191c0: 39 63 00 10 addi r11,r3,16 head->next = tail; ffc191c4: 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)); ffc191c8: 38 80 00 01 li r4,1 ffc191cc: 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; ffc191d0: 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)); ffc191d4: 38 60 01 00 li r3,256 head->previous = NULL; tail->previous = head; ffc191d8: 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; ffc191dc: 93 c9 00 10 stw r30,16(r9) tail->previous = head; ffc191e0: 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; ffc191e4: 81 3f 00 2c lwz r9,44(r31) ffc191e8: 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; ffc191ec: 91 7f 00 78 stw r11,120(r31) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; ffc191f0: 7d 20 00 30 slw r0,r9,r0 ffc191f4: 54 00 20 36 rlwinm r0,r0,4,0,27 fs_info->index = 0; ffc191f8: 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; ffc191fc: 90 1f 00 7c stw r0,124(r31) fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); ffc19200: 4b fe ec 31 bl ffc07e30 if ( fs_info->uino == NULL ) ffc19204: 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)); ffc19208: 90 7f 00 70 stw r3,112(r31) if ( fs_info->uino == NULL ) ffc1920c: 41 9e 03 30 beq- cr7,ffc1953c <== 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)); ffc19210: a0 7f 00 00 lhz r3,0(r31) ffc19214: 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; ffc19218: 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)); ffc1921c: 4b fe ec 15 bl ffc07e30 if (fs_info->sec_buf == NULL) ffc19220: 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)); ffc19224: 90 7f 00 8c stw r3,140(r31) if (fs_info->sec_buf == NULL) ffc19228: 41 9e 02 a8 beq- cr7,ffc194d0 <== NEVER TAKEN free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } ffc1922c: 80 01 00 e4 lwz r0,228(r1) ffc19230: 7f a3 eb 78 mr r3,r29 ffc19234: 81 c1 00 98 lwz r14,152(r1) ffc19238: 7c 08 03 a6 mtlr r0 ffc1923c: 81 e1 00 9c lwz r15,156(r1) ffc19240: 82 01 00 a0 lwz r16,160(r1) ffc19244: 82 21 00 a4 lwz r17,164(r1) ffc19248: 82 41 00 a8 lwz r18,168(r1) ffc1924c: 82 61 00 ac lwz r19,172(r1) ffc19250: 82 81 00 b0 lwz r20,176(r1) ffc19254: 82 a1 00 b4 lwz r21,180(r1) ffc19258: 82 c1 00 b8 lwz r22,184(r1) ffc1925c: 82 e1 00 bc lwz r23,188(r1) ffc19260: 83 01 00 c0 lwz r24,192(r1) ffc19264: 83 21 00 c4 lwz r25,196(r1) ffc19268: 83 41 00 c8 lwz r26,200(r1) ffc1926c: 83 61 00 cc lwz r27,204(r1) ffc19270: 83 81 00 d0 lwz r28,208(r1) ffc19274: 83 a1 00 d4 lwz r29,212(r1) ffc19278: 83 c1 00 d8 lwz r30,216(r1) ffc1927c: 83 e1 00 dc lwz r31,220(r1) ffc19280: 38 21 00 e0 addi r1,r1,224 ffc19284: 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) ffc19288: 2b 9d ff f4 cmplwi cr7,r29,65524 <== NOT EXECUTED ffc1928c: 40 9d 01 e0 ble- cr7,ffc1946c <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); ffc19290: 81 41 00 8c lwz r10,140(r1) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; ffc19294: 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); ffc19298: 55 4b 40 2e rlwinm r11,r10,8,0,23 <== NOT EXECUTED ffc1929c: 81 41 00 90 lwz r10,144(r1) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; ffc192a0: 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); ffc192a4: 55 49 80 1e rlwinm r9,r10,16,0,15 <== NOT EXECUTED ffc192a8: 81 41 00 84 lwz r10,132(r1) <== NOT EXECUTED ffc192ac: 7d 6b 4b 78 or r11,r11,r9 <== NOT EXECUTED ffc192b0: 81 21 00 88 lwz r9,136(r1) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; ffc192b4: 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); ffc192b8: 7d 6b 4b 78 or r11,r11,r9 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; ffc192bc: 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); ffc192c0: 55 49 c0 0e rlwinm r9,r10,24,0,7 <== NOT EXECUTED ffc192c4: 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) ffc192c8: 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); ffc192cc: 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; ffc192d0: 39 60 00 04 li r11,4 <== NOT EXECUTED ffc192d4: 99 7f 00 0a stb r11,10(r31) <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; ffc192d8: 3d 60 0f ff lis r11,4095 <== NOT EXECUTED ffc192dc: 61 6b ff ff ori r11,r11,65535 <== NOT EXECUTED ffc192e0: 91 7f 00 0c stw r11,12(r31) <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; ffc192e4: 3d 60 0f ff lis r11,4095 <== NOT EXECUTED ffc192e8: 61 6b ff f8 ori r11,r11,65528 <== NOT EXECUTED ffc192ec: 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) ffc192f0: 41 9e 01 a0 beq- cr7,ffc19490 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; ffc192f4: 81 61 00 78 lwz r11,120(r1) <== NOT EXECUTED ffc192f8: 55 60 07 3e clrlwi r0,r11,28 <== NOT EXECUTED ffc192fc: 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); ffc19300: 80 01 00 80 lwz r0,128(r1) <== NOT EXECUTED ffc19304: 81 21 00 7c lwz r9,124(r1) <== NOT EXECUTED ffc19308: 54 04 40 2e rlwinm r4,r0,8,0,23 <== NOT EXECUTED ffc1930c: 7c 84 4b 78 or r4,r4,r9 <== NOT EXECUTED if( vol->info_sec == 0 ) ffc19310: 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); ffc19314: b0 9f 00 3c sth r4,60(r31) <== NOT EXECUTED if( vol->info_sec == 0 ) ffc19318: 41 9e 01 9c beq- cr7,ffc194b4 <== 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, ffc1931c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc19320: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc19324: 38 c0 00 04 li r6,4 <== NOT EXECUTED ffc19328: 38 e1 00 0c addi r7,r1,12 <== NOT EXECUTED ffc1932c: 4b ff f3 79 bl ffc186a4 <_fat_block_read> <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) ffc19330: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc19334: 41 9c 02 28 blt- cr7,ffc1955c <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != ffc19338: 89 41 00 0d lbz r10,13(r1) <== NOT EXECUTED ffc1933c: 89 21 00 0e lbz r9,14(r1) <== NOT EXECUTED ffc19340: 55 4a 40 2e rlwinm r10,r10,8,0,23 <== NOT EXECUTED ffc19344: 89 61 00 0c lbz r11,12(r1) <== NOT EXECUTED ffc19348: 55 29 80 1e rlwinm r9,r9,16,0,15 <== NOT EXECUTED ffc1934c: 88 01 00 0f lbz r0,15(r1) <== NOT EXECUTED ffc19350: 7d 49 4b 78 or r9,r10,r9 <== NOT EXECUTED ffc19354: 54 00 c0 0e rlwinm r0,r0,24,0,7 <== NOT EXECUTED ffc19358: 7d 29 5b 78 or r9,r9,r11 <== NOT EXECUTED ffc1935c: 7d 29 03 78 or r9,r9,r0 <== NOT EXECUTED ffc19360: 6d 20 41 61 xoris r0,r9,16737 <== NOT EXECUTED ffc19364: 2f 80 52 52 cmpwi cr7,r0,21074 <== NOT EXECUTED ffc19368: 40 9e 01 44 bne- cr7,ffc194ac <== 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, ffc1936c: a0 9f 00 3c lhz r4,60(r31) <== NOT EXECUTED ffc19370: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc19374: 38 a0 01 e4 li r5,484 <== NOT EXECUTED ffc19378: 38 c0 00 0c li r6,12 <== NOT EXECUTED ffc1937c: 38 e1 00 0c addi r7,r1,12 <== NOT EXECUTED ffc19380: 4b ff f3 25 bl ffc186a4 <_fat_block_read> <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) ffc19384: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc19388: 41 9c 01 cc blt- cr7,ffc19554 <== 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); ffc1938c: 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, ffc19390: 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); ffc19394: 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, ffc19398: 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); ffc1939c: 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); ffc193a0: 54 a5 40 2e rlwinm r5,r5,8,0,23 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc193a4: 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); ffc193a8: 55 4a 80 1e rlwinm r10,r10,16,0,15 <== NOT EXECUTED ffc193ac: 88 e1 00 10 lbz r7,16(r1) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc193b0: 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); ffc193b4: 89 21 00 13 lbz r9,19(r1) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc193b8: 55 6b 80 1e rlwinm r11,r11,16,0,15 <== NOT EXECUTED ffc193bc: 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); ffc193c0: 7c aa 53 78 or r10,r5,r10 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc193c4: 88 01 00 17 lbz r0,23(r1) <== NOT EXECUTED ffc193c8: 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); ffc193cc: 7d 4a 3b 78 or r10,r10,r7 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc193d0: 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); ffc193d4: 55 29 c0 0e rlwinm r9,r9,24,0,7 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc193d8: 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); ffc193dc: 7d 49 4b 78 or r9,r10,r9 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc193e0: 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); ffc193e4: 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, ffc193e8: 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); ffc193ec: 90 1f 00 44 stw r0,68(r31) <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, ffc193f0: 4b ff f8 15 bl ffc18c04 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) ffc193f4: 7c 7d 1b 79 mr. r29,r3 <== NOT EXECUTED ffc193f8: 41 82 fd 3c beq+ ffc19134 <== 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); ffc193fc: 80 7e 00 34 lwz r3,52(r30) <== NOT EXECUTED ffc19400: 4b ff f1 01 bl ffc18500 <== 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); ffc19404: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc19408: 4b fe dc bd bl ffc070c4 <== NOT EXECUTED return rc; ffc1940c: 4b ff fe 20 b ffc1922c <== 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); ffc19410: 81 61 00 6c lwz r11,108(r1) <== NOT EXECUTED ffc19414: 81 21 00 70 lwz r9,112(r1) <== NOT EXECUTED ffc19418: 55 75 40 2e rlwinm r21,r11,8,0,23 <== NOT EXECUTED ffc1941c: 81 41 00 68 lwz r10,104(r1) <== NOT EXECUTED ffc19420: 55 20 80 1e rlwinm r0,r9,16,0,15 <== NOT EXECUTED ffc19424: 81 61 00 74 lwz r11,116(r1) <== NOT EXECUTED ffc19428: 7e b5 03 78 or r21,r21,r0 <== NOT EXECUTED ffc1942c: 7e b5 53 78 or r21,r21,r10 <== NOT EXECUTED ffc19430: 55 60 c0 0e rlwinm r0,r11,24,0,7 <== NOT EXECUTED ffc19434: 7e b5 03 78 or r21,r21,r0 <== NOT EXECUTED ffc19438: 92 bf 00 2c stw r21,44(r31) <== NOT EXECUTED ffc1943c: 4b ff fc b0 b ffc190ec <== 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); ffc19440: 55 d3 40 2e rlwinm r19,r14,8,0,23 <== NOT EXECUTED ffc19444: 56 31 80 1e rlwinm r17,r17,16,0,15 <== NOT EXECUTED ffc19448: 7e 73 8b 78 or r19,r19,r17 <== NOT EXECUTED ffc1944c: 7e 73 7b 78 or r19,r19,r15 <== NOT EXECUTED ffc19450: 56 10 c0 0e rlwinm r16,r16,24,0,7 <== NOT EXECUTED ffc19454: 7e 73 83 78 or r19,r19,r16 <== NOT EXECUTED ffc19458: 92 7f 00 18 stw r19,24(r31) <== NOT EXECUTED ffc1945c: 4b ff fc 64 b ffc190c0 <== 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; ffc19460: 98 7f 00 03 stb r3,3(r31) i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; ffc19464: 3b 60 02 00 li r27,512 ffc19468: 4b ff fb 4c b ffc18fb4 } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; ffc1946c: 38 00 00 02 li r0,2 <== NOT EXECUTED ffc19470: 98 1f 00 0a stb r0,10(r31) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; ffc19474: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc19478: 60 00 ff ff ori r0,r0,65535 <== NOT EXECUTED ffc1947c: 90 1f 00 0c stw r0,12(r31) <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; ffc19480: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc19484: 60 00 ff f8 ori r0,r0,65528 <== NOT EXECUTED ffc19488: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED ffc1948c: 4b ff fc 8c b ffc19118 <== 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; ffc19490: 98 1f 00 50 stb r0,80(r31) <== NOT EXECUTED ffc19494: 4b ff fe 6c b ffc19300 <== 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); ffc19498: 48 00 ad 79 bl ffc24210 <__errno> <== NOT EXECUTED ffc1949c: 38 00 00 19 li r0,25 <== NOT EXECUTED ffc194a0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc194a4: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc194a8: 4b ff fd 84 b ffc1922c <== 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); ffc194ac: 80 7e 00 34 lwz r3,52(r30) <== NOT EXECUTED ffc194b0: 4b ff f0 51 bl ffc18500 <== 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); ffc194b4: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); ffc194b8: 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); ffc194bc: 4b fe dc 09 bl ffc070c4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); ffc194c0: 48 00 ad 51 bl ffc24210 <__errno> <== NOT EXECUTED ffc194c4: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc194c8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc194cc: 4b ff fd 60 b ffc1922c <== 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); ffc194d0: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc194d4: 4b fe db f1 bl ffc070c4 <== NOT EXECUTED free(fs_info->vhash); ffc194d8: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc194dc: 4b fe f0 05 bl ffc084e0 <== NOT EXECUTED free(fs_info->rhash); ffc194e0: 80 7f 00 6c lwz r3,108(r31) <== NOT EXECUTED ffc194e4: 4b fe ef fd bl ffc084e0 <== NOT EXECUTED free(fs_info->uino); ffc194e8: 80 7f 00 70 lwz r3,112(r31) <== NOT EXECUTED ffc194ec: 4b fe ef f5 bl ffc084e0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); ffc194f0: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc194f4: 48 00 ad 1d bl ffc24210 <__errno> <== NOT EXECUTED ffc194f8: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc194fc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc19500: 4b ff fd 2c b ffc1922c <== 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); ffc19504: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc19508: 4b fe db bd bl ffc070c4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO); ffc1950c: 48 00 ad 05 bl ffc24210 <__errno> <== NOT EXECUTED ffc19510: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc19514: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc19518: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc1951c: 4b ff fd 10 b ffc1922c <== 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); ffc19520: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); ffc19524: 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); ffc19528: 4b fe db 9d bl ffc070c4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); ffc1952c: 48 00 ac e5 bl ffc24210 <__errno> <== NOT EXECUTED ffc19530: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc19534: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc19538: 4b ff fc f4 b ffc1922c <== 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); ffc1953c: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc19540: 4b fe db 85 bl ffc070c4 <== NOT EXECUTED free(fs_info->vhash); ffc19544: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc19548: 4b fe ef 99 bl ffc084e0 <== NOT EXECUTED free(fs_info->rhash); ffc1954c: 80 7f 00 6c lwz r3,108(r31) <== NOT EXECUTED ffc19550: 4b ff ff 9c b ffc194ec <== 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); ffc19554: 80 7e 00 34 lwz r3,52(r30) <== NOT EXECUTED ffc19558: 4b ff ef a9 bl ffc18500 <== 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); ffc1955c: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED return -1; ffc19560: 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); ffc19564: 4b fe db 61 bl ffc070c4 <== NOT EXECUTED return -1; ffc19568: 4b ff fc c4 b ffc1922c <== 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); ffc1956c: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc19570: 4b fe db 55 bl ffc070c4 <== NOT EXECUTED free(fs_info->vhash); ffc19574: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc19578: 4b ff ff 74 b ffc194ec <== 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); ffc1957c: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); ffc19580: 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); ffc19584: 4b fe db 41 bl ffc070c4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); ffc19588: 48 00 ac 89 bl ffc24210 <__errno> <== NOT EXECUTED ffc1958c: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc19590: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc19594: 4b ff fc 98 b ffc1922c <== NOT EXECUTED =============================================================================== ffc22348 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc22348: 94 21 ff b8 stwu r1,-72(r1) ffc2234c: 7c 08 02 a6 mflr r0 ffc22350: 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) ffc22354: 7c be 2b 79 mr. r30,r5 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc22358: 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; ffc2235c: 38 00 00 00 li r0,0 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc22360: 93 a1 00 3c stw r29,60(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc22364: 83 a3 00 34 lwz r29,52(r3) uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc22368: 92 a1 00 1c stw r21,28(r1) ffc2236c: 7c f5 3b 78 mr r21,r7 ffc22370: 92 e1 00 24 stw r23,36(r1) uint32_t i = 2; *cls_added = 0; if (count == 0) return rc; ffc22374: 3a e0 00 00 li r23,0 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc22378: 93 01 00 28 stw r24,40(r1) ffc2237c: 93 61 00 34 stw r27,52(r1) ffc22380: 7c 9b 23 78 mr r27,r4 ffc22384: 93 81 00 38 stw r28,56(r1) ffc22388: 7c dc 33 78 mr r28,r6 ffc2238c: 93 e1 00 44 stw r31,68(r1) ffc22390: 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; ffc22394: 83 1d 00 34 lwz r24,52(r29) uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc22398: 92 81 00 18 stw r20,24(r1) ffc2239c: 92 c1 00 20 stw r22,32(r1) ffc223a0: 93 21 00 2c stw r25,44(r1) ffc223a4: 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; ffc223a8: 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; ffc223ac: 90 06 00 00 stw r0,0(r6) if (count == 0) ffc223b0: 41 82 01 00 beq- ffc224b0 <== NEVER TAKEN return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) ffc223b4: 83 5d 00 44 lwz r26,68(r29) ffc223b8: 2f 9a ff ff cmpwi cr7,r26,-1 ffc223bc: 41 9e 01 38 beq- cr7,ffc224f4 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; ffc223c0: 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) ffc223c4: 2b 98 00 02 cmplwi cr7,r24,2 ffc223c8: 40 9d 01 34 ble- cr7,ffc224fc <== NEVER TAKEN ffc223cc: 3b 20 00 02 li r25,2 ffc223d0: 3a c0 00 00 li r22,0 ffc223d4: 48 00 00 54 b ffc22428 * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; ffc223d8: 93 5b 00 00 stw r26,0(r27) rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); ffc223dc: 7f e3 fb 78 mr r3,r31 ffc223e0: 7f 44 d3 78 mr r4,r26 ffc223e4: 38 a0 ff ff li r5,-1 ffc223e8: 4b ff fa b1 bl ffc21e98 if ( rc != RC_OK ) ffc223ec: 2c 03 00 00 cmpwi r3,0 ffc223f0: 40 82 01 88 bne- ffc22578 <== NEVER TAKEN return rc; } } save_cln = cl4find; (*cls_added)++; ffc223f4: 81 3c 00 00 lwz r9,0(r28) ffc223f8: 38 09 00 01 addi r0,r9,1 /* have we satisfied request ? */ if (*cls_added == count) ffc223fc: 7f 9e 00 00 cmpw cr7,r30,r0 return rc; } } save_cln = cl4find; (*cls_added)++; ffc22400: 90 1c 00 00 stw r0,0(r28) /* have we satisfied request ? */ if (*cls_added == count) ffc22404: 41 9e 01 48 beq- cr7,ffc2254c <== ALWAYS TAKEN ffc22408: 7f 56 d3 78 mr r22,r26 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; ffc2240c: 3b 5a 00 01 addi r26,r26,1 if (cl4find >= data_cls_val) ffc22410: 7f 98 d0 40 cmplw cr7,r24,r26 *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; ffc22414: 3b 39 00 01 addi r25,r25,1 cl4find++; if (cl4find >= data_cls_val) ffc22418: 41 9d 00 08 bgt- cr7,ffc22420 <== ALWAYS TAKEN cl4find = 2; ffc2241c: 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) ffc22420: 7f 98 c8 40 cmplw cr7,r24,r25 ffc22424: 40 9d 00 dc ble- cr7,ffc22500 <== NEVER TAKEN { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); ffc22428: 7f e3 fb 78 mr r3,r31 ffc2242c: 7f 44 d3 78 mr r4,r26 ffc22430: 38 a1 00 08 addi r5,r1,8 ffc22434: 4b ff f8 01 bl ffc21c34 if ( rc != RC_OK ) ffc22438: 7c 77 1b 79 mr. r23,r3 ffc2243c: 40 82 00 f4 bne- ffc22530 <== NEVER TAKEN if (*cls_added != 0) fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) ffc22440: 80 01 00 08 lwz r0,8(r1) ffc22444: 2f 80 00 00 cmpwi cr7,r0,0 ffc22448: 40 be ff c4 bne- cr7,ffc2240c /* * 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) ffc2244c: 80 1c 00 00 lwz r0,0(r28) ffc22450: 2f 80 00 00 cmpwi cr7,r0,0 ffc22454: 41 be ff 84 beq- cr7,ffc223d8 <== ALWAYS TAKEN } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); ffc22458: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc2245c: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED ffc22460: 38 a0 ff ff li r5,-1 <== NOT EXECUTED ffc22464: 4b ff fa 35 bl ffc21e98 <== NOT EXECUTED if ( rc != RC_OK ) ffc22468: 7c 74 1b 79 mr. r20,r3 <== NOT EXECUTED ffc2246c: 40 82 01 14 bne- ffc22580 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); ffc22470: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED ffc22474: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc22478: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED ffc2247c: 4b ff fa 1d bl ffc21e98 <== NOT EXECUTED if ( rc != RC_OK ) ffc22480: 7c 76 1b 79 mr. r22,r3 <== NOT EXECUTED ffc22484: 41 82 ff 70 beq+ ffc223f4 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc22488: 80 9b 00 00 lwz r4,0(r27) <== NOT EXECUTED ffc2248c: 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); ffc22490: 7e d7 b3 78 mr r23,r22 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc22494: 4b ff fd 69 bl ffc221fc <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); ffc22498: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED ffc2249c: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc224a0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc224a4: 4b ff f9 f5 bl ffc21e98 <== NOT EXECUTED fat_buf_release(fs_info); ffc224a8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc224ac: 4b ff 60 55 bl ffc18500 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } ffc224b0: 80 01 00 4c lwz r0,76(r1) ffc224b4: 7e e3 bb 78 mr r3,r23 ffc224b8: 82 81 00 18 lwz r20,24(r1) ffc224bc: 7c 08 03 a6 mtlr r0 ffc224c0: 82 a1 00 1c lwz r21,28(r1) ffc224c4: 82 c1 00 20 lwz r22,32(r1) ffc224c8: 82 e1 00 24 lwz r23,36(r1) ffc224cc: 83 01 00 28 lwz r24,40(r1) ffc224d0: 83 21 00 2c lwz r25,44(r1) ffc224d4: 83 41 00 30 lwz r26,48(r1) ffc224d8: 83 61 00 34 lwz r27,52(r1) ffc224dc: 83 81 00 38 lwz r28,56(r1) ffc224e0: 83 a1 00 3c lwz r29,60(r1) ffc224e4: 83 c1 00 40 lwz r30,64(r1) ffc224e8: 83 e1 00 44 lwz r31,68(r1) ffc224ec: 38 21 00 48 addi r1,r1,72 ffc224f0: 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; ffc224f4: 3b 40 00 02 li r26,2 ffc224f8: 4b ff fe c8 b ffc223c0 /* * 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) ffc224fc: 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) ffc22500: 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; ffc22504: 92 dd 00 44 stw r22,68(r29) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) ffc22508: 2f 80 ff ff cmpwi cr7,r0,-1 <== NOT EXECUTED ffc2250c: 41 9e 00 10 beq- cr7,ffc2251c <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); ffc22510: 81 3c 00 00 lwz r9,0(r28) <== NOT EXECUTED ffc22514: 7c 09 00 50 subf r0,r9,r0 <== NOT EXECUTED ffc22518: 90 1d 00 40 stw r0,64(r29) <== NOT EXECUTED *last_cl = save_cln; ffc2251c: 92 d5 00 00 stw r22,0(r21) <== NOT EXECUTED fat_buf_release(fs_info); ffc22520: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED return RC_OK; ffc22524: 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); ffc22528: 4b ff 5f d9 bl ffc18500 <== NOT EXECUTED return RC_OK; ffc2252c: 4b ff ff 84 b ffc224b0 <== 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) ffc22530: 80 1c 00 00 lwz r0,0(r28) <== NOT EXECUTED ffc22534: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc22538: 41 9e ff 78 beq+ cr7,ffc224b0 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc2253c: 80 9b 00 00 lwz r4,0(r27) <== NOT EXECUTED ffc22540: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc22544: 4b ff fc b9 bl ffc221fc <== NOT EXECUTED ffc22548: 4b ff ff 68 b ffc224b0 <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) ffc2254c: 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; ffc22550: 93 5d 00 44 stw r26,68(r29) if (fs_info->vol.free_cls != 0xFFFFFFFF) ffc22554: 2f 80 ff ff cmpwi cr7,r0,-1 ffc22558: 41 9e 00 10 beq- cr7,ffc22568 <== ALWAYS TAKEN fs_info->vol.free_cls -= (*cls_added); ffc2255c: 81 3c 00 00 lwz r9,0(r28) <== NOT EXECUTED ffc22560: 7c 09 00 50 subf r0,r9,r0 <== NOT EXECUTED ffc22564: 90 1d 00 40 stw r0,64(r29) <== NOT EXECUTED *last_cl = save_cln; ffc22568: 93 55 00 00 stw r26,0(r21) fat_buf_release(fs_info); ffc2256c: 7f a3 eb 78 mr r3,r29 ffc22570: 4b ff 5f 91 bl ffc18500 return rc; ffc22574: 4b ff ff 3c b ffc224b0 * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); ffc22578: 7c 77 1b 78 mr r23,r3 <== NOT EXECUTED ffc2257c: 4b ff ff 34 b ffc224b0 <== 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)); ffc22580: 80 9b 00 00 lwz r4,0(r27) <== NOT EXECUTED ffc22584: 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); ffc22588: 7e 97 a3 78 mr r23,r20 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc2258c: 4b ff fc 71 bl ffc221fc <== NOT EXECUTED return rc; ffc22590: 4b ff ff 20 b ffc224b0 <== NOT EXECUTED =============================================================================== ffc21e98 : 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)) ) ffc21e98: 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 ) { ffc21e9c: 94 21 ff c8 stwu r1,-56(r1) ffc21ea0: 7c 08 02 a6 mflr r0 ffc21ea4: 93 21 00 1c stw r25,28(r1) ffc21ea8: 7c b9 2b 78 mr r25,r5 ffc21eac: 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; ffc21eb0: 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 ) { ffc21eb4: 93 c1 00 30 stw r30,48(r1) ffc21eb8: 7c 9e 23 78 mr r30,r4 ffc21ebc: 93 e1 00 34 stw r31,52(r1) ffc21ec0: 93 41 00 20 stw r26,32(r1) ffc21ec4: 93 61 00 24 stw r27,36(r1) ffc21ec8: 93 81 00 28 stw r28,40(r1) ffc21ecc: 93 a1 00 2c stw r29,44(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc21ed0: 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; ffc21ed4: 90 01 00 08 stw r0,8(r1) /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) ffc21ed8: 40 9d 00 80 ble- cr7,ffc21f58 <== NEVER TAKEN ffc21edc: 81 3f 00 34 lwz r9,52(r31) ffc21ee0: 38 09 00 01 addi r0,r9,1 ffc21ee4: 7f 84 00 40 cmplw cr7,r4,r0 ffc21ee8: 41 9d 00 70 bgt- cr7,ffc21f58 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + ffc21eec: 88 1f 00 0a lbz r0,10(r31) ffc21ef0: 70 09 00 01 andi. r9,r0,1 ffc21ef4: 40 82 00 a0 bne- ffc21f94 <== ALWAYS TAKEN ffc21ef8: 70 09 00 02 andi. r9,r0,2 <== NOT EXECUTED ffc21efc: 8b 7f 00 02 lbz r27,2(r31) <== NOT EXECUTED ffc21f00: 41 82 00 b0 beq- ffc21fb0 <== NOT EXECUTED ffc21f04: 54 9d 08 3c rlwinm r29,r4,1,0,30 <== NOT EXECUTED ffc21f08: 80 1f 00 4c lwz r0,76(r31) <== NOT EXECUTED ffc21f0c: 7f bb dc 30 srw r27,r29,r27 <== NOT EXECUTED ffc21f10: 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); ffc21f14: 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); ffc21f18: a3 5f 00 00 lhz r26,0(r31) rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); ffc21f1c: 7f 64 db 78 mr r4,r27 ffc21f20: 38 a0 00 01 li r5,1 ffc21f24: 38 c1 00 08 addi r6,r1,8 ffc21f28: 4b ff 63 91 bl ffc182b8 if (rc != RC_OK) ffc21f2c: 2c 03 00 00 cmpwi r3,0 ffc21f30: 40 82 00 38 bne- ffc21f68 <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) ffc21f34: 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); ffc21f38: 3b 5a ff ff addi r26,r26,-1 ffc21f3c: 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 ) ffc21f40: 2f 9c 00 02 cmpwi cr7,r28,2 ffc21f44: 41 9e 00 80 beq- cr7,ffc21fc4 <== NEVER TAKEN ffc21f48: 2f 9c 00 04 cmpwi cr7,r28,4 ffc21f4c: 41 9e 01 64 beq- cr7,ffc220b0 <== NEVER TAKEN ffc21f50: 2f 9c 00 01 cmpwi cr7,r28,1 ffc21f54: 41 9e 00 c0 beq- cr7,ffc22014 <== ALWAYS TAKEN fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); ffc21f58: 48 00 22 b9 bl ffc24210 <__errno> <== NOT EXECUTED ffc21f5c: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc21f60: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc21f64: 38 60 ff ff li r3,-1 <== NOT EXECUTED break; } return RC_OK; } ffc21f68: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc21f6c: 83 21 00 1c lwz r25,28(r1) <== NOT EXECUTED ffc21f70: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc21f74: 83 41 00 20 lwz r26,32(r1) <== NOT EXECUTED ffc21f78: 83 61 00 24 lwz r27,36(r1) <== NOT EXECUTED ffc21f7c: 83 81 00 28 lwz r28,40(r1) <== NOT EXECUTED ffc21f80: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED ffc21f84: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED ffc21f88: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED ffc21f8c: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc21f90: 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) + ffc21f94: 54 9d f8 7e rlwinm r29,r4,31,1,31 ffc21f98: 8b 7f 00 02 lbz r27,2(r31) ffc21f9c: 7f bd 22 14 add r29,r29,r4 ffc21fa0: 80 1f 00 4c lwz r0,76(r31) ffc21fa4: 7f bb dc 30 srw r27,r29,r27 ffc21fa8: 7f 7b 02 14 add r27,r27,r0 ffc21fac: 4b ff ff 68 b ffc21f14 ffc21fb0: 54 9d 10 3a rlwinm r29,r4,2,0,29 <== NOT EXECUTED ffc21fb4: 80 1f 00 4c lwz r0,76(r31) <== NOT EXECUTED ffc21fb8: 7f bb dc 30 srw r27,r29,r27 <== NOT EXECUTED ffc21fbc: 7f 7b 02 14 add r27,r27,r0 <== NOT EXECUTED ffc21fc0: 4b ff ff 54 b ffc21f14 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = ffc21fc4: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); ffc21fc8: 57 39 04 3e clrlwi r25,r25,16 <== NOT EXECUTED ffc21fcc: 57 20 40 2e rlwinm r0,r25,8,0,23 <== NOT EXECUTED break; } return RC_OK; } ffc21fd0: 83 41 00 20 lwz r26,32(r1) <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = ffc21fd4: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); ffc21fd8: 57 39 c2 3e rlwinm r25,r25,24,8,31 <== NOT EXECUTED ffc21fdc: 7c 19 cb 78 or r25,r0,r25 <== NOT EXECUTED break; } return RC_OK; } ffc21fe0: 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; ffc21fe4: 38 00 00 01 li r0,1 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = ffc21fe8: 7f 29 eb 2e sthx r25,r9,r29 <== NOT EXECUTED ffc21fec: 98 1f 00 84 stb r0,132(r31) <== NOT EXECUTED break; } return RC_OK; } ffc21ff0: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc21ff4: 83 21 00 1c lwz r25,28(r1) <== NOT EXECUTED ffc21ff8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc21ffc: 83 81 00 28 lwz r28,40(r1) <== NOT EXECUTED ffc22000: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED ffc22004: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED ffc22008: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED ffc2200c: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc22010: 4e 80 00 20 blr <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) ffc22014: 73 c0 00 01 andi. r0,r30,1 ffc22018: 41 82 01 0c beq- ffc22124 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; ffc2201c: 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; ffc22020: 57 39 24 36 rlwinm r25,r25,4,16,27 *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; ffc22024: 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)) = ffc22028: 7c 09 e8 ae lbzx r0,r9,r29 ffc2202c: 54 00 07 3e clrlwi r0,r0,28 ffc22030: 7c 09 e9 ae stbx r0,r9,r29 (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | ffc22034: 81 21 00 08 lwz r9,8(r1) ffc22038: 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)) = ffc2203c: 7c 09 e8 ae lbzx r0,r9,r29 ffc22040: 7c 00 cb 78 or r0,r0,r25 ffc22044: 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) ) ffc22048: a1 3f 00 00 lhz r9,0(r31) ffc2204c: 9b 9f 00 84 stb r28,132(r31) ffc22050: 38 09 ff ff addi r0,r9,-1 ffc22054: 7f 80 e8 00 cmpw cr7,r0,r29 ffc22058: 41 9e 01 24 beq- cr7,ffc2217c <== NEVER TAKEN fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; ffc2205c: 81 21 00 08 lwz r9,8(r1) ffc22060: 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); ffc22064: 57 39 c2 3e rlwinm r25,r25,24,8,31 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; ffc22068: 81 29 00 24 lwz r9,36(r9) ffc2206c: 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))) | ffc22070: 81 21 00 08 lwz r9,8(r1) ffc22074: 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)) = ffc22078: 7c 09 e8 ae lbzx r0,r9,r29 ffc2207c: 7c 19 cb 78 or r25,r0,r25 ffc22080: 7f 29 e9 ae stbx r25,r9,r29 break; } return RC_OK; } ffc22084: 80 01 00 3c lwz r0,60(r1) ffc22088: 83 21 00 1c lwz r25,28(r1) ffc2208c: 7c 08 03 a6 mtlr r0 ffc22090: 83 41 00 20 lwz r26,32(r1) ffc22094: 83 61 00 24 lwz r27,36(r1) ffc22098: 83 81 00 28 lwz r28,40(r1) ffc2209c: 83 a1 00 2c lwz r29,44(r1) ffc220a0: 83 c1 00 30 lwz r30,48(r1) ffc220a4: 83 e1 00 34 lwz r31,52(r1) ffc220a8: 38 21 00 38 addi r1,r1,56 ffc220ac: 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)); ffc220b0: 57 39 01 3e clrlwi r25,r25,4 <== NOT EXECUTED ffc220b4: 53 2b 46 3e rlwimi r11,r25,8,24,31 <== NOT EXECUTED ffc220b8: 53 2b c4 2e rlwimi r11,r25,24,16,23 <== NOT EXECUTED ffc220bc: 53 2b 42 1e rlwimi r11,r25,8,8,15 <== NOT EXECUTED ffc220c0: 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)); ffc220c4: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc220c8: 3c 00 f0 00 lis r0,-4096 <== NOT EXECUTED ffc220cc: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED ffc220d0: 50 0a 46 3e rlwimi r10,r0,8,24,31 <== NOT EXECUTED ffc220d4: 50 0a c4 2e rlwimi r10,r0,24,16,23 <== NOT EXECUTED ffc220d8: 50 0a 42 1e rlwimi r10,r0,8,8,15 <== NOT EXECUTED ffc220dc: 50 0a c0 0e rlwimi r10,r0,24,0,7 <== NOT EXECUTED ffc220e0: 7c 09 e8 2e lwzx r0,r9,r29 <== NOT EXECUTED break; } return RC_OK; } ffc220e4: 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)); ffc220e8: 7d 40 00 38 and r0,r10,r0 <== NOT EXECUTED break; } return RC_OK; } ffc220ec: 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))); ffc220f0: 7c 00 5b 78 or r0,r0,r11 <== NOT EXECUTED break; } return RC_OK; } ffc220f4: 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)) = ffc220f8: 7c 09 e9 2e stwx r0,r9,r29 <== NOT EXECUTED ffc220fc: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc22100: 98 1f 00 84 stb r0,132(r31) <== NOT EXECUTED break; } return RC_OK; } ffc22104: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc22108: 83 81 00 28 lwz r28,40(r1) <== NOT EXECUTED ffc2210c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc22110: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED ffc22114: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED ffc22118: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED ffc2211c: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc22120: 4e 80 00 20 blr <== NOT EXECUTED } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; ffc22124: 81 21 00 08 lwz r9,8(r1) (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; ffc22128: 57 39 05 3e clrlwi r25,r25,20 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; ffc2212c: 81 29 00 24 lwz r9,36(r9) ffc22130: 7c 69 e9 ae stbx r3,r9,r29 *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | ffc22134: 81 21 00 08 lwz r9,8(r1) ffc22138: 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)) = ffc2213c: 7c 09 e8 ae lbzx r0,r9,r29 ffc22140: 7c 00 cb 78 or r0,r0,r25 ffc22144: 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) ) ffc22148: a1 3f 00 00 lhz r9,0(r31) ffc2214c: 9b 9f 00 84 stb r28,132(r31) ffc22150: 38 09 ff ff addi r0,r9,-1 ffc22154: 7f 80 e8 00 cmpw cr7,r0,r29 ffc22158: 41 9e 00 6c beq- cr7,ffc221c4 <== NEVER TAKEN fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; ffc2215c: 81 21 00 08 lwz r9,8(r1) ffc22160: 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); ffc22164: 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; ffc22168: 81 29 00 24 lwz r9,36(r9) fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = ffc2216c: 7c 09 e8 ae lbzx r0,r9,r29 ffc22170: 54 00 00 36 rlwinm r0,r0,0,0,27 ffc22174: 7c 09 e9 ae stbx r0,r9,r29 ffc22178: 4b ff fe f8 b ffc22070 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, ffc2217c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc22180: 38 9b 00 01 addi r4,r27,1 <== NOT EXECUTED ffc22184: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc22188: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc2218c: 4b ff 61 2d bl ffc182b8 <== NOT EXECUTED &block0); if (rc != RC_OK) ffc22190: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc22194: 40 a2 fd d4 bne- ffc21f68 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; ffc22198: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); ffc2219c: 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; ffc221a0: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED ffc221a4: 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))) | ffc221a8: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc221ac: 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)) = ffc221b0: 88 09 00 00 lbz r0,0(r9) <== NOT EXECUTED ffc221b4: 7f 20 03 78 or r0,r25,r0 <== NOT EXECUTED ffc221b8: 98 09 00 00 stb r0,0(r9) <== NOT EXECUTED ffc221bc: 9b 9f 00 84 stb r28,132(r31) <== NOT EXECUTED ffc221c0: 4b ff fd a8 b ffc21f68 <== 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, ffc221c4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc221c8: 38 9b 00 01 addi r4,r27,1 <== NOT EXECUTED ffc221cc: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc221d0: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc221d4: 4b ff 60 e5 bl ffc182b8 <== NOT EXECUTED &block0); if (rc != RC_OK) ffc221d8: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc221dc: 40 a2 fd 8c bne- ffc21f68 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; ffc221e0: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); ffc221e4: 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; ffc221e8: 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)) = ffc221ec: 88 09 00 00 lbz r0,0(r9) <== NOT EXECUTED ffc221f0: 54 00 00 36 rlwinm r0,r0,0,0,27 <== NOT EXECUTED ffc221f4: 98 09 00 00 stb r0,0(r9) <== NOT EXECUTED ffc221f8: 4b ff ff b0 b ffc221a8 <== NOT EXECUTED =============================================================================== ffc18cac : * 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) { ffc18cac: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc18cb0: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc18cb4: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc18cb8: 93 c1 00 10 stw r30,16(r1) <== NOT EXECUTED int rc = RC_OK; ffc18cbc: 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) { ffc18cc0: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED ffc18cc4: 93 81 00 08 stw r28,8(r1) <== NOT EXECUTED ffc18cc8: 93 a1 00 0c stw r29,12(r1) <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc18ccc: 83 e3 00 34 lwz r31,52(r3) <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) ffc18cd0: 88 1f 00 0a lbz r0,10(r31) <== NOT EXECUTED ffc18cd4: 70 09 00 04 andi. r9,r0,4 <== NOT EXECUTED ffc18cd8: 40 82 00 e0 bne- ffc18db8 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; } fat_buf_release(fs_info); ffc18cdc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc18ce0: 4b ff f8 21 bl ffc18500 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) ffc18ce4: 80 7f 00 58 lwz r3,88(r31) <== NOT EXECUTED ffc18ce8: 80 9f 00 5c lwz r4,92(r31) <== NOT EXECUTED ffc18cec: 4b ff da 51 bl ffc1673c <== NOT EXECUTED ffc18cf0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc18cf4: 40 9e 00 e0 bne- cr7,ffc18dd4 <== NOT EXECUTED rc = -1; ffc18cf8: 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; ffc18cfc: 83 bf 00 68 lwz r29,104(r31) <== NOT EXECUTED ffc18d00: 7f bd e2 14 add r29,r29,r28 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) ffc18d04: 48 00 00 08 b ffc18d0c <== NOT EXECUTED free(node); ffc18d08: 4b fe f7 d9 bl ffc084e0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); ffc18d0c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc18d10: 4b ff 5a f1 bl ffc0e800 <_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 ) ffc18d14: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc18d18: 40 9e ff f0 bne+ cr7,ffc18d08 <== 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++) ffc18d1c: 2f 9c 00 0c cmpwi cr7,r28,12 <== NOT EXECUTED ffc18d20: 3b 9c 00 0c addi r28,r28,12 <== NOT EXECUTED ffc18d24: 40 be ff d8 bne- cr7,ffc18cfc <== NOT EXECUTED ffc18d28: 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; ffc18d2c: 83 bf 00 6c lwz r29,108(r31) <== NOT EXECUTED ffc18d30: 7f bd e2 14 add r29,r29,r28 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) ffc18d34: 48 00 00 08 b ffc18d3c <== NOT EXECUTED free(node); ffc18d38: 4b fe f7 a9 bl ffc084e0 <== NOT EXECUTED ffc18d3c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc18d40: 4b ff 5a c1 bl ffc0e800 <_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 ) ffc18d44: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc18d48: 40 9e ff f0 bne+ cr7,ffc18d38 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) ffc18d4c: 2f 9c 00 0c cmpwi cr7,r28,12 <== NOT EXECUTED ffc18d50: 3b 9c 00 0c addi r28,r28,12 <== NOT EXECUTED ffc18d54: 40 be ff d8 bne- cr7,ffc18d2c <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); ffc18d58: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc18d5c: 4b fe f7 85 bl ffc084e0 <== NOT EXECUTED free(fs_info->rhash); ffc18d60: 80 7f 00 6c lwz r3,108(r31) <== NOT EXECUTED ffc18d64: 4b fe f7 7d bl ffc084e0 <== NOT EXECUTED free(fs_info->uino); ffc18d68: 80 7f 00 70 lwz r3,112(r31) <== NOT EXECUTED ffc18d6c: 4b fe f7 75 bl ffc084e0 <== NOT EXECUTED free(fs_info->sec_buf); ffc18d70: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc18d74: 4b fe f7 6d bl ffc084e0 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); ffc18d78: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc18d7c: 4b fe e3 49 bl ffc070c4 <== NOT EXECUTED if (rc) ffc18d80: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED ffc18d84: 41 be 00 10 beq+ cr7,ffc18d94 <== NOT EXECUTED errno = EIO; ffc18d88: 48 00 b4 89 bl ffc24210 <__errno> <== NOT EXECUTED ffc18d8c: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc18d90: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED return rc; } ffc18d94: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc18d98: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc18d9c: 83 81 00 08 lwz r28,8(r1) <== NOT EXECUTED ffc18da0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18da4: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc18da8: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc18dac: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc18db0: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc18db4: 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, ffc18db8: 80 9f 00 40 lwz r4,64(r31) <== NOT EXECUTED ffc18dbc: 80 bf 00 44 lwz r5,68(r31) <== NOT EXECUTED ffc18dc0: 4b ff fe 45 bl ffc18c04 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) ffc18dc4: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED ffc18dc8: 41 a2 ff 14 beq- ffc18cdc <== NOT EXECUTED rc = -1; ffc18dcc: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc18dd0: 4b ff ff 0c b ffc18cdc <== NOT EXECUTED } fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) rc = -1; ffc18dd4: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc18dd8: 4b ff ff 20 b ffc18cf8 <== NOT EXECUTED =============================================================================== ffc1fcdc : int fcntl( int fd, int cmd, ... ) { ffc1fcdc: 94 21 ff c8 stwu r1,-56(r1) ffc1fce0: 7c 08 02 a6 mflr r0 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc1fce4: 3d 20 00 00 lis r9,0 int fcntl( int fd, int cmd, ... ) { ffc1fce8: 90 01 00 3c stw r0,60(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc1fcec: 80 09 27 1c lwz r0,10012(r9) ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc1fcf0: 39 20 00 02 li r9,2 ffc1fcf4: 99 21 00 08 stb r9,8(r1) ffc1fcf8: 39 21 00 40 addi r9,r1,64 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc1fcfc: 7f 83 00 40 cmplw cr7,r3,r0 ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc1fd00: 91 21 00 0c stw r9,12(r1) ffc1fd04: 39 21 00 10 addi r9,r1,16 int fcntl( int fd, int cmd, ... ) { ffc1fd08: 93 c1 00 30 stw r30,48(r1) ffc1fd0c: 93 e1 00 34 stw r31,52(r1) ffc1fd10: 90 a1 00 18 stw r5,24(r1) ffc1fd14: 90 c1 00 1c stw r6,28(r1) ffc1fd18: 90 e1 00 20 stw r7,32(r1) int ret; va_list ap; va_start( ap, cmd ); ffc1fd1c: 91 21 00 10 stw r9,16(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc1fd20: 40 9c 02 08 bge- cr7,ffc1ff28 iop = rtems_libio_iop( fd ); ffc1fd24: 3f e0 00 00 lis r31,0 ffc1fd28: 81 7f 27 cc lwz r11,10188(r31) ffc1fd2c: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc1fd30: 7f cb 1a 14 add r30,r11,r3 rtems_libio_check_is_open(iop); ffc1fd34: 80 7e 00 18 lwz r3,24(r30) ffc1fd38: 70 69 01 00 andi. r9,r3,256 ffc1fd3c: 41 82 01 ec beq- ffc1ff28 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc1fd40: 2b 84 00 09 cmplwi cr7,r4,9 ffc1fd44: 40 9d 00 30 ble- cr7,ffc1fd74 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; ffc1fd48: 4b ff 4d 99 bl ffc14ae0 <__errno> ffc1fd4c: 38 00 00 16 li r0,22 ffc1fd50: 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; ffc1fd54: 3b e0 ff ff li r31,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc1fd58: 80 01 00 3c lwz r0,60(r1) ffc1fd5c: 7f e3 fb 78 mr r3,r31 ffc1fd60: 83 c1 00 30 lwz r30,48(r1) ffc1fd64: 7c 08 03 a6 mtlr r0 ffc1fd68: 83 e1 00 34 lwz r31,52(r1) ffc1fd6c: 38 21 00 38 addi r1,r1,56 ffc1fd70: 4e 80 00 20 blr /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc1fd74: 3d 20 ff c2 lis r9,-62 ffc1fd78: 39 29 33 64 addi r9,r9,13156 ffc1fd7c: 54 8a 10 3a rlwinm r10,r4,2,0,29 ffc1fd80: 7d 49 50 2e lwzx r10,r9,r10 ffc1fd84: 7d 2a 4a 14 add r9,r10,r9 ffc1fd88: 7d 29 03 a6 mtctr r9 ffc1fd8c: 4e 80 04 20 bctr errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; ffc1fd90: 4b ff 4d 51 bl ffc14ae0 <__errno> ffc1fd94: 38 00 00 86 li r0,134 ffc1fd98: 90 03 00 00 stw r0,0(r3) ffc1fd9c: 4b ff ff b8 b ffc1fd54 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 ) ); ffc1fda0: 89 21 00 08 lbz r9,8(r1) ffc1fda4: 2b 89 00 07 cmplwi cr7,r9,7 ffc1fda8: 40 9d 01 68 ble- cr7,ffc1ff10 <== ALWAYS TAKEN ffc1fdac: 81 61 00 0c lwz r11,12(r1) <== NOT EXECUTED ffc1fdb0: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED ffc1fdb4: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc1fdb8: 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; ffc1fdbc: 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 ) ); ffc1fdc0: 90 81 00 28 stw r4,40(r1) ffc1fdc4: 4b fe 5d c5 bl ffc05b88 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); ffc1fdc8: 39 20 fd fe li r9,-514 ffc1fdcc: 80 1e 00 18 lwz r0,24(r30) ffc1fdd0: 70 63 02 01 andi. r3,r3,513 ffc1fdd4: 80 81 00 28 lwz r4,40(r1) ffc1fdd8: 7d 20 00 38 and r0,r9,r0 ffc1fddc: 7c 60 03 78 or r0,r3,r0 ffc1fde0: 90 1e 00 18 stw r0,24(r30) ffc1fde4: 48 00 00 1c b ffc1fe00 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); ffc1fde8: 90 81 00 28 stw r4,40(r1) ffc1fdec: 4b fe 5d fd bl ffc05be8 ffc1fdf0: 7c 7f 1b 78 mr r31,r3 ffc1fdf4: 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) { ffc1fdf8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc1fdfc: 41 bc ff 5c blt- cr7,ffc1fd58 <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); ffc1fe00: 81 3e 00 24 lwz r9,36(r30) ffc1fe04: 7c 83 23 78 mr r3,r4 ffc1fe08: 7f c4 f3 78 mr r4,r30 ffc1fe0c: 80 09 00 30 lwz r0,48(r9) ffc1fe10: 7c 09 03 a6 mtctr r0 ffc1fe14: 4e 80 04 21 bctrl if (err) { ffc1fe18: 7c 7e 1b 79 mr. r30,r3 ffc1fe1c: 41 82 ff 3c beq+ ffc1fd58 <== ALWAYS TAKEN errno = err; ffc1fe20: 4b ff 4c c1 bl ffc14ae0 <__errno> <== NOT EXECUTED ffc1fe24: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED ffc1fe28: 4b ff ff 2c b ffc1fd54 <== 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 ) ) ffc1fe2c: 89 21 00 08 lbz r9,8(r1) ffc1fe30: 2b 89 00 07 cmplwi cr7,r9,7 ffc1fe34: 41 9d 00 cc bgt- cr7,ffc1ff00 <== NEVER TAKEN ffc1fe38: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc1fe3c: 81 61 00 10 lwz r11,16(r1) ffc1fe40: 39 29 00 01 addi r9,r9,1 ffc1fe44: 99 21 00 08 stb r9,8(r1) ffc1fe48: 7d 6b 02 14 add r11,r11,r0 ffc1fe4c: 80 0b 00 00 lwz r0,0(r11) ffc1fe50: 2f 80 00 00 cmpwi cr7,r0,0 ffc1fe54: 41 9e 00 e8 beq- cr7,ffc1ff3c iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; ffc1fe58: 60 63 08 00 ori r3,r3,2048 ffc1fe5c: 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; ffc1fe60: 3b e0 00 00 li r31,0 ffc1fe64: 4b ff ff 9c b ffc1fe00 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); ffc1fe68: 54 7f af fe rlwinm r31,r3,21,31,31 ffc1fe6c: 4b ff ff 94 b ffc1fe00 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc1fe70: 89 21 00 08 lbz r9,8(r1) ffc1fe74: 2b 89 00 07 cmplwi cr7,r9,7 ffc1fe78: 41 9d 00 78 bgt- cr7,ffc1fef0 <== NEVER TAKEN ffc1fe7c: 55 2a 10 3a rlwinm r10,r9,2,0,29 ffc1fe80: 81 01 00 10 lwz r8,16(r1) ffc1fe84: 39 29 00 01 addi r9,r9,1 ffc1fe88: 99 21 00 08 stb r9,8(r1) ffc1fe8c: 7d 48 52 14 add r10,r8,r10 ffc1fe90: 81 4a 00 00 lwz r10,0(r10) if ( fd2 ) ffc1fe94: 2f 8a 00 00 cmpwi cr7,r10,0 ffc1fe98: 41 9e 00 b4 beq- cr7,ffc1ff4c diop = rtems_libio_iop( fd2 ); ffc1fe9c: 7f 80 50 40 cmplw cr7,r0,r10 ffc1fea0: 3b e0 00 00 li r31,0 ffc1fea4: 39 20 00 00 li r9,0 ffc1fea8: 40 9d 00 10 ble- cr7,ffc1feb8 <== NEVER TAKEN ffc1feac: 55 49 30 32 rlwinm r9,r10,6,0,25 ffc1feb0: 7d 2b 4a 14 add r9,r11,r9 ffc1feb4: 7d 3f 4b 78 mr r31,r9 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc1feb8: 80 1e 00 28 lwz r0,40(r30) ret = (int) (diop - rtems_libio_iops); ffc1febc: 7f eb f8 50 subf r31,r11,r31 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc1fec0: 80 fe 00 1c lwz r7,28(r30) ret = (int) (diop - rtems_libio_iops); ffc1fec4: 7f ff 36 70 srawi r31,r31,6 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc1fec8: 81 1e 00 20 lwz r8,32(r30) ffc1fecc: 81 5e 00 24 lwz r10,36(r30) ffc1fed0: 90 e9 00 1c stw r7,28(r9) ffc1fed4: 91 09 00 20 stw r8,32(r9) ffc1fed8: 91 49 00 24 stw r10,36(r9) ffc1fedc: 90 09 00 28 stw r0,40(r9) ffc1fee0: 80 1e 00 2c lwz r0,44(r30) ret = -1; break; } } diop->flags = iop->flags; ffc1fee4: 90 69 00 18 stw r3,24(r9) diop->pathinfo = iop->pathinfo; ffc1fee8: 90 09 00 2c stw r0,44(r9) ffc1feec: 4b ff ff 0c b ffc1fdf8 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc1fef0: 81 41 00 0c lwz r10,12(r1) <== NOT EXECUTED ffc1fef4: 39 2a 00 04 addi r9,r10,4 <== NOT EXECUTED ffc1fef8: 91 21 00 0c stw r9,12(r1) <== NOT EXECUTED ffc1fefc: 4b ff ff 94 b ffc1fe90 <== 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 ) ) ffc1ff00: 81 61 00 0c lwz r11,12(r1) <== NOT EXECUTED ffc1ff04: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED ffc1ff08: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc1ff0c: 4b ff ff 40 b ffc1fe4c <== 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 ) ); ffc1ff10: 81 61 00 10 lwz r11,16(r1) ffc1ff14: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc1ff18: 39 29 00 01 addi r9,r9,1 ffc1ff1c: 7d 6b 02 14 add r11,r11,r0 ffc1ff20: 99 21 00 08 stb r9,8(r1) ffc1ff24: 4b ff fe 94 b ffc1fdb8 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); ffc1ff28: 4b ff 4b b9 bl ffc14ae0 <__errno> ffc1ff2c: 38 00 00 09 li r0,9 ffc1ff30: 90 03 00 00 stw r0,0(r3) ffc1ff34: 3b e0 ff ff li r31,-1 ffc1ff38: 4b ff fe 20 b ffc1fd58 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; ffc1ff3c: 54 63 05 66 rlwinm r3,r3,0,21,19 ffc1ff40: 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; ffc1ff44: 3b e0 00 00 li r31,0 ffc1ff48: 4b ff fe b8 b ffc1fe00 fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); ffc1ff4c: 90 81 00 28 stw r4,40(r1) ffc1ff50: 4b fe 5c e9 bl ffc05c38 if ( diop == 0 ) { ffc1ff54: 7c 69 1b 79 mr. r9,r3 ffc1ff58: 80 81 00 28 lwz r4,40(r1) ffc1ff5c: 41 a2 fd f8 beq- ffc1fd54 <== NEVER TAKEN ffc1ff60: 81 7f 27 cc lwz r11,10188(r31) ffc1ff64: 7d 3f 4b 78 mr r31,r9 ffc1ff68: 80 7e 00 18 lwz r3,24(r30) ffc1ff6c: 4b ff ff 4c b ffc1feb8 =============================================================================== ffc117f4 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc117f4: 94 21 ff d0 stwu r1,-48(r1) ffc117f8: 7c 08 02 a6 mflr r0 ffc117fc: 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) { ffc11800: 3f e0 00 00 lis r31,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11804: 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) { ffc11808: 80 1f 29 f8 lwz r0,10744(r31) */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc1180c: 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) { ffc11810: 3b 7f 29 f8 addi r27,r31,10744 ffc11814: 2f 80 00 00 cmpwi cr7,r0,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11818: 93 81 00 20 stw r28,32(r1) ffc1181c: 7c 9c 23 78 mr r28,r4 ffc11820: 93 c1 00 28 stw r30,40(r1) ffc11824: 7c 7e 1b 78 mr r30,r3 ffc11828: 93 41 00 18 stw r26,24(r1) ffc1182c: 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) { ffc11830: 41 9e 00 c4 beq- cr7,ffc118f4 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc11834: 7c 03 03 78 mr r3,r0 ffc11838: 38 80 00 00 li r4,0 ffc1183c: 38 a0 00 00 li r5,0 ffc11840: 4b ff a0 f1 bl ffc0b930 } if (sc == RTEMS_SUCCESSFUL) { ffc11844: 3b 60 ff f4 li r27,-12 ffc11848: 2f 83 00 00 cmpwi cr7,r3,0 ffc1184c: 40 9e 00 7c bne- cr7,ffc118c8 <== NEVER TAKEN err = pipe_lock(); if (err) return err; pipe = *pipep; ffc11850: 83 be 00 00 lwz r29,0(r30) if (pipe == NULL) { ffc11854: 2f 9d 00 00 cmpwi cr7,r29,0 ffc11858: 41 9e 02 34 beq- cr7,ffc11a8c err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc1185c: 80 7d 00 28 lwz r3,40(r29) ffc11860: 38 80 00 00 li r4,0 ffc11864: 38 a0 00 00 li r5,0 ffc11868: 4b ff a0 c9 bl ffc0b930 err = -EINTR; ffc1186c: 3b 60 ff fc li r27,-4 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc11870: 2f 83 00 00 cmpwi cr7,r3,0 ffc11874: 40 9e 00 08 bne- cr7,ffc1187c <== NEVER TAKEN ffc11878: 3b 60 00 00 li r27,0 err = -EINTR; if (*pipep == NULL) { ffc1187c: 80 1e 00 00 lwz r0,0(r30) ffc11880: 2f 80 00 00 cmpwi cr7,r0,0 ffc11884: 41 9e 03 1c beq- cr7,ffc11ba0 static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); ffc11888: 80 7f 29 f8 lwz r3,10744(r31) ffc1188c: 4b ff a2 31 bl ffc0babc pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) ffc11890: 2f 9b 00 00 cmpwi cr7,r27,0 ffc11894: 40 9e 00 34 bne- cr7,ffc118c8 <== NEVER TAKEN return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { ffc11898: 80 1c 00 18 lwz r0,24(r28) int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; ffc1189c: 83 fe 00 00 lwz r31,0(r30) switch (LIBIO_ACCMODE(iop)) { ffc118a0: 54 00 07 7c rlwinm r0,r0,0,29,30 ffc118a4: 2f 80 00 04 cmpwi cr7,r0,4 ffc118a8: 41 9e 00 7c beq- cr7,ffc11924 ffc118ac: 2f 80 00 06 cmpwi cr7,r0,6 ffc118b0: 41 9e 01 8c beq- cr7,ffc11a3c ffc118b4: 2f 80 00 02 cmpwi cr7,r0,2 ffc118b8: 41 9e 01 00 beq- cr7,ffc119b8 <== ALWAYS TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); ffc118bc: 80 7f 00 28 lwz r3,40(r31) return 0; ffc118c0: 3b 60 00 00 li r27,0 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); ffc118c4: 4b ff a1 f9 bl ffc0babc return 0; out_error: pipe_release(pipep, iop); return err; } ffc118c8: 80 01 00 34 lwz r0,52(r1) ffc118cc: 7f 63 db 78 mr r3,r27 ffc118d0: 83 41 00 18 lwz r26,24(r1) ffc118d4: 7c 08 03 a6 mtlr r0 ffc118d8: 83 61 00 1c lwz r27,28(r1) ffc118dc: 83 81 00 20 lwz r28,32(r1) ffc118e0: 83 a1 00 24 lwz r29,36(r1) ffc118e4: 83 c1 00 28 lwz r30,40(r1) ffc118e8: 83 e1 00 2c lwz r31,44(r1) ffc118ec: 38 21 00 30 addi r1,r1,48 ffc118f0: 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 ); ffc118f4: 3f a0 00 00 lis r29,0 ffc118f8: 80 7d 27 f4 lwz r3,10228(r29) ffc118fc: 38 80 00 00 li r4,0 ffc11900: 38 a0 00 00 li r5,0 ffc11904: 4b ff a0 2d bl ffc0b930 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { ffc11908: 80 1f 29 f8 lwz r0,10744(r31) ffc1190c: 2f 80 00 00 cmpwi cr7,r0,0 ffc11910: 41 9e 02 a8 beq- cr7,ffc11bb8 <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc11914: 80 7d 27 f4 lwz r3,10228(r29) <== NOT EXECUTED ffc11918: 4b ff a1 a5 bl ffc0babc <== NOT EXECUTED ffc1191c: 80 1f 29 f8 lwz r0,10744(r31) <== NOT EXECUTED ffc11920: 4b ff ff 14 b ffc11834 <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc11924: 81 3f 00 14 lwz r9,20(r31) } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc11928: 81 7f 00 24 lwz r11,36(r31) if (pipe->Writers ++ == 0) ffc1192c: 2f 89 00 00 cmpwi cr7,r9,0 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc11930: 38 0b 00 01 addi r0,r11,1 if (pipe->Writers ++ == 0) ffc11934: 39 29 00 01 addi r9,r9,1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc11938: 90 1f 00 24 stw r0,36(r31) if (pipe->Writers ++ == 0) ffc1193c: 91 3f 00 14 stw r9,20(r31) ffc11940: 41 9e 02 d4 beq- cr7,ffc11c14 <== ALWAYS TAKEN PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { ffc11944: 80 1f 00 10 lwz r0,16(r31) ffc11948: 2f 80 00 00 cmpwi cr7,r0,0 ffc1194c: 40 be ff 70 bne- cr7,ffc118bc ffc11950: 80 1c 00 18 lwz r0,24(r28) ffc11954: 70 09 00 01 andi. r9,r0,1 ffc11958: 40 82 03 00 bne- ffc11c58 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; ffc1195c: 83 bf 00 20 lwz r29,32(r31) ffc11960: 48 00 00 20 b ffc11980 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) ffc11964: 80 7f 00 28 lwz r3,40(r31) ffc11968: 4b ff 9f c9 bl ffc0b930 ffc1196c: 2f 83 00 00 cmpwi cr7,r3,0 ffc11970: 40 9e 00 34 bne- cr7,ffc119a4 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); ffc11974: 80 1f 00 20 lwz r0,32(r31) ffc11978: 7f 80 e8 00 cmpw cr7,r0,r29 ffc1197c: 40 be ff 40 bne- cr7,ffc118bc <== ALWAYS TAKEN if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); ffc11980: 80 7f 00 28 lwz r3,40(r31) ffc11984: 4b ff a1 39 bl ffc0babc if (! PIPE_WRITEWAIT(pipe)) ffc11988: 80 7f 00 30 lwz r3,48(r31) ffc1198c: 38 80 00 00 li r4,0 ffc11990: 48 00 22 2d bl ffc13bbc goto out_error; if (! PIPE_LOCK(pipe)) ffc11994: 38 80 00 00 li r4,0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc11998: 2f 83 00 00 cmpwi cr7,r3,0 goto out_error; if (! PIPE_LOCK(pipe)) ffc1199c: 38 a0 00 00 li r5,0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc119a0: 41 9e ff c4 beq+ cr7,ffc11964 <== ALWAYS TAKEN goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; ffc119a4: 3b 60 ff fc li r27,-4 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); ffc119a8: 7f c3 f3 78 mr r3,r30 ffc119ac: 7f 84 e3 78 mr r4,r28 ffc119b0: 4b ff fc ed bl ffc1169c return err; ffc119b4: 4b ff ff 14 b ffc118c8 pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc119b8: 81 3f 00 10 lwz r9,16(r31) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc119bc: 81 7f 00 20 lwz r11,32(r31) if (pipe->Readers ++ == 0) ffc119c0: 2f 89 00 00 cmpwi cr7,r9,0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc119c4: 38 0b 00 01 addi r0,r11,1 if (pipe->Readers ++ == 0) ffc119c8: 39 29 00 01 addi r9,r9,1 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc119cc: 90 1f 00 20 stw r0,32(r31) if (pipe->Readers ++ == 0) ffc119d0: 91 3f 00 10 stw r9,16(r31) ffc119d4: 41 9e 02 20 beq- cr7,ffc11bf4 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { ffc119d8: 80 1f 00 14 lwz r0,20(r31) ffc119dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc119e0: 40 be fe dc bne- cr7,ffc118bc /* Not an error */ if (LIBIO_NODELAY(iop)) ffc119e4: 80 1c 00 18 lwz r0,24(r28) ffc119e8: 70 09 00 01 andi. r9,r0,1 ffc119ec: 40 a2 fe d0 bne- ffc118bc break; prevCounter = pipe->writerCounter; ffc119f0: 83 bf 00 24 lwz r29,36(r31) ffc119f4: 48 00 00 20 b ffc11a14 /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) ffc119f8: 80 7f 00 28 lwz r3,40(r31) ffc119fc: 4b ff 9f 35 bl ffc0b930 ffc11a00: 2f 83 00 00 cmpwi cr7,r3,0 ffc11a04: 40 be ff a0 bne- cr7,ffc119a4 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); ffc11a08: 80 1f 00 24 lwz r0,36(r31) ffc11a0c: 7f 80 e8 00 cmpw cr7,r0,r29 ffc11a10: 40 be fe ac bne- cr7,ffc118bc <== ALWAYS TAKEN prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); ffc11a14: 80 7f 00 28 lwz r3,40(r31) ffc11a18: 4b ff a0 a5 bl ffc0babc if (! PIPE_READWAIT(pipe)) ffc11a1c: 80 7f 00 2c lwz r3,44(r31) ffc11a20: 38 80 00 00 li r4,0 ffc11a24: 48 00 21 99 bl ffc13bbc goto out_error; if (! PIPE_LOCK(pipe)) ffc11a28: 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)) ffc11a2c: 2f 83 00 00 cmpwi cr7,r3,0 goto out_error; if (! PIPE_LOCK(pipe)) ffc11a30: 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)) ffc11a34: 41 9e ff c4 beq+ cr7,ffc119f8 <== ALWAYS TAKEN ffc11a38: 4b ff ff 6c b ffc119a4 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc11a3c: 81 3f 00 10 lwz r9,16(r31) } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc11a40: 81 7f 00 20 lwz r11,32(r31) if (pipe->Readers ++ == 0) ffc11a44: 2f 89 00 00 cmpwi cr7,r9,0 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc11a48: 38 0b 00 01 addi r0,r11,1 if (pipe->Readers ++ == 0) ffc11a4c: 39 29 00 01 addi r9,r9,1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc11a50: 90 1f 00 20 stw r0,32(r31) if (pipe->Readers ++ == 0) ffc11a54: 91 3f 00 10 stw r9,16(r31) ffc11a58: 41 9e 01 ac beq- cr7,ffc11c04 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc11a5c: 81 3f 00 14 lwz r9,20(r31) case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc11a60: 81 7f 00 24 lwz r11,36(r31) if (pipe->Writers ++ == 0) ffc11a64: 2f 89 00 00 cmpwi cr7,r9,0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc11a68: 38 0b 00 01 addi r0,r11,1 if (pipe->Writers ++ == 0) ffc11a6c: 39 29 00 01 addi r9,r9,1 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc11a70: 90 1f 00 24 stw r0,36(r31) if (pipe->Writers ++ == 0) ffc11a74: 91 3f 00 14 stw r9,20(r31) ffc11a78: 40 9e fe 44 bne+ cr7,ffc118bc <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); ffc11a7c: 80 7f 00 2c lwz r3,44(r31) ffc11a80: 38 81 00 0c addi r4,r1,12 ffc11a84: 48 00 20 a5 bl ffc13b28 ffc11a88: 4b ff fe 34 b ffc118bc { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ffc11a8c: 38 60 00 34 li r3,52 ffc11a90: 4b ff 5f c5 bl ffc07a54 if (pipe == NULL) ffc11a94: 7c 7d 1b 79 mr. r29,r3 ffc11a98: 41 82 01 f0 beq- ffc11c88 return err; memset(pipe, 0, sizeof(pipe_control_t)); ffc11a9c: 38 80 00 00 li r4,0 ffc11aa0: 38 a0 00 34 li r5,52 ffc11aa4: 48 00 5e 51 bl ffc178f4 pipe->Size = PIPE_BUF; ffc11aa8: 38 00 02 00 li r0,512 ffc11aac: 90 1d 00 04 stw r0,4(r29) pipe->Buffer = malloc(pipe->Size); ffc11ab0: 38 60 02 00 li r3,512 ffc11ab4: 4b ff 5f a1 bl ffc07a54 if (! pipe->Buffer) ffc11ab8: 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); ffc11abc: 90 7d 00 00 stw r3,0(r29) if (! pipe->Buffer) ffc11ac0: 41 9e 01 c0 beq- cr7,ffc11c80 <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), ffc11ac4: 3f 60 00 00 lis r27,0 ffc11ac8: 88 7b 21 bd lbz r3,8637(r27) if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( ffc11acc: 38 80 00 00 li r4,0 ffc11ad0: 38 a0 00 00 li r5,0 ffc11ad4: 64 63 50 49 oris r3,r3,20553 ffc11ad8: 60 63 72 00 ori r3,r3,29184 ffc11adc: 38 dd 00 2c addi r6,r29,44 ffc11ae0: 48 00 1e 69 bl ffc13948 ffc11ae4: 2f 83 00 00 cmpwi cr7,r3,0 ffc11ae8: 40 9e 01 90 bne- cr7,ffc11c78 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), ffc11aec: 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( ffc11af0: 38 80 00 00 li r4,0 ffc11af4: 38 a0 00 00 li r5,0 ffc11af8: 64 63 50 49 oris r3,r3,20553 ffc11afc: 60 63 77 00 ori r3,r3,30464 ffc11b00: 38 dd 00 30 addi r6,r29,48 ffc11b04: 48 00 1e 45 bl ffc13948 ffc11b08: 2f 83 00 00 cmpwi cr7,r3,0 ffc11b0c: 40 9e 01 64 bne- cr7,ffc11c70 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, ffc11b10: 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( ffc11b14: 38 80 00 01 li r4,1 ffc11b18: 38 a0 00 10 li r5,16 ffc11b1c: 64 63 50 49 oris r3,r3,20553 ffc11b20: 60 63 73 00 ori r3,r3,29440 ffc11b24: 38 c0 00 00 li r6,0 ffc11b28: 38 fd 00 28 addi r7,r29,40 ffc11b2c: 4b ff 9b 2d bl ffc0b658 ffc11b30: 2f 83 00 00 cmpwi cr7,r3,0 ffc11b34: 40 9e 01 34 bne- cr7,ffc11c68 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) ffc11b38: 3f 40 00 00 lis r26,0 ffc11b3c: 80 9d 00 2c lwz r4,44(r29) ffc11b40: 3b 5a 35 5c addi r26,r26,13660 ffc11b44: 38 a1 00 08 addi r5,r1,8 ffc11b48: 7f 43 d3 78 mr r3,r26 ffc11b4c: 4b ff bd c9 bl ffc0d914 <_Objects_Get> static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; ffc11b50: 80 03 00 4c lwz r0,76(r3) ffc11b54: 64 00 10 00 oris r0,r0,4096 ffc11b58: 90 03 00 4c stw r0,76(r3) _Thread_Enable_dispatch(); ffc11b5c: 4b ff ce f1 bl ffc0ea4c <_Thread_Enable_dispatch> ffc11b60: 80 9d 00 30 lwz r4,48(r29) ffc11b64: 38 a1 00 08 addi r5,r1,8 ffc11b68: 7f 43 d3 78 mr r3,r26 ffc11b6c: 4b ff bd a9 bl ffc0d914 <_Objects_Get> _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; ffc11b70: 80 03 00 4c lwz r0,76(r3) ffc11b74: 64 00 10 00 oris r0,r0,4096 ffc11b78: 90 03 00 4c stw r0,76(r3) _Thread_Enable_dispatch(); ffc11b7c: 4b ff ce d1 bl ffc0ea4c <_Thread_Enable_dispatch> #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') ffc11b80: 89 3b 21 bd lbz r9,8637(r27) ffc11b84: 2f 89 00 7a cmpwi cr7,r9,122 ffc11b88: 39 29 00 01 addi r9,r9,1 ffc11b8c: 99 3b 21 bd stb r9,8637(r27) ffc11b90: 40 9e fc cc bne+ cr7,ffc1185c c = 'a'; ffc11b94: 38 00 00 61 li r0,97 ffc11b98: 98 1b 21 bd stb r0,8637(r27) ffc11b9c: 4b ff fc c0 b ffc1185c if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) ffc11ba0: 2f 9b 00 00 cmpwi cr7,r27,0 ffc11ba4: 40 9e 00 80 bne- cr7,ffc11c24 <== NEVER TAKEN pipe_free(pipe); else *pipep = pipe; ffc11ba8: 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); ffc11bac: 80 7f 29 f8 lwz r3,10744(r31) ffc11bb0: 4b ff 9f 0d bl ffc0babc ffc11bb4: 4b ff fc e4 b ffc11898 if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( ffc11bb8: 3c 60 50 49 lis r3,20553 ffc11bbc: 7f 67 db 78 mr r7,r27 ffc11bc0: 38 80 00 01 li r4,1 ffc11bc4: 38 a0 00 54 li r5,84 ffc11bc8: 38 c0 00 00 li r6,0 ffc11bcc: 60 63 50 45 ori r3,r3,20549 ffc11bd0: 4b ff 9a 89 bl ffc0b658 ffc11bd4: 7c 7b 1b 78 mr r27,r3 ffc11bd8: 80 7d 27 f4 lwz r3,10228(r29) ffc11bdc: 4b ff 9e e1 bl ffc0babc } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { ffc11be0: 2f 9b 00 00 cmpwi cr7,r27,0 ffc11be4: 3b 60 ff f4 li r27,-12 ffc11be8: 40 9e fc e0 bne+ cr7,ffc118c8 ffc11bec: 80 1f 29 f8 lwz r0,10744(r31) ffc11bf0: 4b ff fc 44 b ffc11834 switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); ffc11bf4: 80 7f 00 30 lwz r3,48(r31) ffc11bf8: 38 81 00 0c addi r4,r1,12 ffc11bfc: 48 00 1f 2d bl ffc13b28 ffc11c00: 4b ff fd d8 b ffc119d8 break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); ffc11c04: 80 7f 00 30 lwz r3,48(r31) ffc11c08: 38 81 00 0c addi r4,r1,12 ffc11c0c: 48 00 1f 1d bl ffc13b28 ffc11c10: 4b ff fe 4c b ffc11a5c case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); ffc11c14: 80 7f 00 2c lwz r3,44(r31) ffc11c18: 38 81 00 0c addi r4,r1,12 ffc11c1c: 48 00 1f 0d bl ffc13b28 ffc11c20: 4b ff fd 24 b ffc11944 /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); ffc11c24: 80 7d 00 2c lwz r3,44(r29) <== NOT EXECUTED ffc11c28: 48 00 1e 35 bl ffc13a5c <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); ffc11c2c: 80 7d 00 30 lwz r3,48(r29) <== NOT EXECUTED ffc11c30: 48 00 1e 2d bl ffc13a5c <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); ffc11c34: 80 7d 00 28 lwz r3,40(r29) <== NOT EXECUTED ffc11c38: 4b ff 9c 1d bl ffc0b854 <== NOT EXECUTED free(pipe->Buffer); ffc11c3c: 80 7d 00 00 lwz r3,0(r29) <== NOT EXECUTED ffc11c40: 4b ff 54 41 bl ffc07080 <== NOT EXECUTED free(pipe); ffc11c44: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc11c48: 4b ff 54 39 bl ffc07080 <== NOT EXECUTED static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); ffc11c4c: 80 7f 29 f8 lwz r3,10744(r31) ffc11c50: 4b ff 9e 6d bl ffc0babc ffc11c54: 4b ff fc 74 b ffc118c8 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); ffc11c58: 80 7f 00 28 lwz r3,40(r31) err = -ENXIO; ffc11c5c: 3b 60 ff fa li r27,-6 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); ffc11c60: 4b ff 9e 5d bl ffc0babc err = -ENXIO; goto out_error; ffc11c64: 4b ff fd 44 b ffc119a8 if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); ffc11c68: 80 7d 00 30 lwz r3,48(r29) ffc11c6c: 48 00 1d f1 bl ffc13a5c err_wbar: rtems_barrier_delete(pipe->readBarrier); ffc11c70: 80 7d 00 2c lwz r3,44(r29) ffc11c74: 48 00 1d e9 bl ffc13a5c err_rbar: free(pipe->Buffer); ffc11c78: 80 7d 00 00 lwz r3,0(r29) ffc11c7c: 4b ff 54 05 bl ffc07080 err_buf: free(pipe); ffc11c80: 7f a3 eb 78 mr r3,r29 ffc11c84: 4b ff 53 fd bl ffc07080 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { ffc11c88: 3b 60 ff f4 li r27,-12 ffc11c8c: 4b ff ff c0 b ffc11c4c =============================================================================== 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 27 1c lwz r0,10012(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 cc lwz r0,10188(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 f0 19 bl ffc14b6c <__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 c5 b8 addi r11,r11,-14920 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 ef 7d bl ffc14b6c <__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 2b 60 addi r9,r9,11104 #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 48 lwz r0,10312(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 ac lwz r9,10156(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 27 2c lwz r3,10028(r30) ffc05204: 7f e4 fb 78 mr r4,r31 ffc05208: 48 00 65 f5 bl ffc0b7fc <_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 27 2c lwz r9,10028(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 0b b8 addi r3,r3,3000 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 2b 70 addi r0,r9,11120 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 e8 lwz r0,10472(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 e8 addi r9,r9,10472 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 =============================================================================== ffc20064 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc20064: 94 21 ff c8 stwu r1,-56(r1) ffc20068: 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 ); ffc2006c: 3d 20 00 00 lis r9,0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc20070: 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 ); ffc20074: 80 09 27 1c lwz r0,10012(r9) int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc20078: 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 ); ffc2007c: 3b a0 00 00 li r29,0 ffc20080: 7f 83 00 40 cmplw cr7,r3,r0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc20084: 93 c1 00 30 stw r30,48(r1) ffc20088: 7c 9e 23 78 mr r30,r4 ffc2008c: 93 e1 00 34 stw r31,52(r1) ffc20090: 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 ); ffc20094: 40 9c 00 14 bge- cr7,ffc200a8 <== NEVER TAKEN ffc20098: 3d 20 00 00 lis r9,0 ffc2009c: 83 a9 27 cc lwz r29,10188(r9) ffc200a0: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc200a4: 7f bd 1a 14 add r29,r29,r3 /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc200a8: 81 3d 00 28 lwz r9,40(r29) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc200ac: 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; ffc200b0: 80 1d 00 2c lwz r0,44(r29) ffc200b4: 81 1d 00 1c lwz r8,28(r29) ffc200b8: 81 5d 00 20 lwz r10,32(r29) ffc200bc: 81 7d 00 24 lwz r11,36(r29) ffc200c0: 90 01 00 18 stw r0,24(r1) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc200c4: 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; ffc200c8: 91 01 00 08 stw r8,8(r1) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc200cc: 7c 09 03 a6 mtctr r0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc200d0: 91 41 00 0c stw r10,12(r1) ffc200d4: 91 61 00 10 stw r11,16(r1) ffc200d8: 91 21 00 14 stw r9,20(r1) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc200dc: 4e 80 04 21 bctrl ffc200e0: 2f 83 00 01 cmpwi cr7,r3,1 ffc200e4: 40 9e 00 3c bne- cr7,ffc20120 /* * 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 ); ffc200e8: 81 3d 00 24 lwz r9,36(r29) ffc200ec: 7f a3 eb 78 mr r3,r29 ffc200f0: 7f c4 f3 78 mr r4,r30 ffc200f4: 80 09 00 08 lwz r0,8(r9) ffc200f8: 7f e5 fb 78 mr r5,r31 ffc200fc: 7c 09 03 a6 mtctr r0 ffc20100: 4e 80 04 21 bctrl } ffc20104: 80 01 00 3c lwz r0,60(r1) ffc20108: 83 a1 00 2c lwz r29,44(r1) ffc2010c: 7c 08 03 a6 mtlr r0 ffc20110: 83 c1 00 30 lwz r30,48(r1) ffc20114: 83 e1 00 34 lwz r31,52(r1) ffc20118: 38 21 00 38 addi r1,r1,56 ffc2011c: 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 ); ffc20120: 4b ff 49 c1 bl ffc14ae0 <__errno> ffc20124: 38 00 00 14 li r0,20 ffc20128: 90 03 00 00 stw r0,0(r3) ffc2012c: 38 60 ff ff li r3,-1 ffc20130: 4b ff ff d4 b ffc20104 =============================================================================== ffc12bcc : 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 ) ffc12bcc: 81 23 00 1c lwz r9,28(r3) return -1; /* It wasn't a directory --> return error */ ffc12bd0: 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 ) ffc12bd4: 81 29 00 4c lwz r9,76(r9) ffc12bd8: 2f 89 00 01 cmpwi cr7,r9,1 ffc12bdc: 40 9e 00 18 bne- cr7,ffc12bf4 <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; ffc12be0: 39 40 00 00 li r10,0 ffc12be4: 39 60 00 00 li r11,0 ffc12be8: 91 43 00 10 stw r10,16(r3) return 0; ffc12bec: 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; ffc12bf0: 91 63 00 14 stw r11,20(r3) return 0; } ffc12bf4: 7c 03 03 78 mr r3,r0 ffc12bf8: 4e 80 00 20 blr =============================================================================== ffc12bfc : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc12bfc: 94 21 fe b0 stwu r1,-336(r1) ffc12c00: 7c 08 02 a6 mflr r0 ffc12c04: 90 01 01 54 stw r0,340(r1) ffc12c08: 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; ffc12c0c: 83 83 00 1c lwz r28,28(r3) ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc12c10: 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; ffc12c14: 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 ); ffc12c18: 3b 9c 00 54 addi r28,r28,84 ffc12c1c: 93 01 01 30 stw r24,304(r1) ffc12c20: 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 ) ) ffc12c24: 7f 9e e0 00 cmpw cr7,r30,r28 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc12c28: 93 21 01 34 stw r25,308(r1) ffc12c2c: 7c 79 1b 78 mr r25,r3 ffc12c30: 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; ffc12c34: 3b 40 00 00 li r26,0 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc12c38: 92 c1 01 28 stw r22,296(r1) ffc12c3c: 92 e1 01 2c stw r23,300(r1) ffc12c40: 93 61 01 3c stw r27,316(r1) ffc12c44: 93 a1 01 44 stw r29,324(r1) ffc12c48: 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 ) ) ffc12c4c: 41 9e 00 c8 beq- cr7,ffc12d14 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); ffc12c50: 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; ffc12c54: 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); ffc12c58: 54 a5 e8 fe rlwinm r5,r5,29,3,31 ffc12c5c: 63 7b ea 0f ori r27,r27,59919 ffc12c60: 7f 65 d8 16 mulhwu r27,r5,r27 ffc12c64: 57 7b f8 7e rlwinm r27,r27,31,1,31 ffc12c68: 1f 7b 01 18 mulli r27,r27,280 /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc12c6c: 7f 7b ea 15 add. r27,r27,r29 ffc12c70: 40 81 00 a4 ble- ffc12d14 <== 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 ) ){ ffc12c74: 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 ); ffc12c78: 3a e0 01 18 li r23,280 ffc12c7c: 48 00 00 1c b ffc12c98 * 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( ffc12c80: 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; ffc12c84: 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 ( ffc12c88: 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 ) ){ ffc12c8c: 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 ( ffc12c90: 40 9d 00 84 ble- cr7,ffc12d14 <== 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 ) ){ ffc12c94: 41 9a 00 80 beq- cr6,ffc12d14 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { ffc12c98: 7f 9d f8 00 cmpw cr7,r29,r31 ffc12c9c: 41 9d ff e4 bgt+ cr7,ffc12c80 /* 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; ffc12ca0: 80 1e 00 38 lwz r0,56(r30) tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc12ca4: 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; ffc12ca8: 7f e9 fe 70 srawi r9,r31,31 ffc12cac: 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 ); ffc12cb0: 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; ffc12cb4: 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( ffc12cb8: 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; ffc12cbc: 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 ); ffc12cc0: 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 ); ffc12cc4: 48 00 29 f5 bl ffc156b8 strcpy( tmp_dirent.d_name, the_jnode->name ); ffc12cc8: 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 ); ffc12ccc: b0 61 00 1a sth r3,26(r1) strcpy( tmp_dirent.d_name, the_jnode->name ); ffc12cd0: 38 61 00 1c addi r3,r1,28 ffc12cd4: 48 00 24 d1 bl ffc151a4 memcpy( ffc12cd8: 7c 78 d2 14 add r3,r24,r26 ffc12cdc: 38 81 00 08 addi r4,r1,8 ffc12ce0: 38 a0 01 18 li r5,280 ffc12ce4: 48 00 1d e5 bl ffc14ac8 /* 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 ( ffc12ce8: 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); ffc12cec: 81 59 00 10 lwz r10,16(r25) bytes_transferred = bytes_transferred + sizeof( struct dirent ); ffc12cf0: 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); ffc12cf4: 81 79 00 14 lwz r11,20(r25) bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; ffc12cf8: 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); ffc12cfc: 31 6b 01 18 addic r11,r11,280 ffc12d00: 7d 4a 01 94 addze r10,r10 ffc12d04: 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 ) ){ ffc12d08: 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); ffc12d0c: 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 ( ffc12d10: 41 9d ff 84 bgt+ cr7,ffc12c94 <== NEVER TAKEN the_node = the_node->next; } /* Success */ return bytes_transferred; } ffc12d14: 80 01 01 54 lwz r0,340(r1) ffc12d18: 7f 43 d3 78 mr r3,r26 ffc12d1c: 82 c1 01 28 lwz r22,296(r1) ffc12d20: 7c 08 03 a6 mtlr r0 ffc12d24: 82 e1 01 2c lwz r23,300(r1) ffc12d28: 83 01 01 30 lwz r24,304(r1) ffc12d2c: 83 21 01 34 lwz r25,308(r1) ffc12d30: 83 41 01 38 lwz r26,312(r1) ffc12d34: 83 61 01 3c lwz r27,316(r1) ffc12d38: 83 81 01 40 lwz r28,320(r1) ffc12d3c: 83 a1 01 44 lwz r29,324(r1) ffc12d40: 83 c1 01 48 lwz r30,328(r1) ffc12d44: 83 e1 01 4c lwz r31,332(r1) ffc12d48: 38 21 01 50 addi r1,r1,336 ffc12d4c: 4e 80 00 20 blr =============================================================================== ffc12ebc : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { ffc12ebc: 94 21 ff f0 stwu r1,-16(r1) ffc12ec0: 7c 08 02 a6 mflr r0 ffc12ec4: 93 e1 00 0c stw r31,12(r1) ffc12ec8: 90 01 00 14 stw r0,20(r1) IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; ffc12ecc: 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 ) ) ffc12ed0: 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 ); ffc12ed4: 38 1f 00 54 addi r0,r31,84 ffc12ed8: 7f 89 00 00 cmpw cr7,r9,r0 ffc12edc: 40 9e 00 6c bne- cr7,ffc12f48 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; ffc12ee0: 81 24 00 10 lwz r9,16(r4) /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) ffc12ee4: 80 09 00 1c lwz r0,28(r9) ffc12ee8: 7f 9f 00 00 cmpw cr7,r31,r0 ffc12eec: 41 9e 00 38 beq- cr7,ffc12f24 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) ffc12ef0: 80 1f 00 5c lwz r0,92(r31) ffc12ef4: 2f 80 00 00 cmpwi cr7,r0,0 ffc12ef8: 40 9e 00 2c bne- cr7,ffc12f24 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); ffc12efc: 7f e3 fb 78 mr r3,r31 ffc12f00: 4b ff c1 3d bl ffc0f03c IMFS_check_node_remove( the_jnode ); ffc12f04: 7f e3 fb 78 mr r3,r31 ffc12f08: 4b ff c1 95 bl ffc0f09c return 0; ffc12f0c: 38 60 00 00 li r3,0 } ffc12f10: 80 01 00 14 lwz r0,20(r1) ffc12f14: 83 e1 00 0c lwz r31,12(r1) ffc12f18: 38 21 00 10 addi r1,r1,16 ffc12f1c: 7c 08 03 a6 mtlr r0 ffc12f20: 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 ); ffc12f24: 48 00 0e 69 bl ffc13d8c <__errno> ffc12f28: 38 00 00 10 li r0,16 ffc12f2c: 90 03 00 00 stw r0,0(r3) ffc12f30: 38 60 ff ff li r3,-1 IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } ffc12f34: 80 01 00 14 lwz r0,20(r1) ffc12f38: 83 e1 00 0c lwz r31,12(r1) ffc12f3c: 38 21 00 10 addi r1,r1,16 ffc12f40: 7c 08 03 a6 mtlr r0 ffc12f44: 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 ); ffc12f48: 48 00 0e 45 bl ffc13d8c <__errno> ffc12f4c: 38 00 00 5a li r0,90 ffc12f50: 90 03 00 00 stw r0,0(r3) ffc12f54: 38 60 ff ff li r3,-1 ffc12f58: 4b ff ff b8 b ffc12f10 =============================================================================== 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 d0 lbz r0,10448(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 d0 stb r0,10448(r9) mkdir("/etc", 0777); ffc05a74: 38 63 c5 b4 addi r3,r3,-14924 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc05a78: 3b de c5 bc addi r30,r30,-14916 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 c5 c8 addi r31,r31,-14904 ffc05a84: 7f c3 f3 78 mr r3,r30 ffc05a88: 7f e4 fb 78 mr r4,r31 ffc05a8c: 48 00 fb 8d bl ffc15618 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 f1 d9 bl ffc14c70 } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { ffc05a9c: 3f c0 ff c2 lis r30,-62 ffc05aa0: 3b de c6 38 addi r30,r30,-14792 ffc05aa4: 7f c3 f3 78 mr r3,r30 ffc05aa8: 7f e4 fb 78 mr r4,r31 ffc05aac: 48 00 fb 6d bl ffc15618 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 f1 b9 bl ffc14c70 } } 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 c5 cc addi r4,r4,-14900 ffc05ae0: 48 00 fb 39 bl ffc15618 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 c6 44 addi r3,r3,-14780 ffc05b00: 48 01 03 d5 bl ffc15ed4 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); ffc05b04: 7f e3 fb 78 mr r3,r31 ffc05b08: 48 00 f1 69 bl ffc14c70 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 c5 cc addi r4,r4,-14900 ffc05b1c: 48 00 fa fd bl ffc15618 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 c5 d0 addi r3,r3,-14896 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 01 03 99 bl ffc15ed4 "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 84 lwz r11,10116(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 =============================================================================== ffc1ef60 : int killinfo( pid_t pid, int sig, const union sigval *value ) { ffc1ef60: 94 21 ff d0 stwu r1,-48(r1) ffc1ef64: 7c 08 02 a6 mflr r0 ffc1ef68: 93 61 00 1c stw r27,28(r1) ffc1ef6c: 7c bb 2b 78 mr r27,r5 ffc1ef70: 93 81 00 20 stw r28,32(r1) ffc1ef74: 7c 9c 23 78 mr r28,r4 ffc1ef78: 93 e1 00 2c stw r31,44(r1) ffc1ef7c: 7c 7f 1b 78 mr r31,r3 ffc1ef80: 90 01 00 34 stw r0,52(r1) ffc1ef84: 93 41 00 18 stw r26,24(r1) ffc1ef88: 93 a1 00 24 stw r29,36(r1) ffc1ef8c: 93 c1 00 28 stw r30,40(r1) POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) ffc1ef90: 4b ff fa 2d bl ffc1e9bc ffc1ef94: 7f 83 f8 00 cmpw cr7,r3,r31 ffc1ef98: 40 9e 02 98 bne- cr7,ffc1f230 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) ffc1ef9c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc1efa0: 41 9e 02 a4 beq- cr7,ffc1f244 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); ffc1efa4: 3b fc ff ff addi r31,r28,-1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) ffc1efa8: 2b 9f 00 1f cmplwi cr7,r31,31 ffc1efac: 41 9d 02 98 bgt- cr7,ffc1f244 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) ffc1efb0: 1f dc 00 0c mulli r30,r28,12 ffc1efb4: 3f a0 00 00 lis r29,0 ffc1efb8: 3b bd 31 c0 addi r29,r29,12736 ffc1efbc: 7d 3d f2 14 add r9,r29,r30 ffc1efc0: 80 09 00 08 lwz r0,8(r9) return 0; ffc1efc4: 38 60 00 00 li r3,0 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) ffc1efc8: 2f 80 00 01 cmpwi cr7,r0,1 ffc1efcc: 41 9e 01 a8 beq- cr7,ffc1f174 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) ffc1efd0: 2f 9c 00 08 cmpwi cr7,r28,8 ffc1efd4: 41 9e 01 c8 beq- cr7,ffc1f19c ffc1efd8: 2f 9c 00 04 cmpwi cr7,r28,4 ffc1efdc: 41 9e 01 c0 beq- cr7,ffc1f19c ffc1efe0: 2f 9c 00 0b cmpwi cr7,r28,11 ffc1efe4: 41 9e 01 b8 beq- cr7,ffc1f19c * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { ffc1efe8: 2f 9b 00 00 cmpwi cr7,r27,0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; ffc1efec: 93 81 00 08 stw r28,8(r1) static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); ffc1eff0: 38 00 00 01 li r0,1 ffc1eff4: 7c 1f f8 30 slw r31,r0,r31 siginfo->si_code = SI_USER; ffc1eff8: 90 01 00 0c stw r0,12(r1) if ( !value ) { ffc1effc: 41 9e 02 18 beq- cr7,ffc1f214 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; ffc1f000: 80 1b 00 00 lwz r0,0(r27) ffc1f004: 90 01 00 10 stw r0,16(r1) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc1f008: 3d 20 00 00 lis r9,0 ffc1f00c: 81 69 28 0c lwz r11,10252(r9) ffc1f010: 38 0b 00 01 addi r0,r11,1 ffc1f014: 90 09 28 0c stw r0,10252(r9) return _Thread_Dispatch_disable_level; ffc1f018: 80 09 28 0c lwz r0,10252(r9) /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; ffc1f01c: 3d 20 00 00 lis r9,0 ffc1f020: 80 69 31 50 lwz r3,12624(r9) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { ffc1f024: 81 23 01 34 lwz r9,308(r3) ffc1f028: 80 09 00 d0 lwz r0,208(r9) ffc1f02c: 7f e6 00 79 andc. r6,r31,r0 ffc1f030: 40 82 01 14 bne- ffc1f144 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc1f034: 3d 20 00 00 lis r9,0 ffc1f038: 39 69 33 4c addi r11,r9,13132 ffc1f03c: 80 69 33 4c lwz r3,13132(r9) /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); ffc1f040: 39 6b 00 04 addi r11,r11,4 ffc1f044: 7f 83 58 00 cmpw cr7,r3,r11 ffc1f048: 41 9e 00 4c beq- cr7,ffc1f094 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc1f04c: 80 03 00 30 lwz r0,48(r3) for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc1f050: 81 23 01 34 lwz r9,308(r3) #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc1f054: 7f ea 00 39 and. r10,r31,r0 ffc1f058: 40 82 00 ec bne- ffc1f144 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) ffc1f05c: 80 09 00 d0 lwz r0,208(r9) ffc1f060: 7f fa 00 79 andc. r26,r31,r0 ffc1f064: 41 a2 00 24 beq+ ffc1f088 ffc1f068: 48 00 00 dc b ffc1f144 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc1f06c: 80 03 00 30 lwz r0,48(r3) <== NOT EXECUTED for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc1f070: 81 23 01 34 lwz r9,308(r3) <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc1f074: 7f fb 00 39 and. r27,r31,r0 <== NOT EXECUTED ffc1f078: 40 82 00 cc bne- ffc1f144 <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) ffc1f07c: 80 09 00 d0 lwz r0,208(r9) <== NOT EXECUTED ffc1f080: 7f e6 00 79 andc. r6,r31,r0 <== NOT EXECUTED ffc1f084: 40 82 00 c0 bne- ffc1f144 <== NOT EXECUTED the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { ffc1f088: 80 63 00 00 lwz r3,0(r3) /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); ffc1f08c: 7f 83 58 00 cmpw cr7,r3,r11 ffc1f090: 40 9e ff dc bne+ cr7,ffc1f06c <== NEVER TAKEN * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; ffc1f094: 3d 20 00 00 lis r9,0 ffc1f098: 88 e9 27 24 lbz r7,10020(r9) ffc1f09c: 3c a0 00 00 lis r5,0 ffc1f0a0: 38 a5 2c 64 addi r5,r5,11364 ffc1f0a4: 38 e7 00 01 addi r7,r7,1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( ffc1f0a8: 38 85 00 08 addi r4,r5,8 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; ffc1f0ac: 38 60 00 00 li r3,0 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) ffc1f0b0: 85 25 00 04 lwzu r9,4(r5) ffc1f0b4: 2f 89 00 00 cmpwi cr7,r9,0 ffc1f0b8: 41 9e 00 7c beq- cr7,ffc1f134 <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; ffc1f0bc: 81 29 00 04 lwz r9,4(r9) */ if ( !the_info ) continue; #endif maximum = the_info->maximum; ffc1f0c0: a1 09 00 10 lhz r8,16(r9) object_table = the_info->local_table; ffc1f0c4: 81 49 00 1c lwz r10,28(r9) for ( index = 1 ; index <= maximum ; index++ ) { ffc1f0c8: 2f 88 00 00 cmpwi cr7,r8,0 ffc1f0cc: 41 9e 00 68 beq- cr7,ffc1f134 ffc1f0d0: 39 60 00 01 li r11,1 the_thread = (Thread_Control *) object_table[ index ]; ffc1f0d4: 85 2a 00 04 lwzu r9,4(r10) if ( !the_thread ) ffc1f0d8: 2f 89 00 00 cmpwi cr7,r9,0 ffc1f0dc: 41 9e 00 4c beq- cr7,ffc1f128 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) ffc1f0e0: 80 09 00 14 lwz r0,20(r9) ffc1f0e4: 7f 80 38 40 cmplw cr7,r0,r7 ffc1f0e8: 41 9d 00 40 bgt- cr7,ffc1f128 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) ffc1f0ec: 80 c9 01 34 lwz r6,308(r9) ffc1f0f0: 80 c6 00 d0 lwz r6,208(r6) ffc1f0f4: 7f fa 30 79 andc. r26,r31,r6 ffc1f0f8: 41 82 00 30 beq- ffc1f128 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { ffc1f0fc: 41 9c 00 24 blt- cr7,ffc1f120 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { ffc1f100: 2f 83 00 00 cmpwi cr7,r3,0 ffc1f104: 41 9e 00 24 beq- cr7,ffc1f128 <== NEVER TAKEN ffc1f108: 80 c3 00 10 lwz r6,16(r3) ffc1f10c: 2f 86 00 00 cmpwi cr7,r6,0 ffc1f110: 41 9e 00 18 beq- cr7,ffc1f128 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { ffc1f114: 83 69 00 10 lwz r27,16(r9) ffc1f118: 2f 9b 00 00 cmpwi cr7,r27,0 ffc1f11c: 40 9e 01 00 bne- cr7,ffc1f21c ffc1f120: 7c 07 03 78 mr r7,r0 ffc1f124: 7d 23 4b 78 mr r3,r9 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { ffc1f128: 39 6b 00 01 addi r11,r11,1 ffc1f12c: 7f 88 58 40 cmplw cr7,r8,r11 ffc1f130: 40 9c ff a4 bge+ cr7,ffc1f0d4 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { ffc1f134: 7f 85 20 00 cmpw cr7,r5,r4 ffc1f138: 40 be ff 78 bne- cr7,ffc1f0b0 } } } } if ( interested ) { ffc1f13c: 2f 83 00 00 cmpwi cr7,r3,0 ffc1f140: 41 9e 00 18 beq- cr7,ffc1f158 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { ffc1f144: 7f 84 e3 78 mr r4,r28 ffc1f148: 38 a1 00 08 addi r5,r1,8 ffc1f14c: 48 00 01 4d bl ffc1f298 <_POSIX_signals_Unblock_thread> ffc1f150: 2f 83 00 00 cmpwi cr7,r3,0 ffc1f154: 40 9e 00 18 bne- cr7,ffc1f16c /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); ffc1f158: 7f e3 fb 78 mr r3,r31 ffc1f15c: 48 00 01 15 bl ffc1f270 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { ffc1f160: 7c 1d f0 2e lwzx r0,r29,r30 ffc1f164: 2f 80 00 02 cmpwi cr7,r0,2 ffc1f168: 41 9e 00 68 beq- cr7,ffc1f1d0 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); ffc1f16c: 4b fe d3 7d bl ffc0c4e8 <_Thread_Enable_dispatch> return 0; ffc1f170: 38 60 00 00 li r3,0 } ffc1f174: 80 01 00 34 lwz r0,52(r1) ffc1f178: 83 41 00 18 lwz r26,24(r1) ffc1f17c: 7c 08 03 a6 mtlr r0 ffc1f180: 83 61 00 1c lwz r27,28(r1) ffc1f184: 83 81 00 20 lwz r28,32(r1) ffc1f188: 83 a1 00 24 lwz r29,36(r1) ffc1f18c: 83 c1 00 28 lwz r30,40(r1) ffc1f190: 83 e1 00 2c lwz r31,44(r1) ffc1f194: 38 21 00 30 addi r1,r1,48 ffc1f198: 4e 80 00 20 blr * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); ffc1f19c: 48 00 03 69 bl ffc1f504 ffc1f1a0: 7f 84 e3 78 mr r4,r28 ffc1f1a4: 48 00 02 61 bl ffc1f404 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } ffc1f1a8: 80 01 00 34 lwz r0,52(r1) ffc1f1ac: 83 41 00 18 lwz r26,24(r1) ffc1f1b0: 7c 08 03 a6 mtlr r0 ffc1f1b4: 83 61 00 1c lwz r27,28(r1) ffc1f1b8: 83 81 00 20 lwz r28,32(r1) ffc1f1bc: 83 a1 00 24 lwz r29,36(r1) ffc1f1c0: 83 c1 00 28 lwz r30,40(r1) ffc1f1c4: 83 e1 00 2c lwz r31,44(r1) ffc1f1c8: 38 21 00 30 addi r1,r1,48 ffc1f1cc: 4e 80 00 20 blr */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) ffc1f1d0: 3c 60 00 00 lis r3,0 ffc1f1d4: 38 63 33 40 addi r3,r3,13120 ffc1f1d8: 4b fe b0 6d bl ffc0a244 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { ffc1f1dc: 7c 69 1b 79 mr. r9,r3 ffc1f1e0: 41 82 00 78 beq- ffc1f258 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc1f1e4: 80 01 00 08 lwz r0,8(r1) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc1f1e8: 3c 60 00 00 lis r3,0 ffc1f1ec: 38 63 33 b4 addi r3,r3,13236 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc1f1f0: 90 09 00 08 stw r0,8(r9) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc1f1f4: 7c 63 f2 14 add r3,r3,r30 ffc1f1f8: 7d 24 4b 78 mr r4,r9 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc1f1fc: 80 01 00 0c lwz r0,12(r1) ffc1f200: 90 09 00 0c stw r0,12(r9) ffc1f204: 80 01 00 10 lwz r0,16(r1) ffc1f208: 90 09 00 10 stw r0,16(r9) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc1f20c: 4b fe af e1 bl ffc0a1ec <_Chain_Append> ffc1f210: 4b ff ff 5c b ffc1f16c */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; ffc1f214: 93 61 00 10 stw r27,16(r1) ffc1f218: 4b ff fd f0 b ffc1f008 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { ffc1f21c: 74 da 10 00 andis. r26,r6,4096 ffc1f220: 40 a2 ff 08 bne- ffc1f128 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { ffc1f224: 77 66 10 00 andis. r6,r27,4096 ffc1f228: 41 a2 ff 00 beq- ffc1f128 ffc1f22c: 4b ff fe f4 b ffc1f120 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); ffc1f230: 4b ff 4b 5d bl ffc13d8c <__errno> ffc1f234: 38 00 00 03 li r0,3 ffc1f238: 90 03 00 00 stw r0,0(r3) ffc1f23c: 38 60 ff ff li r3,-1 ffc1f240: 4b ff ff 34 b ffc1f174 */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc1f244: 4b ff 4b 49 bl ffc13d8c <__errno> ffc1f248: 38 00 00 16 li r0,22 ffc1f24c: 90 03 00 00 stw r0,0(r3) ffc1f250: 38 60 ff ff li r3,-1 ffc1f254: 4b ff ff 20 b ffc1f174 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); ffc1f258: 4b fe d2 91 bl ffc0c4e8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); ffc1f25c: 4b ff 4b 31 bl ffc13d8c <__errno> ffc1f260: 38 00 00 0b li r0,11 ffc1f264: 90 03 00 00 stw r0,0(r3) ffc1f268: 38 60 ff ff li r3,-1 ffc1f26c: 4b ff ff 08 b ffc1f174 =============================================================================== 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 48 lwz r0,10312(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 8c lwz r0,10124(r31) ffc05cb8: 83 c9 27 88 lwz r30,10120(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 f1 d9 bl ffc14ea0 <_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 8c stw r30,10124(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 e2 45 bl ffc13f18 fclose (stdout); ffc05cd8: 81 3f 27 8c lwz r9,10124(r31) ffc05cdc: 80 69 00 08 lwz r3,8(r9) ffc05ce0: 48 00 e2 39 bl ffc13f18 fclose (stderr); ffc05ce4: 81 3f 27 8c lwz r9,10124(r31) ffc05ce8: 80 69 00 0c lwz r3,12(r9) ffc05cec: 48 00 e2 2d bl ffc13f18 } 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 2b 60 addi r9,r9,11104 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 48 lwz r0,10312(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 27 2c lwz r3,10028(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 61 79 bl ffc0b790 <_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 a4 lwz r0,10148(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 ac lwz r9,10156(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 27 2c lwz r3,10028(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 f1 bl ffc0b790 <_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 a8 lwz r9,10152(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 e6 b1 bl ffc13d8c <__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 e0 lwz r9,10208(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 27 0c lwz r3,9996(r28) ffc05368: 7f e5 fb 78 mr r5,r31 ffc0536c: 48 00 60 e1 bl ffc0b44c <_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 27 0c lwz r3,9996(r28) ffc05380: 80 09 2c 88 lwz r0,11400(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 88 stw r0,11400(r9) ffc05398: 48 00 60 49 bl ffc0b3e0 <_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 e9 11 bl ffc13cdc <__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 e0 stw r4,10208(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 61 bl ffc09990 =============================================================================== ffc11ef4 : */ void memfile_free_blocks_in_table( block_p **block_table, int entries ) { ffc11ef4: 94 21 ff e0 stwu r1,-32(r1) ffc11ef8: 7c 08 02 a6 mflr r0 ffc11efc: 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( ffc11f24: 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] ); ffc11f40: 4b ff ff 85 bl ffc11ec4 b[i] = 0; ffc11f44: 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 ffc11f50: 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 ); ffc11f54: 4b ff ff 71 bl ffc11ec4 *block_table = 0; ffc11f58: 38 00 00 00 li r0,0 ffc11f5c: 90 1b 00 00 stw r0,0(r27) } ffc11f60: 80 01 00 24 lwz r0,36(r1) ffc11f64: 83 61 00 0c lwz r27,12(r1) ffc11f68: 7c 08 03 a6 mtlr r0 ffc11f6c: 83 81 00 10 lwz r28,16(r1) ffc11f70: 83 a1 00 14 lwz r29,20(r1) ffc11f74: 83 c1 00 18 lwz r30,24(r1) ffc11f78: 83 e1 00 1c lwz r31,28(r1) ffc11f7c: 38 21 00 20 addi r1,r1,32 ffc11f80: 4e 80 00 20 blr =============================================================================== ffc126fc : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { ffc126fc: 94 21 ff e0 stwu r1,-32(r1) ffc12700: 7c 08 02 a6 mflr r0 ffc12704: 7c 69 1b 78 mr r9,r3 ffc12708: 90 01 00 24 stw r0,36(r1) ffc1270c: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc12710: 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 ) ffc12714: 80 1f 00 50 lwz r0,80(r31) ffc12718: 7f 80 28 00 cmpw cr7,r0,r5 ffc1271c: 41 9c 00 50 blt- cr7,ffc1276c <== NEVER TAKEN ffc12720: 41 9e 00 40 beq- cr7,ffc12760 /* * 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; ffc12724: 90 bf 00 50 stw r5,80(r31) iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); ffc12728: 38 61 00 08 addi r3,r1,8 ffc1272c: 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; ffc12730: 90 df 00 54 stw r6,84(r31) iop->size = the_jnode->info.file.size; ffc12734: 90 a9 00 08 stw r5,8(r9) ffc12738: 90 c9 00 0c stw r6,12(r9) IMFS_update_atime( the_jnode ); ffc1273c: 4b ff 2b 29 bl ffc05264 ffc12740: 80 01 00 08 lwz r0,8(r1) return 0; ffc12744: 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 ); ffc12748: 90 1f 00 40 stw r0,64(r31) return 0; } ffc1274c: 80 01 00 24 lwz r0,36(r1) ffc12750: 83 e1 00 1c lwz r31,28(r1) ffc12754: 38 21 00 20 addi r1,r1,32 ffc12758: 7c 08 03 a6 mtlr r0 ffc1275c: 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 ) ffc12760: 80 1f 00 54 lwz r0,84(r31) ffc12764: 7f 80 30 40 cmplw cr7,r0,r6 ffc12768: 40 9c ff bc bge+ cr7,ffc12724 return IMFS_memfile_extend( the_jnode, length ); ffc1276c: 7f e3 fb 78 mr r3,r31 ffc12770: 4b ff f9 fd bl ffc1216c iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } ffc12774: 80 01 00 24 lwz r0,36(r1) ffc12778: 83 e1 00 1c lwz r31,28(r1) ffc1277c: 38 21 00 20 addi r1,r1,32 ffc12780: 7c 08 03 a6 mtlr r0 ffc12784: 4e 80 00 20 blr =============================================================================== ffc12788 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc12788: 94 21 ff f0 stwu r1,-16(r1) ffc1278c: 7c 08 02 a6 mflr r0 ffc12790: 90 01 00 14 stw r0,20(r1) ffc12794: 93 c1 00 08 stw r30,8(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc12798: 83 c3 00 1c lwz r30,28(r3) rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc1279c: 93 e1 00 0c stw r31,12(r1) ffc127a0: 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) { ffc127a4: 80 1e 00 4c lwz r0,76(r30) ffc127a8: 2f 80 00 06 cmpwi cr7,r0,6 ffc127ac: 41 9e 00 54 beq- cr7,ffc12800 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 )) ffc127b0: 80 a3 00 10 lwz r5,16(r3) ffc127b4: 80 c3 00 14 lwz r6,20(r3) ffc127b8: 7f c3 f3 78 mr r3,r30 ffc127bc: 4b ff f9 b1 bl ffc1216c ffc127c0: 2f 83 00 00 cmpwi cr7,r3,0 ffc127c4: 40 9e 00 90 bne- cr7,ffc12854 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; ffc127c8: 81 1e 00 50 lwz r8,80(r30) ffc127cc: 81 3e 00 54 lwz r9,84(r30) ffc127d0: 81 5f 00 10 lwz r10,16(r31) ffc127d4: 81 7f 00 14 lwz r11,20(r31) ffc127d8: 91 1f 00 08 stw r8,8(r31) ffc127dc: 91 3f 00 0c stw r9,12(r31) } return iop->offset; } ffc127e0: 80 01 00 14 lwz r0,20(r1) ffc127e4: 7d 43 53 78 mr r3,r10 ffc127e8: 7d 64 5b 78 mr r4,r11 ffc127ec: 83 c1 00 08 lwz r30,8(r1) ffc127f0: 7c 08 03 a6 mtlr r0 ffc127f4: 83 e1 00 0c lwz r31,12(r1) ffc127f8: 38 21 00 10 addi r1,r1,16 ffc127fc: 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) ffc12800: 81 43 00 10 lwz r10,16(r3) ffc12804: 80 1e 00 50 lwz r0,80(r30) ffc12808: 81 63 00 14 lwz r11,20(r3) ffc1280c: 7f 8a 00 00 cmpw cr7,r10,r0 ffc12810: 81 3e 00 54 lwz r9,84(r30) ffc12814: 41 9d 00 10 bgt- cr7,ffc12824 <== NEVER TAKEN ffc12818: 40 be ff c8 bne- cr7,ffc127e0 <== NEVER TAKEN ffc1281c: 7f 8b 48 40 cmplw cr7,r11,r9 ffc12820: 40 bd ff c0 ble- cr7,ffc127e0 <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; ffc12824: 7c 0a 03 78 mr r10,r0 <== NOT EXECUTED ffc12828: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED ffc1282c: 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; } ffc12830: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc12834: 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; ffc12838: 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; } ffc1283c: 7d 64 5b 78 mr r4,r11 <== NOT EXECUTED ffc12840: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc12844: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc12848: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc1284c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc12850: 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 ); ffc12854: 48 00 15 39 bl ffc13d8c <__errno> ffc12858: 38 00 00 1c li r0,28 ffc1285c: 90 03 00 00 stw r0,0(r3) ffc12860: 39 40 ff ff li r10,-1 ffc12864: 39 60 ff ff li r11,-1 ffc12868: 4b ff ff 78 b ffc127e0 =============================================================================== ffc1261c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc1261c: 94 21 ff f0 stwu r1,-16(r1) ffc12620: 7c 08 02 a6 mflr r0 ffc12624: 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)) ffc12628: 80 03 00 18 lwz r0,24(r3) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc1262c: 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)) ffc12630: 70 09 02 04 andi. r9,r0,516 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc12634: 93 e1 00 0c stw r31,12(r1) ffc12638: 7c 7f 1b 78 mr r31,r3 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc1263c: 83 c3 00 1c lwz r30,28(r3) /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc12640: 41 82 00 10 beq- ffc12650 && (the_jnode->type == IMFS_LINEAR_FILE)) { ffc12644: 81 3e 00 4c lwz r9,76(r30) ffc12648: 2f 89 00 06 cmpwi cr7,r9,6 ffc1264c: 41 9e 00 4c beq- cr7,ffc12698 <== 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)) ffc12650: 81 5e 00 50 lwz r10,80(r30) ffc12654: 81 7e 00 54 lwz r11,84(r30) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) ffc12658: 70 09 02 00 andi. r9,r0,512 ffc1265c: 40 82 00 28 bne- ffc12684 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; ffc12660: 91 5f 00 08 stw r10,8(r31) return 0; ffc12664: 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; ffc12668: 91 7f 00 0c stw r11,12(r31) return 0; } ffc1266c: 80 01 00 14 lwz r0,20(r1) ffc12670: 83 c1 00 08 lwz r30,8(r1) ffc12674: 7c 08 03 a6 mtlr r0 ffc12678: 83 e1 00 0c lwz r31,12(r1) ffc1267c: 38 21 00 10 addi r1,r1,16 ffc12680: 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; ffc12684: 91 5f 00 10 stw r10,16(r31) ffc12688: 91 7f 00 14 stw r11,20(r31) ffc1268c: 81 5e 00 50 lwz r10,80(r30) ffc12690: 81 7e 00 54 lwz r11,84(r30) ffc12694: 4b ff ff cc b ffc12660 /* * 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; ffc12698: 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; ffc1269c: 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; ffc126a0: 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; ffc126a4: 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) ffc126a8: 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; ffc126ac: 91 3e 00 4c stw r9,76(r30) <== NOT EXECUTED the_jnode->info.file.size = 0; ffc126b0: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc126b4: 39 60 00 00 li r11,0 <== NOT EXECUTED ffc126b8: 91 5e 00 50 stw r10,80(r30) <== NOT EXECUTED ffc126bc: 91 7e 00 54 stw r11,84(r30) <== NOT EXECUTED the_jnode->info.file.indirect = 0; ffc126c0: 90 1e 00 58 stw r0,88(r30) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; ffc126c4: 90 1e 00 5c stw r0,92(r30) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; ffc126c8: 90 1e 00 60 stw r0,96(r30) <== NOT EXECUTED if ((count != 0) ffc126cc: 40 9e 00 0c bne- cr7,ffc126d8 <== NOT EXECUTED ffc126d0: 80 03 00 18 lwz r0,24(r3) <== NOT EXECUTED ffc126d4: 4b ff ff 84 b ffc12658 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) ffc126d8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc126dc: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc126e0: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc126e4: 4b ff fc 85 bl ffc12368 <== NOT EXECUTED ffc126e8: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED return -1; ffc126ec: 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)) ffc126f0: 41 be ff 7c beq- cr7,ffc1266c <== NOT EXECUTED ffc126f4: 80 1f 00 18 lwz r0,24(r31) <== NOT EXECUTED ffc126f8: 4b ff ff 58 b ffc12650 <== 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 e6 21 bl ffc13d8c <__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 a1 11 bl ffc0fa64 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 fd 41 bl ffc156b8 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 fd 2d bl ffc156b8 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 fd 15 bl ffc156b8 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 f0 ed bl ffc14ac8 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 f0 d5 bl ffc14ac8 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 f0 bd bl ffc14ac8 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 0b f0 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 f0 9d bl ffc14ac8 /* * 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 e3 41 bl ffc13d8c <__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 e2 a1 bl ffc13d8c <__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 e2 31 bl ffc13d8c <__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 07 00 addi r19,r19,1792 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 e2 09 bl ffc13d8c <__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 f8 lwz r3,10232(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 46 35 bl ffc0a1ec <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc05bbc: 80 7e 27 f8 lwz r3,10232(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 7c lwz r9,10108(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 e1 6d bl ffc13d8c <__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 e1 21 bl ffc13924 <__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 =============================================================================== ffc0ecd0 : * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc0ecd0: 3d 20 00 00 lis r9,0 int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { ffc0ecd4: 94 21 ff b0 stwu r1,-80(r1) ffc0ecd8: 7c 08 02 a6 mflr r0 ffc0ecdc: 81 69 2a 70 lwz r11,10864(r9) ffc0ece0: 7d 80 00 26 mfcr r12 ffc0ece4: 90 01 00 54 stw r0,84(r1) ffc0ece8: 39 6b 00 01 addi r11,r11,1 ffc0ecec: 91 69 2a 70 stw r11,10864(r9) ffc0ecf0: 93 81 00 40 stw r28,64(r1) ffc0ecf4: 7c 7c 1b 78 mr r28,r3 ffc0ecf8: 93 c1 00 48 stw r30,72(r1) ffc0ecfc: 7c 9e 23 78 mr r30,r4 ffc0ed00: 93 41 00 38 stw r26,56(r1) ffc0ed04: 93 61 00 3c stw r27,60(r1) ffc0ed08: 93 a1 00 44 stw r29,68(r1) ffc0ed0c: 93 e1 00 4c stw r31,76(r1) ffc0ed10: 91 81 00 34 stw r12,52(r1) ffc0ed14: 90 a1 00 28 stw r5,40(r1) ffc0ed18: 90 c1 00 2c stw r6,44(r1) return _Thread_Dispatch_disable_level; ffc0ed1c: 80 09 2a 70 lwz r0,10864(r9) POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { ffc0ed20: 54 80 bf fe rlwinm r0,r4,23,31,31 ffc0ed24: 2e 00 00 00 cmpwi cr4,r0,0 /* struct mq_attr attr */ ) { va_list arg; mode_t mode; struct mq_attr *attr = NULL; ffc0ed28: 3b 40 00 00 li r26,0 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { ffc0ed2c: 40 92 01 0c bne- cr4,ffc0ee38 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) ffc0ed30: 3f a0 00 00 lis r29,0 ffc0ed34: 3b bd 36 18 addi r29,r29,13848 ffc0ed38: 7f a3 eb 78 mr r3,r29 ffc0ed3c: 48 00 3e 29 bl ffc12b64 <_Objects_Allocate> attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { ffc0ed40: 7c 7f 1b 79 mr. r31,r3 ffc0ed44: 41 82 01 28 beq- ffc0ee6c <== NEVER TAKEN _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; ffc0ed48: 93 df 00 14 stw r30,20(r31) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); ffc0ed4c: 7f 83 e3 78 mr r3,r28 ffc0ed50: 38 81 00 10 addi r4,r1,16 ffc0ed54: 48 00 92 49 bl ffc17f9c <_POSIX_Message_queue_Name_to_id> * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { ffc0ed58: 7c 7b 1b 79 mr. r27,r3 ffc0ed5c: 40 82 00 88 bne- ffc0ede4 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { ffc0ed60: 73 de 0a 00 andi. r30,r30,2560 ffc0ed64: 2f 9e 0a 00 cmpwi cr7,r30,2560 ffc0ed68: 41 9e 01 48 beq- cr7,ffc0eeb0 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) ffc0ed6c: 80 81 00 10 lwz r4,16(r1) ffc0ed70: 3c 60 00 00 lis r3,0 ffc0ed74: 38 a1 00 08 addi r5,r1,8 ffc0ed78: 38 63 34 8c addi r3,r3,13452 ffc0ed7c: 48 00 43 d9 bl ffc13154 <_Objects_Get> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( ffc0ed80: a0 1f 00 0a lhz r0,10(r31) /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1; ffc0ed84: 81 63 00 18 lwz r11,24(r3) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0ed88: 81 3d 00 1c lwz r9,28(r29) ffc0ed8c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0ed90: 39 6b 00 01 addi r11,r11,1 /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); ffc0ed94: 90 61 00 0c stw r3,12(r1) the_mq->open_count += 1; ffc0ed98: 91 63 00 18 stw r11,24(r3) the_mq_fd->Queue = the_mq; ffc0ed9c: 90 7f 00 10 stw r3,16(r31) ffc0eda0: 7f e9 01 2e stwx r31,r9,r0 the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; ffc0eda4: 93 7f 00 0c stw r27,12(r31) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); ffc0eda8: 48 00 55 4d bl ffc142f4 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); ffc0edac: 48 00 55 49 bl ffc142f4 <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; ffc0edb0: 80 7f 00 08 lwz r3,8(r31) ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0edb4: 80 01 00 54 lwz r0,84(r1) ffc0edb8: 81 81 00 34 lwz r12,52(r1) ffc0edbc: 7c 08 03 a6 mtlr r0 ffc0edc0: 83 41 00 38 lwz r26,56(r1) ffc0edc4: 83 61 00 3c lwz r27,60(r1) ffc0edc8: 7d 80 81 20 mtcrf 8,r12 ffc0edcc: 83 81 00 40 lwz r28,64(r1) ffc0edd0: 83 a1 00 44 lwz r29,68(r1) ffc0edd4: 83 c1 00 48 lwz r30,72(r1) ffc0edd8: 83 e1 00 4c lwz r31,76(r1) ffc0eddc: 38 21 00 50 addi r1,r1,80 ffc0ede0: 4e 80 00 20 blr if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { ffc0ede4: 2f 9b 00 02 cmpwi cr7,r27,2 ffc0ede8: 41 9e 01 18 beq- cr7,ffc0ef00 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); ffc0edec: 7f a3 eb 78 mr r3,r29 ffc0edf0: 7f e4 fb 78 mr r4,r31 ffc0edf4: 48 00 41 6d bl ffc12f60 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); ffc0edf8: 48 00 54 fd bl ffc142f4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); ffc0edfc: 48 00 d6 31 bl ffc1c42c <__errno> ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0ee00: 80 01 00 54 lwz r0,84(r1) ffc0ee04: 81 81 00 34 lwz r12,52(r1) ffc0ee08: 7c 08 03 a6 mtlr r0 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); ffc0ee0c: 93 63 00 00 stw r27,0(r3) ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0ee10: 7d 80 81 20 mtcrf 8,r12 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); ffc0ee14: 38 60 ff ff li r3,-1 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0ee18: 83 41 00 38 lwz r26,56(r1) ffc0ee1c: 83 61 00 3c lwz r27,60(r1) ffc0ee20: 83 81 00 40 lwz r28,64(r1) ffc0ee24: 83 a1 00 44 lwz r29,68(r1) ffc0ee28: 83 c1 00 48 lwz r30,72(r1) ffc0ee2c: 83 e1 00 4c lwz r31,76(r1) ffc0ee30: 38 21 00 50 addi r1,r1,80 ffc0ee34: 4e 80 00 20 blr Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc0ee38: 38 01 00 58 addi r0,r1,88 mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); ffc0ee3c: 83 41 00 2c lwz r26,44(r1) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) ffc0ee40: 3f a0 00 00 lis r29,0 Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc0ee44: 90 01 00 18 stw r0,24(r1) ffc0ee48: 3b bd 36 18 addi r29,r29,13848 ffc0ee4c: 38 01 00 20 addi r0,r1,32 ffc0ee50: 90 01 00 1c stw r0,28(r1) ffc0ee54: 7f a3 eb 78 mr r3,r29 mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); ffc0ee58: 38 00 00 04 li r0,4 ffc0ee5c: 98 01 00 14 stb r0,20(r1) ffc0ee60: 48 00 3d 05 bl ffc12b64 <_Objects_Allocate> va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { ffc0ee64: 7c 7f 1b 79 mr. r31,r3 ffc0ee68: 40 82 fe e0 bne+ ffc0ed48 _Thread_Enable_dispatch(); ffc0ee6c: 48 00 54 89 bl ffc142f4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); ffc0ee70: 48 00 d5 bd bl ffc1c42c <__errno> ffc0ee74: 38 00 00 17 li r0,23 ffc0ee78: 90 03 00 00 stw r0,0(r3) ffc0ee7c: 38 60 ff ff li r3,-1 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0ee80: 80 01 00 54 lwz r0,84(r1) ffc0ee84: 81 81 00 34 lwz r12,52(r1) ffc0ee88: 7c 08 03 a6 mtlr r0 ffc0ee8c: 83 41 00 38 lwz r26,56(r1) ffc0ee90: 83 61 00 3c lwz r27,60(r1) ffc0ee94: 7d 80 81 20 mtcrf 8,r12 ffc0ee98: 83 81 00 40 lwz r28,64(r1) ffc0ee9c: 83 a1 00 44 lwz r29,68(r1) ffc0eea0: 83 c1 00 48 lwz r30,72(r1) ffc0eea4: 83 e1 00 4c lwz r31,76(r1) ffc0eea8: 38 21 00 50 addi r1,r1,80 ffc0eeac: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); ffc0eeb0: 7f a3 eb 78 mr r3,r29 ffc0eeb4: 7f e4 fb 78 mr r4,r31 ffc0eeb8: 48 00 40 a9 bl ffc12f60 <_Objects_Free> /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); ffc0eebc: 48 00 54 39 bl ffc142f4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); ffc0eec0: 48 00 d5 6d bl ffc1c42c <__errno> ffc0eec4: 38 00 00 11 li r0,17 ffc0eec8: 90 03 00 00 stw r0,0(r3) ffc0eecc: 38 60 ff ff li r3,-1 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0eed0: 80 01 00 54 lwz r0,84(r1) ffc0eed4: 81 81 00 34 lwz r12,52(r1) ffc0eed8: 7c 08 03 a6 mtlr r0 ffc0eedc: 83 41 00 38 lwz r26,56(r1) ffc0eee0: 83 61 00 3c lwz r27,60(r1) ffc0eee4: 7d 80 81 20 mtcrf 8,r12 ffc0eee8: 83 81 00 40 lwz r28,64(r1) ffc0eeec: 83 a1 00 44 lwz r29,68(r1) ffc0eef0: 83 c1 00 48 lwz r30,72(r1) ffc0eef4: 83 e1 00 4c lwz r31,76(r1) ffc0eef8: 38 21 00 50 addi r1,r1,80 ffc0eefc: 4e 80 00 20 blr if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { ffc0ef00: 41 92 fe ec beq+ cr4,ffc0edec /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( ffc0ef04: 7f 83 e3 78 mr r3,r28 ffc0ef08: 38 80 00 01 li r4,1 ffc0ef0c: 7f 45 d3 78 mr r5,r26 ffc0ef10: 38 c1 00 0c addi r6,r1,12 ffc0ef14: 48 00 8e bd bl ffc17dd0 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { ffc0ef18: 2f 83 ff ff cmpwi cr7,r3,-1 ffc0ef1c: 41 9e 00 30 beq- cr7,ffc0ef4c Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( ffc0ef20: a0 1f 00 0a lhz r0,10(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0ef24: 81 3d 00 1c lwz r9,28(r29) _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; ffc0ef28: 81 61 00 0c lwz r11,12(r1) ffc0ef2c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0ef30: 91 7f 00 10 stw r11,16(r31) ffc0ef34: 7f e9 01 2e stwx r31,r9,r0 the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; ffc0ef38: 38 00 00 00 li r0,0 ffc0ef3c: 90 1f 00 0c stw r0,12(r31) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); ffc0ef40: 48 00 53 b5 bl ffc142f4 <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; ffc0ef44: 80 7f 00 08 lwz r3,8(r31) ffc0ef48: 4b ff fe 6c b ffc0edb4 ffc0ef4c: 7f a3 eb 78 mr r3,r29 ffc0ef50: 7f e4 fb 78 mr r4,r31 ffc0ef54: 48 00 40 0d bl ffc12f60 <_Objects_Free> /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); ffc0ef58: 48 00 53 9d bl ffc142f4 <_Thread_Enable_dispatch> return (mqd_t) -1; ffc0ef5c: 38 60 ff ff li r3,-1 ffc0ef60: 4b ff fe 54 b ffc0edb4 =============================================================================== ffc1e4d0 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1e4d0: 94 21 ff 28 stwu r1,-216(r1) ffc1e4d4: 7c 08 02 a6 mflr r0 ffc1e4d8: 7d 80 00 26 mfcr r12 ffc1e4dc: 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; ffc1e4e0: 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; ffc1e4e4: 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) { ffc1e4e8: 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; ffc1e4ec: 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) { ffc1e4f0: 93 41 00 c0 stw r26,192(r1) ffc1e4f4: 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); ffc1e4f8: 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) { ffc1e4fc: 93 61 00 c4 stw r27,196(r1) ffc1e500: 7c db 33 78 mr r27,r6 ffc1e504: 93 c1 00 d0 stw r30,208(r1) ffc1e508: 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); ffc1e50c: 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) { ffc1e510: 93 e1 00 d4 stw r31,212(r1) ffc1e514: 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); ffc1e518: 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) { ffc1e51c: 91 81 00 ac stw r12,172(r1) ffc1e520: 90 01 00 18 stw r0,24(r1) dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; ffc1e524: 90 01 00 1c stw r0,28(r1) ffc1e528: 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; ffc1e52c: 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) { ffc1e530: 92 e1 00 b4 stw r23,180(r1) ffc1e534: 7d 17 43 78 mr r23,r8 ffc1e538: 93 01 00 b8 stw r24,184(r1) ffc1e53c: 93 81 00 c8 stw r28,200(r1) ffc1e540: 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; ffc1e544: 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; ffc1e548: 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; ffc1e54c: 93 21 00 0c stw r25,12(r1) time_t time_ret = 0; uint16_t time_val = 0; ffc1e550: b3 21 00 0a sth r25,10(r1) uint16_t date = 0; ffc1e554: 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; ffc1e558: 93 21 00 10 stw r25,16(r1) dir_pos->sname.ofs = 0; ffc1e55c: 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); ffc1e560: 93 21 00 40 stw r25,64(r1) ffc1e564: 93 21 00 44 stw r25,68(r1) ffc1e568: 93 21 00 48 stw r25,72(r1) ffc1e56c: 93 21 00 4c stw r25,76(r1) ffc1e570: 93 21 00 50 stw r25,80(r1) ffc1e574: 93 21 00 54 stw r25,84(r1) ffc1e578: 93 21 00 58 stw r25,88(r1) ffc1e57c: 93 21 00 5c stw r25,92(r1) memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); ffc1e580: 48 00 6b a9 bl ffc25128 name_type = msdos_long_to_short (name, name_len, ffc1e584: 7f 64 db 78 mr r4,r27 ffc1e588: 38 a1 00 40 addi r5,r1,64 ffc1e58c: 38 c0 00 0b li r6,11 ffc1e590: 7f 43 d3 78 mr r3,r26 ffc1e594: 48 00 13 e5 bl ffc1f978 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; ffc1e598: 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, ffc1e59c: 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; ffc1e5a0: 98 01 00 4c stb r0,76(r1) /* set up last write date and time */ time_ret = time(NULL); ffc1e5a4: 38 60 00 00 li r3,0 ffc1e5a8: 48 00 a4 29 bl ffc289d0