=============================================================================== ffc0c0e4 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { ffc0c0e4: 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; ffc0c0e8: 81 23 00 10 lwz r9,16(r3) switch( node->type ) { ffc0c0ec: 81 6b 00 4c lwz r11,76(r11) ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; ffc0c0f0: 81 29 00 34 lwz r9,52(r9) switch( node->type ) { ffc0c0f4: 38 0b ff ff addi r0,r11,-1 ffc0c0f8: 2b 80 00 06 cmplwi cr7,r0,6 ffc0c0fc: 41 9d 00 50 bgt- cr7,ffc0c14c <== NEVER TAKEN ffc0c100: 3d 60 ff c2 lis r11,-62 ffc0c104: 39 6b c5 1c addi r11,r11,-15076 ffc0c108: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c10c: 7c 0b 00 2e lwzx r0,r11,r0 ffc0c110: 7d 60 5a 14 add r11,r0,r11 ffc0c114: 7d 69 03 a6 mtctr r11 ffc0c118: 4e 80 04 20 bctr case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; ffc0c11c: 80 09 00 0c lwz r0,12(r9) ffc0c120: 48 00 00 28 b ffc0c148 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; ffc0c124: 3d 20 ff c2 lis r9,-62 ffc0c128: 38 09 c5 44 addi r0,r9,-15036 ffc0c12c: 48 00 00 1c b ffc0c148 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; ffc0c130: 3d 20 ff c2 lis r9,-62 ffc0c134: 38 09 c5 b4 addi r0,r9,-14924 ffc0c138: 48 00 00 10 b ffc0c148 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; ffc0c13c: 80 09 00 08 lwz r0,8(r9) ffc0c140: 48 00 00 08 b ffc0c148 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; ffc0c144: 80 09 00 10 lwz r0,16(r9) ffc0c148: 90 03 00 08 stw r0,8(r3) break; } return 0; } ffc0c14c: 38 60 00 00 li r3,0 ffc0c150: 4e 80 00 20 blr =============================================================================== ffc0bed8 : IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ffc0bed8: 2c 03 00 00 cmpwi r3,0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0bedc: 94 21 ff e0 stwu r1,-32(r1) ffc0bee0: 7c 08 02 a6 mflr r0 ffc0bee4: bf 61 00 0c stmw r27,12(r1) ffc0bee8: 7c 9f 23 78 mr r31,r4 ffc0beec: 7c fe 3b 78 mr r30,r7 ffc0bef0: 90 01 00 24 stw r0,36(r1) /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; ffc0bef4: 3b 60 00 00 li r27,0 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ffc0bef8: 41 82 01 24 beq- ffc0c01c <== NEVER TAKEN fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && ffc0befc: 2f 84 00 07 cmpwi cr7,r4,7 */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; ffc0bf00: 81 23 00 10 lwz r9,16(r3) * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; ffc0bf04: 83 83 00 00 lwz r28,0(r3) fs_info = parent_loc->mt_entry->fs_info; ffc0bf08: 83 a9 00 34 lwz r29,52(r9) /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && ffc0bf0c: 40 9e 00 18 bne- cr7,ffc0bf24 ffc0bf10: 81 3d 00 10 lwz r9,16(r29) ffc0bf14: 3d 60 ff c2 lis r11,-62 ffc0bf18: 38 0b c4 b4 addi r0,r11,-15180 ffc0bf1c: 7f 89 00 00 cmpw cr7,r9,r0 ffc0bf20: 41 9e 00 fc beq- cr7,ffc0c01c return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); ffc0bf24: 3d 20 00 00 lis r9,0 ffc0bf28: 81 29 27 3c lwz r9,10044(r9) ffc0bf2c: 7c a4 2b 78 mr r4,r5 ffc0bf30: 7f e3 fb 78 mr r3,r31 ffc0bf34: 80 09 00 2c lwz r0,44(r9) ffc0bf38: 7c c5 00 78 andc r5,r6,r0 ffc0bf3c: 4b ff ff 19 bl ffc0be54 if ( !node ) ffc0bf40: 7c 7b 1b 79 mr. r27,r3 ffc0bf44: 41 82 00 d8 beq- ffc0c01c return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { ffc0bf48: 2f 9f 00 01 cmpwi cr7,r31,1 ffc0bf4c: 40 be 00 1c bne+ cr7,ffc0bf68 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 ); ffc0bf50: 39 3b 00 54 addi r9,r27,84 head->next = tail; ffc0bf54: 91 3b 00 50 stw r9,80(r27) head->previous = NULL; ffc0bf58: 39 20 00 00 li r9,0 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 ); ffc0bf5c: 38 1b 00 50 addi r0,r27,80 head->next = tail; head->previous = NULL; ffc0bf60: 91 3b 00 54 stw r9,84(r27) ffc0bf64: 48 00 00 54 b ffc0bfb8 rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { ffc0bf68: 2f 9f 00 03 cmpwi cr7,r31,3 ffc0bf6c: 41 9e 00 0c beq- cr7,ffc0bf78 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { ffc0bf70: 2f 9f 00 04 cmpwi cr7,r31,4 ffc0bf74: 40 be 00 0c bne+ cr7,ffc0bf80 node->info.sym_link.name = info->sym_link.name; ffc0bf78: 80 1e 00 00 lwz r0,0(r30) ffc0bf7c: 48 00 00 7c b ffc0bff8 } else if ( type == IMFS_DEVICE ) { ffc0bf80: 2f 9f 00 02 cmpwi cr7,r31,2 ffc0bf84: 40 be 00 18 bne+ cr7,ffc0bf9c node->info.device.major = info->device.major; ffc0bf88: 80 1e 00 00 lwz r0,0(r30) ffc0bf8c: 90 1b 00 50 stw r0,80(r27) node->info.device.minor = info->device.minor; ffc0bf90: 80 1e 00 04 lwz r0,4(r30) ffc0bf94: 90 1b 00 54 stw r0,84(r27) ffc0bf98: 48 00 00 64 b ffc0bffc } else if ( type == IMFS_LINEAR_FILE ) { ffc0bf9c: 2f 9f 00 06 cmpwi cr7,r31,6 ffc0bfa0: 40 be 00 20 bne+ cr7,ffc0bfc0 node->info.linearfile.size = 0; ffc0bfa4: 39 40 00 00 li r10,0 ffc0bfa8: 39 60 00 00 li r11,0 ffc0bfac: 91 5b 00 50 stw r10,80(r27) node->info.linearfile.direct = 0; ffc0bfb0: 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; ffc0bfb4: 91 7b 00 54 stw r11,84(r27) node->info.linearfile.direct = 0; ffc0bfb8: 90 1b 00 58 stw r0,88(r27) ffc0bfbc: 48 00 00 40 b ffc0bffc } else if ( type == IMFS_MEMORY_FILE ) { ffc0bfc0: 2f 9f 00 05 cmpwi cr7,r31,5 ffc0bfc4: 40 be 00 28 bne+ cr7,ffc0bfec node->info.file.size = 0; node->info.file.indirect = 0; ffc0bfc8: 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; ffc0bfcc: 39 40 00 00 li r10,0 node->info.file.indirect = 0; ffc0bfd0: 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; ffc0bfd4: 39 60 00 00 li r11,0 ffc0bfd8: 91 5b 00 50 stw r10,80(r27) ffc0bfdc: 91 7b 00 54 stw r11,84(r27) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; ffc0bfe0: 90 1b 00 5c stw r0,92(r27) node->info.file.triply_indirect = 0; ffc0bfe4: 90 1b 00 60 stw r0,96(r27) ffc0bfe8: 48 00 00 14 b ffc0bffc } else if ( type == IMFS_FIFO ) { ffc0bfec: 2f 9f 00 07 cmpwi cr7,r31,7 ffc0bff0: 40 be 00 0c bne+ cr7,ffc0bffc <== NEVER TAKEN node->info.fifo.pipe = NULL; ffc0bff4: 38 00 00 00 li r0,0 ffc0bff8: 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; ffc0bffc: 81 3d 00 04 lwz r9,4(r29) ffc0c000: 38 7c 00 50 addi r3,r28,80 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; ffc0c004: 93 9b 00 08 stw r28,8(r27) ffc0c008: 7f 64 db 78 mr r4,r27 node->st_ino = ++fs_info->ino_count; ffc0c00c: 38 09 00 01 addi r0,r9,1 ffc0c010: 90 1d 00 04 stw r0,4(r29) ffc0c014: 90 1b 00 38 stw r0,56(r27) ffc0c018: 4b ff cb d5 bl ffc08bec <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } ffc0c01c: 39 61 00 20 addi r11,r1,32 ffc0c020: 7f 63 db 78 mr r3,r27 ffc0c024: 4b ff 45 10 b ffc00534 <_restgpr_27_x> =============================================================================== ffc0c208 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0c208: 94 21 ff a8 stwu r1,-88(r1) ffc0c20c: 7c 08 02 a6 mflr r0 ffc0c210: 90 01 00 5c stw r0,92(r1) int i = 0; ffc0c214: 38 00 00 00 li r0,0 ffc0c218: 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 ) ) { ffc0c21c: 54 a0 00 39 rlwinm. r0,r5,0,0,28 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0c220: bf 41 00 40 stmw r26,64(r1) ffc0c224: 7c 7e 1b 78 mr r30,r3 ffc0c228: 7c bd 2b 78 mr r29,r5 ffc0c22c: 90 81 00 38 stw r4,56(r1) ffc0c230: 7c df 33 78 mr r31,r6 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 ) ) { ffc0c234: 41 a2 00 10 beq+ ffc0c244 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); ffc0c238: 48 00 3a 4d bl ffc0fc84 <__errno> <== NOT EXECUTED ffc0c23c: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc0c240: 48 00 02 78 b ffc0c4b8 <== NOT EXECUTED /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0c244: 83 86 00 00 lwz r28,0(r6) case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0c248: 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 ); ffc0c24c: 80 61 00 0c lwz r3,12(r1) ffc0c250: 38 a1 00 10 addi r5,r1,16 ffc0c254: 80 81 00 38 lwz r4,56(r1) ffc0c258: 38 c1 00 08 addi r6,r1,8 ffc0c25c: 7c 7e 1a 14 add r3,r30,r3 ffc0c260: 48 00 07 f1 bl ffc0ca50 pathnamelen -= len; ffc0c264: 80 01 00 08 lwz r0,8(r1) ffc0c268: 81 21 00 38 lwz r9,56(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 ); ffc0c26c: 7c 7a 1b 78 mr r26,r3 pathnamelen -= len; ffc0c270: 7d 20 48 50 subf r9,r0,r9 ffc0c274: 91 21 00 38 stw r9,56(r1) i += len; ffc0c278: 81 21 00 0c lwz r9,12(r1) ffc0c27c: 7c 09 02 14 add r0,r9,r0 ffc0c280: 90 01 00 0c stw r0,12(r1) if ( !pathloc->node_access ) ffc0c284: 80 1f 00 00 lwz r0,0(r31) ffc0c288: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c28c: 41 9e 00 f8 beq- cr7,ffc0c384 <== 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 ) ffc0c290: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c294: 41 9e 00 24 beq- cr7,ffc0c2b8 if ( node->type == IMFS_DIRECTORY ) ffc0c298: 80 1c 00 4c lwz r0,76(r28) ffc0c29c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c2a0: 40 be 00 18 bne+ cr7,ffc0c2b8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) ffc0c2a4: 7f e3 fb 78 mr r3,r31 ffc0c2a8: 38 80 00 01 li r4,1 ffc0c2ac: 4b ff fe a9 bl ffc0c154 ffc0c2b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c2b4: 41 9e 01 fc beq- cr7,ffc0c4b0 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0c2b8: 2f 9a 00 03 cmpwi cr7,r26,3 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; ffc0c2bc: 83 9f 00 00 lwz r28,0(r31) switch( type ) { ffc0c2c0: 41 9e 00 54 beq- cr7,ffc0c314 ffc0c2c4: 2f 9a 00 04 cmpwi cr7,r26,4 ffc0c2c8: 41 9e 01 54 beq- cr7,ffc0c41c ffc0c2cc: 2f 1a 00 02 cmpwi cr6,r26,2 ffc0c2d0: 40 ba 01 58 bne+ cr6,ffc0c428 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0c2d4: 81 3b 27 3c lwz r9,10044(r27) ffc0c2d8: 80 09 00 18 lwz r0,24(r9) ffc0c2dc: 7f 9c 00 00 cmpw cr7,r28,r0 ffc0c2e0: 41 be ff 6c beq- cr7,ffc0c24c 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; ffc0c2e4: 81 7f 00 10 lwz r11,16(r31) /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { ffc0c2e8: 80 0b 00 1c lwz r0,28(r11) ffc0c2ec: 7f 80 e0 00 cmpw cr7,r0,r28 ffc0c2f0: 40 be 00 0c bne+ cr7,ffc0c2fc */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0c2f4: 39 6b 00 08 addi r11,r11,8 ffc0c2f8: 48 00 01 58 b ffc0c450 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) ffc0c2fc: 83 9c 00 08 lwz r28,8(r28) ffc0c300: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0c304: 40 be 01 10 bne+ cr7,ffc0c414 rtems_set_errno_and_return_minus_one( ENOENT ); ffc0c308: 48 00 39 7d bl ffc0fc84 <__errno> ffc0c30c: 93 43 00 00 stw r26,0(r3) ffc0c310: 48 00 01 ac b ffc0c4bc case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { ffc0c314: 80 1c 00 4c lwz r0,76(r28) ffc0c318: 2f 80 00 03 cmpwi cr7,r0,3 ffc0c31c: 40 be 00 18 bne+ cr7,ffc0c334 IMFS_evaluate_hard_link( pathloc, 0 ); ffc0c320: 7f e3 fb 78 mr r3,r31 ffc0c324: 38 80 00 00 li r4,0 ffc0c328: 4b ff fe 81 bl ffc0c1a8 node = pathloc->node_access; ffc0c32c: 83 9f 00 00 lwz r28,0(r31) ffc0c330: 48 00 00 28 b ffc0c358 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { ffc0c334: 2f 80 00 04 cmpwi cr7,r0,4 ffc0c338: 40 be 00 20 bne+ cr7,ffc0c358 result = IMFS_evaluate_sym_link( pathloc, 0 ); ffc0c33c: 7f e3 fb 78 mr r3,r31 ffc0c340: 38 80 00 00 li r4,0 ffc0c344: 48 00 01 89 bl ffc0c4cc /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; ffc0c348: 83 9f 00 00 lwz r28,0(r31) if ( result == -1 ) ffc0c34c: 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 ); ffc0c350: 7c 7a 1b 78 mr r26,r3 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) ffc0c354: 41 9e 01 6c beq- cr7,ffc0c4c0 <== NEVER TAKEN } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0c358: 80 1c 00 4c lwz r0,76(r28) ffc0c35c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c360: 41 be 00 10 beq+ cr7,ffc0c370 rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0c364: 48 00 39 21 bl ffc0fc84 <__errno> ffc0c368: 38 00 00 14 li r0,20 ffc0c36c: 48 00 01 4c b ffc0c4b8 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); ffc0c370: 7f 83 e3 78 mr r3,r28 ffc0c374: 38 81 00 10 addi r4,r1,16 ffc0c378: 48 00 06 45 bl ffc0c9bc if ( !node ) ffc0c37c: 7c 7c 1b 79 mr. r28,r3 ffc0c380: 40 a2 00 10 bne+ ffc0c390 rtems_set_errno_and_return_minus_one( ENOENT ); ffc0c384: 48 00 39 01 bl ffc0fc84 <__errno> ffc0c388: 38 00 00 02 li r0,2 ffc0c38c: 48 00 01 2c b ffc0c4b8 * 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 )) { ffc0c390: 80 1c 00 4c lwz r0,76(r28) ffc0c394: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c398: 40 be 00 7c bne+ cr7,ffc0c414 ffc0c39c: 80 1c 00 5c lwz r0,92(r28) ffc0c3a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c3a4: 41 9e 00 70 beq- cr7,ffc0c414 IMFS_skip_separator( pathname, &pathnamelen, &i); ffc0c3a8: 7f c3 f3 78 mr r3,r30 ffc0c3ac: 38 81 00 38 addi r4,r1,56 ffc0c3b0: 38 a1 00 0c addi r5,r1,12 ffc0c3b4: 4b ff fc c5 bl ffc0c078 if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { ffc0c3b8: 81 21 00 0c lwz r9,12(r1) ffc0c3bc: 7c 1e 48 ae lbzx r0,r30,r9 ffc0c3c0: 7d 7e 4a 14 add r11,r30,r9 ffc0c3c4: 2f 80 00 2e cmpwi cr7,r0,46 ffc0c3c8: 40 9e 00 10 bne- cr7,ffc0c3d8 ffc0c3cc: 88 0b 00 01 lbz r0,1(r11) ffc0c3d0: 2f 80 00 2e cmpwi cr7,r0,46 ffc0c3d4: 41 be 00 28 beq+ cr7,ffc0c3fc *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0c3d8: 80 9c 00 5c lwz r4,92(r28) return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0c3dc: 7d 63 5b 78 mr r3,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; ffc0c3e0: 38 84 00 1c addi r4,r4,28 ffc0c3e4: 7c a4 a4 aa lswi r5,r4,20 ffc0c3e8: 7c bf a5 aa stswi r5,r31,20 return (*pathloc->ops->evalpath_h)( &pathname[i], ffc0c3ec: 81 3f 00 0c lwz r9,12(r31) ffc0c3f0: 80 81 00 38 lwz r4,56(r1) ffc0c3f4: 80 09 00 00 lwz r0,0(r9) ffc0c3f8: 48 00 00 80 b ffc0c478 pathnamelen, flags, pathloc ); } i += 2; ffc0c3fc: 39 29 00 02 addi r9,r9,2 pathnamelen -= 2; node = node->Parent; ffc0c400: 83 9c 00 08 lwz r28,8(r28) *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; ffc0c404: 91 21 00 0c stw r9,12(r1) pathnamelen -= 2; ffc0c408: 81 21 00 38 lwz r9,56(r1) ffc0c40c: 38 09 ff fe addi r0,r9,-2 ffc0c410: 90 01 00 38 stw r0,56(r1) } /* * Set the node access to the point we have found. */ pathloc->node_access = node; ffc0c414: 93 9f 00 00 stw r28,0(r31) break; ffc0c418: 4b ff fe 34 b ffc0c24c case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); ffc0c41c: 48 00 38 69 bl ffc0fc84 <__errno> ffc0c420: 38 00 00 5b li r0,91 ffc0c424: 48 00 00 94 b ffc0c4b8 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc0c428: 2f 1a 00 00 cmpwi cr6,r26,0 ffc0c42c: 41 9a 00 08 beq- cr6,ffc0c434 ffc0c430: 40 9e fe 1c bne+ cr7,ffc0c24c <== ALWAYS TAKEN * 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 ) { ffc0c434: 80 1c 00 4c lwz r0,76(r28) ffc0c438: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c43c: 40 9e 00 54 bne- cr7,ffc0c490 if ( node->info.directory.mt_fs != NULL ) { ffc0c440: 81 7c 00 5c lwz r11,92(r28) ffc0c444: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0c448: 41 9e 00 48 beq- cr7,ffc0c490 <== ALWAYS TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0c44c: 39 6b 00 1c addi r11,r11,28 <== NOT EXECUTED ffc0c450: 7c ab a4 aa lswi r5,r11,20 ffc0c454: 7c bf a5 aa stswi r5,r31,20 return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0c458: 80 61 00 0c lwz r3,12(r1) ffc0c45c: 81 21 00 08 lwz r9,8(r1) ffc0c460: 81 7f 00 0c lwz r11,12(r31) ffc0c464: 80 81 00 38 lwz r4,56(r1) ffc0c468: 7c 69 18 50 subf r3,r9,r3 ffc0c46c: 80 0b 00 00 lwz r0,0(r11) ffc0c470: 7c 7e 1a 14 add r3,r30,r3 ffc0c474: 7c 89 22 14 add r4,r9,r4 ffc0c478: 7f a5 eb 78 mr r5,r29 ffc0c47c: 7c 09 03 a6 mtctr r0 ffc0c480: 7f e6 fb 78 mr r6,r31 ffc0c484: 4e 80 04 21 bctrl ffc0c488: 7c 7a 1b 78 mr r26,r3 ffc0c48c: 48 00 00 34 b ffc0c4c0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0c490: 7f e3 fb 78 mr r3,r31 ffc0c494: 4b ff fc 51 bl ffc0c0e4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0c498: 7f a4 eb 78 mr r4,r29 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0c49c: 7c 7a 1b 78 mr r26,r3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0c4a0: 7f e3 fb 78 mr r3,r31 ffc0c4a4: 4b ff fc b1 bl ffc0c154 ffc0c4a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c4ac: 40 be 00 14 bne+ cr7,ffc0c4c0 rtems_set_errno_and_return_minus_one( EACCES ); ffc0c4b0: 48 00 37 d5 bl ffc0fc84 <__errno> ffc0c4b4: 38 00 00 0d li r0,13 ffc0c4b8: 90 03 00 00 stw r0,0(r3) ffc0c4bc: 3b 40 ff ff li r26,-1 return result; } ffc0c4c0: 39 61 00 58 addi r11,r1,88 ffc0c4c4: 7f 43 d3 78 mr r3,r26 ffc0c4c8: 4b ff 40 68 b ffc00530 <_restgpr_26_x> =============================================================================== ffc0c620 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0c620: 94 21 ff b0 stwu r1,-80(r1) ffc0c624: 7c 08 02 a6 mflr r0 ffc0c628: 90 01 00 54 stw r0,84(r1) int i = 0; ffc0c62c: 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 */ ) { ffc0c630: bf 41 00 38 stmw r26,56(r1) ffc0c634: 7c 7e 1b 78 mr r30,r3 ffc0c638: 7c 9f 23 78 mr r31,r4 ffc0c63c: 7c bd 2b 78 mr r29,r5 int i = 0; ffc0c640: 90 01 00 10 stw r0,16(r1) case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0c644: 3f 60 00 00 lis r27,0 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0c648: 83 84 00 00 lwz r28,0(r4) /* * Get the path length. */ pathlen = strlen( path ); ffc0c64c: 48 00 4f 65 bl ffc115b0 ffc0c650: 90 61 00 08 stw r3,8(r1) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc0c654: 80 61 00 10 lwz r3,16(r1) ffc0c658: 38 a1 00 14 addi r5,r1,20 ffc0c65c: 80 81 00 08 lwz r4,8(r1) ffc0c660: 38 c1 00 0c addi r6,r1,12 ffc0c664: 7c 7e 1a 14 add r3,r30,r3 ffc0c668: 48 00 03 e9 bl ffc0ca50 pathlen -= len; ffc0c66c: 80 01 00 0c lwz r0,12(r1) ffc0c670: 81 21 00 08 lwz r9,8(r1) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc0c674: 7c 7a 1b 78 mr r26,r3 pathlen -= len; ffc0c678: 7d 20 48 50 subf r9,r0,r9 ffc0c67c: 91 21 00 08 stw r9,8(r1) i += len; ffc0c680: 81 21 00 10 lwz r9,16(r1) ffc0c684: 7c 09 02 14 add r0,r9,r0 ffc0c688: 90 01 00 10 stw r0,16(r1) if ( !pathloc->node_access ) ffc0c68c: 80 1f 00 00 lwz r0,0(r31) ffc0c690: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c694: 41 9e 01 e8 beq- cr7,ffc0c87c <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) ffc0c698: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c69c: 41 9e 00 24 beq- cr7,ffc0c6c0 if ( node->type == IMFS_DIRECTORY ) ffc0c6a0: 80 1c 00 4c lwz r0,76(r28) ffc0c6a4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c6a8: 40 be 00 18 bne+ cr7,ffc0c6c0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) ffc0c6ac: 7f e3 fb 78 mr r3,r31 ffc0c6b0: 38 80 00 01 li r4,1 ffc0c6b4: 4b ff fa a1 bl ffc0c154 ffc0c6b8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c6bc: 41 9e 02 24 beq- cr7,ffc0c8e0 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0c6c0: 2f 9a 00 02 cmpwi cr7,r26,2 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; ffc0c6c4: 83 9f 00 00 lwz r28,0(r31) switch( type ) { ffc0c6c8: 41 9e 00 2c beq- cr7,ffc0c6f4 ffc0c6cc: 2b 9a 00 02 cmplwi cr7,r26,2 ffc0c6d0: 41 9d 00 10 bgt- cr7,ffc0c6e0 ffc0c6d4: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0c6d8: 41 9e 01 68 beq- cr7,ffc0c840 ffc0c6dc: 4b ff ff 78 b ffc0c654 ffc0c6e0: 2f 9a 00 03 cmpwi cr7,r26,3 ffc0c6e4: 41 9e 00 70 beq- cr7,ffc0c754 ffc0c6e8: 2f 9a 00 04 cmpwi cr7,r26,4 ffc0c6ec: 40 9e ff 68 bne+ cr7,ffc0c654 <== NEVER TAKEN ffc0c6f0: 48 00 01 5c b ffc0c84c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0c6f4: 81 3b 27 3c lwz r9,10044(r27) ffc0c6f8: 80 09 00 18 lwz r0,24(r9) ffc0c6fc: 7f 9c 00 00 cmpw cr7,r28,r0 ffc0c700: 41 be ff 54 beq- cr7,ffc0c654 ffc0c704: 81 7f 00 10 lwz r11,16(r31) /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { ffc0c708: 80 0b 00 1c lwz r0,28(r11) ffc0c70c: 7f 80 e0 00 cmpw cr7,r0,r28 ffc0c710: 40 be 00 2c bne+ cr7,ffc0c73c if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0c714: 39 6b 00 08 addi r11,r11,8 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0c718: 80 01 00 0c lwz r0,12(r1) if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; ffc0c71c: 7c ab a4 aa lswi r5,r11,20 ffc0c720: 7c bf a5 aa stswi r5,r31,20 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0c724: 80 61 00 10 lwz r3,16(r1) ffc0c728: 81 3f 00 0c lwz r9,12(r31) ffc0c72c: 7c 60 18 50 subf r3,r0,r3 ffc0c730: 7c 7e 1a 14 add r3,r30,r3 ffc0c734: 80 09 00 04 lwz r0,4(r9) ffc0c738: 48 00 00 d0 b ffc0c808 } } else { if ( !node->Parent ) ffc0c73c: 83 9c 00 08 lwz r28,8(r28) ffc0c740: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0c744: 40 be 00 f4 bne+ cr7,ffc0c838 rtems_set_errno_and_return_minus_one( ENOENT ); ffc0c748: 48 00 35 3d bl ffc0fc84 <__errno> ffc0c74c: 93 43 00 00 stw r26,0(r3) ffc0c750: 48 00 01 9c b ffc0c8ec pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { ffc0c754: 80 1c 00 4c lwz r0,76(r28) ffc0c758: 2f 80 00 03 cmpwi cr7,r0,3 ffc0c75c: 41 9e 00 0c beq- cr7,ffc0c768 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { ffc0c760: 2f 80 00 04 cmpwi cr7,r0,4 ffc0c764: 40 be 00 1c bne+ cr7,ffc0c780 result = IMFS_evaluate_link( pathloc, 0 ); ffc0c768: 7f e3 fb 78 mr r3,r31 ffc0c76c: 38 80 00 00 li r4,0 ffc0c770: 4b ff fd f5 bl ffc0c564 if ( result == -1 ) ffc0c774: 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 ); ffc0c778: 7c 7c 1b 78 mr r28,r3 if ( result == -1 ) ffc0c77c: 41 9e 01 74 beq- cr7,ffc0c8f0 <== NEVER TAKEN return -1; } node = pathloc->node_access; ffc0c780: 80 7f 00 00 lwz r3,0(r31) if ( !node ) ffc0c784: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c788: 41 9e 01 38 beq- cr7,ffc0c8c0 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0c78c: 80 03 00 4c lwz r0,76(r3) ffc0c790: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c794: 40 9e 01 2c bne- cr7,ffc0c8c0 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); ffc0c798: 38 81 00 14 addi r4,r1,20 ffc0c79c: 48 00 02 21 bl ffc0c9bc /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) ffc0c7a0: 7c 7c 1b 79 mr. r28,r3 ffc0c7a4: 41 82 00 b4 beq- ffc0c858 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { ffc0c7a8: 80 1c 00 4c lwz r0,76(r28) ffc0c7ac: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c7b0: 40 be 00 88 bne+ cr7,ffc0c838 ffc0c7b4: 80 1c 00 5c lwz r0,92(r28) ffc0c7b8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c7bc: 41 9e 00 7c beq- cr7,ffc0c838 IMFS_skip_separator( path, &pathlen, &i); ffc0c7c0: 7f c3 f3 78 mr r3,r30 ffc0c7c4: 38 81 00 08 addi r4,r1,8 ffc0c7c8: 38 a1 00 10 addi r5,r1,16 ffc0c7cc: 4b ff f8 ad bl ffc0c078 if ((path[i] != '.') || (path[i + 1] != '.')) { ffc0c7d0: 81 21 00 10 lwz r9,16(r1) ffc0c7d4: 7c 1e 48 ae lbzx r0,r30,r9 ffc0c7d8: 7c 7e 4a 14 add r3,r30,r9 ffc0c7dc: 2f 80 00 2e cmpwi cr7,r0,46 ffc0c7e0: 40 9e 00 10 bne- cr7,ffc0c7f0 ffc0c7e4: 88 03 00 01 lbz r0,1(r3) ffc0c7e8: 2f 80 00 2e cmpwi cr7,r0,46 ffc0c7ec: 41 be 00 34 beq+ cr7,ffc0c820 <== ALWAYS TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; ffc0c7f0: 81 7c 00 5c lwz r11,92(r28) ffc0c7f4: 39 6b 00 1c addi r11,r11,28 ffc0c7f8: 7c ab a4 aa lswi r5,r11,20 ffc0c7fc: 7c bf a5 aa stswi r5,r31,20 return (*pathloc->ops->evalformake_h)( &path[i], ffc0c800: 81 3f 00 0c lwz r9,12(r31) ffc0c804: 80 09 00 04 lwz r0,4(r9) ffc0c808: 7f e4 fb 78 mr r4,r31 ffc0c80c: 7c 09 03 a6 mtctr r0 ffc0c810: 7f a5 eb 78 mr r5,r29 ffc0c814: 4e 80 04 21 bctrl ffc0c818: 7c 7c 1b 78 mr r28,r3 ffc0c81c: 48 00 00 d4 b ffc0c8f0 pathloc, name ); } i += 2; ffc0c820: 39 29 00 02 addi r9,r9,2 pathlen -= 2; node = node->Parent; ffc0c824: 83 9c 00 08 lwz r28,8(r28) *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; ffc0c828: 91 21 00 10 stw r9,16(r1) pathlen -= 2; ffc0c82c: 81 21 00 08 lwz r9,8(r1) ffc0c830: 38 09 ff fe addi r0,r9,-2 ffc0c834: 90 01 00 08 stw r0,8(r1) node = node->Parent; } pathloc->node_access = node; ffc0c838: 93 9f 00 00 stw r28,0(r31) ffc0c83c: 4b ff fe 18 b ffc0c654 } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); ffc0c840: 48 00 34 45 bl ffc0fc84 <__errno> ffc0c844: 38 00 00 11 li r0,17 ffc0c848: 48 00 00 a0 b ffc0c8e8 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); ffc0c84c: 48 00 34 39 bl ffc0fc84 <__errno> ffc0c850: 38 00 00 5b li r0,91 ffc0c854: 48 00 00 94 b ffc0c8e8 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; ffc0c858: 80 01 00 0c lwz r0,12(r1) ffc0c85c: 81 21 00 10 lwz r9,16(r1) ffc0c860: 7c 00 48 50 subf r0,r0,r9 ffc0c864: 7c 1e 02 14 add r0,r30,r0 ffc0c868: 90 1d 00 00 stw r0,0(r29) /* * 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++) { ffc0c86c: 48 00 00 28 b ffc0c894 if ( !IMFS_is_separator( path[ i ] ) ) ffc0c870: 4b ff 91 05 bl ffc05974 ffc0c874: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c878: 40 be 00 10 bne+ cr7,ffc0c888 rtems_set_errno_and_return_minus_one( ENOENT ); ffc0c87c: 48 00 34 09 bl ffc0fc84 <__errno> ffc0c880: 38 00 00 02 li r0,2 ffc0c884: 48 00 00 64 b ffc0c8e8 /* * 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++) { ffc0c888: 81 21 00 10 lwz r9,16(r1) ffc0c88c: 38 09 00 01 addi r0,r9,1 ffc0c890: 90 01 00 10 stw r0,16(r1) ffc0c894: 80 01 00 10 lwz r0,16(r1) ffc0c898: 7c 7e 00 ae lbzx r3,r30,r0 ffc0c89c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c8a0: 40 9e ff d0 bne+ cr7,ffc0c870 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0c8a4: 7f e3 fb 78 mr r3,r31 ffc0c8a8: 4b ff f8 3d bl ffc0c0e4 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) ffc0c8ac: 81 3f 00 00 lwz r9,0(r31) /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0c8b0: 7c 7c 1b 78 mr r28,r3 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) ffc0c8b4: 80 09 00 4c lwz r0,76(r9) ffc0c8b8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c8bc: 41 be 00 10 beq+ cr7,ffc0c8cc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0c8c0: 48 00 33 c5 bl ffc0fc84 <__errno> ffc0c8c4: 38 00 00 14 li r0,20 ffc0c8c8: 48 00 00 20 b ffc0c8e8 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) ffc0c8cc: 7f e3 fb 78 mr r3,r31 ffc0c8d0: 38 80 00 03 li r4,3 ffc0c8d4: 4b ff f8 81 bl ffc0c154 ffc0c8d8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c8dc: 40 be 00 14 bne+ cr7,ffc0c8f0 rtems_set_errno_and_return_minus_one( EACCES ); ffc0c8e0: 48 00 33 a5 bl ffc0fc84 <__errno> ffc0c8e4: 38 00 00 0d li r0,13 ffc0c8e8: 90 03 00 00 stw r0,0(r3) ffc0c8ec: 3b 80 ff ff li r28,-1 return result; } ffc0c8f0: 39 61 00 50 addi r11,r1,80 ffc0c8f4: 7f 83 e3 78 mr r3,r28 ffc0c8f8: 4b ff 3c 38 b ffc00530 <_restgpr_26_x> =============================================================================== ffc0c154 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { ffc0c154: 7c 08 02 a6 mflr r0 ffc0c158: 94 21 ff f8 stwu r1,-8(r1) ffc0c15c: 90 01 00 0c stw r0,12(r1) uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) ffc0c160: 54 80 00 39 rlwinm. r0,r4,0,0,28 ffc0c164: 41 a2 00 18 beq+ ffc0c17c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); ffc0c168: 48 00 3b 1d bl ffc0fc84 <__errno> <== NOT EXECUTED ffc0c16c: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0c170: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0c174: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0c178: 48 00 00 20 b ffc0c198 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) ffc0c17c: 81 23 00 00 lwz r9,0(r3) */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; ffc0c180: 54 84 30 32 rlwinm r4,r4,6,0,25 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) ffc0c184: 80 69 00 30 lwz r3,48(r9) ffc0c188: 7c 83 18 38 and r3,r4,r3 return 1; ffc0c18c: 7c 63 22 78 xor r3,r3,r4 ffc0c190: 7c 63 00 34 cntlzw r3,r3 ffc0c194: 54 63 d9 7e rlwinm r3,r3,27,5,31 return 0; } ffc0c198: 80 01 00 0c lwz r0,12(r1) ffc0c19c: 38 21 00 08 addi r1,r1,8 ffc0c1a0: 7c 08 03 a6 mtlr r0 ffc0c1a4: 4e 80 00 20 blr =============================================================================== ffc04e44 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc04e44: 94 21 ff f0 stwu r1,-16(r1) ffc04e48: 7c 08 02 a6 mflr r0 ffc04e4c: 7c 68 1b 78 mr r8,r3 ffc04e50: 90 01 00 14 stw r0,20(r1) ffc04e54: bf c1 00 08 stmw r30,8(r1) off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); ffc04e58: 81 23 00 1c lwz r9,28(r3) ffc04e5c: 80 69 00 50 lwz r3,80(r9) ffc04e60: 48 00 a3 19 bl ffc0f178 ffc04e64: 7c 7e fe 70 srawi r30,r3,31 IMFS_FIFO_RETURN(err); ffc04e68: 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); ffc04e6c: 7c 7f 1b 78 mr r31,r3 IMFS_FIFO_RETURN(err); ffc04e70: 40 bc 00 18 bge+ cr7,ffc04e88 <== NEVER TAKEN ffc04e74: 48 00 c5 8d bl ffc11400 <__errno> ffc04e78: 7c 1f 00 d0 neg r0,r31 ffc04e7c: 90 03 00 00 stw r0,0(r3) ffc04e80: 3b c0 ff ff li r30,-1 ffc04e84: 3b e0 ff ff li r31,-1 } ffc04e88: 39 61 00 10 addi r11,r1,16 ffc04e8c: 7f c3 f3 78 mr r3,r30 ffc04e90: 7f e4 fb 78 mr r4,r31 ffc04e94: 48 01 ad 20 b ffc1fbb4 <_restgpr_30_x> =============================================================================== ffc04e98 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { ffc04e98: 94 21 ff e0 stwu r1,-32(r1) ffc04e9c: 7c 08 02 a6 mflr r0 ffc04ea0: 7c 66 1b 78 mr r6,r3 ffc04ea4: 90 01 00 24 stw r0,36(r1) ffc04ea8: bf c1 00 18 stmw r30,24(r1) IMFS_jnode_t *jnode = iop->pathinfo.node_access; ffc04eac: 83 e3 00 1c lwz r31,28(r3) int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); ffc04eb0: 80 7f 00 50 lwz r3,80(r31) ffc04eb4: 48 00 a0 89 bl ffc0ef3c if (err > 0) { ffc04eb8: 7c 7e 1b 79 mr. r30,r3 ffc04ebc: 40 81 00 20 ble- ffc04edc IMFS_mtime_ctime_update(jnode); ffc04ec0: 38 61 00 08 addi r3,r1,8 ffc04ec4: 38 80 00 00 li r4,0 ffc04ec8: 48 00 12 65 bl ffc0612c ffc04ecc: 80 01 00 08 lwz r0,8(r1) ffc04ed0: 90 1f 00 44 stw r0,68(r31) ffc04ed4: 90 1f 00 48 stw r0,72(r31) ffc04ed8: 48 00 00 18 b ffc04ef0 } IMFS_FIFO_RETURN(err); ffc04edc: 41 a2 00 14 beq+ ffc04ef0 <== NEVER TAKEN ffc04ee0: 7f de 00 d0 neg r30,r30 ffc04ee4: 48 00 c5 1d bl ffc11400 <__errno> ffc04ee8: 93 c3 00 00 stw r30,0(r3) ffc04eec: 3b c0 ff ff li r30,-1 } ffc04ef0: 39 61 00 20 addi r11,r1,32 ffc04ef4: 7f c3 f3 78 mr r3,r30 ffc04ef8: 48 01 ac bc b ffc1fbb4 <_restgpr_30_x> =============================================================================== ffc0c9bc : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0c9bc: 94 21 ff e8 stwu r1,-24(r1) ffc0c9c0: 7c 08 02 a6 mflr r0 ffc0c9c4: bf a1 00 0c stmw r29,12(r1) /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0c9c8: 3f c0 ff c2 lis r30,-62 ffc0c9cc: 3b de c5 38 addi r30,r30,-15048 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0c9d0: 7c 7f 1b 78 mr r31,r3 ffc0c9d4: 90 01 00 1c stw r0,28(r1) /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0c9d8: 7c 83 23 78 mr r3,r4 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0c9dc: 7c 9d 23 78 mr r29,r4 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0c9e0: 7f c4 f3 78 mr r4,r30 ffc0c9e4: 48 00 45 f1 bl ffc10fd4 ffc0c9e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c9ec: 41 9e 00 58 beq- cr7,ffc0ca44 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) ffc0c9f0: 7f a3 eb 78 mr r3,r29 ffc0c9f4: 38 9e 00 04 addi r4,r30,4 ffc0c9f8: 48 00 45 dd bl ffc10fd4 ffc0c9fc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ca00: 40 be 00 0c bne+ cr7,ffc0ca0c <== ALWAYS TAKEN return directory->Parent; ffc0ca04: 83 ff 00 08 lwz r31,8(r31) <== NOT EXECUTED ffc0ca08: 48 00 00 3c b ffc0ca44 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0ca0c: 83 df 00 50 lwz r30,80(r31) RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc0ca10: 3b ff 00 54 addi r31,r31,84 the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc0ca14: 48 00 00 1c b ffc0ca30 !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 ) ) ffc0ca18: 7f a3 eb 78 mr r3,r29 ffc0ca1c: 38 9e 00 0c addi r4,r30,12 ffc0ca20: 48 00 45 b5 bl ffc10fd4 ffc0ca24: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ca28: 41 9e 00 18 beq- cr7,ffc0ca40 the_chain = &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 ) { ffc0ca2c: 83 de 00 00 lwz r30,0(r30) if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc0ca30: 7f 9e f8 00 cmpw cr7,r30,r31 ffc0ca34: 40 9e ff e4 bne+ cr7,ffc0ca18 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; ffc0ca38: 3b e0 00 00 li r31,0 ffc0ca3c: 48 00 00 08 b ffc0ca44 !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 ) ) ffc0ca40: 7f df f3 78 mr r31,r30 return the_jnode; } return 0; } ffc0ca44: 39 61 00 18 addi r11,r1,24 ffc0ca48: 7f e3 fb 78 mr r3,r31 ffc0ca4c: 4b ff 3a f0 b ffc0053c <_restgpr_29_x> =============================================================================== ffc0c8fc : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0c8fc: 94 21 ff c8 stwu r1,-56(r1) ffc0c900: 7c 08 02 a6 mflr r0 /* * 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; ffc0c904: 7c 6b 1b 78 mr r11,r3 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0c908: 90 01 00 3c stw r0,60(r1) * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; ffc0c90c: 38 81 00 08 addi r4,r1,8 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; ffc0c910: 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 ) { ffc0c914: bf a1 00 2c stmw r29,44(r1) temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc0c918: 7c 9e 23 78 mr r30,r4 /* * 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; ffc0c91c: 87 eb 00 1c lwzu r31,28(r11) loc = temp_mt_entry->mt_fs_root; ffc0c920: 7c ab a4 aa lswi r5,r11,20 ffc0c924: 7c a4 a5 aa stswi r5,r4,20 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; ffc0c928: 90 03 00 1c stw r0,28(r3) ffc0c92c: 48 00 00 08 b ffc0c934 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); ffc0c930: 7c 1f 03 78 mr r31,r0 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc0c934: 7f c3 f3 78 mr r3,r30 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; ffc0c938: 83 bf 00 08 lwz r29,8(r31) loc.node_access = (void *)jnode; ffc0c93c: 93 e1 00 08 stw r31,8(r1) IMFS_Set_handlers( &loc ); ffc0c940: 4b ff f7 a5 bl ffc0c0e4 if ( jnode->type != IMFS_DIRECTORY ) { ffc0c944: 80 1f 00 4c lwz r0,76(r31) ffc0c948: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c94c: 40 9e 00 14 bne- cr7,ffc0c960 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { ffc0c950: 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 ); ffc0c954: 38 1f 00 54 addi r0,r31,84 ffc0c958: 7f 89 00 00 cmpw cr7,r9,r0 ffc0c95c: 40 be 00 1c bne+ cr7,ffc0c978 result = IMFS_unlink( NULL, &loc ); ffc0c960: 38 60 00 00 li r3,0 ffc0c964: 7f c4 f3 78 mr r4,r30 ffc0c968: 4b ff 77 25 bl ffc0408c if (result != 0) ffc0c96c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c970: 40 9e 00 38 bne- cr7,ffc0c9a8 <== NEVER TAKEN return -1; jnode = next; ffc0c974: 7f bf eb 78 mr r31,r29 } if ( jnode != NULL ) { ffc0c978: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0c97c: 41 9e 00 34 beq- cr7,ffc0c9b0 if ( jnode->type == IMFS_DIRECTORY ) { ffc0c980: 80 1f 00 4c lwz r0,76(r31) ffc0c984: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c988: 40 9e ff ac bne+ cr7,ffc0c934 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0c98c: 80 1f 00 50 lwz r0,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 ); ffc0c990: 39 3f 00 54 addi r9,r31,84 if ( jnode_has_children( jnode ) ) ffc0c994: 7f 80 48 00 cmpw cr7,r0,r9 ffc0c998: 41 be ff 9c beq- cr7,ffc0c934 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); ffc0c99c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c9a0: 40 9e ff 90 bne+ cr7,ffc0c930 <== ALWAYS TAKEN ffc0c9a4: 48 00 00 0c b ffc0c9b0 <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; ffc0c9a8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0c9ac: 48 00 00 08 b ffc0c9b4 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; ffc0c9b0: 38 60 00 00 li r3,0 } ffc0c9b4: 39 61 00 38 addi r11,r1,56 ffc0c9b8: 4b ff 3b 84 b ffc0053c <_restgpr_29_x> =============================================================================== ffc0ca50 : const char *path, int pathlen, char *token, int *token_len ) { ffc0ca50: 94 21 ff e0 stwu r1,-32(r1) ffc0ca54: 7c 08 02 a6 mflr r0 ffc0ca58: bf 41 00 08 stmw r26,8(r1) ffc0ca5c: 7c 7f 1b 78 mr r31,r3 ffc0ca60: 7c 9d 23 78 mr r29,r4 ffc0ca64: 90 01 00 24 stw r0,36(r1) ffc0ca68: 7c be 2b 78 mr r30,r5 ffc0ca6c: 7c da 33 78 mr r26,r6 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; ffc0ca70: 8b 63 00 00 lbz r27,0(r3) int pathlen, char *token, int *token_len ) { register int i = 0; ffc0ca74: 3b 80 00 00 li r28,0 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { ffc0ca78: 48 00 00 18 b ffc0ca90 token[i] = c; if ( i == IMFS_NAME_MAX ) ffc0ca7c: 2f 9c 00 20 cmpwi cr7,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) ) { token[i] = c; ffc0ca80: 7f 7e e1 ae stbx r27,r30,r28 if ( i == IMFS_NAME_MAX ) ffc0ca84: 41 9e 00 b4 beq- cr7,ffc0cb38 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; ffc0ca88: 3b 9c 00 01 addi r28,r28,1 ffc0ca8c: 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) ) { ffc0ca90: 7f 63 db 78 mr r3,r27 ffc0ca94: 4b ff 8e e1 bl ffc05974 ffc0ca98: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ca9c: 40 9e 00 0c bne- cr7,ffc0caa8 ffc0caa0: 7f 9c e8 00 cmpw cr7,r28,r29 ffc0caa4: 41 9c ff d8 blt+ cr7,ffc0ca7c /* * Copy a seperator into token. */ if ( i == 0 ) { ffc0caa8: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0caac: 40 9e 00 30 bne- cr7,ffc0cadc token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0cab0: 2f 9b 00 00 cmpwi cr7,r27,0 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; ffc0cab4: 9b 7e 00 00 stb r27,0(r30) if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; ffc0cab8: 3b e0 00 00 li r31,0 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0cabc: 41 9e 00 3c beq- cr7,ffc0caf8 ffc0cac0: 2f 9d 00 00 cmpwi cr7,r29,0 i++; type = IMFS_CURRENT_DIR; ffc0cac4: 3b e0 00 01 li r31,1 if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; ffc0cac8: 3b 80 00 01 li r28,1 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0cacc: 40 9e 00 2c bne- cr7,ffc0caf8 ffc0cad0: 3b 80 00 00 li r28,0 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; ffc0cad4: 3b e0 00 00 li r31,0 ffc0cad8: 48 00 00 20 b ffc0caf8 } } else if (token[ i-1 ] != '\0') { ffc0cadc: 7d 3e e2 14 add r9,r30,r28 ffc0cae0: 88 09 ff ff lbz r0,-1(r9) char *token, int *token_len ) { register int i = 0; IMFS_token_types type = IMFS_NAME; ffc0cae4: 3b e0 00 03 li r31,3 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { ffc0cae8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0caec: 41 9e 00 0c beq- cr7,ffc0caf8 <== NEVER TAKEN token[i] = '\0'; ffc0caf0: 38 00 00 00 li r0,0 ffc0caf4: 7c 1e e1 ae stbx r0,r30,r28 /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { ffc0caf8: 2f 9f 00 03 cmpwi cr7,r31,3 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0cafc: 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 ) { ffc0cb00: 40 be 00 4c bne+ cr7,ffc0cb4c if ( strcmp( token, "..") == 0 ) ffc0cb04: 3c 80 ff c2 lis r4,-62 ffc0cb08: 7f c3 f3 78 mr r3,r30 ffc0cb0c: 38 84 c5 3f addi r4,r4,-15041 ffc0cb10: 48 00 44 c5 bl ffc10fd4 ffc0cb14: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cb18: 41 9e 00 28 beq- cr7,ffc0cb40 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) ffc0cb1c: 3c 80 ff c2 lis r4,-62 ffc0cb20: 7f c3 f3 78 mr r3,r30 ffc0cb24: 38 84 c5 40 addi r4,r4,-15040 ffc0cb28: 48 00 44 ad bl ffc10fd4 ffc0cb2c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cb30: 41 9e 00 18 beq- cr7,ffc0cb48 ffc0cb34: 48 00 00 18 b ffc0cb4c while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; ffc0cb38: 3b e0 00 04 li r31,4 ffc0cb3c: 48 00 00 10 b ffc0cb4c * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; ffc0cb40: 3b e0 00 02 li r31,2 ffc0cb44: 48 00 00 08 b ffc0cb4c else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; ffc0cb48: 3b e0 00 01 li r31,1 } return type; } ffc0cb4c: 39 61 00 20 addi r11,r1,32 ffc0cb50: 7f e3 fb 78 mr r3,r31 ffc0cb54: 4b ff 39 dc b ffc00530 <_restgpr_26_x> =============================================================================== ffc0eb1c : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc0eb1c: 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 ) ffc0eb20: 3d 20 00 00 lis r9,0 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc0eb24: 7c 08 02 a6 mflr r0 ffc0eb28: bf 01 00 18 stmw r24,24(r1) ffc0eb2c: 7c 7f 1b 78 mr r31,r3 ffc0eb30: 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 ) ffc0eb34: 83 c9 27 a4 lwz r30,10148(r9) */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc0eb38: 7c dd 33 78 mr r29,r6 ffc0eb3c: 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 ) ffc0eb40: 57 c9 f0 be rlwinm r9,r30,30,2,31 ffc0eb44: 39 69 00 01 addi r11,r9,1 ffc0eb48: 7d 6b 49 d6 mullw r11,r11,r9 ffc0eb4c: 38 0b 00 01 addi r0,r11,1 ffc0eb50: 7d 20 49 d6 mullw r9,r0,r9 ffc0eb54: 38 00 00 00 li r0,0 ffc0eb58: 7f 80 28 00 cmpw cr7,r0,r5 ffc0eb5c: 39 29 ff ff addi r9,r9,-1 ffc0eb60: 7d 29 f1 d6 mullw r9,r9,r30 ffc0eb64: 41 bd 00 1c bgt+ cr7,ffc0eb80 ffc0eb68: 40 9e 00 0c bne- cr7,ffc0eb74 <== NEVER TAKEN ffc0eb6c: 7f 89 30 40 cmplw cr7,r9,r6 ffc0eb70: 41 bd 00 10 bgt+ cr7,ffc0eb80 rtems_set_errno_and_return_minus_one( EINVAL ); ffc0eb74: 48 00 11 11 bl ffc0fc84 <__errno> ffc0eb78: 38 00 00 16 li r0,22 ffc0eb7c: 48 00 00 94 b ffc0ec10 /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) ffc0eb80: 83 3f 00 50 lwz r25,80(r31) ffc0eb84: 83 5f 00 54 lwz r26,84(r31) ffc0eb88: 7f 9c c8 00 cmpw cr7,r28,r25 ffc0eb8c: 41 bd 00 10 bgt+ cr7,ffc0eb9c <== NEVER TAKEN ffc0eb90: 40 9e 00 c8 bne- cr7,ffc0ec58 ffc0eb94: 7f 9d d0 40 cmplw cr7,r29,r26 ffc0eb98: 40 9d 00 c0 ble- cr7,ffc0ec58 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0eb9c: 7f db fe 70 srawi r27,r30,31 ffc0eba0: 7f 65 db 78 mr r5,r27 ffc0eba4: 7f c6 f3 78 mr r6,r30 ffc0eba8: 7f 83 e3 78 mr r3,r28 ffc0ebac: 7f a4 eb 78 mr r4,r29 ffc0ebb0: 48 00 a8 09 bl ffc193b8 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0ebb4: 7f 65 db 78 mr r5,r27 ffc0ebb8: 7f c6 f3 78 mr r6,r30 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0ebbc: 7c 98 23 78 mr r24,r4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0ebc0: 7f 23 cb 78 mr r3,r25 ffc0ebc4: 7f 44 d3 78 mr r4,r26 ffc0ebc8: 48 00 a7 f1 bl ffc193b8 <__divdi3> ffc0ebcc: 7c 9b 23 78 mr r27,r4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc0ebd0: 7c 9e 23 78 mr r30,r4 ffc0ebd4: 48 00 00 4c b ffc0ec20 if ( IMFS_memfile_addblock( the_jnode, block ) ) { ffc0ebd8: 7f e3 fb 78 mr r3,r31 ffc0ebdc: 7f c4 f3 78 mr r4,r30 ffc0ebe0: 4b ff fc e9 bl ffc0e8c8 ffc0ebe4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ebe8: 41 be 00 34 beq+ cr7,ffc0ec1c ffc0ebec: 48 00 00 14 b ffc0ec00 for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); ffc0ebf0: 7f c4 f3 78 mr r4,r30 ffc0ebf4: 7f e3 fb 78 mr r3,r31 ffc0ebf8: 4b ff fe e9 bl ffc0eae0 /* * 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-- ) { ffc0ebfc: 3b de ff ff addi r30,r30,-1 ffc0ec00: 7f 9e d8 40 cmplw cr7,r30,r27 ffc0ec04: 40 9c ff ec bge+ cr7,ffc0ebf0 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); ffc0ec08: 48 00 10 7d bl ffc0fc84 <__errno> ffc0ec0c: 38 00 00 1c li r0,28 ffc0ec10: 90 03 00 00 stw r0,0(r3) ffc0ec14: 38 60 ff ff li r3,-1 ffc0ec18: 48 00 00 44 b ffc0ec5c old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc0ec1c: 3b de 00 01 addi r30,r30,1 ffc0ec20: 7f 9e c0 40 cmplw cr7,r30,r24 ffc0ec24: 40 9d ff b4 ble+ cr7,ffc0ebd8 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc0ec28: 93 9f 00 50 stw r28,80(r31) IMFS_update_ctime(the_jnode); ffc0ec2c: 38 80 00 00 li r4,0 ffc0ec30: 38 61 00 08 addi r3,r1,8 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc0ec34: 93 bf 00 54 stw r29,84(r31) IMFS_update_ctime(the_jnode); ffc0ec38: 4b ff 5d d9 bl ffc04a10 ffc0ec3c: 80 01 00 08 lwz r0,8(r1) IMFS_update_mtime(the_jnode); ffc0ec40: 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); ffc0ec44: 90 1f 00 48 stw r0,72(r31) IMFS_update_mtime(the_jnode); ffc0ec48: 38 80 00 00 li r4,0 ffc0ec4c: 4b ff 5d c5 bl ffc04a10 ffc0ec50: 80 01 00 08 lwz r0,8(r1) ffc0ec54: 90 1f 00 44 stw r0,68(r31) /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) return 0; ffc0ec58: 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; } ffc0ec5c: 39 61 00 38 addi r11,r1,56 ffc0ec60: 4b ff 18 c8 b ffc00528 <_restgpr_24_x> =============================================================================== ffc0e4dc : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc0e4dc: 3d 20 00 00 lis r9,0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc0e4e0: 94 21 ff e0 stwu r1,-32(r1) ffc0e4e4: 7c 08 02 a6 mflr r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc0e4e8: 81 29 27 a4 lwz r9,10148(r9) #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc0e4ec: 90 01 00 24 stw r0,36(r1) my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc0e4f0: 55 29 f0 be rlwinm r9,r9,30,2,31 ffc0e4f4: 38 09 ff ff addi r0,r9,-1 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc0e4f8: bf 61 00 0c stmw r27,12(r1) my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc0e4fc: 7f 84 00 40 cmplw cr7,r4,r0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc0e500: 7c 7f 1b 78 mr r31,r3 ffc0e504: 7c 9e 23 78 mr r30,r4 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc0e508: 41 9d 00 44 bgt- cr7,ffc0e54c p = info->indirect; if ( malloc_it ) { ffc0e50c: 2f 05 00 00 cmpwi cr6,r5,0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; ffc0e510: 80 03 00 58 lwz r0,88(r3) ffc0e514: 2f 80 00 00 cmpwi cr7,r0,0 if ( malloc_it ) { ffc0e518: 41 9a 00 2c beq- cr6,ffc0e544 if ( !p ) { ffc0e51c: 40 be 00 18 bne+ cr7,ffc0e534 p = memfile_alloc_block(); ffc0e520: 4b ff ff 79 bl ffc0e498 if ( !p ) return 0; ffc0e524: 3b a0 00 00 li r29,0 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) ffc0e528: 2c 03 00 00 cmpwi r3,0 ffc0e52c: 41 82 01 78 beq- ffc0e6a4 <== NEVER TAKEN return 0; info->indirect = p; ffc0e530: 90 7f 00 58 stw r3,88(r31) } return &info->indirect[ my_block ]; ffc0e534: 83 bf 00 58 lwz r29,88(r31) ffc0e538: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0e53c: 7f bd f2 14 add r29,r29,r30 ffc0e540: 48 00 01 64 b ffc0e6a4 } if ( !p ) ffc0e544: 40 be 01 50 bne+ cr7,ffc0e694 <== ALWAYS TAKEN ffc0e548: 48 00 01 58 b ffc0e6a0 <== NOT EXECUTED /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { ffc0e54c: 39 69 00 01 addi r11,r9,1 ffc0e550: 7d 6b 49 d6 mullw r11,r11,r9 ffc0e554: 38 0b ff ff addi r0,r11,-1 ffc0e558: 7f 84 00 40 cmplw cr7,r4,r0 ffc0e55c: 41 9d 00 60 bgt- cr7,ffc0e5bc my_block -= FIRST_DOUBLY_INDIRECT; ffc0e560: 7f c9 20 50 subf r30,r9,r4 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; ffc0e564: 80 63 00 5c lwz r3,92(r3) */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc0e568: 7f 9e 4b 96 divwu r28,r30,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc0e56c: 2f 05 00 00 cmpwi cr6,r5,0 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc0e570: 7d 3c 49 d6 mullw r9,r28,r9 ffc0e574: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e578: 7f c9 f0 50 subf r30,r9,r30 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc0e57c: 41 9a 00 2c beq- cr6,ffc0e5a8 if ( !p ) { ffc0e580: 40 be 00 18 bne+ cr7,ffc0e598 p = memfile_alloc_block(); ffc0e584: 4b ff ff 15 bl ffc0e498 if ( !p ) return 0; ffc0e588: 3b a0 00 00 li r29,0 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) ffc0e58c: 2c 03 00 00 cmpwi r3,0 ffc0e590: 41 82 01 14 beq- ffc0e6a4 <== NEVER TAKEN return 0; info->doubly_indirect = p; ffc0e594: 90 7f 00 5c stw r3,92(r31) } p1 = (block_p *)p[ doubly ]; ffc0e598: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc0e59c: 7f e3 e2 14 add r31,r3,r28 ffc0e5a0: 7c 63 e0 2e lwzx r3,r3,r28 ffc0e5a4: 48 00 00 a4 b ffc0e648 } return (block_p *)&p1[ singly ]; } if ( !p ) ffc0e5a8: 41 9e 00 f8 beq- cr7,ffc0e6a0 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; ffc0e5ac: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc0e5b0: 7c 03 e0 2e lwzx r0,r3,r28 if ( !p ) return 0; ffc0e5b4: 3b a0 00 00 li r29,0 ffc0e5b8: 48 00 00 d4 b ffc0e68c } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc0e5bc: 39 4b 00 01 addi r10,r11,1 ffc0e5c0: 7d 4a 49 d6 mullw r10,r10,r9 } /* * This means the requested block number is out of range. */ return 0; ffc0e5c4: 3b a0 00 00 li r29,0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc0e5c8: 38 0a ff ff addi r0,r10,-1 ffc0e5cc: 7f 84 00 40 cmplw cr7,r4,r0 ffc0e5d0: 41 9d 00 d4 bgt- cr7,ffc0e6a4 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; ffc0e5d4: 7f cb 20 50 subf r30,r11,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; ffc0e5d8: 80 63 00 60 lwz r3,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; ffc0e5dc: 7c 1e 4b 96 divwu r0,r30,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; ffc0e5e0: 7f 80 4b 96 divwu r28,r0,r9 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { ffc0e5e4: 2f 05 00 00 cmpwi cr6,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; ffc0e5e8: 7d 60 49 d6 mullw r11,r0,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ffc0e5ec: 7f 7c 49 d6 mullw r27,r28,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; ffc0e5f0: 7f cb f0 50 subf r30,r11,r30 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ffc0e5f4: 7f 7b 00 50 subf r27,r27,r0 ffc0e5f8: 2f 83 00 00 cmpwi cr7,r3,0 p = info->triply_indirect; if ( malloc_it ) { ffc0e5fc: 41 9a 00 74 beq- cr6,ffc0e670 if ( !p ) { ffc0e600: 40 be 00 14 bne+ cr7,ffc0e614 p = memfile_alloc_block(); ffc0e604: 4b ff fe 95 bl ffc0e498 if ( !p ) ffc0e608: 2c 03 00 00 cmpwi r3,0 ffc0e60c: 41 82 00 98 beq- ffc0e6a4 <== NEVER TAKEN return 0; info->triply_indirect = p; ffc0e610: 90 7f 00 60 stw r3,96(r31) } p1 = (block_p *) p[ triply ]; ffc0e614: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc0e618: 7f e3 e2 14 add r31,r3,r28 ffc0e61c: 7c 63 e0 2e lwzx r3,r3,r28 if ( !p1 ) { ffc0e620: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e624: 40 be 00 18 bne+ cr7,ffc0e63c p1 = memfile_alloc_block(); ffc0e628: 4b ff fe 71 bl ffc0e498 if ( !p1 ) return 0; ffc0e62c: 3b a0 00 00 li r29,0 } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) ffc0e630: 2c 03 00 00 cmpwi r3,0 ffc0e634: 41 82 00 70 beq- ffc0e6a4 <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; ffc0e638: 90 7f 00 00 stw r3,0(r31) } p2 = (block_p *)p1[ doubly ]; ffc0e63c: 57 7b 10 3a rlwinm r27,r27,2,0,29 ffc0e640: 7f e3 da 14 add r31,r3,r27 ffc0e644: 7c 63 d8 2e lwzx r3,r3,r27 if ( !p2 ) { ffc0e648: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e64c: 40 be 00 18 bne+ cr7,ffc0e664 p2 = memfile_alloc_block(); ffc0e650: 4b ff fe 49 bl ffc0e498 if ( !p2 ) return 0; ffc0e654: 3b a0 00 00 li r29,0 } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) ffc0e658: 2c 03 00 00 cmpwi r3,0 ffc0e65c: 41 82 00 48 beq- ffc0e6a4 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; ffc0e660: 90 7f 00 00 stw r3,0(r31) } return (block_p *)&p2[ singly ]; ffc0e664: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0e668: 7f a3 f2 14 add r29,r3,r30 ffc0e66c: 48 00 00 38 b ffc0e6a4 } if ( !p ) ffc0e670: 41 9e 00 34 beq- cr7,ffc0e6a4 <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; ffc0e674: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc0e678: 7d 23 e0 2e lwzx r9,r3,r28 if ( !p1 ) ffc0e67c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e680: 41 9e 00 24 beq- cr7,ffc0e6a4 <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; ffc0e684: 57 7b 10 3a rlwinm r27,r27,2,0,29 ffc0e688: 7c 09 d8 2e lwzx r0,r9,r27 if ( !p2 ) ffc0e68c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e690: 41 9e 00 14 beq- cr7,ffc0e6a4 <== NEVER TAKEN return 0; return (block_p *)&p2[ singly ]; ffc0e694: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0e698: 7f a0 f2 14 add r29,r0,r30 ffc0e69c: 48 00 00 08 b ffc0e6a4 } return &info->indirect[ my_block ]; } if ( !p ) return 0; ffc0e6a0: 3b a0 00 00 li r29,0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } ffc0e6a4: 39 61 00 20 addi r11,r1,32 ffc0e6a8: 7f a3 eb 78 mr r3,r29 ffc0e6ac: 4b ff 1e 88 b ffc00534 <_restgpr_27_x> =============================================================================== ffc0e6b0 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc0e6b0: 94 21 ff c8 stwu r1,-56(r1) ffc0e6b4: 7c 08 02 a6 mflr r0 ffc0e6b8: 90 01 00 3c stw r0,60(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) { ffc0e6bc: 80 03 00 4c lwz r0,76(r3) IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc0e6c0: bf 01 00 18 stmw r24,24(r1) ffc0e6c4: 7c 7d 1b 78 mr r29,r3 * 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) { ffc0e6c8: 2f 80 00 06 cmpwi cr7,r0,6 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc0e6cc: 7c df 33 78 mr r31,r6 ffc0e6d0: 7c be 2b 78 mr r30,r5 ffc0e6d4: 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) { ffc0e6d8: 40 be 00 68 bne+ cr7,ffc0e740 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) ffc0e6dc: 81 43 00 50 lwz r10,80(r3) ffc0e6e0: 38 00 00 00 li r0,0 ffc0e6e4: 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; ffc0e6e8: 80 83 00 58 lwz r4,88(r3) if (my_length > (the_jnode->info.linearfile.size - start)) ffc0e6ec: 7c ff 58 10 subfc r7,r31,r11 ffc0e6f0: 7c de 51 10 subfe r6,r30,r10 ffc0e6f4: 7f 80 30 00 cmpw cr7,r0,r6 ffc0e6f8: 41 bd 00 10 bgt+ cr7,ffc0e708 <== NEVER TAKEN ffc0e6fc: 40 9e 00 14 bne- cr7,ffc0e710 <== NEVER TAKEN ffc0e700: 7f 88 38 40 cmplw cr7,r8,r7 ffc0e704: 40 9d 00 0c ble- cr7,ffc0e710 <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; ffc0e708: 7f 7f 58 50 subf r27,r31,r11 ffc0e70c: 48 00 00 08 b ffc0e714 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc0e710: 7d 1b 43 78 mr r27,r8 <== NOT EXECUTED file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); ffc0e714: 7c 84 fa 14 add r4,r4,r31 ffc0e718: 7f 65 db 78 mr r5,r27 ffc0e71c: 7f 83 e3 78 mr r3,r28 ffc0e720: 48 00 22 a1 bl ffc109c0 IMFS_update_atime( the_jnode ); ffc0e724: 38 61 00 08 addi r3,r1,8 ffc0e728: 38 80 00 00 li r4,0 ffc0e72c: 4b ff 62 e5 bl ffc04a10 ffc0e730: 80 01 00 08 lwz r0,8(r1) return my_length; ffc0e734: 7f 7e db 78 mr r30,r27 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 ); ffc0e738: 90 1d 00 40 stw r0,64(r29) return my_length; ffc0e73c: 48 00 01 64 b ffc0e8a0 /* * 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 ) ffc0e740: 81 63 00 50 lwz r11,80(r3) ffc0e744: 39 40 00 00 li r10,0 /* * 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; ffc0e748: 7c c0 33 78 mr r0,r6 if ( last_byte > the_jnode->info.file.size ) ffc0e74c: 83 63 00 54 lwz r27,84(r3) ffc0e750: 7f 8a 58 00 cmpw cr7,r10,r11 /* * 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; ffc0e754: 7d 28 32 14 add r9,r8,r6 if ( last_byte > the_jnode->info.file.size ) ffc0e758: 41 9d 00 10 bgt- cr7,ffc0e768 <== NEVER TAKEN ffc0e75c: 40 9e 00 14 bne- cr7,ffc0e770 <== NEVER TAKEN ffc0e760: 7f 89 d8 40 cmplw cr7,r9,r27 ffc0e764: 40 9d 00 0c ble- cr7,ffc0e770 my_length = the_jnode->info.file.size - start; ffc0e768: 7f 60 d8 50 subf r27,r0,r27 ffc0e76c: 48 00 00 08 b ffc0e774 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc0e770: 7d 1b 43 78 mr r27,r8 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e774: 3d 20 00 00 lis r9,0 ffc0e778: 83 49 27 a4 lwz r26,10148(r9) ffc0e77c: 7f c3 f3 78 mr r3,r30 ffc0e780: 7f e4 fb 78 mr r4,r31 ffc0e784: 7f 58 fe 70 srawi r24,r26,31 ffc0e788: 7f 05 c3 78 mr r5,r24 ffc0e78c: 7f 46 d3 78 mr r6,r26 ffc0e790: 48 00 b0 69 bl ffc197f8 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e794: 7f c3 f3 78 mr r3,r30 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e798: 7c 99 23 78 mr r25,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e79c: 7f 05 c3 78 mr r5,r24 ffc0e7a0: 7f e4 fb 78 mr r4,r31 ffc0e7a4: 7f 46 d3 78 mr r6,r26 ffc0e7a8: 48 00 ac 11 bl ffc193b8 <__divdi3> if ( start_offset ) { ffc0e7ac: 2f 99 00 00 cmpwi cr7,r25,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; ffc0e7b0: 7c 98 23 78 mr r24,r4 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; ffc0e7b4: 7f 9f e3 78 mr r31,r28 */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; ffc0e7b8: 3b c0 00 00 li r30,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 ) { ffc0e7bc: 41 9e 00 4c beq- cr7,ffc0e808 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 ); ffc0e7c0: 7f a3 eb 78 mr r3,r29 ffc0e7c4: 38 a0 00 00 li r5,0 ffc0e7c8: 4b ff fd 15 bl ffc0e4dc if ( !block_ptr ) ffc0e7cc: 2c 03 00 00 cmpwi r3,0 ffc0e7d0: 41 82 00 d0 beq- ffc0e8a0 <== 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; ffc0e7d4: 7f 59 d0 50 subf r26,r25,r26 ffc0e7d8: 7f 9b d0 40 cmplw cr7,r27,r26 ffc0e7dc: 7f 7e db 78 mr r30,r27 ffc0e7e0: 40 9d 00 08 ble- cr7,ffc0e7e8 ffc0e7e4: 7f 5e d3 78 mr r30,r26 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 ); ffc0e7e8: 80 83 00 00 lwz r4,0(r3) ffc0e7ec: 7f c5 f3 78 mr r5,r30 ffc0e7f0: 7f 83 e3 78 mr r3,r28 ffc0e7f4: 7c 84 ca 14 add r4,r4,r25 ffc0e7f8: 48 00 21 c9 bl ffc109c0 dest += to_copy; ffc0e7fc: 7f fc f2 14 add r31,r28,r30 block++; ffc0e800: 3b 18 00 01 addi r24,r24,1 my_length -= to_copy; ffc0e804: 7f 7e d8 50 subf r27,r30,r27 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e808: 3f 40 00 00 lis r26,0 ffc0e80c: 83 9a 27 a4 lwz r28,10148(r26) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc0e810: 48 00 00 3c b ffc0e84c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc0e814: 7f a3 eb 78 mr r3,r29 ffc0e818: 7f 04 c3 78 mr r4,r24 ffc0e81c: 38 a0 00 00 li r5,0 ffc0e820: 4b ff fc bd bl ffc0e4dc if ( !block_ptr ) ffc0e824: 7c 69 1b 79 mr. r9,r3 ffc0e828: 41 82 00 78 beq- ffc0e8a0 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc0e82c: 80 89 00 00 lwz r4,0(r9) ffc0e830: 7f e3 fb 78 mr r3,r31 ffc0e834: 7f 85 e3 78 mr r5,r28 ffc0e838: 48 00 21 89 bl ffc109c0 dest += to_copy; ffc0e83c: 7f ff e2 14 add r31,r31,r28 block++; ffc0e840: 3b 18 00 01 addi r24,r24,1 my_length -= to_copy; ffc0e844: 7f 7c d8 50 subf r27,r28,r27 copied += to_copy; ffc0e848: 7f de e2 14 add r30,r30,r28 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc0e84c: 80 1a 27 a4 lwz r0,10148(r26) ffc0e850: 7f 9b 00 40 cmplw cr7,r27,r0 ffc0e854: 40 9c ff c0 bge+ cr7,ffc0e814 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { ffc0e858: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0e85c: 41 9e 00 30 beq- cr7,ffc0e88c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc0e860: 7f a3 eb 78 mr r3,r29 ffc0e864: 7f 04 c3 78 mr r4,r24 ffc0e868: 38 a0 00 00 li r5,0 ffc0e86c: 4b ff fc 71 bl ffc0e4dc if ( !block_ptr ) ffc0e870: 7c 69 1b 79 mr. r9,r3 ffc0e874: 41 82 00 2c beq- ffc0e8a0 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); ffc0e878: 80 89 00 00 lwz r4,0(r9) ffc0e87c: 7f e3 fb 78 mr r3,r31 ffc0e880: 7f 65 db 78 mr r5,r27 ffc0e884: 48 00 21 3d bl ffc109c0 copied += my_length; ffc0e888: 7f db f2 14 add r30,r27,r30 } IMFS_update_atime( the_jnode ); ffc0e88c: 38 61 00 08 addi r3,r1,8 ffc0e890: 38 80 00 00 li r4,0 ffc0e894: 4b ff 61 7d bl ffc04a10 ffc0e898: 80 01 00 08 lwz r0,8(r1) ffc0e89c: 90 1d 00 40 stw r0,64(r29) return copied; } ffc0e8a0: 39 61 00 38 addi r11,r1,56 ffc0e8a4: 7f c3 f3 78 mr r3,r30 ffc0e8a8: 4b ff 1c 80 b ffc00528 <_restgpr_24_x> =============================================================================== ffc0e9b0 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc0e9b0: 94 21 ff d8 stwu r1,-40(r1) ffc0e9b4: 7c 08 02 a6 mflr r0 /* * 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; ffc0e9b8: 3d 20 00 00 lis r9,0 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc0e9bc: 90 01 00 2c stw r0,44(r1) * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc0e9c0: 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 ) { ffc0e9c4: bf 21 00 0c stmw r25,12(r1) ffc0e9c8: 7c 7f 1b 78 mr r31,r3 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc0e9cc: 2f 80 00 00 cmpwi cr7,r0,0 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; ffc0e9d0: 83 c9 27 a4 lwz r30,10148(r9) ffc0e9d4: 57 de f0 be rlwinm r30,r30,30,2,31 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc0e9d8: 41 9e 00 10 beq- cr7,ffc0e9e8 memfile_free_blocks_in_table( &info->indirect, to_free ); ffc0e9dc: 38 63 00 58 addi r3,r3,88 ffc0e9e0: 7f c4 f3 78 mr r4,r30 ffc0e9e4: 4b ff ff 69 bl ffc0e94c } if ( info->doubly_indirect ) { ffc0e9e8: 80 1f 00 5c lwz r0,92(r31) ffc0e9ec: 3b a0 00 00 li r29,0 for ( i=0 ; iindirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { ffc0e9f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e9f8: 40 be 00 2c bne+ cr7,ffc0ea24 ffc0e9fc: 48 00 00 44 b ffc0ea40 for ( i=0 ; idoubly_indirect[i] ) { ffc0ea00: 81 3f 00 5c lwz r9,92(r31) * 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( ffc0ea04: 57 a0 10 3a rlwinm r0,r29,2,0,29 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { ffc0ea08: 7c 69 02 14 add r3,r9,r0 ffc0ea0c: 7c 09 00 2e lwzx r0,r9,r0 ffc0ea10: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ea14: 41 9e 00 0c beq- cr7,ffc0ea20 <== NEVER TAKEN memfile_free_blocks_in_table( ffc0ea18: 7f c4 f3 78 mr r4,r30 ffc0ea1c: 4b ff ff 31 bl ffc0e94c 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 ); ffc0ea34: 38 7f 00 5c addi r3,r31,92 ffc0ea38: 7f c4 f3 78 mr r4,r30 ffc0ea3c: 4b ff ff 11 bl ffc0e94c } if ( info->triply_indirect ) { ffc0ea40: 80 1f 00 60 lwz r0,96(r31) ffc0ea44: 3b a0 00 00 li r29,0 for ( i=0 ; idoubly_indirect, to_free ); } if ( info->triply_indirect ) { ffc0ea4c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ea50: 40 be 00 68 bne+ cr7,ffc0eab8 ffc0ea54: 48 00 00 80 b ffc0ead4 for ( i=0 ; itriply_indirect[i]; ffc0ea58: 81 3f 00 60 lwz r9,96(r31) * 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( ffc0ea5c: 57 b9 10 3a rlwinm r25,r29,2,0,29 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc0ea60: 7f 89 c8 2e lwzx r28,r9,r25 if ( !p ) /* ensure we have a valid pointer */ ffc0ea64: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0ea68: 41 9e 00 60 beq- cr7,ffc0eac8 <== NEVER TAKEN ffc0ea6c: 3b 60 00 00 li r27,0 ffc0ea70: 48 00 00 24 b ffc0ea94 break; for ( j=0 ; j<== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); ffc0ea80: 7f 83 e3 78 mr r3,r28 ffc0ea84: 7f c4 f3 78 mr r4,r30 ffc0ea88: 4b ff fe c5 bl ffc0e94c if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( ffc0eaa4: 80 7f 00 60 lwz r3,96(r31) ffc0eaa8: 7f c4 f3 78 mr r4,r30 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( ffc0eac8: 38 7f 00 60 addi r3,r31,96 ffc0eacc: 7f c4 f3 78 mr r4,r30 ffc0ead0: 4b ff fe 7d bl ffc0e94c (block_p **)&info->triply_indirect, to_free ); } return 0; } ffc0ead4: 39 61 00 28 addi r11,r1,40 ffc0ead8: 38 60 00 00 li r3,0 ffc0eadc: 4b ff 1a 50 b ffc0052c <_restgpr_25_x> =============================================================================== ffc0ec64 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc0ec64: 94 21 ff c8 stwu r1,-56(r1) ffc0ec68: 7c 08 02 a6 mflr r0 ffc0ec6c: bf 01 00 18 stmw r24,24(r1) ffc0ec70: 7c de 33 78 mr r30,r6 ffc0ec74: 7c 7f 1b 78 mr r31,r3 ffc0ec78: 90 01 00 3c stw r0,60(r1) ffc0ec7c: 7c bd 2b 78 mr r29,r5 ffc0ec80: 7c fc 3b 78 mr r28,r7 * 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 ) { ffc0ec84: 80 03 00 50 lwz r0,80(r3) IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc0ec88: 7d 1b 43 78 mr r27,r8 /* * 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; ffc0ec8c: 7c c8 32 14 add r6,r8,r6 if ( last_byte > the_jnode->info.file.size ) { ffc0ec90: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ec94: 41 9c 00 14 blt- cr7,ffc0eca8 <== NEVER TAKEN ffc0ec98: 40 be 00 38 bne+ cr7,ffc0ecd0 <== NEVER TAKEN ffc0ec9c: 80 03 00 54 lwz r0,84(r3) ffc0eca0: 7f 80 30 40 cmplw cr7,r0,r6 ffc0eca4: 40 bc 00 2c bge+ cr7,ffc0ecd0 status = IMFS_memfile_extend( the_jnode, last_byte ); ffc0eca8: 7f e3 fb 78 mr r3,r31 ffc0ecac: 38 a0 00 00 li r5,0 ffc0ecb0: 4b ff fe 6d bl ffc0eb1c if ( status ) ffc0ecb4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ecb8: 41 be 00 18 beq+ cr7,ffc0ecd0 rtems_set_errno_and_return_minus_one( ENOSPC ); ffc0ecbc: 48 00 0f c9 bl ffc0fc84 <__errno> ffc0ecc0: 38 00 00 1c li r0,28 ffc0ecc4: 90 03 00 00 stw r0,0(r3) ffc0ecc8: 3b c0 ff ff li r30,-1 ffc0eccc: 48 00 01 30 b ffc0edfc */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0ecd0: 3d 20 00 00 lis r9,0 ffc0ecd4: 83 49 27 a4 lwz r26,10148(r9) ffc0ecd8: 7f a3 eb 78 mr r3,r29 ffc0ecdc: 7f c4 f3 78 mr r4,r30 ffc0ece0: 7f 58 fe 70 srawi r24,r26,31 ffc0ece4: 7f 05 c3 78 mr r5,r24 ffc0ece8: 7f 46 d3 78 mr r6,r26 ffc0ecec: 48 00 ab 0d bl ffc197f8 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0ecf0: 7f a3 eb 78 mr r3,r29 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0ecf4: 7c 99 23 78 mr r25,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0ecf8: 7f 05 c3 78 mr r5,r24 ffc0ecfc: 7f c4 f3 78 mr r4,r30 ffc0ed00: 7f 46 d3 78 mr r6,r26 ffc0ed04: 48 00 a6 b5 bl ffc193b8 <__divdi3> if ( start_offset ) { ffc0ed08: 2f 99 00 00 cmpwi cr7,r25,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; ffc0ed0c: 7c 9d 23 78 mr r29,r4 status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; ffc0ed10: 3b c0 00 00 li r30,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 ) { ffc0ed14: 41 9e 00 4c beq- cr7,ffc0ed60 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 ); ffc0ed18: 7f e3 fb 78 mr r3,r31 ffc0ed1c: 38 a0 00 00 li r5,0 ffc0ed20: 4b ff f7 bd bl ffc0e4dc if ( !block_ptr ) return copied; ffc0ed24: 3b c0 00 00 li r30,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 ) ffc0ed28: 2c 03 00 00 cmpwi r3,0 ffc0ed2c: 41 82 00 d0 beq- ffc0edfc <== 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; ffc0ed30: 7f d9 d0 50 subf r30,r25,r26 ffc0ed34: 7f 9e d8 40 cmplw cr7,r30,r27 ffc0ed38: 40 9d 00 08 ble- cr7,ffc0ed40 ffc0ed3c: 7f 7e db 78 mr r30,r27 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc0ed40: 80 63 00 00 lwz r3,0(r3) ffc0ed44: 7f 84 e3 78 mr r4,r28 ffc0ed48: 7f c5 f3 78 mr r5,r30 ffc0ed4c: 7c 63 ca 14 add r3,r3,r25 ffc0ed50: 48 00 1c 71 bl ffc109c0 src += to_copy; ffc0ed54: 7f 9c f2 14 add r28,r28,r30 block++; ffc0ed58: 3b bd 00 01 addi r29,r29,1 my_length -= to_copy; ffc0ed5c: 7f 7e d8 50 subf r27,r30,r27 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0ed60: 3f 20 00 00 lis r25,0 ffc0ed64: 83 59 27 a4 lwz r26,10148(r25) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc0ed68: 48 00 00 3c b ffc0eda4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc0ed6c: 7f e3 fb 78 mr r3,r31 ffc0ed70: 7f a4 eb 78 mr r4,r29 ffc0ed74: 38 a0 00 00 li r5,0 ffc0ed78: 4b ff f7 65 bl ffc0e4dc if ( !block_ptr ) ffc0ed7c: 2c 03 00 00 cmpwi r3,0 ffc0ed80: 41 82 00 7c beq- ffc0edfc <== NEVER TAKEN return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); ffc0ed84: 80 63 00 00 lwz r3,0(r3) ffc0ed88: 7f 84 e3 78 mr r4,r28 ffc0ed8c: 7f 45 d3 78 mr r5,r26 ffc0ed90: 48 00 1c 31 bl ffc109c0 src += to_copy; ffc0ed94: 7f 9c d2 14 add r28,r28,r26 block++; ffc0ed98: 3b bd 00 01 addi r29,r29,1 my_length -= to_copy; ffc0ed9c: 7f 7a d8 50 subf r27,r26,r27 * 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( ffc0eda0: 7f de d2 14 add r30,r30,r26 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc0eda4: 80 19 27 a4 lwz r0,10148(r25) ffc0eda8: 7f 9b 00 40 cmplw cr7,r27,r0 ffc0edac: 40 9c ff c0 bge+ cr7,ffc0ed6c * 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 ) { ffc0edb0: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0edb4: 41 9e 00 30 beq- cr7,ffc0ede4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc0edb8: 7f e3 fb 78 mr r3,r31 ffc0edbc: 7f a4 eb 78 mr r4,r29 ffc0edc0: 38 a0 00 00 li r5,0 ffc0edc4: 4b ff f7 19 bl ffc0e4dc if ( !block_ptr ) ffc0edc8: 2c 03 00 00 cmpwi r3,0 ffc0edcc: 41 82 00 30 beq- ffc0edfc <== 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 ); ffc0edd0: 80 63 00 00 lwz r3,0(r3) ffc0edd4: 7f 84 e3 78 mr r4,r28 ffc0edd8: 7f 65 db 78 mr r5,r27 ffc0eddc: 48 00 1b e5 bl ffc109c0 my_length = 0; copied += to_copy; ffc0ede0: 7f de da 14 add r30,r30,r27 } IMFS_mtime_ctime_update( the_jnode ); ffc0ede4: 38 61 00 08 addi r3,r1,8 ffc0ede8: 38 80 00 00 li r4,0 ffc0edec: 4b ff 5c 25 bl ffc04a10 ffc0edf0: 80 01 00 08 lwz r0,8(r1) ffc0edf4: 90 1f 00 44 stw r0,68(r31) ffc0edf8: 90 1f 00 48 stw r0,72(r31) return copied; } ffc0edfc: 39 61 00 38 addi r11,r1,56 ffc0ee00: 7f c3 f3 78 mr r3,r30 ffc0ee04: 4b ff 17 24 b ffc00528 <_restgpr_24_x> =============================================================================== ffc03efc : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc03efc: 7c 08 02 a6 mflr r0 ffc03f00: 94 21 ff f8 stwu r1,-8(r1) ffc03f04: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc03f08: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc03f0c: 80 09 00 4c lwz r0,76(r9) ffc03f10: 2f 80 00 01 cmpwi cr7,r0,1 ffc03f14: 41 be 00 18 beq+ cr7,ffc03f2c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc03f18: 48 00 bd 6d bl ffc0fc84 <__errno> <== NOT EXECUTED ffc03f1c: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc03f20: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc03f24: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc03f28: 48 00 00 0c b ffc03f34 <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; ffc03f2c: 90 69 00 5c stw r3,92(r9) return 0; ffc03f30: 38 60 00 00 li r3,0 } ffc03f34: 80 01 00 0c lwz r0,12(r1) ffc03f38: 38 21 00 08 addi r1,r1,8 ffc03f3c: 7c 08 03 a6 mtlr r0 ffc03f40: 4e 80 00 20 blr =============================================================================== ffc06c08 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc06c08: 94 21 ff f0 stwu r1,-16(r1) ffc06c0c: 7c 08 02 a6 mflr r0 ffc06c10: bf c1 00 08 stmw r30,8(r1) IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc06c14: 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 ) { ffc06c18: 7c 7f 1b 78 mr r31,r3 ffc06c1c: 90 01 00 14 stw r0,20(r1) IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc06c20: 38 63 00 0c addi r3,r3,12 ffc06c24: 81 3e 27 94 lwz r9,10132(r30) ffc06c28: 80 89 00 08 lwz r4,8(r9) ffc06c2c: 48 00 e1 c9 bl ffc14df4 switch( the_jnode->type ) { ffc06c30: 80 bf 00 4c lwz r5,76(r31) ffc06c34: 38 05 ff ff addi r0,r5,-1 ffc06c38: 2b 80 00 06 cmplwi cr7,r0,6 ffc06c3c: 41 9d 00 a8 bgt- cr7,ffc06ce4 <== NEVER TAKEN ffc06c40: 3d 20 ff c2 lis r9,-62 ffc06c44: 39 29 3e 0c addi r9,r9,15884 ffc06c48: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc06c4c: 7c 09 00 2e lwzx r0,r9,r0 ffc06c50: 7d 20 4a 14 add r9,r0,r9 ffc06c54: 7d 29 03 a6 mtctr r9 case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); ffc06c58: 81 3e 27 94 lwz r9,10132(r30) ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { ffc06c5c: 4e 80 04 20 bctr case IMFS_DIRECTORY: fprintf(stdout, "/" ); ffc06c60: 80 89 00 08 lwz r4,8(r9) ffc06c64: 38 60 00 2f li r3,47 ffc06c68: 48 00 e0 71 bl ffc14cd8 break; ffc06c6c: 48 00 00 94 b ffc06d00 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", ffc06c70: 3c 80 ff c2 lis r4,-62 ffc06c74: 80 69 00 08 lwz r3,8(r9) ffc06c78: 38 84 3e 28 addi r4,r4,15912 ffc06c7c: 80 bf 00 50 lwz r5,80(r31) ffc06c80: 80 df 00 54 lwz r6,84(r31) ffc06c84: 48 00 00 18 b ffc06c9c the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", ffc06c88: 3c 80 ff c2 lis r4,-62 ffc06c8c: 80 69 00 08 lwz r3,8(r9) ffc06c90: 80 bf 00 54 lwz r5,84(r31) ffc06c94: 38 84 3e 3b addi r4,r4,15931 ffc06c98: 80 df 00 58 lwz r6,88(r31) ffc06c9c: 4c c6 31 82 crclr 4*cr1+eq ffc06ca0: 48 00 df 51 bl ffc14bf0 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; ffc06ca4: 48 00 00 5c b ffc06d00 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", ffc06ca8: 80 69 00 08 lwz r3,8(r9) ffc06cac: 3c 80 ff c2 lis r4,-62 ffc06cb0: 80 bf 00 54 lwz r5,84(r31) ffc06cb4: 38 84 3e 4a addi r4,r4,15946 ffc06cb8: 4c c6 31 82 crclr 4*cr1+eq ffc06cbc: 48 00 df 35 bl ffc14bf0 (uint32_t)the_jnode->info.file.size ); #endif break; ffc06cc0: 48 00 00 40 b ffc06d00 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); ffc06cc4: 3c 60 ff c2 lis r3,-62 ffc06cc8: 38 63 3e 56 addi r3,r3,15958 ffc06ccc: 48 00 00 0c b ffc06cd8 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); ffc06cd0: 3c 60 ff c2 lis r3,-62 ffc06cd4: 38 63 3e 6a addi r3,r3,15978 ffc06cd8: 80 89 00 08 lwz r4,8(r9) ffc06cdc: 48 00 e1 19 bl ffc14df4 return; ffc06ce0: 48 00 00 2c b ffc06d0c default: fprintf(stdout, " bad type %d\n", the_jnode->type ); ffc06ce4: 81 3e 27 94 lwz r9,10132(r30) <== NOT EXECUTED ffc06ce8: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc06cec: 38 84 3e 7d addi r4,r4,15997 <== NOT EXECUTED ffc06cf0: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED ffc06cf4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc06cf8: 48 00 de f9 bl ffc14bf0 <== NOT EXECUTED return; ffc06cfc: 48 00 00 10 b ffc06d0c <== NOT EXECUTED } puts(""); ffc06d00: 3c 60 ff c2 lis r3,-62 ffc06d04: 38 63 45 17 addi r3,r3,17687 ffc06d08: 48 01 00 9d bl ffc16da4 } ffc06d0c: 39 61 00 10 addi r11,r1,16 ffc06d10: 4b ff c8 20 b ffc03530 <_restgpr_30_x> =============================================================================== ffc03f84 : 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 */ ) { ffc03f84: 94 21 ff e0 stwu r1,-32(r1) ffc03f88: 7c 08 02 a6 mflr r0 ffc03f8c: 90 01 00 24 stw r0,36(r1) ffc03f90: bf c1 00 18 stmw r30,24(r1) ffc03f94: 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 ); ffc03f98: 38 a0 00 20 li r5,32 ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; ffc03f9c: 83 e4 00 00 lwz r31,0(r4) strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); ffc03fa0: 7c c4 33 78 mr r4,r6 ffc03fa4: 38 7f 00 0c addi r3,r31,12 ffc03fa8: 48 00 d6 c5 bl ffc1166c if ( the_jnode->Parent != NULL ) ffc03fac: 80 1f 00 08 lwz r0,8(r31) ffc03fb0: 2f 80 00 00 cmpwi cr7,r0,0 ffc03fb4: 41 9e 00 0c beq- cr7,ffc03fc0 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc03fb8: 7f e3 fb 78 mr r3,r31 ffc03fbc: 48 00 4c 61 bl ffc08c1c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; ffc03fc0: 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 ); ffc03fc4: 7f e4 fb 78 mr r4,r31 the_jnode->Parent = new_parent; ffc03fc8: 90 7f 00 08 stw r3,8(r31) ffc03fcc: 38 63 00 50 addi r3,r3,80 ffc03fd0: 48 00 4c 1d bl ffc08bec <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); ffc03fd4: 38 61 00 08 addi r3,r1,8 ffc03fd8: 38 80 00 00 li r4,0 ffc03fdc: 48 00 0a 35 bl ffc04a10 ffc03fe0: 80 01 00 08 lwz r0,8(r1) return 0; } ffc03fe4: 39 61 00 20 addi r11,r1,32 ffc03fe8: 38 60 00 00 li r3,0 rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); ffc03fec: 90 1f 00 48 stw r0,72(r31) return 0; } ffc03ff0: 4b ff c5 50 b ffc00540 <_restgpr_30_x> =============================================================================== ffc0c078 : static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { ffc0c078: 94 21 ff e8 stwu r1,-24(r1) ffc0c07c: 7c 08 02 a6 mflr r0 ffc0c080: bf a1 00 0c stmw r29,12(r1) ffc0c084: 7c 7f 1b 78 mr r31,r3 ffc0c088: 7c 9e 23 78 mr r30,r4 ffc0c08c: 90 01 00 1c stw r0,28(r1) ffc0c090: 7c bd 2b 78 mr r29,r5 while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ffc0c094: 48 00 00 18 b ffc0c0ac ++(*index); ffc0c098: 39 29 00 01 addi r9,r9,1 ffc0c09c: 91 3d 00 00 stw r9,0(r29) --(*len); ffc0c0a0: 81 3e 00 00 lwz r9,0(r30) ffc0c0a4: 38 09 ff ff addi r0,r9,-1 ffc0c0a8: 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 ) { ffc0c0ac: 80 1d 00 00 lwz r0,0(r29) ffc0c0b0: 7c 7f 00 ae lbzx r3,r31,r0 ffc0c0b4: 4b ff 98 c1 bl ffc05974 ffc0c0b8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c0bc: 41 9e 00 20 beq- cr7,ffc0c0dc ffc0c0c0: 81 3d 00 00 lwz r9,0(r29) ffc0c0c4: 7c 1f 48 ae lbzx r0,r31,r9 ffc0c0c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c0cc: 41 9e 00 10 beq- cr7,ffc0c0dc ffc0c0d0: 80 1e 00 00 lwz r0,0(r30) ffc0c0d4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c0d8: 40 9e ff c0 bne+ cr7,ffc0c098 <== ALWAYS TAKEN ++(*index); --(*len); } } ffc0c0dc: 39 61 00 18 addi r11,r1,24 ffc0c0e0: 4b ff 44 5c b ffc0053c <_restgpr_29_x> =============================================================================== ffc0cc64 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc0cc64: 7c 08 02 a6 mflr r0 ffc0cc68: 94 21 ff f8 stwu r1,-8(r1) ffc0cc6c: 90 01 00 0c stw r0,12(r1) IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; ffc0cc70: 81 23 00 00 lwz r9,0(r3) switch ( the_jnode->type ) { ffc0cc74: 81 69 00 4c lwz r11,76(r9) ffc0cc78: 38 0b ff fe addi r0,r11,-2 ffc0cc7c: 2b 80 00 05 cmplwi cr7,r0,5 ffc0cc80: 41 9d 00 54 bgt- cr7,ffc0ccd4 <== NEVER TAKEN ffc0cc84: 3d 60 ff c2 lis r11,-62 ffc0cc88: 39 6b c6 24 addi r11,r11,-14812 ffc0cc8c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0cc90: 7c 0b 00 2e lwzx r0,r11,r0 ffc0cc94: 7d 60 5a 14 add r11,r0,r11 ffc0cc98: 7d 69 03 a6 mtctr r11 ffc0cc9c: 4e 80 04 20 bctr case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); ffc0cca0: 80 09 00 54 lwz r0,84(r9) rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; ffc0cca4: 81 69 00 50 lwz r11,80(r9) ffc0cca8: 90 04 00 1c stw r0,28(r4) ffc0ccac: 91 64 00 18 stw r11,24(r4) break; ffc0ccb0: 48 00 00 38 b ffc0cce8 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; ffc0ccb4: 81 49 00 50 lwz r10,80(r9) ffc0ccb8: 81 69 00 54 lwz r11,84(r9) ffc0ccbc: 48 00 00 0c b ffc0ccc8 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; ffc0ccc0: 39 40 00 00 li r10,0 ffc0ccc4: 39 60 00 00 li r11,0 ffc0ccc8: 91 44 00 20 stw r10,32(r4) ffc0cccc: 91 64 00 24 stw r11,36(r4) break; ffc0ccd0: 48 00 00 18 b ffc0cce8 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0ccd4: 48 00 2f b1 bl ffc0fc84 <__errno> ffc0ccd8: 38 00 00 86 li r0,134 ffc0ccdc: 90 03 00 00 stw r0,0(r3) ffc0cce0: 38 60 ff ff li r3,-1 ffc0cce4: 48 00 00 70 b ffc0cd54 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; ffc0cce8: 81 63 00 10 lwz r11,16(r3) 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; ffc0ccec: 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 ); ffc0ccf0: 81 6b 00 34 lwz r11,52(r11) ffc0ccf4: 80 0b 00 00 lwz r0,0(r11) ffc0ccf8: 39 60 00 00 li r11,0 ffc0ccfc: 61 6b ff fe ori r11,r11,65534 /* * 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 = ffc0cd00: 90 04 00 04 stw r0,4(r4) rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; ffc0cd04: 80 09 00 30 lwz r0,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 = ffc0cd08: 91 64 00 00 stw r11,0(r4) rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; ffc0cd0c: 90 04 00 0c stw r0,12(r4) buf->st_nlink = the_jnode->st_nlink; ffc0cd10: a0 09 00 34 lhz r0,52(r9) ffc0cd14: b0 04 00 10 sth r0,16(r4) buf->st_ino = the_jnode->st_ino; ffc0cd18: 80 09 00 38 lwz r0,56(r9) ffc0cd1c: 90 04 00 08 stw r0,8(r4) buf->st_uid = the_jnode->st_uid; ffc0cd20: a0 09 00 3c lhz r0,60(r9) ffc0cd24: b0 04 00 12 sth r0,18(r4) buf->st_gid = the_jnode->st_gid; ffc0cd28: a0 09 00 3e lhz r0,62(r9) ffc0cd2c: b0 04 00 14 sth r0,20(r4) buf->st_atime = the_jnode->stat_atime; ffc0cd30: 80 09 00 40 lwz r0,64(r9) ffc0cd34: 90 04 00 28 stw r0,40(r4) buf->st_mtime = the_jnode->stat_mtime; ffc0cd38: 80 09 00 44 lwz r0,68(r9) ffc0cd3c: 90 04 00 30 stw r0,48(r4) buf->st_ctime = the_jnode->stat_ctime; ffc0cd40: 80 09 00 48 lwz r0,72(r9) buf->st_blksize = imfs_rq_memfile_bytes_per_block; ffc0cd44: 3d 20 00 00 lis r9,0 buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; ffc0cd48: 90 04 00 38 stw r0,56(r4) buf->st_blksize = imfs_rq_memfile_bytes_per_block; ffc0cd4c: 80 09 26 f8 lwz r0,9976(r9) ffc0cd50: 90 04 00 40 stw r0,64(r4) return 0; } ffc0cd54: 80 01 00 0c lwz r0,12(r1) ffc0cd58: 38 21 00 08 addi r1,r1,8 ffc0cd5c: 7c 08 03 a6 mtlr r0 ffc0cd60: 4e 80 00 20 blr =============================================================================== ffc0408c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { ffc0408c: 94 21 ff c8 stwu r1,-56(r1) ffc04090: 7c 08 02 a6 mflr r0 ffc04094: 90 01 00 3c stw r0,60(r1) ffc04098: bf 81 00 28 stmw r28,40(r1) ffc0409c: 7c 7d 1b 78 mr r29,r3 ffc040a0: 7c 9f 23 78 mr r31,r4 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; ffc040a4: 83 c4 00 00 lwz r30,0(r4) /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { ffc040a8: 80 1e 00 4c lwz r0,76(r30) ffc040ac: 2f 80 00 03 cmpwi cr7,r0,3 ffc040b0: 40 9e 00 94 bne- cr7,ffc04144 if ( !node->info.hard_link.link_node ) ffc040b4: 80 1e 00 50 lwz r0,80(r30) ffc040b8: 2f 80 00 00 cmpwi cr7,r0,0 ffc040bc: 40 be 00 18 bne+ cr7,ffc040d4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc040c0: 48 00 bb c5 bl ffc0fc84 <__errno> <== NOT EXECUTED ffc040c4: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc040c8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc040cc: 38 00 ff ff li r0,-1 <== NOT EXECUTED ffc040d0: 48 00 00 90 b ffc04160 <== NOT EXECUTED the_link = *loc; ffc040d4: 3b 81 00 10 addi r28,r1,16 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); ffc040d8: 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; ffc040dc: 7c a4 a4 aa lswi r5,r4,20 ffc040e0: 7c bc a5 aa stswi r5,r28,20 the_link.node_access = node->info.hard_link.link_node; ffc040e4: 90 01 00 10 stw r0,16(r1) IMFS_Set_handlers( &the_link ); ffc040e8: 48 00 7f fd bl ffc0c0e4 /* * 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) ffc040ec: 81 3e 00 50 lwz r9,80(r30) ffc040f0: a1 69 00 34 lhz r11,52(r9) ffc040f4: 2f 8b 00 01 cmpwi cr7,r11,1 ffc040f8: 40 be 00 2c bne+ cr7,ffc04124 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); ffc040fc: 81 21 00 18 lwz r9,24(r1) ffc04100: 7f a3 eb 78 mr r3,r29 ffc04104: 7f 84 e3 78 mr r4,r28 ffc04108: 80 09 00 34 lwz r0,52(r9) ffc0410c: 7c 09 03 a6 mtctr r0 ffc04110: 4e 80 04 21 bctrl if ( result != 0 ) return -1; ffc04114: 38 00 ff ff li r0,-1 */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) ffc04118: 2f 83 00 00 cmpwi cr7,r3,0 ffc0411c: 41 be 00 28 beq+ cr7,ffc04144 ffc04120: 48 00 00 40 b ffc04160 return -1; } else { node->info.hard_link.link_node->st_nlink --; ffc04124: 39 6b ff ff addi r11,r11,-1 ffc04128: b1 69 00 34 sth r11,52(r9) IMFS_update_ctime( node->info.hard_link.link_node ); ffc0412c: 38 61 00 08 addi r3,r1,8 ffc04130: 38 80 00 00 li r4,0 ffc04134: 48 00 08 dd bl ffc04a10 ffc04138: 81 3e 00 50 lwz r9,80(r30) ffc0413c: 80 01 00 08 lwz r0,8(r1) ffc04140: 90 09 00 48 stw r0,72(r9) /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); ffc04144: 81 3f 00 08 lwz r9,8(r31) ffc04148: 7f a3 eb 78 mr r3,r29 ffc0414c: 7f e4 fb 78 mr r4,r31 ffc04150: 80 09 00 34 lwz r0,52(r9) ffc04154: 7c 09 03 a6 mtctr r0 ffc04158: 4e 80 04 21 bctrl ffc0415c: 7c 60 1b 78 mr r0,r3 return result; } ffc04160: 39 61 00 38 addi r11,r1,56 ffc04164: 7c 03 03 78 mr r3,r0 ffc04168: 4b ff c3 d0 b ffc00538 <_restgpr_28_x> =============================================================================== ffc0416c : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc0416c: 7c 08 02 a6 mflr r0 ffc04170: 94 21 ff f8 stwu r1,-8(r1) ffc04174: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc04178: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc0417c: 80 09 00 4c lwz r0,76(r9) ffc04180: 2f 80 00 01 cmpwi cr7,r0,1 ffc04184: 41 be 00 10 beq+ cr7,ffc04194 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc04188: 48 00 ba fd bl ffc0fc84 <__errno> <== NOT EXECUTED ffc0418c: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc04190: 48 00 00 18 b ffc041a8 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) ffc04194: 80 09 00 5c lwz r0,92(r9) ffc04198: 2f 80 00 00 cmpwi cr7,r0,0 ffc0419c: 40 be 00 18 bne+ cr7,ffc041b4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ ffc041a0: 48 00 ba e5 bl ffc0fc84 <__errno> <== NOT EXECUTED ffc041a4: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc041a8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc041ac: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc041b0: 48 00 00 10 b ffc041c0 <== NOT EXECUTED /* * 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; ffc041b4: 38 00 00 00 li r0,0 ffc041b8: 90 09 00 5c stw r0,92(r9) return 0; ffc041bc: 38 60 00 00 li r3,0 } ffc041c0: 80 01 00 0c lwz r0,12(r1) ffc041c4: 38 21 00 08 addi r1,r1,8 ffc041c8: 7c 08 03 a6 mtlr r0 ffc041cc: 4e 80 00 20 blr =============================================================================== ffc035dc : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc035dc: 94 21 ff c0 stwu r1,-64(r1) ffc035e0: 7c 08 02 a6 mflr r0 ffc035e4: 90 01 00 44 stw r0,68(r1) * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) ffc035e8: 3c 00 a5 a5 lis r0,-23131 ffc035ec: 60 00 a5 a5 ori r0,r0,42405 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc035f0: be e1 00 1c stmw r23,28(r1) ffc035f4: 7c 7b 1b 78 mr r27,r3 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); ffc035f8: 83 83 00 b4 lwz r28,180(r3) { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); ffc035fc: 81 63 00 b8 lwz r11,184(r3) size = Stack_check_usable_stack_size(stack); ffc03600: 3b 9c ff 80 addi r28,r28,-128 current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); ffc03604: 83 43 00 c4 lwz r26,196(r3) /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; ffc03608: 39 2b 01 00 addi r9,r11,256 for (ebase = base + length; base < ebase; base++) ffc0360c: 57 8a 00 3a rlwinm r10,r28,0,0,29 ffc03610: 7d 49 52 14 add r10,r9,r10 ffc03614: 48 00 00 14 b ffc03628 if (*base != U32_PATTERN) ffc03618: 81 09 00 00 lwz r8,0(r9) ffc0361c: 7f 88 00 00 cmpw cr7,r8,r0 ffc03620: 40 9e 00 18 bne- cr7,ffc03638 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) ffc03624: 39 29 00 04 addi r9,r9,4 ffc03628: 7f 89 50 40 cmplw cr7,r9,r10 ffc0362c: 41 9c ff ec blt+ cr7,ffc03618 <== 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; ffc03630: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc03634: 48 00 00 1c b ffc03650 <== NOT EXECUTED 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 ) ffc03638: 2f 89 00 00 cmpwi cr7,r9,0 used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; ffc0363c: 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 ) ffc03640: 41 9e 00 10 beq- cr7,ffc03650 <== NEVER TAKEN { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); ffc03644: 3b ab 00 80 addi r29,r11,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 ); ffc03648: 7f bd e2 14 add r29,r29,r28 ffc0364c: 7f a9 e8 50 subf r29,r9,r29 #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( ffc03650: 3f c0 00 00 lis r30,0 ffc03654: 83 1b 00 08 lwz r24,8(r27) ffc03658: 3b fe 28 50 addi r31,r30,10320 ffc0365c: 83 3e 28 50 lwz r25,10320(r30) ffc03660: 82 ff 00 04 lwz r23,4(r31) ffc03664: 38 80 00 05 li r4,5 ffc03668: 38 a1 00 08 addi r5,r1,8 ffc0366c: 7f 03 c3 78 mr r3,r24 ffc03670: 48 00 42 55 bl ffc078c4 ffc03674: 3c 80 ff c1 lis r4,-63 ffc03678: 7c 66 1b 78 mr r6,r3 ffc0367c: 7f 29 03 a6 mtctr r25 ffc03680: 38 84 61 28 addi r4,r4,24872 ffc03684: 7f 05 c3 78 mr r5,r24 ffc03688: 7e e3 bb 78 mr r3,r23 ffc0368c: 4c c6 31 82 crclr 4*cr1+eq ffc03690: 4e 80 04 21 bctrl (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc03694: 80 db 00 b4 lwz r6,180(r27) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc03698: 80 1e 28 50 lwz r0,10320(r30) ffc0369c: 3c 80 ff c1 lis r4,-63 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc036a0: 80 bb 00 b8 lwz r5,184(r27) ffc036a4: 38 c6 ff ff addi r6,r6,-1 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc036a8: 7c 09 03 a6 mtctr r0 ffc036ac: 80 7f 00 04 lwz r3,4(r31) ffc036b0: 38 84 61 35 addi r4,r4,24885 ffc036b4: 7c c5 32 14 add r6,r5,r6 ffc036b8: 7f 47 d3 78 mr r7,r26 ffc036bc: 7f 88 e3 78 mr r8,r28 ffc036c0: 4c c6 31 82 crclr 4*cr1+eq ffc036c4: 4e 80 04 21 bctrl stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc036c8: 80 1f 00 08 lwz r0,8(r31) (*print_handler)( print_context, "Unavailable\n" ); ffc036cc: 80 7f 00 04 lwz r3,4(r31) stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc036d0: 2f 80 00 00 cmpwi cr7,r0,0 (*print_handler)( print_context, "Unavailable\n" ); ffc036d4: 80 1e 28 50 lwz r0,10320(r30) stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc036d8: 40 be 00 1c bne+ cr7,ffc036f4 <== ALWAYS TAKEN (*print_handler)( print_context, "Unavailable\n" ); ffc036dc: 3c 80 ff c1 lis r4,-63 <== NOT EXECUTED ffc036e0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc036e4: 38 84 61 53 addi r4,r4,24915 <== NOT EXECUTED ffc036e8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc036ec: 4e 80 04 21 bctrl <== NOT EXECUTED ffc036f0: 48 00 00 1c b ffc0370c <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); ffc036f4: 3c 80 ff c1 lis r4,-63 ffc036f8: 7c 09 03 a6 mtctr r0 ffc036fc: 38 84 61 60 addi r4,r4,24928 ffc03700: 7f a5 eb 78 mr r5,r29 ffc03704: 4c c6 31 82 crclr 4*cr1+eq ffc03708: 4e 80 04 21 bctrl } } ffc0370c: 39 61 00 40 addi r11,r1,64 ffc03710: 48 01 0e 0c b ffc1451c <_restgpr_23_x> =============================================================================== ffc037e4 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc037e4: 94 21 ff c8 stwu r1,-56(r1) ffc037e8: 7c 08 02 a6 mflr r0 ffc037ec: 90 01 00 3c stw r0,60(r1) ffc037f0: bf a1 00 2c stmw r29,44(r1) ffc037f4: 7c 7d 1b 78 mr r29,r3 ffc037f8: 7c 9e 23 78 mr r30,r4 Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); ffc037fc: 83 e3 00 b8 lwz r31,184(r3) char name[32]; printk("BLOWN STACK!!!\n"); ffc03800: 3c 60 ff c1 lis r3,-63 ffc03804: 38 63 61 66 addi r3,r3,24934 ffc03808: 4c c6 31 82 crclr 4*cr1+eq ffc0380c: 48 00 1b 15 bl ffc05320 printk("task control block: 0x%08" PRIxPTR "\n", running); ffc03810: 3c 60 ff c1 lis r3,-63 ffc03814: 38 63 61 76 addi r3,r3,24950 ffc03818: 7f a4 eb 78 mr r4,r29 ffc0381c: 4c c6 31 82 crclr 4*cr1+eq ffc03820: 48 00 1b 01 bl ffc05320 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); ffc03824: 80 9d 00 08 lwz r4,8(r29) ffc03828: 3c 60 ff c1 lis r3,-63 ffc0382c: 38 63 61 93 addi r3,r3,24979 ffc03830: 4c c6 31 82 crclr 4*cr1+eq ffc03834: 48 00 1a ed bl ffc05320 printk( ffc03838: 80 9d 00 0c lwz r4,12(r29) ffc0383c: 3c 60 ff c1 lis r3,-63 ffc03840: 38 63 61 a5 addi r3,r3,24997 ffc03844: 4c c6 31 82 crclr 4*cr1+eq ffc03848: 48 00 1a d9 bl ffc05320 "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( ffc0384c: 80 7d 00 08 lwz r3,8(r29) ffc03850: 38 a1 00 08 addi r5,r1,8 ffc03854: 38 80 00 20 li r4,32 ffc03858: 48 00 40 6d bl ffc078c4 ffc0385c: 7c 64 1b 78 mr r4,r3 ffc03860: 3c 60 ff c1 lis r3,-63 ffc03864: 38 63 61 b9 addi r3,r3,25017 ffc03868: 4c c6 31 82 crclr 4*cr1+eq ffc0386c: 48 00 1a b5 bl ffc05320 ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ffc03870: 80 bd 00 b8 lwz r5,184(r29) ffc03874: 80 9d 00 b4 lwz r4,180(r29) ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( ffc03878: 3c 60 ff c1 lis r3,-63 ffc0387c: 38 63 61 cf addi r3,r3,25039 ffc03880: 7c c5 22 14 add r6,r5,r4 ffc03884: 4c c6 31 82 crclr 4*cr1+eq ffc03888: 48 00 1a 99 bl ffc05320 "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) { ffc0388c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc03890: 40 be 00 20 bne+ cr7,ffc038b0 <== NEVER TAKEN printk( ffc03894: 3c 60 ff c1 lis r3,-63 ffc03898: 38 63 62 00 addi r3,r3,25088 ffc0389c: 38 80 00 80 li r4,128 ffc038a0: 38 bf 00 08 addi r5,r31,8 ffc038a4: 38 df 00 88 addi r6,r31,136 ffc038a8: 4c c6 31 82 crclr 4*cr1+eq ffc038ac: 48 00 1a 75 bl ffc05320 rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); ffc038b0: 38 60 00 81 li r3,129 ffc038b4: 48 00 4a 2d bl ffc082e0 =============================================================================== ffc0e784 : /** * 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(); ffc0e784: 3d 20 00 00 lis r9,0 ffc0e788: 80 09 20 28 lwz r0,8232(r9) ticks = microseconds / microseconds_per_tick; ffc0e78c: 7d 23 03 96 divwu r9,r3,r0 if ( (microseconds % microseconds_per_tick) != 0 ) ffc0e790: 7c 09 01 d6 mullw r0,r9,r0 ffc0e794: 7f 83 00 00 cmpw cr7,r3,r0 ffc0e798: 41 9e 00 08 beq- cr7,ffc0e7a0 <== ALWAYS TAKEN ticks += 1; ffc0e79c: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED return ticks; } ffc0e7a0: 7d 23 4b 78 mr r3,r9 ffc0e7a4: 4e 80 00 20 blr =============================================================================== ffc099f4 : /** * 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(); ffc099f4: 3d 20 00 00 lis r9,0 ffc099f8: 81 29 20 10 lwz r9,8208(r9) ffc099fc: 38 00 03 e8 li r0,1000 ffc09a00: 7c 09 03 96 divwu r0,r9,r0 ticks = milliseconds / milliseconds_per_tick; ffc09a04: 7d 23 03 96 divwu r9,r3,r0 if ( (milliseconds % milliseconds_per_tick) != 0 ) ffc09a08: 7c 09 01 d6 mullw r0,r9,r0 ffc09a0c: 7f 83 00 00 cmpw cr7,r3,r0 ffc09a10: 41 9e 00 08 beq- cr7,ffc09a18 <== ALWAYS TAKEN ticks += 1; ffc09a14: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED return ticks; } ffc09a18: 7d 23 4b 78 mr r3,r9 ffc09a1c: 4e 80 00 20 blr =============================================================================== ffc11b2c <_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 ) { ffc11b2c: 94 21 ff e0 stwu r1,-32(r1) ffc11b30: 7c 08 02 a6 mflr r0 ffc11b34: 90 01 00 24 stw r0,36(r1) 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; ffc11b38: 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 ) { ffc11b3c: bf 81 00 10 stmw r28,16(r1) ffc11b40: 7c 7f 1b 78 mr r31,r3 ffc11b44: 7c 9d 23 78 mr r29,r4 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; ffc11b48: 90 03 00 48 stw r0,72(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)) { ffc11b4c: 70 c0 00 03 andi. r0,r6,3 ffc11b50: 7c dc 33 78 mr r28,r6 ) { size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; ffc11b54: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; ffc11b58: 90 c3 00 4c stw r6,76(r3) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc11b5c: 41 82 00 18 beq- ffc11b74 <_CORE_message_queue_Initialize+0x48> allocated_message_size += sizeof(uint32_t); ffc11b60: 3b 86 00 04 addi r28,r6,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); ffc11b64: 57 9c 00 3a rlwinm r28,r28,0,0,29 } if (allocated_message_size < maximum_message_size) ffc11b68: 7f 9c 30 40 cmplw cr7,r28,r6 return false; ffc11b6c: 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) ffc11b70: 41 bc 00 80 blt+ cr7,ffc11bf0 <_CORE_message_queue_Initialize+0xc4><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( ffc11b74: 3b 9c 00 10 addi r28,r28,16 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; ffc11b78: 7d 45 e0 16 mulhwu r10,r5,r28 ffc11b7c: 7d 65 e1 d6 mullw r11,r5,r28 if ( x > SIZE_MAX ) ffc11b80: 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; ffc11b84: 3b c0 00 00 li r30,0 size_t *c ) { long long x = (long long)a*b; if ( x > SIZE_MAX ) ffc11b88: 41 9d 00 68 bgt- cr7,ffc11bf0 <_CORE_message_queue_Initialize+0xc4> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc11b8c: 7d 63 5b 78 mr r3,r11 ffc11b90: 90 a1 00 08 stw r5,8(r1) ffc11b94: 48 00 32 61 bl ffc14df4 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) ffc11b98: 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 *) ffc11b9c: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); ffc11ba0: 7c 64 1b 78 mr r4,r3 if (the_message_queue->message_buffers == 0) ffc11ba4: 80 a1 00 08 lwz r5,8(r1) ffc11ba8: 41 9e 00 48 beq- cr7,ffc11bf0 <_CORE_message_queue_Initialize+0xc4> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc11bac: 38 7f 00 60 addi r3,r31,96 ffc11bb0: 7f 86 e3 78 mr r6,r28 ffc11bb4: 48 00 50 b9 bl ffc16c6c <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc11bb8: 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 ); ffc11bbc: 38 1f 00 50 addi r0,r31,80 head->next = tail; head->previous = NULL; ffc11bc0: 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 ); ffc11bc4: 39 3f 00 54 addi r9,r31,84 ffc11bc8: 68 84 00 01 xori r4,r4,1 head->next = tail; ffc11bcc: 91 3f 00 50 stw r9,80(r31) ffc11bd0: 7c 84 00 34 cntlzw r4,r4 head->previous = NULL; tail->previous = head; ffc11bd4: 90 1f 00 58 stw r0,88(r31) ffc11bd8: 7f e3 fb 78 mr r3,r31 ffc11bdc: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc11be0: 38 a0 00 80 li r5,128 ffc11be4: 38 c0 00 06 li r6,6 ffc11be8: 48 00 27 a1 bl ffc14388 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; ffc11bec: 3b c0 00 01 li r30,1 } ffc11bf0: 39 61 00 20 addi r11,r1,32 ffc11bf4: 7f c3 f3 78 mr r3,r30 ffc11bf8: 4b ff 3d e0 b ffc059d8 <_restgpr_28_x> =============================================================================== ffc0907c <_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 ) { ffc0907c: 7c 08 02 a6 mflr r0 ffc09080: 7c 2b 0b 78 mr r11,r1 ffc09084: 94 21 ff f0 stwu r1,-16(r1) ffc09088: 90 01 00 14 stw r0,20(r1) ffc0908c: 48 01 13 91 bl ffc1a41c <_savegpr_31> ffc09090: 7c 7f 1b 78 mr r31,r3 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc09094: 48 00 1c c1 bl ffc0ad54 <_Thread_queue_Dequeue> ffc09098: 2f 83 00 00 cmpwi cr7,r3,0 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0909c: 38 00 00 00 li r0,0 if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc090a0: 40 be 00 38 bne+ cr7,ffc090d8 <_CORE_semaphore_Surrender+0x5c> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc090a4: 7d 60 00 a6 mfmsr r11 ffc090a8: 7c 10 42 a6 mfsprg r0,0 ffc090ac: 7d 60 00 78 andc r0,r11,r0 ffc090b0: 7c 00 01 24 mtmsr r0 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc090b4: 81 3f 00 48 lwz r9,72(r31) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; ffc090b8: 38 00 00 04 li r0,4 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc090bc: 81 5f 00 40 lwz r10,64(r31) ffc090c0: 7f 89 50 40 cmplw cr7,r9,r10 ffc090c4: 40 9c 00 10 bge- cr7,ffc090d4 <_CORE_semaphore_Surrender+0x58><== NEVER TAKEN the_semaphore->count += 1; ffc090c8: 39 29 00 01 addi r9,r9,1 ffc090cc: 91 3f 00 48 stw r9,72(r31) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc090d0: 38 00 00 00 li r0,0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc090d4: 7d 60 01 24 mtmsr r11 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc090d8: 39 61 00 10 addi r11,r1,16 ffc090dc: 7c 03 03 78 mr r3,r0 ffc090e0: 4b ff 74 64 b ffc00544 <_restgpr_31_x> =============================================================================== ffc07c5c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { ffc07c5c: 7c 2b 0b 78 mr r11,r1 ffc07c60: 7c 08 02 a6 mflr r0 ffc07c64: 94 21 ff f0 stwu r1,-16(r1) ffc07c68: 90 01 00 14 stw r0,20(r1) ffc07c6c: 48 01 27 b1 bl ffc1a41c <_savegpr_31> ffc07c70: 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 ]; ffc07c74: 81 03 01 2c lwz r8,300(r3) option_set = (rtems_option) the_thread->Wait.option; ffc07c78: 80 e3 00 30 lwz r7,48(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc07c7c: 7c 00 00 a6 mfmsr r0 ffc07c80: 7d 30 42 a6 mfsprg r9,0 ffc07c84: 7c 09 48 78 andc r9,r0,r9 ffc07c88: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); pending_events = api->pending_events; ffc07c8c: 81 68 00 00 lwz r11,0(r8) event_condition = (rtems_event_set) the_thread->Wait.count; ffc07c90: 81 43 00 24 lwz r10,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 ) ) { ffc07c94: 7d 49 58 39 and. r9,r10,r11 ffc07c98: 41 82 00 f4 beq- ffc07d8c <_Event_Surrender+0x130> /* * 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() && ffc07c9c: 3c c0 00 00 lis r6,0 ffc07ca0: 38 c6 2d b8 addi r6,r6,11704 ffc07ca4: 80 a6 00 08 lwz r5,8(r6) ffc07ca8: 2f 85 00 00 cmpwi cr7,r5,0 ffc07cac: 41 9e 00 64 beq- cr7,ffc07d10 <_Event_Surrender+0xb4> ffc07cb0: 80 c6 00 0c lwz r6,12(r6) ffc07cb4: 7f 83 30 00 cmpw cr7,r3,r6 ffc07cb8: 40 be 00 58 bne+ cr7,ffc07d10 <_Event_Surrender+0xb4> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc07cbc: 3c c0 00 00 lis r6,0 ffc07cc0: 80 a6 28 0c lwz r5,10252(r6) /* * 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 ) && ffc07cc4: 2f 85 00 02 cmpwi cr7,r5,2 ffc07cc8: 41 9e 00 10 beq- cr7,ffc07cd8 <_Event_Surrender+0x7c> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { ffc07ccc: 80 c6 28 0c lwz r6,10252(r6) * 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) || ffc07cd0: 2f 86 00 01 cmpwi cr7,r6,1 ffc07cd4: 40 be 00 3c bne+ cr7,ffc07d10 <_Event_Surrender+0xb4> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { ffc07cd8: 7f 89 50 00 cmpw cr7,r9,r10 ffc07cdc: 41 9e 00 0c beq- cr7,ffc07ce8 <_Event_Surrender+0x8c> ffc07ce0: 70 e5 00 02 andi. r5,r7,2 ffc07ce4: 41 82 00 a8 beq- ffc07d8c <_Event_Surrender+0x130> <== NEVER TAKEN RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); ffc07ce8: 7d 6b 48 78 andc r11,r11,r9 api->pending_events = _Event_sets_Clear( pending_events,seized_events ); ffc07cec: 91 68 00 00 stw r11,0(r8) the_thread->Wait.count = 0; ffc07cf0: 39 60 00 00 li r11,0 ffc07cf4: 91 7f 00 24 stw r11,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc07cf8: 81 7f 00 28 lwz r11,40(r31) ffc07cfc: 91 2b 00 00 stw r9,0(r11) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc07d00: 39 60 00 03 li r11,3 ffc07d04: 3d 20 00 00 lis r9,0 ffc07d08: 91 69 28 0c stw r11,10252(r9) ffc07d0c: 48 00 00 80 b ffc07d8c <_Event_Surrender+0x130> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); ffc07d10: 80 df 00 10 lwz r6,16(r31) } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { ffc07d14: 70 c5 01 00 andi. r5,r6,256 ffc07d18: 41 82 00 74 beq- ffc07d8c <_Event_Surrender+0x130> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc07d1c: 7f 89 50 00 cmpw cr7,r9,r10 ffc07d20: 41 9e 00 0c beq- cr7,ffc07d2c <_Event_Surrender+0xd0> ffc07d24: 70 ea 00 02 andi. r10,r7,2 ffc07d28: 41 82 00 64 beq- ffc07d8c <_Event_Surrender+0x130> <== NEVER TAKEN ffc07d2c: 7d 6b 48 78 andc r11,r11,r9 api->pending_events = _Event_sets_Clear( pending_events, seized_events ); ffc07d30: 91 68 00 00 stw r11,0(r8) the_thread->Wait.count = 0; ffc07d34: 39 60 00 00 li r11,0 ffc07d38: 91 7f 00 24 stw r11,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc07d3c: 81 7f 00 28 lwz r11,40(r31) ffc07d40: 91 2b 00 00 stw r9,0(r11) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc07d44: 7d 20 00 a6 mfmsr r9 ffc07d48: 7c 00 01 24 mtmsr r0 ffc07d4c: 7d 20 01 24 mtmsr r9 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc07d50: 81 3f 00 50 lwz r9,80(r31) ffc07d54: 2f 89 00 02 cmpwi cr7,r9,2 ffc07d58: 41 9e 00 0c beq- cr7,ffc07d64 <_Event_Surrender+0x108> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc07d5c: 7c 00 01 24 mtmsr r0 ffc07d60: 48 00 00 18 b ffc07d78 <_Event_Surrender+0x11c> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc07d64: 39 20 00 03 li r9,3 ffc07d68: 91 3f 00 50 stw r9,80(r31) ffc07d6c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc07d70: 38 7f 00 48 addi r3,r31,72 ffc07d74: 48 00 3c f9 bl ffc0ba6c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc07d78: 3c 80 10 03 lis r4,4099 ffc07d7c: 7f e3 fb 78 mr r3,r31 ffc07d80: 60 84 ff f8 ori r4,r4,65528 ffc07d84: 48 00 28 8d bl ffc0a610 <_Thread_Clear_state> ffc07d88: 48 00 00 08 b ffc07d90 <_Event_Surrender+0x134> ffc07d8c: 7c 00 01 24 mtmsr r0 } return; } } _ISR_Enable( level ); } ffc07d90: 39 61 00 10 addi r11,r1,16 ffc07d94: 4b ff 87 b0 b ffc00544 <_restgpr_31_x> =============================================================================== ffc07d98 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { ffc07d98: 94 21 ff e8 stwu r1,-24(r1) ffc07d9c: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc07da0: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *ignored ) { ffc07da4: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc07da8: 48 00 2c 69 bl ffc0aa10 <_Thread_Get> switch ( location ) { ffc07dac: 80 01 00 08 lwz r0,8(r1) ffc07db0: 2f 80 00 00 cmpwi cr7,r0,0 ffc07db4: 40 9e 00 6c bne- cr7,ffc07e20 <_Event_Timeout+0x88> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc07db8: 7d 60 00 a6 mfmsr r11 ffc07dbc: 7d 30 42 a6 mfsprg r9,0 ffc07dc0: 7d 69 48 78 andc r9,r11,r9 ffc07dc4: 7d 20 01 24 mtmsr r9 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc07dc8: 3d 20 00 00 lis r9,0 _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc07dcc: 90 03 00 24 stw r0,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc07dd0: 80 09 2d c4 lwz r0,11716(r9) ffc07dd4: 7f 83 00 00 cmpw cr7,r3,r0 ffc07dd8: 40 be 00 1c bne+ cr7,ffc07df4 <_Event_Timeout+0x5c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc07ddc: 3d 20 00 00 lis r9,0 ffc07de0: 80 09 28 0c lwz r0,10252(r9) ffc07de4: 2f 80 00 01 cmpwi cr7,r0,1 ffc07de8: 40 be 00 0c bne+ cr7,ffc07df4 <_Event_Timeout+0x5c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc07dec: 38 00 00 02 li r0,2 ffc07df0: 90 09 28 0c stw r0,10252(r9) } the_thread->Wait.return_code = RTEMS_TIMEOUT; ffc07df4: 38 00 00 06 li r0,6 ffc07df8: 90 03 00 34 stw r0,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc07dfc: 7d 60 01 24 mtmsr r11 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc07e00: 3c 80 10 03 lis r4,4099 ffc07e04: 60 84 ff f8 ori r4,r4,65528 ffc07e08: 48 00 28 09 bl ffc0a610 <_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--; ffc07e0c: 3d 20 00 00 lis r9,0 ffc07e10: 81 69 27 c8 lwz r11,10184(r9) ffc07e14: 38 0b ff ff addi r0,r11,-1 ffc07e18: 90 09 27 c8 stw r0,10184(r9) return _Thread_Dispatch_disable_level; ffc07e1c: 80 09 27 c8 lwz r0,10184(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc07e20: 80 01 00 1c lwz r0,28(r1) ffc07e24: 38 21 00 18 addi r1,r1,24 ffc07e28: 7c 08 03 a6 mtlr r0 ffc07e2c: 4e 80 00 20 blr =============================================================================== ffc0db4c <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc0db4c: 94 21 ff c0 stwu r1,-64(r1) ffc0db50: 7c 08 02 a6 mflr r0 ffc0db54: be c1 00 18 stmw r22,24(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; ffc0db58: 7f c4 2a 14 add r30,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 ) { ffc0db5c: 7f 9e 20 40 cmplw cr7,r30,r4 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc0db60: 90 01 00 44 stw r0,68(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; ffc0db64: 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 ) { ffc0db68: 7c d9 33 78 mr r25,r6 ffc0db6c: 7c 7f 1b 78 mr r31,r3 Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; ffc0db70: 83 83 00 20 lwz r28,32(r3) Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc0db74: 7c 9d 23 78 mr r29,r4 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; ffc0db78: 93 41 00 0c stw r26,12(r1) 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; ffc0db7c: 38 00 00 00 li r0,0 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; Heap_Block *extend_last_block = NULL; ffc0db80: 93 41 00 08 stw r26,8(r1) uintptr_t const page_size = heap->page_size; ffc0db84: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0db88: 80 c3 00 14 lwz r6,20(r3) 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; ffc0db8c: 83 03 00 30 lwz r24,48(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 ) { ffc0db90: 41 bc 02 70 blt+ cr7,ffc0de00 <_Heap_Extend+0x2b4> return false; } extend_area_ok = _Heap_Get_first_and_last_block( ffc0db94: 7c 83 23 78 mr r3,r4 ffc0db98: 38 e1 00 0c addi r7,r1,12 ffc0db9c: 7c a4 2b 78 mr r4,r5 ffc0dba0: 39 01 00 08 addi r8,r1,8 ffc0dba4: 7f 65 db 78 mr r5,r27 ffc0dba8: 4b ff b4 51 bl ffc08ff8 <_Heap_Get_first_and_last_block> &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { /* For simplicity we reject extend areas that are too small */ return false; ffc0dbac: 7f 40 d3 78 mr r0,r26 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc0dbb0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0dbb4: 41 9e 02 4c beq- cr7,ffc0de00 <_Heap_Extend+0x2b4> ffc0dbb8: 7f 89 e3 78 mr r9,r28 ffc0dbbc: 3a c0 00 00 li r22,0 ffc0dbc0: 39 40 00 00 li r10,0 ffc0dbc4: 3a e0 00 00 li r23,0 return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc0dbc8: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0dbcc: 7d 2b 4b 78 mr r11,r9 ffc0dbd0: 40 be 00 08 bne+ cr7,ffc0dbd8 <_Heap_Extend+0x8c> ffc0dbd4: 81 7f 00 18 lwz r11,24(r31) uintptr_t const sub_area_end = start_block->prev_size; ffc0dbd8: 80 09 00 00 lwz r0,0(r9) Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( ffc0dbdc: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0dbe0: 40 9d 00 0c ble- cr7,ffc0dbec <_Heap_Extend+0xa0> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ffc0dbe4: 7f 9e 58 40 cmplw cr7,r30,r11 ffc0dbe8: 41 9d 02 14 bgt- cr7,ffc0ddfc <_Heap_Extend+0x2b0> ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc0dbec: 7f 9e 58 00 cmpw cr7,r30,r11 ffc0dbf0: 41 9e 00 10 beq- cr7,ffc0dc00 <_Heap_Extend+0xb4> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { ffc0dbf4: 7f 9e 00 40 cmplw cr7,r30,r0 ffc0dbf8: 41 9c 00 10 blt- cr7,ffc0dc08 <_Heap_Extend+0xbc> ffc0dbfc: 48 00 00 10 b ffc0dc0c <_Heap_Extend+0xc0> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc0dc00: 7d 37 4b 78 mr r23,r9 ffc0dc04: 48 00 00 08 b ffc0dc0c <_Heap_Extend+0xc0> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { ffc0dc08: 7d 2a 4b 78 mr r10,r9 ffc0dc0c: 7d 60 db 96 divwu r11,r0,r27 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc0dc10: 7f 80 e8 00 cmpw cr7,r0,r29 ffc0dc14: 7d 6b d9 d6 mullw r11,r11,r27 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc0dc18: 39 6b ff f8 addi r11,r11,-8 ffc0dc1c: 40 be 00 10 bne+ cr7,ffc0dc2c <_Heap_Extend+0xe0> start_block->prev_size = extend_area_end; ffc0dc20: 93 c9 00 00 stw r30,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 ) ffc0dc24: 7d 7a 5b 78 mr r26,r11 ffc0dc28: 48 00 00 10 b ffc0dc38 <_Heap_Extend+0xec> merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { ffc0dc2c: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0dc30: 40 9c 00 08 bge- cr7,ffc0dc38 <_Heap_Extend+0xec> ffc0dc34: 7d 76 5b 78 mr r22,r11 - 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; ffc0dc38: 81 2b 00 04 lwz r9,4(r11) ffc0dc3c: 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); ffc0dc40: 7d 29 5a 14 add r9,r9,r11 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc0dc44: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0dc48: 40 9e ff 80 bne+ cr7,ffc0dbc8 <_Heap_Extend+0x7c> if ( extend_area_begin < heap->area_begin ) { ffc0dc4c: 80 1f 00 18 lwz r0,24(r31) ffc0dc50: 7f 9d 00 40 cmplw cr7,r29,r0 ffc0dc54: 40 9c 00 0c bge- cr7,ffc0dc60 <_Heap_Extend+0x114> heap->area_begin = extend_area_begin; ffc0dc58: 93 bf 00 18 stw r29,24(r31) ffc0dc5c: 48 00 00 14 b ffc0dc70 <_Heap_Extend+0x124> } else if ( heap->area_end < extend_area_end ) { ffc0dc60: 80 1f 00 1c lwz r0,28(r31) ffc0dc64: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0dc68: 40 9c 00 08 bge- cr7,ffc0dc70 <_Heap_Extend+0x124> heap->area_end = extend_area_end; ffc0dc6c: 93 df 00 1c stw r30,28(r31) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; ffc0dc70: 81 61 00 0c lwz r11,12(r1) ffc0dc74: 81 21 00 08 lwz r9,8(r1) extend_first_block->prev_size = extend_area_end; ffc0dc78: 93 cb 00 00 stw r30,0(r11) heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = ffc0dc7c: 7c 0b 48 50 subf r0,r11,r9 (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; ffc0dc80: 60 08 00 01 ori r8,r0,1 _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; ffc0dc84: 90 09 00 00 stw r0,0(r9) extend_last_block->size_and_flag = 0; ffc0dc88: 38 00 00 00 li r0,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 = ffc0dc8c: 91 0b 00 04 stw r8,4(r11) 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; ffc0dc90: 90 09 00 04 stw r0,4(r9) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc0dc94: 80 1f 00 20 lwz r0,32(r31) ffc0dc98: 7f 80 58 40 cmplw cr7,r0,r11 ffc0dc9c: 40 9d 00 0c ble- cr7,ffc0dca8 <_Heap_Extend+0x15c> heap->first_block = extend_first_block; ffc0dca0: 91 7f 00 20 stw r11,32(r31) ffc0dca4: 48 00 00 14 b ffc0dcb8 <_Heap_Extend+0x16c> } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { ffc0dca8: 80 1f 00 24 lwz r0,36(r31) ffc0dcac: 7f 80 48 40 cmplw cr7,r0,r9 ffc0dcb0: 40 9c 00 08 bge- cr7,ffc0dcb8 <_Heap_Extend+0x16c> heap->last_block = extend_last_block; ffc0dcb4: 91 3f 00 24 stw r9,36(r31) } if ( merge_below_block != NULL ) { ffc0dcb8: 2f 97 00 00 cmpwi cr7,r23,0 ffc0dcbc: 41 9e 00 48 beq- cr7,ffc0dd04 <_Heap_Extend+0x1b8> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; ffc0dcc0: 80 1f 00 10 lwz r0,16(r31) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); ffc0dcc4: 3b bd 00 08 addi r29,r29,8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; ffc0dcc8: 7d 3d 03 96 divwu r9,r29,r0 ffc0dccc: 7d 29 01 d6 mullw r9,r9,r0 if ( remainder != 0 ) { ffc0dcd0: 7d 29 e8 51 subf. r9,r9,r29 ffc0dcd4: 41 82 00 0c beq- ffc0dce0 <_Heap_Extend+0x194> <== NEVER TAKEN return value - remainder + alignment; ffc0dcd8: 7f bd 02 14 add r29,r29,r0 ffc0dcdc: 7f a9 e8 50 subf r29,r9,r29 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; ffc0dce0: 80 17 00 00 lwz r0,0(r23) ) { uintptr_t const page_size = heap->page_size; 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 = ffc0dce4: 38 9d ff f8 addi r4,r29,-8 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; _Heap_Free_block( heap, new_first_block ); ffc0dce8: 7f e3 fb 78 mr r3,r31 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; ffc0dcec: 90 1d ff f8 stw r0,-8(r29) 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 = ffc0dcf0: 7c 04 b8 50 subf r0,r4,r23 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; ffc0dcf4: 60 00 00 01 ori r0,r0,1 ffc0dcf8: 90 04 00 04 stw r0,4(r4) _Heap_Free_block( heap, new_first_block ); ffc0dcfc: 4b ff fe 15 bl ffc0db10 <_Heap_Free_block> ffc0dd00: 48 00 00 1c b ffc0dd1c <_Heap_Extend+0x1d0> 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 ) { ffc0dd04: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0dd08: 41 9e 00 14 beq- cr7,ffc0dd1c <_Heap_Extend+0x1d0> _Heap_Link_below( ffc0dd0c: 81 21 00 08 lwz r9,8(r1) { 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; ffc0dd10: 7d 49 50 50 subf r10,r9,r10 ffc0dd14: 61 4a 00 01 ori r10,r10,1 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = ffc0dd18: 91 49 00 04 stw r10,4(r9) link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { ffc0dd1c: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0dd20: 41 9e 00 4c beq- cr7,ffc0dd6c <_Heap_Extend+0x220> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0dd24: 80 1f 00 10 lwz r0,16(r31) ) { 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, ffc0dd28: 3b de ff f8 addi r30,r30,-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( ffc0dd2c: 7f da f0 50 subf r30,r26,r30 ffc0dd30: 7f de 03 96 divwu r30,r30,r0 ffc0dd34: 7f de 01 d6 mullw r30,r30,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) ffc0dd38: 80 1a 00 04 lwz r0,4(r26) | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); ffc0dd3c: 7f e3 fb 78 mr r3,r31 ); 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) ffc0dd40: 7c 1e 00 50 subf r0,r30,r0 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc0dd44: 7d 3e d2 14 add r9,r30,r26 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; ffc0dd48: 60 00 00 01 ori r0,r0,1 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc0dd4c: 90 09 00 04 stw r0,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 ); ffc0dd50: 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; ffc0dd54: 80 1a 00 04 lwz r0,4(r26) ffc0dd58: 54 00 07 fe clrlwi r0,r0,31 block->size_and_flag = size | flag; ffc0dd5c: 7f de 03 78 or r30,r30,r0 ffc0dd60: 93 da 00 04 stw r30,4(r26) ffc0dd64: 4b ff fd ad bl ffc0db10 <_Heap_Free_block> ffc0dd68: 48 00 00 34 b ffc0dd9c <_Heap_Extend+0x250> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { ffc0dd6c: 2f 96 00 00 cmpwi cr7,r22,0 ffc0dd70: 41 9e 00 2c beq- cr7,ffc0dd9c <_Heap_Extend+0x250> 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; ffc0dd74: 81 76 00 04 lwz r11,4(r22) ) { 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 ); ffc0dd78: 80 01 00 0c lwz r0,12(r1) ffc0dd7c: 55 6b 07 fe clrlwi r11,r11,31 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( ffc0dd80: 81 21 00 08 lwz r9,8(r1) ) { 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 ); ffc0dd84: 7c 16 00 50 subf r0,r22,r0 block->size_and_flag = size | flag; ffc0dd88: 7d 60 03 78 or r0,r11,r0 ffc0dd8c: 90 16 00 04 stw r0,4(r22) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; ffc0dd90: 80 09 00 04 lwz r0,4(r9) ffc0dd94: 60 00 00 01 ori r0,r0,1 ffc0dd98: 90 09 00 04 stw r0,4(r9) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc0dd9c: 2f 97 00 00 cmpwi cr7,r23,0 ffc0dda0: 40 be 00 18 bne+ cr7,ffc0ddb8 <_Heap_Extend+0x26c> ffc0dda4: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0dda8: 40 be 00 10 bne+ cr7,ffc0ddb8 <_Heap_Extend+0x26c> _Heap_Free_block( heap, extend_first_block ); ffc0ddac: 80 81 00 0c lwz r4,12(r1) ffc0ddb0: 7f e3 fb 78 mr r3,r31 ffc0ddb4: 4b ff fd 5d bl ffc0db10 <_Heap_Free_block> */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( heap->last_block, (uintptr_t) heap->first_block - (uintptr_t) heap->last_block ffc0ddb8: 81 3f 00 24 lwz r9,36(r31) extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) ffc0ddbc: 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( ffc0ddc0: 80 1f 00 20 lwz r0,32(r31) 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; ffc0ddc4: 81 69 00 04 lwz r11,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( ffc0ddc8: 7c 09 00 50 subf r0,r9,r0 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; ffc0ddcc: 55 6b 07 fe clrlwi r11,r11,31 block->size_and_flag = size | flag; ffc0ddd0: 7d 60 03 78 or r0,r11,r0 ffc0ddd4: 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; ffc0ddd8: 80 1f 00 30 lwz r0,48(r31) ffc0dddc: 7f 18 00 50 subf r24,r24,r0 /* Statistics */ stats->size += extended_size; ffc0dde0: 80 1f 00 2c lwz r0,44(r31) ffc0dde4: 7c 00 c2 14 add r0,r0,r24 ffc0dde8: 90 1f 00 2c stw r0,44(r31) if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; ffc0ddec: 38 00 00 01 li r0,1 extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) ffc0ddf0: 41 9e 00 10 beq- cr7,ffc0de00 <_Heap_Extend+0x2b4> <== NEVER TAKEN *extended_size_ptr = extended_size; ffc0ddf4: 93 19 00 00 stw r24,0(r25) ffc0ddf8: 48 00 00 08 b ffc0de00 <_Heap_Extend+0x2b4> _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; ffc0ddfc: 38 00 00 00 li r0,0 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc0de00: 39 61 00 40 addi r11,r1,64 ffc0de04: 7c 03 03 78 mr r3,r0 ffc0de08: 4b ff 26 d0 b ffc004d8 <_restgpr_22_x> =============================================================================== ffc0de8c <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc0de8c: 7c 2b 0b 78 mr r11,r1 ffc0de90: 94 21 ff f0 stwu r1,-16(r1) ffc0de94: 7c 08 02 a6 mflr r0 ffc0de98: 7c 69 1b 78 mr r9,r3 ffc0de9c: 48 00 c5 81 bl ffc1a41c <_savegpr_31> /* * 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 ) { ffc0dea0: 7c 8b 23 79 mr. r11,r4 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc0dea4: 90 01 00 14 stw r0,20(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; ffc0dea8: 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 ) { ffc0deac: 41 82 01 e8 beq- ffc0e094 <_Heap_Free+0x208> ffc0deb0: 80 09 00 10 lwz r0,16(r9) 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 ffc0deb4: 80 a9 00 20 lwz r5,32(r9) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0deb8: 7d 6b 03 96 divwu r11,r11,r0 ffc0debc: 7d 6b 01 d6 mullw r11,r11,r0 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; ffc0dec0: 38 00 00 00 li r0,0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc0dec4: 39 6b ff f8 addi r11,r11,-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; ffc0dec8: 7f 8b 28 40 cmplw cr7,r11,r5 ffc0decc: 41 9c 00 14 blt- cr7,ffc0dee0 <_Heap_Free+0x54> ffc0ded0: 80 09 00 24 lwz r0,36(r9) ffc0ded4: 7c 0b 00 10 subfc r0,r11,r0 ffc0ded8: 38 00 00 00 li r0,0 ffc0dedc: 7c 00 01 14 adde r0,r0,r0 } 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 ) ) { ffc0dee0: 2f 80 00 00 cmpwi cr7,r0,0 return false; ffc0dee4: 38 60 00 00 li r3,0 } 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 ) ) { ffc0dee8: 41 9e 01 ac beq- cr7,ffc0e094 <_Heap_Free+0x208> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0deec: 80 cb 00 04 lwz r6,4(r11) ffc0def0: 38 00 00 00 li r0,0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0def4: 54 c8 00 3c rlwinm r8,r6,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); ffc0def8: 7d 48 5a 14 add r10,r8,r11 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; ffc0defc: 7f 8a 28 40 cmplw cr7,r10,r5 ffc0df00: 41 9c 00 14 blt- cr7,ffc0df14 <_Heap_Free+0x88> <== NEVER TAKEN ffc0df04: 80 09 00 24 lwz r0,36(r9) ffc0df08: 7c 0a 00 10 subfc r0,r10,r0 ffc0df0c: 38 00 00 00 li r0,0 ffc0df10: 7c 00 01 14 adde r0,r0,r0 _Heap_Protection_block_check( heap, block ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { ffc0df14: 2f 80 00 00 cmpwi cr7,r0,0 return false; ffc0df18: 38 60 00 00 li r3,0 _Heap_Protection_block_check( heap, block ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { ffc0df1c: 41 9e 01 78 beq- cr7,ffc0e094 <_Heap_Free+0x208> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0df20: 80 0a 00 04 lwz r0,4(r10) return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { ffc0df24: 70 04 00 01 andi. r4,r0,1 ffc0df28: 41 82 01 6c beq- ffc0e094 <_Heap_Free+0x208> if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block ffc0df2c: 80 69 00 24 lwz r3,36(r9) - 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; ffc0df30: 54 00 00 3c rlwinm r0,r0,0,0,30 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); ffc0df34: 38 80 00 00 li r4,0 ffc0df38: 7f 8a 18 00 cmpw cr7,r10,r3 ffc0df3c: 41 9e 00 18 beq- cr7,ffc0df54 <_Heap_Free+0xc8> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0df40: 7c ea 02 14 add r7,r10,r0 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; ffc0df44: 80 e7 00 04 lwz r7,4(r7) return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) ffc0df48: 70 ff 00 01 andi. r31,r7,1 ffc0df4c: 7c 80 00 26 mfcr r4 ffc0df50: 54 84 1f fe rlwinm r4,r4,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 ) ) { ffc0df54: 70 c7 00 01 andi. r7,r6,1 if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block ffc0df58: 54 84 06 3e clrlwi r4,r4,24 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { ffc0df5c: 40 82 00 94 bne- ffc0dff0 <_Heap_Free+0x164> uintptr_t const prev_size = block->prev_size; ffc0df60: 80 cb 00 00 lwz r6,0(r11) 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; ffc0df64: 39 80 00 00 li r12,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0df68: 7c e6 58 50 subf r7,r6,r11 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; ffc0df6c: 7f 87 28 40 cmplw cr7,r7,r5 ffc0df70: 41 9c 00 10 blt- cr7,ffc0df80 <_Heap_Free+0xf4> <== NEVER TAKEN ffc0df74: 7d 87 18 10 subfc r12,r7,r3 ffc0df78: 39 80 00 00 li r12,0 ffc0df7c: 7d 8c 61 14 adde r12,r12,r12 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { ffc0df80: 2f 8c 00 00 cmpwi cr7,r12,0 _HAssert( false ); return( false ); ffc0df84: 38 60 00 00 li r3,0 if ( !_Heap_Is_prev_used( block ) ) { uintptr_t const prev_size = block->prev_size; Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { ffc0df88: 41 9e 01 0c beq- cr7,ffc0e094 <_Heap_Free+0x208> <== 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; ffc0df8c: 80 a7 00 04 lwz r5,4(r7) return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { ffc0df90: 70 bf 00 01 andi. r31,r5,1 ffc0df94: 41 82 01 00 beq- ffc0e094 <_Heap_Free+0x208> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc0df98: 2f 84 00 00 cmpwi cr7,r4,0 ffc0df9c: 7c c8 32 14 add r6,r8,r6 ffc0dfa0: 41 9e 00 34 beq- cr7,ffc0dfd4 <_Heap_Free+0x148> return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; ffc0dfa4: 81 6a 00 08 lwz r11,8(r10) uintptr_t const size = block_size + prev_size + next_block_size; ffc0dfa8: 7c c6 02 14 add r6,r6,r0 Heap_Block *prev = block->prev; ffc0dfac: 81 4a 00 0c lwz r10,12(r10) prev->next = next; ffc0dfb0: 91 6a 00 08 stw r11,8(r10) next->prev = prev; ffc0dfb4: 91 4b 00 0c stw r10,12(r11) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc0dfb8: 81 69 00 38 lwz r11,56(r9) ffc0dfbc: 38 0b ff ff addi r0,r11,-1 ffc0dfc0: 90 09 00 38 stw r0,56(r9) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0dfc4: 60 c0 00 01 ori r0,r6,1 ffc0dfc8: 90 07 00 04 stw r0,4(r7) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; ffc0dfcc: 7c c6 39 2e stwx r6,r6,r7 ffc0dfd0: 48 00 00 9c b ffc0e06c <_Heap_Free+0x1e0> } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0dfd4: 60 c0 00 01 ori r0,r6,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc0dfd8: 7c c8 59 2e stwx r6,r8,r11 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; ffc0dfdc: 90 07 00 04 stw r0,4(r7) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0dfe0: 80 0a 00 04 lwz r0,4(r10) ffc0dfe4: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc0dfe8: 90 0a 00 04 stw r0,4(r10) ffc0dfec: 48 00 00 80 b ffc0e06c <_Heap_Free+0x1e0> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ ffc0dff0: 2f 84 00 00 cmpwi cr7,r4,0 ffc0dff4: 41 9e 00 30 beq- cr7,ffc0e024 <_Heap_Free+0x198> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; ffc0dff8: 80 ca 00 08 lwz r6,8(r10) uintptr_t const size = block_size + next_block_size; ffc0dffc: 7c e0 42 14 add r7,r0,r8 Heap_Block *prev = old_block->prev; ffc0e000: 81 4a 00 0c lwz r10,12(r10) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0e004: 60 e0 00 01 ori r0,r7,1 new_block->next = next; ffc0e008: 90 cb 00 08 stw r6,8(r11) new_block->prev = prev; ffc0e00c: 91 4b 00 0c stw r10,12(r11) next->prev = new_block; prev->next = new_block; ffc0e010: 91 6a 00 08 stw r11,8(r10) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc0e014: 91 66 00 0c stw r11,12(r6) ffc0e018: 90 0b 00 04 stw r0,4(r11) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc0e01c: 7c e7 59 2e stwx r7,r7,r11 ffc0e020: 48 00 00 4c b ffc0e06c <_Heap_Free+0x1e0> } 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; ffc0e024: 61 00 00 01 ori r0,r8,1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc0e028: 80 e9 00 08 lwz r7,8(r9) ffc0e02c: 90 0b 00 04 stw r0,4(r11) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0e030: 80 0a 00 04 lwz r0,4(r10) new_block->next = next; ffc0e034: 90 eb 00 08 stw r7,8(r11) ffc0e038: 54 00 00 3c rlwinm r0,r0,0,0,30 new_block->prev = block_before; ffc0e03c: 91 2b 00 0c stw r9,12(r11) next_block->prev_size = block_size; ffc0e040: 7d 08 59 2e stwx r8,r8,r11 block_before->next = new_block; next->prev = new_block; ffc0e044: 91 67 00 0c stw r11,12(r7) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; ffc0e048: 91 69 00 08 stw r11,8(r9) /* Statistics */ ++stats->free_blocks; ffc0e04c: 81 69 00 38 lwz r11,56(r9) } 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; ffc0e050: 90 0a 00 04 stw r0,4(r10) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc0e054: 38 0b 00 01 addi r0,r11,1 if ( stats->max_free_blocks < stats->free_blocks ) { ffc0e058: 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; ffc0e05c: 90 09 00 38 stw r0,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc0e060: 7f 8b 00 40 cmplw cr7,r11,r0 ffc0e064: 40 9c 00 08 bge- cr7,ffc0e06c <_Heap_Free+0x1e0> stats->max_free_blocks = stats->free_blocks; ffc0e068: 90 09 00 3c stw r0,60(r9) } } /* Statistics */ --stats->used_blocks; ffc0e06c: 81 69 00 40 lwz r11,64(r9) ++stats->frees; stats->free_size += block_size; return( true ); ffc0e070: 38 60 00 01 li r3,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0e074: 38 0b ff ff addi r0,r11,-1 ++stats->frees; ffc0e078: 81 69 00 50 lwz r11,80(r9) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0e07c: 90 09 00 40 stw r0,64(r9) ++stats->frees; ffc0e080: 38 0b 00 01 addi r0,r11,1 ffc0e084: 90 09 00 50 stw r0,80(r9) stats->free_size += block_size; ffc0e088: 80 09 00 30 lwz r0,48(r9) ffc0e08c: 7d 00 42 14 add r8,r0,r8 ffc0e090: 91 09 00 30 stw r8,48(r9) return( true ); } ffc0e094: 39 61 00 10 addi r11,r1,16 ffc0e098: 4b ff 24 ac b ffc00544 <_restgpr_31_x> =============================================================================== ffc1af40 <_Heap_Size_of_alloc_area>: RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1af40: 80 03 00 10 lwz r0,16(r3) bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { ffc1af44: 7c 69 1b 78 mr r9,r3 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block ffc1af48: 81 03 00 20 lwz r8,32(r3) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1af4c: 7d 44 03 96 divwu r10,r4,r0 ffc1af50: 7d 4a 01 d6 mullw r10,r10,r0 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; ffc1af54: 38 00 00 00 li r0,0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc1af58: 39 4a ff f8 addi r10,r10,-8 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc1af5c: 7f 8a 40 40 cmplw cr7,r10,r8 ffc1af60: 41 9c 00 14 blt- cr7,ffc1af74 <_Heap_Size_of_alloc_area+0x34> ffc1af64: 80 03 00 24 lwz r0,36(r3) ffc1af68: 7c 0a 00 10 subfc r0,r10,r0 ffc1af6c: 38 00 00 00 li r0,0 ffc1af70: 7c 00 01 14 adde r0,r0,r0 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { ffc1af74: 2f 80 00 00 cmpwi cr7,r0,0 return false; ffc1af78: 38 60 00 00 li r3,0 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { ffc1af7c: 4d 9e 00 20 beqlr cr7 - 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; ffc1af80: 81 6a 00 04 lwz r11,4(r10) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc1af84: 38 00 00 00 li r0,0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc1af88: 55 6b 00 3c rlwinm r11,r11,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); ffc1af8c: 7d 6b 52 14 add r11,r11,r10 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc1af90: 7f 8b 40 40 cmplw cr7,r11,r8 ffc1af94: 41 9c 00 14 blt- cr7,ffc1afa8 <_Heap_Size_of_alloc_area+0x68><== NEVER TAKEN ffc1af98: 80 09 00 24 lwz r0,36(r9) ffc1af9c: 7c 0b 00 10 subfc r0,r11,r0 ffc1afa0: 38 00 00 00 li r0,0 ffc1afa4: 7c 00 01 14 adde r0,r0,r0 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( ffc1afa8: 2f 80 00 00 cmpwi cr7,r0,0 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; ffc1afac: 38 60 00 00 li r3,0 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( ffc1afb0: 4d 9e 00 20 beqlr cr7 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; ffc1afb4: 80 0b 00 04 lwz r0,4(r11) !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ffc1afb8: 70 09 00 01 andi. r9,r0,1 ffc1afbc: 4d 82 00 20 beqlr ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; ffc1afc0: 20 84 00 04 subfic r4,r4,4 ffc1afc4: 7d 64 5a 14 add r11,r4,r11 ffc1afc8: 91 65 00 00 stw r11,0(r5) return true; ffc1afcc: 38 60 00 01 li r3,1 } ffc1afd0: 4e 80 00 20 blr =============================================================================== ffc09c64 <_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; ffc09c64: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc09c68: 94 21 ff 98 stwu r1,-104(r1) ffc09c6c: 7c 08 02 a6 mflr r0 ffc09c70: bd c1 00 20 stmw r14,32(r1) ffc09c74: 7c 7e 1b 78 mr r30,r3 ffc09c78: 7c 9f 23 78 mr r31,r4 ffc09c7c: 90 01 00 6c stw r0,108(r1) uintptr_t const page_size = heap->page_size; ffc09c80: 83 43 00 10 lwz r26,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc09c84: 83 23 00 14 lwz r25,20(r3) Heap_Block *const first_block = heap->first_block; ffc09c88: 83 03 00 20 lwz r24,32(r3) Heap_Block *const last_block = heap->last_block; ffc09c8c: 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; ffc09c90: 41 9e 00 10 beq- cr7,ffc09ca0 <_Heap_Walk+0x3c> ffc09c94: 3d 20 ff c1 lis r9,-63 ffc09c98: 39 29 9b b4 addi r9,r9,-25676 ffc09c9c: 48 00 00 0c b ffc09ca8 <_Heap_Walk+0x44> ffc09ca0: 3d 20 ff c1 lis r9,-63 ffc09ca4: 39 29 9b b0 addi r9,r9,-25680 ffc09ca8: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc09cac: 3d 20 00 00 lis r9,0 return true; ffc09cb0: 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() ) ) { ffc09cb4: 80 09 27 e0 lwz r0,10208(r9) ffc09cb8: 2f 80 00 03 cmpwi cr7,r0,3 ffc09cbc: 40 be 04 bc bne+ cr7,ffc0a178 <_Heap_Walk+0x514> 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)( ffc09cc0: 80 1e 00 08 lwz r0,8(r30) ffc09cc4: 3c a0 ff c1 lis r5,-63 ffc09cc8: 81 1e 00 18 lwz r8,24(r30) ffc09ccc: 7f e3 fb 78 mr r3,r31 ffc09cd0: 90 01 00 0c stw r0,12(r1) ffc09cd4: 38 80 00 00 li r4,0 ffc09cd8: 38 a5 75 95 addi r5,r5,30101 ffc09cdc: 80 1e 00 0c lwz r0,12(r30) ffc09ce0: 7f 46 d3 78 mr r6,r26 ffc09ce4: 81 3e 00 1c lwz r9,28(r30) ffc09ce8: 7f 27 cb 78 mr r7,r25 ffc09cec: 90 01 00 10 stw r0,16(r1) ffc09cf0: 7f 0a c3 78 mr r10,r24 ffc09cf4: 80 01 00 18 lwz r0,24(r1) ffc09cf8: 92 e1 00 08 stw r23,8(r1) ffc09cfc: 7c 09 03 a6 mtctr r0 ffc09d00: 4c c6 31 82 crclr 4*cr1+eq ffc09d04: 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 ) { ffc09d08: 2f 9a 00 00 cmpwi cr7,r26,0 ffc09d0c: 40 be 00 18 bne+ cr7,ffc09d24 <_Heap_Walk+0xc0> (*printer)( source, true, "page size is zero\n" ); ffc09d10: 3c a0 ff c1 lis r5,-63 ffc09d14: 7f e3 fb 78 mr r3,r31 ffc09d18: 38 80 00 01 li r4,1 ffc09d1c: 38 a5 76 26 addi r5,r5,30246 ffc09d20: 48 00 00 c0 b ffc09de0 <_Heap_Walk+0x17c> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc09d24: 73 49 00 07 andi. r9,r26,7 ffc09d28: 41 a2 00 1c beq+ ffc09d44 <_Heap_Walk+0xe0> (*printer)( ffc09d2c: 3c a0 ff c1 lis r5,-63 ffc09d30: 7f e3 fb 78 mr r3,r31 ffc09d34: 38 80 00 01 li r4,1 ffc09d38: 38 a5 76 39 addi r5,r5,30265 ffc09d3c: 7f 46 d3 78 mr r6,r26 ffc09d40: 48 00 04 54 b ffc0a194 <_Heap_Walk+0x530> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc09d44: 7c 19 d3 96 divwu r0,r25,r26 ffc09d48: 7c 00 d1 d6 mullw r0,r0,r26 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc09d4c: 7f 99 00 00 cmpw cr7,r25,r0 ffc09d50: 41 be 00 1c beq+ cr7,ffc09d6c <_Heap_Walk+0x108> (*printer)( ffc09d54: 3c a0 ff c1 lis r5,-63 ffc09d58: 7f e3 fb 78 mr r3,r31 ffc09d5c: 38 80 00 01 li r4,1 ffc09d60: 38 a5 76 57 addi r5,r5,30295 ffc09d64: 7f 26 cb 78 mr r6,r25 ffc09d68: 48 00 04 2c b ffc0a194 <_Heap_Walk+0x530> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc09d6c: 38 18 00 08 addi r0,r24,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc09d70: 7d 20 d3 96 divwu r9,r0,r26 ffc09d74: 7d 29 d1 d6 mullw r9,r9,r26 ); return false; } if ( ffc09d78: 7f 80 48 00 cmpw cr7,r0,r9 ffc09d7c: 41 be 00 1c beq+ cr7,ffc09d98 <_Heap_Walk+0x134> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc09d80: 3c a0 ff c1 lis r5,-63 ffc09d84: 7f e3 fb 78 mr r3,r31 ffc09d88: 38 80 00 01 li r4,1 ffc09d8c: 38 a5 76 7b addi r5,r5,30331 ffc09d90: 7f 06 c3 78 mr r6,r24 ffc09d94: 48 00 04 00 b ffc0a194 <_Heap_Walk+0x530> 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; ffc09d98: 80 18 00 04 lwz r0,4(r24) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc09d9c: 70 09 00 01 andi. r9,r0,1 ffc09da0: 40 a2 00 18 bne+ ffc09db8 <_Heap_Walk+0x154> (*printer)( ffc09da4: 3c a0 ff c1 lis r5,-63 ffc09da8: 7f e3 fb 78 mr r3,r31 ffc09dac: 38 80 00 01 li r4,1 ffc09db0: 38 a5 76 ac addi r5,r5,30380 ffc09db4: 48 00 00 2c b ffc09de0 <_Heap_Walk+0x17c> - 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; ffc09db8: 83 b7 00 04 lwz r29,4(r23) ffc09dbc: 57 bd 00 3c rlwinm r29,r29,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); ffc09dc0: 7f b7 ea 14 add r29,r23,r29 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; ffc09dc4: 80 1d 00 04 lwz r0,4(r29) ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc09dc8: 70 09 00 01 andi. r9,r0,1 ffc09dcc: 40 a2 00 28 bne+ ffc09df4 <_Heap_Walk+0x190> (*printer)( ffc09dd0: 3c a0 ff c1 lis r5,-63 ffc09dd4: 7f e3 fb 78 mr r3,r31 ffc09dd8: 38 80 00 01 li r4,1 ffc09ddc: 38 a5 76 da addi r5,r5,30426 ffc09de0: 80 01 00 18 lwz r0,24(r1) ffc09de4: 7c 09 03 a6 mtctr r0 ffc09de8: 4c c6 31 82 crclr 4*cr1+eq ffc09dec: 4e 80 04 21 bctrl ffc09df0: 48 00 00 ec b ffc09edc <_Heap_Walk+0x278> ); return false; } if ( ffc09df4: 7f 9d c0 00 cmpw cr7,r29,r24 ffc09df8: 41 9e 00 18 beq- cr7,ffc09e10 <_Heap_Walk+0x1ac> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( ffc09dfc: 3c a0 ff c1 lis r5,-63 ffc09e00: 7f e3 fb 78 mr r3,r31 ffc09e04: 38 80 00 01 li r4,1 ffc09e08: 38 a5 76 ef addi r5,r5,30447 ffc09e0c: 4b ff ff d4 b ffc09de0 <_Heap_Walk+0x17c> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; ffc09e10: 81 3e 00 10 lwz r9,16(r30) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); ffc09e14: 7f c0 f3 78 mr r0,r30 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc09e18: 80 de 00 08 lwz r6,8(r30) ffc09e1c: 48 00 00 d0 b ffc09eec <_Heap_Walk+0x288> 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; ffc09e20: 81 5e 00 20 lwz r10,32(r30) ffc09e24: 39 60 00 00 li r11,0 ffc09e28: 7f 8a 30 40 cmplw cr7,r10,r6 ffc09e2c: 41 9d 00 14 bgt- cr7,ffc09e40 <_Heap_Walk+0x1dc> ffc09e30: 81 7e 00 24 lwz r11,36(r30) ffc09e34: 7d 66 58 10 subfc r11,r6,r11 ffc09e38: 39 60 00 00 li r11,0 ffc09e3c: 7d 6b 59 14 adde r11,r11,r11 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 ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { ffc09e40: 2f 8b 00 00 cmpwi cr7,r11,0 ffc09e44: 40 be 00 18 bne+ cr7,ffc09e5c <_Heap_Walk+0x1f8> (*printer)( ffc09e48: 3c a0 ff c1 lis r5,-63 ffc09e4c: 7f e3 fb 78 mr r3,r31 ffc09e50: 38 80 00 01 li r4,1 ffc09e54: 38 a5 77 1e addi r5,r5,30494 ffc09e58: 48 00 03 3c b ffc0a194 <_Heap_Walk+0x530> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc09e5c: 39 66 00 08 addi r11,r6,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc09e60: 7d 4b 4b 96 divwu r10,r11,r9 ffc09e64: 7d 4a 49 d6 mullw r10,r10,r9 ); return false; } if ( ffc09e68: 7f 8b 50 00 cmpw cr7,r11,r10 ffc09e6c: 41 be 00 18 beq+ cr7,ffc09e84 <_Heap_Walk+0x220> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc09e70: 3c a0 ff c1 lis r5,-63 ffc09e74: 7f e3 fb 78 mr r3,r31 ffc09e78: 38 80 00 01 li r4,1 ffc09e7c: 38 a5 77 3e addi r5,r5,30526 ffc09e80: 48 00 03 14 b ffc0a194 <_Heap_Walk+0x530> - 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; ffc09e84: 81 66 00 04 lwz r11,4(r6) ffc09e88: 55 6b 00 3c rlwinm r11,r11,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc09e8c: 7d 66 5a 14 add r11,r6,r11 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc09e90: 81 6b 00 04 lwz r11,4(r11) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc09e94: 71 6a 00 01 andi. r10,r11,1 ffc09e98: 41 a2 00 18 beq+ ffc09eb0 <_Heap_Walk+0x24c> (*printer)( ffc09e9c: 3c a0 ff c1 lis r5,-63 ffc09ea0: 7f e3 fb 78 mr r3,r31 ffc09ea4: 38 80 00 01 li r4,1 ffc09ea8: 38 a5 77 6e addi r5,r5,30574 ffc09eac: 48 00 02 e8 b ffc0a194 <_Heap_Walk+0x530> ); return false; } if ( free_block->prev != prev_block ) { ffc09eb0: 80 e6 00 0c lwz r7,12(r6) ffc09eb4: 7f 87 00 00 cmpw cr7,r7,r0 ffc09eb8: 41 be 00 2c beq+ cr7,ffc09ee4 <_Heap_Walk+0x280> (*printer)( ffc09ebc: 3c a0 ff c1 lis r5,-63 ffc09ec0: 7f e3 fb 78 mr r3,r31 ffc09ec4: 38 80 00 01 li r4,1 ffc09ec8: 38 a5 77 8a addi r5,r5,30602 ffc09ecc: 80 01 00 18 lwz r0,24(r1) ffc09ed0: 7c 09 03 a6 mtctr r0 ffc09ed4: 4c c6 31 82 crclr 4*cr1+eq ffc09ed8: 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; ffc09edc: 38 60 00 00 li r3,0 ffc09ee0: 48 00 02 98 b ffc0a178 <_Heap_Walk+0x514> return false; } prev_block = free_block; free_block = free_block->next; ffc09ee4: 7c c0 33 78 mr r0,r6 ffc09ee8: 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 ) { ffc09eec: 7f 86 f0 00 cmpw cr7,r6,r30 ffc09ef0: 40 9e ff 30 bne+ cr7,ffc09e20 <_Heap_Walk+0x1bc> ffc09ef4: 48 00 00 0c b ffc09f00 <_Heap_Walk+0x29c> block->prev_size ); } block = next_block; } while ( block != first_block ); ffc09ef8: 7f 7d db 78 mr r29,r27 ffc09efc: 48 00 00 30 b ffc09f2c <_Heap_Walk+0x2c8> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc09f00: 3e 60 ff c1 lis r19,-63 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc09f04: 3e 80 ff c1 lis r20,-63 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)( ffc09f08: 3e 40 ff c1 lis r18,-63 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc09f0c: 3a 73 79 2a addi r19,r19,31018 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc09f10: 3a 94 79 13 addi r20,r20,30995 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)( ffc09f14: 3a 52 78 76 addi r18,r18,30838 ffc09f18: 3e 20 ff c1 lis r17,-63 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc09f1c: 3e c0 ff c1 lis r22,-63 ffc09f20: 3e 00 ff c1 lis r16,-63 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)( ffc09f24: 3d e0 ff c1 lis r15,-63 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc09f28: 3d c0 ff c1 lis r14,-63 block = next_block; } while ( block != first_block ); return true; } ffc09f2c: 82 bd 00 04 lwz r21,4(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; ffc09f30: 38 00 00 00 li r0,0 ffc09f34: 81 3e 00 20 lwz r9,32(r30) - 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; ffc09f38: 56 bc 00 3c rlwinm r28,r21,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); ffc09f3c: 7f 7c ea 14 add r27,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; ffc09f40: 7f 89 d8 40 cmplw cr7,r9,r27 ffc09f44: 41 9d 00 14 bgt- cr7,ffc09f58 <_Heap_Walk+0x2f4> <== NEVER TAKEN ffc09f48: 80 1e 00 24 lwz r0,36(r30) ffc09f4c: 7c 1b 00 10 subfc r0,r27,r0 ffc09f50: 38 00 00 00 li r0,0 ffc09f54: 7c 00 01 14 adde r0,r0,r0 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; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { ffc09f58: 2f 80 00 00 cmpwi cr7,r0,0 ffc09f5c: 40 be 00 18 bne+ cr7,ffc09f74 <_Heap_Walk+0x310> (*printer)( ffc09f60: 3c a0 ff c1 lis r5,-63 ffc09f64: 7f e3 fb 78 mr r3,r31 ffc09f68: 38 80 00 01 li r4,1 ffc09f6c: 38 a5 77 bc addi r5,r5,30652 ffc09f70: 48 00 00 a8 b ffc0a018 <_Heap_Walk+0x3b4> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc09f74: 7d 3c d3 96 divwu r9,r28,r26 ffc09f78: 7d 29 d1 d6 mullw r9,r9,r26 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; ffc09f7c: 7f a0 ba 78 xor r0,r29,r23 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc09f80: 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; ffc09f84: 7c 00 00 34 cntlzw r0,r0 ffc09f88: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc09f8c: 68 00 00 01 xori r0,r0,1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc09f90: 41 9e 00 28 beq- cr7,ffc09fb8 <_Heap_Walk+0x354> ffc09f94: 2f 80 00 00 cmpwi cr7,r0,0 ffc09f98: 41 be 00 20 beq+ cr7,ffc09fb8 <_Heap_Walk+0x354> (*printer)( ffc09f9c: 3c a0 ff c1 lis r5,-63 ffc09fa0: 7f e3 fb 78 mr r3,r31 ffc09fa4: 38 80 00 01 li r4,1 ffc09fa8: 38 a5 77 e9 addi r5,r5,30697 ffc09fac: 7f a6 eb 78 mr r6,r29 ffc09fb0: 7f 87 e3 78 mr r7,r28 ffc09fb4: 4b ff ff 18 b ffc09ecc <_Heap_Walk+0x268> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { ffc09fb8: 7f 9c c8 40 cmplw cr7,r28,r25 ffc09fbc: 40 9c 00 3c bge- cr7,ffc09ff8 <_Heap_Walk+0x394> ffc09fc0: 2f 80 00 00 cmpwi cr7,r0,0 ffc09fc4: 41 be 00 34 beq+ cr7,ffc09ff8 <_Heap_Walk+0x394> <== NEVER TAKEN (*printer)( ffc09fc8: 80 01 00 18 lwz r0,24(r1) ffc09fcc: 3c a0 ff c1 lis r5,-63 ffc09fd0: 7f e3 fb 78 mr r3,r31 ffc09fd4: 38 80 00 01 li r4,1 ffc09fd8: 7c 09 03 a6 mtctr r0 ffc09fdc: 38 a5 78 17 addi r5,r5,30743 ffc09fe0: 7f a6 eb 78 mr r6,r29 ffc09fe4: 7f 87 e3 78 mr r7,r28 ffc09fe8: 7f 28 cb 78 mr r8,r25 ffc09fec: 4c c6 31 82 crclr 4*cr1+eq ffc09ff0: 4e 80 04 21 bctrl ffc09ff4: 4b ff fe e8 b ffc09edc <_Heap_Walk+0x278> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { ffc09ff8: 7f 9b e8 40 cmplw cr7,r27,r29 ffc09ffc: 41 9d 00 28 bgt- cr7,ffc0a024 <_Heap_Walk+0x3c0> ffc0a000: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a004: 41 be 00 20 beq+ cr7,ffc0a024 <_Heap_Walk+0x3c0> (*printer)( ffc0a008: 3c a0 ff c1 lis r5,-63 ffc0a00c: 7f e3 fb 78 mr r3,r31 ffc0a010: 38 80 00 01 li r4,1 ffc0a014: 38 a5 78 42 addi r5,r5,30786 ffc0a018: 7f a6 eb 78 mr r6,r29 ffc0a01c: 7f 67 db 78 mr r7,r27 ffc0a020: 4b ff fe ac b ffc09ecc <_Heap_Walk+0x268> 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; ffc0a024: 80 1b 00 04 lwz r0,4(r27) ffc0a028: 56 b5 07 fe clrlwi r21,r21,31 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0a02c: 70 09 00 01 andi. r9,r0,1 ffc0a030: 40 a2 00 ec bne+ ffc0a11c <_Heap_Walk+0x4b8> 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 ? ffc0a034: 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)( ffc0a038: 39 2f 75 62 addi r9,r15,30050 ffc0a03c: 80 1e 00 08 lwz r0,8(r30) 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; ffc0a040: 81 7e 00 0c lwz r11,12(r30) ffc0a044: 7f 88 00 00 cmpw cr7,r8,r0 ffc0a048: 41 9e 00 14 beq- cr7,ffc0a05c <_Heap_Walk+0x3f8> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0a04c: 7f 88 f0 00 cmpw cr7,r8,r30 ffc0a050: 39 36 74 ab addi r9,r22,29867 ffc0a054: 40 be 00 08 bne+ cr7,ffc0a05c <_Heap_Walk+0x3f8> ffc0a058: 39 2e 75 72 addi r9,r14,30066 block->next, block->next == last_free_block ? ffc0a05c: 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)( ffc0a060: 38 11 75 7c addi r0,r17,30076 ffc0a064: 7f 8a 58 00 cmpw cr7,r10,r11 ffc0a068: 41 9e 00 14 beq- cr7,ffc0a07c <_Heap_Walk+0x418> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0a06c: 7f 8a f0 00 cmpw cr7,r10,r30 ffc0a070: 38 16 74 ab addi r0,r22,29867 ffc0a074: 40 be 00 08 bne+ cr7,ffc0a07c <_Heap_Walk+0x418> ffc0a078: 38 10 75 8b addi r0,r16,30091 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)( ffc0a07c: 90 01 00 08 stw r0,8(r1) ffc0a080: 7f e3 fb 78 mr r3,r31 ffc0a084: 38 80 00 00 li r4,0 ffc0a088: 80 01 00 18 lwz r0,24(r1) ffc0a08c: 7e 45 93 78 mr r5,r18 ffc0a090: 7f a6 eb 78 mr r6,r29 ffc0a094: 7f 87 e3 78 mr r7,r28 ffc0a098: 7c 09 03 a6 mtctr r0 ffc0a09c: 4c c6 31 82 crclr 4*cr1+eq ffc0a0a0: 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 ) { ffc0a0a4: 81 1b 00 00 lwz r8,0(r27) ffc0a0a8: 7f 9c 40 00 cmpw cr7,r28,r8 ffc0a0ac: 41 be 00 34 beq+ cr7,ffc0a0e0 <_Heap_Walk+0x47c> (*printer)( ffc0a0b0: 80 01 00 18 lwz r0,24(r1) ffc0a0b4: 3c a0 ff c1 lis r5,-63 ffc0a0b8: 7f e3 fb 78 mr r3,r31 ffc0a0bc: 38 80 00 01 li r4,1 ffc0a0c0: 7c 09 03 a6 mtctr r0 ffc0a0c4: 38 a5 78 ab addi r5,r5,30891 ffc0a0c8: 7f a6 eb 78 mr r6,r29 ffc0a0cc: 7f 87 e3 78 mr r7,r28 ffc0a0d0: 7f 69 db 78 mr r9,r27 ffc0a0d4: 4c c6 31 82 crclr 4*cr1+eq ffc0a0d8: 4e 80 04 21 bctrl ffc0a0dc: 4b ff fe 00 b ffc09edc <_Heap_Walk+0x278> ); return false; } if ( !prev_used ) { ffc0a0e0: 2f 95 00 00 cmpwi cr7,r21,0 ffc0a0e4: 40 be 00 18 bne+ cr7,ffc0a0fc <_Heap_Walk+0x498> (*printer)( ffc0a0e8: 3c a0 ff c1 lis r5,-63 ffc0a0ec: 7f e3 fb 78 mr r3,r31 ffc0a0f0: 38 80 00 01 li r4,1 ffc0a0f4: 38 a5 78 e4 addi r5,r5,30948 ffc0a0f8: 48 00 00 98 b ffc0a190 <_Heap_Walk+0x52c> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0a0fc: 81 3e 00 08 lwz r9,8(r30) ffc0a100: 48 00 00 10 b ffc0a110 <_Heap_Walk+0x4ac> { 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 ) { if ( free_block == block ) { ffc0a104: 7f 89 e8 00 cmpw cr7,r9,r29 ffc0a108: 41 9e 00 64 beq- cr7,ffc0a16c <_Heap_Walk+0x508> return true; } free_block = free_block->next; ffc0a10c: 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 ) { ffc0a110: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0a114: 40 9e ff f0 bne+ cr7,ffc0a104 <_Heap_Walk+0x4a0> ffc0a118: 48 00 00 68 b ffc0a180 <_Heap_Walk+0x51c> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { ffc0a11c: 2f 95 00 00 cmpwi cr7,r21,0 (*printer)( ffc0a120: 7f e3 fb 78 mr r3,r31 ffc0a124: 38 80 00 00 li r4,0 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { ffc0a128: 41 9e 00 24 beq- cr7,ffc0a14c <_Heap_Walk+0x4e8> (*printer)( ffc0a12c: 80 01 00 18 lwz r0,24(r1) ffc0a130: 7e 85 a3 78 mr r5,r20 ffc0a134: 7f a6 eb 78 mr r6,r29 ffc0a138: 7f 87 e3 78 mr r7,r28 ffc0a13c: 7c 09 03 a6 mtctr r0 ffc0a140: 4c c6 31 82 crclr 4*cr1+eq ffc0a144: 4e 80 04 21 bctrl ffc0a148: 48 00 00 24 b ffc0a16c <_Heap_Walk+0x508> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0a14c: 80 01 00 18 lwz r0,24(r1) ffc0a150: 7e 65 9b 78 mr r5,r19 ffc0a154: 7f a6 eb 78 mr r6,r29 ffc0a158: 81 1d 00 00 lwz r8,0(r29) ffc0a15c: 7f 87 e3 78 mr r7,r28 ffc0a160: 7c 09 03 a6 mtctr r0 ffc0a164: 4c c6 31 82 crclr 4*cr1+eq ffc0a168: 4e 80 04 21 bctrl block->prev_size ); } block = next_block; } while ( block != first_block ); ffc0a16c: 7f 9b c0 00 cmpw cr7,r27,r24 ffc0a170: 40 9e fd 88 bne+ cr7,ffc09ef8 <_Heap_Walk+0x294> return true; ffc0a174: 38 60 00 01 li r3,1 } ffc0a178: 39 61 00 68 addi r11,r1,104 ffc0a17c: 4b ff 69 80 b ffc00afc <_restgpr_14_x> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0a180: 3c a0 ff c1 lis r5,-63 ffc0a184: 7f e3 fb 78 mr r3,r31 ffc0a188: 38 80 00 01 li r4,1 ffc0a18c: 38 a5 79 4f addi r5,r5,31055 ffc0a190: 7f a6 eb 78 mr r6,r29 ffc0a194: 80 01 00 18 lwz r0,24(r1) ffc0a198: 7c 09 03 a6 mtctr r0 ffc0a19c: 4c c6 31 82 crclr 4*cr1+eq ffc0a1a0: 4e 80 04 21 bctrl ffc0a1a4: 4b ff fd 38 b ffc09edc <_Heap_Walk+0x278> =============================================================================== ffc09bb4 <_Heap_Walk_print>: static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc09bb4: 7c 08 02 a6 mflr r0 ffc09bb8: 7c 2b 0b 78 mr r11,r1 ffc09bbc: 94 21 ff 88 stwu r1,-120(r1) ffc09bc0: 90 01 00 7c stw r0,124(r1) ffc09bc4: 4b ff 6f 31 bl ffc00af4 <_savegpr_31> ffc09bc8: 7c 60 1b 78 mr r0,r3 ffc09bcc: 90 c1 00 1c stw r6,28(r1) ffc09bd0: 90 e1 00 20 stw r7,32(r1) ffc09bd4: 91 01 00 24 stw r8,36(r1) ffc09bd8: 91 21 00 28 stw r9,40(r1) ffc09bdc: 91 41 00 2c stw r10,44(r1) ffc09be0: 40 86 00 24 bne- cr1,ffc09c04 <_Heap_Walk_print+0x50> <== ALWAYS TAKEN ffc09be4: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc09be8: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc09bec: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc09bf0: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc09bf4: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc09bf8: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc09bfc: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc09c00: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc09c04: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc09c08: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc09c0c: 41 be 00 10 beq+ cr7,ffc09c1c <_Heap_Walk_print+0x68> printk( "FAIL[%d]: ", source ); ffc09c10: 3c 60 ff c1 lis r3,-63 ffc09c14: 38 63 75 4c addi r3,r3,30028 ffc09c18: 48 00 00 0c b ffc09c24 <_Heap_Walk_print+0x70> } else { printk( "PASS[%d]: ", source ); ffc09c1c: 3c 60 ff c1 lis r3,-63 ffc09c20: 38 63 75 57 addi r3,r3,30039 ffc09c24: 7c 04 03 78 mr r4,r0 ffc09c28: 4c c6 31 82 crclr 4*cr1+eq ffc09c2c: 4b ff be b9 bl ffc05ae4 } va_start( ap, fmt ); ffc09c30: 38 00 00 03 li r0,3 ffc09c34: 98 01 00 08 stb r0,8(r1) ffc09c38: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc09c3c: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc09c40: 98 01 00 09 stb r0,9(r1) ffc09c44: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc09c48: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc09c4c: 90 01 00 0c stw r0,12(r1) ffc09c50: 38 01 00 10 addi r0,r1,16 ffc09c54: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc09c58: 4b ff dc 2d bl ffc07884 va_end( ap ); } ffc09c5c: 39 61 00 78 addi r11,r1,120 ffc09c60: 4b ff 6e e0 b ffc00b40 <_restgpr_31_x> =============================================================================== ffc0960c <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0960c: 7c 2b 0b 78 mr r11,r1 ffc09610: 94 21 ff f0 stwu r1,-16(r1) ffc09614: 7c 08 02 a6 mflr r0 ffc09618: 48 01 0e 05 bl ffc1a41c <_savegpr_31> _Internal_errors_What_happened.the_source = the_source; ffc0961c: 3d 60 00 00 lis r11,0 ffc09620: 39 2b 2c d0 addi r9,r11,11472 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc09624: 90 01 00 14 stw r0,20(r1) ffc09628: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc0962c: 98 89 00 04 stb r4,4(r9) _Internal_errors_What_happened.the_error = the_error; ffc09630: 90 a9 00 08 stw r5,8(r9) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; ffc09634: 90 6b 2c d0 stw r3,11472(r11) _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); ffc09638: 48 00 20 f9 bl ffc0b730 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc0963c: 38 00 00 05 li r0,5 ffc09640: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc09644: 7f e3 fb 78 mr r3,r31 ffc09648: 90 09 28 04 stw r0,10244(r9) ffc0964c: 4b ff a3 15 bl ffc03960 <_BSP_Fatal_error> ffc09650: 48 00 00 00 b ffc09650 <_Internal_error_Occurred+0x44><== NOT EXECUTED =============================================================================== ffc09668 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc09668: 94 21 ff f0 stwu r1,-16(r1) ffc0966c: 7c 08 02 a6 mflr r0 ffc09670: 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 ) ffc09674: 80 03 00 18 lwz r0,24(r3) */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc09678: bf c1 00 08 stmw r30,8(r1) ffc0967c: 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 ) ffc09680: 2f 80 00 00 cmpwi cr7,r0,0 return NULL; ffc09684: 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 ) ffc09688: 41 9e 00 70 beq- cr7,ffc096f8 <_Objects_Allocate+0x90> <== 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 ); ffc0968c: 3b df 00 20 addi r30,r31,32 ffc09690: 7f c3 f3 78 mr r3,r30 ffc09694: 4b ff f5 b1 bl ffc08c44 <_Chain_Get> if ( information->auto_extend ) { ffc09698: 88 1f 00 12 lbz r0,18(r31) ffc0969c: 2f 80 00 00 cmpwi cr7,r0,0 ffc096a0: 41 9e 00 58 beq- cr7,ffc096f8 <_Objects_Allocate+0x90> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc096a4: 2f 83 00 00 cmpwi cr7,r3,0 ffc096a8: 40 be 00 1c bne+ cr7,ffc096c4 <_Objects_Allocate+0x5c> _Objects_Extend_information( information ); ffc096ac: 7f e3 fb 78 mr r3,r31 ffc096b0: 48 00 00 85 bl ffc09734 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc096b4: 7f c3 f3 78 mr r3,r30 ffc096b8: 4b ff f5 8d bl ffc08c44 <_Chain_Get> } if ( the_object ) { ffc096bc: 2c 03 00 00 cmpwi r3,0 ffc096c0: 41 a2 00 38 beq+ ffc096f8 <_Objects_Allocate+0x90> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc096c4: a1 23 00 0a lhz r9,10(r3) ffc096c8: a0 1f 00 0a lhz r0,10(r31) ffc096cc: 7c 00 48 50 subf r0,r0,r9 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc096d0: a1 3f 00 14 lhz r9,20(r31) ffc096d4: 7c 00 4b 96 divwu r0,r0,r9 information->inactive_per_block[ block ]--; ffc096d8: 81 3f 00 30 lwz r9,48(r31) ffc096dc: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc096e0: 7d 69 00 2e lwzx r11,r9,r0 ffc096e4: 39 6b ff ff addi r11,r11,-1 ffc096e8: 7d 69 01 2e stwx r11,r9,r0 information->inactive--; ffc096ec: a1 3f 00 2c lhz r9,44(r31) ffc096f0: 38 09 ff ff addi r0,r9,-1 ffc096f4: b0 1f 00 2c sth r0,44(r31) ); } #endif return the_object; } ffc096f8: 39 61 00 10 addi r11,r1,16 ffc096fc: 4b ff 6e 44 b ffc00540 <_restgpr_30_x> =============================================================================== ffc09734 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc09734: 94 21 ff b8 stwu r1,-72(r1) ffc09738: 7c 08 02 a6 mflr r0 ffc0973c: 90 01 00 4c stw r0,76(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 ) ffc09740: 81 63 00 34 lwz r11,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc09744: be a1 00 1c stmw r21,28(r1) ffc09748: 7c 7f 1b 78 mr r31,r3 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0974c: 2f 8b 00 00 cmpwi cr7,r11,0 /* * 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 ); ffc09750: a3 83 00 0a lhz r28,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc09754: 41 9e 00 58 beq- cr7,ffc097ac <_Objects_Extend_information+0x78> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc09758: a1 43 00 14 lhz r10,20(r3) for ( ; block < block_count; block++ ) { ffc0975c: 39 20 00 00 li r9,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc09760: a3 63 00 10 lhz r27,16(r3) * 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; ffc09764: 3b a0 00 00 li r29,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc09768: 7f 7b 53 96 divwu r27,r27,r10 ffc0976c: 2f 9b 00 00 cmpwi cr7,r27,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; ffc09770: 38 1b 00 01 addi r0,r27,1 ffc09774: 40 be 00 24 bne+ cr7,ffc09798 <_Objects_Extend_information+0x64><== ALWAYS TAKEN ffc09778: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0977c: 48 00 00 1c b ffc09798 <_Objects_Extend_information+0x64><== NOT EXECUTED * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc09780: 57 a8 10 3a rlwinm r8,r29,2,0,29 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc09784: 7d 0b 40 2e lwzx r8,r11,r8 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc09788: 7d 29 52 14 add r9,r9,r10 if ( information->object_blocks[ block ] == NULL ) { ffc0978c: 2f 88 00 00 cmpwi cr7,r8,0 ffc09790: 41 9e 00 30 beq- cr7,ffc097c0 <_Objects_Extend_information+0x8c> if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc09794: 3b bd 00 01 addi r29,r29,1 ffc09798: 34 00 ff ff addic. r0,r0,-1 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc0979c: 7f c9 e2 14 add r30,r9,r28 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc097a0: 40 82 ff e0 bne+ ffc09780 <_Objects_Extend_information+0x4c> /* * 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; ffc097a4: 3b 40 00 01 li r26,1 ffc097a8: 48 00 00 1c b ffc097c4 <_Objects_Extend_information+0x90> minimum_index = _Objects_Get_index( information->minimum_id ); ffc097ac: 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; ffc097b0: 3b 40 00 01 li r26,1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc097b4: 3b a0 00 00 li r29,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; ffc097b8: 3b 60 00 00 li r27,0 ffc097bc: 48 00 00 08 b ffc097c4 <_Objects_Extend_information+0x90> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; ffc097c0: 3b 40 00 00 li r26,0 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc097c4: a0 1f 00 14 lhz r0,20(r31) ffc097c8: a2 ff 00 10 lhz r23,16(r31) ffc097cc: 7e e0 ba 14 add r23,r0,r23 /* * 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 ) { ffc097d0: 2b 97 ff ff cmplwi cr7,r23,65535 ffc097d4: 41 9d 02 10 bgt- cr7,ffc099e4 <_Objects_Extend_information+0x2b0> /* * 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; ffc097d8: 80 7f 00 18 lwz r3,24(r31) ffc097dc: 7c 60 19 d6 mullw r3,r0,r3 if ( information->auto_extend ) { ffc097e0: 88 1f 00 12 lbz r0,18(r31) ffc097e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc097e8: 41 9e 00 14 beq- cr7,ffc097fc <_Objects_Extend_information+0xc8> new_object_block = _Workspace_Allocate( block_size ); ffc097ec: 48 00 24 41 bl ffc0bc2c <_Workspace_Allocate> if ( !new_object_block ) ffc097f0: 7c 78 1b 79 mr. r24,r3 ffc097f4: 40 a2 00 10 bne+ ffc09804 <_Objects_Extend_information+0xd0> ffc097f8: 48 00 01 ec b ffc099e4 <_Objects_Extend_information+0x2b0> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); ffc097fc: 48 00 24 91 bl ffc0bc8c <_Workspace_Allocate_or_fatal_error> ffc09800: 7c 78 1b 78 mr r24,r3 } /* * Do we need to grow the tables? */ if ( do_extend ) { ffc09804: 2f 9a 00 00 cmpwi cr7,r26,0 ffc09808: 41 9e 01 58 beq- cr7,ffc09960 <_Objects_Extend_information+0x22c> */ /* * Up the block count and maximum */ block_count++; ffc0980c: 3b 5b 00 01 addi r26,r27,1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc09810: 1c 1a 00 03 mulli r0,r26,3 ((maximum + minimum_index) * sizeof(Objects_Control *)); ffc09814: 7c 77 e2 14 add r3,r23,r28 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc09818: 7c 63 02 14 add r3,r3,r0 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); ffc0981c: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc09820: 48 00 24 0d bl ffc0bc2c <_Workspace_Allocate> if ( !object_blocks ) { ffc09824: 7c 76 1b 79 mr. r22,r3 ffc09828: 40 a2 00 10 bne+ ffc09838 <_Objects_Extend_information+0x104> _Workspace_Free( new_object_block ); ffc0982c: 7f 03 c3 78 mr r3,r24 ffc09830: 48 00 24 31 bl ffc0bc60 <_Workspace_Free> return; ffc09834: 48 00 01 b0 b ffc099e4 <_Objects_Extend_information+0x2b0> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc09838: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc0983c: 57 5a 10 3a rlwinm r26,r26,2,0,29 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc09840: 7f 36 d2 14 add r25,r22,r26 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc09844: 7f 80 e0 40 cmplw cr7,r0,r28 ffc09848: 7f 59 d2 14 add r26,r25,r26 ffc0984c: 39 20 00 00 li r9,0 ffc09850: 40 bd 00 50 ble+ cr7,ffc098a0 <_Objects_Extend_information+0x16c> * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc09854: 57 75 10 3a rlwinm r21,r27,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, ffc09858: 80 9f 00 34 lwz r4,52(r31) ffc0985c: 7e a5 ab 78 mr r5,r21 ffc09860: 48 00 71 61 bl ffc109c0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc09864: 80 9f 00 30 lwz r4,48(r31) ffc09868: 7e a5 ab 78 mr r5,r21 ffc0986c: 7f 23 cb 78 mr r3,r25 ffc09870: 48 00 71 51 bl ffc109c0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc09874: a0 1f 00 10 lhz r0,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, ffc09878: 80 9f 00 1c lwz r4,28(r31) ffc0987c: 7f 43 d3 78 mr r3,r26 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc09880: 7f 9c 02 14 add r28,r28,r0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc09884: 57 85 10 3a rlwinm r5,r28,2,0,29 ffc09888: 48 00 71 39 bl ffc109c0 ffc0988c: 48 00 00 30 b ffc098bc <_Objects_Extend_information+0x188> * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc09890: 55 2a 10 3a rlwinm r10,r9,2,0,29 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc09894: 7d 6a d1 2e stwx r11,r10,r26 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc09898: 39 29 00 01 addi r9,r9,1 ffc0989c: 48 00 00 18 b ffc098b4 <_Objects_Extend_information+0x180> ffc098a0: 2f 9c 00 00 cmpwi cr7,r28,0 local_table[ index ] = NULL; ffc098a4: 39 60 00 00 li r11,0 ffc098a8: 38 1c 00 01 addi r0,r28,1 ffc098ac: 40 be 00 08 bne+ cr7,ffc098b4 <_Objects_Extend_information+0x180><== ALWAYS TAKEN ffc098b0: 38 00 00 01 li r0,1 <== NOT EXECUTED } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc098b4: 34 00 ff ff addic. r0,r0,-1 ffc098b8: 40 82 ff d8 bne+ ffc09890 <_Objects_Extend_information+0x15c> */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc098bc: a1 5f 00 14 lhz r10,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc098c0: 38 00 00 00 li r0,0 ffc098c4: 57 7b 10 3a rlwinm r27,r27,2,0,29 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc098c8: 7d 7e 52 14 add r11,r30,r10 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc098cc: 7c 16 d9 2e stwx r0,r22,r27 ffc098d0: 7f 9e 58 40 cmplw cr7,r30,r11 inactive_per_block[block_count] = 0; ffc098d4: 7c 19 d9 2e stwx r0,r25,r27 for ( index=index_base ; ffc098d8: 39 20 00 00 li r9,0 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc098dc: 57 c8 10 3a rlwinm r8,r30,2,0,29 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc098e0: 38 e0 00 00 li r7,0 ffc098e4: 38 0a 00 01 addi r0,r10,1 ffc098e8: 41 9d 00 0c bgt- cr7,ffc098f4 <_Objects_Extend_information+0x1c0><== NEVER TAKEN ffc098ec: 2f 8b 00 00 cmpwi cr7,r11,0 ffc098f0: 40 be 00 18 bne+ cr7,ffc09908 <_Objects_Extend_information+0x1d4><== ALWAYS TAKEN ffc098f4: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc098f8: 48 00 00 10 b ffc09908 <_Objects_Extend_information+0x1d4><== NOT EXECUTED * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc098fc: 7d 7a 42 14 add r11,r26,r8 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc09900: 7c eb 49 2e stwx r7,r11,r9 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { ffc09904: 39 29 00 04 addi r9,r9,4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc09908: 34 00 ff ff addic. r0,r0,-1 ffc0990c: 40 82 ff f0 bne+ ffc098fc <_Objects_Extend_information+0x1c8> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc09910: 7c 00 00 a6 mfmsr r0 ffc09914: 7d 30 42 a6 mfsprg r9,0 ffc09918: 7c 09 48 78 andc r9,r0,r9 ffc0991c: 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) | ffc09920: 81 3f 00 00 lwz r9,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; ffc09924: 56 f7 04 3e clrlwi r23,r23,16 information->maximum_id = _Objects_Build_id( ffc09928: a1 7f 00 04 lhz r11,4(r31) ffc0992c: 55 29 c0 0e rlwinm r9,r9,24,0,7 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; ffc09930: b2 ff 00 10 sth r23,16(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc09934: 55 6b d8 08 rlwinm r11,r11,27,0,4 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc09938: 65 29 00 01 oris r9,r9,1 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0993c: 80 7f 00 34 lwz r3,52(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc09940: 7d 29 5b 78 or r9,r9,r11 information->object_blocks = object_blocks; ffc09944: 92 df 00 34 stw r22,52(r31) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc09948: 7d 37 bb 78 or r23,r9,r23 information->inactive_per_block = inactive_per_block; ffc0994c: 93 3f 00 30 stw r25,48(r31) information->local_table = local_table; ffc09950: 93 5f 00 1c stw r26,28(r31) information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc09954: 92 ff 00 0c stw r23,12(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc09958: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); _Workspace_Free( old_tables ); ffc0995c: 48 00 23 05 bl ffc0bc60 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc09960: 81 3f 00 34 lwz r9,52(r31) ffc09964: 57 bd 10 3a rlwinm r29,r29,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc09968: 3b 81 00 08 addi r28,r1,8 ffc0996c: a0 bf 00 14 lhz r5,20(r31) } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc09970: 7f 09 e9 2e stwx r24,r9,r29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc09974: 7f 83 e3 78 mr r3,r28 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc09978: 3b 7f 00 20 addi r27,r31,32 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0997c: 81 3f 00 34 lwz r9,52(r31) ffc09980: 80 df 00 18 lwz r6,24(r31) ffc09984: 7c 89 e8 2e lwzx r4,r9,r29 ffc09988: 48 00 41 a1 bl ffc0db28 <_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 ) { ffc0998c: 48 00 00 30 b ffc099bc <_Objects_Extend_information+0x288> ffc09990: 81 3f 00 00 lwz r9,0(r31) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc09994: 7f 63 db 78 mr r3,r27 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( ffc09998: a0 1f 00 04 lhz r0,4(r31) ffc0999c: 55 29 c0 0e rlwinm r9,r9,24,0,7 ffc099a0: 65 29 00 01 oris r9,r9,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc099a4: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc099a8: 7d 20 03 78 or r0,r9,r0 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc099ac: 7c 00 f3 78 or r0,r0,r30 ffc099b0: 90 04 00 08 stw r0,8(r4) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc099b4: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc099b8: 4b ff f2 35 bl ffc08bec <_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 ) { ffc099bc: 7f 83 e3 78 mr r3,r28 ffc099c0: 4b ff f2 85 bl ffc08c44 <_Chain_Get> ffc099c4: 7c 64 1b 79 mr. r4,r3 ffc099c8: 40 82 ff c8 bne+ ffc09990 <_Objects_Extend_information+0x25c> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc099cc: a0 1f 00 14 lhz r0,20(r31) ffc099d0: 81 3f 00 30 lwz r9,48(r31) ffc099d4: 7c 09 e9 2e stwx r0,r9,r29 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc099d8: a1 3f 00 2c lhz r9,44(r31) ffc099dc: 7c 00 4a 14 add r0,r0,r9 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = ffc099e0: b0 1f 00 2c sth r0,44(r31) (Objects_Maximum)(information->inactive + information->allocation_size); } ffc099e4: 39 61 00 48 addi r11,r1,72 ffc099e8: 4b ff 6b 34 b ffc0051c <_restgpr_21_x> =============================================================================== ffc09aa0 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc09aa0: 94 21 ff e8 stwu r1,-24(r1) ffc09aa4: 7c 08 02 a6 mflr r0 ffc09aa8: bf a1 00 0c stmw r29,12(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc09aac: 7c 9d 23 79 mr. r29,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc09ab0: 7c 7e 1b 78 mr r30,r3 ffc09ab4: 90 01 00 1c stw r0,28(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; ffc09ab8: 3b e0 00 00 li r31,0 ) { Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc09abc: 41 82 00 50 beq- ffc09b0c <_Objects_Get_information+0x6c> /* * 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 ); ffc09ac0: 48 00 45 dd bl ffc0e09c <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) ffc09ac4: 2c 03 00 00 cmpwi r3,0 ffc09ac8: 41 82 00 44 beq- ffc09b0c <_Objects_Get_information+0x6c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc09acc: 7f 9d 18 40 cmplw cr7,r29,r3 ffc09ad0: 41 9d 00 3c bgt- cr7,ffc09b0c <_Objects_Get_information+0x6c> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc09ad4: 3d 20 00 00 lis r9,0 ffc09ad8: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc09adc: 39 29 2b e0 addi r9,r9,11232 ffc09ae0: 7d 29 f0 2e lwzx r9,r9,r30 ffc09ae4: 2f 89 00 00 cmpwi cr7,r9,0 ffc09ae8: 41 9e 00 24 beq- cr7,ffc09b0c <_Objects_Get_information+0x6c><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc09aec: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc09af0: 7f e9 e8 2e lwzx r31,r9,r29 if ( !info ) ffc09af4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09af8: 41 9e 00 14 beq- cr7,ffc09b0c <_Objects_Get_information+0x6c><== 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 ) ffc09afc: a0 1f 00 10 lhz r0,16(r31) ffc09b00: 2f 80 00 00 cmpwi cr7,r0,0 ffc09b04: 40 be 00 08 bne+ cr7,ffc09b0c <_Objects_Get_information+0x6c> return NULL; ffc09b08: 3b e0 00 00 li r31,0 #endif return info; } ffc09b0c: 39 61 00 18 addi r11,r1,24 ffc09b10: 7f e3 fb 78 mr r3,r31 ffc09b14: 4b ff 6a 28 b ffc0053c <_restgpr_29_x> =============================================================================== ffc0a554 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0a554: 94 21 ff e0 stwu r1,-32(r1) ffc0a558: 7c 08 02 a6 mflr r0 ffc0a55c: bf c1 00 18 stmw r30,24(r1) ffc0a560: 7c 9e 23 78 mr r30,r4 /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0a564: 7c 64 1b 79 mr. r4,r3 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0a568: 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; ffc0a56c: 40 82 00 10 bne- ffc0a57c <_Objects_Id_to_name+0x28> ffc0a570: 3d 20 00 00 lis r9,0 ffc0a574: 81 29 2e 24 lwz r9,11812(r9) ffc0a578: 80 89 00 08 lwz r4,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); ffc0a57c: 54 89 47 7e rlwinm r9,r4,8,29,31 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc0a580: 38 09 ff ff addi r0,r9,-1 ffc0a584: 2b 80 00 02 cmplwi cr7,r0,2 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; ffc0a588: 3b e0 00 03 li r31,3 ffc0a58c: 41 9d 00 38 bgt- cr7,ffc0a5c4 <_Objects_Id_to_name+0x70> ffc0a590: 48 00 00 40 b ffc0a5d0 <_Objects_Id_to_name+0x7c> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc0a594: 54 80 3e 7a rlwinm r0,r4,7,25,29 ffc0a598: 7c 69 00 2e lwzx r3,r9,r0 if ( !information ) ffc0a59c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a5a0: 41 9e 00 24 beq- cr7,ffc0a5c4 <_Objects_Id_to_name+0x70><== NEVER TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); ffc0a5a4: 38 a1 00 08 addi r5,r1,8 ffc0a5a8: 4b ff ff 2d bl ffc0a4d4 <_Objects_Get> if ( !the_object ) ffc0a5ac: 2c 03 00 00 cmpwi r3,0 ffc0a5b0: 41 82 00 14 beq- ffc0a5c4 <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; *name = the_object->name; ffc0a5b4: 80 03 00 0c lwz r0,12(r3) _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0a5b8: 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; ffc0a5bc: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0a5c0: 48 00 0d f9 bl ffc0b3b8 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc0a5c4: 39 61 00 20 addi r11,r1,32 ffc0a5c8: 7f e3 fb 78 mr r3,r31 ffc0a5cc: 4b ff 65 20 b ffc00aec <_restgpr_30_x> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) ffc0a5d0: 3d 60 00 00 lis r11,0 ffc0a5d4: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0a5d8: 39 6b 2c 40 addi r11,r11,11328 ffc0a5dc: 7d 2b 48 2e lwzx r9,r11,r9 ffc0a5e0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a5e4: 40 9e ff b0 bne+ cr7,ffc0a594 <_Objects_Id_to_name+0x40> ffc0a5e8: 4b ff ff dc b ffc0a5c4 <_Objects_Id_to_name+0x70> =============================================================================== ffc0ed88 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0ed88: 94 21 ff e8 stwu r1,-24(r1) ffc0ed8c: 7c 08 02 a6 mflr r0 ffc0ed90: bf 81 00 08 stmw r28,8(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; ffc0ed94: 7c 9e 23 79 mr. r30,r4 */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0ed98: 7c 7f 1b 78 mr r31,r3 ffc0ed9c: 90 01 00 1c stw r0,28(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; ffc0eda0: 41 82 01 b4 beq- ffc0ef54 <_RBTree_Extract_unprotected+0x1cc> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { ffc0eda4: 80 03 00 08 lwz r0,8(r3) ffc0eda8: 7f 9e 00 00 cmpw cr7,r30,r0 ffc0edac: 40 be 00 24 bne+ cr7,ffc0edd0 <_RBTree_Extract_unprotected+0x48> if (the_node->child[RBT_RIGHT]) ffc0edb0: 80 1e 00 08 lwz r0,8(r30) ffc0edb4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0edb8: 40 be 00 14 bne+ cr7,ffc0edcc <_RBTree_Extract_unprotected+0x44> the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; ffc0edbc: 81 3e 00 00 lwz r9,0(r30) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc0edc0: 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; ffc0edc4: 91 23 00 08 stw r9,8(r3) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc0edc8: 40 be 00 08 bne+ cr7,ffc0edd0 <_RBTree_Extract_unprotected+0x48> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; ffc0edcc: 90 1f 00 08 stw r0,8(r31) } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { ffc0edd0: 80 1f 00 0c lwz r0,12(r31) ffc0edd4: 83 9e 00 04 lwz r28,4(r30) ffc0edd8: 7f 9e 00 00 cmpw cr7,r30,r0 ffc0eddc: 40 be 00 20 bne+ cr7,ffc0edfc <_RBTree_Extract_unprotected+0x74> if (the_node->child[RBT_LEFT]) ffc0ede0: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0ede4: 40 be 00 14 bne+ cr7,ffc0edf8 <_RBTree_Extract_unprotected+0x70> the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; ffc0ede8: 80 1e 00 00 lwz r0,0(r30) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc0edec: 7f 9f 00 00 cmpw cr7,r31,r0 /* 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; ffc0edf0: 90 1f 00 0c stw r0,12(r31) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc0edf4: 40 be 00 08 bne+ cr7,ffc0edfc <_RBTree_Extract_unprotected+0x74> the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; ffc0edf8: 93 9f 00 0c stw r28,12(r31) * 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]) { ffc0edfc: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0ee00: 80 1e 00 08 lwz r0,8(r30) ffc0ee04: 7f 9d e3 78 mr r29,r28 ffc0ee08: 41 9e 00 d0 beq- cr7,ffc0eed8 <_RBTree_Extract_unprotected+0x150> ffc0ee0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ee10: 40 be 00 0c bne+ cr7,ffc0ee1c <_RBTree_Extract_unprotected+0x94> ffc0ee14: 48 00 00 d0 b ffc0eee4 <_RBTree_Extract_unprotected+0x15c> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; ffc0ee18: 7c 1d 03 78 mr r29,r0 ffc0ee1c: 80 1d 00 08 lwz r0,8(r29) ffc0ee20: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ee24: 40 9e ff f4 bne+ cr7,ffc0ee18 <_RBTree_Extract_unprotected+0x90> * 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]; ffc0ee28: 83 9d 00 04 lwz r28,4(r29) if(leaf) { ffc0ee2c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0ee30: 41 9e 00 10 beq- cr7,ffc0ee40 <_RBTree_Extract_unprotected+0xb8> leaf->parent = target->parent; ffc0ee34: 80 1d 00 00 lwz r0,0(r29) ffc0ee38: 90 1c 00 00 stw r0,0(r28) ffc0ee3c: 48 00 00 0c b ffc0ee48 <_RBTree_Extract_unprotected+0xc0> } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); ffc0ee40: 7f a3 eb 78 mr r3,r29 ffc0ee44: 4b ff fd 6d bl ffc0ebb0 <_RBTree_Extract_validate_unprotected> } victim_color = target->color; dir = target != target->parent->child[0]; ffc0ee48: 81 7d 00 00 lwz r11,0(r29) 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; ffc0ee4c: 81 3d 00 0c lwz r9,12(r29) dir = target != target->parent->child[0]; ffc0ee50: 80 0b 00 04 lwz r0,4(r11) ffc0ee54: 7f a0 02 78 xor r0,r29,r0 ffc0ee58: 7c 00 00 34 cntlzw r0,r0 ffc0ee5c: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0ee60: 68 00 00 01 xori r0,r0,1 target->parent->child[dir] = leaf; ffc0ee64: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0ee68: 7d 6b 02 14 add r11,r11,r0 ffc0ee6c: 93 8b 00 04 stw r28,4(r11) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; ffc0ee70: 81 7e 00 00 lwz r11,0(r30) ffc0ee74: 80 0b 00 04 lwz r0,4(r11) ffc0ee78: 7f c0 02 78 xor r0,r30,r0 ffc0ee7c: 7c 00 00 34 cntlzw r0,r0 ffc0ee80: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0ee84: 68 00 00 01 xori r0,r0,1 the_node->parent->child[dir] = target; ffc0ee88: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0ee8c: 7d 6b 02 14 add r11,r11,r0 ffc0ee90: 93 ab 00 04 stw r29,4(r11) /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; ffc0ee94: 80 1e 00 08 lwz r0,8(r30) ffc0ee98: 90 1d 00 08 stw r0,8(r29) if (the_node->child[RBT_RIGHT]) ffc0ee9c: 81 7e 00 08 lwz r11,8(r30) ffc0eea0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0eea4: 41 9e 00 08 beq- cr7,ffc0eeac <_RBTree_Extract_unprotected+0x124><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; ffc0eea8: 93 ab 00 00 stw r29,0(r11) target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; ffc0eeac: 80 1e 00 04 lwz r0,4(r30) ffc0eeb0: 90 1d 00 04 stw r0,4(r29) if (the_node->child[RBT_LEFT]) ffc0eeb4: 81 7e 00 04 lwz r11,4(r30) ffc0eeb8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0eebc: 41 9e 00 08 beq- cr7,ffc0eec4 <_RBTree_Extract_unprotected+0x13c> the_node->child[RBT_LEFT]->parent = target; ffc0eec0: 93 ab 00 00 stw r29,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; ffc0eec4: 80 1e 00 00 lwz r0,0(r30) ffc0eec8: 90 1d 00 00 stw r0,0(r29) target->color = the_node->color; ffc0eecc: 80 1e 00 0c lwz r0,12(r30) ffc0eed0: 90 1d 00 0c stw r0,12(r29) ffc0eed4: 48 00 00 4c b ffc0ef20 <_RBTree_Extract_unprotected+0x198> * 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]; if( leaf ) { ffc0eed8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0eedc: 7c 1c 03 78 mr r28,r0 ffc0eee0: 41 9e 00 10 beq- cr7,ffc0eef0 <_RBTree_Extract_unprotected+0x168> leaf->parent = the_node->parent; ffc0eee4: 80 1e 00 00 lwz r0,0(r30) ffc0eee8: 90 1c 00 00 stw r0,0(r28) ffc0eeec: 48 00 00 0c b ffc0eef8 <_RBTree_Extract_unprotected+0x170> } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); ffc0eef0: 7f c3 f3 78 mr r3,r30 ffc0eef4: 4b ff fc bd bl ffc0ebb0 <_RBTree_Extract_validate_unprotected> } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; ffc0eef8: 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; ffc0eefc: 81 3e 00 0c lwz r9,12(r30) /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; ffc0ef00: 80 0b 00 04 lwz r0,4(r11) ffc0ef04: 7f c0 02 78 xor r0,r30,r0 ffc0ef08: 7c 00 00 34 cntlzw r0,r0 ffc0ef0c: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0ef10: 68 00 00 01 xori r0,r0,1 the_node->parent->child[dir] = leaf; ffc0ef14: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0ef18: 7d 6b 02 14 add r11,r11,r0 ffc0ef1c: 93 8b 00 04 stw r28,4(r11) /* 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 */ ffc0ef20: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ef24: 40 9e 00 10 bne- cr7,ffc0ef34 <_RBTree_Extract_unprotected+0x1ac> if (leaf) { ffc0ef28: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0ef2c: 41 9e 00 08 beq- cr7,ffc0ef34 <_RBTree_Extract_unprotected+0x1ac> leaf->color = RBT_BLACK; /* case 2 */ ffc0ef30: 91 3c 00 0c stw r9,12(r28) /* 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; ffc0ef34: 81 3f 00 04 lwz r9,4(r31) */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; ffc0ef38: 38 00 00 00 li r0,0 ffc0ef3c: 90 1e 00 08 stw r0,8(r30) ffc0ef40: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ef44: 90 1e 00 04 stw r0,4(r30) ffc0ef48: 90 1e 00 00 stw r0,0(r30) ffc0ef4c: 41 9e 00 08 beq- cr7,ffc0ef54 <_RBTree_Extract_unprotected+0x1cc> ffc0ef50: 90 09 00 0c stw r0,12(r9) } ffc0ef54: 39 61 00 18 addi r11,r1,24 ffc0ef58: 4b ff 1b e4 b ffc00b3c <_restgpr_28_x> =============================================================================== ffc0ebb0 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { ffc0ebb0: 94 21 ff e0 stwu r1,-32(r1) ffc0ebb4: 7c 08 02 a6 mflr r0 ffc0ebb8: 90 01 00 24 stw r0,36(r1) ffc0ebbc: bf 41 00 08 stmw r26,8(r1) ffc0ebc0: 7c 7e 1b 78 mr r30,r3 RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; ffc0ebc4: 83 e3 00 00 lwz r31,0(r3) if(!parent->parent) return; ffc0ebc8: 80 1f 00 00 lwz r0,0(r31) ffc0ebcc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ebd0: 41 9e 01 b0 beq- cr7,ffc0ed80 <_RBTree_Extract_validate_unprotected+0x1d0> sibling = _RBTree_Sibling(the_node); ffc0ebd4: 4b ff ff 29 bl ffc0eafc <_RBTree_Sibling> * 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; ffc0ebd8: 3b 40 00 00 li r26,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; ffc0ebdc: 3b 60 00 01 li r27,1 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) { ffc0ebe0: 48 00 01 58 b ffc0ed38 <_RBTree_Extract_validate_unprotected+0x188> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0ebe4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ebe8: 41 9e 00 48 beq- cr7,ffc0ec30 <_RBTree_Extract_validate_unprotected+0x80><== NEVER TAKEN ffc0ebec: 80 03 00 0c lwz r0,12(r3) ffc0ebf0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ebf4: 40 be 00 3c bne+ cr7,ffc0ec30 <_RBTree_Extract_validate_unprotected+0x80> * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; ffc0ebf8: 83 bf 00 04 lwz r29,4(r31) * 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; ffc0ebfc: 90 1f 00 0c stw r0,12(r31) sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; ffc0ec00: 7f dd ea 78 xor r29,r30,r29 ffc0ec04: 7f bd 00 34 cntlzw r29,r29 * 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; ffc0ec08: 93 43 00 0c stw r26,12(r3) dir = the_node != parent->child[0]; ffc0ec0c: 57 bd d9 7e rlwinm r29,r29,27,5,31 ffc0ec10: 6b bd 00 01 xori r29,r29,1 _RBTree_Rotate(parent, dir); ffc0ec14: 7f a4 eb 78 mr r4,r29 sibling = parent->child[!dir]; ffc0ec18: 6b bd 00 01 xori r29,r29,1 ffc0ec1c: 57 bd 10 3a rlwinm r29,r29,2,0,29 */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; _RBTree_Rotate(parent, dir); ffc0ec20: 7f e3 fb 78 mr r3,r31 sibling = parent->child[!dir]; ffc0ec24: 7f bf ea 14 add r29,r31,r29 */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; _RBTree_Rotate(parent, dir); ffc0ec28: 4b ff ff 11 bl ffc0eb38 <_RBTree_Rotate> sibling = parent->child[!dir]; ffc0ec2c: 80 7d 00 04 lwz r3,4(r29) } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && ffc0ec30: 81 23 00 08 lwz r9,8(r3) ffc0ec34: 38 00 00 00 li r0,0 ffc0ec38: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ec3c: 41 9e 00 14 beq- cr7,ffc0ec50 <_RBTree_Extract_validate_unprotected+0xa0> * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ void _RBTree_Extract_validate_unprotected( ffc0ec40: 80 09 00 0c lwz r0,12(r9) ffc0ec44: 68 00 00 01 xori r0,r0,1 ffc0ec48: 7c 00 00 34 cntlzw r0,r0 ffc0ec4c: 54 00 d9 7e rlwinm r0,r0,27,5,31 _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]) && ffc0ec50: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ec54: 40 9e 00 40 bne- cr7,ffc0ec94 <_RBTree_Extract_validate_unprotected+0xe4> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { ffc0ec58: 81 23 00 04 lwz r9,4(r3) ffc0ec5c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ec60: 41 9e 00 14 beq- cr7,ffc0ec74 <_RBTree_Extract_validate_unprotected+0xc4> * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ void _RBTree_Extract_validate_unprotected( ffc0ec64: 80 09 00 0c lwz r0,12(r9) ffc0ec68: 68 00 00 01 xori r0,r0,1 ffc0ec6c: 7c 00 00 34 cntlzw r0,r0 ffc0ec70: 54 00 d9 7e rlwinm r0,r0,27,5,31 _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]) && ffc0ec74: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ec78: 40 9e 00 1c bne- cr7,ffc0ec94 <_RBTree_Extract_validate_unprotected+0xe4> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; ffc0ec7c: 93 63 00 0c stw r27,12(r3) ffc0ec80: 81 3f 00 0c lwz r9,12(r31) ffc0ec84: 2f 89 00 01 cmpwi cr7,r9,1 ffc0ec88: 40 be 00 e0 bne+ cr7,ffc0ed68 <_RBTree_Extract_validate_unprotected+0x1b8> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; ffc0ec8c: 90 1f 00 0c stw r0,12(r31) break; ffc0ec90: 48 00 00 c0 b ffc0ed50 <_RBTree_Extract_validate_unprotected+0x1a0> * 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]; ffc0ec94: 83 bf 00 04 lwz r29,4(r31) ffc0ec98: 38 00 00 00 li r0,0 ffc0ec9c: 7f dd ea 78 xor r29,r30,r29 ffc0eca0: 7f bd 00 34 cntlzw r29,r29 ffc0eca4: 57 bd d9 7e rlwinm r29,r29,27,5,31 ffc0eca8: 6b bd 00 01 xori r29,r29,1 if (!_RBTree_Is_red(sibling->child[!dir])) { ffc0ecac: 6b bc 00 01 xori r28,r29,1 ffc0ecb0: 57 89 10 3a rlwinm r9,r28,2,0,29 ffc0ecb4: 7d 23 4a 14 add r9,r3,r9 ffc0ecb8: 81 29 00 04 lwz r9,4(r9) ffc0ecbc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ecc0: 41 9e 00 14 beq- cr7,ffc0ecd4 <_RBTree_Extract_validate_unprotected+0x124> * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ void _RBTree_Extract_validate_unprotected( ffc0ecc4: 80 09 00 0c lwz r0,12(r9) ffc0ecc8: 68 00 00 01 xori r0,r0,1 ffc0eccc: 7c 00 00 34 cntlzw r0,r0 ffc0ecd0: 54 00 d9 7e rlwinm r0,r0,27,5,31 * 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]; if (!_RBTree_Is_red(sibling->child[!dir])) { ffc0ecd4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ecd8: 40 be 00 30 bne+ cr7,ffc0ed08 <_RBTree_Extract_validate_unprotected+0x158> sibling->color = RBT_RED; ffc0ecdc: 39 20 00 01 li r9,1 ffc0ece0: 91 23 00 0c stw r9,12(r3) sibling->child[dir]->color = RBT_BLACK; ffc0ece4: 57 a9 10 3a rlwinm r9,r29,2,0,29 ffc0ece8: 7d 23 4a 14 add r9,r3,r9 ffc0ecec: 81 29 00 04 lwz r9,4(r9) _RBTree_Rotate(sibling, !dir); ffc0ecf0: 6b a4 00 01 xori r4,r29,1 * 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; ffc0ecf4: 90 09 00 0c stw r0,12(r9) _RBTree_Rotate(sibling, !dir); ffc0ecf8: 4b ff fe 41 bl ffc0eb38 <_RBTree_Rotate> sibling = parent->child[!dir]; ffc0ecfc: 57 89 10 3a rlwinm r9,r28,2,0,29 ffc0ed00: 7d 3f 4a 14 add r9,r31,r9 ffc0ed04: 80 69 00 04 lwz r3,4(r9) } sibling->color = parent->color; ffc0ed08: 80 1f 00 0c lwz r0,12(r31) parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; ffc0ed0c: 57 9c 10 3a rlwinm r28,r28,2,0,29 _RBTree_Rotate(parent, dir); ffc0ed10: 7f a4 eb 78 mr r4,r29 sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; } sibling->color = parent->color; ffc0ed14: 90 03 00 0c stw r0,12(r3) parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; ffc0ed18: 7c 63 e2 14 add r3,r3,r28 sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; } sibling->color = parent->color; parent->color = RBT_BLACK; ffc0ed1c: 38 00 00 00 li r0,0 sibling->child[!dir]->color = RBT_BLACK; ffc0ed20: 81 23 00 04 lwz r9,4(r3) _RBTree_Rotate(parent, dir); ffc0ed24: 7f e3 fb 78 mr r3,r31 sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; } sibling->color = parent->color; parent->color = RBT_BLACK; ffc0ed28: 90 1f 00 0c stw r0,12(r31) sibling->child[!dir]->color = RBT_BLACK; ffc0ed2c: 90 09 00 0c stw r0,12(r9) _RBTree_Rotate(parent, dir); ffc0ed30: 4b ff fe 09 bl ffc0eb38 <_RBTree_Rotate> break; /* done */ ffc0ed34: 48 00 00 1c b ffc0ed50 <_RBTree_Extract_validate_unprotected+0x1a0> 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) { ffc0ed38: 80 1e 00 0c lwz r0,12(r30) ffc0ed3c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ed40: 41 9e 00 10 beq- cr7,ffc0ed50 <_RBTree_Extract_validate_unprotected+0x1a0> ffc0ed44: 80 1f 00 00 lwz r0,0(r31) ffc0ed48: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ed4c: 40 9e fe 98 bne+ cr7,ffc0ebe4 <_RBTree_Extract_validate_unprotected+0x34> sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc0ed50: 81 3e 00 00 lwz r9,0(r30) ffc0ed54: 80 09 00 00 lwz r0,0(r9) ffc0ed58: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ed5c: 40 be 00 24 bne+ cr7,ffc0ed80 <_RBTree_Extract_validate_unprotected+0x1d0> ffc0ed60: 90 1e 00 0c stw r0,12(r30) ffc0ed64: 48 00 00 1c b ffc0ed80 <_RBTree_Extract_validate_unprotected+0x1d0> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; ffc0ed68: 83 bf 00 00 lwz r29,0(r31) sibling = _RBTree_Sibling(the_node); ffc0ed6c: 7f e3 fb 78 mr r3,r31 ffc0ed70: 7f fe fb 78 mr r30,r31 ffc0ed74: 4b ff fd 89 bl ffc0eafc <_RBTree_Sibling> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; ffc0ed78: 7f bf eb 78 mr r31,r29 sibling = _RBTree_Sibling(the_node); ffc0ed7c: 4b ff ff bc b ffc0ed38 <_RBTree_Extract_validate_unprotected+0x188> _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; } ffc0ed80: 39 61 00 20 addi r11,r1,32 ffc0ed84: 4b ff 1d b0 b ffc00b34 <_restgpr_26_x> =============================================================================== ffc0b338 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { ffc0b338: 94 21 ff e8 stwu r1,-24(r1) ffc0b33c: 7c 08 02 a6 mflr r0 ffc0b340: bf 81 00 08 stmw r28,8(r1) size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; ffc0b344: 7c 7d 1b 79 mr. r29,r3 void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { ffc0b348: 7c df 33 78 mr r31,r6 ffc0b34c: 90 01 00 1c stw r0,28(r1) ffc0b350: 7c fe 3b 78 mr r30,r7 size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; ffc0b354: 41 82 00 44 beq- ffc0b398 <_RBTree_Initialize+0x60> <== NEVER TAKEN RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; ffc0b358: 38 00 00 00 li r0,0 the_rbtree->root = NULL; the_rbtree->first[0] = NULL; the_rbtree->first[1] = NULL; the_rbtree->compare_function = compare_function; ffc0b35c: 90 9d 00 10 stw r4,16(r29) /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; ffc0b360: 7c bc 2b 78 mr r28,r5 RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; ffc0b364: 90 1d 00 00 stw r0,0(r29) the_rbtree->root = NULL; ffc0b368: 90 1d 00 04 stw r0,4(r29) the_rbtree->first[0] = NULL; ffc0b36c: 90 1d 00 08 stw r0,8(r29) the_rbtree->first[1] = NULL; ffc0b370: 90 1d 00 0c stw r0,12(r29) the_rbtree->compare_function = compare_function; the_rbtree->is_unique = is_unique; ffc0b374: 99 1d 00 14 stb r8,20(r29) while ( count-- ) { ffc0b378: 48 00 00 18 b ffc0b390 <_RBTree_Initialize+0x58> _RBTree_Insert(the_rbtree, next); ffc0b37c: 7f 84 e3 78 mr r4,r28 ffc0b380: 7f a3 eb 78 mr r3,r29 ffc0b384: 4b ff ff a1 bl ffc0b324 <_RBTree_Insert> * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( ffc0b388: 7f 9c f2 14 add r28,r28,r30 ffc0b38c: 3b ff ff ff addi r31,r31,-1 /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { ffc0b390: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0b394: 40 9e ff e8 bne+ cr7,ffc0b37c <_RBTree_Initialize+0x44> _RBTree_Insert(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } ffc0b398: 39 61 00 18 addi r11,r1,24 ffc0b39c: 4b ff 65 e8 b ffc01984 <_restgpr_28_x> =============================================================================== ffc0eafc <_RBTree_Sibling>: */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; ffc0eafc: 2c 03 00 00 cmpwi r3,0 ffc0eb00: 38 00 00 00 li r0,0 ffc0eb04: 41 82 00 2c beq- ffc0eb30 <_RBTree_Sibling+0x34> if(!(the_node->parent)) return NULL; ffc0eb08: 81 23 00 00 lwz r9,0(r3) ffc0eb0c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0eb10: 41 9e 00 20 beq- cr7,ffc0eb30 <_RBTree_Sibling+0x34> <== NEVER TAKEN if(!(the_node->parent->parent)) return NULL; ffc0eb14: 81 69 00 00 lwz r11,0(r9) ffc0eb18: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0eb1c: 41 9e 00 14 beq- cr7,ffc0eb30 <_RBTree_Sibling+0x34> if(the_node == the_node->parent->child[RBT_LEFT]) ffc0eb20: 80 09 00 04 lwz r0,4(r9) ffc0eb24: 7f 83 00 00 cmpw cr7,r3,r0 ffc0eb28: 40 be 00 08 bne+ cr7,ffc0eb30 <_RBTree_Sibling+0x34> return the_node->parent->child[RBT_RIGHT]; ffc0eb2c: 80 09 00 08 lwz r0,8(r9) else return the_node->parent->child[RBT_LEFT]; } ffc0eb30: 7c 03 03 78 mr r3,r0 ffc0eb34: 4e 80 00 20 blr =============================================================================== ffc0f008 <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { ffc0f008: 94 21 ff e0 stwu r1,-32(r1) ffc0f00c: 7c 08 02 a6 mflr r0 ffc0f010: bf 61 00 0c stmw r27,12(r1) ffc0f014: 7c 7e 1b 78 mr r30,r3 /* 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; ffc0f018: 3b 80 00 00 li r28,0 * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { ffc0f01c: 90 01 00 24 stw r0,36(r1) if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; g->color = RBT_RED; ffc0f020: 3b 60 00 01 li r27,1 RBTree_Node *u,*g; /* note: the insert root case is handled already */ /* if the parent is black, nothing needs to be done * otherwise may need to loop a few times */ while (_RBTree_Is_red(_RBTree_Parent(the_node))) { ffc0f024: 48 00 00 74 b ffc0f098 <_RBTree_Validate_insert_unprotected+0x90> ) { 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; ffc0f028: 80 1f 00 00 lwz r0,0(r31) ffc0f02c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f030: 41 9e 00 90 beq- cr7,ffc0f0c0 <_RBTree_Validate_insert_unprotected+0xb8><== 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]) ffc0f034: 81 3f 00 04 lwz r9,4(r31) ffc0f038: 7f 83 48 00 cmpw cr7,r3,r9 ffc0f03c: 40 be 00 08 bne+ cr7,ffc0f044 <_RBTree_Validate_insert_unprotected+0x3c> return the_node->parent->child[RBT_RIGHT]; ffc0f040: 81 3f 00 08 lwz r9,8(r31) */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0f044: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f048: 41 9e 00 78 beq- cr7,ffc0f0c0 <_RBTree_Validate_insert_unprotected+0xb8> ffc0f04c: 80 09 00 0c lwz r0,12(r9) ffc0f050: 2f 80 00 01 cmpwi cr7,r0,1 ffc0f054: 40 be 00 6c bne+ cr7,ffc0f0c0 <_RBTree_Validate_insert_unprotected+0xb8> 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; ffc0f058: 93 83 00 0c stw r28,12(r3) u->color = RBT_BLACK; g->color = RBT_RED; ffc0f05c: 7f fe fb 78 mr r30,r31 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; ffc0f060: 93 89 00 0c stw r28,12(r9) g->color = RBT_RED; ffc0f064: 90 1f 00 0c stw r0,12(r31) ffc0f068: 48 00 00 30 b ffc0f098 <_RBTree_Validate_insert_unprotected+0x90> 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) { _RBTree_Rotate(the_node->parent, pdir); ffc0f06c: 7f a4 eb 78 mr r4,r29 ffc0f070: 4b ff ff 21 bl ffc0ef90 <_RBTree_Rotate> the_node = the_node->child[pdir]; ffc0f074: 57 a0 10 3a rlwinm r0,r29,2,0,29 ffc0f078: 7f de 02 14 add r30,r30,r0 ffc0f07c: 83 de 00 04 lwz r30,4(r30) } the_node->parent->color = RBT_BLACK; ffc0f080: 81 3e 00 00 lwz r9,0(r30) g->color = RBT_RED; /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); ffc0f084: 7f e3 fb 78 mr r3,r31 ffc0f088: 20 9d 00 01 subfic r4,r29,1 /* 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; ffc0f08c: 93 89 00 0c stw r28,12(r9) g->color = RBT_RED; ffc0f090: 93 7f 00 0c stw r27,12(r31) /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); ffc0f094: 4b ff fe fd bl ffc0ef90 <_RBTree_Rotate> ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } ffc0f098: 80 7e 00 00 lwz r3,0(r30) */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; ffc0f09c: 83 e3 00 00 lwz r31,0(r3) ffc0f0a0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0f0a4: 41 9e 00 14 beq- cr7,ffc0f0b8 <_RBTree_Validate_insert_unprotected+0xb0> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0f0a8: 80 03 00 0c lwz r0,12(r3) ffc0f0ac: 2f 80 00 01 cmpwi cr7,r0,1 ffc0f0b0: 40 be 00 44 bne+ cr7,ffc0f0f4 <_RBTree_Validate_insert_unprotected+0xec> ffc0f0b4: 4b ff ff 74 b ffc0f028 <_RBTree_Validate_insert_unprotected+0x20> /* 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; ffc0f0b8: 93 fe 00 0c stw r31,12(r30) ffc0f0bc: 48 00 00 38 b ffc0f0f4 <_RBTree_Validate_insert_unprotected+0xec> 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]; RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0f0c0: 83 bf 00 04 lwz r29,4(r31) 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]; ffc0f0c4: 80 03 00 04 lwz r0,4(r3) RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0f0c8: 7c 7d ea 78 xor r29,r3,r29 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]; ffc0f0cc: 7f c0 02 78 xor r0,r30,r0 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0f0d0: 7f bd 00 34 cntlzw r29,r29 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]; ffc0f0d4: 7c 00 00 34 cntlzw r0,r0 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0f0d8: 57 bd d9 7e rlwinm r29,r29,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]; ffc0f0dc: 54 00 d9 7e rlwinm r0,r0,27,5,31 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0f0e0: 6b bd 00 01 xori r29,r29,1 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]; ffc0f0e4: 68 00 00 01 xori r0,r0,1 RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { ffc0f0e8: 7f 80 e8 00 cmpw cr7,r0,r29 ffc0f0ec: 40 be ff 80 bne- cr7,ffc0f06c <_RBTree_Validate_insert_unprotected+0x64> ffc0f0f0: 4b ff ff 90 b ffc0f080 <_RBTree_Validate_insert_unprotected+0x78> /* 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; } ffc0f0f4: 39 61 00 20 addi r11,r1,32 ffc0f0f8: 4b ff 1a 40 b ffc00b38 <_restgpr_27_x> =============================================================================== ffc0d828 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0d828: 94 21 ff e0 stwu r1,-32(r1) ffc0d82c: 7c 08 02 a6 mflr r0 ffc0d830: 90 01 00 24 stw r0,36(r1) ffc0d834: bf c1 00 18 stmw r30,24(r1) RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0d838: 83 e3 01 2c lwz r31,300(r3) if ( !api ) ffc0d83c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0d840: 41 9e 00 7c beq- cr7,ffc0d8bc <_RTEMS_tasks_Post_switch_extension+0x94><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d844: 7c 00 00 a6 mfmsr r0 ffc0d848: 7d 30 42 a6 mfsprg r9,0 ffc0d84c: 7c 09 48 78 andc r9,r0,r9 ffc0d850: 7d 20 01 24 mtmsr r9 asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; asr->signals_posted = 0; ffc0d854: 39 20 00 00 li r9,0 */ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; ffc0d858: 83 df 00 14 lwz r30,20(r31) asr->signals_posted = 0; ffc0d85c: 91 3f 00 14 stw r9,20(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d860: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ ffc0d864: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0d868: 41 be 00 54 beq+ cr7,ffc0d8bc <_RTEMS_tasks_Post_switch_extension+0x94> return; asr->nest_level += 1; ffc0d86c: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0d870: 38 80 00 00 li r4,0 ffc0d874: 80 7f 00 10 lwz r3,16(r31) ffc0d878: 60 84 ff ff ori r4,r4,65535 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc0d87c: 38 09 00 01 addi r0,r9,1 ffc0d880: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0d884: 38 a1 00 08 addi r5,r1,8 ffc0d888: 48 00 1e c1 bl ffc0f748 (*asr->handler)( signal_set ); ffc0d88c: 80 1f 00 0c lwz r0,12(r31) ffc0d890: 7f c3 f3 78 mr r3,r30 ffc0d894: 7c 09 03 a6 mtctr r0 ffc0d898: 4e 80 04 21 bctrl asr->nest_level -= 1; ffc0d89c: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0d8a0: 38 80 00 00 li r4,0 ffc0d8a4: 80 61 00 08 lwz r3,8(r1) asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; ffc0d8a8: 38 09 ff ff addi r0,r9,-1 ffc0d8ac: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0d8b0: 60 84 ff ff ori r4,r4,65535 ffc0d8b4: 38 a1 00 08 addi r5,r1,8 ffc0d8b8: 48 00 1e 91 bl ffc0f748 } ffc0d8bc: 39 61 00 20 addi r11,r1,32 ffc0d8c0: 4b ff 2c 80 b ffc00540 <_restgpr_30_x> =============================================================================== ffc09324 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc09324: 7c 2b 0b 78 mr r11,r1 ffc09328: 94 21 ff e0 stwu r1,-32(r1) ffc0932c: 7c 08 02 a6 mflr r0 ffc09330: 7c 64 1b 78 mr r4,r3 ffc09334: 3c 60 00 00 lis r3,0 ffc09338: 48 01 2a cd bl ffc1be04 <_savegpr_31> ffc0933c: 38 63 2c 00 addi r3,r3,11264 ffc09340: 90 01 00 24 stw r0,36(r1) ffc09344: 38 a1 00 08 addi r5,r1,8 ffc09348: 48 00 21 3d bl ffc0b484 <_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 ) { ffc0934c: 80 01 00 08 lwz r0,8(r1) ffc09350: 7c 7f 1b 78 mr r31,r3 ffc09354: 2f 80 00 00 cmpwi cr7,r0,0 ffc09358: 40 9e 00 88 bne- cr7,ffc093e0 <_Rate_monotonic_Timeout+0xbc><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; ffc0935c: 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); ffc09360: 80 03 00 10 lwz r0,16(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc09364: 70 09 40 00 andi. r9,r0,16384 ffc09368: 41 82 00 24 beq- ffc0938c <_Rate_monotonic_Timeout+0x68> ffc0936c: 81 23 00 20 lwz r9,32(r3) ffc09370: 80 1f 00 08 lwz r0,8(r31) ffc09374: 7f 89 00 00 cmpw cr7,r9,r0 ffc09378: 40 be 00 14 bne+ cr7,ffc0938c <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0937c: 3c 80 10 03 lis r4,4099 ffc09380: 60 84 ff f8 ori r4,r4,65528 ffc09384: 48 00 2b 89 bl ffc0bf0c <_Thread_Clear_state> ffc09388: 48 00 00 18 b ffc093a0 <_Rate_monotonic_Timeout+0x7c> _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 ) { ffc0938c: 80 1f 00 38 lwz r0,56(r31) ffc09390: 2f 80 00 01 cmpwi cr7,r0,1 ffc09394: 40 be 00 30 bne+ cr7,ffc093c4 <_Rate_monotonic_Timeout+0xa0> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; ffc09398: 38 00 00 03 li r0,3 ffc0939c: 90 1f 00 38 stw r0,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc093a0: 7f e3 fb 78 mr r3,r31 ffc093a4: 4b ff f9 35 bl ffc08cd8 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc093a8: 80 1f 00 3c lwz r0,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc093ac: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc093b0: 90 1f 00 1c stw r0,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc093b4: 38 63 2d c8 addi r3,r3,11720 ffc093b8: 38 9f 00 10 addi r4,r31,16 ffc093bc: 48 00 3f 51 bl ffc0d30c <_Watchdog_Insert> ffc093c0: 48 00 00 0c b ffc093cc <_Rate_monotonic_Timeout+0xa8> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; ffc093c4: 38 00 00 04 li r0,4 ffc093c8: 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--; ffc093cc: 3d 20 00 00 lis r9,0 ffc093d0: 81 69 28 08 lwz r11,10248(r9) ffc093d4: 38 0b ff ff addi r0,r11,-1 ffc093d8: 90 09 28 08 stw r0,10248(r9) return _Thread_Dispatch_disable_level; ffc093dc: 80 09 28 08 lwz r0,10248(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc093e0: 39 61 00 20 addi r11,r1,32 ffc093e4: 4b ff 7e 28 b ffc0120c <_restgpr_31_x> =============================================================================== ffc0a844 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { ffc0a844: 7c 2b 0b 78 mr r11,r1 ffc0a848: 94 21 ff f0 stwu r1,-16(r1) ffc0a84c: 7c 08 02 a6 mflr r0 ffc0a850: 48 01 15 99 bl ffc1bde8 <_savegpr_31> ffc0a854: 7c 7f 1b 78 mr r31,r3 void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); ffc0a858: 38 60 00 18 li r3,24 #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { ffc0a85c: 90 01 00 14 stw r0,20(r1) void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); ffc0a860: 48 00 1e 0d bl ffc0c66c <_Workspace_Allocate> if ( sched ) { ffc0a864: 2c 03 00 00 cmpwi r3,0 ffc0a868: 41 82 00 14 beq- ffc0a87c <_Scheduler_EDF_Allocate+0x38><== 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; ffc0a86c: 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; ffc0a870: 90 7f 00 8c stw r3,140(r31) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; ffc0a874: 93 e3 00 00 stw r31,0(r3) schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; ffc0a878: 90 03 00 14 stw r0,20(r3) } return sched; } ffc0a87c: 39 61 00 10 addi r11,r1,16 ffc0a880: 4b ff 62 c8 b ffc00b48 <_restgpr_31_x> =============================================================================== ffc0a884 <_Scheduler_EDF_Block>: #include void _Scheduler_EDF_Block( Thread_Control *the_thread ) { ffc0a884: 94 21 ff f0 stwu r1,-16(r1) ffc0a888: 7c 08 02 a6 mflr r0 ffc0a88c: bf c1 00 08 stmw r30,8(r1) RTEMS_INLINE_ROUTINE bool _Thread_Is_heir ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Heir ); ffc0a890: 3f c0 00 00 lis r30,0 ffc0a894: 3b de 2e 38 addi r30,r30,11832 ffc0a898: 90 01 00 14 stw r0,20(r1) ffc0a89c: 7c 7f 1b 78 mr r31,r3 _Scheduler_EDF_Extract( the_thread ); ffc0a8a0: 48 00 00 89 bl ffc0a928 <_Scheduler_EDF_Extract> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) ffc0a8a4: 80 1e 00 10 lwz r0,16(r30) ffc0a8a8: 7f 9f 00 00 cmpw cr7,r31,r0 ffc0a8ac: 40 be 00 08 bne+ cr7,ffc0a8b4 <_Scheduler_EDF_Block+0x30><== NEVER TAKEN _Scheduler_EDF_Schedule(); ffc0a8b0: 48 00 01 e1 bl ffc0aa90 <_Scheduler_EDF_Schedule> if ( _Thread_Is_executing( the_thread ) ) ffc0a8b4: 80 1e 00 0c lwz r0,12(r30) ffc0a8b8: 7f 9f 00 00 cmpw cr7,r31,r0 ffc0a8bc: 40 be 00 0c bne+ cr7,ffc0a8c8 <_Scheduler_EDF_Block+0x44><== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc0a8c0: 38 00 00 01 li r0,1 ffc0a8c4: 98 1e 00 18 stb r0,24(r30) } ffc0a8c8: 39 61 00 10 addi r11,r1,16 ffc0a8cc: 4b ff 62 78 b ffc00b44 <_restgpr_30_x> =============================================================================== ffc0aac8 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { ffc0aac8: 94 21 ff f0 stwu r1,-16(r1) ffc0aacc: 7c 08 02 a6 mflr r0 ffc0aad0: bf c1 00 08 stmw r30,8(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( ffc0aad4: 3f c0 00 00 lis r30,0 #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { ffc0aad8: 7c 7f 1b 78 mr r31,r3 ffc0aadc: 90 01 00 14 stw r0,20(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( ffc0aae0: 3b de 2e 38 addi r30,r30,11832 void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { _Scheduler_EDF_Enqueue(the_thread); ffc0aae4: 4b ff fe 0d bl ffc0a8f0 <_Scheduler_EDF_Enqueue> ffc0aae8: 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( ffc0aaec: 81 3e 00 10 lwz r9,16(r30) ffc0aaf0: 80 0b 21 10 lwz r0,8464(r11) ffc0aaf4: 80 69 00 14 lwz r3,20(r9) ffc0aaf8: 80 9f 00 14 lwz r4,20(r31) ffc0aafc: 7c 09 03 a6 mtctr r0 ffc0ab00: 4e 80 04 21 bctrl ffc0ab04: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ab08: 40 bc 00 34 bge+ cr7,ffc0ab3c <_Scheduler_EDF_Unblock+0x74> _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0ab0c: 81 3e 00 0c lwz r9,12(r30) * 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; ffc0ab10: 93 fe 00 10 stw r31,16(r30) if ( _Thread_Executing->is_preemptible || ffc0ab14: 88 09 00 74 lbz r0,116(r9) ffc0ab18: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ab1c: 40 9e 00 10 bne- cr7,ffc0ab2c <_Scheduler_EDF_Unblock+0x64><== ALWAYS TAKEN ffc0ab20: 80 1f 00 14 lwz r0,20(r31) <== NOT EXECUTED ffc0ab24: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0ab28: 40 9e 00 14 bne- cr7,ffc0ab3c <_Scheduler_EDF_Unblock+0x74><== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0ab2c: 3d 20 00 00 lis r9,0 ffc0ab30: 38 00 00 01 li r0,1 ffc0ab34: 39 29 2e 38 addi r9,r9,11832 ffc0ab38: 98 09 00 18 stb r0,24(r9) } } ffc0ab3c: 39 61 00 10 addi r11,r1,16 ffc0ab40: 4b ff 60 04 b ffc00b44 <_restgpr_30_x> =============================================================================== ffc0ab44 <_Scheduler_EDF_Update>: #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { ffc0ab44: 94 21 ff e8 stwu r1,-24(r1) ffc0ab48: 7c 08 02 a6 mflr r0 ffc0ab4c: 90 01 00 1c stw r0,28(r1) ffc0ab50: bf a1 00 0c stmw r29,12(r1) ffc0ab54: 7c 7f 1b 78 mr r31,r3 Scheduler_EDF_Per_thread *sched_info = ffc0ab58: 83 c3 00 8c lwz r30,140(r3) (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) { ffc0ab5c: 80 1e 00 14 lwz r0,20(r30) ffc0ab60: 2f 80 00 02 cmpwi cr7,r0,2 ffc0ab64: 40 be 00 20 bne+ cr7,ffc0ab84 <_Scheduler_EDF_Update+0x40> /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); ffc0ab68: 80 03 00 b0 lwz r0,176(r3) ffc0ab6c: 64 00 80 00 oris r0,r0,32768 ffc0ab70: 90 03 00 b0 stw r0,176(r3) the_thread->real_priority = the_thread->Start.initial_priority; ffc0ab74: 90 03 00 18 stw r0,24(r3) the_thread->current_priority = the_thread->Start.initial_priority; ffc0ab78: 90 03 00 14 stw r0,20(r3) sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; ffc0ab7c: 38 00 00 00 li r0,0 ffc0ab80: 90 1e 00 14 stw r0,20(r30) } if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) { ffc0ab84: 80 1e 00 14 lwz r0,20(r30) ffc0ab88: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ab8c: 40 be 00 68 bne+ cr7,ffc0abf4 <_Scheduler_EDF_Update+0xb0><== ALWAYS TAKEN _RBTree_Extract(&_Scheduler_EDF_Ready_queue, the_node); ffc0ab90: 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); ffc0ab94: 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); ffc0ab98: 3b bd 2e 5c addi r29,r29,11868 <== NOT EXECUTED ffc0ab9c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0aba0: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc0aba4: 48 00 43 b9 bl ffc0ef5c <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert(&_Scheduler_EDF_Ready_queue, the_node); ffc0aba8: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc0abac: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0abb0: 48 00 46 35 bl ffc0f1e4 <_RBTree_Insert> <== NOT EXECUTED _Scheduler_EDF_Schedule(); ffc0abb4: 4b ff fe dd bl ffc0aa90 <_Scheduler_EDF_Schedule> <== NOT EXECUTED if ( _Thread_Executing != _Thread_Heir ) { ffc0abb8: 3d 60 00 00 lis r11,0 <== NOT EXECUTED ffc0abbc: 39 4b 2e 38 addi r10,r11,11832 <== NOT EXECUTED ffc0abc0: 81 2a 00 0c lwz r9,12(r10) <== NOT EXECUTED ffc0abc4: 80 0a 00 10 lwz r0,16(r10) <== NOT EXECUTED ffc0abc8: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc0abcc: 41 9e 00 28 beq- cr7,ffc0abf4 <_Scheduler_EDF_Update+0xb0><== NOT EXECUTED if ( _Thread_Executing->is_preemptible || ffc0abd0: 88 09 00 74 lbz r0,116(r9) <== NOT EXECUTED ffc0abd4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0abd8: 40 9e 00 10 bne- cr7,ffc0abe8 <_Scheduler_EDF_Update+0xa4><== NOT EXECUTED ffc0abdc: 80 1f 00 14 lwz r0,20(r31) <== NOT EXECUTED ffc0abe0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0abe4: 40 9e 00 10 bne- cr7,ffc0abf4 <_Scheduler_EDF_Update+0xb0><== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0abe8: 39 6b 2e 38 addi r11,r11,11832 <== NOT EXECUTED ffc0abec: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0abf0: 98 0b 00 18 stb r0,24(r11) <== NOT EXECUTED } } } ffc0abf4: 39 61 00 18 addi r11,r1,24 ffc0abf8: 4b ff 5f 48 b ffc00b40 <_restgpr_29_x> =============================================================================== ffc0abfc <_Scheduler_EDF_Yield>: #include #include #include void _Scheduler_EDF_Yield(void) { ffc0abfc: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc0ac00: 7c 08 02 a6 mflr r0 <== NOT EXECUTED Scheduler_EDF_Per_thread *first_info; RBTree_Node *first_node; ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0ac04: 3d 20 00 00 lis r9,0 <== NOT EXECUTED #include #include #include void _Scheduler_EDF_Yield(void) { ffc0ac08: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc0ac0c: bf 81 00 08 stmw r28,8(r1) <== NOT EXECUTED Scheduler_EDF_Per_thread *first_info; RBTree_Node *first_node; ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0ac10: 83 e9 2e 44 lwz r31,11844(r9) <== NOT EXECUTED Scheduler_EDF_Per_thread *executing_info = ffc0ac14: 83 9f 00 8c lwz r28,140(r31) <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0ac18: 7f a0 00 a6 mfmsr r29 <== NOT EXECUTED ffc0ac1c: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc0ac20: 7f a0 00 78 andc r0,r29,r0 <== NOT EXECUTED ffc0ac24: 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); ffc0ac28: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0ac2c: 81 29 2e 60 lwz r9,11872(r9) <== NOT EXECUTED ffc0ac30: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc0ac34: 81 69 00 04 lwz r11,4(r9) <== NOT EXECUTED ffc0ac38: 2f 8b 00 00 cmpwi cr7,r11,0 <== NOT EXECUTED ffc0ac3c: 40 be 00 10 bne+ cr7,ffc0ac4c <_Scheduler_EDF_Yield+0x50><== NOT EXECUTED #include #include #include #include void _Scheduler_EDF_Yield(void) ffc0ac40: 80 09 00 08 lwz r0,8(r9) <== NOT EXECUTED ffc0ac44: 7c 00 00 34 cntlzw r0,r0 <== NOT EXECUTED ffc0ac48: 54 00 d9 7e rlwinm r0,r0,27,5,31 <== NOT EXECUTED (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); _ISR_Disable( level ); if ( !_RBTree_Has_only_one_node(&_Scheduler_EDF_Ready_queue) ) { ffc0ac4c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0ac50: 40 be 00 6c bne+ cr7,ffc0acbc <_Scheduler_EDF_Yield+0xc0><== NOT EXECUTED /* * 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 ); ffc0ac54: 3f c0 00 00 lis r30,0 <== NOT EXECUTED ISR_Level level; Thread_Control *executing = _Thread_Executing; Scheduler_EDF_Per_thread *executing_info = (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); ffc0ac58: 3b 9c 00 04 addi r28,r28,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 ); ffc0ac5c: 3b de 2e 5c addi r30,r30,11868 <== NOT EXECUTED ffc0ac60: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0ac64: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc0ac68: 48 00 42 f5 bl ffc0ef5c <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node ); ffc0ac6c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0ac70: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc0ac74: 48 00 45 71 bl ffc0f1e4 <_RBTree_Insert> <== NOT EXECUTED static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0ac78: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc0ac7c: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED ffc0ac80: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED ffc0ac84: 3f 80 00 00 lis r28,0 <== NOT EXECUTED ffc0ac88: 3b 9c 2e 38 addi r28,r28,11832 <== NOT EXECUTED _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) { ffc0ac8c: 80 1c 00 10 lwz r0,16(r28) <== NOT EXECUTED ffc0ac90: 7f 9f 00 00 cmpw cr7,r31,r0 <== NOT EXECUTED ffc0ac94: 40 be 00 18 bne+ cr7,ffc0acac <_Scheduler_EDF_Yield+0xb0><== NOT EXECUTED first_node = _RBTree_Peek( &_Scheduler_EDF_Ready_queue, RBT_LEFT ); ffc0ac98: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0ac9c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc0aca0: 48 00 45 59 bl ffc0f1f8 <_RBTree_Peek> <== NOT EXECUTED first_info = _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node); _Thread_Heir = first_info->thread; ffc0aca4: 80 03 ff fc lwz r0,-4(r3) <== NOT EXECUTED ffc0aca8: 90 1c 00 10 stw r0,16(r28) <== NOT EXECUTED } _Thread_Dispatch_necessary = true; ffc0acac: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0acb0: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0acb4: 39 29 2e 38 addi r9,r9,11832 <== NOT EXECUTED ffc0acb8: 48 00 00 1c b ffc0acd4 <_Scheduler_EDF_Yield+0xd8> <== NOT EXECUTED ffc0acbc: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0acc0: 39 29 2e 38 addi r9,r9,11832 <== NOT EXECUTED } else if ( !_Thread_Is_heir( executing ) ) ffc0acc4: 80 09 00 10 lwz r0,16(r9) <== NOT EXECUTED ffc0acc8: 7f 9f 00 00 cmpw cr7,r31,r0 <== NOT EXECUTED ffc0accc: 41 9e 00 0c beq- cr7,ffc0acd8 <_Scheduler_EDF_Yield+0xdc><== NOT EXECUTED _Thread_Dispatch_necessary = true; ffc0acd0: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0acd4: 98 09 00 18 stb r0,24(r9) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0acd8: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED _ISR_Enable( level ); } ffc0acdc: 39 61 00 18 addi r11,r1,24 <== NOT EXECUTED ffc0ace0: 4b ff 5e 5c b ffc00b3c <_restgpr_28_x> <== NOT EXECUTED =============================================================================== ffc09f54 <_Scheduler_priority_Block>: ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; ffc09f54: 81 63 00 8c lwz r11,140(r3) ready = sched_info->ready_chain; ffc09f58: 81 2b 00 00 lwz r9,0(r11) if ( _Chain_Has_only_one_node( ready ) ) { ffc09f5c: 81 49 00 00 lwz r10,0(r9) ffc09f60: 80 09 00 08 lwz r0,8(r9) ffc09f64: 7f 8a 00 00 cmpw cr7,r10,r0 ffc09f68: 40 be 00 4c bne+ cr7,ffc09fb4 <_Scheduler_priority_Block+0x60> 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 ); ffc09f6c: 38 09 00 04 addi r0,r9,4 head->next = tail; head->previous = NULL; tail->previous = head; ffc09f70: 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; ffc09f74: 90 09 00 00 stw r0,0(r9) head->previous = NULL; ffc09f78: 38 00 00 00 li r0,0 ffc09f7c: 90 09 00 04 stw r0,4(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; ffc09f80: 81 2b 00 04 lwz r9,4(r11) ffc09f84: 80 0b 00 14 lwz r0,20(r11) ffc09f88: 81 49 00 00 lwz r10,0(r9) ffc09f8c: 7d 40 00 38 and r0,r10,r0 if ( *the_priority_map->minor == 0 ) ffc09f90: 2f 80 00 00 cmpwi cr7,r0,0 RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc09f94: 90 09 00 00 stw r0,0(r9) if ( *the_priority_map->minor == 0 ) ffc09f98: 40 9e 00 2c bne- cr7,ffc09fc4 <_Scheduler_priority_Block+0x70> _Priority_Major_bit_map &= the_priority_map->block_major; ffc09f9c: 3d 20 00 00 lis r9,0 ffc09fa0: 80 0b 00 10 lwz r0,16(r11) ffc09fa4: 81 49 28 08 lwz r10,10248(r9) ffc09fa8: 7d 40 00 38 and r0,r10,r0 ffc09fac: 90 09 28 08 stw r0,10248(r9) ffc09fb0: 48 00 00 14 b ffc09fc4 <_Scheduler_priority_Block+0x70> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc09fb4: 81 63 00 00 lwz r11,0(r3) previous = the_node->previous; ffc09fb8: 81 23 00 04 lwz r9,4(r3) next->previous = previous; ffc09fbc: 91 2b 00 04 stw r9,4(r11) previous->next = next; ffc09fc0: 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 ); ffc09fc4: 3d 20 00 00 lis r9,0 { _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) ffc09fc8: 80 09 2d c8 lwz r0,11720(r9) ffc09fcc: 7f 83 00 00 cmpw cr7,r3,r0 ffc09fd0: 40 be 00 60 bne+ cr7,ffc0a030 <_Scheduler_priority_Block+0xdc> 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 ); ffc09fd4: 3d 40 00 00 lis r10,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 ffc09fd8: 3d 20 00 00 lis r9,0 ffc09fdc: 80 0a 28 08 lwz r0,10248(r10) ffc09fe0: 81 29 20 e0 lwz r9,8416(r9) ffc09fe4: 7c 0b 00 34 cntlzw r11,r0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc09fe8: 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 ); ffc09fec: 90 0a 28 08 stw r0,10248(r10) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc09ff0: 39 08 2d e0 addi r8,r8,11744 ffc09ff4: 55 6a 10 3a rlwinm r10,r11,2,0,29 ffc09ff8: 7c 08 50 2e lwzx r0,r8,r10 ffc09ffc: 7c 07 00 34 cntlzw r7,r0 ffc0a000: 7c 08 51 2e stwx r0,r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc0a004: 55 60 20 36 rlwinm r0,r11,4,0,27 ffc0a008: 7c 00 3a 14 add r0,r0,r7 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0a00c: 1c 00 00 0c mulli r0,r0,12 ffc0a010: 7d 69 02 14 add r11,r9,r0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0a014: 7c 09 00 2e lwzx r0,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 ); ffc0a018: 39 2b 00 04 addi r9,r11,4 ffc0a01c: 7f 80 48 00 cmpw cr7,r0,r9 ffc0a020: 40 be 00 08 bne+ cr7,ffc0a028 <_Scheduler_priority_Block+0xd4><== ALWAYS TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0a024: 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( ffc0a028: 3d 20 00 00 lis r9,0 ffc0a02c: 90 09 2d c8 stw r0,11720(r9) RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0a030: 3d 20 00 00 lis r9,0 ffc0a034: 39 29 2d b8 addi r9,r9,11704 _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) ffc0a038: 80 09 00 0c lwz r0,12(r9) ffc0a03c: 7f 83 00 00 cmpw cr7,r3,r0 ffc0a040: 4c be 00 20 bnelr+ cr7 _Thread_Dispatch_necessary = true; ffc0a044: 38 00 00 01 li r0,1 ffc0a048: 98 09 00 18 stb r0,24(r9) ffc0a04c: 4e 80 00 20 blr =============================================================================== ffc0a220 <_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 ); ffc0a220: 3d 40 00 00 lis r10,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 ffc0a224: 3d 20 00 00 lis r9,0 ffc0a228: 80 0a 28 08 lwz r0,10248(r10) ffc0a22c: 81 29 20 e0 lwz r9,8416(r9) ffc0a230: 7c 0b 00 34 cntlzw r11,r0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0a234: 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 ); ffc0a238: 90 0a 28 08 stw r0,10248(r10) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0a23c: 39 08 2d e0 addi r8,r8,11744 ffc0a240: 55 6a 10 3a rlwinm r10,r11,2,0,29 ffc0a244: 7c 08 50 2e lwzx r0,r8,r10 ffc0a248: 7c 07 00 34 cntlzw r7,r0 ffc0a24c: 7c 08 51 2e stwx r0,r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc0a250: 55 60 20 36 rlwinm r0,r11,4,0,27 ffc0a254: 7c 00 3a 14 add r0,r0,r7 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0a258: 1c 00 00 0c mulli r0,r0,12 ffc0a25c: 7d 69 02 14 add r11,r9,r0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0a260: 7c 09 00 2e lwzx r0,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 ); ffc0a264: 39 2b 00 04 addi r9,r11,4 ffc0a268: 7f 80 48 00 cmpw cr7,r0,r9 ffc0a26c: 40 be 00 08 bne+ cr7,ffc0a274 <_Scheduler_priority_Schedule+0x54><== ALWAYS TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0a270: 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( ffc0a274: 3d 20 00 00 lis r9,0 ffc0a278: 90 09 2d c8 stw r0,11720(r9) #include void _Scheduler_priority_Schedule(void) { _Scheduler_priority_Schedule_body(); } ffc0a27c: 4e 80 00 20 blr =============================================================================== ffc08d50 <_TOD_Validate>: uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc08d50: 2c 03 00 00 cmpwi r3,0 { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); ffc08d54: 3d 20 00 00 lis r9,0 ffc08d58: 81 29 20 30 lwz r9,8240(r9) (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; ffc08d5c: 38 00 00 00 li r0,0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc08d60: 41 82 00 94 beq- ffc08df4 <_TOD_Validate+0xa4> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / ffc08d64: 3d 60 00 0f lis r11,15 ffc08d68: 61 6b 42 40 ori r11,r11,16960 ffc08d6c: 7d 2b 4b 96 divwu r9,r11,r9 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc08d70: 81 63 00 18 lwz r11,24(r3) ffc08d74: 7f 8b 48 40 cmplw cr7,r11,r9 ffc08d78: 40 9c 00 7c bge- cr7,ffc08df4 <_TOD_Validate+0xa4> (the_tod->ticks >= ticks_per_second) || ffc08d7c: 81 23 00 14 lwz r9,20(r3) ffc08d80: 2b 89 00 3b cmplwi cr7,r9,59 ffc08d84: 41 9d 00 70 bgt- cr7,ffc08df4 <_TOD_Validate+0xa4> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || ffc08d88: 81 23 00 10 lwz r9,16(r3) ffc08d8c: 2b 89 00 3b cmplwi cr7,r9,59 ffc08d90: 41 9d 00 64 bgt- cr7,ffc08df4 <_TOD_Validate+0xa4> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || ffc08d94: 81 23 00 0c lwz r9,12(r3) ffc08d98: 2b 89 00 17 cmplwi cr7,r9,23 ffc08d9c: 41 9d 00 58 bgt- cr7,ffc08df4 <_TOD_Validate+0xa4> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || ffc08da0: 81 23 00 04 lwz r9,4(r3) rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || ffc08da4: 2f 89 00 00 cmpwi cr7,r9,0 ffc08da8: 41 9e 00 4c beq- cr7,ffc08df4 <_TOD_Validate+0xa4> <== NEVER TAKEN (the_tod->month == 0) || ffc08dac: 2b 89 00 0c cmplwi cr7,r9,12 ffc08db0: 41 9d 00 44 bgt- cr7,ffc08df4 <_TOD_Validate+0xa4> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || ffc08db4: 81 43 00 00 lwz r10,0(r3) (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || ffc08db8: 2b 8a 07 c3 cmplwi cr7,r10,1987 ffc08dbc: 40 9d 00 38 ble- cr7,ffc08df4 <_TOD_Validate+0xa4> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) ffc08dc0: 81 63 00 08 lwz r11,8(r3) (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || ffc08dc4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc08dc8: 41 9e 00 2c beq- cr7,ffc08df4 <_TOD_Validate+0xa4> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) ffc08dcc: 71 40 00 03 andi. r0,r10,3 ffc08dd0: 3d 40 ff c2 lis r10,-62 ffc08dd4: 39 4a ea 14 addi r10,r10,-5612 ffc08dd8: 40 82 00 08 bne- ffc08de0 <_TOD_Validate+0x90> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; ffc08ddc: 39 29 00 0d addi r9,r9,13 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; ffc08de0: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc08de4: 7c 0a 48 2e lwzx r0,r10,r9 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( ffc08de8: 7c 0b 00 10 subfc r0,r11,r0 ffc08dec: 38 00 00 00 li r0,0 ffc08df0: 7c 00 01 14 adde r0,r0,r0 if ( the_tod->day > days_in_month ) return false; return true; } ffc08df4: 7c 03 03 78 mr r3,r0 ffc08df8: 4e 80 00 20 blr =============================================================================== ffc0a4f8 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc0a4f8: 94 21 ff e0 stwu r1,-32(r1) ffc0a4fc: 7c 08 02 a6 mflr r0 ffc0a500: 90 01 00 24 stw r0,36(r1) ffc0a504: bf 81 00 10 stmw r28,16(r1) ffc0a508: 7c 7f 1b 78 mr r31,r3 ffc0a50c: 7c be 2b 78 mr r30,r5 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; ffc0a510: 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 ); ffc0a514: 90 81 00 08 stw r4,8(r1) ffc0a518: 48 00 0e 55 bl ffc0b36c <_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 ) ffc0a51c: 80 1f 00 14 lwz r0,20(r31) ffc0a520: 80 81 00 08 lwz r4,8(r1) ffc0a524: 7f 80 20 00 cmpw cr7,r0,r4 ffc0a528: 41 9e 00 0c beq- cr7,ffc0a534 <_Thread_Change_priority+0x3c> _Thread_Set_priority( the_thread, new_priority ); ffc0a52c: 7f e3 fb 78 mr r3,r31 ffc0a530: 48 00 0d b1 bl ffc0b2e0 <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0a534: 7f 80 00 a6 mfmsr r28 ffc0a538: 7c 10 42 a6 mfsprg r0,0 ffc0a53c: 7f 80 00 78 andc r0,r28,r0 ffc0a540: 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; ffc0a544: 80 1f 00 10 lwz r0,16(r31) ffc0a548: 57 bd 07 7a rlwinm r29,r29,0,29,29 if ( state != STATES_TRANSIENT ) { ffc0a54c: 2f 80 00 04 cmpwi cr7,r0,4 ffc0a550: 41 9e 00 38 beq- cr7,ffc0a588 <_Thread_Change_priority+0x90> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc0a554: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a558: 40 9e 00 0c bne- cr7,ffc0a564 <_Thread_Change_priority+0x6c><== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc0a55c: 54 09 07 b8 rlwinm r9,r0,0,30,28 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc0a560: 91 3f 00 10 stw r9,16(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0a564: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0a568: 3d 20 00 03 lis r9,3 ffc0a56c: 61 29 be e0 ori r9,r9,48864 ffc0a570: 7c 0b 48 39 and. r11,r0,r9 ffc0a574: 41 a2 00 94 beq+ ffc0a608 <_Thread_Change_priority+0x110> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0a578: 80 7f 00 44 lwz r3,68(r31) ffc0a57c: 7f e4 fb 78 mr r4,r31 ffc0a580: 48 00 0c a5 bl ffc0b224 <_Thread_queue_Requeue> ffc0a584: 48 00 00 84 b ffc0a608 <_Thread_Change_priority+0x110> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc0a588: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a58c: 40 9e 00 30 bne- cr7,ffc0a5bc <_Thread_Change_priority+0xc4><== NEVER TAKEN * 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 ) ffc0a590: 2f 9e 00 00 cmpwi cr7,r30,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 ); ffc0a594: 93 bf 00 10 stw r29,16(r31) ffc0a598: 3d 20 00 00 lis r9,0 ffc0a59c: 39 29 20 e0 addi r9,r9,8416 if ( prepend_it ) ffc0a5a0: 41 9e 00 0c beq- cr7,ffc0a5ac <_Thread_Change_priority+0xb4> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); ffc0a5a4: 80 09 00 28 lwz r0,40(r9) ffc0a5a8: 48 00 00 08 b ffc0a5b0 <_Thread_Change_priority+0xb8> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); ffc0a5ac: 80 09 00 24 lwz r0,36(r9) ffc0a5b0: 7f e3 fb 78 mr r3,r31 ffc0a5b4: 7c 09 03 a6 mtctr r0 ffc0a5b8: 4e 80 04 21 bctrl static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0a5bc: 7c 00 00 a6 mfmsr r0 ffc0a5c0: 7f 80 01 24 mtmsr r28 ffc0a5c4: 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(); ffc0a5c8: 3d 20 00 00 lis r9,0 ffc0a5cc: 80 09 20 e8 lwz r0,8424(r9) ffc0a5d0: 7c 09 03 a6 mtctr r0 ffc0a5d4: 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 ); ffc0a5d8: 3d 20 00 00 lis r9,0 ffc0a5dc: 39 29 2d b8 addi r9,r9,11704 ffc0a5e0: 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() && ffc0a5e4: 80 09 00 10 lwz r0,16(r9) ffc0a5e8: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0a5ec: 41 9e 00 18 beq- cr7,ffc0a604 <_Thread_Change_priority+0x10c> ffc0a5f0: 88 0b 00 74 lbz r0,116(r11) ffc0a5f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a5f8: 41 9e 00 0c beq- cr7,ffc0a604 <_Thread_Change_priority+0x10c> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; ffc0a5fc: 38 00 00 01 li r0,1 ffc0a600: 98 09 00 18 stb r0,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0a604: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); } ffc0a608: 39 61 00 20 addi r11,r1,32 ffc0a60c: 4b ff 5f 2c b ffc00538 <_restgpr_28_x> =============================================================================== ffc0a828 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0a828: 94 21 ff e8 stwu r1,-24(r1) ffc0a82c: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0a830: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0a834: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0a838: 48 00 01 d9 bl ffc0aa10 <_Thread_Get> switch ( location ) { ffc0a83c: 80 01 00 08 lwz r0,8(r1) ffc0a840: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a844: 40 9e 00 24 bne- cr7,ffc0a868 <_Thread_Delay_ended+0x40><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc0a848: 3c 80 10 00 lis r4,4096 ffc0a84c: 60 84 00 18 ori r4,r4,24 ffc0a850: 4b ff fd c1 bl ffc0a610 <_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--; ffc0a854: 3d 20 00 00 lis r9,0 ffc0a858: 81 69 27 c8 lwz r11,10184(r9) ffc0a85c: 38 0b ff ff addi r0,r11,-1 ffc0a860: 90 09 27 c8 stw r0,10184(r9) return _Thread_Dispatch_disable_level; ffc0a864: 80 09 27 c8 lwz r0,10184(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc0a868: 80 01 00 1c lwz r0,28(r1) ffc0a86c: 38 21 00 18 addi r1,r1,24 ffc0a870: 7c 08 03 a6 mtlr r0 ffc0a874: 4e 80 00 20 blr =============================================================================== ffc0a878 <_Thread_Dispatch>: * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc0a878: 3d 20 00 00 lis r9,0 * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0a87c: 94 21 ff c8 stwu r1,-56(r1) ffc0a880: 7c 08 02 a6 mflr r0 ffc0a884: 81 69 27 c8 lwz r11,10184(r9) ffc0a888: 90 01 00 3c stw r0,60(r1) ffc0a88c: 38 0b 00 01 addi r0,r11,1 ffc0a890: 90 09 27 c8 stw r0,10184(r9) ffc0a894: bf 21 00 1c stmw r25,28(r1) return _Thread_Dispatch_disable_level; ffc0a898: 80 09 27 c8 lwz r0,10184(r9) #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; ffc0a89c: 3f 80 00 00 lis r28,0 ffc0a8a0: 3b bc 2d b8 addi r29,r28,11704 ffc0a8a4: 83 fd 00 0c lwz r31,12(r29) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0a8a8: 7c 00 00 a6 mfmsr r0 ffc0a8ac: 7d 30 42 a6 mfsprg r9,0 ffc0a8b0: 7c 09 48 78 andc r9,r0,r9 ffc0a8b4: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; ffc0a8b8: 3b 20 00 00 li r25,0 #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; ffc0a8bc: 3f 40 00 00 lis r26,0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( ffc0a8c0: 3b bd 00 1c addi r29,r29,28 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0a8c4: 3f 60 00 00 lis r27,0 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0a8c8: 48 00 00 d8 b ffc0a9a0 <_Thread_Dispatch+0x128> heir = _Thread_Heir; ffc0a8cc: 83 c9 00 10 lwz r30,16(r9) _Thread_Dispatch_necessary = false; ffc0a8d0: 9b 29 00 18 stb r25,24(r9) /* * 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 ) ffc0a8d4: 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; ffc0a8d8: 93 c9 00 0c stw r30,12(r9) /* * 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 ) ffc0a8dc: 41 9e 00 d4 beq- cr7,ffc0a9b0 <_Thread_Dispatch+0x138> */ #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 ) ffc0a8e0: 81 3e 00 7c lwz r9,124(r30) ffc0a8e4: 2f 89 00 01 cmpwi cr7,r9,1 ffc0a8e8: 40 be 00 0c bne+ cr7,ffc0a8f4 <_Thread_Dispatch+0x7c> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0a8ec: 81 3a 27 c4 lwz r9,10180(r26) ffc0a8f0: 91 3e 00 78 stw r9,120(r30) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0a8f4: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc0a8f8: 38 61 00 10 addi r3,r1,16 ffc0a8fc: 48 00 33 85 bl ffc0dc80 <_TOD_Get_uptime> _Timestamp_Subtract( ffc0a900: 7f a3 eb 78 mr r3,r29 ffc0a904: 38 81 00 10 addi r4,r1,16 ffc0a908: 38 a1 00 08 addi r5,r1,8 ffc0a90c: 48 00 0c 8d bl ffc0b598 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); ffc0a910: 38 7f 00 84 addi r3,r31,132 ffc0a914: 38 81 00 08 addi r4,r1,8 ffc0a918: 48 00 0c 25 bl ffc0b53c <_Timespec_Add_to> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0a91c: 81 3b 27 dc lwz r9,10204(r27) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0a920: 81 41 00 10 lwz r10,16(r1) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0a924: 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; ffc0a928: 81 61 00 14 lwz r11,20(r1) ffc0a92c: 91 5d 00 00 stw r10,0(r29) ffc0a930: 91 7d 00 04 stw r11,4(r29) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0a934: 41 9e 00 14 beq- cr7,ffc0a948 <_Thread_Dispatch+0xd0> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc0a938: 80 09 00 00 lwz r0,0(r9) ffc0a93c: 90 1f 01 28 stw r0,296(r31) *_Thread_libc_reent = heir->libc_reent; ffc0a940: 80 1e 01 28 lwz r0,296(r30) ffc0a944: 90 09 00 00 stw r0,0(r9) } _User_extensions_Thread_switch( executing, heir ); ffc0a948: 7f e3 fb 78 mr r3,r31 ffc0a94c: 7f c4 f3 78 mr r4,r30 ffc0a950: 48 00 0f 71 bl ffc0b8c0 <_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 ) ffc0a954: 80 1f 01 24 lwz r0,292(r31) ffc0a958: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a95c: 41 9e 00 0c beq- cr7,ffc0a968 <_Thread_Dispatch+0xf0> _Context_Save_fp( &executing->fp_context ); ffc0a960: 38 7f 01 24 addi r3,r31,292 ffc0a964: 48 00 fb 9d bl ffc1a500 <_CPU_Context_save_fp> #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc0a968: 38 7f 00 c4 addi r3,r31,196 ffc0a96c: 38 9e 00 c4 addi r4,r30,196 ffc0a970: 48 00 fd 11 bl ffc1a680 <_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 ) ffc0a974: 80 1f 01 24 lwz r0,292(r31) ffc0a978: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a97c: 41 9e 00 0c beq- cr7,ffc0a988 <_Thread_Dispatch+0x110> _Context_Restore_fp( &executing->fp_context ); ffc0a980: 38 7f 01 24 addi r3,r31,292 ffc0a984: 48 00 fc 3d bl ffc1a5c0 <_CPU_Context_restore_fp> #endif #endif executing = _Thread_Executing; ffc0a988: 39 3c 2d b8 addi r9,r28,11704 ffc0a98c: 83 e9 00 0c lwz r31,12(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0a990: 7c 00 00 a6 mfmsr r0 ffc0a994: 7d 30 42 a6 mfsprg r9,0 ffc0a998: 7c 09 48 78 andc r9,r0,r9 ffc0a99c: 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 ) { ffc0a9a0: 39 3c 2d b8 addi r9,r28,11704 ffc0a9a4: 89 69 00 18 lbz r11,24(r9) ffc0a9a8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0a9ac: 40 9e ff 20 bne+ cr7,ffc0a8cc <_Thread_Dispatch+0x54> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0a9b0: 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--; ffc0a9b4: 3d 20 00 00 lis r9,0 ffc0a9b8: 81 69 27 c8 lwz r11,10184(r9) ffc0a9bc: 38 0b ff ff addi r0,r11,-1 ffc0a9c0: 90 09 27 c8 stw r0,10184(r9) return _Thread_Dispatch_disable_level; ffc0a9c4: 80 09 27 c8 lwz r0,10184(r9) _ISR_Enable( level ); _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); ffc0a9c8: 4b ff e0 95 bl ffc08a5c <_API_extensions_Run_postswitch> } ffc0a9cc: 39 61 00 38 addi r11,r1,56 ffc0a9d0: 4b ff 5b 5c b ffc0052c <_restgpr_25_x> =============================================================================== ffc0fad8 <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc0fad8: 94 21 ff f0 stwu r1,-16(r1) ffc0fadc: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; ffc0fae0: 3d 20 00 00 lis r9,0 * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc0fae4: 90 01 00 14 stw r0,20(r1) ffc0fae8: bf c1 00 08 stmw r30,8(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; ffc0faec: 83 e9 2d c4 lwz r31,11716(r9) /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; ffc0faf0: 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); ffc0faf4: 38 00 00 00 li r0,0 ffc0faf8: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc0fafc: 71 2b 00 01 andi. r11,r9,1 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; __asm__ volatile ( ffc0fb00: 7d 30 42 a6 mfsprg r9,0 ffc0fb04: 40 82 00 0c bne- ffc0fb10 <_Thread_Handler+0x38> msr |= ppc_interrupt_get_disable_mask(); ffc0fb08: 7d 20 03 78 or r0,r9,r0 ffc0fb0c: 48 00 00 08 b ffc0fb14 <_Thread_Handler+0x3c> } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc0fb10: 7c 00 48 78 andc r0,r0,r9 } _CPU_MSR_SET(msr); ffc0fb14: 7c 00 01 24 mtmsr r0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; ffc0fb18: 3d 20 00 00 lis r9,0 ffc0fb1c: 8b c9 29 80 lbz r30,10624(r9) doneConstructors = true; ffc0fb20: 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 ); ffc0fb24: 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; ffc0fb28: 98 09 29 80 stb r0,10624(r9) /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); ffc0fb2c: 4b ff bb 61 bl ffc0b68c <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc0fb30: 4b ff ae a5 bl ffc0a9d4 <_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) */ { ffc0fb34: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0fb38: 40 be 00 08 bne+ cr7,ffc0fb40 <_Thread_Handler+0x68> INIT_NAME (); ffc0fb3c: 48 00 b7 01 bl ffc1b23c <_init> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc0fb40: 80 1f 00 94 lwz r0,148(r31) ffc0fb44: 2f 80 00 00 cmpwi cr7,r0,0 ffc0fb48: 40 be 00 18 bne+ cr7,ffc0fb60 <_Thread_Handler+0x88> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc0fb4c: 80 1f 00 90 lwz r0,144(r31) ffc0fb50: 80 7f 00 9c lwz r3,156(r31) ffc0fb54: 7c 09 03 a6 mtctr r0 ffc0fb58: 4e 80 04 21 bctrl #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = ffc0fb5c: 90 7f 00 28 stw r3,40(r31) * 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 ); ffc0fb60: 7f e3 fb 78 mr r3,r31 ffc0fb64: 4b ff bb 7d bl ffc0b6e0 <_User_extensions_Thread_exitted> _Internal_error_Occurred( ffc0fb68: 38 60 00 00 li r3,0 ffc0fb6c: 38 80 00 01 li r4,1 ffc0fb70: 38 a0 00 05 li r5,5 ffc0fb74: 4b ff 9a 99 bl ffc0960c <_Internal_error_Occurred> =============================================================================== ffc0aac0 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0aac0: 94 21 ff d0 stwu r1,-48(r1) ffc0aac4: 7c 08 02 a6 mflr r0 ffc0aac8: be e1 00 0c stmw r23,12(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0aacc: 3b 20 00 00 li r25,0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0aad0: 7d 3a 4b 78 mr r26,r9 ffc0aad4: 90 01 00 34 stw r0,52(r1) ffc0aad8: 7c 7e 1b 78 mr r30,r3 ffc0aadc: 7c 9f 23 78 mr r31,r4 ffc0aae0: 81 21 00 40 lwz r9,64(r1) /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0aae4: 7c 83 23 78 mr r3,r4 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0aae8: 93 24 01 2c stw r25,300(r4) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0aaec: 7c dd 33 78 mr r29,r6 ffc0aaf0: 7c fc 3b 78 mr r28,r7 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0aaf4: 93 24 01 30 stw r25,304(r4) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0aaf8: 7d 1b 43 78 mr r27,r8 ffc0aafc: 7d 57 53 78 mr r23,r10 */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; the_thread->libc_reent = NULL; ffc0ab00: 93 24 01 28 stw r25,296(r4) /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0ab04: 7c c4 33 78 mr r4,r6 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0ab08: 83 09 00 00 lwz r24,0(r9) /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0ab0c: 48 00 08 b5 bl ffc0b3c0 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0ab10: 2c 03 00 00 cmpwi r3,0 return false; /* stack allocation failed */ ffc0ab14: 38 00 00 00 li r0,0 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0ab18: 41 82 01 80 beq- ffc0ac98 <_Thread_Initialize+0x1d8> ffc0ab1c: 7f 83 e8 40 cmplw cr7,r3,r29 ffc0ab20: 41 9c 01 78 blt- cr7,ffc0ac98 <_Thread_Initialize+0x1d8><== NEVER TAKEN /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0ab24: 2f 9c 00 00 cmpwi cr7,r28,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0ab28: 80 1f 00 c0 lwz r0,192(r31) the_stack->size = size; ffc0ab2c: 90 7f 00 b4 stw r3,180(r31) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0ab30: 90 1f 00 b8 stw r0,184(r31) ffc0ab34: 41 be 00 14 beq+ cr7,ffc0ab48 <_Thread_Initialize+0x88> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); ffc0ab38: 38 60 01 08 li r3,264 ffc0ab3c: 48 00 10 f1 bl ffc0bc2c <_Workspace_Allocate> if ( !fp_area ) ffc0ab40: 7c 79 1b 79 mr. r25,r3 ffc0ab44: 41 82 01 10 beq- ffc0ac54 <_Thread_Initialize+0x194> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0ab48: 3d 20 00 00 lis r9,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; ffc0ab4c: 93 3f 01 24 stw r25,292(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0ab50: 38 00 00 00 li r0,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0ab54: 80 69 27 e8 lwz r3,10216(r9) * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0ab58: 3b a0 00 00 li r29,0 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; ffc0ab5c: 93 3f 00 bc stw r25,188(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0ab60: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ab64: 90 1f 00 50 stw r0,80(r31) the_watchdog->routine = routine; ffc0ab68: 90 1f 00 64 stw r0,100(r31) the_watchdog->id = id; ffc0ab6c: 90 1f 00 68 stw r0,104(r31) the_watchdog->user_data = user_data; ffc0ab70: 90 1f 00 6c stw r0,108(r31) ffc0ab74: 41 be 00 18 beq+ cr7,ffc0ab8c <_Thread_Initialize+0xcc> extensions_area = _Workspace_Allocate( ffc0ab78: 38 63 00 01 addi r3,r3,1 ffc0ab7c: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0ab80: 48 00 10 ad bl ffc0bc2c <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0ab84: 7c 7d 1b 79 mr. r29,r3 ffc0ab88: 41 82 00 d0 beq- ffc0ac58 <_Thread_Initialize+0x198> * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { ffc0ab8c: 2f 9d 00 00 cmpwi cr7,r29,0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0ab90: 93 bf 01 34 stw r29,308(r31) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { ffc0ab94: 41 9e 00 30 beq- cr7,ffc0abc4 <_Thread_Initialize+0x104> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0ab98: 3d 20 00 00 lis r9,0 ffc0ab9c: 81 69 27 e8 lwz r11,10216(r9) the_thread->extensions[i] = NULL; ffc0aba0: 38 00 00 00 li r0,0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0aba4: 39 20 00 00 li r9,0 ffc0aba8: 48 00 00 14 b ffc0abbc <_Thread_Initialize+0xfc> the_thread->extensions[i] = NULL; ffc0abac: 81 1f 01 34 lwz r8,308(r31) ffc0abb0: 55 2a 10 3a rlwinm r10,r9,2,0,29 * 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++ ) ffc0abb4: 39 29 00 01 addi r9,r9,1 the_thread->extensions[i] = NULL; ffc0abb8: 7c 08 51 2e stwx r0,r8,r10 * 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++ ) ffc0abbc: 7f 89 58 40 cmplw cr7,r9,r11 ffc0abc0: 40 9d ff ec ble+ cr7,ffc0abac <_Thread_Initialize+0xec> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0abc4: 80 01 00 38 lwz r0,56(r1) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); ffc0abc8: 3d 20 00 00 lis r9,0 } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0abcc: 3b 80 00 00 li r28,0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0abd0: 9b 5f 00 a0 stb r26,160(r31) ffc0abd4: 7f e3 fb 78 mr r3,r31 the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0abd8: 90 1f 00 a8 stw r0,168(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0abdc: 80 01 00 3c lwz r0,60(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; ffc0abe0: 92 ff 00 a4 stw r23,164(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0abe4: 90 1f 00 ac stw r0,172(r31) the_thread->current_state = STATES_DORMANT; ffc0abe8: 38 00 00 01 li r0,1 ffc0abec: 90 1f 00 10 stw r0,16(r31) ffc0abf0: 80 09 20 f8 lwz r0,8440(r9) the_thread->Wait.queue = NULL; ffc0abf4: 93 9f 00 44 stw r28,68(r31) ffc0abf8: 7c 09 03 a6 mtctr r0 the_thread->resource_count = 0; ffc0abfc: 93 9f 00 1c stw r28,28(r31) the_thread->real_priority = priority; ffc0ac00: 93 7f 00 18 stw r27,24(r31) the_thread->Start.initial_priority = priority; ffc0ac04: 93 7f 00 b0 stw r27,176(r31) ffc0ac08: 4e 80 04 21 bctrl sched =_Scheduler_Allocate( the_thread ); if ( !sched ) ffc0ac0c: 7c 7a 1b 79 mr. r26,r3 ffc0ac10: 41 82 00 4c beq- ffc0ac5c <_Thread_Initialize+0x19c> goto failed; _Thread_Set_priority( the_thread, priority ); ffc0ac14: 7f e3 fb 78 mr r3,r31 ffc0ac18: 7f 64 db 78 mr r4,r27 ffc0ac1c: 48 00 06 c5 bl ffc0b2e0 <_Thread_Set_priority> Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( ffc0ac20: a0 1f 00 0a lhz r0,10(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0ac24: 81 3e 00 1c lwz r9,28(r30) * 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 ); ffc0ac28: 7f e3 fb 78 mr r3,r31 ffc0ac2c: 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 ); ffc0ac30: 93 9f 00 84 stw r28,132(r31) ffc0ac34: 93 9f 00 88 stw r28,136(r31) ffc0ac38: 7f e9 01 2e stwx r31,r9,r0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0ac3c: 93 1f 00 0c stw r24,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 ); ffc0ac40: 48 00 0b 51 bl ffc0b790 <_User_extensions_Thread_create> if ( extension_status ) return true; ffc0ac44: 38 00 00 01 li r0,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 ) ffc0ac48: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ac4c: 41 be 00 10 beq+ cr7,ffc0ac5c <_Thread_Initialize+0x19c> ffc0ac50: 48 00 00 48 b ffc0ac98 <_Thread_Initialize+0x1d8> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0ac54: 3b a0 00 00 li r29,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; ffc0ac58: 3b 40 00 00 li r26,0 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); ffc0ac5c: 80 7f 01 28 lwz r3,296(r31) ffc0ac60: 48 00 10 01 bl ffc0bc60 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); ffc0ac64: 80 7f 01 2c lwz r3,300(r31) ffc0ac68: 48 00 0f f9 bl ffc0bc60 <_Workspace_Free> ffc0ac6c: 80 7f 01 30 lwz r3,304(r31) ffc0ac70: 48 00 0f f1 bl ffc0bc60 <_Workspace_Free> _Workspace_Free( extensions_area ); ffc0ac74: 7f a3 eb 78 mr r3,r29 ffc0ac78: 48 00 0f e9 bl ffc0bc60 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); ffc0ac7c: 7f 23 cb 78 mr r3,r25 ffc0ac80: 48 00 0f e1 bl ffc0bc60 <_Workspace_Free> #endif _Workspace_Free( sched ); ffc0ac84: 7f 43 d3 78 mr r3,r26 ffc0ac88: 48 00 0f d9 bl ffc0bc60 <_Workspace_Free> _Thread_Stack_Free( the_thread ); ffc0ac8c: 7f e3 fb 78 mr r3,r31 ffc0ac90: 48 00 07 a5 bl ffc0b434 <_Thread_Stack_Free> return false; ffc0ac94: 38 00 00 00 li r0,0 } ffc0ac98: 39 61 00 30 addi r11,r1,48 ffc0ac9c: 7c 03 03 78 mr r3,r0 ffc0aca0: 4b ff 58 84 b ffc00524 <_restgpr_23_x> =============================================================================== ffc0bc5c <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0bc5c: 94 21 ff e8 stwu r1,-24(r1) ffc0bc60: 7c 08 02 a6 mflr r0 ffc0bc64: 90 01 00 1c stw r0,28(r1) _Thread_Restart_self(); return true; } return false; ffc0bc68: 38 00 00 00 li r0,0 */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); ffc0bc6c: 81 23 00 10 lwz r9,16(r3) bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0bc70: bf c1 00 10 stmw r30,16(r1) ffc0bc74: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0bc78: 71 2b 00 01 andi. r11,r9,1 ffc0bc7c: 40 a2 00 70 bne+ ffc0bcec <_Thread_Restart+0x90> _Thread_Set_transient( the_thread ); ffc0bc80: 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 ); ffc0bc84: 3f c0 00 00 lis r30,0 ffc0bc88: 3b de 2d d8 addi r30,r30,11736 ffc0bc8c: 90 a1 00 0c stw r5,12(r1) ffc0bc90: 48 00 00 f5 bl ffc0bd84 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0bc94: 7f e3 fb 78 mr r3,r31 ffc0bc98: 80 81 00 08 lwz r4,8(r1) ffc0bc9c: 80 a1 00 0c lwz r5,12(r1) ffc0bca0: 48 00 31 d1 bl ffc0ee70 <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0bca4: 7f e3 fb 78 mr r3,r31 ffc0bca8: 48 00 2e 8d bl ffc0eb34 <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0bcac: 7f e3 fb 78 mr r3,r31 ffc0bcb0: 48 00 31 79 bl ffc0ee28 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); ffc0bcb4: 7f e3 fb 78 mr r3,r31 ffc0bcb8: 48 00 05 c1 bl ffc0c278 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) ffc0bcbc: 81 3e 00 0c lwz r9,12(r30) _Thread_Restart_self(); return true; ffc0bcc0: 38 00 00 01 li r0,1 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0bcc4: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0bcc8: 40 be 00 24 bne+ cr7,ffc0bcec <_Thread_Restart+0x90> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) ffc0bccc: 80 1f 01 24 lwz r0,292(r31) ffc0bcd0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bcd4: 41 9e 00 0c beq- cr7,ffc0bce0 <_Thread_Restart+0x84> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0bcd8: 38 7f 01 24 addi r3,r31,292 ffc0bcdc: 48 00 f3 c5 bl ffc1b0a0 <_CPU_Context_restore_fp> #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0bce0: 80 7e 00 0c lwz r3,12(r30) ffc0bce4: 38 63 00 c4 addi r3,r3,196 ffc0bce8: 48 00 f5 79 bl ffc1b260 <_CPU_Context_restore> return true; } return false; } ffc0bcec: 39 61 00 18 addi r11,r1,24 ffc0bcf0: 7c 03 03 78 mr r3,r0 ffc0bcf4: 4b ff 50 c0 b ffc00db4 <_restgpr_30_x> =============================================================================== ffc0e348 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { ffc0e348: 7c 08 02 a6 mflr r0 ffc0e34c: 94 21 ff f8 stwu r1,-8(r1) ffc0e350: 7c 64 1b 78 mr r4,r3 ffc0e354: 90 01 00 0c stw r0,12(r1) Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; ffc0e358: 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 && ffc0e35c: 80 03 00 30 lwz r0,48(r3) ffc0e360: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e364: 41 9e 00 30 beq- cr7,ffc0e394 <_Thread_queue_Process_timeout+0x4c> RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0e368: 3d 20 00 00 lis r9,0 ffc0e36c: 81 29 2d c4 lwz r9,11716(r9) ffc0e370: 7f 84 48 00 cmpw cr7,r4,r9 ffc0e374: 40 be 00 20 bne+ cr7,ffc0e394 <_Thread_queue_Process_timeout+0x4c><== NEVER TAKEN _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { ffc0e378: 2f 80 00 03 cmpwi cr7,r0,3 ffc0e37c: 41 9e 00 24 beq- cr7,ffc0e3a0 <_Thread_queue_Process_timeout+0x58> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ffc0e380: 80 03 00 3c lwz r0,60(r3) ffc0e384: 90 04 00 34 stw r0,52(r4) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc0e388: 38 00 00 02 li r0,2 ffc0e38c: 90 03 00 30 stw r0,48(r3) ffc0e390: 48 00 00 10 b ffc0e3a0 <_Thread_queue_Process_timeout+0x58> } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ffc0e394: 80 03 00 3c lwz r0,60(r3) ffc0e398: 90 04 00 34 stw r0,52(r4) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); ffc0e39c: 4b ff fe 85 bl ffc0e220 <_Thread_queue_Extract> } } ffc0e3a0: 80 01 00 0c lwz r0,12(r1) ffc0e3a4: 38 21 00 08 addi r1,r1,8 ffc0e3a8: 7c 08 03 a6 mtlr r0 ffc0e3ac: 4e 80 00 20 blr =============================================================================== ffc0b224 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0b224: 94 21 ff d8 stwu r1,-40(r1) ffc0b228: 7c 08 02 a6 mflr r0 ffc0b22c: bf a1 00 1c stmw r29,28(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0b230: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0b234: 7c 9e 23 78 mr r30,r4 ffc0b238: 90 01 00 2c stw r0,44(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0b23c: 41 82 00 54 beq- ffc0b290 <_Thread_queue_Requeue+0x6c> <== 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 ) { ffc0b240: 80 1f 00 34 lwz r0,52(r31) ffc0b244: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b248: 40 be 00 48 bne+ cr7,ffc0b290 <_Thread_queue_Requeue+0x6c><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0b24c: 7f a0 00 a6 mfmsr r29 ffc0b250: 7d 30 42 a6 mfsprg r9,0 ffc0b254: 7f a9 48 78 andc r9,r29,r9 ffc0b258: 7d 20 01 24 mtmsr r9 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 ) ) { ffc0b25c: 3d 60 00 03 lis r11,3 ffc0b260: 81 24 00 10 lwz r9,16(r4) ffc0b264: 61 6b be e0 ori r11,r11,48864 ffc0b268: 7d 6a 48 39 and. r10,r11,r9 ffc0b26c: 41 a2 00 20 beq+ ffc0b28c <_Thread_queue_Requeue+0x68> <== NEVER TAKEN 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; ffc0b270: 90 1f 00 30 stw r0,48(r31) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); ffc0b274: 38 a0 00 01 li r5,1 ffc0b278: 48 00 2f e1 bl ffc0e258 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0b27c: 7f e3 fb 78 mr r3,r31 ffc0b280: 7f c4 f3 78 mr r4,r30 ffc0b284: 38 a1 00 08 addi r5,r1,8 ffc0b288: 4b ff fd 19 bl ffc0afa0 <_Thread_queue_Enqueue_priority> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0b28c: 7f a0 01 24 mtmsr r29 } _ISR_Enable( level ); } } ffc0b290: 39 61 00 28 addi r11,r1,40 ffc0b294: 4b ff 52 a8 b ffc0053c <_restgpr_29_x> =============================================================================== ffc0b298 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0b298: 94 21 ff e8 stwu r1,-24(r1) ffc0b29c: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0b2a0: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0b2a4: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0b2a8: 4b ff f7 69 bl ffc0aa10 <_Thread_Get> switch ( location ) { ffc0b2ac: 80 01 00 08 lwz r0,8(r1) ffc0b2b0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b2b4: 40 9e 00 1c bne- cr7,ffc0b2d0 <_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 ); ffc0b2b8: 48 00 30 91 bl ffc0e348 <_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--; ffc0b2bc: 3d 20 00 00 lis r9,0 ffc0b2c0: 81 69 27 c8 lwz r11,10184(r9) ffc0b2c4: 38 0b ff ff addi r0,r11,-1 ffc0b2c8: 90 09 27 c8 stw r0,10184(r9) return _Thread_Dispatch_disable_level; ffc0b2cc: 80 09 27 c8 lwz r0,10184(r9) _Thread_Unnest_dispatch(); break; } } ffc0b2d0: 80 01 00 1c lwz r0,28(r1) ffc0b2d4: 38 21 00 18 addi r1,r1,24 ffc0b2d8: 7c 08 03 a6 mtlr r0 ffc0b2dc: 4e 80 00 20 blr =============================================================================== ffc18edc <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc18edc: 94 21 ff 98 stwu r1,-104(r1) ffc18ee0: 7c 08 02 a6 mflr r0 ffc18ee4: be 21 00 2c stmw r17,44(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc18ee8: 3a 21 00 14 addi r17,r1,20 ffc18eec: 3a 81 00 18 addi r20,r1,24 ffc18ef0: 90 01 00 6c stw r0,108(r1) ffc18ef4: 3b 61 00 0c addi r27,r1,12 head->previous = NULL; ffc18ef8: 38 00 00 00 li r0,0 tail->previous = head; ffc18efc: 3b 81 00 08 addi r28,r1,8 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc18f00: 92 81 00 14 stw r20,20(r1) ffc18f04: 7c 7f 1b 78 mr r31,r3 head->previous = NULL; ffc18f08: 90 01 00 18 stw r0,24(r1) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc18f0c: 3e 40 00 00 lis r18,0 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc18f10: 3b 43 00 30 addi r26,r3,48 tail->previous = head; ffc18f14: 92 21 00 1c stw r17,28(r1) static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc18f18: 3e 60 00 00 lis r19,0 /* * 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 ); ffc18f1c: 3b a3 00 68 addi r29,r3,104 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc18f20: 93 61 00 08 stw r27,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; ffc18f24: 3a a0 00 00 li r21,0 * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; ffc18f28: 3a c0 00 00 li r22,0 head->previous = NULL; ffc18f2c: 90 01 00 0c stw r0,12(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; ffc18f30: 3a e0 00 01 li r23,1 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc18f34: 3b 03 00 08 addi r24,r3,8 tail->previous = head; ffc18f38: 93 81 00 10 stw r28,16(r1) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc18f3c: 3b 23 00 40 addi r25,r3,64 { /* * 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; ffc18f40: 92 3f 00 78 stw r17,120(r31) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc18f44: 80 12 28 d0 lwz r0,10448(r18) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc18f48: 7f 85 e3 78 mr r5,r28 Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc18f4c: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc18f50: 7f 43 d3 78 mr r3,r26 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc18f54: 90 1f 00 3c stw r0,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc18f58: 7c 84 00 50 subf r4,r4,r0 ffc18f5c: 48 00 49 89 bl ffc1d8e4 <_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(); ffc18f60: 83 d3 28 b4 lwz r30,10420(r19) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc18f64: 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 ) { ffc18f68: 7f 9e 28 40 cmplw cr7,r30,r5 ffc18f6c: 40 bd 00 18 ble+ cr7,ffc18f84 <_Timer_server_Body+0xa8> /* * 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 ); ffc18f70: 7c 85 f0 50 subf r4,r5,r30 ffc18f74: 7f a3 eb 78 mr r3,r29 ffc18f78: 7f 85 e3 78 mr r5,r28 ffc18f7c: 48 00 49 69 bl ffc1d8e4 <_Watchdog_Adjust_to_chain> ffc18f80: 48 00 00 18 b ffc18f98 <_Timer_server_Body+0xbc> } else if ( snapshot < last_snapshot ) { ffc18f84: 40 bc 00 14 bge+ cr7,ffc18f98 <_Timer_server_Body+0xbc> /* * 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 ); ffc18f88: 7f a3 eb 78 mr r3,r29 ffc18f8c: 38 80 00 01 li r4,1 ffc18f90: 7c be 28 50 subf r5,r30,r5 ffc18f94: 48 00 48 99 bl ffc1d82c <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; ffc18f98: 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 ); ffc18f9c: 80 7f 00 78 lwz r3,120(r31) ffc18fa0: 48 00 0b 7d bl ffc19b1c <_Chain_Get> if ( timer == NULL ) { ffc18fa4: 7c 7e 1b 79 mr. r30,r3 ffc18fa8: 41 82 00 2c beq- ffc18fd4 <_Timer_server_Body+0xf8> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc18fac: 80 1e 00 38 lwz r0,56(r30) _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc18fb0: 7f 43 d3 78 mr r3,r26 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc18fb4: 2f 80 00 01 cmpwi cr7,r0,1 ffc18fb8: 41 9e 00 10 beq- cr7,ffc18fc8 <_Timer_server_Body+0xec> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc18fbc: 2f 80 00 03 cmpwi cr7,r0,3 ffc18fc0: 40 9e ff dc bne+ cr7,ffc18f9c <_Timer_server_Body+0xc0> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc18fc4: 7f a3 eb 78 mr r3,r29 ffc18fc8: 38 9e 00 10 addi r4,r30,16 ffc18fcc: 48 00 49 c9 bl ffc1d994 <_Watchdog_Insert> ffc18fd0: 4b ff ff cc b ffc18f9c <_Timer_server_Body+0xc0> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); ffc18fd4: 4b ff fe 1d bl ffc18df0 if ( _Chain_Is_empty( insert_chain ) ) { ffc18fd8: 80 01 00 14 lwz r0,20(r1) ffc18fdc: 7f 80 a0 00 cmpw cr7,r0,r20 ffc18fe0: 40 be 00 1c bne+ cr7,ffc18ffc <_Timer_server_Body+0x120><== NEVER TAKEN ts->insert_chain = NULL; ffc18fe4: 93 df 00 78 stw r30,120(r31) ffc18fe8: 7c 60 01 24 mtmsr r3 _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 ) ) { ffc18fec: 80 01 00 08 lwz r0,8(r1) ffc18ff0: 7f 80 d8 00 cmpw cr7,r0,r27 ffc18ff4: 40 be 00 10 bne+ cr7,ffc19004 <_Timer_server_Body+0x128> ffc18ff8: 48 00 00 50 b ffc19048 <_Timer_server_Body+0x16c> ffc18ffc: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED ffc19000: 4b ff ff 44 b ffc18f44 <_Timer_server_Body+0x68> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); ffc19004: 4b ff fd ed bl ffc18df0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc19008: 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)) ffc1900c: 7f 89 d8 00 cmpw cr7,r9,r27 ffc19010: 41 9e 00 30 beq- cr7,ffc19040 <_Timer_server_Body+0x164> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; ffc19014: 81 69 00 00 lwz r11,0(r9) head->next = new_first; new_first->previous = head; ffc19018: 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; ffc1901c: 91 61 00 08 stw r11,8(r1) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; ffc19020: 92 a9 00 08 stw r21,8(r9) ffc19024: 7c 60 01 24 mtmsr r3 /* * 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 ); ffc19028: 80 09 00 1c lwz r0,28(r9) ffc1902c: 80 69 00 20 lwz r3,32(r9) ffc19030: 80 89 00 24 lwz r4,36(r9) ffc19034: 7c 09 03 a6 mtctr r0 ffc19038: 4e 80 04 21 bctrl } ffc1903c: 4b ff ff c8 b ffc19004 <_Timer_server_Body+0x128> ffc19040: 7c 60 01 24 mtmsr r3 ffc19044: 4b ff fe fc b ffc18f40 <_Timer_server_Body+0x64> } else { ts->active = false; ffc19048: 9a df 00 7c stb r22,124(r31) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); ffc1904c: 4b ff fd b9 bl ffc18e04 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); ffc19050: 80 7f 00 00 lwz r3,0(r31) ffc19054: 38 80 00 08 li r4,8 ffc19058: 48 00 40 f9 bl ffc1d150 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1905c: 7f e3 fb 78 mr r3,r31 ffc19060: 4b ff fd bd bl ffc18e1c <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); ffc19064: 7f e3 fb 78 mr r3,r31 ffc19068: 4b ff fe 15 bl ffc18e7c <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); ffc1906c: 48 00 37 0d bl ffc1c778 <_Thread_Enable_dispatch> ts->active = true; ffc19070: 9a ff 00 7c stb r23,124(r31) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc19074: 7f 03 c3 78 mr r3,r24 ffc19078: 48 00 4a 75 bl ffc1daec <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1907c: 7f 23 cb 78 mr r3,r25 ffc19080: 48 00 4a 6d bl ffc1daec <_Watchdog_Remove> ffc19084: 4b ff fe bc b ffc18f40 <_Timer_server_Body+0x64> =============================================================================== ffc19088 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc19088: 94 21 ff f0 stwu r1,-16(r1) ffc1908c: 7c 08 02 a6 mflr r0 ffc19090: 90 01 00 14 stw r0,20(r1) if ( ts->insert_chain == NULL ) { ffc19094: 80 03 00 78 lwz r0,120(r3) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc19098: bf c1 00 08 stmw r30,8(r1) ffc1909c: 7c 7f 1b 78 mr r31,r3 if ( ts->insert_chain == NULL ) { ffc190a0: 2f 80 00 00 cmpwi cr7,r0,0 static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc190a4: 7c 9e 23 78 mr r30,r4 if ( ts->insert_chain == NULL ) { ffc190a8: 40 be 01 00 bne+ cr7,ffc191a8 <_Timer_server_Schedule_operation_method+0x120> * is the reference point for the delta chain. Thus if we do not update the * reference point we have to add DT to the initial delta of the watchdog * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); ffc190ac: 4b ff fd 59 bl ffc18e04 <_Thread_Disable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc190b0: 80 1e 00 38 lwz r0,56(r30) ffc190b4: 2f 80 00 01 cmpwi cr7,r0,1 ffc190b8: 40 be 00 6c bne+ cr7,ffc19124 <_Timer_server_Schedule_operation_method+0x9c> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); ffc190bc: 4b ff fd 35 bl ffc18df0 snapshot = _Watchdog_Ticks_since_boot; ffc190c0: 3d 20 00 00 lis r9,0 ffc190c4: 80 09 28 d0 lwz r0,10448(r9) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc190c8: 39 7f 00 34 addi r11,r31,52 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc190cc: 81 3f 00 30 lwz r9,48(r31) last_snapshot = ts->Interval_watchdogs.last_snapshot; ffc190d0: 81 5f 00 3c lwz r10,60(r31) if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc190d4: 7f 89 58 00 cmpw cr7,r9,r11 ffc190d8: 41 9e 00 20 beq- cr7,ffc190f8 <_Timer_server_Schedule_operation_method+0x70> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; ffc190dc: 81 09 00 10 lwz r8,16(r9) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; ffc190e0: 7d 4a 00 50 subf r10,r10,r0 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; ffc190e4: 39 60 00 00 li r11,0 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { ffc190e8: 7f 88 50 40 cmplw cr7,r8,r10 ffc190ec: 40 9d 00 08 ble- cr7,ffc190f4 <_Timer_server_Schedule_operation_method+0x6c> delta_interval -= delta; ffc190f0: 7d 6a 40 50 subf r11,r10,r8 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; ffc190f4: 91 69 00 10 stw r11,16(r9) } ts->Interval_watchdogs.last_snapshot = snapshot; ffc190f8: 90 1f 00 3c stw r0,60(r31) ffc190fc: 7c 60 01 24 mtmsr r3 _ISR_Enable( level ); _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc19100: 38 7f 00 30 addi r3,r31,48 ffc19104: 38 9e 00 10 addi r4,r30,16 ffc19108: 48 00 48 8d bl ffc1d994 <_Watchdog_Insert> if ( !ts->active ) { ffc1910c: 88 1f 00 7c lbz r0,124(r31) ffc19110: 2f 80 00 00 cmpwi cr7,r0,0 ffc19114: 40 be 00 8c bne+ cr7,ffc191a0 <_Timer_server_Schedule_operation_method+0x118> _Timer_server_Reset_interval_system_watchdog( ts ); ffc19118: 7f e3 fb 78 mr r3,r31 ffc1911c: 4b ff fd 01 bl ffc18e1c <_Timer_server_Reset_interval_system_watchdog> ffc19120: 48 00 00 80 b ffc191a0 <_Timer_server_Schedule_operation_method+0x118> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc19124: 2f 80 00 03 cmpwi cr7,r0,3 ffc19128: 40 be 00 78 bne+ cr7,ffc191a0 <_Timer_server_Schedule_operation_method+0x118> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); ffc1912c: 4b ff fc c5 bl ffc18df0 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc19130: 3d 20 00 00 lis r9,0 last_snapshot = ts->TOD_watchdogs.last_snapshot; ffc19134: 81 1f 00 74 lwz r8,116(r31) /* * 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(); ffc19138: 80 09 28 b4 lwz r0,10420(r9) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc1913c: 39 7f 00 6c addi r11,r31,108 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc19140: 81 3f 00 68 lwz r9,104(r31) last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc19144: 7f 89 58 00 cmpw cr7,r9,r11 ffc19148: 41 9e 00 30 beq- cr7,ffc19178 <_Timer_server_Schedule_operation_method+0xf0> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc1914c: 7f 80 40 40 cmplw cr7,r0,r8 _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; ffc19150: 81 49 00 10 lwz r10,16(r9) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; ffc19154: 7d 6a 42 14 add r11,r10,r8 delta_interval += delta; ffc19158: 7d 60 58 50 subf r11,r0,r11 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 ) { ffc1915c: 40 9d 00 18 ble- cr7,ffc19174 <_Timer_server_Schedule_operation_method+0xec> /* * We advanced in time. */ delta = snapshot - last_snapshot; ffc19160: 7d 08 00 50 subf r8,r8,r0 if (delta_interval > delta) { ffc19164: 7f 8a 40 40 cmplw cr7,r10,r8 delta_interval -= delta; } else { delta_interval = 0; ffc19168: 39 60 00 00 li r11,0 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { ffc1916c: 40 9d 00 08 ble- cr7,ffc19174 <_Timer_server_Schedule_operation_method+0xec><== NEVER TAKEN delta_interval -= delta; ffc19170: 7d 68 50 50 subf r11,r8,r10 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; ffc19174: 91 69 00 10 stw r11,16(r9) } ts->TOD_watchdogs.last_snapshot = snapshot; ffc19178: 90 1f 00 74 stw r0,116(r31) ffc1917c: 7c 60 01 24 mtmsr r3 _ISR_Enable( level ); _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc19180: 38 7f 00 68 addi r3,r31,104 ffc19184: 38 9e 00 10 addi r4,r30,16 ffc19188: 48 00 48 0d bl ffc1d994 <_Watchdog_Insert> if ( !ts->active ) { ffc1918c: 88 1f 00 7c lbz r0,124(r31) ffc19190: 2f 80 00 00 cmpwi cr7,r0,0 ffc19194: 40 be 00 0c bne+ cr7,ffc191a0 <_Timer_server_Schedule_operation_method+0x118> _Timer_server_Reset_tod_system_watchdog( ts ); ffc19198: 7f e3 fb 78 mr r3,r31 ffc1919c: 4b ff fc e1 bl ffc18e7c <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); ffc191a0: 48 00 35 d9 bl ffc1c778 <_Thread_Enable_dispatch> ffc191a4: 48 00 00 0c b ffc191b0 <_Timer_server_Schedule_operation_method+0x128> * 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 ); ffc191a8: 80 63 00 78 lwz r3,120(r3) ffc191ac: 48 00 09 19 bl ffc19ac4 <_Chain_Append> } } ffc191b0: 39 61 00 10 addi r11,r1,16 ffc191b4: 4b ff 4f e8 b ffc0e19c <_restgpr_30_x> =============================================================================== ffc0b5d8 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { ffc0b5d8: 94 21 ff e8 stwu r1,-24(r1) ffc0b5dc: 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; ffc0b5e0: 3d 20 00 00 lis r9,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0b5e4: 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; ffc0b5e8: 39 29 20 04 addi r9,r9,8196 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0b5ec: 3d 60 00 00 lis r11,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0b5f0: bf 81 00 08 stmw r28,8(r1) 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; ffc0b5f4: 83 a9 00 3c lwz r29,60(r9) 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; ffc0b5f8: 83 c9 00 38 lwz r30,56(r9) ffc0b5fc: 39 2b 2d 74 addi r9,r11,11636 initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0b600: 2f 9d 00 00 cmpwi cr7,r29,0 head->previous = NULL; tail->previous = head; ffc0b604: 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; ffc0b608: 38 09 00 04 addi r0,r9,4 ffc0b60c: 90 0b 2d 74 stw r0,11636(r11) head->previous = NULL; ffc0b610: 38 00 00 00 li r0,0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0b614: 3d 60 00 00 lis r11,0 head->previous = NULL; ffc0b618: 90 09 00 04 stw r0,4(r9) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0b61c: 39 2b 2c 50 addi r9,r11,11344 ffc0b620: 39 49 00 04 addi r10,r9,4 ffc0b624: 91 4b 2c 50 stw r10,11344(r11) head->previous = NULL; ffc0b628: 90 09 00 04 stw r0,4(r9) tail->previous = head; ffc0b62c: 91 29 00 08 stw r9,8(r9) ffc0b630: 41 9e 00 54 beq- cr7,ffc0b684 <_User_extensions_Handler_initialization+0xac><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ffc0b634: 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 *) ffc0b638: 7f 83 e3 78 mr r3,r28 ffc0b63c: 48 00 06 51 bl ffc0bc8c <_Workspace_Allocate_or_fatal_error> _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0b640: 7f 85 e3 78 mr r5,r28 ffc0b644: 38 80 00 00 li r4,0 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) ffc0b648: 7c 7f 1b 78 mr r31,r3 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0b64c: 48 00 54 59 bl ffc10aa4 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0b650: 3b 80 00 00 li r28,0 ffc0b654: 48 00 00 28 b ffc0b67c <_User_extensions_Handler_initialization+0xa4> #include #include #include #include void _User_extensions_Handler_initialization(void) ffc0b658: 57 83 28 34 rlwinm r3,r28,5,0,26 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0b65c: 38 9f 00 14 addi r4,r31,20 ffc0b660: 7c 7d 1a 14 add r3,r29,r3 ffc0b664: 7c a3 04 aa lswi r5,r3,32 ffc0b668: 7c a4 05 aa stswi r5,r4,32 _User_extensions_Add_set( extension ); ffc0b66c: 7f e3 fb 78 mr r3,r31 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0b670: 3b 9c 00 01 addi r28,r28,1 ffc0b674: 48 00 2d 85 bl ffc0e3f8 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; ffc0b678: 3b ff 00 34 addi r31,r31,52 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0b67c: 7f 9c f0 00 cmpw cr7,r28,r30 ffc0b680: 40 9e ff d8 bne+ cr7,ffc0b658 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } ffc0b684: 39 61 00 18 addi r11,r1,24 ffc0b688: 4b ff 4e b0 b ffc00538 <_restgpr_28_x> =============================================================================== ffc0d328 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0d328: 94 21 ff e8 stwu r1,-24(r1) ffc0d32c: 7c 08 02 a6 mflr r0 ffc0d330: 90 01 00 1c stw r0,28(r1) ffc0d334: bf 81 00 08 stmw r28,8(r1) ffc0d338: 7c 7f 1b 78 mr r31,r3 ffc0d33c: 7c be 2b 78 mr r30,r5 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d340: 7c 00 00 a6 mfmsr r0 ffc0d344: 7d 30 42 a6 mfsprg r9,0 ffc0d348: 7c 09 48 78 andc r9,r0,r9 ffc0d34c: 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; ffc0d350: 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 ); ffc0d354: 3b a3 00 04 addi r29,r3,4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { ffc0d358: 7f 89 e8 00 cmpw cr7,r9,r29 ffc0d35c: 41 9e 00 78 beq- cr7,ffc0d3d4 <_Watchdog_Adjust+0xac> switch ( direction ) { ffc0d360: 2f 84 00 00 cmpwi cr7,r4,0 if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0d364: 3b 80 00 01 li r28,1 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0d368: 41 9e 00 64 beq- cr7,ffc0d3cc <_Watchdog_Adjust+0xa4> ffc0d36c: 2f 84 00 01 cmpwi cr7,r4,1 ffc0d370: 40 be 00 64 bne+ cr7,ffc0d3d4 <_Watchdog_Adjust+0xac> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0d374: 81 69 00 10 lwz r11,16(r9) ffc0d378: 7f cb 2a 14 add r30,r11,r5 ffc0d37c: 48 00 00 18 b ffc0d394 <_Watchdog_Adjust+0x6c> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0d380: 81 3f 00 00 lwz r9,0(r31) break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { ffc0d384: 81 69 00 10 lwz r11,16(r9) ffc0d388: 7f 9e 58 40 cmplw cr7,r30,r11 ffc0d38c: 40 bc 00 10 bge+ cr7,ffc0d39c <_Watchdog_Adjust+0x74> _Watchdog_First( header )->delta_interval -= units; ffc0d390: 7f de 58 50 subf r30,r30,r11 ffc0d394: 93 c9 00 10 stw r30,16(r9) break; ffc0d398: 48 00 00 3c b ffc0d3d4 <_Watchdog_Adjust+0xac> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0d39c: 93 89 00 10 stw r28,16(r9) while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; ffc0d3a0: 7f cb f0 50 subf r30,r11,r30 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d3a4: 7c 00 01 24 mtmsr r0 _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0d3a8: 7f e3 fb 78 mr r3,r31 ffc0d3ac: 48 00 02 35 bl ffc0d5e0 <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d3b0: 7c 00 00 a6 mfmsr r0 ffc0d3b4: 7d 30 42 a6 mfsprg r9,0 ffc0d3b8: 7c 09 48 78 andc r9,r0,r9 ffc0d3bc: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0d3c0: 81 3f 00 00 lwz r9,0(r31) ffc0d3c4: 7f 89 e8 00 cmpw cr7,r9,r29 ffc0d3c8: 41 9e 00 0c beq- cr7,ffc0d3d4 <_Watchdog_Adjust+0xac> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0d3cc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0d3d0: 40 9e ff b0 bne+ cr7,ffc0d380 <_Watchdog_Adjust+0x58> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d3d4: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0d3d8: 39 61 00 18 addi r11,r1,24 ffc0d3dc: 4b ff 3f 64 b ffc01340 <_restgpr_28_x> =============================================================================== ffc0ba6c <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { ffc0ba6c: 7c 69 1b 78 mr r9,r3 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0ba70: 7c 00 00 a6 mfmsr r0 ffc0ba74: 7d 70 42 a6 mfsprg r11,0 ffc0ba78: 7c 0b 58 78 andc r11,r0,r11 ffc0ba7c: 7d 60 01 24 mtmsr r11 ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; ffc0ba80: 80 63 00 08 lwz r3,8(r3) switch ( previous_state ) { ffc0ba84: 2f 83 00 01 cmpwi cr7,r3,1 ffc0ba88: 41 9e 00 18 beq- cr7,ffc0baa0 <_Watchdog_Remove+0x34> ffc0ba8c: 2b 83 00 01 cmplwi cr7,r3,1 ffc0ba90: 41 9c 00 70 blt- cr7,ffc0bb00 <_Watchdog_Remove+0x94> ffc0ba94: 2b 83 00 03 cmplwi cr7,r3,3 ffc0ba98: 41 9d 00 68 bgt- cr7,ffc0bb00 <_Watchdog_Remove+0x94> <== NEVER TAKEN ffc0ba9c: 48 00 00 10 b ffc0baac <_Watchdog_Remove+0x40> /* * 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; ffc0baa0: 39 60 00 00 li r11,0 ffc0baa4: 91 69 00 08 stw r11,8(r9) break; ffc0baa8: 48 00 00 58 b ffc0bb00 <_Watchdog_Remove+0x94> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0baac: 39 60 00 00 li r11,0 ffc0bab0: 91 69 00 08 stw r11,8(r9) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } ffc0bab4: 81 69 00 00 lwz r11,0(r9) case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0bab8: 81 4b 00 00 lwz r10,0(r11) ffc0babc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0bac0: 41 9e 00 14 beq- cr7,ffc0bad4 <_Watchdog_Remove+0x68> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0bac4: 81 0b 00 10 lwz r8,16(r11) ffc0bac8: 81 49 00 10 lwz r10,16(r9) ffc0bacc: 7d 48 52 14 add r10,r8,r10 ffc0bad0: 91 4b 00 10 stw r10,16(r11) if ( _Watchdog_Sync_count ) ffc0bad4: 3d 40 00 00 lis r10,0 ffc0bad8: 81 4a 27 f8 lwz r10,10232(r10) ffc0badc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0bae0: 41 9e 00 14 beq- cr7,ffc0baf4 <_Watchdog_Remove+0x88> _Watchdog_Sync_level = _ISR_Nest_level; ffc0bae4: 3d 40 00 00 lis r10,0 ffc0bae8: 81 0a 2d c0 lwz r8,11712(r10) ffc0baec: 3d 40 00 00 lis r10,0 ffc0baf0: 91 0a 27 f0 stw r8,10224(r10) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0baf4: 81 49 00 04 lwz r10,4(r9) next->previous = previous; ffc0baf8: 91 4b 00 04 stw r10,4(r11) previous->next = next; ffc0bafc: 91 6a 00 00 stw r11,0(r10) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0bb00: 3d 60 00 00 lis r11,0 ffc0bb04: 81 6b 27 fc lwz r11,10236(r11) ffc0bb08: 91 69 00 18 stw r11,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0bb0c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); return( previous_state ); } ffc0bb10: 4e 80 00 20 blr =============================================================================== ffc1a924 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } ffc1a924: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc1a928: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc14bd4 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { ffc14bd4: 94 21 ff c8 stwu r1,-56(r1) ffc14bd8: 7c 08 02 a6 mflr r0 ffc14bdc: 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; ffc14be0: 38 00 00 00 li r0,0 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { ffc14be4: bf 01 00 18 stmw r24,24(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; ffc14be8: 7c 3b 0b 78 mr r27,r1 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { ffc14bec: 7c df 33 78 mr r31,r6 ffc14bf0: 7c f9 3b 78 mr r25,r7 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ffc14bf4: 83 43 00 34 lwz r26,52(r3) ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; ffc14bf8: 94 1b 00 08 stwu r0,8(r27) { 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; ffc14bfc: 7c bc 2b 78 mr r28,r5 ) { int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; ffc14c00: 7c 9d 23 78 mr r29,r4 void *buff ) { int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; ffc14c04: 3b c0 00 00 li r30,0 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) ffc14c08: 48 00 00 5c b ffc14c64 <_fat_block_read+0x90> { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); ffc14c0c: 7f 43 d3 78 mr r3,r26 ffc14c10: 7f a4 eb 78 mr r4,r29 ffc14c14: 38 a0 00 01 li r5,1 ffc14c18: 7f 66 db 78 mr r6,r27 ffc14c1c: 4b ff fc 81 bl ffc1489c if (rc != RC_OK) ffc14c20: 2f 83 00 00 cmpwi cr7,r3,0 ffc14c24: 40 9e 00 4c bne- cr7,ffc14c70 <_fat_block_read+0x9c> <== NEVER TAKEN return -1; c = MIN(count, (fs_info->vol.bps - ofs)); ffc14c28: a3 1a 00 00 lhz r24,0(r26) ffc14c2c: 7f 1c c0 50 subf r24,r28,r24 ffc14c30: 7f 98 f8 40 cmplw cr7,r24,r31 ffc14c34: 40 9d 00 08 ble- cr7,ffc14c3c <_fat_block_read+0x68> ffc14c38: 7f f8 fb 78 mr r24,r31 memcpy((buff + cmpltd), (block->buffer + ofs), c); ffc14c3c: 81 21 00 08 lwz r9,8(r1) ffc14c40: 7c 79 f2 14 add r3,r25,r30 ffc14c44: 7f 05 c3 78 mr r5,r24 ffc14c48: 80 89 00 24 lwz r4,36(r9) count -= c; ffc14c4c: 7f f8 f8 50 subf r31,r24,r31 cmpltd += c; ffc14c50: 7f d8 f2 14 add r30,r24,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); ffc14c54: 7c 84 e2 14 add r4,r4,r28 ffc14c58: 48 00 94 85 bl ffc1e0dc count -= c; cmpltd += c; blk++; ffc14c5c: 3b bd 00 01 addi r29,r29,1 ofs = 0; ffc14c60: 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) ffc14c64: 2f 9f 00 00 cmpwi cr7,r31,0 ffc14c68: 40 9e ff a4 bne+ cr7,ffc14c0c <_fat_block_read+0x38> ffc14c6c: 48 00 00 08 b ffc14c74 <_fat_block_read+0xa0> { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; ffc14c70: 3b c0 ff ff li r30,-1 <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } ffc14c74: 39 61 00 38 addi r11,r1,56 ffc14c78: 7f c3 f3 78 mr r3,r30 ffc14c7c: 4b fe de 60 b ffc02adc <_restgpr_24_x> =============================================================================== ffc14d40 <_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); ffc14d40: 80 63 00 34 lwz r3,52(r3) <== NOT EXECUTED ffc14d44: 4b ff fd 3c b ffc14a80 <== NOT EXECUTED =============================================================================== ffc14c80 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { ffc14c80: 94 21 ff c0 stwu r1,-64(r1) ffc14c84: 7c 08 02 a6 mflr r0 ffc14c88: 90 01 00 44 stw r0,68(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; ffc14c8c: 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) { ffc14c90: be e1 00 1c stmw r23,28(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; ffc14c94: 7c 3b 0b 78 mr r27,r1 rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { ffc14c98: 7c df 33 78 mr r31,r6 ffc14c9c: 7c f7 3b 78 mr r23,r7 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc14ca0: 83 43 00 34 lwz r26,52(r3) ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; ffc14ca4: 94 1b 00 08 stwu r0,8(r27) { 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; ffc14ca8: 7c b9 2b 78 mr r25,r5 const void *buff) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; ffc14cac: 7c 9c 23 78 mr r28,r4 uint32_t count, const void *buff) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; ffc14cb0: 3b a0 00 00 li r29,0 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; ffc14cb4: 3b 00 00 01 li r24,1 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) ffc14cb8: 48 00 00 6c b ffc14d24 <_fat_block_write+0xa4> { c = MIN(count, (fs_info->vol.bps - ofs)); ffc14cbc: a0 1a 00 00 lhz r0,0(r26) ffc14cc0: 7f d9 00 50 subf r30,r25,r0 ffc14cc4: 7f 9e f8 40 cmplw cr7,r30,r31 ffc14cc8: 40 9d 00 08 ble- cr7,ffc14cd0 <_fat_block_write+0x50> ffc14ccc: 7f fe fb 78 mr r30,r31 if (c == fs_info->vol.bps) ffc14cd0: 7f 9e 00 00 cmpw cr7,r30,r0 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); ffc14cd4: 7f 43 d3 78 mr r3,r26 ffc14cd8: 7f 84 e3 78 mr r4,r28 ffc14cdc: 38 a0 00 02 li r5,2 while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) ffc14ce0: 41 9e 00 08 beq- cr7,ffc14ce8 <_fat_block_write+0x68> 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); ffc14ce4: 38 a0 00 01 li r5,1 ffc14ce8: 7f 66 db 78 mr r6,r27 ffc14cec: 4b ff fb b1 bl ffc1489c if (rc != RC_OK) ffc14cf0: 2f 83 00 00 cmpwi cr7,r3,0 ffc14cf4: 40 9e 00 3c bne- cr7,ffc14d30 <_fat_block_write+0xb0> <== NEVER TAKEN return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); ffc14cf8: 81 21 00 08 lwz r9,8(r1) ffc14cfc: 7c 97 ea 14 add r4,r23,r29 ffc14d00: 7f c5 f3 78 mr r5,r30 ffc14d04: 80 69 00 24 lwz r3,36(r9) fat_buf_mark_modified(fs_info); count -= c; ffc14d08: 7f fe f8 50 subf r31,r30,r31 cmpltd +=c; ffc14d0c: 7f be ea 14 add r29,r30,r29 else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); ffc14d10: 7c 63 ca 14 add r3,r3,r25 ffc14d14: 48 00 93 c9 bl ffc1e0dc ffc14d18: 9b 1a 00 84 stb r24,132(r26) fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ffc14d1c: 3b 9c 00 01 addi r28,r28,1 ofs = 0; ffc14d20: 3b 20 00 00 li r25,0 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) ffc14d24: 2f 9f 00 00 cmpwi cr7,r31,0 ffc14d28: 40 9e ff 94 bne+ cr7,ffc14cbc <_fat_block_write+0x3c> ffc14d2c: 48 00 00 08 b ffc14d34 <_fat_block_write+0xb4> 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) return -1; ffc14d30: 3b a0 ff ff li r29,-1 <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } ffc14d34: 39 61 00 40 addi r11,r1,64 ffc14d38: 7f a3 eb 78 mr r3,r29 ffc14d3c: 4b fe dd 9c b ffc02ad8 <_restgpr_23_x> =============================================================================== ffc04a88 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); ffc04a88: 4b ff ff 88 b ffc04a10 <== NOT EXECUTED =============================================================================== ffc13c28 <_hash_search>: rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { ffc13c28: 94 21 ff d8 stwu r1,-40(r1) ffc13c2c: 7c 08 02 a6 mflr r0 ffc13c30: 7d 80 00 26 mfcr r12 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) ) ffc13c34: 2e 06 00 00 cmpwi cr4,r6,0 rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { ffc13c38: 90 01 00 2c stw r0,44(r1) uint32_t mod = (key1) % FAT_HASH_MODULE; ffc13c3c: 54 a0 07 fe clrlwi r0,r5,31 rtems_chain_node *the_node = rtems_chain_first(hash + mod); ffc13c40: 1c 00 00 0c mulli r0,r0,12 rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { ffc13c44: bf 41 00 10 stmw r26,16(r1) uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); ffc13c48: 7f 64 02 14 add r27,r4,r0 rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { ffc13c4c: 91 81 00 0c stw r12,12(r1) ffc13c50: 7c 7f 1b 78 mr r31,r3 ffc13c54: 7c be 2b 78 mr r30,r5 ffc13c58: 7c fc 3b 78 mr r28,r7 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc13c5c: 7f a4 00 2e lwzx r29,r4,r0 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc13c60: 3b 7b 00 04 addi r27,r27,4 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) ) ffc13c64: 7c da 33 78 mr r26,r6 ) { 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) ; ) ffc13c68: 48 00 00 38 b ffc13ca0 <_hash_search+0x78> { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); ffc13c6c: 7f e3 fb 78 mr r3,r31 ffc13c70: 38 9d 00 20 addi r4,r29,32 ffc13c74: 4b ff ff 5d bl ffc13bd0 if ( (key1) == ck) ffc13c78: 7f 9e 18 00 cmpw cr7,r30,r3 ffc13c7c: 40 be 00 20 bne+ cr7,ffc13c9c <_hash_search+0x74> { if ( ((key2) == 0) || ((key2) == ffd->ino) ) ffc13c80: 41 92 00 10 beq- cr4,ffc13c90 <_hash_search+0x68> <== ALWAYS TAKEN ffc13c84: 80 1d 00 0c lwz r0,12(r29) <== NOT EXECUTED ffc13c88: 7f 9a 00 00 cmpw cr7,r26,r0 <== NOT EXECUTED ffc13c8c: 40 be 00 10 bne+ cr7,ffc13c9c <_hash_search+0x74> <== NOT EXECUTED { *ret = (void *)the_node; ffc13c90: 93 bc 00 00 stw r29,0(r28) return 0; ffc13c94: 38 60 00 00 li r3,0 ffc13c98: 48 00 00 14 b ffc13cac <_hash_search+0x84> } } the_node = the_node->next; ffc13c9c: 83 bd 00 00 lwz r29,0(r29) ) { 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) ; ) ffc13ca0: 7f 9d d8 00 cmpw cr7,r29,r27 ffc13ca4: 40 9e ff c8 bne+ cr7,ffc13c6c <_hash_search+0x44> return 0; } } the_node = the_node->next; } return -1; ffc13ca8: 38 60 ff ff li r3,-1 } ffc13cac: 81 81 00 0c lwz r12,12(r1) ffc13cb0: 39 61 00 28 addi r11,r1,40 ffc13cb4: 7d 80 81 20 mtcrf 8,r12 ffc13cb8: 4b fe ee 2c b ffc02ae4 <_restgpr_26_x> =============================================================================== ffc213c0 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc213c0: 94 21 ff 90 stwu r1,-112(r1) ffc213c4: 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 ); ffc213c8: 7c 83 23 78 mr r3,r4 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc213cc: bf 41 00 58 stmw r26,88(r1) ffc213d0: 7c 9d 23 78 mr r29,r4 ffc213d4: 7c bb 2b 78 mr r27,r5 ffc213d8: 90 01 00 74 stw r0,116(r1) /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); ffc213dc: 4b fe 56 f5 bl ffc06ad0 if ( old_parent_pathlen == 0 ) ffc213e0: 7c 7a 1b 79 mr. r26,r3 rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc213e4: 7f a3 eb 78 mr r3,r29 * 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 ) ffc213e8: 40 82 00 18 bne- ffc21400 <_rename_r+0x40> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc213ec: 38 81 00 0c addi r4,r1,12 ffc213f0: 38 a1 00 24 addi r5,r1,36 ffc213f4: 4b fe 70 19 bl ffc0840c 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; ffc213f8: 3b c0 00 00 li r30,0 ffc213fc: 48 00 00 28 b ffc21424 <_rename_r+0x64> 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, ffc21400: 7f 44 d3 78 mr r4,r26 ffc21404: 38 a0 00 02 li r5,2 ffc21408: 38 c1 00 24 addi r6,r1,36 ffc2140c: 38 e0 00 00 li r7,0 ffc21410: 4b fe 56 65 bl ffc06a74 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) return -1; ffc21414: 3b 80 ff ff li r28,-1 else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) ffc21418: 2f 83 00 00 cmpwi cr7,r3,0 ffc2141c: 40 9e 01 5c bne- cr7,ffc21578 <_rename_r+0x1b8> <== NEVER TAKEN return -1; free_old_parentloc = true; ffc21420: 3b c0 00 01 li r30,1 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; ffc21424: 3b 81 00 38 addi r28,r1,56 ffc21428: 3b e1 00 24 addi r31,r1,36 ffc2142c: 7c bf a4 aa lswi r5,r31,20 ffc21430: 7c bc a5 aa stswi r5,r28,20 name = old + old_parent_pathlen; ffc21434: 7f bd d2 14 add r29,r29,r26 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc21438: 7f a3 eb 78 mr r3,r29 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; ffc2143c: 93 a1 00 08 stw r29,8(r1) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc21440: 4b ff 2a f1 bl ffc13f30 ffc21444: 7c 64 1b 78 mr r4,r3 ffc21448: 7f a3 eb 78 mr r3,r29 ffc2144c: 4b fe 56 cd bl ffc06b18 ffc21450: 7f bd 1a 14 add r29,r29,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc21454: 7f a3 eb 78 mr r3,r29 * 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 ) ); ffc21458: 93 a1 00 08 stw r29,8(r1) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc2145c: 4b ff 2a d5 bl ffc13f30 ffc21460: 38 a0 00 00 li r5,0 ffc21464: 7c 64 1b 78 mr r4,r3 ffc21468: 7f 86 e3 78 mr r6,r28 ffc2146c: 7f a3 eb 78 mr r3,r29 ffc21470: 38 e0 00 00 li r7,0 ffc21474: 4b fe 55 7d bl ffc069f0 0, &old_loc, false ); if ( result != 0 ) { ffc21478: 2f 83 00 00 cmpwi cr7,r3,0 ffc2147c: 41 9e 00 18 beq- cr7,ffc21494 <_rename_r+0xd4> if ( free_old_parentloc ) ffc21480: 2f 9e 00 00 cmpwi cr7,r30,0 rtems_filesystem_freenode( &old_parent_loc ); return -1; ffc21484: 3b 80 ff ff li r28,-1 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 ); ffc21488: 7f e3 fb 78 mr r3,r31 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 ) ffc2148c: 41 be 00 ec beq+ cr7,ffc21578 <_rename_r+0x1b8> ffc21490: 48 00 00 e4 b ffc21574 <_rename_r+0x1b4> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); ffc21494: 7f 63 db 78 mr r3,r27 ffc21498: 38 81 00 0c addi r4,r1,12 ffc2149c: 38 a1 00 10 addi r5,r1,16 ffc214a0: 4b fe 6f 6d bl ffc0840c result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); ffc214a4: 81 21 00 1c lwz r9,28(r1) ffc214a8: 80 61 00 0c lwz r3,12(r1) ffc214ac: 38 81 00 10 addi r4,r1,16 ffc214b0: 80 09 00 04 lwz r0,4(r9) ffc214b4: 38 a1 00 08 addi r5,r1,8 ffc214b8: 7c 7b 1a 14 add r3,r27,r3 ffc214bc: 7c 09 03 a6 mtctr r0 ffc214c0: 4e 80 04 21 bctrl if ( result != 0 ) { ffc214c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc214c8: 41 be 00 28 beq+ cr7,ffc214f0 <_rename_r+0x130> rtems_filesystem_freenode( &new_parent_loc ); ffc214cc: 38 61 00 10 addi r3,r1,16 ffc214d0: 4b fe 57 95 bl ffc06c64 if ( free_old_parentloc ) ffc214d4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc214d8: 41 be 00 0c beq+ cr7,ffc214e4 <_rename_r+0x124> rtems_filesystem_freenode( &old_parent_loc ); ffc214dc: 7f e3 fb 78 mr r3,r31 ffc214e0: 4b fe 57 85 bl ffc06c64 rtems_filesystem_freenode( &old_loc ); ffc214e4: 38 61 00 38 addi r3,r1,56 ffc214e8: 4b fe 57 7d bl ffc06c64 ffc214ec: 48 00 00 40 b ffc2152c <_rename_r+0x16c> /* * 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 ) { ffc214f0: 80 01 00 20 lwz r0,32(r1) ffc214f4: 81 21 00 34 lwz r9,52(r1) ffc214f8: 7f 89 00 00 cmpw cr7,r9,r0 ffc214fc: 41 be 00 38 beq+ cr7,ffc21534 <_rename_r+0x174> rtems_filesystem_freenode( &new_parent_loc ); ffc21500: 38 61 00 10 addi r3,r1,16 ffc21504: 4b fe 57 61 bl ffc06c64 if ( free_old_parentloc ) ffc21508: 2f 9e 00 00 cmpwi cr7,r30,0 ffc2150c: 41 be 00 0c beq+ cr7,ffc21518 <_rename_r+0x158> rtems_filesystem_freenode( &old_parent_loc ); ffc21510: 7f e3 fb 78 mr r3,r31 ffc21514: 4b fe 57 51 bl ffc06c64 rtems_filesystem_freenode( &old_loc ); ffc21518: 38 61 00 38 addi r3,r1,56 ffc2151c: 4b fe 57 49 bl ffc06c64 rtems_set_errno_and_return_minus_one( EXDEV ); ffc21520: 4b ff 11 c5 bl ffc126e4 <__errno> ffc21524: 38 00 00 12 li r0,18 ffc21528: 90 03 00 00 stw r0,0(r3) ffc2152c: 3b 80 ff ff li r28,-1 ffc21530: 48 00 00 48 b ffc21578 <_rename_r+0x1b8> } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); ffc21534: 81 21 00 1c lwz r9,28(r1) ffc21538: 7f 84 e3 78 mr r4,r28 ffc2153c: 38 a1 00 10 addi r5,r1,16 ffc21540: 80 c1 00 08 lwz r6,8(r1) ffc21544: 80 09 00 40 lwz r0,64(r9) ffc21548: 7f e3 fb 78 mr r3,r31 ffc2154c: 7c 09 03 a6 mtctr r0 ffc21550: 4e 80 04 21 bctrl ffc21554: 7c 7c 1b 78 mr r28,r3 rtems_filesystem_freenode( &new_parent_loc ); ffc21558: 38 61 00 10 addi r3,r1,16 ffc2155c: 4b fe 57 09 bl ffc06c64 if ( free_old_parentloc ) ffc21560: 2f 9e 00 00 cmpwi cr7,r30,0 ffc21564: 41 be 00 0c beq+ cr7,ffc21570 <_rename_r+0x1b0> rtems_filesystem_freenode( &old_parent_loc ); ffc21568: 7f e3 fb 78 mr r3,r31 ffc2156c: 4b fe 56 f9 bl ffc06c64 rtems_filesystem_freenode( &old_loc ); ffc21570: 38 61 00 38 addi r3,r1,56 ffc21574: 4b fe 56 f1 bl ffc06c64 return result; } ffc21578: 39 61 00 70 addi r11,r1,112 ffc2157c: 7f 83 e3 78 mr r3,r28 ffc21580: 4b fe 12 ec b ffc0286c <_restgpr_26_x> =============================================================================== ffc06898 : #include int chroot( const char *pathname ) { ffc06898: 94 21 ff c8 stwu r1,-56(r1) ffc0689c: 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) { ffc068a0: 3d 20 00 00 lis r9,0 #include int chroot( const char *pathname ) { ffc068a4: bf a1 00 2c stmw r29,44(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) { ffc068a8: 3f c0 00 00 lis r30,0 #include int chroot( const char *pathname ) { ffc068ac: 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) { ffc068b0: 83 fe 27 1c lwz r31,10012(r30) #include int chroot( const char *pathname ) { ffc068b4: 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) { ffc068b8: 38 09 2a f8 addi r0,r9,11000 ffc068bc: 7f 9f 00 00 cmpw cr7,r31,r0 ffc068c0: 40 be 00 24 bne+ cr7,ffc068e4 rtems_libio_set_private_env(); /* try to set a new private env*/ ffc068c4: 48 00 17 01 bl ffc07fc4 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ ffc068c8: 80 1e 27 1c lwz r0,10012(r30) ffc068cc: 7f 80 f8 00 cmpw cr7,r0,r31 ffc068d0: 40 be 00 14 bne+ cr7,ffc068e4 rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc068d4: 48 00 be 11 bl ffc126e4 <__errno> ffc068d8: 38 00 00 86 li r0,134 ffc068dc: 90 03 00 00 stw r0,0(r3) ffc068e0: 48 00 00 28 b ffc06908 } result = chdir(pathname); ffc068e4: 7f a3 eb 78 mr r3,r29 ffc068e8: 4b ff fe f5 bl ffc067dc if (result) { ffc068ec: 2f 83 00 00 cmpwi cr7,r3,0 ffc068f0: 41 be 00 20 beq+ cr7,ffc06910 rtems_set_errno_and_return_minus_one( errno ); ffc068f4: 48 00 bd f1 bl ffc126e4 <__errno> ffc068f8: 7c 7f 1b 78 mr r31,r3 ffc068fc: 48 00 bd e9 bl ffc126e4 <__errno> ffc06900: 80 03 00 00 lwz r0,0(r3) ffc06904: 90 1f 00 00 stw r0,0(r31) ffc06908: 38 60 ff ff li r3,-1 ffc0690c: 48 00 00 50 b ffc0695c } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { ffc06910: 3c 60 ff c2 lis r3,-62 ffc06914: 3b e1 00 08 addi r31,r1,8 ffc06918: 38 63 20 c0 addi r3,r3,8384 ffc0691c: 38 80 00 01 li r4,1 ffc06920: 38 a0 00 00 li r5,0 ffc06924: 7f e6 fb 78 mr r6,r31 ffc06928: 38 e0 00 00 li r7,0 ffc0692c: 48 00 01 49 bl ffc06a74 ffc06930: 2f 83 00 00 cmpwi cr7,r3,0 ffc06934: 40 be ff c0 bne- cr7,ffc068f4 <== 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); ffc06938: 3f c0 00 00 lis r30,0 ffc0693c: 80 7e 27 1c lwz r3,10012(r30) ffc06940: 38 63 00 18 addi r3,r3,24 ffc06944: 48 00 03 21 bl ffc06c64 rtems_filesystem_root = loc; ffc06948: 81 7e 27 1c lwz r11,10012(r30) return 0; ffc0694c: 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; ffc06950: 39 6b 00 18 addi r11,r11,24 ffc06954: 7c bf a4 aa lswi r5,r31,20 ffc06958: 7c ab a5 aa stswi r5,r11,20 return 0; } ffc0695c: 39 61 00 38 addi r11,r1,56 ffc06960: 4b ff bf 18 b ffc02878 <_restgpr_29_x> =============================================================================== ffc03fe4 : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { ffc03fe4: 94 21 ff c8 stwu r1,-56(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) { ffc03fe8: 3d 20 00 00 lis r9,0 return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { ffc03fec: 7c 08 02 a6 mflr r0 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { ffc03ff0: 39 69 28 70 addi r11,r9,10352 return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { ffc03ff4: be a1 00 0c stmw r21,12(r1) ffc03ff8: 7c 7d 1b 78 mr r29,r3 ffc03ffc: 7c 9e 23 78 mr r30,r4 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { ffc04000: 83 49 28 70 lwz r26,10352(r9) return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { ffc04004: 7c bc 2b 78 mr r28,r5 ffc04008: 90 01 00 3c stw r0,60(r1) ffc0400c: 7c d8 33 78 mr r24,r6 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { ffc04010: 7f 83 d0 40 cmplw cr7,r3,r26 ffc04014: 41 9c 00 54 blt- cr7,ffc04068 rtems_disk_device_table *table = disktab; rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; ffc04018: 57 5f 08 3c rlwinm r31,r26,1,0,30 rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; ffc0401c: 80 6b 00 04 lwz r3,4(r11) rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; if (major >= new_size) { ffc04020: 7f 9d f8 40 cmplw cr7,r29,r31 ffc04024: 41 9c 00 08 blt- cr7,ffc0402c <== NEVER TAKEN new_size = major + 1; ffc04028: 3b fd 00 01 addi r31,r29,1 } table = realloc(table, new_size * sizeof(*table)); ffc0402c: 57 e4 18 38 rlwinm r4,r31,3,0,28 ffc04030: 48 00 21 69 bl ffc06198 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; ffc04034: 3a a0 00 1a li r21,26 if (major >= new_size) { new_size = major + 1; } table = realloc(table, new_size * sizeof(*table)); if (table == NULL) { ffc04038: 7c 7b 1b 79 mr. r27,r3 ffc0403c: 41 82 01 4c beq- ffc04188 <== ALWAYS TAKEN return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); ffc04040: 7c ba f8 50 subf r5,r26,r31 <== NOT EXECUTED ffc04044: 57 43 18 38 rlwinm r3,r26,3,0,28 <== NOT EXECUTED ffc04048: 7c 7b 1a 14 add r3,r27,r3 <== NOT EXECUTED ffc0404c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc04050: 54 a5 18 38 rlwinm r5,r5,3,0,28 <== NOT EXECUTED ffc04054: 48 01 03 c9 bl ffc1441c <== NOT EXECUTED disktab = table; ffc04058: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0405c: 39 69 28 70 addi r11,r9,10352 <== NOT EXECUTED disktab_size = new_size; ffc04060: 93 e9 28 70 stw r31,10352(r9) <== NOT EXECUTED if (table == NULL) { return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; ffc04064: 93 6b 00 04 stw r27,4(r11) <== NOT EXECUTED disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { ffc04068: 3d 20 00 00 lis r9,0 ffc0406c: 83 29 28 74 lwz r25,10356(r9) ffc04070: 57 ba 18 38 rlwinm r26,r29,3,0,28 ffc04074: 7c 79 d0 2e lwzx r3,r25,r26 ffc04078: 7f 79 d2 14 add r27,r25,r26 ffc0407c: 82 db 00 04 lwz r22,4(r27) ffc04080: 2f 83 00 00 cmpwi cr7,r3,0 ffc04084: 41 9e 00 0c beq- cr7,ffc04090 ffc04088: 7f 9e b0 40 cmplw cr7,r30,r22 ffc0408c: 41 9c 00 54 blt- cr7,ffc040e0 <== ALWAYS TAKEN 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) { ffc04090: 2f 96 00 00 cmpwi cr7,r22,0 new_size = DISKTAB_INITIAL_SIZE; ffc04094: 3b e0 00 08 li r31,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) { ffc04098: 41 9e 00 08 beq- cr7,ffc040a0 <== ALWAYS TAKEN new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; ffc0409c: 56 df 08 3c rlwinm r31,r22,1,0,30 <== NOT EXECUTED } if (minor >= new_size) { ffc040a0: 7f 9e f8 40 cmplw cr7,r30,r31 ffc040a4: 41 9c 00 08 blt- cr7,ffc040ac new_size = minor + 1; ffc040a8: 3b fe 00 01 addi r31,r30,1 } table = realloc(table, new_size * sizeof(*table)); ffc040ac: 57 e4 10 3a rlwinm r4,r31,2,0,29 ffc040b0: 48 00 20 e9 bl ffc06198 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; ffc040b4: 3a a0 00 1a li r21,26 if (minor >= new_size) { new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); if (table == NULL) { ffc040b8: 7c 77 1b 79 mr. r23,r3 ffc040bc: 41 82 00 cc beq- ffc04188 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); ffc040c0: 7c b6 f8 50 subf r5,r22,r31 ffc040c4: 56 c3 10 3a rlwinm r3,r22,2,0,29 ffc040c8: 7c 77 1a 14 add r3,r23,r3 ffc040cc: 38 80 00 00 li r4,0 ffc040d0: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc040d4: 48 01 03 49 bl ffc1441c disktab [major].minor = table; ffc040d8: 7e f9 d1 2e stwx r23,r25,r26 disktab [major].size = new_size; ffc040dc: 93 fb 00 04 stw r31,4(r27) } return disktab [major].minor + minor; ffc040e0: 7f 59 d0 2e lwzx r26,r25,r26 ffc040e4: 57 db 10 3a rlwinm r27,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) { return RTEMS_NO_MEMORY; ffc040e8: 3a a0 00 1a li r21,26 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; ffc040ec: 7c 1a da 14 add r0,r26,r27 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { ffc040f0: 2f 80 00 00 cmpwi cr7,r0,0 ffc040f4: 41 9e 00 94 beq- cr7,ffc04188 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { ffc040f8: 7c 1a d8 2e lwzx r0,r26,r27 return RTEMS_RESOURCE_IN_USE; ffc040fc: 3a a0 00 0c li r21,12 if (dd_entry == NULL) { return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { ffc04100: 2f 80 00 00 cmpwi cr7,r0,0 ffc04104: 40 be 00 84 bne+ cr7,ffc04188 return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); ffc04108: 38 60 00 38 li r3,56 ffc0410c: 48 00 15 0d bl ffc05618 if (dd == NULL) { return RTEMS_NO_MEMORY; ffc04110: 3a a0 00 1a li r21,26 if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); if (dd == NULL) { ffc04114: 7c 7f 1b 79 mr. r31,r3 ffc04118: 41 82 00 70 beq- ffc04188 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { ffc0411c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc04120: 41 9e 00 40 beq- cr7,ffc04160 alloc_name = strdup(name); ffc04124: 7f 83 e3 78 mr r3,r28 ffc04128: 48 01 06 c9 bl ffc147f0 if (alloc_name == NULL) { ffc0412c: 2f 83 00 00 cmpwi cr7,r3,0 if (dd == NULL) { return RTEMS_NO_MEMORY; } if (name != NULL) { alloc_name = strdup(name); ffc04130: 7c 7c 1b 78 mr r28,r3 ffc04134: 7c 79 1b 78 mr r25,r3 if (alloc_name == NULL) { ffc04138: 40 be 00 5c bne+ cr7,ffc04194 <== ALWAYS TAKEN free(dd); ffc0413c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc04140: 48 00 11 31 bl ffc05270 <== NOT EXECUTED return RTEMS_NO_MEMORY; ffc04144: 48 00 00 44 b ffc04188 <== NOT EXECUTED } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); ffc04148: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0414c: 48 00 11 25 bl ffc05270 <== NOT EXECUTED free(dd); ffc04150: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc04154: 48 00 11 1d bl ffc05270 <== NOT EXECUTED return RTEMS_UNSATISFIED; ffc04158: 3a a0 00 0d li r21,13 <== NOT EXECUTED ffc0415c: 48 00 00 2c b ffc04188 <== NOT EXECUTED 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; ffc04160: 3b 20 00 00 li r25,0 } } dd->dev = dev; dd->name = alloc_name; dd->uses = 0; ffc04164: 38 00 00 00 li r0,0 free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; ffc04168: 93 bf 00 00 stw r29,0(r31) dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; ffc0416c: 3a a0 00 00 li r21,0 free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; ffc04170: 93 df 00 04 stw r30,4(r31) dd->name = alloc_name; ffc04174: 93 3f 00 10 stw r25,16(r31) dd->uses = 0; ffc04178: 90 1f 00 14 stw r0,20(r31) dd->deleted = false; ffc0417c: 98 1f 00 30 stb r0,48(r31) *dd_entry = dd; ffc04180: 7f fa d9 2e stwx r31,r26,r27 *dd_ptr = dd; ffc04184: 93 f8 00 00 stw r31,0(r24) return RTEMS_SUCCESSFUL; } ffc04188: 39 61 00 38 addi r11,r1,56 ffc0418c: 7e a3 ab 78 mr r3,r21 ffc04190: 48 01 44 30 b ffc185c0 <_restgpr_21_x> return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { ffc04194: 38 80 61 ff li r4,25087 ffc04198: 7f a5 eb 78 mr r5,r29 ffc0419c: 7f c6 f3 78 mr r6,r30 ffc041a0: 48 00 15 a1 bl ffc05740 ffc041a4: 2f 83 00 00 cmpwi cr7,r3,0 ffc041a8: 40 9c ff bc bge+ cr7,ffc04164 <== ALWAYS TAKEN ffc041ac: 4b ff ff 9c b ffc04148 <== NOT EXECUTED =============================================================================== ffc0bf24 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0bf24: 94 21 ff d8 stwu r1,-40(r1) ffc0bf28: 7c 08 02 a6 mflr r0 ffc0bf2c: 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 ) ) ffc0bf30: 54 a0 00 39 rlwinm. r0,r5,0,0,28 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0bf34: bf 21 00 0c stmw r25,12(r1) ffc0bf38: 7c 7e 1b 78 mr r30,r3 ffc0bf3c: 7c 9f 23 78 mr r31,r4 ffc0bf40: 7c dd 33 78 mr r29,r6 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) ffc0bf44: 41 a2 00 10 beq+ ffc0bf54 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); ffc0bf48: 48 00 1b d9 bl ffc0db20 <__errno> <== NOT EXECUTED ffc0bf4c: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0bf50: 48 00 00 a0 b ffc0bff0 <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; ffc0bf54: 83 86 00 00 lwz r28,0(r6) if (!device_name_table) ffc0bf58: 3b 60 00 00 li r27,0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { ffc0bf5c: 3f 20 00 00 lis r25,0 if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) ffc0bf60: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0bf64: 40 be 00 78 bne+ cr7,ffc0bfdc rtems_set_errno_and_return_minus_one( EFAULT ); ffc0bf68: 48 00 1b b9 bl ffc0db20 <__errno> ffc0bf6c: 38 00 00 0e li r0,14 ffc0bf70: 48 00 00 80 b ffc0bff0 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) ffc0bf74: 83 5c 00 00 lwz r26,0(r28) ffc0bf78: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0bf7c: 41 9e 00 58 beq- cr7,ffc0bfd4 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0bf80: 7f c3 f3 78 mr r3,r30 ffc0bf84: 7f 44 d3 78 mr r4,r26 ffc0bf88: 7f e5 fb 78 mr r5,r31 ffc0bf8c: 48 00 35 11 bl ffc0f49c ffc0bf90: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bf94: 40 9e 00 40 bne- cr7,ffc0bfd4 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') ffc0bf98: 7c 1a f8 ae lbzx r0,r26,r31 ffc0bf9c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bfa0: 40 be 00 34 bne+ cr7,ffc0bfd4 <== NEVER TAKEN continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; ffc0bfa4: 3d 20 00 00 lis r9,0 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; ffc0bfa8: 93 9d 00 00 stw r28,0(r29) pathloc->handlers = &devFS_file_handlers; ffc0bfac: 38 09 21 84 addi r0,r9,8580 pathloc->ops = &devFS_ops; ffc0bfb0: 3d 20 00 00 lis r9,0 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; ffc0bfb4: 90 1d 00 08 stw r0,8(r29) pathloc->ops = &devFS_ops; ffc0bfb8: 38 09 21 bc addi r0,r9,8636 pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0bfbc: 3d 20 00 00 lis r9,0 continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; ffc0bfc0: 90 1d 00 0c stw r0,12(r29) pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0bfc4: 81 29 27 74 lwz r9,10100(r9) ffc0bfc8: 80 09 00 28 lwz r0,40(r9) ffc0bfcc: 90 1d 00 10 stw r0,16(r29) return 0; ffc0bfd0: 48 00 00 28 b ffc0bff8 /* 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++) { ffc0bfd4: 3b 7b 00 01 addi r27,r27,1 ffc0bfd8: 3b 9c 00 14 addi r28,r28,20 ffc0bfdc: 80 19 27 38 lwz r0,10040(r25) ffc0bfe0: 7f 9b 00 40 cmplw cr7,r27,r0 ffc0bfe4: 41 9c ff 90 blt+ cr7,ffc0bf74 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); ffc0bfe8: 48 00 1b 39 bl ffc0db20 <__errno> ffc0bfec: 38 00 00 02 li r0,2 ffc0bff0: 90 03 00 00 stw r0,0(r3) ffc0bff4: 38 60 ff ff li r3,-1 } ffc0bff8: 39 61 00 28 addi r11,r1,40 ffc0bffc: 48 00 b3 28 b ffc17324 <_restgpr_25_x> =============================================================================== ffc043f0 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { ffc043f0: 94 21 ff d8 stwu r1,-40(r1) ffc043f4: 7c 08 02 a6 mflr r0 ffc043f8: bf 01 00 08 stmw r24,8(r1) ffc043fc: 7c 7f 1b 78 mr r31,r3 ffc04400: 7c 9e 23 78 mr r30,r4 ffc04404: 90 01 00 2c stw r0,44(r1) ffc04408: 7c bd 2b 78 mr r29,r5 ffc0440c: 7c dc 33 78 mr r28,r6 * 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') && ffc04410: 88 03 00 00 lbz r0,0(r3) ffc04414: 2f 80 00 64 cmpwi cr7,r0,100 ffc04418: 40 be 00 2c bne+ cr7,ffc04444 ffc0441c: 88 03 00 01 lbz r0,1(r3) ffc04420: 2f 80 00 65 cmpwi cr7,r0,101 ffc04424: 40 be 00 20 bne+ cr7,ffc04444 <== NEVER TAKEN ffc04428: 88 03 00 02 lbz r0,2(r3) ffc0442c: 2f 80 00 76 cmpwi cr7,r0,118 ffc04430: 40 be 00 14 bne+ cr7,ffc04444 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) ffc04434: 88 03 00 03 lbz r0,3(r3) return 0; ffc04438: 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')) ffc0443c: 2f 80 00 00 cmpwi cr7,r0,0 ffc04440: 41 9e 00 e0 beq- cr7,ffc04520 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) ffc04444: 57 c0 04 26 rlwinm r0,r30,0,16,19 ffc04448: 2f 80 60 00 cmpwi cr7,r0,24576 ffc0444c: 41 9e 00 18 beq- cr7,ffc04464 ffc04450: 2f 80 20 00 cmpwi cr7,r0,8192 ffc04454: 41 be 00 10 beq+ cr7,ffc04464 rtems_set_errno_and_return_minus_one( EINVAL ); ffc04458: 48 00 96 c9 bl ffc0db20 <__errno> ffc0445c: 38 00 00 16 li r0,22 ffc04460: 48 00 00 24 b ffc04484 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; ffc04464: 83 47 00 00 lwz r26,0(r7) if (!device_name_table) ffc04468: 3b 20 ff ff li r25,-1 ffc0446c: 3b 60 00 00 li r27,0 ffc04470: 2f 9a 00 00 cmpwi cr7,r26,0 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ ffc04474: 3f 00 00 00 lis r24,0 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; if (!device_name_table) ffc04478: 40 be 00 4c bne+ cr7,ffc044c4 rtems_set_errno_and_return_minus_one( EFAULT ); ffc0447c: 48 00 96 a5 bl ffc0db20 <__errno> ffc04480: 38 00 00 0e li r0,14 ffc04484: 90 03 00 00 stw r0,0(r3) ffc04488: 38 60 ff ff li r3,-1 ffc0448c: 48 00 00 94 b ffc04520 #include #include #include "devfs.h" int devFS_mknod( ffc04490: 1c 1b 00 14 mulli r0,r27,20 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) ffc04494: 7c 9a 00 2e lwzx r4,r26,r0 ffc04498: 2f 84 00 00 cmpwi cr7,r4,0 ffc0449c: 41 9e 00 20 beq- cr7,ffc044bc slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc044a0: 7f e3 fb 78 mr r3,r31 ffc044a4: 48 00 ae 75 bl ffc0f318 ffc044a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc044ac: 40 be 00 14 bne+ cr7,ffc044c0 rtems_set_errno_and_return_minus_one( EEXIST ); ffc044b0: 48 00 96 71 bl ffc0db20 <__errno> ffc044b4: 38 00 00 11 li r0,17 ffc044b8: 4b ff ff cc b ffc04484 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) slot = i; ffc044bc: 7f 79 db 78 mr r25,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++){ ffc044c0: 3b 7b 00 01 addi r27,r27,1 ffc044c4: 80 18 27 38 lwz r0,10040(r24) ffc044c8: 7f 9b 00 40 cmplw cr7,r27,r0 ffc044cc: 41 9c ff c4 blt+ cr7,ffc04490 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) ffc044d0: 2f 99 ff ff cmpwi cr7,r25,-1 ffc044d4: 40 be 00 10 bne+ cr7,ffc044e4 rtems_set_errno_and_return_minus_one( ENOMEM ); ffc044d8: 48 00 96 49 bl ffc0db20 <__errno> ffc044dc: 38 00 00 0c li r0,12 ffc044e0: 4b ff ff a4 b ffc04484 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc044e4: 7f 00 00 a6 mfmsr r24 ffc044e8: 7c 10 42 a6 mfsprg r0,0 ffc044ec: 7f 00 00 78 andc r0,r24,r0 ffc044f0: 7c 00 01 24 mtmsr r0 _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; ffc044f4: 1f 39 00 14 mulli r25,r25,20 ffc044f8: 7f fa c9 2e stwx r31,r26,r25 device_name_table[slot].device_name_length = strlen(path); ffc044fc: 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; ffc04500: 7f 7a ca 14 add r27,r26,r25 device_name_table[slot].device_name_length = strlen(path); ffc04504: 48 00 ae dd bl ffc0f3e0 device_name_table[slot].major = major; ffc04508: 93 bb 00 08 stw r29,8(r27) 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); ffc0450c: 90 7b 00 04 stw r3,4(r27) device_name_table[slot].major = major; device_name_table[slot].minor = minor; ffc04510: 93 9b 00 0c stw r28,12(r27) device_name_table[slot].mode = mode; ffc04514: 93 db 00 10 stw r30,16(r27) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc04518: 7f 00 01 24 mtmsr r24 _ISR_Enable(level); return 0; ffc0451c: 38 60 00 00 li r3,0 } ffc04520: 39 61 00 28 addi r11,r1,40 ffc04524: 48 01 2d fc b ffc17320 <_restgpr_24_x> =============================================================================== ffc03f4c : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { ffc03f4c: 7c 08 02 a6 mflr r0 ffc03f50: 7c 2b 0b 78 mr r11,r1 ffc03f54: 94 21 ff f0 stwu r1,-16(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc03f58: 38 80 00 00 li r4,0 ffc03f5c: 38 a0 00 00 li r5,0 */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { ffc03f60: 90 01 00 14 stw r0,20(r1) ffc03f64: 48 01 46 39 bl ffc1859c <_savegpr_31> rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc03f68: 3f e0 00 00 lis r31,0 ffc03f6c: 3b ff 28 70 addi r31,r31,10352 ffc03f70: 80 7f 00 08 lwz r3,8(r31) ffc03f74: 48 00 4b a5 bl ffc08b18 if (sc == RTEMS_SUCCESSFUL) { diskdevs_protected = true; return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; ffc03f78: 38 00 00 16 li r0,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) { ffc03f7c: 2f 83 00 00 cmpwi cr7,r3,0 ffc03f80: 40 be 00 10 bne+ cr7,ffc03f90 <== NEVER TAKEN diskdevs_protected = true; ffc03f84: 38 00 00 01 li r0,1 ffc03f88: 98 1f 00 0c stb r0,12(r31) return RTEMS_SUCCESSFUL; ffc03f8c: 38 00 00 00 li r0,0 } else { return RTEMS_NOT_CONFIGURED; } } ffc03f90: 39 61 00 10 addi r11,r1,16 ffc03f94: 7c 03 03 78 mr r3,r0 ffc03f98: 48 01 46 50 b ffc185e8 <_restgpr_31_x> =============================================================================== ffc03f9c : static void disk_unlock(void) { ffc03f9c: 94 21 ff f8 stwu r1,-8(r1) ffc03fa0: 7c 08 02 a6 mflr r0 rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; ffc03fa4: 3d 20 00 00 lis r9,0 } } static void disk_unlock(void) { ffc03fa8: 90 01 00 0c stw r0,12(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; ffc03fac: 39 29 28 70 addi r9,r9,10352 ffc03fb0: 38 00 00 00 li r0,0 ffc03fb4: 98 09 00 0c stb r0,12(r9) sc = rtems_semaphore_release(diskdevs_mutex); ffc03fb8: 80 69 00 08 lwz r3,8(r9) ffc03fbc: 48 00 4c 89 bl ffc08c44 if (sc != RTEMS_SUCCESSFUL) { ffc03fc0: 2f 83 00 00 cmpwi cr7,r3,0 ffc03fc4: 41 be 00 10 beq+ cr7,ffc03fd4 <== ALWAYS TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); ffc03fc8: 3c 60 de ad lis r3,-8531 <== NOT EXECUTED ffc03fcc: 60 63 be ef ori r3,r3,48879 <== NOT EXECUTED ffc03fd0: 48 00 52 d1 bl ffc092a0 <== NOT EXECUTED } } ffc03fd4: 80 01 00 0c lwz r0,12(r1) ffc03fd8: 38 21 00 08 addi r1,r1,8 ffc03fdc: 7c 08 03 a6 mtlr r0 ffc03fe0: 4e 80 00 20 blr =============================================================================== ffc05a00 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) ffc05a00: 94 21 ff f0 stwu r1,-16(r1) ffc05a04: 7c 08 02 a6 mflr r0 ffc05a08: bf c1 00 08 stmw r30,8(r1) ffc05a0c: 7c 7f 1b 78 mr r31,r3 ffc05a10: 90 01 00 14 stw r0,20(r1) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); ffc05a14: 4b ff ff d9 bl ffc059ec while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; ffc05a18: 3b c0 00 02 li r30,2 ffc05a1c: 48 00 00 2c b ffc05a48 ffc05a20: 93 df 00 94 stw r30,148(r31) <== NOT EXECUTED static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc05a24: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( ffc05a28: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc05a2c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc05a30: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc05a34: 48 00 26 71 bl ffc080a4 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc05a38: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05a3c: 41 be 00 08 beq+ cr7,ffc05a44 <== NOT EXECUTED rtems_fatal_error_occurred (sc); ffc05a40: 48 00 2e 39 bl ffc08878 <== NOT EXECUTED rtems_interrupt_disable (level); ffc05a44: 4b ff ff a9 bl ffc059ec <== 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) { ffc05a48: 81 3f 00 84 lwz r9,132(r31) ffc05a4c: 80 1f 00 80 lwz r0,128(r31) ffc05a50: 7f 89 00 00 cmpw cr7,r9,r0 ffc05a54: 40 9e ff cc bne+ cr7,ffc05a20 <== NEVER TAKEN ffc05a58: 7c 60 01 24 mtmsr r3 rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); } } ffc05a5c: 39 61 00 10 addi r11,r1,16 ffc05a60: 4b ff aa e0 b ffc00540 <_restgpr_30_x> =============================================================================== ffc066d8 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { ffc066d8: 7c 08 02 a6 mflr r0 ffc066dc: 7c 2b 0b 78 mr r11,r1 ffc066e0: 94 21 ff e0 stwu r1,-32(r1) ffc066e4: 90 01 00 24 stw r0,36(r1) ffc066e8: 48 01 3d 35 bl ffc1a41c <_savegpr_31> ffc066ec: 7c 9f 23 78 mr r31,r4 if ((tty->termios.c_lflag & ECHOCTL) && ffc066f0: 80 04 00 3c lwz r0,60(r4) ffc066f4: 70 09 02 00 andi. r9,r0,512 ffc066f8: 41 82 00 5c beq- ffc06754 <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { ffc066fc: 3d 20 00 00 lis r9,0 ffc06700: 81 29 27 44 lwz r9,10052(r9) ffc06704: 7d 29 1a 14 add r9,r9,r3 ffc06708: 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) && ffc0670c: 70 09 00 20 andi. r9,r0,32 ffc06710: 41 82 00 44 beq- ffc06754 iscntrl(c) && (c != '\t') && (c != '\n')) { ffc06714: 2f 83 00 09 cmpwi cr7,r3,9 ffc06718: 41 9e 00 3c beq- cr7,ffc06754 ffc0671c: 2f 83 00 0a cmpwi cr7,r3,10 ffc06720: 41 be 00 34 beq+ cr7,ffc06754 char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; ffc06724: 68 63 00 40 xori r3,r3,64 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; ffc06728: 38 00 00 5e li r0,94 echobuf[1] = c ^ 0x40; ffc0672c: 98 61 00 09 stb r3,9(r1) rtems_termios_puts (echobuf, 2, tty); ffc06730: 38 80 00 02 li r4,2 ffc06734: 38 61 00 08 addi r3,r1,8 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; ffc06738: 98 01 00 08 stb r0,8(r1) echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); ffc0673c: 7f e5 fb 78 mr r5,r31 ffc06740: 4b ff fd 0d bl ffc0644c tty->column += 2; ffc06744: 81 3f 00 28 lwz r9,40(r31) ffc06748: 38 09 00 02 addi r0,r9,2 ffc0674c: 90 1f 00 28 stw r0,40(r31) ffc06750: 48 00 00 0c b ffc0675c } else { oproc (c, tty); ffc06754: 7f e4 fb 78 mr r4,r31 ffc06758: 4b ff fe 15 bl ffc0656c } } ffc0675c: 39 61 00 20 addi r11,r1,32 ffc06760: 4b ff 9d e4 b ffc00544 <_restgpr_31_x> =============================================================================== ffc055dc : void endgrent(void) { if (group_fp != NULL) ffc055dc: 3d 20 00 00 lis r9,0 fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc055e0: 94 21 ff f8 stwu r1,-8(r1) ffc055e4: 7c 08 02 a6 mflr r0 if (group_fp != NULL) ffc055e8: 80 69 2a 1c lwz r3,10780(r9) fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc055ec: 90 01 00 0c stw r0,12(r1) if (group_fp != NULL) ffc055f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc055f4: 41 9e 00 08 beq- cr7,ffc055fc <== NEVER TAKEN fclose(group_fp); ffc055f8: 48 00 b2 fd bl ffc108f4 } ffc055fc: 80 01 00 0c lwz r0,12(r1) ffc05600: 38 21 00 08 addi r1,r1,8 ffc05604: 7c 08 03 a6 mtlr r0 ffc05608: 4e 80 00 20 blr =============================================================================== ffc0541c : void endpwent(void) { if (passwd_fp != NULL) ffc0541c: 3d 20 00 00 lis r9,0 fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc05420: 94 21 ff f8 stwu r1,-8(r1) ffc05424: 7c 08 02 a6 mflr r0 if (passwd_fp != NULL) ffc05428: 80 69 29 40 lwz r3,10560(r9) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc0542c: 90 01 00 0c stw r0,12(r1) if (passwd_fp != NULL) ffc05430: 2f 83 00 00 cmpwi cr7,r3,0 ffc05434: 41 9e 00 08 beq- cr7,ffc0543c <== NEVER TAKEN fclose(passwd_fp); ffc05438: 48 00 b4 bd bl ffc108f4 } ffc0543c: 80 01 00 0c lwz r0,12(r1) ffc05440: 38 21 00 08 addi r1,r1,8 ffc05444: 7c 08 03 a6 mtlr r0 ffc05448: 4e 80 00 20 blr =============================================================================== ffc06764 : * 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) { ffc06764: 94 21 ff e0 stwu r1,-32(r1) ffc06768: 7c 08 02 a6 mflr r0 ffc0676c: 7d 80 00 26 mfcr r12 ffc06770: 90 01 00 24 stw r0,36(r1) if (tty->ccount == 0) ffc06774: 80 03 00 20 lwz r0,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) { ffc06778: bf 61 00 0c stmw r27,12(r1) ffc0677c: 7c 7f 1b 78 mr r31,r3 if (tty->ccount == 0) ffc06780: 2f 80 00 00 cmpwi cr7,r0,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) { ffc06784: 91 81 00 08 stw r12,8(r1) if (tty->ccount == 0) ffc06788: 41 9e 01 d8 beq- cr7,ffc06960 return; if (lineFlag) { ffc0678c: 2f 84 00 00 cmpwi cr7,r4,0 ffc06790: 41 9e 01 ac beq- cr7,ffc0693c if (!(tty->termios.c_lflag & ECHO)) { ffc06794: 80 03 00 3c lwz r0,60(r3) ffc06798: 70 09 00 08 andi. r9,r0,8 ffc0679c: 40 a2 00 0c bne+ ffc067a8 <== ALWAYS TAKEN tty->ccount = 0; ffc067a0: 91 23 00 20 stw r9,32(r3) <== NOT EXECUTED return; ffc067a4: 48 00 01 bc b ffc06960 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { ffc067a8: 70 00 00 10 andi. r0,r0,16 ffc067ac: 40 a2 01 90 bne+ ffc0693c <== ALWAYS TAKEN tty->ccount = 0; ffc067b0: 90 03 00 20 stw r0,32(r3) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); ffc067b4: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc067b8: 88 63 00 44 lbz r3,68(r3) <== NOT EXECUTED ffc067bc: 4b ff ff 1d bl ffc066d8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) ffc067c0: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED echo ('\n', tty); ffc067c4: 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) ffc067c8: 70 07 00 20 andi. r7,r0,32 <== NOT EXECUTED ffc067cc: 41 a2 01 94 beq+ ffc06960 <== NOT EXECUTED ffc067d0: 48 00 00 30 b ffc06800 <== NOT EXECUTED } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { ffc067d4: 80 1f 00 3c lwz r0,60(r31) return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; ffc067d8: 39 29 ff ff addi r9,r9,-1 ffc067dc: 81 5f 00 1c lwz r10,28(r31) if (tty->termios.c_lflag & ECHO) { ffc067e0: 70 0b 00 08 andi. r11,r0,8 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; ffc067e4: 91 3f 00 20 stw r9,32(r31) ffc067e8: 7f ca 48 ae lbzx r30,r10,r9 if (tty->termios.c_lflag & ECHO) { ffc067ec: 41 82 01 48 beq- ffc06934 <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { ffc067f0: 40 92 00 30 bne- cr4,ffc06820 ffc067f4: 70 07 00 10 andi. r7,r0,16 ffc067f8: 40 a2 00 28 bne+ ffc06820 <== ALWAYS TAKEN echo (tty->termios.c_cc[VERASE], tty); ffc067fc: 88 7f 00 43 lbz r3,67(r31) <== NOT EXECUTED } } if (!lineFlag) break; } } ffc06800: 80 01 00 24 lwz r0,36(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); ffc06804: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc06808: 81 81 00 08 lwz r12,8(r1) <== NOT EXECUTED ffc0680c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc06810: bb 61 00 0c lmw r27,12(r1) <== NOT EXECUTED ffc06814: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc06818: 7d 80 81 20 mtcrf 8,r12 <== 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); ffc0681c: 4b ff fe bc b ffc066d8 <== NOT EXECUTED } else if (c == '\t') { ffc06820: 2f 9e 00 09 cmpwi cr7,r30,9 ffc06824: 40 be 00 90 bne+ cr7,ffc068b4 while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) ffc06828: 39 29 00 01 addi r9,r9,1 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; ffc0682c: 83 df 00 2c lwz r30,44(r31) */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { ffc06830: 81 1d 27 44 lwz r8,10052(r29) 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; ffc06834: 39 60 00 00 li r11,0 while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) ffc06838: 70 07 02 00 andi. r7,r0,512 ffc0683c: 7d 29 03 a6 mtctr r9 ffc06840: 48 00 00 40 b ffc06880 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; ffc06844: 7c 0a 58 ae lbzx r0,r10,r11 ffc06848: 39 6b 00 01 addi r11,r11,1 if (c == '\t') { ffc0684c: 2f 80 00 09 cmpwi cr7,r0,9 ffc06850: 40 be 00 0c bne+ cr7,ffc0685c col = (col | 7) + 1; ffc06854: 63 de 00 07 ori r30,r30,7 ffc06858: 48 00 00 24 b ffc0687c } else if (iscntrl (c)) { ffc0685c: 7d 28 02 14 add r9,r8,r0 ffc06860: 88 09 00 01 lbz r0,1(r9) ffc06864: 54 09 df fe rlwinm r9,r0,27,31,31 ffc06868: 2f 89 00 00 cmpwi cr7,r9,0 ffc0686c: 41 9e 00 10 beq- cr7,ffc0687c <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) ffc06870: 41 82 00 10 beq- ffc06880 <== NOT EXECUTED col += 2; ffc06874: 3b de 00 02 addi r30,r30,2 <== NOT EXECUTED ffc06878: 48 00 00 08 b ffc06880 <== NOT EXECUTED } else { col++; ffc0687c: 3b de 00 01 addi r30,r30,1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc06880: 42 00 ff c4 bdnz+ ffc06844 ffc06884: 48 00 00 20 b ffc068a4 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); ffc06888: 7f 63 db 78 mr r3,r27 ffc0688c: 38 80 00 01 li r4,1 ffc06890: 7f e5 fb 78 mr r5,r31 ffc06894: 4b ff fb b9 bl ffc0644c tty->column--; ffc06898: 81 3f 00 28 lwz r9,40(r31) ffc0689c: 38 09 ff ff addi r0,r9,-1 ffc068a0: 90 1f 00 28 stw r0,40(r31) } /* * Back up over the tab */ while (tty->column > col) { ffc068a4: 80 1f 00 28 lwz r0,40(r31) ffc068a8: 7f 80 f0 00 cmpw cr7,r0,r30 ffc068ac: 41 9d ff dc bgt+ cr7,ffc06888 ffc068b0: 48 00 00 84 b ffc06934 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc068b4: 81 3d 27 44 lwz r9,10052(r29) ffc068b8: 3b de 00 01 addi r30,r30,1 ffc068bc: 7d 29 f0 ae lbzx r9,r9,r30 ffc068c0: 71 2b 00 20 andi. r11,r9,32 ffc068c4: 41 82 00 30 beq- ffc068f4 <== ALWAYS TAKEN ffc068c8: 70 07 02 00 andi. r7,r0,512 <== NOT EXECUTED ffc068cc: 41 a2 00 28 beq+ ffc068f4 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); ffc068d0: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc068d4: 38 80 00 03 li r4,3 <== NOT EXECUTED ffc068d8: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc068dc: 4b ff fb 71 bl ffc0644c <== NOT EXECUTED if (tty->column) ffc068e0: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED ffc068e4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc068e8: 41 9e 00 0c beq- cr7,ffc068f4 <== NOT EXECUTED tty->column--; ffc068ec: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc068f0: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { ffc068f4: 81 3d 27 44 lwz r9,10052(r29) ffc068f8: 7c 09 f0 ae lbzx r0,r9,r30 ffc068fc: 70 09 00 20 andi. r9,r0,32 ffc06900: 41 82 00 10 beq- ffc06910 <== ALWAYS TAKEN ffc06904: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED ffc06908: 70 0b 02 00 andi. r11,r0,512 <== NOT EXECUTED ffc0690c: 41 82 00 28 beq- ffc06934 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); ffc06910: 7f 83 e3 78 mr r3,r28 ffc06914: 38 80 00 03 li r4,3 ffc06918: 7f e5 fb 78 mr r5,r31 ffc0691c: 4b ff fb 31 bl ffc0644c if (tty->column) ffc06920: 81 3f 00 28 lwz r9,40(r31) ffc06924: 2f 89 00 00 cmpwi cr7,r9,0 ffc06928: 41 9e 00 0c beq- cr7,ffc06934 <== NEVER TAKEN tty->column--; ffc0692c: 39 29 ff ff addi r9,r9,-1 ffc06930: 91 3f 00 28 stw r9,40(r31) } } } if (!lineFlag) ffc06934: 40 b2 00 20 bne+ cr4,ffc06954 ffc06938: 48 00 00 28 b ffc06960 while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { ffc0693c: 2e 04 00 00 cmpwi cr4,r4,0 rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc06940: 3f 80 ff c2 lis r28,-62 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); ffc06944: 3f 60 ff c2 lis r27,-62 ffc06948: 3f a0 00 00 lis r29,0 rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc0694c: 3b 9c c4 10 addi r28,r28,-15344 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); ffc06950: 3b 7b c4 12 addi r27,r27,-15342 echo ('\n', tty); return; } } while (tty->ccount) { ffc06954: 81 3f 00 20 lwz r9,32(r31) ffc06958: 2f 89 00 00 cmpwi cr7,r9,0 ffc0695c: 40 9e fe 78 bne+ cr7,ffc067d4 } } if (!lineFlag) break; } } ffc06960: 81 81 00 08 lwz r12,8(r1) ffc06964: 39 61 00 20 addi r11,r1,32 ffc06968: 7d 80 81 20 mtcrf 8,r12 ffc0696c: 4b ff 9b c8 b ffc00534 <_restgpr_27_x> =============================================================================== ffc1489c : #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) { ffc1489c: 94 21 ff d0 stwu r1,-48(r1) ffc148a0: 7c 08 02 a6 mflr r0 ffc148a4: bf 41 00 18 stmw r26,24(r1) ffc148a8: 7c 7f 1b 78 mr r31,r3 ffc148ac: 7c 9e 23 78 mr r30,r4 ffc148b0: 90 01 00 34 stw r0,52(r1) ffc148b4: 7c bc 2b 78 mr r28,r5 ffc148b8: 7c db 33 78 mr r27,r6 rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) ffc148bc: 88 03 00 85 lbz r0,133(r3) ffc148c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc148c4: 40 9e 00 40 bne- cr7,ffc14904 { if (op_type == FAT_OP_TYPE_READ) ffc148c8: 2f 9c 00 01 cmpwi cr7,r28,1 ffc148cc: 80 63 00 58 lwz r3,88(r3) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); ffc148d0: 7c 85 23 78 mr r5,r4 ffc148d4: 80 9f 00 5c lwz r4,92(r31) ffc148d8: 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) ffc148dc: 40 be 00 0c bne+ cr7,ffc148e8 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); ffc148e0: 4b ff e5 79 bl ffc12e58 ffc148e4: 48 00 00 08 b ffc148ec else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); ffc148e8: 4b ff e4 95 bl ffc12d7c if (sc != RTEMS_SUCCESSFUL) ffc148ec: 2f 83 00 00 cmpwi cr7,r3,0 ffc148f0: 40 9e 01 5c bne- cr7,ffc14a4c <== NEVER TAKEN 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; ffc148f4: 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; ffc148f8: 93 df 00 80 stw r30,128(r31) fs_info->c.modified = 0; ffc148fc: 98 7f 00 84 stb r3,132(r31) fs_info->c.state = FAT_CACHE_ACTUAL; ffc14900: 98 1f 00 85 stb r0,133(r31) } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && ffc14904: 80 1f 00 80 lwz r0,128(r31) ffc14908: 3b a0 00 00 li r29,0 ffc1490c: a1 3f 00 14 lhz r9,20(r31) ffc14910: 7f 80 48 40 cmplw cr7,r0,r9 ffc14914: 41 9c 00 14 blt- cr7,ffc14928 <== NEVER TAKEN ffc14918: 83 bf 00 1c lwz r29,28(r31) ffc1491c: 7f bd 00 10 subfc r29,r29,r0 ffc14920: 7f bd e9 10 subfe r29,r29,r29 ffc14924: 7f bd 00 d0 neg r29,r29 (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) ffc14928: 7f 80 f0 00 cmpw cr7,r0,r30 ffc1492c: 41 9e 01 40 beq- cr7,ffc14a6c { if (fs_info->c.modified) ffc14930: 8b 5f 00 84 lbz r26,132(r31) ffc14934: 2f 9a 00 00 cmpwi cr7,r26,0 ffc14938: 41 9e 00 d4 beq- cr7,ffc14a0c { if (sec_of_fat && !fs_info->vol.mirror) ffc1493c: 73 bd 00 ff andi. r29,r29,255 ffc14940: 41 82 00 24 beq- ffc14964 <== ALWAYS TAKEN ffc14944: 88 1f 00 48 lbz r0,72(r31) <== NOT EXECUTED ffc14948: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc1494c: 40 be 00 18 bne+ cr7,ffc14964 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, ffc14950: 81 3f 00 88 lwz r9,136(r31) <== NOT EXECUTED ffc14954: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc14958: 80 89 00 24 lwz r4,36(r9) <== NOT EXECUTED ffc1495c: a0 bf 00 00 lhz r5,0(r31) <== NOT EXECUTED ffc14960: 48 00 97 7d bl ffc1e0dc <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); ffc14964: 80 7f 00 88 lwz r3,136(r31) ffc14968: 4b ff e8 51 bl ffc131b8 fs_info->c.state = FAT_CACHE_EMPTY; ffc1496c: 38 00 00 00 li r0,0 fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) ffc14970: 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; ffc14974: 98 1f 00 85 stb r0,133(r31) fs_info->c.modified = 0; ffc14978: 98 1f 00 84 stb r0,132(r31) if (sc != RTEMS_SUCCESSFUL) ffc1497c: 40 9e 00 d0 bne- cr7,ffc14a4c <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) ffc14980: 2f 9d 00 00 cmpwi cr7,r29,0 ffc14984: 41 9e 00 9c beq- cr7,ffc14a20 <== ALWAYS TAKEN ffc14988: 88 1f 00 48 lbz r0,72(r31) <== NOT EXECUTED ffc1498c: 3b a0 00 01 li r29,1 <== NOT EXECUTED ffc14990: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc14994: 41 9e 00 68 beq- cr7,ffc149fc <== NOT EXECUTED ffc14998: 48 00 00 88 b ffc14a20 <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc1499c: 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, ffc149a0: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc149a4: 80 1f 00 80 lwz r0,128(r31) <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc149a8: 7c bd 29 d6 mullw r5,r29,r5 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, ffc149ac: 80 7f 00 58 lwz r3,88(r31) <== NOT EXECUTED ffc149b0: 80 9f 00 5c lwz r4,92(r31) <== NOT EXECUTED ffc149b4: 7c a5 02 14 add r5,r5,r0 <== NOT EXECUTED ffc149b8: 4b ff e3 c5 bl ffc12d7c <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) ffc149bc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc149c0: 40 9e 00 28 bne- cr7,ffc149e8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); ffc149c4: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc149c8: 80 9f 00 8c lwz r4,140(r31) <== NOT EXECUTED ffc149cc: 80 69 00 24 lwz r3,36(r9) <== NOT EXECUTED ffc149d0: a0 bf 00 00 lhz r5,0(r31) <== NOT EXECUTED ffc149d4: 48 00 97 09 bl ffc1e0dc <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); ffc149d8: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED ffc149dc: 4b ff e7 dd bl ffc131b8 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) ffc149e0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc149e4: 41 be 00 10 beq+ cr7,ffc149f4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); ffc149e8: 48 00 88 c1 bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc149ec: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc149f0: 48 00 00 64 b ffc14a54 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc149f4: 3b bd 00 01 addi r29,r29,1 <== NOT EXECUTED ffc149f8: 57 bd 06 3e clrlwi r29,r29,24 <== NOT EXECUTED ffc149fc: 88 1f 00 09 lbz r0,9(r31) <== NOT EXECUTED ffc14a00: 7f 80 e8 40 cmplw cr7,r0,r29 <== NOT EXECUTED ffc14a04: 41 9d ff 98 bgt+ cr7,ffc1499c <== NOT EXECUTED ffc14a08: 48 00 00 18 b ffc14a20 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); ffc14a0c: 80 7f 00 88 lwz r3,136(r31) ffc14a10: 4b ff e6 c5 bl ffc130d4 fs_info->c.state = FAT_CACHE_EMPTY; ffc14a14: 9b 5f 00 85 stb r26,133(r31) if (sc != RTEMS_SUCCESSFUL) ffc14a18: 2f 83 00 00 cmpwi cr7,r3,0 ffc14a1c: 40 9e 00 30 bne- cr7,ffc14a4c <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) ffc14a20: 2f 9c 00 01 cmpwi cr7,r28,1 ffc14a24: 80 7f 00 58 lwz r3,88(r31) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); ffc14a28: 7f c5 f3 78 mr r5,r30 ffc14a2c: 80 9f 00 5c lwz r4,92(r31) ffc14a30: 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) ffc14a34: 40 be 00 0c bne+ cr7,ffc14a40 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); ffc14a38: 4b ff e4 21 bl ffc12e58 ffc14a3c: 48 00 00 08 b ffc14a44 else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); ffc14a40: 4b ff e3 3d bl ffc12d7c if (sc != RTEMS_SUCCESSFUL) ffc14a44: 2f 83 00 00 cmpwi cr7,r3,0 ffc14a48: 41 be 00 18 beq+ cr7,ffc14a60 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); ffc14a4c: 48 00 88 5d bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc14a50: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc14a54: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc14a58: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc14a5c: 48 00 00 1c b ffc14a78 <== NOT EXECUTED fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; ffc14a60: 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; ffc14a64: 93 df 00 80 stw r30,128(r31) fs_info->c.state = FAT_CACHE_ACTUAL; ffc14a68: 98 1f 00 85 stb r0,133(r31) } *buf = fs_info->c.buf; ffc14a6c: 80 1f 00 88 lwz r0,136(r31) return RC_OK; ffc14a70: 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; ffc14a74: 90 1b 00 00 stw r0,0(r27) return RC_OK; } ffc14a78: 39 61 00 30 addi r11,r1,48 ffc14a7c: 4b fe e0 68 b ffc02ae4 <_restgpr_26_x> =============================================================================== ffc14a80 : int fat_buf_release(fat_fs_info_t *fs_info) { ffc14a80: 94 21 ff e0 stwu r1,-32(r1) ffc14a84: 7c 08 02 a6 mflr r0 ffc14a88: bf c1 00 18 stmw r30,24(r1) ffc14a8c: 7c 7f 1b 78 mr r31,r3 ffc14a90: 90 01 00 24 stw r0,36(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) ffc14a94: 88 03 00 85 lbz r0,133(r3) return RC_OK; ffc14a98: 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) ffc14a9c: 2f 80 00 00 cmpwi cr7,r0,0 ffc14aa0: 41 9e 01 2c beq- cr7,ffc14bcc return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && ffc14aa4: 80 1f 00 80 lwz r0,128(r31) ffc14aa8: 3b c0 00 00 li r30,0 ffc14aac: a1 3f 00 14 lhz r9,20(r31) ffc14ab0: 7f 80 48 40 cmplw cr7,r0,r9 ffc14ab4: 41 9c 00 14 blt- cr7,ffc14ac8 <== NEVER TAKEN *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) ffc14ab8: 83 df 00 1c lwz r30,28(r31) ffc14abc: 7f de 00 10 subfc r30,r30,r0 ffc14ac0: 7f de f1 10 subfe r30,r30,r30 ffc14ac4: 7f de 00 d0 neg r30,r30 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) ffc14ac8: 88 1f 00 84 lbz r0,132(r31) ffc14acc: 2f 80 00 00 cmpwi cr7,r0,0 ffc14ad0: 41 9e 00 cc beq- cr7,ffc14b9c { if (sec_of_fat && !fs_info->vol.mirror) ffc14ad4: 73 de 00 ff andi. r30,r30,255 ffc14ad8: 41 82 00 24 beq- ffc14afc ffc14adc: 88 1f 00 48 lbz r0,72(r31) ffc14ae0: 2f 80 00 00 cmpwi cr7,r0,0 ffc14ae4: 40 be 00 18 bne+ cr7,ffc14afc <== NEVER TAKEN memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); ffc14ae8: 81 3f 00 88 lwz r9,136(r31) ffc14aec: 80 7f 00 8c lwz r3,140(r31) ffc14af0: 80 89 00 24 lwz r4,36(r9) ffc14af4: a0 bf 00 00 lhz r5,0(r31) ffc14af8: 48 00 95 e5 bl ffc1e0dc sc = rtems_bdbuf_release_modified(fs_info->c.buf); ffc14afc: 80 7f 00 88 lwz r3,136(r31) ffc14b00: 4b ff e6 b9 bl ffc131b8 if (sc != RTEMS_SUCCESSFUL) ffc14b04: 2c 03 00 00 cmpwi r3,0 ffc14b08: 40 82 00 a4 bne- ffc14bac <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) ffc14b0c: 2f 9e 00 00 cmpwi cr7,r30,0 memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; ffc14b10: 98 7f 00 84 stb r3,132(r31) if (sec_of_fat && !fs_info->vol.mirror) ffc14b14: 41 9e 00 ac beq- cr7,ffc14bc0 ffc14b18: 88 1f 00 48 lbz r0,72(r31) ffc14b1c: 3b c0 00 01 li r30,1 ffc14b20: 2f 80 00 00 cmpwi cr7,r0,0 ffc14b24: 41 9e 00 68 beq- cr7,ffc14b8c <== ALWAYS TAKEN ffc14b28: 48 00 00 98 b ffc14bc0 <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc14b2c: 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, ffc14b30: 38 c1 00 08 addi r6,r1,8 ffc14b34: 80 1f 00 80 lwz r0,128(r31) fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc14b38: 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, ffc14b3c: 80 7f 00 58 lwz r3,88(r31) ffc14b40: 80 9f 00 5c lwz r4,92(r31) ffc14b44: 7c a5 02 14 add r5,r5,r0 ffc14b48: 4b ff e2 35 bl ffc12d7c fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) ffc14b4c: 2f 83 00 00 cmpwi cr7,r3,0 ffc14b50: 40 9e 00 28 bne- cr7,ffc14b78 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); ffc14b54: 81 21 00 08 lwz r9,8(r1) ffc14b58: 80 9f 00 8c lwz r4,140(r31) ffc14b5c: 80 69 00 24 lwz r3,36(r9) ffc14b60: a0 bf 00 00 lhz r5,0(r31) ffc14b64: 48 00 95 79 bl ffc1e0dc sc = rtems_bdbuf_release_modified(b); ffc14b68: 80 61 00 08 lwz r3,8(r1) ffc14b6c: 4b ff e6 4d bl ffc131b8 if ( sc != RTEMS_SUCCESSFUL) ffc14b70: 2f 83 00 00 cmpwi cr7,r3,0 ffc14b74: 41 be 00 10 beq+ cr7,ffc14b84 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); ffc14b78: 48 00 87 31 bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc14b7c: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc14b80: 48 00 00 34 b ffc14bb4 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) ffc14b84: 3b de 00 01 addi r30,r30,1 ffc14b88: 57 de 06 3e clrlwi r30,r30,24 ffc14b8c: 88 1f 00 09 lbz r0,9(r31) ffc14b90: 7f 80 f0 40 cmplw cr7,r0,r30 ffc14b94: 41 9d ff 98 bgt+ cr7,ffc14b2c ffc14b98: 48 00 00 28 b ffc14bc0 } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); ffc14b9c: 80 7f 00 88 lwz r3,136(r31) ffc14ba0: 4b ff e5 35 bl ffc130d4 if (sc != RTEMS_SUCCESSFUL) ffc14ba4: 2f 83 00 00 cmpwi cr7,r3,0 ffc14ba8: 41 be 00 18 beq+ cr7,ffc14bc0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); ffc14bac: 48 00 86 fd bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc14bb0: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc14bb4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc14bb8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc14bbc: 48 00 00 10 b ffc14bcc <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; ffc14bc0: 38 00 00 00 li r0,0 ffc14bc4: 98 1f 00 85 stb r0,133(r31) return RC_OK; ffc14bc8: 38 60 00 00 li r3,0 } ffc14bcc: 39 61 00 20 addi r11,r1,32 ffc14bd0: 4b fe df 24 b ffc02af4 <_restgpr_30_x> =============================================================================== ffc13b9c : 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)) ) ffc13b9c: 7c 89 23 79 mr. r9,r4 ffc13ba0: 40 82 00 18 bne- ffc13bb8 ffc13ba4: 88 03 00 0a lbz r0,10(r3) ffc13ba8: 70 0b 00 03 andi. r11,r0,3 ffc13bac: 41 a2 00 0c beq+ ffc13bb8 <== NEVER TAKEN return fs_info->vol.rdir_loc; ffc13bb0: 80 63 00 1c lwz r3,28(r3) ffc13bb4: 4e 80 00 20 blr return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc13bb8: 88 03 00 05 lbz r0,5(r3) ffc13bbc: 39 29 ff fe addi r9,r9,-2 ffc13bc0: 7d 29 00 30 slw r9,r9,r0 ffc13bc4: 80 03 00 30 lwz r0,48(r3) ffc13bc8: 7c 69 02 14 add r3,r9,r0 fs_info->vol.data_fsec); } ffc13bcc: 4e 80 00 20 blr =============================================================================== ffc14d48 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { ffc14d48: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc14d4c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc14d50: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc14d54: bf a1 00 0c stmw r29,12(r1) <== NOT EXECUTED ffc14d58: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ffc14d5c: 7c bf 2b 78 mr r31,r5 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; ffc14d60: 83 a3 00 34 lwz r29,52(r3) <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); ffc14d64: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc14d68: 4b ff fb 01 bl ffc14868 <== NOT EXECUTED return _fat_block_read(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); ffc14d6c: 88 1d 00 02 lbz r0,2(r29) <== NOT EXECUTED ffc14d70: 88 dd 00 04 lbz r6,4(r29) <== 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); ffc14d74: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED return _fat_block_read(mt_entry, fsec, 0, ffc14d78: 7f e7 fb 78 mr r7,r31 <== NOT EXECUTED ffc14d7c: 7c c6 00 30 slw r6,r6,r0 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } ffc14d80: 80 01 00 1c lwz r0,28(r1) <== 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, ffc14d84: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } ffc14d88: bb a1 00 0c lmw r29,12(r1) <== NOT EXECUTED ffc14d8c: 7c 08 03 a6 mtlr r0 <== 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, ffc14d90: 38 a0 00 00 li r5,0 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } ffc14d94: 38 21 00 18 addi r1,r1,24 <== 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, ffc14d98: 4b ff fe 3c b ffc14bd4 <_fat_block_read> <== NOT EXECUTED =============================================================================== ffc14fc8 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { ffc14fc8: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc14fcc: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc14fd0: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED ffc14fd4: bf a1 00 1c stmw r29,28(r1) <== NOT EXECUTED ffc14fd8: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; ffc14fdc: 83 e3 00 34 lwz r31,52(r3) <== NOT EXECUTED uint32_t value ) { uint32_t swapped; __asm__ volatile("rlwimi %0,%1,8,24,31;" ffc14fe0: 50 80 46 3e rlwimi r0,r4,8,24,31 <== NOT EXECUTED ffc14fe4: 50 80 c4 2e rlwimi r0,r4,24,16,23 <== NOT EXECUTED ffc14fe8: 50 80 42 1e rlwimi r0,r4,8,8,15 <== NOT EXECUTED ffc14fec: 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); ffc14ff0: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc14ff4: 50 a0 46 3e rlwimi r0,r5,8,24,31 <== NOT EXECUTED ffc14ff8: 50 a0 c4 2e rlwimi r0,r5,24,16,23 <== NOT EXECUTED ffc14ffc: 50 a0 42 1e rlwimi r0,r5,8,8,15 <== NOT EXECUTED ffc15000: 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, ffc15004: a0 9f 00 3c lhz r4,60(r31) <== NOT EXECUTED ffc15008: 38 a0 01 e8 li r5,488 <== NOT EXECUTED ffc1500c: 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); ffc15010: 90 01 00 08 stw r0,8(r1) <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, ffc15014: 38 e1 00 0c addi r7,r1,12 <== NOT EXECUTED ffc15018: 4b ff fc 69 bl ffc14c80 <_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, ffc1501c: 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, ffc15020: 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, ffc15024: 38 a0 01 ec li r5,492 <== NOT EXECUTED ffc15028: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc1502c: 38 c0 00 04 li r6,4 <== NOT EXECUTED ffc15030: 38 e1 00 08 addi r7,r1,8 <== NOT EXECUTED ffc15034: 4b ff fc 4d bl ffc14c80 <_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) ) ffc15038: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED return -1; ffc1503c: 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) ) ffc15040: 41 9c 00 08 blt- cr7,ffc15048 <== NOT EXECUTED return -1; ffc15044: 7c 60 fe 70 srawi r0,r3,31 <== NOT EXECUTED return RC_OK; } ffc15048: 39 61 00 28 addi r11,r1,40 <== NOT EXECUTED ffc1504c: 7c 03 03 78 mr r3,r0 <== NOT EXECUTED ffc15050: 4b fe da a0 b ffc02af0 <_restgpr_29_x> <== NOT EXECUTED =============================================================================== ffc140e4 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc140e4: 94 21 ff e8 stwu r1,-24(r1) ffc140e8: 7c 08 02 a6 mflr r0 ffc140ec: 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) ffc140f0: 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 ) { ffc140f4: bf 81 00 08 stmw r28,8(r1) ffc140f8: 7c 7e 1b 78 mr r30,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) ffc140fc: 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 ) { ffc14100: 7c 9f 23 78 mr r31,r4 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc14104: 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) ffc14108: 40 9d 00 14 ble- cr7,ffc1411c { fat_fd->links_num--; ffc1410c: 39 29 ff ff addi r9,r9,-1 ffc14110: 91 24 00 08 stw r9,8(r4) return rc; ffc14114: 38 60 00 00 li r3,0 ffc14118: 48 00 00 7c b ffc14194 } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) ffc1411c: 88 04 00 30 lbz r0,48(r4) ffc14120: 70 1c 00 01 andi. r28,r0,1 ffc14124: 41 82 00 40 beq- ffc14164 <== ALWAYS TAKEN { rc = fat_file_truncate(mt_entry, fat_fd, 0); ffc14128: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc1412c: 4b ff fe a1 bl ffc13fcc <== NOT EXECUTED if ( rc != RC_OK ) ffc14130: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc14134: 40 a2 00 60 bne+ ffc14194 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc14138: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1413c: 4b ff 88 b1 bl ffc0c9ec <_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) ) ffc14140: 80 9f 00 0c lwz r4,12(r31) <== NOT EXECUTED ffc14144: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc14148: 48 00 0e 69 bl ffc14fb0 <== NOT EXECUTED ffc1414c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc14150: 41 be 00 34 beq+ cr7,ffc14184 <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); ffc14154: 80 9f 00 0c lwz r4,12(r31) <== NOT EXECUTED ffc14158: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc1415c: 48 00 0e 25 bl ffc14f80 <== NOT EXECUTED ffc14160: 48 00 00 24 b ffc14184 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) ffc14164: 80 84 00 0c lwz r4,12(r4) ffc14168: 48 00 0e 49 bl ffc14fb0 ffc1416c: 2f 83 00 00 cmpwi cr7,r3,0 ffc14170: 41 9e 00 0c beq- cr7,ffc1417c <== ALWAYS TAKEN { fat_fd->links_num = 0; ffc14174: 93 9f 00 08 stw r28,8(r31) <== NOT EXECUTED ffc14178: 48 00 00 14 b ffc1418c <== NOT EXECUTED ffc1417c: 7f e3 fb 78 mr r3,r31 ffc14180: 4b ff 88 6d bl ffc0c9ec <_Chain_Extract> } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); ffc14184: 7f e3 fb 78 mr r3,r31 ffc14188: 4b ff 37 61 bl ffc078e8 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); ffc1418c: 7f a3 eb 78 mr r3,r29 ffc14190: 48 00 08 f1 bl ffc14a80 return rc; } ffc14194: 39 61 00 18 addi r11,r1,24 ffc14198: 4b fe e9 54 b ffc02aec <_restgpr_28_x> =============================================================================== ffc146c0 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc146c0: 94 21 ff d0 stwu r1,-48(r1) <== NOT EXECUTED ffc146c4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc146c8: 90 01 00 34 stw r0,52(r1) <== 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; ffc146cc: 80 04 00 1c lwz r0,28(r4) <== NOT EXECUTED int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc146d0: bf 61 00 1c stmw r27,28(r1) <== NOT EXECUTED ffc146d4: 7c 7c 1b 78 mr r28,r3 <== 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; ffc146d8: 3b e0 00 00 li r31,0 <== 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; ffc146dc: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; ffc146e0: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc146e4: 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) ffc146e8: 80 04 00 18 lwz r0,24(r4) <== NOT EXECUTED fat_file_fd_t *fat_fd ) { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc146ec: 83 c3 00 34 lwz r30,52(r3) <== 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) ffc146f0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc146f4: 41 be 00 b4 beq+ cr7,ffc147a8 <== 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); ffc146f8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc146fc: 48 00 03 85 bl ffc14a80 <== NOT EXECUTED if (rc != RC_OK) ffc14700: 7c 7f 1b 79 mr. r31,r3 <== NOT EXECUTED ffc14704: 41 a2 00 84 beq+ ffc14788 <== NOT EXECUTED ffc14708: 48 00 00 a0 b ffc147a8 <== NOT EXECUTED return rc; /* 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); ffc1470c: 80 7c 00 34 lwz r3,52(r28) <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) ffc14710: 3b a0 00 00 li r29,0 <== NOT EXECUTED return rc; /* 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); ffc14714: 4b ff f4 89 bl ffc13b9c <== NOT EXECUTED ffc14718: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) ffc1471c: 48 00 00 48 b ffc14764 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); ffc14720: 80 7e 00 58 lwz r3,88(r30) <== NOT EXECUTED ffc14724: 7c bd da 14 add r5,r29,r27 <== NOT EXECUTED ffc14728: 80 9e 00 5c lwz r4,92(r30) <== NOT EXECUTED ffc1472c: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc14730: 4b ff e7 29 bl ffc12e58 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) ffc14734: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc14738: 40 9e 00 14 bne- cr7,ffc1474c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); ffc1473c: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED ffc14740: 4b ff eb 11 bl ffc13250 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) ffc14744: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc14748: 41 be 00 18 beq+ cr7,ffc14760 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); ffc1474c: 48 00 8b 5d bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc14750: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc14754: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc14758: 3b e0 ff ff li r31,-1 <== NOT EXECUTED ffc1475c: 48 00 00 4c b ffc147a8 <== 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++ ) ffc14760: 3b bd 00 01 addi r29,r29,1 <== NOT EXECUTED ffc14764: 88 1e 00 04 lbz r0,4(r30) <== NOT EXECUTED ffc14768: 7f 9d 00 40 cmplw cr7,r29,r0 <== NOT EXECUTED ffc1476c: 41 9c ff b4 blt+ cr7,ffc14720 <== 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); ffc14770: 80 81 00 0c lwz r4,12(r1) <== NOT EXECUTED ffc14774: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc14778: 38 a1 00 0c addi r5,r1,12 <== NOT EXECUTED ffc1477c: 48 00 71 cd bl ffc1b948 <== NOT EXECUTED if ( rc != RC_OK ) ffc14780: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc14784: 40 82 00 20 bne- ffc147a4 <== NOT EXECUTED rc = fat_buf_release(fs_info); if (rc != RC_OK) return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc14788: 80 81 00 0c lwz r4,12(r1) <== NOT EXECUTED ffc1478c: 81 3e 00 0c lwz r9,12(r30) <== NOT EXECUTED ffc14790: 80 1e 00 10 lwz r0,16(r30) <== NOT EXECUTED ffc14794: 7c 89 48 38 and r9,r4,r9 <== NOT EXECUTED ffc14798: 7f 89 00 40 cmplw cr7,r9,r0 <== NOT EXECUTED ffc1479c: 41 9c ff 70 blt+ cr7,ffc1470c <== NOT EXECUTED ffc147a0: 48 00 00 08 b ffc147a8 <== 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); ffc147a4: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } return rc; } ffc147a8: 39 61 00 30 addi r11,r1,48 <== NOT EXECUTED ffc147ac: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc147b0: 4b fe e3 38 b ffc02ae8 <_restgpr_27_x> <== NOT EXECUTED =============================================================================== ffc14274 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { ffc14274: 94 21 ff c0 stwu r1,-64(r1) ffc14278: 7c 08 02 a6 mflr r0 ffc1427c: 90 01 00 44 stw r0,68(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; ffc14280: 38 00 00 00 li r0,0 rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { ffc14284: be e1 00 1c stmw r23,28(r1) ffc14288: 7c d8 33 78 mr r24,r6 ffc1428c: 7c 7d 1b 78 mr r29,r3 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc14290: 83 83 00 34 lwz r28,52(r3) rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { ffc14294: 7c 9f 23 78 mr r31,r4 uint32_t old_last_cl; uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; ffc14298: 90 b8 00 00 stw r5,0(r24) rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { ffc1429c: 7c bb 2b 78 mr r27,r5 uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; ffc142a0: 3b c0 00 00 li r30,0 uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) ffc142a4: 82 e4 00 18 lwz r23,24(r4) uint32_t *a_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; ffc142a8: 90 01 00 14 stw r0,20(r1) uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) ffc142ac: 7f 85 b8 40 cmplw cr7,r5,r23 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; ffc142b0: 90 01 00 0c stw r0,12(r1) uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) ffc142b4: 40 9d 01 ac ble- cr7,ffc14460 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc142b8: 80 04 00 20 lwz r0,32(r4) ffc142bc: 2f 80 00 01 cmpwi cr7,r0,1 ffc142c0: 40 be 00 1c bne+ cr7,ffc142dc <== ALWAYS TAKEN ffc142c4: 80 04 00 24 lwz r0,36(r4) <== NOT EXECUTED ffc142c8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc142cc: 40 9e 00 10 bne- cr7,ffc142dc <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc142d0: 88 1c 00 0a lbz r0,10(r28) <== 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)) && ffc142d4: 70 09 00 03 andi. r9,r0,3 <== NOT EXECUTED ffc142d8: 40 82 00 6c bne- ffc14344 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - ffc142dc: a1 3c 00 06 lhz r9,6(r28) * 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; ffc142e0: 3b c0 00 00 li r30,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))) & ffc142e4: 38 09 ff ff addi r0,r9,-1 ffc142e8: 7c 1a b8 38 and r26,r0,r23 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 - ffc142ec: 7f 5a 48 50 subf r26,r26,r9 ffc142f0: 7f 5a 00 38 and r26,r26,r0 (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; ffc142f4: 7e f7 d8 50 subf r23,r23,r27 if (bytes2add > bytes_remain) ffc142f8: 7f 97 d0 40 cmplw cr7,r23,r26 ffc142fc: 40 9d 01 64 ble- cr7,ffc14460 /* * 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) ffc14300: 7e fa b8 51 subf. r23,r26,r23 ffc14304: 41 82 01 5c beq- ffc14460 <== NEVER TAKEN return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; ffc14308: 88 1c 00 08 lbz r0,8(r28) ffc1430c: 3b 37 ff ff addi r25,r23,-1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, ffc14310: 7f a3 eb 78 mr r3,r29 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; ffc14314: 7f 39 04 30 srw r25,r25,r0 ffc14318: 3b 39 00 01 addi r25,r25,1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, ffc1431c: 38 81 00 14 addi r4,r1,20 ffc14320: 7f 25 cb 78 mr r5,r25 ffc14324: 38 c1 00 08 addi r6,r1,8 ffc14328: 38 e1 00 0c addi r7,r1,12 ffc1432c: 48 00 7b 49 bl ffc1be74 &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) ffc14330: 7c 7e 1b 79 mr. r30,r3 ffc14334: 40 82 01 2c bne- ffc14460 <== NEVER TAKEN return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) ffc14338: 80 01 00 08 lwz r0,8(r1) ffc1433c: 7f 49 03 79 or. r9,r26,r0 ffc14340: 40 a2 00 18 bne+ ffc14358 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOSPC); ffc14344: 48 00 8f 65 bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc14348: 38 00 00 1c li r0,28 <== NOT EXECUTED ffc1434c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc14350: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc14354: 48 00 01 0c b ffc14460 <== NOT EXECUTED /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) ffc14358: 7f 99 00 00 cmpw cr7,r25,r0 ffc1435c: 41 9e 00 2c beq- cr7,ffc14388 <== ALWAYS TAKEN *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - ffc14360: 89 3c 00 08 lbz r9,8(r28) <== NOT EXECUTED ffc14364: 7c 00 00 f8 not r0,r0 <== NOT EXECUTED ffc14368: 7f 20 ca 14 add r25,r0,r25 <== NOT EXECUTED ffc1436c: 7f 39 48 30 slw r25,r25,r9 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); ffc14370: a1 3c 00 06 lhz r9,6(r28) <== 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 - ffc14374: 7f 39 d8 50 subf r25,r25,r27 <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); ffc14378: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED ffc1437c: 7e f7 00 38 and r23,r23,r0 <== 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) - ffc14380: 7e f7 c8 50 subf r23,r23,r25 <== 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 - ffc14384: 92 f8 00 00 stw r23,0(r24) <== 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 ) ffc14388: 80 df 00 18 lwz r6,24(r31) ffc1438c: 2f 86 00 00 cmpwi cr7,r6,0 ffc14390: 40 9e 00 18 bne- cr7,ffc143a8 { fat_fd->map.disk_cln = fat_fd->cln = chain; ffc14394: 80 01 00 14 lwz r0,20(r1) fat_fd->map.file_cln = 0; ffc14398: 90 df 00 34 stw r6,52(r31) (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; ffc1439c: 90 1f 00 1c stw r0,28(r31) ffc143a0: 90 1f 00 38 stw r0,56(r31) ffc143a4: 48 00 00 70 b ffc14414 fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) ffc143a8: 80 1f 00 3c lwz r0,60(r31) ffc143ac: 2f 80 ff ff cmpwi cr7,r0,-1 ffc143b0: 41 9e 00 0c beq- cr7,ffc143bc <== NEVER TAKEN { old_last_cl = fat_fd->map.last_cln; ffc143b4: 90 01 00 10 stw r0,16(r1) ffc143b8: 48 00 00 28 b ffc143e0 } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, ffc143bc: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc143c0: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc143c4: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc143c8: 38 c6 ff ff addi r6,r6,-1 <== NOT EXECUTED ffc143cc: 38 e1 00 10 addi r7,r1,16 <== NOT EXECUTED ffc143d0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc143d4: 4b ff fd c9 bl ffc1419c <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) ffc143d8: 7c 7a 1b 79 mr. r26,r3 <== NOT EXECUTED ffc143dc: 40 82 00 1c bne- ffc143f8 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); ffc143e0: 80 81 00 10 lwz r4,16(r1) ffc143e4: 7f a3 eb 78 mr r3,r29 ffc143e8: 80 a1 00 14 lwz r5,20(r1) ffc143ec: 48 00 77 19 bl ffc1bb04 if ( rc != RC_OK ) ffc143f0: 7c 7a 1b 79 mr. r26,r3 ffc143f4: 41 a2 00 18 beq+ ffc1440c <== ALWAYS TAKEN { fat_free_fat_clusters_chain(mt_entry, chain); ffc143f8: 80 81 00 14 lwz r4,20(r1) <== NOT EXECUTED ffc143fc: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED return rc; ffc14400: 7f 5e d3 78 mr r30,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); ffc14404: 48 00 79 99 bl ffc1bd9c <== NOT EXECUTED return rc; ffc14408: 48 00 00 58 b ffc14460 <== NOT EXECUTED } fat_buf_release(fs_info); ffc1440c: 7f 83 e3 78 mr r3,r28 ffc14410: 48 00 06 71 bl ffc14a80 } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) ffc14414: 80 01 00 08 lwz r0,8(r1) ffc14418: 2f 80 00 00 cmpwi cr7,r0,0 ffc1441c: 41 9e 00 40 beq- cr7,ffc1445c <== NEVER TAKEN { fat_fd->map.last_cln = last_cl; ffc14420: 80 01 00 0c lwz r0,12(r1) ffc14424: 90 1f 00 3c stw r0,60(r31) if (fat_fd->fat_file_type == FAT_DIRECTORY) ffc14428: 80 1f 00 10 lwz r0,16(r31) ffc1442c: 2f 80 00 01 cmpwi cr7,r0,1 ffc14430: 40 be 00 2c bne+ cr7,ffc1445c { rc = fat_init_clusters_chain(mt_entry, chain); ffc14434: 80 81 00 14 lwz r4,20(r1) ffc14438: 7f a3 eb 78 mr r3,r29 ffc1443c: 48 00 09 b5 bl ffc14df0 if ( rc != RC_OK ) ffc14440: 7c 7c 1b 79 mr. r28,r3 ffc14444: 41 a2 00 18 beq+ ffc1445c <== ALWAYS TAKEN { fat_free_fat_clusters_chain(mt_entry, chain); ffc14448: 80 81 00 14 lwz r4,20(r1) <== NOT EXECUTED ffc1444c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED return rc; ffc14450: 7f 9e e3 78 mr r30,r28 <== 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); ffc14454: 48 00 79 49 bl ffc1bd9c <== NOT EXECUTED return rc; ffc14458: 48 00 00 08 b ffc14460 <== NOT EXECUTED } } } fat_fd->fat_file_size = new_length; ffc1445c: 93 7f 00 18 stw r27,24(r31) return RC_OK; } ffc14460: 39 61 00 40 addi r11,r1,64 ffc14464: 7f c3 f3 78 mr r3,r30 ffc14468: 4b fe e6 70 b ffc02ad8 <_restgpr_23_x> =============================================================================== ffc1419c : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { ffc1419c: 94 21 ff d0 stwu r1,-48(r1) ffc141a0: 7c 08 02 a6 mflr r0 uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) ffc141a4: 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, ...) { ffc141a8: 90 01 00 34 stw r0,52(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; ffc141ac: 38 00 00 00 li r0,0 uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); ffc141b0: 7c 29 0b 78 mr r9,r1 int cmd, ...) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; ffc141b4: 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); ffc141b8: 38 00 00 03 li r0,3 ffc141bc: 98 01 00 0c stb r0,12(r1) ffc141c0: 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, ...) { ffc141c4: 90 c1 00 1c stw r6,28(r1) ffc141c8: 90 e1 00 20 stw r7,32(r1) ffc141cc: bf c1 00 28 stmw r30,40(r1) uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); ffc141d0: 94 09 00 10 stwu r0,16(r9) fat_file_fd_t *fat_fd, int cmd, ...) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc141d4: 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); ffc141d8: 91 21 00 14 stw r9,20(r1) switch (cmd) ffc141dc: 40 be 00 80 bne+ cr7,ffc1425c <== NEVER TAKEN { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); ffc141e0: 3b c0 00 05 li r30,5 va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ffc141e4: 80 09 00 0c lwz r0,12(r9) ret = va_arg(ap, uint32_t *); ffc141e8: 9b c1 00 0c stb r30,12(r1) ffc141ec: 83 e9 00 10 lwz r31,16(r9) /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { ffc141f0: 81 24 00 18 lwz r9,24(r4) ffc141f4: 7f 80 48 40 cmplw cr7,r0,r9 ffc141f8: 41 bc 00 10 blt+ cr7,ffc14208 <== ALWAYS TAKEN va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); ffc141fc: 48 00 90 ad bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc14200: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED ffc14204: 48 00 00 64 b ffc14268 <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc14208: 81 24 00 20 lwz r9,32(r4) ffc1420c: 2f 89 00 01 cmpwi cr7,r9,1 ffc14210: 40 9e 00 28 bne- cr7,ffc14238 ffc14214: 81 24 00 24 lwz r9,36(r4) ffc14218: 2f 89 00 00 cmpwi cr7,r9,0 ffc1421c: 40 9e 00 1c bne- cr7,ffc14238 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc14220: 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)) && ffc14224: 71 48 00 03 andi. r8,r10,3 ffc14228: 41 82 00 10 beq- ffc14238 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; ffc1422c: 91 3f 00 00 stw r9,0(r31) rc = RC_OK; ffc14230: 38 60 00 00 li r3,0 break; ffc14234: 48 00 00 38 b ffc1426c } cl_start = pos >> fs_info->vol.bpc_log2; ffc14238: 88 ab 00 08 lbz r5,8(r11) rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); ffc1423c: 38 c1 00 08 addi r6,r1,8 ffc14240: 7c 05 2c 30 srw r5,r0,r5 ffc14244: 4b ff f8 a1 bl ffc13ae4 if ( rc != RC_OK ) ffc14248: 7c 83 23 79 mr. r3,r4 ffc1424c: 40 82 00 20 bne- ffc1426c <== NEVER TAKEN break; *ret = cur_cln; ffc14250: 80 01 00 08 lwz r0,8(r1) ffc14254: 90 1f 00 00 stw r0,0(r31) break; ffc14258: 48 00 00 14 b ffc1426c default: errno = EINVAL; ffc1425c: 48 00 90 4d bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc14260: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc14264: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED rc = -1; ffc14268: 38 60 ff ff li r3,-1 <== NOT EXECUTED break; } va_end(ap); return rc; } ffc1426c: 39 61 00 30 addi r11,r1,48 ffc14270: 4b fe e8 84 b ffc02af4 <_restgpr_30_x> =============================================================================== ffc13ae4 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { ffc13ae4: 94 21 ff d0 stwu r1,-48(r1) ffc13ae8: 7c 08 02 a6 mflr r0 ffc13aec: 90 01 00 34 stw r0,52(r1) ffc13af0: bf 41 00 18 stmw r26,24(r1) ffc13af4: 7c 7d 1b 78 mr r29,r3 ffc13af8: 7c 9f 23 78 mr r31,r4 int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) ffc13afc: 83 44 00 34 lwz r26,52(r4) rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { ffc13b00: 7c be 2b 78 mr r30,r5 ffc13b04: 7c db 33 78 mr r27,r6 int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) ffc13b08: 7f 85 d0 00 cmpw cr7,r5,r26 ffc13b0c: 40 be 00 10 bne+ cr7,ffc13b1c <== NEVER TAKEN *disk_cln = fat_fd->map.disk_cln; ffc13b10: 80 04 00 38 lwz r0,56(r4) ffc13b14: 90 06 00 00 stw r0,0(r6) ffc13b18: 48 00 00 6c b ffc13b84 { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) ffc13b1c: 7f 85 d0 40 cmplw cr7,r5,r26 <== NOT EXECUTED ffc13b20: 40 9d 00 14 ble- cr7,ffc13b34 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; ffc13b24: 80 04 00 38 lwz r0,56(r4) <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; ffc13b28: 7f 5a 28 50 subf r26,r26,r5 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; ffc13b2c: 90 01 00 08 stw r0,8(r1) <== NOT EXECUTED ffc13b30: 48 00 00 10 b ffc13b40 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; ffc13b34: 80 04 00 1c lwz r0,28(r4) <== NOT EXECUTED ffc13b38: 7c ba 2b 78 mr r26,r5 <== NOT EXECUTED ffc13b3c: 90 01 00 08 stw r0,8(r1) <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) ffc13b40: 3b 80 00 00 li r28,0 <== NOT EXECUTED ffc13b44: 48 00 00 28 b ffc13b6c <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc13b48: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc13b4c: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED ffc13b50: 48 00 7d f9 bl ffc1b948 <== NOT EXECUTED if ( rc != RC_OK ) ffc13b54: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc13b58: 41 a2 00 10 beq+ ffc13b68 <== NOT EXECUTED return rc; ffc13b5c: 7c 6b 1b 78 mr r11,r3 <== NOT EXECUTED ffc13b60: 7c 6a fe 70 srawi r10,r3,31 <== NOT EXECUTED ffc13b64: 48 00 00 28 b ffc13b8c <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) ffc13b68: 3b 9c 00 01 addi r28,r28,1 <== NOT EXECUTED ffc13b6c: 7f 9c d0 00 cmpw cr7,r28,r26 <== NOT EXECUTED ffc13b70: 80 81 00 08 lwz r4,8(r1) <== NOT EXECUTED ffc13b74: 40 9e ff d4 bne+ cr7,ffc13b48 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; ffc13b78: 93 df 00 34 stw r30,52(r31) <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; ffc13b7c: 90 9f 00 38 stw r4,56(r31) <== NOT EXECUTED *disk_cln = cur_cln; ffc13b80: 90 9b 00 00 stw r4,0(r27) <== NOT EXECUTED } return RC_OK; ffc13b84: 39 40 00 00 li r10,0 ffc13b88: 39 60 00 00 li r11,0 } ffc13b8c: 7d 64 5b 78 mr r4,r11 ffc13b90: 39 61 00 30 addi r11,r1,48 ffc13b94: 7d 43 53 78 mr r3,r10 ffc13b98: 4b fe ef 4c b ffc02ae4 <_restgpr_26_x> =============================================================================== ffc14668 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc14668: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc1466c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc14670: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc14674: bf a1 00 0c stmw r29,12(r1) <== NOT EXECUTED ffc14678: 7c 9f 23 78 mr r31,r4 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t key = 0; key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); ffc1467c: 38 84 00 20 addi r4,r4,32 <== NOT EXECUTED fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { fat_fs_info_t *fs_info = mt_entry->fs_info; ffc14680: 83 c3 00 34 lwz r30,52(r3) <== NOT EXECUTED uint32_t key = 0; key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); ffc14684: 4b ff f5 4d bl ffc13bd0 <== NOT EXECUTED ffc14688: 7c 7d 1b 78 mr r29,r3 <== 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); ffc1468c: 57 bd 07 fe clrlwi r29,r29,31 <== NOT EXECUTED ffc14690: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc14694: 4b ff 83 59 bl ffc0c9ec <_Chain_Extract> <== NOT EXECUTED ffc14698: 1f bd 00 0c mulli r29,r29,12 <== NOT EXECUTED ffc1469c: 80 7e 00 6c lwz r3,108(r30) <== 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 ); ffc146a0: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc146a4: 7c 63 ea 14 add r3,r3,r29 <== NOT EXECUTED ffc146a8: 4b ff 83 15 bl ffc0c9bc <_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; ffc146ac: 88 1f 00 30 lbz r0,48(r31) <== NOT EXECUTED } ffc146b0: 39 61 00 18 addi r11,r1,24 <== 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; ffc146b4: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED ffc146b8: 98 1f 00 30 stb r0,48(r31) <== NOT EXECUTED } ffc146bc: 4b fe e4 34 b ffc02af0 <_restgpr_29_x> <== NOT EXECUTED =============================================================================== ffc13cbc : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { ffc13cbc: 94 21 ff c8 stwu r1,-56(r1) ffc13cc0: 7c 08 02 a6 mflr r0 ffc13cc4: bf 21 00 1c stmw r25,28(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; fat_file_fd_t *lfat_fd = NULL; ffc13cc8: 7c 3f 0b 78 mr r31,r1 fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { ffc13ccc: 7c 7d 1b 78 mr r29,r3 ffc13cd0: 90 01 00 3c stw r0,60(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; fat_file_fd_t *lfat_fd = NULL; ffc13cd4: 38 00 00 00 li r0,0 fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { ffc13cd8: 7c 99 23 78 mr r25,r4 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; fat_file_fd_t *lfat_fd = NULL; ffc13cdc: 94 1f 00 08 stwu r0,8(r31) fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { ffc13ce0: 7c bb 2b 78 mr r27,r5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc13ce4: 83 83 00 34 lwz r28,52(r3) fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(mt_entry, &dir_pos->sname); ffc13ce8: 4b ff fe e9 bl ffc13bd0 ffc13cec: 7c 7e 1b 78 mr r30,r3 /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); ffc13cf0: 80 9c 00 68 lwz r4,104(r28) ffc13cf4: 7f a3 eb 78 mr r3,r29 ffc13cf8: 7f c5 f3 78 mr r5,r30 ffc13cfc: 38 c0 00 00 li r6,0 ffc13d00: 7f e7 fb 78 mr r7,r31 ffc13d04: 4b ff ff 25 bl ffc13c28 <_hash_search> if ( rc == RC_OK ) ffc13d08: 2c 03 00 00 cmpwi r3,0 ffc13d0c: 40 82 00 1c bne- ffc13d28 { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; ffc13d10: 81 21 00 08 lwz r9,8(r1) lfat_fd->links_num++; ffc13d14: 81 69 00 08 lwz r11,8(r9) /* 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; ffc13d18: 91 3b 00 00 stw r9,0(r27) lfat_fd->links_num++; ffc13d1c: 38 0b 00 01 addi r0,r11,1 ffc13d20: 90 09 00 08 stw r0,8(r9) return rc; ffc13d24: 48 00 00 d4 b ffc13df8 } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); ffc13d28: 80 9c 00 6c lwz r4,108(r28) ffc13d2c: 7f e7 fb 78 mr r7,r31 ffc13d30: 7f c5 f3 78 mr r5,r30 ffc13d34: 7f c6 f3 78 mr r6,r30 ffc13d38: 7f a3 eb 78 mr r3,r29 ffc13d3c: 4b ff fe ed bl ffc13c28 <_hash_search> ffc13d40: 7c 7a 1b 78 mr r26,r3 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); ffc13d44: 38 60 00 44 li r3,68 ffc13d48: 4b ff 43 0d bl ffc08054 if ( lfat_fd == NULL ) ffc13d4c: 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)); ffc13d50: 90 7b 00 00 stw r3,0(r27) ffc13d54: 7c 7f 1b 78 mr r31,r3 ffc13d58: 90 61 00 08 stw r3,8(r1) if ( lfat_fd == NULL ) ffc13d5c: 41 9e 00 6c beq- cr7,ffc13dc8 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); ffc13d60: 38 a0 00 44 li r5,68 ffc13d64: 38 80 00 00 li r4,0 ffc13d68: 48 00 a4 59 bl ffc1e1c0 lfat_fd->links_num = 1; ffc13d6c: 38 00 00 01 li r0,1 ffc13d70: 90 1f 00 08 stw r0,8(r31) lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) ffc13d74: 2f 9a 00 00 cmpwi cr7,r26,0 lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; ffc13d78: 39 3f 00 20 addi r9,r31,32 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; ffc13d7c: 88 1f 00 30 lbz r0,48(r31) ffc13d80: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc13d84: 98 1f 00 30 stb r0,48(r31) lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; ffc13d88: 38 00 ff ff li r0,-1 ffc13d8c: 90 1f 00 3c stw r0,60(r31) lfat_fd->dir_pos = *dir_pos; ffc13d90: 7c b9 84 aa lswi r5,r25,16 ffc13d94: 7c a9 85 aa stswi r5,r9,16 if ( rc != RC_OK ) ffc13d98: 41 9e 00 0c beq- cr7,ffc13da4 <== NEVER TAKEN lfat_fd->ino = key; ffc13d9c: 93 df 00 0c stw r30,12(r31) ffc13da0: 48 00 00 3c b ffc13ddc else { lfat_fd->ino = fat_get_unique_ino(mt_entry); ffc13da4: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc13da8: 48 00 11 01 bl ffc14ea8 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) ffc13dac: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); ffc13db0: 90 7f 00 0c stw r3,12(r31) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) ffc13db4: 80 09 00 0c lwz r0,12(r9) <== NOT EXECUTED ffc13db8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc13dbc: 40 be 00 20 bne+ cr7,ffc13ddc <== NOT EXECUTED { free((*fat_fd)); ffc13dc0: 80 7b 00 00 lwz r3,0(r27) <== NOT EXECUTED ffc13dc4: 4b ff 3b 25 bl ffc078e8 <== 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 ); ffc13dc8: 48 00 94 e1 bl ffc1d2a8 <__errno> ffc13dcc: 38 00 00 0c li r0,12 ffc13dd0: 90 03 00 00 stw r0,0(r3) ffc13dd4: 38 60 ff ff li r3,-1 ffc13dd8: 48 00 00 20 b ffc13df8 */ 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); ffc13ddc: 57 de 07 fe clrlwi r30,r30,31 ffc13de0: 80 7c 00 68 lwz r3,104(r28) ffc13de4: 1f de 00 0c mulli r30,r30,12 ffc13de8: 80 81 00 08 lwz r4,8(r1) ffc13dec: 7c 63 f2 14 add r3,r3,r30 ffc13df0: 4b ff 8b cd bl ffc0c9bc <_Chain_Append> /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; ffc13df4: 38 60 00 00 li r3,0 } ffc13df8: 39 61 00 38 addi r11,r1,56 ffc13dfc: 4b fe ec e4 b ffc02ae0 <_restgpr_25_x> =============================================================================== ffc13e14 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc13e14: 94 21 ff b8 stwu r1,-72(r1) ffc13e18: 7c 08 02 a6 mflr r0 ffc13e1c: be a1 00 1c stmw r21,28(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) ffc13e20: 7c de 33 79 mr. r30,r6 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc13e24: 7c 7b 1b 78 mr r27,r3 ffc13e28: 90 01 00 4c stw r0,76(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; ffc13e2c: 38 00 00 00 li r0,0 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc13e30: 7c 9d 23 78 mr r29,r4 int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc13e34: 83 e3 00 34 lwz r31,52(r3) fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc13e38: 7c bc 2b 78 mr r28,r5 ffc13e3c: 7c f7 3b 78 mr r23,r7 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; ffc13e40: 90 01 00 08 stw r0,8(r1) uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) return cmpltd; ffc13e44: 38 60 00 00 li r3,0 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) ffc13e48: 41 82 01 7c beq- ffc13fc4 <== NEVER TAKEN /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) ffc13e4c: 81 24 00 18 lwz r9,24(r4) ffc13e50: 7f 85 48 40 cmplw cr7,r5,r9 ffc13e54: 40 9c 01 70 bge- cr7,ffc13fc4 <== NEVER TAKEN return FAT_EOF; if ((count > fat_fd->fat_file_size) || ffc13e58: 7f 9e 48 40 cmplw cr7,r30,r9 ffc13e5c: 41 9d 00 10 bgt- cr7,ffc13e6c <== NEVER TAKEN (start > fat_fd->fat_file_size - count)) ffc13e60: 7c 1e 48 50 subf r0,r30,r9 * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || ffc13e64: 7f 85 00 40 cmplw cr7,r5,r0 ffc13e68: 40 9d 00 08 ble- cr7,ffc13e70 <== ALWAYS TAKEN (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; ffc13e6c: 7f dc 48 50 subf r30,r28,r9 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc13e70: 80 1d 00 20 lwz r0,32(r29) ffc13e74: 2f 80 00 01 cmpwi cr7,r0,1 ffc13e78: 40 9e 00 5c bne- cr7,ffc13ed4 ffc13e7c: 80 1d 00 24 lwz r0,36(r29) ffc13e80: 2f 80 00 00 cmpwi cr7,r0,0 ffc13e84: 40 9e 00 50 bne- cr7,ffc13ed4 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc13e88: 88 1f 00 0a lbz r0,10(r31) 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)) && ffc13e8c: 70 09 00 03 andi. r9,r0,3 ffc13e90: 41 a2 00 44 beq+ ffc13ed4 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); ffc13e94: 80 9d 00 1c lwz r4,28(r29) ffc13e98: 7f e3 fb 78 mr r3,r31 ffc13e9c: 4b ff fd 01 bl ffc13b9c sec += (start >> fs_info->vol.sec_log2); ffc13ea0: 88 9f 00 02 lbz r4,2(r31) byte = start & (fs_info->vol.bps - 1); ffc13ea4: a0 bf 00 00 lhz r5,0(r31) ret = _fat_block_read(mt_entry, sec, byte, count, buf); ffc13ea8: 7f c6 f3 78 mr r6,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); ffc13eac: 7f 84 24 30 srw r4,r28,r4 byte = start & (fs_info->vol.bps - 1); ffc13eb0: 38 a5 ff ff addi r5,r5,-1 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); ffc13eb4: 7c 83 22 14 add r4,r3,r4 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); ffc13eb8: 7f 85 28 38 and r5,r28,r5 ffc13ebc: 7f 63 db 78 mr r3,r27 ffc13ec0: 7e e7 bb 78 mr r7,r23 ffc13ec4: 48 00 0d 11 bl ffc14bd4 <_fat_block_read> if ( ret < 0 ) ffc13ec8: 2c 03 00 00 cmpwi r3,0 ffc13ecc: 40 a0 00 f8 bge+ ffc13fc4 <== ALWAYS TAKEN ffc13ed0: 48 00 00 f0 b ffc13fc0 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc13ed4: 8b 1f 00 08 lbz r24,8(r31) save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); ffc13ed8: 3a c1 00 08 addi r22,r1,8 ffc13edc: 7f 63 db 78 mr r3,r27 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); ffc13ee0: a3 3f 00 06 lhz r25,6(r31) return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc13ee4: 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); ffc13ee8: 7f a4 eb 78 mr r4,r29 ffc13eec: 7f 05 c3 78 mr r5,r24 ffc13ef0: 7e c6 b3 78 mr r6,r22 ffc13ef4: 4b ff fb f1 bl ffc13ae4 if (rc != RC_OK) ffc13ef8: 2f 84 00 00 cmpwi cr7,r4,0 ffc13efc: 7c 83 23 78 mr r3,r4 ffc13f00: 40 9e 00 c4 bne- cr7,ffc13fc4 <== NEVER TAKEN return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); ffc13f04: 3b 39 ff ff addi r25,r25,-1 ffc13f08: 7f 9c c8 38 and r28,r28,r25 ffc13f0c: 7f 95 e3 78 mr r21,r28 ffc13f10: 3b 20 00 00 li r25,0 ffc13f14: 3b 40 00 00 li r26,0 ffc13f18: 48 00 00 7c b ffc13f94 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); ffc13f1c: a3 3f 00 06 lhz r25,6(r31) ffc13f20: 7f 35 c8 50 subf r25,r21,r25 ffc13f24: 7f 99 f0 40 cmplw cr7,r25,r30 ffc13f28: 40 9d 00 08 ble- cr7,ffc13f30 ffc13f2c: 7f d9 f3 78 mr r25,r30 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); ffc13f30: 80 81 00 08 lwz r4,8(r1) ffc13f34: 80 7b 00 34 lwz r3,52(r27) ffc13f38: 4b ff fc 65 bl ffc13b9c sec += (ofs >> fs_info->vol.sec_log2); ffc13f3c: 88 9f 00 02 lbz r4,2(r31) byte = ofs & (fs_info->vol.bps - 1); ffc13f40: a0 bf 00 00 lhz r5,0(r31) ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); ffc13f44: 7f 26 cb 78 mr r6,r25 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); ffc13f48: 7e a4 24 30 srw r4,r21,r4 byte = ofs & (fs_info->vol.bps - 1); ffc13f4c: 38 a5 ff ff addi r5,r5,-1 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); ffc13f50: 7c 83 22 14 add r4,r3,r4 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); ffc13f54: 7e a5 28 38 and r5,r21,r5 ffc13f58: 7f 63 db 78 mr r3,r27 ffc13f5c: 7c f7 d2 14 add r7,r23,r26 ffc13f60: 48 00 0c 75 bl ffc14bd4 <_fat_block_read> if ( ret < 0 ) ffc13f64: 2f 83 00 00 cmpwi cr7,r3,0 ffc13f68: 41 9c 00 58 blt- cr7,ffc13fc0 <== NEVER TAKEN return -1; count -= c; ffc13f6c: 7f d9 f0 50 subf r30,r25,r30 cmpltd += c; ffc13f70: 7f 5a ca 14 add r26,r26,r25 save_cln = cur_cln; ffc13f74: 83 21 00 08 lwz r25,8(r1) rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc13f78: 7f 63 db 78 mr r3,r27 ffc13f7c: 7f 24 cb 78 mr r4,r25 ffc13f80: 7e c5 b3 78 mr r5,r22 ffc13f84: 48 00 79 c5 bl ffc1b948 if ( rc != RC_OK ) ffc13f88: 2c 03 00 00 cmpwi r3,0 ffc13f8c: 40 82 00 38 bne- ffc13fc4 <== NEVER TAKEN return rc; ofs = 0; ffc13f90: 3a a0 00 00 li r21,0 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc13f94: 2f 9e 00 00 cmpwi cr7,r30,0 ffc13f98: 40 9e ff 84 bne+ cr7,ffc13f1c } /* 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); ffc13f9c: 88 1f 00 08 lbz r0,8(r31) ffc13fa0: 3b 9c ff ff addi r28,r28,-1 ffc13fa4: 7f 9c d2 14 add r28,r28,r26 fat_fd->map.disk_cln = save_cln; ffc13fa8: 93 3d 00 38 stw r25,56(r29) } /* 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); ffc13fac: 7f 9c 04 30 srw r28,r28,r0 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ffc13fb0: 7f 1c c2 14 add r24,r28,r24 ffc13fb4: 93 1d 00 34 stw r24,52(r29) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; ffc13fb8: 7f 43 d3 78 mr r3,r26 ffc13fbc: 48 00 00 08 b ffc13fc4 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; ffc13fc0: 38 60 ff ff li r3,-1 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } ffc13fc4: 39 61 00 48 addi r11,r1,72 ffc13fc8: 4b fe eb 08 b ffc02ad0 <_restgpr_21_x> =============================================================================== ffc147b4 : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc147b4: 94 21 ff d8 stwu r1,-40(r1) ffc147b8: 7c 08 02 a6 mflr r0 ffc147bc: 90 01 00 2c stw r0,44(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; ffc147c0: 80 04 00 1c lwz r0,28(r4) int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { ffc147c4: bf 81 00 18 stmw r28,24(r1) ffc147c8: 7c 7c 1b 78 mr r28,r3 ffc147cc: 7c 9f 23 78 mr r31,r4 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; ffc147d0: 90 01 00 08 stw r0,8(r1) uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc147d4: 80 04 00 20 lwz r0,32(r4) 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; ffc147d8: 83 c3 00 34 lwz r30,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)) && ffc147dc: 2f 80 00 01 cmpwi cr7,r0,1 ffc147e0: 40 be 00 28 bne+ cr7,ffc14808 <== ALWAYS TAKEN ffc147e4: 80 04 00 24 lwz r0,36(r4) <== NOT EXECUTED ffc147e8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc147ec: 40 9e 00 1c bne- cr7,ffc14808 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc147f0: 88 1e 00 0a lbz r0,10(r30) <== 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)) && ffc147f4: 70 09 00 03 andi. r9,r0,3 <== NOT EXECUTED ffc147f8: 41 a2 00 10 beq+ ffc14808 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; ffc147fc: 80 1e 00 28 lwz r0,40(r30) <== NOT EXECUTED ffc14800: 90 04 00 18 stw r0,24(r4) <== NOT EXECUTED ffc14804: 48 00 00 58 b ffc1485c <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; ffc14808: 38 00 00 00 li r0,0 ffc1480c: 90 1f 00 18 stw r0,24(r31) while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc14810: 48 00 00 30 b ffc14840 { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc14814: 7f 83 e3 78 mr r3,r28 ffc14818: 7f a4 eb 78 mr r4,r29 ffc1481c: 38 a1 00 08 addi r5,r1,8 ffc14820: 48 00 71 29 bl ffc1b948 if ( rc != RC_OK ) ffc14824: 2c 03 00 00 cmpwi r3,0 ffc14828: 40 82 00 38 bne- ffc14860 <== NEVER TAKEN return rc; fat_fd->fat_file_size += fs_info->vol.bpc; ffc1482c: a0 1e 00 06 lhz r0,6(r30) ffc14830: 81 3f 00 18 lwz r9,24(r31) ffc14834: 7c 09 02 14 add r0,r9,r0 ffc14838: 90 1f 00 18 stw r0,24(r31) fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { save_cln = cur_cln; ffc1483c: 7f a0 eb 78 mr r0,r29 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc14840: 83 a1 00 08 lwz r29,8(r1) ffc14844: 81 7e 00 0c lwz r11,12(r30) ffc14848: 81 3e 00 10 lwz r9,16(r30) ffc1484c: 7f ab 58 38 and r11,r29,r11 ffc14850: 7f 8b 48 40 cmplw cr7,r11,r9 ffc14854: 41 9c ff c0 blt+ cr7,ffc14814 if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; ffc14858: 90 1f 00 3c stw r0,60(r31) return rc; ffc1485c: 38 60 00 00 li r3,0 } ffc14860: 39 61 00 28 addi r11,r1,40 ffc14864: 4b fe e2 88 b ffc02aec <_restgpr_28_x> =============================================================================== ffc13fcc : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { ffc13fcc: 94 21 ff d8 stwu r1,-40(r1) ffc13fd0: 7c 08 02 a6 mflr r0 ffc13fd4: 90 01 00 2c stw r0,44(r1) int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; ffc13fd8: 38 00 00 00 li r0,0 uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) ffc13fdc: 81 24 00 18 lwz r9,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; ffc13fe0: 90 01 00 0c stw r0,12(r1) uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; ffc13fe4: 38 00 ff ff li r0,-1 if ( new_length >= fat_fd->fat_file_size ) ffc13fe8: 7f 85 48 40 cmplw cr7,r5,r9 fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { ffc13fec: bf a1 00 1c stmw r29,28(r1) ffc13ff0: 7c 7d 1b 78 mr r29,r3 ffc13ff4: 7c 9e 23 78 mr r30,r4 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc13ff8: 81 63 00 34 lwz r11,52(r3) uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; ffc13ffc: 90 01 00 08 stw r0,8(r1) if ( new_length >= fat_fd->fat_file_size ) ffc14000: 40 9c 00 d4 bge- cr7,ffc140d4 <== NEVER TAKEN return rc; assert(fat_fd->fat_file_size); ffc14004: 2f 89 00 00 cmpwi cr7,r9,0 ffc14008: 40 be 00 24 bne+ cr7,ffc1402c <== ALWAYS TAKEN ffc1400c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc14010: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc14014: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc14018: 38 63 df 92 addi r3,r3,-8302 <== NOT EXECUTED ffc1401c: 38 80 02 6d li r4,621 <== NOT EXECUTED ffc14020: 38 a5 df 80 addi r5,r5,-8320 <== NOT EXECUTED ffc14024: 38 c6 df da addi r6,r6,-8230 <== NOT EXECUTED ffc14028: 4b ff 32 59 bl ffc07280 <__assert_func> <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; ffc1402c: a3 eb 00 06 lhz r31,6(r11) ffc14030: 88 0b 00 08 lbz r0,8(r11) ffc14034: 3b ff ff ff addi r31,r31,-1 ffc14038: 7f ff 2a 14 add r31,r31,r5 ffc1403c: 7f ff 04 30 srw r31,r31,r0 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) ffc14040: 7f eb 00 30 slw r11,r31,r0 ffc14044: 7f 8b 48 40 cmplw cr7,r11,r9 return RC_OK; ffc14048: 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) ffc1404c: 40 9c 00 8c bge- cr7,ffc140d8 <== NEVER TAKEN return RC_OK; if (cl_start != 0) ffc14050: 2f 9f 00 00 cmpwi cr7,r31,0 ffc14054: 41 9e 00 18 beq- cr7,ffc1406c <== ALWAYS TAKEN { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); ffc14058: 38 bf ff ff addi r5,r31,-1 <== NOT EXECUTED ffc1405c: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc14060: 4b ff fa 85 bl ffc13ae4 <== NOT EXECUTED if (rc != RC_OK) ffc14064: 7c 80 23 79 mr. r0,r4 <== NOT EXECUTED ffc14068: 40 82 00 70 bne- ffc140d8 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); ffc1406c: 7f a3 eb 78 mr r3,r29 ffc14070: 7f c4 f3 78 mr r4,r30 ffc14074: 7f e5 fb 78 mr r5,r31 ffc14078: 38 c1 00 0c addi r6,r1,12 ffc1407c: 4b ff fa 69 bl ffc13ae4 if (rc != RC_OK) ffc14080: 7c 80 23 79 mr. r0,r4 ffc14084: 40 a2 00 54 bne+ ffc140d8 <== NEVER TAKEN return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); ffc14088: 80 81 00 0c lwz r4,12(r1) ffc1408c: 7f a3 eb 78 mr r3,r29 ffc14090: 48 00 7d 0d bl ffc1bd9c if (rc != RC_OK) ffc14094: 7c 60 1b 79 mr. r0,r3 ffc14098: 40 82 00 40 bne- ffc140d8 <== NEVER TAKEN return rc; if (cl_start != 0) ffc1409c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc140a0: 41 be 00 38 beq+ cr7,ffc140d8 <== ALWAYS TAKEN { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); ffc140a4: 80 81 00 08 lwz r4,8(r1) <== NOT EXECUTED ffc140a8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc140ac: 38 a0 ff ff li r5,-1 <== NOT EXECUTED ffc140b0: 48 00 7a 55 bl ffc1bb04 <== NOT EXECUTED if ( rc != RC_OK ) ffc140b4: 7c 60 1b 79 mr. r0,r3 <== NOT EXECUTED ffc140b8: 40 82 00 20 bne- ffc140d8 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; ffc140bc: 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; ffc140c0: 3b ff ff ff addi r31,r31,-1 <== NOT EXECUTED ffc140c4: 93 fe 00 34 stw r31,52(r30) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; ffc140c8: 91 3e 00 38 stw r9,56(r30) <== NOT EXECUTED fat_fd->map.last_cln = new_last_cln; ffc140cc: 91 3e 00 3c stw r9,60(r30) <== NOT EXECUTED ffc140d0: 48 00 00 08 b ffc140d8 <== NOT EXECUTED uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) return rc; ffc140d4: 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; } ffc140d8: 39 61 00 28 addi r11,r1,40 ffc140dc: 7c 03 03 78 mr r3,r0 ffc140e0: 4b fe ea 10 b ffc02af0 <_restgpr_29_x> =============================================================================== ffc1446c : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc1446c: 94 21 ff b8 stwu r1,-72(r1) ffc14470: 7c 08 02 a6 mflr r0 ffc14474: be a1 00 1c stmw r21,28(r1) uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) ffc14478: 7c df 33 79 mr. r31,r6 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc1447c: 7c 7b 1b 78 mr r27,r3 ffc14480: 90 01 00 4c stw r0,76(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; ffc14484: 38 00 00 00 li r0,0 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc14488: 7c 9d 23 78 mr r29,r4 ffc1448c: 7c bc 2b 78 mr r28,r5 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc14490: 83 c3 00 34 lwz r30,52(r3) fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc14494: 7c f8 3b 78 mr r24,r7 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; ffc14498: 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; ffc1449c: 90 01 00 08 stw r0,8(r1) if ( count == 0 ) ffc144a0: 41 82 01 bc beq- ffc1465c <== NEVER TAKEN return cmpltd; if ( start > fat_fd->fat_file_size ) ffc144a4: 80 04 00 18 lwz r0,24(r4) ffc144a8: 7f 85 00 40 cmplw cr7,r5,r0 ffc144ac: 41 9d 00 1c bgt- cr7,ffc144c8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || ffc144b0: 80 04 00 14 lwz r0,20(r4) ffc144b4: 7f 9f 00 40 cmplw cr7,r31,r0 ffc144b8: 41 9d 00 10 bgt- cr7,ffc144c8 <== NEVER TAKEN (start > fat_fd->size_limit - count)) ffc144bc: 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) || ffc144c0: 7f 85 00 40 cmplw cr7,r5,r0 ffc144c4: 40 bd 00 14 ble+ cr7,ffc144d8 <== ALWAYS TAKEN (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); ffc144c8: 48 00 8d e1 bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc144cc: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc144d0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc144d4: 48 00 01 84 b ffc14658 <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); ffc144d8: 7f 5f 2a 14 add r26,r31,r5 ffc144dc: 7f 45 d3 78 mr r5,r26 ffc144e0: 38 c1 00 08 addi r6,r1,8 ffc144e4: 4b ff fd 91 bl ffc14274 if (rc != RC_OK) ffc144e8: 7c 60 1b 79 mr. r0,r3 ffc144ec: 40 82 01 70 bne- ffc1465c <== NEVER TAKEN /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) ffc144f0: 80 01 00 08 lwz r0,8(r1) ffc144f4: 7f 80 d0 00 cmpw cr7,r0,r26 ffc144f8: 41 9e 00 08 beq- cr7,ffc14500 <== ALWAYS TAKEN count = c - start; ffc144fc: 7f fc 00 50 subf r31,r28,r0 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc14500: 80 1d 00 20 lwz r0,32(r29) ffc14504: 2f 80 00 01 cmpwi cr7,r0,1 ffc14508: 40 9e 00 5c bne- cr7,ffc14564 ffc1450c: 80 1d 00 24 lwz r0,36(r29) ffc14510: 2f 80 00 00 cmpwi cr7,r0,0 ffc14514: 40 9e 00 50 bne- cr7,ffc14564 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc14518: 88 1e 00 0a lbz r0,10(r30) * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc1451c: 70 09 00 03 andi. r9,r0,3 ffc14520: 41 a2 00 44 beq+ ffc14564 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); ffc14524: 80 9d 00 1c lwz r4,28(r29) ffc14528: 80 7b 00 34 lwz r3,52(r27) ffc1452c: 4b ff f6 71 bl ffc13b9c sec += (start >> fs_info->vol.sec_log2); ffc14530: 88 9e 00 02 lbz r4,2(r30) byte = start & (fs_info->vol.bps - 1); ffc14534: a0 be 00 00 lhz r5,0(r30) ret = _fat_block_write(mt_entry, sec, byte, count, buf); ffc14538: 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); ffc1453c: 7f 84 24 30 srw r4,r28,r4 byte = start & (fs_info->vol.bps - 1); ffc14540: 38 a5 ff ff addi r5,r5,-1 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); ffc14544: 7c 83 22 14 add r4,r3,r4 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); ffc14548: 7f 85 28 38 and r5,r28,r5 ffc1454c: 7f 63 db 78 mr r3,r27 ffc14550: 7f 07 c3 78 mr r7,r24 ffc14554: 48 00 07 2d bl ffc14c80 <_fat_block_write> if ( ret < 0 ) ffc14558: 7c 60 1b 79 mr. r0,r3 ffc1455c: 40 a0 01 00 bge+ ffc1465c <== ALWAYS TAKEN ffc14560: 48 00 00 f8 b ffc14658 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc14564: 8b 3e 00 08 lbz r25,8(r30) save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); ffc14568: 3a e1 00 0c addi r23,r1,12 ffc1456c: 7f 63 db 78 mr r3,r27 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); ffc14570: a3 5e 00 06 lhz r26,6(r30) return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc14574: 7f 99 cc 30 srw r25,r28,r25 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); ffc14578: 7f a4 eb 78 mr r4,r29 ffc1457c: 7f 25 cb 78 mr r5,r25 ffc14580: 7e e6 bb 78 mr r6,r23 ffc14584: 4b ff f5 61 bl ffc13ae4 if (rc != RC_OK) ffc14588: 2f 84 00 00 cmpwi cr7,r4,0 } 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); ffc1458c: 7c 80 23 78 mr r0,r4 if (rc != RC_OK) ffc14590: 40 9e 00 cc bne- cr7,ffc1465c <== NEVER TAKEN return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); ffc14594: 3b 5a ff ff addi r26,r26,-1 ffc14598: 7f 9c d0 38 and r28,r28,r26 ffc1459c: 7f 95 e3 78 mr r21,r28 ffc145a0: 3a c0 00 00 li r22,0 ffc145a4: 3b 40 00 00 li r26,0 ffc145a8: 48 00 00 84 b ffc1462c if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); ffc145ac: a2 de 00 06 lhz r22,6(r30) ffc145b0: 7e d5 b0 50 subf r22,r21,r22 ffc145b4: 7f 96 f8 40 cmplw cr7,r22,r31 ffc145b8: 40 9d 00 08 ble- cr7,ffc145c0 ffc145bc: 7f f6 fb 78 mr r22,r31 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); ffc145c0: 80 81 00 0c lwz r4,12(r1) ffc145c4: 80 7b 00 34 lwz r3,52(r27) if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); ffc145c8: 92 c1 00 08 stw r22,8(r1) sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); ffc145cc: 4b ff f5 d1 bl ffc13b9c 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); ffc145d0: 7e c6 b3 78 mr r6,r22 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); ffc145d4: 88 9e 00 02 lbz r4,2(r30) byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); ffc145d8: 7c f8 d2 14 add r7,r24,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); ffc145dc: a0 be 00 00 lhz r5,0(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); ffc145e0: 7e a4 24 30 srw r4,r21,r4 byte = ofs & (fs_info->vol.bps - 1); ffc145e4: 38 a5 ff ff addi r5,r5,-1 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); ffc145e8: 7c 83 22 14 add r4,r3,r4 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); ffc145ec: 7e a5 28 38 and r5,r21,r5 ffc145f0: 7f 63 db 78 mr r3,r27 ffc145f4: 48 00 06 8d bl ffc14c80 <_fat_block_write> if ( ret < 0 ) ffc145f8: 2f 83 00 00 cmpwi cr7,r3,0 ffc145fc: 41 9c 00 5c blt- cr7,ffc14658 <== NEVER TAKEN return -1; count -= c; cmpltd += c; save_cln = cur_cln; ffc14600: 82 c1 00 0c lwz r22,12(r1) rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc14604: 7f 63 db 78 mr r3,r27 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; ffc14608: 80 01 00 08 lwz r0,8(r1) cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc1460c: 7e e5 bb 78 mr r5,r23 ffc14610: 7e c4 b3 78 mr r4,r22 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; ffc14614: 7f e0 f8 50 subf r31,r0,r31 cmpltd += c; ffc14618: 7f 5a 02 14 add r26,r26,r0 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc1461c: 48 00 73 2d bl ffc1b948 if ( rc != RC_OK ) ffc14620: 7c 60 1b 79 mr. r0,r3 ffc14624: 40 82 00 38 bne- ffc1465c <== NEVER TAKEN return rc; ofs = 0; ffc14628: 3a a0 00 00 li r21,0 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc1462c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc14630: 40 9e ff 7c bne+ cr7,ffc145ac } /* 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); ffc14634: 88 1e 00 08 lbz r0,8(r30) ffc14638: 3b 9c ff ff addi r28,r28,-1 ffc1463c: 7f 9c d2 14 add r28,r28,r26 fat_fd->map.disk_cln = save_cln; ffc14640: 92 dd 00 38 stw r22,56(r29) } /* 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); ffc14644: 7f 9c 04 30 srw r28,r28,r0 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ffc14648: 7f 3c ca 14 add r25,r28,r25 ffc1464c: 93 3d 00 34 stw r25,52(r29) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; ffc14650: 7f 40 d3 78 mr r0,r26 ffc14654: 48 00 00 08 b ffc1465c 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; ffc14658: 38 00 ff ff li r0,-1 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } ffc1465c: 39 61 00 48 addi r11,r1,72 ffc14660: 7c 03 03 78 mr r3,r0 ffc14664: 4b fe e4 6c b ffc02ad0 <_restgpr_21_x> =============================================================================== ffc1bd9c : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { ffc1bd9c: 94 21 ff c8 stwu r1,-56(r1) ffc1bda0: 7c 08 02 a6 mflr r0 ffc1bda4: 90 01 00 3c stw r0,60(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; ffc1bda8: 38 00 00 00 li r0,0 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { ffc1bdac: bf 01 00 18 stmw r24,24(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; ffc1bdb0: 7c 3c 0b 78 mr r28,r1 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { ffc1bdb4: 7c 7b 1b 78 mr r27,r3 ffc1bdb8: 7c 99 23 78 mr r25,r4 int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc1bdbc: 83 e3 00 34 lwz r31,52(r3) uint32_t cur_cln = chain; uint32_t next_cln = 0; ffc1bdc0: 94 1c 00 08 stwu r0,8(r28) uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; ffc1bdc4: 7c 9d 23 78 mr r29,r4 uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; ffc1bdc8: 3b c0 00 00 li r30,0 fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; ffc1bdcc: 3b 40 00 00 li r26,0 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) ffc1bdd0: 48 00 00 60 b ffc1be30 { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); ffc1bdd4: 7f 63 db 78 mr r3,r27 ffc1bdd8: 7f a4 eb 78 mr r4,r29 ffc1bddc: 7f 85 e3 78 mr r5,r28 ffc1bde0: 4b ff fb 69 bl ffc1b948 if ( rc != RC_OK ) ffc1bde4: 7c 78 1b 79 mr. r24,r3 ffc1bde8: 41 a2 00 24 beq+ ffc1be0c <== ALWAYS TAKEN { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc1bdec: 80 1f 00 40 lwz r0,64(r31) <== NOT EXECUTED ffc1bdf0: 2f 80 ff ff cmpwi cr7,r0,-1 <== NOT EXECUTED ffc1bdf4: 41 9e 00 0c beq- cr7,ffc1be00 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; ffc1bdf8: 7f de 02 14 add r30,r30,r0 <== NOT EXECUTED ffc1bdfc: 93 df 00 40 stw r30,64(r31) <== NOT EXECUTED fat_buf_release(fs_info); ffc1be00: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1be04: 4b ff 8c 7d bl ffc14a80 <== NOT EXECUTED return rc; ffc1be08: 48 00 00 60 b ffc1be68 <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); ffc1be0c: 7f 63 db 78 mr r3,r27 ffc1be10: 7f a4 eb 78 mr r4,r29 ffc1be14: 38 a0 00 00 li r5,0 ffc1be18: 4b ff fc ed bl ffc1bb04 if ( rc != RC_OK ) ffc1be1c: 2c 03 00 00 cmpwi r3,0 ffc1be20: 41 82 00 08 beq- ffc1be28 <== ALWAYS TAKEN ffc1be24: 7c 7a 1b 78 mr r26,r3 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; ffc1be28: 83 a1 00 08 lwz r29,8(r1) rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; ffc1be2c: 3b de 00 01 addi r30,r30,1 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) ffc1be30: 81 3f 00 0c lwz r9,12(r31) ffc1be34: 80 1f 00 10 lwz r0,16(r31) ffc1be38: 7f a9 48 38 and r9,r29,r9 ffc1be3c: 7f 89 00 40 cmplw cr7,r9,r0 ffc1be40: 41 9c ff 94 blt+ cr7,ffc1bdd4 freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc1be44: 80 1f 00 40 lwz r0,64(r31) freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; ffc1be48: 93 3f 00 44 stw r25,68(r31) if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc1be4c: 2f 80 ff ff cmpwi cr7,r0,-1 ffc1be50: 41 9e 00 0c beq- cr7,ffc1be5c <== ALWAYS TAKEN fs_info->vol.free_cls += freed_cls_cnt; ffc1be54: 7f de 02 14 add r30,r30,r0 <== NOT EXECUTED ffc1be58: 93 df 00 40 stw r30,64(r31) <== NOT EXECUTED fat_buf_release(fs_info); ffc1be5c: 7f e3 fb 78 mr r3,r31 ffc1be60: 4b ff 8c 21 bl ffc14a80 ffc1be64: 7f 58 d3 78 mr r24,r26 if (rc1 != RC_OK) return rc1; return RC_OK; } ffc1be68: 39 61 00 38 addi r11,r1,56 ffc1be6c: 7f 03 c3 78 mr r3,r24 ffc1be70: 4b fe 6c 6c b ffc02adc <_restgpr_24_x> =============================================================================== ffc14f80 : 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; ffc14f80: 81 23 00 34 lwz r9,52(r3) <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); ffc14f84: 39 40 ff fe li r10,-2 <== NOT EXECUTED ffc14f88: 80 09 00 7c lwz r0,124(r9) <== NOT EXECUTED ffc14f8c: 81 29 00 70 lwz r9,112(r9) <== NOT EXECUTED ffc14f90: 7c 00 20 50 subf r0,r0,r4 <== NOT EXECUTED ffc14f94: 54 0b e8 fe rlwinm r11,r0,29,3,31 <== NOT EXECUTED ffc14f98: 54 00 07 7e clrlwi r0,r0,29 <== NOT EXECUTED ffc14f9c: 5d 40 00 3e rotlw r0,r10,r0 <== NOT EXECUTED ffc14fa0: 7d 49 58 ae lbzx r10,r9,r11 <== NOT EXECUTED ffc14fa4: 7c 00 50 38 and r0,r0,r10 <== NOT EXECUTED ffc14fa8: 7c 09 59 ae stbx r0,r9,r11 <== NOT EXECUTED } ffc14fac: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc1b948 : 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)) ) ffc1b948: 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 ) { ffc1b94c: 94 21 ff c8 stwu r1,-56(r1) ffc1b950: 7c 08 02 a6 mflr r0 ffc1b954: bf 21 00 1c stmw r25,28(r1) ffc1b958: 7c 9f 23 78 mr r31,r4 ffc1b95c: 7c be 2b 78 mr r30,r5 ffc1b960: 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; ffc1b964: 38 00 00 00 li r0,0 uint32_t cln, uint32_t *ret_val ) { int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ffc1b968: 83 a3 00 34 lwz r29,52(r3) rtems_bdbuf_buffer *block0 = NULL; ffc1b96c: 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)) ) ffc1b970: 40 9d 01 70 ble- cr7,ffc1bae0 <== NEVER TAKEN ffc1b974: 81 3d 00 34 lwz r9,52(r29) ffc1b978: 38 09 00 01 addi r0,r9,1 ffc1b97c: 7f 84 00 40 cmplw cr7,r4,r0 ffc1b980: 41 9d 01 60 bgt- cr7,ffc1bae0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + ffc1b984: 88 1d 00 0a lbz r0,10(r29) ffc1b988: 54 9a f8 7e rlwinm r26,r4,31,1,31 ffc1b98c: 7f 5a 22 14 add r26,r26,r4 ffc1b990: 70 09 00 01 andi. r9,r0,1 ffc1b994: 40 82 00 14 bne- ffc1b9a8 <== ALWAYS TAKEN ffc1b998: 70 0b 00 02 andi. r11,r0,2 <== NOT EXECUTED ffc1b99c: 54 9a 10 3a rlwinm r26,r4,2,0,29 <== NOT EXECUTED ffc1b9a0: 41 82 00 08 beq- ffc1b9a8 <== NOT EXECUTED ffc1b9a4: 54 9a 08 3c rlwinm r26,r4,1,0,30 <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); ffc1b9a8: 2f 89 00 00 cmpwi cr7,r9,0 /* 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) + ffc1b9ac: 89 7d 00 02 lbz r11,2(r29) fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); ffc1b9b0: 57 fb f8 7e rlwinm r27,r31,31,1,31 /* 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) + ffc1b9b4: 7f 5a 5c 30 srw r26,r26,r11 ffc1b9b8: 81 7d 00 4c lwz r11,76(r29) fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); ffc1b9bc: 7f 7b fa 14 add r27,r27,r31 /* 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) + ffc1b9c0: 7f 5a 5a 14 add r26,r26,r11 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); ffc1b9c4: 40 9e 00 14 bne- cr7,ffc1b9d8 <== ALWAYS TAKEN ffc1b9c8: 70 09 00 02 andi. r9,r0,2 <== NOT EXECUTED ffc1b9cc: 57 fb 10 3a rlwinm r27,r31,2,0,29 <== NOT EXECUTED ffc1b9d0: 41 82 00 08 beq- ffc1b9d8 <== NOT EXECUTED ffc1b9d4: 57 fb 08 3c rlwinm r27,r31,1,0,30 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); ffc1b9d8: 7f a3 eb 78 mr r3,r29 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); ffc1b9dc: a3 3d 00 00 lhz r25,0(r29) rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); ffc1b9e0: 7f 44 d3 78 mr r4,r26 ffc1b9e4: 38 a0 00 01 li r5,1 ffc1b9e8: 38 c1 00 08 addi r6,r1,8 ffc1b9ec: 4b ff 8e b1 bl ffc1489c if (rc != RC_OK) ffc1b9f0: 7c 7c 1b 79 mr. r28,r3 ffc1b9f4: 40 82 01 04 bne- ffc1baf8 <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) ffc1b9f8: 88 1d 00 0a lbz r0,10(r29) 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); ffc1b9fc: 3b 39 ff ff addi r25,r25,-1 ffc1ba00: 7f 7b c8 38 and r27,r27,r25 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) ffc1ba04: 2f 80 00 02 cmpwi cr7,r0,2 ffc1ba08: 41 9e 00 98 beq- cr7,ffc1baa0 <== NEVER TAKEN ffc1ba0c: 2f 80 00 04 cmpwi cr7,r0,4 ffc1ba10: 41 9e 00 ac beq- cr7,ffc1babc <== NEVER TAKEN ffc1ba14: 2f 80 00 01 cmpwi cr7,r0,1 ffc1ba18: 40 be 00 c8 bne+ cr7,ffc1bae0 <== NEVER TAKEN 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))); ffc1ba1c: 81 21 00 08 lwz r9,8(r1) ffc1ba20: 83 29 00 24 lwz r25,36(r9) if ( ofs == (fs_info->vol.bps - 1) ) ffc1ba24: a1 3d 00 00 lhz r9,0(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))); ffc1ba28: 7c 19 d8 ae lbzx r0,r25,r27 if ( ofs == (fs_info->vol.bps - 1) ) ffc1ba2c: 39 29 ff ff addi r9,r9,-1 ffc1ba30: 7f 9b 48 00 cmpw cr7,r27,r9 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))); ffc1ba34: 90 1e 00 00 stw r0,0(r30) if ( ofs == (fs_info->vol.bps - 1) ) ffc1ba38: 40 be 00 38 bne+ cr7,ffc1ba70 <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, ffc1ba3c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc1ba40: 38 9a 00 01 addi r4,r26,1 <== NOT EXECUTED ffc1ba44: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc1ba48: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc1ba4c: 4b ff 8e 51 bl ffc1489c <== NOT EXECUTED &block0); if (rc != RC_OK) ffc1ba50: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc1ba54: 40 82 00 a0 bne- ffc1baf4 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; ffc1ba58: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc1ba5c: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED ffc1ba60: 88 09 00 00 lbz r0,0(r9) <== NOT EXECUTED ffc1ba64: 81 3e 00 00 lwz r9,0(r30) <== NOT EXECUTED ffc1ba68: 54 00 40 2e rlwinm r0,r0,8,0,23 <== NOT EXECUTED ffc1ba6c: 48 00 00 10 b ffc1ba7c <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; ffc1ba70: 7f 79 da 14 add r27,r25,r27 ffc1ba74: 89 3b 00 01 lbz r9,1(r27) ffc1ba78: 55 29 40 2e rlwinm r9,r9,8,0,23 } if ( FAT_CLUSTER_IS_ODD(cln) ) ffc1ba7c: 73 eb 00 01 andi. r11,r31,1 *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; ffc1ba80: 7d 20 03 78 or r0,r9,r0 ffc1ba84: 90 1e 00 00 stw r0,0(r30) ffc1ba88: 80 1e 00 00 lwz r0,0(r30) } if ( FAT_CLUSTER_IS_ODD(cln) ) ffc1ba8c: 41 82 00 0c beq- ffc1ba98 *ret_val = (*ret_val) >> FAT12_SHIFT; ffc1ba90: 54 00 e1 3e rlwinm r0,r0,28,4,31 ffc1ba94: 48 00 00 44 b ffc1bad8 else *ret_val = (*ret_val) & FAT_FAT12_MASK; ffc1ba98: 54 00 05 3e clrlwi r0,r0,20 ffc1ba9c: 48 00 00 3c b ffc1bad8 break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); ffc1baa0: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc1baa4: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED ffc1baa8: 7c 09 da 2e lhzx r0,r9,r27 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); ffc1baac: 54 09 c2 3e rlwinm r9,r0,24,8,31 <== NOT EXECUTED ffc1bab0: 54 00 44 2e rlwinm r0,r0,8,16,23 <== NOT EXECUTED ffc1bab4: 7d 20 03 78 or r0,r9,r0 <== NOT EXECUTED ffc1bab8: 48 00 00 20 b ffc1bad8 <== NOT EXECUTED break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); ffc1babc: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc1bac0: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED ffc1bac4: 7d 29 d8 2e lwzx r9,r9,r27 <== NOT EXECUTED ffc1bac8: 51 20 46 3e rlwimi r0,r9,8,24,31 <== NOT EXECUTED ffc1bacc: 51 20 c4 2e rlwimi r0,r9,24,16,23 <== NOT EXECUTED ffc1bad0: 51 20 42 1e rlwimi r0,r9,8,8,15 <== NOT EXECUTED ffc1bad4: 51 20 c0 0e rlwimi r0,r9,24,0,7 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); ffc1bad8: 90 1e 00 00 stw r0,0(r30) break; ffc1badc: 48 00 00 1c b ffc1baf8 default: rtems_set_errno_and_return_minus_one(EIO); ffc1bae0: 48 00 17 c9 bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc1bae4: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc1bae8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1baec: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc1baf0: 48 00 00 08 b ffc1baf8 <== 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) ffc1baf4: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc1baf8: 39 61 00 38 addi r11,r1,56 ffc1bafc: 7f 83 e3 78 mr r3,r28 ffc1bb00: 4b fe 6f e0 b ffc02ae0 <_restgpr_25_x> =============================================================================== ffc14ea8 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { ffc14ea8: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc14eac: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc14eb0: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc14eb4: bf a1 00 0c stmw 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)) ffc14eb8: 3f c0 0f ff lis r30,4095 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) ffc14ebc: 3b a0 00 00 li r29,0 <== 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; ffc14ec0: 83 e3 00 34 lwz r31,52(r3) <== 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)) ffc14ec4: 63 de ff ff ori r30,r30,65535 <== NOT EXECUTED { register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) ffc14ec8: 48 00 00 98 b ffc14f60 <== NOT EXECUTED { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) ffc14ecc: 81 3f 00 74 lwz r9,116(r31) <== NOT EXECUTED ffc14ed0: 81 7f 00 70 lwz r11,112(r31) <== NOT EXECUTED ffc14ed4: 55 20 e8 fe rlwinm r0,r9,29,3,31 <== NOT EXECUTED ffc14ed8: 7d 0b 02 14 add r8,r11,r0 <== NOT EXECUTED ffc14edc: 7c 0b 00 ae lbzx r0,r11,r0 <== NOT EXECUTED ffc14ee0: 55 2b 07 7e clrlwi r11,r9,29 <== NOT EXECUTED ffc14ee4: 7c 07 5e 30 sraw r7,r0,r11 <== NOT EXECUTED ffc14ee8: 70 e6 00 01 andi. r6,r7,1 <== NOT EXECUTED ffc14eec: 40 a2 00 24 bne+ ffc14f10 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); ffc14ef0: 39 20 00 01 li r9,1 <== NOT EXECUTED ffc14ef4: 7d 2b 58 30 slw r11,r9,r11 <== NOT EXECUTED ffc14ef8: 7d 60 03 78 or r0,r11,r0 <== NOT EXECUTED ffc14efc: 98 08 00 00 stb r0,0(r8) <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); ffc14f00: 80 7f 00 74 lwz r3,116(r31) <== NOT EXECUTED ffc14f04: 80 1f 00 7c lwz r0,124(r31) <== NOT EXECUTED ffc14f08: 7c 63 02 14 add r3,r3,r0 <== NOT EXECUTED ffc14f0c: 48 00 00 6c b ffc14f78 <== NOT EXECUTED } fs_info->index++; ffc14f10: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) ffc14f14: 7f 89 50 40 cmplw cr7,r9,r10 <== 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++; ffc14f18: 91 3f 00 74 stw r9,116(r31) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) ffc14f1c: 41 9c 00 08 blt- cr7,ffc14f24 <== NOT EXECUTED fs_info->index = 0; ffc14f20: 93 bf 00 74 stw r29,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++) ffc14f24: 38 84 00 01 addi r4,r4,1 <== NOT EXECUTED ffc14f28: 42 00 ff a4 bdnz+ ffc14ecc <== 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)) ffc14f2c: 80 1f 00 7c lwz r0,124(r31) <== NOT EXECUTED ffc14f30: 54 84 08 3c rlwinm r4,r4,1,0,30 <== NOT EXECUTED ffc14f34: 7c 00 f0 50 subf r0,r0,r30 <== NOT EXECUTED ffc14f38: 7f 84 00 40 cmplw cr7,r4,r0 <== NOT EXECUTED ffc14f3c: 40 bc 00 38 bge+ cr7,ffc14f74 <== NOT EXECUTED { fs_info->uino_pool_size <<= 1; ffc14f40: 90 9f 00 78 stw r4,120(r31) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); ffc14f44: 80 7f 00 70 lwz r3,112(r31) <== NOT EXECUTED ffc14f48: 4b ff 3f 3d bl ffc08e84 <== NOT EXECUTED if (fs_info->uino != NULL) ffc14f4c: 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); ffc14f50: 90 7f 00 70 stw r3,112(r31) <== NOT EXECUTED if (fs_info->uino != NULL) ffc14f54: 41 be 00 20 beq+ cr7,ffc14f74 <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; ffc14f58: 80 1f 00 78 lwz r0,120(r31) <== NOT EXECUTED ffc14f5c: 90 1f 00 74 stw r0,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++) ffc14f60: 81 5f 00 78 lwz r10,120(r31) <== NOT EXECUTED ffc14f64: 38 80 00 00 li r4,0 <== 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; ffc14f68: 38 0a 00 01 addi r0,r10,1 <== NOT EXECUTED ffc14f6c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc14f70: 4b ff ff b8 b ffc14f28 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; ffc14f74: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc14f78: 39 61 00 18 addi r11,r1,24 <== NOT EXECUTED ffc14f7c: 4b fe db 74 b ffc02af0 <_restgpr_29_x> <== NOT EXECUTED =============================================================================== ffc14df0 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { ffc14df0: 94 21 ff d8 stwu r1,-40(r1) ffc14df4: 7c 08 02 a6 mflr r0 ffc14df8: 90 01 00 2c stw r0,44(r1) ffc14dfc: bf 81 00 18 stmw r28,24(r1) ffc14e00: 7c 7d 1b 78 mr r29,r3 int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; ffc14e04: 83 c3 00 34 lwz r30,52(r3) uint32_t cur_cln = start_cln; ffc14e08: 90 81 00 08 stw r4,8(r1) char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); ffc14e0c: 38 80 00 01 li r4,1 ffc14e10: a0 7e 00 06 lhz r3,6(r30) ffc14e14: 4b ff 25 c5 bl ffc073d8 if ( buf == NULL ) ffc14e18: 7c 7f 1b 79 mr. r31,r3 ffc14e1c: 40 a2 00 5c bne+ ffc14e78 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); ffc14e20: 48 00 84 89 bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc14e24: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc14e28: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc14e2c: 48 00 00 20 b ffc14e4c <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); ffc14e30: 7f a3 eb 78 mr r3,r29 ffc14e34: 7f e5 fb 78 mr r5,r31 ffc14e38: 4b ff ff 65 bl ffc14d9c if ( ret == -1 ) ffc14e3c: 2f 83 ff ff cmpwi cr7,r3,-1 ffc14e40: 40 be 00 14 bne+ cr7,ffc14e54 <== ALWAYS TAKEN { free(buf); ffc14e44: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc14e48: 4b ff 2a a1 bl ffc078e8 <== NOT EXECUTED return -1; ffc14e4c: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc14e50: 48 00 00 4c b ffc14e9c <== NOT EXECUTED } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); ffc14e54: 80 81 00 08 lwz r4,8(r1) ffc14e58: 7f a3 eb 78 mr r3,r29 ffc14e5c: 38 a1 00 08 addi r5,r1,8 ffc14e60: 48 00 6a e9 bl ffc1b948 if ( rc != RC_OK ) ffc14e64: 7c 7c 1b 79 mr. r28,r3 ffc14e68: 41 a2 00 10 beq+ ffc14e78 <== ALWAYS TAKEN { free(buf); ffc14e6c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc14e70: 4b ff 2a 79 bl ffc078e8 <== NOT EXECUTED return rc; ffc14e74: 48 00 00 28 b ffc14e9c <== NOT EXECUTED 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) ffc14e78: 80 81 00 08 lwz r4,8(r1) ffc14e7c: 81 3e 00 0c lwz r9,12(r30) ffc14e80: 80 1e 00 10 lwz r0,16(r30) ffc14e84: 7c 89 48 38 and r9,r4,r9 ffc14e88: 7f 89 00 40 cmplw cr7,r9,r0 ffc14e8c: 41 9c ff a4 blt+ cr7,ffc14e30 free(buf); return rc; } } free(buf); ffc14e90: 7f e3 fb 78 mr r3,r31 ffc14e94: 4b ff 2a 55 bl ffc078e8 return rc; ffc14e98: 3b 80 00 00 li r28,0 } ffc14e9c: 39 61 00 28 addi r11,r1,40 ffc14ea0: 7f 83 e3 78 mr r3,r28 ffc14ea4: 4b fe dc 48 b ffc02aec <_restgpr_28_x> =============================================================================== ffc15158 : * 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) { ffc15158: 94 21 ff 20 stwu r1,-224(r1) ffc1515c: 7c 08 02 a6 mflr r0 ffc15160: 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); ffc15164: 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; ffc15168: 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) { ffc1516c: bd c1 00 98 stmw r14,152(r1) ffc15170: 7c 7e 1b 78 mr r30,r3 rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc15174: 83 e3 00 34 lwz r31,52(r3) ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); ffc15178: 80 63 00 70 lwz r3,112(r3) 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; ffc1517c: 90 01 00 08 stw r0,8(r1) rc = stat(mt_entry->dev, &stat_buf); ffc15180: 4b ff 3f 71 bl ffc090f0 if (rc == -1) ffc15184: 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); ffc15188: 7c 7d 1b 78 mr r29,r3 if (rc == -1) ffc1518c: 41 9e 06 64 beq- cr7,ffc157f0 <== NEVER TAKEN return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) ffc15190: 80 01 00 24 lwz r0,36(r1) ffc15194: 54 00 04 26 rlwinm r0,r0,0,16,19 ffc15198: 2f 80 60 00 cmpwi cr7,r0,24576 ffc1519c: 41 be 00 10 beq+ cr7,ffc151ac <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOTTY); ffc151a0: 48 00 81 09 bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc151a4: 38 00 00 19 li r0,25 <== NOT EXECUTED ffc151a8: 48 00 06 40 b ffc157e8 <== NOT EXECUTED /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); ffc151ac: 80 61 00 30 lwz r3,48(r1) ffc151b0: 80 81 00 34 lwz r4,52(r1) ffc151b4: 4b ff 16 b9 bl ffc0686c if (vol->dd == NULL) ffc151b8: 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); ffc151bc: 90 7f 00 60 stw r3,96(r31) if (vol->dd == NULL) ffc151c0: 41 9e 00 30 beq- cr7,ffc151f0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; ffc151c4: 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); ffc151c8: 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; ffc151cc: 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); ffc151d0: 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; ffc151d4: 90 7f 00 58 stw r3,88(r31) ffc151d8: 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); ffc151dc: 4b ff dc 7d bl ffc12e58 if (sc != RTEMS_SUCCESSFUL) ffc151e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc151e4: 41 be 00 18 beq+ cr7,ffc151fc <== ALWAYS TAKEN { rtems_disk_release(vol->dd); ffc151e8: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc151ec: 4b ff 17 05 bl ffc068f0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO); ffc151f0: 48 00 80 b9 bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc151f4: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc151f8: 48 00 05 f0 b ffc157e8 <== NOT EXECUTED } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); ffc151fc: 80 61 00 08 lwz r3,8(r1) ffc15200: 81 83 00 24 lwz r12,36(r3) ffc15204: 88 0c 00 0b lbz r0,11(r12) ffc15208: 88 ec 00 0e lbz r7,14(r12) ffc1520c: 89 4c 00 11 lbz r10,17(r12) ffc15210: 89 0c 00 12 lbz r8,18(r12) ffc15214: 89 2c 00 16 lbz r9,22(r12) ffc15218: 89 6c 00 17 lbz r11,23(r12) ffc1521c: 88 8c 00 0c lbz r4,12(r12) ffc15220: 88 cc 00 0f lbz r6,15(r12) ffc15224: 88 ac 00 30 lbz r5,48(r12) ffc15228: 8b ac 00 0d lbz r29,13(r12) ffc1522c: 8b 6c 00 10 lbz r27,16(r12) ffc15230: 8a 4c 00 13 lbz r18,19(r12) ffc15234: 8a 2c 00 14 lbz r17,20(r12) ffc15238: 8a ac 00 20 lbz r21,32(r12) ffc1523c: 8a 6c 00 21 lbz r19,33(r12) ffc15240: 8a 8c 00 22 lbz r20,34(r12) ffc15244: 8a cc 00 23 lbz r22,35(r12) ffc15248: 89 ec 00 24 lbz r15,36(r12) ffc1524c: 89 cc 00 26 lbz r14,38(r12) ffc15250: 8a 0c 00 27 lbz r16,39(r12) ffc15254: 8b 8c 00 28 lbz r28,40(r12) ffc15258: 8b 2c 00 2c lbz r25,44(r12) ffc1525c: 8a ec 00 2d lbz r23,45(r12) ffc15260: 8b 0c 00 2e lbz r24,46(r12) ffc15264: 8b 4c 00 2f lbz r26,47(r12) ffc15268: 90 01 00 94 stw r0,148(r1) ffc1526c: 88 0c 00 25 lbz r0,37(r12) ffc15270: 89 8c 00 31 lbz r12,49(r12) ffc15274: 90 a1 00 68 stw r5,104(r1) sc = rtems_bdbuf_release( block); ffc15278: 90 01 00 70 stw r0,112(r1) ffc1527c: 90 81 00 84 stw r4,132(r1) ffc15280: 90 c1 00 78 stw r6,120(r1) ffc15284: 90 e1 00 74 stw r7,116(r1) ffc15288: 91 01 00 80 stw r8,128(r1) ffc1528c: 91 21 00 88 stw r9,136(r1) ffc15290: 91 41 00 7c stw r10,124(r1) ffc15294: 91 61 00 8c stw r11,140(r1) ffc15298: 91 81 00 6c stw r12,108(r1) ffc1529c: 4b ff de 39 bl ffc130d4 if (sc != RTEMS_SUCCESSFUL) ffc152a0: 2f 83 00 00 cmpwi cr7,r3,0 ffc152a4: 80 01 00 70 lwz r0,112(r1) ffc152a8: 80 81 00 84 lwz r4,132(r1) ffc152ac: 80 c1 00 78 lwz r6,120(r1) ffc152b0: 80 e1 00 74 lwz r7,116(r1) ffc152b4: 81 01 00 80 lwz r8,128(r1) ffc152b8: 81 21 00 88 lwz r9,136(r1) ffc152bc: 81 41 00 7c lwz r10,124(r1) ffc152c0: 81 61 00 8c lwz r11,140(r1) ffc152c4: 81 81 00 6c lwz r12,108(r1) ffc152c8: 40 be ff 20 bne- cr7,ffc151e8 <== 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); ffc152cc: 80 61 00 94 lwz r3,148(r1) ffc152d0: 54 84 40 2e rlwinm r4,r4,8,0,23 ffc152d4: 7c 85 1b 78 or r5,r4,r3 if ( (vol->bps != 512) && ffc152d8: 2f 85 02 00 cmpwi cr7,r5,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); ffc152dc: b0 bf 00 00 sth r5,0(r31) if ( (vol->bps != 512) && ffc152e0: 41 9e 00 1c beq- cr7,ffc152fc <== ALWAYS TAKEN ffc152e4: 2f 85 04 00 cmpwi cr7,r5,1024 <== NOT EXECUTED ffc152e8: 41 9e 00 14 beq- cr7,ffc152fc <== NOT EXECUTED (vol->bps != 1024) && ffc152ec: 2f 85 08 00 cmpwi cr7,r5,2048 <== NOT EXECUTED ffc152f0: 41 9e 00 0c beq- cr7,ffc152fc <== NOT EXECUTED (vol->bps != 2048) && ffc152f4: 2f 85 10 00 cmpwi cr7,r5,4096 <== NOT EXECUTED ffc152f8: 40 9e 02 b4 bne- cr7,ffc155ac <== 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; ffc152fc: 38 80 00 00 li r4,0 ffc15300: 98 9f 00 03 stb r4,3(r31) ffc15304: 54 a4 ba 7e rlwinm r4,r5,23,9,31 ffc15308: 48 00 00 14 b ffc1531c i >>= 1, vol->sec_mul++); ffc1530c: 88 7f 00 03 lbz r3,3(r31) <== NOT EXECUTED ffc15310: 7c 84 0e 70 srawi r4,r4,1 <== NOT EXECUTED ffc15314: 38 63 00 01 addi r3,r3,1 <== NOT EXECUTED ffc15318: 98 7f 00 03 stb r3,3(r31) <== 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; ffc1531c: 70 83 00 01 andi. r3,r4,1 ffc15320: 41 82 ff ec beq+ ffc1530c <== NEVER TAKEN i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; ffc15324: 38 80 00 00 li r4,0 ffc15328: 98 9f 00 02 stb r4,2(r31) ffc1532c: 7c a4 2b 78 mr r4,r5 ffc15330: 48 00 00 14 b ffc15344 i >>= 1, vol->sec_log2++); ffc15334: 88 7f 00 02 lbz r3,2(r31) ffc15338: 7c 84 0e 70 srawi r4,r4,1 ffc1533c: 38 63 00 01 addi r3,r3,1 ffc15340: 98 7f 00 02 stb r3,2(r31) 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; ffc15344: 70 83 00 01 andi. r3,r4,1 ffc15348: 41 82 ff ec beq+ ffc15334 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) ffc1534c: 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); ffc15350: 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) ffc15354: 41 9e 02 58 beq- cr7,ffc155ac <== 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; ffc15358: 38 80 00 00 li r4,0 ffc1535c: 98 9f 00 05 stb r4,5(r31) ffc15360: 7f a3 eb 78 mr r3,r29 ffc15364: 48 00 00 10 b ffc15374 i >>= 1, vol->spc_log2++); ffc15368: 38 84 00 01 addi r4,r4,1 ffc1536c: 98 9f 00 05 stb r4,5(r31) ffc15370: 7c 63 0e 70 srawi r3,r3,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; ffc15374: 70 64 00 01 andi. r4,r3,1 ffc15378: 88 9f 00 05 lbz r4,5(r31) ffc1537c: 41 82 ff ec beq+ ffc15368 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) ffc15380: 54 84 06 3e clrlwi r4,r4,24 ffc15384: 7c a4 20 30 slw r4,r5,r4 ffc15388: 54 84 04 3e clrlwi r4,r4,16 ffc1538c: 2b 84 80 00 cmplwi cr7,r4,32768 ffc15390: b0 9f 00 06 sth r4,6(r31) { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; ffc15394: 38 60 00 00 li r3,0 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) ffc15398: 40 bd 00 14 ble+ cr7,ffc153ac <== ALWAYS TAKEN ffc1539c: 48 00 02 10 b ffc155ac <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); ffc153a0: 88 7f 00 08 lbz r3,8(r31) ffc153a4: 7c 84 0e 70 srawi r4,r4,1 ffc153a8: 38 63 00 01 addi r3,r3,1 ffc153ac: 98 7f 00 08 stb r3,8(r31) { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; ffc153b0: 70 83 00 01 andi. r3,r4,1 ffc153b4: 41 82 ff ec beq+ ffc153a0 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); ffc153b8: 55 08 40 2e rlwinm r8,r8,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); ffc153bc: 9b 7f 00 09 stb r27,9(r31) vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); ffc153c0: 54 c6 40 2e rlwinm r6,r6,8,0,23 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); ffc153c4: 7d 0a 53 78 or r10,r8,r10 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); ffc153c8: 7c c7 3b 78 or r7,r6,r7 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); ffc153cc: b1 5f 00 20 sth r10,32(r31) /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / ffc153d0: 38 c5 ff ff addi r6,r5,-1 ffc153d4: 55 4a 28 34 rlwinm r10,r10,5,0,26 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); ffc153d8: b0 ff 00 14 sth r7,20(r31) 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)) / ffc153dc: 7d 4a 32 14 add r10,r10,r6 ffc153e0: 7c aa 2b d6 divw r5,r10,r5 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; ffc153e4: 89 5f 00 02 lbz r10,2(r31) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) ffc153e8: 55 6b 40 2e rlwinm r11,r11,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)) / ffc153ec: 90 bf 00 24 stw r5,36(r31) vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) ffc153f0: 7d 69 4b 78 or r9,r11,r9 ffc153f4: 7d 29 07 35 extsh. r9,r9 /* 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; ffc153f8: 7c aa 50 30 slw r10,r5,r10 ffc153fc: 91 5f 00 28 stw r10,40(r31) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) ffc15400: 41 82 00 10 beq- ffc15410 <== NEVER TAKEN vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); ffc15404: 55 29 04 3e clrlwi r9,r9,16 ffc15408: 91 3f 00 18 stw r9,24(r31) ffc1540c: 48 00 00 20 b ffc1542c else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); ffc15410: 54 00 40 2e rlwinm r0,r0,8,0,23 <== NOT EXECUTED ffc15414: 55 ce 80 1e rlwinm r14,r14,16,0,15 <== NOT EXECUTED ffc15418: 7c 00 73 78 or r0,r0,r14 <== NOT EXECUTED ffc1541c: 7c 0f 7b 78 or r15,r0,r15 <== NOT EXECUTED ffc15420: 56 10 c0 0e rlwinm r16,r16,24,0,7 <== NOT EXECUTED ffc15424: 7d f0 83 78 or r16,r15,r16 <== NOT EXECUTED ffc15428: 92 1f 00 18 stw r16,24(r31) <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + ffc1542c: 80 1f 00 18 lwz r0,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) ffc15430: 56 31 40 2e rlwinm r17,r17,8,0,23 ffc15434: 7e 32 93 78 or r18,r17,r18 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 + ffc15438: 7f 7b 01 d6 mullw r27,r27,r0 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) ffc1543c: 7e 52 07 35 extsh. r18,r18 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 + ffc15440: 7f 67 da 14 add r27,r7,r27 ffc15444: 7c a5 da 14 add r5,r5,r27 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; ffc15448: 93 7f 00 1c stw r27,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 + ffc1544c: 90 bf 00 30 stw r5,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) ffc15450: 41 82 00 10 beq- ffc15460 <== NEVER TAKEN vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); ffc15454: 56 52 04 3e clrlwi r18,r18,16 ffc15458: 92 5f 00 2c stw r18,44(r31) ffc1545c: 48 00 00 20 b ffc1547c else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); ffc15460: 56 73 40 2e rlwinm r19,r19,8,0,23 <== NOT EXECUTED ffc15464: 56 94 80 1e rlwinm r20,r20,16,0,15 <== NOT EXECUTED ffc15468: 7e 74 a3 78 or r20,r19,r20 <== NOT EXECUTED ffc1546c: 7e 95 ab 78 or r21,r20,r21 <== NOT EXECUTED ffc15470: 56 d6 c0 0e rlwinm r22,r22,24,0,7 <== NOT EXECUTED ffc15474: 7e b6 b3 78 or r22,r21,r22 <== NOT EXECUTED ffc15478: 92 df 00 2c stw r22,44(r31) <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; ffc1547c: 80 1f 00 2c lwz r0,44(r31) ffc15480: 7c a5 00 50 subf r5,r5,r0 vol->data_cls = data_secs / vol->spc; ffc15484: 7f a5 eb 96 divwu r29,r5,r29 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) ffc15488: 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; ffc1548c: 93 bf 00 34 stw r29,52(r31) /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) ffc15490: 41 9d 00 1c bgt- cr7,ffc154ac <== NEVER TAKEN { vol->type = FAT_FAT12; ffc15494: 38 00 00 01 li r0,1 ffc15498: 98 1f 00 0a stb r0,10(r31) vol->mask = FAT_FAT12_MASK; ffc1549c: 38 00 0f ff li r0,4095 ffc154a0: 90 1f 00 0c stw r0,12(r31) vol->eoc_val = FAT_FAT12_EOC; ffc154a4: 38 00 0f f8 li r0,4088 ffc154a8: 48 00 00 44 b ffc154ec } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) ffc154ac: 2b 9d ff f4 cmplwi cr7,r29,65524 <== NOT EXECUTED ffc154b0: 41 9d 00 20 bgt- cr7,ffc154d0 <== NOT EXECUTED { vol->type = FAT_FAT16; ffc154b4: 38 00 00 02 li r0,2 <== NOT EXECUTED ffc154b8: 98 1f 00 0a stb r0,10(r31) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; ffc154bc: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc154c0: 60 00 ff ff ori r0,r0,65535 <== NOT EXECUTED ffc154c4: 90 1f 00 0c stw r0,12(r31) <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; ffc154c8: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc154cc: 48 00 00 1c b ffc154e8 <== NOT EXECUTED } else { vol->type = FAT_FAT32; ffc154d0: 38 00 00 04 li r0,4 <== NOT EXECUTED ffc154d4: 98 1f 00 0a stb r0,10(r31) <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; ffc154d8: 3c 00 0f ff lis r0,4095 <== NOT EXECUTED ffc154dc: 60 00 ff ff ori r0,r0,65535 <== NOT EXECUTED ffc154e0: 90 1f 00 0c stw r0,12(r31) <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; ffc154e4: 3c 00 0f ff lis r0,4095 <== NOT EXECUTED ffc154e8: 60 00 ff f8 ori r0,r0,65528 <== NOT EXECUTED ffc154ec: 90 1f 00 10 stw r0,16(r31) } } if (vol->type == FAT_FAT32) ffc154f0: 88 1f 00 0a lbz r0,10(r31) ffc154f4: 2f 80 00 04 cmpwi cr7,r0,4 ffc154f8: 40 be 01 80 bne+ cr7,ffc15678 <== ALWAYS TAKEN { 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; ffc154fc: 57 80 00 30 rlwinm r0,r28,0,0,24 <== NOT EXECUTED ffc15500: 54 00 06 3e clrlwi r0,r0,24 <== NOT EXECUTED if (vol->mirror) ffc15504: 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); vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; ffc15508: 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); ffc1550c: 56 f7 40 2e rlwinm r23,r23,8,0,23 <== NOT EXECUTED ffc15510: 57 18 80 1e rlwinm r24,r24,16,0,15 <== NOT EXECUTED ffc15514: 7e f8 c3 78 or r24,r23,r24 <== NOT EXECUTED ffc15518: 7f 19 cb 78 or r25,r24,r25 <== NOT EXECUTED ffc1551c: 57 5a c0 0e rlwinm r26,r26,24,0,7 <== NOT EXECUTED ffc15520: 7f 3a d3 78 or r26,r25,r26 <== NOT EXECUTED ffc15524: 93 5f 00 38 stw r26,56(r31) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) ffc15528: 41 9e 00 10 beq- cr7,ffc15538 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; ffc1552c: 57 9c 07 3e clrlwi r28,r28,28 <== NOT EXECUTED ffc15530: 9b 9f 00 50 stb r28,80(r31) <== NOT EXECUTED ffc15534: 48 00 00 08 b ffc1553c <== NOT EXECUTED else vol->afat = 0; ffc15538: 98 1f 00 50 stb r0,80(r31) <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); ffc1553c: 80 a1 00 68 lwz r5,104(r1) <== NOT EXECUTED ffc15540: 55 8c 40 2e rlwinm r12,r12,8,0,23 <== NOT EXECUTED ffc15544: 7d 84 2b 78 or r4,r12,r5 <== NOT EXECUTED if( vol->info_sec == 0 ) ffc15548: 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); ffc1554c: b0 9f 00 3c sth r4,60(r31) <== NOT EXECUTED if( vol->info_sec == 0 ) ffc15550: 41 9e 00 5c beq- cr7,ffc155ac <== 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, ffc15554: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc15558: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc1555c: 38 c0 00 04 li r6,4 <== NOT EXECUTED ffc15560: 38 e1 00 0c addi r7,r1,12 <== NOT EXECUTED ffc15564: 4b ff f6 71 bl ffc14bd4 <_fat_block_read> <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) ffc15568: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc1556c: 41 9c 00 7c blt- cr7,ffc155e8 <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != ffc15570: 89 21 00 0d lbz r9,13(r1) <== NOT EXECUTED ffc15574: 88 01 00 0e lbz r0,14(r1) <== NOT EXECUTED ffc15578: 55 29 40 2e rlwinm r9,r9,8,0,23 <== NOT EXECUTED ffc1557c: 54 00 80 1e rlwinm r0,r0,16,0,15 <== NOT EXECUTED ffc15580: 7d 29 03 78 or r9,r9,r0 <== NOT EXECUTED ffc15584: 88 01 00 0c lbz r0,12(r1) <== NOT EXECUTED ffc15588: 7d 29 03 78 or r9,r9,r0 <== NOT EXECUTED ffc1558c: 88 01 00 0f lbz r0,15(r1) <== NOT EXECUTED ffc15590: 54 00 c0 0e rlwinm r0,r0,24,0,7 <== NOT EXECUTED ffc15594: 7d 29 03 78 or r9,r9,r0 <== NOT EXECUTED ffc15598: 6d 20 41 61 xoris r0,r9,16737 <== NOT EXECUTED ffc1559c: 2f 80 52 52 cmpwi cr7,r0,21074 <== NOT EXECUTED ffc155a0: 41 9e 00 20 beq- cr7,ffc155c0 <== 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); ffc155a4: 80 7e 00 34 lwz r3,52(r30) <== NOT EXECUTED ffc155a8: 4b ff f4 d9 bl ffc14a80 <== 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); ffc155ac: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc155b0: 4b ff 13 41 bl ffc068f0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); ffc155b4: 48 00 7c f5 bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc155b8: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc155bc: 48 00 02 2c b ffc157e8 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, ffc155c0: a0 9f 00 3c lhz r4,60(r31) <== NOT EXECUTED ffc155c4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc155c8: 38 a0 01 e4 li r5,484 <== NOT EXECUTED ffc155cc: 38 c0 00 0c li r6,12 <== NOT EXECUTED ffc155d0: 38 e1 00 0c addi r7,r1,12 <== NOT EXECUTED ffc155d4: 4b ff f6 01 bl ffc14bd4 <_fat_block_read> <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) ffc155d8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc155dc: 40 bc 00 18 bge+ cr7,ffc155f4 <== 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); ffc155e0: 80 7e 00 34 lwz r3,52(r30) <== NOT EXECUTED ffc155e4: 4b ff f4 9d bl ffc14a80 <== 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); ffc155e8: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc155ec: 4b ff 13 05 bl ffc068f0 <== NOT EXECUTED ffc155f0: 48 00 01 fc b ffc157ec <== NOT EXECUTED return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc155f4: 89 21 00 11 lbz r9,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, ffc155f8: 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); ffc155fc: 88 01 00 12 lbz r0,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, ffc15600: 38 80 ff ff li r4,-1 <== 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); ffc15604: 55 29 40 2e rlwinm r9,r9,8,0,23 <== NOT EXECUTED ffc15608: 54 00 80 1e rlwinm r0,r0,16,0,15 <== NOT EXECUTED ffc1560c: 7d 20 03 78 or r0,r9,r0 <== NOT EXECUTED ffc15610: 89 21 00 10 lbz r9,16(r1) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, ffc15614: 38 a0 ff ff li r5,-1 <== 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); ffc15618: 7c 00 4b 78 or r0,r0,r9 <== NOT EXECUTED ffc1561c: 89 21 00 13 lbz r9,19(r1) <== NOT EXECUTED ffc15620: 55 29 c0 0e rlwinm r9,r9,24,0,7 <== NOT EXECUTED ffc15624: 7c 00 4b 78 or r0,r0,r9 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc15628: 89 21 00 15 lbz r9,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); ffc1562c: 90 1f 00 40 stw r0,64(r31) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc15630: 55 29 40 2e rlwinm r9,r9,8,0,23 <== NOT EXECUTED ffc15634: 88 01 00 16 lbz r0,22(r1) <== NOT EXECUTED ffc15638: 54 00 80 1e rlwinm r0,r0,16,0,15 <== NOT EXECUTED ffc1563c: 7d 20 03 78 or r0,r9,r0 <== NOT EXECUTED ffc15640: 89 21 00 14 lbz r9,20(r1) <== NOT EXECUTED ffc15644: 7c 00 4b 78 or r0,r0,r9 <== NOT EXECUTED ffc15648: 89 21 00 17 lbz r9,23(r1) <== NOT EXECUTED ffc1564c: 55 29 c0 0e rlwinm r9,r9,24,0,7 <== NOT EXECUTED ffc15650: 7c 00 4b 78 or r0,r0,r9 <== NOT EXECUTED ffc15654: 90 1f 00 44 stw r0,68(r31) <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, ffc15658: 4b ff f9 71 bl ffc14fc8 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) ffc1565c: 7c 7d 1b 79 mr. r29,r3 <== NOT EXECUTED ffc15660: 41 a2 00 34 beq+ ffc15694 <== 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); ffc15664: 80 7e 00 34 lwz r3,52(r30) <== NOT EXECUTED ffc15668: 4b ff f4 19 bl ffc14a80 <== 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); ffc1566c: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc15670: 4b ff 12 81 bl ffc068f0 <== NOT EXECUTED return rc; ffc15674: 48 00 01 7c b ffc157f0 <== NOT EXECUTED } } } else { vol->rdir_cl = 0; ffc15678: 38 00 00 00 li r0,0 ffc1567c: 90 1f 00 38 stw r0,56(r31) vol->mirror = 0; ffc15680: 98 1f 00 48 stb r0,72(r31) vol->afat = 0; ffc15684: 98 1f 00 50 stb r0,80(r31) vol->free_cls = 0xFFFFFFFF; ffc15688: 38 00 ff ff li r0,-1 ffc1568c: 90 1f 00 40 stw r0,64(r31) vol->next_cl = 0xFFFFFFFF; ffc15690: 90 1f 00 44 stw r0,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); ffc15694: 80 7e 00 34 lwz r3,52(r30) ffc15698: 4b ff f3 e9 bl ffc14a80 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; ffc1569c: 89 3f 00 50 lbz r9,80(r31) ffc156a0: 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)); ffc156a4: 38 60 00 02 li r3,2 ffc156a8: 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; ffc156ac: 7c 09 01 d6 mullw r0,r9,r0 ffc156b0: a1 3f 00 14 lhz r9,20(r31) ffc156b4: 7c 00 4a 14 add r0,r0,r9 ffc156b8: 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)); ffc156bc: 4b ff 1d 1d bl ffc073d8 if ( fs_info->vhash == NULL ) ffc156c0: 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)); ffc156c4: 90 7f 00 68 stw r3,104(r31) if ( fs_info->vhash == NULL ) ffc156c8: 41 9e 00 48 beq- cr7,ffc15710 <== 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 ); ffc156cc: 38 03 00 04 addi r0,r3,4 head->next = tail; head->previous = NULL; tail->previous = head; ffc156d0: 90 63 00 08 stw r3,8(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 ); ffc156d4: 39 23 00 10 addi r9,r3,16 head->next = tail; ffc156d8: 90 03 00 00 stw r0,0(r3) head->previous = NULL; ffc156dc: 3b c0 00 00 li r30,0 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 ); ffc156e0: 38 03 00 0c addi r0,r3,12 head->next = tail; head->previous = NULL; ffc156e4: 93 c3 00 04 stw r30,4(r3) } 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)); ffc156e8: 38 80 00 0c li r4,12 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc156ec: 91 23 00 0c stw r9,12(r3) head->previous = NULL; ffc156f0: 93 c3 00 10 stw r30,16(r3) tail->previous = head; ffc156f4: 90 03 00 14 stw r0,20(r3) ffc156f8: 38 60 00 02 li r3,2 ffc156fc: 4b ff 1c dd bl ffc073d8 if ( fs_info->rhash == NULL ) ffc15700: 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)); ffc15704: 90 7f 00 6c stw r3,108(r31) if ( fs_info->rhash == NULL ) ffc15708: 40 be 00 14 bne+ cr7,ffc1571c <== ALWAYS TAKEN ffc1570c: 48 00 00 70 b ffc1577c <== 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); ffc15710: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc15714: 4b ff 11 dd bl ffc068f0 <== NOT EXECUTED ffc15718: 48 00 00 c8 b ffc157e0 <== NOT EXECUTED 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 ); ffc1571c: 38 03 00 04 addi r0,r3,4 head->next = tail; head->previous = NULL; ffc15720: 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 ); ffc15724: 39 23 00 10 addi r9,r3,16 head->next = tail; ffc15728: 90 03 00 00 stw r0,0(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 ); ffc1572c: 38 03 00 0c addi r0,r3,12 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)); ffc15730: 38 80 00 01 li r4,1 head->next = tail; ffc15734: 91 23 00 0c stw r9,12(r3) head->previous = NULL; tail->previous = head; ffc15738: 90 03 00 14 stw r0,20(r3) 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; ffc1573c: 38 00 01 00 li r0,256 ffc15740: 90 63 00 08 stw r3,8(r3) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc15744: 93 c3 00 10 stw r30,16(r3) 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)); ffc15748: 38 60 01 00 li r3,256 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; ffc1574c: 90 1f 00 78 stw r0,120(r31) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; ffc15750: 81 3f 00 2c lwz r9,44(r31) ffc15754: 88 1f 00 03 lbz r0,3(r31) fs_info->index = 0; ffc15758: 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; ffc1575c: 7d 20 00 30 slw r0,r9,r0 ffc15760: 54 00 20 36 rlwinm r0,r0,4,0,27 ffc15764: 90 1f 00 7c stw r0,124(r31) fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); ffc15768: 4b ff 1c 71 bl ffc073d8 if ( fs_info->uino == NULL ) ffc1576c: 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)); ffc15770: 90 7f 00 70 stw r3,112(r31) if ( fs_info->uino == NULL ) ffc15774: 40 be 00 30 bne+ cr7,ffc157a4 <== ALWAYS TAKEN ffc15778: 48 00 00 14 b ffc1578c <== 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); ffc1577c: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc15780: 4b ff 11 71 bl ffc068f0 <== NOT EXECUTED free(fs_info->vhash); ffc15784: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc15788: 48 00 00 54 b ffc157dc <== 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); ffc1578c: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc15790: 4b ff 11 61 bl ffc068f0 <== NOT EXECUTED free(fs_info->vhash); ffc15794: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc15798: 4b ff 21 51 bl ffc078e8 <== NOT EXECUTED free(fs_info->rhash); ffc1579c: 80 7f 00 6c lwz r3,108(r31) <== NOT EXECUTED ffc157a0: 48 00 00 3c b ffc157dc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); ffc157a4: a0 7f 00 00 lhz r3,0(r31) ffc157a8: 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; ffc157ac: 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)); ffc157b0: 4b ff 1c 29 bl ffc073d8 if (fs_info->sec_buf == NULL) ffc157b4: 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)); ffc157b8: 90 7f 00 8c stw r3,140(r31) if (fs_info->sec_buf == NULL) ffc157bc: 40 be 00 34 bne+ cr7,ffc157f0 <== ALWAYS TAKEN { rtems_disk_release(vol->dd); ffc157c0: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc157c4: 4b ff 11 2d bl ffc068f0 <== NOT EXECUTED free(fs_info->vhash); ffc157c8: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc157cc: 4b ff 21 1d bl ffc078e8 <== NOT EXECUTED free(fs_info->rhash); ffc157d0: 80 7f 00 6c lwz r3,108(r31) <== NOT EXECUTED ffc157d4: 4b ff 21 15 bl ffc078e8 <== NOT EXECUTED free(fs_info->uino); ffc157d8: 80 7f 00 70 lwz r3,112(r31) <== NOT EXECUTED ffc157dc: 4b ff 21 0d bl ffc078e8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); ffc157e0: 48 00 7a c9 bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc157e4: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc157e8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc157ec: 3b a0 ff ff li r29,-1 <== NOT EXECUTED } return RC_OK; } ffc157f0: 39 61 00 e0 addi r11,r1,224 ffc157f4: 7f a3 eb 78 mr r3,r29 ffc157f8: 4b fe d2 bc b ffc02ab4 <_restgpr_14_x> =============================================================================== ffc1be74 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc1be74: 94 21 ff b8 stwu r1,-72(r1) ffc1be78: 7c 08 02 a6 mflr r0 ffc1be7c: 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; ffc1be80: 38 00 00 00 li r0,0 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc1be84: be 81 00 18 stmw r20,24(r1) uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; if (count == 0) ffc1be88: 7c b5 2b 79 mr. r21,r5 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc1be8c: 7c 7f 1b 78 mr r31,r3 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc1be90: 83 63 00 34 lwz r27,52(r3) uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc1be94: 7c 9e 23 78 mr r30,r4 ffc1be98: 7c dd 33 78 mr r29,r6 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; ffc1be9c: 90 01 00 08 stw r0,8(r1) uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { ffc1bea0: 7c f7 3b 78 mr r23,r7 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; ffc1bea4: 82 db 00 34 lwz r22,52(r27) uint32_t i = 2; *cls_added = 0; if (count == 0) return rc; ffc1bea8: 3b 40 00 00 li r26,0 uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; ffc1beac: 90 06 00 00 stw r0,0(r6) 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; ffc1beb0: 3a d6 00 02 addi r22,r22,2 uint32_t i = 2; *cls_added = 0; if (count == 0) ffc1beb4: 41 82 01 8c beq- ffc1c040 <== NEVER TAKEN return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) ffc1beb8: 83 9b 00 44 lwz r28,68(r27) ffc1bebc: 2f 9c ff ff cmpwi cr7,r28,-1 ffc1bec0: 40 be 00 08 bne+ cr7,ffc1bec8 uint32_t *last_cl ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; ffc1bec4: 3b 80 00 02 li r28,2 } } i++; cl4find++; if (cl4find >= data_cls_val) cl4find = 2; ffc1bec8: 3b 00 00 02 li r24,2 ffc1becc: 3b 20 00 00 li r25,0 ffc1bed0: 48 00 01 34 b ffc1c004 * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); ffc1bed4: 7f e3 fb 78 mr r3,r31 ffc1bed8: 7f 84 e3 78 mr r4,r28 ffc1bedc: 38 a1 00 08 addi r5,r1,8 ffc1bee0: 4b ff fa 69 bl ffc1b948 if ( rc != RC_OK ) ffc1bee4: 7c 7a 1b 79 mr. r26,r3 ffc1bee8: 41 a2 00 20 beq+ ffc1bf08 <== ALWAYS TAKEN { if (*cls_added != 0) ffc1beec: 80 1d 00 00 lwz r0,0(r29) <== NOT EXECUTED ffc1bef0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc1bef4: 41 be 01 4c beq+ cr7,ffc1c040 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc1bef8: 80 9e 00 00 lwz r4,0(r30) <== NOT EXECUTED ffc1befc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1bf00: 4b ff fe 9d bl ffc1bd9c <== NOT EXECUTED ffc1bf04: 48 00 01 3c b ffc1c040 <== NOT EXECUTED return rc; } if (next_cln == FAT_GENFAT_FREE) ffc1bf08: 80 01 00 08 lwz r0,8(r1) ffc1bf0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1bf10: 40 9e 00 e0 bne- cr7,ffc1bff0 /* * 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) ffc1bf14: 80 1d 00 00 lwz r0,0(r29) ffc1bf18: 2f 80 00 00 cmpwi cr7,r0,0 ffc1bf1c: 40 9e 00 24 bne- cr7,ffc1bf40 <== NEVER TAKEN { *chain = cl4find; ffc1bf20: 93 9e 00 00 stw r28,0(r30) rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); ffc1bf24: 7f e3 fb 78 mr r3,r31 ffc1bf28: 7f 84 e3 78 mr r4,r28 ffc1bf2c: 38 a0 ff ff li r5,-1 ffc1bf30: 4b ff fb d5 bl ffc1bb04 if ( rc != RC_OK ) ffc1bf34: 2c 03 00 00 cmpwi r3,0 ffc1bf38: 41 a2 00 74 beq+ ffc1bfac <== ALWAYS TAKEN ffc1bf3c: 48 00 01 00 b ffc1c03c <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); ffc1bf40: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1bf44: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc1bf48: 38 a0 ff ff li r5,-1 <== NOT EXECUTED ffc1bf4c: 4b ff fb b9 bl ffc1bb04 <== NOT EXECUTED if ( rc != RC_OK ) ffc1bf50: 7c 74 1b 79 mr. r20,r3 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc1bf54: 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); if ( rc != RC_OK ) ffc1bf58: 41 a2 00 14 beq+ ffc1bf6c <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc1bf5c: 80 9e 00 00 lwz r4,0(r30) <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); ffc1bf60: 7e 9a a3 78 mr r26,r20 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc1bf64: 4b ff fe 39 bl ffc1bd9c <== NOT EXECUTED return rc; ffc1bf68: 48 00 00 d8 b ffc1c040 <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); ffc1bf6c: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED ffc1bf70: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED ffc1bf74: 4b ff fb 91 bl ffc1bb04 <== NOT EXECUTED if ( rc != RC_OK ) ffc1bf78: 7c 79 1b 79 mr. r25,r3 <== NOT EXECUTED ffc1bf7c: 41 a2 00 30 beq+ ffc1bfac <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc1bf80: 80 9e 00 00 lwz r4,0(r30) <== NOT EXECUTED ffc1bf84: 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); ffc1bf88: 7f 3a cb 78 mr r26,r25 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); ffc1bf8c: 4b ff fe 11 bl ffc1bd9c <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); ffc1bf90: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc1bf94: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc1bf98: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1bf9c: 4b ff fb 69 bl ffc1bb04 <== NOT EXECUTED fat_buf_release(fs_info); ffc1bfa0: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc1bfa4: 4b ff 8a dd bl ffc14a80 <== NOT EXECUTED return rc; ffc1bfa8: 48 00 00 98 b ffc1c040 <== NOT EXECUTED } } save_cln = cl4find; (*cls_added)++; ffc1bfac: 81 3d 00 00 lwz r9,0(r29) ffc1bfb0: 38 09 00 01 addi r0,r9,1 /* have we satisfied request ? */ if (*cls_added == count) ffc1bfb4: 7f 80 a8 00 cmpw cr7,r0,r21 return rc; } } save_cln = cl4find; (*cls_added)++; ffc1bfb8: 90 1d 00 00 stw r0,0(r29) /* have we satisfied request ? */ if (*cls_added == count) ffc1bfbc: 40 be 00 30 bne+ cr7,ffc1bfec <== NEVER TAKEN { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) ffc1bfc0: 80 1b 00 40 lwz r0,64(r27) (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; ffc1bfc4: 93 9b 00 44 stw r28,68(r27) if (fs_info->vol.free_cls != 0xFFFFFFFF) ffc1bfc8: 2f 80 ff ff cmpwi cr7,r0,-1 ffc1bfcc: 41 9e 00 10 beq- cr7,ffc1bfdc <== ALWAYS TAKEN fs_info->vol.free_cls -= (*cls_added); ffc1bfd0: 81 3d 00 00 lwz r9,0(r29) <== NOT EXECUTED ffc1bfd4: 7c 09 00 50 subf r0,r9,r0 <== NOT EXECUTED ffc1bfd8: 90 1b 00 40 stw r0,64(r27) <== NOT EXECUTED *last_cl = save_cln; ffc1bfdc: 93 97 00 00 stw r28,0(r23) fat_buf_release(fs_info); ffc1bfe0: 7f 63 db 78 mr r3,r27 ffc1bfe4: 4b ff 8a 9d bl ffc14a80 return rc; ffc1bfe8: 48 00 00 58 b ffc1c040 save_cln = cl4find; (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) ffc1bfec: 7f 99 e3 78 mr r25,r28 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; ffc1bff0: 3b 9c 00 01 addi r28,r28,1 if (cl4find >= data_cls_val) ffc1bff4: 7f 9c b0 40 cmplw cr7,r28,r22 *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; ffc1bff8: 3b 18 00 01 addi r24,r24,1 cl4find++; if (cl4find >= data_cls_val) ffc1bffc: 41 9c 00 08 blt- cr7,ffc1c004 <== ALWAYS TAKEN cl4find = 2; ffc1c000: 3b 80 00 02 li r28,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) ffc1c004: 7f 98 b0 40 cmplw cr7,r24,r22 ffc1c008: 41 9c fe cc blt+ cr7,ffc1bed4 <== ALWAYS TAKEN if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) ffc1c00c: 80 1b 00 40 lwz r0,64(r27) <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; ffc1c010: 93 3b 00 44 stw r25,68(r27) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) ffc1c014: 2f 80 ff ff cmpwi cr7,r0,-1 <== NOT EXECUTED ffc1c018: 41 9e 00 10 beq- cr7,ffc1c028 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); ffc1c01c: 81 3d 00 00 lwz r9,0(r29) <== NOT EXECUTED ffc1c020: 7c 09 00 50 subf r0,r9,r0 <== NOT EXECUTED ffc1c024: 90 1b 00 40 stw r0,64(r27) <== NOT EXECUTED *last_cl = save_cln; ffc1c028: 93 37 00 00 stw r25,0(r23) <== NOT EXECUTED fat_buf_release(fs_info); ffc1c02c: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED return RC_OK; ffc1c030: 3b 40 00 00 li r26,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); ffc1c034: 4b ff 8a 4d bl ffc14a80 <== NOT EXECUTED return RC_OK; ffc1c038: 48 00 00 08 b ffc1c040 <== NOT EXECUTED * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); ffc1c03c: 7c 7a 1b 78 mr r26,r3 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } ffc1c040: 39 61 00 48 addi r11,r1,72 ffc1c044: 7f 43 d3 78 mr r3,r26 ffc1c048: 4b fe 6a 84 b ffc02acc <_restgpr_20_x> =============================================================================== ffc1bb04 : 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)) ) ffc1bb04: 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 ) { ffc1bb08: 94 21 ff d0 stwu r1,-48(r1) ffc1bb0c: 7c 08 02 a6 mflr r0 ffc1bb10: bf 41 00 18 stmw r26,24(r1) ffc1bb14: 7c 9e 23 78 mr r30,r4 ffc1bb18: 7c bc 2b 78 mr r28,r5 ffc1bb1c: 90 01 00 34 stw r0,52(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; ffc1bb20: 38 00 00 00 li r0,0 uint32_t cln, uint32_t in_val ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ffc1bb24: 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; ffc1bb28: 90 01 00 08 stw r0,8(r1) /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) ffc1bb2c: 40 9d 02 58 ble- cr7,ffc1bd84 <== NEVER TAKEN ffc1bb30: 81 3f 00 34 lwz r9,52(r31) ffc1bb34: 38 09 00 01 addi r0,r9,1 ffc1bb38: 7f 84 00 40 cmplw cr7,r4,r0 ffc1bb3c: 41 9d 02 48 bgt- cr7,ffc1bd84 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + ffc1bb40: 88 1f 00 0a lbz r0,10(r31) ffc1bb44: 54 9b f8 7e rlwinm r27,r4,31,1,31 ffc1bb48: 7f 7b 22 14 add r27,r27,r4 ffc1bb4c: 70 09 00 01 andi. r9,r0,1 ffc1bb50: 40 82 00 14 bne- ffc1bb64 <== ALWAYS TAKEN ffc1bb54: 70 0b 00 02 andi. r11,r0,2 <== NOT EXECUTED ffc1bb58: 54 9b 10 3a rlwinm r27,r4,2,0,29 <== NOT EXECUTED ffc1bb5c: 41 82 00 08 beq- ffc1bb64 <== NOT EXECUTED ffc1bb60: 54 9b 08 3c rlwinm r27,r4,1,0,30 <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); ffc1bb64: 2f 89 00 00 cmpwi cr7,r9,0 /* 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) + ffc1bb68: 89 7f 00 02 lbz r11,2(r31) fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); ffc1bb6c: 57 dd f8 7e rlwinm r29,r30,31,1,31 /* 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) + ffc1bb70: 7f 7b 5c 30 srw r27,r27,r11 ffc1bb74: 81 7f 00 4c lwz r11,76(r31) fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); ffc1bb78: 7f bd f2 14 add r29,r29,r30 /* 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) + ffc1bb7c: 7f 7b 5a 14 add r27,r27,r11 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); ffc1bb80: 40 9e 00 14 bne- cr7,ffc1bb94 <== ALWAYS TAKEN ffc1bb84: 70 09 00 02 andi. r9,r0,2 <== NOT EXECUTED ffc1bb88: 57 dd 10 3a rlwinm r29,r30,2,0,29 <== NOT EXECUTED ffc1bb8c: 41 82 00 08 beq- ffc1bb94 <== NOT EXECUTED ffc1bb90: 57 dd 08 3c rlwinm r29,r30,1,0,30 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); ffc1bb94: 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); ffc1bb98: a3 5f 00 00 lhz r26,0(r31) rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); ffc1bb9c: 7f 64 db 78 mr r4,r27 ffc1bba0: 38 a0 00 01 li r5,1 ffc1bba4: 38 c1 00 08 addi r6,r1,8 ffc1bba8: 4b ff 8c f5 bl ffc1489c if (rc != RC_OK) ffc1bbac: 2c 03 00 00 cmpwi r3,0 ffc1bbb0: 40 82 01 e4 bne- ffc1bd94 <== NEVER TAKEN 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); ffc1bbb4: 3b 5a ff ff addi r26,r26,-1 ffc1bbb8: 7f ba d0 38 and r26,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 ) ffc1bbbc: 8b bf 00 0a lbz r29,10(r31) ffc1bbc0: 2f 9d 00 02 cmpwi cr7,r29,2 ffc1bbc4: 41 9e 01 54 beq- cr7,ffc1bd18 <== NEVER TAKEN ffc1bbc8: 2f 9d 00 04 cmpwi cr7,r29,4 ffc1bbcc: 41 9e 01 6c beq- cr7,ffc1bd38 <== NEVER TAKEN ffc1bbd0: 2f 9d 00 01 cmpwi cr7,r29,1 ffc1bbd4: 40 be 01 b0 bne+ cr7,ffc1bd84 <== NEVER TAKEN { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) ffc1bbd8: 73 cb 00 01 andi. r11,r30,1 ffc1bbdc: 81 21 00 08 lwz r9,8(r1) ffc1bbe0: 41 82 00 80 beq- ffc1bc60 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; ffc1bbe4: 81 29 00 24 lwz r9,36(r9) switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; ffc1bbe8: 57 9c 24 36 rlwinm r28,r28,4,16,27 *((uint8_t *)(block0->buffer + ofs)) = ffc1bbec: 7c 09 d0 ae lbzx r0,r9,r26 ffc1bbf0: 54 00 07 3e clrlwi r0,r0,28 ffc1bbf4: 7c 09 d1 ae stbx r0,r9,r26 (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | ffc1bbf8: 81 21 00 08 lwz r9,8(r1) ffc1bbfc: 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)) = ffc1bc00: 7c 09 d0 ae lbzx r0,r9,r26 ffc1bc04: 7c 00 e3 78 or r0,r0,r28 ffc1bc08: 7c 09 d1 ae stbx r0,r9,r26 (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) ffc1bc0c: a1 3f 00 00 lhz r9,0(r31) } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; ffc1bc10: 9b bf 00 84 stb r29,132(r31) ffc1bc14: 38 09 ff ff addi r0,r9,-1 ffc1bc18: 7f 9a 00 00 cmpw cr7,r26,r0 ffc1bc1c: 40 be 00 30 bne+ cr7,ffc1bc4c <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, ffc1bc20: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1bc24: 38 9b 00 01 addi r4,r27,1 <== NOT EXECUTED ffc1bc28: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc1bc2c: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc1bc30: 4b ff 8c 6d bl ffc1489c <== NOT EXECUTED &block0); if (rc != RC_OK) ffc1bc34: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc1bc38: 40 82 01 5c bne- ffc1bd94 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; ffc1bc3c: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc1bc40: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED ffc1bc44: 98 69 00 00 stb r3,0(r9) <== NOT EXECUTED ffc1bc48: 48 00 00 7c b ffc1bcc4 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; ffc1bc4c: 81 21 00 08 lwz r9,8(r1) ffc1bc50: 3b 5a 00 01 addi r26,r26,1 ffc1bc54: 81 29 00 24 lwz r9,36(r9) ffc1bc58: 7c 69 d1 ae stbx r3,r9,r26 ffc1bc5c: 48 00 00 a0 b ffc1bcfc } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; ffc1bc60: 81 29 00 24 lwz r9,36(r9) (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; ffc1bc64: 57 9c 05 3e clrlwi r28,r28,20 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; ffc1bc68: 7c 69 d1 ae stbx r3,r9,r26 *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | ffc1bc6c: 81 21 00 08 lwz r9,8(r1) ffc1bc70: 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)) = ffc1bc74: 7c 09 d0 ae lbzx r0,r9,r26 ffc1bc78: 7c 00 e3 78 or r0,r0,r28 ffc1bc7c: 7c 09 d1 ae stbx r0,r9,r26 (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) ffc1bc80: a1 3f 00 00 lhz r9,0(r31) ffc1bc84: 9b bf 00 84 stb r29,132(r31) ffc1bc88: 38 09 ff ff addi r0,r9,-1 ffc1bc8c: 7f 9a 00 00 cmpw cr7,r26,r0 ffc1bc90: 40 be 00 54 bne+ cr7,ffc1bce4 <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, ffc1bc94: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1bc98: 38 9b 00 01 addi r4,r27,1 <== NOT EXECUTED ffc1bc9c: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc1bca0: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc1bca4: 4b ff 8b f9 bl ffc1489c <== NOT EXECUTED &block0); if (rc != RC_OK) ffc1bca8: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc1bcac: 40 82 00 e8 bne- ffc1bd94 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; ffc1bcb0: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc1bcb4: 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)) = ffc1bcb8: 88 09 00 00 lbz r0,0(r9) <== NOT EXECUTED ffc1bcbc: 54 00 00 36 rlwinm r0,r0,0,0,27 <== NOT EXECUTED ffc1bcc0: 98 09 00 00 stb r0,0(r9) <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | ffc1bcc4: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); ffc1bcc8: 57 9c c2 3e rlwinm r28,r28,24,8,31 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | ffc1bccc: 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)) = ffc1bcd0: 88 09 00 00 lbz r0,0(r9) <== NOT EXECUTED ffc1bcd4: 7f 9c 03 78 or r28,r28,r0 <== NOT EXECUTED ffc1bcd8: 9b 89 00 00 stb r28,0(r9) <== NOT EXECUTED ffc1bcdc: 9b bf 00 84 stb r29,132(r31) <== NOT EXECUTED ffc1bce0: 48 00 00 b4 b ffc1bd94 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; ffc1bce4: 81 21 00 08 lwz r9,8(r1) ffc1bce8: 3b 5a 00 01 addi r26,r26,1 ffc1bcec: 81 29 00 24 lwz r9,36(r9) fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = ffc1bcf0: 7c 09 d0 ae lbzx r0,r9,r26 ffc1bcf4: 54 00 00 36 rlwinm r0,r0,0,0,27 ffc1bcf8: 7c 09 d1 ae stbx r0,r9,r26 (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | ffc1bcfc: 81 21 00 08 lwz r9,8(r1) (uint8_t )((fat16_clv & 0xFF00)>>8); ffc1bd00: 57 9c c2 3e rlwinm r28,r28,24,8,31 { *((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))) | ffc1bd04: 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)) = ffc1bd08: 7c 09 d0 ae lbzx r0,r9,r26 ffc1bd0c: 7c 1c e3 78 or r28,r0,r28 ffc1bd10: 7f 89 d1 ae stbx r28,r9,r26 ffc1bd14: 48 00 00 80 b ffc1bd94 } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = ffc1bd18: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); ffc1bd1c: 57 9c 04 3e clrlwi r28,r28,16 <== NOT EXECUTED ffc1bd20: 57 80 40 2e rlwinm r0,r28,8,0,23 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = ffc1bd24: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); ffc1bd28: 57 9c c2 3e rlwinm r28,r28,24,8,31 <== NOT EXECUTED ffc1bd2c: 7c 1c e3 78 or r28,r0,r28 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = ffc1bd30: 7f 89 d3 2e sthx r28,r9,r26 <== NOT EXECUTED ffc1bd34: 48 00 00 44 b ffc1bd78 <== NOT EXECUTED (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)); ffc1bd38: 57 9c 01 3e clrlwi r28,r28,4 <== NOT EXECUTED ffc1bd3c: 53 8b 46 3e rlwimi r11,r28,8,24,31 <== NOT EXECUTED ffc1bd40: 53 8b c4 2e rlwimi r11,r28,24,16,23 <== NOT EXECUTED ffc1bd44: 53 8b 42 1e rlwimi r11,r28,8,8,15 <== NOT EXECUTED ffc1bd48: 53 8b c0 0e rlwimi r11,r28,24,0,7 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); ffc1bd4c: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc1bd50: 3c 00 f0 00 lis r0,-4096 <== NOT EXECUTED ffc1bd54: 81 29 00 24 lwz r9,36(r9) <== NOT EXECUTED ffc1bd58: 50 0a 46 3e rlwimi r10,r0,8,24,31 <== NOT EXECUTED ffc1bd5c: 50 0a c4 2e rlwimi r10,r0,24,16,23 <== NOT EXECUTED ffc1bd60: 50 0a 42 1e rlwimi r10,r0,8,8,15 <== NOT EXECUTED ffc1bd64: 50 0a c0 0e rlwimi r10,r0,24,0,7 <== NOT EXECUTED ffc1bd68: 7c 09 d0 2e lwzx r0,r9,r26 <== NOT EXECUTED ffc1bd6c: 7d 40 00 38 and r0,r10,r0 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); ffc1bd70: 7c 00 5b 78 or r0,r0,r11 <== 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)) = ffc1bd74: 7c 09 d1 2e stwx r0,r9,r26 <== NOT EXECUTED ffc1bd78: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc1bd7c: 98 1f 00 84 stb r0,132(r31) <== NOT EXECUTED ffc1bd80: 48 00 00 14 b ffc1bd94 <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); ffc1bd84: 48 00 15 25 bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc1bd88: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc1bd8c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1bd90: 38 60 ff ff li r3,-1 <== NOT EXECUTED break; } return RC_OK; } ffc1bd94: 39 61 00 30 addi r11,r1,48 ffc1bd98: 4b fe 6d 4c b ffc02ae4 <_restgpr_26_x> =============================================================================== ffc15054 : * 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) { ffc15054: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc15058: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc1505c: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc15060: bf 81 00 08 stmw r28,8(r1) <== NOT EXECUTED int rc = RC_OK; ffc15064: 3b c0 00 00 li r30,0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; ffc15068: 83 e3 00 34 lwz r31,52(r3) <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) ffc1506c: 88 1f 00 0a lbz r0,10(r31) <== NOT EXECUTED ffc15070: 70 09 00 04 andi. r9,r0,4 <== NOT EXECUTED ffc15074: 41 a2 00 1c beq+ ffc15090 <== NOT EXECUTED { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, ffc15078: 80 9f 00 40 lwz r4,64(r31) <== NOT EXECUTED ffc1507c: 80 bf 00 44 lwz r5,68(r31) <== NOT EXECUTED ffc15080: 4b ff ff 49 bl ffc14fc8 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) ffc15084: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED ffc15088: 41 82 00 08 beq- ffc15090 <== NOT EXECUTED rc = -1; ffc1508c: 3b c0 ff ff li r30,-1 <== NOT EXECUTED } fat_buf_release(fs_info); ffc15090: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc15094: 4b ff f9 ed bl ffc14a80 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) ffc15098: 80 7f 00 58 lwz r3,88(r31) <== NOT EXECUTED ffc1509c: 80 9f 00 5c lwz r4,92(r31) <== NOT EXECUTED ffc150a0: 4b ff e3 19 bl ffc133b8 <== NOT EXECUTED ffc150a4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc150a8: 41 be 00 08 beq+ cr7,ffc150b0 <== NOT EXECUTED rc = -1; ffc150ac: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc150b0: 3b a0 00 00 li r29,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; ffc150b4: 83 9f 00 68 lwz r28,104(r31) <== NOT EXECUTED ffc150b8: 7f 9c ea 14 add r28,r28,r29 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) ffc150bc: 48 00 00 08 b ffc150c4 <== NOT EXECUTED free(node); ffc150c0: 4b ff 28 29 bl ffc078e8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); ffc150c4: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc150c8: 4b ff 79 4d bl ffc0ca14 <_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 ) ffc150cc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc150d0: 40 9e ff f0 bne+ cr7,ffc150c0 <== 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++) ffc150d4: 2f 9d 00 0c cmpwi cr7,r29,12 <== NOT EXECUTED ffc150d8: 3b bd 00 0c addi r29,r29,12 <== NOT EXECUTED ffc150dc: 40 be ff d8 bne- cr7,ffc150b4 <== NOT EXECUTED ffc150e0: 3b a0 00 00 li r29,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; ffc150e4: 83 9f 00 6c lwz r28,108(r31) <== NOT EXECUTED ffc150e8: 7f 9c ea 14 add r28,r28,r29 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) ffc150ec: 48 00 00 08 b ffc150f4 <== NOT EXECUTED free(node); ffc150f0: 4b ff 27 f9 bl ffc078e8 <== NOT EXECUTED ffc150f4: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc150f8: 4b ff 79 1d bl ffc0ca14 <_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 ) ffc150fc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc15100: 40 9e ff f0 bne+ cr7,ffc150f0 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) ffc15104: 2f 9d 00 0c cmpwi cr7,r29,12 <== NOT EXECUTED ffc15108: 3b bd 00 0c addi r29,r29,12 <== NOT EXECUTED ffc1510c: 40 be ff d8 bne- cr7,ffc150e4 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); ffc15110: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc15114: 4b ff 27 d5 bl ffc078e8 <== NOT EXECUTED free(fs_info->rhash); ffc15118: 80 7f 00 6c lwz r3,108(r31) <== NOT EXECUTED ffc1511c: 4b ff 27 cd bl ffc078e8 <== NOT EXECUTED free(fs_info->uino); ffc15120: 80 7f 00 70 lwz r3,112(r31) <== NOT EXECUTED ffc15124: 4b ff 27 c5 bl ffc078e8 <== NOT EXECUTED free(fs_info->sec_buf); ffc15128: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc1512c: 4b ff 27 bd bl ffc078e8 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); ffc15130: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc15134: 4b ff 17 bd bl ffc068f0 <== NOT EXECUTED if (rc) ffc15138: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED ffc1513c: 41 be 00 10 beq+ cr7,ffc1514c <== NOT EXECUTED errno = EIO; ffc15140: 48 00 81 69 bl ffc1d2a8 <__errno> <== NOT EXECUTED ffc15144: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc15148: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED return rc; } ffc1514c: 39 61 00 18 addi r11,r1,24 <== NOT EXECUTED ffc15150: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc15154: 4b fe d9 98 b ffc02aec <_restgpr_28_x> <== NOT EXECUTED =============================================================================== ffc1b8dc : int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc1b8dc: 3d 20 00 00 lis r9,0 int fcntl( int fd, int cmd, ... ) { ffc1b8e0: 94 21 ff c8 stwu r1,-56(r1) ffc1b8e4: 7c 08 02 a6 mflr r0 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc1b8e8: 81 09 26 dc lwz r8,9948(r9) int fcntl( int fd, int cmd, ... ) { ffc1b8ec: 90 01 00 3c stw r0,60(r1) int ret; va_list ap; va_start( ap, cmd ); ffc1b8f0: 38 00 00 02 li r0,2 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc1b8f4: 7f 83 40 40 cmplw cr7,r3,r8 ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc1b8f8: 98 01 00 08 stb r0,8(r1) ffc1b8fc: 38 01 00 40 addi r0,r1,64 ffc1b900: 90 01 00 0c stw r0,12(r1) ffc1b904: 38 01 00 10 addi r0,r1,16 int fcntl( int fd, int cmd, ... ) { ffc1b908: bf a1 00 2c stmw r29,44(r1) ffc1b90c: 7c 9e 23 78 mr r30,r4 ffc1b910: 90 a1 00 18 stw r5,24(r1) ffc1b914: 90 c1 00 1c stw r6,28(r1) ffc1b918: 90 e1 00 20 stw r7,32(r1) int ret; va_list ap; va_start( ap, cmd ); ffc1b91c: 90 01 00 10 stw r0,16(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc1b920: 40 9c 00 20 bge- cr7,ffc1b940 iop = rtems_libio_iop( fd ); ffc1b924: 3d 20 00 00 lis r9,0 ffc1b928: 81 49 27 88 lwz r10,10120(r9) ffc1b92c: 54 7f 30 32 rlwinm r31,r3,6,0,25 ffc1b930: 7f ea fa 14 add r31,r10,r31 rtems_libio_check_is_open(iop); ffc1b934: 80 7f 00 18 lwz r3,24(r31) ffc1b938: 70 60 01 00 andi. r0,r3,256 ffc1b93c: 40 a2 00 10 bne+ ffc1b94c ffc1b940: 4b ff 4d b5 bl ffc106f4 <__errno> ffc1b944: 38 00 00 09 li r0,9 ffc1b948: 48 00 01 80 b ffc1bac8 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc1b94c: 2b 84 00 09 cmplwi cr7,r4,9 ffc1b950: 41 9d 01 70 bgt- cr7,ffc1bac0 ffc1b954: 3d 20 ff c2 lis r9,-62 ffc1b958: 39 29 ea dc addi r9,r9,-5412 ffc1b95c: 54 80 10 3a rlwinm r0,r4,2,0,29 ffc1b960: 7c 09 00 2e lwzx r0,r9,r0 ffc1b964: 7d 20 4a 14 add r9,r0,r9 ffc1b968: 7d 29 03 a6 mtctr r9 ffc1b96c: 4e 80 04 20 bctr case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc1b970: 89 61 00 08 lbz r11,8(r1) ffc1b974: 2b 8b 00 07 cmplwi cr7,r11,7 ffc1b978: 41 9d 00 1c bgt- cr7,ffc1b994 <== NEVER TAKEN ffc1b97c: 81 21 00 10 lwz r9,16(r1) ffc1b980: 55 60 10 3a rlwinm r0,r11,2,0,29 ffc1b984: 39 6b 00 01 addi r11,r11,1 ffc1b988: 7d 29 02 14 add r9,r9,r0 ffc1b98c: 99 61 00 08 stb r11,8(r1) ffc1b990: 48 00 00 10 b ffc1b9a0 ffc1b994: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc1b998: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc1b99c: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc1b9a0: 80 09 00 00 lwz r0,0(r9) if ( fd2 ) ffc1b9a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc1b9a8: 41 9e 00 1c beq- cr7,ffc1b9c4 diop = rtems_libio_iop( fd2 ); ffc1b9ac: 7f 80 40 40 cmplw cr7,r0,r8 ffc1b9b0: 38 60 00 00 li r3,0 ffc1b9b4: 40 9c 00 1c bge- cr7,ffc1b9d0 <== NEVER TAKEN ffc1b9b8: 54 03 30 32 rlwinm r3,r0,6,0,25 ffc1b9bc: 7c 6a 1a 14 add r3,r10,r3 ffc1b9c0: 48 00 00 10 b ffc1b9d0 else { /* allocate a file control block */ diop = rtems_libio_allocate(); ffc1b9c4: 4b fe 98 ad bl ffc05270 if ( diop == 0 ) { ffc1b9c8: 2c 03 00 00 cmpwi r3,0 ffc1b9cc: 41 82 01 34 beq- ffc1bb00 <== NEVER TAKEN break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc1b9d0: 39 63 00 1c addi r11,r3,28 ret = -1; break; } } diop->flags = iop->flags; ffc1b9d4: 80 1f 00 18 lwz r0,24(r31) diop->pathinfo = iop->pathinfo; ffc1b9d8: 38 9f 00 1c addi r4,r31,28 ffc1b9dc: 7c a4 a4 aa lswi r5,r4,20 ffc1b9e0: 7c ab a5 aa stswi r5,r11,20 ret = (int) (diop - rtems_libio_iops); ffc1b9e4: 3d 20 00 00 lis r9,0 ffc1b9e8: 83 a9 27 88 lwz r29,10120(r9) ret = -1; break; } } diop->flags = iop->flags; ffc1b9ec: 90 03 00 18 stw r0,24(r3) diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); ffc1b9f0: 7c 7d 18 50 subf r3,r29,r3 ffc1b9f4: 7c 7d 36 70 srawi r29,r3,6 ffc1b9f8: 48 00 00 d8 b ffc1bad0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); ffc1b9fc: 54 7d af fe rlwinm r29,r3,21,31,31 ffc1ba00: 48 00 00 d8 b ffc1bad8 * 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 ) ) ffc1ba04: 89 61 00 08 lbz r11,8(r1) ffc1ba08: 2b 8b 00 07 cmplwi cr7,r11,7 ffc1ba0c: 41 9d 00 1c bgt- cr7,ffc1ba28 <== NEVER TAKEN ffc1ba10: 81 21 00 10 lwz r9,16(r1) ffc1ba14: 55 60 10 3a rlwinm r0,r11,2,0,29 ffc1ba18: 39 6b 00 01 addi r11,r11,1 ffc1ba1c: 7d 29 02 14 add r9,r9,r0 ffc1ba20: 99 61 00 08 stb r11,8(r1) ffc1ba24: 48 00 00 10 b ffc1ba34 ffc1ba28: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc1ba2c: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc1ba30: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc1ba34: 80 09 00 00 lwz r0,0(r9) ffc1ba38: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ba3c: 41 9e 00 0c beq- cr7,ffc1ba48 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; ffc1ba40: 60 63 08 00 ori r3,r3,2048 ffc1ba44: 48 00 00 64 b ffc1baa8 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; ffc1ba48: 54 63 05 66 rlwinm r3,r3,0,21,19 ffc1ba4c: 48 00 00 5c b ffc1baa8 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); ffc1ba50: 4b fe 97 d5 bl ffc05224 ffc1ba54: 7c 7d 1b 78 mr r29,r3 ffc1ba58: 48 00 00 78 b ffc1bad0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); ffc1ba5c: 89 61 00 08 lbz r11,8(r1) ffc1ba60: 2b 8b 00 07 cmplwi cr7,r11,7 ffc1ba64: 41 9d 00 1c bgt- cr7,ffc1ba80 <== NEVER TAKEN ffc1ba68: 81 21 00 10 lwz r9,16(r1) ffc1ba6c: 55 60 10 3a rlwinm r0,r11,2,0,29 ffc1ba70: 39 6b 00 01 addi r11,r11,1 ffc1ba74: 7d 29 02 14 add r9,r9,r0 ffc1ba78: 99 61 00 08 stb r11,8(r1) ffc1ba7c: 48 00 00 10 b ffc1ba8c ffc1ba80: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc1ba84: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc1ba88: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc1ba8c: 80 69 00 00 lwz r3,0(r9) ffc1ba90: 4b fe 97 51 bl ffc051e0 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); ffc1ba94: 80 1f 00 18 lwz r0,24(r31) ffc1ba98: 70 63 02 01 andi. r3,r3,513 ffc1ba9c: 39 20 fd fe li r9,-514 ffc1baa0: 7d 20 00 38 and r0,r9,r0 ffc1baa4: 7c 63 03 78 or r3,r3,r0 ffc1baa8: 90 7f 00 18 stw r3,24(r31) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; ffc1baac: 3b a0 00 00 li r29,0 ffc1bab0: 48 00 00 28 b ffc1bad8 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; ffc1bab4: 4b ff 4c 41 bl ffc106f4 <__errno> ffc1bab8: 38 00 00 86 li r0,134 ffc1babc: 48 00 00 0c b ffc1bac8 ret = -1; break; default: errno = EINVAL; ffc1bac0: 4b ff 4c 35 bl ffc106f4 <__errno> ffc1bac4: 38 00 00 16 li r0,22 ffc1bac8: 90 03 00 00 stw r0,0(r3) ffc1bacc: 48 00 00 34 b ffc1bb00 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { ffc1bad0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc1bad4: 41 9c 00 30 blt- cr7,ffc1bb04 <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); ffc1bad8: 81 3f 00 24 lwz r9,36(r31) ffc1badc: 7f e4 fb 78 mr r4,r31 ffc1bae0: 7f c3 f3 78 mr r3,r30 ffc1bae4: 80 09 00 30 lwz r0,48(r9) ffc1bae8: 7c 09 03 a6 mtctr r0 ffc1baec: 4e 80 04 21 bctrl if (err) { ffc1baf0: 7c 7f 1b 79 mr. r31,r3 ffc1baf4: 41 a2 00 10 beq+ ffc1bb04 <== ALWAYS TAKEN errno = err; ffc1baf8: 4b ff 4b fd bl ffc106f4 <__errno> <== NOT EXECUTED ffc1bafc: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED ret = -1; ffc1bb00: 3b a0 ff ff li r29,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc1bb04: 39 61 00 38 addi r11,r1,56 ffc1bb08: 7f a3 eb 78 mr r3,r29 ffc1bb0c: 4b fe 50 64 b ffc00b70 <_restgpr_29_x> =============================================================================== ffc0e9d0 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc0e9d0: 94 21 ff d0 stwu r1,-48(r1) ffc0e9d4: 7c 08 02 a6 mflr r0 ffc0e9d8: bf 61 00 1c stmw r27,28(r1) static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc0e9dc: 3f c0 00 00 lis r30,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc0e9e0: 7c 7d 1b 78 mr r29,r3 ffc0e9e4: 90 01 00 34 stw r0,52(r1) ffc0e9e8: 7c 9c 23 78 mr r28,r4 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc0e9ec: 3b fe 29 60 addi r31,r30,10592 ffc0e9f0: 80 1e 29 60 lwz r0,10592(r30) ffc0e9f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e9f8: 40 be 00 60 bne+ cr7,ffc0ea58 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 ); ffc0e9fc: 3d 20 00 00 lis r9,0 ffc0ea00: 80 69 27 90 lwz r3,10128(r9) ffc0ea04: 38 80 00 00 li r4,0 ffc0ea08: 38 a0 00 00 li r5,0 ffc0ea0c: 4b ff b2 d1 bl ffc09cdc rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { ffc0ea10: 80 1e 29 60 lwz r0,10592(r30) free(pipe); } static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; ffc0ea14: 3b 60 00 00 li r27,0 if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { ffc0ea18: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ea1c: 40 be 00 24 bne+ cr7,ffc0ea40 <== NEVER TAKEN sc = rtems_semaphore_create( ffc0ea20: 3c 60 50 49 lis r3,20553 ffc0ea24: 60 63 50 45 ori r3,r3,20549 ffc0ea28: 38 80 00 01 li r4,1 ffc0ea2c: 38 a0 00 54 li r5,84 ffc0ea30: 38 c0 00 00 li r6,0 ffc0ea34: 7f e7 fb 78 mr r7,r31 ffc0ea38: 4b ff b0 31 bl ffc09a68 ffc0ea3c: 7c 7b 1b 78 mr r27,r3 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0ea40: 3d 20 00 00 lis r9,0 ffc0ea44: 80 69 27 90 lwz r3,10128(r9) } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { ffc0ea48: 3b c0 ff f4 li r30,-12 ffc0ea4c: 4b ff b3 bd bl ffc09e08 ffc0ea50: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0ea54: 40 be 03 3c bne+ cr7,ffc0ed90 sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc0ea58: 3d 20 00 00 lis r9,0 ffc0ea5c: 80 69 29 60 lwz r3,10592(r9) ffc0ea60: 38 80 00 00 li r4,0 ffc0ea64: 38 a0 00 00 li r5,0 ffc0ea68: 4b ff b2 75 bl ffc09cdc } if (sc == RTEMS_SUCCESSFUL) { ffc0ea6c: 3b c0 ff f4 li r30,-12 ffc0ea70: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ea74: 40 9e 03 1c bne- cr7,ffc0ed90 <== NEVER TAKEN err = pipe_lock(); if (err) return err; pipe = *pipep; ffc0ea78: 83 fd 00 00 lwz r31,0(r29) if (pipe == NULL) { ffc0ea7c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0ea80: 40 be 00 f8 bne+ cr7,ffc0eb78 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ffc0ea84: 38 60 00 34 li r3,52 ffc0ea88: 4b ff 7e 29 bl ffc068b0 if (pipe == NULL) ffc0ea8c: 7c 7f 1b 79 mr. r31,r3 ffc0ea90: 41 82 00 e0 beq- ffc0eb70 return err; memset(pipe, 0, sizeof(pipe_control_t)); ffc0ea94: 38 80 00 00 li r4,0 ffc0ea98: 38 a0 00 34 li r5,52 ffc0ea9c: 48 00 40 9d bl ffc12b38 pipe->Size = PIPE_BUF; ffc0eaa0: 38 00 02 00 li r0,512 ffc0eaa4: 90 1f 00 04 stw r0,4(r31) pipe->Buffer = malloc(pipe->Size); ffc0eaa8: 38 60 02 00 li r3,512 ffc0eaac: 4b ff 7e 05 bl ffc068b0 if (! pipe->Buffer) ffc0eab0: 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); ffc0eab4: 90 7f 00 00 stw r3,0(r31) if (! pipe->Buffer) ffc0eab8: 41 9e 00 b0 beq- cr7,ffc0eb68 <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), ffc0eabc: 3f c0 00 00 lis r30,0 ffc0eac0: 88 7e 21 bd lbz r3,8637(r30) if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( ffc0eac4: 38 80 00 00 li r4,0 ffc0eac8: 38 a0 00 00 li r5,0 ffc0eacc: 64 63 50 49 oris r3,r3,20553 ffc0ead0: 60 63 72 00 ori r3,r3,29184 ffc0ead4: 38 df 00 2c addi r6,r31,44 ffc0ead8: 48 00 11 09 bl ffc0fbe0 ffc0eadc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0eae0: 40 9e 00 80 bne- cr7,ffc0eb60 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), ffc0eae4: 88 7e 21 bd lbz r3,8637(r30) 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( ffc0eae8: 38 80 00 00 li r4,0 ffc0eaec: 38 a0 00 00 li r5,0 ffc0eaf0: 64 63 50 49 oris r3,r3,20553 ffc0eaf4: 60 63 77 00 ori r3,r3,30464 ffc0eaf8: 38 df 00 30 addi r6,r31,48 ffc0eafc: 48 00 10 e5 bl ffc0fbe0 ffc0eb00: 2f 83 00 00 cmpwi cr7,r3,0 ffc0eb04: 40 9e 00 54 bne- cr7,ffc0eb58 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, ffc0eb08: 88 7e 21 bd lbz r3,8637(r30) 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( ffc0eb0c: 38 80 00 01 li r4,1 ffc0eb10: 38 a0 00 10 li r5,16 ffc0eb14: 64 63 50 49 oris r3,r3,20553 ffc0eb18: 60 63 73 00 ori r3,r3,29440 ffc0eb1c: 38 c0 00 00 li r6,0 ffc0eb20: 38 ff 00 28 addi r7,r31,40 ffc0eb24: 4b ff af 45 bl ffc09a68 ffc0eb28: 2f 83 00 00 cmpwi cr7,r3,0 ffc0eb2c: 40 9e 00 24 bne- cr7,ffc0eb50 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') ffc0eb30: 89 3e 21 bd lbz r9,8637(r30) ffc0eb34: 2f 89 00 7a cmpwi cr7,r9,122 ffc0eb38: 38 09 00 01 addi r0,r9,1 ffc0eb3c: 98 1e 21 bd stb r0,8637(r30) ffc0eb40: 40 be 00 38 bne+ cr7,ffc0eb78 c = 'a'; ffc0eb44: 38 00 00 61 li r0,97 ffc0eb48: 98 1e 21 bd stb r0,8637(r30) ffc0eb4c: 48 00 00 2c b ffc0eb78 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); ffc0eb50: 80 7f 00 30 lwz r3,48(r31) ffc0eb54: 48 00 11 5d bl ffc0fcb0 err_wbar: rtems_barrier_delete(pipe->readBarrier); ffc0eb58: 80 7f 00 2c lwz r3,44(r31) ffc0eb5c: 48 00 11 55 bl ffc0fcb0 err_rbar: free(pipe->Buffer); ffc0eb60: 80 7f 00 00 lwz r3,0(r31) ffc0eb64: 4b ff 75 15 bl ffc06078 err_buf: free(pipe); ffc0eb68: 7f e3 fb 78 mr r3,r31 ffc0eb6c: 4b ff 75 0d bl ffc06078 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; ffc0eb70: 3b c0 ff f4 li r30,-12 ffc0eb74: 48 00 00 48 b ffc0ebbc err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc0eb78: 80 7f 00 28 lwz r3,40(r31) ffc0eb7c: 38 80 00 00 li r4,0 ffc0eb80: 38 a0 00 00 li r5,0 ffc0eb84: 4b ff b1 59 bl ffc09cdc err = -EINTR; ffc0eb88: 3b c0 ff fc li r30,-4 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc0eb8c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0eb90: 40 9e 00 08 bne- cr7,ffc0eb98 <== NEVER TAKEN ffc0eb94: 3b c0 00 00 li r30,0 err = -EINTR; if (*pipep == NULL) { ffc0eb98: 80 1d 00 00 lwz r0,0(r29) ffc0eb9c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0eba0: 40 be 00 1c bne+ cr7,ffc0ebbc if (err) ffc0eba4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0eba8: 41 be 00 10 beq+ cr7,ffc0ebb8 <== ALWAYS TAKEN pipe_free(pipe); ffc0ebac: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0ebb0: 4b ff fd 1d bl ffc0e8cc <== NOT EXECUTED ffc0ebb4: 48 00 00 08 b ffc0ebbc <== NOT EXECUTED else *pipep = pipe; ffc0ebb8: 93 fd 00 00 stw r31,0(r29) static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); ffc0ebbc: 3d 20 00 00 lis r9,0 ffc0ebc0: 80 69 29 60 lwz r3,10592(r9) ffc0ebc4: 4b ff b2 45 bl ffc09e08 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) ffc0ebc8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0ebcc: 40 9e 01 c4 bne- cr7,ffc0ed90 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { ffc0ebd0: 80 1c 00 18 lwz r0,24(r28) int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; ffc0ebd4: 83 fd 00 00 lwz r31,0(r29) switch (LIBIO_ACCMODE(iop)) { ffc0ebd8: 54 00 07 7c rlwinm r0,r0,0,29,30 ffc0ebdc: 2f 80 00 04 cmpwi cr7,r0,4 ffc0ebe0: 41 9e 00 a0 beq- cr7,ffc0ec80 ffc0ebe4: 2f 80 00 06 cmpwi cr7,r0,6 ffc0ebe8: 41 9e 01 34 beq- cr7,ffc0ed1c ffc0ebec: 2f 80 00 02 cmpwi cr7,r0,2 ffc0ebf0: 40 be 01 84 bne+ cr7,ffc0ed74 <== NEVER TAKEN case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc0ebf4: 81 3f 00 20 lwz r9,32(r31) ffc0ebf8: 38 09 00 01 addi r0,r9,1 if (pipe->Readers ++ == 0) ffc0ebfc: 81 3f 00 10 lwz r9,16(r31) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc0ec00: 90 1f 00 20 stw r0,32(r31) if (pipe->Readers ++ == 0) ffc0ec04: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ec08: 38 09 00 01 addi r0,r9,1 ffc0ec0c: 90 1f 00 10 stw r0,16(r31) ffc0ec10: 40 be 00 10 bne+ cr7,ffc0ec20 <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); ffc0ec14: 80 7f 00 30 lwz r3,48(r31) ffc0ec18: 38 81 00 08 addi r4,r1,8 ffc0ec1c: 48 00 11 4d bl ffc0fd68 if (pipe->Writers == 0) { ffc0ec20: 80 1f 00 14 lwz r0,20(r31) ffc0ec24: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ec28: 40 9e 01 4c bne- cr7,ffc0ed74 /* Not an error */ if (LIBIO_NODELAY(iop)) ffc0ec2c: 80 1c 00 18 lwz r0,24(r28) ffc0ec30: 70 09 00 01 andi. r9,r0,1 ffc0ec34: 40 82 01 40 bne- ffc0ed74 break; prevCounter = pipe->writerCounter; ffc0ec38: 83 7f 00 24 lwz r27,36(r31) err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); ffc0ec3c: 80 7f 00 28 lwz r3,40(r31) ffc0ec40: 4b ff b1 c9 bl ffc09e08 if (! PIPE_READWAIT(pipe)) ffc0ec44: 80 7f 00 2c lwz r3,44(r31) ffc0ec48: 38 80 00 00 li r4,0 ffc0ec4c: 48 00 11 89 bl ffc0fdd4 ffc0ec50: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ec54: 40 9e 01 2c bne- cr7,ffc0ed80 <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) ffc0ec58: 80 7f 00 28 lwz r3,40(r31) ffc0ec5c: 38 80 00 00 li r4,0 ffc0ec60: 38 a0 00 00 li r5,0 ffc0ec64: 4b ff b0 79 bl ffc09cdc ffc0ec68: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ec6c: 40 9e 01 14 bne- cr7,ffc0ed80 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); ffc0ec70: 80 1f 00 24 lwz r0,36(r31) ffc0ec74: 7f 9b 00 00 cmpw cr7,r27,r0 ffc0ec78: 41 9e ff c4 beq+ cr7,ffc0ec3c <== NEVER TAKEN ffc0ec7c: 48 00 00 f8 b ffc0ed74 } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc0ec80: 81 3f 00 24 lwz r9,36(r31) ffc0ec84: 38 09 00 01 addi r0,r9,1 if (pipe->Writers ++ == 0) ffc0ec88: 81 3f 00 14 lwz r9,20(r31) } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc0ec8c: 90 1f 00 24 stw r0,36(r31) if (pipe->Writers ++ == 0) ffc0ec90: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ec94: 38 09 00 01 addi r0,r9,1 ffc0ec98: 90 1f 00 14 stw r0,20(r31) ffc0ec9c: 40 be 00 10 bne+ cr7,ffc0ecac <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); ffc0eca0: 80 7f 00 2c lwz r3,44(r31) ffc0eca4: 38 81 00 08 addi r4,r1,8 ffc0eca8: 48 00 10 c1 bl ffc0fd68 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { ffc0ecac: 80 1f 00 10 lwz r0,16(r31) ffc0ecb0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ecb4: 40 9e 00 c0 bne- cr7,ffc0ed74 ffc0ecb8: 80 1c 00 18 lwz r0,24(r28) ffc0ecbc: 70 09 00 01 andi. r9,r0,1 ffc0ecc0: 41 a2 00 14 beq+ ffc0ecd4 PIPE_UNLOCK(pipe); ffc0ecc4: 80 7f 00 28 lwz r3,40(r31) err = -ENXIO; ffc0ecc8: 3b c0 ff fa li r30,-6 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); ffc0eccc: 4b ff b1 3d bl ffc09e08 err = -ENXIO; goto out_error; ffc0ecd0: 48 00 00 b4 b ffc0ed84 } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; ffc0ecd4: 83 7f 00 20 lwz r27,32(r31) err = -EINTR; do { PIPE_UNLOCK(pipe); ffc0ecd8: 80 7f 00 28 lwz r3,40(r31) ffc0ecdc: 4b ff b1 2d bl ffc09e08 if (! PIPE_WRITEWAIT(pipe)) ffc0ece0: 80 7f 00 30 lwz r3,48(r31) ffc0ece4: 38 80 00 00 li r4,0 ffc0ece8: 48 00 10 ed bl ffc0fdd4 ffc0ecec: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ecf0: 40 9e 00 90 bne- cr7,ffc0ed80 <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) ffc0ecf4: 80 7f 00 28 lwz r3,40(r31) ffc0ecf8: 38 80 00 00 li r4,0 ffc0ecfc: 38 a0 00 00 li r5,0 ffc0ed00: 4b ff af dd bl ffc09cdc ffc0ed04: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ed08: 40 9e 00 78 bne- cr7,ffc0ed80 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); ffc0ed0c: 80 1f 00 20 lwz r0,32(r31) ffc0ed10: 7f 9b 00 00 cmpw cr7,r27,r0 ffc0ed14: 41 9e ff c4 beq+ cr7,ffc0ecd8 <== NEVER TAKEN ffc0ed18: 48 00 00 5c b ffc0ed74 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc0ed1c: 81 3f 00 20 lwz r9,32(r31) ffc0ed20: 38 09 00 01 addi r0,r9,1 if (pipe->Readers ++ == 0) ffc0ed24: 81 3f 00 10 lwz r9,16(r31) } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc0ed28: 90 1f 00 20 stw r0,32(r31) if (pipe->Readers ++ == 0) ffc0ed2c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ed30: 38 09 00 01 addi r0,r9,1 ffc0ed34: 90 1f 00 10 stw r0,16(r31) ffc0ed38: 40 be 00 10 bne+ cr7,ffc0ed48 <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); ffc0ed3c: 80 7f 00 30 lwz r3,48(r31) ffc0ed40: 38 81 00 08 addi r4,r1,8 ffc0ed44: 48 00 10 25 bl ffc0fd68 pipe->writerCounter ++; ffc0ed48: 81 3f 00 24 lwz r9,36(r31) ffc0ed4c: 38 09 00 01 addi r0,r9,1 if (pipe->Writers ++ == 0) ffc0ed50: 81 3f 00 14 lwz r9,20(r31) case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc0ed54: 90 1f 00 24 stw r0,36(r31) if (pipe->Writers ++ == 0) ffc0ed58: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ed5c: 38 09 00 01 addi r0,r9,1 ffc0ed60: 90 1f 00 14 stw r0,20(r31) ffc0ed64: 40 be 00 10 bne+ cr7,ffc0ed74 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); ffc0ed68: 80 7f 00 2c lwz r3,44(r31) ffc0ed6c: 38 81 00 08 addi r4,r1,8 ffc0ed70: 48 00 0f f9 bl ffc0fd68 break; } PIPE_UNLOCK(pipe); ffc0ed74: 80 7f 00 28 lwz r3,40(r31) ffc0ed78: 4b ff b0 91 bl ffc09e08 return 0; ffc0ed7c: 48 00 00 14 b ffc0ed90 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; ffc0ed80: 3b c0 ff fc li r30,-4 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); ffc0ed84: 7f a3 eb 78 mr r3,r29 ffc0ed88: 7f 84 e3 78 mr r4,r28 ffc0ed8c: 4b ff fb 89 bl ffc0e914 return err; } ffc0ed90: 39 61 00 30 addi r11,r1,48 ffc0ed94: 7f c3 f3 78 mr r3,r30 ffc0ed98: 48 01 0e 10 b ffc1fba8 <_restgpr_27_x> =============================================================================== ffc0518c : long fpathconf( int fd, int name ) { ffc0518c: 7c 08 02 a6 mflr r0 ffc05190: 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); ffc05194: 3d 20 00 00 lis r9,0 long fpathconf( int fd, int name ) { ffc05198: 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); ffc0519c: 80 09 26 dc lwz r0,9948(r9) ffc051a0: 7f 83 00 40 cmplw cr7,r3,r0 ffc051a4: 40 9c 00 20 bge- cr7,ffc051c4 iop = rtems_libio_iop(fd); ffc051a8: 3d 20 00 00 lis r9,0 ffc051ac: 80 09 27 88 lwz r0,10120(r9) ffc051b0: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc051b4: 7c 60 1a 14 add r3,r0,r3 rtems_libio_check_is_open(iop); ffc051b8: 80 03 00 18 lwz r0,24(r3) ffc051bc: 70 09 01 00 andi. r9,r0,256 ffc051c0: 40 a2 00 10 bne+ ffc051d0 <== ALWAYS TAKEN ffc051c4: 48 00 b6 e9 bl ffc108ac <__errno> ffc051c8: 38 00 00 09 li r0,9 ffc051cc: 48 00 00 94 b ffc05260 * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { ffc051d0: 2b 84 00 0b cmplwi cr7,r4,11 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; ffc051d4: 81 23 00 2c lwz r9,44(r3) switch ( name ) { ffc051d8: 41 9d 00 80 bgt- cr7,ffc05258 ffc051dc: 3d 60 ff c2 lis r11,-62 ffc051e0: 39 6b 81 e4 addi r11,r11,-32284 ffc051e4: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc051e8: 7c 0b 20 2e lwzx r0,r11,r4 ffc051ec: 7d 60 5a 14 add r11,r0,r11 ffc051f0: 7d 69 03 a6 mtctr r11 ffc051f4: 4e 80 04 20 bctr case _PC_LINK_MAX: return_value = the_limits->link_max; ffc051f8: 80 69 00 38 lwz r3,56(r9) break; ffc051fc: 48 00 00 6c b ffc05268 case _PC_MAX_CANON: return_value = the_limits->max_canon; ffc05200: 80 69 00 3c lwz r3,60(r9) break; ffc05204: 48 00 00 64 b ffc05268 case _PC_MAX_INPUT: return_value = the_limits->max_input; ffc05208: 80 69 00 40 lwz r3,64(r9) break; ffc0520c: 48 00 00 5c b ffc05268 case _PC_NAME_MAX: return_value = the_limits->name_max; ffc05210: 80 69 00 44 lwz r3,68(r9) break; ffc05214: 48 00 00 54 b ffc05268 case _PC_PATH_MAX: return_value = the_limits->path_max; ffc05218: 80 69 00 48 lwz r3,72(r9) break; ffc0521c: 48 00 00 4c b ffc05268 case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; ffc05220: 80 69 00 4c lwz r3,76(r9) break; ffc05224: 48 00 00 44 b ffc05268 case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; ffc05228: 80 69 00 54 lwz r3,84(r9) break; ffc0522c: 48 00 00 3c b ffc05268 case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; ffc05230: 80 69 00 58 lwz r3,88(r9) break; ffc05234: 48 00 00 34 b ffc05268 case _PC_VDISABLE: return_value = the_limits->posix_vdisable; ffc05238: 80 69 00 64 lwz r3,100(r9) break; ffc0523c: 48 00 00 2c b ffc05268 case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; ffc05240: 80 69 00 50 lwz r3,80(r9) break; ffc05244: 48 00 00 24 b ffc05268 case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; ffc05248: 80 69 00 5c lwz r3,92(r9) break; ffc0524c: 48 00 00 1c b ffc05268 case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; ffc05250: 80 69 00 60 lwz r3,96(r9) break; ffc05254: 48 00 00 14 b ffc05268 default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc05258: 48 00 b6 55 bl ffc108ac <__errno> ffc0525c: 38 00 00 16 li r0,22 ffc05260: 90 03 00 00 stw r0,0(r3) ffc05264: 38 60 ff ff li r3,-1 break; } return return_value; } ffc05268: 80 01 00 0c lwz r0,12(r1) ffc0526c: 38 21 00 08 addi r1,r1,8 ffc05270: 7c 08 03 a6 mtlr r0 ffc05274: 4e 80 00 20 blr =============================================================================== ffc0495c : #include void free( void *ptr ) { ffc0495c: 94 21 ff f0 stwu r1,-16(r1) ffc04960: 7c 08 02 a6 mflr r0 MSBUMP(free_calls, 1); ffc04964: 3d 20 00 00 lis r9,0 #include void free( void *ptr ) { ffc04968: 90 01 00 14 stw r0,20(r1) MSBUMP(free_calls, 1); ffc0496c: 39 29 2a e8 addi r9,r9,10984 #include void free( void *ptr ) { ffc04970: bf c1 00 08 stmw r30,8(r1) MSBUMP(free_calls, 1); if ( !ptr ) ffc04974: 7c 7f 1b 79 mr. r31,r3 void free( void *ptr ) { MSBUMP(free_calls, 1); ffc04978: 81 69 00 0c lwz r11,12(r9) ffc0497c: 38 0b 00 01 addi r0,r11,1 ffc04980: 90 09 00 0c stw r0,12(r9) if ( !ptr ) ffc04984: 41 82 00 84 beq- ffc04a08 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc04988: 3d 20 00 00 lis r9,0 ffc0498c: 80 09 28 04 lwz r0,10244(r9) ffc04990: 2f 80 00 03 cmpwi cr7,r0,3 ffc04994: 40 be 00 1c bne+ cr7,ffc049b0 <== NEVER TAKEN !malloc_is_system_state_OK() ) { ffc04998: 48 00 01 c5 bl ffc04b5c return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc0499c: 2f 83 00 00 cmpwi cr7,r3,0 ffc049a0: 40 be 00 10 bne+ cr7,ffc049b0 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); ffc049a4: 7f e3 fb 78 mr r3,r31 ffc049a8: 48 00 02 39 bl ffc04be0 return; ffc049ac: 48 00 00 5c b ffc04a08 } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc049b0: 3d 20 00 00 lis r9,0 ffc049b4: 81 29 27 68 lwz r9,10088(r9) ffc049b8: 2f 89 00 00 cmpwi cr7,r9,0 ffc049bc: 41 9e 00 14 beq- cr7,ffc049d0 (*rtems_malloc_statistics_helpers->at_free)(ptr); ffc049c0: 80 09 00 08 lwz r0,8(r9) ffc049c4: 7f e3 fb 78 mr r3,r31 ffc049c8: 7c 09 03 a6 mtctr r0 ffc049cc: 4e 80 04 21 bctrl if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { ffc049d0: 3f c0 00 00 lis r30,0 ffc049d4: 80 7e 26 ec lwz r3,9964(r30) ffc049d8: 7f e4 fb 78 mr r4,r31 ffc049dc: 48 00 54 d1 bl ffc09eac <_Protected_heap_Free> ffc049e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc049e4: 40 be 00 24 bne+ cr7,ffc04a08 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, ffc049e8: 81 3e 26 ec lwz r9,9964(r30) */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ffc049ec: 3c 60 ff c2 lis r3,-62 ffc049f0: 38 63 c3 a4 addi r3,r3,-15452 ffc049f4: 80 a9 00 18 lwz r5,24(r9) ffc049f8: 7f e4 fb 78 mr r4,r31 ffc049fc: 80 c9 00 1c lwz r6,28(r9) ffc04a00: 4c c6 31 82 crclr 4*cr1+eq ffc04a04: 48 00 0e 8d bl ffc05890 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } ffc04a08: 39 61 00 10 addi r11,r1,16 ffc04a0c: 4b ff bb 34 b ffc00540 <_restgpr_30_x> =============================================================================== ffc07f7c : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc07f7c: 7c 08 02 a6 mflr r0 ffc07f80: 7c 2b 0b 78 mr r11,r1 ffc07f84: 94 21 ff f0 stwu r1,-16(r1) rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc07f88: 3d 20 00 00 lis r9,0 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc07f8c: 90 01 00 14 stw r0,20(r1) rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc07f90: 38 09 2a f8 addi r0,r9,11000 ffc07f94: 7f 83 00 00 cmpw cr7,r3,r0 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc07f98: 4b ff a8 9d bl ffc02834 <_savegpr_31> ffc07f9c: 7c 7f 1b 78 mr r31,r3 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc07fa0: 41 9e 00 1c beq- cr7,ffc07fbc <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); ffc07fa4: 38 63 00 04 addi r3,r3,4 ffc07fa8: 4b ff ec bd bl ffc06c64 rtems_filesystem_freenode( &env->root_directory); ffc07fac: 38 7f 00 18 addi r3,r31,24 ffc07fb0: 4b ff ec b5 bl ffc06c64 free(env); ffc07fb4: 7f e3 fb 78 mr r3,r31 ffc07fb8: 4b ff ec d9 bl ffc06c90 } } ffc07fbc: 39 61 00 10 addi r11,r1,16 ffc07fc0: 4b ff a8 c0 b ffc02880 <_restgpr_31_x> =============================================================================== ffc03e64 : 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) { ffc03e64: 3d 20 00 00 lis r9,0 ffc03e68: 80 09 28 70 lwz r0,10352(r9) ffc03e6c: 39 69 28 70 addi r11,r9,10352 return dd; } } return NULL; ffc03e70: 39 20 00 00 li r9,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) { ffc03e74: 7f 83 00 40 cmplw cr7,r3,r0 ffc03e78: 40 9c 00 68 bge- cr7,ffc03ee0 <== NEVER TAKEN ffc03e7c: 81 6b 00 04 lwz r11,4(r11) ffc03e80: 2f 8b 00 00 cmpwi cr7,r11,0 ffc03e84: 41 9e 00 5c beq- cr7,ffc03ee0 <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; ffc03e88: 54 63 18 38 rlwinm r3,r3,3,0,28 ffc03e8c: 7d 4b 1a 14 add r10,r11,r3 if (minor < dtab->size && dtab->minor != NULL) { ffc03e90: 80 0a 00 04 lwz r0,4(r10) ffc03e94: 7f 84 00 40 cmplw cr7,r4,r0 ffc03e98: 40 9c 00 48 bge- cr7,ffc03ee0 <== NEVER TAKEN ffc03e9c: 7d 6b 18 2e lwzx r11,r11,r3 ffc03ea0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc03ea4: 41 9e 00 3c beq- cr7,ffc03ee0 <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; ffc03ea8: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc03eac: 7d 2b 20 2e lwzx r9,r11,r4 if (dd != NULL && !lookup_only) { ffc03eb0: 2f 89 00 00 cmpwi cr7,r9,0 ffc03eb4: 41 9e 00 2c beq- cr7,ffc03ee0 ffc03eb8: 2f 85 00 00 cmpwi cr7,r5,0 ffc03ebc: 40 9e 00 24 bne- cr7,ffc03ee0 if (!dd->deleted) { ffc03ec0: 88 09 00 30 lbz r0,48(r9) ffc03ec4: 2f 80 00 00 cmpwi cr7,r0,0 ffc03ec8: 40 9e 00 14 bne- cr7,ffc03edc ++dd->uses; ffc03ecc: 81 69 00 14 lwz r11,20(r9) ffc03ed0: 38 0b 00 01 addi r0,r11,1 ffc03ed4: 90 09 00 14 stw r0,20(r9) ffc03ed8: 48 00 00 08 b ffc03ee0 } else { dd = NULL; ffc03edc: 39 20 00 00 li r9,0 return dd; } } return NULL; } ffc03ee0: 7d 23 4b 78 mr r3,r9 ffc03ee4: 4e 80 00 20 blr =============================================================================== ffc1bbe8 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc1bbe8: 94 21 ff c8 stwu r1,-56(r1) ffc1bbec: 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 ); ffc1bbf0: 3d 20 00 00 lis r9,0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc1bbf4: 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 ); ffc1bbf8: 80 09 26 dc lwz r0,9948(r9) int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc1bbfc: bf c1 00 30 stmw r30,48(r1) ffc1bc00: 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 ); ffc1bc04: 7f 83 00 40 cmplw cr7,r3,r0 ffc1bc08: 3b c0 00 00 li r30,0 ffc1bc0c: 40 9c 00 14 bge- cr7,ffc1bc20 <== NEVER TAKEN ffc1bc10: 3d 20 00 00 lis r9,0 ffc1bc14: 83 c9 27 88 lwz r30,10120(r9) ffc1bc18: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc1bc1c: 7f de 1a 14 add r30,r30,r3 /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc1bc20: 39 7e 00 1c addi r11,r30,28 ffc1bc24: 38 61 00 08 addi r3,r1,8 ffc1bc28: 7c ab a4 aa lswi r5,r11,20 ffc1bc2c: 7c a3 a5 aa stswi r5,r3,20 if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc1bc30: 81 21 00 14 lwz r9,20(r1) ffc1bc34: 80 09 00 10 lwz r0,16(r9) ffc1bc38: 90 81 00 28 stw r4,40(r1) ffc1bc3c: 7c 09 03 a6 mtctr r0 ffc1bc40: 4e 80 04 21 bctrl ffc1bc44: 80 81 00 28 lwz r4,40(r1) ffc1bc48: 2f 83 00 01 cmpwi cr7,r3,1 ffc1bc4c: 41 be 00 18 beq+ cr7,ffc1bc64 rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc1bc50: 4b ff 4a a5 bl ffc106f4 <__errno> ffc1bc54: 38 00 00 14 li r0,20 ffc1bc58: 90 03 00 00 stw r0,0(r3) ffc1bc5c: 38 60 ff ff li r3,-1 ffc1bc60: 48 00 00 1c b ffc1bc7c /* * 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 ); ffc1bc64: 81 3e 00 24 lwz r9,36(r30) ffc1bc68: 7f c3 f3 78 mr r3,r30 ffc1bc6c: 7f e5 fb 78 mr r5,r31 ffc1bc70: 80 09 00 08 lwz r0,8(r9) ffc1bc74: 7c 09 03 a6 mtctr r0 ffc1bc78: 4e 80 04 21 bctrl } ffc1bc7c: 39 61 00 38 addi r11,r1,56 ffc1bc80: 4b fe 4e f4 b ffc00b74 <_restgpr_30_x> =============================================================================== ffc04a10 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc04a10: 94 21 ff e0 stwu r1,-32(r1) ffc04a14: 7c 08 02 a6 mflr r0 ffc04a18: bf c1 00 18 stmw r30,24(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) ffc04a1c: 7c 7f 1b 79 mr. r31,r3 */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc04a20: 90 01 00 24 stw r0,36(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) ffc04a24: 40 a2 00 18 bne+ ffc04a3c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); ffc04a28: 48 00 b2 5d bl ffc0fc84 <__errno> <== NOT EXECUTED ffc04a2c: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc04a30: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc04a34: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04a38: 48 00 00 3c b ffc04a74 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc04a3c: 7f c0 00 a6 mfmsr r30 ffc04a40: 7c 10 42 a6 mfsprg r0,0 ffc04a44: 7f c0 00 78 andc r0,r30,r0 ffc04a48: 7c 00 01 24 mtmsr r0 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); ffc04a4c: 38 61 00 08 addi r3,r1,8 ffc04a50: 48 00 46 95 bl ffc090e4 <_TOD_Get> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc04a54: 7f c0 01 24 mtmsr r30 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; ffc04a58: 80 01 00 08 lwz r0,8(r1) * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; ffc04a5c: 38 60 00 00 li r3,0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; ffc04a60: 81 21 00 0c lwz r9,12(r1) time->tv_sec = now.tv_sec; ffc04a64: 90 1f 00 00 stw r0,0(r31) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; ffc04a68: 38 00 03 e8 li r0,1000 ffc04a6c: 7c 09 03 d6 divw r0,r9,r0 time->tv_sec = now.tv_sec; time->tv_usec = useconds; ffc04a70: 90 1f 00 04 stw r0,4(r31) } ffc04a74: 39 61 00 20 addi r11,r1,32 ffc04a78: 4b ff ba c8 b ffc00540 <_restgpr_30_x> =============================================================================== ffc0f328 : 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 ) ffc0f328: 81 23 00 1c lwz r9,28(r3) return -1; /* It wasn't a directory --> return error */ ffc0f32c: 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 ) ffc0f330: 81 29 00 4c lwz r9,76(r9) ffc0f334: 2f 89 00 01 cmpwi cr7,r9,1 ffc0f338: 40 9e 00 18 bne- cr7,ffc0f350 <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; ffc0f33c: 39 40 00 00 li r10,0 ffc0f340: 39 60 00 00 li r11,0 ffc0f344: 91 43 00 10 stw r10,16(r3) return 0; ffc0f348: 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; ffc0f34c: 91 63 00 14 stw r11,20(r3) return 0; } ffc0f350: 7c 03 03 78 mr r3,r0 ffc0f354: 4e 80 00 20 blr =============================================================================== ffc0f564 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { ffc0f564: 7c 08 02 a6 mflr r0 ffc0f568: 7c 2b 0b 78 mr r11,r1 ffc0f56c: 94 21 ff f0 stwu r1,-16(r1) ffc0f570: 90 01 00 14 stw r0,20(r1) ffc0f574: 48 00 ae a9 bl ffc1a41c <_savegpr_31> IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; ffc0f578: 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 ) ) ffc0f57c: 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 ); ffc0f580: 38 1f 00 54 addi r0,r31,84 ffc0f584: 7f 89 00 00 cmpw cr7,r9,r0 ffc0f588: 41 be 00 10 beq+ cr7,ffc0f598 rtems_set_errno_and_return_minus_one( ENOTEMPTY ); ffc0f58c: 48 00 06 f9 bl ffc0fc84 <__errno> ffc0f590: 38 00 00 5a li r0,90 ffc0f594: 48 00 00 1c b ffc0f5b0 ffc0f598: 81 24 00 10 lwz r9,16(r4) /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) ffc0f59c: 80 09 00 1c lwz r0,28(r9) ffc0f5a0: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0f5a4: 40 be 00 18 bne+ cr7,ffc0f5bc rtems_set_errno_and_return_minus_one( EBUSY ); ffc0f5a8: 48 00 06 dd bl ffc0fc84 <__errno> ffc0f5ac: 38 00 00 10 li r0,16 ffc0f5b0: 90 03 00 00 stw r0,0(r3) ffc0f5b4: 38 60 ff ff li r3,-1 ffc0f5b8: 48 00 00 24 b ffc0f5dc /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) ffc0f5bc: 80 1f 00 5c lwz r0,92(r31) ffc0f5c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f5c4: 40 be ff e4 bne- cr7,ffc0f5a8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); ffc0f5c8: 7f e3 fb 78 mr r3,r31 ffc0f5cc: 4b ff d5 8d bl ffc0cb58 IMFS_check_node_remove( the_jnode ); ffc0f5d0: 7f e3 fb 78 mr r3,r31 ffc0f5d4: 4b ff d5 dd bl ffc0cbb0 return 0; ffc0f5d8: 38 60 00 00 li r3,0 } ffc0f5dc: 39 61 00 10 addi r11,r1,16 ffc0f5e0: 4b ff 0f 64 b ffc00544 <_restgpr_31_x> =============================================================================== ffc04ff8 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc04ff8: 7c 08 02 a6 mflr r0 ffc04ffc: 7c 2b 0b 78 mr r11,r1 ffc05000: 94 21 ff f0 stwu r1,-16(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05004: 3d 20 00 00 lis r9,0 /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05008: 90 01 00 14 stw r0,20(r1) ffc0500c: 48 01 12 09 bl ffc16214 <_savegpr_31> FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05010: 88 09 28 58 lbz r0,10328(r9) ffc05014: 2f 80 00 00 cmpwi cr7,r0,0 ffc05018: 40 be 00 bc bne+ cr7,ffc050d4 return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc0501c: 3c 60 ff c2 lis r3,-62 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; ffc05020: 38 00 00 01 li r0,1 mkdir("/etc", 0777); ffc05024: 38 80 01 ff li r4,511 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; ffc05028: 98 09 28 58 stb r0,10328(r9) mkdir("/etc", 0777); ffc0502c: 38 63 80 5b addi r3,r3,-32677 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc05030: 3f e0 ff c2 lis r31,-62 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc05034: 48 00 09 e1 bl ffc05a14 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc05038: 3b ff 80 60 addi r31,r31,-32672 ffc0503c: 3c 80 ff c1 lis r4,-63 ffc05040: 7f e3 fb 78 mr r3,r31 ffc05044: 38 84 78 80 addi r4,r4,30848 ffc05048: 48 00 c2 55 bl ffc1129c ffc0504c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05050: 40 be 00 30 bne+ cr7,ffc05080 fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { ffc05054: 3c 80 ff c2 lis r4,-62 ffc05058: 7f e3 fb 78 mr r3,r31 ffc0505c: 38 84 80 6c addi r4,r4,-32660 ffc05060: 48 00 c2 3d bl ffc1129c ffc05064: 7c 7f 1b 79 mr. r31,r3 ffc05068: 41 82 00 1c beq- ffc05084 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" ffc0506c: 3c 60 ff c2 lis r3,-62 ffc05070: 38 63 80 6e addi r3,r3,-32658 ffc05074: 7f e4 fb 78 mr r4,r31 ffc05078: 48 00 c2 e9 bl ffc11360 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); ffc0507c: 7f e3 fb 78 mr r3,r31 ffc05080: 48 00 b8 75 bl ffc108f4 } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { ffc05084: 3f e0 ff c2 lis r31,-62 ffc05088: 3b ff 80 d5 addi r31,r31,-32555 ffc0508c: 3c 80 ff c1 lis r4,-63 ffc05090: 7f e3 fb 78 mr r3,r31 ffc05094: 38 84 78 80 addi r4,r4,30848 ffc05098: 48 00 c2 05 bl ffc1129c ffc0509c: 2f 83 00 00 cmpwi cr7,r3,0 ffc050a0: 40 be 00 30 bne+ cr7,ffc050d0 fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { ffc050a4: 3c 80 ff c2 lis r4,-62 ffc050a8: 7f e3 fb 78 mr r3,r31 ffc050ac: 38 84 80 6c addi r4,r4,-32660 ffc050b0: 48 00 c1 ed bl ffc1129c ffc050b4: 7c 7f 1b 79 mr. r31,r3 ffc050b8: 41 82 00 1c beq- ffc050d4 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" ffc050bc: 3c 60 ff c2 lis r3,-62 ffc050c0: 38 63 80 e0 addi r3,r3,-32544 ffc050c4: 7f e4 fb 78 mr r4,r31 ffc050c8: 48 00 c2 99 bl ffc11360 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); ffc050cc: 7f e3 fb 78 mr r3,r31 ffc050d0: 48 00 b8 25 bl ffc108f4 } } ffc050d4: 39 61 00 10 addi r11,r1,16 ffc050d8: 4b ff b7 e8 b ffc008c0 <_restgpr_31_x> =============================================================================== ffc06970 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc06970: 94 21 ff f0 stwu r1,-16(r1) ffc06974: 7c 08 02 a6 mflr r0 ffc06978: 90 01 00 14 stw r0,20(r1) if (tty->termios.c_iflag & ISTRIP) ffc0697c: 80 04 00 30 lwz r0,48(r4) /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc06980: bf c1 00 08 stmw r30,8(r1) ffc06984: 7c 7e 1b 78 mr r30,r3 if (tty->termios.c_iflag & ISTRIP) ffc06988: 70 09 00 20 andi. r9,r0,32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc0698c: 7c 9f 23 78 mr r31,r4 if (tty->termios.c_iflag & ISTRIP) ffc06990: 41 82 00 08 beq- ffc06998 <== ALWAYS TAKEN c &= 0x7f; ffc06994: 54 7e 06 7e clrlwi r30,r3,25 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) ffc06998: 70 09 02 00 andi. r9,r0,512 ffc0699c: 41 82 00 28 beq- ffc069c4 c = tolower (c); ffc069a0: 3d 20 00 00 lis r9,0 ffc069a4: 81 29 27 44 lwz r9,10052(r9) ffc069a8: 7d 29 f2 14 add r9,r9,r30 ffc069ac: 89 29 00 01 lbz r9,1(r9) ffc069b0: 55 29 07 be clrlwi r9,r9,30 ffc069b4: 2f 89 00 01 cmpwi cr7,r9,1 ffc069b8: 40 be 00 08 bne+ cr7,ffc069c0 ffc069bc: 3b de 00 20 addi r30,r30,32 ffc069c0: 57 de 06 3e clrlwi r30,r30,24 if (c == '\r') { ffc069c4: 2f 9e 00 0d cmpwi cr7,r30,13 ffc069c8: 40 be 00 20 bne+ cr7,ffc069e8 if (tty->termios.c_iflag & IGNCR) ffc069cc: 70 09 00 80 andi. r9,r0,128 return 0; ffc069d0: 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) ffc069d4: 40 82 01 44 bne- ffc06b18 <== NEVER TAKEN return 0; if (tty->termios.c_iflag & ICRNL) ffc069d8: 70 09 01 00 andi. r9,r0,256 ffc069dc: 41 82 00 2c beq- ffc06a08 <== NEVER TAKEN c = '\n'; ffc069e0: 3b c0 00 0a li r30,10 ffc069e4: 48 00 00 24 b ffc06a08 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { ffc069e8: 2f 9e 00 0a cmpwi cr7,r30,10 ffc069ec: 40 be 00 14 bne+ cr7,ffc06a00 ffc069f0: 70 09 00 40 andi. r9,r0,64 ffc069f4: 41 82 00 14 beq- ffc06a08 <== ALWAYS TAKEN c = '\r'; ffc069f8: 3b c0 00 0d li r30,13 <== NOT EXECUTED ffc069fc: 48 00 00 0c b ffc06a08 <== NOT EXECUTED } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { ffc06a00: 2f 9e 00 00 cmpwi cr7,r30,0 ffc06a04: 41 be 00 c8 beq+ cr7,ffc06acc <== NEVER TAKEN ffc06a08: 80 1f 00 3c lwz r0,60(r31) ffc06a0c: 70 09 00 02 andi. r9,r0,2 ffc06a10: 41 82 00 bc beq- ffc06acc if (c == tty->termios.c_cc[VERASE]) { ffc06a14: 89 3f 00 43 lbz r9,67(r31) erase (tty, 0); ffc06a18: 7f e3 fb 78 mr r3,r31 ffc06a1c: 38 80 00 00 li r4,0 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { ffc06a20: 7f 89 f0 00 cmpw cr7,r9,r30 ffc06a24: 41 9e 00 18 beq- cr7,ffc06a3c erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { ffc06a28: 89 3f 00 44 lbz r9,68(r31) ffc06a2c: 7f 89 f0 00 cmpw cr7,r9,r30 ffc06a30: 40 be 00 14 bne+ cr7,ffc06a44 erase (tty, 1); ffc06a34: 7f e3 fb 78 mr r3,r31 ffc06a38: 38 80 00 01 li r4,1 ffc06a3c: 4b ff fd 29 bl ffc06764 ffc06a40: 48 00 00 d4 b ffc06b14 return 0; } else if (c == tty->termios.c_cc[VEOF]) { ffc06a44: 89 3f 00 45 lbz r9,69(r31) return 1; ffc06a48: 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]) { ffc06a4c: 7f 89 f0 00 cmpw cr7,r9,r30 ffc06a50: 41 9e 00 c8 beq- cr7,ffc06b18 <== NEVER TAKEN return 1; } else if (c == '\n') { ffc06a54: 2f 9e 00 0a cmpwi cr7,r30,10 ffc06a58: 40 be 00 2c bne+ cr7,ffc06a84 if (tty->termios.c_lflag & (ECHO | ECHONL)) ffc06a5c: 70 09 00 48 andi. r9,r0,72 ffc06a60: 41 a2 00 10 beq+ ffc06a70 <== NEVER TAKEN echo (c, tty); ffc06a64: 38 60 00 0a li r3,10 ffc06a68: 7f e4 fb 78 mr r4,r31 ffc06a6c: 4b ff fc 6d bl ffc066d8 tty->cbuf[tty->ccount++] = c; ffc06a70: 81 3f 00 20 lwz r9,32(r31) ffc06a74: 38 00 00 0a li r0,10 ffc06a78: 81 7f 00 1c lwz r11,28(r31) ffc06a7c: 7c 0b 49 ae stbx r0,r11,r9 ffc06a80: 48 00 00 3c b ffc06abc return 1; } else if ((c == tty->termios.c_cc[VEOL]) || ffc06a84: 89 3f 00 4c lbz r9,76(r31) ffc06a88: 7f 89 f0 00 cmpw cr7,r9,r30 ffc06a8c: 41 9e 00 10 beq- cr7,ffc06a9c <== NEVER TAKEN ffc06a90: 89 3f 00 51 lbz r9,81(r31) ffc06a94: 7f 89 f0 00 cmpw cr7,r9,r30 ffc06a98: 40 be 00 34 bne+ cr7,ffc06acc <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) ffc06a9c: 70 09 00 08 andi. r9,r0,8 <== NOT EXECUTED ffc06aa0: 41 a2 00 10 beq+ ffc06ab0 <== NOT EXECUTED echo (c, tty); ffc06aa4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc06aa8: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc06aac: 4b ff fc 2d bl ffc066d8 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; ffc06ab0: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc06ab4: 81 7f 00 1c lwz r11,28(r31) <== NOT EXECUTED ffc06ab8: 7f cb 49 ae stbx r30,r11,r9 <== NOT EXECUTED ffc06abc: 39 29 00 01 addi r9,r9,1 ffc06ac0: 91 3f 00 20 stw r9,32(r31) return 1; ffc06ac4: 38 60 00 01 li r3,1 ffc06ac8: 48 00 00 50 b ffc06b18 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { ffc06acc: 3d 20 00 00 lis r9,0 ffc06ad0: 81 29 21 b8 lwz r9,8632(r9) if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; ffc06ad4: 38 60 00 00 li r3,0 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { ffc06ad8: 38 09 ff ff addi r0,r9,-1 ffc06adc: 81 3f 00 20 lwz r9,32(r31) ffc06ae0: 7f 89 00 00 cmpw cr7,r9,r0 ffc06ae4: 40 9c 00 34 bge- cr7,ffc06b18 <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) ffc06ae8: 80 1f 00 3c lwz r0,60(r31) ffc06aec: 70 09 00 08 andi. r9,r0,8 ffc06af0: 41 a2 00 10 beq+ ffc06b00 <== NEVER TAKEN echo (c, tty); ffc06af4: 7f c3 f3 78 mr r3,r30 ffc06af8: 7f e4 fb 78 mr r4,r31 ffc06afc: 4b ff fb dd bl ffc066d8 tty->cbuf[tty->ccount++] = c; ffc06b00: 81 3f 00 20 lwz r9,32(r31) ffc06b04: 81 7f 00 1c lwz r11,28(r31) ffc06b08: 7f cb 49 ae stbx r30,r11,r9 ffc06b0c: 39 29 00 01 addi r9,r9,1 ffc06b10: 91 3f 00 20 stw r9,32(r31) } return 0; ffc06b14: 38 60 00 00 li r3,0 } ffc06b18: 39 61 00 10 addi r11,r1,16 ffc06b1c: 4b ff 9a 24 b ffc00540 <_restgpr_30_x> =============================================================================== ffc1a914 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } ffc1a914: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc1a918: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05290 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc05290: 94 21 ff f0 stwu r1,-16(r1) ffc05294: 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())) ffc05298: 3d 20 00 00 lis r9,0 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc0529c: 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())) ffc052a0: 80 09 28 04 lwz r0,10244(r9) extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc052a4: bf c1 00 08 stmw 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())) ffc052a8: 2f 80 00 03 cmpwi cr7,r0,3 ffc052ac: 40 be 00 4c bne+ cr7,ffc052f8 <== NEVER TAKEN /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { ffc052b0: 3d 20 00 00 lis r9,0 ffc052b4: 3f e0 00 00 lis r31,0 ffc052b8: 83 c9 27 48 lwz r30,10056(r9) ffc052bc: 80 1f 27 4c lwz r0,10060(r31) ffc052c0: 7f 80 f0 00 cmpw cr7,r0,r30 ffc052c4: 41 9e 00 10 beq- cr7,ffc052d4 _wrapup_reent(_global_impure_ptr); ffc052c8: 7f c3 f3 78 mr r3,r30 ffc052cc: 48 00 ba cd bl ffc10d98 <_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; ffc052d0: 93 df 27 4c stw r30,10060(r31) * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); ffc052d4: 81 3f 27 4c lwz r9,10060(r31) ffc052d8: 80 69 00 04 lwz r3,4(r9) ffc052dc: 48 00 ab 35 bl ffc0fe10 fclose (stdout); ffc052e0: 81 3f 27 4c lwz r9,10060(r31) ffc052e4: 80 69 00 08 lwz r3,8(r9) ffc052e8: 48 00 ab 29 bl ffc0fe10 fclose (stderr); ffc052ec: 81 3f 27 4c lwz r9,10060(r31) ffc052f0: 80 69 00 0c lwz r3,12(r9) ffc052f4: 48 00 ab 1d bl ffc0fe10 } ffc052f8: 39 61 00 10 addi r11,r1,16 ffc052fc: 4b ff b2 44 b ffc00540 <_restgpr_30_x> =============================================================================== ffc04d04 : #include "malloc_p.h" void *malloc( size_t size ) { ffc04d04: 94 21 ff f0 stwu r1,-16(r1) ffc04d08: 7c 08 02 a6 mflr r0 void *return_this; MSBUMP(malloc_calls, 1); ffc04d0c: 3d 20 00 00 lis r9,0 #include "malloc_p.h" void *malloc( size_t size ) { ffc04d10: 90 01 00 14 stw r0,20(r1) void *return_this; MSBUMP(malloc_calls, 1); ffc04d14: 39 29 2a e8 addi r9,r9,10984 ffc04d18: 81 69 00 04 lwz r11,4(r9) #include "malloc_p.h" void *malloc( size_t size ) { ffc04d1c: bf c1 00 08 stmw r30,8(r1) ffc04d20: 7c 7f 1b 78 mr r31,r3 void *return_this; MSBUMP(malloc_calls, 1); ffc04d24: 38 0b 00 01 addi r0,r11,1 ffc04d28: 90 09 00 04 stw r0,4(r9) /* * Validate the parameters */ if ( !size ) return (void *) 0; ffc04d2c: 3b c0 00 00 li r30,0 MSBUMP(malloc_calls, 1); /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); ffc04d30: 4b ff fe 75 bl ffc04ba4 /* * Validate the parameters */ if ( !size ) ffc04d34: 2f 9f 00 00 cmpwi cr7,r31,0 ffc04d38: 41 9e 00 bc beq- cr7,ffc04df4 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc04d3c: 3d 20 00 00 lis r9,0 ffc04d40: 80 09 28 04 lwz r0,10244(r9) ffc04d44: 2f 80 00 03 cmpwi cr7,r0,3 ffc04d48: 40 be 00 10 bne+ cr7,ffc04d58 !malloc_is_system_state_OK() ) ffc04d4c: 4b ff fe 11 bl ffc04b5c return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc04d50: 2f 83 00 00 cmpwi cr7,r3,0 ffc04d54: 41 9e 00 a0 beq- cr7,ffc04df4 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc04d58: 3d 20 00 00 lis r9,0 ffc04d5c: 80 69 26 ec lwz r3,9964(r9) ffc04d60: 7f e4 fb 78 mr r4,r31 ffc04d64: 38 a0 00 00 li r5,0 ffc04d68: 38 c0 00 00 li r6,0 ffc04d6c: 48 00 50 e9 bl ffc09e54 <_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 ) { ffc04d70: 7c 7e 1b 79 mr. r30,r3 ffc04d74: 40 a2 00 40 bne+ ffc04db4 if (rtems_malloc_sbrk_helpers) ffc04d78: 3d 20 00 00 lis r9,0 ffc04d7c: 81 29 27 64 lwz r9,10084(r9) ffc04d80: 2f 89 00 00 cmpwi cr7,r9,0 ffc04d84: 41 9e 00 1c beq- cr7,ffc04da0 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); ffc04d88: 80 09 00 04 lwz r0,4(r9) ffc04d8c: 7f e3 fb 78 mr r3,r31 ffc04d90: 7c 09 03 a6 mtctr r0 ffc04d94: 4e 80 04 21 bctrl if ( !return_this ) { ffc04d98: 7c 7e 1b 79 mr. r30,r3 ffc04d9c: 40 a2 00 18 bne+ ffc04db4 <== NEVER TAKEN errno = ENOMEM; ffc04da0: 48 00 ae e5 bl ffc0fc84 <__errno> ffc04da4: 38 00 00 0c li r0,12 ffc04da8: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc04dac: 3b c0 00 00 li r30,0 ffc04db0: 48 00 00 44 b ffc04df4 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) ffc04db4: 3d 20 00 00 lis r9,0 ffc04db8: 80 09 27 60 lwz r0,10080(r9) ffc04dbc: 2f 80 00 00 cmpwi cr7,r0,0 ffc04dc0: 41 9e 00 14 beq- cr7,ffc04dd4 (*rtems_malloc_dirty_helper)( return_this, size ); ffc04dc4: 7f c3 f3 78 mr r3,r30 ffc04dc8: 7c 09 03 a6 mtctr r0 ffc04dcc: 7f e4 fb 78 mr r4,r31 ffc04dd0: 4e 80 04 21 bctrl /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc04dd4: 3d 20 00 00 lis r9,0 ffc04dd8: 81 29 27 68 lwz r9,10088(r9) ffc04ddc: 2f 89 00 00 cmpwi cr7,r9,0 ffc04de0: 41 9e 00 14 beq- cr7,ffc04df4 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); ffc04de4: 80 09 00 04 lwz r0,4(r9) ffc04de8: 7f c3 f3 78 mr r3,r30 ffc04dec: 7c 09 03 a6 mtctr r0 ffc04df0: 4e 80 04 21 bctrl return return_this; } ffc04df4: 39 61 00 10 addi r11,r1,16 ffc04df8: 7f c3 f3 78 mr r3,r30 ffc04dfc: 4b ff b7 44 b ffc00540 <_restgpr_30_x> =============================================================================== ffc04aac : } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc04aac: 94 21 ff e8 stwu r1,-24(r1) ffc04ab0: 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; ffc04ab4: 3d 20 00 00 lis r9,0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc04ab8: 90 01 00 1c stw r0,28(r1) * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; ffc04abc: 80 09 27 9c lwz r0,10140(r9) } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc04ac0: bf 81 00 08 stmw r28,8(r1) ffc04ac4: 7c 7d 1b 78 mr r29,r3 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) ffc04ac8: 2f 80 00 00 cmpwi cr7,r0,0 return (void *) 0; ffc04acc: 3b c0 00 00 li r30,0 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) ffc04ad0: 41 9e 00 7c beq- cr7,ffc04b4c <== NEVER TAKEN return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); ffc04ad4: 7f e3 02 14 add r31,r3,r0 ffc04ad8: 7f ff 03 96 divwu r31,r31,r0 ffc04adc: 7f ff 01 d6 mullw r31,r31,r0 starting_address = (void *) sbrk(the_size); ffc04ae0: 7f e3 fb 78 mr r3,r31 ffc04ae4: 4b ff b8 dd bl ffc003c0 if ( starting_address == (void*) -1 ) ffc04ae8: 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); ffc04aec: 7c 64 1b 78 mr r4,r3 if ( starting_address == (void*) -1 ) ffc04af0: 41 9e 00 5c beq- cr7,ffc04b4c return (void *) 0; if ( !_Protected_heap_Extend( ffc04af4: 3f 80 00 00 lis r28,0 ffc04af8: 80 7c 26 cc lwz r3,9932(r28) ffc04afc: 7f e5 fb 78 mr r5,r31 ffc04b00: 48 00 50 89 bl ffc09b88 <_Protected_heap_Extend> ffc04b04: 2f 83 00 00 cmpwi cr7,r3,0 ffc04b08: 40 be 00 1c bne+ cr7,ffc04b24 RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); ffc04b0c: 7c 7f 00 d0 neg r3,r31 ffc04b10: 4b ff b8 b1 bl ffc003c0 errno = ENOMEM; ffc04b14: 48 00 b0 c9 bl ffc0fbdc <__errno> ffc04b18: 38 00 00 0c li r0,12 ffc04b1c: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc04b20: 48 00 00 2c b ffc04b4c } MSBUMP(space_available, the_size); ffc04b24: 3d 20 00 00 lis r9,0 ffc04b28: 80 7c 26 cc lwz r3,9932(r28) ffc04b2c: 80 09 2c 28 lwz r0,11304(r9) ffc04b30: 7f a4 eb 78 mr r4,r29 ffc04b34: 38 a0 00 00 li r5,0 ffc04b38: 7f ff 02 14 add r31,r31,r0 ffc04b3c: 38 c0 00 00 li r6,0 ffc04b40: 93 e9 2c 28 stw r31,11304(r9) ffc04b44: 48 00 4f ed bl ffc09b30 <_Protected_heap_Allocate_aligned_with_boundary> ffc04b48: 7c 7e 1b 78 mr r30,r3 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } ffc04b4c: 39 61 00 18 addi r11,r1,24 ffc04b50: 7f c3 f3 78 mr r3,r30 ffc04b54: 4b ff b9 9c b ffc004f0 <_restgpr_28_x> =============================================================================== ffc04b58 : * 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) { ffc04b58: 2c 03 00 00 cmpwi r3,0 void *malloc_sbrk_initialize( void *starting_address, size_t length ) { ffc04b5c: 94 21 ff f8 stwu r1,-8(r1) ffc04b60: 7c 08 02 a6 mflr r0 uintptr_t old_address; uintptr_t uaddress; RTEMS_Malloc_Sbrk_amount = length; ffc04b64: 3d 20 00 00 lis r9,0 ffc04b68: 90 89 27 9c stw r4,10140(r9) void *malloc_sbrk_initialize( void *starting_address, size_t length ) { ffc04b6c: 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) { ffc04b70: 40 a2 00 2c bne+ ffc04b9c uaddress = (uintptr_t)sbrk(length); ffc04b74: 7c 83 23 78 mr r3,r4 ffc04b78: 4b ff b8 49 bl ffc003c0 if (uaddress == (uintptr_t) -1) { ffc04b7c: 2f 83 ff ff cmpwi cr7,r3,-1 ffc04b80: 40 be 00 0c bne+ cr7,ffc04b8c <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); ffc04b84: 38 60 00 1a li r3,26 ffc04b88: 48 00 39 cd bl ffc08554 /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { ffc04b8c: 70 60 00 07 andi. r0,r3,7 <== NOT EXECUTED ffc04b90: 41 82 00 0c beq- ffc04b9c <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); ffc04b94: 38 63 00 08 addi r3,r3,8 <== NOT EXECUTED ffc04b98: 54 63 00 38 rlwinm r3,r3,0,0,28 <== NOT EXECUTED } starting_address = (void *)uaddress; } return starting_address; } ffc04b9c: 80 01 00 0c lwz r0,12(r1) ffc04ba0: 38 21 00 08 addi r1,r1,8 ffc04ba4: 7c 08 03 a6 mtlr r0 ffc04ba8: 4e 80 00 20 blr =============================================================================== ffc0ef10 : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { ffc0ef10: 7c 08 02 a6 mflr r0 ffc0ef14: 7c 2b 0b 78 mr r11,r1 ffc0ef18: 94 21 ff e0 stwu r1,-32(r1) ffc0ef1c: 90 01 00 24 stw r0,36(r1) ffc0ef20: 48 00 b4 fd bl ffc1a41c <_savegpr_31> IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc0ef24: 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 ) ffc0ef28: 80 1f 00 50 lwz r0,80(r31) ffc0ef2c: 7f 80 28 00 cmpw cr7,r0,r5 ffc0ef30: 41 9c 00 14 blt- cr7,ffc0ef44 <== NEVER TAKEN ffc0ef34: 40 be 00 1c bne+ cr7,ffc0ef50 ffc0ef38: 80 1f 00 54 lwz r0,84(r31) ffc0ef3c: 7f 80 30 40 cmplw cr7,r0,r6 ffc0ef40: 40 bc 00 10 bge+ cr7,ffc0ef50 return IMFS_memfile_extend( the_jnode, length ); ffc0ef44: 7f e3 fb 78 mr r3,r31 ffc0ef48: 4b ff fb d5 bl ffc0eb1c ffc0ef4c: 48 00 00 2c b ffc0ef78 /* * 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; ffc0ef50: 90 bf 00 50 stw r5,80(r31) iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); ffc0ef54: 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; ffc0ef58: 90 df 00 54 stw r6,84(r31) iop->size = the_jnode->info.file.size; ffc0ef5c: 90 a3 00 08 stw r5,8(r3) ffc0ef60: 90 c3 00 0c stw r6,12(r3) IMFS_update_atime( the_jnode ); ffc0ef64: 38 61 00 08 addi r3,r1,8 ffc0ef68: 4b ff 5a a9 bl ffc04a10 ffc0ef6c: 80 01 00 08 lwz r0,8(r1) return 0; ffc0ef70: 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 ); ffc0ef74: 90 1f 00 40 stw r0,64(r31) return 0; } ffc0ef78: 39 61 00 20 addi r11,r1,32 ffc0ef7c: 4b ff 15 c8 b ffc00544 <_restgpr_31_x> =============================================================================== ffc0ef80 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc0ef80: 94 21 ff f0 stwu r1,-16(r1) ffc0ef84: 7c 08 02 a6 mflr r0 ffc0ef88: 90 01 00 14 stw r0,20(r1) ffc0ef8c: bf c1 00 08 stmw r30,8(r1) ffc0ef90: 7c 7f 1b 78 mr r31,r3 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc0ef94: 83 c3 00 1c lwz r30,28(r3) if (the_jnode->type == IMFS_LINEAR_FILE) { ffc0ef98: 80 1e 00 4c lwz r0,76(r30) ffc0ef9c: 2f 80 00 06 cmpwi cr7,r0,6 ffc0efa0: 40 9e 00 34 bne- cr7,ffc0efd4 if (iop->offset > the_jnode->info.linearfile.size) ffc0efa4: 81 3e 00 50 lwz r9,80(r30) ffc0efa8: 81 63 00 10 lwz r11,16(r3) ffc0efac: 80 1e 00 54 lwz r0,84(r30) ffc0efb0: 7f 8b 48 00 cmpw cr7,r11,r9 ffc0efb4: 41 9d 00 14 bgt- cr7,ffc0efc8 <== NEVER TAKEN ffc0efb8: 40 9e 00 5c bne- cr7,ffc0f014 <== NEVER TAKEN ffc0efbc: 81 63 00 14 lwz r11,20(r3) ffc0efc0: 7f 8b 00 40 cmplw cr7,r11,r0 ffc0efc4: 40 9d 00 50 ble- cr7,ffc0f014 <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; ffc0efc8: 91 3f 00 10 stw r9,16(r31) <== NOT EXECUTED ffc0efcc: 90 1f 00 14 stw r0,20(r31) <== NOT EXECUTED ffc0efd0: 48 00 00 44 b ffc0f014 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) ffc0efd4: 80 bf 00 10 lwz r5,16(r31) ffc0efd8: 7f c3 f3 78 mr r3,r30 ffc0efdc: 80 df 00 14 lwz r6,20(r31) ffc0efe0: 4b ff fb 3d bl ffc0eb1c ffc0efe4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0efe8: 41 be 00 1c beq+ cr7,ffc0f004 rtems_set_errno_and_return_minus_one( ENOSPC ); ffc0efec: 48 00 0c 99 bl ffc0fc84 <__errno> ffc0eff0: 38 00 00 1c li r0,28 ffc0eff4: 90 03 00 00 stw r0,0(r3) ffc0eff8: 39 40 ff ff li r10,-1 ffc0effc: 39 60 ff ff li r11,-1 ffc0f000: 48 00 00 1c b ffc0f01c iop->size = the_jnode->info.file.size; ffc0f004: 81 5e 00 50 lwz r10,80(r30) ffc0f008: 81 7e 00 54 lwz r11,84(r30) ffc0f00c: 91 5f 00 08 stw r10,8(r31) ffc0f010: 91 7f 00 0c stw r11,12(r31) } return iop->offset; ffc0f014: 81 5f 00 10 lwz r10,16(r31) ffc0f018: 81 7f 00 14 lwz r11,20(r31) } ffc0f01c: 7d 64 5b 78 mr r4,r11 ffc0f020: 39 61 00 10 addi r11,r1,16 ffc0f024: 7d 43 53 78 mr r3,r10 ffc0f028: 4b ff 15 18 b ffc00540 <_restgpr_30_x> =============================================================================== ffc0ee50 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc0ee50: 94 21 ff f0 stwu r1,-16(r1) ffc0ee54: 7c 08 02 a6 mflr r0 ffc0ee58: 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)) ffc0ee5c: 80 03 00 18 lwz r0,24(r3) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc0ee60: bf c1 00 08 stmw r30,8(r1) ffc0ee64: 7c 7e 1b 78 mr r30,r3 the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc0ee68: 70 09 02 04 andi. r9,r0,516 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc0ee6c: 83 e3 00 1c lwz r31,28(r3) /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc0ee70: 41 82 00 64 beq- ffc0eed4 && (the_jnode->type == IMFS_LINEAR_FILE)) { ffc0ee74: 80 1f 00 4c lwz r0,76(r31) ffc0ee78: 2f 80 00 06 cmpwi cr7,r0,6 ffc0ee7c: 40 be 00 58 bne+ cr7,ffc0eed4 <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; ffc0ee80: 81 1f 00 54 lwz r8,84(r31) <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; ffc0ee84: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc0ee88: 90 1f 00 4c stw r0,76(r31) <== NOT EXECUTED the_jnode->info.file.size = 0; ffc0ee8c: 39 40 00 00 li r10,0 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) ffc0ee90: 2f 88 00 00 cmpwi cr7,r8,0 <== NOT EXECUTED uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; ffc0ee94: 38 00 00 00 li r0,0 <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; ffc0ee98: 80 ff 00 58 lwz r7,88(r31) <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; ffc0ee9c: 39 60 00 00 li r11,0 <== NOT EXECUTED ffc0eea0: 91 5f 00 50 stw r10,80(r31) <== NOT EXECUTED ffc0eea4: 91 7f 00 54 stw r11,84(r31) <== NOT EXECUTED the_jnode->info.file.indirect = 0; ffc0eea8: 90 1f 00 58 stw r0,88(r31) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; ffc0eeac: 90 1f 00 5c stw r0,92(r31) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; ffc0eeb0: 90 1f 00 60 stw r0,96(r31) <== NOT EXECUTED if ((count != 0) ffc0eeb4: 41 be 00 20 beq+ cr7,ffc0eed4 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) ffc0eeb8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0eebc: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc0eec0: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc0eec4: 4b ff fd a1 bl ffc0ec64 <== NOT EXECUTED return -1; ffc0eec8: 38 00 ff ff li r0,-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)) ffc0eecc: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED ffc0eed0: 41 9e 00 34 beq- cr7,ffc0ef04 <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) ffc0eed4: 80 1e 00 18 lwz r0,24(r30) ffc0eed8: 70 09 02 00 andi. r9,r0,512 ffc0eedc: 41 82 00 14 beq- ffc0eef0 iop->offset = the_jnode->info.file.size; ffc0eee0: 81 5f 00 50 lwz r10,80(r31) ffc0eee4: 81 7f 00 54 lwz r11,84(r31) ffc0eee8: 91 5e 00 10 stw r10,16(r30) ffc0eeec: 91 7e 00 14 stw r11,20(r30) iop->size = the_jnode->info.file.size; ffc0eef0: 81 5f 00 50 lwz r10,80(r31) return 0; ffc0eef4: 38 00 00 00 li r0,0 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; ffc0eef8: 81 7f 00 54 lwz r11,84(r31) ffc0eefc: 91 5e 00 08 stw r10,8(r30) ffc0ef00: 91 7e 00 0c stw r11,12(r30) return 0; } ffc0ef04: 39 61 00 10 addi r11,r1,16 ffc0ef08: 7c 03 03 78 mr r3,r0 ffc0ef0c: 4b ff 16 34 b ffc00540 <_restgpr_30_x> =============================================================================== ffc04fcc : /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && ffc04fcc: 2b 86 00 01 cmplwi cr7,r6,1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc04fd0: 94 21 ff a0 stwu r1,-96(r1) ffc04fd4: 7c 08 02 a6 mflr r0 ffc04fd8: be 41 00 28 stmw r18,40(r1) ffc04fdc: 7c 7c 1b 78 mr r28,r3 ffc04fe0: 7c 9f 23 78 mr r31,r4 ffc04fe4: 90 01 00 64 stw r0,100(r1) ffc04fe8: 7c b9 2b 78 mr r25,r5 ffc04fec: 7c d8 33 78 mr r24,r6 ffc04ff0: 7c fa 3b 78 mr r26,r7 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && ffc04ff4: 41 9d 00 14 bgt- cr7,ffc05008 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); ffc04ff8: 7c a3 2b 78 mr r3,r5 ffc04ffc: 48 00 83 7d bl ffc0d378 if ( !mount_h ) ffc05000: 7c 7b 1b 79 mr. r27,r3 ffc05004: 40 a2 00 10 bne+ ffc05014 rtems_set_errno_and_return_minus_one( EINVAL ); ffc05008: 48 00 ac 7d bl ffc0fc84 <__errno> ffc0500c: 38 00 00 16 li r0,22 ffc05010: 48 00 00 f0 b ffc05100 { 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; ffc05014: 7f fd 00 34 cntlzw r29,r31 ffc05018: 57 bd d9 7e rlwinm r29,r29,27,5,31 ffc0501c: 6b bd 00 01 xori r29,r29,1 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; ffc05020: 2f 9d 00 00 cmpwi cr7,r29,0 ffc05024: 7f f6 fb 78 mr r22,r31 ffc05028: 40 be 00 0c bne+ cr7,ffc05034 ffc0502c: 3e c0 ff c2 lis r22,-62 ffc05030: 3a d6 bf 28 addi r22,r22,-16600 size_t filesystemtype_size = strlen( filesystemtype ) + 1; ffc05034: 7f 23 cb 78 mr r3,r25 ffc05038: 48 00 c5 79 bl ffc115b0 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; ffc0503c: 2f 9c 00 00 cmpwi cr7,r28,0 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; ffc05040: 7c 72 1b 78 mr r18,r3 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; ffc05044: 3a e0 00 00 li r23,0 ffc05048: 41 9e 00 10 beq- cr7,ffc05058 ffc0504c: 7f 83 e3 78 mr r3,r28 ffc05050: 48 00 c5 61 bl ffc115b0 ffc05054: 3a e3 00 01 addi r23,r3,1 size_t target_size = strlen( target ) + 1; ffc05058: 7e c3 b3 78 mr r3,r22 ffc0505c: 48 00 c5 55 bl ffc115b0 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; ffc05060: 38 92 00 75 addi r4,r18,117 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; ffc05064: 3a 63 00 01 addi r19,r3,1 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; ffc05068: 7c 84 ba 14 add r4,r4,r23 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; ffc0506c: 7c 74 1b 78 mr r20,r3 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); ffc05070: 7c 84 9a 14 add r4,r4,r19 ffc05074: 38 60 00 01 li r3,1 ffc05078: 4b ff f3 cd bl ffc04444 if ( mt_entry != NULL ) { ffc0507c: 7c 7e 1b 79 mr. r30,r3 ffc05080: 41 82 00 78 beq- ffc050f8 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); ffc05084: 3a be 00 74 addi r21,r30,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; ffc05088: 3a 52 00 01 addi r18,r18,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 ); ffc0508c: 7f 24 cb 78 mr r4,r25 ffc05090: 7e 45 93 78 mr r5,r18 ffc05094: 7e a3 ab 78 mr r3,r21 ffc05098: 48 00 b9 29 bl ffc109c0 mt_entry->type = str; str += filesystemtype_size; ffc0509c: 7f 35 92 14 add r25,r21,r18 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; ffc050a0: 92 be 00 6c stw r21,108(r30) str += filesystemtype_size; memcpy( str, source_or_null, source_size ); ffc050a4: 7e e5 bb 78 mr r5,r23 ffc050a8: 7f 84 e3 78 mr r4,r28 ffc050ac: 7f 23 cb 78 mr r3,r25 ffc050b0: 48 00 b9 11 bl ffc109c0 mt_entry->dev = str; str += source_size; ffc050b4: 7e f9 ba 14 add r23,r25,r23 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; ffc050b8: 93 3e 00 70 stw r25,112(r30) str += source_size; memcpy( str, target, target_size ); ffc050bc: 7e c4 b3 78 mr r4,r22 ffc050c0: 7e 65 9b 78 mr r5,r19 ffc050c4: 7e e3 bb 78 mr r3,r23 ffc050c8: 48 00 b8 f9 bl ffc109c0 mt_entry->target = str; ffc050cc: 92 fe 00 68 stw r23,104(r30) 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; ffc050d0: 3c 80 ff c2 lis r4,-62 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; ffc050d4: 93 de 00 2c stw r30,44(r30) mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; ffc050d8: 38 7e 00 38 addi r3,r30,56 ffc050dc: 38 84 c3 dc addi r4,r4,-15396 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; ffc050e0: 93 1e 00 30 stw r24,48(r30) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; ffc050e4: 38 a0 00 30 li r5,48 ffc050e8: 48 00 b8 d9 bl ffc109c0 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { ffc050ec: 2f 9d 00 00 cmpwi cr7,r29,0 ffc050f0: 41 be 00 d0 beq+ cr7,ffc051c0 ffc050f4: 48 00 00 18 b ffc0510c target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); ffc050f8: 48 00 ab 8d bl ffc0fc84 <__errno> <== NOT EXECUTED ffc050fc: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc05100: 90 03 00 00 stw r0,0(r3) ffc05104: 3b e0 ff ff li r31,-1 ffc05108: 48 00 01 7c b ffc05284 * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( ffc0510c: 7f e3 fb 78 mr r3,r31 ffc05110: 7e 84 a3 78 mr r4,r20 ffc05114: 38 a0 00 07 li r5,7 ffc05118: 38 c1 00 08 addi r6,r1,8 ffc0511c: 38 e0 00 01 li r7,1 ffc05120: 4b ff f7 1d bl ffc0483c ffc05124: 2f 83 ff ff cmpwi cr7,r3,-1 ffc05128: 41 9e 01 3c beq- cr7,ffc05264 <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { ffc0512c: 81 21 00 14 lwz r9,20(r1) ffc05130: 38 61 00 08 addi r3,r1,8 ffc05134: 80 09 00 10 lwz r0,16(r9) ffc05138: 7c 09 03 a6 mtctr r0 ffc0513c: 4e 80 04 21 bctrl ffc05140: 2f 83 00 01 cmpwi cr7,r3,1 ffc05144: 41 9e 00 10 beq- cr7,ffc05154 errno = ENOTDIR; ffc05148: 48 00 ab 3d bl ffc0fc84 <__errno> ffc0514c: 38 00 00 14 li r0,20 ffc05150: 48 00 00 24 b ffc05174 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { ffc05154: 3c 60 ff c0 lis r3,-64 ffc05158: 80 81 00 08 lwz r4,8(r1) ffc0515c: 38 63 4f 14 addi r3,r3,20244 ffc05160: 4b ff fd f9 bl ffc04f58 ffc05164: 2f 83 00 00 cmpwi cr7,r3,0 ffc05168: 41 9e 00 18 beq- cr7,ffc05180 errno = EBUSY; ffc0516c: 48 00 ab 19 bl ffc0fc84 <__errno> ffc05170: 38 00 00 10 li r0,16 ffc05174: 90 03 00 00 stw r0,0(r3) 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; ffc05178: 3b 81 00 08 addi r28,r1,8 * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { errno = EBUSY; goto cleanup_and_bail; ffc0517c: 48 00 00 ec b ffc05268 * 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; ffc05180: 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 ) ) { ffc05184: 7f c3 f3 78 mr r3,r30 * 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; ffc05188: 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; ffc0518c: 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; ffc05190: 90 1e 00 08 stw r0,8(r30) mt_entry->mt_point_node.handlers = loc.handlers; ffc05194: 80 01 00 10 lwz r0,16(r1) mt_entry->mt_point_node.ops = loc.ops; ffc05198: 91 3e 00 14 stw r9,20(r30) * 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; ffc0519c: 90 1e 00 10 stw r0,16(r30) mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; ffc051a0: 80 01 00 18 lwz r0,24(r1) ffc051a4: 90 1e 00 18 stw r0,24(r30) /* * 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 ) ) { ffc051a8: 80 09 00 20 lwz r0,32(r9) ffc051ac: 7c 09 03 a6 mtctr r0 ffc051b0: 4e 80 04 21 bctrl ffc051b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc051b8: 40 9e 00 b0 bne- cr7,ffc05268 <== NEVER TAKEN ffc051bc: 48 00 00 30 b ffc051ec */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc051c0: 3d 20 00 00 lis r9,0 ffc051c4: 39 69 21 a4 addi r11,r9,8612 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { ffc051c8: 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 ); ffc051cc: 38 0b 00 04 addi r0,r11,4 ffc051d0: 7f 89 00 00 cmpw cr7,r9,r0 ffc051d4: 41 9e 00 14 beq- cr7,ffc051e8 <== ALWAYS TAKEN errno = EINVAL; ffc051d8: 48 00 aa ad bl ffc0fc84 <__errno> <== NOT EXECUTED ffc051dc: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc051e0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc051e4: 48 00 00 80 b ffc05264 <== NOT EXECUTED ) { 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; ffc051e8: 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 ) ) { ffc051ec: 7f c3 f3 78 mr r3,r30 ffc051f0: 7f 69 03 a6 mtctr r27 ffc051f4: 7f 44 d3 78 mr r4,r26 ffc051f8: 4e 80 04 21 bctrl ffc051fc: 2f 83 00 00 cmpwi cr7,r3,0 ffc05200: 41 9e 00 1c beq- cr7,ffc0521c /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); ffc05204: 81 21 00 14 lwz r9,20(r1) ffc05208: 7f c3 f3 78 mr r3,r30 ffc0520c: 80 09 00 28 lwz r0,40(r9) ffc05210: 7c 09 03 a6 mtctr r0 ffc05214: 4e 80 04 21 bctrl goto cleanup_and_bail; ffc05218: 48 00 00 50 b ffc05268 } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); ffc0521c: 4b ff fd 0d bl ffc04f28 ffc05220: 3c 60 00 00 lis r3,0 ffc05224: 38 63 21 a4 addi r3,r3,8612 ffc05228: 7f c4 f3 78 mr r4,r30 ffc0522c: 48 00 39 c1 bl ffc08bec <_Chain_Append> ffc05230: 3d 20 00 00 lis r9,0 ffc05234: 80 69 27 b4 lwz r3,10164(r9) rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; return 0; ffc05238: 3b e0 00 00 li r31,0 ffc0523c: 48 00 2f 95 bl ffc081d0 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) ffc05240: 2f 9d 00 00 cmpwi cr7,r29,0 ffc05244: 40 9e 00 40 bne- cr7,ffc05284 rtems_filesystem_root = mt_entry->mt_fs_root; ffc05248: 3d 20 00 00 lis r9,0 ffc0524c: 81 69 27 3c lwz r11,10044(r9) ffc05250: 38 7e 00 1c addi r3,r30,28 ffc05254: 39 6b 00 18 addi r11,r11,24 ffc05258: 7c a3 a4 aa lswi r5,r3,20 ffc0525c: 7c ab a5 aa stswi r5,r11,20 ffc05260: 48 00 00 24 b ffc05284 ) { 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; ffc05264: 3b 80 00 00 li r28,0 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); ffc05268: 7f c3 f3 78 mr r3,r30 ffc0526c: 4b ff f6 f1 bl ffc0495c if ( loc_to_free ) ffc05270: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_filesystem_freenode( loc_to_free ); return -1; ffc05274: 3b e0 ff ff li r31,-1 cleanup_and_bail: free( mt_entry ); if ( loc_to_free ) ffc05278: 41 9e 00 0c beq- cr7,ffc05284 <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); ffc0527c: 7f 83 e3 78 mr r3,r28 ffc05280: 4b ff f6 b1 bl ffc04930 return -1; } ffc05284: 39 61 00 60 addi r11,r1,96 ffc05288: 7f e3 fb 78 mr r3,r31 ffc0528c: 4b ff b2 84 b ffc00510 <_restgpr_18_x> =============================================================================== ffc04e54 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc04e54: 94 21 ff e0 stwu r1,-32(r1) ffc04e58: 7c 08 02 a6 mflr r0 ffc04e5c: bf c1 00 18 stmw r30,24(r1) int rv = -1; if (target != NULL) { ffc04e60: 7c 9e 23 79 mr. r30,r4 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc04e64: 7c 7f 1b 78 mr r31,r3 ffc04e68: 90 01 00 24 stw r0,36(r1) int rv = -1; if (target != NULL) { ffc04e6c: 41 82 00 40 beq- ffc04eac rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); ffc04e70: 7f c3 f3 78 mr r3,r30 ffc04e74: 90 a1 00 08 stw r5,8(r1) ffc04e78: 38 80 01 ff li r4,511 ffc04e7c: 90 c1 00 0c stw r6,12(r1) ffc04e80: 90 e1 00 10 stw r7,16(r1) ffc04e84: 48 00 09 b1 bl ffc05834 if (rv == 0) { ffc04e88: 2c 03 00 00 cmpwi r3,0 ffc04e8c: 80 a1 00 08 lwz r5,8(r1) ffc04e90: 80 c1 00 0c lwz r6,12(r1) ffc04e94: 80 e1 00 10 lwz r7,16(r1) ffc04e98: 40 a2 00 24 bne+ ffc04ebc <== NEVER TAKEN rv = mount( ffc04e9c: 7f e3 fb 78 mr r3,r31 ffc04ea0: 7f c4 f3 78 mr r4,r30 ffc04ea4: 48 00 00 d9 bl ffc04f7c ffc04ea8: 48 00 00 14 b ffc04ebc options, data ); } } else { errno = EINVAL; ffc04eac: 48 00 aa 61 bl ffc0f90c <__errno> ffc04eb0: 38 00 00 16 li r0,22 ffc04eb4: 90 03 00 00 stw r0,0(r3) const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; ffc04eb8: 38 60 ff ff li r3,-1 } else { errno = EINVAL; } return rv; } ffc04ebc: 39 61 00 20 addi r11,r1,32 ffc04ec0: 48 00 f9 24 b ffc147e4 <_restgpr_30_x> =============================================================================== ffc18e50 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc18e50: 94 21 ff 30 stwu r1,-208(r1) ffc18e54: 7c 08 02 a6 mflr r0 ffc18e58: 90 01 00 d4 stw r0,212(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; ffc18e5c: 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; ffc18e60: 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) { ffc18e64: be c1 00 a8 stmw r22,168(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; ffc18e68: 3b 80 00 00 li r28,0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc18e6c: 7c b9 2b 78 mr r25,r5 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; ffc18e70: 83 a3 00 00 lwz r29,0(r3) uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); ffc18e74: 38 a0 00 20 li r5,32 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc18e78: 7c 7f 1b 78 mr r31,r3 int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; ffc18e7c: 83 c9 00 34 lwz r30,52(r9) msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc18e80: 7c 9b 23 78 mr r27,r4 ffc18e84: 90 01 00 18 stw r0,24(r1) uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); ffc18e88: 38 80 00 00 li r4,0 ffc18e8c: 38 61 00 40 addi r3,r1,64 dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; ffc18e90: 90 01 00 1c stw r0,28(r1) msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc18e94: 7c da 33 78 mr r26,r6 ffc18e98: 7d 17 43 78 mr r23,r8 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; ffc18e9c: 93 81 00 0c stw r28,12(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; ffc18ea0: 3a c0 ff ff li r22,-1 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; time_t time_ret = 0; uint16_t time_val = 0; ffc18ea4: b3 81 00 0a sth r28,10(r1) uint16_t date = 0; ffc18ea8: b3 81 00 08 sth r28,8(r1) static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; ffc18eac: 93 81 00 10 stw r28,16(r1) dir_pos->sname.ofs = 0; ffc18eb0: 93 81 00 14 stw r28,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); ffc18eb4: 48 00 53 0d bl ffc1e1c0 memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); ffc18eb8: 38 80 00 00 li r4,0 ffc18ebc: 38 a0 00 40 li r5,64 ffc18ec0: 38 61 00 60 addi r3,r1,96 ffc18ec4: 48 00 52 fd bl ffc1e1c0 name_type = msdos_long_to_short (name, name_len, ffc18ec8: 7f 44 d3 78 mr r4,r26 ffc18ecc: 38 a1 00 40 addi r5,r1,64 ffc18ed0: 38 c0 00 0b li r6,11 ffc18ed4: 7f 23 cb 78 mr r3,r25 ffc18ed8: 48 00 10 09 bl ffc19ee0 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; ffc18edc: 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, ffc18ee0: 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; ffc18ee4: 98 01 00 4c stb r0,76(r1) /* set up last write date and time */ time_ret = time(NULL); ffc18ee8: 38 60 00 00 li r3,0 ffc18eec: 48 00 8b 7d bl ffc21a68